/* PLAYORA 아이돌 키우기 */
:root {
  --ink: #23243a; --ink-2: #2d2f4b; --ink-3: #393c5e; --ink-line: #4b4e74;
  --d-text: #f5f2ea; --d-text-2: #cfcbdc; --d-text-3: #9d9ab3;
  --paper: #fbf7ef; --paper-2: #f3ecdf; --paper-3: #e9dfcd; --p-line: #e1d5c1;
  --text: #2b251f; --text-2: #675c52; --text-3: #95887c;
  --acc: #e8603c; --acc-2: #c94e2e; --acc-ink: #fff9f4;
  --up: #2c8a58; --dn: #c4443a; --gold: #f2c14e; --gold-ink: #6b4a10;
  --page: #f6f1e8; --page-ink: #26211c; --page-2: #6b5f54; --page-line: #e3d8c8;
  --f-body: "IBM Plex Sans KR", "Pretendard", system-ui, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --f-disp: "Bagel Fat One", "IBM Plex Sans KR", "Malgun Gothic", sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 8px; --r2: 12px; --r3: 16px; --r4: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (color: oklch(0 0 0)) {
  :root {
    --ink: oklch(0.27 0.045 280); --ink-2: oklch(0.31 0.05 280); --ink-3: oklch(0.36 0.055 280); --ink-line: oklch(0.44 0.06 280);
    --d-text: oklch(0.96 0.01 85); --d-text-2: oklch(0.85 0.025 290); --d-text-3: oklch(0.7 0.035 290);
    --paper: oklch(0.975 0.012 85); --paper-2: oklch(0.945 0.02 85); --paper-3: oklch(0.905 0.028 82); --p-line: oklch(0.87 0.03 82);
    --text: oklch(0.27 0.02 60); --text-2: oklch(0.47 0.025 60); --text-3: oklch(0.62 0.025 60);
    --acc: oklch(0.66 0.17 38); --acc-2: oklch(0.58 0.16 38);
    --up: oklch(0.56 0.12 155); --dn: oklch(0.56 0.16 27);
    --page: oklch(0.96 0.014 80); --page-line: oklch(0.89 0.024 78);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--page); color: var(--page-ink); font: 400 16px/1.7 var(--f-body); word-break: keep-all; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: 0.4; }
a { color: inherit; }
[hidden] { display: none !important; }
.dsp { font-family: var(--f-disp); font-weight: 400; letter-spacing: 0.01em; }

/* ---------------------------------------------------------------- 페이지 머리 */
.mast { display: flex; align-items: baseline; gap: var(--s4); padding: var(--s3) clamp(var(--s4), 3vw, var(--s6)); border-bottom: 1px solid var(--page-line); }
.mast-brand { text-decoration: none; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.mast-brand b { font-weight: 700; letter-spacing: 0.1em; color: var(--page-ink); margin-right: 6px; }
.mast-more { margin-left: auto; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.head { max-width: 1240px; margin: 0 auto; padding: var(--s4) clamp(var(--s3), 3vw, var(--s6)) var(--s3); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); }
.head h1 { margin: 0; font: 400 clamp(32px, 4.2vw, 46px)/1.1 var(--f-disp); color: var(--ink); }
.head p { margin: 0; color: var(--page-2); font-size: 15px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(0px, 2vw, var(--s5)); }

/* ---------------------------------------------------------------- 게임 틀 */
.idol { position: relative; width: 100%; height: clamp(560px, calc(100svh - 132px), 860px); display: flex; flex-direction: column; background: var(--ink); color: var(--d-text); overflow: hidden; border-radius: var(--r2);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; font: 400 14px/1.45 var(--f-body); }
@media (max-width: 640px) { .idol { border-radius: 0; height: calc(100svh - 96px); min-height: 560px; } .head p { display: none; } }
html.embed, html.embed body { height: 100%; overflow: hidden; background: var(--ink); }
html.embed .mast, html.embed .head, html.embed .about, html.embed .foot { display: none !important; }
html.embed .wrap { padding: 0; max-width: none; }
html.embed .idol { position: fixed; inset: 0; width: auto; height: auto; min-height: 0; border-radius: 0; }
.idol:fullscreen { border-radius: 0; }
.idol button:focus-visible, .idol input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.idol input { -webkit-user-select: text; user-select: text; }
.nojs { padding: var(--s6); }
.idol canvas { display: block; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 위 막대 */
.bar { flex: none; height: 46px; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s2) 0 var(--s3); background: var(--ink); border-bottom: 1px solid rgba(0, 0, 0, 0.3); z-index: 6; }
.idol.short .bar { height: 40px; }
.bar-l { display: flex; align-items: baseline; gap: var(--s3); min-width: 0; flex: 1; overflow: hidden; }
.bar-t { font-size: 19px; line-height: 1; white-space: nowrap; color: var(--d-text); }
.bar-d { font-size: 13px; color: var(--d-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.idol.tiny .bar-t { font-size: 16px; }
.bar-r { display: flex; align-items: center; gap: 6px; flex: none; }
.tb { height: 34px; min-width: 34px; padding: 0 12px; border-radius: var(--r1); border: 1px solid var(--ink-line); background: transparent; color: var(--d-text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.tb.icon { width: 36px; padding: 0; }
.idol.short .tb { height: 30px; } .idol.short .tb.icon { width: 32px; }
.view { position: relative; flex: 1; min-height: 0; overflow: hidden; }

/* 단추 */
.btn { min-height: 40px; padding: 0 var(--s4); border-radius: var(--r1); border: 1px solid var(--p-line); background: var(--paper); color: var(--text); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: transform 0.15s var(--ease), background 0.15s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.go { background: var(--acc); border-color: var(--acc-2); color: var(--acc-ink); box-shadow: 0 2px 0 var(--acc-2); }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 34px; padding: 0 var(--s3); font-size: 13px; }
.btn.big { min-height: 56px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 0 var(--s4); text-align: left; }
.btn.big span { font-size: 17px; font-weight: 700; }
.btn.big small { font-size: 12.5px; font-weight: 500; opacity: 0.85; }
.idol.short .btn { min-height: 36px; } .idol.short .btn.big { min-height: 48px; }
.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.hint { color: var(--text-2); font-size: 13px; margin: 0; }
.lead { margin: 0 0 var(--s3); color: var(--text); }

/* ---------------------------------------------------------------- 처음 화면 */
.title { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr); }
.t-art { position: relative; min-height: 0; }
.t-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.t-side { display: flex; flex-direction: column; justify-content: center; gap: var(--s3); padding: var(--s5) var(--s5) var(--s5) var(--s5); background: var(--ink-2); border-left: 1px solid var(--ink-line); min-height: 0; overflow: auto; }
.t-h { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.05; color: var(--d-text); }
.t-sub { margin: 0; color: var(--d-text-2); font-size: 14px; line-height: 1.6; max-width: 30em; }
.t-menu { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.t-menu .btn.big:not(.go) { background: var(--ink-3); border-color: var(--ink-line); color: var(--d-text); }
.row2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.row2 .btn { padding: 2px var(--s2); background: transparent; border-color: var(--ink-line); color: var(--d-text); font-size: 13px; white-space: normal; line-height: 1.2; text-align: center; }
.t-bonus { margin: 0; font-size: 12.5px; color: var(--gold); }
.idol.port .title { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.idol.port .t-side { border-left: 0; border-top: 1px solid var(--ink-line); padding: var(--s4); justify-content: flex-start; }
.idol.port .t-h { font-size: 30px; }
.idol.short .t-side { padding: var(--s3) var(--s4); gap: var(--s2); }
.idol.short .t-sub { display: none; }
.idol.short.land .t-h { font-size: 28px; }

/* ---------------------------------------------------------------- 만들기 */
.create { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.mk-art { position: relative; min-height: 0; background: var(--ink-2); }
.mk-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-cap { position: absolute; left: var(--s3); bottom: var(--s3); margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(20, 20, 32, 0.72); color: var(--d-text); font-size: 13px; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.mk-side { display: flex; flex-direction: column; min-height: 0; background: var(--paper); color: var(--text); }
.tabs { display: flex; gap: 2px; padding: var(--s2) var(--s2) 0; border-bottom: 1px solid var(--p-line); flex: none; overflow-x: auto; scrollbar-width: none; }
.tab { flex: 1 0 auto; min-height: 38px; padding: 0 var(--s3); border: 0; border-radius: var(--r1) var(--r1) 0 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.tab.on { background: var(--paper-2); color: var(--text); box-shadow: inset 0 -3px 0 var(--acc); }
.mk-panel { flex: 1; min-height: 0; overflow: auto; padding: var(--s2) var(--s4) var(--s3); }
.mk-panel h4, .su-body h4 { margin: var(--s3) 0 var(--s2); font-size: 13px; color: var(--text-2); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 var(--s3); border-radius: 999px; border: 1px solid var(--p-line); background: var(--paper); color: var(--text); display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; white-space: nowrap; }
.chip.sm { min-height: 32px; font-size: 13px; }
.chip.on { border-color: var(--text); background: var(--paper-3); font-weight: 700; box-shadow: inset 0 0 0 1px var(--text); }
.sw { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.18); flex: none; }
.sw.glow { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 0 10px currentColor; }
.namerow { display: flex; gap: var(--s2); }
.namerow input { flex: 1; min-width: 0; height: 42px; padding: 0 var(--s3); border: 1px solid var(--p-line); border-radius: var(--r1); background: #fff; color: var(--text); font: 600 16px var(--f-body); }
.traits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.trait { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: var(--s2) var(--s3); min-height: 60px; border: 1px solid var(--p-line); border-radius: var(--r1); background: var(--paper); text-align: left; }
.trait b { font-size: 14.5px; } .trait span { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.trait.on { border-color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc); background: var(--paper-2); }
.mk-f { flex: none; padding: var(--s2) var(--s3); border-top: 1px solid var(--p-line); justify-content: flex-end; }
.mk-f #mkBack { margin-right: auto; }
.idol.port .create { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(150px, 34%) minmax(0, 1fr); }
.idol.short .tab { min-height: 34px; } .idol.short .chip { min-height: 32px; }

/* ---------------------------------------------------------------- 일정 화면 */
.main { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "scene plan" "stats plan"; }
.sc-wrap { grid-area: scene; position: relative; min-height: 0; overflow: hidden; background: var(--ink-2); }
.scv { position: absolute; inset: 0; width: 100%; height: 100%; }
.sc-wrap.playing { cursor: pointer; }
.cond { position: absolute; left: var(--s2); top: var(--s2); display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: rgba(18, 18, 30, 0.72); font-size: 12px; color: var(--d-text); }
.cond i { width: 70px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.cond i b { display: block; height: 100%; background: #5fd08f; transition: width 0.4s var(--ease); }
.cond i b.mid { background: #f2c14e; } .cond i b.low { background: #ef6b5a; }
.cond em { font-style: normal; font-weight: 700; min-width: 2ch; }
.badges { position: absolute; right: var(--s2); top: var(--s2); display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 50%; }
.bd { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--paper); }
.bd.dn { color: var(--dn); } .bd.up { color: var(--up); }
.floats { position: absolute; left: var(--s2); right: var(--s2); bottom: var(--s2); display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.floats span { padding: 3px 9px; border-radius: 999px; background: rgba(251, 247, 239, 0.95); color: var(--text); font-size: 12.5px; animation: rise 0.6s var(--ease) both; white-space: nowrap; }
.floats .up b { color: var(--up); } .floats .dn b { color: var(--dn); }
.floats .note { background: var(--ink); color: var(--gold); border: 1px solid var(--ink-line); }
.floats .rank { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.floats .rank.win { background: var(--acc); color: var(--acc-ink); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stats { grid-area: stats; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px var(--s3); padding: var(--s2) var(--s3); background: var(--ink); border-top: 1px solid var(--ink-line); }
.st { display: grid; grid-template-columns: 3.6em minmax(0, 1fr) 2.2em; align-items: center; gap: 6px; font-size: 12.5px; color: var(--d-text-2); min-height: 18px; }
.st i { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.st i b { display: block; height: 100%; border-radius: 4px; transition: width 0.5s var(--ease); }
.st em { font-style: normal; font-weight: 700; color: var(--d-text); text-align: right; font-variant-numeric: tabular-nums; }
.st.fans { grid-template-columns: 3.6em minmax(0, 1fr); }
.st.fans em { text-align: left; color: var(--gold); }
.plan { grid-area: plan; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s3) var(--s3); min-height: 0; background: var(--paper); color: var(--text);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, var(--paper-2) 27px 28px); }
.plan-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); flex: none; }
.plan-h b { font-size: 21px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.plan-h span { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.plan-h span b { font: 700 13px var(--f-body); color: var(--text); }
.weeks { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; flex: none; }
.wk { min-height: 50px; border: 1.5px dashed var(--p-line); border-radius: var(--r1); background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 2px; }
.wk small { font-size: 12px; color: var(--text-3); line-height: 1.2; }
.wk span { font-weight: 700; font-size: 14px; line-height: 1.3; white-space: nowrap; }
.wk:not(.empty) { border-style: solid; background: var(--paper-2); }
.wk.sel { border: 2px solid var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 22%, transparent); }
.wk.done { opacity: 0.5; } .wk.now { border: 2px solid var(--text); background: var(--paper-3); }
.wk:disabled { opacity: 1; } .wk.done:disabled { opacity: 0.5; }
.acts { flex: 0 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(40px, 62px); align-content: start; gap: 6px; }
.main .acts:has(> :nth-child(8):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.act { position: relative; min-height: 46px; border: 1px solid var(--p-line); border-radius: var(--r1); background: var(--paper); display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: 8px; padding: 4px 8px; text-align: left; }
.act .ic { grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--acc-2); }
.act b { font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act small { font-size: 12px; color: var(--text-2); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act kbd { position: absolute; right: 5px; top: 3px; font: 600 12px var(--f-body); color: var(--text-3); }
.act.used { background: var(--paper-2); }
.act:active:not(:disabled) { transform: translateY(1px); }
.tip { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--text-2); flex: none; }
.plan-f { display: flex; gap: var(--s2); flex: none; margin-top: auto; }
.plan-f .go { margin-left: auto; min-width: 8.5em; }
/* 세로 화면 */
.idol.port .main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(120px, 30%) minmax(0, 1fr); grid-template-areas: "scene stats" "plan plan"; }
.idol.port .stats { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: 1px solid var(--ink-line); align-content: center; gap: 2px; padding: var(--s1) var(--s2); }
.idol.port .st { grid-template-columns: 3.5em minmax(0, 1fr) 2em; min-height: 15px; font-size: 12px; }
.idol.port .cond i { width: 46px; }
.idol.port .plan { padding: var(--s2); gap: 6px; }
.idol.port .acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.idol.port .main .acts:has(> :nth-child(8):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.idol.port .act kbd { display: none; }
.idol.tiny .act { padding: 3px 6px; column-gap: 5px; } .idol.tiny .act .ic { width: 18px; height: 18px; }
.idol.tiny .act b { font-size: 12.5px; }
.idol.short .wk { min-height: 40px; } .idol.short .plan { padding: var(--s2); gap: 6px; } .idol.short .plan-h b { font-size: 18px; }
.idol.short .act { min-height: 36px; } .idol.short.land .st { min-height: 15px; }
.idol.short.land .stats { gap: 2px var(--s3); padding: 6px var(--s3); }
.idol.short .act kbd { display: none; }
/* 일정 단추: 패널 폭에 맞춰 칸 수·크기를 줄임 (가장 긴 글 「SNS 라이브」·「매력↑ 5만 원」 66px이 잘리지 않게) */
.plan { container-type: inline-size; }
@container (max-width: 477px) { .main .acts:has(> :nth-child(8):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 356px) { .act { padding: 3px 6px; column-gap: 5px; } .act .ic { width: 18px; height: 18px; } .act b { font-size: 12.5px; } }
@container (max-width: 323px) { .act { grid-template-columns: minmax(0, 1fr); } .act .ic { display: none; } }

/* ---------------------------------------------------------------- 창 */
.modal { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: var(--s3); background: rgba(16, 15, 28, 0.55); }
.card { position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; padding: var(--s4) var(--s5) var(--s4); border-radius: var(--r3); background: var(--paper); color: var(--text); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); animation: pop 0.35s var(--ease); }
.card.small { width: min(440px, 100%); } .card.wide { width: min(640px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.card h3 { margin: 0 0 var(--s2); font-size: 22px; line-height: 1.2; }
.ev-who { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.ev-who canvas, .say canvas { width: 64px; height: 64px; flex: none; }
.ev-who div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ev-who small { font-size: 12px; color: var(--text-2); } .ev-who b { font-size: 15px; }
.ev-h { font-size: 22px; }
.ev-t, .ev-r { margin: 0 0 var(--s3); font-size: 15px; line-height: 1.65; -webkit-user-select: text; user-select: text; }
.choices { display: flex; flex-direction: column; gap: var(--s2); }
.ch { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 46px; padding: 8px var(--s3); border: 1px solid var(--p-line); border-left: 4px solid var(--acc); border-radius: var(--r1); background: var(--paper-2); text-align: left; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.ch small { font-size: 12px; font-weight: 500; color: var(--text-2); }
.ch:hover:not(:disabled) { background: var(--paper-3); }
.tag { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; font-size: 12.5px; color: #fff; vertical-align: 1px; }
.tag.up { background: var(--up); } .tag.dn { background: var(--dn); }
.deltas { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 var(--s3); }
.dc { padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--paper-2); border: 1px solid var(--p-line); white-space: nowrap; }
.dc.up { color: var(--up); } .dc.dn { color: var(--dn); }
.ev-top small { font-size: 12.5px; color: var(--text-2); }
.grade { display: flex; align-items: center; gap: var(--s4); margin: var(--s2) 0 var(--s3); }
.grade .g { width: 76px; height: 76px; border-radius: var(--r3); display: grid; place-items: center; font-size: 40px; line-height: 1; color: #fff; flex: none; }
.grade div { display: flex; flex-direction: column; }
.grade span { font-size: 13px; color: var(--text-2); } .grade strong { font-size: 30px; line-height: 1.1; font-weight: 400; }
.gS { background: #c9962c; } .gA { background: #3f8f63; } .gB { background: #4c7fb8; } .gC { background: #8a7a68; } .gD { background: #b2513f; }
.parts { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.parts li { display: flex; flex-direction: column; align-items: center; padding: 6px 2px; border-radius: var(--r1); background: var(--paper-2); font-size: 12px; color: var(--text-2); }
.parts li b { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: 15px; margin-top: 2px; }
.say { display: flex; gap: var(--s3); align-items: center; margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r2); background: var(--paper-2); }
.say p { margin: 0; font-size: 14.5px; } .say cite { font-style: normal; font-size: 12.5px; color: var(--text-2); }
.say div { min-width: 0; }
.spark { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; height: 100px; align-items: end; margin: var(--s2) 0 var(--s3); }
.spark div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 3px; }
.spark i { display: block; border-radius: 6px 6px 2px 2px; background: var(--acc); min-height: 6px; }
.spark span { font-size: 12px; color: var(--text-2); text-align: center; white-space: nowrap; }
.facts { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.facts li { display: flex; justify-content: space-between; gap: var(--s2); padding: 6px var(--s3); border-radius: var(--r1); background: var(--paper-2); font-size: 13px; }
.facts b { font-weight: 700; }
.menu { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s3); }
.toggle { display: flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s2); border-radius: var(--r1); background: var(--paper-2); font-size: 14px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--acc); }
.help { margin: 0 0 var(--s3); padding-left: 1.3em; font-size: 14px; line-height: 1.6; }
.help li + li { margin-top: 4px; }
.slots { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s3); }
.slot { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); border: 1px solid var(--p-line); border-radius: var(--r2); background: var(--paper-2); }
.slot canvas { width: 52px; height: 52px; }
.slot-t { display: flex; flex-direction: column; min-width: 0; } .slot-t b { font-size: 14px; } .slot-t span { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-b { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.idol.tiny .slot, .idol.port .slot { grid-template-columns: auto minmax(0, 1fr); } .idol.port .slot-b, .idol.tiny .slot-b { grid-column: 1 / -1; justify-content: flex-start; }
.idol.short .card { padding: var(--s3) var(--s4); }
.idol.short .card h3, .idol.short .ev-h { font-size: 19px; margin-bottom: 4px; }
.idol.short .ev-who { margin-bottom: 4px; } .idol.short .ev-who canvas { width: 44px; height: 44px; }
.idol.short .ev-t, .idol.short .ev-r { font-size: 14px; line-height: 1.5; margin-bottom: var(--s2); }
.idol.short .grade { margin: 4px 0 var(--s2); } .idol.short .grade .g { width: 56px; height: 56px; font-size: 30px; }
.idol.short .say canvas { width: 44px; height: 44px; }
.idol.short .ch { min-height: 40px; padding: 5px var(--s3); }
.idol.short.land .card.ev { width: min(760px, 100%); }
.idol.short.land .card.ev { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: var(--s4); align-items: start; }
.idol.short.land .card.ev .ev-who, .idol.short.land .card.ev .ev-h { grid-column: 1; }
.idol.short.land .card.ev .ev-body { grid-column: 2; grid-row: 1 / span 3; }

/* ---------------------------------------------------------------- 무대 */
.stage { position: absolute; inset: 0; background: #0e0d16; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.st-hud { position: absolute; left: var(--s3); right: var(--s3); top: var(--s3); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s3); pointer-events: none; }
.st-hud > * { pointer-events: auto; }
.st-t { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; border-radius: var(--r2); background: rgba(14, 13, 22, 0.66); min-width: 0; }
.st-t small { font-size: 12px; color: var(--gold); } .st-t b { font-size: 19px; line-height: 1.2; color: #fff; } .st-t span { font-size: 12.5px; color: var(--d-text-2); }
.st-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.12); }
.st-bar i { display: block; height: 100%; width: 0; background: var(--gold); }
.st-end { position: absolute; left: 50%; bottom: var(--s5); transform: translateX(-50%); display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: 999px; background: rgba(251, 247, 239, 0.96); color: var(--text); max-width: calc(100% - 24px); }
.st-end p { margin: 0; font-size: 13.5px; }
.idol.port .st-end { flex-direction: column; border-radius: var(--r3); padding: var(--s3); text-align: center; width: calc(100% - 24px); }

/* ---------------------------------------------------------------- 준비 화면들 (데뷔·앨범·공백기·시상식·갈림길·도감) */
.setup { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--paper); color: var(--text); }
.su-h { flex: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); padding: var(--s3) var(--s4) var(--s2); border-bottom: 1px solid var(--p-line); }
.su-h h2 { margin: 0; font-size: 24px; line-height: 1.15; }
.steps { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.steps li { padding: 2px 10px; border-radius: 999px; font-size: 12.5px; color: var(--text-3); background: var(--paper-2); white-space: nowrap; }
.steps li.on { color: var(--acc-ink); background: var(--acc); font-weight: 700; } .steps li.done { color: var(--text-2); }
.su-body { flex: 1; min-height: 0; overflow: auto; padding: var(--s3) var(--s4); }
.su-f { flex: none; padding: var(--s2) var(--s4); border-top: 1px solid var(--p-line); justify-content: flex-end; }
.su-f .hint { margin-right: auto; }
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.mode { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: var(--s4); border: 1px solid var(--p-line); border-radius: var(--r2); background: var(--paper); text-align: left; min-height: 110px; }
.mode b { font: 400 24px var(--f-disp); } .mode span { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.mode.on { border-color: var(--acc); box-shadow: inset 0 0 0 2px var(--acc); background: var(--paper-2); }
.peers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s2); margin-top: var(--s2); }
.peer { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s2); border: 1px solid var(--p-line); border-radius: var(--r2); background: var(--paper); text-align: center; }
.peer canvas { width: 64px; height: 64px; } .peer b { font-size: 14px; } .peer small { font-size: 12px; color: var(--text-2); line-height: 1.3; }
.peer .heart { color: #d8546a; font-size: 12px; letter-spacing: 1px; }
.peer.on { border-color: var(--acc); box-shadow: inset 0 0 0 2px var(--acc); background: var(--paper-2); }
.concepts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s2); }
.songs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.song { display: flex; flex-direction: column; gap: 6px; padding: var(--s2); border: 1px solid var(--p-line); border-radius: var(--r2); background: var(--paper); }
.song.on { border-color: var(--acc); box-shadow: inset 0 0 0 2px var(--acc); background: var(--paper-2); }
.song-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: transparent; padding: 2px; text-align: left; }
.song-pick b { font-size: 15px; } .song-pick span { font-size: 12.5px; color: var(--text-2); } .song-pick i { font-style: normal; color: var(--p-line); }
.song-play { align-self: flex-start; } .song-play .ic { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.gaps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s2); }
.gapc, .fin { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 64px; padding: var(--s2) var(--s3); border: 1px solid var(--p-line); border-left: 4px solid var(--acc); border-radius: var(--r1); background: var(--paper-2); text-align: left; }
.gapc b { font-size: 15px; } .gapc span { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.finals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2); }
.fin b { font-size: 19px; line-height: 1.2; } .fin span { font-size: 13px; color: var(--text-2); } .fin small { font-size: 12px; color: var(--text-3); } .fin small.new { color: var(--acc-2); font-weight: 700; }
.aw { list-style: none; margin: 0 0 var(--s3); padding: 0; display: flex; flex-direction: column; gap: 6px; }
.aw li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r1); background: var(--paper-2); border: 1px solid var(--p-line); }
.aw li b { font-size: 17px; } .aw-r { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.aw li.won { background: var(--gold); border-color: #d8a73a; animation: pop 0.35s var(--ease); } .aw li.won .aw-r { color: var(--gold-ink); font-weight: 700; }
.aw li.lost { opacity: 0.6; }
.cpv { position: relative; margin-top: var(--s3); height: 210px; border-radius: var(--r2); overflow: hidden; background: #0e0d16; }
.cpv canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cpv span { position: absolute; left: var(--s2); bottom: var(--s2); padding: 2px 10px; border-radius: 999px; background: rgba(251, 247, 239, 0.92); font-size: 12.5px; color: var(--text); }
.idol.short .cpv { height: 150px; }
.aw-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: var(--s3); align-items: start; }
.aw-art { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r2); overflow: hidden; background: #0e0d16; }
.aw-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.idol.port .aw-wrap { grid-template-columns: minmax(0, 1fr); }
.idol.port .aw-art { aspect-ratio: 16 / 9; order: -1; }.ends { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s2); }
.endc { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--p-line); border-radius: var(--r2); background: var(--paper-2); }
.endc canvas, .lockart { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r1); }
.lockart { display: grid; place-items: center; background: var(--paper-3); color: var(--text-3); }
.lockart .ic { width: 28px; height: 28px; }
.endc b { font-size: 13.5px; padding: 0 2px; } .endc span { font-size: 12px; color: var(--text-2); padding: 0 2px 2px; line-height: 1.4; }
.endc:not(.got) b { color: var(--text-3); }
.achs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.achs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r1); background: var(--paper-2); border: 1px solid var(--p-line); }
.achs b { font-size: 14px; } .achs span { grid-column: 1; font-size: 12.5px; color: var(--text-2); } .achs em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-size: 12px; color: var(--text-3); }
.achs li.got { border-color: var(--up); } .achs li.got em { color: var(--up); font-weight: 700; }
.idol.port .modes { grid-template-columns: minmax(0, 1fr); } .idol.port .mode { min-height: 0; }
.idol.port .peers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.idol.tiny .peers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.idol.short .su-h { padding: var(--s2) var(--s4) 6px; } .idol.short .su-h h2 { font-size: 20px; }

/* ---------------------------------------------------------------- 엔딩 */
.ending { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 1fr); }
.en-art { position: relative; min-height: 0; }
.en-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.en-side { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); background: var(--paper); color: var(--text); overflow: auto; min-height: 0; }
.en-side small { font-size: 12.5px; color: var(--text-2); } .en-side small .new { color: var(--acc-2); }
.en-side h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; }
.en-side p { margin: 0; font-size: 15px; line-height: 1.7; }
.en-side .hint { font-size: 12.5px; }
.en-side .row { margin-top: auto; padding-top: var(--s2); }
.idol.port .ending { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(150px, 40%) minmax(0, 1fr); }
.idol.port .en-side { padding: var(--s4); }
.idol.short .en-side { padding: var(--s3) var(--s4); } .idol.short .en-side p { font-size: 14px; line-height: 1.55; }

/* 토스트 */
.toast { position: absolute; left: 50%; bottom: var(--s4); z-index: 30; transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: 8px 16px; border-radius: 999px; background: rgba(14, 13, 22, 0.92); color: #fff; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .card, .floats span, .aw li.won { animation: none; }
  .btn, .st i b, .cond i b, .toast { transition: none; }
}

/* ---------------------------------------------------------------- 소개글 */
.about { max-width: 1240px; margin: var(--s6) auto 0; padding: 0 clamp(var(--s4), 3vw, var(--s6)); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); }
.about h2 { font: 400 26px/1.25 var(--f-disp); margin: var(--s6) 0 var(--s3); color: var(--ink); }
.about h2:first-child { margin-top: 0; }
.about h3 { font-size: 17px; margin: var(--s4) 0 var(--s2); }
.about p, .about li, .about dd { color: var(--page-ink); }
.about ol, .about ul { padding-left: 1.3em; }
.about dl dt { font-weight: 700; margin-top: var(--s4); }
.about dl dd { margin: 4px 0 0; }
.about .more { font-size: 14px; color: var(--page-2); line-height: 1.9; margin-top: var(--s5); }
.about .more a { color: var(--page-ink); }
.about-side { position: sticky; top: var(--s4); align-self: start; padding: var(--s4); border: 1px solid var(--page-line); border-radius: var(--r2); background: #fffdf8; }
.about-side h3:first-child { margin-top: 0; }
.keytab { width: 100%; border-collapse: collapse; font-size: 14px; }
.keytab th, .keytab td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--page-line); vertical-align: top; }
.keytab th { font-weight: 600; white-space: nowrap; padding-right: var(--s3); }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } .about-side { position: static; } }
.foot { max-width: 1240px; margin: var(--s7) auto 0; padding: var(--s4) clamp(var(--s4), 3vw, var(--s6)) var(--s6); border-top: 1px solid var(--page-line); font-size: 13px; color: var(--page-2); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
.foot p { flex-basis: 100%; margin: var(--s2) 0 0; }
