/* Blankup Studio: a calmer workbench with a clear path from idea to order. */
.studio-main { background: #f1eee7; }

.studio-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  min-height: 92px;
  padding: 17px max(24px, calc((100vw - 1680px) / 2));
  color: #f9f4e9;
  background: #171411;
  border-bottom: 1px solid rgba(204, 164, 94, .26);
}
.studio-intro-copy { min-width: 0; }
.studio-intro-kicker,
.studio-panel-step {
  display: block;
  color: #bd9858;
  font: 700 .61rem/1.3 'Be Vietnam Pro', sans-serif;
  letter-spacing: .18em;
}
.studio-intro h1 {
  margin: 7px 0 0;
  color: #f9f4e9;
  font-size: clamp(1.05rem, 1.6vw, 1.46rem);
  line-height: 1.24;
  font-weight: 700;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.studio-intro-steps {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.7vw, 30px);
  flex: 0 0 auto;
  list-style: none;
  padding: 0;
  margin: 0;
}
.studio-intro-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #ddd5c8;
  font-size: .69rem;
  font-weight: 550;
  white-space: nowrap;
}
.studio-intro-steps li + li::before {
  content: '';
  width: 15px;
  height: 1px;
  margin-right: clamp(5px, 1vw, 16px);
  background: rgba(221, 213, 200, .4);
}
.studio-intro-steps li span:first-child {
  color: #d4aa64;
  font-size: .68rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.studio-toolbar { background: #f9f7f2; }
.studio-toolbar-inner { gap: 8px; padding-block: 6px; }
.studio-order-shortcut {
  position: absolute;
  right: max(23px, calc((100vw - 1680px) / 2));
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 0 14px;
  border: 1px solid rgba(143, 100, 46, .3);
  border-radius: 8px;
  color: #4b361b;
  background: #eee4d0;
  font-size: .71rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}
.studio-order-shortcut:hover { background: #dfcca8; border-color: #9c7039; }
.studio-order-shortcut:focus-visible { outline: 3px solid #a77636; outline-offset: 2px; }
.toolbar-tab {
  min-height: 43px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .78rem;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  text-transform: none;
  letter-spacing: -.01em;
}
.toolbar-tab.active {
  border-color: rgba(151, 105, 43, .28);
  background: #eee4d0;
  box-shadow: inset 0 1px rgba(255, 255, 255, .65);
  color: #5c431e;
}
.toolbar-tab:hover { border-color: rgba(151, 105, 43, .23); }

.studio-layout { border-inline: 1px solid rgba(83, 62, 38, .11); }
.studio-left,
.studio-right { background: #fffcf7; }
.studio-panel-intro {
  flex: 0 0 auto;
  padding: 22px 20px 19px;
  background: #fbf7ef;
  border-bottom: 1px solid rgba(105, 78, 47, .15);
}
.studio-panel-intro strong {
  display: block;
  margin-top: 8px;
  color: #211b14;
  font-size: 1.06rem;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.25;
}
.studio-panel-intro p {
  margin: 6px 0 0;
  color: #74695a;
  font-size: .72rem;
  line-height: 1.55;
  text-wrap: pretty;
}
.studio-panel-intro-right { background: #f4eee1; }
.studio-left .panel-section-header h3 { color: #34291c; }
.studio-left .panel-section-body { gap: 15px; }
.prompt-input,
.text-input,
#promptInput {
  border: 1px solid rgba(91, 69, 39, .22);
  border-radius: 10px;
  background: #fffefa;
}
.prompt-input:focus-visible,
.text-input:focus-visible { box-shadow: 0 0 0 3px rgba(181, 139, 69, .19); }
.prompt-suggestion-chip { border-radius: 100px; }
.style-chip { border-radius: 8px; }
.generate-btn {
  min-height: 49px;
  border-radius: 9px;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: .81rem;
  text-transform: none;
  letter-spacing: .01em;
}

.studio-canvas { background: #eee9df; }
.canvas-wrapper {
  background:
    linear-gradient(rgba(100, 76, 42, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 76, 42, .045) 1px, transparent 1px),
    radial-gradient(ellipse at center, #f8f3e9 0%, #eae3d6 100%);
  background-size: 27px 27px, 27px 27px, auto;
}
.canvas-empty {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  width: min(calc(100% - 36px), 760px);
  min-height: 340px;
  max-height: min(70vh, 460px);
  padding: 0;
  text-align: left;
  overflow: hidden;
  background: #fcf8f0;
  border: 1px solid rgba(91, 69, 39, .15);
  border-radius: 17px;
  box-shadow: 0 24px 58px rgba(55, 39, 22, .14), 0 2px 7px rgba(55, 39, 22, .09);
}
.canvas-empty-visual { position: relative; min-height: 340px; overflow: hidden; background: #181410; }
.canvas-empty-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, .45));
}
.canvas-empty-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 29% center; display: block; }
.canvas-empty-visual span {
  position: absolute;
  z-index: 1;
  bottom: 17px;
  left: 20px;
  color: #e2c692;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .17em;
}
.canvas-empty-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 21px;
  min-width: 0;
  padding: clamp(24px, 3.3vw, 45px);
}
.canvas-empty-copy { display: block; max-width: 100%; text-align: left; }
.canvas-empty-kicker { display: block; margin-bottom: 13px; color: #8b6937; font-size: .61rem; letter-spacing: .17em; }
.canvas-empty-copy p {
  max-width: 13ch;
  margin: 0 0 13px;
  color: #241d15;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.17;
  font-weight: 750;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.canvas-empty-copy .field-hint { display: block; max-width: 37ch; font-size: .75rem; line-height: 1.65; color: #665d50; }
.canvas-empty-actions { display: flex; justify-content: flex-start; gap: 8px; margin: 0; }
.canvas-empty-cta { min-height: 43px; padding: 0 14px; border-radius: 8px; font-size: .72rem; white-space: nowrap; }
.canvas-empty-cta-secondary { border-color: #baa98d; }
.canvas-empty-note { display: block; margin: -8px 0 0; font-size: .66rem; }
.canvas-controls { background: #faf7f0; border-top: 1px solid rgba(91, 69, 39, .16); }

.studio-right .right-section { border-color: rgba(105, 78, 47, .12); }
.studio-right .right-section-header { color: #3c3023; font-size: .8rem; font-weight: 700; }
.product-type-btn,
.size-btn {
  border-radius: 9px;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.product-type-btn.active { background: #201b16; color: #f9f4e9; border-color: #201b16; }
.price-section {
  background: #231d16;
  border-color: #231d16 !important;
  border-radius: 10px;
  padding-block: 15px !important;
  scroll-margin-top: 140px;
}
.price-section .price-label { color: #e4d9c4; }
.price-section .price-value { color: #e8bd76; font-variant-numeric: tabular-nums; }
.action-btn {
  border-radius: 9px;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  text-transform: none;
  letter-spacing: .01em;
  font-size: .78rem;
}
.action-btn-primary { min-height: 49px; }
.action-btn:focus-visible,
.toolbar-tab:focus-visible,
.product-type-btn:focus-visible,
.size-btn:focus-visible,
.color-dot:focus-visible { outline: 3px solid #a77636; outline-offset: 2px; }

[data-theme="dark"] .studio-intro { border-color: #5e4b2c; }
[data-theme="dark"] .studio-toolbar { background: #211c16; }
[data-theme="dark"] .studio-order-shortcut { color: #f3d9a4; background: #372c1b; border-color: #69512c; }
[data-theme="dark"] .toolbar-tab.active { background: #3a2e1c; color: #e6bd78; border-color: #6d5633; }
[data-theme="dark"] .studio-left,
[data-theme="dark"] .studio-right { background: #211c16; }
[data-theme="dark"] .studio-panel-intro { background: #2a231a; border-color: #45382a; }
[data-theme="dark"] .studio-panel-intro strong,
[data-theme="dark"] .studio-left .panel-section-header h3 { color: #f8f1e5; }
[data-theme="dark"] .studio-panel-intro p { color: #b5a796; }
[data-theme="dark"] .studio-right .right-section-header { color: #ebdfcf; }
[data-theme="dark"] .prompt-input,
[data-theme="dark"] .text-input,
[data-theme="dark"] #promptInput {
  color: #f6edde;
  background: #302820;
  border-color: #6d5740;
}
[data-theme="dark"] .prompt-input::placeholder,
[data-theme="dark"] .text-input::placeholder,
[data-theme="dark"] #promptInput::placeholder { color: #aa9881; opacity: 1; }
[data-theme="dark"] .studio-canvas { background: #201b15; }
[data-theme="dark"] .canvas-wrapper {
  background: radial-gradient(ellipse at center, #342d22 0%, #201b15 100%);
}
[data-theme="dark"] .canvas-empty { background: #2b251c; border-color: #5a4830; }
[data-theme="dark"] .canvas-empty-copy p { color: #f6edde; }
[data-theme="dark"] .canvas-empty-kicker { color: #dfb877; }
[data-theme="dark"] .canvas-empty-copy .field-hint { color: #c3b5a1; }
[data-theme="dark"] .canvas-empty-note { color: #c3b5a1; }
[data-theme="dark"] .canvas-controls { background: #241e17; }

@media (max-width: 1280px) {
  .studio-intro-steps { gap: 8px; }
  .studio-intro-steps li + li::before { margin-right: 5px; }
  .canvas-empty-content { padding: 24px; }
  .canvas-empty-actions { flex-direction: column; align-items: stretch; width: 100%; }
}
@media (max-width: 1100px) {
  .studio-intro { padding-inline: 22px; }
  .studio-intro-steps li { font-size: .62rem; }
  .studio-layout { border: 0; }
  .canvas-empty { width: min(calc(100% - 32px), 780px); }
  .canvas-empty-actions { flex-direction: row; width: auto; }
}
@media (max-width: 900px) { .studio-order-shortcut { display: none; } }
@media (max-width: 768px) {
  .studio-intro { min-height: 70px; padding: 12px 16px; }
  .studio-intro h1 { font-size: 1rem; }
  .studio-intro-steps { display: none; }
  .studio-panel-intro { padding: 18px 17px; }
  .canvas-empty {
    display: block;
    width: min(calc(100% - 24px), 540px);
    min-height: 0;
    max-height: none;
  }
  .canvas-empty-visual { display: none; }
  .canvas-empty-content { gap: 12px; padding: 18px 20px; }
  .canvas-empty-kicker { margin-bottom: 7px; }
  .canvas-empty-copy p { max-width: none; margin-bottom: 6px; font-size: 1.25rem; }
  .canvas-empty-copy .field-hint { font-size: .7rem; }
  .canvas-empty-actions { gap: 7px; }
  .canvas-empty-cta { min-height: 39px; }
  .canvas-empty-note { display: none; }
}
@media (max-width: 480px) {
  .canvas-empty-content { padding: 14px 15px; }
  .canvas-empty-copy p { font-size: 1.1rem; }
  .canvas-empty-actions { flex-direction: row; width: 100%; }
  .canvas-empty-cta { flex: 1; min-width: 0; padding-inline: 7px; font-size: .64rem; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-intro *, .canvas-empty, .canvas-empty-cta { animation: none !important; transition: none !important; }
}

/* Dùng ảnh riêng: keep the complete artwork visible and make every upload state legible. */
.tab-panel[data-panel="image"] .panel-section-header h3 { font-size: 1.13rem; }
.tab-panel[data-panel="image"] .upload-zone {
  min-height: 186px;
  border-color: #c9ad7d;
  background: radial-gradient(circle at 50% 0%, #fffaf0, #f6f0e6 75%);
}
.tab-panel[data-panel="image"] .upload-zone-browse { padding: 6px 16px; border-radius: 7px; background: #211910; color: #f7d492; }
.tab-panel[data-panel="image"] .upload-zone:hover .upload-zone-browse,
.tab-panel[data-panel="image"] .upload-zone:focus-visible .upload-zone-browse { background: #765321; color: #fff; }
.tab-panel[data-panel="image"] .upload-preview { padding: 10px; background: #f6f1e9; }
.tab-panel[data-panel="image"] .upload-preview img { height: 210px; object-fit: contain; border-radius: 7px; background: repeating-conic-gradient(#e9e2d5 0 25%, #f7f3eb 0 50%) 50% / 18px 18px; }
.upload-preview-meta { display: flex; justify-content: space-between; gap: 10px; padding: 10px 3px 5px; color: #5e5141; font-size: .72rem; }
.upload-preview-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-preview-actions { display: flex; align-items: center; gap: 8px; padding: 4px 3px 2px; }
.upload-preview-actions .upload-preview-btn { min-height: 36px; padding: 7px 11px; border: 1px solid #b89b69; border-radius: 7px; background: #fffaf1; color: #463016; font: 600 .72rem 'Be Vietnam Pro', sans-serif; cursor: pointer; }
.upload-preview-actions .upload-preview-btn:hover { background: #edd9ad; }
.upload-preview-actions .upload-preview-btn:disabled { opacity: .55; cursor: wait; }
.upload-preview-actions .upload-preview-remove { position: static; flex: none; margin-left: auto; }
.upload-status { min-height: 34px; margin: 9px 1px 17px; color: #685b48; font-size: .71rem; line-height: 1.5; }
.upload-status[data-state="error"] { color: #ae3727; }
.upload-status[data-state="success"] { color: #337149; }
.upload-status[data-state="loading"] { color: #8a5d13; }
.tab-panel[data-panel="image"] .upload-mode-fieldset { margin-bottom: 18px; }
.tab-panel[data-panel="image"] .radio-label { align-items: flex-start; padding: 10px; border: 1px solid #ddd1bf; border-radius: 8px; }
.tab-panel[data-panel="image"] .radio-label:has(input:checked) { border-color: #bb8b44; background: #fbf3e4; }
.tab-panel[data-panel="image"] .radio-text small { display: block; line-height: 1.55; }
[data-theme="dark"] .tab-panel[data-panel="image"] .upload-zone { background: #30271d; border-color: #8a6839; }
[data-theme="dark"] .tab-panel[data-panel="image"] .upload-preview { background: #30271d; }
[data-theme="dark"] .tab-panel[data-panel="image"] .radio-label { border-color: #594b3b; }
[data-theme="dark"] .tab-panel[data-panel="image"] .radio-label:has(input:checked) { background: #46351e; border-color: #c99a52; }
[data-theme="dark"] .upload-status, [data-theme="dark"] .upload-preview-meta { color: #d1c1aa; }
[data-theme="dark"] .upload-status[data-state="success"] { color: #86c99a; }
[data-theme="dark"] .upload-status[data-state="error"] { color: #f2a092; }
@media (max-width: 480px) { .upload-preview-actions { flex-wrap: wrap; } .upload-preview-actions .upload-preview-btn { flex: 1; } }
