:root {
  --paper: #F3EFE6;
  --paper-2: #EBE5D8;
  --ink: #16130F;
  --ink-2: #4A443D;
  --muted: #7A7268;
  --line: #D8D0C1;
  --red: #E4442B;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before { /* paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

.top { padding: 22px clamp(20px, 4vw, 56px); display: flex; align-items: center; }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 500 15px var(--sans); letter-spacing: .01em; }
.mark .dot { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, var(--paper) 0 28%, var(--red) 30%); }

main { padding: 0 clamp(20px, 4vw, 56px) 96px; }
.view { animation: enter .6s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

/* ---------- ask ---------- */
#ask { max-width: 1180px; margin: clamp(32px, 9vh, 120px) auto 0; }
.hero { font: 400 clamp(60px, 10.5vw, 168px)/.86 var(--serif); letter-spacing: -.025em; margin: 0 0 clamp(36px, 6vh, 64px); }
.hero .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero .line > * { display: inline-block; animation: rise 1s var(--ease) both; }
.hero .line:nth-child(2) > * { animation-delay: .12s; }
.hero em { font-style: italic; color: var(--ink); }
.hero em::after { content: ""; display: inline-block; width: .14em; height: .14em; border-radius: 50%; background: var(--red); margin-left: .04em; }
@keyframes rise { from { transform: translateY(105%); } }

.ask { display: flex; align-items: flex-end; gap: 20px; border-bottom: 1.5px solid var(--ink); padding-bottom: 14px; max-width: 980px; }
.ask textarea {
  flex: 1; resize: none; border: 0; background: transparent; outline: none; color: var(--ink);
  font: 400 clamp(22px, 2.6vw, 34px)/1.25 var(--serif); padding: 0; max-height: 40vh; overflow-y: hidden;
}
.ask textarea::placeholder { color: #A39A8E; font-style: italic; }
.go {
  flex: none; border: 0; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 14px 22px;
  font: 500 15px var(--sans); display: inline-flex; gap: 10px; align-items: center; transition: background .25s, transform .25s var(--ease);
}
.go:hover:not(:disabled) { background: var(--red); transform: translateX(3px); }
.keynote { color: var(--red); font-size: 14px; margin: 14px 0 0; }
.keynote code { font: 13px var(--mono); background: var(--paper-2); padding: 1px 6px; }

.translate { margin: 28px 0 0; font: 14px var(--mono); color: var(--muted); display: flex; gap: 14px; align-items: baseline; min-height: 22px; flex-wrap: wrap; }
.translate .from { color: var(--ink); font: italic 22px var(--serif); }
.translate .arrow { color: var(--red); }
.translate span { transition: opacity .5s, transform .5s var(--ease); }
.translate.out span { opacity: 0; transform: translateY(-6px); }

.tries { margin-top: clamp(36px, 7vh, 72px); color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; }
.tries button { border: 0; background: none; padding: 4px 8px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.tries button:hover { color: var(--red); text-decoration-color: var(--red); }

/* ---------- work ---------- */
#work { max-width: 1440px; margin: 8px auto 0; }
.said { display: flex; align-items: baseline; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.said-text { margin: 0; font: italic 400 clamp(24px, 2.8vw, 40px)/1.15 var(--serif); flex: 1; }
.said-text::before { content: "“"; color: var(--red); }
.said-text::after { content: "”"; color: var(--red); }
.said.thinking .said-text {
  background: linear-gradient(90deg, var(--ink) 0 40%, #B8AE9F 50%, var(--ink) 60% 100%) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sweep 2.2s linear infinite;
}
@keyframes sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
.link { border: 0; background: none; padding: 0; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.link:hover { color: var(--red); }

.heard { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 18px 0 8px; font-size: 14px; color: var(--muted); }
.heard:empty { display: none; }
.heard .group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.heard .label { margin-right: 4px; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: 999px; padding: 3px 11px; color: var(--ink); background: transparent; font-size: 13.5px; line-height: 1.4; }
.chip.assumed { border-style: dashed; border-color: var(--muted); color: var(--ink-2); }
.chip.solid { background: var(--ink); color: var(--paper); }
button.chip { transition: background .2s, color .2s, border-color .2s; }
button.chip:hover { border-color: var(--red); color: var(--red); }
button.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.asks { display: grid; gap: 12px; }
.ask-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--ink); }
.ask-q .q { font: italic 19px var(--serif); margin-right: 6px; }
.ask-own { border: 0; border-bottom: 1px solid var(--line); background: none; padding: 3px 2px; width: 150px; font: 13.5px var(--sans); color: var(--ink); transition: border-color .2s, width .3s var(--ease); }
.ask-own:focus { outline: none; border-color: var(--ink); width: 220px; }
.ask-own::placeholder { color: var(--muted); }
.ask-go { display: flex; align-items: center; gap: 14px; }
.ask-go[hidden] { display: none; }
.ask-left { font: 12px var(--mono); color: var(--muted); }

.status { font: 13px var(--mono); color: var(--muted); margin: 28px 0 0; min-height: 20px; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 10px; animation: pulse 1.2s ease-in-out infinite; vertical-align: 1px; }
@keyframes pulse { 50% { opacity: .25; } }

/* cards */
.readings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.2vw, 36px); margin-top: 26px; align-items: start; }
.readings.tall { max-width: 1180px; }
.card { display: flex; flex-direction: column; gap: 16px; animation: enter .7s var(--ease) both; }
.card:nth-child(2) { animation-delay: .08s; }
.card:nth-child(3) { animation-delay: .16s; }
.card .num { font: 12px var(--mono); color: var(--muted); letter-spacing: .08em; }
.card h3 { font: 400 clamp(26px, 2.3vw, 36px)/1 var(--serif); margin: 4px 0 8px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .why { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.meta-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.dots { display: flex; }
.dots i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--paper); margin-left: -5px; }
.dots i:first-child { margin-left: 0; }
.fonts { font: 12px var(--mono); color: var(--muted); }
.pick { align-self: flex-start; border: 0; background: none; padding: 6px 0; font: 500 15px var(--sans); border-bottom: 1.5px solid var(--ink); transition: color .2s, border-color .2s, gap .3s var(--ease); display: inline-flex; gap: 8px; }
.pick:hover:not(:disabled) { color: var(--red); border-color: var(--red); gap: 14px; }

.none { display: flex; gap: 14px; align-items: flex-end; margin-top: 44px; max-width: 760px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.none input { flex: 1; border: 0; background: none; outline: none; font: italic 20px var(--serif); color: var(--ink); padding: 4px 0; }
.none input::placeholder { color: #A39A8E; }
.none-done { margin: 44px 0 0; max-width: 620px; font: italic 18px/1.4 var(--serif); color: var(--ink-2); }

/* every round of directions stays: latest on top, earlier ones below */
.round-h { margin: 34px 0 0; font: 500 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.round .readings { margin-top: 14px; }
.earlier { margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line); }
.earlier-h { margin: 0; font: 400 30px/1.1 var(--serif); }
.earlier .round { opacity: .92; }
.retry-row { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.retry-row .status { margin: 0; }
.retry-row .status::before { display: none; }

/* preview frames */
.frame {
  position: relative; width: 100%; aspect-ratio: var(--w) / var(--h); overflow: hidden; background: var(--paper-2);
  border: 1px solid rgba(22, 19, 15, .14); border-radius: 3px; cursor: zoom-in;
}
.frame.phone { border-radius: 34px; border: 8px solid var(--ink); }
.frame iframe {
  position: absolute; left: 0; top: 0; border: 0; background: #fff;
  width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); transform: scale(var(--s, .3)); transform-origin: 0 0;
  opacity: 0; transition: opacity .5s; pointer-events: none;
}
.frame iframe.on { opacity: 1; }
.frame .shimmer {
  position: absolute; inset: 0; transition: opacity .6s;
  background: linear-gradient(110deg, var(--paper-2) 30%, #F7F3EB 50%, var(--paper-2) 70%) 0 0 / 250% 100%; animation: sweep 1.8s linear infinite;
}
.frame.has-paint .shimmer { opacity: 0; }
.frame .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(22, 19, 15, .08); transition: opacity .6s; }
.frame .progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .6s var(--ease); }
.frame.done .progress { opacity: 0; }
.frame .err { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; font-size: 14px; color: var(--ink-2); background: var(--paper-2); }
.frame .err button { margin-top: 10px; }

/* ---------- focus ---------- */
.focus { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: clamp(24px, 3.4vw, 56px); margin-top: 26px; align-items: start; }
.focus.narrow { grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); }
.focus .viewer { position: sticky; top: 20px; }
.focus .viewer.portrait { max-width: 560px; justify-self: center; width: 100%; }
.focus .viewer.app { max-width: 380px; justify-self: center; width: 100%; }
.panel h2 { font: 400 clamp(36px, 3.6vw, 56px)/.95 var(--serif); margin: 10px 0 12px; letter-spacing: -.015em; }
.panel .plain { font-size: 16px; color: var(--ink-2); margin: 0 0 22px; }
.panel h4 { font: 500 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.terms { display: grid; grid-template-columns: 92px 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.terms dt { color: var(--muted); font: 12px/1.9 var(--mono); }
.terms dd { margin: 0; color: var(--ink); }
.terms dd.sig { font: italic 19px/1.3 var(--serif); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.sw { display: flex; flex-direction: column; gap: 6px; width: 64px; font-size: 11.5px; color: var(--ink-2); }
.sw label { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 1px solid rgba(22, 19, 15, .15); cursor: pointer; transition: transform .25s var(--ease); }
.sw label:hover { transform: scale(1.06); }
.sw input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.sw .hex { font: 10.5px var(--mono); color: var(--muted); }
.sw.edited label { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--red); }
.tweaks { display: flex; flex-wrap: wrap; gap: 7px; }
.note { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; resize: none; font: italic 19px/1.35 var(--serif); color: var(--ink); padding: 6px 0; margin-top: 14px; overflow: hidden; }
.note::placeholder { color: #A39A8E; }
.actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.ghost { border: 1.5px solid var(--ink); background: none; border-radius: 999px; padding: 12px 20px; font: 500 15px var(--sans); transition: background .2s, color .2s; }
.ghost:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.changed { font-size: 13.5px; color: var(--ink-2); margin: 14px 0 0; padding: 0; list-style: none; }
.changed li::before { content: "↳ "; color: var(--red); }

/* ---------- output ---------- */
.out { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.6fr); gap: clamp(24px, 3.4vw, 56px); margin-top: 26px; align-items: start; }
.out .side { position: sticky; top: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.out .side .frame { align-self: stretch; }
.out .side h3 { font: 400 30px/1 var(--serif); margin: 6px 0 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab { border: 0; background: none; padding: 12px 16px 13px; font: 500 15px var(--sans); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.tab:hover { color: var(--ink); }
.prompt-box { position: relative; background: var(--ink); color: #EFE9DE; border-radius: 4px; margin-top: 18px; }
.prompt-box pre { margin: 0; padding: 28px 30px 30px; font: 13.5px/1.7 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 62vh; overflow: auto; }
.copy { position: absolute; top: 14px; right: 14px; border: 1px solid rgba(239, 233, 222, .3); background: var(--ink); color: #EFE9DE; border-radius: 999px; padding: 7px 15px; font: 500 13px var(--sans); transition: background .2s, border-color .2s; }
.copy:hover { background: var(--red); border-color: var(--red); }
.kit { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 40px; margin-top: 10px; }
.kit .full { grid-column: 1 / -1; }
.kit-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.kc { border: 0; padding: 0; background: none; text-align: left; width: 118px; }
.kc span { display: block; }
.kc i { display: block; height: 64px; border-radius: 3px; border: 1px solid rgba(22, 19, 15, .12); margin-bottom: 7px; transition: transform .25s var(--ease); }
.kc:hover i { transform: translateY(-3px); }
.kc b { display: block; font: 500 13px var(--sans); }
.kc span { font: 11px var(--mono); color: var(--muted); }
.font-row { display: flex; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.font-row .aa { font-size: 44px; line-height: 1; width: 70px; flex: none; }
.font-row b { font-weight: 500; display: block; }
.font-row span { color: var(--muted); font-size: 13.5px; }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.avoid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.avoid li { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; font-size: 14.5px; }

/* ---------- skeleton while understanding ---------- */
.ghost-card .frame { cursor: default; }
.ghost-card .bar { height: 14px; background: var(--paper-2); border-radius: 2px; }
.ghost-card .bar.t { height: 30px; width: 60%; margin-bottom: 10px; }
.ghost-card .bar.s { width: 85%; margin-top: 8px; }

/* ---------- lightbox, toast ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(22, 19, 15, .88); display: grid; place-items: center; animation: fade .3s both; }
@keyframes fade { from { opacity: 0; } }
.lightbox .close { position: absolute; top: 14px; right: 20px; border: 0; background: none; color: var(--paper); font: 300 40px/1 var(--sans); }
.lb-frame { position: relative; overflow: hidden; border-radius: 3px; background: #fff; }
.lb-frame iframe { border: 0; transform-origin: 0 0; position: absolute; left: 0; top: 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--paper); padding: 11px 20px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .3s, transform .3s var(--ease); z-index: 60; pointer-events: none; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }

@media (max-width: 980px) {
  .readings { grid-template-columns: 1fr; max-width: 620px; }
  .focus, .focus.narrow, .out { grid-template-columns: 1fr; }
  .focus .viewer, .out .side { position: static; }
  .kit { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* the large preview is live: hover and cursor effects work inside it */
.viewer .frame { cursor: default; }
.viewer .frame iframe.on { pointer-events: auto; z-index: 1; }
.expand { position: absolute; top: 10px; right: 10px; z-index: 2; border: 0; border-radius: 999px; background: rgba(22, 19, 15, .78); color: var(--paper); font: 500 12.5px var(--sans); padding: 6px 12px; opacity: 0; transition: opacity .25s; }
.viewer:hover .expand, .expand:focus-visible { opacity: 1; }
.viewer { position: relative; }

/* ---------- editing the design ---------- */
.vbar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.vbar .hint { font-size: 13px; color: var(--muted); flex: 1; }
.vbar .save { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 5px 16px; font: 500 13px var(--sans); transition: background .2s, color .2s, border-color .2s, opacity .2s; }
.vbar .save:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; }
.vbar .save:disabled { background: none; color: var(--muted); border-color: var(--line); cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; padding: 2px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 5px 13px; font: 500 13px var(--sans); color: var(--ink-2); transition: background .2s, color .2s; }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg button:not(.on):hover { color: var(--red); }
.edits { list-style: none; padding: 0; margin: 12px 0 0; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.edits li::before { content: "✓ "; color: var(--red); }
.panel h4 .sub { text-transform: none; letter-spacing: 0; }
.mc { display: flex; flex-direction: column; gap: 8px; }
.mc-row { display: flex; align-items: center; gap: 14px; }
.mc-row > span { width: 70px; font: 12px var(--mono); color: var(--muted); }
.mc-row .seg { border-color: var(--line); }

.pop {
  position: absolute; z-index: 40; width: 344px; background: var(--paper); border: 1px solid var(--ink); border-radius: 6px;
  box-shadow: 8px 8px 0 rgba(22, 19, 15, .12); padding: 14px; display: flex; flex-direction: column; gap: 10px; animation: enter .25s var(--ease) both; font-size: 13px;
}
.pop.working { opacity: .75; pointer-events: none; }
.pop-h { display: flex; align-items: baseline; gap: 8px; }
.pop-h b { font: 400 22px/1 var(--serif); }
.pop-h span { color: var(--muted); font: 11.5px var(--mono); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); padding: 0 2px; }
.pop-x:hover { color: var(--red); }
.pop-main { border: 0; background: var(--ink); color: var(--paper); border-radius: 999px; padding: 9px 14px; font: 500 13.5px var(--sans); }
.pop-main:hover { background: var(--red); }
.pop-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pop-row > span { width: 42px; color: var(--muted); font: 11.5px var(--mono); }
.pb { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 11px; font: 500 12.5px var(--sans); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb:hover { border-color: var(--red); color: var(--red); }
.pc { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(22, 19, 15, .2); padding: 0; transition: transform .2s var(--ease); }
.pc:hover { transform: scale(1.18); }
.pc.pc-none { background: linear-gradient(135deg, transparent 45%, var(--red) 45% 55%, transparent 55%), var(--paper); }
.pop-ai { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pop-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pop-chips .chip { font-size: 12px; padding: 2px 9px; }
.pop-ai form { display: flex; gap: 6px; }
.pop-ai input { flex: 1; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; font: italic 15px var(--serif); padding: 4px 0; color: var(--ink); }

.pop-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 -14px; padding: 0 10px; }
.pop-tabs button { border: 0; background: none; padding: 7px 9px 8px; font: 500 12.5px var(--sans); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pop-tabs button.on { color: var(--ink); border-bottom-color: var(--red); }
.pop-page { display: flex; flex-direction: column; gap: 9px; }
.seg.mini { border-color: var(--line); }
.seg.mini button { padding: 3px 10px; font-size: 12px; }
.pc.custom { position: relative; overflow: hidden; background: conic-gradient(#e4442b, #f2b21b, #2f7a4a, #2b6bd8, #9b3fd1, #e4442b); cursor: pointer; display: inline-block; }
.pc.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pop-note { margin: 0; color: var(--muted); font-size: 12px; }

/* Open-model renders of image prompts */
.render { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 22px; margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, .35); }
.render-fig { margin: 0; border-radius: 4px; overflow: hidden; background: #E8E2D6; max-height: 440px; }
.render-fig img { width: 100%; height: 100%; object-fit: cover; display: block; animation: enter .5s var(--ease) both; }
.render-wait { height: 100%; display: grid; place-items: center; padding: 18px; text-align: center; font: italic 16px/1.35 var(--serif); color: var(--ink-2); position: relative; }
.render-wait.on::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .6) 50%, transparent 70%); background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.render-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.render-side .kh { margin: 0; }
.render-model { margin: 0; font: 400 26px/1.1 var(--serif); }
.render-model span { display: block; margin-top: 5px; font: 11.5px var(--mono); color: var(--muted); }
.recipe { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font: 12.5px var(--mono); }
.recipe dt { color: var(--muted); }
.recipe dd { margin: 0; }
.render-note { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.render-err { margin: 0; font-size: 13.5px; color: var(--red); }
.render-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.render-actions .pb { max-width: none; padding: 6px 14px; }
.render-actions [data-r="go"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.render-actions [data-r="go"]:hover:not(:disabled) { background: var(--red); border-color: var(--red); color: #fff; }
a.pb { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
@media (max-width: 720px) { .render { grid-template-columns: 1fr; } }
