/* Shared workbench palette. The existing theme picker supplies surface, ink and glow. */
:root {
  --studio-tint: #d1eeec;
  --studio-mist: #eff9f8;
  --studio-strong: #056f79;
  --studio-shadow: 0 4px 19px -12px rgba(14, 76, 84, .24);
  --studio-uplink: #8fbfc1;
}
:root[data-theme="sand"] {
  --studio-tint: #f1dfc7; --studio-mist: #fbf6ee;
  --studio-strong: #805027; --studio-uplink: #c4aa86;
}
:root[data-theme="night"] {
  --studio-tint: #23434b; --studio-mist: #192d34;
  --studio-strong: #9cdee1; --studio-uplink: #527b83;
  --studio-shadow: 0 4px 19px -12px #000;
}
.shell { background: linear-gradient(160deg,var(--studio-mist),var(--page-bg) 54%); }
.shell .sidebar { border-inline-end: 1px solid var(--line); }
.shell .sidebar .brand { padding-bottom: 10px; }
.shell .sidebar .nav-item { min-height: 40px; border-radius: 9px; transition: background-color .14s,color .14s; }
.shell .sidebar .nav-item.active {
  color: var(--studio-strong); background: var(--studio-tint);
  box-shadow: inset 3px 0 var(--studio-strong);
}
.shell .topbar { background: var(--surface); box-shadow: 0 1px var(--line); }
.shell .page > .page-heading,.shell .price-hero,.shell .works-heading {
  isolation: isolate; position: relative; overflow: hidden;
  padding: clamp(18px,2.5vw,35px); border-radius: 16px;
  border: 1px solid var(--line); margin-bottom: 18px;
  background: linear-gradient(110deg,var(--studio-mist),var(--studio-tint) 80%,var(--surface-soft));
}
.shell :is(.page > .page-heading,.price-hero,.works-heading)::before,
.shell :is(.page > .page-heading,.price-hero,.works-heading)::after {
  content: ""; position: absolute; pointer-events: none; z-index: -1;
  width: 56%; height: 165%; right: -5%; bottom: -105%; transform: rotate(-10deg);
  border-radius: 50%; background: var(--surface); opacity: .56;
}
.shell :is(.page > .page-heading,.price-hero,.works-heading)::after {
  width: 50%; height: 130%; right: 13%; bottom: -102%; opacity: .48;
  border: 1px solid var(--studio-uplink);
}
.shell .page-heading .eyebrow,.shell .price-hero .eyebrow { color: var(--studio-strong); font-size: 10px; letter-spacing: .17em; }
.shell .page-heading h1,.shell .works-heading h1,.shell .price-hero h1 {
  color: var(--ink); font-size: clamp(23px,2.2vw,36px); line-height: 1.2; letter-spacing: -.025em; margin-block: 7px;
}
.shell .page-heading p { margin-block-end: 0; }
@media (min-width:1100px) {
  .shell .page > .page-heading::after,.shell .works-heading::after {
    inset:auto 12% 0 auto; width:31%; height:94%; border:0; border-radius:0;
    transform:none; opacity:.85; background: url('/assets/studio-hero.webp') center bottom / contain no-repeat;
  }
  .shell .price-hero::after {
    inset:auto 3% 0 auto; width:24%; height:86%; border:0; border-radius:0;
    transform:none; opacity:.85; background:url('/assets/studio-hero.webp') center bottom / contain no-repeat;
  }
  .shell .page > .page-heading > div:first-child { max-width:55%; }
}
.shell .tool-layout { gap: clamp(14px,1.5vw,24px); }
.shell .tool-layout .panel,.shell .price-card,.shell .works-toolbar,.shell .work-tile,.shell .wf-gallery-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px;
  box-shadow: var(--studio-shadow);
}
.shell .tool-layout .panel-title { align-items: center; gap: 9px; color: var(--ink); }
.shell .step-number { border-radius: 50%; background: var(--studio-tint); color: var(--studio-strong); }
.shell .tool-layout .upload-zone {
  background: linear-gradient(140deg,var(--studio-mist),var(--surface-soft)); border-color:var(--studio-uplink);
  border-radius: 10px; color:var(--ink); transition: border-color .15s,background-color .15s,box-shadow .15s;
}
.shell .tool-layout .upload-zone :is(svg,path) { color: var(--studio-strong); }
.shell .tool-layout .upload-zone small { color:var(--muted); font-size:12px; }
.shell .tool-layout button.generate {
  color:var(--surface); background:var(--studio-strong); border-color:var(--studio-strong);
  box-shadow:var(--studio-shadow);
}
.shell .tool-layout .upload-zone.dragover,.shell .tool-layout .upload-zone:focus-visible {
  border-color:var(--studio-strong); box-shadow: inset 0 0 0 2px var(--studio-strong);
}
.shell .tool-layout .workspace-head { border-radius: 14px 14px 0 0; background:var(--studio-mist); border-color:var(--line); }
.shell .workspace-head .active { color: var(--studio-strong); }
.shell .workspace .studio-preview {
  height: clamp(180px,19vw,256px);
  background: radial-gradient(ellipse at 50% 65%,var(--studio-mist),var(--surface) 72%);
}
.shell .workspace .studio-preview img { width: min(76%,235px); height:100%; object-fit:contain; filter:none; }
.shell .workspace .empty-intro { color:var(--ink); }
.shell .workspace .process span { border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px; background:var(--surface); }
.shell .workspace .process { flex-wrap: wrap; row-gap: 6px; }
.shell .price-card.featured { border:2px solid var(--studio-strong); }
.shell .wf-hub .wf-hub-head {
  background:linear-gradient(105deg,var(--studio-mist),var(--studio-tint)); border:1px solid var(--line);
  padding:clamp(16px,2.4vw,32px); border-radius:15px;
}
.shell .wf-hub .wf-hub-head :is(h1,.eyebrow) { color:var(--ink); }
.shell .wf-hub .wf-hub-head p { color:var(--muted); }
.shell .sidebar .upgrade {
  background:linear-gradient(145deg,var(--studio-mist),var(--studio-tint));
  border:1px solid var(--line); color:var(--ink);
}
.shell .sidebar .upgrade :is(b,a) { color:var(--studio-strong); }
.shell .sidebar .upgrade p { color:var(--muted); }
.shell .sidebar .upgrade a { background:var(--surface); border-color:var(--line); }
.shell .wf-gallery-card:focus-within,.shell .work-tile:focus-within { outline: 2px solid var(--studio-strong); outline-offset: 2px; }
.shell :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible,
#modal :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible {
  outline:2px solid var(--studio-strong); outline-offset: 3px;
}
.shell .studio-nav-scrim[hidden],.shell .studio-drawer-close[hidden] { display:none; }
@media (hover:hover) {
  .shell .sidebar a.nav-item:hover,.shell .tool-layout .upload-zone:hover:not(:disabled) {
    color:var(--studio-strong); background:var(--studio-tint);
  }
  .shell .tool-layout .upload-zone:hover:not(:disabled) { border-color:var(--studio-strong); }
}
@media (max-width:900px) {
  body.studio-nav-open { overflow:hidden; }
  .shell .studio-nav-scrim { position:fixed; inset:0; z-index:70; width:100%; height:100%; border:0; border-radius:0; background:#102f3980; }
  .shell .sidebar { z-index:71; }
  .shell .sidebar.open { visibility:visible; }
  .shell .studio-drawer-close { display:grid; place-items:center; align-self:flex-end; flex:none; width:40px; height:40px; padding:0; margin-block:-6px; color:var(--ink); font-size:23px; }
  .shell .mobile-menu { width:44px; height:44px; justify-content:center; }
  .shell .sidebar .nav-item { min-height:44px; }
}
@media (max-width:650px) {
  .shell .topbar { display:flex; flex-wrap:wrap; padding:6px 14px; gap:4px 12px; }
  .shell .breadcrumb { flex:1 0 100%; height:36px; min-width:0; }
  .shell .breadcrumb .mobile-menu { margin-inline-end:4px; }
  .shell .top-actions { width:100%; display:flex; flex-flow:row wrap; align-items:center; justify-content:flex-start; }
  .shell .top-actions .theme-control33 { width:auto; margin-inline-end:auto; }
  .shell .top-actions > .primary,.shell .top-actions > .credits-pill { width:auto; flex:none; white-space:nowrap; }
  .shell .page > .page-heading,.shell .works-heading,.shell .price-hero { border-radius:12px; padding:16px; gap:10px; }
  .shell .page > .page-heading { display:grid; grid-template-columns:1fr auto; align-items:start; }
  .shell .page > .page-heading h1 { text-wrap:balance; }
  .shell .page-heading > div { min-width:0; }
  .shell .page-heading > button { flex:none; }
  .shell .wf-hub .wf-hub-head { flex-wrap:wrap; gap:8px; }
  .shell .tool-layout .workspace-head { gap:8px; flex-wrap:wrap; }
  .shell .workspace .studio-preview { height:155px; }
}
@media (prefers-reduced-motion:reduce) {
  .shell .page,.shell .sidebar,.shell .nav-item,.shell .tool-layout .upload-zone { animation:none;transition:none; }
}
