:root {
  --bg: #f6f5fb; --card: #ffffff; --line: #e4e0f0; --line-d: #cfc9e2;
  --text: #2a2342; --muted: #7b7394;
  --brand: #7c4dff; --brand-d: #5a2fd6; --accent: #ff6b9a; --gold: #f5a300;
  --good: #18b47b; --good-d: #0f8f60; --good-bg: #d9f7ea;
  --bad: #ef4a63; --bad-d: #c9304a; --bad-bg: #ffe3e8;
  --r-bg: #e8eefb; --sr-bg: #eadffd; --ssr-bg: linear-gradient(160deg, #ffe7b0, #ffd3e0);
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent;
  font: 16px/1.45 ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 0 16px calc(88px + env(safe-area-inset-bottom)); }
#top { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 10px; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.brand { font-weight: 900; font-size: 21px; letter-spacing: -.02em; color: var(--brand); }
.brand span { color: var(--accent); }
.stats { display: flex; gap: 8px; }
.chip { background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 14px; font-weight: 700; }
h1 { font-size: 24px; margin: 10px 0 2px; font-weight: 800; }
h2 { font-size: 20px; margin: 22px 0 6px; font-weight: 800; }
.muted, small { color: var(--muted); font-size: 13px; }
p { margin: 4px 0; }

/* Chunky buttons: flat face with a darker bottom edge. */
.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 800; letter-spacing: .01em;
  padding: 12px 18px; border-radius: 16px; min-height: 48px; box-shadow: 0 4px 0 var(--brand-d); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--brand-d); }
.btn:disabled { background: var(--line); color: #a9a2bd; box-shadow: 0 4px 0 var(--line-d); cursor: default; }
.btn small { color: rgba(255, 255, 255, .88); font-weight: 600; font-size: 12px; }
.btn.big { width: 100%; font-size: 17px; margin-top: 14px; text-transform: uppercase; }
.btn.sm { padding: 8px 10px; font-size: 14px; border-radius: 12px; min-height: 44px; }
.btn.gold { background: #ffb020; color: #3a2400; box-shadow: 0 4px 0 #d18a00; }
.btn.gold small { color: rgba(58, 36, 0, .8); }
.btn.ghost { background: var(--card); border: 2px solid var(--line); color: var(--muted); box-shadow: 0 3px 0 var(--line); width: 100%; margin-top: 12px; font-weight: 700; }
.btn.good { background: var(--good); box-shadow: 0 4px 0 var(--good-d); }
.btn.bad { background: var(--bad); box-shadow: 0 4px 0 var(--bad-d); }

.art { display: block; width: 100%; height: auto; }
:is(img, video).art { aspect-ratio: 5 / 6; object-fit: cover; object-position: top center; }
:is(img, video).art.full { aspect-ratio: 10 / 17; }
.rar { display: inline-block; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: 7px; background: #7d8bb0; color: #fff; vertical-align: middle; }
.r-SR .rar, .rar.r-SR { background: var(--brand); }
.r-SSR .rar, .rar.r-SSR { background: linear-gradient(135deg, #ffb020, #ff6b9a); }

/* Home */
.hero { display: grid; grid-template-columns: 44% 1fr; gap: 14px; align-items: center; }
.hero .side { min-width: 0; }
/* Comic speech bubble for the tutor's lines: uneven ink outline, comic lettering, a sharp tail
   pointing at the tutor. The outline and tail are inline SVG (see bubble() in game.js). */
.say { position: relative; padding: 16px 18px; color: #141218; text-align: center; text-transform: uppercase;
  font-family: "Comic Neue", "Chalkboard SE", "Comic Sans MS", "Marker Felt", cursive; font-weight: 700;
  font-size: 15px; line-height: 1.2; letter-spacing: .02em; }
.say span { position: relative; z-index: 1; }
.say-bg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.say-bg path { fill: #fff; stroke: #141218; stroke-width: 2.4px; stroke-linejoin: round; }
.say-tail { position: absolute; width: 18px; height: 18px; overflow: visible; z-index: 1; }
.say-tail path { fill: #fff; stroke: #141218; stroke-width: 2.4px; stroke-linejoin: round; }
.say.tail-left .say-tail { left: -14px; top: calc(50% - 6px); }
.say.tail-up .say-tail { top: -14px; left: 30%; }
.say.tail-down .say-tail { bottom: -14px; left: calc(50% - 9px); }
.say.center { display: inline-block; max-width: 90%; margin: 6px auto 16px; }
.say.pop { animation: say-pop .32s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes say-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .say.pop { animation: none; } }
.hero .stage { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Bubbles beside the tutor (never over her); the tail to her mouth is drawn by drawTails(). */
.hero, .lesson { position: relative; }
.hero .side { align-self: start; }
.say.anchored { margin-bottom: 14px; }
.lmain .say.anchored { margin: 12px 0 4px; font-size: 14px; padding: 13px 16px 13px 24px; }
.hero .say.anchored { padding-left: 24px; }
.say-link { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 3; }
.say-link path { fill: #fff; stroke: #141218; stroke-width: 2.4px; stroke-linejoin: round; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.row3 div { background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 12px 6px; text-align: center; }
.row3 b { display: block; font-size: 20px; font-weight: 800; }

.bond { margin-top: 10px; text-align: left; }
.bar { height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #ffb020); transition: width .35s; }

/* Learn */
.subject { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 12px; margin-top: 10px; }
.sname { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.sname i { font-style: normal; font-size: 20px; }
.tag { margin-left: auto; font-size: 11px; font-weight: 800; background: #fff3d6; color: #a86a00; padding: 3px 9px; border-radius: 99px; }
.diffs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; padding-bottom: 4px; }

/* Lesson */
.lbar { display: flex; align-items: center; gap: 12px; padding: 14px 0 6px; position: sticky; top: 0; background: var(--bg); z-index: 5; }
.x { background: none; border: 0; font: inherit; font-size: 24px; line-height: 1; color: #b3acc7; cursor: pointer; width: 44px; height: 44px; margin: -8px -10px -8px -12px; }
.prog { flex: 1; height: 16px; border-radius: 99px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; min-width: 16px; border-radius: 99px; background: #ffb020; box-shadow: inset 0 4px 0 rgba(255, 255, 255, .35); transition: width .35s; }
.lgems { font-weight: 800; font-size: 14px; color: var(--brand); white-space: nowrap; }
.kindrow { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.kbadge { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; }
.kind { text-transform: uppercase; letter-spacing: .08em; font-weight: 900; font-size: 13px; color: var(--brand); }
.ltitle { margin: 6px 0 4px; font-size: 22px; }
.lesson-top { display: grid; grid-template-columns: 42% 1fr; gap: 6px; align-items: start; }
.talk { min-width: 0; padding-top: 34px; }
.bubble { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.bubble::before { content: ""; position: absolute; left: -9px; top: 22px; width: 14px; height: 14px; background: var(--card);
  border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }
.speak { flex: none; background: none; border: 0; padding: 0; width: 30px; height: 30px; font-size: 22px; line-height: 30px; cursor: pointer; }
.question { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; text-decoration: underline dotted var(--line-d); text-underline-offset: 6px; line-height: 1.7; }
.react { margin-top: 10px; font-size: 14px; color: var(--muted); }
.react b { color: var(--text); }

.options { display: grid; gap: 10px; margin-top: 14px; }
.opt { font: inherit; font-size: 17px; font-weight: 700; color: var(--text); text-align: left; background: var(--card); border: 2px solid var(--line);
  border-bottom-width: 4px; border-radius: 14px; padding: 12px 16px; min-height: 52px; cursor: pointer; overflow-wrap: anywhere; }
.opt.right { border-color: var(--good); background: var(--good-bg); color: var(--good-d); }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad-d); }
.opt.dim { opacity: .5; }
/* Two ruled lines to build the sentence on. */
.answerline { display: flex; flex-wrap: wrap; gap: 6px 8px; min-height: 120px; margin-top: 12px; align-content: flex-start; padding-top: 6px;
  background: repeating-linear-gradient(transparent 0 58px, var(--line) 58px 60px); }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.tile { font: inherit; font-size: 17px; font-weight: 700; color: var(--text); background: var(--card); border: 2px solid var(--line); border-bottom-width: 4px;
  border-radius: 12px; padding: 6px 14px; min-height: 46px; cursor: pointer; display: inline-flex; align-items: center; }
.tile.used { color: transparent; background: var(--line); border-color: var(--line); cursor: default; }
.tile:disabled { cursor: default; }

/* Bottom action bar replaces the tab bar during a lesson. */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--card); border-top: 2px solid var(--line);
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
.actionbar > div { max-width: 448px; margin: 0 auto; }
.actionbar .btn.big { margin-top: 0; }
.actionbar.right { background: var(--good-bg); border-color: var(--good-bg); }
.actionbar.wrong { background: var(--bad-bg); border-color: var(--bad-bg); }
.fb { margin-bottom: 12px; }
.fb b { font-size: 20px; font-weight: 900; display: block; }
.right .fb { color: var(--good-d); } .wrong .fb { color: var(--bad-d); }
.fb p { font-weight: 600; }
.in-lesson #app { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }
.in-lesson #nav, .in-lesson #top { display: none; }

.result { text-align: center; padding-top: 8px; }
.result .tutorbig { width: 50%; margin: 0 auto; }
.result h2 { font-size: 28px; margin-top: 10px; }
.unlock { color: #a86a00; font-weight: 800; margin-top: 8px; background: #fff3d6; border-radius: 12px; padding: 8px; }

/* Gacha */
.banner { background: linear-gradient(135deg, #7c4dff, #ff6b9a); color: #fff; border-radius: 22px; padding: 16px; text-align: center; }
.banner h2 { margin-top: 0; font-size: 24px; }
.banner .muted { color: rgba(255, 255, 255, .92); margin-top: 12px; }
.banner .btn { background: #fff; color: var(--brand); box-shadow: 0 4px 0 rgba(0, 0, 0, .18); }
.banner .btn small { color: var(--muted); }
.banner .btn.gold { background: #ffb020; color: #3a2400; }
.banner .btn.gold small { color: rgba(58, 36, 0, .8); }
.pullbtns, .packs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.packs { grid-template-columns: repeat(3, 1fr); padding-bottom: 4px; }
.pack { background: var(--card); color: var(--text); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.pack small { color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.cell { text-align: center; cursor: pointer; min-width: 0; }
.cell small { font-weight: 700; }
.cell.locked .card { filter: grayscale(1) opacity(.5); }
.card { position: relative; border-radius: 16px; overflow: hidden; background: var(--r-bg); border: 3px solid transparent; }
.card.r-SR { background: var(--sr-bg); } .card.r-SSR { background: var(--ssr-bg); }
.card.active { border-color: #ffb020; }
.card.owned { opacity: .5; }
.card .rar { position: absolute; top: 6px; left: 6px; z-index: 1; }
.card .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px; font-size: 11px; font-weight: 800; color: var(--text);
  background: rgba(255, 255, 255, .88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; z-index: 10;
  background: var(--card); border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
#nav button { flex: 1; max-width: 120px; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; padding: 9px 0 10px; cursor: pointer; }
#nav i { display: block; font-style: normal; font-size: 22px; filter: grayscale(.6) opacity(.75); }
#nav button.on { color: var(--brand); }
#nav button.on i { filter: none; }

#overlay { position: fixed; inset: 0; z-index: 20; background: rgba(42, 35, 66, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: var(--card); border-radius: 24px 24px 0 0;
  padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet .btn { width: 100%; margin-top: 12px; }
.outfits { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin: 12px 0; }
.outfit { background: var(--r-bg); border: 3px solid transparent; border-radius: 14px; padding: 0 0 4px; overflow: hidden; cursor: pointer; font: inherit; }
.outfit small { font-weight: 700; }
.outfit.sel { border-color: #ffb020; }
.outfit.lock { cursor: default; } .outfit.lock .art { filter: brightness(0) opacity(.25); }
.pulls small { display: block; margin-top: 3px; font-size: 11px; }
.flip { text-align: center; animation: flip .45s both; }
@keyframes flip { from { transform: rotateY(90deg) scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flip { animation: none; } .bar i, .prog i { transition: none; } }
.field { width: 100%; margin-top: 12px; padding: 12px; min-height: 48px; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--line); border-radius: 14px; }

.hint { text-align: center; font-weight: 700; color: var(--muted); padding: 10px 0; }

/* Lesson layout: tutor down the left, question column on the right, action band at the bottom. */
.lesson { display: grid; grid-template-columns: 45% 1fr; gap: 12px; align-items: start; padding-top: 14px; }
.lchar { position: sticky; top: 14px; }
.lchar .x { position: absolute; top: -6px; left: -8px; margin: 0; z-index: 1; }
.lmain { min-width: 0; }
.lbrand { font-weight: 900; font-size: 17px; letter-spacing: -.02em; color: var(--brand); padding-left: 2px; }
.lbrand span { color: var(--accent); }
.lcount { display: block; margin: 12px 0 4px; font-weight: 800; color: var(--gold); }
.lmain .prog { height: 14px; }
.lmain .kindrow { margin-top: 16px; }
.lmain .ltitle { font-size: 21px; line-height: 1.2; margin: 8px 0 10px; }
.lmain .bubble { padding: 10px 12px; }
.lmain .question { font-size: 17px; }
.lmain .answerline { min-height: 174px; }
.lmain .tile { font-size: 16px; padding: 6px 11px; }
.lmain .bank { margin-top: 14px; }
.lmain .opt { font-size: 16px; padding: 10px 12px; }
.lmain .bond { margin-top: 16px; }
.actionbar { background: #ece6ff; border-color: #ece6ff; }
.actionbar > div { display: flex; flex-direction: column; align-items: center; }
.actionbar .fb { align-self: stretch; }
.actionbar .btn.big { width: min(100%, 300px); }
.hero { grid-template-columns: 40% 1fr; }
.result .tutorbig { width: 34%; }
:is(img, video).art.full { aspect-ratio: 140 / 378; }
/* Ruled lines sit just under each row of tiles. */
.lmain .answerline { gap: 12px 8px; padding-top: 4px; background: repeating-linear-gradient(transparent 0 56px, var(--line) 56px 58px); }
.lmain .tile { min-height: 46px; height: 46px; }

/* The tutor is never quite still: a slow idle breath, plus one-shot reactions the game triggers
   (hop on a right answer, bounce on a combo or perfect round, droop on a wrong one, wiggle on a tap). */
:is(.art, .ov).alive { transform-origin: 50% 100%; animation: t-breathe 3.6s ease-in-out infinite; }
:is(.art, .ov).alive.r-hop { animation: t-hop .55s cubic-bezier(.3, 1.5, .5, 1), t-breathe 3.6s ease-in-out .55s infinite; }
:is(.art, .ov).alive.r-bounce { animation: t-hop .5s cubic-bezier(.3, 1.5, .5, 1) 2, t-breathe 3.6s ease-in-out 1s infinite; }
:is(.art, .ov).alive.r-droop { animation: t-droop .7s ease-in-out, t-breathe 3.6s ease-in-out .7s infinite; }
:is(.art, .ov).alive.r-wiggle { animation: t-wiggle .5s ease-in-out, t-breathe 3.6s ease-in-out .5s infinite; }
@keyframes t-breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.008, 1.015) rotate(.35deg); } }
@keyframes t-hop { 0%, 100% { transform: none; } 30% { transform: translateY(-16px) scale(.99, 1.02); } 60% { transform: translateY(0) scale(1.02, .97); } }
@keyframes t-droop { 0%, 100% { transform: none; } 15% { transform: translateX(-5px) rotate(-1.2deg); } 35% { transform: translateX(5px) rotate(1.2deg); }
  55% { transform: translateX(-3px); } 75% { transform: translateY(4px) scale(1.01, .975); } }
@keyframes t-wiggle { 0%, 100% { transform: none; } 25% { transform: rotate(-2.5deg); } 50% { transform: rotate(2deg) translateY(-4px); } 75% { transform: rotate(-1deg); } }
@media (prefers-reduced-motion: reduce) { :is(.art, .ov).alive, :is(.art, .ov).alive[class*=" r-"] { animation: none; } }

/* Streak card: green when today's lesson is done, amber when the streak is at risk, pink for the comeback quest. */
.streakcard { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; margin-top: 12px; padding: 12px 14px;
  border-radius: 16px; border: 2px solid var(--line); background: var(--card); }
.streakcard b { font-size: 17px; }
.streakcard small { grid-column: 1; color: var(--muted); }
.streakcard .frz { grid-row: 1; grid-column: 2; text-align: right; font-size: 15px; }
.streakcard .ghostbtn { grid-row: 2; grid-column: 2; padding: 4px 10px; font-size: 12px; background: var(--card); color: var(--brand); border: 2px solid var(--line); box-shadow: none; }
.streakcard.safe { border-color: #9fdcb5; background: #f1fbf4; }
.streakcard.risk { border-color: #f6cf86; background: #fff8ea; }
.streakcard.comeback { border-color: #ffb3c9; background: #fff1f5; grid-template-columns: 1fr; }
/* Daily quests */
.quests { margin-top: 16px; }
.quests h3 { margin: 0 0 8px; font-size: 16px; }
.quest { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--card);
  border: 2px solid var(--line); border-radius: 14px; font-weight: 700; font-size: 14px; }
.quest small { color: var(--muted); font-weight: 600; }
.quest .bar { grid-column: 1 / -1; height: 8px; }
.quest.done { opacity: .7; }
.quest.done span { color: var(--good-d, #1f9d55); }
/* Review button and the explanation shown after a miss */
.btn.review { width: 100%; margin: 8px 0 4px; }
.fb .why { font-weight: 600; font-size: 14px; opacity: .9; }
/* Gacha: visible pity progress and full per-tutor odds */
.pity { margin-top: 12px; }
.pity small { display: block; margin-top: 4px; color: var(--muted); }
.odds { margin-top: 10px; font-size: 14px; }
.odds summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.odds ul { list-style: none; padding: 0; margin: 8px 0 0; }
.odds li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
.banner .pity small, .banner .odds summary { color: rgba(255, 255, 255, .92); }
.banner .pity .bar { background: rgba(255, 255, 255, .3); }
.banner .odds li { border-bottom-color: rgba(255, 255, 255, .25); }
/* Outfit reveal */
.reveal { text-align: center; }
.reveal .kicker { margin: 0; color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.reveal h2 { margin: 4px 0 8px; }
.revealart { width: 52%; margin: 0 auto; animation: reveal-in .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.revealart .art.full { aspect-ratio: 10 / 17; }
@keyframes reveal-in { from { transform: scale(.7) translateY(20px); opacity: 0; filter: brightness(2.2); } to { transform: none; opacity: 1; filter: none; } }
@media (prefers-reduced-motion: reduce) { .revealart { animation: none; } }
/* First-run intro */
.intro { text-align: center; }
.intro .introart { width: 42%; margin: 0 auto 6px; }
.intro .introart .art.full { aspect-ratio: 10 / 15; }
.intro p { margin: 4px 8px 12px; color: var(--muted); font-weight: 600; }
.dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--brand); }
/* Summon screen: a glowing orb in the colour of the best pull, then the cards flip in. */
.summon { display: grid; place-items: center; gap: 18px; padding: 30px 0 20px; cursor: pointer; text-align: center; }
.summon p { margin: 0; font-weight: 900; font-size: 18px; color: var(--muted); }
.summon .orb { --c: #b9c3d8; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #fff, var(--c) 55%, transparent 72%); animation: orb-pulse 1.1s ease-in-out infinite; }
.summon .orb i { width: 60px; height: 60px; border-radius: 50%; background: #fff; box-shadow: 0 0 40px 18px var(--c); }
.summon.s-SR .orb { --c: #9b6bff; }
.summon.s-SSR .orb { --c: #ffb020; animation-duration: .7s; }
.summon.s-SSR p { background: linear-gradient(90deg, #ffb020, #ff6b9a); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes orb-pulse { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.06); } }
.flip.shine .card { box-shadow: 0 0 0 3px #ffd166, 0 0 22px 4px rgba(255, 176, 32, .7); }
@media (prefers-reduced-motion: reduce) { .summon .orb { animation: none; } }
/* Lesson results: the questions you missed, with answers */
.misses { text-align: left; margin: 14px 0; }
.misses h3 { margin: 0 0 8px; font-size: 16px; }
.miss { display: grid; gap: 2px; padding: 10px 12px; margin-bottom: 8px; background: var(--card); border: 2px solid var(--line); border-radius: 14px; font-size: 14px; }
.miss .yours { color: var(--bad-d, #c0392b); text-decoration: line-through; }
.miss .ans { color: var(--good-d); font-weight: 800; }
.miss small { color: var(--muted); }
/* Next-outfit silhouette beside the bond bar */
.bond.with-peek { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; }
.bond .peek { width: 34px; height: 52px; object-fit: cover; object-position: top center; filter: brightness(0) opacity(.28); }

/* Full-size art is trimmed to the figure and shown whole: scaled to fit, standing on the bottom
   edge, so raised hands or a wide pose are never cropped. Small cards keep their face crop. */
:is(img, video).art.full { object-fit: contain; object-position: bottom center; }
/* Featured tutor on the gacha banner */
.banner .feat { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; text-align: left; margin-bottom: 12px; }
.banner .feat .card { margin: 0; }
.banner .feat h2 { margin: 2px 0 4px; }
.banner .feat p { margin: 0; font-size: 14px; }
.banner .kick { color: #fff; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; font-size: 11px; }
/* Contrast fixes (WCAG AA): darker muted text, success green, tag amber, R badge, logo pink. */
:root { --muted: #645c7e; --good-d: #0b7a51; }
.brand span, .lbrand span { color: #d6336c; }
.tag { color: #7d4e00; }
.rar, .r-R .rar, .rar.r-R { background: #5d6a90; }
.r-SR .rar, .rar.r-SR { background: var(--brand); }
.r-SSR .rar, .rar.r-SSR { background: linear-gradient(135deg, #e08a00, #d6336c); }
/* Tutor profile: personality tag and Talk button */
.ptype { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 900; color: #fff; }
.p-cheerful { background: #e0457a; } .p-warm { background: #c2620a; } .p-cool { background: #2f6fb8; } .p-elegant { background: #6b4bc4; }
.sheet .say.center { display: block; margin: 10px auto; max-width: 92%; }
.btn.talk { width: auto; display: block; margin: 0 auto 12px; padding: 6px 16px; }
/* Listening question: a big speaker button, the word hidden until answered */
.bubble.listen .speak { font-size: 30px; padding: 6px 10px; animation: t-breathe 1.6s ease-in-out infinite; }
.bubble.listen .question { text-decoration: none; color: var(--muted); }
/* iPhone layout: room for the notch when installed full-screen, and a home screen whose main
   button stays above the fold on small phones (the tutor's height follows the screen height). */
#top { padding-top: calc(14px + env(safe-area-inset-top)); }
.lesson { padding-top: calc(14px + env(safe-area-inset-top)); }
.lchar { top: calc(14px + env(safe-area-inset-top)); }
.hero .stage :is(img, video).art.full, .hero .stage svg.art { aspect-ratio: auto; width: 100%; height: clamp(230px, 44vh, 430px); }
.btn.start { margin-top: 10px; }
/* Icons (icons.js): inline SVG sized to the text around them */
.ic { width: 1.2em; height: 1.2em; vertical-align: -.25em; flex-shrink: 0; }
#nav .ic { width: 28px; height: 28px; display: block; margin: 0 auto 2px; vertical-align: 0; }
#nav i { font-style: normal; }
.chip .ic { width: 20px; height: 20px; }
.sname i .ic { width: 26px; height: 26px; }
.speak .ic { width: 26px; height: 26px; vertical-align: middle; }
.bubble.listen .speak .ic { width: 34px; height: 34px; }
.x .ic { width: 22px; height: 22px; }
.kbadge .ic { width: 16px; height: 16px; vertical-align: -.2em; }
.outfit.lock small .ic { width: 14px; height: 14px; }
.streakcard b .ic { width: 22px; height: 22px; }
.streakcard .frz .ic { width: 20px; height: 20px; }
.streakcard .ghostbtn, .pullbtns small, .quest small, .tag { white-space: nowrap; }
/* Learn screen: difficulty switch and subject tiles */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--line); border-radius: 14px; margin: 8px 0 12px; }
.seg button { font: inherit; font-weight: 800; border: 0; border-radius: 10px; padding: 9px 0; background: transparent; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--brand); box-shadow: 0 2px 0 var(--line-d); }
.subjects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.subj { font: inherit; display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; background: var(--card); color: var(--text);
  border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 18px; cursor: pointer; }
.subj:active { transform: translateY(2px); border-bottom-width: 2px; }
.subj i { font-style: normal; } .subj i .ic { width: 40px; height: 40px; }
.subj b { font-size: 16px; }
.subj .tag { margin: 0; }
.subj.rev:disabled { opacity: .55; cursor: default; }
.subj.rev.due { border-color: #ffb3c9; background: #fff1f5; }
.small { font-size: 13px; margin-top: 12px; }
.subj { grid-template-rows: 44px 22px 22px; align-content: start; }
.streakcard .ghostbtn { flex-direction: row; align-items: center; justify-content: center; gap: 4px; }
/* Short phones (iPhone SE): tighter lesson heading so all four answers fit above the fold */
@media (max-height: 700px) {
  .ltitle { font-size: 20px; margin: 4px 0 8px; }
  .kindrow { margin-top: 6px; }
  .opt { padding-top: 11px; padding-bottom: 11px; }
}
.center { text-align: center; } .small a { color: var(--brand); font-weight: 700; }
.result .tutorbig { width: auto; } .result .tutorbig :is(img, video).art.full, .result .tutorbig svg.art { aspect-ratio: auto; width: 100%; height: clamp(180px, 30vh, 320px); }
.result h2 { margin-top: 4px; }
.collect { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 16px; align-items: center; margin: 4px 0 12px; }
.collect b { font-size: 18px; } .collect small { display: block; color: var(--muted); font-size: 12px; }
/* Lesson on one screen: compact top row, answers in a 2x2 grid when short, feedback inline
   (no bar sliding over the answers), and only your answer plus the right one after answering. */
.in-lesson #app { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.ltop { display: flex; align-items: center; gap: 8px; margin: 2px 0 4px; }
.ltop .prog { height: 12px; }
.ltop .lcount { margin: 0; color: var(--muted); font-size: 13px; }
.back { flex-shrink: 0; width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer; }
.back .ic { width: 34px; height: 34px; vertical-align: 0; filter: drop-shadow(0 2px 0 var(--line-d)); }
.lmain .say.anchored { margin: 8px 0 2px; }
.kindrow { margin-top: 8px; }
.lmain .bubble { margin-top: 6px; }
.options { margin-top: 10px; }
.options.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.options.grid2 .opt { text-align: center; padding: 13px 6px; margin: 0; }
.fb { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; }
.fb.right { background: var(--good-bg); color: var(--good-d); }
.fb.wrong { background: var(--bad-bg); color: var(--bad-d); }
.fb b { font-size: 18px; }
.fb .why { margin: 4px 0 0; font-size: 13px; color: var(--text); opacity: .85; }
.fb .btn, .lmain > .btn { width: 100%; margin-top: 10px; }
@media (max-height: 700px) { .lmain .bubble { padding: 10px 12px; } .question { font-size: 17px; } }
.answerline { min-height: 120px; background: repeating-linear-gradient(transparent 0 58px, var(--line) 58px 60px); background-size: 100% 120px; background-repeat: no-repeat; } .bank { margin-top: 8px; }
/* Lesson uses the whole screen: the tutor is sized by the screen height (standing large, partly
   behind the question cards), and the answers sit at the bottom, in thumb reach. */
.lesson { min-height: calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); align-items: stretch; }
.lchar { position: relative; overflow: visible; z-index: 0; }
.lchar :is(img, video).art.full { position: absolute; left: -6px; bottom: 0; height: min(100%, 92dvh); width: auto; max-width: 175%; aspect-ratio: auto; object-fit: contain; object-position: bottom left; }
.lmain { position: relative; z-index: 1; display: flex; flex-direction: column; }
.lanswers { margin-top: auto; padding-top: 8px; }
.lmain .bubble, .lmain .opt, .lmain .fb, .lmain .tile { box-shadow: 0 2px 10px rgba(42, 33, 64, .06); }
/* Centre the tutor on her column (left/right far out + auto margins centres an absolutely placed
   image without using transform, which the breathing animation owns). */
.lchar :is(img, video).art.full { left: -200%; right: -200%; margin: 0 auto; object-position: bottom center; max-width: none; }
.lesson { overflow: hidden; }
.opt { overflow-wrap: normal; word-break: keep-all; }
/* Never cover the tutor: she fills her own column (full height, scaled to fit), nothing overlaps. */
.lchar :is(img, video).art.full { left: 0; right: 0; top: 0; bottom: 0; margin: 0; width: 100%; height: 100%; max-width: 100%; object-fit: contain; object-position: bottom center; }
.lesson { overflow: visible; }
.lchar .say.over { position: absolute; top: 2px; left: 0; right: 0; margin: 0; z-index: 2; font-size: 13px; padding: 12px 12px; }
/* Lesson grid: top band (progress, question) across, then tutor | answers. */
.lesson { display: grid; grid-template-columns: 45% 1fr; grid-template-rows: auto auto 1fr; grid-template-areas: "top top" "q q" "char main"; gap: 0 10px; }
.lesson .ltop { grid-area: top; }
.lesson .lq { grid-area: q; }
.lesson .lchar { grid-area: char; position: relative; top: 0; min-height: 0; }
.lesson .lmain { grid-area: main; }
.lq .kindrow { margin-top: 2px; }
.lq .bubble { margin: 4px 0 6px; }
.lq .bubble::before { display: none; }
/* Subject level on each Learn tile */
.subj { grid-template-rows: 44px 22px 20px 22px; }
.lvl { position: relative; display: block; width: 70%; height: 18px; border-radius: 99px; background: var(--line); overflow: hidden; font-size: 11px; font-weight: 900; line-height: 18px; color: var(--text); }
.lvl i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #9ee6c4, #7cc8ff); border-radius: 99px; z-index: 0; }
.lvl { text-align: center; isolation: isolate; } .lvl::after { content: ''; } .lvl i { z-index: -1; }
/* Compact subject tiles: icon, name, level; the specialty tag sits in the top corner */
.subj { position: relative; grid-template-rows: 34px 20px 18px; gap: 5px; padding: 10px 8px; }
.subj i .ic { width: 32px; height: 32px; }
.subj .tag { position: absolute; top: 6px; right: 6px; margin: 0; padding: 2px 7px; font-size: 10px; }
.subj.rev .tag { position: static; }

/* App icon picker */
.icons h3 { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 15px; }
.icgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ictile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; font: inherit; color: inherit; cursor: pointer; }
.ictile img { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.ictile b { font-size: 12px; }
.ictile small { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.ictile small .ic { width: 12px; height: 12px; }
.ictile.on { border-color: #7c4dff; box-shadow: 0 0 0 2px #7c4dff33; }
.ictile.locked img { filter: saturate(.55) brightness(.92); }
.ictile .lk { position: absolute; top: 4px; right: 6px; }
.ictile .lk .ic { width: 18px; height: 18px; }

/* Toasts: a comic card that pops in under the header. */
#toast { position: fixed; left: 50%; top: calc(58px + env(safe-area-inset-top)); z-index: 30; width: max-content; max-width: min(92vw, 440px);
  display: flex; align-items: center; gap: 10px; padding: 9px 14px 11px 9px; overflow: hidden; cursor: pointer;
  background: #fff; color: var(--text); font-weight: 800; font-size: 14.5px; line-height: 1.3;
  border: 2.5px solid #2a2140; border-radius: 18px; box-shadow: 0 4px 0 #2a2140, 0 12px 28px rgba(42, 33, 64, .22);
  opacity: 0; transform: translate(-50%, -14px) scale(.9); transition: opacity .18s ease, transform .2s ease; }
#toast.in { opacity: 1; transform: translate(-50%, 0) scale(1); transition: opacity .2s ease, transform .38s cubic-bezier(.3, 1.6, .5, 1); }
#toast .tb { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid #2a2140; background: var(--tbg, #efe9ff); }
#toast .tb .ic { width: 22px; height: 22px; }
#toast .tm .ic { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
#toast .tl { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--tbar, #7c4dff); transform-origin: left; }
#toast.in .tl { animation: toastlife var(--life, 3s) linear forwards; }
@keyframes toastlife { from { transform: scaleX(1); } to { transform: scaleX(0); } }
#toast.t-reward { --tbg: #fff1c7; --tbar: #f5a300; background: linear-gradient(180deg, #fffaf0, #fff); }
#toast.t-reward.in .tb { animation: toastbounce .6s .1s cubic-bezier(.3, 1.8, .5, 1); }
#toast.t-good { --tbg: #d9f7ea; --tbar: #18b47b; }
#toast.t-warn { --tbg: #ffe3e8; --tbar: #ef4a63; }
#toast.t-warn.in { animation: toastshake .35s .15s; }
#toast.t-info { --tbg: #efe9ff; --tbar: #7c4dff; }
@keyframes toastbounce { 0% { transform: scale(.5) rotate(-20deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes toastshake { 0%, 100% { margin-left: 0; } 25% { margin-left: -5px; } 75% { margin-left: 5px; } }
@media (prefers-reduced-motion: reduce) {
  #toast, #toast.in { transition: opacity .15s; transform: translate(-50%, 0); animation: none; }
  #toast.in .tb, #toast.in .tl { animation: none; }
}

/* ===== Comic look, everywhere =====
   One style for the whole app, matching the speech bubbles, the app icon and the toasts: a dark
   ink outline, a hard drop shadow in the same ink, bold rounded shapes. Selection states use a
   coloured ring outside the outline, so the ink line itself never changes colour. */
:root { --ink: #2a2140; --ink-w: 2.5px; --pop: 0 4px 0 var(--ink); --pop-s: 0 3px 0 var(--ink); }
h1, h2 { font-weight: 900; letter-spacing: -.01em; }

/* buttons */
.btn { border: var(--ink-w) solid var(--ink); box-shadow: var(--pop); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.gold, .btn.good, .btn.bad, .banner .btn { box-shadow: var(--pop); }
.btn.ghost { border: var(--ink-w) solid var(--ink); color: var(--text); box-shadow: var(--pop-s); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { box-shadow: var(--pop-s); }
.pack { border: var(--ink-w) solid var(--ink); box-shadow: var(--pop); }

/* header chips, tags, rarity badges */
.chip { border: var(--ink-w) solid var(--ink); box-shadow: 0 2px 0 var(--ink); font-weight: 800; }
.tag { border: 2px solid var(--ink); }
.rar { border: 2px solid var(--ink); }

/* cards and panels */
.bubble, .quest, .streakcard, .subj, .collect, .fb, .field, .odds ul { border: var(--ink-w) solid var(--ink); }
.bubble, .quest, .streakcard { box-shadow: var(--pop-s); }
.subj { border-bottom-width: var(--ink-w); box-shadow: var(--pop); }
.subj:active { transform: translateY(3px); border-bottom-width: var(--ink-w); box-shadow: 0 1px 0 var(--ink); }
.subj.rev.due { border-color: var(--ink); box-shadow: 0 0 0 3px #ff8fb1, var(--pop); }
.streakcard.safe, .streakcard.risk, .streakcard.comeback { border-color: var(--ink); }
.collect { padding: 10px 12px; border-radius: 16px; background: var(--card); box-shadow: var(--pop-s); }
.banner { border: var(--ink-w) solid var(--ink); box-shadow: 0 5px 0 var(--ink); }

/* answers and word tiles */
.opt { border: var(--ink-w) solid var(--ink); box-shadow: var(--pop-s); }
.opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.opt.right { border-color: var(--ink); background: #c8f3df; color: #0a5c3e; box-shadow: 0 0 0 3px var(--good), var(--pop-s); }
.opt.wrong { border-color: var(--ink); background: #ffd5dd; color: #9a1f36; box-shadow: 0 0 0 3px var(--bad), var(--pop-s); }
.tile { border: var(--ink-w) solid var(--ink); border-bottom-width: var(--ink-w); box-shadow: var(--pop-s); }
.fb.right { background: #c8f3df; } .fb.wrong { background: #ffd5dd; }

/* tutor cards and outfits */
.card { border: var(--ink-w) solid var(--ink); box-shadow: var(--pop-s); }
.card.active { border-color: var(--ink); box-shadow: 0 0 0 3px #ffb020, var(--pop-s); }
.outfit { border: var(--ink-w) solid var(--ink); box-shadow: var(--pop-s); }
.outfit.sel { border-color: var(--ink); box-shadow: 0 0 0 3px #ffb020, var(--pop-s); }
.ictile { border: var(--ink-w) solid var(--ink); box-shadow: var(--pop-s); }
.ictile.on { border-color: var(--ink); box-shadow: 0 0 0 3px #7c4dff, var(--pop-s); }
.ictile img { border: 2px solid var(--ink); box-shadow: none; }

/* progress bars */
.bar, .prog, .lvl { border: 2px solid var(--ink); background: #fff; }
.bar i, .prog i { border-radius: 0; }
.lvl i { border-radius: 0; }

/* difficulty switch */
.seg { background: #fff; border: var(--ink-w) solid var(--ink); box-shadow: var(--pop-s); }
.seg button.on { background: var(--brand); color: #fff; box-shadow: none; border: 2px solid var(--ink); }

/* bottom nav and overlay sheets */
#nav { border-top: var(--ink-w) solid var(--ink); }
#nav button.on { color: var(--text); }
#nav button.on i { display: block; width: 46px; margin: 0 auto; border-radius: 12px; background: #efe9ff; border: 2px solid var(--ink); }
.sheet { border: var(--ink-w) solid var(--ink); border-bottom: 0; }
.dots i { border: 2px solid var(--ink); width: 10px; height: 10px; }
/* Placeholder tutor drawings (used until a tutor has painted art) get the same ink outline. */
svg.art > path, svg.art > ellipse, svg.art > rect, svg.art > g > path { stroke: var(--ink); stroke-width: 2.5px; stroke-linejoin: round; paint-order: stroke; }
/* Faded cards (not hired, owned) fade the picture, not the ink outline. */
.cell.locked .card, .card.owned { filter: none; opacity: 1; }
.cell.locked .card > :not(.rar), .card.owned > :not(.rar) { filter: grayscale(1) opacity(.5); }
.streakcard .ghostbtn { border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }

/* ===== Life =====
   Idle: breathing (transform) plus a slow sway (rotate) that never stops. Talking: quick small
   bobs (scale) while a new line appears. Reactions use transform, so all three combine. */
:is(.art, .ov).alive { animation: t-breathe 3.6s ease-in-out infinite, t-sway 7.5s ease-in-out infinite; }
:is(.art, .ov).alive.r-hop { animation: t-hop .6s cubic-bezier(.3, 1.5, .5, 1), t-breathe 3.6s ease-in-out .6s infinite, t-sway 7.5s ease-in-out infinite; }
:is(.art, .ov).alive.r-bounce { animation: t-hop .5s cubic-bezier(.3, 1.5, .5, 1) 2, t-breathe 3.6s ease-in-out 1s infinite, t-sway 7.5s ease-in-out infinite; }
:is(.art, .ov).alive.r-droop { animation: t-droop .8s ease-in-out, t-breathe 3.6s ease-in-out .8s infinite, t-sway 7.5s ease-in-out infinite; }
:is(.art, .ov).alive.r-wiggle { animation: t-wiggle .5s ease-in-out, t-breathe 3.6s ease-in-out .5s infinite, t-sway 7.5s ease-in-out infinite; }
:is(.art, .ov).alive.talking:not([class*=" r-"]) { animation: t-breathe 3.6s ease-in-out infinite, t-sway 7.5s ease-in-out infinite, t-talk .32s ease-in-out infinite; }
@keyframes t-sway { 0%, 100% { rotate: -.6deg; } 50% { rotate: .6deg; } }
@keyframes t-talk { 0%, 100% { scale: 1 1; } 50% { scale: 1.006 1.018; } }
@keyframes t-hop { 0%, 100% { transform: none; } 18% { transform: scale(1.05, .94); } 42% { transform: translateY(-20px) scale(.97, 1.05); }
  70% { transform: translateY(0) scale(1.04, .96); } 85% { transform: scale(.99, 1.01); } }
@keyframes t-droop { 0%, 100% { transform: none; } 12% { transform: rotate(-2deg); } 26% { transform: rotate(2deg); } 40% { transform: rotate(-1.4deg); }
  60% { transform: translateY(5px) scale(1.01, .97); } 80% { transform: translateY(3px) scale(1.005, .985); } }

/* particles around her head */
.stage, .lchar, .tutorbig { position: relative; }
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: visible; }
.fx i { position: absolute; display: block; }
.fx .ic { width: 26px; height: 26px; display: block; }
.fx-pop { opacity: 0; animation: fx-pop .95s cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes fx-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  20% { opacity: 1; transform: translate(calc(-50% + var(--dx) * .5), calc(-50% + var(--dy) * .5)) scale(1.15); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) - 18px)) scale(.8) rotate(var(--r)); } }
.fx-conf b { display: block; width: 9px; height: 14px; border: 1.5px solid #2a2140; border-radius: 2px; }
.fx-conf { opacity: 0; animation: fx-conf 1.4s cubic-bezier(.2, .8, .4, 1) forwards; }
@keyframes fx-conf { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 140px)) rotate(calc(var(--r) * 3)); } }
.fx-sweat { opacity: 0; animation: fx-sweat 1.3s ease-in forwards; }
.fx-sweat .ic { width: 22px; height: 22px; }
@keyframes fx-sweat { 0% { opacity: 0; transform: translateY(-6px) scale(.4); } 25% { opacity: 1; transform: none; } 80% { opacity: 1; transform: translateY(16px); }
  100% { opacity: 0; transform: translateY(24px) scale(.8); } }
@media (prefers-reduced-motion: reduce) {
  :is(.art, .ov).alive, :is(.art, .ov).alive[class*=" r-"], :is(.art, .ov).alive.talking:not([class*=" r-"]) { animation: none; }
  .fx { display: none; }
}

/* Expression patches over the face: hidden until placed, shown for a blink or a mouth flap. */
.ov { position: absolute; z-index: 2; pointer-events: none; opacity: 0; max-width: none; }
.ov.placed.on { opacity: 1; }

/* Video tutors: rendered on white and multiplied onto the page, so the white disappears and she
   stands in the app like the cut-out stills. No CSS bobbing: the video has her real motion. */
video.art.live { mix-blend-mode: multiply; background: transparent; pointer-events: auto; }

/* Home: a big tutor. Her column takes most of the width and she stands from the top of the hero, so
   the bubble sits beside her face with no empty space above it. Video tutors have invisible white
   margins (for motion room), so the video spills past her column instead of shrinking her. */
.hero { grid-template-columns: 56% 1fr; gap: 6px; align-items: start; }
.hero .stage :is(img, video).art.full, .hero .stage svg.art { height: clamp(300px, 58vh, 600px); }
.hero .stage video.art.full { width: 124%; margin-left: -12%; max-width: none; }
.hero .side { padding-top: 4px; position: relative; z-index: 1; }
.hero .side h1 { font-size: 22px; margin-top: 8px; }
.hero .side p { font-size: 14px; }
/* Bigger still: her column takes 62% and runs closer to the screen edges; the bio moves to her Tutors
   page so the side column is just the bubble and her name. The video is pulled up over its own
   invisible top margin. */
#app { padding-left: 10px; padding-right: 10px; }
.hero { grid-template-columns: 62% 1fr; gap: 0; margin: 0 -6px; }
.hero .side p.muted { display: none; }
.hero .side h1 { font-size: 20px; }
.hero .stage :is(img, video).art.full, .hero .stage svg.art { height: clamp(320px, 60vh, 640px); }
.hero .stage video.art.full { width: 122%; margin-left: -11%; margin-top: -4%; }

/* Comic logo: the bubble-face mark, then chunky rounded letters with an ink outline and a hard ink
   shadow, and a bigger, tilted pink "Pop". */
#top .brand { display: flex; align-items: center; gap: 6px; line-height: 1; font-size: 27px; letter-spacing: -.01em; }
#top .brand .mark { width: 34px; height: 34px; border-radius: 9px; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); transform: rotate(-6deg); }
#top .brand b { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif; font-weight: 900;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
#top .brand .w1 { color: #8b5cff; }
#top .brand .w2 { color: #ff5c93; font-size: 1.15em; display: inline-block; transform: rotate(-5deg) translateY(-1px); margin-left: -3px; }
/* Her description stays on home, under her name in the side column (it does not take space from her). */
.hero .side p.muted { display: block; font-size: 13.5px; line-height: 1.35; margin-top: 4px; }

/* Speech bubble, comic style everywhere: a rounder hand-drawn balloon in ink with the app's hard ink
   shadow, curved tapering tails, and new lines that type out letter by letter as she says them. */
.say-bg path, .say-tail path, .say-link path { stroke: var(--ink); stroke-width: 2.6px; }
.say-bg { filter: drop-shadow(0 3px 0 var(--ink)); }
.say-link { filter: drop-shadow(0 2px 0 var(--ink)); }
.say { padding: 15px 18px 16px; letter-spacing: .03em; }
.say.typing > span i { font-style: normal; opacity: 0; animation: say-ch .01s linear forwards; animation-delay: calc(var(--i) * 24ms + 140ms); }
@keyframes say-ch { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .say.typing > span i { opacity: 1; animation: none; } }

/* Right side breathing room on home: pull only the left edge out, pad the text column. */
.hero { margin: 0 0 0 -6px; }
.hero .side { padding-right: 6px; }
.hero .say.anchored { position: relative; z-index: 2; font-size: 14px; }

/* ===== Cartoon buttons =====
   Springy squash on press, a wobble-and-shine on the Start button to invite a tap, a pop on the
   selected nav icon, a bump when gems or streak change, and screens that rise in. */
.btn, .opt, .subj, .tile, .pack, .ictile, .chip, #nav button i { transition: transform .16s cubic-bezier(.3, 1.7, .5, 1), box-shadow .12s; }
.btn:active:not(:disabled) { transform: translateY(3px) scale(.97, .93); }
.opt:active:not(:disabled), .tile:active:not(:disabled), .pack:active, .ictile:active { transform: translateY(2px) scale(.97, .94); }
.subj:active { transform: translateY(3px) scale(.96, .93) rotate(-1deg); }
@media (hover: hover) {
  .btn:hover:not(:disabled), .subj:hover, .pack:hover, .ictile:hover { transform: translateY(-2px) rotate(-.6deg); }
}
.btn.start { position: relative; overflow: hidden; animation: btn-wobble 5s ease-in-out 2.5s infinite; }
.btn.start::after { content: ''; position: absolute; top: -20%; bottom: -20%; width: 34%; left: -50%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-18deg);
  animation: btn-shine 5s ease-in-out 2.5s infinite; }
@keyframes btn-wobble { 0%, 84%, 100% { transform: none; } 87% { transform: scale(1.04, .96); } 90% { transform: scale(.97, 1.04) rotate(-1.5deg); }
  93% { transform: scale(1.02, .98) rotate(1deg); } 96% { transform: none; } }
@keyframes btn-shine { 0%, 70% { left: -50%; } 90%, 100% { left: 130%; } }
#nav button.on i { animation: nav-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes nav-pop { 0% { transform: scale(.7) rotate(-8deg); } 60% { transform: scale(1.12) rotate(3deg); } 100% { transform: none; } }
.chip.bump { animation: chip-bump .55s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes chip-bump { 0% { transform: scale(1); } 35% { transform: scale(1.22) rotate(-4deg); } 70% { transform: scale(.95) rotate(2deg); } 100% { transform: none; } }
#view.enter > * { animation: view-rise .38s cubic-bezier(.2, 1.3, .4, 1) both; }
#view.enter > *:nth-child(2) { animation-delay: .04s; } #view.enter > *:nth-child(3) { animation-delay: .08s; }
#view.enter > *:nth-child(4) { animation-delay: .12s; } #view.enter > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes view-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .btn.start, .btn.start::after, #nav button.on i, .chip.bump, #view.enter > * { animation: none; }
}
/* The entrance must not linger (a finished animation that keeps its end state still isolates the layer,
   and the video tutor needs to blend with the page). The section holding the tutor does not animate. */
#view.enter > * { animation-fill-mode: backwards; }
#view.enter > .hero, #view.enter > .lesson { animation: none; }

/* Two-layer tail (see sayTail): outline under the bubble, fill on top to merge the join. */
.say-link.under { z-index: 0; }
.say-link.over { z-index: 4; filter: none; }
.say-link.over path { stroke: none; fill: #fff; }

/* She is drawn over the bubble tails, so a tail tucks behind her hair instead of crossing it.
   (The art itself gets the z-index, not its container, so video blending still sees the page.) */
.hero .stage .art { position: relative; z-index: 5; }
.lchar .art { z-index: 5; }
.ov { z-index: 6; }

/* Nameplate: comic lettering like the logo, a rarity badge with stars, subject chip. */
.hero .nameplate { margin: 10px 0 0; line-height: 1.05; }
.hero .nameplate .nm { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  font-size: 23px; font-weight: 900; color: #fff; letter-spacing: .005em;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
.hero .r-SR .nm, .hero.r-SR .nameplate .nm { color: #efe4ff; }
.hero.r-SSR .nameplate .nm { color: #fff1c7; }
.namerow { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 2px; }
.namerow .rar { font-size: 11px; padding: 3px 8px; border-radius: 99px; letter-spacing: .03em; box-shadow: 0 2px 0 var(--ink); }
.namerow .role { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 99px;
  background: #fff; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); color: var(--text); }
.namerow .role .ic { width: 15px; height: 15px; }
.namerow .rar .ic { width: 11px; height: 11px; }

/* Nameplate v2: readable dark lettering with a marker highlight; a tilted rarity badge with stars;
   just the subject's flag. */
.hero .nameplate .nm { color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; font-size: 24px; letter-spacing: -.01em;
  background: linear-gradient(transparent 58%, #ffd0e0 58%, #ffd0e0 88%, transparent 88%); padding: 0 3px; margin-left: -3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero.r-SR .nameplate .nm { background: linear-gradient(transparent 58%, #e3d6ff 58%, #e3d6ff 88%, transparent 88%); }
.hero.r-SSR .nameplate .nm { background: linear-gradient(transparent 58%, #ffe39a 58%, #ffe39a 88%, transparent 88%); }
.namerow { align-items: center; gap: 7px; margin: 8px 0 4px; }
.rbadge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px 3px 8px; border-radius: 10px; border: 2.5px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink); transform: rotate(-4deg); background: linear-gradient(160deg, #8fd8ff, #4a9cf0); }
.rbadge.r-SR { background: linear-gradient(160deg, #c9a8ff, #7c4dff); }
.rbadge.r-SSR { background: linear-gradient(160deg, #ffe17a, #ffa53d 45%, #ff6b9a); }
.rbadge b { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; font-size: 15px; font-weight: 900; color: #fff;
  -webkit-text-stroke: 3.5px var(--ink); paint-order: stroke fill; letter-spacing: .02em; line-height: 1; }
.rbadge .stars { display: inline-flex; gap: 0; }
.rbadge .stars .ic { width: 14px; height: 14px; margin-left: -1px; }
.namerow .flag { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff;
  border: 2.5px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.namerow .flag .ic { width: 20px; height: 20px; }
.rbadge { padding: 4px 10px 4px 9px; } .rbadge b { font-size: 18px; } .rbadge .stars .ic { width: 17px; height: 17px; }
.namerow .flag { width: 34px; height: 34px; } .namerow .flag .ic { width: 23px; height: 23px; }

/* Nameplate v3: family name small and spaced above, given name big (no awkward wrap). */
.hero .nameplate { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin-top: 12px; }
.hero .nameplate .fam { font-size: 11px; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); padding-left: 1px; }
.hero .nameplate .nm { font-size: 30px; line-height: 1; }
/* SSR badges shimmer */
.rbadge { position: relative; overflow: hidden; }
.rbadge.r-SSR::after { content: ''; position: absolute; inset: -20% auto -20% -60%; width: 40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: badge-shine 3.2s ease-in-out infinite; }
@keyframes badge-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .rbadge.r-SSR::after { animation: none; display: none; } }

/* Video tutor sized to her own proportions (no empty band above her head). */
.hero .stage video.art.full { height: auto; margin-top: 0; }
/* Reaction / talk clips sit exactly over the idle loop and fade in once playing. */
video.clip { position: absolute; margin: 0; max-width: none; z-index: 6; mix-blend-mode: multiply; object-fit: contain; object-position: bottom center;
  opacity: 0; transition: opacity .14s ease; pointer-events: none; }
video.clip.on { opacity: 1; }

/* Clips switch instantly (a cross-fade would show two of her) and use their own exact framing. */
video.clip { transition: none; object-fit: fill; }
/* A clip always sits on top of her, never in the page flow (it must beat .hero .stage .art etc.). */
.stage video.art.clip, .lchar video.art.clip, .tutorbig video.art.clip {
  position: absolute !important; margin: 0 !important; max-width: none !important; aspect-ratio: auto !important; z-index: 6; }
/* Bubble layering (home and lesson): tail outline (0) < bubble background (2) < tail fill (4) < text (7).
   The bubble and its column must not form their own stacking layer, so their parts interleave with the tail. */
.hero .side, .hero .say.anchored, .lchar .say.over, .lmain .say.anchored { z-index: auto; }
.say.anchored > .say-bg { z-index: 2; }
.say.anchored > span { position: relative; z-index: 7; }

/* Wardrobe: themed outfits (events, premium, Plus) next to the everyday ones. */
.outfit.themed { position: relative; background: linear-gradient(160deg, #fff4d6, #ffe0ec); }
.outfit.themed .tag { position: absolute; top: 4px; left: 4px; font-style: normal; font-size: 9.5px; padding: 1px 6px; background: #fff; border: 1.5px solid var(--ink); }
.outfit.themed.lock .art { filter: saturate(.75); }
.xpreview { height: 300px; display: flex; justify-content: center; margin: 6px 0; }
.xpreview .art { height: 100%; width: auto; }
.xpreview :is(img, svg).art { aspect-ratio: auto; height: 100%; width: auto; max-width: 100%; object-fit: contain; object-position: bottom center; }

/* Event banner on home */
.eventcard { width: 100%; margin-top: 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; text-align: left;
  font: inherit; color: #fff; padding: 12px 14px; border-radius: 16px; border: var(--ink-w) solid var(--ink); box-shadow: var(--pop); cursor: pointer;
  background: linear-gradient(120deg, #7c4dff, #ff6b9a 60%, #ffb020); }
.eventcard b { font-size: 17px; font-weight: 900; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.eventcard small { grid-column: 1; font-weight: 800; opacity: .95; }
.eventcard .go { grid-row: 1 / 3; grid-column: 2; background: #fff; color: var(--ink); font-weight: 900; padding: 8px 12px; border-radius: 12px;
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); display: inline-flex; gap: 4px; align-items: center; }
.eventcard .go .ic { width: 16px; height: 16px; }
.eventcard:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* Event banner text: readable chips instead of grey small text. */
.eventcard b { font-size: 19px; color: #fff; }
.evchips { grid-column: 1; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.evchip { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 900; color: var(--ink); background: #fff;
  padding: 2px 8px; border-radius: 99px; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.evchip.tok { background: #fff4c7; }
.evchip .ic { width: 13px; height: 13px; }

/* Glowing event banner: flowing gradient, pulsing halo, shine sweep, glowing title. */
.eventcard { position: relative; overflow: hidden; background: linear-gradient(110deg, #7c4dff, #c35cff, #ff6b9a, #ffb020, #ff6b9a, #7c4dff);
  background-size: 300% 100%; animation: ev-flow 7s ease-in-out infinite, ev-glow 2.4s ease-in-out infinite; }
.eventcard::after { content: ""; position: absolute; top: -30%; bottom: -30%; width: 28%; left: -40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-18deg); animation: ev-shine 4.2s ease-in-out infinite; }
.eventcard b { text-shadow: 0 0 10px rgba(255, 255, 255, .9), 0 0 22px rgba(255, 210, 255, .8); }
.eventcard .go { position: relative; z-index: 1; box-shadow: 0 2px 0 var(--ink), 0 0 14px rgba(255, 255, 255, .85); }
.evchips { position: relative; z-index: 1; }
@keyframes ev-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ev-glow { 0%, 100% { box-shadow: var(--pop), 0 0 12px 2px rgba(195, 92, 255, .45); } 50% { box-shadow: var(--pop), 0 0 26px 7px rgba(255, 107, 154, .65); } }
@keyframes ev-shine { 0%, 55% { left: -40%; } 85%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) { .eventcard, .eventcard::after { animation: none; } .eventcard::after { display: none; } }

.gemnote { font-size: 13px; font-weight: 700; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; margin: 8px 0; box-shadow: 0 2px 0 var(--ink); }

/* Lesson: the tutor column must not be its own layer (the video blends with the page), and the
   video spills past the narrow column (its edges are invisible white) so she is much bigger. */
.lchar { z-index: auto; }
.lchar video.art.full.live { width: 150%; height: 100%; left: -24%; right: auto; max-width: none; }

/* ===== Lesson v3: visual-novel layout =====
   Question across the top, the tutor large in the middle (shifted left), her bubble beside her
   head on the right, and the answers in a comic panel at the bottom overlapping her legs. */
.lesson.lesson { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "top" "q" "char" "main"; gap: 0; height: calc(100dvh - 8px - env(safe-area-inset-top)); padding-top: 8px; }
.lesson.lesson .ltop { grid-area: top; }
.lesson.lesson .lq { grid-area: q; position: relative; z-index: 8; }
.lesson.lesson .lchar { grid-area: char; position: relative; min-height: 0; z-index: auto; overflow: visible; }
.lesson.lesson .lchar :is(img, video, svg).art.full { position: absolute; top: 0; bottom: 0; left: -22%; right: auto; width: 100%; height: 100%;
  max-width: none; margin: 0; object-fit: contain; object-position: bottom center; }
.lesson.lesson .lchar .say.side { position: absolute; top: 6px; right: 0; left: auto; max-width: 54%; margin: 0; font-size: 13.5px; padding: 12px 14px; }
.lesson.lesson .lmain { grid-area: main; position: relative; z-index: 8; margin-top: -72px; }
.lesson.lesson .lanswers { background: rgba(255, 255, 255, .94); border: var(--ink-w) solid var(--ink); border-radius: 20px;
  box-shadow: 0 -2px 0 rgba(0,0,0,.02), var(--pop); padding: 10px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lesson.lesson .lanswers .options { margin: 0; }
.lesson.lesson .fb { margin-top: 8px; }

/* ===== Speech balloon v4: one outlined shape (body + tail), roomier text ===== */
.say.anchored { padding: 14px 18px 15px; min-width: 150px; font-size: 15px; line-height: 1.28; letter-spacing: .035em; }
.lesson.lesson .lchar .say.side { font-size: 14px; padding: 12px 16px 13px; min-width: 140px; }
.say.anchored > .say-bg { overflow: visible; filter: drop-shadow(0 3px 0 var(--ink)); }
.say.anchored > .say-bg path { fill: #fff; stroke: var(--ink); stroke-width: 3px; stroke-linejoin: round; }
.say-link { display: none; }

/* Lesson v3.1: her whole body fits between the question and the answers (shoes visible), and the
   video invisible margins spill outside that space instead of leaving gaps above her. */
.lesson.lesson .lmain { margin-top: 6px; }
.lesson.lesson .lchar :is(img, video, svg).art.full { top: -6%; bottom: auto; height: 109%; left: -45%; width: 150%; }

/* ===== TutorPop Plus paywall ===== */
.plus { padding-bottom: 4px; }
.plushero { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 6px; margin-top: 6px; }
.plusart { height: 120px; display: flex; justify-content: center; }
.plusart :is(img, svg).art { height: 100%; width: auto; aspect-ratio: auto; object-fit: contain; }
.plushero .say.center { margin: 0; max-width: 100%; font-size: 13.5px; }
.plustitle { text-align: center; font-size: 28px; margin: 10px 0 8px; letter-spacing: -.01em; }
.plustitle span { color: var(--accent); }
.plustitle b { display: inline-block; color: #fff; background: linear-gradient(120deg, #7c4dff, #ff6b9a 60%, #ffb020); padding: 0 10px 2px; border-radius: 10px;
  border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); transform: rotate(-3deg); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.pluscmp { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: var(--ink-w) solid var(--ink); border-radius: 16px;
  overflow: hidden; box-shadow: var(--pop-s); font-size: 14px; }
.pluscmp th, .pluscmp td { padding: 8px 10px; text-align: center; border-bottom: 1.5px solid var(--line); }
.pluscmp td:first-child, .pluscmp th:first-child { text-align: left; font-weight: 700; }
.pluscmp th:last-child, .pluscmp td:last-child { background: #f3ecff; }
.pluscmp tr:last-child td { border-bottom: 0; }
.pluscmp .ic { width: 20px; height: 20px; vertical-align: -4px; }
.pluscmp .dash { color: var(--muted); font-style: normal; font-weight: 900; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.plan { position: relative; font: inherit; color: var(--text); text-align: left; display: grid; gap: 2px; padding: 14px 12px 12px; cursor: pointer;
  background: #fff; border: var(--ink-w) solid var(--ink); border-radius: 16px; box-shadow: var(--pop-s); }
.plan b { font-size: 16px; } .plan span { font-weight: 800; } .plan small { color: var(--muted); font-size: 11.5px; }
.plan.on { background: #fff6dc; box-shadow: 0 0 0 3px #ffb020, var(--pop-s); }
.plan .badge { position: absolute; top: -11px; right: 8px; font-size: 11px; font-weight: 900; color: #fff; background: #ff4d8d; padding: 2px 8px;
  border-radius: 99px; border: 2px solid var(--ink); }
.timeline { list-style: none; padding: 4px 0 0 18px; margin: 10px 0 4px; border-left: 3px solid #ffb020; display: grid; gap: 8px; }
.timeline li { position: relative; display: grid; font-size: 13.5px; }
.timeline li::before { content: ''; position: absolute; left: -26px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #ffb020; border: 2px solid var(--ink); }
.timeline li span { color: var(--muted); }
.fine { font-size: 11px; color: var(--muted); line-height: 1.4; margin-top: 10px; text-align: center; }
.fine a, .linkbtn { color: var(--brand); font-weight: 800; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }
.btn.plusbtn { width: 100%; margin-top: 12px; background: linear-gradient(120deg, #7c4dff, #ff6b9a); }
.pluscard { width: 100%; margin: 12px 0 4px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; text-align: left; font: inherit;
  padding: 12px 14px; border-radius: 16px; border: var(--ink-w) solid var(--ink); box-shadow: var(--pop); cursor: pointer; color: var(--text);
  background: linear-gradient(120deg, #f1e9ff, #ffe6f0 60%, #fff3d6); }
.pluscard b { font-size: 17px; font-weight: 900; } .pluscard b span { color: var(--accent); }
.pluscard small { grid-column: 1; color: var(--text); font-weight: 700; font-size: 12.5px; }
.pluscard .go { grid-row: 1 / 3; grid-column: 2; background: var(--brand); color: #fff; font-weight: 900; padding: 8px 12px; border-radius: 12px;
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }

/* Bond stories */
.sthead { display: flex; align-items: center; gap: 6px; margin: 16px 0 8px; font-size: 16px; }
.sthead .ic { width: 20px; height: 20px; }
.stories { display: grid; gap: 8px; }
.story-row { font: inherit; text-align: left; display: grid; gap: 2px; padding: 10px 12px; background: #fff; color: var(--text); cursor: pointer;
  border: var(--ink-w) solid var(--ink); border-radius: 14px; box-shadow: var(--pop-s); }
.story-row small { color: var(--muted); font-weight: 700; }
.story-row.lock { opacity: .55; cursor: default; }
.story .kick { display: block; text-align: center; color: var(--muted); font-weight: 800; margin-top: 6px; }
.story h2 { text-align: center; margin: 2px 0 6px; }
.storyart { height: 230px; display: flex; justify-content: center; }
.storyart :is(img, svg).art { height: 100%; width: auto; aspect-ratio: auto; object-fit: contain; object-position: bottom center; }
.story .say.center { margin: 10px auto 6px; }
.choices { display: grid; gap: 8px; margin-top: 6px; }
.btn.choice { margin-top: 0; color: var(--brand); }

/* Loose bubbles (sheets, results) use the same one-piece balloon as the anchored ones. */
.say:not(.anchored) > .say-bg { overflow: visible; filter: drop-shadow(0 3px 0 var(--ink)); }
.say:not(.anchored) > .say-bg path { fill: #fff; stroke: var(--ink); stroke-width: 3px; stroke-linejoin: round; }
.say.tail-up { margin-top: 26px !important; }

/* ===== Lesson-clear cutscene ===== */
#cutscene { position: fixed; inset: 0; z-index: 60; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto auto auto;
  justify-items: center; padding: calc(14px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 80% at 50% 45%, #fffdfe 0%, #ffeef6 45%, #e9defe 100%); animation: cs-in .3s ease-out both; cursor: pointer; }
#cutscene.out { animation: cs-out .25s ease-in both; }
@keyframes cs-in { from { opacity: 0; transform: scale(1.04); } }
@keyframes cs-out { to { opacity: 0; transform: scale(.98); } }
.cs-rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, rgba(255, 190, 220, .28) 0 10deg, transparent 10deg 20deg);
  animation: cs-spin 30s linear infinite; pointer-events: none; }
#cutscene.perfect .cs-rays { background: repeating-conic-gradient(from 0deg, rgba(255, 210, 110, .32) 0 10deg, transparent 10deg 20deg); }
@keyframes cs-spin { to { transform: rotate(360deg); } }
.cs-stage { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.cs-art { height: 76vh; width: auto; max-width: 120vw; object-fit: contain; mix-blend-mode: multiply; animation: cs-rise .6s cubic-bezier(.2, 1.2, .4, 1) .1s both; }
.cs-art.svg { mix-blend-mode: normal; } .cs-art.svg svg { height: 100%; width: auto; }
@keyframes cs-rise { from { transform: translateY(40px); opacity: 0; } }
.cs-top { position: relative; z-index: 2; text-align: center; }
.cs-stamp { font-family: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif; font-weight: 900; font-size: 40px; line-height: 1;
  color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink), 0 0 24px rgba(255, 107, 154, .7);
  transform: rotate(-5deg); animation: cs-slam .55s cubic-bezier(.2, 1.6, .4, 1) .25s both; }
#cutscene.perfect .cs-stamp { color: #ffd24a; text-shadow: 0 5px 0 var(--ink), 0 0 28px rgba(255, 200, 60, .9); }
@keyframes cs-slam { 0% { transform: rotate(-5deg) scale(2.6); opacity: 0; } 60% { transform: rotate(-5deg) scale(.92); opacity: 1; } 100% { transform: rotate(-5deg) scale(1); } }
.cs-stars { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.cs-stars i { opacity: .25; filter: grayscale(1); }
.cs-stars i.on { opacity: 1; filter: none; animation: cs-star .45s cubic-bezier(.2, 1.8, .4, 1) var(--d) both; }
.cs-stars .ic { width: 40px; height: 40px; }
.cs-stars i:nth-child(2) .ic { width: 50px; height: 50px; margin-top: -8px; }
@keyframes cs-star { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.cs-score { font-weight: 900; margin: 4px 0 0; color: var(--ink); }
#cutscene .say.cs-say { position: relative; z-index: 2; grid-row: 3; max-width: 86%; margin: 0 0 10px; animation: cs-rise .4s ease-out 1s both; }
.cs-rewards { position: relative; z-index: 2; grid-row: 4; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; animation: cs-rise .4s ease-out 1s both; }
.cs-rewards span { display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 15px; background: #fff; padding: 6px 12px; border-radius: 99px;
  border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.cs-rewards .ic { width: 18px; height: 18px; }
.cs-new { position: relative; z-index: 2; grid-row: 5; margin: 10px 0 0; font-weight: 900; color: #fff; background: var(--accent); padding: 4px 12px; border-radius: 99px;
  border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); animation: cs-star .5s cubic-bezier(.2, 1.8, .4, 1) 1.5s both; }
.cs-tap { position: relative; z-index: 2; grid-row: 5; align-self: end; margin: 10px 0 0; font-weight: 800; color: var(--muted); animation: cs-pulse 1.4s ease-in-out 1.6s infinite both; }
.cs-new + .cs-tap { grid-row: 6; }
@keyframes cs-pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #cutscene *, #cutscene { animation: none !important; } }
/* Rays glow around the edges only, never behind her (the video multiplies with whatever is behind it). */
.cs-rays { -webkit-mask-image: radial-gradient(ellipse 46% 52% at 50% 60%, transparent 55%, #000 100%); mask-image: radial-gradient(ellipse 46% 52% at 50% 60%, transparent 55%, #000 100%); }

/* One-time welcome offer */
.offer .kick { text-align: center; font-weight: 900; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; margin: 6px 0 0; }
.offerprice { text-align: center; font-size: 20px; margin: 4px 0; } .offerprice s { color: var(--muted); font-weight: 700; } .offerprice b { font-size: 30px; color: var(--ink); }
.offertimer { text-align: center; font-weight: 800; margin: 8px 0; } .offertimer b { color: var(--bad); }

/* Fashion lesson ready (replaces the bond bar) */
.fashionready { width: 100%; margin: 10px 0 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; text-align: left; font: inherit;
  padding: 10px 14px; border-radius: 16px; border: var(--ink-w) solid var(--ink); box-shadow: var(--pop); cursor: pointer; color: var(--text);
  background: linear-gradient(120deg, #fff1c7, #ffd6e7); animation: ev-glow 2.4s ease-in-out infinite; }
.fashionready b { font-size: 16px; } .fashionready small { grid-column: 1; font-weight: 700; color: var(--text); }
.fashionready .go { grid-row: 1 / 3; grid-column: 2; background: var(--accent); color: #fff; font-weight: 900; padding: 8px 12px; border-radius: 12px;
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); display: inline-flex; gap: 4px; align-items: center; }
.fashionready .go .ic { width: 16px; height: 16px; }

/* ===== Welcome offer v2 ===== */
.offer .offerhero { position: relative; margin: 6px -4px 0; padding: 26px 10px 10px; border-radius: 20px; border: var(--ink-w) solid var(--ink); box-shadow: var(--pop);
  display: grid; grid-template-columns: 42% 1fr; align-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 60%, #fff 0%, #ffe9f3 45%, #e7dcff 100%); }
.offer .ribbon { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-weight: 900; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase; padding: 4px 14px; border-radius: 0 0 12px 12px; border: 2px solid var(--ink); border-top: 0; white-space: nowrap; }
.offerart { height: 190px; display: flex; justify-content: center; align-items: flex-end; }
.offerart :is(img, svg).art { height: 100%; width: auto; aspect-ratio: auto; object-fit: contain; mix-blend-mode: multiply; }
.offer .say.offersay { margin: 0 0 30px 18px !important; font-size: 13px; }
.coupon { position: relative; margin: 18px 0 8px; padding: 14px 16px; text-align: center; background: #fffaf0; border-radius: 18px;
  border: 2.5px dashed var(--ink); box-shadow: 0 0 0 4px #fff, 0 0 0 6.5px var(--ink), 0 8px 0 2px var(--ink); }
.coupon .stamp { position: absolute; top: -16px; right: -6px; transform: rotate(10deg); font-weight: 900; font-size: 18px; color: #fff; background: #ff4d8d;
  padding: 6px 10px; border-radius: 12px; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); animation: cs-star .5s cubic-bezier(.2, 1.8, .4, 1) .2s both; }
.cp-was { margin: 0; font-weight: 800; color: var(--muted); } .cp-was s { margin-left: 4px; }
.cp-now { margin: 2px 0; display: flex; justify-content: center; align-items: baseline; gap: 8px; }
.cp-now b { font-size: 44px; line-height: 1; letter-spacing: -.02em; color: var(--ink); } .cp-now span { font-weight: 800; }
.cp-sub { margin: 0; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.offertimer { display: flex; justify-content: center; align-items: center; gap: 6px; width: max-content; margin: 14px auto 6px; padding: 6px 14px;
  font-weight: 900; background: #fff; border: 2.5px solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink); }
.offertimer .ic { width: 18px; height: 18px; } .offertimer b { color: var(--bad); font-variant-numeric: tabular-nums; }
.offerperks { list-style: none; padding: 0; margin: 10px 4px; display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.offerperks li { display: flex; align-items: center; gap: 8px; } .offerperks .ic { width: 20px; height: 20px; flex: none; }
.btn.shine { position: relative; overflow: hidden; animation: ev-glow 2.4s ease-in-out infinite; }
.btn.shine::after { content: ''; position: absolute; top: -30%; bottom: -30%; width: 30%; left: -40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
  transform: skewX(-18deg); animation: ev-shine 3s ease-in-out infinite; }
.nothanks { display: block; margin: 8px auto 4px; color: var(--muted); font-weight: 800; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .btn.shine, .btn.shine::after, .coupon .stamp { animation: none; } }
.coupon { padding-top: 24px; } .coupon .stamp { top: -20px; right: -10px; }
.coupon { padding-top: 30px; margin-top: 26px; } .coupon .stamp { top: -20px; right: auto; left: 50%; transform: translateX(-50%) rotate(-4deg); white-space: nowrap; } @keyframes cs-star-c { from { transform: translateX(-50%) rotate(-4deg) scale(0); } } .coupon .stamp { animation-name: cs-star-c; }
.offertimer .ic { width: 22px; height: 22px; }

/* ---------- rarity system: UR tutors and outfit tiers ---------- */
@keyframes prism { to { background-position: 200% 50%; } }
.rbadge.r-UR, .rar.r-UR, .r-UR .rar { background: linear-gradient(110deg, #ff6b9a, #ffd166, #6ee7b7, #60a5fa, #c084fc, #ff6b9a); background-size: 200% 100%; animation: prism 4s linear infinite; }
.card.r-UR { background: linear-gradient(160deg, #fff0f6, #eef6ff 50%, #f5edff); box-shadow: 0 0 0 3px #c084fc, 0 0 18px rgba(192, 132, 252, .55); }
.otier { position: absolute; top: 5px; left: 5px; z-index: 2; font: 900 10px/1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif; font-style: normal;
  letter-spacing: .04em; text-transform: uppercase; color: #fff; padding: 3px 6px; border-radius: 6px; border: 2px solid var(--ink); background: #7d8bb0; }
.otier.t-rare { background: #3b82f6; }
.otier.t-epic { background: linear-gradient(160deg, #a78bfa, #7c3aed); }
.otier.t-legendary { background: linear-gradient(160deg, #ffe17a, #ff9f1c); color: #4a2a00; }
.otier.t-mythic { background: linear-gradient(110deg, #ff6b9a, #ffd166, #6ee7b7, #60a5fa, #c084fc, #ff6b9a); background-size: 200% 100%; animation: prism 4s linear infinite; }
.outfit.themed { position: relative; }
.outfit.t-rare { box-shadow: 0 0 0 2.5px #3b82f6; }
.outfit.t-epic { box-shadow: 0 0 0 2.5px #7c3aed, 0 0 10px rgba(124, 58, 237, .35); }
.outfit.t-legendary { box-shadow: 0 0 0 3px #ffb020, 0 0 14px rgba(255, 176, 32, .55); }
.outfit.t-mythic { box-shadow: 0 0 0 3px #c084fc, 0 0 18px rgba(192, 132, 252, .6); }
.urteaser { display: flex; gap: 12px; align-items: center; margin: 8px 0 12px; padding: 10px; border: 3px solid var(--ink); border-radius: 16px;
  background: linear-gradient(160deg, #fff0f6, #eef6ff 50%, #f5edff); box-shadow: 0 0 0 3px #c084fc inset, 0 3px 0 var(--ink); text-align: left; }
.urteaser .urart { width: 76px; height: 96px; flex: none; overflow: hidden; border-radius: 12px; border: 2.5px solid var(--ink); background: radial-gradient(circle at 50% 35%, #fff, #ead9ff); position: relative; }
.urteaser .urart img, .urteaser .urart svg { filter: brightness(0) opacity(.55); mix-blend-mode: multiply; }
.urteaser .urart::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 34px/1 ui-rounded, system-ui, sans-serif; color: #fff; -webkit-text-stroke: 2px var(--ink); }
.urteaser .urart img, .urteaser .urart svg { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.urteaser h3 { margin: 6px 0 2px; font-size: 18px; }
.urteaser p { margin: 0; font-size: 13px; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) { .rbadge.r-UR, .rar.r-UR, .otier.t-mythic { animation: none; } }

/* ---------- story-scene cutscenes ---------- */
#cutscene .cs-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  animation: csKen 9s ease-out both; }
@keyframes csKen { from { transform: scale(1.08); } to { transform: scale(1); } }
#cutscene.has-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(20, 14, 40, .45), transparent 28%, transparent 55%, rgba(20, 14, 40, .7)); }
#cutscene.has-scene > :not(.cs-scene) { position: relative; z-index: 1; }
#cutscene.has-scene .cs-score, #cutscene.has-scene .cs-tap, #cutscene.has-scene .cs-new { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
#cutscene.m-latenight .cs-stamp { background: linear-gradient(160deg, #6d5dfc, #2a2160); color: #fff; }
#cutscene.m-morning .cs-stamp { background: linear-gradient(160deg, #ffe17a, #ffb020); }
#cutscene.m-comeback .cs-stamp { background: linear-gradient(160deg, #ffb38a, #ff6b9a); color: #fff; }
#cutscene.m-streak7 .cs-stamp { background: linear-gradient(110deg, #ff6b9a, #ffd166, #6ee7b7, #60a5fa, #c084fc); }
@media (prefers-reduced-motion: reduce) { #cutscene .cs-scene { animation: none; } }

/* ---------- story player v2 ---------- */
.storyart.scene { height: 240px; border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 3px 0 var(--ink); }
.storyart.scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: csKen 9s ease-out both; }
.choices.lang .choice { font-size: 16px; line-height: 1.3; white-space: normal; }
.storyres { text-align: center; font-weight: 900; margin: 4px 0 8px; }
.storyres.ok { color: #1f9d55; } .storyres.no { color: #d6336c; }

/* story progress dots: under the title, evenly spaced */
.story .dots { margin: 2px 0 10px; gap: 7px; }
.story .dots i { flex: none; width: 9px; height: 9px; transition: width .2s; }
.story .dots i.now { width: 22px; border-radius: 99px; }

/* sticky header and lesson bar stay above the tutor art (art is z-index 5) */
#top, .lbar { z-index: 15; }

/* ---------- Learn tiles v2: level medal, rank, XP bar in the subject colour ---------- */
.subj.v2 { grid-template-rows: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px 10px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--sc) 14%, #fff), #fff 70%); }
.subj.v2 .sicon .ic { width: 36px; height: 36px; }
.subj.v2 b { font-size: 17px; margin-top: 2px; }
.subj.v2 .rank { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--sc); }
.subj.v2 .lvbadge { position: absolute; top: 7px; left: 7px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sc); color: #fff; border: 2.5px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
  font: 900 15px/1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif; }
.subj.v2 .lvbadge small { font-size: 7px; letter-spacing: .08em; margin-bottom: -6px; opacity: .9; }
.subj.v2 .xp { width: 100%; display: grid; gap: 3px; margin-top: 6px; }
.subj.v2 .xpbar { display: block; height: 10px; border-radius: 99px; background: #fff; border: 2px solid var(--ink); overflow: hidden; }
.subj.v2 .xpbar i { display: block; height: 100%; min-width: 6px; border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--sc) 70%, #fff), var(--sc)); }
.subj.v2 .xp small { font-size: 10px; font-weight: 800; color: var(--muted); text-align: right; }
.subj.rev { justify-content: center; }

/* outfit tier badge: centred and sized so LEGENDARY fits a small tile */
.otier { left: 50%; transform: translateX(-50%); top: 4px; font-size: 8.5px; letter-spacing: .02em; padding: 3px 5px; white-space: nowrap; max-width: calc(100% - 8px); overflow: hidden; text-overflow: clip; }
.otier { font-size: 8px; letter-spacing: 0; padding: 2px 4px; max-width: none; }

/* ---------- recruit banner v2: the featured tutor large on the right ---------- */
.banner { position: relative; overflow: hidden; }
.feat.v2 { display: block; position: relative; min-height: 210px; margin: -16px -16px 12px; padding: 16px; text-align: left;
  background: radial-gradient(circle at 78% 40%, rgba(255,255,255,.45), transparent 55%); }
.feat.v2 .featart { position: absolute; right: -6px; bottom: 0; width: 58%; height: 100%; display: flex; justify-content: center; align-items: flex-end; pointer-events: none; }
.feat.v2 .featart :is(img, svg).art { height: 106%; width: auto; max-width: none; object-fit: contain; object-position: bottom; filter: drop-shadow(0 6px 10px rgba(40, 20, 80, .35)); }
.feat.v2 .feattxt { position: relative; z-index: 1; width: 52%; display: grid; gap: 4px; justify-items: start; padding-top: 4px; }
.feat.v2 .feattxt h2 { font-size: 22px; line-height: 1.1; margin: 0; text-shadow: 0 2px 0 rgba(42, 33, 64, .35); }
.feat.v2 .feattxt p { margin: 0; font-size: 13px; line-height: 1.35; }
.feat.v2 .kick { color: rgba(255,255,255,.9); }

/* moment stamps: fit the screen, coloured text (no box) */
#cutscene .cs-stamp { font-size: clamp(28px, 10.5vw, 40px); white-space: nowrap; max-width: 96vw; margin-inline: auto; }
#cutscene.has-scene .cs-stamp { background: none; }
#cutscene.m-latenight .cs-stamp { color: #cfc2ff; }
#cutscene.m-morning .cs-stamp { color: #ffd24a; }
#cutscene.m-comeback .cs-stamp { color: #ffb3c9; }
#cutscene.m-streak7 .cs-stamp { color: #ffd24a; }
#cutscene .cs-top { padding-top: calc(env(safe-area-inset-top, 0px) + 26px); }

/* ---------- outfit shop ---------- */
.shophead { display: flex; align-items: center; gap: 10px; }
.shophead h2 { margin: 0; }
.shophead .back { width: auto; padding: 6px 12px; font-size: 14px; margin: 0; }
.shoptier { margin-top: 16px; }
.shoptier h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.shoptier h3 .otier { position: static; transform: none; font-size: 12px; padding: 4px 9px; }
.shoptier h3 small { font-size: 12px; font-weight: 700; color: var(--muted); }
.shoptier .limited { margin: -2px 0 8px; font-size: 12px; font-weight: 800; color: #9333ea; }
.shopgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shopitem { position: relative; display: grid; justify-items: center; gap: 1px; padding: 22px 6px 8px; font: inherit; color: var(--text);
  background: var(--card); border: 2.5px solid var(--ink); border-radius: 16px; }
.shopitem .sart { height: 120px; width: 100%; display: flex; justify-content: center; overflow: hidden; }
.shopitem .sart :is(img, svg).art { height: 100%; width: auto; object-fit: contain; object-position: top; }
.shopitem.soon .sart :is(img, svg) { filter: brightness(0) opacity(.35); }
.shopitem b { font-size: 12.5px; line-height: 1.15; text-align: center; }
.shopitem .who { font-size: 11px; color: var(--muted); font-weight: 700; }
.shopitem .how { margin-top: 3px; font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 99px; background: #f1edff; color: var(--brand); }
.shopitem.have .how { background: #e7f8ef; color: #1f9d55; }
.shopitem.soon .how { background: #f3f3f6; color: var(--muted); }
.shopcard { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; width: 100%; margin: 10px 0 4px; padding: 12px 14px;
  font: inherit; text-align: left; color: #fff; border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--pop);
  background: linear-gradient(120deg, #7c4dff, #ff6b9a 60%, #ffb020); }
.shopcard b { font-size: 16px; display: flex; align-items: center; gap: 6px; }
.shopcard small { grid-column: 1; font-size: 12px; opacity: .95; }
.shopcard .go { grid-row: 1 / 3; grid-column: 2; background: #fff; color: var(--brand); font-weight: 900; padding: 6px 12px; border-radius: 99px; border: 2px solid var(--ink); }
.shophead .back { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.shophead .back .ic { width: 16px; height: 16px; }
/* Mythic: one big hero card per item */
.shoptier.t-mythic .shopgrid { grid-template-columns: 1fr; }
.shoptier.t-mythic .shopitem { grid-template-columns: 46% 1fr; justify-items: start; align-items: center; text-align: left; padding: 24px 14px 12px;
  background: linear-gradient(150deg, #fff0f6, #eef6ff 50%, #f5edff); box-shadow: 0 0 0 3px #c084fc, 0 0 22px rgba(192, 132, 252, .45); }
.shoptier.t-mythic .shopitem .sart { grid-row: 1 / 5; height: 210px; }
.shoptier.t-mythic .shopitem b { font-size: 18px; text-align: left; }
.shoptier.t-mythic .shopitem .who { font-size: 13px; }
.shoptier.t-mythic .shopitem .otier { left: 14px; transform: none; }
.shophead .back.btn { display: inline-flex; flex-direction: row; grid-auto-flow: column; min-height: 0; }
.shoptier.t-mythic .shopitem b { align-self: end; }

/* streak milestone track */
.streakcard .mtrack { grid-column: 1 / -1; display: flex; align-items: center; margin-top: 10px; }
.streakcard .mtrack span { flex: 1; height: 4px; background: var(--line); border-radius: 99px; }
.streakcard .mtrack i { font-style: normal; width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--line-d); color: var(--muted); font: 900 12px/1 ui-rounded, system-ui, sans-serif; }
.streakcard .mtrack i.done { background: linear-gradient(160deg, #ffb020, #ff6b3d); border-color: var(--ink); color: #fff; }
.streakcard .mtrack i.next { border-color: var(--ink); color: var(--text); box-shadow: 0 0 0 3px #ffd9a8; animation: mpulse 1.6s ease-in-out infinite; }
@keyframes mpulse { 50% { box-shadow: 0 0 0 6px #ffe7c7; } }
.streakcard .mnext { grid-column: 1 / -1; margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.streakcard .mnext b { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .streakcard .mtrack i.next { animation: none; } }

/* ---------- streak card v2 ---------- */
.streakcard.v2 { grid-template-columns: auto 1fr auto; gap: 4px 12px; padding: 14px; border: 2.5px solid var(--ink); border-radius: 20px; box-shadow: var(--pop);
  background: linear-gradient(150deg, #fff7e6, #ffe9d6 55%, #ffe0ea); }
.streakcard.v2.risk { background: linear-gradient(150deg, #fff4d6, #ffd9c2); }
.streakcard.v2.cold { background: linear-gradient(150deg, #f4f2fb, #ebe7f7); }
.streakcard.v2.comeback { background: linear-gradient(150deg, #ffe6ef, #ffd6e4); grid-template-columns: auto 1fr; }
.streakcard.v2 .sflame { position: relative; width: 58px; height: 64px; display: grid; place-items: center; grid-row: 1; }
.streakcard.v2 .sflame .ic { width: 58px; height: 64px; filter: drop-shadow(0 3px 0 rgba(42,33,64,.25)); animation: flick 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
.streakcard.v2.cold .sflame .ic { filter: grayscale(1) opacity(.5); animation: none; }
.streakcard.v2 .sflame b { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font: 900 20px/1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
@keyframes flick { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.06, 1.1) rotate(2deg); } }
.streakcard.v2 .sinfo { grid-column: 2; grid-row: 1; display: grid; gap: 2px; min-width: 0; }
.streakcard.v2 .sinfo b { font-size: 19px; line-height: 1.1; }
.streakcard.v2 .sinfo small { color: #7a5a3a; font-weight: 700; font-size: 12.5px; }
.streakcard.v2.risk .sinfo small { color: #c2410c; }
.streakcard.v2 .sfreeze { grid-column: 3; grid-row: 1; display: grid; justify-items: center; gap: 0; padding: 6px 8px; font: inherit; cursor: pointer;
  background: #eaf6ff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 2px 0 var(--ink); }
.streakcard.v2 .sfreeze .ic { width: 22px; height: 22px; }
.streakcard.v2 .sfreeze b { font-size: 13px; line-height: 1; }
.streakcard.v2 .sfreeze small { font-size: 9.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.streakcard.v2 .sfreeze:active { transform: translateY(2px); box-shadow: none; }
.streakcard.v2 .week { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; padding: 8px 6px;
  background: rgba(255,255,255,.7); border-radius: 14px; }
.streakcard.v2 .wd { display: grid; justify-items: center; gap: 3px; }
.streakcard.v2 .wd i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #f1ecf8; border: 2px solid transparent; }
.streakcard.v2 .wd i .ic { width: 20px; height: 20px; }
.streakcard.v2 .wd.done i { background: linear-gradient(160deg, #ffd166, #ff8a3d); border-color: var(--ink); }
.streakcard.v2 .wd.today i { border-color: var(--ink); box-shadow: 0 0 0 3px #ffd9a8; }
.streakcard.v2 .wd.future i { opacity: .5; }
.streakcard.v2 .wd small { font-size: 10px; font-weight: 900; color: var(--muted); }
.streakcard.v2 .wd.today small { color: var(--text); }
.streakcard.v2 .mtrack, .streakcard.v2 .mnext { grid-column: 1 / -1; }
.streakcard.v2 .cbdots { display: flex; gap: 6px; margin-top: 4px; }
.streakcard.v2 .cbdots i { width: 22px; height: 8px; border-radius: 99px; background: #fff; border: 2px solid var(--ink); }
.streakcard.v2 .cbdots i.on { background: #ff6b9a; }
@media (prefers-reduced-motion: reduce) { .streakcard.v2 .sflame .ic { animation: none; } }

.streakcard.v2 .stitle { justify-self: start; font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: linear-gradient(110deg, #ff6b9a, #ffb020); padding: 2px 8px; border-radius: 99px; border: 2px solid var(--ink); }

.streakcard.v2 .sfreeze { gap: 3px; padding: 6px 8px 7px; }
.streakcard.v2 .sfreeze .ft { font-size: 9.5px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; color: #2563eb; white-space: nowrap; }
.streakcard.v2 .sfreeze .fc { display: flex; align-items: center; gap: 4px; }
.streakcard.v2 .sfreeze .fc b { font-size: 15px; }
.streakcard.v2 .sfreeze .fbuy { font-size: 10px; font-weight: 900; color: #fff; background: var(--brand); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }

/* streak card: no side box; freezes on one line */
.streakcard.v2 { grid-template-columns: auto 1fr; }
.streakcard.v2 .frow { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: #5b4a3a; }
.streakcard.v2 .frow > .ic { width: 20px; height: 20px; flex: none; }
.streakcard.v2 .frow span { flex: 1; line-height: 1.25; }
.streakcard.v2 .frow b { color: var(--text); }
.streakcard.v2 .frow .fbuy { flex: none; font: inherit; font-size: 12px; font-weight: 900; padding: 5px 10px; border-radius: 99px; cursor: pointer;
  background: #fff; color: #2563eb; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); white-space: nowrap; }
.streakcard.v2 .frow .fbuy:disabled { color: var(--muted); box-shadow: none; }
.streakcard.v2 .frow .fbuy:active { transform: translateY(2px); box-shadow: none; }

/* streak card: freezes as a small chip in the header */
.streakcard.v2 { grid-template-columns: auto 1fr auto; }
.streakcard.v2 .fchip { grid-column: 3; grid-row: 1; align-self: start; display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px 4px 6px;
  font: inherit; cursor: pointer; background: #eaf4ff; border: 2px solid var(--ink); border-radius: 99px; box-shadow: 0 2px 0 var(--ink); }
.streakcard.v2 .fchip .ic { width: 16px; height: 16px; }
.streakcard.v2 .fchip b { font-size: 12px; }
.streakcard.v2 .fchip i { font-style: normal; font-weight: 900; font-size: 13px; color: #2563eb; margin-left: 1px; }
.streakcard.v2 .fchip:active { transform: translateY(2px); box-shadow: none; }
.freezeinfo { text-align: center; }
.freezeinfo .fbig .ic { width: 64px; height: 64px; }
.freezeinfo h2 { margin: 4px 0 6px; }
.freezeinfo p { margin: 0 0 10px; }

/* streak card spacing */
.streakcard.v2 { padding: 16px 16px 14px; gap: 6px 14px; margin: 14px 0 18px; }
.streakcard.v2 .sflame { align-self: center; }
.streakcard.v2 .sinfo { align-self: center; gap: 3px; }
.streakcard.v2 .week { margin-top: 12px; }
.streakcard.v2 .mtrack { margin-top: 12px; padding: 0 2px; }
.streakcard.v2 .mnext { margin: 8px 0 0; font-size: 13px; line-height: 1.3; }
.streakcard.v2 .mnext b { font-size: 13px; font-weight: 900; }
.streakcard.v2 + * { margin-top: 0; }
.streakcard.v2 .mnext { text-align: center; }
.streakcard.v2 .sinfo { text-align: center; justify-items: center; }

.streakcard.v2 .fchip { flex-direction: column; gap: 1px; padding: 5px 9px; border-radius: 14px; align-self: center; }
.streakcard.v2 .fchip .fr1 { display: flex; align-items: center; gap: 3px; }
.streakcard.v2 .fchip small { font-size: 9.5px; font-weight: 900; color: #2563eb; white-space: nowrap; }
.streakcard.v2 .fchip { padding: 8px 12px; gap: 3px; border-radius: 16px; border-width: 2.5px; box-shadow: 0 3px 0 var(--ink); }
.streakcard.v2 .fchip .ic { width: 24px; height: 24px; }
.streakcard.v2 .fchip b { font-size: 17px; }
.streakcard.v2 .fchip small { font-size: 11.5px; }

/* ---------- monthly challenge ---------- */
.monthly { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; margin: 14px 0; padding: 14px 16px 22px;
  border: 2.5px solid var(--ink); border-radius: 20px; box-shadow: var(--pop);
  background: linear-gradient(150deg, color-mix(in srgb, var(--mc) 16%, #fff), #fff 75%); }
.monthly .mbadge { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--mc) 55%, #fff)); box-shadow: 0 3px 0 var(--ink); }
.monthly .mbadge .ic { width: 30px; height: 30px; }
.monthly:not(.done) .mbadge { filter: saturate(.75); }
.monthly.done .mbadge { animation: mpulse 1.8s ease-in-out infinite; }
.monthly .minfo { display: grid; gap: 1px; min-width: 0; }
.monthly .minfo small { font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; color: var(--mc); }
.monthly .minfo > b { font-size: 16px; line-height: 1.2; }
.monthly .mcount { font-size: 12px; color: var(--muted); }
.monthly .mcount b { color: var(--text); }
.monthly .mbar { grid-column: 1 / -1; position: relative; height: 12px; margin: 10px 14px 0 4px; border-radius: 99px; background: #fff; border: 2px solid var(--ink); }
.monthly .mbar .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--mc) 60%, #fff), var(--mc)); }
.monthly .mbar i { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; background: #fff; border: 2px solid var(--ink); font-style: normal; }
.monthly .mbar i b { font-size: 9px; font-weight: 900; color: var(--muted); }
.monthly .mbar i.on { background: var(--mc); }
.monthly .mbar i.on b { color: #fff; }

/* ---------- profile ---------- */
#nav button { flex: 1; min-width: 0; }
.phead { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.phead .pav { width: 84px; height: 84px; flex: none; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink); box-shadow: var(--pop);
  background: radial-gradient(circle at 50% 30%, #fff, #f1e9ff); }
.phead .pav :is(img, svg).art { width: 170%; height: auto; max-width: none; margin-left: -35%; margin-top: -6%; }
.phead .pname { display: grid; gap: 4px; min-width: 0; }
.phead h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 24px; }
.phead .pedit { font: inherit; font-size: 11px; font-weight: 900; padding: 3px 9px; border-radius: 99px; border: 2px solid var(--ink); background: #fff; color: var(--brand); cursor: pointer; }
.phead small { color: var(--muted); font-size: 12.5px; }
.phead .stitle { justify-self: start; }
.stitle { font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: linear-gradient(110deg, #ff6b9a, #ffb020); padding: 2px 8px; border-radius: 99px; border: 2px solid var(--ink); }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 6px; }
.pstat { display: grid; justify-items: center; gap: 1px; padding: 10px 4px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; box-shadow: 0 2px 0 var(--ink); }
.pstat .ic { width: 20px; height: 20px; }
.pstat b { font-size: 17px; line-height: 1.1; }
.pstat small { font-size: 10px; font-weight: 800; color: var(--muted); text-align: center; line-height: 1.15; }
.phd { margin: 20px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.phd small { font-size: 12px; color: var(--muted); }
.pbadges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pbadge { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: #f4f2f9; border: 2px dashed var(--line-d); text-align: center; }
.pbadge i { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #e9e5f2; }
.pbadge i .ic { width: 24px; height: 24px; filter: grayscale(1) opacity(.45); }
.pbadge b { font-size: 11.5px; color: var(--muted); }
.pbadge small { font-size: 10px; color: var(--muted); font-weight: 700; }
.pbadge.cur { border-color: var(--mc); background: color-mix(in srgb, var(--mc) 8%, #fff); }
.pbadge.on { border: 2px solid var(--ink); background: color-mix(in srgb, var(--mc) 14%, #fff); box-shadow: 0 2px 0 var(--ink); }
.pbadge.on i { background: radial-gradient(circle at 35% 30%, #fff, color-mix(in srgb, var(--mc) 60%, #fff)); border: 2px solid var(--ink); }
.pbadge.on i .ic { filter: none; }
.pbadge.on b { color: var(--text); }
.pachs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pach { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; padding: 8px 10px; border-radius: 14px; background: #f4f2f9; border: 2px solid transparent; }
.pach i { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: #e9e5f2; }
.pach i .ic { width: 20px; height: 20px; }
.pach b { font-size: 12.5px; line-height: 1.15; }
.pach small { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.pach:not(.on) { opacity: .7; }
.pach.on { background: #fff8e6; border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.pach.on i { background: linear-gradient(160deg, #ffe17a, #ffb020); border: 2px solid var(--ink); }
.psubs { display: grid; gap: 8px; }
.psub { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; }
.psub > i { grid-row: 1 / 3; font-style: normal; } .psub > i .ic { width: 28px; height: 28px; }
.psub .lv { font-size: 12px; font-weight: 900; color: var(--sc); }
.psub .xpbar { grid-column: 2 / 4; height: 8px; border-radius: 99px; background: #f1edf8; overflow: hidden; }
.psub .xpbar i { display: block; height: 100%; background: var(--sc); border-radius: 99px; min-width: 4px; }
.pinput { width: 100%; box-sizing: border-box; font: inherit; font-size: 18px; padding: 12px 14px; margin: 6px 0 12px; border: 2.5px solid var(--ink); border-radius: 14px; }
.pbadge.soon { opacity: .55; }

/* ---------- profile dress-up ---------- */
.phead .pav { position: relative; padding: 0; cursor: pointer; font: inherit; }
.phead .pavedit { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink); }
.phead .pavedit .ic { width: 15px; height: 15px; }
.phead .pav { overflow: visible; }
.phead .pav > :is(img, svg) { border-radius: 50%; clip-path: circle(42px at 50% 50%); }
/* frames: a thick ring drawn around the avatar */
.fr-basic { box-shadow: 0 0 0 0 transparent, var(--pop); }
.fr-sunrise { border-color: #ff8a3d !important; box-shadow: 0 0 0 4px #ffd166, 0 0 0 6px var(--ink), var(--pop); }
.fr-gold { border-color: #b8860b !important; box-shadow: 0 0 0 4px #ffd700, 0 0 0 6px var(--ink), 0 0 16px rgba(255, 200, 0, .7); }
.fr-reader { border-color: #8b5cf6 !important; box-shadow: 0 0 0 4px #c4b5fd, 0 0 0 6px var(--ink), var(--pop); }
.fr-century { border-color: #dc2626 !important; box-shadow: 0 0 0 4px #ff6b3d, 0 0 0 6px var(--ink), 0 0 18px rgba(255, 90, 40, .75); }
.fr-sakura { border-color: #ff8fb1 !important; box-shadow: 0 0 0 4px #ffd1e0, 0 0 0 6px var(--ink), var(--pop); }
.fr-ocean { border-color: #0891b2 !important; box-shadow: 0 0 0 4px #67e8f9, 0 0 0 6px var(--ink), var(--pop); }
.fr-neon { border-color: #ff00a8 !important; box-shadow: 0 0 0 4px #00f0ff, 0 0 0 6px var(--ink), 0 0 16px rgba(255, 0, 168, .6); }
.fr-prism { border-color: var(--ink) !important; box-shadow: 0 0 0 6px var(--ink), 0 0 20px rgba(192, 132, 252, .7);
  background: radial-gradient(circle at 50% 30%, #fff, #f1e9ff) padding-box, linear-gradient(110deg, #ff6b9a, #ffd166, #6ee7b7, #60a5fa, #c084fc) border-box !important;
  border-width: 5px !important; border-style: solid; }
.editprof h3 { margin: 12px 0 8px; }
.avopts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 210px; overflow-y: auto; padding: 2px; }
.avopt { aspect-ratio: 1; padding: 0; border-radius: 50%; overflow: hidden; border: 2.5px solid var(--line-d); background: radial-gradient(circle at 50% 30%, #fff, #f1e9ff); cursor: pointer; }
.avopt :is(img, svg).art { width: 170%; height: auto; max-width: none; margin-left: -35%; margin-top: -6%; }
.avopt.sel { border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand); }
.fropts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.fropt { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; font: inherit; background: var(--card); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.fropt.sel { border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); background: #f5f0ff; }
.fropt.lock { opacity: .75; }
.fropt .fring { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 50% 30%, #fff, #f1e9ff); margin: 6px 0 4px; }
.fropt b { font-size: 12px; } .fropt small { font-size: 10.5px; color: var(--muted); font-weight: 700; text-align: center; }
.fr-prism { border: 5px solid transparent !important; }

/* ---------- leagues ---------- */
.leaguecard { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; margin: 0 0 16px; padding: 12px 14px; font: inherit;
  text-align: left; color: var(--text); cursor: pointer; border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: var(--pop);
  background: linear-gradient(150deg, color-mix(in srgb, var(--lc, #94a3b8) 22%, #fff), #fff 80%); }
.leaguecard .lgem, .ltiers i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; transform: rotate(45deg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--lc) 45%, #fff), var(--lc)); border: 2.5px solid var(--ink); }
.leaguecard .lgem .ic, .ltiers i .ic { width: 22px; height: 22px; transform: rotate(-45deg); }
.leaguecard .lt { display: grid; gap: 2px; } .leaguecard .lt b { font-size: 16px; } .leaguecard .lt small { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.leaguecard .go { font-size: 26px; font-weight: 900; color: var(--muted); }
.ltiers { display: flex; justify-content: center; gap: 10px; margin: 14px 0 6px; flex-wrap: wrap; }
.ltiers i { width: 30px; height: 30px; border-radius: 9px; opacity: .35; filter: grayscale(.6); }
.ltiers i .ic { width: 15px; height: 15px; }
.ltiers i.past { opacity: .7; filter: none; }
.ltiers i.on { opacity: 1; filter: none; width: 40px; height: 40px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--ink); }
.lmoved { text-align: center; font-weight: 900; margin: 8px 0; } .lmoved.up { color: #16a34a; } .lmoved.down { color: #dc2626; }
.lboard { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.lboard li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 2px solid var(--line); }
.lboard li .rk { text-align: center; font-size: 15px; }
.lboard li .nm { font-weight: 800; } .lboard li .nm em { font-style: normal; color: var(--brand); font-size: 12px; }
.lboard li .xp { font-weight: 900; font-size: 13px; color: var(--muted); }
.lboard li.up { border-color: #86efac; background: #f0fdf4; } .lboard li.down { border-color: #fecaca; background: #fef2f2; }
.lboard li.me { border: 2.5px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.pacct p { margin: 0 0 10px; } .btn.danger { color: #dc2626; } .btn.danger:not(.ghost) { background: #dc2626; color: #fff; }

/* league promotion screen */
.lresult { text-align: center; }
.lresult .lrgem { width: 96px; height: 96px; margin: 10px auto 18px; display: grid; place-items: center; border-radius: 26px; transform: rotate(45deg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--lc) 45%, #fff), var(--lc)); border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  animation: lrpop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.lresult .lrgem .ic { width: 48px; height: 48px; transform: rotate(-45deg); }
.lresult.down .lrgem { animation: none; filter: saturate(.8); }
@keyframes lrpop { from { transform: rotate(45deg) scale(.3); } to { transform: rotate(45deg) scale(1); } }
.lresult .kicker { margin: 0; font-weight: 900; color: var(--lc); text-transform: uppercase; letter-spacing: .06em; }
.lresult h2 { margin: 2px 0 8px; }
@media (prefers-reduced-motion: reduce) { .lresult .lrgem { animation: none; } }
