/* Replica of the real RoShot Studio plugin (engine/plugin/ITW_Engine.lua, buildPanel).
   Every colour, size and gap below is copied from the Luau. Roblox UIGradients multiply the base colour,
   which is why the orange fills are redder than the accent itself (--fill-a / --fill-b).
   Fonts: Josefin Sans, Merriweather and Roboto Mono are the same families the plugin uses.
   Montserrat stands in for Gotham SSm, which is Roblox's own font and can't be put on a website. */

@font-face { font-family: "RS Display"; src: url("/assets/fonts/rs-josefin.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "RS Body"; src: url("/assets/fonts/rs-montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "RS Serif"; src: url("/assets/fonts/rs-merri.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "RS Serif"; src: url("/assets/fonts/rs-merri-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "RS Mono"; src: url("/assets/fonts/rs-mono.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }

.rs, .rs-win {
  --bg0: #0E0D13; --bg1: #16151D; --bg2: #1E1C27; --bg3: #282532;
  --line: #2A2733; --line2: #3B3747;
  --text: #F4F0EA; --text2: #B6B0BF; --dim: #7B7585;
  --accent: #FF7A45; --accent2: #FFB03A; --ai: #B9A7FF; --good: #6FE0B1; --bad: #FF6B6B; --warn: #FFC857; --ink: #1B110C;
  --fill-a: #FF3A12; --fill-b: #FF540F; /* accent x accent, accent x accent2 */
  --display: "RS Display", "Josefin Sans", sans-serif;
  --body: "RS Body", "Gotham SSm", "Montserrat", sans-serif;
  --serif: "RS Serif", "Merriweather", Georgia, serif;
  --mono: "RS Mono", "Roboto Mono", ui-monospace, monospace;
}

/* ---------- Studio dock window ---------- */
.rs-win { width: 422px; flex: none; border: 1px solid #353741; background: #191A1F; padding: 1px; text-align: left; box-shadow: 0 40px 90px -30px rgba(0,0,0,.85); }
.rs-win__bar { height: 23px; background: #202227; display: grid; place-items: center; position: relative; font: 400 12.5px/1 "Segoe UI", system-ui, sans-serif; color: #BCBEC8; letter-spacing: .01em; user-select: none; }
.rs-win__x { position: absolute; right: 2px; top: 0; width: 23px; height: 23px; display: grid; place-items: center; border: 0; padding: 0; background: none; color: #BCBEC8; cursor: pointer; }
.rs-win__x:hover { background: #2D3038; }
.rs-win__x svg { width: 9px; height: 9px; }

/* ---------- the widget ---------- */
.rs { position: relative; width: 418px; height: 756px; overflow: hidden; background: var(--bg0); color: var(--text);
  font: 400 13px/1 var(--body); -webkit-font-smoothing: antialiased; text-align: left; isolation: isolate; }
.rs *, .rs *::before, .rs *::after { box-sizing: border-box; }
.rs :where(p, h1, h2, h3) { margin: 0; }
.rs :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
.rs :where(input, textarea) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; outline: none; resize: none; }
.rs input::placeholder, .rs textarea::placeholder { color: var(--dim); opacity: 1; }
.rs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rs svg.ic { display: block; flex: none; }
.rs b { font-weight: 700; }

/* top bar: 60 tall */
.rs-top { position: absolute; inset: 0 0 auto; height: 60px; box-shadow: inset 0 -1px var(--line); }
.rs-top__logo { position: absolute; left: 16px; top: 15px; }
.rs-top__name { position: absolute; left: 56px; top: 0; height: 62px; display: flex; align-items: center; font: 700 18px/1 var(--display); white-space: nowrap; }
.rs-pill { position: absolute; right: 56px; top: 17px; height: 26px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 8px; border-radius: 13px;
  background: var(--bg1); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 65%, var(--good)); font: 500 11px/1 var(--body); color: var(--text2); }
.rs-pill i { width: 7px; height: 7px; border-radius: 4px; background: var(--good); }
.rs-top__act { position: absolute; right: 14px; top: 14px; width: 32px; height: 32px; border-radius: 16px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--text2); transition: background .14s; }
.rs-top__act:hover { background: var(--bg3); }
.rs-top__act[hidden] { display: none; }
.rs-top__line { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: linear-gradient(90deg, var(--fill-a), var(--fill-b)); transition: width .6s; z-index: 3; }

/* pages */
.rs-pages { position: absolute; left: 0; right: 0; top: 60px; bottom: 64px; overflow: hidden; }
.rs-page { position: absolute; inset: 0; }
.rs-page[hidden] { display: none; }
.rs-page.is-in { animation: rsIn .26s cubic-bezier(.22,1,.36,1); }
.rs-page.is-in-back { animation: rsInBack .26s cubic-bezier(.22,1,.36,1); }
@keyframes rsIn { from { transform: translateX(40px); } }
@keyframes rsInBack { from { transform: translateX(-40px); } }
.rs-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; overscroll-behavior: contain; }
.rs-scroll::-webkit-scrollbar { width: 4px; }
.rs-scroll::-webkit-scrollbar-thumb { background: var(--line2); }

/* bottom nav: 64 tall */
.rs-nav { position: absolute; inset: auto 0 0; height: 64px; background: var(--bg0); box-shadow: inset 0 1px var(--line); display: grid; grid-template-columns: repeat(5, 1fr); }
.rs-nav__ind { position: absolute; top: 10px; width: 56px; height: 30px; margin-left: -28px; border-radius: 15px; background: rgba(255,122,69,.14); transition: left .28s cubic-bezier(.22,1,.36,1); }
.rs-nav button { position: relative; height: 64px; color: var(--dim); }
.rs-nav button .ic { position: absolute; left: 50%; top: 14px; margin-left: -11px; transition: color .18s; }
.rs-nav button span { position: absolute; left: 0; right: 0; top: 44px; height: 12px; font: 500 10px/12px var(--body); text-align: center; transition: color .18s; }
.rs-nav button:hover .ic { color: var(--text2); }
.rs-nav button[aria-selected="true"] .ic { color: var(--accent); }
.rs-nav button[aria-selected="true"] span { color: var(--text); }

/* toast */
.rs-toast { position: absolute; left: 50%; bottom: 78px; transform: translate(-50%, 10px); height: 34px; max-width: 330px; padding: 0 14px; border-radius: 17px; background: var(--text); color: var(--ink);
  display: flex; align-items: center; font: 500 12px/1 var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; pointer-events: none; z-index: 40; transition: opacity .22s, transform .22s cubic-bezier(.34,1.56,.64,1); }
.rs-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.rs-toast.is-bad { background: #5A2430; color: var(--text); }

/* ---------- shared pieces ---------- */
.rs-eyebrow { font: 700 10px/1.2 var(--body); color: var(--dim); letter-spacing: 0; }
.rs-row { display: flex; align-items: center; gap: 8px; }
.rs-solid { height: 36px; padding: 0 16px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--text); color: var(--ink); font: 700 12px/1 var(--body); white-space: nowrap; transition: background .14s, transform .08s; }
.rs-solid:hover { background: #fff; }
.rs-solid:active, .rs-ghost:active, .rs-chip:active, .rs-card:active { transform: scale(.96); }
.rs-solid--fill { background: linear-gradient(110deg, var(--fill-a), var(--fill-b)); }
.rs-solid--fill:hover { background: linear-gradient(110deg, #ff5a36, #ff6e34); }
.rs-ghost { height: 36px; padding: 0 14px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--bg3); color: var(--text2); font: 500 12px/1 var(--body); white-space: nowrap; transition: background .14s; }
.rs-ghost:hover { background: var(--line2); }
.rs-textbtn { height: 36px; padding: 0 8px; font: 500 12px/1 var(--body); color: var(--dim); white-space: nowrap; transition: color .14s; }
.rs-field { position: relative; height: 40px; border-radius: 12px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); display: flex; align-items: center; transition: box-shadow .15s; }
.rs-field:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line2) 40%, var(--accent)); }
.rs-field .ic { position: absolute; left: 12px; top: 50%; margin-top: -7.5px; color: var(--dim); }
.rs-field input { width: 100%; height: 100%; padding: 0 12px; font: 400 13px/1 var(--body); color: var(--text); }
.rs-field--icon input { padding-left: 34px; }

/* chips: a wrapping row of pills with one selected (chipRow, Controls.choice) */
.rs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-chip { height: 30px; padding: 0 13px; border-radius: 15px; background: var(--bg2); color: var(--text2); font: 500 12px/1 var(--body); white-space: nowrap; transition: background .16s, color .16s; }
.rs-chip:hover { background: var(--bg3); color: var(--text); }
.rs-chip[aria-pressed="true"] { background: var(--text); color: var(--ink); }
/* small tinted chips (chat "changed", review meta) */
.rs-tag { height: 24px; padding: 0 9px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; font: 500 11px/1 var(--body); white-space: nowrap;
  color: var(--c, var(--ai)); background: color-mix(in srgb, var(--c, var(--ai)) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--ai)) 40%, transparent); }
.rs-tag i { width: 10px; height: 10px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(14,13,19,.7); }

/* room header: 58 tall */
.rs-head { position: absolute; inset: 0 0 auto; height: 58px; padding: 0 16px; }
.rs-head h2 { position: absolute; left: 16px; top: 16px; height: 30px; display: flex; align-items: center; font: 700 24px/1 var(--display); }
.rs-head__count { position: absolute; right: 16px; top: 22px; height: 16px; display: flex; align-items: center; font: 400 11px/1 var(--body); color: var(--dim); }
.rs-head__reset { position: absolute; right: 16px; top: 16px; width: 66px; height: 28px; border-radius: 14px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); font: 500 12px/1 var(--body); color: var(--text2); text-align: center; transition: background .14s; }
.rs-head__reset:hover { background: var(--bg3); }
.rs-head--reset .rs-head__count { right: 90px; }
.rs-room { position: absolute; inset: 58px 0 0; }
.rs-room__in { padding: 4px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.rs-panel { background: var(--bg1); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Chat ---------- */
.rs-page--chat { display: flex; flex-direction: column; }
.rs-chat { position: relative; inset: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rs-chat__in { flex: 1 0 auto; padding: 18px 16px 10px; display: flex; flex-direction: column; gap: 14px; }
.rs-chat__in.has-msgs { justify-content: flex-end; }
.rs-dock { position: relative; flex: none; padding: 8px 16px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg0); }
.rs-welcome { display: flex; flex-direction: column; }
.rs-halo { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; color: var(--ink); background: linear-gradient(140deg, var(--fill-a), var(--fill-b)); }
.rs-welcome h1 { margin-top: 22px; font: 700 32px/1 var(--display); }
.rs-welcome h1 em { font-style: normal; color: var(--accent); }
.rs-welcome__lede { margin-top: 10px; font: 400 13px/1.35 var(--body); color: var(--text2); }
.rs-welcome .rs-eyebrow { margin-top: 22px; }
.rs-welcome .rs-chips { margin-top: 8px; }
.rs-preset { height: 30px; padding: 0 12px; border-radius: 15px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); font: 500 12px/1 var(--body); color: var(--text); white-space: nowrap; transition: background .14s, box-shadow .14s; }
.rs-preset:hover { background: var(--bg3); box-shadow: inset 0 0 0 1px var(--line2); }
.rs-starters { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rs-starter { position: relative; height: 56px; border-radius: 16px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); transition: background .14s, box-shadow .14s; }
.rs-starter:hover { background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line2); }
.rs-starter__disc { position: absolute; left: 12px; top: 12px; width: 32px; height: 32px; border-radius: 11px; background: var(--bg3); display: grid; place-items: center; color: var(--accent); }
.rs-starter:nth-child(4) .rs-starter__disc { color: var(--accent2); }
.rs-starter__t { position: absolute; left: 56px; right: 36px; top: 0; bottom: 0; display: flex; align-items: center; font: 400 13px/1.25 var(--serif); color: var(--text); }
.rs-starter > .ic { position: absolute; right: 14px; top: 21px; color: var(--dim); }
.rs-scriptlink { margin-top: 18px; height: 20px; font: 500 12px/20px var(--body); color: var(--text2); text-align: left; }
.rs-scriptlink span { color: var(--accent); }

.rs-msgs { display: flex; flex-direction: column; gap: 16px; }
.rs-msg { animation: rsMsg .32s cubic-bezier(.22,1,.36,1); }
@keyframes rsMsg { from { opacity: 0; transform: translateY(14px); } }
.rs-msg--you { display: flex; justify-content: flex-end; }
.rs-bubble { max-width: 80%; padding: 10px 14px 11px; border-radius: 16px; background: #4F312E; font: 400 14px/1.3 var(--body); color: var(--text); overflow-wrap: anywhere; }
.rs-who { display: flex; align-items: center; gap: 8px; height: 22px; font: 700 11px/1 var(--body); color: var(--text2); }
.rs-who span { color: var(--dim); font-weight: 700; }
.rs-av { width: 22px; height: 22px; border-radius: 11px; background: rgba(185,167,255,.18); display: grid; place-items: center; color: var(--ai); flex: none; }
.rs-said { margin-top: 8px; font: 400 14px/1.45 var(--serif); color: var(--text); }
.rs-msg .rs-chips { margin-top: 10px; }
.rs-typing { height: 28px; display: flex; gap: 6px; align-items: flex-start; }
.rs-typing i { width: 6px; height: 6px; border-radius: 3px; background: var(--text2); margin-top: 9px; animation: rsDot 1.1s ease-in-out infinite; }
.rs-typing i:first-of-type { margin-left: 4px; }
.rs-typing i:nth-of-type(2) { animation-delay: .14s; }
.rs-typing i:nth-of-type(3) { animation-delay: .28s; }
@keyframes rsDot { 0%, 60%, 100% { transform: none; opacity: .45; } 25% { transform: translateY(-5px); opacity: 1; } }

/* progress + review cards (dock) */
.rs-card { background: var(--bg1); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.rs-card:active { transform: none; }
.rs-card--done { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 65%, var(--good)); }
.rs-card--error { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 65%, var(--bad)); }
.rs-card--review { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 60%, var(--ai)); }
.rs-card__head { position: relative; height: 34px; }
.rs-card__eyebrow { font: 700 10px/12px var(--body); color: var(--accent); }
.rs-card__title { position: absolute; left: 0; right: 90px; top: 15px; height: 19px; font: italic 400 14px/19px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-card__cancel { position: absolute; right: 0; top: 3px; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--bg3); font: 500 12px/1 var(--body); color: var(--text2); transition: background .14s; }
.rs-card__cancel:hover { background: color-mix(in srgb, var(--bg3) 65%, var(--bad)); }
.rs-rail { position: relative; height: 40px; }
.rs-rail__track { position: absolute; left: 8px; right: 8px; top: 7px; height: 2px; background: var(--line2); }
.rs-rail__track i { display: block; height: 100%; background: linear-gradient(90deg, var(--fill-a), var(--fill-b)); transition: width .5s; }
.rs-node { position: absolute; top: 0; width: 16px; height: 16px; margin-left: -8px; border-radius: 8px; background: var(--bg1); box-shadow: inset 0 0 0 2px var(--line2); display: grid; place-items: center; z-index: 2; color: var(--ink); transition: background .25s, box-shadow .25s; }
.rs-node b { position: absolute; left: 50%; top: 23px; width: 60px; margin-left: -30px; text-align: center; font: 500 10px/14px var(--body); color: var(--dim); }
.rs-node.is-done { background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.rs-node.is-done b, .rs-node.is-now b { color: var(--text); }
.rs-node.is-now { box-shadow: inset 0 0 0 2px var(--accent); }
.rs-node.is-now::after { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--accent); animation: rsPulse 1.05s ease-in-out infinite; }
.rs-node.is-failed { box-shadow: inset 0 0 0 2px var(--bad); }
.rs-node.is-failed b { color: var(--bad); }
@keyframes rsPulse { 50% { transform: scale(1.5); } }
.rs-node .ic { visibility: hidden; }
.rs-node.is-done .ic { visibility: visible; }
.rs-step { display: flex; justify-content: space-between; gap: 8px; font: 400 12px/16px var(--body); color: var(--text2); }
.rs-step span:last-child { font: 500 12px/16px var(--mono); }
.rs-card__btns { display: flex; align-items: center; gap: 8px; }
.rs-card__btns .rs-ghost--sq { width: 36px; padding: 0; }
.rs-filmer { border-radius: 12px; padding: 10px 12px; background: rgba(255,200,87,.1); box-shadow: inset 0 0 0 1px rgba(255,200,87,.35); display: flex; flex-direction: column; gap: 8px; }
.rs-filmer p { display: flex; gap: 8px; font: 400 12px/1.3 var(--body); color: var(--text); }
.rs-filmer p .ic { color: var(--warn); margin-top: 1px; }
.rs-filmer .rs-solid { align-self: flex-start; height: 32px; background: var(--warn); }
.rs-review__eyebrow { font: 700 10px/1.2 var(--body); color: var(--ai); }
.rs-review__title { margin-top: 3px; font: 700 18px/1.1 var(--display); }
.rs-review__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-script { height: 180px; border-radius: 12px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.rs-script textarea { width: 100%; height: 100%; padding: 12px 12px 12px 14px; font: 400 14px/1.5 var(--serif); color: var(--text); scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.rs-hint { font: 400 11px/1.3 var(--body); color: var(--dim); }
.rs-review__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-review__btns .rs-textbtn:hover { color: var(--bad); }

/* mode switch + composer */
.rs-mode { position: relative; height: 30px; display: flex; align-items: center; justify-content: space-between; }
.rs-seg { position: relative; height: 30px; padding: 3px; border-radius: 15px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); display: flex; gap: 2px; }
.rs-seg button { position: relative; z-index: 2; height: 24px; padding: 0 12px; border-radius: 12px; font: 500 12px/1 var(--body); color: var(--dim); transition: color .15s, background .22s; }
.rs-seg button[aria-pressed="true"] { color: var(--text); background: var(--bg3); }
.rs-voice-note { height: 26px; font: 500 11px/26px var(--body); color: var(--dim); white-space: nowrap; }
.rs-voice-note span { color: var(--text); }
.rs-composer { position: relative; min-height: 54px; border-radius: 20px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s; }
.rs-composer:focus-within { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line2) 40%, var(--accent)); }
.rs-composer textarea { display: block; width: calc(100% - 66px); margin-left: 16px; height: 54px; padding: 17px 0 0; font: 400 14px/18px var(--body); color: var(--text); overflow: hidden; }
.rs-composer--script { height: 150px; }
.rs-composer--script textarea { width: calc(100% - 32px); height: 150px; padding: 15px 0 9px; overflow-y: auto; }
.rs-send { position: absolute; right: 9px; bottom: 9px; width: 36px; height: 36px; border-radius: 18px; background: var(--bg3); color: var(--dim); display: grid; place-items: center; transition: transform .08s; }
.rs-send.is-ready { background: linear-gradient(135deg, var(--fill-a), var(--fill-b)); color: var(--ink); }
.rs-send:active { transform: scale(.9); }
.rs-filmbtn { height: 44px; border-radius: 22px; background: linear-gradient(110deg, var(--fill-a), var(--fill-b)); color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 8px; font: 700 13px/1 var(--body); }
.rs-filmbtn:active { transform: scale(.985); }

/* ---------- Voices ---------- */
.rs-quote { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.rs-quote q { font: italic 400 13px/1.4 var(--serif); color: var(--text2); quotes: "\201C" "\201D"; }
.rs-quote p { font: 400 11px/1.3 var(--body); color: var(--dim); }
.rs-quote p b { color: var(--dim); }
.rs-setcard { padding: 0 14px; }
.rs-set { position: relative; padding: 15px 0; }
.rs-set + .rs-set { box-shadow: inset 0 1px var(--line); }
.rs-set__label { font: 500 13px/1.3 var(--body); color: var(--text); }
.rs-set__hint { font: 400 11px/1.35 var(--body); color: var(--dim); }
.rs-set--toggle .rs-set__label, .rs-set--toggle .rs-set__hint { padding-right: 60px; }
.rs-set--slider .rs-set__label { padding-right: 80px; }
.rs-set--color .rs-set__label { padding-right: 130px; min-height: 20px; }
.rs-set .rs-chips { margin-top: 9px; }
.rs-set .rs-field { margin-top: 9px; }
.rs-set__hint { margin-top: 0; }
.rs-set--choice .rs-set__hint, .rs-set--text .rs-set__hint, .rs-set--looks .rs-set__hint { margin-top: 0; }
.rs-toggle { position: absolute; right: 0; top: 13px; width: 44px; height: 24px; border-radius: 12px; background: var(--bg3); transition: background .2s; }
.rs-toggle i { position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 9px; background: var(--text2); transition: left .22s cubic-bezier(.34,1.56,.64,1), background .22s; }
.rs-toggle[aria-checked="true"] { background: var(--accent); }
.rs-toggle[aria-checked="true"] i { left: 23px; background: var(--ink); }
.rs-set--toggle .rs-set__label + .rs-set__hint, .rs-set--toggle .rs-set__label { min-height: 0; }
.rs-set--toggle > .rs-set__label { min-height: 22px; }
.rs-slider__val { position: absolute; right: 0; top: 16px; height: 16px; font: 500 12px/16px var(--mono); color: var(--text2); }
.rs-slider { position: relative; height: 28px; margin-top: 9px; cursor: pointer; touch-action: none; }
.rs-slider__track { position: absolute; left: 8px; right: 8px; top: 12px; height: 4px; border-radius: 2px; background: var(--bg3); }
.rs-slider__fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: linear-gradient(90deg, var(--fill-a), var(--fill-b)); }
.rs-slider__knob { position: absolute; top: 2px; width: 16px; height: 16px; margin: -6px 0 0 -8px; border-radius: 8px; background: var(--text); box-shadow: 0 0 0 3px var(--bg0); transition: width .12s, height .12s, margin .12s; }
.rs-slider:hover .rs-slider__knob { width: 18px; height: 18px; margin: -7px 0 0 -9px; }
.rs-slider.is-drag .rs-slider__knob { width: 20px; height: 20px; margin: -8px 0 0 -10px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bg0) 50%, var(--accent)); }
.rs-color { position: absolute; right: 0; top: 11px; height: 28px; display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); color: var(--text2); }
.rs-swatch { width: 28px; height: 28px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--line2); }
.rs-palette { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.rs-palette + .rs-field { width: 120px; height: 32px; margin-top: 10px; }
.rs-palette + .rs-field input { font: 500 12px/1 var(--mono); }
.rs-voice { position: relative; height: 70px; border-radius: 16px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; cursor: pointer; transition: background .18s, box-shadow .18s; }
.rs-voice:hover { background: var(--bg2); }
.rs-voice.is-on { background: #1E1820; box-shadow: inset 0 0 0 1px #C35E3E; }
.rs-voice__play { position: absolute; left: 12px; top: 13px; width: 44px; height: 44px; border-radius: 22px; background: var(--bg3); display: grid; place-items: center; color: var(--text); transition: background .18s; }
.rs-voice__play:hover { background: var(--line2); }
.rs-voice__play .ic { margin-left: 2px; }
.rs-voice.is-playing .rs-voice__play { background: var(--accent); color: var(--ink); }
.rs-voice.is-playing .rs-voice__play .ic { margin-left: 0; }
.rs-voice__name { position: absolute; left: 68px; right: 72px; top: 14px; height: 20px; display: flex; align-items: center; gap: 8px; }
.rs-voice__name > span { font: 500 14px/1 var(--body); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.rs-voice.is-on .rs-voice__name > span { font-weight: 700; color: var(--text); }
.rs-badge { height: 18px; padding: 0 7px; border-radius: 9px; display: inline-flex; align-items: center; gap: 4px; background: rgba(255,122,69,.15); color: var(--accent); font: 700 9px/1 var(--body); white-space: nowrap; }
.rs-eq { display: none; width: 20px; height: 16px; align-items: flex-end; gap: 2px; }
.rs-eq i { width: 3px; height: 6px; border-radius: 1px; background: var(--accent); animation: rsEq .5s ease-in-out infinite alternate; }
.rs-eq i:nth-child(2) { animation-delay: -.2s; } .rs-eq i:nth-child(3) { animation-delay: -.35s; } .rs-eq i:nth-child(4) { animation-delay: -.1s; }
@keyframes rsEq { to { height: 15px; } }
.rs-voice.is-playing .rs-eq { display: flex; }
.rs-voice__meta { position: absolute; left: 68px; right: 72px; top: 38px; height: 16px; font: 400 11px/16px var(--body); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-voice__check { position: absolute; right: 14px; top: 22px; width: 26px; height: 26px; border-radius: 13px; background: var(--accent); color: var(--ink); display: none; place-items: center; }
.rs-voice.is-on .rs-voice__check { display: grid; }
.rs-voice__use { position: absolute; right: 16px; top: 27px; font: 500 11px/16px var(--body); color: var(--dim); }
.rs-voice.is-on .rs-voice__use { display: none; }
.rs-voice__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--bg3); display: none; }
.rs-voice__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--fill-a), var(--fill-b)); }
.rs-voice.is-playing .rs-voice__bar { display: block; }
.rs-voice.is-playing .rs-voice__bar i { animation: rsBar var(--secs, 7s) linear forwards; }
@keyframes rsBar { to { width: 100%; } }
.rs-say { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rs-say__top { display: flex; gap: 10px; align-items: flex-start; }
.rs-say__disc { width: 32px; height: 32px; border-radius: 11px; background: rgba(185,167,255,.18); color: var(--ai); display: grid; place-items: center; flex: none; }
.rs-say__top h3 { font: 700 13px/1.2 var(--body); }
.rs-say__top p { margin-top: 2px; font: 400 11px/1.3 var(--body); color: var(--dim); }
.rs-say__top p b { color: var(--dim); }
.rs-say .rs-field { height: 64px; align-items: flex-start; }
.rs-say textarea { width: 100%; height: 100%; padding: 10px 12px; font: 400 13px/1.25 var(--body); color: var(--text); }
.rs-say__bottom { display: flex; align-items: center; justify-content: flex-end; height: 36px; }
.rs-say .rs-solid { background: var(--ai); color: var(--ink); }

/* ---------- Cast ---------- */
.rs-summary { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rs-summary__l { display: flex; gap: 8px; align-items: flex-start; font: 400 12px/1.3 var(--body); color: var(--text2); }
.rs-summary__l:first-child { align-items: center; height: 20px; font-weight: 500; }
.rs-summary__l:first-child b { color: var(--text); }
.rs-summary__l:first-child b.is-auto { color: var(--accent2); }
.rs-summary__l .ic { flex: none; margin-top: 1px; }
.rs-summary__l .is-dim { color: var(--dim); }
.rs-summary__clear { align-self: flex-start; height: 24px; font: 500 11px/24px var(--body); color: var(--accent); }
.rs-sec { display: flex; flex-direction: column; gap: 8px; }
.rs-sec__t { height: 18px; display: flex; align-items: center; gap: 8px; color: var(--dim); }
.rs-sec__t span { font: 700 10px/1 var(--body); }
.rs-sec > p { font: 400 11px/1.3 var(--body); color: var(--dim); }
.rs-add { position: relative; height: 40px; }
.rs-add .rs-field { position: absolute; left: 0; right: 92px; top: 0; height: 40px; }
.rs-add .rs-solid { position: absolute; right: 0; top: 0; width: 84px; height: 40px; border-radius: 20px; }
.rs-grid { display: grid; grid-template-columns: repeat(3, 122px); gap: 10px; }
.rs-char { position: relative; height: 192px; border-radius: 14px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: background .12s, box-shadow .12s; }
.rs-char:hover { background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line2); }
.rs-char__pic { height: 152px; background: linear-gradient(#050408, #020204); position: relative; overflow: hidden; display: grid; place-items: center; }
.rs-char__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-char__name { position: absolute; left: 10px; right: 10px; top: 158px; font: 500 12px/1.2 var(--body); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-char__sub { position: absolute; left: 10px; right: 10px; top: 174px; font: 400 10px/14px var(--body); color: var(--dim); white-space: nowrap; }
.rs-char.is-main, .rs-char.is-support { box-shadow: inset 0 0 0 2px var(--accent); }
.rs-char.is-support { box-shadow: inset 0 0 0 2px var(--ai); }
.rs-char.is-main .rs-char__name, .rs-char.is-support .rs-char__name { font-weight: 700; color: var(--text); }
.rs-char.is-main::after, .rs-char.is-support::after { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--accent); pointer-events: none; z-index: 5; }
.rs-char.is-support::after { box-shadow: inset 0 0 0 2px var(--ai); }
.rs-disc { width: 48px; height: 48px; border-radius: 16px; background: rgba(255,176,58,.15); color: var(--accent2); display: grid; place-items: center; position: relative; }
.rs-cbadge { position: absolute; left: 8px; top: 8px; z-index: 4; height: 20px; padding: 0 8px 0 7px; border-radius: 10px; display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: var(--ink); font: 700 9px/1 var(--body); }
.rs-cbadge--ai { background: var(--ai); }
.rs-empty { font: 400 12px/1.3 var(--body); color: var(--dim); text-align: center; }
/* action sheet */
.rs-shade { position: absolute; inset: 0; background: rgba(14,13,19,.55); z-index: 20; animation: rsFade .2s; }
@keyframes rsFade { from { opacity: 0; } }
.rs-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--bg1); border-radius: 22px 22px 0 0; box-shadow: inset 0 0 0 1px var(--line2); padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; animation: rsUp .26s cubic-bezier(.22,1,.36,1); }
@keyframes rsUp { from { transform: translateY(60px); } }
.rs-sheet__grip { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: var(--line2); }
.rs-sheet__head { position: relative; height: 72px; }
.rs-sheet__pic { position: absolute; left: 0; top: 0; width: 48px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--bg2); }
.rs-sheet__pic img { width: 100%; height: 100%; object-fit: cover; }
.rs-sheet__head h3 { position: absolute; left: 60px; right: 0; top: 14px; height: 22px; font: 700 18px/22px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-sheet__head p { position: absolute; left: 60px; right: 0; top: 38px; height: 18px; font: 400 12px/18px var(--body); color: var(--dim); }
.rs-sheetbtn { height: 44px; border-radius: 14px; background: var(--bg2); display: flex; align-items: center; justify-content: center; gap: 8px; font: 500 13px/1 var(--body); color: var(--text); transition: background .14s; }
.rs-sheetbtn:hover { background: var(--bg3); }
.rs-sheetbtn--primary { background: var(--text); color: var(--ink); font-weight: 700; }
.rs-sheetbtn--primary:hover { background: #fff; }
.rs-sheet__cancel { height: 36px; font: 500 12px/1 var(--body); color: var(--dim); text-align: center; }

/* ---------- Options ---------- */
.rs-blurb { height: 18px; display: flex; align-items: center; gap: 8px; color: var(--dim); font: italic 400 12px/1 var(--serif); }
.rs-presets .rs-chips { gap: 8px; }
.rs-presets .rs-preset { height: 32px; padding: 0 13px; border-radius: 16px; }
.rs-presets .rs-preset:hover { background: var(--bg2); }
.rs-capprev { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.rs-capprev > div:first-child { height: 16px; display: flex; align-items: center; gap: 8px; font: 700 10px/1 var(--body); color: var(--dim); }
.rs-capprev > div:first-child span { font-weight: 400; }
.rs-capprev__img { border-radius: 10px; overflow: hidden; background: var(--bg2); aspect-ratio: 540 / 320; }
.rs-capprev__img img { width: 100%; height: 100%; display: block; }
.rs-looks { margin-top: 9px; display: grid; grid-template-columns: repeat(4, 83px); gap: 8px; }
.rs-look { position: relative; height: 171px; border-radius: 12px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: background .14s; }
.rs-look:hover { background: var(--bg2); }
.rs-look__pic { height: 147px; position: relative; display: grid; place-items: center; background: linear-gradient(#050408, #020204); }
.rs-look__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-look__pic .rs-disc { width: 40px; height: 40px; border-radius: 14px; }
.rs-look span { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; font: 500 11px/24px var(--body); color: var(--text2); text-align: center; }
.rs-look__check { position: absolute; left: 6px; top: 6px; z-index: 3; width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--ink); display: none; place-items: center; }
.rs-look[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--accent); pointer-events: none; z-index: 4; }
.rs-look[aria-pressed="true"] span { color: var(--text); }
.rs-look[aria-pressed="true"] .rs-look__check { display: grid; }
.rs-roomlink { position: relative; height: 44px; border-radius: 14px; background: var(--bg1); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 70%, var(--accent)); color: var(--accent); flex: none; transition: background .14s; }
.rs-roomlink:hover { background: var(--bg2); }
.rs-roomlink > .ic:first-child { position: absolute; left: 14px; top: 14px; }
.rs-roomlink > span { position: absolute; left: 40px; right: 30px; top: 0; bottom: 0; display: flex; align-items: center; font: 500 12px/1 var(--body); color: var(--text); }
.rs-roomlink > .ic:last-child { position: absolute; right: 12px; top: 15px; }
.rs-search .rs-field { height: 38px; }
.rs-search__clear { position: absolute; right: 8px; top: 7px; width: 24px; height: 24px; border-radius: 12px; background: var(--bg3); display: grid; place-items: center; color: var(--text2); }
.rs-search__clear .ic { position: static; margin: 0; color: inherit; }

/* ---------- Library ---------- */
.rs-lib { padding: 6px 16px 28px; display: grid; grid-template-columns: repeat(2, 187px); gap: 14px 12px; }
.rs-video { position: relative; height: 330px; border-radius: 16px; background: var(--bg1); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.rs-video:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.rs-video__thumb { position: relative; height: 224px; background: var(--bg2); overflow: hidden; display: block; width: 100%; }
.rs-video__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-video__thumb::after { content: ""; position: absolute; inset: 0; background: var(--bg0); opacity: 0; transition: opacity .18s; }
.rs-video:hover .rs-video__thumb::after { opacity: .55; }
.rs-video__play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 22px; background: var(--text); color: var(--ink); display: grid; place-items: center; opacity: 0; z-index: 2; transition: opacity .18s; }
.rs-video__play .ic { margin-left: 2px; }
.rs-video:hover .rs-video__play { opacity: 1; }
.rs-video__dur { position: absolute; right: 8px; bottom: 8px; z-index: 1; height: 20px; padding: 0 7px; border-radius: 10px; background: rgba(14,13,19,.75); font: 500 10px/20px var(--mono); color: var(--text); }
.rs-video__title { position: absolute; left: 12px; right: 12px; top: 234px; height: 32px; font: 500 13px/16px var(--body); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rs-video__ago { position: absolute; left: 12px; top: 268px; height: 14px; font: 400 10px/14px var(--body); color: var(--dim); }
.rs-video__strip { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; box-shadow: inset 0 1px var(--line); display: grid; grid-template-columns: repeat(3, 1fr); }
.rs-video__strip button { position: relative; display: grid; place-items: center; color: var(--text2); transition: color .12s; }
.rs-video__strip button:last-child { color: var(--dim); }
.rs-video__strip button:hover { background: var(--bg2); color: var(--text); }
.rs-video__strip button + button::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.rs-ask { position: absolute; inset: 0; z-index: 10; background: rgba(14,13,19,.97); padding: 16px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.rs-ask .ic { margin-top: 22%; color: var(--bad); }
.rs-ask h3 { margin-top: 14px; font: 700 13px/1.2 var(--body); }
.rs-ask p { margin-top: 8px; font: 400 11px/1.3 var(--body); color: var(--text2); }
.rs-ask button { width: 100%; height: 34px; border-radius: 17px; font: 500 12px/1 var(--body); text-align: center; }
.rs-ask button:first-of-type { margin-top: 18px; background: var(--bad); color: var(--text); font-weight: 700; }
.rs-ask button:last-of-type { margin-top: 8px; background: var(--bg3); color: var(--text2); }

/* ---------- static slices on the page (hero + how it works) ---------- */
.rs--slice { height: auto; }
.rs--slice .rs-dock, .rs--slice .rs-chat { position: static; }
.rs--slice .rs-dock { padding-top: 0; }
