/* SmrtSites — 2050. One dark field, glass, light, very few words. */
:root {
  --void: #04050a;
  --ink: #eef1ff;
  --dim: #9aa3bf;
  --faint: #5d6580;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --glass: rgba(14, 17, 30, .46);
  --glass-2: rgba(22, 26, 44, .62);
  --mint: #7cf7d4;
  --violet: #9b8cff;
  --rose: #ff7ab8;
  --warn: #ffcf6e;
  --bad: #ff6b7d;
  --grad: linear-gradient(100deg, var(--mint), var(--violet) 55%, var(--rose));
  --r: 22px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--void); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* field */
#bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2; display: block;
  background: radial-gradient(80% 60% at 70% 10%, rgba(155, 140, 255, .22), transparent 60%), radial-gradient(70% 60% at 10% 90%, rgba(124, 247, 212, .16), transparent 60%), var(--void); }
.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 80px rgba(0, 0, 0, .45); }
.kicker { margin: 0 0 10px; font: 600 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* bar */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) clamp(16px, 3vw, 32px) 14px; }
body:not([data-view="home"]) .bar { background: linear-gradient(var(--void), rgba(4, 5, 10, 0)); }
.logo { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px; font-weight: 650; letter-spacing: -.02em; font-size: 17px; }
.logo-mark { width: 20px; height: 20px; border-radius: 7px; background: var(--grad); box-shadow: 0 0 22px rgba(124, 247, 212, .45); position: relative; }
.logo-mark::after { content: ""; position: absolute; inset: 5px; border-radius: 3px; background: var(--void); }
.bar-right { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 14px; font-weight: 550; text-decoration: none; color: var(--ink); white-space: nowrap; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.pill:hover { border-color: rgba(124, 247, 212, .55); }
.pill.ghost { background: transparent; }
.credits { font-variant-numeric: tabular-nums; }
.gem { width: 10px; height: 10px; transform: rotate(45deg); border-radius: 2px; background: var(--grad); box-shadow: 0 0 12px rgba(124, 247, 212, .7); }
.credits.low { border-color: rgba(255, 207, 110, .6); }
.mode { font: 600 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--mint); border: 1px solid rgba(124, 247, 212, .35); border-radius: 999px; padding: 7px 10px; }

main { padding: 0 clamp(16px, 3vw, 32px); }
.view { min-height: 100vh; padding-top: 86px; padding-bottom: 48px; }

/* home */
.hero { max-width: 880px; margin: 0 auto; min-height: calc(100vh - 134px); display: flex; flex-direction: column; justify-content: center; }
.hero h1 { margin: 0 0 34px; font-size: clamp(52px, 10vw, 128px); line-height: .9; letter-spacing: -.055em; font-weight: 640; }
.composer { padding: 18px 18px 14px; transition: border-color .3s, box-shadow .3s; }
.composer:focus-within { border-color: rgba(124, 247, 212, .38); box-shadow: 0 0 0 1px rgba(124, 247, 212, .12), 0 0 80px rgba(124, 247, 212, .08), 0 30px 80px rgba(0, 0, 0, .45); }
.composer textarea, .composer input { width: 100%; background: transparent; border: 0; outline: none; resize: none; }
#brief { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.45; min-height: 3.2em; letter-spacing: -.01em; }
#brief::placeholder, .composer input::placeholder, .composer textarea::placeholder { color: var(--faint); }
.more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.more > * { background: rgba(255, 255, 255, .035) !important; border: 1px solid var(--line) !important; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.more textarea { grid-column: 1 / -1; }
.more .assets { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; background: none !important; border: 0 !important; padding: 2px 0 0; }
.slot { position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px; border-radius: 14px; border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .025); }
.slot.ref { flex: 1 1 100%; }
.slot img { width: 48px; height: 48px; object-fit: contain; border-radius: 10px; background: repeating-conic-gradient(#1b1e2b 0 25%, #242838 0 50%) 0 0 / 12px 12px; flex: none; }
.slot b { font-size: 12px; font-weight: 650; color: var(--dim); white-space: nowrap; }
.slot textarea { flex: 1; min-width: 0; background: transparent !important; border: 0 !important; padding: 6px 4px !important; font-size: 13px; resize: none; }
.slot .x { margin-left: auto; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--dim); font-size: 13px; }
.slot .x:hover { color: var(--ink); border-color: var(--line-2); }
.add-img { height: 64px; padding: 0 16px; border-radius: 14px; border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .02); color: var(--dim); font-size: 13px; font-weight: 600; transition: color .2s, border-color .2s; }
.add-img:hover, .add-img.drag { color: var(--ink); border-color: rgba(124, 247, 212, .55); }
.add-img small { display: block; font-weight: 500; font-size: 11px; color: var(--faint); margin-top: 2px; }
.composer-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.chip-btn { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--dim); font-size: 13px; font-weight: 550; transition: color .2s, border-color .2s; }
.chip-btn:hover { color: var(--ink); border-color: var(--line-2); }
.chip-btn[aria-disabled="true"] { opacity: .55; }
.tiers { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); margin-left: auto; }
.tier { position: relative; }
.tiers + .tiers { margin-left: 0; }
.counts .tier span { padding: 0 9px; min-width: 28px; justify-content: center; }
.tier input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }
.tier span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--dim); cursor: pointer; transition: background .25s, color .25s; }
.tier b { font: 700 11px/1 var(--mono); padding: 3px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--dim); }
.tier b::before { content: "◆ "; font-size: 8px; vertical-align: 1px; }
.tier input:checked + span { background: rgba(255, 255, 255, .1); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.tier input:checked + span b { background: var(--grad); color: #04050a; }
.tier input:focus-visible + span { outline: 2px solid var(--mint); }
.go { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: #05060c; font-weight: 700; letter-spacing: -.01em; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; }
.go::before { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .3s; }
.go > * { position: relative; }
.go i { font-style: normal; transition: transform .3s var(--ease); }
.go:hover { box-shadow: 0 0 40px rgba(124, 247, 212, .35); }
.go:hover::before { opacity: 1; }
.go:hover i { transform: translateX(3px); }
.go:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.go:disabled::before { opacity: 0; }
.go.small { height: 38px; padding: 0 16px; font-size: 14px; }
.go.small::before { display: none; }
/* sign in / create account: one dialog, three ways in (Google, email + password, an emailed code) */
.auth-nudge { margin: 12px 4px 0; font-size: 13px; color: var(--dim); }
.auth-nudge b { color: var(--mint); }
dialog.sheet.auth-sheet { width: min(440px, calc(100vw - 24px)); overflow: auto; }
.auth { position: relative; display: flex; flex-direction: column; padding: 30px 30px 24px; }
.auth-x { position: absolute; top: 14px; right: 14px; width: 36px; padding: 0; justify-content: center; }
.auth-mark { width: 30px; height: 30px; border-radius: 10px; margin: 0 0 16px; }
.auth-mark::after { inset: 8px; border-radius: 4px; }
.auth h2 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.035em; outline: none; }
.auth-sub { margin: 6px 0 0; color: var(--dim); font-size: 14.5px; }
.auth-context { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: var(--ink); background: rgba(124, 247, 212, .07); border: 1px solid rgba(124, 247, 212, .22); }
.auth-google { margin-top: 22px; }
/* Google renders its button in an iframe; under the page's dark color-scheme Chrome paints that iframe opaque white. */
#gsi-slot, #gsi-slot iframe { color-scheme: light; background: transparent; } /* match the iframe's own light document so Chrome draws no backdrop */
#gsi-slot { display: flex; justify-content: center; }
.gsi-slot { display: flex; justify-content: center; min-height: 0; }
.gsi-slot:empty { display: none; }
/* Google's sign-in button (branding guidelines, dark theme): #131314 fill, #8E918F stroke, #E3E3E3 Roboto Medium 14/20, the
   four-colour G at 20px. Shown while Google's own rendered button loads (and as that button in the local test stub). */
.gsi-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid #8e918f; background: #131314; color: #e3e3e3; font: 500 14px/20px Roboto, "Google Sans", Arial, sans-serif; letter-spacing: .25px; cursor: pointer; transition: background .2s, box-shadow .2s; }
.gsi-btn:hover:not(:disabled) { background: #1f1f20; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.gsi-btn:focus-visible { outline: 2px solid #a8c7fa; outline-offset: 2px; }
.gsi-btn:disabled { cursor: progress; opacity: .75; }
.gsi-btn svg { flex: none; }
.auth-ea { margin-bottom: 10px; }
.ea-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink); font-weight: 600; text-decoration: none; }
.ea-btn:hover { border-color: rgba(124, 247, 212, .55); }
.ea-mark { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 7px; background: var(--grad); color: #04050a; font: 800 11px/1 var(--mono); letter-spacing: .02em; }
.ea-offer { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(124, 247, 212, .35); background: rgba(124, 247, 212, .07); font-size: 14px; }
.pack-ea { color: var(--mint); font-weight: 600; }
.signin-methods .dev-ic.ea-mark { color: #04050a; font: 800 11px/1 var(--mono); }
.ea-age { display: flex; align-items: center; gap: 8px; margin: 10px 0; font-weight: 600; }
.ea-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 2px; color: var(--faint); font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.auth-form .field { display: flex; flex-direction: column; gap: 6px; }
.auth-form .field[hidden] { display: none; }
.auth-form label { font-size: 13px; font-weight: 600; color: var(--ink); }
.auth-form input { width: 100%; height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--ink); font: 16px/1 var(--sans); outline: none; transition: border-color .2s, box-shadow .2s; }
.auth-form input::placeholder { color: var(--faint); }
.auth-form input:focus { border-color: rgba(124, 247, 212, .6); box-shadow: 0 0 0 3px rgba(124, 247, 212, .14); }
.auth-form input[aria-invalid="true"] { border-color: rgba(255, 107, 125, .7); }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.pw-toggle { position: absolute; top: 6px; right: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .06); color: var(--dim); font: 600 12.5px/1 var(--sans); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--ink); background: rgba(255, 255, 255, .11); }
.pw-toggle:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.pw-meter { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.pw-meter[hidden] { display: none; }
.pw-bar { flex: 0 0 84px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.pw-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--bad); transition: width .25s var(--ease), background .25s; }
.pw-meter[data-score="2"] .pw-bar i { background: var(--warn); }
.pw-meter[data-score="3"] .pw-bar i, .pw-meter[data-score="4"] .pw-bar i { background: var(--mint); }
.pw-hint { font-size: 12.5px; color: var(--dim); }
#code { letter-spacing: .5em; font: 600 20px/1 var(--mono); text-align: center; }
.auth-msg { margin: -4px 0 0; min-height: 0; font-size: 13px; color: var(--bad); }
.auth-msg:empty { display: none; }
.auth-msg.ok { color: var(--mint); }
.auth-submit { justify-content: center; width: 100%; height: 48px; margin-top: 2px; font-size: 15px; }
.auth-submit[hidden] { display: none; }
.auth-submit.busy { pointer-events: none; opacity: .7; }
.auth-sent { margin-top: 20px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); text-align: center; }
.auth-sent[hidden] { display: none; }
.auth-sent p { margin: 8px 0 0; color: var(--dim); font-size: 14px; }
.auth-sent p b { color: var(--ink); }
.sent-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: 22px; background: rgba(124, 247, 212, .1); color: var(--mint); }
.auth-wait { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px !important; }
.auth-dev { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--warn); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.auth-links .link-btn { min-height: 32px; }
.auth-links .link-btn[hidden] { display: none; }
.auth-switch { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); text-align: center; }
.auth-switch .link-btn { font-weight: 650; color: var(--mint); text-decoration-color: rgba(124, 247, 212, .4); }
.auth-foot { margin-top: 14px; text-align: center; }
.auth-note { margin: 0; font-size: 12.5px; color: var(--dim); }
.auth-note b { color: var(--mint); }
.auth-legal { margin: 4px 0 0; font-size: 11.5px; color: var(--faint); }
.auth-legal a { color: var(--dim); }
@media (max-width: 520px) {
  dialog.sheet.auth-sheet { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; border: 0; }
  .auth { min-height: 100%; padding: 26px 18px max(20px, env(safe-area-inset-bottom)); }
  .auth h2 { font-size: 24px; }
}
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.examples button { height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--dim); font-size: 13px; transition: color .2s, border-color .2s, background .2s; }
.examples button:hover { color: var(--ink); border-color: var(--line-2); background: rgba(255, 255, 255, .05); }
.note { color: var(--warn); font-size: 14px; margin: 18px 0 0; }
.connect { display: flex; gap: 10px; margin-top: 10px; padding: 8px 8px 8px 16px; }
.connect input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font: 15px/1 var(--mono); color: var(--ink); }
.connect input::placeholder { color: var(--faint); font-family: var(--sans); }
.resume { align-self: flex-start; margin-top: 26px; background: none; border: 0; color: var(--dim); font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.resume:hover { color: var(--ink); }

/* run */
.run-head { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 8px 0 18px; }
.run-titles { min-width: 0; }
.run-head h2 { margin: 0; font-size: clamp(30px, 4.4vw, 56px); line-height: 1; letter-spacing: -.045em; font-weight: 640; overflow-wrap: anywhere; outline: none; }
.run-actions { display: flex; gap: 8px; }
.run-msg { min-height: 22px; margin: 0 0 16px; color: var(--dim); font-size: 14px; }
.run-msg.err { color: var(--bad); }
.panes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pane { position: relative; display: flex; flex-direction: column; border-radius: 20px; border: 1px solid var(--line); background: var(--glass); overflow: hidden; min-height: 420px; height: calc(100vh - 380px); max-height: 760px; transition: transform .45s var(--ease), border-color .3s, box-shadow .3s; opacity: 0; animation: rise .7s var(--ease) forwards; }
.pane:nth-child(2) { animation-delay: .06s; } .pane:nth-child(3) { animation-delay: .12s; } .pane:nth-child(4) { animation-delay: .18s; } .pane:nth-child(5) { animation-delay: .24s; }
.pane .swatch { position: absolute; inset: 0; opacity: .5; transition: opacity .6s; }
.pane .shot { position: relative; flex: 1; overflow: hidden; }
.pane iframe { position: absolute; top: 0; left: 0; width: 390px; height: 844px; border: 0; transform-origin: 0 0; pointer-events: none; background: transparent; transition: opacity .45s ease; }
.pane iframe.incoming { opacity: 0; }
.pane .scan { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(124, 247, 212, .16) 50%, transparent); height: 30%; animation: scan 2.4s linear infinite; }
.pane[data-status="done"] .scan, .pane[data-status="failed"] .scan, .pane[data-status="stopped"] .scan { display: none; }
.pane .meta { position: relative; padding: 14px 14px 12px; background: linear-gradient(transparent, rgba(4, 5, 10, .92) 30%); margin-top: -40px; }
.pane h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.02em; font-weight: 650; }
.pane .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 7px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: var(--dim); }
.tag.show { color: var(--mint); background: rgba(124, 247, 212, .1); }
.state { margin-left: auto; font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); display: inline-flex; align-items: center; gap: 6px; }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pane[data-status="writing"] .state::before, .pane[data-status="checking"] .state::before, .pane[data-status="fixing"] .state::before, .pane[data-status="polishing"] .state::before, .pane[data-status="retrying"] .state::before, .pane[data-status="simplifying"] .state::before { background: var(--violet); box-shadow: 0 0 8px var(--violet); animation: pulse 1s infinite; }
.pane[data-status="done"] .state { color: var(--mint); } .pane[data-status="done"] .state::before { background: var(--mint); }
.pane[data-status="failed"] .state { color: var(--bad); } .pane[data-status="failed"] .state::before { background: var(--bad); }
.pane .badge { display: block; margin-top: 8px; font-size: 12px; color: var(--dim); }
.pane .acts { display: flex; gap: 6px; margin-top: 10px; }
.pane .acts button { flex: 1; height: 34px; border-radius: 999px; font-size: 13px; font-weight: 650; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); }
.pane .acts .pick { background: var(--ink); color: #05060c; border-color: var(--ink); }
.pane[data-status="done"] { cursor: pointer; }
.pane[data-status="done"]:hover { transform: translateY(-6px); border-color: rgba(124, 247, 212, .45); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(124, 247, 212, .1); }
.pane.chosen { border-color: var(--mint); }

/* studio */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.stage-wrap { padding: 10px; display: flex; flex-direction: column; height: calc(100vh - 120px); min-height: 540px; position: sticky; top: 86px; }
.stage-bar { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; }
.stage-bar .pill { margin-left: auto; height: 32px; font-size: 13px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.seg button { height: 28px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: var(--dim); font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .1); color: var(--ink); }
.building { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mint); }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(124, 247, 212, .25); border-top-color: var(--mint); animation: spin .8s linear infinite; }
.stage { position: relative; flex: 1; border-radius: 14px; overflow: hidden; background: #0a0b10; display: flex; justify-content: center; }
.stage iframe { width: 100%; height: 100%; border: 0; background: #0a0b10; transition: width .45s var(--ease); }
.stage.mobile iframe { width: 390px; max-width: 100%; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.side { display: flex; flex-direction: column; gap: 12px; }
.side-block { padding: 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.side h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; line-height: 1.05; font-weight: 650; outline: none; }
.qa { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
.qa b { color: var(--mint); font-weight: 600; }
.tiles { display: grid; gap: 8px; }
.tile { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); font-weight: 600; font-size: 15px; text-align: left; transition: border-color .2s, background .2s; }
.tile:hover { border-color: rgba(124, 247, 212, .45); background: rgba(124, 247, 212, .05); }
.ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255, 255, 255, .06); color: var(--mint); font-size: 14px; }
.lock { margin-left: 8px; color: #05060c; background: var(--grad); padding: 3px 7px; border-radius: 6px; letter-spacing: .1em; }
.edit textarea { width: 100%; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 14px; padding: 12px; resize: vertical; outline: none; font-size: 15px; }
.edit textarea:focus { border-color: rgba(124, 247, 212, .4); }
.edit-row { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.edit-row .go { margin-left: auto; }
.versions { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 240px; overflow: auto; }
.versions button { width: 100%; display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; text-align: left; color: var(--dim); font-size: 13px; }
.versions button:hover { background: rgba(255, 255, 255, .04); color: var(--ink); }
.versions button[aria-current="true"] { border-color: var(--line-2); color: var(--ink); background: rgba(255, 255, 255, .05); }
.versions .n { font: 600 11px/1 var(--mono); color: var(--mint); }

/* dialogs */
dialog.sheet { border: 1px solid var(--line-2); border-radius: 26px; padding: 0; background: rgba(12, 14, 24, .86); color: var(--ink); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); box-shadow: 0 40px 120px rgba(0, 0, 0, .6); }
dialog.sheet::backdrop { background: rgba(2, 3, 8, .6); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .35s var(--ease); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 0 22px; }
.sheet-head h3 { margin: 0; font-size: 22px; letter-spacing: -.03em; }
.sheet-body { padding: 16px 22px 22px; overflow: auto; max-height: calc(100vh - 140px); }
.sheet-body p { color: var(--dim); margin: 0 0 12px; font-size: 14px; }
.sheet-body ol { margin: 0 0 14px; padding-left: 20px; color: var(--dim); font-size: 14px; }
.sheet-body li { margin: 4px 0; }
.sheet-body h4 { margin: 18px 0 8px; font: 600 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.big-num { font-size: 56px; font-weight: 650; letter-spacing: -.05em; line-height: 1; margin: 4px 0 6px; }
.cards { display: grid; gap: 8px; }
.card-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); text-align: left; font-weight: 600; }
.card-opt small { display: block; color: var(--dim); font-weight: 500; font-size: 12px; margin-top: 2px; }
.card-opt:hover { border-color: rgba(124, 247, 212, .45); }
.card-opt.hero-opt { border-color: rgba(124, 247, 212, .35); background: linear-gradient(120deg, rgba(124, 247, 212, .08), rgba(155, 140, 255, .08)); }
.perks { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.perks li::before { content: "◆"; color: var(--mint); font-size: 9px; margin-right: 10px; vertical-align: 2px; }
.guide { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.guide summary { cursor: pointer; font-weight: 650; display: flex; justify-content: space-between; gap: 10px; }
.guide summary small { color: var(--dim); font-weight: 500; }
.guide[open] summary { margin-bottom: 8px; }
.guide a { color: var(--mint); }
.site-list { display: grid; gap: 6px; }
.site-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); text-align: left; }
.site-list i { width: 26px; height: 26px; border-radius: 8px; flex: none; border: 1px solid var(--line-2); }
.site-list small { color: var(--dim); margin-left: auto; font-size: 12px; }
.code { width: 100%; min-height: 50vh; background: #05060b; border: 1px solid var(--line); border-radius: 14px; padding: 14px; font: 12.5px/1.55 var(--mono); color: #cfe7ff; resize: vertical; white-space: pre; tab-size: 2; }
.files { display: flex; gap: 6px; margin-bottom: 10px; }
.files span { font: 600 12px/1 var(--mono); padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, .07); }
.row-end { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
dialog.full { width: calc(100vw - 24px); max-width: none; height: calc(100vh - 24px); max-height: none; display: none; flex-direction: column; border-radius: 22px; }
dialog.full[open] { display: flex; }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: 10px; flex-wrap: wrap; }
.pv-bar h3 { margin: 0 6px; font-size: 17px; letter-spacing: -.02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-stage { margin: 0 10px 10px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 12px 18px; border-radius: 999px; background: rgba(14, 17, 30, .9); border: 1px solid var(--line-2); backdrop-filter: blur(14px); font-size: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }
#qa-lab { position: fixed; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; z-index: -5; }
#qa-lab iframe { position: absolute; left: 0; top: 0; border: 0; }


/* ---- generation theater ---- */
#view-run { position: relative; }
.theater { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.theater canvas { width: 100%; height: 100%; display: block; }
#view-run > :not(.theater):not(.think) { position: relative; z-index: 1; }
body:not([data-view="run"]) .theater { display: none; }

/* progress rail: four nodes on a track that fills as work moves on */
.rail { --p: 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: 0 auto 14px; max-width: 760px; }
.rail::before, .rail::after { content: ""; position: absolute; top: 11px; left: 12.5%; right: 12.5%; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .08); }
.rail::after { right: auto; width: calc(75% * var(--p)); background: var(--grad); box-shadow: 0 0 16px rgba(124, 247, 212, .6); transition: width 1.2s var(--ease); }
.rail li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail i { position: relative; width: 24px; height: 24px; border-radius: 50%; background: #0b0d16; border: 2px solid rgba(255, 255, 255, .16); transition: border-color .5s, background .5s, transform .5s var(--ease), box-shadow .5s; }
.rail span { font: 600 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); transition: color .5s; }
.rail li.done i { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 14px rgba(124, 247, 212, .6); }
.rail li.done i::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #04050a; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.rail li.done span { color: var(--dim); }
.rail li.on i { border-color: var(--mint); transform: scale(1.18); background: radial-gradient(circle, var(--mint) 0 30%, #0b0d16 34%); box-shadow: 0 0 0 0 rgba(124, 247, 212, .5); animation: ping 1.6s ease-out infinite; }
.rail li.on span { color: var(--ink); text-shadow: 0 0 18px rgba(124, 247, 212, .8); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(124, 247, 212, .55); } 100% { box-shadow: 0 0 0 16px rgba(124, 247, 212, 0); } }

/* live ticker: the last few things that happened, newest brightest */
.ticker { list-style: none; margin: 0 auto 16px; padding: 0; max-width: 760px; min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; text-align: center; }
.ticker li { font-size: 14px; color: var(--faint); animation: tick-in .5s var(--ease) both; transition: color .5s, opacity .5s; }
.ticker li:last-child { color: var(--ink); font-weight: 550; }
.ticker li:nth-last-child(2) { color: var(--dim); }
.ticker li:nth-last-child(n+4) { display: none; }
.ticker b { color: var(--mint); font-weight: 650; }
@keyframes tick-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

/* thinking overlay above the core (before the panes exist) */
.think { position: fixed; inset: 0; z-index: 1; pointer-events: none; transition: opacity .6s, transform .8s var(--ease); }
.think.gone { opacity: 0; transform: translateY(-6vh) scale(.96); }
.think-word { position: absolute; left: 0; right: 0; top: calc(56vh - clamp(118px, 15vh, 150px)); margin: 0; text-align: center; font: 700 12px/1 var(--mono); letter-spacing: .4em; text-transform: uppercase; color: var(--mint); text-shadow: 0 0 20px rgba(124, 247, 212, .9); animation: breathe 2.4s ease-in-out infinite; }
.think-name { position: absolute; left: 0; right: 0; top: calc(56vh + clamp(96px, 12vh, 128px)); margin: 0; text-align: center; font-size: clamp(26px, 4vw, 44px); font-weight: 650; letter-spacing: -.04em; text-shadow: 0 4px 30px rgba(0, 0, 0, .8); }
.think-chips { position: absolute; left: 16px; right: 16px; top: calc(56vh + clamp(96px, 12vh, 128px) + 58px); display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.think-chips span { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; border: 1px solid rgba(155, 140, 255, .4); color: #cfc8ff; background: rgba(155, 140, 255, .08); animation: pop .5s var(--ease) both; }
.think-chips span:nth-child(2) { animation-delay: .12s; } .think-chips span:nth-child(3) { animation-delay: .24s; } .think-chips span:nth-child(4) { animation-delay: .36s; }
@keyframes breathe { 50% { opacity: .45; letter-spacing: .5em; } }

/* panes while they build */
.pane .skel { position: absolute; inset: 0; padding: 28px 18px; display: flex; flex-direction: column; gap: 12px; }
.pane .skel i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.pane .skel i:nth-child(1) { width: 40%; } .pane .skel i:nth-child(2) { height: 44px; width: 85%; } .pane .skel i:nth-child(3) { height: 44px; width: 60%; } .pane .skel i:nth-child(4) { width: 75%; } .pane .skel i:nth-child(5) { height: 120px; width: 100%; margin-top: 10px; border-radius: 12px; }
.pane iframe ~ .skel, .pane[data-status="done"] .skel, .pane[data-status="failed"] .skel { display: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.pane .code { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; margin: 0; padding: 10px 12px 44px; overflow: hidden; font: 10px/1.45 var(--mono); color: rgba(124, 247, 212, .85); white-space: pre-wrap; word-break: break-all; background: linear-gradient(rgba(4, 5, 10, 0), rgba(4, 5, 10, .88) 28%); -webkit-mask-image: linear-gradient(transparent, #000 30%); mask-image: linear-gradient(transparent, #000 30%); display: flex; flex-direction: column; justify-content: flex-end; opacity: 0; transition: opacity .5s; pointer-events: none; }
.pane[data-status="writing"] .code:not(:empty) { opacity: 1; }
.pane .code::after { content: "▌"; color: var(--mint); animation: pulse .8s steps(2) infinite; }
.pane .kb { font: 600 10px/1 var(--mono); letter-spacing: .08em; color: var(--mint); margin-left: 6px; }
.pane[data-status="done"] .kb, .pane[data-status="failed"] .kb { display: none; }
.pane .checks { position: absolute; inset: 0; display: none; place-content: center; gap: 8px; justify-items: center; background: radial-gradient(circle at 50% 45%, rgba(155, 140, 255, .18), rgba(4, 5, 10, .55) 70%); }
.pane .checks::before { content: ""; position: absolute; left: 50%; top: 45%; width: 180%; aspect-ratio: 1; transform: translate(-50%, -50%); background: conic-gradient(from 0deg, rgba(124, 247, 212, .35), transparent 22%); border-radius: 50%; animation: spin 2.2s linear infinite; }
.pane .checks span { position: relative; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: rgba(4, 5, 10, .8); border: 1px solid rgba(124, 247, 212, .4); color: var(--ink); opacity: 0; animation: chip 4s var(--ease) infinite; }
.pane .checks span::before { content: "✓ "; color: var(--mint); }
.pane .checks span:nth-child(2) { animation-delay: .5s; } .pane .checks span:nth-child(3) { animation-delay: 1s; } .pane .checks span:nth-child(4) { animation-delay: 1.5s; } .pane .checks span:nth-child(5) { animation-delay: 2s; }
.pane[data-status="checking"] .checks, .pane[data-status="fixing"] .checks, .pane[data-status="polishing"] .checks { display: grid; }
.pane[data-status="fixing"] .checks::before { background: conic-gradient(from 0deg, rgba(255, 122, 184, .45), transparent 22%); }
.pane[data-status="fixing"] .checks span { border-color: rgba(255, 122, 184, .5); }
.pane[data-status="fixing"] .checks span::before { content: "⟳ "; color: var(--rose); }
.pane[data-status="fixing"] .shot iframe { animation: soft-fix 2.4s ease-in-out infinite; }
@keyframes chip { 0% { opacity: 0; transform: translateY(8px) scale(.9); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes soft-fix { 50% { opacity: .82; } }
@keyframes glitch-unused { 0% { transform-origin: 0 0; filter: hue-rotate(0); translate: 0 0; } 25% { filter: hue-rotate(90deg) saturate(2); translate: 3px 0; } 50% { filter: none; translate: -2px 1px; } 75% { filter: hue-rotate(-60deg); translate: 1px -1px; } }
.pane.flash::after { content: ""; position: absolute; inset: -1px; border-radius: 20px; border: 2px solid var(--flash, var(--mint)); box-shadow: 0 0 40px var(--flash, var(--mint)), inset 0 0 40px var(--flash, var(--mint)); animation: flash 1.4s var(--ease) forwards; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.pane[data-status="writing"], .pane[data-status="checking"], .pane[data-status="fixing"], .pane[data-status="polishing"] { border-color: rgba(155, 140, 255, .35); box-shadow: 0 0 0 1px rgba(155, 140, 255, .1), 0 0 50px rgba(155, 140, 255, .12); }

@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(400%); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

@media (max-width: 1100px) {
  .panes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(280px, 42vw); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin: 0 calc(-1 * clamp(16px, 3vw, 32px)); padding-left: clamp(16px, 3vw, 32px); padding-right: clamp(16px, 3vw, 32px); scrollbar-width: none; }
  .pane { scroll-snap-align: center; }
  .studio { grid-template-columns: 1fr; }
  .stage-wrap { position: relative; top: 0; height: 72vh; }
}
@media (max-width: 640px) {
  .rail span { font-size: 9px; letter-spacing: .1em; }
  .view { padding-top: 74px; }
  .panes { grid-auto-columns: 82vw; }
  .pane { height: 64vh; min-height: 420px; }
  .more { grid-template-columns: 1fr; }
  .composer-row { gap: 8px; }
  .tiers { margin-left: 0; }
  .go { margin-left: auto; }
  #account-btn { padding: 4px; }
  .hero h1 { margin-bottom: 24px; }
  .pv-bar h3 { order: -1; flex-basis: 100%; margin: 2px 4px 6px; }
  dialog.full { width: 100vw; height: 100vh; border-radius: 0; margin: 0; max-height: 100vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .pane { opacity: 1; }
}

.tag.show.simple { color: #ffd27a; background: rgba(255, 210, 122, .1); }

/* build progress — calm, no flashing */
.progress { display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 14px; margin: 0 2px 10px; padding: 11px 14px; border-radius: 12px; background: linear-gradient(rgba(124, 247, 212, .06), rgba(124, 247, 212, .06)), #0b0d16; /* opaque: the page being built can sit behind it */ border: 1px solid rgba(124, 247, 212, .18); font: 600 13px/1.3 var(--sans, system-ui); color: var(--ink, #eef1ff); }
.progress .track { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress .track i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #7cf7d4, #b18cff); transition: width .6s var(--ease, ease); }
.progress b { font: 700 12px/1 var(--mono); color: var(--mint); min-width: 4ch; text-align: right; }
.progress.done { border-color: rgba(124, 247, 212, .4); }
@media (max-width: 640px) { .progress { grid-template-columns: 1fr auto; } .progress .track { grid-column: 1 / -1; grid-row: 2; } }
/* click to edit */
#edit-toggle[aria-pressed="true"] { background: rgba(177, 140, 255, .18); border-color: rgba(177, 140, 255, .5); color: #fff; }
#edit-toggle:disabled { opacity: .45; cursor: default; }
.picker { position: absolute; z-index: 5; width: 320px; max-width: calc(100% - 16px); padding: 12px; border-radius: 14px; display: grid; gap: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); background: rgba(12, 14, 22, .96); }
.picker-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.picker-head b { font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mint); }
.picker-head small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 12px; }
.picker-head .x { background: none; border: 0; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.picker textarea, .picker input[type="text"] { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 10px; color: inherit; font: 14px/1.4 inherit; padding: 9px 10px; resize: vertical; }
.picker-row { display: flex; justify-content: flex-end; }
.picker-ai { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.picker-note { margin: 0; font-size: 13px; color: var(--dim); }
/* account sheet */
.acct-nav { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin-bottom: 16px; }
.acct-nav button { flex: 1; padding: 9px 10px; border-radius: 10px; border: 0; background: none; color: var(--dim); font-weight: 600; font-size: 14px; }
.acct-nav button[aria-selected="true"] { background: rgba(255, 255, 255, .09); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.acct-body { display: grid; gap: 10px; }
.acct-body h4 { margin: 10px 0 0; }
.acct-muted { color: var(--dim); margin: 0; font-size: 14px; }
.acct-back { justify-self: start; background: none; border: 0; color: var(--mint); font-weight: 600; padding: 0; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.folder { display: grid; gap: 4px; justify-items: start; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(155, 140, 255, .1), rgba(124, 247, 212, .05)); text-align: left; }
.folder:hover { border-color: rgba(124, 247, 212, .45); }
.folder b { font-size: 16px; } .folder small { color: var(--dim); font-size: 12px; }
.folder-ic { position: relative; width: 54px; height: 38px; margin-bottom: 6px; border-radius: 4px 10px 10px 10px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2); display: flex; align-items: flex-end; gap: 3px; padding: 5px; box-sizing: border-box; }
.folder-ic::before { content: ""; position: absolute; left: -1px; top: -7px; width: 22px; height: 8px; border-radius: 4px 4px 0 0; background: inherit; border: 1px solid var(--line-2); border-bottom: 0; }
.folder-ic i { flex: 1; height: 60%; border-radius: 3px; }
.site-list.ideas button { align-items: center; }
.site-list.ideas button > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.site-list.ideas small { color: var(--dim); font-size: 12px; }
.swatches { display: flex; gap: 2px; flex: none; }
.swatches i { width: 8px; height: 26px; border-radius: 3px; border: 1px solid var(--line-2); }
.plan-card, .credit-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.plan-card > div, .credit-card > div { display: grid; gap: 2px; }
.plan-card small, .credit-card small { color: var(--dim); font-size: 12px; }
.plan-card b { font-size: 16px; }
.credit-card .big-num { margin: 2px 0; }
.ledger { list-style: none; margin: 0; padding: 0; display: grid; }
.ledger li { display: grid; grid-template-columns: 1fr auto 56px; gap: 10px; align-items: baseline; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ledger small { color: var(--dim); font-size: 12px; }
.ledger b { text-align: right; font-family: var(--mono); font-size: 13px; }
.ledger .plus { color: var(--mint); } .ledger .minus { color: var(--dim); }

/* speed + pages */
.speeds { margin-left: 8px; }
.speeds .tier span { padding: 0 10px; }
.tier.disabled span { opacity: .35; cursor: not-allowed; }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--dim); line-height: 1.4; }
.page-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.page-picks label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.page-picks input { accent-color: #7cf7d4; }
.page-picks label.have { border-color: rgba(124, 247, 212, .4); }
.page-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.page-row input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 10px; color: inherit; padding: 7px 10px; font: 13px/1.3 var(--sans); }
.seg.small button { padding: 5px 8px; font-size: 12px; }
.go.wide { width: 100%; justify-content: center; }
.speed-cards .card-opt small { margin-top: 3px; }
@media (max-width: 640px) { .speeds { margin-left: 0; } }
.card-opt.bulk-opt { border-color: rgba(124, 247, 212, .3); }

/* ---------- editor v2: inspector ---------- */
.stage.tablet iframe { width: 820px; max-width: 100%; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.inspector { display: grid; gap: 10px; border-color: rgba(177, 140, 255, .35); box-shadow: 0 0 0 1px rgba(177, 140, 255, .12), 0 20px 60px rgba(0, 0, 0, .35); }
.ins-head { display: flex; align-items: center; gap: 8px; }
.ins-head .kicker { margin: 0; }
.ins-undo { margin-left: auto; display: flex; gap: 4px; }
.ins-undo .chip-btn { padding: 4px 10px; font-size: 14px; }
.edits-chip { font-size: 11px; padding: 4px 9px; }
.edits-chip.low { border-color: #ffb86b; color: #ffcf99; }
.ins-sel { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: rgba(177, 140, 255, .08); }
.ins-sel b { font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #cbb6ff; }
.ins-sel small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 12px; }
.ins-sel .chip-btn { padding: 3px 8px; font-size: 11px; }
.ins-sel .x { background: none; border: 0; color: var(--dim); font-size: 20px; line-height: 1; cursor: pointer; }
.ins-group { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.ins-group > summary { cursor: pointer; list-style: none; padding: 9px 12px; font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); display: flex; justify-content: space-between; }
.ins-group > summary::after { content: "+"; }
.ins-group[open] > summary::after { content: "–"; }
.ins-group > summary::-webkit-details-marker { display: none; }
.ins-body { display: grid; gap: 9px; padding: 2px 12px 12px; }
.ins-field { display: grid; gap: 4px; min-width: 0; font-size: 12px; color: var(--dim); }
.ins-field > span { font-weight: 600; }
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ins-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ins-row.end { justify-content: flex-end; }
.ins-row.toggles select { flex: 1; min-width: 0; }
.ins-label { font-size: 12px; color: var(--dim); font-weight: 600; }
.ins-check { font-size: 12px; color: var(--dim); display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.inspector input[type="text"], .inspector input[type="number"], .inspector select, .inspector textarea, #site-body input[type="text"], #site-body select, #site-body textarea {
  width: 100%; box-sizing: border-box; min-width: 0; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font: 13px/1.3 var(--sans); padding: 7px 9px; }
.inspector textarea, #site-body textarea { resize: vertical; }
.inspector input[type="color"], #site-body input[type="color"] { width: 100%; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .05); cursor: pointer; }
.inspector input[type="range"] { width: 100%; accent-color: #b18cff; }
.inspector .ins-row input[type="text"] { flex: 1; width: auto; }
.tog { width: 34px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--ink); font-weight: 700; cursor: pointer; }
.tog:nth-child(2) { font-style: italic; } .tog:nth-child(3) { text-decoration: underline; } .tog:nth-child(4) { text-decoration: line-through; }
.tog[aria-pressed="true"] { background: rgba(177, 140, 255, .25); border-color: rgba(177, 140, 255, .6); }
.mini { justify-self: start; background: none; border: 0; color: var(--dim); font-size: 11px; text-decoration: underline; cursor: pointer; padding: 0; }
.chip-btn.danger { color: #ff9a8f; border-color: rgba(255, 120, 110, .35); }
.checks-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks-list li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-size: 13px; }
.checks-list li b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; background: rgba(124, 247, 212, .15); color: var(--mint); }
.checks-list li.todo b { background: rgba(255, 184, 107, .15); color: #ffcf99; }
.checks-list small { display: block; color: var(--dim); font-size: 12px; }
#site-body { display: grid; gap: 10px; }
.stage.editing { box-shadow: inset 0 0 0 2px rgba(177, 140, 255, .35); }

/* ---------- credits, plans, top-up ---------- */
.pill.credits .plus { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; border-radius: 50%; background: var(--grad); color: #04050a; font: 800 12px/1 var(--sans); }
dialog.sheet.wide { width: min(980px, calc(100vw - 32px)); }
.plans-lede { margin: 0 0 14px; color: var(--dim); }
.ic-svg { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; }
.ic-svg svg { width: 100%; height: 100%; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.plan-tile { position: relative; display: grid; gap: 12px; align-content: start; padding: 20px 18px 18px; border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.plan-tile.monthly { border-color: rgba(155, 140, 255, .45); background: linear-gradient(160deg, rgba(155, 140, 255, .12), rgba(255, 255, 255, .02)); }
.plan-tile.annual { border-color: rgba(124, 247, 212, .55); background: linear-gradient(160deg, rgba(124, 247, 212, .14), rgba(155, 140, 255, .08)); box-shadow: 0 20px 60px rgba(124, 247, 212, .08); }
.plan-tile.current::after { content: "Current"; position: absolute; right: 14px; top: 14px; font: 700 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }
.plan-badge { position: absolute; top: -10px; left: 16px; padding: 5px 9px; border-radius: 999px; background: var(--grad); color: #04050a; font: 800 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.plan-top { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.plan-ic { width: 34px; height: 34px; padding: 7px; border-radius: 11px; background: rgba(255, 255, 255, .06); color: #ffd27a; box-sizing: border-box; }
.plan-tile.monthly .plan-ic { color: #b8a8ff; } .plan-tile.annual .plan-ic { color: var(--mint); }
.plan-price strong { font-size: 30px; letter-spacing: -.03em; display: block; }
.plan-price small { color: var(--dim); font-size: 12px; }
.plan-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13px; }
.plan-perks li { display: flex; gap: 8px; align-items: flex-start; }
.plan-perks .ic-svg { color: var(--mint); width: 16px; height: 16px; margin-top: 1px; }
.plan-perks li.off { color: var(--dim); } .plan-perks li.off .ic-svg { color: var(--dim); }
.plan-tile .go, .plan-tile .chip-btn { justify-self: stretch; justify-content: center; text-align: center; }
.compare { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.compare table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
.compare th, .compare td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.compare tbody th { font-weight: 600; color: var(--dim); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare td:last-child { color: var(--mint); }
.topup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.topup-head small { color: var(--dim); font-size: 12px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 4px; }
.pack-tile { position: relative; display: grid; justify-items: start; gap: 2px; padding: 16px 14px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); text-align: left; cursor: pointer; transition: transform .2s var(--ease), border-color .2s; }
.pack-tile:hover { transform: translateY(-3px); border-color: rgba(124, 247, 212, .5); }
.pack-tile.popular { border-color: rgba(155, 140, 255, .5); }
.pack-tile.bulk { background: linear-gradient(160deg, rgba(124, 247, 212, .08), rgba(255, 255, 255, .02)); }
.pack-name { color: var(--dim); font: 600 11px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.pack-credits { display: flex; align-items: center; gap: 6px; font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.pack-credits .gem { width: 18px; height: 18px; color: var(--mint); }
.pack-sub { color: var(--dim); font-size: 12px; margin-top: -2px; }
.pack-price { font-weight: 700; font-size: 17px; margin-top: 8px; }
.pack-per { color: var(--dim); font-size: 11px; }
.plans-banner { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(124, 247, 212, .35); background: linear-gradient(120deg, rgba(124, 247, 212, .1), rgba(155, 140, 255, .1)); color: var(--ink); text-align: left; cursor: pointer; }
.plans-banner > span:nth-child(2) { flex: 1; display: grid; }
.plans-banner small { color: var(--dim); font-size: 12px; }
.import-row { display: flex; justify-content: flex-start; margin-top: 10px; }
.linkish { background: none; border: 0; color: var(--dim); font-size: 13px; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--ink); }
@media (min-width: 1101px) {
  /* the side panel scrolls on its own, so the site stays in view while you edit */
  .side { position: sticky; top: 86px; max-height: calc(100vh - 110px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 2px; }
}

/* ---------- Editor 3.0 — phase 1 ---------- */
/* Dropdowns: dark, readable popups everywhere (the native list used to be light text on white). */
:root { color-scheme: dark; }
select { color-scheme: dark; color: var(--ink); background-color: #141828; }
select option, select optgroup { color: #eef1ff; background-color: #141828; }
select option:checked { background-color: #2c2550; }
/* stage bar: Edit · ↶ ↷ · Versions */
.stage-bar { flex-wrap: wrap; }
.hist { display: inline-flex; gap: 4px; }
.chip-btn.icon { width: 34px; padding: 0; font-size: 16px; }
.chip-btn:disabled { opacity: .38; cursor: default; }
.vers-wrap { position: relative; }
.vers-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(340px, 80vw); padding: 12px; border-radius: 16px; background: rgba(12, 14, 26, .96); }
.vers-pop .versions { max-height: 320px; }
.versions .lock { margin-left: auto; font-size: 11px; opacity: .8; }
.plan-tag { margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(155, 140, 255, .2); color: #cbb6ff; letter-spacing: .08em; }
.viewing-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 2px 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(255, 207, 110, .35); background: rgba(255, 207, 110, .08); font-size: 13px; color: #ffe2a8; }
.viewing-bar span { flex: 1; min-width: 160px; }
.viewing-bar .chip-btn { height: 30px; color: var(--ink); }
/* edit allowance */
.edits-chip.low { border-color: #ffb86b; color: #ffcf99; }
.edits-chip.out { border-color: var(--bad); color: #ffb3bd; }
.lock-panel { display: grid; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid rgba(255, 107, 125, .3); background: rgba(255, 107, 125, .06); }
.lock-panel b { font-size: 15px; }
.lock-panel p { margin: 0; font-size: 13px; color: var(--dim); }
.wide { width: 100%; justify-content: center; }
.stage.editing.locked iframe { cursor: not-allowed; }
/* font picker */
.font-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--ink); cursor: pointer; }
.font-btn:hover { border-color: rgba(177, 140, 255, .6); }
.font-face { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.font-btn i { font-style: normal; color: var(--dim); font-size: 11px; }
.font-pop { position: fixed; z-index: 1000; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 8px; height: min(460px, 70vh); padding: 10px; border-radius: 16px; background: rgba(12, 14, 26, .97); }
.font-pop[hidden] { display: none; }
.font-pop input[type="search"] { height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--ink); font-size: 14px; }
.font-cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.font-cats button { flex: none; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--dim); font-size: 12px; font-weight: 600; }
.font-cats button[aria-selected="true"] { background: rgba(177, 140, 255, .22); border-color: rgba(177, 140, 255, .55); color: var(--ink); }
.font-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; overscroll-behavior: contain; }
.font-list > * { flex: none; }
.font-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.font-item span { font-size: 18px; line-height: 1.2; }
.font-item small { font: 600 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.font-item:hover, .font-item:focus-visible { background: rgba(255, 255, 255, .06); }
.font-sec { margin: 6px 10px 2px; font: 600 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pair { display: grid; gap: 2px; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); text-align: left; cursor: pointer; }
.pair:hover { border-color: rgba(177, 140, 255, .55); background: rgba(177, 140, 255, .08); }
.pair b { font-size: 17px; font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pair span { font-size: 12px; color: var(--dim); }
.pair small { font: 600 9px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* ---------- Editor 3.0 — phase 2 ---------- */
.ins-tabs { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25); }
.ins-tabs button { height: 28px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: var(--dim); font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.ins-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: var(--ink); }
.ins-head { flex-wrap: wrap; }
.sel-tools .chip-btn { height: 30px; font-size: 12px; padding: 0 10px; }
.device-note { margin: 0; padding: 8px 10px; border-radius: 10px; background: rgba(124, 247, 212, .08); border: 1px solid rgba(124, 247, 212, .25); color: #bff8e7; font-size: 12px; }
.device-chip { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 8px 6px 10px; border-radius: 10px; background: rgba(155, 140, 255, .1); font-size: 12px; color: #d9d0ff; }
.device-chip .chip-btn { height: 28px; font-size: 12px; }
.icon-btn { width: 34px; padding: 0; font-size: 15px; }
.ins-sub { display: grid; gap: 7px; padding-top: 4px; border-top: 1px dashed var(--line); }
.ins-sub > summary { cursor: pointer; font-size: 12px; font-weight: 650; color: var(--dim); padding: 4px 0; }
details.ins-sub[open] > summary { color: var(--ink); }
.ins-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.ins-row.wrap { flex-wrap: wrap; }
.preset { height: 28px; font-size: 12px; padding: 0 10px; }
.preset.mine { border-color: rgba(177, 140, 255, .5); color: #d9ccff; }
.color-wrap { display: flex; gap: 4px; align-items: center; }
.color-wrap input[type="color"] { flex: 1; min-width: 0; }
.mini.eye { width: 30px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--ink); cursor: pointer; }
.swatches { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.sw { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.grad-sw { width: 34px; height: 22px; }
.contrast { font: 600 11px/1 var(--mono); padding: 5px 7px; border-radius: 7px; }
.contrast.ok { background: rgba(124, 247, 212, .12); color: #9ff5da; }
.contrast.meh { background: rgba(255, 207, 110, .12); color: #ffe2a8; }
.contrast.bad { background: rgba(255, 107, 125, .14); color: #ffb3bd; }
/* layers */
.layers { display: grid; gap: 8px; }
.layer-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: rgba(0, 0, 0, .2); }
.layer-row { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; min-height: 30px; padding-right: 4px; border-radius: 8px; font-size: 12.5px; color: var(--dim); cursor: pointer; user-select: none; }
.layer-row:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }
.layer-row.on { background: rgba(177, 140, 255, .2); color: var(--ink); }
.layer-row.multi { background: rgba(255, 122, 184, .14); }
.layer-row.hidden-el .ln { opacity: .45; text-decoration: line-through; }
.layer-row.drop { box-shadow: inset 0 -2px 0 var(--mint); }
.layer-row .tw { width: 16px; flex: none; border: 0; background: none; color: var(--faint); font-size: 10px; cursor: pointer; padding: 0; }
.layer-row .lk { width: 16px; flex: none; text-align: center; font: 700 10px/1 var(--mono); color: var(--faint); }
.layer-row .ln { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-row .lg { color: #ff9ecb; font-size: 11px; }
.layer-row .lb { width: 24px; height: 24px; flex: none; border: 0; border-radius: 6px; background: none; color: var(--faint); font-size: 12px; cursor: pointer; opacity: .6; }
.layer-row:hover .lb, .layer-row.on .lb { opacity: 1; }
.ln-edit { flex: 1; min-width: 0; height: 24px; border-radius: 6px; border: 1px solid var(--violet); background: #141828; color: var(--ink); padding: 0 6px; font-size: 12px; }
.locked-preview { position: relative; }
.locked-preview .blur { filter: blur(3px); opacity: .5; pointer-events: none; white-space: pre; }
.lock-cta { position: absolute; inset: 20px 0 auto; margin: auto; display: grid; gap: 8px; justify-items: start; padding: 16px; border-radius: 14px; background: rgba(12, 14, 26, .92); border: 1px solid var(--line-2); }
.lock-cta p { margin: 0; font-size: 13px; color: var(--dim); }
/* add: elements library */
.add-body { display: grid; gap: 8px; }
.add-tabs { flex-wrap: wrap; overflow: visible; }
.add-body input[type="search"], .add-body input[type="text"] { height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--ink); flex: 1; min-width: 0; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; max-height: 220px; overflow: auto; margin: 6px 0; }
.icon-grid button { aspect-ratio: 1; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); cursor: pointer; padding: 7px; }
.icon-grid button:hover { border-color: rgba(177, 140, 255, .6); background: rgba(177, 140, 255, .1); }
.icon-grid svg { width: 100%; height: 100%; }
.icon-grid.shapes { color: #b9a8ff; grid-template-columns: repeat(5, 1fr); max-height: none; }
.divider-list { display: grid; gap: 6px; color: #b9a8ff; }
.divider-list button { height: 40px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: inherit; cursor: pointer; padding: 6px 10px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; max-height: 260px; overflow: auto; }
.photo-grid button { padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; aspect-ratio: 1; background: #222; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ins-body.flat { padding: 0; }
.lib-list { display: grid; gap: 6px; }
.lib-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.lib-row b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.lib-row small { color: var(--faint); font-size: 11px; }
.lib-row .chip-btn { height: 28px; font-size: 12px; }
.kit-sw { display: inline-flex; }
.kit-sw i { width: 14px; height: 14px; border-radius: 50%; margin-right: -4px; border: 2px solid #10131f; }
.tpl-ic { color: #ffd98a; }
.tpl-list { display: grid; gap: 6px; }
/* layout check */
.layout-chip.warn { border-color: rgba(255, 207, 110, .55); color: #ffe2a8; background: rgba(255, 207, 110, .08); }
.lc-frame { position: fixed; left: -12000px; top: 0; height: 900px; border: 0; visibility: hidden; pointer-events: none; }
.issue-group h4 { margin: 12px 0 6px; }
.link-btn { border: 0; background: none; color: var(--ink); text-align: left; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
/* command palette */
.sheet.palette { width: min(560px, 94vw); }
.sheet.palette input[type="search"] { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--ink); font-size: 15px; }
.palette-list { display: grid; gap: 2px; margin-top: 10px; max-height: 50vh; overflow: auto; }
.palette-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font-size: 14px; }
.palette-item.on, .palette-item:hover { background: rgba(177, 140, 255, .16); }
.palette-item kbd { font: 600 11px/1 var(--mono); color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }

/* ---------- Editor 3.0 — phase 3 ---------- */
#remix-btn[aria-pressed="true"] { border-color: var(--mint); color: var(--mint); background: rgba(124, 247, 212, .1); }
.ai-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ai-tool { display: grid; gap: 3px; text-align: left; padding: 10px 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); cursor: pointer; }
.ai-tool:hover { border-color: rgba(155, 140, 255, .55); background: rgba(155, 140, 255, .08); }
.ai-tool:disabled { opacity: .45; cursor: default; }
.ai-tool b { font-size: 13px; font-weight: 700; }
.ai-tool small { font-size: 11px; color: var(--dim); line-height: 1.3; }
.rewrite input[type="text"] { flex: 1; min-width: 0; }
.cards.two { grid-template-columns: 1fr 1fr; }
.sheet.wide { width: min(1080px, 96vw); }
.remix-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 12px 0; }
.remix-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(0, 0, 0, .25); }
.remix-view { position: relative; height: 260px; overflow: hidden; background: #fff; }
.remix-frame { position: absolute; left: 0; top: 0; width: 1280px; height: 1100px; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; }
.remix-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; }
.remix-foot small { color: var(--faint); }
.export-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; margin: 12px 0; }
.export-opt { display: flex; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); cursor: pointer; }
.export-opt span { display: grid; gap: 3px; }
.export-opt b { font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.export-opt small { font-size: 11.5px; color: var(--dim); line-height: 1.35; }
.export-opt.on { border-color: rgba(124, 247, 212, .7); background: rgba(124, 247, 212, .08); box-shadow: 0 0 0 1px rgba(124, 247, 212, .35) inset; }
.ai-tag { font: 700 10px/1 var(--mono); padding: 3px 6px; border-radius: 6px; background: rgba(155, 140, 255, .22); color: #d9ccff; }
.export-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; border: 1px dashed var(--line-2); }
.export-opts .ins-check { margin: 0; font-size: 13px; }
.export-opts .ins-field { flex: 1 0 200px; }
.unlock-line { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }

/* ---------- Editor 3.0 — phase 4: marketplace, profiles, sharing, reels ---------- */
.market { max-width: 1320px; margin: 0 auto; padding: 96px 24px 60px; }
.market-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.market-head h1 { margin: 0; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.02em; line-height: 1.05; }
.market-sub { margin: 8px 0 0; color: var(--dim); }
.market-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.market-tools input, .market-tools select { height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--ink); font-size: 14px; }
.market-tools input { flex: 1 1 280px; }
#market-sort { justify-self: start; }
#market-sort button[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: var(--ink); }
.creators-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.creators-row .kicker { margin: 0 6px 0 0; }
.creator-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); cursor: pointer; font-size: 13px; }
.creator-chip img, .creator-chip i, .creator-line img, .creator-line i, .profile-head img, .profile-head i, .avatar-prev img, .avatar-prev i { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--grad); color: #05060c; font-style: normal; font-weight: 800; flex: none; }
.creator-chip small { color: var(--faint); }
.market-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.market-grid.in-sheet { margin: 12px 0; }
.market-empty { grid-column: 1 / -1; padding: 40px; border-radius: 18px; border: 1px dashed var(--line-2); text-align: center; color: var(--dim); }
.tpl-card { border-radius: 18px; border: 1px solid var(--line); background: var(--glass); overflow: hidden; display: grid; }
.tpl-cover { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #111; cursor: pointer; aspect-ratio: 16 / 10; overflow: hidden; }
.tpl-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .4s var(--ease); }
.tpl-cover::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); pointer-events: none; }
.tpl-cover:hover img { transform: scale(1.03); }
.tpl-badge { position: absolute; top: 10px; left: 10px; padding: 5px 9px; border-radius: 999px; background: rgba(0, 0, 0, .7); color: #ffd98a; font: 700 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.tpl-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 14px 4px; }
.tpl-meta b { display: block; font-size: 15px; }
.tpl-price { font: 700 13px/1 var(--mono); padding: 6px 9px; border-radius: 8px; background: rgba(155, 140, 255, .18); color: #e2d9ff; white-space: nowrap; }
.tpl-price.free { background: rgba(124, 247, 212, .14); color: #aaf5de; }
.tpl-stats { display: flex; gap: 12px; flex-wrap: wrap; padding: 4px 14px 14px; font-size: 12px; color: var(--faint); }
.tpl-stats.big { padding: 0; font-size: 13px; color: var(--dim); }
.link-btn.small { font-size: 12.5px; color: var(--dim); }
.link-btn.muted { color: var(--faint); }
.tpl-detail { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 18px; }
@media (max-width: 860px) { .tpl-detail { grid-template-columns: 1fr; } }
.tpl-left { display: grid; gap: 8px; align-content: start; }
.tpl-view { height: min(64vh, 620px); border-radius: 14px; overflow: hidden; background: #fff; display: flex; justify-content: center; }
/* The template preview: each device at its real width, scaled to fit (set in app.js) */
.tpl-view { position: relative; }
.tpl-frame { position: absolute; top: 0; left: 50%; width: 1280px; height: 100%; border: 0; background: #fff; transform-origin: top center; transform: translateX(-50%); }
.tpl-view[data-device="tablet"], .tpl-view[data-device="mobile"] { background: radial-gradient(circle at 50% 30%, #1b1f33, #0b0d16); }
.tpl-view[data-device="tablet"] .tpl-frame, .tpl-view[data-device="mobile"] .tpl-frame { top: 12px; border-radius: 22px; box-shadow: 0 0 0 10px #05060b, 0 20px 50px rgba(0, 0, 0, .55); }
.tpl-right { display: grid; gap: 12px; align-content: start; }
.tpl-right p { margin: 0; color: var(--dim); font-size: 14px; }
.creator-line { display: flex; gap: 10px; align-items: center; border: 0; background: none; color: var(--ink); padding: 0; cursor: pointer; text-align: left; }
.creator-line span { display: grid; } .creator-line .likes-tag { display: inline-flex; justify-self: start; } .creator-line small { color: var(--faint); }
.tpl-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-tags span { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.chip-btn.like.on { color: #ff9ecb; border-color: rgba(255, 122, 184, .5); }
.showcase-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.showcase-list a { color: var(--ink); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.mini-tpl { display: grid; gap: 4px; padding: 0; border: 0; background: none; color: var(--dim); cursor: pointer; text-align: left; font-size: 12px; }
.mini-tpl img { width: 100%; border-radius: 10px; aspect-ratio: 1200 / 630; object-fit: cover; }
.profile-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.profile-head img, .profile-head i { width: 64px; height: 64px; font-size: 26px; }
.profile-head b { font-size: 18px; } .profile-head small { display: block; color: var(--faint); } .profile-head p { margin: 6px 0; color: var(--dim); }
.creator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-bottom: 8px; }
.plan-card.col { display: grid; gap: 8px; align-content: start; align-items: stretch; }
.plan-card.col > div.ins-row, .plan-card.col > div.row-end { display: flex; }
.plan-card.col > div.earn-row, .plan-card.col > div.tpl-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.plan-card.col > div.ins-row { gap: 6px; }
.plan-card.col input[type="text"], .plan-card.col textarea { width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--ink); font: inherit; font-size: 13px; }
.at { display: inline-flex; align-items: center; gap: 2px; flex: 1; min-width: 140px; color: var(--dim); font-weight: 700; }
.at input { flex: 1; min-width: 0; }
.hint.ok { color: #9ff5da; } .hint.bad { color: #ffb3bd; }
.avatar-prev img, .avatar-prev i { width: 40px; height: 40px; }
.earn-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.earn-row b { color: var(--ink); }
.listing-list { display: grid; gap: 8px; }
.listing { border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.listing > summary { display: flex; gap: 12px; align-items: center; padding: 10px; cursor: pointer; list-style: none; }
.listing > summary::-webkit-details-marker { display: none; }
.listing > summary img { width: 92px; border-radius: 8px; aspect-ratio: 1200 / 630; object-fit: cover; }
.listing > summary span { display: grid; } .listing > summary small { color: var(--faint); }
.listing-body { display: grid; gap: 10px; padding: 0 12px 12px; }
.listing-body input[type="text"], .listing-body textarea, .listing-body input[type="number"] { padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--ink); font: inherit; font-size: 13px; }
.listing-body input[type="number"] { width: 110px; }
.vis-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.vis-opt { display: grid; gap: 2px; padding: 9px 10px; border-radius: 11px; border: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.vis-opt small { color: var(--faint); font-size: 11px; }
.vis-opt[aria-checked="true"] { border-color: rgba(124, 247, 212, .7); background: rgba(124, 247, 212, .08); }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--ink); font: 13px var(--mono); }
.warn-note { color: #ffe2a8 !important; }
.social-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; margin: 12px 0; }
.social { display: grid; place-items: center; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 650; cursor: pointer; }
.social:hover { border-color: rgba(155, 140, 255, .55); }
.reel-box { display: grid; gap: 8px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.reel-box h4 { margin: 0; }
.reel-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
@media (max-width: 640px) { .reel-wrap { grid-template-columns: 1fr; } }
.reel-video { width: 100%; border-radius: 14px; background: #000; }
.reel-video.vertical { aspect-ratio: 9 / 16; } .reel-video.square { aspect-ratio: 1; } .reel-video.wide { aspect-ratio: 16 / 9; }
.reel-side { display: grid; gap: 8px; }
.reel-side .ins-row b { font-size: 12px; flex: 1 0 100%; color: var(--dim); }
.caption-row { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: start; font-size: 12.5px; }
.caption-row small { color: var(--faint); padding-top: 2px; } .caption-row p { margin: 0; color: var(--ink); }
.mod-row img { width: 96px; border-radius: 8px; aspect-ratio: 1200 / 630; object-fit: cover; flex: none; }
.mod-row { flex-wrap: wrap; }
.mod-info { display: grid; flex: 1 1 220px; min-width: 0; gap: 2px; }
.mod-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* reel music */
.music-seg { flex-wrap: wrap; border-radius: 14px; gap: 2px; }
.music-seg button[aria-checked="true"] { background: rgba(255, 255, 255, .12); color: var(--ink); }
.reel-music { display: grid; gap: 6px; }
.reel-music.busy { opacity: .55; pointer-events: none; }
/* SmrtSites Hosting */
.host-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); margin-bottom: 12px; }
.host-card h4 { margin: 4px 0 0; }
.addr { display: flex; align-items: center; min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .25); overflow: hidden; }
.addr input { flex: 1; min-width: 80px; border: 0; background: none; color: var(--ink); padding: 9px 4px; font: 600 13px/1 ui-monospace, monospace; outline: none; }
.addr:focus-within { border-color: var(--accent, #7c5cff); }
.addr-fix { color: var(--faint); font: 12px/1 ui-monospace, monospace; padding: 0 4px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.addr-fix:last-child { padding: 0 10px 0 0; }
.live-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.live-url { font: 600 14px/1.3 ui-monospace, monospace; color: var(--ink); word-break: break-all; }
.dns-table { display: grid; gap: 8px; margin: 6px 0; }
.dns-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.dns-row code { font: 12px/1.3 ui-monospace, monospace; word-break: break-all; color: var(--ink); }
.dns-row small { grid-column: 1 / -1; color: var(--faint); }
@media (max-width: 560px) { .dns-row { grid-template-columns: 52px 1fr auto; } .dns-row code:nth-of-type(2) { grid-column: 2 / 3; } }
.other-hosts { margin-top: 4px; }
.host-card .ins-row > input[type="text"] { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .25); color: var(--ink); font: 13px/1 ui-monospace, monospace; }
/* footer + legal links */
.site-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 28px 16px 36px; font-size: 12px; color: var(--faint); }
.site-foot a { color: var(--faint); text-decoration: none; } .site-foot a:hover { color: var(--ink); text-decoration: underline; }
.auth-legal { margin: 6px 0 0; font-size: 11.5px; color: var(--faint); } .auth-legal a { color: inherit; }
.reel-post { display: grid; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.post-btn { font-weight: 700; }
.checks-list li .issue-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; padding-left: 30px; margin-top: -2px; }
.checks-list li .issue-acts .mini { font-size: 12px; color: var(--accent, #b9a8ff); }
/* reels 2.0 */
.chip-seg { flex-wrap: wrap; border-radius: 14px; gap: 2px; }
.chip-seg button[aria-checked="true"], .chip-seg button.on { background: rgba(255, 255, 255, .12); color: var(--ink); }
.track-picker { display: grid; gap: 8px; }
.track-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.track { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.track.on { border-color: var(--accent, #7c5cff); background: rgba(124, 92, 255, .14); }
.track.locked .tp-name { opacity: .55; }
.tp-play { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--ink); font-size: 10px; cursor: pointer; }
.tp-name { flex: 1; min-width: 0; text-align: left; background: none; border: 0; color: var(--ink); font-size: 12.5px; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 0; }
.track .plan-tag { font-size: 10px; }
.reel-history { display: grid; gap: 8px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.reel-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.reel-thumb { flex: none; width: 108px; display: grid; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); color: var(--dim); cursor: pointer; text-align: left; }
.reel-thumb video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: #000; pointer-events: none; }
.reel-thumb small { font-size: 10.5px; line-height: 1.3; }
.caption-row.edit input { width: 100%; min-width: 0; height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, .25); color: var(--ink); font-size: 13px; }
.caption-row.edit { align-items: center; }
.reel-style { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.reel-style summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.reel-style .style-slot { display: grid; gap: 8px; margin-top: 8px; }
.reel-thumbs.wrap { flex-wrap: wrap; overflow: visible; }
.surprise { white-space: nowrap; } .ins-sub.ai-anim.hot { border-color: var(--accent, #7c5cff); } .add-quick[hidden] { display: none; }

/* =====================================================================================
   Editor 4.0 — tools left, page centre, settings right, pages & zoom below
   ===================================================================================== */
body[data-view="studio"] main { padding: 0; }
body[data-view="studio"] .site-foot { display: none; }
.ed4-view { min-height: 0; height: 100vh; padding: 64px 10px 10px; box-sizing: border-box; }
.ed4 { height: 100%; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 8px; }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 16px; min-height: 52px; flex-wrap: wrap; }
.ed-grp { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ed-left { flex: 1 1 280px; }
.ed-add { flex: 0 0 auto; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.ed-right { flex: 1 1 360px; justify-content: flex-end; flex-wrap: wrap; }
.ed-site { position: relative; min-width: 0; }
.ed-site-btn { display: flex; align-items: center; gap: 9px; max-width: 280px; height: 38px; padding: 0 12px 0 6px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--ink); }
.ed-site-btn:hover, .ed-site-btn[aria-expanded="true"] { border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.ed-site-btn h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: none; }
.ed-site-btn i { font-style: normal; color: var(--dim); font-size: 12px; }
.ed-logo { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--grad); box-shadow: 0 0 18px rgba(124, 247, 212, .35); }
.ed-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 240px; padding: 6px; border-radius: 16px; background: rgba(12, 14, 26, .97); display: grid; gap: 2px; }
.ed-menu.up { top: auto; bottom: calc(100% + 8px); }
.ed-menu > button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; border: 0; background: none; color: var(--ink); font-size: 14px; text-align: left; }
.ed-menu > button:hover, .ed-menu > button:focus-visible { background: rgba(255, 255, 255, .07); }
.ed-menu > button > span { width: 22px; text-align: center; color: var(--dim); }
.ed-menu > button em { font-style: normal; }
.ed-devices button { display: inline-flex; align-items: center; gap: 6px; }
.ed-devices .d-ic { font-size: 14px; filter: grayscale(.2); }
.save-tpl { color: #ffe39a; border-color: rgba(255, 211, 110, .45); background: linear-gradient(120deg, rgba(255, 211, 110, .12), rgba(255, 122, 184, .08)); font-weight: 700; }
.save-tpl:hover { color: #fff3c9; border-color: rgba(255, 211, 110, .8); box-shadow: 0 0 22px rgba(255, 211, 110, .18); }
.ed-add .chip-btn { border-color: transparent; color: var(--ink); }
.ed-add .chip-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .07); }
.ed-add .save-tpl { border-color: rgba(255, 211, 110, .45); }
.ed-right .go.small { height: 34px; }
#edit-toggle[aria-pressed="true"] { color: var(--mint); border-color: rgba(124, 247, 212, .45); }
.ed4 .progress, .ed4 .viewing-bar { margin: 0; }
.ed-body { position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr) 352px; gap: 8px; min-height: 0; }
/* tool rail */
.ed-rail { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow-y: auto; scrollbar-width: none; }
.rail-tool { display: grid; justify-items: center; gap: 4px; padding: 9px 2px 7px; border-radius: 13px; border: 1px solid transparent; background: none; color: var(--dim); font-size: 10.5px; font-weight: 650; letter-spacing: .02em; transition: color .15s, background .15s, transform .15s; }
.rail-tool svg { width: 23px; height: 23px; }
.rail-tool:hover { color: var(--ink); background: rgba(255, 255, 255, .05); transform: translateY(-1px); }
.rail-tool[aria-pressed="true"] { color: #fff; background: linear-gradient(160deg, rgba(155, 140, 255, .32), rgba(124, 247, 212, .14)); border-color: rgba(177, 140, 255, .45); box-shadow: 0 6px 20px rgba(155, 140, 255, .18); }
.rail-tool[data-tool="ai"] svg { color: var(--mint); }
/* drawer */
.ed-drawer { position: absolute; z-index: 25; left: 82px; top: 0; bottom: 0; width: 320px; display: flex; flex-direction: column; border-radius: 18px; background: rgba(12, 14, 26, .95); animation: drawer-in .22s var(--ease); }
@keyframes drawer-in { from { opacity: 0; transform: translateX(-10px); } }
.ed-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.ed-drawer-head b { font-size: 15px; letter-spacing: -.01em; }
.ed-drawer-head .x { background: none; border: 0; color: var(--dim); font-size: 22px; line-height: 1; }
.ed-drawer-body { flex: 1; overflow-y: auto; padding: 0 14px 16px; display: grid; gap: 14px; align-content: start; scrollbar-width: thin; }
.ed-drawer-body input[type="search"], .ed-drawer-body input[type="text"], .ed-drawer-body input[type="number"] { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: 13px/1.3 var(--sans); padding: 8px 10px; }
.ed-drawer-body input[type="color"] { width: 100%; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .05); }
.ed-drawer-body .ins-row input { flex: 1; width: auto; }
.dr-sec { display: grid; gap: 8px; }
.dr-title { margin: 0; font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.dr-grid { display: grid; gap: 7px; }
.dr-grid.list { grid-template-columns: 1fr; }
.dr-grid.icons { grid-template-columns: repeat(6, 1fr); }
.dr-grid.shapes { grid-template-columns: repeat(5, 1fr); }
.dr-grid.stickers { grid-template-columns: repeat(5, 1fr); }
.dr-grid.fx, .dr-grid.frames { grid-template-columns: repeat(3, 1fr); }
.dr-grid.blocks { grid-template-columns: 1fr 1fr; }
.dr-grid.ai { grid-template-columns: 1fr; }
.dr-item { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink); text-align: left; cursor: grab; touch-action: none; transition: border-color .15s, background .15s, transform .15s; }
.dr-item:hover { border-color: rgba(177, 140, 255, .55); background: rgba(177, 140, 255, .08); transform: translateY(-1px); }
.dr-item:active { cursor: grabbing; }
.dr-grid.icons .dr-item, .dr-grid.shapes .dr-item, .dr-grid.stickers .dr-item { justify-content: center; min-height: 0; aspect-ratio: 1; padding: 6px; }
.dr-grid.icons .dr-item svg { width: 22px; height: 22px; }
.dr-svg { display: grid; width: 26px; height: 26px; color: var(--violet); } .dr-svg svg { width: 100%; height: 100%; }
.dr-item .emoji { font-size: 24px; line-height: 1; }
.dr-grid.fx .dr-item, .dr-grid.frames .dr-item, .dr-grid.blocks .dr-item { flex-direction: column; justify-content: center; gap: 6px; padding: 10px 6px; text-align: center; }
.dr-item small { color: var(--dim); font-size: 11px; }
.dr-badge { padding: 3px 9px; border-radius: 999px; background: var(--violet); color: #0a0a14; font: 800 10px/1.4 var(--mono); letter-spacing: .1em; }
.fx-demo { font-size: 26px; font-weight: 900; line-height: 1; color: var(--ink); }
.fx-demo.fx-gradient { background: linear-gradient(100deg, var(--violet), var(--rose)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.fx-demo.fx-outline { -webkit-text-stroke: 1.5px var(--violet); -webkit-text-fill-color: transparent; }
.fx-demo.fx-shadow { text-shadow: 0 5px 12px rgba(0, 0, 0, .8); }
.fx-demo.fx-glow { color: #fff; text-shadow: 0 0 6px var(--mint), 0 0 16px var(--mint); }
.fx-demo.fx-highlight { background: linear-gradient(transparent 55%, rgba(155, 140, 255, .7) 55%); }
.fx-demo.fx-retro { text-shadow: 2px 2px 0 var(--rose), 4px 4px 0 rgba(0, 0, 0, .4); }
.frame-demo { width: 34px; height: 34px; background: linear-gradient(135deg, var(--mint), var(--violet)); border-radius: 4px; }
.frame-demo.fr-rounded { border-radius: 10px; } .frame-demo.fr-circle { border-radius: 50%; } .frame-demo.fr-arch { border-radius: 99px 99px 6px 6px; height: 40px; width: 30px; }
.frame-demo.fr-blob { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; } .frame-demo.fr-hexagon { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0% 50%); border-radius: 0; } .frame-demo.fr-polaroid { border: 3px solid #fff; border-bottom-width: 10px; border-radius: 2px; }
.btn-demo { display: inline-block; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.bd-solid { background: var(--violet); color: #0a0a14; } .bd-outline { border: 2px solid currentColor; } .bd-soft { background: rgba(155, 140, 255, .18); color: var(--violet); border-radius: 9px; }
.bd-glow { background: linear-gradient(120deg, var(--violet), var(--rose)); color: #fff; box-shadow: 0 6px 18px rgba(155, 140, 255, .45); } .bd-square { background: var(--ink); color: #0a0a14; border-radius: 3px; } .bd-arrow { color: var(--violet); padding: 2px 0; border-radius: 0; border-bottom: 2px solid currentColor; }
.blk-demo { display: grid; gap: 4px; width: 100%; aspect-ratio: 16 / 10; padding: 8px; box-sizing: border-box; border-radius: 9px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.blk-demo i { display: block; border-radius: 3px; background: rgba(255, 255, 255, .16); }
.blk-demo i:nth-child(1) { height: 22%; width: 70%; justify-self: center; background: var(--violet); opacity: .7; } .blk-demo i:nth-child(2) { height: 10%; width: 50%; justify-self: center; } .blk-demo i:nth-child(3) { height: 12%; width: 30%; justify-self: center; background: var(--mint); opacity: .6; border-radius: 99px; }
.blk-hero-split .blk-demo i:nth-child(1), .blk-demo.blk-hero-split i:nth-child(1) { justify-self: start; width: 45%; }
.blk-demo.blk-features-grid, .blk-demo.blk-pricing-3, .blk-demo.blk-testimonials-cards, .blk-demo.blk-team, .blk-demo.blk-stats-row { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
.blk-demo.blk-features-grid i, .blk-demo.blk-pricing-3 i, .blk-demo.blk-testimonials-cards i, .blk-demo.blk-team i, .blk-demo.blk-stats-row i { height: auto !important; width: auto !important; justify-self: stretch !important; background: rgba(255, 255, 255, .12) !important; opacity: 1 !important; border-radius: 5px !important; }
.blk-demo.blk-pricing-3 i:nth-child(2) { outline: 1.5px solid var(--violet); }
.blk-demo.blk-gallery-grid { grid-template-columns: repeat(3, 1fr); } .blk-demo.blk-gallery-grid i { height: auto !important; width: auto !important; background: linear-gradient(135deg, rgba(124, 247, 212, .3), rgba(155, 140, 255, .3)) !important; opacity: 1 !important; border-radius: 4px !important; }
.blk-demo.blk-cta-banner { background: linear-gradient(120deg, rgba(155, 140, 255, .45), rgba(255, 122, 184, .35)); }
.blk-demo.blk-faq i, .blk-demo.blk-features-list i, .blk-demo.blk-contact i, .blk-demo.blk-footer-simple i, .blk-demo.blk-logos-row i { width: 90% !important; height: 18% !important; background: rgba(255, 255, 255, .13) !important; opacity: 1 !important; border-radius: 4px !important; }
.pat-sw { background-color: rgba(255, 255, 255, .06); }
.pat-dots { background-image: radial-gradient(var(--ink) 1px, transparent 1.4px); background-size: 7px 7px; } .pat-grid { background-image: linear-gradient(var(--dim) 1px, transparent 1px), linear-gradient(90deg, var(--dim) 1px, transparent 1px); background-size: 8px 8px; }
.pat-stripes { background-image: repeating-linear-gradient(45deg, var(--dim) 0 1.5px, transparent 1.5px 6px); } .pat-checks { background-image: conic-gradient(var(--dim) 25%, transparent 0 50%, var(--dim) 0 75%, transparent 0); background-size: 10px 10px; }
.pat-waves { background-image: radial-gradient(circle at 50% 100%, transparent 4px, var(--dim) 4.5px, var(--dim) 5.5px, transparent 6px); background-size: 12px 6px; } .pat-glow { background-image: radial-gradient(circle at 30% 30%, var(--violet), transparent 70%); }
.dr-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ai-card { display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(160deg, rgba(124, 247, 212, .06), rgba(155, 140, 255, .05)); color: var(--ink); text-align: left; }
.ai-card:hover { border-color: rgba(124, 247, 212, .45); }
.ai-card small { color: var(--dim); font-size: 12px; }
.ed-ghost { position: fixed; z-index: 2147483600; pointer-events: none; padding: 8px 14px; border-radius: 999px; background: rgba(12, 14, 26, .92); border: 1px solid rgba(177, 140, 255, .6); color: var(--ink); font-size: 13px; font-weight: 650; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.ed-ghost.over { border-color: var(--mint); color: var(--mint); }
/* canvas */
.ed-canvas { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ed4 .stage { flex: 1; display: block; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: repeating-conic-gradient(rgba(255, 255, 255, .025) 0 25%, transparent 0 50%) 0 0 / 22px 22px, #07080d; }
.ed4 .stage iframe { display: block; border: 0; background: #0a0b10; transition: none; box-shadow: 0 0 0 1px var(--line); }
.ed4 .stage.mobile iframe, .ed4 .stage.tablet iframe { max-width: none; border-radius: 18px; }
.ed4 .stage.editing { box-shadow: inset 0 0 0 2px rgba(177, 140, 255, .28); }
.ed-drop { position: absolute; inset: 0; z-index: 8; cursor: copy; background: rgba(124, 247, 212, .03); }
.ed-drop-line { position: absolute; height: 0; border-top: 3px solid var(--mint); box-shadow: 0 0 14px var(--mint); border-radius: 3px; pointer-events: none; }
.ed-drop-line::before { content: "Drop here"; position: absolute; left: 0; top: -26px; padding: 3px 8px; border-radius: 6px; background: var(--mint); color: #04130f; font: 700 11px/1.4 var(--sans); }
.ed-ruler { position: absolute; z-index: 6; pointer-events: none; color: var(--faint); font: 600 9px/1 var(--mono); background-color: rgba(7, 8, 13, .85); }
.ed-ruler.x { left: 0; right: 0; top: 0; height: 16px; border-radius: 16px 16px 0 0; background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px var(--step, 10px)); background-position: var(--off, 0) 100%; background-size: 100% 5px; background-repeat: repeat-x; }
.ed-ruler.y { left: 0; top: 16px; bottom: 0; width: 16px; background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px var(--step, 10px)); background-size: 5px 100%; background-repeat: repeat-y; background-position: 100% 0; }
.ed-ruler span { position: absolute; top: 2px; padding-left: 2px; }
.ed-ruler.y span { left: 1px; writing-mode: vertical-rl; }
/* floating toolbar */
.ed-float { position: absolute; z-index: 9; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px; background: rgba(14, 16, 28, .96); box-shadow: 0 14px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(177, 140, 255, .3); transition: top .12s var(--ease), left .12s var(--ease), opacity .15s; max-width: calc(100% - 12px); overflow-x: auto; scrollbar-width: none; }
.ed-float.dragging, .ed-float.offscreen { opacity: 0; pointer-events: none; }
.fl-btn { flex: none; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; border: 0; background: none; color: var(--ink); font-size: 14px; font-weight: 700; }
.fl-btn:hover { background: rgba(255, 255, 255, .09); }
.fl-btn.danger:hover { background: rgba(255, 107, 125, .18); }
.fl-btn.fl-i { font-style: italic; font-family: Georgia, serif; } .fl-btn.fl-ai { color: var(--mint); }
.fl-kind { flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: 0 2px; border-radius: 8px; background: rgba(177, 140, 255, .18); color: #d7c8ff; font: 800 12px/1 var(--mono); }
.fl-sep { flex: none; width: 1px; height: 20px; margin: 0 3px; background: var(--line-2); }
.fl-size { flex: none; min-width: 26px; text-align: center; font: 700 12px/1 var(--mono); color: var(--dim); }
.fl-color { flex: none; width: 30px; height: 30px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: none; cursor: pointer; }
.ed-float .fl-font { width: 130px; height: 32px; flex: none; }
.ed-float .fl-font .font-face { font-size: 13px; }
.ed-pop { position: fixed; z-index: 2147483000; min-width: 200px; max-height: 70vh; overflow-y: auto; padding: 6px; border-radius: 14px; background: rgba(12, 14, 26, .98); display: grid; gap: 1px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.ed-pop button { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 9px; border: 0; background: none; color: var(--ink); font-size: 13px; text-align: left; }
.ed-pop button:hover, .ed-pop button:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.ed-pop button.danger { color: #ff9a8f; }
.ed-pop .pm-ic { width: 18px; text-align: center; color: var(--dim); }
.ed-pop kbd { margin-left: auto; color: var(--faint); font: 600 10.5px/1 var(--mono); }
.ed-pop hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
/* inspector */
.ed-side { display: flex; flex-direction: column; min-height: 0; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); overflow: hidden; }
.ed-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 6px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.ed-tabs button { display: grid; justify-items: center; gap: 2px; padding: 7px 2px 6px; border-radius: 11px; border: 0; background: none; color: var(--dim); font-size: 11.5px; font-weight: 650; }
.ed-tabs button .t-ic { font-size: 16px; line-height: 1; filter: saturate(.6); }
.ed-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.ed-tabs button[aria-selected="true"] { color: #fff; background: rgba(177, 140, 255, .2); box-shadow: inset 0 0 0 1px rgba(177, 140, 255, .4); }
.ed-tabs button[aria-selected="true"] .t-ic { filter: none; }
.ed-panel { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: grid; gap: 10px; align-content: start; scrollbar-width: thin; overscroll-behavior: contain; }
.ed-chips { display: flex; gap: 6px; flex-wrap: wrap; } .ed-chips:empty { display: none; }
.ed-panel .inspector { padding: 0; border: 0; box-shadow: none; background: none; }
.ed-panel .side-block { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .02); }
.site-head .qa { margin: 4px 0 0; }
.site-head .hint { margin: 6px 0 4px; }
.ai-panel { display: grid; gap: 10px; }
.ai-panel .kicker { margin: 4px 0 0; }
.ai-panel .edit textarea { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font: 14px/1.4 var(--sans); padding: 10px 12px; resize: vertical; }
.ai-panel .edit-row { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
#ai-sel { display: grid; gap: 8px; }
#ai-sel input[type="text"], #ai-sel textarea { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font: 13px/1.3 var(--sans); padding: 7px 9px; }
#ai-sel .ins-row input[type="text"] { flex: 1; width: auto; }
.fx-row .fx-chip { height: 30px; font-weight: 700; }
.fx-chip.fx-gradient { background: linear-gradient(100deg, rgba(155, 140, 255, .25), rgba(255, 122, 184, .2)); color: #fff; }
.fx-chip.fx-glow { color: var(--mint); text-shadow: 0 0 8px rgba(124, 247, 212, .8); }
.ins-body.flat { padding: 0; }
/* bottom bar */
.ed-bottom { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 14px; min-height: 46px; flex-wrap: wrap; }
.ed-pages { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; max-width: 50%; }
.ed-pages button { flex: none; height: 30px; padding: 0 12px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--dim); font-size: 13px; font-weight: 600; }
.ed-pages button:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.ed-pages button[aria-selected="true"] { color: var(--ink); background: rgba(255, 255, 255, .08); border-color: var(--line-2); }
.ed-pop-wrap { position: relative; }
.ed-pop-wrap .ed-menu { width: min(380px, 90vw); padding: 14px; display: grid; gap: 10px; }
.ed-spacer { flex: 1; }
.ed-zoom { display: inline-flex; gap: 2px; align-items: center; }
#zoom-val { min-width: 86px; font-variant-numeric: tabular-nums; }
.keys-grid { display: grid; gap: 6px; } .key-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); font-size: 14px; } .key-row kbd { font: 600 12px/1.3 var(--mono); color: var(--mint); }
/* Preview (not editing) and preview mode on claude.ai: fewer tools */
body:not(.editing) .ed-float { display: none; }
body.ed-lite .ed-rail, body.ed-lite .ed-drawer, body.ed-lite .ed-add, body.ed-lite #remix-btn, body.ed-lite .ed-tabs, body.ed-lite #edit-toggle, body.ed-lite #rulers-btn, body.ed-lite #keys-btn { display: none !important; }
body.ed-lite .ed-body { grid-template-columns: minmax(0, 1fr) 352px; }
/* Classic editor: one panel with everything, no rail */
body.ed-classic .ed-rail, body.ed-classic .ed-drawer, body.ed-classic .ed-float, body.ed-classic .ed-tabs { display: none !important; }
body.ed-classic .ed-body { grid-template-columns: minmax(0, 1fr) 380px; }
@media (max-width: 1180px) { .ed-body { grid-template-columns: 70px minmax(0, 1fr) 316px; } .ed-devices .d-l { display: none; } }
/* phones: the rail is a tab bar at the bottom, the inspector a pull-up sheet */
@media (max-width: 820px) {
  .ed4-view { padding: 60px 6px 64px; height: 100dvh; }
  .ed-top { gap: 6px; padding: 6px; } .ed-left { flex-basis: 100%; } .ed-right { flex-basis: 100%; justify-content: flex-start; } .ed-right .chip-btn { padding: 0 9px; }
  .ed-body { grid-template-columns: minmax(0, 1fr); }
  .ed-rail { position: fixed; z-index: 30; left: 6px; right: 6px; bottom: 6px; flex-direction: row; justify-content: space-between; padding: 5px; border-radius: 16px; overflow-x: auto; background: rgba(12, 14, 26, .96); }
  .rail-tool { flex: 1 0 52px; padding: 6px 2px 4px; font-size: 9.5px; } .rail-tool svg { width: 20px; height: 20px; }
  .ed-drawer { position: fixed; left: 6px; right: 6px; top: auto; bottom: 70px; width: auto; max-height: 58vh; z-index: 31; }
  .ed-side { position: fixed; z-index: 29; left: 6px; right: 6px; bottom: 70px; max-height: 46px; transition: max-height .25s var(--ease); background: rgba(12, 14, 26, .97); }
  body.panel-open .ed-side { max-height: 62vh; }
  .ed-side::before { content: ""; display: block; width: 40px; height: 4px; margin: 6px auto 0; border-radius: 4px; background: var(--line-2); }
  .ed-tabs button { grid-auto-flow: column; gap: 5px; align-items: center; padding: 6px 2px; }
  .ed-bottom { gap: 4px; padding: 4px 6px; } .ed-pages { max-width: 100%; } #open-full, #rulers-btn, #keys-btn { display: none; }
  body.ed-classic .ed-body, body.ed-lite .ed-body { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================================
   Marketplace 4.0: shelves, ratings, creator hub, inspection report, moderation
   ===================================================================================== */
.shelves { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; margin: 8px 0 26px; } .shelves:empty { display: none; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.shelf-head h3 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shelf-row .tpl-card { scroll-snap-align: start; }
.market-all { margin: 18px 0 12px; font-size: 20px; letter-spacing: -.02em; }
.stars { color: #ffd27a; letter-spacing: .04em; }
.stars i { font-style: normal; color: rgba(255, 255, 255, .18); } .stars i.on { color: #ffd27a; }
.tpl-rating { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); }
.tpl-includes .kit-sw.big i { width: 26px; height: 26px; border-radius: 8px; }
.tpl-reviews { display: grid; gap: 10px; }
.review-list { display: grid; gap: 10px; }
.review { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); display: grid; gap: 6px; }
.review p { margin: 0; font-size: 14px; line-height: 1.5; }
.review-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .review-top small { color: var(--dim); margin-left: auto; }
.review-reply { padding-left: 12px; border-left: 2px solid var(--violet); color: var(--dim); }
.review-form { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(155, 140, 255, .06); border: 1px solid rgba(155, 140, 255, .25); }
.review-form textarea { width: 100%; box-sizing: border-box; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: 14px/1.4 var(--sans); padding: 8px 10px; }
.star-pick { display: flex; gap: 2px; } .star-pick button { border: 0; background: none; font-size: 26px; color: rgba(255, 255, 255, .2); padding: 0 2px; line-height: 1; } .star-pick button.on { color: #ffd27a; }
.creator-head { display: grid; gap: 8px; margin-bottom: 10px; }
.creator-tabs { flex-wrap: wrap; margin-bottom: 14px; }
.card-listing { padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); display: grid; gap: 10px; }
.listing-top { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.listing-top img { width: 96px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; }
.listing-top b { font-size: 16px; }
.status-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0; }
.status-line small { color: var(--dim); }
.status-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2); font: 700 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.status-pill.ok { color: var(--mint); border-color: rgba(124, 247, 212, .45); background: rgba(124, 247, 212, .08); }
.status-pill.busy { color: #b8a8ff; border-color: rgba(155, 140, 255, .45); background: rgba(155, 140, 255, .08); }
.status-pill.warn { color: #ffcf99; border-color: rgba(255, 184, 107, .45); background: rgba(255, 184, 107, .08); }
.status-pill.bad { color: #ffb3bd; border-color: rgba(255, 107, 125, .45); background: rgba(255, 107, 125, .08); }
.listing-note { margin: 0; font-size: 13px; color: var(--dim); } .listing-note.bad { color: #ffb3bd; } .listing-note.warn { color: #ffcf99; } .listing-note.busy { color: #cbbfff; }
.ins-row.wrap { flex-wrap: wrap; }
.terms .perks { font-size: 13px; }
.wide-col { grid-column: 1 / -1; }
.notices li.unread span { color: var(--ink); font-weight: 600; }
.notices li.unread::before { content: "●"; color: var(--mint); margin-right: 6px; font-size: 10px; }
.verdict { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); margin-bottom: 12px; }
.verdict b { font-size: 17px; } .verdict small { color: var(--dim); }
.verdict.ok { border-color: rgba(124, 247, 212, .45); background: rgba(124, 247, 212, .07); } .verdict.ok b { color: var(--mint); }
.verdict.bad { border-color: rgba(255, 107, 125, .45); background: rgba(255, 107, 125, .06); } .verdict.bad b { color: #ffb3bd; }
.fail-list { margin-bottom: 10px; }
.ai-summary { margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: rgba(124, 247, 212, .05); border: 1px solid rgba(124, 247, 212, .2); font-size: 14px; }
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.screen-card { padding: 12px; border-radius: 14px; border: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.screen-card.ok { border-color: rgba(124, 247, 212, .35); } .screen-card.warn { border-color: rgba(255, 184, 107, .35); } .screen-card.bad { border-color: rgba(255, 107, 125, .45); background: rgba(255, 107, 125, .04); }
.screen-verdict { font-size: 13px; color: var(--dim); } .screen-card.ok .screen-verdict { color: var(--mint); } .screen-card.bad .screen-verdict { color: #ffb3bd; }
.screen-card ul { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--dim); display: grid; gap: 3px; } .screen-card li.fail { color: #ffb3bd; }
.score-bars { display: grid; gap: 8px; margin: 6px 0 12px; }
.score { display: grid; grid-template-columns: 150px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.score .bar { position: relative; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.score .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--mint); }
.score.bad .bar i { background: var(--bad); }
.score .bar em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #fff; opacity: .7; }
.score b { text-align: right; font-variant-numeric: tabular-nums; }
.inspect-run { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; padding: 10px 0; }
.scan-orb { width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(from 0deg, var(--mint), var(--violet), var(--rose), var(--mint)); animation: spin 2.4s linear infinite; mask: radial-gradient(circle, transparent 46%, #000 48%); -webkit-mask: radial-gradient(circle, transparent 46%, #000 48%); }
.inspect-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inspect-steps li { display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: 14px; }
.inspect-steps li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.inspect-steps li.done { color: var(--mint); } .inspect-steps li.done i { background: currentColor; }
.inspect-steps li.now { color: var(--ink); } .inspect-steps li.now i { border-color: var(--violet); border-top-color: transparent; animation: spin .8s linear infinite; }
.standard .checks-list { margin-bottom: 10px; }
.mod-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 8px; }
.mod-stat { padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); display: grid; gap: 2px; } .mod-stat small { color: var(--dim); font-size: 12px; }
.mod-list { display: grid; gap: 12px; }
.mod-card { padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); display: grid; gap: 8px; }
.mod-card.overdue { border-color: rgba(255, 184, 107, .5); }
.mod-top { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.mod-top img { width: 120px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 10px; }
.mod-info { display: grid; gap: 2px; min-width: 0; } .mod-info small { color: var(--dim); }
.score-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.score-chips span { padding: 3px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); }
.score-chips span.ok { color: var(--mint); border-color: rgba(124, 247, 212, .35); } .score-chips span.bad { color: #ffb3bd; border-color: rgba(255, 107, 125, .45); }
.mod-reports { margin: 0; padding-left: 16px; font-size: 13px; color: #ffcf99; }
.mod-decide { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.mod-decide input { flex: 1 1 220px; min-width: 0; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font: 13px/1.3 var(--sans); padding: 7px 9px; }
.mod-decide select { background: #141828; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 13px; padding: 6px 8px; max-width: 260px; }
.mod-history summary { cursor: pointer; color: var(--dim); font-size: 12px; }
.vis-opts .vis-opt { cursor: pointer; }
/* top bar fits on one line down to ~1180px */
.ed-top { flex-wrap: nowrap; }
.ed-left { flex: 0 1 auto; } .ed-right { flex: 1 1 auto; flex-wrap: nowrap; gap: 5px; }
.ed-site-btn { max-width: 230px; }
.ed-top .chip-btn { padding: 0 10px; }
@media (max-width: 1640px) { .ed-devices .d-l { display: none; } .ed-devices button { padding: 0 10px; } }
@media (max-width: 1320px) { #remix-btn { font-size: 0; width: 34px; padding: 0; } #remix-btn::before { content: "⬚"; font-size: 15px; } .ed-site-btn { max-width: 170px; } }
@media (max-width: 1180px) { .ed-top { flex-wrap: wrap; } }
#ai-sel select, .ai-panel select { background: #141828; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 13px; padding: 6px 8px; }
.creator-tabs button[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: var(--ink); }
.chip-seg button[aria-selected="true"] { background: rgba(255, 255, 255, .1); color: var(--ink); }
.score .bar { display: block; }
/* phones: a compact top bar, the page gets the room */
@media (max-width: 820px) {
  body[data-view="studio"] { overflow: hidden; }
  .ed4-view { overflow: hidden; padding-top: 58px; }
  .ed4 { gap: 6px; }
  .ed-top { flex-wrap: wrap; row-gap: 6px; }
  .ed-left, .ed-right { flex: 1 1 100%; }
  .ed-add { order: 3; flex: 1 1 100%; justify-content: space-between; }
  .ed-add .chip-btn { flex: 1; padding: 0 6px; font-size: 12.5px; }
  .ed-right .vers-wrap, .ed-right .hist, #remix-btn, #launch-download { display: none; }
  .ed-right { justify-content: flex-end; }
  #edit-toggle, #launch-share { font-size: 12px; }
  .ed-site-btn { max-width: 60vw; }
  .ed-bottom .layout-chip { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ed-zoom { display: none; }
  .ed-float { top: 6px !important; left: 6px !important; right: 6px; max-width: none; }
}
@media (max-width: 520px) {
  .bar { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .bar-right { gap: 6px; }
  #market-btn { padding: 0 10px; font-size: 13px; }
  #account-btn { padding: 3px; width: 34px; height: 34px; }
  .logo { font-size: 15px; gap: 6px; }
}
/* the page takes whatever room is left (hidden bars don't leave gaps) */
.ed4 { display: flex; flex-direction: column; }
.ed4 > .ed-body { flex: 1 1 auto; min-height: 0; }
.ed4 > .ed-top, .ed4 > .ed-bottom, .ed4 > .progress, .ed4 > .progress-row, .ed4 > .viewing-bar { flex: none; }
.ed-canvas { height: 100%; }
@media (max-width: 820px) {
  .ed4 > .ed-body { display: flex; }
  .ed-canvas { flex: 1; }
  .ed-add .chip-btn { white-space: nowrap; font-size: 12px; }
}
@media (max-width: 440px) { .logo { font-size: 0; gap: 0; } .logo .logo-mark { margin: 0; } }
@media (max-width: 820px) { .ed4-view { padding-bottom: 124px; } }
/* menus from the top and bottom bars open above the page */
.ed-top, .ed-bottom { position: relative; z-index: 30; }

/* ---- Marketplace title: big and centred */
.market-hero { text-align: center; padding: 18px 0 6px; }
.market-head h1#market-title { font-size: clamp(26px, min(7.6vw, calc((100vw - 32px) / 7.4)), 104px); line-height: .95; letter-spacing: -.035em; font-weight: 800; text-transform: uppercase; }
.market-hero .market-sub { max-width: 640px; margin: 14px auto 0; }

/* ---- First-visit tip under “Website Templates” — sways left and right, arrow and all */
.tip-bubble { position: fixed; z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(300px, calc(100vw - 24px)); padding: 11px 12px 11px 16px; border-radius: 14px;
  background: linear-gradient(135deg, #5b3fd6, #b8327a); color: #fff; font-weight: 650; font-size: 14px; line-height: 1.3; box-shadow: 0 12px 34px rgba(91, 63, 214, .45);
  animation: tip-sway 1.6s ease-in-out 8, tip-in .35s ease-out; }
.tip-bubble .tip-go { all: unset; cursor: pointer; flex: 1; font: inherit; color: inherit; }
.tip-bubble .tip-go:focus-visible, .tip-bubble .tip-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
@media (hover: none) { .tip-bubble { animation-iteration-count: 4, 1; } }
.tip-bubble .tip-arrow { position: absolute; top: -8px; left: var(--arrow-x, 50%); width: 16px; height: 16px; margin-left: -8px; background: #6e3ccc; transform: rotate(45deg); border-radius: 3px; }
.tip-bubble .tip-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(255,255,255,.22); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.tip-bubble .tip-x:hover { background: rgba(255,255,255,.36); }
@keyframes tip-sway { 0%, 100% { transform: translateX(-12px); } 50% { transform: translateX(12px); } }
@keyframes tip-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tip-bubble { animation: none; } }
#market-btn.tip-glow { box-shadow: 0 0 0 2px rgba(255, 92, 168, .7), 0 0 18px rgba(124, 92, 255, .6); }
.mod-demo { margin: 14px 0 4px; padding: 14px 16px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--accent, #7c5cff) 60%, transparent); background: color-mix(in srgb, var(--accent, #7c5cff) 8%, transparent); }
.mod-demo p { margin: 0 0 10px; }
/* Home headline: two lines that each stay on one line (sized to fit the hero, phone to desktop) */
.hero h1.two-line { font-size: clamp(22px, min(7.9vw, calc((100vw - 32px) / 10.8)), 84px); line-height: .98; }
.hero h1.two-line .line { display: block; white-space: nowrap; }
.tip-bubble:hover { animation-play-state: paused; } /* easy to click: it holds still under the pointer */

/* ---- Account: one size for every tab; tabs scroll sideways instead of squeezing */
dialog.sheet.acct { width: min(1040px, calc(100vw - 32px)); height: min(820px, calc(100vh - 32px)); flex-direction: column; }
dialog.sheet.acct[open] { display: flex; }
dialog.sheet.acct .sheet-body { flex: 1; max-height: none; min-height: 0; display: flex; flex-direction: column; }
dialog.sheet.acct .acct-nav { flex: none; overflow-x: auto; scrollbar-width: none; }
dialog.sheet.acct .acct-nav::-webkit-scrollbar { display: none; }
dialog.sheet.acct .acct-nav button { flex: 1 0 128px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; font-weight: 600; }
dialog.sheet.acct .acct-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; align-content: start; }
.acct-nav .gem { width: 13px; height: 13px; }
.creator-tabs { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
.creator-tabs::-webkit-scrollbar { display: none; }
.creator-tabs button { flex: 0 0 auto; white-space: nowrap; }
.sub-card { border-color: color-mix(in srgb, var(--accent, #7c5cff) 45%, transparent) !important; }
.sub-card small + small { display: block; margin-top: 2px; }
.big-num .gem.big { display: inline-block; width: 26px; height: 26px; margin-right: 10px; vertical-align: middle; }
@media (max-width: 640px) { dialog.sheet.acct { height: calc(100vh - 16px); width: calc(100vw - 16px); max-width: none; max-height: none; } dialog.sheet.acct .acct-nav button { flex-basis: 108px; } }

/* ---- Account button: your picture or initial */
#account-btn { padding: 3px; width: 36px; height: 36px; justify-content: center; border-radius: 50%; }
.acct-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }
.acct-av.letter { display: grid; place-items: center; background: linear-gradient(135deg, #7c5cff, #ff5ca8); color: #fff; font-weight: 800; font-size: 15px; }

/* ---- likes next to creator names */
.likes-tag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #ff8fb8; background: rgba(255, 92, 168, .12); vertical-align: middle; }
.by-line { display: inline-flex; align-items: center; flex-wrap: wrap; }

/* ---- generating in the background */
.gen-pill { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: inline-flex; align-items: center; gap: 10px; max-width: calc(100vw - 36px); padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(18, 16, 34, .92); backdrop-filter: blur(12px); color: var(--ink); font-weight: 600; font-size: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .45); cursor: pointer; }
.gen-pill b { color: #b9a6ff; white-space: nowrap; }
.gen-pill span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-dot { width: 10px; height: 10px; border-radius: 50%; background: #7cf7d4; flex: none; }
.gp-dot.live { animation: gp-pulse 1.2s ease-in-out infinite; }
@keyframes gp-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(124, 247, 212, .6); } 50% { box-shadow: 0 0 0 7px rgba(124, 247, 212, 0); } }
/* Phones: header buttons shrink to their icons so everything fits */
@media (max-width: 860px) { .bar #aff-btn .lbl { display: none; } .bar #aff-btn { padding: 0 11px; } }
@media (max-width: 720px) { .bar #admin-btn .lbl { display: none; } }
@media (max-width: 760px) { .bar #market-btn .lbl, .bar #gen-btn .lbl { display: none; } .bar #market-btn, .bar #gen-btn, .bar #admin-btn { padding: 0 11px; } }

/* ---- audit fixes: run view on phones, plan-card buttons, top-layer toast/pill */
.run-head { flex-wrap: wrap; } .run-titles { flex: 1 1 260px; min-width: 0; } .run-actions { flex-wrap: wrap; justify-content: flex-end; }
.run-head .lbl-short { display: none; }
@media (max-width: 640px) { .run-titles { flex-basis: 100%; } .run-head h2 { overflow-wrap: break-word; } .run-head .lbl-long { display: none; } .run-head .lbl-short { display: inline; } }
.plan-card > button, .plan-card > .chip-btn { flex: none; white-space: nowrap; }
#toast[popover], #gen-pill[popover] { margin: 0; inset: auto; overflow: visible; }
#toast[popover] { left: 50%; bottom: 24px; width: max-content; max-width: calc(100vw - 32px); color: var(--ink); }
body:has(#gen-pill:not([hidden])) #toast[popover] { bottom: 84px; }
#gen-pill[popover] { right: 18px; bottom: 18px; }
body[data-view="studio"] #gen-pill { bottom: 70px; }
@media (max-width: 820px) { body[data-view="studio"] #gen-pill { bottom: 132px; right: 10px; padding: 9px 12px; font-size: 13px; } }
.pane .pick:disabled { opacity: .5; cursor: not-allowed; }
.pane .pick.queued { background: linear-gradient(90deg, #7cf7d4, #9b8cff); color: #05060c; box-shadow: 0 0 0 2px rgba(124,247,212,.35), 0 8px 24px rgba(124,247,212,.25); }
#market-sort { max-width: 100%; overflow-x: auto; scrollbar-width: none; } #market-sort::-webkit-scrollbar { display: none; } #market-sort button { flex: none; white-space: nowrap; }

/* ===================================================================== growth round */
/* form controls in sheets (low specificity, so any existing, more specific rule wins) */
:where(dialog.sheet) :where(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]), textarea, select) { width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .045); color: var(--ink); font-size: 14px; outline: none; }
:where(dialog.sheet) :where(textarea) { resize: vertical; line-height: 1.5; }
:where(dialog.sheet) :where(input, textarea, select):focus { border-color: rgba(124, 247, 212, .45); box-shadow: 0 0 0 3px rgba(124, 247, 212, .12); }
:where(dialog.sheet) .sheet-body > :where(input, textarea, select) { margin-bottom: 10px; }
.ins-row > :where(input, select) { flex: 1; min-width: 140px; width: auto; }
label.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; color: var(--ink); cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--mint); flex: none; }
.mini.danger { color: var(--bad); }
.chip-btn.wide { width: 100%; justify-content: center; margin-top: 8px; }
.dot-sep { color: var(--faint); margin: 0 10px; }
.import-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 4px; }


/* store links */
.market-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 10px; }
.market-grid.in-sheet { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 16px; }

/* brand studio */
.brand-body { display: grid; gap: 10px; margin-top: 12px; }
.brand-out { margin-top: 6px; }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.name-card { display: grid; gap: 6px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.name-card b { font-size: 20px; letter-spacing: -.02em; }
.name-card small { color: var(--dim); }
.name-card .dom { font: 12px/1.3 var(--mono); color: var(--dim); }
.name-card .dom.ok { color: var(--mint); } .name-card .dom.no { color: var(--faint); text-decoration: line-through; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.logo-card { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.logo-card figcaption { font-size: 12.5px; color: var(--dim); }
.svg-box { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 12px; background: #f6f5f2; padding: 14%; }
.svg-box svg { width: 100%; height: 100%; max-height: 100%; }
.logo-card.small .svg-box { aspect-ratio: 1; padding: 18%; }
.kit-view { display: grid; gap: 10px; }
.kit-logos { display: grid; grid-template-columns: repeat(3, minmax(0, 170px)); gap: 10px; }
.kit-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.kit-swatch { display: grid; gap: 2px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); font-size: 12px; }
.kit-swatch i { display: block; height: 44px; border-radius: 8px; margin-bottom: 4px; border: 1px solid rgba(255, 255, 255, .1); }
.kit-swatch small { font-family: var(--mono); color: var(--dim); }
.kit-base { display: flex; align-items: center; gap: 12px; } .kit-base .svg-box { width: 96px; padding: 12px; }

/* blog manager + editor */
.post-list { display: grid; gap: 8px; margin: 12px 0; }
.post-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.post-row b { display: block; font-size: 15px; } .post-row small { color: var(--dim); font-size: 12.5px; }
.post-title { font-size: 20px !important; font-weight: 650; }
.md-tools { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.md-tools .mini { text-decoration: none; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--ink); font-size: 12px; }
.post-body { min-height: 260px; font-family: var(--mono); font-size: 13.5px !important; }
.post-preview { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin: 10px 0; }
.cover-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; }
.cover-row img { width: 140px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; }
.blog-settings { display: grid; gap: 8px; padding-top: 8px; }

/* analytics + creator analytics */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0; }
.stat-tile { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.stat-tile small { color: var(--dim); font-size: 12px; } .stat-tile b { font-size: 28px; letter-spacing: -.03em; line-height: 1.1; } .stat-tile span { color: var(--faint); font-size: 12px; }
.chart { position: relative; margin: 6px 0 14px; padding: 12px 14px 8px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.chart .bars { display: block; width: 100%; height: auto; }
.chart .bar { fill: var(--mint); opacity: .78; transition: opacity .15s; } .chart .bar.on { opacity: 1; }
.chart .axis { fill: var(--faint); font: 11px var(--sans); }
.chart-tip { position: absolute; top: 34px; max-width: calc(100% - 8px); padding: 6px 10px; border-radius: 10px; background: rgba(8, 10, 18, .94); border: 1px solid var(--line-2); font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.bars rect[tabindex]:focus { outline: none; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.top-list { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.top-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.top-list li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; font-size: 13px; border-radius: 8px; overflow: hidden; }
.top-bar { position: absolute; inset: 0 auto 0 0; background: rgba(124, 247, 212, .12); border-radius: 8px; }
.top-k { position: relative; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .top-list li b { position: relative; font-weight: 600; }
.ca-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; display: block; overflow-x: auto; }
.ca-table th, .ca-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ca-table th { color: var(--dim); font-weight: 600; font-size: 12px; }

/* SEO */
.seo-score { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.seo-score .ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--mint) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); flex: none; }
.seo-score .ring b { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #0c0e18; font-size: 22px; }
.seo-score small { display: block; color: var(--dim); }
.seo-group .checks-list li { grid-template-columns: 22px 1fr auto; }
.seo-group .checks-list li span small { display: block; color: var(--dim); font-size: 12px; }
.seo-group .checks-list .mini { text-decoration: none; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--ink); align-self: center; }
.seo-setup { margin-top: 14px; flex-wrap: wrap; }
.seo-form { display: grid; gap: 8px; width: 100%; }
.og-card { width: min(100%, 480px); aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* domains */
.dom-search { margin: 8px 0 12px; } .dom-search input { flex: 1; }
.dom-results, .dom-mine { display: grid; gap: 6px; margin-bottom: 12px; }
.dom-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); flex-wrap: wrap; }
.dom-row b { font-family: var(--mono); font-size: 14px; flex: 1; min-width: 160px; } .dom-row span { color: var(--dim); font-size: 13px; }
.dom-row.taken { opacity: .55; } .dom-row.taken b { text-decoration: line-through; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* earn */
.earn-card b.grad { font-size: 18px; word-break: break-all; }

/* licenses, wishlists, collections */
.lic-box { display: grid; gap: 8px; margin: 10px 0; }
.lic-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lic-card { display: grid; gap: 2px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--ink); }
.lic-card[aria-pressed="true"] { border-color: var(--mint); background: rgba(124, 247, 212, .08); box-shadow: 0 0 0 1px var(--mint) inset; }
.lic-card:disabled { opacity: .5; cursor: default; }
.lic-card .price { font-size: 18px; font-weight: 700; } .lic-card small { color: var(--dim); font-size: 12px; line-height: 1.35; }
.chip-btn.wish.on { color: #ffd36e; border-color: rgba(255, 211, 110, .45); }
.col-row { grid-auto-columns: minmax(220px, 260px); }
.col-card { display: grid; gap: 6px; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); text-align: left; color: var(--ink); }
.col-covers { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: rgba(255, 255, 255, .04); }
.col-covers img { width: 100%; height: 100%; object-fit: cover; }
.col-card small { color: var(--dim); font-size: 12px; }
.col-pick { display: grid; gap: 2px; margin-bottom: 10px; }

/* gallery */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 14px; margin-top: 12px; }
.gal-card { display: grid; gap: 8px; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.gal-thumb { display: grid; place-items: center; aspect-ratio: 1200 / 630; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, rgba(124, 247, 212, .25), rgba(155, 140, 255, .25)); color: var(--ink); font-size: 40px; text-decoration: none; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gal-meta b { display: block; font-size: 15px; } .gal-meta small { color: var(--dim); font-size: 12px; }

/* ranking rules + publish extras */
dl.rules dt { font-weight: 700; margin-top: 12px; } dl.rules dd { margin: 3px 0 0; color: var(--dim); font-size: 14px; }
.pub-extras { display: grid; gap: 8px; }
.seo-group { margin-top: 14px; }
a.chip-btn { display: inline-flex; align-items: center; text-decoration: none; }

.lic-box .hint.bad { color: var(--warn, #ffb86b); }
.when-field { max-width: 280px; }
.svg-box { min-width: 0; overflow: hidden; grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.svg-box img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; display: block; }
.logo-card .ins-row { flex-wrap: wrap; }

/* ---- affiliate program */
.aff-hero { padding: 6px 0 4px; }
.aff-hero h3 { font-size: clamp(26px, 4.4vw, 40px); line-height: 1.08; letter-spacing: -.02em; margin: 4px 0 10px; }
.aff-hero p { color: var(--dim); max-width: 62ch; margin: 0; }
.aff-cta { justify-content: flex-start; margin-top: 16px; }
.aff-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin: 22px 0; }
.aff-step { position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; background: rgba(255, 255, 255, .03); }
.aff-step i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: var(--void); font-style: normal; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.aff-step b { display: block; margin-bottom: 4px; }
.aff-step p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
.aff-calc { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 0 0 18px; background: rgba(155, 123, 255, .06); }
.aff-calc .kicker { margin: 0; }
.aff-calc-out { font-size: clamp(28px, 5vw, 40px); line-height: 1.1; letter-spacing: -.02em; }
.aff-calc input[type=range] { width: 100%; accent-color: #9b7bff; }
.aff-calc small { color: var(--dim); }
.aff-who .kicker { margin-bottom: 4px; }
.aff-faq { padding: 8px 0; border-top: 1px solid var(--line); }
.aff-faq:first-of-type { border-top: 0; }
.aff-faq b { display: block; }
.aff-faq p { margin: 2px 0 0; color: var(--dim); font-size: 14px; }
.aff-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.aff-chips .chip-btn[aria-pressed="true"] { background: #fff; color: var(--void); border-color: #fff; }
.aff-camp-link { display: block; margin: 8px 0 4px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.aff-post { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 8px; background: rgba(255, 255, 255, .03); }
.aff-post p { margin: 0; font-size: 14px; color: var(--ink); }
.aff-banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 12px; margin: 0 0 12px; }
.aff-banner { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: rgba(255, 255, 255, .03); display: grid; gap: 8px; }
.aff-banner-thumb { display: flex; align-items: center; justify-content: center; width: 100%; height: 130px; padding: 8px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .3); cursor: zoom-in; }
.aff-banner-thumb img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.aff-banner-thumb:hover img, .aff-banner-thumb:focus-visible img { outline: 2px solid rgba(155, 123, 255, .7); outline-offset: 2px; }
.aff-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 16px; background: rgba(4, 4, 10, .93); color: var(--ink); }
.aff-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.aff-lightbox::backdrop { background: transparent; }
.aff-lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: 100%; }
.aff-lightbox img { display: block; max-width: min(100%, calc(100vw - 32px)); max-height: calc(100vh - 120px); width: auto; height: auto; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.aff-lightbox figcaption { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; color: var(--dim); font-size: 13px; }
.aff-lightbox a.chip-btn { text-decoration: none; display: inline-flex; align-items: center; }
.earn-card { flex-wrap: wrap; }
.earn-card > .aff-link-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.aff-code-edit { flex-basis: 100%; display: grid; gap: 8px; }
.earn-card > .aff-code-edit[hidden] { display: none; }
.aff-code-row { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(0, 0, 0, .28); overflow: hidden; }
.aff-code-row:focus-within { border-color: rgba(155, 123, 255, .8); }
.aff-code-pre { padding-left: 12px; color: var(--dim); font-size: 14px; white-space: nowrap; }
.aff-code-row input { flex: 1; min-width: 0; border: 0; background: none; padding: 10px 12px 10px 1px; color: var(--ink); font: inherit; font-size: 14px; outline: none; box-shadow: none; }
.aff-code-edit .aff-sp { flex: 1; }
.aff-code-edit .hint.bad:empty { display: none; }
.earn-card > .aff-link-acts { position: relative; }
.aff-tip { position: absolute; right: 0; top: calc(100% + 10px); z-index: 3; width: max-content; max-width: min(300px, calc(100vw - 48px)); display: flex; gap: 8px; align-items: flex-start; padding: 10px 10px 10px 12px; border-radius: 10px; background: #2a1f55; border: 1px solid rgba(155, 123, 255, .7); color: #fff; font-size: 13px; line-height: 1.35; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); animation: aff-tip-in .25s ease-out; }
.aff-tip::after { content: ''; position: absolute; bottom: 100%; left: var(--ax, calc(100% - 120px)); margin-left: -7px; border: 7px solid transparent; border-bottom-color: #2a1f55; }
@media (max-width: 560px) { .aff-tip { position: static; order: 3; flex-basis: 100%; width: auto; max-width: none; margin-top: 8px; } }
.aff-tip[hidden] { display: none; }
.aff-tip-x { flex: none; background: none; border: 0; color: #fff; font-size: 18px; line-height: 1; padding: 0 2px; cursor: pointer; opacity: .8; }
.aff-tip-x:hover, .aff-tip-x:focus-visible { opacity: 1; }
@keyframes aff-tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .aff-tip { animation: none; } }
.aff-code-wait { flex-basis: 100%; margin: 0; }
.aff-code-wait .mini { text-decoration: underline; }
.aff-promoter.on { border-color: rgba(124, 247, 212, .45); }
.aff-promoter b.grad { word-break: normal; overflow-wrap: break-word; }
.aff-promoter > div:first-child { flex: 1 1 260px; min-width: 0; }
.aff-pro-progress { display: grid; gap: 8px; justify-items: start; }
.aff-pro-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--dim); }
.aff-pro-steps li::before { content: '○ '; }
.aff-pro-steps li.done { color: var(--ink); }
.aff-pro-steps li.done::before { content: '✓ '; color: #7cf7d4; }
.aff-pro-note { margin: 0; }
.aff-review-box { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; }
.aff-review-box .ins-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.aff-review-box .aff-sp { flex: 1; }
.aff-payout { margin: 4px 0; display: grid; gap: 6px; }
.aff-payout.ins-row { display: flex; }
.aff-banner figcaption { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--dim); }
.aff-banner figcaption span { flex-basis: 100%; color: var(--ink); }
.aff-banner figcaption .mini { color: var(--dim); text-decoration: underline; }
a.mini { text-decoration: none; }
.hint.bad, p.bad { color: #ffb4b4; }
.admin-tools { gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }

/* ---- admin: generations → official templates */
.oc-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 12px; }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.oc-card { display: grid; gap: 8px; align-content: start; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: rgba(255, 255, 255, .03); transition: border-color .2s, background .2s; }
.oc-card.on { border-color: #9b7bff; background: rgba(155, 123, 255, .1); }
.oc-card.done { opacity: .6; }
.oc-pick { position: relative; display: block; cursor: pointer; }
.oc-pick input { position: absolute; top: 8px; left: 8px; z-index: 2; width: 20px; height: 20px; accent-color: #9b7bff; }
.oc-thumb { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #111; }
.oc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.oc-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.oc-card input:not([type]), .oc-card select { width: 100%; }
.oc-card small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oc-foot { position: sticky; bottom: -1px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 0 2px; margin-top: 12px; background: linear-gradient(transparent, var(--panel, #0b0b14) 30%); }

.aff-banner .mini, .aff-post .mini { padding: 8px 10px; min-height: 32px; display: inline-flex; align-items: center; }
#aff-btn[aria-busy="true"] { opacity: .6; }
@media (max-width: 420px) { .bar-right { gap: 5px; } .bar .pill.ghost { padding: 0 9px; } }
/* the smallest phones (320px): the signed-in header still fits, account button included */
@media (max-width: 360px) { .bar .pill.credits { padding: 0 10px; gap: 6px; } .bar .pill.credits .plus { display: none; } }
/* admins get one more button: on phones the Affiliate button makes room for it (the program is still in the footer and the Billing tab) */
@media (max-width: 420px) { .bar-right:has(#admin-btn:not([hidden])) #aff-btn { display: none; } }

/* ---- AI pictures, start from a link, invites */
.pic-out { margin-top: 12px; }
.pic-wait { display: flex; align-items: center; gap: 10px; padding: 26px; border: 1px dashed var(--line); border-radius: 14px; color: var(--dim); justify-content: center; }
.pic-wait .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: #9b7bff; animation: pic-spin .8s linear infinite; }
@keyframes pic-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pic-wait .spinner { animation: none; } }
.pic-result { margin: 0 0 10px; }
.pic-result img { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 14px; background: #111; }
.pic-result.tall img { max-height: 70vh; }
.pic-result figcaption { margin-top: 6px; }
.link-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; margin: 0 0 14px; }
.link-modes .lic-card { text-align: left; }
.invite-card { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.invite-card > div:first-child { flex: 1 1 280px; min-width: 0; }
.invite-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-seg { flex-wrap: wrap; } .chip-seg + .ins-label { margin-top: 14px; }
/* account: email, devices, data, delete */
.acct-card { display: grid; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); margin-bottom: 12px; }
.acct-card h4 { margin: 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-family: var(--mono); }
.acct-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .acct-row > div { display: grid; gap: 2px; margin-right: auto; } .acct-row small { color: var(--dim); font-size: 12px; }
.acct-form { display: grid; gap: 8px; } .acct-form input, .contact-form input, .contact-form select, .contact-form textarea, .acct-card input, .sp-mid input { min-width: 0; flex: 1; font: inherit; color: var(--ink); background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; }
.dev-list { list-style: none; margin: 0; padding: 0; display: grid; }
.dev-list li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); } .dev-list li:last-child { border-bottom: 0; }
.dev-list li > div { display: grid; gap: 2px; margin-right: auto; min-width: 0; } .dev-list small { color: var(--dim); font-size: 12px; } .dev-ic { font-size: 20px; }
.signin-methods .dev-ic { width: 26px; text-align: center; font-weight: 700; color: var(--dim); } .signin-methods li > .chip-btn { flex: none; }
.pw-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px; margin: 4px 0 8px; } .pw-fields input { width: 100%; min-width: 0; }
.danger-card { border-color: rgba(255, 107, 125, .3); background: rgba(255, 107, 125, .04); }
.chip-btn.danger { color: #ffb3bd; border-color: rgba(255, 107, 125, .45); } .chip-btn.danger:hover { color: #fff; background: rgba(255, 107, 125, .18); }
.go.danger { background: var(--bad); color: #fff; }
.ins-row.wrap { flex-wrap: wrap; } .row-end.start { justify-content: flex-start; align-items: center; flex-wrap: wrap; margin-top: 0; margin-bottom: 8px; }
/* help & support */
.contact-form { display: grid; gap: 8px; } .contact-form textarea { resize: vertical; }
.faq-item { border-bottom: 1px solid var(--line); padding: 8px 2px; } .faq-item summary { cursor: pointer; font-weight: 600; } .faq-item p { margin: 8px 0 4px; color: var(--dim); font-size: 14px; line-height: 1.55; }
.tk-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; } .tk-item summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.tk-item .ins-row { margin-top: 8px; } .tk-item textarea { flex: 1; min-width: 200px; font: inherit; color: var(--ink); background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; }
.tk-thread { display: grid; gap: 8px; margin: 10px 0; }
.tk-msg { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); max-width: 92%; }
.tk-msg.staff { justify-self: end; background: rgba(155, 140, 255, .1); border-color: rgba(155, 140, 255, .3); }
.tk-msg.note { justify-self: end; background: rgba(255, 207, 110, .08); border-color: rgba(255, 207, 110, .3); border-style: dashed; }
.tk-msg small { color: var(--dim); font-size: 11.5px; } .tk-msg p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
#sheet-body > textarea { width: 100%; box-sizing: border-box; font: inherit; color: var(--ink); background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; resize: vertical; }
/* admin: accounts + inbox lists */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.user-list { display: grid; gap: 6px; margin-top: 10px; }
.user-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; text-align: left; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: var(--ink); font: inherit; cursor: pointer; }
.user-row:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .05); } .user-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .user-row small { grid-column: 1 / -1; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* AI-picture the site */
.sp-list { display: grid; gap: 8px; margin: 12px 0; max-height: 52vh; overflow: auto; padding-right: 4px; }
.sp-row { display: grid; grid-template-columns: auto 72px 1fr minmax(0, 150px); gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.sp-now img, .sp-now .pic-ph, .sp-after img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--faint); font-size: 10px; }
.sp-after { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .sp-after img { width: 96px; height: 64px; }
.sp-mid { display: grid; gap: 4px; min-width: 0; } .sp-mid small { color: var(--faint); font-size: 11.5px; } .sp-keep { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--dim); }
@media (max-width: 640px) { .sp-row { grid-template-columns: auto 56px 1fr; } .sp-after { grid-column: 2 / -1; } }
/* forms & bookings inbox */
.fe-list { display: grid; gap: 6px; margin-top: 10px; }
.fe-item { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .025); overflow: hidden; }
.fe-row { width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 11px 13px; background: none; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.fe-row:hover { background: rgba(255, 255, 255, .04); } .fe-row.unread b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-radius: 50%; background: var(--violet); vertical-align: middle; }
.fe-row > div { display: grid; gap: 2px; min-width: 0; } .fe-row small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fe-ic { font-size: 18px; } .fe-when { color: var(--faint) !important; }
.fe-detail { padding: 4px 14px 14px 44px; display: grid; gap: 10px; }
.fe-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 14px; } .fe-dl dt { color: var(--dim); } .fe-dl dd { margin: 0; overflow-wrap: anywhere; }
.fe-msg { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .04); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; }
.day-picks button { min-width: 46px; } .ins-field select, .ins-field input[type=time] { font: inherit; color: var(--ink); background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; }
.acct-card textarea { font: inherit; color: var(--ink); background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; resize: vertical; }
@media (max-width: 560px) { .fe-row { grid-template-columns: auto 1fr auto; } .fe-when { display: none; } .fe-detail { padding-left: 14px; } }
/* languages */
.lang-row { padding: 8px 0; border-bottom: 1px solid var(--line); } .lang-row:last-child { border-bottom: 0; }
.acct-card select { font: inherit; color: var(--ink); background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; }
/* money dashboard */
.stat-tile.neg b { color: var(--bad); }
.mchart-wrap { position: relative; } .mchart { width: 100%; height: auto; display: block; }
.mchart .grid { stroke: rgba(255, 255, 255, .08); stroke-width: 1; } .mchart .axis { fill: var(--faint); font: 11px var(--mono); }
.mchart .hit { cursor: crosshair; } .mchart .hit:hover { fill: rgba(255, 255, 255, .05); }
.mlegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin-bottom: 6px; } .mlegend i, .mtip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mtip { position: absolute; top: 24px; display: grid; gap: 3px; padding: 8px 10px; border-radius: 10px; background: #101425; border: 1px solid var(--line-2); font-size: 12px; color: var(--ink); pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); white-space: nowrap; }
.money-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .money-cols .acct-card { margin-bottom: 0; }
.money-cols .ledger li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* feature tour */
.tour { position: fixed; inset: 0; z-index: 2147483600; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(3, 4, 10, .62), 0 0 0 2px var(--mint); transition: all .25s var(--ease, ease); pointer-events: none; }
.tour-card { position: fixed; box-sizing: border-box; display: grid; gap: 6px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; overscroll-behavior: contain; padding: 16px 16px 14px; border-radius: 16px; background: #0f1222; border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
/* the arrow sits on the card edge facing the highlighted part (data-side = where the card is) */
.tour-arrow { position: fixed; z-index: 1; width: 14px; height: 14px; box-sizing: border-box; background: #0f1222; border: 1px solid transparent; transform: rotate(45deg); pointer-events: none; }
.tour-arrow[data-side="bottom"] { border-top-color: var(--line-2); border-left-color: var(--line-2); }
.tour-arrow[data-side="top"] { border-bottom-color: var(--line-2); border-right-color: var(--line-2); }
.tour-arrow[data-side="right"] { border-bottom-color: var(--line-2); border-left-color: var(--line-2); }
.tour-arrow[data-side="left"] { border-top-color: var(--line-2); border-right-color: var(--line-2); }
.tour-card b { font-size: 16px; } .tour-card p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; } .tour-n { color: var(--mint); font: 700 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.tour-nav { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 6px; } .tour-nav .mini { margin-right: auto; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }

.update-pill { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 2147483001; display: flex; gap: 12px; align-items: center; padding: 8px 8px 8px 16px; border-radius: 999px; background: rgba(12, 14, 26, .96); border: 1px solid var(--line); color: var(--ink); font-size: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }
.update-pill button { font: 700 13px/1 system-ui; border: 0; border-radius: 999px; padding: 9px 14px; background: #fff; color: #07070c; cursor: pointer; }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 8px 0 12px; }
.fx-cat { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.fx-cat small { grid-column: 2; color: var(--faint); font-size: 12px; }
.fx-num { width: 64px; margin-left: 6px; }
.fx-opts { gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.fx-jobs b.bad { color: #ff9a8f; }
dialog.sheet.wide.tpl-sheet { width: min(1400px, calc(100vw - 32px)); }
.tpl-sheet .tpl-detail { grid-template-columns: minmax(0, 2.4fr) minmax(300px, 1fr); }
.tpl-sheet .tpl-view { height: min(72vh, 760px); }
@media (max-width: 860px) { .tpl-sheet .tpl-detail { grid-template-columns: 1fr; } .tpl-sheet .tpl-view { height: 62vh; } }
/* Store shelves: the first template big on the left (two rows tall), four more in a 2×2 grid beside it */
@media (min-width: 900px) {
  .shelf-row { grid-auto-flow: row; grid-template-columns: 2fr 1fr 1fr; grid-auto-columns: auto; overflow: visible; }
  .shelf-row > .tpl-card:first-child { grid-row: span 2; align-content: start; }
  .shelf-row > .tpl-card:first-child .tpl-cover { aspect-ratio: 16 / 10; }
  .shelf-row > .tpl-card:first-child .tpl-meta b { font-size: 18px; }
}
.bar .pill.ghost.on { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }
/* the build bar sits above the canvas (nothing may cover its text), with Stop at its right end */
.progress-row { position: relative; z-index: 6; display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.progress-row > .progress { flex: 1; min-width: 0; margin: 0; }
.ed4 .progress-row { margin: 0; }
.progress-stop { flex: none; padding: 6px 12px; }
.qa-report .chip-btn, #qa-report .chip-btn { margin-left: 10px; }

/* Welcome offer (28 Oct 2026, owner): signed-out visitors see it after about 10 seconds, once per browser session. */
dialog.sheet.welcome-sheet { width: min(420px, calc(100vw - 24px)); overflow: hidden; background: rgba(12, 14, 24, .97); }
dialog.welcome-sheet::backdrop { background: rgba(4, 5, 10, .55); backdrop-filter: blur(4px); }
dialog.welcome-sheet[open] { animation: welcome-in .45s var(--ease); }
@keyframes welcome-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.welcome { position: relative; padding: 34px 28px 28px; text-align: center; }
.welcome::before { content: ""; position: absolute; inset: -40% -20% auto; height: 220px; background: radial-gradient(closest-side, rgba(124, 247, 212, .28), transparent); pointer-events: none; }
.welcome-badge { position: relative; display: inline-grid; place-items: center; width: 108px; height: 108px; margin: 4px auto 18px; border-radius: 50%; background: var(--grad); color: #05060c; box-shadow: 0 0 60px rgba(155, 140, 255, .45); }
.welcome-badge b { font: 800 40px/1 var(--sans); letter-spacing: -.03em; margin-top: 18px; }
.welcome-badge span { font: 700 12px/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 22px; }
.welcome h2 { position: relative; margin: 0 0 10px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; }
.welcome-n { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-sub { position: relative; margin: 0 0 22px; color: var(--dim); font-size: 15px; }
.welcome-go { width: 100%; justify-content: center; height: 50px; font-size: 16px; }
@media (prefers-reduced-motion: reduce) { dialog.welcome-sheet[open] { animation: none; } }
