:root {
  --bg: #0d0907;
  --panel: #16100b;
  --panel-2: #211810;
  --line: #3a2a1a;
  --line-2: #5a4229;
  --text: #f6ead8;
  --muted: #bfa98d;
  --accent: #5ff2c8;
  --accent-ink: #062018;
  --blue: #c8955a;
  --violet: #e9c48f;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 Inter, system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button, input, textarea, output { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* header + footer */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: #0a0705;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px var(--line-2); }
.brand-name { font-weight: 700; letter-spacing: .18em; font-size: 15px; }
.brand-tag { color: var(--accent); font-size: 13px; }
.x-link {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2);
}
.x-link svg { width: 16px; height: 16px; stroke: none; }
.x-link:hover { border-color: var(--accent); }

.site-footer {
  margin-top: auto;
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
  padding: 26px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.site-footer strong { color: var(--text); letter-spacing: .18em; font-size: 13px; }

/* page */
.studio { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 48px; }
.intro h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
.intro h1 span { color: var(--accent); }
.intro p { margin: 8px 0 28px; color: var(--muted); }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }

/* settings panel */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel h2 { margin: 0; font-size: 18px; font-weight: 600; }
.panel h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.block { padding: 16px 0; border-top: 1px solid var(--line); }
.block:first-of-type { border-top: 0; padding-top: 4px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.row-head h3 { margin: 0; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.processing { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; color: var(--muted); padding: 4px 6px; font-size: 13px;
}
.ghost svg { width: 15px; height: 15px; }
.ghost:hover { color: var(--text); }

.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; color: var(--text);
}
.icon-btn:hover:not(:disabled) { border-color: var(--accent); }
.icon-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.primary, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 10px; font-weight: 600;
}
.primary { background: var(--accent); color: var(--accent-ink); border: 0; }
.primary:hover:not(:disabled) { background: #8ff7da; }
.secondary { background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); }
.secondary:hover:not(:disabled) { border-color: var(--accent); }
.small { height: 36px; padding: 0 12px; font-size: 14px; font-weight: 500; }
.link { background: none; border: 0; color: var(--muted); padding: 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--text); }

/* segmented buttons */
.seg {
  display: grid; gap: 4px; padding: 4px;
  background: #120c08; border: 1px solid var(--line); border-radius: 10px;
}
.seg.two { grid-template-columns: 1fr 1fr; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg button {
  background: none; border: 0; border-radius: 7px; padding: 8px 6px; color: var(--muted); font-size: 14px;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: #2e2114; color: var(--text); }

.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

/* frames */
.frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.frames button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: #120c08; border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px 7px;
  color: var(--muted); font-size: 12.5px;
}
.frames button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: #1d1510; }
.frames canvas { width: 100%; max-width: 72px; aspect-ratio: 1; border-radius: 50%; display: block; }

/* swatches */
.swatches { display: flex; gap: 10px; }
.swatches button {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2);
  display: grid; place-items: center; padding: 0;
}
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
.swatches svg { opacity: 0; }
.swatches button[aria-pressed="true"] svg { opacity: 1; }

/* banner text */
.field { display: block; margin: 0 0 6px; }
.field-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--text); }
.field-label em { color: var(--muted); font-style: normal; font-size: 12px; }
.at-input {
  display: flex; align-items: center; gap: 4px; margin-bottom: 14px;
  background: #120c08; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px;
}
.at-input span { color: var(--muted); }
.at-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 42px; }
.at-input:focus-within, textarea:focus { border-color: var(--accent); }
textarea {
  width: 100%; resize: none; background: #120c08; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; outline: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chips button {
  background: #120c08; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 11px;
  font-size: 12.5px; color: var(--muted);
}
.chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }

/* work area */
.tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs { grid-template-columns: repeat(3, auto); }
.tabs button { padding: 8px 16px; }
.status { margin: 0; color: var(--muted); font-size: 13px; }

.stage {
  position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 64px 20px 20px;
  min-height: 420px;
  display: flex; flex-direction: column; align-items: center;
}
.history { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }

.view { width: 100%; display: flex; justify-content: center; }
.pfp-disc {
  position: relative; width: min(440px, 100%); aspect-ratio: 1;
  border-radius: 50%; padding: 14px; background: #0a0705;
  box-shadow: inset 0 0 0 1px var(--line);
}
#pfp { width: 100%; height: 100%; border-radius: 50%; display: block; cursor: grab; touch-action: none; }
#pfp.empty { cursor: pointer; }
#pfp.dragging, #banner.dragging { cursor: grabbing; }
.photo-btns { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(13,9,7,.82); color: #fff; font-size: 14px; backdrop-filter: blur(6px);
  white-space: nowrap;
}
.pill.round { width: 38px; padding: 0; justify-content: center; }
.pill:hover { border-color: var(--accent); }

#banner { width: 100%; aspect-ratio: 3; display: block; border-radius: 8px; cursor: grab; touch-action: none; }

.profile-card { width: min(600px, 100%); background: #000; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pc-banner { width: 100%; aspect-ratio: 3; display: block; }
.pc-body { position: relative; padding: 0 18px 18px; }
.pc-avatar {
  width: 25%; aspect-ratio: 1; border-radius: 50%; display: block;
  margin-top: -12.5%; border: 4px solid #000; background: #000;
}
.pc-name { margin-top: 10px; font-weight: 700; font-size: 19px; }
.pc-handle { color: #71767b; font-size: 15px; }
.pc-bio { margin: 10px 0 0; font-size: 15px; }

.framing { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 16px; }
.zoom { display: flex; align-items: center; gap: 8px; }
.zoom output { min-width: 52px; text-align: center; font-size: 13px; color: var(--muted); }
.framing-hint { margin: 0; font-size: 13px; color: var(--muted); }

.drop {
  position: absolute; inset: 0; border-radius: var(--radius);
  border: 2px dashed var(--accent); background: rgba(13,9,7,.85);
  display: grid; place-items: center; font-weight: 600; pointer-events: none;
}

.caption { margin: 10px 2px 0; color: var(--muted); font-size: 13px; }

.looks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.looks:empty { display: none; }
.looks button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px 8px;
  color: var(--muted); font-size: 12.5px;
}
.looks button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); }
.looks canvas { width: 100%; max-width: 84px; aspect-ratio: 1; border-radius: 50%; display: block; }

.downloads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

/* cutout editor */
.editor {
  width: min(500px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 16px; padding: 18px;
}
.editor::backdrop { background: rgba(13,9,7,.75); }
.ed-head { display: flex; align-items: center; justify-content: space-between; }
.ed-head h2 { margin: 0; font-size: 20px; }
.ed-sub { margin: 4px 0 12px; color: var(--muted); font-size: 14px; }
.ed-size { display: grid; grid-template-columns: auto 1fr 52px; align-items: center; gap: 12px; margin: 14px 0 10px; font-size: 13px; }
.ed-size input { accent-color: var(--accent); width: 100%; }
.ed-size output { color: var(--accent); font-size: 13px; }
.ed-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ed-brush { width: 190px; }
.spacer { flex: 1; }
.ed-wrap {
  position: relative; width: min(100%, calc(100vh - 300px)); min-width: 220px; margin: 0 auto;
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background-color: #1a120c;
  background-image: linear-gradient(45deg, #2a1e13 25%, transparent 25%), linear-gradient(-45deg, #2a1e13 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2a1e13 75%), linear-gradient(-45deg, transparent 75%, #2a1e13 75%);
  background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0;
}
.ed-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: none; }
.ed-cursor {
  position: absolute; border: 2px solid #fff; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6); transform: translate(-50%, -50%);
}
.ed-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.ed-foot .primary, .ed-foot .secondary { height: 40px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 14px; }
  /* on a phone the settings sit right under the preview and the downloads come last */
  .work { display: contents; }
  .tabs-row { order: 1; margin-bottom: 0; }
  .stage { order: 2; padding: 60px 12px 16px; min-height: 0; }
  .caption { order: 3; margin-top: -4px; }
  .looks { order: 4; margin-top: 0; }
  .panel { order: 5; }
  .downloads { order: 6; margin-top: 0; }
  .share-row { order: 7; margin-top: -2px; }
}
@media (max-width: 520px) {
  .looks { grid-template-columns: repeat(3, 1fr); }
  .downloads { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
  .tabs button { padding: 8px 12px; }
}

/* ---------- the DEWIQ look: night desert, sandstone, mint-teal light ----------
   Only the studio page (body.studio-page); the Data Bank pages keep their own look. */
.studio-page {
  --bg: #0d0907; --panel: #16100b; --panel-2: #211810; --line: #3a2a1a; --line-2: #5a4229;
  --text: #f6ead8; --muted: #bfa98d; --accent: #5ff2c8; --accent-ink: #0d0907; --radius: 12px;
  --title: #e9c48f;
  background: var(--bg);
  font: 500 13px/1.4 Inter, system-ui, sans-serif;
}
.studio-page ::selection { color: var(--bg); background: var(--accent); }
.studio-page :focus-visible { outline-color: var(--accent); }

/* header: the brand and the links fade into the page, no frame */
.studio-page .site-header {
  position: sticky; top: 0; z-index: 8; height: 64px; padding: 0 32px; border: 0;
  background: linear-gradient(180deg, rgba(13,9,7,.97) 0%, rgba(13,9,7,.86) 55%, rgba(13,9,7,0) 100%);
}
.studio-page .brand { gap: 12px; }
.studio-page .brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 0 0 1px var(--accent); object-fit: cover; }
.studio-page .brand > span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.studio-page .brand-kicker { font-size: 10px; font-weight: 600; letter-spacing: .28em; color: var(--accent); }
.studio-page .brand-name { font-family: Cinzel, serif; font-size: 20px; font-weight: 900; letter-spacing: .12em; color: var(--title); }
.studio-page .site-nav { gap: 28px; }
.studio-page .site-nav a:not(.x-link) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border-radius: 0;
  background: none; font-size: 14px; font-weight: 600; color: var(--text);
}
.studio-page .site-nav a:not(.x-link):hover, .studio-page .site-nav a[aria-current="page"] { color: var(--accent); background: none; }
.studio-page .x-link { width: 44px; height: 44px; background: transparent; border: 0; }
.studio-page .x-link:hover { color: var(--accent); }
.studio-page .site-footer { display: none; }

/* controls */
.studio-page .primary, .studio-page .secondary { min-height: 48px; height: auto; border-radius: 6px; font-size: 13px; }
.studio-page .primary { background: var(--accent); color: var(--accent-ink); }
.studio-page .primary:hover:not(:disabled) { background: #8ff7da; }
.studio-page .secondary { background: var(--panel-2); border-color: var(--line-2); }
.studio-page .icon-btn { width: 44px; height: 44px; min-width: 44px; border-radius: 6px; background: transparent; }
.studio-page .small, .studio-page .ghost { min-height: 44px; }
.studio-page .ghost { padding: 4px 0; }
.studio-page .seg { background: #120c08; border: 0; padding: 3px; gap: 3px; border-radius: 7px; }
.studio-page .seg button { min-height: 44px; border-radius: 5px; color: var(--muted); }
.studio-page .seg button[aria-pressed="true"] { background: #2e2114; color: #f6ead8; box-shadow: none; }
.studio-page .seg.three button { font-size: 11px; }
.studio-page .editor { background: var(--bg); border-color: var(--line-2); border-radius: 10px; }

/* page */
.studio-page .studio { max-width: 1560px; padding: 44px clamp(22px, 5vw, 80px) 48px; }
.studio .intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 28px; }
.studio .intro h1 {
  margin: 0; font-family: Cinzel, serif; font-size: clamp(40px, 4.6vw, 70px); line-height: 1; letter-spacing: .04em; font-weight: 900;
  text-transform: uppercase; color: var(--title);
}
.studio .intro h1 span { color: var(--accent); }
.studio .intro p { margin: 0 0 3px; font-size: 13px; white-space: nowrap; }
.studio .layout { grid-template-columns: 260px minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); }

.studio .panel { border: 0; border-radius: 12px; padding: 18px; background: #16100b; }
.studio .panel-head { margin-bottom: 22px; }
.studio .panel h2 { font-size: 15px; }
.studio .panel h3 { font-size: 12px; color: var(--muted); }
.studio .block { border: 0; padding: 18px 0; }
.studio .check { font-size: 12px; }
.studio .frames button { border-color: transparent; background: #1d1510; border-radius: 6px; padding: 10px 6px; font-size: 11px; }
.studio .frames button[aria-pressed="true"] { background: #2e2114; border-color: #5ff2c8; color: var(--title); }
.studio .swatches button { width: 44px; height: 44px; border-radius: 50%; }
.studio .swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent); }
.studio .at-input, .studio textarea { background: var(--panel); border-radius: 6px; font-size: 13px; }
.studio .chips button { border: 0; border-radius: 0; background: none; min-height: 44px; padding: 4px 8px; }
.studio .chips button[aria-pressed="true"] { box-shadow: inset 0 -2px var(--accent); }

.studio .tabs-row { margin: 0 0 14px; }
.studio .tabs { background: #120c08; border: 1px solid #3a2a1a; border-radius: 8px; padding: 4px; gap: 4px; }
.studio .tabs button { min-height: 44px; padding: 0 18px; border-radius: 5px; font-size: 13px; color: #bfa98d; background: #1d1510; }
.studio .tabs button:hover { background: #2e2114; color: var(--text); }
.studio .tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.studio .status { max-width: 46ch; font-size: 12px; }

/* the stage sits on the page with a big "QUANT." behind it, like the rest of the site */
.studio .stage {
  background: transparent; border: 0; border-radius: 0; min-height: 520px; padding: 60px 20px 12px;
  isolation: isolate; overflow: hidden;
}
.studio .stage::before {
  content: 'DEWIQ'; position: absolute; inset: 22% -8% auto; z-index: -1; pointer-events: none;
  font-family: Cinzel, serif; font-weight: 900; font-size: clamp(70px, 10vw, 160px); letter-spacing: .02em; line-height: 1; text-align: center;
  color: #2a1d12; opacity: .45;
}
.studio .pfp-disc { width: min(470px, 100%); background: var(--bg); }
.studio .pill { height: 44px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line-2); }
.studio .pill.round { width: 44px; }
.studio .zoom { margin-top: 20px; }
.studio .zoom output { font-size: 12px; }
.studio .caption { font-size: 11px; text-align: center; margin: 10px 0 16px; }
.studio .looks { gap: 10px; max-width: 620px; margin: 0 auto 20px; }
.studio .looks button { background: transparent; border-color: transparent; border-radius: 0; padding: 8px 2px; font-size: 11px; }
.studio .looks button[aria-pressed="true"] { box-shadow: inset 0 -2px var(--accent); }
.studio .downloads { max-width: 620px; margin: 0 auto; gap: 12px; }
.studio .share-row { max-width: 620px; margin: 12px auto 0; }
.studio #share-bank { min-height: 48px; font-size: 12px; color: var(--muted); border-color: transparent; }
.studio .profile-card { border-color: var(--line); border-radius: 6px; }

@media (max-width: 1050px) {
  .studio .layout { grid-template-columns: 230px minmax(0, 1fr); gap: 28px; }
  .studio .stage { min-height: 440px; padding-left: 0; padding-right: 0; }
  .studio .intro p { display: none; }
}
@media (max-width: 860px) {
  .studio-page .studio { padding-top: 24px; }
  .studio .layout { grid-template-columns: 1fr; gap: 14px; }
  .studio .panel { width: 100%; max-width: 620px; margin: 0 auto; }
  .studio .stage { min-height: 0; }
  .studio .intro { margin-bottom: 20px; }
  .studio .intro h1 { font-size: clamp(38px, 7vw, 58px); }
  .studio .stage::before { inset: 24% -4% auto; font-size: 18vw; }
  .studio .caption { margin: 0; }
}
@media (max-width: 700px) {
  .studio-page .site-header { padding: 0 16px; }
  .studio-page .site-nav { gap: 14px; }
  .studio-page .site-nav a:not(.x-link) { font-size: 13px; }
  .studio-page .studio { padding: 20px 16px 32px; }
  .studio .intro h1 { font-size: clamp(32px, 8.8vw, 52px); }
  .studio .looks { gap: 8px; }
  .studio .looks canvas { max-width: 64px; }
  .studio .downloads { grid-template-columns: 1fr 1fr; }
  .studio .downloads button { padding: 0 8px; font-size: 12px; }
  .studio .pfp-disc { width: min(400px, 100%); }
}
@media (max-width: 350px) {
  .studio .intro h1 { font-size: 30px; }
  .studio .downloads { grid-template-columns: 1fr; }
}

/* ---------- everything on one screen, so Download is never below the fold ----------
   Wide screens: settings | preview | looks + downloads, with the preview sized to the window height.
   Narrower screens: one column with the download buttons pinned to the bottom of the screen.
   The selectors are one step more specific than the staging site's world.css, so they hold there too. */
@media (min-width: 1100px) {
  /* all the settings on the left, the preview and the downloads on the right */
  .studio-page .studio { padding-top: 20px; padding-bottom: 12px; }
  .studio-page .studio .intro { margin-bottom: 16px; }
  .studio-page .studio .intro h1 { font-size: clamp(34px, 3.2vw, 54px); }
  .studio-page .studio .layout {
    grid-template-columns: 340px minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas:
      "panel tabs    tabs"
      "panel stage   stage"
      "panel caption caption"
      "panel dl      share"
      "looks .       .";
    column-gap: clamp(28px, 4vw, 72px); row-gap: 12px; align-items: start;
  }
  .studio-page .studio .work { display: contents; }
  .studio-page .studio .panel { grid-area: panel; position: sticky; top: 76px; max-height: calc(100svh - 176px); overflow: auto; }
  .studio-page .studio .tabs-row { grid-area: tabs; margin: 0; flex-wrap: nowrap; align-items: center; }
  .studio-page .studio .status {
    flex: 1; min-width: 0; max-width: none; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .studio-page .studio .stage { grid-area: stage; min-height: 0; padding: 0 0 4px; }
  .studio-page .studio .history { top: 0; left: 0; transform: none; flex-direction: column; z-index: 2; }
  .studio-page .studio .pfp-disc { width: min(470px, 100%, max(240px, calc(100svh - 414px))); }
  .studio-page .studio .zoom { margin-top: 10px; }
  .studio-page .studio .framing { gap: 4px; }
  .studio-page .studio .caption { grid-area: caption; margin: 0; text-align: center; }
  .studio-page .studio .looks { grid-area: looks; grid-template-columns: repeat(5, 1fr); max-width: none; margin: 0; gap: 4px; }
  .studio-page .studio .looks button { padding: 6px 0; }
  .studio-page .studio .looks canvas { max-width: 52px; }
  .studio-page .studio .downloads { grid-area: dl; grid-template-columns: 1fr 1fr; max-width: none; margin: 0; gap: 10px; }
  .studio-page .studio .share-row { grid-area: share; max-width: none; margin: 0; }
}
@media (max-width: 1099px) {
  .studio-page .studio .layout { grid-template-columns: 1fr; gap: 14px; }
  .studio-page .studio .work { display: contents; }
  .studio-page .studio .tabs-row { order: 1; margin: 0; }
  .studio-page .studio .stage { order: 2; min-height: 0; }
  .studio-page .studio .caption { order: 3; margin: 0; }
  .studio-page .studio .work > .looks { order: 4; margin: 0 auto; }
  .studio-page .studio .panel { order: 5; width: 100%; max-width: 620px; margin: 0 auto; }
  .studio-page .studio .share-row { order: 7; margin: 0 auto; width: 100%; max-width: 620px; }
  .studio-page .studio .pfp-disc { width: min(470px, 100%, max(240px, calc(100svh - 260px))); }
  /* the download buttons stay on screen while you scroll through the settings */
  .studio-page .studio .downloads {
    order: 6; position: sticky; bottom: 0; z-index: 6; width: 100%; max-width: 620px; margin: 0 auto;
    padding: 18px 0 calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(13,9,7,0) 0%, rgba(13,9,7,.94) 30%, #0d0907 100%);
  }
}

/* nav (from the shared header styles) */


/* nav */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.x-link) {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px;
}
.site-nav a:not(.x-link):hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.site-nav .x-link { margin-left: 8px; }
.site-nav a { white-space: nowrap; }
@media (max-width: 520px) {
  .site-header { padding-left: 14px; padding-right: 14px; }
  .brand { gap: 9px; }
  .brand-name { font-size: 13px; letter-spacing: .1em; white-space: nowrap; }
  .site-nav { gap: 0; }
  .site-nav a:not(.x-link) { padding: 7px 6px; font-size: 13px; }
  .site-nav .x-link { margin-left: 4px; width: 34px; height: 34px; }
  .seg.bank-tabs button { padding: 8px 9px; }
}


/* the shared header (../css/header.css) sits fixed on top; keep the studio clear of it */
.studio-page{padding-top:64px}
.studio-page .topnav{background:rgba(13,9,7,.94);backdrop-filter:blur(6px)}
