/* V-Pop! — base design system and the app shell. Owned by the ui agent.
 *
 * DESIGN TOKENS (studio.css and avatar STAGE_CSS may use these; do not rename):
 *   Surfaces   --ink (page) --ink-2 (card) --ink-3 (raised / inputs) --ink-4 (hover)
 *              aliases: --card (= --ink-2) --card2 (= --ink-3) --radius (= --r)
 *              --line (hairline border) --line-2 (stronger border) --scrim (modal backdrop)
 *   Text       --text --muted --dim --on-accent (text on pink/violet gradients)
 *   Accents    --pink --violet --cyan --amber --green --red --gold
 *              --grad (pink→violet→cyan) --grad-soft (translucent version for fills)
 *              --lc (the player's label colour; set on :root by ui.js)
 *   Stats      --st-vocal --st-dance --st-rap --st-visual --st-charm
 *   Status     --good --bad --warn
 *   Grades     --g-s --g-a --g-b --g-c --g-d
 *   Type       --font-display ("Baloo 2") --font-body (system UI)
 *              --fs-xs --fs-sm --fs-md --fs-lg --fs-xl --fs-xxl
 *   Shape      --r-sm --r --r-lg --r-pill  --shadow --shadow-lg --glow
 *   Space      --gap --gap-sm --gap-lg --pad (card padding) --gutter (page side padding)
 *   Touch      --tap (44px minimum target)
 *   Layout     --top-h --nav-h --next-h (fixed bar heights) --nav-full (nav + safe area) --maxw (content max width)
 *   Safe area  --sa-t --sa-r --sa-b --sa-l (env(safe-area-inset-*))
 *   Motion     --ease --ease-bounce --fast --slow
 *
 * Shared components defined here: .card .btn (.primary .ghost .danger .small .big .full .sq)
 * .chip (.on) .pill .meter .stats/.stat .bar/.fill/.ghost .grade.gS….gD .row .end .wrap .grow
 * .inp .lbl .kicker .muted .small .seg/.seg-b .opt-list/.opt .kv .kpis
 * .modal-wrap .modal .modal-x .modal-body .wide  #toast (.show .good .bad)
 */

:root {
  --ink: #14101f;
  --ink-2: #1e1830;
  --ink-3: #2a2242;
  --ink-4: #362c55;
  --card: var(--ink-2);
  --card2: var(--ink-3);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --scrim: rgba(8, 5, 18, .72);

  --text: #f7f2ff;
  --muted: #b8aed3;
  --dim: #8379a3;
  --on-accent: #ffffff;

  --pink: #ff4f9a;
  --violet: #8b5cff;
  --cyan: #22d3ee;
  --amber: #ffb020;
  --green: #2ee6a0;
  --red: #ff5d73;
  --gold: #ffd166;
  --grad: linear-gradient(120deg, #ff4f9a 0%, #8b5cff 55%, #22d3ee 100%);
  --grad-soft: linear-gradient(120deg, rgba(255, 79, 154, .22), rgba(139, 92, 255, .22) 55%, rgba(34, 211, 238, .18));
  --lc: #ff4f9a;

  --st-vocal: #ff5fa8;
  --st-dance: #22d3ee;
  --st-rap: #ffb020;
  --st-visual: #a47bff;
  --st-charm: #34e39a;

  --good: #34e39a;
  --bad: #ff6b81;
  --warn: #ffc043;

  --g-s: #ffd166;
  --g-a: #ff7ab8;
  --g-b: #8fa6ff;
  --g-c: #7fd8be;
  --g-d: #9a90b8;

  --font-display: "Baloo 2", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-md: 15.5px;
  --fs-lg: 19px;
  --fs-xl: 24px;
  --fs-xxl: 34px;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --radius: var(--r);
  --shadow: 0 6px 18px rgba(0, 0, 0, .28);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
  --glow: 0 0 0 1px rgba(255, 255, 255, .06), 0 8px 26px rgba(139, 92, 255, .28);

  --gap: 12px;
  --gap-sm: 8px;
  --gap-lg: 18px;
  --pad: 14px;
  --gutter: 14px;
  --tap: 44px;

  --top-h: 92px;
  --nav-h: 62px;
  --next-h: 64px;
  --maxw: 720px;

  --sa-t: env(safe-area-inset-top, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --nav-full: calc(var(--nav-h) + var(--sa-b));   /* the bottom nav's real height (round 4: the Discover feed) */

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --fast: .15s;
  --slow: .35s;

  color-scheme: dark;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 110% -10%, rgba(139, 92, 255, .22), transparent 60%),
    radial-gradient(700px 500px at -20% 10%, rgba(255, 79, 154, .16), transparent 60%),
    var(--ink);
  background-attachment: fixed;
  color: var(--text);
  font: 400 var(--fs-md)/1.45 var(--font-body);
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body.has-modal { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; margin: 0 0 .35em; letter-spacing: .2px; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); margin: 22px 2px 10px; }
p { margin: 0 0 .7em; }
b { font-weight: 700; }
small { font-size: var(--fs-sm); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.kicker { font: 700 var(--fs-xs)/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.row { display: flex; gap: var(--gap-sm); align-items: center; }
.row.end { justify-content: flex-end; margin-top: var(--gap); }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.link { background: none; border: 0; padding: 0; color: var(--cyan); text-decoration: underline; min-height: 0; font-weight: 600; }
.why { display: block; color: var(--warn); font-size: var(--fs-xs); margin-top: 4px; }
.pos { color: var(--good); }
.neg { color: var(--bad); }

/* ---------- buttons, chips, pills ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 10px 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--ink-3); color: var(--text);
  font: 700 var(--fs-md)/1.1 var(--font-display); letter-spacing: .2px;
  transition: transform var(--fast) var(--ease), background var(--fast), box-shadow var(--fast), opacity var(--fast);
  user-select: none; -webkit-user-select: none; text-align: center;
}
.btn:hover:not(:disabled) { background: var(--ink-4); }
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--on-accent); box-shadow: 0 6px 18px rgba(255, 79, 154, .28); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.btn.primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .06); }
.btn.danger { color: var(--bad); border-color: rgba(255, 107, 129, .4); }
.btn.small { min-height: 40px; padding: 8px 13px; font-size: var(--fs-sm); }
.btn.big { min-height: 56px; padding: 14px 22px; font-size: var(--fs-lg); }
.btn.full { width: 100%; }
.btn.sq { width: var(--tap); padding: 0; flex: none; font-size: 20px; }
.btn small { display: block; font: 500 var(--fs-xs)/1.2 var(--font-body); opacity: .85; }
.btn.big small, .btn.choice small { margin-top: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted); white-space: nowrap;
}
button.chip { min-height: 36px; padding: 6px 12px; font-size: var(--fs-sm); color: var(--text); transition: background var(--fast), transform var(--fast); }
button.chip:active { transform: scale(.95); }
.chip.on { background: var(--grad); border-color: transparent; color: #fff; }
.chip.trait { color: #e5d9ff; background: rgba(139, 92, 255, .2); border-color: rgba(139, 92, 255, .35); }
.chip.hurt { color: #ffd0d8; background: rgba(255, 93, 115, .18); border-color: rgba(255, 93, 115, .4); }
.chip.pre { color: #fff4c9; background: rgba(255, 176, 32, .2); border-color: rgba(255, 176, 32, .45); }
.chip.pos { color: #d7fbff; background: rgba(34, 211, 238, .16); border-color: rgba(34, 211, 238, .35); }
.chip.maxed { color: var(--gold); }
.chip.yay { color: #fff; background: var(--grad); border: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 5px 11px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
  font: 700 var(--fs-sm)/1 var(--font-body); white-space: nowrap; color: var(--text);
}
.pill small { font-weight: 500; color: var(--muted); font-size: var(--fs-xs); }
.pill.neg { color: var(--bad); border-color: rgba(255, 107, 129, .5); background: rgba(255, 93, 115, .12); }

.grade {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px;
  font: 800 13px/1 var(--font-display); color: #1a1030; vertical-align: 1px;
}
.grade.gS { background: var(--g-s); box-shadow: 0 0 12px rgba(255, 209, 102, .6); }
.grade.gA { background: var(--g-a); }
.grade.gB { background: var(--g-b); }
.grade.gC { background: var(--g-c); }
.grade.gD { background: var(--g-d); }

/* ---------- inputs ---------- */

.inp {
  min-height: var(--tap); padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--ink-3); border: 1px solid var(--line-2); color: var(--text);
  font-size: 16px; /* 16px stops iOS zooming into the field */
  width: 100%;
}
.inp:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 255, .3); }
textarea.inp { resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 16px; line-height: 1.35; word-break: break-all; }
.lbl { display: block; margin: 14px 2px 6px; font-weight: 700; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- cards ---------- */

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0)), var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--pad); margin-bottom: var(--gap);
  box-shadow: var(--shadow);
}
.cards { display: grid; gap: var(--gap); }
.cards > .card { margin: 0; }
.empty { text-align: center; padding: 26px 18px; }
.empty-i { font-size: 44px; margin-bottom: 6px; }

/* ---------- stat bars & meters ---------- */

.stats { display: grid; gap: 5px; margin: 10px 0 4px; }
.stat { display: grid; grid-template-columns: 88px 1fr 28px; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.stat b { text-align: right; font-variant-numeric: tabular-nums; }
.st-l { color: var(--muted); white-space: nowrap; }
.bar { position: relative; height: 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; transition: width var(--slow) var(--ease); }
.bar > .ghost { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 4px, rgba(255, 255, 255, .06) 4px 8px); }
.stat .fill { background: var(--c, var(--violet)); box-shadow: 0 0 10px var(--c, transparent); }
.st-vocal { --c: var(--st-vocal); }
.st-dance { --c: var(--st-dance); }
.st-rap { --c: var(--st-rap); }
.st-visual { --c: var(--st-visual); }
.st-charm { --c: var(--st-charm); }

.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.meter { display: grid; grid-template-columns: 20px 1fr 26px; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.meter b { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.meter .bar { height: 8px; }
.meter .fill { background: var(--good); }
.meter.mid .fill { background: var(--warn); }
.meter.low .fill { background: var(--bad); }
.meter.m-pop .fill { background: var(--grad); }

.progress { height: 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: inherit; box-shadow: 0 0 12px rgba(255, 79, 154, .5); transition: width var(--slow) var(--ease); }

/* ---------- avatars, badges, stages ---------- */

.av { width: 72px; flex: none; border-radius: var(--r); background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02) 70%); display: grid; place-items: center; overflow: hidden; }
/* The SVG's own viewBox sets the shape (tall full-body figures, squarer busts): width fixes, height follows. */
.av svg { width: 100%; height: auto; max-height: 100%; display: block; }
.av.av-bust { width: 76px; }
.av.av-full { width: 64px; }
.av-fallback { font-size: 40px; }
.logo-badge {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), var(--c2)); font-size: 18px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
}
.big-logo {
  display: inline-grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 18px;
  background: linear-gradient(135deg, var(--lc), #2a1d3f);
  font-size: 30px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}
.stage-box { position: relative; border-radius: var(--r); overflow: hidden; background: linear-gradient(160deg, var(--c1, var(--violet)), var(--c2, var(--cyan))); }
/* The stage keeps its own 16:10 shape (members are sized off its width), so the thumbnail is a max-width, not a fixed height. */
.stage-box.sm { max-width: 340px; margin: 0 auto; }
.stage-box.lg { min-height: 190px; margin: -4px 0 14px; }
.stage-box.sm > *, .stage-box.lg > * { max-width: 100%; }
.stage-box.beat { transform: scale(1.012); }
.stage-box { transition: transform .08s ease-out; }
.stage-fallback { display: grid; place-items: center; height: 100%; min-height: 120px; font: 800 var(--fs-xl) var(--font-display); text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }

/* ---------- title screen ---------- */

.boot-splash { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.noscript { text-align: center; padding: 40px 20px; }
.logo-type {
  font: 800 clamp(56px, 18vw, 96px)/.95 var(--font-display); letter-spacing: -1px; margin: 0;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(255, 79, 154, .4));
}
.logo-type span { display: inline-block; transform: rotate(8deg); }
.title-screen {
  position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: calc(24px + var(--sa-t)) calc(20px + var(--sa-r)) calc(24px + var(--sa-b)) calc(20px + var(--sa-l));
}
.title-glow { position: absolute; inset: -30% -30% auto; height: 80%; background: radial-gradient(closest-side, rgba(255, 79, 154, .35), transparent), radial-gradient(closest-side at 70% 60%, rgba(34, 211, 238, .25), transparent); filter: blur(20px); animation: glow 8s ease-in-out infinite alternate; pointer-events: none; }
@keyframes glow { to { transform: translateY(8%) scale(1.1); } }
.title-idols { position: relative; display: flex; justify-content: center; align-items: flex-end; margin-bottom: 8px; }
.title-idols .av { width: 96px; background: none; overflow: visible; }
.title-idols .av svg { max-height: 30vh; max-height: 30dvh; }
.title-idols .ti1 { width: 116px; z-index: 1; margin: 0 -14px; animation: bob 2.4s var(--ease) infinite; }
.title-idols .ti0 { animation: bob 2.4s var(--ease) .3s infinite; }
.title-idols .ti2 { animation: bob 2.4s var(--ease) .6s infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.tagline { position: relative; font: 600 var(--fs-lg)/1.3 var(--font-display); color: var(--muted); margin: 10px 0 26px; }
.title-btns { position: relative; display: grid; gap: 12px; width: 100%; max-width: 360px; }
.title-btns .btn.big { flex-direction: column; }
.title-foot { position: relative; margin-top: 28px; font-size: var(--fs-sm); color: var(--dim); max-width: 320px; }

/* ---------- shell: top bar, screen, next bar, nav ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  padding: calc(8px + var(--sa-t)) calc(var(--gutter) + var(--sa-r)) 8px calc(var(--gutter) + var(--sa-l));
  background: rgba(20, 16, 31, .86);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.tb-row { display: flex; align-items: center; gap: 8px; max-width: var(--maxw); margin: 0 auto; }
.tb-row + .tb-row { margin-top: 6px; }
.tb-label { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; min-height: 40px; padding: 0; background: none; border: 0; text-align: left; }
.tb-logo { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 11px; background: linear-gradient(135deg, var(--lc), #2a1d3f); font-size: 18px; }
.tb-name { font: 800 var(--fs-lg)/1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-week { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; font-weight: 600; }
.tb-mute { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); font-size: 17px; padding: 0; }
.tb-stats { gap: 6px; }
.tb-stats .pill { flex: 1 1 0; min-width: 0; justify-content: center; overflow: hidden; }
.tb-stats .pill small { overflow: hidden; text-overflow: ellipsis; }

.screen {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px calc(var(--gutter) + var(--sa-r)) calc(var(--nav-h) + var(--next-h) + 28px + var(--sa-b)) calc(var(--gutter) + var(--sa-l));
  animation: fadein .25s var(--ease);
}
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 2px 14px; }
.screen-head h2 { margin: 0 0 2px; }

.nextbar {
  position: fixed; z-index: 21; left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--sa-b));
  padding: 8px calc(var(--gutter) + var(--sa-r)) 8px calc(var(--gutter) + var(--sa-l));
  background: linear-gradient(to top, rgba(20, 16, 31, .96) 40%, rgba(20, 16, 31, 0));
  pointer-events: none;
}
.btn.next {
  pointer-events: auto; display: flex; flex-direction: column; width: 100%; max-width: 440px; margin: 0 auto;
  min-height: 52px; font-size: var(--fs-lg);
  background: var(--grad); border: 0; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  box-shadow: 0 8px 26px rgba(255, 79, 154, .38), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn.next small { font-weight: 600; opacity: .9; }
.btn.next.pending { background: linear-gradient(120deg, var(--amber), var(--pink)); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-2px); } }
.btn.next:disabled { opacity: .65; }

.nav {
  position: fixed; z-index: 22; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 0 var(--sa-r) var(--sa-b) var(--sa-l);
  background: rgba(24, 19, 38, .95);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.nav-b {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: var(--nav-h); min-width: 0; padding: 4px 2px; background: none; border: 0; color: var(--dim);
  font-size: 11px; font-weight: 700; position: relative;
}
.nav-b .ni { font-size: 22px; line-height: 1.1; transition: transform var(--fast) var(--ease-bounce); }
.nav-b.on { color: var(--text); }
.nav-b.on .ni { transform: translateY(-2px) scale(1.12); }
.nav-b.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 4px 4px; background: var(--grad); }
.nt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- HQ ---------- */

.hero { background: var(--grad-soft), var(--ink-2); border-color: rgba(255, 255, 255, .12); }
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-top h2 { margin: 0; overflow-wrap: anywhere; }
.hero-top .kicker { text-transform: none; letter-spacing: 0; font-size: var(--fs-sm); font-weight: 600; margin: 0 0 2px; }
.tier { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-weight: 700; font-size: var(--fs-sm); }

.card.alert {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--text);
  background: linear-gradient(120deg, rgba(255, 176, 32, .22), rgba(255, 79, 154, .2)), var(--ink-2); border-color: rgba(255, 176, 32, .45);
}
.al-i { font-size: 30px; }
.go { margin-left: auto; font-size: 26px; color: var(--muted); }
.card.warn { border-color: rgba(255, 107, 129, .45); background: rgba(255, 93, 115, .1); }

.checklist ol { display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--muted); }
.checklist li.done { color: var(--dim); text-decoration: line-through; }
.checklist li.now { color: var(--text); font-weight: 700; }
.checklist li .btn { margin-left: auto; }
.ck { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); font-size: 13px; font-weight: 800; }
.done .ck { background: var(--good); border-color: var(--good); color: #0c2a1e; }
.now .ck { border-color: var(--pink); color: var(--pink); }

.trend-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.trend-b { display: flex; flex-direction: column; padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .05); }
.trend-b small { color: var(--muted); font-size: var(--fs-xs); }
.trend-b b { font: 800 var(--fs-md)/1.2 var(--font-display); }

.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-bottom: var(--gap); }
.qa {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  min-height: 108px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .01)), var(--ink-2); color: var(--text);
  box-shadow: var(--shadow); transition: transform var(--fast) var(--ease);
}
.qa:active { transform: scale(.97); }
.qa-i { font-size: 28px; margin-bottom: 4px; }
.qa b { font: 800 var(--fs-md)/1.15 var(--font-display); }
.qa small { color: var(--muted); font-size: var(--fs-xs); }

.doing { display: grid; gap: 6px; }
.doing-b { display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 6px 4px; background: none; border: 0; border-radius: var(--r-sm); text-align: left; }
.doing-b:hover { background: rgba(255, 255, 255, .04); }
.doing-t { display: flex; align-items: center; gap: 10px; padding: 6px 4px; color: var(--muted); font-size: var(--fs-sm); }
.di { display: inline-grid; place-items: center; width: 34px; flex: none; font-size: 20px; }
.warn-t { color: var(--warn); }

.news { display: grid; gap: 2px; }
.news li { display: flex; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.news li:last-child { border-bottom: 0; }
.news small { color: var(--dim); font-size: var(--fs-xs); }
.news .ni { font-size: 18px; flex: none; }
.news .n-good { color: #e4fff3; }
.news .n-award { color: var(--gold); }
.news .n-bad { color: #ffd6dd; }

/* ---------- trainees & idols ---------- */

.ic-head { display: flex; gap: 12px; align-items: center; }
.ic-meta { min-width: 0; flex: 1; }
.name-b { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0; background: none; border: 0; font: 800 var(--fs-lg)/1.1 var(--font-display); text-align: left; overflow-wrap: anywhere; }
.name-b .pen { font-size: 12px; opacity: .55; }
.focus-l { margin-top: 10px; }
.chips.focus button.chip { flex: 1 1 auto; justify-content: center; }
.idol-card .row.end { margin-top: 10px; }

/* ---------- artists ---------- */

.act-card { padding: 10px; border-color: var(--line-2); }
.act-open { display: block; width: 100%; padding: 0; background: none; border: 0; text-align: left; color: var(--text); }
.act-meta { padding: 10px 4px 4px; }
.act-name { display: flex; align-items: center; gap: 8px; font: 800 var(--fs-lg)/1.15 var(--font-display); flex-wrap: wrap; }
.act-doing { margin-top: 6px; font-size: var(--fs-sm); }
.act-song { margin-top: 3px; font-size: var(--fs-sm); color: var(--muted); }
.act-card > .btn { margin-top: 8px; }

.act-title { display: flex; align-items: center; gap: 12px; }
.act-title h2 { margin: 0; overflow-wrap: anywhere; }
.act-title .logo-badge { width: 44px; height: 44px; font-size: 24px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.kpis > div { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: var(--r); background: rgba(255, 255, 255, .05); text-align: center; min-width: 0; }
.kpis b { font: 800 var(--fs-lg)/1.1 var(--font-display); white-space: nowrap; }
.kpis small { color: var(--muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap; }
.act-now { padding: 10px 12px; border-radius: var(--r); background: rgba(46, 230, 160, .1); border: 1px solid rgba(46, 230, 160, .25); font-size: var(--fs-sm); font-weight: 600; }
.act-now.busy { background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .3); }
.act-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 6px; }
.act-actions .btn { padding-left: 8px; padding-right: 8px; }

.members { display: grid; gap: 10px; }
.members li { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r); background: rgba(255, 255, 255, .035); }
.members .av { width: 64px; }
.mem-meta { flex: 1; min-width: 0; }
.mem-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.btn.sty-b { flex: none; }
.mem-meta .name-b { font-size: var(--fs-md); min-height: 32px; }

.disco { display: grid; gap: 4px; }
.disco li { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.disco li:last-child { border-bottom: 0; }
.disco.card { padding: 6px 12px; }
.d-meta { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.play-b {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); flex: none; border-radius: 50%;
  border: 0; background: var(--grad); color: #fff; font-size: 16px; box-shadow: 0 4px 14px rgba(139, 92, 255, .4); padding: 0;
}
.play-b.on { background: var(--ink-4); box-shadow: 0 0 0 2px var(--pink); animation: pulse 1s ease-in-out infinite; }
.play-b.sm { width: 36px; height: 36px; font-size: 13px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 79, 154, .25); } }

/* option lists (schedule, tours, audition tiers, pickers) */
.opt-list { display: grid; gap: 8px; margin-top: 10px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px;
  border-radius: var(--r); border: 1px solid var(--line-2); background: var(--ink-3); color: var(--text); text-align: left;
  transition: transform var(--fast) var(--ease), border-color var(--fast);
}
.opt:hover:not(:disabled) { border-color: var(--violet); }
.opt:active:not(:disabled) { transform: scale(.98); }
.opt.locked { opacity: .6; }
.opt-i { font-size: 26px; flex: none; width: 34px; text-align: center; }
.opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.opt-t b { font: 800 var(--fs-md)/1.2 var(--font-display); }
.opt-t small { color: var(--muted); font-size: var(--fs-xs); }
.opt-t .cities { color: var(--dim); }
.opt-c { flex: none; font-weight: 800; font-size: var(--fs-sm); color: var(--gold); }

/* ---------- auditions ---------- */

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--ink-3); margin: 6px 0 4px; }
.seg-b { min-height: 40px; border: 0; border-radius: var(--r-pill); background: none; font-weight: 700; font-size: var(--fs-sm); color: var(--muted); }
.seg-b.on { background: var(--grad); color: #fff; }
.cands { display: grid; gap: 10px; }
.cand { margin: 0; background: var(--ink-3); transition: border-color var(--slow), box-shadow var(--slow); }
.cand .nm { font: 800 var(--fs-lg)/1.1 var(--font-display); }
.cand .row.end { margin-top: 8px; }
.cand.signed { border-color: rgba(46, 230, 160, .55); box-shadow: 0 0 0 1px rgba(46, 230, 160, .3), 0 8px 26px rgba(46, 230, 160, .15); }
.signed-l { margin-top: 8px; font-weight: 800; color: var(--good); text-align: center; animation: pop .4s var(--ease-bounce); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.sticky-foot { position: sticky; bottom: calc(-1 * var(--pad)); margin: 12px calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding: 10px var(--pad) calc(10px + var(--sa-b)); background: linear-gradient(to top, var(--ink-2) 70%, transparent); }

/* ---------- charts ---------- */

.winner { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: rgba(255, 209, 102, .09); border: 1px solid rgba(255, 209, 102, .3); margin-bottom: var(--gap); }
.winner.mine { background: linear-gradient(120deg, rgba(255, 209, 102, .25), rgba(255, 79, 154, .22)); border-color: var(--gold); }
.w-i { font-size: 30px; }
.chart { display: grid; gap: 4px; }
.chart li {
  display: grid; grid-template-columns: 28px 36px 8px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r-sm); background: var(--ink-2); border: 1px solid transparent; min-height: 52px;
}
.chart li:has(.play-b) { grid-template-columns: 28px 36px 8px 1fr auto 36px; }
.chart li:nth-child(-n+3) .rk { color: var(--gold); }
.chart li.mine { border-color: var(--lc); background: var(--ink-3); }
.rk { font: 800 var(--fs-lg)/1 var(--font-display); text-align: center; font-variant-numeric: tabular-nums; }
.mv { font-size: 11px; font-weight: 800; text-align: center; }
.mv.up { color: var(--good); }
.mv.down { color: var(--bad); }
.mv.new { color: #1a1030; background: var(--cyan); border-radius: 6px; padding: 2px 3px; }
.mv.same { color: var(--dim); }
.dot { width: 8px; height: 28px; border-radius: 4px; }
.ct { min-width: 0; display: flex; flex-direction: column; }
.ct b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pts { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.pts small { color: var(--dim); font-size: 11px; white-space: nowrap; }

/* ---------- label ---------- */

.label-card { display: flex; align-items: center; gap: 14px; background: var(--grad-soft), var(--ink-2); }
.label-card h2 { margin: 0; overflow-wrap: anywhere; }
.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.card.up { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.card.up b { font: 800 var(--fs-md)/1.15 var(--font-display); }
.card.up small { font-size: var(--fs-xs); flex: 1; }
.card.up .btn { width: 100%; }
.pips { display: flex; gap: 4px; }
.pips i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.pips i.on { background: var(--grad); }
.trophy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tro { display: flex; flex-direction: column; align-items: center; padding: 10px; border-radius: var(--r); background: rgba(255, 209, 102, .08); }
.tro span { font-size: 28px; }
.tro b { font: 800 var(--fs-xl)/1 var(--font-display); color: var(--gold); }
.tro small { color: var(--muted); font-size: var(--fs-xs); }
.awards { display: grid; gap: 6px; margin-bottom: 8px; font-size: var(--fs-sm); }
.lifetime { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lifetime > div { display: flex; flex-direction: column; min-width: 0; }
.lifetime b { font: 800 var(--fs-lg)/1.1 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lifetime small { color: var(--muted); font-size: var(--fs-xs); }
.mchart-cap { margin-bottom: 6px; }
.mchart { display: block; width: 100%; height: 120px; margin-bottom: 6px; }
.mchart .zero { stroke: var(--line-2); stroke-width: 1; }
.mchart .pos { fill: var(--good); }
.mchart .neg { fill: var(--bad); }
.mchart .hb { cursor: pointer; }
.mchart .hb:not(.sel) rect.pos, .mchart .hb:not(.sel) rect.neg { opacity: .7; }
.mchart .hb.sel rect.pos, .mchart .hb.sel rect.neg { stroke: var(--text); stroke-width: 1.5; }
.save-card .row .btn { flex: 1 1 140px; }

/* ---------- key-value tables (money, report) ---------- */

.kv { display: grid; gap: 4px; margin: 8px 0 12px; }
.kv > div, .kv-col > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; font-size: var(--fs-sm); }
.kv b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.kv .kv-h { color: var(--muted); font-size: var(--fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-top: 8px; padding-bottom: 2px; }
.kv .kv-t { border-top: 1px solid var(--line-2); font-weight: 800; font-size: var(--fs-md); }
.kv.two { grid-template-columns: 1fr 1fr; gap: 12px; }
.kv-col { display: grid; align-content: start; gap: 0; padding: 8px 10px; border-radius: var(--r); background: rgba(255, 255, 255, .04); min-width: 0; }
.kv-col > div span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kv-col .kv-h { margin-top: 0; }
.tiers { display: grid; gap: 4px; margin-top: 10px; }
.tiers li { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); color: var(--dim); }
.tiers li.done { color: var(--muted); }
.tiers li.now { color: var(--text); font-weight: 800; background: var(--grad-soft); border: 1px solid var(--line-2); }
.fan-list { display: grid; gap: 8px; margin-top: 8px; }
.fan-list li { display: flex; align-items: center; gap: 10px; }
.fan-list li > span { flex: 1; min-width: 0; }

/* ---------- report & events ---------- */

.report h2 { margin-bottom: 8px; }
.net { display: flex; flex-direction: column; align-items: center; margin: 4px 0 8px; font: 800 var(--fs-xxl)/1 var(--font-display); }
.net small { font: 600 var(--fs-sm)/1.4 var(--font-body); color: var(--muted); }
.report .winner { margin: 0 0 8px; font-size: var(--fs-sm); display: block; }
.story { display: grid; gap: 6px; margin: 4px 0 16px; }
.story li { position: relative; padding: 8px 10px 8px 30px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); font-size: var(--fs-sm); }
.story li::before { content: "♪"; position: absolute; left: 11px; top: 7px; color: var(--pink); font-weight: 800; }
.event { text-align: center; }
.ev-top { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 6px 0 10px; }
.ev-i { font-size: 52px; line-height: 1; animation: pop .45s var(--ease-bounce); }
.ev-top .av { width: 70px; }
.ev-text { color: var(--muted); font-size: var(--fs-md); }
.choices { display: grid; gap: 8px; margin-top: 16px; }
.btn.choice { flex-direction: column; min-height: 52px; }
.award-list { display: grid; gap: 6px; margin: 12px 0 4px; text-align: left; }
.award-list li { display: grid; grid-template-columns: 1fr; padding: 8px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.award-list li small:first-child { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.award-list li.mine { background: linear-gradient(120deg, rgba(255, 209, 102, .2), rgba(255, 79, 154, .14)); border-color: rgba(255, 209, 102, .55); }
.award-list li.mine b { color: var(--gold); }
.event.awards h2 { background: linear-gradient(120deg, var(--gold), #fff3c4, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.event.awards .ev-i { filter: drop-shadow(0 0 18px rgba(255, 209, 102, .8)); }

/* ---------- new label / welcome ---------- */

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: var(--tap); height: var(--tap); border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); padding: 0; transition: transform var(--fast) var(--ease-bounce); }
.sw.on { border-color: #fff; transform: scale(1.1); }
.logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.lg { height: var(--tap); border-radius: var(--r-sm); border: 2px solid transparent; background: var(--ink-3); font-size: 22px; padding: 0; }
.lg.on { border-color: var(--pink); background: var(--ink-4); }
.ln-preview { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 12px; border-radius: var(--r); background: var(--ink-3); }
.ln-name { font: 800 var(--fs-xl)/1.1 var(--font-display); overflow-wrap: anywhere; min-width: 0; }
.welcome { text-align: center; }
.welcome .big-logo { width: 72px; height: 72px; font-size: 40px; margin: 4px auto 10px; }
.steps { display: grid; gap: 8px; margin: 10px 0 16px; text-align: left; }
.steps li { padding: 10px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .05); font-size: var(--fs-sm); }
.welcome .btn + .btn { margin-top: 8px; }
.confirm-text { font-size: var(--fs-md); margin: 6px 0 4px; }

/* ---------- modals (dom.js builds these) ---------- */

.modal-wrap {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fade .2s ease;
  padding-top: calc(12px + var(--sa-t));
}
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; width: 100%; max-width: 520px;
  max-height: calc(100vh - 24px - var(--sa-t));
  max-height: calc(100dvh - 24px - var(--sa-t));
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: linear-gradient(180deg, #251d3b, var(--ink-2) 120px);
  border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet .3s var(--ease);
}
.modal.wide { max-width: var(--maxw); }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.modal-body { padding: 20px var(--pad) calc(20px + var(--sa-b)); padding-left: calc(var(--pad) + var(--sa-l)); padding-right: calc(var(--pad) + var(--sa-r)); }
.modal-body > h2:first-child, .modal-body > h3:first-child { padding-right: 44px; }
.modal-x {
  position: sticky; top: 8px; float: right; z-index: 3; margin: 8px 8px -52px 0;
  width: var(--tap); height: var(--tap); border-radius: 50%;
  border: 1px solid var(--line-2); background: rgba(20, 16, 31, .8); color: var(--text); font-size: 17px; padding: 0;
}
.modal-body h3 { margin-top: 20px; }
.modal-body .card { box-shadow: none; }
@media (min-width: 640px) {
  .modal-wrap { align-items: center; padding: 24px; }
  .modal { border-radius: var(--r-lg); border-bottom: 1px solid var(--line-2); max-height: calc(100dvh - 48px); }
  .modal-body { padding: 24px; }
}

/* ---------- toast ---------- */

#toast {
  position: fixed; z-index: 200; left: 50%;
  bottom: calc(var(--nav-h) + var(--next-h) + 16px + var(--sa-b));
  max-width: min(92vw, 440px); padding: 12px 18px; border-radius: var(--r);
  background: #2d2447; border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: var(--fs-sm); text-align: center;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .25s var(--ease-bounce);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.good { border-color: rgba(46, 230, 160, .6); background: #1d3a34; }
#toast.bad { border-color: rgba(255, 107, 129, .6); background: #41202e; }
body.has-modal #toast { bottom: calc(24px + var(--sa-b)); }

/* ---------- wider screens ---------- */

@media (min-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .qa-grid { grid-template-columns: repeat(4, 1fr); }
  .up-grid { grid-template-columns: repeat(3, 1fr); }
  .act-actions { grid-template-columns: repeat(3, 1fr); }
  .cands { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 359px) {
  :root { --gutter: 10px; --pad: 12px; }
  .stat { grid-template-columns: 74px 1fr 26px; }
  .tb-week { display: none; }
  .kv.two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Label-colour tints where color-mix() exists (Safari 16.2+); plain fallbacks above. */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .big-logo { background: linear-gradient(135deg, var(--lc), color-mix(in srgb, var(--lc) 40%, #14101f)); box-shadow: 0 6px 20px color-mix(in srgb, var(--lc) 45%, transparent); }
  .tb-logo { background: linear-gradient(135deg, var(--lc), color-mix(in srgb, var(--lc) 35%, #14101f)); }
  .act-card { border-color: color-mix(in srgb, var(--c1) 35%, transparent); }
  .chart li.mine { background: linear-gradient(90deg, color-mix(in srgb, var(--lc) 26%, transparent), var(--ink-2) 70%); }
  .label-card { background: linear-gradient(120deg, color-mix(in srgb, var(--lc) 26%, transparent), transparent), var(--ink-2); }
  .ln-preview { background: linear-gradient(120deg, color-mix(in srgb, var(--lc) 25%, transparent), transparent), var(--ink-3); }
}

/* ---------- secret codes (Label screen) ---------- */

.code-card .row { gap: 8px; margin-top: 4px; }
.code-card .inp { min-width: 0; letter-spacing: .04em; }
.code-card small { display: block; margin-top: 8px; }

/* ---------- the idol style editor ---------- */

.style-ed { display: block; }
.sty-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-right: 48px; }
.sty-top h2 { margin: 0; overflow-wrap: anywhere; }
.sty-top .btn { flex: none; }
/* The previews stay in view while the options scroll under them. */
.sty-prev {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: 2fr 3fr; gap: 8px;
  margin: 10px calc(-1 * var(--pad)) 4px; padding: 8px var(--pad);
  background: linear-gradient(180deg, var(--ink-2) 88%, rgba(30, 24, 48, 0));
}
.sty-prev > div {
  height: 220px; height: clamp(170px, 32dvh, 300px); min-width: 0;
  border-radius: var(--r); background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 70%);
  display: grid; place-items: center; overflow: hidden;
}
.sty-prev svg { width: 100%; height: 100%; display: block; }
.sty-bust { background: radial-gradient(circle at 50% 40%, rgba(255, 143, 199, .22), rgba(139, 92, 255, .08) 70%) !important; }
.sty-h { margin: 16px 2px 8px; font: 800 var(--fs-md)/1.2 var(--font-display); }
.sty-hairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.sty-hair {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 4px 2px 6px;
  border: 0; border-radius: var(--r-sm); background: var(--ink-3); color: var(--muted);
}
.sty-hair.on { box-shadow: inset 0 0 0 2px var(--pink); background: linear-gradient(170deg, rgba(255, 79, 154, .22), var(--ink-3)); color: var(--text); }
.sty-hthumb { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; }
.sty-hthumb svg { width: 100%; height: 100%; display: block; }
.sty-hair small { font-size: 11px; line-height: 1.15; text-align: center; min-height: 2.3em; overflow-wrap: anywhere; }
.sty-sws { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sty-sw { width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 3px solid transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.sty-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--pink); transform: scale(1.08); }
.sty-custom { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(#ff4f9a, #ffb020, #2ee6a0, #22d3ee, #8b5cff, #ff4f9a); overflow: hidden; }
.sty-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.sty-custom span { pointer-events: none; font-size: 18px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.sty-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sty-chips .chip { gap: 6px; }
.sty-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5); }
.sty-dot.none { background: repeating-linear-gradient(45deg, transparent 0 3px, rgba(255, 255, 255, .45) 3px 4px); }
.sty-ico { font-style: normal; font-size: 13px; line-height: 1; }
.sty-note { margin-top: 16px; }
@media (max-width: 339px) { .sty-prev { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px) {
  .sty-prev { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
}

/* Round 5: the tabbed style studio (💇 Hair · 🙂 Face · 👗 Outfit · 🧍 Pose · 🎃 Costume). The preview and the
   tabs stay pinned together at the top while a builder panel scrolls under them. */
.sty-stick {
  position: sticky; top: 0; z-index: 3;
  margin: 10px calc(-1 * var(--pad)) 4px; padding: 8px var(--pad) 6px;
  background: linear-gradient(180deg, var(--ink-2) 92%, rgba(30, 24, 48, 0));
}
.sty-stick .sty-prev { position: static; margin: 0 0 6px; padding: 0; background: none; }
.sty-r5 .sty-prev > div { height: 200px; height: clamp(120px, 24dvh, 250px); }
.sty-tabs { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--ink); }
.sty-tab {
  min-height: 48px; min-width: 0; padding: 4px 2px; border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font: 700 11.5px/1.1 var(--font-body); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.sty-tab span { font-size: 19px; line-height: 1.1; }
.sty-tab.on { background: var(--grad); color: var(--on-accent); box-shadow: 0 3px 10px rgba(139, 92, 255, .35); }
.sty-panel { margin-top: 6px; min-width: 0; max-width: 100%; }
/* the panels' own headers stick below the pinned preview + tabs */
.sty-panel .sy-top { position: static; background: none; padding-top: 0; }
@media (min-width: 640px) {
  .sty-stick { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
}

/* ---------- round 4 (2026-09-27): her picture, 🌐 Discover, shared bands, guests ---------- */

/* Six tabs on a 320–390 px phone: slightly smaller labels so "Discover" and "Trainees" fit. */
.nav-b { font-size: 10.5px; padding: 4px 0; }
@media (max-width: 359px) { .nav-b { font-size: 9.5px; } .nav-b .ni { font-size: 20px; } }

/* The 🌐 Discover tab: social.js owns #screen, so no top bar and no Next week bar over the feed. */
body[data-screen="social"] .topbar,
body[data-screen="social"] .nextbar { display: none; }
/* The feed (social.css) sits above the nav: bottom = --nav-h + --sa-b, which is the nav's real height. */
body[data-screen="social"] .screen {
  max-width: none; animation: none;
  padding: 0 var(--sa-r) 0 var(--sa-l);
}

/* The title screen is her picture: six girls side by side, hair swaying (STAGE_CSS .sway). */
.title-idols.muses { width: 100%; max-width: 560px; gap: 0; margin-bottom: 4px; }
.title-idols.muses .av { flex: 1 1 0; width: auto; min-width: 0; animation: none; margin: 0 -1.5%; }
.title-idols.muses .av svg { width: 100%; height: auto; max-height: 36vh; max-height: 36dvh; }
.title-idols.muses .tm1, .title-idols.muses .tm4 { transform: translateY(-2px); }
.title-btns .disc-b { border-color: rgba(34, 211, 238, .45); }

/* The full-screen Discover overlay from the title (guest mode). Modals (z 100) open above it. */
.disc-overlay {
  position: fixed; inset: 0; z-index: 60; overflow: hidden;
  background: var(--ink);
  padding: var(--sa-t) var(--sa-r) 0 var(--sa-l);
}
.disc-host { position: relative; height: 100%; overflow: hidden; --nav-h: 0px; }
.disc-x {
  position: absolute; z-index: 5; top: calc(8px + var(--sa-t)); right: calc(8px + var(--sa-r));
  width: var(--tap); height: var(--tap); border-radius: 50%; padding: 0;
  border: 1px solid var(--line-2); background: rgba(20, 16, 31, .8); color: var(--text); font-size: 18px;
}
body.has-discover { overflow: hidden; }

/* HQ: the girls from the picture want to join. */
.card.muse-card {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; color: var(--text);
  background: linear-gradient(120deg, rgba(255, 79, 154, .24), rgba(139, 92, 255, .22) 60%, rgba(34, 211, 238, .16)), var(--ink-2);
  border-color: rgba(255, 143, 199, .5);
}
.mc-faces { display: flex; flex: none; }
.mc-faces .av { width: 40px; background: none; }
.mc-faces .av + .av { margin-left: -12px; }
.mc-t { display: grid; gap: 2px; min-width: 0; }
.mc-t small { color: var(--muted); font-size: var(--fs-xs); }
.muse-cands .cand .ic-head .av { background: radial-gradient(circle at 50% 35%, rgba(255, 143, 199, .25), rgba(139, 92, 255, .06) 70%); }

/* Act modal: sharing, guests, song badges. */
.btn.share-b { margin: 2px 0 6px; border-color: rgba(34, 211, 238, .45); background: linear-gradient(120deg, rgba(34, 211, 238, .16), rgba(139, 92, 255, .16)), var(--ink-3); }
.chip.posted { vertical-align: middle; font: 700 var(--fs-xs)/1 var(--font-body); color: #d7fbff; background: rgba(34, 211, 238, .18); border-color: rgba(34, 211, 238, .45); }
.chip.guest { color: #d7fbff; background: rgba(34, 211, 238, .16); border-color: rgba(34, 211, 238, .4); }
.chip.src { font-size: 11px; padding: 2px 7px; color: #ffe0f0; background: rgba(255, 79, 154, .14); border-color: rgba(255, 79, 154, .35); }
.members li.is-guest { box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .3); }
.guest-row { gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.guest-row .btn.on { background: var(--grad); color: #fff; border-color: transparent; }

/* The style editor's hair-tie row. */
.sty-tip { display: block; margin: 4px 2px 0; }

/* ---------- round 6 (2026-09-28): real days — docs/v-pop-round6.md §7 ----------
 * dy- is the daily UI (the Today bar and sheet, the gift, the calendar, the shop, energy, rooms and albums on the
 * act page, the day-start modals); rl- is the friendship web (its SVG comes from relations.js, class .rl-web). */

/* Seven tabs at 390 px: a touch smaller still, so "Trainees" and "Discover" fit in 55 px. */
.nav-b { font-size: 10px; padding: 4px 0; }
.nav-b .ni { font-size: 21px; }
@media (max-width: 359px) { .nav-b { font-size: 9px; } .nav-b .ni { font-size: 19px; } }

/* The top bar's date is a button to the calendar. */
.tb-week.dy-date { min-height: 40px; padding: 0 6px; border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); font: 700 var(--fs-xs)/1.1 var(--font-body); }
.tb-week.dy-date:active { background: rgba(255, 255, 255, .06); }
.dy-cake { margin-right: 3px; font-size: 14px; display: inline-block; animation: dy-wiggle 1.8s ease-in-out infinite; }
@keyframes dy-wiggle { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-12deg); } 90% { transform: rotate(10deg); } }

/* The Today bar (still #next.btn.next): shorter words fit one line at 390 px. */
.btn.next[data-state] { font-size: var(--fs-md); line-height: 1.2; white-space: normal; padding-left: 14px; padding-right: 14px; }
.btn.next.dy-bar-gift { background: linear-gradient(120deg, #ffb020, #ff4f9a 60%, #8b5cff); animation: nudge 1.6s ease-in-out infinite; }
.btn.next.dy-bar-done { background: linear-gradient(120deg, #3a2f66, #2a2250); color: #e6defc; box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); text-shadow: none; }

/* The 🎧 player bar's slot (social.js fills it, so-pb-): above the Today bar, on every tab. */
.dy-mbar {
  position: fixed; z-index: 21; left: 0; right: 0;
  bottom: calc(var(--nav-h) + var(--next-h) + var(--sa-b));
  padding: 0 calc(var(--gutter) + var(--sa-r)) 0 calc(var(--gutter) + var(--sa-l));
  pointer-events: none;
}
.dy-mbar > * { pointer-events: auto; max-width: 440px; margin: 0 auto; }
.dy-mbar:empty { display: none; }
.dy-mbar:not(:empty) ~ .screen { padding-bottom: calc(var(--nav-h) + var(--next-h) + 92px + var(--sa-b)); }
body[data-screen="social"] .dy-mbar { bottom: var(--nav-full); }

/* Title: Discover and Listen side by side. */
.dy-title-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.dy-title-row .btn { padding-left: 8px; padding-right: 8px; font-size: var(--fs-sm); }
.btn.dy-listen { border-color: rgba(255, 143, 199, .5); }

/* ---- HQ: the birthday banner, the Today card, the calendar strip ---- */
.card.dy-bday {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; color: var(--text);
  background: linear-gradient(120deg, rgba(255, 209, 102, .26), rgba(255, 79, 154, .24) 55%, rgba(139, 92, 255, .2)), var(--ink-2);
  border-color: rgba(255, 209, 102, .55); position: relative; overflow: hidden;
}
.card.dy-bday::after { content: "🎈"; position: absolute; right: 38px; top: -4px; font-size: 26px; opacity: .55; transform: rotate(12deg); pointer-events: none; }
.dy-bday-faces { display: flex; flex: none; }
.dy-bday-faces .av { width: 48px; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .25), transparent 70%); }
.dy-bday-faces .av + .av { margin-left: -14px; }
.dy-bday-t { display: grid; gap: 2px; min-width: 0; }
.dy-bday-t small { color: var(--muted); font-size: var(--fs-xs); }

.card.dy-today { background: linear-gradient(150deg, rgba(255, 209, 102, .14), rgba(255, 79, 154, .08) 50%, rgba(139, 92, 255, .1)), var(--ink-2); border-color: rgba(255, 209, 102, .3); }
.dy-today-top, .dy-sheet-top { display: flex; align-items: center; gap: 12px; }
.dy-today-t { min-width: 0; }
.dy-today-t > b { font: 800 var(--fs-lg)/1.15 var(--font-display); }
.dy-today-t .kicker { margin-bottom: 2px; }
.dy-cal-leaf {
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  width: 58px; height: 64px; border-radius: 14px; overflow: hidden; background: #fff6fb; color: #2b1f45;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3), inset 0 -3px 0 rgba(43, 31, 69, .12); border: 2px solid #2b1f45;
}
.dy-cal-leaf small:first-child { align-self: stretch; text-align: center; background: var(--pink); color: #fff; font: 800 11px/1 var(--font-body); padding: 4px 0 3px; letter-spacing: .06em; text-transform: uppercase; }
.dy-cal-leaf b { font: 800 26px/1 var(--font-display); margin-top: 3px; }
.dy-cal-leaf small:last-child { font: 700 10px/1 var(--font-body); color: #6b5a8a; text-transform: uppercase; margin-bottom: 3px; }
.dy-cal-leaf.big { width: 66px; height: 74px; }
.dy-cal-leaf.big b { font-size: 30px; }
.chip.dy-special { color: #fff4c9; background: rgba(255, 176, 32, .22); border-color: rgba(255, 176, 32, .5); }
.chip.dy-showchip { color: #d7fbff; background: rgba(34, 211, 238, .14); border-color: rgba(34, 211, 238, .38); }
.chip.dy-streak { color: #ffe0c2; background: rgba(255, 120, 60, .18); border-color: rgba(255, 138, 31, .45); }
.chip.dy-bdchip { color: #fff; background: linear-gradient(120deg, #ffb020, #ff4f9a); border: 0; }
.dy-today-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dy-today-btns > :first-child { grid-column: 1 / -1; }
.dy-today-btns .btn { padding-left: 8px; padding-right: 8px; }
.dy-gotgift { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .05); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.btn.dy-giftb { animation: dy-bob 1.8s ease-in-out infinite; }
@keyframes dy-bob { 50% { transform: translateY(-2px) scale(1.02); } }
.dy-today > small { display: block; margin-top: 8px; }

.dy-strip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.dy-strip-head .kicker { margin: 0; }
.dy-strip {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; padding: 2px 2px 6px; margin: 0 -4px; scrollbar-width: none;
}
.dy-strip::-webkit-scrollbar { display: none; }
.dy-day {
  flex: 0 0 52px; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px;
  padding: 7px 2px 5px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text);
  scroll-snap-align: start;
}
.dy-day small { font: 700 10.5px/1 var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.dy-day b { font: 800 var(--fs-lg)/1.1 var(--font-display); }
.dy-day.wkend small { color: #ff9fcd; }
.dy-day.busy { border-color: rgba(255, 209, 102, .4); background: rgba(255, 209, 102, .07); }
.dy-day.now { background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px rgba(255, 79, 154, .3); }
.dy-day.now small { color: #fff; }
.dy-day-ic { display: flex; gap: 1px; font-size: 13px; line-height: 1.1; min-height: 15px; }
.dy-day-ic i { font-style: normal; }
.dy-day-ic .dim { color: var(--dim); }
.dy-soon { display: grid; gap: 2px; margin-top: 6px; }
.dy-soon li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 6px 2px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.dy-soon li small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }

/* Six quick actions: shorter tiles. */
.qa-grid.dy-qa6 .qa { min-height: 92px; padding: 12px; }
.qa-grid.dy-qa6 .qa-i { font-size: 24px; margin-bottom: 2px; }

/* ---- Trainees: the dorm row, energy, Train and Give ---- */
.dy-dorm-row { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 2px 12px; }
.dy-dorm-row .btn { flex: 1 1 auto; }
.btn.dy-bed { border-color: rgba(255, 209, 102, .45); }
.meters.dy-meters3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.meters.dy-meters3 .meter { grid-template-columns: 16px 1fr 24px; gap: 4px; }
.meter.dy-en .fill { background: linear-gradient(90deg, #ffd166, #ffb020); box-shadow: 0 0 8px rgba(255, 209, 102, .5); }
.meter.dy-en.mid .fill { background: linear-gradient(90deg, #ffc043, #ff9f1c); }
.meter.dy-en.low .fill { background: var(--bad); box-shadow: none; }
.meter.dy-en .dy-over { left: 0; background: repeating-linear-gradient(135deg, #fff3c4 0 3px, #ffd166 3px 6px); opacity: .95; }
.meter.dy-en.over b { color: var(--gold); }
.dy-train-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-top: 10px; }
.btn.dy-train small { display: inline; margin: 0 0 0 4px; opacity: .85; }
.btn.dy-train[aria-disabled="true"] { filter: saturate(.35); opacity: .7; }
.dy-why { text-align: right; }
.idol-card.dy-bd-card { border-color: rgba(255, 209, 102, .55); background: linear-gradient(160deg, rgba(255, 209, 102, .12), rgba(255, 79, 154, .06) 40%, transparent 70%), var(--ink-2); }
.idol-card.dy-trained { animation: dy-glow .7s var(--ease); }
@keyframes dy-glow { 30% { box-shadow: 0 0 0 3px rgba(255, 209, 102, .55), var(--shadow); } }
.card.dy-flash { animation: dy-glow 1.4s var(--ease) 2; }
.btn.dy-more { margin-top: var(--gap); }

/* ---- the act page: 💞, rooms, albums, the MV, karaoke ---- */
.btn.dy-webb { flex: none; min-width: var(--tap); padding: 6px 10px; font-size: 18px; border-color: rgba(255, 143, 199, .5); }
.btn.dy-webb small { display: inline; font: 800 var(--fs-xs)/1 var(--font-body); margin-left: 2px; }
.dy-roomb {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: var(--tap); margin-top: 8px; padding: 4px 8px 4px 4px;
  border-radius: var(--r-sm); border: 1px solid rgba(255, 209, 102, .3); background: rgba(255, 209, 102, .06); color: var(--text); text-align: left;
}
.dy-roomb > span:last-child { display: grid; gap: 1px; min-width: 0; }
.dy-roomb b { font: 800 var(--fs-sm)/1.1 var(--font-display); }
.dy-roomb small { color: var(--muted); font-size: 11px; }
.dy-roomth { display: grid; place-items: center; width: 64px; flex: none; border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, .06); font-size: 22px; aspect-ratio: 4 / 3; }
.dy-roomth svg { display: block; width: 100%; height: auto; }
.dy-roomnote { display: block; margin-top: 6px; font-size: var(--fs-xs); }
.dy-kara { margin: -6px 0 12px; }
.dy-kara[hidden] { display: none; }
.dy-kara-chart { position: sticky; top: calc(var(--top-h) + 4px); z-index: 5; margin: 0 0 12px; }
.dy-disco-btns { display: flex; gap: 6px; margin-top: 6px; }
.btn.dy-mvb { border-color: rgba(34, 211, 238, .45); }
.disco li.dy-album { align-items: flex-start; }
.dy-tracks { display: grid; gap: 2px; margin-top: 8px; padding: 6px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .04); }
.disco .dy-tracks li { display: flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0; border: 0; }
.dy-tracks .play-b.sm { width: var(--tap); height: var(--tap); }
.dy-tn { width: 18px; flex: none; text-align: center; color: var(--dim); font: 800 var(--fs-sm)/1 var(--font-display); }
.dy-tt { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dy-tracks li.dy-ttl .dy-tt { color: var(--gold); }
.dy-opten { display: block; margin-top: 2px; color: var(--gold); font-size: 11px; font-weight: 700; white-space: nowrap; }
.dy-mvhost { position: relative; min-height: 180px; margin: 6px 0 4px; border-radius: var(--r); overflow: hidden; background: #0f0b1a; }

/* ---- 📺 the week's music shows (Charts) ---- */
.dy-show-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.dy-show {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 7px 2px 6px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); text-align: center;
}
.dy-show small { font: 800 10px/1 var(--font-body); color: var(--muted); text-transform: uppercase; }
.dy-show-e { font-size: 20px; line-height: 1.1; }
.dy-show b { font: 700 10px/1.15 var(--font-body); color: var(--muted); overflow-wrap: anywhere; }
.dy-show i { font-style: normal; font: 800 9.5px/1 var(--font-body); color: var(--gold); }
.dy-show.past { opacity: .6; }
.dy-show.now { background: var(--grad-soft); border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink) inset; }
.dy-show.now b { color: var(--text); }
.dy-show.won { opacity: 1; border-color: rgba(255, 209, 102, .55); }
.dy-show.won.mine { background: linear-gradient(160deg, rgba(255, 209, 102, .3), rgba(255, 79, 154, .2)); }

/* ---- 🏠 the dorm (Label, shop) ---- */
.card.dy-dorm { display: grid; gap: 8px; }
.card.dy-dorm small { display: block; }
.dy-beds { display: flex; flex-wrap: wrap; gap: 3px; font-size: 16px; line-height: 1; }
.dy-beds i { font-style: normal; opacity: .3; filter: grayscale(1); }
.dy-beds i.on { opacity: 1; filter: none; }
.dy-beds small { align-self: center; margin-left: 4px; color: var(--muted); font-size: var(--fs-xs); }
.dy-beds.big { font-size: 20px; padding: 8px 2px; }

/* ---- the Today sheet ---- */
.dy-sheet h2 { margin: 0 0 4px; }
.dy-jobs { display: grid; gap: 6px; margin: 14px 0 12px; }
.dy-jobs li { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; border-radius: var(--r); background: rgba(255, 255, 255, .045); border: 1px solid var(--line); }
.dy-jobs li.due { border-color: rgba(255, 209, 102, .35); }
.dy-jobs li.done { opacity: .72; }
.dy-jobs li .btn { flex: none; }
.dy-ji { display: grid; place-items: center; width: 34px; flex: none; font-size: 22px; }
.dy-jt { display: grid; gap: 1px; flex: 1; min-width: 0; }
.dy-jt b { font: 800 var(--fs-sm)/1.2 var(--font-display); }
.dy-jt small { color: var(--muted); font-size: var(--fs-xs); }
.dy-tick { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--good); color: #0c2a1e; font-weight: 900; }
.dy-sheet-btns .btn { flex: 1 1 auto; }
.dy-tomorrow { margin-top: 12px; text-align: center; }

/* ---- 🎁 the gift ---- */
.dy-gift { text-align: center; }
.dy-giftsp { color: var(--gold); font-weight: 700; font-size: var(--fs-sm); }
.dy-giftbox { display: block; width: 190px; max-width: 70%; margin: 4px auto 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dy-giftbox:disabled { cursor: default; }
.dy-giftsvg { display: block; width: 100%; height: auto; overflow: visible; }
.dy-lid, .dy-box { transform-box: fill-box; transition: transform .6s var(--ease-bounce); }
.dy-lid { transform-origin: 20% 100%; }
.dy-box { transform-origin: 50% 100%; }
.dy-spark { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; transform: scale(.6); transition: opacity .4s ease .15s, transform .6s var(--ease-bounce) .15s; }
.dy-giftbox:not(.dy-open):not(:disabled) .dy-giftsvg { animation: dy-shake 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes dy-shake { 0%, 72%, 100% { transform: rotate(0); } 76% { transform: rotate(-5deg); } 82% { transform: rotate(5deg); } 88% { transform: rotate(-3deg); } 94% { transform: rotate(2deg); } }
.dy-giftbox.dy-open .dy-lid { transform: translate(-12px, -30px) rotate(-22deg); }
.dy-giftbox.dy-open .dy-box { transform: scale(1.03, .97); }
.dy-giftbox.dy-open .dy-spark { opacity: 1; transform: scale(1); }
.dy-gifthint { margin: 6px 0 10px; }
.dy-giftgot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 12px; }
.dy-giftgot[hidden] { display: none; }
.dy-giftgot li { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(255, 209, 102, .14); border: 1px solid rgba(255, 209, 102, .45); animation: pop .45s var(--ease-bounce) both; }
.dy-giftgot li:nth-child(2) { animation-delay: .1s; }
.dy-giftgot li:nth-child(3) { animation-delay: .2s; }
.dy-giftgot span { font-size: 22px; }
.dy-giftgot b { font: 800 var(--fs-lg)/1 var(--font-display); color: var(--gold); }
.dy-giftgot small { color: var(--muted); font-size: var(--fs-xs); }
.dy-streak-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 4px 0 6px; }
.dy-streak-row li { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 4px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.dy-streak-row li small { font: 800 10px/1 var(--font-body); color: var(--dim); }
.dy-streak-row li span { font-size: 16px; opacity: .45; filter: grayscale(.8); }
.dy-streak-row li.prize { border-color: rgba(255, 209, 102, .35); }
.dy-streak-row li.on { background: linear-gradient(160deg, rgba(255, 176, 32, .35), rgba(255, 79, 154, .3)); border-color: rgba(255, 176, 32, .6); }
.dy-streak-row li.on span { opacity: 1; filter: none; }
.dy-streak-row li.on small { color: #fff; }
.dy-giftstreak > small { display: block; margin-bottom: 12px; }
.dy-gift .btn[hidden] { display: none; }

/* ---- 📅 the month calendar ---- */
.dy-calm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 44px 10px 0; }
.dy-calm-head h2 { margin: 0; text-align: center; flex: 1; }
.dy-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dy-mw { text-align: center; font: 800 10.5px/1 var(--font-body); color: var(--muted); text-transform: uppercase; padding: 2px 0 4px; }
.dy-mc {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1px; min-width: 0; min-height: 46px;
  padding: 5px 0 3px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .045); color: var(--text);
}
.dy-mc.pad { background: none; }
.dy-mc b { font: 800 var(--fs-sm)/1 var(--font-display); }
.dy-mc span { font-size: 11px; line-height: 1.1; min-height: 12px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.dy-mc.past { opacity: .5; }
.dy-mc.bd { background: rgba(255, 209, 102, .12); }
.dy-mc.now { border-color: var(--pink); background: rgba(255, 79, 154, .16); }
.dy-mc.sel { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); opacity: 1; }
.dy-daylist { margin-top: 12px; padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .04); }
.dy-daylist ul { display: grid; gap: 4px; margin-bottom: 6px; }
.dy-daylist li { display: flex; align-items: center; gap: 8px; min-height: var(--tap); }
.dy-daylist li .btn { flex: none; }

/* ---- 🛍️ the shop, the bag, pickers ---- */
.dy-shop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-right: 48px; }
.dy-shop-head h2 { margin: 0; font-size: var(--fs-lg); }
.pill.dy-shmoney { flex: none; font-size: var(--fs-sm); color: var(--gold); }
.dy-tabs {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  margin: 10px -2px 10px; padding: 2px 2px 6px; scrollbar-width: none;
}
.dy-tabs::-webkit-scrollbar { display: none; }
.dy-tab {
  display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: var(--tap); padding: 8px 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--ink-3); color: var(--text); font: 700 var(--fs-sm)/1 var(--font-body); white-space: nowrap;
}
.dy-tab.on { background: var(--grad); border-color: transparent; color: #fff; }
.dy-boost { margin: 0 0 8px; padding: 8px 10px; border-radius: var(--r-sm); background: rgba(255, 209, 102, .1); color: var(--gold); font-size: var(--fs-sm); font-weight: 700; }
.dy-shlist { display: grid; gap: 6px; }
.dy-shcat { margin: 10px 2px 2px; color: var(--muted); font: 800 var(--fs-xs)/1 var(--font-body); text-transform: uppercase; letter-spacing: .07em; }
.dy-shrow { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 10px; border-radius: var(--r); background: rgba(255, 255, 255, .045); border: 1px solid var(--line); }
.dy-she { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: 24px; }
.dy-sht { display: grid; gap: 2px; flex: 1; min-width: 0; }
.dy-sht b { font: 800 var(--fs-sm)/1.2 var(--font-display); }
.dy-sht small { color: var(--muted); font-size: var(--fs-xs); }
.dy-shp { flex: none; color: var(--gold); font-weight: 800; font-size: var(--fs-sm); white-space: nowrap; }
.dy-shb { display: flex; flex-direction: column; gap: 4px; flex: none; }
.dy-shb .btn, .dy-shrow > .btn { min-width: 64px; }
.dy-bedrow { border-color: rgba(255, 209, 102, .35); }
@media (max-width: 379px) {
  .dy-shrow { flex-wrap: wrap; }
  .dy-sht { flex-basis: calc(100% - 60px); }
  .dy-shp { margin-left: 50px; }
  .dy-shb { flex-direction: row; margin-left: auto; }
}
.dy-whos { display: grid; gap: 6px; margin-top: 10px; }
.dy-who { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px 10px 6px 6px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--ink-3); color: var(--text); text-align: left; }
.dy-who:active { transform: scale(.98); }
.dy-who > span:last-child { display: grid; gap: 1px; min-width: 0; }
.dy-who small { color: var(--muted); font-size: var(--fs-xs); }
.dy-who .av { width: 46px; }
.dy-who-e { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .08); font-size: 24px; }
.dy-who .logo-badge { width: 46px; height: 46px; font-size: 24px; }
.dy-give-top { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; }
.dy-give-top .meter { margin-top: 5px; }
.dy-give-top .kicker { margin: 0 0 4px; }
.dy-pick9 { margin: 10px 0; }

/* ---- 🏠 the rooms picker ---- */
.dy-roomgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.dy-roomcard { display: grid; gap: 4px; padding: 8px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--ink-3); color: var(--text); text-align: left; min-height: var(--tap); }
.dy-roomcard .dy-roomth { width: 100%; }
.dy-roomcard b { font: 800 var(--fs-sm)/1.1 var(--font-display); }
.dy-roomcard small { color: var(--gold); font-size: var(--fs-xs); }

/* ---- the day-start modals and the "how it went" sheet ---- */
.dy-note, .dy-away { text-align: center; }
.dy-pic { width: 112px; margin: 0 auto 4px; }
.dy-pic svg, .dy-sun svg { display: block; width: 100%; height: auto; }
.dy-pic svg { animation: pop .5s var(--ease-bounce); }
.dy-note-list { display: grid; gap: 6px; margin: 12px 0; text-align: left; }
.dy-note-list li { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 6px; padding: 9px 12px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .05); font-size: var(--fs-sm); }
.dy-note-list li span:first-child { font-size: 20px; text-align: center; }
.dy-away-days { color: var(--muted); }
.dy-away-days b { color: var(--text); }
.kpis.dy-kpis3 > div { gap: 1px; }
.kpis.dy-kpis3 small.pos { color: var(--good); }
.kpis.dy-kpis3 small.neg { color: var(--bad); }
.dy-away .story, .dy-away .kicker { text-align: left; }
.dy-bdmiss { display: grid; gap: 6px; margin: 4px 0 12px; text-align: left; }
.dy-bdmiss li { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: var(--r); background: rgba(255, 209, 102, .09); border: 1px solid rgba(255, 209, 102, .3); }
.dy-bdmiss .av { width: 46px; }
.dy-bdmiss li > span { display: grid; min-width: 0; }
.dy-bdmiss small { color: var(--muted); font-size: var(--fs-xs); }
.report.dy-morning { text-align: center; }
.report.dy-morning .kv, .report.dy-morning .story { text-align: left; }
.dy-sun { width: 84px; margin: -4px auto 0; animation: dy-rise .8s var(--ease) both; }
@keyframes dy-rise { from { transform: translateY(18px); opacity: 0; } }
.dy-pair { display: flex; align-items: center; }
.dy-pair .av + .av { margin-left: -10px; }
.dy-lines .story { margin-top: 10px; }

/* ---- 💞 the friendship web ---- */
.rl-webbox { display: grid; place-items: center; margin: 6px 0 8px; }
.rl-webbox .rl-web { width: 100%; max-width: 340px; height: auto; display: block; border-radius: 50%; }
.rl-webbox .rl-line, .rl-webbox .rl-node { cursor: pointer; }
.rl-webbox.rl-focus .rl-node:not(.rl-on) { opacity: .45; }
.rl-webbox .rl-line.rl-on { stroke-opacity: .28; stroke: #ffffff; }
.rl-webbox .rl-node.rl-on circle:first-child { stroke: #ffd166; stroke-width: 4px; }
.rl-panel { min-height: 96px; }
.rl-info { padding: 10px 12px; border-radius: var(--r); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.rl-pairnames { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin-bottom: 6px; font: 800 var(--fs-md)/1.2 var(--font-display); }
.rl-pairnames span { color: var(--muted); font-size: var(--fs-sm); }
.rl-level { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .08); background: color-mix(in srgb, var(--rl) 22%, transparent); border: 1px solid var(--rl); font-size: var(--fs-xs); font-weight: 800; white-space: nowrap; }
.rl-info > .rl-level { display: flex; justify-content: center; width: max-content; margin: 0 auto; }
.rl-meter { position: relative; height: 10px; margin: 10px 0 8px; border-radius: var(--r-pill); background: linear-gradient(90deg, rgba(255, 93, 115, .18), rgba(255, 255, 255, .06) 50%, rgba(52, 227, 154, .18)); overflow: hidden; }
.rl-mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--line-2); }
.rl-fill { position: absolute; top: 0; bottom: 0; border-radius: var(--r-pill); background: linear-gradient(90deg, #ff9fcd, #ff4f9a); }
.rl-fill.neg { background: linear-gradient(90deg, #ff5d73, #ffb020); }
.rl-log { display: grid; gap: 4px; }
.rl-log li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.rl-log small { color: var(--dim); font-size: 11px; white-space: nowrap; }
.rl-list { display: grid; gap: 4px; }
.rl-pairb { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: var(--tap); padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text); text-align: left; }
.rl-tip { text-align: center; }

/* Every round-6 tap target is at least 44 px, small buttons included. */
.dy-shrow .btn, .dy-jobs .btn, .dy-dorm-row .btn, .dy-strip-head .btn, .dy-daylist .btn, .dy-disco-btns .btn, .dy-today-btns .btn,
.card.dy-dorm .btn, .btn.dy-webb, .tb-week.dy-date { min-height: var(--tap); }

@media (min-width: 560px) {
  .qa-grid.dy-qa6 { grid-template-columns: repeat(3, 1fr); }
  .dy-roomgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dy-day { flex-basis: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .dy-cake, .btn.dy-giftb, .btn.next.dy-bar-gift, .dy-giftbox .dy-giftsvg, .dy-sun, .dy-pic svg, .dy-giftgot li, .idol-card.dy-trained, .card.dy-flash { animation: none !important; }
  .dy-lid, .dy-box, .dy-spark { transition: none; }
}

/* ---------- round 7 (2026-10-01): the 🛍️ Shop tab, birthdates on idol cards, pictures from her profile picture ----------
 * docs/v-pop-round7.md §0 items 4, 6 and 7. dy- rules only; the picture badge itself (.so-pfp) is social.css's. */

/* Eight tabs at 390 px: 48.75 px each (every one ≥ 44 px wide and 62 px tall), with a smaller icon and label so
 * "Trainees" and "Discover" still fit on one line. */
.nav { grid-template-columns: repeat(8, 1fr); }
.nav-b { font-size: 9.5px; padding: 4px 0; letter-spacing: -.01em; }
.nav-b .ni { font-size: 20px; }
@media (max-width: 359px) { .nav-b { font-size: 8.5px; letter-spacing: -.02em; } .nav-b .ni { font-size: 18px; } }

/* The Shop tab: the shop modal's shelves on a screen of their own. */
.dy-shop-screen .dy-shop-head { margin-right: 0; align-items: flex-end; }
.dy-shop-screen .dy-tabs { margin-top: 0; }

/* 🎂 her birthdate (and the age she turns) on every idol card. */
.dy-bdate { margin-top: 2px; color: var(--gold); font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; }
.dy-bdate.now { color: #fff; text-shadow: 0 0 8px rgba(255, 209, 102, .6); }
.sty-top .dy-bdate { margin-top: 3px; }

/* 🖼️ pictures: her profile picture filling a label logo box, the tap-to-change badge, and the picture sheet. */
.dy-haspic { padding: 0; overflow: hidden; }
.dy-haspic > .so-pfp { width: 100%; height: 100%; border-radius: inherit; box-shadow: none; }
.dy-picbtn {
  position: relative; display: inline-grid; place-items: center; flex: none; min-width: var(--tap); min-height: var(--tap);
  padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font: inherit;
}
.dy-picbtn:active { transform: scale(.96); }
.dy-picpen {
  position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink-3); border: 1px solid var(--line-2); font-size: 11px; font-style: normal; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.dy-picbig { border-radius: 18px; }
.dy-picm h2 { margin-bottom: 4px; }
.dy-picprev { display: grid; place-items: center; margin: 4px auto 12px; font-size: 42px; }
.dy-picprev .big-logo { width: 84px; height: 84px; font-size: 46px; border-radius: 26px; }
.dy-picopt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; margin-top: 4px; padding: 8px 12px 8px 8px;
  border-radius: var(--r); border: 2px solid var(--line-2); background: var(--ink-3); color: var(--text); text-align: left; font: inherit;
}
.dy-picopt.on { border-color: var(--pink); background: var(--ink-4); }
.dy-picopt.none { border-style: dashed; }
.dy-picopt > span:last-child { display: grid; gap: 2px; min-width: 0; }
.dy-picopt b { font: 800 var(--fs-sm)/1.2 var(--font-display); }
.dy-picopt small { color: var(--muted); font-size: var(--fs-xs); }
.dy-picth { display: grid; place-items: center; width: 52px; height: 52px; flex: none; font-size: 27px; }
.dy-picnone { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; border: 2px dashed var(--line-2); background: rgba(255, 255, 255, .06); font-size: 24px; }
.dy-piclogos { margin-top: 2px; margin-bottom: 14px; }
.ln-pfp { margin-top: 10px; }
.dy-lkpic { margin: 14px 0 4px; }
.dy-lkpic-h { margin: 0 2px 6px; font: 800 var(--fs-sm)/1.2 var(--font-display); color: var(--muted); }
