/* Shared shell, values taken from Sume's stylesheet (sume.com, 2026-11-12):
   agent-theme tokens, studio-top-nav, app-section-rail, dropdown, upgrade-button.
   Brand colour is one token (--accent) so it can be swapped. */
:root {
  --bg: #0f1113;            /* agent-bg-content / chrome */
  --elev: #1c1e20;          /* agent-bg-elevated, settings-field-bg */
  --raised: #27292c;
  --ink: #fff;              /* agent-text */
  --ink-2: #fff9;           /* agent-text-secondary */
  --ink-3: #898a8b;         /* agent-text-placeholder */
  --line: #ffffff0d;        /* agent-border */
  --line-2: #ffffff1a;      /* agent-border-strong, settings-rule */
  --hover: #ffffff0d;
  --active: #ffffff1a;
  --wash: #d9d9d90a;        /* agent-surface-wash */
  --s-wash: #ffffff0d;      /* settings-wash */
  --s-wash-2: #ffffff1a;    /* settings-wash-strong */
  --accent: #c6f24e;        /* brand lime (was sume-sky #00afff) */
  --on-accent: #242820;
  --mono: 'Geist Mono', ui-monospace, monospace;
  /* dropdown */
  --dd-surface: #212121; --dd-ink: #ededed; --dd-muted: #afafaf; --dd-wash: #ffffff1a; --dd-rule: #ffffff1a;
  --dd-edge: 0 8px 16px #00000052, inset 0 0 1px #fff3, 0 0 1px #0000009e;
  /* landing / explore */
  --l-ink: #ededed; --l-muted: #fff9; --l-surface: #0e0e0e; --l-wash: #ffffff0d; --l-track: #ffffff14;
  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/20px var(--sans); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; margin: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--ink-2); }
.mark { display: inline-block; width: 20px; height: 20px; border-radius: 6px; background: var(--accent); flex: none;
  -webkit-mask: radial-gradient(circle at 70% 30%, transparent 3px, #000 3.5px); mask: radial-gradient(circle at 70% 30%, transparent 3px, #000 3.5px); }

/* ── rail (52px) ── */
.rail { position: fixed; left: 0; top: 0; bottom: 0; width: 52px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 16px; background: var(--bg); z-index: 30; }
.rail-item { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); transition: background .12s, color .12s; }
.rail-item:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.rail-item[data-active] { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, transparent); }
.rail-logo .mark { width: 22px; height: 22px; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rail-avatar { width: 28px; height: 28px; border-radius: 50%; background: #0f766e; color: #fff; font-size: 13px; font-weight: 500; display: grid; place-items: center; }

/* ── top nav (52px = 8 + 36 + 8) ── */
.topnav { position: fixed; left: 52px; right: 0; top: 0; height: 52px; padding: 8px 16px 8px 17px; display: flex; align-items: center; gap: 12px; background: var(--bg); z-index: 20; font-size: 14px; }
.tn-logo { height: 36px; display: inline-flex; align-items: center; gap: 6px; margin-left: -6px; padding: 0 6px; border-radius: 8px; font-size: 17px; font-weight: 500; letter-spacing: -.2px; }
.tn-logo img { width: 22px; height: 22px; flex: none; display: none; } /* desktop: the rail already shows the logo */
.tn-beta { margin-left: 2px; }
.tn-list { flex: auto; min-width: 0; height: 100%; display: flex; align-items: center; margin: 0; padding: 0; list-style: none; overflow: auto hidden; scrollbar-width: none; }
.tn-tab { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; color: var(--ink-3); white-space: nowrap; font-size: 14px; line-height: 20px; }
.tn-tab:hover { background: color-mix(in srgb, #fff 5%, transparent); color: var(--ink); }
.tn-tab[aria-current=page], .tn-tab[aria-current=page]:hover { color: var(--accent); background: none; }
.tn-chip { background: color-mix(in srgb, var(--accent) 24%, transparent); color: var(--accent); text-transform: uppercase; border-radius: 6px; padding: 2px 6px; font-size: 10px; font-weight: 700; line-height: 12px; }
.tn-div { width: 1px; height: 12px; margin: 0 4px; background: var(--line-2); flex: none; }
.tn-end { height: 36px; display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.icon-link { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); border-radius: 8px; display: inline-grid; place-items: center; }
.icon-link:hover { background: var(--hover); color: var(--ink); }
.upgrade { position: relative; height: 32px; padding: 0 12px 0 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; }
.upgrade:hover { background: var(--hover); }
.upgrade .badge { position: absolute; bottom: -7px; left: 50%; transform: translate(-50%); background: var(--accent); color: #000; border-radius: 4px; padding: 2px 5px; font-size: 10px; font-weight: 600; line-height: 10px; white-space: nowrap; pointer-events: none; }
.tn-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; color: var(--ink-2); white-space: nowrap; font-size: 14px; }
.tn-link:hover { background: var(--hover); color: var(--ink); }
.tn-link[aria-current=page], .tn-link[aria-current=page]:hover { color: var(--accent); background: none; }
.tn-balance { font-variant-numeric: tabular-nums; }
.tn-signin { height: 32px; padding: 0 12px; border-radius: 8px; background: var(--ink); color: #000; font-size: 13px; font-weight: 500; }

/* content area under the bar, beside the rail */
.content { position: fixed; left: 52px; right: 0; top: 52px; bottom: 0; overflow: hidden; display: flex; flex-direction: column; }

/* ── dropdown surface (shared by every picker) ── */
.dd { position: fixed; z-index: 900; min-width: 220px; max-width: 320px; max-height: calc(100dvh - 16px); padding: 6px; border-radius: 16px; background: var(--dd-surface); box-shadow: var(--dd-edge);
  color: var(--dd-ink); font-size: 14px; line-height: 20px; display: none; flex-direction: column; overflow: hidden auto; overscroll-behavior: contain; user-select: none; color-scheme: dark;
  transform-origin: top center; }
.dd.show { display: flex; animation: ddIn .32s cubic-bezier(.23, 1, .32, 1) 30ms both; }
.dd[data-side=top] { transform-origin: bottom center; }
@keyframes ddIn { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .dd.show { animation: none; } }
.dd-label { color: var(--dd-muted); font-size: 12px; line-height: 16px; padding: 8px 10px 4px; }
.dd-note { margin: 4px 10px 6px; color: var(--dd-muted); font-size: 12px; line-height: 16px; }
.dd-item { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 10px; text-align: left; white-space: nowrap; }
.dd-item:hover, .dd-item:focus-visible { background: var(--dd-wash); outline: none; }
.dd-item[aria-checked=true] { background: var(--dd-wash); }
.dd-item.two { min-height: 46px; }
.dd-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dd-text { display: flex; flex-direction: column; flex: auto; min-width: 0; }
.dd-desc { color: var(--dd-muted); font-size: 12px; line-height: 14px; }
.dd-check { width: 16px; height: 16px; margin-left: auto; color: var(--accent); flex: none; visibility: hidden; }
.dd-item[aria-checked=true] .dd-check { visibility: visible; }
.ar { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; }

/* length bar (studio-duration-bar) */
.dur { --inset: 8px; display: flex; flex-direction: column; gap: 2px; width: 200px; }
.dur-head { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px 0; }
.dur-cap { color: var(--dd-muted); font-size: 12px; font-weight: 500; line-height: 16px; }
.dur-val { color: var(--dd-ink); font-size: 16px; font-weight: 600; line-height: 24px; font-variant-numeric: tabular-nums; }
.dur-slider { border-radius: 10px; cursor: grab; touch-action: none; outline: none; display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.dur-slider[data-dragging] { cursor: grabbing; }
.dur-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dur-track { position: relative; height: 24px; border-radius: 6px; background: color-mix(in srgb, var(--dd-ink) 5%, transparent); }
.dur-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; width: calc(var(--inset) + (100% - 2 * var(--inset)) * var(--at)); background: color-mix(in srgb, var(--dd-ink) 20%, transparent); transition: width .15s var(--ease), background-color .15s var(--ease); }
.dur-slider:hover .dur-fill, .dur-slider[data-dragging] .dur-fill { background: color-mix(in srgb, var(--dd-ink) 25%, transparent); }
.dur-stop { position: absolute; top: 50%; left: calc(var(--inset) + (100% - 2 * var(--inset)) * var(--stop)); width: 4px; height: 4px; border-radius: 2px; translate: -50% -50%; background: color-mix(in srgb, var(--dd-ink) 20%, transparent); }
.dur-thumb { position: absolute; top: 50%; left: calc(var(--inset) + (100% - 2 * var(--inset)) * var(--at)); width: 2px; height: 12px; border-radius: 1px; translate: -50% -50%; background: var(--accent); transition: left .15s var(--ease), height .15s var(--ease); }
.dur-slider:hover .dur-thumb, .dur-slider[data-dragging] .dur-thumb { height: 16px; }
.dur-slider[data-dragging] .dur-fill, .dur-slider[data-dragging] .dur-thumb { transition-property: background-color, height; }
.dur-ticks { position: relative; height: 14px; color: color-mix(in srgb, var(--dd-ink) 30%, transparent); font-size: 10px; font-weight: 500; line-height: 14px; font-variant-numeric: tabular-nums; }
.dur-tick { position: absolute; top: 0; left: calc(var(--inset) + (100% - 2 * var(--inset)) * var(--stop)); translate: -50%; transition: color .15s var(--ease); }
.dur-tick[data-on] { color: var(--dd-ink); }

/* Director Studio composer menus (composer-split optionMenu / durationPanel) */
.dd.composer { --row-font: 16px; padding: 8px; gap: 4px; width: 200px; min-width: 0; background: color-mix(in srgb, var(--dd-surface) 75%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dd.composer .dd-item { min-height: 36px; padding: 6px 12px; gap: 8px; border-radius: 12px; font-size: 16px; line-height: 24px; }
.dd.composer .dd-item[aria-checked=true] { background: color-mix(in srgb, var(--dd-surface) 60%, #000); }
.dd.composer .dd-item:hover { background: var(--dd-wash); }
.dd.composer .dd-icon { width: 16px; }
.dd.composer.narrow { width: 120px; }
.dd.duration { padding: 0; width: 200px; min-width: 0; }
.dpanel { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.dp-label { color: #afafaf; font-size: 12px; line-height: 14px; }
.dp-track { position: relative; height: 36px; display: block; }
.dp-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 36px; margin: 0; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; cursor: pointer;
  background: linear-gradient(to right, var(--hover) calc(2px + (100% - 4px) * var(--fill, 0)), transparent 0); }
.dp-range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dp-range::-webkit-slider-runnable-track { background: none; height: 100%; }
.dp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 34px; border: 0; border-radius: 9999px; background: var(--ink); }
.dp-range::-moz-range-track { background: none; }
.dp-range::-moz-range-thumb { width: 4px; height: 34px; border: 0; border-radius: 9999px; background: var(--ink); }
.dp-val { position: absolute; top: 9px; left: 13px; color: var(--ink); font-size: 12px; line-height: 14px; pointer-events: none; }

/* model menu (dropdown-picker + studio-create-controls.modelMenu) */
.dd.model-menu { padding: 0; border: 1px solid var(--dd-rule); width: 308px; max-width: calc(100vw - 32px); }
.mm-search { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 11px 12px; border-bottom: 1px solid var(--dd-rule); color: var(--dd-muted); }
.mm-search input { flex: auto; min-width: 0; background: none; border: 0; outline: 0; color: var(--dd-ink); font: inherit; font-size: 14px; }
.mm-search input::placeholder { color: var(--dd-muted); }
.mm-list { padding: 8px 12px 12px; display: flex; flex-direction: column; max-height: min(520px, 56vh); overflow: auto; overscroll-behavior: contain; }
.mm-list .dd-item { align-items: flex-start; gap: 8px; border-radius: 12px; white-space: normal; }
.mm-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--dd-wash); display: grid; place-items: center; color: var(--accent); flex: none; }
.mm-mark svg { width: 16px; height: 16px; }
.mm-title { display: flex; align-items: center; gap: 6px; }
.mm-chip { height: 18px; padding: 0 6px; border-radius: 6px; font-size: 12px; line-height: 16px; display: inline-flex; align-items: center; background: var(--accent); color: #000; }
.mm-specs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.mm-spec { height: 18px; padding: 0 5px; border-radius: 5px; background: var(--dd-wash); color: var(--dd-muted); font-size: 11px; font-weight: 500; line-height: 16px; display: inline-flex; align-items: center; gap: 3px; }
.mm-spec svg { width: 10px; height: 10px; }
.mm-list .dd-check { margin-top: 8px; }
.mm-empty { padding: 6px 10px; color: var(--dd-muted); }

/* account menu */
.acct-pop { min-width: 220px; }

/* ── modals (sign in, top up) ── */
.modal { position: fixed; inset: 0; z-index: 1000; background: #0006; display: none; place-items: center; padding: 16px; }
.modal.open { display: grid; }
.sheet { position: relative; width: min(640px, 100%); max-height: 90vh; overflow: auto; padding: 24px; border-radius: 20px; background: var(--elev); box-shadow: var(--dd-edge); font-size: 14px; }
.sheet.narrow { width: min(420px, 100%); }
.sheet h2 { margin: 0 0 4px; font-size: 18px; font-weight: 500; line-height: 28px; }
.sheet p { margin: 0 0 12px; }
.sheet .close { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 8px; color: var(--ink-2); font-size: 20px; }
.sheet .close:hover { background: var(--hover); color: var(--ink); }
.btn { height: 36px; padding: 0 14px; border-radius: 9999px; background: var(--s-wash-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; }
.btn:hover { background: color-mix(in srgb, #fff 16%, transparent); }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 500; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.wide { width: 100%; height: 44px; }
.field { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; outline: none; margin: 8px 0 12px; }
.field:focus { border-color: var(--accent); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.pack { text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.pack:hover { background: var(--s-wash); }
.pack b { font-size: 24px; font-weight: 500; line-height: 32px; }
.pack span { color: var(--ink-2); font-size: 12px; line-height: 16px; }
.custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.custom input { width: 110px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; }
.note { border: 1px dashed var(--accent); color: var(--accent); padding: 8px 12px; border-radius: 10px; font-size: 13px; margin-top: 12px; }
.small { font-size: 12px; line-height: 16px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 1100; display: none; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 12px; background: var(--dd-surface); box-shadow: var(--dd-edge); color: var(--dd-ink); }
.toast.show { display: block; }

/* placeholder for any video or image we don't have yet */
.ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #17191b, #1f2225); color: #ffffff40; font-size: 12px; letter-spacing: .02em; text-align: center; }
.ph svg { width: 22px; height: 22px; display: block; margin: 0 auto 6px; }
.ph small { display: block; margin-top: 2px; font-size: 11px; color: #ffffff2e; }
.ph[data-tone="1"] { background: linear-gradient(160deg, #1a1d22, #23262c 60%, #15171a); }
.ph[data-tone="2"] { background: linear-gradient(200deg, #1c1a1e, #242128 55%, #141316); }
.ph[data-tone="3"] { background: linear-gradient(120deg, #171b1d, #1e2629 60%, #121617); }
.ph[data-tone="4"] { background: linear-gradient(180deg, #1d1c1a, #26241f 50%, #151412); }
.ph[data-tone="5"] { background: linear-gradient(140deg, #191a1f, #20222a 60%, #131418); }

/* account menu under the top-bar avatar, on every page with the top bar */
.topnav .acct { position: relative; }
.topnav .acct-pop { position: absolute; right: 0; left: auto !important; top: 40px !important; }
.rail-m { display: none; }
.dd-m { display: none; } /* account-menu items only phones show (Voice, folded out of the bottom bar) */

@media (max-width: 760px) {
  /* phones: the rail becomes a bottom tab bar with labels */
  .rail { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: auto; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    flex-direction: row; align-items: stretch; justify-content: space-around; gap: 0; border-top: 1px solid var(--line); z-index: 40; }
  .rail-item, .rail-m, .rail-foot { flex: 1; width: auto; height: 46px; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; }
  .rail-item::after, .rail-foot::after { content: attr(data-label); font-size: 10px; line-height: 12px; color: var(--ink-2); }
  .rail-item[data-active] { background: none; }
  .rail-item[data-active]::after { color: var(--ink); font-weight: 600; }
  .rail-item svg { width: 22px; height: 22px; }
  .rail-avatar { width: 24px; height: 24px; font-size: 12px; }
  /* no Account tab (owner 2026-11-26): the account is in the top bar's right corner, so five tabs stay */
  .rail-foot { display: none; }
  /* Voice folds into the account menu on phones (owner 2026-11-27: few people want it first); its tab shows only on /voice */
  .rail-voice:not([data-active]) { display: none; }
  .dd-m:not([hidden]) { display: flex; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .topnav { left: 0; padding: 8px 12px; }
  .content { left: 0; }
  .tn-list, .tn-end .tn-link { display: none; }
  .tn-logo img { display: block; } /* phones: the rail is the bottom bar, so the top bar carries the logo */
  .packs { grid-template-columns: 1fr; }
}

/* Saver nudge: a slow light running round the Delivery button while Fast is picked and Saver is offered,
   and a hint when the pointer comes near (common.js wires it). */
@property --rim { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.saver-glow { position: relative; isolation: isolate; }
.saver-glow::before { content: ''; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 1;
  background: conic-gradient(from var(--rim), transparent 0 55%, color-mix(in srgb, var(--accent) 40%, transparent) 70%, var(--accent) 82%, #9be7ff 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: rim-spin 3.2s linear infinite; }
.saver-glow::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  box-shadow: 0 0 14px 1px color-mix(in srgb, var(--accent) 35%, transparent); opacity: .5; animation: rim-breathe 3.2s ease-in-out infinite; }
@keyframes rim-spin { to { --rim: 360deg; } }
@keyframes rim-breathe { 50% { opacity: 1; } }
.saver-hint { position: fixed; z-index: 60; max-width: 240px; padding: 9px 12px; border-radius: 10px; background: #111317; color: #fff;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  font-size: 12px; line-height: 17px; pointer-events: none; opacity: 0; translate: 0 4px; transition: opacity .18s ease, translate .18s ease; }
.saver-hint b { color: #9be7ff; font-weight: 600; }
.saver-hint.show { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .saver-glow::before, .saver-glow::after { animation: none; } .saver-glow::before { --rim: 200deg; } }

/* Continue with Google (google-signin.js adds it above the email form) */
#googleBox { margin-top: 12px; }
.btn.google { background: #fff; color: #1f1f1f; font-weight: 500; gap: 10px; text-decoration: none; }
.btn.google:hover { background: #f1f1f1; }
.btn.google svg { width: 18px; height: 18px; flex: none; }
.or { display: flex; align-items: center; gap: 10px; margin: 14px 0 2px; color: var(--ink-2); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }

/* references: waveform, lengths, problems, @ menu (shared by the Video page and Director Studio) */
.wave { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.wave i { display: block; width: 2px; height: calc(var(--h) * 1px); border-radius: 1px; background: currentColor; opacity: .7; }
.ref-warn { margin: 0; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, #ff5a5f 14%, transparent); color: #ffb3b5; font-size: 12px; line-height: 17px; }
[data-gen].blocked { opacity: .5; }
.prompt-note { margin: 6px 0 0; color: var(--ink-3); font-size: 12px; line-height: 17px; }
.prompt-note.over { color: #ff8a8d; font-weight: 600; }
.mention { position: fixed; z-index: 1000; padding: 4px; max-height: 240px; overflow-y: auto; }
.mention .dd-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 8px; font-size: 13px; text-align: left; }
.mention .dd-item.is-sel, .mention .dd-item:hover { background: var(--dd-wash); }
.mention img, .mention video, .mention .m-ico { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--dd-wash); }
.mention .m-dur { margin-left: auto; color: var(--dd-muted); font-size: 11px; }

/* Top-up window, laid out as Sume's: amount cards, custom amount, monthly auto top-up, prices, questions (common.js renderTopup) */
.sheet.tu-sheet { width: min(1100px, 100%); max-height: calc(100vh - 32px); padding: 48px 24px 32px; background: #121416; }
.tu { max-width: 740px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.tu svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tu-head { text-align: center; margin-bottom: 12px; }
.sheet .tu-head h2 { font-size: 28px; line-height: 36px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 8px; }
.sheet .tu-head p { margin: 0 0 6px; }
.tu-sub { color: var(--ink-2); }
.tu-to { color: var(--ink-3); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.tu-to b { color: var(--ink); font-weight: 500; }
.tu-av { width: 18px; height: 18px; border-radius: 5px; background: var(--accent); color: #000; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; }
.sheet .tu-hint { color: var(--ink-3); font-size: 12px; margin-top: 14px; }
.tu-packs { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 10px; }
.tu-pack { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: #ffffff06; }
.tu-pack.feat { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); box-shadow: 0 0 32px color-mix(in srgb, var(--accent) 22%, transparent); }
.tu-amt { font-size: 24px; line-height: 32px; font-weight: 400; }
.tu-up { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; line-height: 16px; color: var(--ink-2); flex: 1; }
.tu-up li { display: flex; gap: 6px; }
.tu-up svg { margin-top: 1px; color: var(--ink-3); }
.tu-up b { color: var(--ink); font-weight: 500; }
.tu-btn { height: 36px; padding: 0 16px; border-radius: 9999px; border: 1px solid var(--line-2); color: var(--ink); font-size: 13px; white-space: nowrap; transition: background .12s; }
.tu-btn:hover { background: var(--s-wash-2); }
.tu-btn:disabled { opacity: .5; }
.tu-btn.danger { border-color: #ff6b6b; color: #ff8f8f; }
.tu-pack.feat .tu-btn { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 500; }
.tu-custom { display: flex; align-items: center; gap: 20px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: #ffffff06; }
.tu-field { display: flex; flex-direction: column; gap: 4px; }
.tu-field small { font-size: 11px; color: var(--ink-3); }
.tu-field span { display: flex; align-items: center; gap: 4px; width: 150px; height: 36px; padding: 0 10px; border-radius: 8px; background: #ffffff0d; font-size: 15px; }
.tu input { background: none; border: 0; color: var(--ink); font: inherit; width: 100%; outline: none; -moz-appearance: textfield; }
.tu input::-webkit-inner-spin-button, .tu input::-webkit-outer-spin-button { -webkit-appearance: none; }
.tu-custom .tu-up { flex: 1; }
.tu .pr-buys { gap: 7px; font-size: 12.5px; line-height: 17px; color: var(--ink); }
.tu .pr-buys li { display: flex; align-items: flex-start; gap: 6px; }
.tu .pr-buys .pr-check { width: 13px; height: 13px; margin-top: 2px; color: var(--accent); }
.tu .pr-buys .tier { display: inline-flex; align-items: center; gap: 4px; }
.tu .pr-buys .tier i { width: 11px; height: 11px; border-radius: 3px; background: var(--sky, #7cc4ff); display: inline-block; }
.tu .pr-buys .tier.slow i { background: #898a8b; }
.tu .pr-buys .pr-buysHead { color: var(--ink-3); font-size: 11.5px; }
.tu .pr-buys .pr-buysOther { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.tu .pr-buys .pr-buysOther .tier i { width: 9px; height: 9px; }
.tu .pr-others ul { display: grid; gap: 3px; width: 100%; margin: 0; padding: 0; list-style: none; }
.tu .pr-others li { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; line-height: 16px; color: var(--ink-2); }
.tu .pr-others li b { font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.tu-custom .pr-others ul { max-width: 260px; }
.sheet .tu-foot { margin: 0; color: var(--ink-3); font-size: 11px; line-height: 16px; }
.tu h3 { margin: 0; font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.tu-auto { margin-top: 8px; padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: #ffffff06; display: flex; flex-direction: column; gap: 12px; }
.tu-auto h3 svg { width: 16px; height: 16px; color: var(--accent); }
.tu-auto.on { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tu-on { margin-left: 4px; padding: 1px 6px; border-radius: 5px; font-size: 11px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.tu-autoRow { display: flex; align-items: center; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.sheet .tu-big { margin: 0; font-size: 18px; line-height: 28px; color: var(--ink-3); display: flex; align-items: baseline; gap: 8px; }
.tu-bigIn { display: inline-flex; align-items: baseline; color: var(--ink); font-size: 22px; border-bottom: 1px solid var(--accent); padding: 0 2px 2px; }
.tu-bigIn input { width: 76px; font-size: 22px; }
.sheet .tu-autoLine { margin: 0; font-size: 15px; }
.sheet .tu-fine { margin: 0; color: var(--ink-3); font-size: 11px; line-height: 16px; }
.tu-prices { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.tu-pHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tu .tu-search { width: 200px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: #ffffff06; font-size: 12px; }
.tu-table { max-height: 320px; overflow: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.tu-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.tu-table th { position: sticky; top: 0; background: #17191b; text-align: left; font-weight: 500; color: var(--ink-2); padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.tu-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tu-table th + th, .tu-table td + td { text-align: right; width: 22%; font-variant-numeric: tabular-nums; }
.tu-table td:nth-child(2) { color: var(--accent); }
.tu-table tr:last-child td { border-bottom: 0; }
.tu-res { color: var(--ink-3); }
.tu-na { color: var(--ink-3); }
.tu-faq { margin-top: 20px; }
.tu-faq h3 { margin-bottom: 12px; }
.tu-faq h4 { margin: 14px 0 4px; font-size: 13px; font-weight: 500; }
.sheet .tu-faq p { margin: 0; color: var(--ink-2); font-size: 13px; }
.tu-dev { margin-top: 12px; }
@media (max-width: 760px) {
  .sheet.tu-sheet { padding: 40px 16px 24px; }
  .sheet .tu-head h2 { font-size: 22px; line-height: 30px; }
  .tu-packs { grid-template-columns: 1fr; }
  .tu-custom { flex-wrap: wrap; gap: 12px; }
  .tu-custom .tu-btn { width: 100%; }
  .tu .tu-search { width: 140px; }
}
/* Google profile picture as the account icon */
.rail-avatar { overflow: hidden; }
.rail-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* content rule, under the prompt box (owner 2026-11-22: explicit uploads got a provider account stopped) */
.nsfw-note { margin: 6px 2px 0; font-size: 12px; line-height: 1.4; color: var(--ink-3); }

/* a message that stays until closed (content-check refusal) */
.toast.sticky { padding-right: 38px; }
.toast-x { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; opacity: .7; }
.toast-x:hover { opacity: 1; background: rgba(255,255,255,.08); }
