/* คัดลอกจาก flash_studio/static/app.css (sed -n 8,139p · 274,420p · 554,620p · 681,702p) 21 ต.ค. 69 — ห้ามแก้ที่นี่ ทับใน noodee_chat.css */
:root {
  color-scheme: light;
  --font: "Noto Serif Thai", Georgia, "Times New Roman", serif;
  --paper: #f8f7f4;       /* page */
  --side: #efede7;        /* sidebar */
  --card: #ffffff;        /* surfaces */
  --raised: #ffffff;      /* message box, menus */
  --ink: #1f1e1c;
  --muted: #73706a;
  --line: #e3e0d8;
  --soft: #f0eee8;        /* fields, quiet buttons */
  --hover: #e8e5dd;
  --accent: #d9774c;      /* send / main action */
  --accent-ink: #ffffff;
  --accent-soft: #fbeee6;
  --link: #b8572d;
  --user: #ece9e1;        /* the person's messages */
  --ok: #2f7d4f;  --ok-bg: #e4f2e8;
  --bad: #c2372f; --bad-bg: #fbe7e4;
  --run: #4a5bbf; --run-bg: #e8ebfa;
  --warn: #9a5b12; --warn-bg: #fbefdc;
  --radius: 16px;
  --r-ctl: 12px;
  --shadow: 0 1px 2px rgba(30, 25, 15, .05), 0 4px 16px rgba(30, 25, 15, .05);
  --shadow-pop: 0 8px 32px rgba(30, 25, 15, .16);
  --side-w: 272px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #262624; --side: #1f1e1d; --card: #30302e; --raised: #30302e;
    --ink: #eceae4; --muted: #a29f97; --line: #3f3e3b; --soft: #393936; --hover: #45443f;
    --accent: #d9774c; --accent-ink: #ffffff; --accent-soft: #4a3228; --link: #eb9b75; --user: #3a3936;
    --ok: #7fd3a0; --ok-bg: #203a2a; --bad: #ff8f86; --bad-bg: #4a2522; --run: #a9b4ff; --run-bg: #2b3050; --warn: #f2c27e; --warn-bg: #45351c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-pop: 0 10px 36px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #262624; --side: #1f1e1d; --card: #30302e; --raised: #30302e;
  --ink: #eceae4; --muted: #a29f97; --line: #3f3e3b; --soft: #393936; --hover: #45443f;
  --accent: #d9774c; --accent-ink: #ffffff; --accent-soft: #4a3228; --link: #eb9b75; --user: #3a3936;
  --ok: #7fd3a0; --ok-bg: #203a2a; --bad: #ff8f86; --bad-bg: #4a2522; --run: #a9b4ff; --run-bg: #2b3050; --warn: #f2c27e; --warn-bg: #45351c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-pop: 0 10px 36px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--font); }
h1, h2 { margin: 0 0 .4em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.note { color: var(--muted); font-size: .88rem; margin: .5em 0 0; }
.err { color: var(--bad); }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
svg { flex: 0 0 auto; }
.icon svg, .tabs svg, .new-clip svg, .tool svg, .send svg, .profile svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.logo { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }

/* ------------------------------------------------------------ controls */
label { display: block; margin: 12px 0; font-weight: 700; font-size: .92rem; }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; max-width: 100%; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 400; }
label > input:not([type=checkbox]):not([type=range]), label > select, label > textarea { display: block; width: 100%; margin-top: 6px; font-weight: 400; }
label.inline > select { display: inline-block; width: auto; min-width: 0; max-width: 100%; margin: 0; }
input, select, textarea, button {
  font: inherit; color: inherit; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); padding: 9px 13px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--muted); box-shadow: 0 0 0 3px var(--soft); }
textarea { width: 100%; resize: vertical; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
input[type=range] { width: 100%; accent-color: var(--accent); padding: 0; border: none; background: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { cursor: pointer; font-weight: 700; background: var(--card); transition: background .12s, transform .08s; }
:where(button:hover:not(:disabled)) { background: var(--hover); }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary, a.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
:where(button.primary:hover:not(:disabled)) { background: var(--accent); filter: brightness(1.06); }
button.ghost { background: transparent; }
button.small { padding: 5px 11px; font-size: .86rem; }
button.icon, a.icon { width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; border: none; background: transparent; border-radius: 10px; color: inherit; }
button.danger { color: var(--bad); }
button.wide { width: 100%; margin-top: 8px; }
a.btn-link { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: var(--r-ctl); text-decoration: none; font-weight: 700; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 13px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: .88rem; font-weight: 400; text-decoration: none; white-space: nowrap;
}
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip small { opacity: .7; }
details { margin-top: 8px; }
summary { cursor: pointer; color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row + .row { margin-top: 10px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.steps { margin: 6px 0 10px; padding-left: 1.3em; }
.steps li { margin: 4px 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; }
.errors { margin: 10px 0 0; padding: 12px 16px 12px 32px; background: var(--bad-bg); border-radius: 12px; color: var(--bad); }
.success { margin: 10px 0 0; padding: 12px 16px; background: var(--ok-bg); border-radius: 12px; color: var(--ok); font-weight: 700; }
.badge { font-size: .76rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; background: var(--soft); color: var(--muted); }
.badge.running { color: var(--run); background: var(--run-bg); }
.badge.done, .badge.APPROVED, .badge.PUBLISHED { color: var(--ok); background: var(--ok-bg); }
.badge.error, .badge.REJECTED, .badge.BROKEN { color: var(--bad); background: var(--bad-bg); }
.badge.DRAFT { color: var(--warn); background: var(--warn-bg); }
.badge.REVIEW { color: var(--run); background: var(--run-bg); }

/* ------------------------------------------------------------ icons */
/* Line icons (sprite in index.html, ico() in app.js): the app uses these everywhere; emoji only appear inside chat messages. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i .f, .sprite .f { fill: currentColor; stroke: none; }
h2 > svg.i { width: 1.05em; height: 1.05em; margin-right: 4px; color: var(--muted); vertical-align: -.15em; }
button > svg.i, a > svg.i, summary > svg.i { margin-right: 2px; }
.tool-btn > svg.i, .edit-msg > svg.i, .icon > svg.i, .stage-nav > svg.i, .rate-btn > svg.i { margin: 0; }
.steps i svg.i { width: 13px; height: 13px; stroke-width: 3; }
.link-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.link-card > svg.i { width: 26px; height: 26px; color: var(--accent); }
.link-card > svg.i:last-child { width: 20px; height: 20px; margin-left: auto; color: var(--muted); }
.link-card span { display: flex; flex-direction: column; }
.link-card:hover { background: var(--hover); }
.sb-clear { min-height: 0; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: none; border-radius: 8px; background: transparent; color: var(--muted); opacity: .7; }
.sb-clear:hover, .sb-clear:focus-visible { opacity: 1; background: var(--hover); color: var(--bad); }
  .top .grow { display: none; }
}
@media (min-width: 1024px) { .new-icon { display: none; } }

/* ------------------------------------------------------------ chat */
/* The create page is a fixed frame: step bar (top) · conversation (the only part that scrolls) · message box (bottom). */
body[data-tab="create"] main { overflow: hidden; padding: 0; }
.chat { display: flex; flex-direction: column; height: 100%; min-height: 0; max-width: none !important; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 28px 0; -webkit-overflow-scrolling: touch; }
.chat-col { max-width: 780px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; }
.chat > .steps, .chat > .composer-wrap { width: min(780px, calc(100% - 56px)); margin-left: auto; margin-right: auto; }
.greet { display: none; text-align: center; }
.greet .logo { width: 52px; height: 52px; padding: 7px; border-radius: 16px; color: var(--accent); background: var(--card); border: 1px solid var(--line); }
.greet h1 { font-size: 2rem; font-weight: 400; line-height: 1.35; margin: 18px 0 26px; text-wrap: balance; }
.chat.is-empty .greet { padding-top: 6vh; }
.chat.is-empty .chat-scroll { overflow-y: hidden; }
@media (max-height: 560px) { .chat.is-empty .chat-scroll { overflow-y: auto; } .chat.is-empty .greet { padding-top: 2vh; } }  /* the welcome sits at the top of the board, the message box at the bottom */
.greet h1 span { font-weight: 700; }
.chat.is-empty { justify-content: flex-start; }
.chat.is-empty .greet { display: block; }
.chat.is-empty .thread { display: none; }
.chat:not(.is-empty) .ideas { display: none; }
.thread { flex: 1; display: flex; flex-direction: column; gap: 22px; padding: 12px 0 20px; }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble { max-width: 85%; padding: 10px 16px; border-radius: 20px 20px 6px 20px; background: var(--user); white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .bubble small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.msg.user details pre { max-height: 200px; }
.msg.studio { display: flex; gap: 12px; align-items: flex-start; }
.bot { flex: 0 0 auto; width: 30px; height: 30px; padding: 4px; border-radius: 9px; background: var(--card); border: 1px solid var(--line); color: var(--accent); }
.bot svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; }
.msg.studio .body { flex: 1; min-width: 0; padding-top: 1px; font-family: var(--font); font-size: 1.04rem; line-height: 1.8; }
.msg.studio .body p { margin: 0 0 .7em; }
.msg.studio .body ol, .msg.studio .body ul:not(.progress) { margin: 0 0 .8em; padding-left: 1.4em; }
.msg.studio .body li { margin: .2em 0; }
.msg.studio .body b { font-weight: 700; }
.msg.studio .body button, .msg.studio .body .act, .msg.studio .body small, .msg.studio .body .muted, .msg.studio .body pre, .msg.studio .body summary { font-family: var(--font); }
.msg.studio .body > :first-child, .msg.studio .live > :first-child, .msg.studio .intro > :first-child { margin-top: 0; }
.after { transition: opacity .25s; }
.streaming .after { opacity: 0; pointer-events: none; }
.msg.studio video { display: block; width: auto; max-width: 100%; max-height: 520px; margin: 8px 0; border-radius: 14px; background: #000; }
.msg pre, .steps-log pre { margin: 8px 0 0; max-height: 260px; overflow: auto; background: var(--soft); border-radius: 10px; padding: 10px 12px; font: 13px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg-actions button, .msg-actions .act {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: .86rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); text-decoration: none; font-weight: 700;
}
.msg-actions button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

/* tappable answers to the studio's questions (like the option list in Claude's questions) */
.choices { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; max-width: 520px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; text-align: left; font-weight: 400;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
}
.choice .num { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--soft); font-size: .8rem; font-weight: 700; color: var(--muted); }
.choice .txt { display: flex; flex-direction: column; line-height: 1.35; }
.choice .txt b { font-weight: 700; }
.choice .txt small { color: var(--muted); font-size: .8rem; }
.choice:hover:not(:disabled) { border-color: var(--muted); background: var(--card); }
.choice.picked { border-color: var(--accent); background: var(--accent-soft); }
.choice.picked .num { background: var(--accent); color: var(--accent-ink); }
.choice:disabled:not(.picked) { opacity: .45; }
.choice:disabled { cursor: default; }
.choices:has(.picked) .choice:not(.picked) { display: none; }  /* once answered, only the answer stays */

/* code / prompt blocks with a copy button, like code in Claude's answers */
.codeblock { margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--soft); }
.cb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 4px 12px; font: 400 .8rem/1.4 var(--font); color: var(--muted); border-bottom: 1px solid var(--line); }
.cb-copy { padding: 4px 10px; font-size: .8rem; font-weight: 400; border: none; background: transparent; }
.codeblock pre { margin: 0 !important; border-radius: 0 !important; max-height: 220px; background: transparent !important; }

/* steps of a running job */
.progress { list-style: none; margin: 4px 0 10px; padding: 0; font-family: var(--font); font-size: .92rem; }
.progress li { position: relative; padding: 3px 0 3px 26px; color: var(--muted); }
.progress li.ok::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.progress li.now { color: var(--ink); }
.progress li.now::before { content: ""; position: absolute; left: 2px; top: .62em; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-tag { font-family: var(--font); font-size: .8rem; color: var(--muted); margin: 0 0 4px; }
.status-line { font-family: var(--font); color: var(--muted); margin-bottom: 2px; }
.jobbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 2px 0 4px; max-width: 360px; }
.jobbar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .6s ease; }
.run-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 8px; padding: 6px 14px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: .88rem; box-shadow: 0 2px 10px rgb(0 0 0 / .06); }
.run-status[hidden] { display: none; }
.composer-wrap:has(.run-status:not([hidden])) { text-align: center; }
.composer-wrap:has(.run-status:not([hidden])) > :not(.run-status) { text-align: left; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
.steps-done summary { font-size: .85rem; }
img.cover { display: block; max-width: min(100%, 300px); border-radius: 14px; margin: 6px 0; }
.working { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: bounce 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }
.caption details { margin-top: 10px; }

.composer-wrap { position: relative; flex: 0 0 auto; z-index: 6; padding: 10px 0 calc(8px + env(safe-area-inset-bottom)); background: var(--paper); }
.composer-above { display: flex; gap: 8px; margin-bottom: 8px; }
/* one rounded box with the text and ↵ inside; the tools sit under it (Producer's reference, v1.16.3) */
.composer { display: flex; align-items: flex-end; gap: 6px; background: var(--raised); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 7px 7px 7px 16px; }
.composer:focus-within { border-color: var(--muted); }
.composer.answer { border-color: var(--accent); }
.composer textarea#q { display: block; flex: 1 1 auto; min-width: 0; width: auto; min-height: 36px; max-height: 200px; margin: 0; padding: 6px 2px; border: none; background: transparent; box-shadow: none; resize: none; font-size: 1.02rem; line-height: 1.5; }
.composer-bar { display: flex; align-items: center; gap: 2px; margin-top: 6px; padding: 0 4px; }
.bar-btn { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; min-height: 0; height: 32px; padding: 0 7px; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); font-weight: 400; font-size: .9rem; white-space: nowrap; }
.bar-btn:hover { background: var(--soft); color: var(--ink); }
.bar-btn[hidden] { display: none; }
.bar-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bar-pick { flex: 0 1 auto; min-width: 0; }
.bar-pick svg { width: 15px; height: 15px; flex: none; }
.bar-pick span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar-text { color: var(--ink); }
.bar-text:empty { display: none; }
#btn-mic.on { color: var(--bad); background: var(--bad-bg); }
.bar-ring svg { width: 18px; height: 18px; transform: rotate(-90deg); stroke-width: 2.6; }
.bar-ring circle { stroke: var(--line); }
.bar-ring .ring-fill { stroke: var(--run); stroke-dasharray: var(--pct, 0) 100; }
.bar-ring.warn .ring-fill { stroke: var(--bad); }
.tool { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; font-weight: 400; font-size: .86rem; color: var(--muted); max-width: 46vw; }
#btn-plus { color: var(--ink); }
.tool.pick { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-block; line-height: 34px; min-width: 0; }
#chip-format { flex: 0 1 auto; }
#chip-quality { flex: 0 0 auto; }
#btn-plus, .send { flex: 0 0 auto; }
.send { width: 36px; height: 36px; min-height: 0; padding: 0; display: grid; place-items: center; border: none; border-radius: 10px; background: transparent; color: var(--muted); }
.send:hover { background: var(--soft); color: var(--ink); }
.composer.has-text .send { background: var(--accent); color: var(--accent-ink); }
.send svg { stroke-width: 2.1; }
.composer-note { text-align: center; font-size: .8rem; margin-top: 8px; }
.composer-note:empty { display: none; }
.composer-note a { color: var(--link); }
.ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 10px; }
.idea { flex: 0 0 auto; padding: 8px 16px; border-radius: 99px; font-weight: 500; font-size: .95rem; white-space: nowrap; }
.idea.on { background: var(--accent-soft); border-color: var(--accent); color: var(--link); }  /* the job type picked (hub H7) */
.model-list { display: grid; gap: 6px; margin: 8px 0 14px; }
.story-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 4px 0 12px; font-family: var(--font); }
.story-card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.story-card p { margin: 0 0 8px; line-height: 1.6; }
.story-card ul { margin: 0 0 8px; padding-left: 1.2em; }
.story-card .cost { margin: 8px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .92rem; }

/* bottom sheets (clip options, new series) */
dialog { color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 0; max-width: min(760px, 94vw); width: 100%; box-shadow: var(--shadow-pop); }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
/* ------------------------------------------------------------ phones */
@media (max-width: 760px) {
  input, select, textarea, #modal-body textarea { font-size: 16px; }  /* iPhone zooms into smaller fields */
  button, select, input:not([type=checkbox]):not([type=range]), .chip { min-height: 44px; }
  .tool, .send { min-height: 40px; height: 40px; }
  .send { width: 40px; }
  .bar-btn { height: 38px; min-height: 38px; padding: 0 9px; }
  .sw, .stage-nav, .dtab, .tile { min-height: 0; }
  button.small { padding: 6px 12px; }
  summary { padding: 8px 0; }
  .card { padding: 16px; }
  .greet h1 { font-size: 1.65rem; }
  .chat.is-empty { justify-content: flex-start; }
  .chat.is-empty .greet { display: flex; flex-direction: column; align-items: center; padding-top: 3vh; }
  .chat.is-empty .ideas { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 0 -16px 8px; padding: 0 16px 4px; scrollbar-width: none; }
  .chat.is-empty .greet { order: 0; }
  .toast { bottom: calc(130px + env(safe-area-inset-bottom)); width: max-content; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ep .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ep .actions > *, .ep .actions a button { width: 100%; }
  .ep .actions button.small { padding: 6px 4px; font-size: .82rem; white-space: nowrap; }
  .ep select { font-size: 16px; }
  .jump { position: sticky; top: 0; z-index: 5; background: var(--paper); margin: 0 -16px 8px; padding: 8px 16px 10px; }
  dialog { max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; margin: 0; border-radius: 0; border: none; }
  dialog.sheet { height: auto; max-height: 90dvh; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .modal-head { padding: 6px 8px 6px 16px; }
  #modal-body { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .user-add > input, .user-add > button { flex: 1 1 100%; }
  .dress-top { position: sticky; top: 0; z-index: 5; margin: 0 -16px; padding: 0 16px 6px; background: var(--paper); }
  .slide { height: 200px; padding-top: 10px; }
  .slide img { height: 182px; }
  .slide .avatar-voice { font-size: 70px; }
  .stage-nav { top: 80px; }
  .stage-info { padding: 4px 14px 8px; font-size: 1rem; }
  .dtab { min-width: 54px; padding: 4px 6px; }
  .dtab .i { font-size: 1.25rem; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .dress-bar { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (hover: none) {
  :where(button:hover:not(:disabled)) { background: var(--card); }
  .tabs a:hover, .recent:hover { background: transparent; }
}
/* the greeting's stickman dances in its square */
.dancer .d-body, .dancer path, .dancer circle { transform-box: view-box; }
.dancer .d-body { animation: d-bounce .9s ease-in-out infinite; transform-origin: 32px 56px; }
.dancer .d-head { animation: d-nod .9s ease-in-out infinite; transform-origin: 32px 24px; }
.dancer .d-arm-l { animation: d-arm-l .9s ease-in-out infinite; transform-origin: 32px 30px; }
.dancer .d-arm-r { animation: d-arm-r .9s ease-in-out infinite; transform-origin: 32px 30px; }
.dancer .d-leg-l { animation: d-leg-l .9s ease-in-out infinite; transform-origin: 32px 43px; }
.dancer .d-leg-r { animation: d-leg-r .9s ease-in-out infinite; transform-origin: 32px 43px; }
@keyframes d-bounce { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-3px) rotate(4deg); } }
@keyframes d-nod { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes d-arm-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(70deg); } }
@keyframes d-arm-r { 0%, 100% { transform: rotate(-70deg); } 50% { transform: rotate(0); } }
@keyframes d-leg-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(18deg); } }
@keyframes d-leg-r { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(0); } }
.greet-pick { display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 34ch; margin: -10px auto 18px; padding: 10px 18px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-weight: 400; text-align: center; line-height: 1.45; }
.greet-pick[hidden] { display: none; }
.greet-pick .gp-label { font-size: .78rem; color: var(--accent); font-weight: 600; }
.greet-pick .gp-text { font-family: var(--font); font-size: 1.05rem; color: var(--ink); min-height: 1.5em; }
.greet-pick.fade .gp-text { opacity: 0; transition: opacity .35s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------ Claude-like conversation details (v1.15) */
/* ↓ back to the newest message, when reading older ones */
.to-bottom { position: absolute; top: -46px; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; min-height: 0; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--raised); color: var(--ink); box-shadow: var(--shadow); }
.to-bottom[hidden] { display: none; }
.to-bottom svg { width: 18px; height: 18px; }
.composer-wrap:has(.run-status:not([hidden])) .to-bottom { top: -86px; }
/* ■ stop */
.send.stop { background: var(--ink); color: var(--paper); }
/* ✎ edit a message you typed */
.msg.user { align-items: center; gap: 6px; }
.edit-msg { min-height: 0; width: 30px; height: 30px; padding: 0; border: none; border-radius: 8px; background: transparent; color: var(--muted); font-size: .95rem; opacity: 0; transition: opacity .15s; }
.msg.user:hover .edit-msg, .edit-msg:focus-visible { opacity: 1; }
.edit-msg:hover { background: var(--soft); color: var(--ink); }
@media (hover: none) { .edit-msg { opacity: .55; } }
.edit-bar { align-items: center; justify-content: space-between; font-size: .84rem; color: var(--muted); }
.edit-bar[hidden] { display: none; }
#edit-bar:not([hidden]) ~ .composer { border-color: var(--accent); }
/* quiet tools under replies */
.msg-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 2px 0 10px -6px; }
.msg-tools.quiet { margin: -4px 0 0 -6px; opacity: 0; transition: opacity .15s; }
.msg.studio:last-child .msg-tools.quiet { opacity: .5; }
