/* Ms Quỳnh · "Chuyển sắc xanh → tím".
   Nền trắng ánh tím, khối chuyển sắc xanh dương sang tím chữ trắng, chữ xanh than, vàng chỉ để nhấn (nút chính, sticker, số điểm).
   Không nền kem, không ô ly, không nền vàng phủ trang, không chữ viết tay. */
:root {
  --page: #F5F5FF; --page-hi: #E6E4FF;
  --ink: #14123A; --ink-soft: rgba(20, 18, 58, .7); --ink-line: rgba(20, 18, 58, .14);
  --g: #4F46E5; --g-hi: #5B52F0; --g-deep: #4A1FB8; --grad: linear-gradient(135deg, #2F6BFF 0%, #7A2BF5 100%); --g-line: rgba(255, 255, 255, .16);
  --white: #FFFFFF; --w-soft: rgba(255, 255, 255, .78);
  --vang: #FFB800; --vang-2: #FFD25A; --vang-nhat: #FFF0B8;
  --xanh: #16A34A; --lime: #86EFAC; --xanh-nhat: #DCFCE7;
  --bad-ink: #B42318; --bad-soft: #FFE1DD;
  --display: "Bricolage Grotesque", "Be Vietnam Pro", system-ui, sans-serif;
  --text: "Be Vietnam Pro", system-ui, sans-serif;
  /* biến của scrollcraft.css (trang chủ) */
  --sc-canvas: var(--page); --sc-surface: var(--g); --sc-ink: var(--ink); --sc-ink-soft: var(--ink-soft);
  --sc-accent: var(--g); --sc-accent-ink: var(--white);
  --sc-font-display: var(--display); --sc-font-text: var(--text);
  --ease: cubic-bezier(.23, 1, .32, 1); --spring: cubic-bezier(.3, 1.5, .5, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--page); }
body { margin: 0; color: var(--ink); font-family: var(--text); line-height: 1.55; background: var(--page);
  background-image: radial-gradient(50rem 26rem at 90% -5%, var(--page-hi), transparent 65%); background-attachment: fixed; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--vang); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 10px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; margin: 0; font-weight: 800; }
p { text-wrap: pretty; }
.kick { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--g); }
/* chữ nhấn: khối xanh mực, chữ vàng */
.hl { background: var(--grad); color: #fff; padding: 0 .16em; border-radius: .14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl.sweep { animation: sweep .7s .1s var(--ease) both; }
@keyframes sweep { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.y { color: var(--g); }
.soft { color: var(--ink-soft); }
.small { font-size: .88rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: .8rem; }
.num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.04em; line-height: .9; }

/* Khối xanh lá đậm: chữ trắng, nhấn vàng */
.box, .item, .count, .step, .tablebox, .stats > div, .rules > div, .fx-modal__card { background: var(--grad); color: var(--white); }
.seg { background: var(--ink); color: var(--white); }
:is(.box, .item, .count, .step, .tablebox, .stats > div, .rules > div, .fx-modal__card) .soft { color: var(--w-soft); }
:is(.box, .item, .count, .step, .tablebox, .stats > div, .rules > div, .fx-modal__card) .y,
:is(.box, .count, .fx-modal__card) .kick { color: var(--vang); }

/* Thanh trên: xanh mực, logo vàng */
.bar { position: sticky; top: 0; z-index: 60; background: var(--ink); color: var(--white); }
.bar__in { max-width: 72rem; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; font-size: 1.25rem; white-space: nowrap; color: var(--white); }
.brand img { width: 36px; height: 36px; }
.tabs { display: flex; gap: .15rem; margin-left: auto; }
.tabs a { text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-weight: 700; font-size: .92rem; color: var(--w-soft); transition: background-color .2s, color .2s; }
.tabs a:hover { color: var(--white); background: rgba(255, 255, 255, .1); }
.tabs a[aria-current="page"] { background: var(--vang); color: var(--ink); }
.stk-badge { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; background: var(--vang); color: var(--ink); border-radius: 999px; padding: .2rem .85rem .2rem .22rem; }
.stk-badge svg { width: 28px; height: 28px; }
.stk-badge circle { fill: var(--ink); } .stk-badge path { fill: var(--vang); }

.dock { display: none; }
@media (max-width: 760px) {
  .tabs { display: none; }
  .stk-badge { margin-left: auto; }
  .dock { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: .5rem; right: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom)); z-index: 60; background: var(--ink); border-radius: 22px; padding: .3rem; box-shadow: 0 12px 32px rgba(20, 18, 58, .4); }
  .dock a { display: grid; justify-items: center; gap: 1px; text-decoration: none; font-size: .68rem; font-weight: 700; color: var(--w-soft); padding: .45rem 0 .35rem; border-radius: 16px; transition: background-color .2s, color .2s; }
  .dock a svg { width: 22px; height: 22px; }
  .dock a[aria-current="page"] { color: var(--ink); background: var(--vang); }
  body.app { padding-bottom: 92px; }
}

/* Nút */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .75rem 1.45rem; border-radius: 999px; border: 0; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .2s var(--ease), box-shadow .2s, background-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--go { background: var(--vang); color: var(--ink); box-shadow: 0 8px 22px rgba(255, 170, 0, .35), inset 0 -3px 0 rgba(0, 0, 0, .1); }
.btn--go:hover { box-shadow: 0 12px 30px rgba(255, 170, 0, .5), inset 0 -3px 0 rgba(0, 0, 0, .1); }
.btn--sun { background: var(--vang); color: var(--ink); box-shadow: 0 6px 18px rgba(255, 184, 0, .4); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--ghost:hover { background: rgba(20, 18, 58, .06); }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
:is(.box, .fx-modal__card, .dark) .btn--go { background: var(--vang); color: var(--ink); }
:is(.box, .fx-modal__card, .dark) .btn--ghost { color: var(--white); box-shadow: inset 0 0 0 2px var(--g-line); }

.wrap { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
/* Ô làm bài: trắng tinh */
.panel { background: var(--white); color: var(--ink); border-radius: 26px; padding: 1.3rem; box-shadow: 0 18px 40px rgba(20, 18, 58, .16); }
.box { border-radius: 26px; padding: 1.3rem; box-shadow: 0 14px 34px rgba(74, 31, 184, .28); }
.panel + .panel, .panel + .list, .list + .panel, .box + .box, .box + .panel, .panel + .box, .list + .box, .box + .list { margin-top: 1rem; }
.title { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3rem); margin: .4rem 0 .5rem; }
.sub { margin: 0 0 1.4rem; color: var(--ink-soft); max-width: 42ch; font-weight: 500; }
.h2 { font-size: 1.4rem; margin: 1.8rem 0 .8rem; }

.meter { height: 10px; border-radius: 99px; background: rgba(20, 18, 58, .14); overflow: hidden; position: relative; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--ink); width: 0; transition: width .8s var(--ease); position: relative; overflow: hidden; }
.meter > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-100%); animation: shine 2.6s 1s infinite; }
.panel .meter > i { background: var(--grad); }
:is(.box, .item, .count, .step, .tablebox) .meter { background: rgba(255, 255, 255, .18); }
:is(.box, .item, .count, .step, .tablebox) .meter > i { background: var(--vang); }
:is(.box, .item, .count, .step) .meter--lime > i { background: var(--lime); }
@keyframes shine { to { transform: translateX(100%); } }

/* Thẻ từ */
.card { perspective: 1400px; width: 100%; max-width: 30rem; margin: 0 auto; aspect-ratio: 4 / 3; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.card__in { position: relative; width: 100%; height: 100%; transition: transform .7s var(--spring); transform-style: preserve-3d; }
.card.is-flipped .card__in { transform: rotateY(180deg); }
.card__face { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: .7rem; padding: 1.4rem; border-radius: 28px; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--white); color: var(--ink); box-shadow: 0 26px 50px rgba(20, 18, 58, .25); overflow: hidden; }
.card__face::before { content: "Aa"; position: absolute; right: -1.5rem; bottom: -3.2rem; font: 800 11rem/1 var(--display); color: rgba(20, 18, 58, .05); pointer-events: none; }
.card__face--back { transform: rotateY(180deg); background: var(--grad); color: var(--white); }
.card__face--back::before { color: rgba(255, 255, 255, .07); }
.card__face--back .card__note { color: var(--w-soft); }
.card__en { font-family: var(--display); font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.7rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere; }
.card__vi { font-family: var(--display); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); font-weight: 800; letter-spacing: -0.02em; color: var(--vang); }
.card__note { font-size: .95rem; color: var(--ink-soft); }
.card__hint { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.say { display: inline-flex; align-items: center; gap: .4rem; justify-self: center; border: 0; background: var(--vang); color: var(--ink); border-radius: 999px; padding: .55rem 1.05rem; font-weight: 800; font-size: .92rem; cursor: pointer; }
.say svg { width: 18px; height: 18px; }
.say:hover { transform: scale(1.05); }

/* Câu hỏi */
.q { font-family: var(--display); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.35; }
.q b { background: var(--vang); padding: 0 .2em; border-radius: 6px; }
.opts { display: grid; gap: .6rem; margin-top: 1.1rem; }
.opt { position: relative; text-align: left; min-height: 56px; padding: .8rem 3.2rem .8rem 1.1rem; border-radius: 16px; border: 2px solid var(--ink-line); background: var(--white); color: var(--ink); font-weight: 700; font-size: 1.05rem; cursor: pointer; transition: background-color .2s, border-color .2s, transform .15s; }
.opt:hover:not([disabled]) { border-color: var(--g); background: #F0EEFF; transform: translateX(3px); }
.opt.is-right { background: var(--xanh-nhat); border-color: var(--xanh); }
.opt.is-wrong { background: var(--bad-soft); border-color: var(--bad-ink); }
.opt[disabled] { cursor: default; }
.field { width: 100%; min-height: 56px; font: inherit; font-size: 1.1rem; padding: .8rem 1.1rem; border-radius: 16px; border: 2px solid var(--ink-line); background: var(--white); color: var(--ink); caret-color: var(--xanh); }
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(29, 78, 216, .22); }
.field-wrap { position: relative; }
.why { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 18px; background: var(--bad-soft); color: var(--ink); }
.why.is-right { background: var(--xanh-nhat); }
.why strong { display: block; margin-bottom: .25rem; font-family: var(--display); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; color: var(--bad-ink); }
.why.is-right strong { color: var(--xanh); }
.tag { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .28rem .75rem; border-radius: 99px; background: var(--ink); color: var(--vang); }
.crumb { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 1rem; font-size: .88rem; font-weight: 800; color: var(--ink-soft); }
.crumb a { text-decoration: none; } .crumb a:hover { color: var(--ink); }

/* Danh sách việc: khối xanh, chữ trắng */
.list { display: grid; gap: .6rem; }
.item { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; padding: 1rem 1.1rem; border-radius: 20px; border: 0; cursor: pointer; text-decoration: none; box-shadow: 0 8px 20px rgba(74, 31, 184, .22); transition: transform .2s var(--ease), background-color .2s, box-shadow .2s; }
.item:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 12px 28px rgba(74, 31, 184, .3); }
.item__main { flex: 1; min-width: 0; }
.item__title { font-family: var(--display); font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.item__meta { font-size: .85rem; color: var(--w-soft); }
.item > svg { width: 22px; height: 22px; flex: none; color: var(--vang); }
.item--hot { background: var(--ink); }
.item--hot:hover { background: #24215C; }
.pill { font-size: .8rem; font-weight: 800; padding: .25rem .7rem; border-radius: 99px; background: var(--vang); color: var(--ink); white-space: nowrap; }
.pill--quiet { background: rgba(255, 255, 255, .16); color: var(--white); }

.grade-pick { display: flex; flex-wrap: wrap; gap: .45rem; }
.grade-pick button { min-width: 52px; min-height: 52px; border-radius: 16px; border: 2px solid var(--ink-line); background: var(--white); color: var(--ink); font-family: var(--display); font-size: 1.2rem; font-weight: 800; cursor: pointer; transition: transform .15s, background-color .2s; }
.grade-pick button:hover { transform: translateY(-2px); border-color: var(--ink); }
.grade-pick button[aria-pressed="true"] { background: var(--ink); color: var(--vang); border-color: var(--ink); }

/* Hôm nay */
.hello { display: grid; gap: 1.1rem; margin-bottom: 1.2rem; }
.hello h1 { font-size: clamp(2.3rem, 1.6rem + 3.2vw, 3.4rem); }
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.count { border-radius: 22px; padding: 1rem 1.1rem 1.1rem; box-shadow: 0 10px 24px rgba(74, 31, 184, .25); }
.count .num { font-size: 3rem; }
.count .num small { font-size: 1.1rem; color: var(--w-soft); letter-spacing: 0; }
.count .lab { font-size: .82rem; font-weight: 700; color: var(--w-soft); margin: .25rem 0 .6rem; }
.count.ok { background: var(--ink); } .count.ok .num { color: var(--vang); }

/* Thang điểm: 8 cột bậc. Trên nền vàng: đã qua xanh, đang đứng xanh mực + vầng sáng, đích viền nét đứt.
   Trong khối xanh: đã qua vàng, đang đứng trắng. */
.climb { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; align-items: end; height: var(--h, 220px); position: relative; }
.climb > div { position: relative; height: var(--bh); border-radius: 10px 10px 4px 4px; background: #DCE5FB; box-shadow: inset 0 0 0 1.5px #C3D2F7; display: flex; justify-content: center; transition: background-color .4s, height .8s var(--ease), box-shadow .4s; }
.climb > div span { position: absolute; top: .35rem; font-family: var(--display); font-weight: 800; font-size: clamp(.95rem, .7rem + 1vw, 1.4rem); color: var(--ink-soft); letter-spacing: -0.04em; }
.climb > div.done { background: var(--grad); box-shadow: none; } .climb > div.done span { color: var(--white); }
.climb > div.here { background: var(--vang); box-shadow: 0 0 0 3px var(--page), 0 0 0 6px var(--ink), 0 14px 30px rgba(255, 170, 0, .45); } .climb > div.here span { color: var(--ink); }
.climb > div.here::after { content: "Bạn"; position: absolute; top: -2rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--vang); padding: .15rem .55rem; border-radius: 99px; white-space: nowrap; }
.climb > div.goal { background: transparent; box-shadow: none; border: 2px dashed var(--ink); } .climb > div.goal span { color: var(--ink); }
:is(.box, .fx-modal__card) .climb > div { background: rgba(255, 255, 255, .14); box-shadow: none; }
:is(.box, .fx-modal__card) .climb > div span { color: var(--w-soft); }
:is(.box, .fx-modal__card) .climb > div.done { background: var(--vang); } :is(.box, .fx-modal__card) .climb > div.done span { color: var(--ink); }
:is(.box, .fx-modal__card) .climb > div.here { background: var(--white); box-shadow: 0 0 0 3px var(--g), 0 0 0 6px var(--vang), 0 0 34px rgba(255, 184, 0, .6); } :is(.box, .fx-modal__card) .climb > div.here span { color: var(--ink); }
:is(.box, .fx-modal__card) .climb > div.here::after { background: var(--vang); color: var(--ink); }
:is(.box, .fx-modal__card) .climb > div.goal { border-color: var(--vang); background: rgba(255, 184, 0, .1); } :is(.box, .fx-modal__card) .climb > div.goal span { color: var(--vang); }
.climb.grow > div { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes rise { from { height: 8px; } }
.lift { display: flex; align-items: flex-end; gap: .9rem; margin-bottom: 2.6rem; }
.lift .num { font-size: clamp(5rem, 3rem + 8vw, 7.5rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .05em; }
.lift .num small { -webkit-text-fill-color: var(--ink-soft); }
.lift .num small { font-size: .36em; color: var(--ink-soft); }
.lift p { margin: 0 0 .6rem; font-weight: 600; }
.steps { display: grid; gap: .55rem; }
.step { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: .9rem; align-items: center; padding: .85rem 1rem; border-radius: 20px; text-decoration: none; box-shadow: 0 8px 20px rgba(74, 31, 184, .2); }
.step__n { font-family: var(--display); font-weight: 800; font-size: 2rem; text-align: center; letter-spacing: -0.04em; color: var(--w-soft); }
.step__t { font-weight: 700; } .step__m { font-size: .82rem; color: var(--w-soft); }
.step .meter { margin-top: .45rem; height: 6px; }
.step.done { background: var(--g-deep); box-shadow: none; } .step.done .step__n { color: var(--vang); }
.step.here { background: var(--ink); } .step.here .step__n { color: var(--vang); }
.step.soon { background: transparent; color: var(--ink); border: 2px dashed var(--ink-line); box-shadow: none; } .step.soon .step__n, .step.soon .step__m { color: var(--ink-soft); }
a.step:hover { filter: brightness(1.08); } a.step.here:hover { background: #24215C; }

/* Sổ sticker */
.medal { width: 100%; height: 100%; display: block; }
.book { display: grid; grid-template-columns: repeat(5, 1fr); gap: .55rem; }
.slot { aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .3); display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: rgba(255, 255, 255, .35); font-size: .9rem; }
.slot.on { border: 0; }
.slot.on svg { animation: slap .5s var(--spring) both; animation-delay: calc(var(--i) * 25ms); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); }
@keyframes slap { from { transform: scale(2.2) rotate(-30deg); opacity: 0; } }
.book.flip { animation: bookIn .7s var(--ease) both; }
@keyframes bookIn { from { transform: translateX(60px) rotate(4deg); opacity: 0; } }
.near { display: inline-block; font-weight: 800; color: var(--vang); background: var(--ink); padding: .2rem .75rem; border-radius: 99px; animation: pulse 1s infinite alternate; }
:is(.box) .near { color: var(--ink); background: var(--vang); }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.06); } }
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.rules div { border-radius: 18px; padding: .85rem .95rem; }
.rules b { display: block; font-family: var(--display); font-size: 1.8rem; color: var(--vang); letter-spacing: -0.03em; line-height: 1; }
.rules span { font-size: .85rem; color: var(--w-soft); }

/* Nhật ký */
.tablebox { border-radius: 22px; overflow: hidden; box-shadow: 0 14px 30px rgba(74, 31, 184, .25); }
.diary { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.diary th, .diary td { padding: .7rem .45rem; text-align: center; border-bottom: 1px solid var(--g-line); }
.diary th { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--vang); background: var(--g-deep); }
.diary td:first-child, .diary th:first-child { text-align: left; padding-left: 1rem; }
.diary td:first-child { font-weight: 800; }
.diary tr[data-k] { cursor: pointer; } .diary tr[data-k]:hover td, .diary tr.open td { background: var(--g-hi); }
.diary .detail td { text-align: left; background: var(--g-deep); font-size: .86rem; padding: .8rem 1rem; }
.diary .zero td { color: rgba(255, 255, 255, .4); }
.diary tr:last-child td { border-bottom: 0; }
.seg { display: inline-flex; border-radius: 999px; padding: 3px; background: var(--ink); }
.seg button { border: 0; background: transparent; color: var(--w-soft); padding: .45rem .9rem; border-radius: 999px; font-weight: 800; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--vang); color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.stats div { border-radius: 20px; padding: .9rem; }
.stats .num { font-size: 2.3rem; color: var(--vang); }
.stats span { display: block; font-size: .8rem; color: var(--w-soft); margin-top: .3rem; }
.cal { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.cal i { aspect-ratio: 1; border-radius: 5px; background: rgba(255, 255, 255, .12); }
.cal i.on { background: var(--vang); } .cal i.today { outline: 2px solid var(--white); outline-offset: 1px; }

/* Hiệu ứng (fx.js) */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.fx-star { position: fixed; width: 48px; height: 48px; will-change: transform; filter: drop-shadow(0 6px 12px rgba(20, 18, 58, .45)); }
.fx-plus { position: fixed; font-family: var(--display); font-weight: 800; font-size: 2.6rem; color: var(--ink); letter-spacing: -0.04em; -webkit-text-stroke: 1.5px var(--white); paint-order: stroke fill; will-change: transform; }
.fx-bump { animation: bump .55s var(--spring); }
@keyframes bump { 40% { transform: scale(1.3) rotate(-6deg); } }
.fx-mark { position: absolute; right: .8rem; top: 50%; width: 30px; height: 30px; margin-top: -15px; pointer-events: none; }
.fx-mark svg { width: 100%; height: 100%; }
.fx-mark path { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: draw .45s ease-out both; }
@keyframes draw { from { stroke-dashoffset: 1; } }
.fx-mark.ok path { stroke: var(--xanh); } .fx-mark.no path { stroke: var(--bad-ink); }
.fx-confetti { position: fixed; inset: 0; width: 100%; height: 100%; }
.fx-toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: var(--ink); color: var(--vang); box-shadow: 0 14px 34px rgba(20, 18, 58, .4); padding: .7rem 1.25rem; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 1.05rem; white-space: nowrap; animation: pop .45s var(--spring) both; }
.fx-toast.out { opacity: 0; transition: opacity .35s; }
@keyframes pop { from { transform: translateX(-50%) translateY(20px) scale(.6); opacity: 0; } }
.fx-modal { position: fixed; inset: 0; background: rgba(20, 18, 58, .6); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 1rem; pointer-events: auto; animation: fade .25s both; }
.fx-modal.out { opacity: 0; transition: opacity .3s; }
.fx-modal__card { width: min(26rem, 100%); border-radius: 30px; box-shadow: 0 40px 80px rgba(0, 0, 0, .45); padding: 1.8rem 1.5rem 1.5rem; text-align: center; display: grid; gap: .8rem; justify-items: center; animation: pop2 .55s var(--spring) both; }
.fx-modal__card h2 { font-size: 2rem; }
.fx-modal__card .num { font-size: 5rem; color: var(--vang); }
.fx-ladderbox { width: 100%; padding-top: 2.2rem; }
.fx-badge { position: relative; width: 150px; height: 150px; animation: spin 1.1s var(--spring) both; filter: drop-shadow(0 10px 30px rgba(255, 184, 0, .55)); }
.fx-badge svg { width: 100%; height: 100%; } .fx-badge b { display: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop2 { from { transform: scale(.7) translateY(30px); opacity: 0; } }
@keyframes spin { from { transform: rotate(-220deg) scale(.2); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.link { color: var(--g); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
:is(.box, .item) .link { color: var(--vang); }
.climb > div.here::after { background: var(--ink); color: var(--vang); }
