/* =====================================================================
   리셋홍 — 화면 모양 (클래스 앞머리 rs-) · 게임 HUD (시안 B, 2026-11-12)
   · 다크가 기본, 라이트는 머리띠 단추(html[data-theme="light"]) — 3D 무대는 둘 다 어두운 판
   · 규칙표: docs/시안/규칙표.md — 글자 12·13·15·18·24·36px, 숫자는 mono, 간격 4~48, 모서리 6·10·14, 강조색 하나(라임), 능력치 색은 능력치에만
   · 캐릭터 만들기: 넓으면 왼쪽 3D 무대 + 오른쪽 판, 좁으면 위 무대 + 아래 판
   · 앱: 가운데 600px. 1100px 이상은 왼쪽 HUD(3D·레벨·능력치)·오른쪽 66일 지도. 899px 아래는 탭이 아래 막대
   ===================================================================== */
:root {
  --bg: #07080a; --panel: #0f1215; --panel2: #151a1f; --line: #232931; --line2: #2e353f;
  --t1: #eef0f2; --t2: #a9b0ba; --t3: #8a929d;
  --ac: #b8f35a; --acTx: #b8f35a; --acInk: #142000; --acBg: rgba(184, 243, 90, .1);
  --bad: #ff8a80; --gold: #ffd43b;
  --stage: radial-gradient(70% 80% at 50% 45%, #1a2025 0%, #0c0f12 62%, #07080a 100%);
  --r1: 6px; --r2: 10px; --r3: 14px; --top: 56px;
  --f: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
  font-family: var(--f); color: var(--t1); background: var(--bg);
}
html[data-theme="light"] {
  --bg: #f3f4f6; --panel: #ffffff; --panel2: #f6f7f9; --line: #e0e3e8; --line2: #cfd4db;
  --t1: #15181c; --t2: #4a525c; --t3: #646c76;
  --ac: #3f730c; --acTx: #3a6b0a; --acInk: #ffffff; --acBg: rgba(63, 115, 12, .09);
  --bad: #b3261e; --gold: #9a6b00;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }
body { min-height: 100dvh; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; background: var(--bg); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 24px; } h2 { font-size: 24px; } h3 { font-size: 15px; }
h3 small, h3 em { font-weight: 400; color: var(--t3); font-size: 12px; font-style: normal; margin-left: 6px; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

/* ---------- 머리띠 ---------- */
.rs-top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.rs-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rs-brand svg { width: 22px; height: 22px; fill: none; stroke: var(--ac); stroke-width: 2.4; stroke-linecap: round; }
.rs-brand b { font-size: 16px; font-weight: 800; }
.rs-brand small { font: 600 12px var(--mono); letter-spacing: .08em; color: var(--t3); }
.rs-tabs { display: flex; gap: 4px; margin: 0 auto; }
.rs-tabs button { display: flex; align-items: center; gap: 6px; border: 0; background: none; height: 36px; padding: 0 14px; border-radius: var(--r1); color: var(--t2); font-weight: 600; font-size: 13px; }
.rs-tabs svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rs-tabs button:hover { color: var(--t1); }
.rs-tabs button[aria-current] { color: var(--t1); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--ac); }
.rs-daypill { font: 600 12px var(--mono); letter-spacing: .08em; color: var(--t2); white-space: nowrap; }
.rs-daypill b { color: var(--acTx); font-size: 18px; margin: 0 2px; }
.rs-daypill span { color: var(--t3); }
html[data-theme="light"] .rs-top { background: var(--bg); backdrop-filter: none; }
.rs-tabs[hidden] ~ .rs-icon-btn { margin-left: auto; }
.rs-tabs[hidden] ~ .hc-pill:not([hidden]) { margin-left: auto; }   /* 같이 만들기 [버전] 단추 (vendor/collab) */
.rs-tabs[hidden] ~ .hc-pill:not([hidden]) ~ .rs-icon-btn { margin-left: 0; }
.rs-icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r1); border: 1px solid var(--line); background: none; color: var(--t2); }
.rs-icon-btn:hover { color: var(--t1); border-color: var(--line2); }
.rs-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rs-icon-btn .i-moon { display: none; }
html[data-theme="light"] .rs-icon-btn .i-sun { display: none; }
html[data-theme="light"] .rs-icon-btn .i-moon { display: block; }
.rs-ai-btn { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r1); border: 1px solid var(--ac); background: var(--acBg); color: var(--acTx); font-weight: 700; font-size: 13px; }
.rs-ai-btn svg { width: 16px; height: 16px; fill: currentColor; }
.rs-ai-btn:hover, .rs-ai-btn[aria-pressed="true"] { background: var(--ac); color: var(--acInk); }

/* ---------- 틀 ---------- */
.rs-shell { max-width: 600px; margin: 0 auto; padding: 24px 16px 48px; }
.rs-side { display: none; }
body.rs-making .rs-shell { max-width: 1240px; padding: 24px 24px 48px; }
@media (min-width: 1100px) {
  body.rs-in .rs-shell { max-width: 1400px; display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 620px) minmax(260px, 300px); justify-content: center; gap: 32px; align-items: start; }
  body.rs-in .rs-side:not([hidden]) { display: block; position: sticky; top: calc(var(--top) + 24px); }
}
.rs-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 16px; margin-top: 16px; }
.rs-card > h3 { margin-bottom: 12px; }
.rs-card ul:not([class]) { margin: 0 0 8px; padding-left: 20px; color: var(--t2); }
.rs-card ul:not([class]) li + li { margin-top: 4px; }
.rs-kicker { margin: 0 0 4px; font: 600 12px var(--mono); letter-spacing: .1em; color: var(--acTx); text-transform: uppercase; }
.rs-eyebrow { margin: 0 0 4px; color: var(--acTx); font-weight: 700; font-size: 13px; }
.rs-sub { margin: 8px 0 0; color: var(--t2); }
.rs-sub b { color: var(--t1); }
.rs-mini { margin: 8px 0 0; color: var(--t3); font-size: 13px; }
.rs-mini b { color: var(--t1); }
.rs-fine { color: var(--t3); font-size: 13px; margin: 16px 0 0; }
.rs-fine b { color: var(--acTx); }
.rs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: var(--r2); border: 1px solid var(--line2); background: var(--panel2); font-weight: 700; font-size: 15px; color: var(--t1); }
.rs-btn:hover { border-color: var(--t3); }
.rs-btn-main { background: var(--ac); border-color: var(--ac); color: var(--acInk); font-weight: 800; }
.rs-btn-main:hover { filter: brightness(1.08); border-color: var(--ac); }
.rs-btn-main:disabled { background: var(--line); border-color: var(--line); color: var(--t3); cursor: not-allowed; filter: none; }
.rs-btn-lg { min-height: 52px; padding: 0 28px; font-size: 18px; }
.rs-btn-soft { background: var(--acBg); border-color: var(--ac); color: var(--acTx); }
.rs-btn-bad { color: var(--bad); }
.rs-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rs-link { background: none; border: 0; color: var(--t3); text-decoration: underline; font-size: 13px; padding: 4px; }
.rs-chip { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--c); }
.rs-code { font-style: normal; font: 700 11px/1 var(--mono); letter-spacing: .04em; padding: 2px 4px; margin-right: 4px; border-radius: 4px; border: 1px solid currentColor; color: var(--c, var(--t3)); vertical-align: 1px; }
html[data-theme="light"] .rs-code, html[data-theme="light"] .rs-chip { color: color-mix(in srgb, var(--c) 62%, #000); }

/* ---------- 3D 무대 ---------- */
.rs-slot { position: relative; background: var(--stage); border: 1px solid #1d2329; border-radius: var(--r3); overflow: hidden; isolation: isolate; }
.rs-slot::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(transparent 0 49.5%, rgba(184, 243, 90, .035) 50%, transparent 50.5%) 0 0 / 100% 6px; z-index: 1; }
.rs-stage { position: absolute; inset: 0; }
.rs-stage-svg { height: 100%; display: grid; place-items: center; }
.rs-stage-tag { position: absolute; left: 12px; bottom: 10px; z-index: 2; margin: 0; font: 12px var(--mono); color: #8a929d; letter-spacing: .04em; pointer-events: none; }
.rs-stage-name { position: absolute; left: 16px; top: 12px; z-index: 2; margin: 0; font: 800 18px var(--f); color: #eef0f2; pointer-events: none; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 타이틀 ---------- */
.rs-title { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; min-height: calc(100dvh - var(--top) - 72px); }
.rs-title-stage { height: min(640px, calc(100dvh - var(--top) - 72px)); min-height: 420px; }
.rs-title h1 { font-size: 36px; line-height: 1.15; letter-spacing: -.03em; }
.rs-lead { color: var(--t2); margin: 16px 0 0; max-width: 30em; }
.rs-flow { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.rs-flow li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rs-flow b { font: 700 13px var(--mono); color: var(--acTx); }
.rs-flow span { color: var(--t2); }
.rs-title-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- 캐릭터 만들기 (5장) ---------- */
.rs-ob { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 32px; align-items: start; }
.rs-ob-stage { position: sticky; top: calc(var(--top) + 24px); height: min(680px, calc(100dvh - var(--top) - 48px)); min-height: 440px; }
.rs-ob-panel { min-width: 0; }
.rs-ob-head h2 { margin-top: 4px; }
.rs-chap { list-style: none; display: flex; gap: 4px; margin: 12px 0 0; padding: 0; }
.rs-chap li { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.rs-chap li.is-done { background: color-mix(in srgb, var(--ac) 55%, var(--line)); }
.rs-chap li.is-now { background: var(--ac); }
.rs-ob-body { margin-top: 16px; }
.rs-ob-foot { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.rs-ob-why { flex: 1; text-align: right; color: var(--t3); font-size: 13px; }
.rs-h3 { margin-top: 24px; }

/* 고르기 */
.rs-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-pick { position: relative; min-height: 40px; padding: 0 14px; border-radius: var(--r1); border: 1px solid var(--line2); background: var(--panel); font-size: 15px; color: var(--t2); }
.rs-pick:hover { border-color: var(--t3); color: var(--t1); }
.rs-pick[aria-pressed="true"] { border-color: var(--ac); background: var(--acBg); color: var(--t1); font-weight: 700; box-shadow: inset 3px 0 0 var(--ac); }
.rs-pick-bad[aria-pressed="true"] { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); box-shadow: inset 3px 0 0 var(--bad); }
.rs-order { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: var(--ac); color: var(--acInk); font: 800 12px var(--mono); margin-right: 6px; }
.rs-field { display: block; margin-top: 16px; min-width: 0; }
.rs-field > span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 8px; color: var(--t2); }
.rs-field em { font-style: normal; font-weight: 400; color: var(--t3); font-size: 12px; margin-left: 4px; }
.rs-field input, .rs-field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--panel); color: var(--t1); }
.rs-field input:focus, .rs-field textarea:focus { border-color: var(--ac); outline: none; }
.rs-field textarea { resize: vertical; min-height: 60px; }
.rs-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs-row3 { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 24px; justify-content: start; }
.rs-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-swatches button { width: 32px; height: 32px; border-radius: var(--r1); border: 2px solid var(--panel); background: var(--c); box-shadow: 0 0 0 1px var(--line2); }
.rs-swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ac); }

/* 능력치 측정: 상황 하나씩 */
.rs-event { border: 1px solid var(--line); border-left: 3px solid var(--c, var(--ac)); border-radius: var(--r2); background: var(--panel); padding: 20px; animation: rs-in .25s ease-out; }
.rs-event-tag { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 12px var(--mono); letter-spacing: .06em; color: var(--t3); }
.rs-event-tag b { color: var(--acTx); }
.rs-event-tag em { font-style: normal; color: var(--t2); letter-spacing: 0; font-family: var(--f); margin-left: 8px; }
.rs-event-tag .rs-code { margin-left: auto; }
.rs-event h3 { font-size: 24px; margin: 12px 0 16px; }
.rs-event.is-end h3 { margin-bottom: 0; }
.rs-choices { display: grid; gap: 8px; }
.rs-choices button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; text-align: left; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--panel2); color: var(--t1); font-size: 15px; transition: border-color .12s, transform .12s; }
.rs-choices button b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r1); border: 1px solid var(--line2); font: 700 12px var(--mono); color: var(--t2); }
.rs-choices button:hover { border-color: var(--ac); transform: translateX(2px); }
.rs-choices button:hover b { border-color: var(--ac); color: var(--acTx); }
.rs-choices button[aria-checked="true"] { border-color: var(--ac); background: var(--acBg); }
.rs-choices button[aria-checked="true"] b { background: var(--ac); border-color: var(--ac); color: var(--acInk); }
.rs-choices button.is-pick { animation: rs-pick .38s ease-out; }
.rs-measure { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r2); }
.rs-live { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; }
.rs-live li { display: grid; grid-template-columns: 34px 1fr 24px; gap: 8px; align-items: center; font: 600 12px var(--mono); }
.rs-live span { color: var(--c); }
html[data-theme="light"] .rs-live span { color: color-mix(in srgb, var(--c) 62%, #000); }
.rs-live i { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rs-live i b { display: block; height: 100%; background: var(--c); transition: width .4s; }
.rs-live em { font-style: normal; text-align: right; color: var(--t2); }
.rs-dots { display: flex; gap: 4px; margin-top: 16px; }
.rs-dots button { flex: 1; height: 24px; border: 0; padding: 0; background: none; position: relative; }
.rs-dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--line); }
.rs-dots button.is-done::before { background: color-mix(in srgb, var(--ac) 60%, var(--line)); }
.rs-dots button.is-now::before { background: var(--ac); top: 8px; height: 8px; }

/* 캐릭터 탄생 */
.rs-born { padding: 4px 0 8px; }
.rs-born-name { margin: 4px 0 0; font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; }
.rs-type { margin: 8px 0 0; font-size: 18px; color: var(--t2); }
.rs-type b { color: var(--acTx); margin-right: 4px; }
.rs-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.rs-ladder li { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.rs-ladder li:first-child { border-top: 0; }
.rs-ladder span { color: var(--t3); font-size: 13px; }
.rs-ob-s4 .rs-stats li { animation: rs-in .4s ease-out backwards; }
.rs-ob-s4 .rs-stats li:nth-child(2) { animation-delay: .08s; } .rs-ob-s4 .rs-stats li:nth-child(3) { animation-delay: .16s; }
.rs-ob-s4 .rs-stats li:nth-child(4) { animation-delay: .24s; } .rs-ob-s4 .rs-stats li:nth-child(5) { animation-delay: .32s; } .rs-ob-s4 .rs-stats li:nth-child(6) { animation-delay: .4s; }

/* ---------- 능력치 ---------- */
.rs-stats { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.rs-stats li { display: grid; grid-template-columns: 9.2em 1fr 3.6em; gap: 12px; align-items: center; font-size: 13px; }
.rs-st-n { white-space: nowrap; }
.rs-st-bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); }
.rs-st-bar i { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.rs-need { position: absolute; top: -4px; width: 3px; height: 16px; margin-left: -1.5px; border-radius: 2px; background: var(--t1); opacity: .7; }
.rs-need-dot { display: inline-block; width: 3px; height: 12px; background: var(--t1); opacity: .7; border-radius: 2px; vertical-align: -1px; }
.rs-st-v { text-align: right; font: 700 13px var(--mono); }
.rs-st-v em { font-style: normal; color: var(--acTx); font-size: 12px; margin-left: 2px; }
.rs-rank { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; border-radius: 4px; font: 800 12px/1 var(--mono); border: 1px solid var(--line2); color: var(--t2); }
.rs-rank[data-r="B"], .rs-rank[data-r="A"] { border-color: var(--t1); color: var(--t1); }
.rs-rank[data-r="S"] { background: var(--ac); border-color: var(--ac); color: var(--acInk); }
.rs-lv { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; margin: 12px 0 0; }
.rs-lv-n { display: flex; align-items: baseline; gap: 6px; font-family: var(--mono); grid-row: span 2; }
.rs-lv-n small { color: var(--t3); font-size: 12px; letter-spacing: .08em; }
.rs-lv-n b { font-size: 36px; line-height: 1; color: var(--acTx); }
.rs-lv-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; align-self: end; }
.rs-lv-bar i { display: block; height: 100%; background: var(--ac); transition: width .5s; }
.rs-lv-x { font: 12px var(--mono); color: var(--t3); }
.rs-seg { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.rs-seg li { display: grid; grid-template-columns: 34px 1fr 20px; gap: 8px; align-items: center; font: 600 12px var(--mono); }
.rs-seg span { color: var(--c); }
html[data-theme="light"] .rs-seg span { color: color-mix(in srgb, var(--c) 62%, #000); }
.rs-seg i { display: flex; gap: 2px; }
.rs-seg i b { flex: 1; height: 8px; border-radius: 1px; background: var(--line); }
.rs-seg i b.on { background: var(--c); }
.rs-seg em { font-style: normal; text-align: right; color: var(--t1); }

/* ---------- HUD (캐릭터 요약) ---------- */
.rs-hud { margin-bottom: 24px; }
.rs-hud-stage { height: 380px; }
.rs-side-l .rs-hud-stage { height: min(440px, calc(100dvh - 420px)); min-height: 300px; }
.rs-hud-info { padding: 16px 4px 0; }
.rs-hud-name { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rs-side-l .rs-hud { margin: 0; }

/* ---------- 오늘 ---------- */
.rs-day-head h1 { font-size: 24px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.rs-count { font: 700 18px var(--mono); color: var(--acTx); }
.rs-prog { list-style: none; display: flex; gap: 4px; margin: 16px 0 0; padding: 0; }
.rs-prog li { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.rs-prog li.on { background: var(--ac); }
.rs-quests { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.rs-quest { position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: var(--r2); transition: opacity .2s; }
.rs-quest.is-habit { border-color: color-mix(in srgb, var(--ac) 40%, var(--line)); border-left-color: var(--c); }
.rs-quest-b { padding: 16px 16px 0; min-width: 0; }
.rs-quest-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; color: var(--t3); }
.rs-quest-tag > b { font: 700 12px var(--mono); letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; }
.rs-tag-main { background: var(--ac); color: var(--acInk); }
.rs-tag-ai { border: 1px solid var(--ac); color: var(--acTx); }
.rs-tag-side { border: 1px solid var(--line2); color: var(--t2); }
.rs-quest-tag > span:not(.rs-chip) { font-family: var(--mono); }
.rs-quest h3 { font-size: 18px; overflow-wrap: anywhere; }
.rs-quest-d { margin: 4px 0 0; color: var(--t2); font-size: 13px; overflow-wrap: anywhere; }
.rs-steps { margin: 8px 0 0; padding: 0 0 0 1.4em; color: var(--t2); font-size: 13px; display: grid; gap: 4px; }
.rs-steps li { overflow-wrap: anywhere; padding-left: 2px; }
.rs-steps li::marker { color: var(--t3); font-family: var(--mono); font-size: 12px; }
.rs-quest-ok { margin: 8px 0 0; font-size: 13px; color: var(--t2); overflow-wrap: anywhere; }
.rs-quest-ok b { color: var(--t1); margin-right: 4px; }
.rs-quest-f { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.rs-loot { margin: 0 auto 0 0; font: 600 12px var(--mono); color: var(--t2); min-width: 0; }
.rs-loot span { color: var(--t3); margin-right: 6px; font-family: var(--f); }
.rs-loot b { color: var(--acTx); }
.rs-check-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r2); border: 1px solid var(--ac); background: none; color: var(--acTx); font-weight: 800; font-size: 15px; flex: none; }
.rs-check-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rs-check-btn:hover { background: var(--acBg); }
.rs-check-btn[aria-pressed="true"] { background: var(--ac); color: var(--acInk); }
.rs-swap { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: var(--r2); border: 1px solid var(--line2); background: none; color: var(--t2); font-size: 13px; flex: none; }
.rs-swap svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rs-swap:hover { color: var(--t1); border-color: var(--t3); }
.rs-quest.is-done { opacity: .6; }
.rs-quest.is-done h3 { text-decoration: line-through; text-decoration-color: var(--t3); }
.rs-quest.is-done .rs-steps { display: none; }
.rs-coach { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 24px; padding: 16px; border-radius: var(--r2); border: 1px solid color-mix(in srgb, var(--ac) 45%, var(--line)); background: var(--acBg); }
.rs-coach-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r2); background: var(--ac); color: var(--acInk); }
.rs-coach-ic svg { width: 18px; height: 18px; fill: currentColor; }
.rs-coach b { font-size: 15px; }
.rs-coach p { margin: 2px 0 0; font-size: 13px; color: var(--t2); }
.rs-reward { margin: 16px 0 0; font-size: 13px; color: var(--t3); }
.rs-reward b { color: var(--gold); }
.rs-moods .rs-pick { flex: 1 1 auto; }

/* ---------- 캐릭터 ---------- */
.rs-hero h1 { font-size: 36px; }
.rs-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rs-items li { border: 1px dashed var(--line2); border-radius: var(--r2); padding: 12px 8px; text-align: center; color: var(--t3); }
.rs-items li.is-on { border-style: solid; border-color: var(--gold); color: var(--t1); }
.rs-items b { display: block; font-family: var(--mono); color: var(--gold); }
.rs-items span { display: block; font-size: 13px; }
.rs-items small { display: block; font-size: 12px; margin-top: 2px; }

/* ---------- 66일 ---------- */
.rs-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 8px; }
.rs-kpis div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r2); padding: 12px; }
.rs-kpis b { display: block; font: 700 24px var(--mono); color: var(--acTx); }
.rs-kpis span { font-size: 12px; color: var(--t3); }
.rs-phase { margin-top: 24px; }
.rs-phase h3 { margin-bottom: 8px; }
.rs-phase h3 small { display: block; margin: 2px 0 0; }
.rs-phase.is-now h3 { color: var(--acTx); }
.rs-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.rs-cell { aspect-ratio: 1; border-radius: var(--r1); display: grid; place-items: center; font: 12px var(--mono); background: var(--panel2); color: var(--t3); }
.rs-cell.k-all { background: var(--ac); color: var(--acInk); font-weight: 700; }
.rs-cell.k-habit { background: color-mix(in srgb, var(--ac) 45%, var(--panel2)); color: var(--t1); }
.rs-cell.k-some { background: color-mix(in srgb, var(--ac) 16%, var(--panel2)); color: var(--t2); }
.rs-cell.k-miss { background: color-mix(in srgb, var(--bad) 14%, var(--panel2)); color: var(--t3); }
.rs-cell.k-future { background: transparent; border: 1px dashed var(--line); }
.rs-cell.today { box-shadow: 0 0 0 2px var(--gold); font-weight: 700; }
.rs-grid-sm { grid-template-columns: repeat(11, 1fr); gap: 3px; }
.rs-grid-sm .rs-cell { border-radius: 2px; font-size: 0; }
.rs-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 16px 0 0; font-size: 12px; color: var(--t3); }
.rs-legend span { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: -6px; }
.rs-legend .k-all { background: var(--ac); } .rs-legend .k-habit { background: color-mix(in srgb, var(--ac) 45%, var(--panel2)); } .rs-legend .k-some { background: color-mix(in srgb, var(--ac) 16%, var(--panel2)); }
.rs-legend .k-miss { background: color-mix(in srgb, var(--bad) 14%, var(--panel2)); } .rs-legend .k-future { border: 1px dashed var(--t3); }
.rs-mini-map { margin-top: 0; }

/* ---------- 기록 ---------- */
.rs-log { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.rs-log li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rs-log-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 0; }
.rs-log-h b { font-family: var(--mono); color: var(--acTx); }
.rs-log-h span { color: var(--t3); font: 12px var(--mono); }
.rs-log-h em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--t2); }
.rs-log-q { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--t3); }
.rs-log-q .is-done { color: var(--t1); }
.rs-log-n { margin: 6px 0 0; font-size: 13px; color: var(--t2); background: var(--panel); border-radius: var(--r1); padding: 6px 10px; overflow-wrap: anywhere; }
.rs-empty { color: var(--t3); text-align: center; }
.rs-door { padding-top: 48px; text-align: center; } .rs-door-act { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ---------- 효과 ---------- */
.rs-float { position: fixed; z-index: 70; transform: translate(-50%, 0); pointer-events: none; font: 800 15px var(--mono); color: var(--ac); text-shadow: 0 2px 8px rgba(0, 0, 0, .6); animation: rs-float 1.2s ease-out forwards; white-space: nowrap; }
.rs-banner { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(4, 6, 8, .55); cursor: pointer; animation: rs-fade 2.2s ease forwards; }
.rs-banner > div { text-align: center; padding: 24px 48px; border-top: 1px solid var(--ac); border-bottom: 1px solid var(--ac); background: linear-gradient(90deg, transparent, rgba(7, 8, 10, .92) 20%, rgba(7, 8, 10, .92) 80%, transparent); animation: rs-pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.rs-banner small { display: block; font: 700 13px var(--mono); letter-spacing: .3em; color: #b8f35a; }
.rs-banner b { display: block; margin-top: 4px; font-size: 36px; font-weight: 800; color: #eef0f2; letter-spacing: -.02em; }
.rs-banner span { display: block; margin-top: 4px; color: #a9b0ba; font-size: 15px; }
@keyframes rs-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rs-pick { 0% { transform: scale(1); } 40% { transform: scale(1.03); box-shadow: 0 0 0 4px var(--acBg); } 100% { transform: scale(1); } }
@keyframes rs-float { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -56px); } }
@keyframes rs-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes rs-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition: none !important; }
  .rs-banner { animation: none; }
  .rs-float { display: none; }
}

/* ---------- 알림·AI 코치 ---------- */
.rs-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); background: var(--t1); color: var(--bg); padding: 10px 18px; border-radius: var(--r2); font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.rs-dim { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .5); }
#rs-ai { position: fixed; z-index: 30; }
@media (min-width: 900px) {
  #rs-ai { top: calc(var(--top) + 8px); right: 8px; bottom: 8px; width: min(var(--hai-w, 420px), calc(100vw - 16px)); }
  body.rs-ai-open .rs-shell { margin-right: calc(var(--hai-w, 420px) + 16px); }
}
@media (min-width: 1100px) {
  body.rs-in.rs-ai-open .rs-shell { grid-template-columns: minmax(280px, 340px) minmax(0, 600px); }
  body.rs-ai-open .rs-side-r { display: none !important; }
}
@media (min-width: 900px) and (max-width: 1099px) { body.rs-ai-open .rs-shell { margin-left: 16px; } }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1099px) {
  .rs-ob { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 24px; }
  body.rs-ai-open .rs-ob { grid-template-columns: 1fr; }
  body.rs-ai-open .rs-ob-stage { position: relative; top: 0; height: 320px; min-height: 0; }
  body.rs-ai-open .rs-title { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .rs-top { padding: 0 12px; gap: 8px; backdrop-filter: none; background: var(--bg); } /* 흐림 효과가 있으면 안의 fixed 탭 막대가 머리띠에 붙음 */
  .rs-daypill { margin-left: auto; }
  .rs-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 22; margin: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; }
  .rs-tabs button { flex-direction: column; gap: 2px; height: auto; font-size: 12px; padding: 6px 0; flex: 1; }
  .rs-tabs svg { width: 22px; height: 22px; }
  .rs-tabs button[aria-current] { background: none; box-shadow: inset 0 2px 0 var(--ac); color: var(--acTx); }
  body.rs-in .rs-shell { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  body.rs-in .rs-toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  #rs-ai { left: 0; right: 0; bottom: 0; height: 86dvh; border-radius: 14px 14px 0 0; border-bottom-width: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  #rs-ai .hai-h { border-radius: 14px 14px 0 0; }
  body.rs-making .rs-shell { padding: 16px 16px 24px; }
  .rs-title { grid-template-columns: 1fr; gap: 24px; min-height: 0; }
  .rs-title-stage { height: 360px; min-height: 0; }
  .rs-ob { grid-template-columns: 1fr; gap: 16px; }
  .rs-ob-stage { position: relative; top: 0; height: 300px; min-height: 0; }
  .rs-ob-s2 .rs-ob-stage { height: 220px; }
  .rs-hud-stage { height: 240px; }
  .rs-hud { margin-bottom: 16px; }
  .rs-hud-info { padding-top: 12px; }
  .rs-hud-name { font-size: 18px; }
  .rs-hud .rs-lv { margin-top: 8px; }
  .rs-hud .rs-lv-n b { font-size: 24px; }
  .rs-hud .rs-seg { grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 12px; }
}
@media (max-width: 560px) {
  h1, h2 { font-size: 24px; }
  .rs-title h1 { font-size: 36px; }
  .rs-brand small { display: none; }
  .rs-ai-btn span { display: none; }
  .rs-ai-btn { width: 40px; padding: 0; justify-content: center; }
  .rs-ai-btn svg { width: 18px; height: 18px; }
  .rs-title-btns .rs-btn { flex: 1 1 100%; }
  .rs-row3 { grid-template-columns: 1fr; }
  .rs-live { grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .rs-event { padding: 16px; }
  .rs-event h3 { font-size: 18px; }
  .rs-ladder li { grid-template-columns: 1fr; gap: 2px; }
  .rs-items { grid-template-columns: repeat(2, 1fr); }
  .rs-stats li { grid-template-columns: 8.4em 1fr 3.2em; gap: 8px; }
  .rs-hero h1 { font-size: 24px; }
  .rs-born-name { font-size: 24px; }
  .rs-coach { grid-template-columns: auto 1fr; }
  .rs-coach .rs-btn { grid-column: 1 / -1; }
  .rs-quest-f { flex-wrap: wrap; }
  .rs-loot { flex: 1 1 100%; }
  .rs-check-btn { flex: 1; justify-content: center; }
  .rs-ob-foot .rs-btn { padding: 0 14px; }
}
@media (max-width: 380px) { .rs-row2 { grid-template-columns: 1fr; gap: 0; } .rs-grid { gap: 4px; } .rs-live { grid-template-columns: 1fr; } }

/* ---------- 2026-11-13 장면·이야기 (배경 6장면 · 메인 퀘스트 3장면 · 이야기 탭) ---------- */
.rs-tabs button { padding: 0 10px; }
.rs-stage-name small { display: block; font: 600 12px var(--mono); color: #b8f35a; letter-spacing: .06em; margin-top: 2px; }
.rs-cls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rs-cls .rs-pick { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; padding: 10px 12px; gap: 2px; }
.rs-cls .rs-pick b { font-size: 15px; color: var(--t1); }
.rs-cls .rs-pick small { font-size: 12px; color: var(--t3); font-weight: 400; line-height: 1.35; }
.rs-scene { border: 1px solid var(--line); border-left: 3px solid var(--ac); border-radius: var(--r2); background: var(--panel); padding: 20px; animation: rs-in .25s ease-out; }
.rs-scene-head { margin-bottom: 8px; }
.rs-scene-tag { display: flex; align-items: center; gap: 8px; margin: 0; font: 600 12px var(--mono); letter-spacing: .06em; color: var(--t3); }
.rs-scene-tag b { color: var(--acTx); }
.rs-scene-tag em { font-style: normal; color: var(--t2); letter-spacing: 0; font-family: var(--f); margin-left: 8px; }
.rs-on { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 4px; }
.rs-on i { flex: none; width: 28px; height: 28px; border-radius: 50%; margin-top: 2px; background: radial-gradient(circle at 40% 38%, #fffbe0 0 18%, #ffd43b 40%, rgba(255, 212, 59, .15) 72%, transparent 74%); box-shadow: 0 0 18px rgba(255, 212, 59, .45); animation: rs-glow 2.6s ease-in-out infinite; }
.rs-on span { font-size: 18px; font-weight: 700; line-height: 1.4; }
.rs-on span b { display: block; font: 600 12px var(--mono); color: var(--gold); letter-spacing: .1em; margin-bottom: 2px; }
.rs-bgrow { margin-top: 16px; }
.rs-dots-scene b { flex: 1; height: 4px; border-radius: 2px; background: var(--line); margin-top: 10px; }
.rs-dots-scene b.is-done { background: color-mix(in srgb, var(--ac) 60%, var(--line)); }
.rs-dots-scene b.is-now { background: var(--ac); height: 8px; margin-top: 8px; }
.rs-scene .rs-sub { margin-top: 12px; }
.rs-scene .rs-field { margin-top: 16px; }
.rs-whys { margin-top: 12px; }
.rs-boss-pre { margin-top: 16px; padding: 12px 14px; border-radius: var(--r1); background: color-mix(in srgb, var(--bad) 7%, var(--panel2)); border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line)); }
.rs-boss-pre ol, .rs-acts-pre { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rs-boss-pre li { display: grid; grid-template-columns: 36px 1fr; column-gap: 8px; }
.rs-boss-pre small, .rs-acts-pre small { font: 600 12px var(--mono); color: var(--t3); }
.rs-boss-pre b { color: var(--bad); }
.rs-boss-pre span { grid-column: 2; font-size: 13px; color: var(--t2); }
.rs-prologue p:not(.rs-kicker) { margin: 8px 0 0; color: var(--t2); line-height: 1.7; }
.rs-acts-pre { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
.rs-acts-pre li { padding: 8px 10px; border-radius: var(--r1); background: var(--panel2); border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.rs-acts-pre b { font-size: 13px; color: var(--bad); }

/* 오늘 — 이야기 띠 */
.rs-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: center; width: 100%; text-align: left; margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r2); border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line)); background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 9%, var(--panel)) 0%, var(--panel) 70%); }
.rs-strip:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); }
.rs-strip-act { display: flex; flex-direction: column; min-width: 0; }
.rs-strip-act small { font: 600 12px var(--mono); color: var(--gold); letter-spacing: .04em; }
.rs-strip-act b { font-size: 15px; white-space: nowrap; }
.rs-strip-line { grid-column: 1 / -1; font-size: 13px; color: var(--t2); line-height: 1.5; }
.rs-hp { position: relative; display: block; height: 18px; border-radius: 9px; background: var(--panel2); border: 1px solid var(--line); overflow: hidden; }
.rs-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #c2413a, var(--bad)); transition: width .5s ease; }
.rs-hp em { position: relative; display: block; text-align: right; padding: 0 8px; font: 600 12px/16px var(--mono); font-style: normal; color: var(--t1); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
html[data-theme="light"] .rs-hp em { color: #15181c; text-shadow: none; }
.rs-drive { margin: 8px 0 0; font: 600 13px var(--mono); color: var(--acTx); }
.rs-when { font: 600 12px var(--mono); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 999px; padding: 0 8px; }

/* 이야기 탭 */
.rs-acts { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.rs-acts li { padding: 14px 16px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--panel); }
.rs-acts li.is-now { border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); box-shadow: inset 3px 0 0 var(--gold); }
.rs-acts li.is-later { opacity: .62; }
.rs-acts li.is-down .rs-act-h b { text-decoration: line-through; text-decoration-color: var(--ac); }
.rs-act-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.rs-act-h small { width: 100%; font: 600 12px var(--mono); color: var(--t3); }
.rs-act-h b { font-size: 18px; }
.rs-act-h em { font: 600 12px var(--mono); font-style: normal; color: var(--gold); }
.rs-act-say { margin: 4px 0 10px; color: var(--t2); font-style: italic; }
.rs-acts .rs-mini { margin-top: 8px; }
.rs-districts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rs-districts li { position: relative; overflow: hidden; padding: 12px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--panel2); min-width: 0; }
.rs-districts .rs-glow { position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, var(--c) 0%, transparent 70%); opacity: calc(.08 + var(--lv) * .14); }
.rs-districts b { position: relative; display: block; font-size: 15px; }
.rs-districts small { position: relative; display: block; font: 600 12px var(--mono); color: var(--c); }
.rs-districts p { position: relative; margin: 4px 0 0; font-size: 12px; color: var(--t3); line-height: 1.45; }
.rs-episodes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.rs-episodes li { padding: 12px 14px; border-radius: var(--r1); border: 1px solid var(--line); background: var(--panel2); }
.rs-episodes li p { margin: 4px 0 0; color: var(--t2); line-height: 1.7; }
.rs-episodes .rs-ep-h { display: flex; flex-direction: column; margin: 0; }
.rs-ep-h small { font: 600 12px var(--mono); color: var(--gold); }
.rs-ep-h b { color: var(--t1); font-size: 15px; }
.rs-episodes li.is-lock { opacity: .55; border-style: dashed; }
.rs-episodes li.is-lock .rs-ep-h small { color: var(--t3); }
.rs-bg-sum { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.rs-bg-sum li { display: flex; flex-direction: column; min-width: 0; }
.rs-bg-sum span { font-size: 12px; color: var(--t3); }
.rs-bg-sum b { font-size: 13px; overflow-wrap: anywhere; }
@keyframes rs-glow { 50% { box-shadow: 0 0 28px rgba(255, 212, 59, .7); } }
@media (prefers-reduced-motion: reduce) { .rs-on i, .rs-scene { animation: none; } }
@media (max-width: 899px) { .rs-tabs button { padding: 6px 0; font-size: 12px; } }
@media (max-width: 560px) {
  .rs-scene { padding: 16px; }
  .rs-on span { font-size: 15px; }
  .rs-districts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-acts-pre { grid-template-columns: 1fr; }
  .rs-cls { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .rs-bg-sum { grid-template-columns: 1fr; } }

/* ---------- 키우는 맛 (2026-11-13): 칭호 · 전투력 · 빛 조각 · 상자 · 장비 ---------- */
.rs-evo { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.rs-evo b { font-size: 13px; font-weight: 800; color: var(--ec); letter-spacing: .02em; padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--ec) 55%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--ec) 12%, transparent); }
html[data-theme="light"] .rs-evo b { color: color-mix(in srgb, var(--ec) 55%, #15181c); }
.rs-evo small { font-size: 12px; color: var(--t3); }
.rs-hud-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 12px 0 4px; }
.rs-hud-row > span { display: flex; flex-direction: column; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r1); background: var(--panel2); min-width: 0; }
.rs-hud-row small { font-size: 12px; color: var(--t3); }
.rs-hud-row b { font: 800 18px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-pow b { color: var(--t1); transition: color .3s, text-shadow .3s; }
[data-pow].is-up { color: var(--acTx); text-shadow: 0 0 14px color-mix(in srgb, var(--ac) 70%, transparent); }
.rs-shard b, .rs-sh { color: #7fe3ff !important; }
html[data-theme="light"] .rs-shard b, html[data-theme="light"] .rs-sh { color: #0a6f8a !important; }
.rs-mul.is-hot { border-color: color-mix(in srgb, #ff9f43 50%, var(--line)); }
.rs-mul.is-hot b { color: #ffb066; }
html[data-theme="light"] .rs-mul.is-hot b { color: #a54d00; }

.rs-chest-svg { width: 100%; height: 100%; }
.rs-chest-svg .lid { fill: #6b4a2b; stroke: #2a1a0c; stroke-width: 1.2; }
.rs-chest-svg .body { fill: #5a3d22; stroke: #2a1a0c; stroke-width: 1.2; }
.rs-chest-svg .band { fill: none; stroke: #d9b45a; stroke-width: 2; }
.rs-chest-svg .gem { fill: var(--rc, #d9b45a); }
.rs-chestc { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; margin-top: 16px; padding: 12px 16px; border-radius: var(--r2); border: 1px solid var(--line); background: var(--panel); }
.rs-chestc b { font-size: 15px; }
.rs-chestc p { margin: 2px 0 0; font-size: 13px; color: var(--t2); }
.rs-chest-ic { width: 52px; height: 52px; display: block; }
.rs-chestc.is-locked .rs-chest-ic { filter: grayscale(1) brightness(.6); }
.rs-chestc.is-ready { border-color: color-mix(in srgb, #d9b45a 60%, var(--line)); background: linear-gradient(100deg, rgba(217, 180, 90, .14), var(--panel) 70%); }
.rs-chestc.is-ready .rs-chest-ic { animation: rs-wiggle 1.6s ease-in-out infinite; }
.rs-chestc.is-big { --rc: #ffb84a; border-color: #ffb84a; box-shadow: 0 0 0 1px rgba(255, 184, 74, .25), 0 0 24px rgba(255, 184, 74, .18); }
.rs-chestc.is-open { grid-template-columns: 52px 1fr; border-color: color-mix(in srgb, var(--rc) 45%, var(--line)); }
.rs-chestc.is-open .rs-chest-ic { opacity: .75; }
@keyframes rs-wiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-7deg); } 84% { transform: rotate(6deg); } 92% { transform: rotate(-3deg); } }

.rs-reveal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: radial-gradient(60% 50% at 50% 45%, color-mix(in srgb, var(--rc) 22%, transparent), rgba(4, 6, 8, .9) 70%); animation: rs-in .25s ease; }
.rs-reveal-box { width: min(360px, 100%); text-align: center; }
.rs-reveal-art { position: relative; width: 140px; height: 140px; margin: 0 auto; animation: rs-shake .9s ease-in-out; }
.rs-reveal-art svg { position: relative; z-index: 1; }
.rs-burst { position: absolute; inset: -60px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 55%, transparent) 0deg 4deg, transparent 4deg 30deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); opacity: 0; }
.rs-reveal.is-open .rs-burst { opacity: 1; animation: rs-spin 8s linear infinite; }
.rs-reveal.is-open .rs-reveal-art .lid { transform: translateY(-8px) rotate(-14deg); transform-origin: 8px 20px; transition: transform .35s cubic-bezier(.2, 1.4, .4, 1); }
.rs-reveal-card { margin-top: 8px; padding: 20px; border-radius: var(--r3); border: 1px solid var(--rc); background: #0f1215; color: #eef0f2; box-shadow: 0 0 40px color-mix(in srgb, var(--rc) 35%, transparent); opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .35s, transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.rs-reveal.is-open .rs-reveal-card { opacity: 1; transform: none; }
.rs-reveal-card small { display: block; font: 700 12px var(--mono); letter-spacing: .2em; color: #a9b0ba; }
.rs-rar { margin: 8px 0 0; font: 800 13px var(--mono); letter-spacing: .12em; color: var(--rc); }
.rs-reveal-name { display: block; margin-top: 4px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rs-reveal-line { display: block; margin-top: 4px; font-size: 13px; color: #a9b0ba; }
.rs-reveal-get { margin: 16px 0; font-size: 13px; color: #a9b0ba; display: flex; flex-direction: column; gap: 4px; }
.rs-reveal-get b { font: 800 18px var(--mono); color: #7fe3ff; }
.rs-reveal .rs-btn-main { width: 100%; background: #b8f35a; border-color: #b8f35a; color: #142000; }
.rs-reveal[data-r="legend"] .rs-reveal-name { color: #ffd38a; text-shadow: 0 0 18px rgba(255, 184, 74, .5); }
@keyframes rs-shake { 0% { transform: scale(.6); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 35% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } 65% { transform: rotate(-8deg); } 80% { transform: rotate(8deg) scale(1.06); } 100% { transform: none; } }
@keyframes rs-spin { to { transform: rotate(360deg); } }

.rs-gear h3 small b { font-family: var(--mono); color: var(--t1); }
.rs-evo-road { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.rs-evo-road li { padding: 6px; border-radius: var(--r1); border: 1px solid var(--line); text-align: center; min-width: 0; opacity: .55; }
.rs-evo-road li.is-past { opacity: .8; }
.rs-evo-road li.is-now { opacity: 1; border-color: var(--ec); background: color-mix(in srgb, var(--ec) 12%, transparent); }
.rs-evo-road small { display: block; font: 700 12px var(--mono); color: var(--t3); }
.rs-evo-road b { display: block; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.rs-gslots { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rs-gslot { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r2); border: 1px solid color-mix(in srgb, var(--rc) 60%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 14%, transparent), var(--panel2) 65%); min-width: 0; }
.rs-gslot.is-empty { border-style: dashed; background: var(--panel2); }
.rs-gslot-k { font: 700 12px var(--mono); color: var(--t3); letter-spacing: .1em; }
.rs-gslot b { font-size: 15px; overflow-wrap: anywhere; }
.rs-gslot b em { font: 800 13px var(--mono); font-style: normal; color: var(--acTx); }
.rs-gslot small { font-size: 12px; color: var(--t2); }
.rs-gslot.is-empty b, .rs-gslot.is-empty small { color: var(--t3); }
.rs-up { margin-top: 8px; min-height: 36px; border-radius: var(--r1); border: 1px solid color-mix(in srgb, #7fe3ff 50%, var(--line2)); background: rgba(127, 227, 255, .08); font: 700 13px var(--mono); color: var(--t1); }
.rs-up:disabled { opacity: .45; cursor: not-allowed; }
.rs-max { margin-top: 8px; color: var(--acTx) !important; font-weight: 700; }
.rs-bag { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rs-bag button { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 10px; border-radius: var(--r1); border: 1px solid color-mix(in srgb, var(--rc) 55%, var(--line)); background: var(--panel2); text-align: left; max-width: 180px; }
.rs-bag small { font-size: 12px; color: var(--t3); }
.rs-bag b { font-size: 13px; overflow-wrap: anywhere; }
.rs-bag span { font: 600 12px var(--mono); color: var(--t2); }
@media (max-width: 480px) {
  .rs-evo-road { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rs-chestc { grid-template-columns: 44px 1fr; }
  .rs-chestc .rs-btn { grid-column: 1 / -1; }
  .rs-chest-ic { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .rs-chestc.is-ready .rs-chest-ic, .rs-reveal-art, .rs-reveal.is-open .rs-burst { animation: none; } }

/* ---------- 진짜 성장 — 직접 잰 기록 (2026-11-13) ---------- */
.rs-realc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; margin-top: 16px; padding: 14px 16px; text-align: left; background: linear-gradient(135deg, var(--acBg), transparent 60%), var(--panel); border: 1px solid color-mix(in srgb, var(--ac) 35%, var(--line)); border-radius: var(--r2); }
button.rs-realc:hover { border-color: var(--ac); }
.rs-realc.is-base { display: block; }
.rs-realc.is-base h3 { font-size: 18px; }
.rs-real-k { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font: 700 12px var(--mono); letter-spacing: .1em; color: var(--acTx); }
.rs-real-k i { font: 700 12px var(--f); font-style: normal; letter-spacing: 0; padding: 2px 8px; border-radius: 99px; background: var(--ac); color: var(--acInk); }
.rs-real-k > span { margin-left: auto; font: 600 12px var(--f); letter-spacing: 0; color: var(--t3); }
.rs-real-c { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rs-real-c small, .rs-gnums small { font-size: 12px; color: var(--t3); overflow-wrap: anywhere; }
.rs-real-c b { font: 700 18px var(--mono); color: var(--t1); overflow-wrap: anywhere; }
.rs-real-c em, .rs-gnums em, .rs-real-line em { font: 600 12px var(--mono); font-style: normal; color: var(--t3); }
.rs-realc em.is-up, .rs-gnums em.is-up, .rs-real-line em.is-up { color: var(--acTx); }
.rs-recrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.rs-recbox { display: inline-flex; align-items: center; gap: 6px; }
.rs-recbox em { font-style: normal; color: var(--t2); font-weight: 700; }
.rs-recin { width: 130px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--r2); background: var(--panel2); color: var(--t1); font: 700 18px var(--mono); }
.rs-recin:focus { border-color: var(--ac); outline: none; }
.rs-recin[type="time"] { width: 180px; font-size: 16px; }
.rs-linkbtn { margin-top: 10px; padding: 6px 0; border: 0; background: none; color: var(--t3); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.rs-linkbtn:hover { color: var(--t1); }
/* 메인 퀘스트를 끝내면 그 아래 실제 기록 */
.rs-quest.is-done.has-rec { opacity: 1; }
.rs-quest.has-rec > .rs-quest-b, .rs-quest.has-rec > .rs-quest-f { opacity: .6; }
.rs-rec { padding: 14px 16px 16px; border-top: 1px dashed color-mix(in srgb, var(--ac) 40%, var(--line)); background: color-mix(in srgb, var(--ac) 5%, transparent); border-radius: 0 0 var(--r2) var(--r2); }
.rs-rec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; font-size: 13px; color: var(--t2); }
.rs-rec-h + .rs-recrow { margin-top: 8px; }
.rs-rec-h b { font: 700 12px var(--mono); letter-spacing: .06em; color: var(--acTx); }
.rs-rec-h em { font-style: normal; color: var(--t3); font-size: 12px; }
.rs-rec .rs-rec-h:not(:first-child) { margin-top: 14px; }
.rs-autos { margin-top: 8px; }
.rs-real-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 6px 0 0; font-size: 12px; color: var(--t3); }
.rs-real-line b { font: 700 13px var(--mono); color: var(--t1); }
/* 성장 탭 */
.rs-aim { margin: 16px 0 0; padding: 12px 16px; border-left: 3px solid var(--ac); background: var(--panel); border-radius: 0 var(--r2) var(--r2) 0; }
.rs-aim small { display: block; font-size: 12px; color: var(--t3); }
.rs-aim b { font-size: 15px; overflow-wrap: anywhere; }
.rs-gnums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.rs-gnums > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--panel2); border-radius: var(--r1); min-width: 0; }
.rs-gnums b { font: 700 18px var(--mono); overflow-wrap: anywhere; }
.rs-gsvg { display: block; width: 100%; height: auto; margin-top: 12px; }
.rs-gline { fill: none; stroke: var(--ac); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.rs-gdot { fill: var(--panel); stroke: var(--ac); stroke-width: 2; }
.rs-gbase { stroke: var(--t3); stroke-width: 1; stroke-dasharray: 4 4; }
.rs-gt { fill: var(--t3); font: 12px var(--mono); }
.rs-gt.is-now { fill: var(--acTx); font-weight: 700; }
.rs-gempty { margin: 12px 0 0; padding: 24px 12px; text-align: center; color: var(--t3); font-size: 13px; border: 1px dashed var(--line2); border-radius: var(--r1); }
.rs-autobar { display: flex; align-items: center; gap: 12px; }
.rs-autobar b { font: 700 24px var(--mono); color: var(--acTx); min-width: 64px; }
.rs-autobar span { flex: 1; height: 10px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.rs-autobar i { display: block; height: 100%; background: var(--ac); border-radius: inherit; transition: width .6s; }
.rs-astrip { display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 0; padding: 0; list-style: none; }
.rs-astrip li { width: 18px; height: 18px; border-radius: 4px; }
.rs-astrip .a0, .rs-legend .a0 { background: color-mix(in srgb, var(--t3) 35%, var(--panel2)); }
.rs-astrip .a1, .rs-legend .a1 { background: color-mix(in srgb, var(--ac) 45%, var(--panel2)); }
.rs-astrip .a2, .rs-legend .a2 { background: var(--ac); }
.rs-tbars { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.rs-tbars li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.rs-tbars span:first-child { color: var(--t2); font-weight: 700; }
.rs-tbar { height: 8px; border-radius: 99px; background: var(--panel2); overflow: hidden; }
.rs-tbar i { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.rs-tbars b { font: 700 13px var(--mono); }
.rs-miles, .rs-weeks { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.rs-miles li, .rs-weeks li { display: grid; grid-template-columns: 70px 1fr; column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rs-miles li:first-child, .rs-weeks li:first-child { border-top: 0; padding-top: 0; }
.rs-miles span, .rs-weeks span { grid-row: span 2; font: 700 12px var(--mono); color: var(--acTx); padding-top: 2px; }
.rs-miles b, .rs-weeks b { overflow-wrap: anywhere; }
.rs-miles em, .rs-weeks em { font-style: normal; font-size: 13px; color: var(--t3); overflow-wrap: anywhere; }
.rs-week { border-color: color-mix(in srgb, var(--ac) 45%, var(--line)); }
.rs-week h3 { font-size: 18px; margin-bottom: 12px; }
.rs-h2 { margin: 32px 0 0; font-size: 18px; }
.rs-h2 small { font: 400 12px var(--mono); color: var(--t3); margin-left: 6px; }
@media (max-width: 480px) {
  .rs-realc:not(.is-base) { grid-template-columns: 1fr 1fr; }
  .rs-realc:not(.is-base) .rs-real-k + .rs-real-c { grid-column: 1 / -1; }
  .rs-recin { width: 110px; }
}

/* ---------- 2026-11-13 휴대폰은 칸으로 나눠 한 화면에 (panes) · 만드는 중엔 캐릭터가 늘 위에 ---------- */
.rs-panebar { display: none; }
@media (min-width: 900px) {
  .rs-today { display: flex; flex-direction: column; }
  .rs-today > .rs-pane[data-pane-k="me"] { order: -1; }
}
@media (max-width: 899px) {
  .rs-pane.is-off { display: none !important; }
  .rs-panebar { display: flex; gap: 4px; position: sticky; top: var(--top); z-index: 15; margin: -8px -16px 14px; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .rs-panebar::-webkit-scrollbar { display: none; }
  .rs-panebar button { flex: 1 0 auto; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--t2); font-size: 13px; font-weight: 700; white-space: nowrap; }
  .rs-panebar button[aria-selected="true"] { border-color: var(--ac); background: var(--acBg); color: var(--acTx); }
  .rs-pane > :first-child { margin-top: 0; }

  /* 캐릭터 만들기: 화면 한 장 — 위 캐릭터(고정) · 가운데 고르기(이 칸만 스크롤) · 아래 단추 */
  body.rs-making .rs-shell { padding: 8px 12px 0; }
  .rs-ob { display: flex; flex-direction: column; align-items: stretch; gap: 8px; height: calc(100dvh - var(--top) - 8px); }
  .rs-ob-stage { flex: none; height: 36dvh; min-height: 0; }
  .rs-ob-s1 .rs-ob-stage, .rs-ob-s3 .rs-ob-stage { height: 26dvh; }
  .rs-ob-s2 .rs-ob-stage { height: 22dvh; }
  .rs-ob-s4 .rs-ob-stage { height: 30dvh; }
  .rs-ob-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .rs-ob-head h2 { font-size: 20px; margin-top: 0; }
  .rs-ob-head .rs-kicker { margin-bottom: 0; }
  .rs-ob-head .rs-chap { margin-top: 6px; }
  .rs-ob-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 8px -4px 0; padding: 0 4px 8px; }
  .rs-ob-body .rs-panebar { position: sticky; top: 0; margin: 0 -4px 10px; padding: 0 4px 8px; }
  .rs-ob-foot { position: static; flex: none; margin: 0; padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
  .rs-ob .rs-field { margin-bottom: 12px; }
  .rs-ob .rs-sub { margin: 0 0 10px; font-size: 14px; }
  .rs-ob .rs-event { padding: 14px; }
  .rs-ob .rs-event h3 { font-size: 17px; margin: 6px 0 10px; }
  .rs-ob .rs-choices { gap: 6px; }
  .rs-ob .rs-choices button { min-height: 44px; padding: 6px 12px; }
  .rs-ob .rs-event .rs-mini { margin-bottom: 0; }
  .rs-ob .rs-measure .rs-live, .rs-ob .rs-measure > .rs-kicker { display: none; }
  .rs-ob .rs-measure { margin-top: 10px; padding: 0; border: 0; background: none; }
  .rs-ob .rs-scene-head { margin-bottom: 8px; }
  .rs-ob .rs-stage-tag { display: none; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .rs-ob-stage { height: 30dvh; }
  .rs-ob-s1 .rs-ob-stage, .rs-ob-s3 .rs-ob-stage, .rs-ob-s2 .rs-ob-stage { height: 18dvh; }
}
.rs-qmore { display: none; }
@media (max-width: 899px) {
  .rs-qmore { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line2); background: none; color: var(--t2); font-size: 12px; font-weight: 700; }
  .rs-qmore::after { content: '▾'; font-size: 10px; }
  .rs-qmore[aria-expanded="true"]::after { content: '▴'; }
  .rs-quest:not(.is-open) .rs-quest-more { display: none; }
  .rs-shell section > .rs-panebar { margin-top: -16px; }
  .rs-today .rs-day-head .rs-sub { display: none; }
  .rs-today .rs-strip-line { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}
