/* VajehRah mini app — components (fonts, tokens and base live in base.css) */

.page { padding: calc(14px + var(--safe-t)) 18px calc(120px + var(--safe-b)); max-width: 540px; margin: 0 auto; animation: pageIn .35s var(--ease) backwards; }
.page.full { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(28px + var(--safe-b)); display: flex; flex-direction: column; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1, h2, h3 { margin: 0; line-height: 1.4; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
.eyebrow { font-size: 12px; font-weight: 500; color: var(--ink-3); letter-spacing: .01em; }
.sec { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 2px 12px; font-size: 15px; font-weight: 700; }
.sec .faint { font-weight: 500; font-size: 12.5px; }

/* ───────────────────────── surfaces ───────────────────────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--sh-1); }
.card + .card, .card + .grid2, .grid2 + .card { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.grid2 > .card { margin: 0; }
.tap { transition: transform .18s var(--ease), box-shadow .18s; }
.tap:active { transform: scale(.985); }
.hair { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

.noir { position: relative; overflow: hidden; color: var(--noir-ink); border-radius: 26px; padding: 20px; isolation: isolate;
  background:
    radial-gradient(110% 80% at 100% 0%, var(--lc-a, rgba(79, 134, 232, .45)) 0%, transparent 58%),
    radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--gold-2) 24%, transparent) 0%, transparent 60%),
    linear-gradient(165deg, var(--noir-1), var(--noir-2));
  box-shadow: var(--sh-2); }
.dark .noir { border: 1px solid rgba(255, 255, 255, .07); }
.noir::after { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(180deg, #000, transparent 75%); }
.noir .eyebrow { color: var(--noir-ink-2); }

/* ───────────────────────── buttons ───────────────────────── */
.btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 54px; padding: 0 22px; border-radius: 17px;
  background: var(--pri); color: var(--pri-ink); font-size: 15.5px; font-weight: 700; letter-spacing: -.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 8px 20px -10px rgba(19, 20, 24, .45); transition: transform .15s var(--ease), opacity .2s, background .2s; }
.dark .btn { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .1), 0 8px 24px -12px rgba(242, 240, 234, .25); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .38; pointer-events: none; }
.btn.gold { background: var(--acc-grad, linear-gradient(180deg, #EED3A0 0%, #CDA663 55%, #B88F4C 100%)); color: var(--acc-ink, #20180A); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 10px 24px -12px color-mix(in srgb, var(--gold-2) 75%, transparent); }
.btn.green { background: var(--green); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 10px 22px -12px rgba(44, 135, 95, .7); }
.dark .btn.green { color: #07140E; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--sh-1); }
.btn.quiet { background: transparent; color: var(--ink-2); box-shadow: none; height: 46px; }
.btn.sm { height: 42px; border-radius: 13px; font-size: 14px; padding: 0 16px; width: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--card-2); color: var(--ink); border: 1px solid var(--line); flex: none; transition: transform .15s var(--ease), background .2s; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.pri { background: var(--pri); color: var(--pri-ink); border: 0; }
.icon-btn.lg { width: 56px; height: 56px; }
.close-x { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); flex: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.chip.gold { background: var(--gold-soft); border-color: transparent; color: var(--gold); }
.chip.green { background: var(--green-soft); border-color: transparent; color: var(--green); }
.chip.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.en { direction: ltr; justify-content: flex-start; }
.chip .serif { font-size: 15px; }
.pill-cefr { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: .04em; direction: ltr; background: var(--card-3); color: var(--ink-2); }
.noir .pill-cefr { background: rgba(255, 255, 255, .1); color: var(--noir-ink); }

/* segmented */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 13px; background: var(--card); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: all .2s var(--ease); }
.seg button.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; }

/* progress */
.bar { height: 6px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--pri); transition: width .8s var(--ease); }
.bar.gold > i { background: linear-gradient(90deg, var(--gold-2), var(--gold-3)); }
.noir .bar { background: rgba(255, 255, 255, .12); }

/* notes */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--card-2); font-size: 13.5px; line-height: 1.75; color: var(--ink-2); }
.note > .i { margin-top: 3px; color: var(--ink-3); }
.note b { color: var(--ink); }
.note.gold { background: var(--gold-soft); } .note.gold > .i { color: var(--gold); }
.note.blue { background: var(--blue-soft); } .note.blue > .i { color: var(--blue); }
.note.green { background: var(--green-soft); } .note.green > .i { color: var(--green); }

.tile-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--card-2); color: var(--ink); border: 1px solid var(--line); flex: none; }
.tile-ico.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.tile-ico.noir { background: linear-gradient(160deg, var(--noir-1), var(--noir-2)); color: var(--gold-3); border-color: transparent; padding: 0; border-radius: 13px; box-shadow: none; }
.dark .tile-ico.noir { border: 1px solid var(--line-2); }

/* avatar */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden; font-weight: 700; font-size: 17px;
  background: linear-gradient(160deg, var(--card-3), var(--card-2)); color: var(--ink-2); border: 1px solid var(--line); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 88px; height: 88px; font-size: 32px; }
.avatar-ring { padding: 3px; border-radius: 50%; background: conic-gradient(from 210deg, var(--gold-2), var(--gold-3), var(--gold), var(--gold-3), var(--gold-2)); display: inline-block; }
.avatar-ring .avatar { border: 3px solid var(--bg); }

/* ───────────────────────── home ───────────────────────── */
.top { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; }
.hello { font-size: 19px; font-weight: 800; line-height: 1.3; }
.league-chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1); font-size: 13px; font-weight: 700; }
.league-chip .faint { font-weight: 500; }

.goal-top { display: flex; align-items: center; gap: 14px; }
.goal-title { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; line-height: 1.3; }
.goal-en { font-family: var(--display); font-style: italic; font-size: 16px; color: var(--noir-ink-2); direction: ltr; }
.goal-big { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 12px; }
.goal-big b { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.035em; }
.goal-big span { color: var(--noir-ink-2); font-size: 14px; }
.goal-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--noir-ink-2); }

.today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.today-title { font-size: 20px; font-weight: 800; margin-top: 2px; }
.five { display: flex; gap: 6px; margin: 16px 0; }
.five i { flex: 1; height: 6px; border-radius: 99px; background: var(--card-3); }
.five i.on { background: var(--pri); }
.today .note { margin-bottom: 14px; }
.pace-row { display: flex; gap: 8px; margin-top: 12px; }
.pace-row button { flex: 1; height: 40px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-2); font-weight: 700; font-size: 13.5px; color: var(--ink-2); text-align: center; display: flex; align-items: center; justify-content: center; }
.pace-row button.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; }

.mini { display: flex; flex-direction: column; gap: 6px; text-align: right; min-height: 158px; }
.mini .big { font-size: 24px; font-weight: 800; line-height: 1.2; }
.mini .big small { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.boxes { display: flex; align-items: flex-end; gap: 5px; height: 30px; margin-top: auto; }
.boxes i { flex: 1; border-radius: 5px; background: var(--card-3); }
.boxes i.has { background: var(--ink); opacity: .85; }
.boxes i.has:last-child { background: var(--gold-2); opacity: 1; }

.station { display: flex; align-items: center; gap: 14px; width: 100%; text-align: right; }
.station.open { border-color: color-mix(in srgb, var(--gold-2) 45%, transparent); background: linear-gradient(180deg, var(--gold-soft), var(--card) 70%); }
.slogan { text-align: center; color: var(--ink-3); font-size: 12.5px; margin: 30px 0 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.slogan::before, .slogan::after { content: ''; width: 28px; height: 1px; background: var(--line-2); }

/* ───────────────────────── tab bar ───────────────────────── */
.tabbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); width: min(440px, calc(100% - 28px));
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--sh-3); }
.tabbar-in { display: grid; grid-template-columns: repeat(4, 1fr); height: 66px; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3); transition: color .2s; }
.tab .ti { display: grid; place-items: center; width: 46px; height: 30px; border-radius: 15px; transition: background .25s var(--ease), color .25s; }
.tab.on { color: var(--ink); }
.tab.on .ti { background: var(--pri); color: var(--pri-ink); }

/* ───────────────────────── map ───────────────────────── */
.map-level { background: var(--card); border: 1px solid var(--line); border-radius: 22px; margin-bottom: 12px; overflow: hidden; box-shadow: var(--sh-1); }
.map-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: right; }
.lv-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.lv-en { font-family: var(--display); font-style: italic; color: var(--ink-3); font-size: 15px; font-weight: 400; direction: ltr; }
.chev { color: var(--ink-3); transition: transform .3s var(--ease); }
.map-level.open .chev { transform: rotate(180deg); }
.lv-bar { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.lv-bar .bar { flex: 1; max-width: 170px; height: 4px; }
.lv-bar .bar > i { background: var(--lc); }

.map-ground { position: relative; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--card-2), var(--card)); }
.map-ground svg.deco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.node { position: absolute; transform: translate(50%, -50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: var(--card); color: var(--ink-3); border: 1.5px solid var(--line-2); box-shadow: var(--sh-1); transition: transform .2s var(--ease); z-index: 2; }
.node:active { transform: translate(50%, -50%) scale(.94); }
.node.done { background: linear-gradient(160deg, var(--lc-l), var(--lc) 55%, var(--lc-d)); color: #fff; border: 0; box-shadow: 0 8px 18px -8px var(--lc-a), inset 0 1px 0 rgba(255, 255, 255, .35); }
.node.current { width: 64px; height: 64px; background: var(--pri); color: var(--pri-ink); border: 0; font-size: 18px; box-shadow: 0 0 0 6px var(--lc-s), 0 14px 28px -10px var(--lc-a); }
.node.current::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--lc); animation: ring 2.2s var(--ease) infinite; }
@keyframes ring { from { transform: scale(.9); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
.node.story { width: 46px; height: 46px; border-radius: 14px; transform: translate(50%, -50%) rotate(45deg); }
.node.story > .i { transform: rotate(-45deg); }
.node.story:active { transform: translate(50%, -50%) rotate(45deg) scale(.94); }
.node.story.open { background: var(--acc-grad); color: var(--acc-ink); border: 0; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--gold-2) 80%, transparent); }
.node.story.read { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.node.boss { width: 76px; height: 76px; background: none; border: 0; box-shadow: none; }
.node.boss .emblem { filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .18)); }
.node.boss.open::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid var(--gold-2); animation: ring 2.2s var(--ease) infinite; }
.node .badge-ok { position: absolute; bottom: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; border: 2px solid var(--card); }
.node-tip { position: absolute; transform: translate(50%, -100%); z-index: 3; padding: 4px 10px; border-radius: 9px; background: var(--pri); color: var(--pri-ink); font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: var(--sh-2); animation: bob 2.4s ease-in-out infinite; }
.node-tip::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.node-tip.gold { background: var(--gold-2); color: var(--acc-ink, #20180A); }
@keyframes bob { 50% { transform: translate(50%, calc(-100% - 4px)); } }

/* ───────────────────────── sheet / modal ───────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(8, 9, 12, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow: auto; background: var(--card); border-radius: 28px 28px 0 0; padding: 10px 20px calc(24px + var(--safe-b)); animation: up .35s var(--ease) both; max-width: 560px; margin: 0 auto; border-top: 1px solid var(--line); }
@keyframes up { from { transform: translateY(100%); } }
.grab { width: 38px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 0 auto 16px; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.modal { position: fixed; inset: 0; z-index: 41; display: grid; place-items: center; padding: 24px; }
.modal-card { width: 100%; max-width: 360px; text-align: center; padding: 30px 22px 22px; border-radius: 28px; animation: pop .45s var(--ease) both; }
@keyframes pop { from { transform: scale(.88) translateY(10px); opacity: 0; } }
.medal-stage { position: relative; display: grid; place-items: center; margin: 4px auto 14px; width: 132px; height: 132px; }
.medal-stage::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(232, 203, 140, .35), transparent 65%); animation: breathe 3s ease-in-out infinite; }
.medal-stage .medallion { position: relative; animation: spinIn .7s var(--ease) both; filter: drop-shadow(0 16px 24px rgba(0, 0, 0, .35)); }
@keyframes spinIn { from { transform: rotateY(90deg) scale(.6); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .7; } }

.word-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.word-row:last-child { border-bottom: 0; }
.word-row .w { font-family: var(--display); font-size: 21px; line-height: 1.2; direction: ltr; text-align: right; }

/* ───────────────────────── league ───────────────────────── */
.ladder { position: relative; display: flex; align-items: center; justify-content: space-between; margin: 8px 8px 18px; }
.ladder::before { content: ''; position: absolute; left: 18px; right: 18px; top: 50%; height: 1px; background: var(--line-2); }
.lg { position: relative; display: grid; place-items: center; width: 44px; }
.lg .crest { transition: transform .3s var(--ease); }
.lg.on .crest { transform: scale(1.45); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .22)); }
.league-meta { display: flex; justify-content: center; gap: 14px; color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
.league-meta span { display: inline-flex; align-items: center; gap: 5px; }
.lb { padding: 6px; }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 15px; }
.lb-row + .lb-row { margin-top: 2px; }
.lb-row .avatar { width: 38px; height: 38px; font-size: 15px; }
.lb-row.me { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.lb-rank { width: 30px; display: grid; place-items: center; flex: none; }
.rank-n { font-weight: 700; color: var(--ink-3); font-size: 14px; }
.lb-xp { font-weight: 800; font-size: 14px; }
.lb-xp small { font-weight: 500; color: var(--ink-3); font-size: 11px; margin-right: 4px; }
.zone { display: flex; align-items: center; gap: 8px; margin: 6px 10px; font-size: 11.5px; font-weight: 700; }
.zone::before, .zone::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .25; }
.zone.up { color: var(--green); } .zone.down { color: var(--red); }

/* ───────────────────────── me ───────────────────────── */
.profile { text-align: center; margin: 6px 0 20px; }
.profile h2 { margin-top: 10px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.stat b { display: block; font-size: 20px; font-weight: 800; line-height: 1.25; }
.stat span { font-size: 12px; color: var(--ink-3); }
.leitner { display: flex; align-items: flex-end; gap: 10px; height: 130px; margin-top: 16px; }
.lt-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; font-size: 12px; color: var(--ink-3); }
.lt-col b { color: var(--ink); font-size: 12px; }
.lt-col i { width: 100%; border-radius: 8px; background: var(--card-3); transition: height .8s var(--ease); }
.lt-col.has i { background: var(--ink); opacity: .82; }
.lt-col.m i { background: linear-gradient(180deg, var(--gold-3), var(--gold-2)); opacity: 1; }
.lt-col.m span { color: var(--gold); }
.medals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.medal { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: center; box-shadow: var(--sh-1); }
.medal .t { font-size: 12px; font-weight: 700; line-height: 1.4; }
.medal.off .t { color: var(--ink-3); font-weight: 500; }
.select-list { display: flex; flex-direction: column; gap: 8px; }
.lv-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: right; transition: border-color .2s, box-shadow .2s; box-shadow: var(--sh-1); }
.lv-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.lv-opt .radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; color: var(--pri-ink); }
.lv-opt.on .radio { background: var(--pri); border-color: transparent; }

/* ───────────────────────── lesson & quiz ───────────────────────── */
.qtop { display: flex; align-items: center; gap: 14px; margin: 4px 0 20px; }
.qtop .bar { flex: 1; }
.qtop .count { font-size: 12.5px; font-weight: 700; color: var(--ink-3); min-width: 32px; text-align: left; }
.learn-card { padding: 22px 20px; border-radius: 26px; }
.learn-meta { display: flex; justify-content: space-between; align-items: center; }
.pos { font-family: var(--display); font-style: italic; font-size: 16px; color: var(--ink-2); direction: ltr; }
.headword { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 22px 0 6px; direction: ltr; }
.learn-word { font-family: var(--display); font-size: 54px; line-height: 1; letter-spacing: -.01em; word-break: break-word; }
.learn-ph { font-family: var(--read); font-style: italic; color: var(--ink-3); font-size: 16px; margin-top: 8px; direction: ltr; text-align: left; }
.say { display: flex; gap: 8px; }
.learn-meaning { font-size: 23px; font-weight: 800; margin: 20px 0 4px; line-height: 1.5; }
.learn-def { font-family: var(--read); font-style: italic; color: var(--ink-2); font-size: 16.5px; line-height: 1.55; direction: ltr; text-align: left; }
.example { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); }
.example .en-s { font-family: var(--read); font-size: 18px; line-height: 1.6; direction: ltr; text-align: left; }
.example .fa { color: var(--ink-2); font-size: 14px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
mark.hw { background: linear-gradient(180deg, transparent 58%, var(--gold-soft) 58%); color: inherit; font-weight: 600; padding: 0 1px; border-bottom: 1.5px solid var(--gold-2); }
.tip { display: flex; gap: 12px; margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--gold-soft); font-size: 14px; line-height: 1.75; }
.tip .i { color: var(--gold); margin-top: 3px; }
.sec-label { font-size: 12px; color: var(--ink-3); font-weight: 600; margin: 18px 0 8px; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 18px 0; }
.dots i { width: 6px; height: 6px; border-radius: 9px; background: var(--line-2); transition: all .3s var(--ease); }
.dots i.on { width: 22px; background: var(--ink); }
.sticky-foot { position: sticky; bottom: calc(12px + var(--safe-b)); margin-top: auto; padding-top: 12px; display: flex; gap: 10px; }

.q-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 14px; }
.q-kicker.retry { color: var(--gold); }
.q-prompt { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.q-prompt .serif { font-size: 46px; line-height: 1.1; direction: ltr; }
.q-prompt.fa { font-size: 25px; font-weight: 800; line-height: 1.5; }
.q-sentence { font-family: var(--read); font-size: 21px; line-height: 1.7; direction: ltr; text-align: left; margin-bottom: 8px; }
.gap { display: inline-block; min-width: 92px; border-bottom: 2px solid var(--ink); margin: 0 4px; text-align: center; color: var(--green); font-weight: 600; }
.options { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 10px 14px; border-radius: 17px; background: var(--card); border: 1px solid var(--line-2); text-align: right; font-weight: 600; font-size: 15.5px; transition: all .2s var(--ease); box-shadow: var(--sh-1); }
.opt .k { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--card-2); color: var(--ink-3); font-size: 13px; font-weight: 700; flex: none; border: 1px solid var(--line); }
.opt .end { margin-right: auto; }
.opt.en-opt .lbl { font-family: var(--read); font-size: 17.5px; font-weight: 400; direction: ltr; }
.opt.sel { border-color: var(--ink); }
.opt.right { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.opt.right .k { background: var(--green); color: #fff; border-color: transparent; }
.opt.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); animation: shake .35s; }
.opt.wrong .k { background: var(--red); color: #fff; border-color: transparent; }
.opt:disabled { cursor: default; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.type-in { width: 100%; height: 60px; border-radius: 17px; border: 1.5px solid var(--line-2); background: var(--card); padding: 0 18px; font-family: var(--read); font-size: 22px; direction: ltr; text-align: center; outline: none; transition: border-color .2s, box-shadow .2s; }
.type-in:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--line); }
.type-in.right { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.type-in.wrong { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.type-in::placeholder { font-family: var(--font); font-size: 15px; color: var(--ink-3); }
.hint { text-align: center; color: var(--ink-2); font-size: 14px; margin-bottom: 16px; }
.masked { text-align: center; font-family: var(--read); font-size: 34px; letter-spacing: .18em; direction: ltr; margin: 10px 0 12px; }
.play-big { display: grid; place-items: center; width: 108px; height: 108px; margin: 10px auto 14px; border-radius: 50%; background: var(--pri); color: var(--pri-ink); box-shadow: 0 18px 40px -16px rgba(19, 20, 24, .55); position: relative; }
.play-big.playing::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--ink); opacity: .3; animation: ring 1.2s var(--ease) infinite; }
/* letters of the word to build: one row up to 8 letters, two even rows above that; every box shrinks to fit the screen */
.slots { --cols: 8; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; direction: ltr; margin: 10px auto 20px; max-width: calc(var(--cols) * 40px + (var(--cols) - 1) * 6px); }
.slot { width: min(40px, calc((100% - (var(--cols) - 1) * 6px) / var(--cols))); height: 50px; border-radius: 12px; border: 1.5px dashed var(--line-2); font-family: var(--read); font-size: 22px; line-height: 1; display: grid; place-items: center; text-align: center; padding: 0; }
.slot.filled { border-style: solid; border-color: var(--ink); background: var(--card); }
.tiles { --cols: 8; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; direction: ltr; margin-inline: auto; max-width: calc(var(--cols) * 48px + (var(--cols) - 1) * 8px); }
.tile { width: min(48px, calc((100% - (var(--cols) - 1) * 8px) / var(--cols))); height: 52px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); font-family: var(--read); font-size: 22px; line-height: 1; display: grid; place-items: center; text-align: center; padding: 0 0 2px; box-shadow: 0 3px 0 var(--line-2); transition: transform .12s; }
.tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line-2); }
.tile.used { opacity: .2; pointer-events: none; }

.feedback { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; padding: 0 12px calc(12px + var(--safe-b)); animation: up .3s var(--ease) both; }
.feedback-in { max-width: 540px; margin: 0 auto; padding: 18px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-3); }
.fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fb-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; flex: none; }
.feedback.right .fb-ico { background: var(--green); } .feedback.wrong .fb-ico { background: var(--red); }
.fb-title { font-weight: 800; font-size: 16px; }
.feedback.right .fb-title { color: var(--green); } .feedback.wrong .fb-title { color: var(--red); }
.fb-ans { font-size: 14px; color: var(--ink-2); }
.fb-ans .read { font-size: 17px; color: var(--ink); }

/* results */
.result { align-items: center; text-align: center; padding-top: 48px; }
.result h2 { margin-top: 18px; font-size: 24px; }
.ring { position: relative; width: 168px; height: 168px; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; line-height: 1.1; }
.ring .val small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-top: 4px; }
.xp-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin-top: 14px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 14px; }
.step-msg { width: 100%; margin-top: 22px; text-align: right; }
.result .stack { width: 100%; margin-top: auto; padding-top: 24px; }
.hero-ico { display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto; border-radius: 30px; }
.hero-ico.noir { background: radial-gradient(90% 90% at 30% 20%, var(--noir-1), var(--noir-2)); color: var(--gold-3); box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, .08); }
.hero-ico.soft { background: var(--card); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--sh-2); }
.intro { align-items: center; text-align: center; padding-top: 56px; }
.intro .chips { justify-content: center; margin: 4px 0 28px; }
.intro .btn + .btn { margin-top: 10px; }

/* empty / error */
.empty { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.empty .hero-ico { margin-bottom: 8px; }

/* ───────────────────────── story ───────────────────────── */
.story-head { margin: 24px 0 16px; }
.story-head h1 { margin: 6px 0 2px; }
.story-en { font-family: var(--display); font-style: italic; font-size: 20px; color: var(--ink-2); direction: ltr; text-align: right; }
.story-p { font-family: var(--read); font-size: 19px; line-height: 1.8; direction: ltr; text-align: left; margin: 18px 0 6px; color: var(--ink); }
.story-p::first-letter { }
.story-fa { font-size: 14.5px; color: var(--ink-2); line-height: 1.9; margin: 4px 0 10px; }
.hl { background: linear-gradient(180deg, transparent 60%, var(--gold-soft) 60%); border-bottom: 1.5px solid var(--gold-2); font-weight: 600; cursor: pointer; padding: 0 1px; }
.gr { border-bottom: 1.5px dotted var(--ink-3); cursor: pointer; }
.gr-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); font-size: 13.5px; margin: 8px 0; }
.gr-note .i { color: var(--gold); margin-top: 3px; }
.player { position: sticky; bottom: calc(10px + var(--safe-b)); z-index: 10; display: flex; align-items: center; gap: 12px; margin: 22px -4px 0; padding: 10px 12px 10px 14px; border-radius: 22px; background: var(--glass); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); border: 1px solid var(--line); box-shadow: var(--sh-3); direction: ltr; }
.player .pp { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--pri); color: var(--pri-ink); flex: none; }
.player input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 9px; background: var(--card-3); outline: none; }
.player input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); border: 3px solid var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.player .time { font-size: 12px; color: var(--ink-3); min-width: 34px; font-feature-settings: 'tnum'; }
.speed { height: 30px; padding: 0 10px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; }
.pop-word { position: fixed; z-index: 42; left: 12px; right: 12px; bottom: calc(86px + var(--safe-b)); max-width: 520px; margin: 0 auto; border-radius: 22px; box-shadow: var(--sh-3); animation: up .3s var(--ease) both; }
.pop-word .serif { font-size: 26px; line-height: 1.1; }

/* ───────────────────────── onboarding ───────────────────────── */
.ob { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(18px + var(--safe-t)) 20px calc(22px + var(--safe-b)); max-width: 540px; margin: 0 auto; animation: pageIn .4s var(--ease) backwards; }
.ob-steps { display: flex; gap: 6px; margin-bottom: 26px; }
.ob-steps i { flex: 1; height: 3px; border-radius: 9px; background: var(--line-2); transition: background .3s; }
.ob-steps i.on { background: var(--ink); }
.ob-hero { flex: 1; }
.ob-hero h1 { font-size: 30px; line-height: 1.35; margin: 22px 0 10px; }
.ob-hero > p { color: var(--ink-2); margin: 0 0 22px; }
.ob-feats { display: flex; flex-direction: column; gap: 4px; }
.ob-feat { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.ob-feat:last-child { border-bottom: 0; }
.ob p { color: var(--ink-2); }
.hours { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.hours button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 50px; border-radius: 15px; background: var(--card); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.hours button.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; }
.hours button.wide { grid-column: span 3; }
.hours .wide-row { grid-column: span 3; min-width: 0; }
.hstrip { position: relative; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 14px 6px; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.hstrip::-webkit-scrollbar { display: none; }
.hstrip button { flex: none; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 64px; height: 54px; border-radius: 15px; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); transition: background .18s, color .18s, transform .18s var(--ease); }
.hstrip button b { font-size: 15px; font-weight: 800; }
.hstrip button span { font-size: 10.5px; color: var(--ink-3); }
.hstrip button.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; transform: scale(1.04); }
.hstrip button.on span { color: inherit; opacity: .75; }

/* ───────────────────────── misc ───────────────────────── */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 40px); padding: 11px 16px; border-radius: 15px; background: #15161B; color: #F2F0EA; font-size: 13.5px; font-weight: 600; box-shadow: var(--sh-3); animation: toastIn .3s var(--ease) both; }
.dark .toast { background: #F2F0EA; color: #0B0C0F; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
.skeleton { border-radius: 22px; background: linear-gradient(100deg, var(--card-2) 30%, color-mix(in srgb, var(--card-3) 70%, var(--gold-soft)) 50%, var(--card-2) 70%); background-size: 220% 100%; border: 1px solid var(--line); animation: sk 1.6s ease-in-out infinite; }
/* the boot screen: the mark breathing over a soft glow, one line of what is happening, a thin moving thread */
.splash { position: fixed; inset: 0; display: grid; place-items: center; padding-bottom: 9vh; background: var(--bg); }
.splash-in { display: flex; flex-direction: column; align-items: center; gap: 9px; animation: splIn .45s var(--ease, ease-out) both; }
.splash-mark { position: relative; width: 68px; height: 68px; margin-bottom: 10px; animation: splPulse 2.6s ease-in-out infinite; }
.splash-mark::before { content: ''; position: absolute; inset: -22px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--gold-2) 34%, transparent), transparent); animation: splGlow 2.6s ease-in-out infinite; }
.splash-mark svg { position: relative; display: block; filter: drop-shadow(0 14px 20px rgba(10, 10, 14, .22)); }
.splash-name { font-size: 19px; font-weight: 800; color: var(--ink); }
.splash-line { min-height: 1.6em; font-size: 13px; color: var(--ink-3); text-align: center; }
.splash-bar { position: relative; width: 116px; height: 3px; margin-top: 8px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.splash-bar::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 40%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); animation: splBar 1.35s ease-in-out infinite; }
@keyframes splIn { from { opacity: 0; transform: translateY(6px); } }
@keyframes splPulse { 50% { transform: scale(1.045); } }
@keyframes splGlow { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: .95; transform: scale(1.08); } }
@keyframes splBar { from { transform: translateX(100%); } to { transform: translateX(-250%); } }
@keyframes sk { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.opt.en-opt { direction: ltr; text-align: left; }
.chip.read { font-family: var(--read); font-size: 14.5px; }
.lv-opt .lv-en { font-size: 14px; }

/* ───────── memory (FSRS) ───────── */
.rescue-line { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11.5px; font-weight: 600; color: var(--red); }
.boxes i.has:nth-child(6) { background: var(--gold-2); opacity: 1; }
.boxes i.has:last-child { background: var(--gold-2); }
.memory .mem-head { display: flex; align-items: center; gap: 14px; }
.mem-val { font-family: var(--display); font-size: 40px; line-height: 1.05; letter-spacing: -.01em; color: var(--ink); margin: 2px 0 4px; }
.memring { position: relative; width: 68px; height: 68px; flex: none; display: grid; place-items: center; }
.memring > svg:first-child { position: absolute; inset: 0; }
.memring .i { color: var(--ink-2); }
.memory .leitner { height: 120px; }
.memory .lt-col span { font-size: 10.5px; white-space: nowrap; }
.rescue-box .rb-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rescue-box .rb-row:first-of-type { border-top: 0; }
.rb-row .w { direction: ltr; font-size: 16px; font-weight: 600; color: var(--ink); }
.rb-row .m { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hitdots { display: inline-flex; gap: 4px; }
.hitdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--card-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.hitdots i.on { background: var(--green); box-shadow: none; }
.tierbar { display: inline-flex; gap: 2px; direction: ltr; }
.tierbar i { width: 7px; height: 12px; border-radius: 2.5px; background: var(--card-3); }
.tierbar i.on { background: var(--ink); opacity: .8; }
.tierbar i.on.gold { background: var(--gold-2); opacity: 1; }
.q-tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; margin-bottom: 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.q-tag.rescue { background: var(--red-soft); border-color: transparent; color: var(--red); }
.chip.rescue { border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red); }
.result .released, .result .sched { width: 100%; text-align: right; margin-top: 14px; }
.released { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(160deg, var(--gold-soft), var(--card) 70%); border-color: color-mix(in srgb, var(--gold) 25%, transparent); animation: pop .5s var(--ease) .3s backwards; }
.released b { display: block; margin-bottom: 4px; color: var(--ink); }
.rel-ico { flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, #E2C285, #A97E3A); box-shadow: 0 8px 20px -8px rgba(169, 126, 58, .7); }
.released .chips.en { justify-content: flex-start; }
.sched-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.sched-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.sched-row:first-of-type { border-top: 0; }
.sched-row .w { direction: ltr; text-align: left; font-size: 15.5px; font-weight: 600; }
.sched-row .when { min-width: 74px; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.sched-row .when.red { color: var(--red); }

/* ───────────────────────── companion ───────────────────────── */
.coin { flex: none; filter: drop-shadow(0 1px 1px rgba(150, 100, 10, .25)); }
.coin-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1); font-size: 14px; font-weight: 800; color: var(--ink); }

.buddy { position: relative; display: flex; align-items: center; min-height: 168px; padding-right: 134px; margin: 0 0 14px; border-radius: 26px; overflow: hidden; isolation: isolate; cursor: pointer; box-shadow: var(--sh-2); border: 1px solid var(--line); -webkit-tap-highlight-color: transparent; }
.buddy .room { position: absolute; inset: 0; z-index: -1; }
.buddy-char { position: absolute; right: 4px; bottom: 2px; line-height: 0; }
.bubble { position: relative; flex: 1; margin: 14px 4px 14px 14px; padding: 11px 14px 12px; border-radius: 18px; background: #fff; color: #16171C; box-shadow: 0 10px 30px -14px rgba(10, 10, 30, .45); animation: pop .45s var(--ease) both; }
.bubble::after { content: ''; position: absolute; right: -7px; bottom: 26px; width: 16px; height: 16px; background: inherit; transform: rotate(45deg); border-radius: 3px; }
.bubble-name { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin-bottom: 4px; }
.bubble-name b { font-weight: 800; }
.bubble-name .st { font-size: 11px; font-weight: 700; color: #8A6A2E; background: #F4EAD6; padding: 1px 8px; border-radius: 99px; }
.bubble-coins { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 12.5px; }
.bubble-text { font-size: 14px; line-height: 1.75; min-height: 48px; }
.caret { display: inline-block; width: 2px; height: 14px; margin-right: 2px; vertical-align: -2px; background: currentColor; opacity: .4; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.buddy-shirt { position: absolute; left: 10px; bottom: 10px; display: none; }

.buddy-say { display: flex; align-items: flex-end; gap: 4px; width: 100%; max-width: 380px; margin: 16px auto 0; text-align: right; }
.buddy-say .chw { flex: none; }
.say-bubble { position: relative; flex: 1; margin-bottom: 18px; padding: 11px 14px; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-2); font-size: 14px; line-height: 1.7; min-height: 46px; }
.pill-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.coin-pill { background: #FBF0D2; color: #94680F; }
.dark .coin-pill { background: rgba(246, 203, 85, .14); color: #F6CB55; }

.fb-buddy { position: relative; flex: none; width: 60px; height: 60px; margin: -30px 0 0 -2px; }
.fb-ico.sm { position: absolute; left: -2px; bottom: -2px; width: 24px; height: 24px; border: 2.5px solid var(--card); }
.fb-title { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; line-height: 1.55; }
.combo-chip { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 99px; background: linear-gradient(135deg, #FFB547, #F06A2A); color: #fff; font-size: 12px; font-weight: 800; box-shadow: 0 4px 12px -4px rgba(240, 106, 42, .6); animation: pop .4s var(--ease) both; }

.scrim.dark { background: radial-gradient(circle at 50% 42%, rgba(40, 30, 90, .88), rgba(5, 4, 15, .94)); }
.evolve { width: 100%; max-width: 360px; text-align: center; color: #F4F1EA; }
.evolve .eyebrow { color: rgba(244, 241, 234, .65); font-size: 13px; }
.evolve h2 { color: #fff; margin-top: 6px; font-size: 24px; }
.evolve .muted { color: rgba(244, 241, 234, .72); }
.evo-stage { position: relative; display: grid; place-items: center; width: 260px; height: 260px; margin: 8px auto 4px; }
.evo-rays { position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(from 0deg, rgba(255, 226, 150, .28) 0 8deg, transparent 8deg 22deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%); mask: radial-gradient(circle, #000 20%, transparent 70%); animation: ch-spin 14s linear infinite; }
.evo-stage.charging .chw { animation: evoCharge 1.3s ease-in both; }
.evo-stage.charging .evo-rays { animation: ch-spin 3s linear infinite, evoPulse .6s ease-in-out infinite alternate; }
.evo-stage.done::after { content: ''; position: absolute; inset: 30px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(255, 240, 200, 0) 65%); animation: evoFlash .9s ease-out both; pointer-events: none; }
@keyframes evoCharge { 0% { filter: brightness(1); transform: scale(1); } 70% { filter: brightness(1.6); transform: scale(1.04) rotate(-2deg); } 85% { transform: scale(.96) rotate(2deg); } 100% { filter: brightness(3) saturate(.3); transform: scale(1.08); } }
@keyframes evoPulse { to { opacity: .55; transform: scale(1.08); } }
@keyframes evoFlash { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(1.6); } }

/* onboarding picker */
.ob-buddy { position: relative; height: 252px; margin-top: 18px; border-radius: 28px; overflow: hidden; isolation: isolate; box-shadow: var(--sh-2); }
.ob-buddy .room { position: absolute; inset: 0; z-index: -1; }
.ob-char { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); line-height: 0; }
.ob-say { position: absolute; top: 12px; right: 12px; left: 12px; padding: 10px 14px; min-height: 66px; border-radius: 18px; background: rgba(255, 255, 255, .93); color: #16171C; font-size: 14px; line-height: 1.7; box-shadow: 0 10px 30px -14px rgba(10, 10, 30, .45); }
.ob-say b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.ob-say b small { font-weight: 600; color: #6B6E78; font-size: 11.5px; }
.ob-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.ob-pick button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink-2); transition: all .2s var(--ease); }
.ob-pick button.on { border-color: var(--ink); color: var(--ink); box-shadow: var(--sh-2); transform: translateY(-2px); }

/* profile card */
.me-buddy { display: flex; align-items: center; gap: 14px; width: 100%; text-align: right; padding: 12px; }
.mb-art { position: relative; flex: none; width: 104px; height: 104px; border-radius: 20px; overflow: hidden; isolation: isolate; display: grid; place-items: end center; }
.mb-art .room { position: absolute; inset: 0; z-index: -1; }
.mb-art .chw { margin-bottom: 0; }
.mb-name { font-size: 18px; font-weight: 800; }

/* wardrobe */
.wardrobe { padding-bottom: 130px; }
.w-title { font-weight: 800; font-size: 16px; }
.w-stage { position: relative; height: 270px; border-radius: 28px; overflow: hidden; isolation: isolate; box-shadow: var(--sh-2); }
.w-stage .room { position: absolute; inset: 0; z-index: -1; }
.w-char { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); line-height: 0; }
.w-badge { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .9); color: #16171C; font-size: 13px; font-weight: 800; box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .4); }
.w-dots { display: inline-flex; gap: 4px; }
.w-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(0, 0, 0, .14); }
.w-dots i.on { background: linear-gradient(135deg, #F6D47A, #C9932A); }
.w-stageline { text-align: center; margin: 10px 0 14px; }
.w-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -20px 14px; padding: 2px 20px; scrollbar-width: none; }
.w-tabs::-webkit-scrollbar { display: none; }
.w-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 13px; background: var(--card); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 700; color: var(--ink-2); transition: all .2s var(--ease); }
.w-tabs button.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; }
.w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.w-grid.chars { grid-template-columns: repeat(4, 1fr); }
.w-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 10px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); transition: all .2s var(--ease); min-width: 0; }
.w-tile.on { border-color: color-mix(in srgb, var(--green) 60%, transparent); }
.w-tile.sel { border-color: var(--gold-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-2) 22%, transparent); transform: translateY(-2px); }
.w-tile.locked .w-art { filter: grayscale(.7); opacity: .55; }
.w-art { display: grid; place-items: center; width: 100%; height: 78px; }
.w-art.room { height: 78px; }
.item-art { display: grid; place-items: center; width: 64px; height: 60px; }
.item-art svg { width: 100%; height: 100%; overflow: visible; }
.tile-room { display: block; width: 100%; height: 74px; border-radius: 12px; overflow: hidden; }
.w-name { font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.4; min-height: 18px; }
.w-tag { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--card-2); font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.w-tag.price { background: #FBF0D2; color: #94680F; }
.dark .w-tag.price { background: rgba(246, 203, 85, .14); color: #F6CB55; }
.w-tag.on { background: var(--green-soft); color: var(--green); }
.w-earn { margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: var(--card-2); border: 1px dashed var(--line-2); font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }
.w-earn b { color: var(--ink); font-size: 13.5px; }
.w-lore { margin-top: 14px; padding: 16px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1, 0 2px 10px rgba(0,0,0,.05)); position: relative; overflow: hidden; }
.w-lore::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--gold-2, #C9A25A), transparent); }
.w-lore-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.w-lore-h b { font-size: 15px; font-weight: 800; }
.w-lore-h span { font-size: 12px; color: var(--ink-3); }
.w-lore p { margin: 0; font-size: 13.5px; line-height: 1.95; color: var(--ink-2); }
.w-buy { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; padding: 0 12px calc(12px + var(--safe-b)); animation: up .3s var(--ease) both; }
.w-buy-in { display: flex; align-items: center; gap: 12px; max-width: 540px; margin: 0 auto; padding: 14px 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-3); }
.btn.gold .coin { margin-left: 2px; }

/* ───────────────────────── game layer ───────────────────────── */
.fly-coin { position: fixed; z-index: 300; width: 22px; height: 22px; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(120, 80, 10, .35)); }
.fly-coin svg { display: block; }
.float-txt { position: fixed; z-index: 300; transform: translate(-50%, -50%); pointer-events: none; font-weight: 800; font-size: 15px; color: var(--gold); white-space: nowrap; animation: floatUp 1.25s var(--ease) forwards; text-shadow: 0 1px 0 var(--card); }
.float-txt.hit { color: #fff; font-size: 20px; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.float-txt.miss { color: var(--ink-3); font-size: 13px; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 18% { opacity: 1; transform: translate(-50%, -80%) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -240%) scale(1); } }

/* the forgetting monster */
.mon { position: relative; display: inline-block; flex: none; }
.mon-svg { display: block; width: 100%; height: 100%; }
.mon-svg svg { display: block; overflow: visible; }
.mon .flash { opacity: 0; }
.mon .wisps { animation: monWisp 3.4s ease-in-out infinite; }
.mon.idle .mon-body, .mon.laugh .mon-body { transform-origin: 100px 180px; }
.mon.idle .mon-body { animation: monFloat 2.8s ease-in-out infinite; }
.mon.hit .mon-body { animation: monHit .5s var(--ease); transform-origin: 100px 120px; }
.mon.hit .flash { animation: monFlash .32s ease-out; }
.mon.laugh .mon-body { animation: monLaugh .34s ease-in-out 3; }
.mon.dazed .mon-body { animation: monWobble 1.5s ease-in-out infinite; transform-origin: 100px 170px; }
.mon .orbit { transform-origin: 100px 30px; animation: spin 1.8s linear infinite; }
.mon.poof .mon-svg { animation: monPoof .75s var(--ease) forwards; }
.mon .puffs { position: absolute; inset: 0; pointer-events: none; }
.mon .puffs i { position: absolute; left: 50%; top: 55%; width: 26%; height: 26%; margin: -13% 0 0 -13%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, rgba(235, 232, 245, .85) 60%, rgba(235, 232, 245, 0)); animation: puff .9s var(--ease) forwards; }
@keyframes monFloat { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-5px) scale(1.02, .98); } }
@keyframes monWisp { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-6px); opacity: .5; } }
@keyframes monHit { 0% { transform: translateX(0) scale(1); } 20% { transform: translateX(-12px) scale(.92, 1.06) rotate(-6deg); } 45% { transform: translateX(8px) rotate(4deg); } 70% { transform: translateX(-4px); } 100% { transform: none; } }
@keyframes monFlash { 0% { opacity: .85; } 100% { opacity: 0; } }
@keyframes monLaugh { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-9px) scale(1.04, .96); } }
@keyframes monWobble { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes monPoof { 0% { transform: scale(1); opacity: 1; filter: blur(0); } 35% { transform: scale(1.18, .84); opacity: 1; } 100% { transform: scale(.2); opacity: 0; filter: blur(6px); } }
@keyframes puff { 0% { transform: rotate(var(--a)) translateY(0) scale(.2); opacity: 0; } 30% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(-120%) scale(1.3); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* level guardians */
.boss { position: relative; display: inline-block; flex: none; }
.boss-in, .boss-in svg { display: block; width: 100%; height: 100%; overflow: visible; }
.boss .flash { opacity: 0; }
.boss .bs-body { transform-box: view-box; transform-origin: 100px 170px; }
.boss.idle .bs-body { animation: bsFloat 3.6s ease-in-out infinite; }
.boss.attack .bs-body { animation: bsLunge .6s var(--ease); }
.boss.hit .bs-body { animation: bsHit .55s var(--ease); }
.boss.hit .flash { animation: monFlash .34s ease-out; }
.boss.roar .bs-body { animation: bsRoar .45s ease-in-out 2; }
.boss.roar .bs-aura, .boss.attack .bs-aura { animation: bsPulse .5s ease-in-out 2; transform-box: fill-box; transform-origin: center; }
.boss.defeat .boss-in { animation: bsFade 1.2s var(--ease) forwards; }
.boss .bs-mote { animation: bsMote 4.6s ease-in-out infinite; }
.boss .bs-mote.m1 { animation-delay: -1.5s; } .boss .bs-mote.m2 { animation-delay: -3s; }
.boss .bs-ring { animation: bsRing 2.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.boss .bs-ring.r1 { animation-delay: .9s; } .boss .bs-ring.r2 { animation-delay: 1.8s; }
.boss .bs-bolt { animation: bsBolt 2.6s steps(1) infinite; } .boss .bs-bolt.d2 { animation-delay: 1.1s; }
.boss .bs-orb { animation: bsPulse .4s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.boss .bs-smoke { animation: bsMote 3.4s ease-in-out infinite; }
.boss .puffs { position: absolute; inset: 0; pointer-events: none; }
.boss .puffs.dark i { position: absolute; left: 50%; top: 50%; width: 24%; height: 24%; margin: -12% 0 0 -12%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, rgba(120, 110, 140, .9), rgba(40, 36, 52, .6) 60%, rgba(40, 36, 52, 0)); animation: puff 1s var(--ease) .2s forwards; opacity: 0; }
@keyframes bsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bsLunge { 0% { transform: translateX(0); } 35% { transform: translateX(26px) scale(1.06); } 100% { transform: translateX(0); } }
@keyframes bsHit { 0% { transform: translateX(0); } 25% { transform: translateX(-14px) rotate(-5deg); } 55% { transform: translateX(6px) rotate(2deg); } 100% { transform: translateX(0); } }
@keyframes bsRoar { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07, 1.03); } }
@keyframes bsPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .8; } }
@keyframes bsFade { 0% { transform: scale(1); opacity: 1; filter: none; } 40% { transform: scale(1.04); filter: brightness(1.8); } 100% { transform: scale(.6) translateY(30px); opacity: 0; filter: blur(4px); } }
@keyframes bsMote { 0%, 100% { transform: translate(0, 0); opacity: .3; } 50% { transform: translate(-4px, -8px); opacity: .8; } }
@keyframes bsRing { 0% { transform: scale(.7); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes bsBolt { 0%, 86%, 100% { opacity: 0; } 88%, 94% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boss * { animation: none !important; } }

/* boss arena */
.arena { position: relative; height: 196px; margin: -4px 0 18px; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh-1); isolation: isolate; }
.arena .world { position: absolute; inset: 0; z-index: -1; }
.arena::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .18)); }
.arena .ar-mon { position: absolute; left: 14px; bottom: 6px; }
.arena .ar-me { position: absolute; right: 16px; bottom: 8px; transition: transform .25s var(--ease); }
.arena .ar-me.lunge { animation: lunge .45s var(--ease); }
.arena .hp { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
.arena .hp-name { padding: 4px 10px; border-radius: 999px; background: rgba(15, 16, 22, .55); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px); white-space: nowrap; }
.arena .hearts { display: flex; flex-wrap: wrap; gap: 3px; direction: ltr; padding: 5px 8px; border-radius: 999px; background: rgba(15, 16, 22, .45); backdrop-filter: blur(6px); }
.arena .hearts i { width: 12px; height: 11px; background: #FF5D7A; clip-path: path('M6 11L1.2 6.2A3 3 0 0 1 6 1.8A3 3 0 0 1 10.8 6.2Z'); transition: transform .3s var(--ease), opacity .3s; }
.arena .hearts i.gone { background: rgba(255, 255, 255, .28); transform: scale(.8); }
.arena .hearts i.pop { animation: heartPop .5s var(--ease); }
.arena .ko { position: absolute; top: 44px; left: 18px; padding: 3px 10px; border-radius: 999px; background: var(--gold-2); color: var(--acc-ink, #1d1607); font-size: 11.5px; font-weight: 800; animation: pageIn .4s both; }
.arena .shot { position: absolute; z-index: 3; right: 100px; bottom: 70px; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--shot, #FFD36B) 55%, transparent 72%); box-shadow: 0 0 18px 6px var(--shot, #FFD36B); animation: shot .42s cubic-bezier(.5, 0, .8, .6) forwards; pointer-events: none; }
.arena .ar-line { position: absolute; right: 120px; bottom: 112px; max-width: 46%; padding: 7px 11px; border-radius: 14px 14px 4px 14px; background: rgba(255, 255, 255, .94); color: #1b1c22; font-size: 12px; font-weight: 600; line-height: 1.6; box-shadow: var(--sh-2); animation: pageIn .3s both; }
.arena .ar-line.mon-says { right: auto; left: 128px; border-radius: 14px 14px 14px 4px; }
.intro .arena.poster { width: 100%; height: 248px; margin: -28px 0 0; text-align: start; }
.arena.poster .ar-mon { left: 12px; bottom: 30px; }
.arena.poster .ar-me { right: 18px; bottom: 30px; }
.arena.poster .pst-eyebrow { position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(15, 16, 22, .55); color: #fff; font-size: 11.5px; font-weight: 700; backdrop-filter: blur(6px); }
.arena.poster .pst-line { left: 120px; bottom: 150px; animation-delay: .5s; }
.arena.poster .pst-hearts { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); }
.boss-facts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: -6px 0 24px; }
.boss-facts span { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); }
.boss-facts b { color: var(--ink); font-size: 14px; }
.boss-facts .i { color: var(--gold); }
@keyframes lunge { 0% { transform: none; } 35% { transform: translateX(-26px) rotate(-6deg); } 100% { transform: none; } }
@keyframes shot { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx, -180px), 4px) scale(1.15); opacity: .9; } }
@keyframes heartPop { 0% { transform: scale(1.5); background: #fff; } 100% { transform: scale(.8); } }

/* combo meter */
.combo-meter { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; background: linear-gradient(135deg, #FFB65C, #F0662E); color: #fff; font-weight: 800; font-size: 13px; box-shadow: 0 6px 14px -6px rgba(240, 102, 46, .7); animation: comboIn .35s var(--ease); flex: none; }
.combo-meter.t2 { background: linear-gradient(135deg, #FFCF5C, #F04E2E); }
.combo-meter.t3 { background: linear-gradient(135deg, #FFE48A, #E6304C 70%, #A21B6B); box-shadow: 0 6px 18px -4px rgba(230, 48, 76, .8); }
.combo-meter .x { font-size: 10.5px; opacity: .9; padding: 1px 5px; border-radius: 6px; background: rgba(0, 0, 0, .16); margin-right: 2px; }
.combo-meter .i { animation: flick 1s ease-in-out infinite; }
.combo-meter.bump { animation: comboBump .4s var(--ease); }
@keyframes comboIn { from { transform: scale(.4); opacity: 0; } }
@keyframes comboBump { 40% { transform: scale(1.18); } }
@keyframes flick { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(-6deg); } }
.combo-pill { background: linear-gradient(135deg, rgba(255, 182, 92, .2), rgba(240, 102, 46, .16)) !important; color: #D4561F !important; }
.dark .combo-pill { color: #FFB27A !important; }

/* worlds on the map */
.world { display: block; width: 100%; height: 100%; }
.world svg { display: block; }
.dark .world { filter: saturate(.9) brightness(.86); }
.world-banner { position: relative; height: 118px; border-top: 1px solid var(--line); overflow: hidden; }
.world-banner .wb-tag { position: absolute; right: 14px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: #17181d; font-size: 12.5px; font-weight: 800; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4); backdrop-filter: blur(6px); }
.world-banner .wb-tag small { font-weight: 600; color: #6b6e78; font-size: 11px; }
.world-banner .wb-mon { position: absolute; left: 12px; bottom: 4px; opacity: .95; }
.lv-world { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.map-ground.themed { background: linear-gradient(180deg, var(--wt-s), var(--card) 26%, var(--card) 74%, var(--wt-s)); }
.map-prop { position: absolute; width: var(--ps); height: var(--ps); transform: translateY(-50%); pointer-events: none; z-index: 0; opacity: .92; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .08)); transition: opacity .4s, filter .4s; }
.map-prop svg { display: block; }
.map-prop.mist { opacity: .32; filter: grayscale(.75) blur(.3px); }
.dark .map-prop { opacity: .78; filter: saturate(.85) brightness(.9); }
.dark .map-prop.mist { opacity: .2; filter: grayscale(.8); }
.map-ground.themed::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 22px at 50% 100%, var(--wt-s), transparent), repeating-linear-gradient(180deg, transparent 0 88px, color-mix(in srgb, var(--wt) 4%, transparent) 88px 90px); opacity: .9; }
.map-ground .node, .map-ground .node-tip { z-index: 1; }
.map-buddy { position: absolute; z-index: 2; transform: translate(50%, -62%); pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .14)); }
.map-buddy .chw { animation: hover 2.6s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-5px); } }

/* word cards */
.wcard { --w: 104px; position: relative; display: block; width: 100%; aspect-ratio: 5 / 7; perspective: 800px; border-radius: 16px; text-align: center; }
.wcard .wc-in { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.wcard.hidden .wc-in { transform: rotateY(180deg); }
.wcard .wc-front, .wcard .wc-back { position: absolute; inset: 0; border-radius: inherit; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.wcard .wc-front { display: flex; flex-direction: column; align-items: center; padding: 9px 8px 8px; background: linear-gradient(170deg, var(--card), var(--card) 55%, color-mix(in srgb, var(--r1) 45%, var(--card))); border: 1.5px solid var(--r2); box-shadow: 0 10px 22px -14px var(--rs), inset 0 0 0 3px color-mix(in srgb, var(--r1) 40%, transparent); }
.wcard .wc-back { transform: rotateY(180deg); background: radial-gradient(circle at 50% 40%, #2A2B35, #121318 75%); border: 1.5px solid #3a3b47; display: grid; place-items: center; }
.wcard .wc-back::before { content: ''; position: absolute; inset: 7px; border-radius: 11px; border: 1px solid rgba(226, 194, 133, .35); background-image: repeating-linear-gradient(45deg, rgba(226, 194, 133, .07) 0 6px, transparent 6px 12px); }
.wcard .wc-mark { position: relative; width: 34%; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid rgba(226, 194, 133, .7); box-shadow: inset 0 0 0 5px rgba(226, 194, 133, .12); }
.wcard .wc-mark::after { content: ''; position: absolute; inset: 30%; transform: rotate(45deg); background: linear-gradient(135deg, #F2DBA6, #A97E3A); border-radius: 3px; }
.wc-top { display: flex; align-items: center; gap: 4px; width: 100%; }
.wc-rar { font-size: 9.5px; font-weight: 800; color: var(--rink); }
.dark .wc-rar { color: var(--r1); }
.wc-lv { margin-right: auto; font-size: 10px; font-weight: 800; color: var(--ink-3); min-width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: var(--card-2); }
.gem { display: inline-block; flex: none; }
.gem svg { display: block; }
.wc-word { margin-top: auto; font-family: var(--display); font-size: calc(19px * var(--fit, 1)); line-height: 1.05; color: var(--ink); direction: ltr; overflow-wrap: normal; word-break: normal; hyphens: none; max-width: 100%; }
.wc-pos { font-size: 9.5px; color: var(--ink-3); font-style: italic; direction: ltr; margin-top: 2px; }
.wc-mean { margin-top: 6px; font-size: 11px; color: var(--ink-2); line-height: 1.5; max-height: 3em; overflow: hidden; }
.wc-tier { display: flex; gap: 2px; margin-top: auto; padding-top: 7px; direction: ltr; }
.wc-tier i { width: 9px; height: 3px; border-radius: 2px; background: var(--card-3); }
.wc-tier i.on { background: var(--r2); }
.wc-rescue { position: absolute; top: 30px; left: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 25%, transparent); }
.wc-sheen { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .55) 48%, transparent 60%); background-size: 260% 100%; background-position: 120% 0; opacity: 0; }
.wcard.r-legendary .wc-sheen, .wcard.r-epic .wc-sheen { opacity: .8; animation: sheen 3.6s ease-in-out infinite; }
.wcard.r-epic .wc-sheen { opacity: .45; animation-duration: 5s; }
.wcard .wc-foil { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .2; background: linear-gradient(125deg, #ff9ac8, #ffe08a 20%, #9effc9 40%, #8ad0ff 60%, #d1a3ff 80%, #ff9ac8); background-size: 300% 300%; animation: foil 6s linear infinite; }
.dark .wcard .wc-foil { mix-blend-mode: color-dodge; opacity: .18; }
.wcard.foil .wc-front { border-color: transparent; background-clip: padding-box; }
.wcard.foil::before { content: ''; position: absolute; inset: -1.5px; border-radius: 17px; background: linear-gradient(125deg, #ff9ac8, #ffe08a, #9effc9, #8ad0ff, #d1a3ff); background-size: 300% 300%; animation: foil 6s linear infinite; }
.wcard.r-legendary .wc-front { box-shadow: 0 12px 26px -12px rgba(217, 160, 46, .75), inset 0 0 0 3px rgba(255, 231, 168, .5); }
.wcard.lg { max-width: 220px; margin: 0 auto; }
.wcard.lg .wc-word { font-size: calc(34px * var(--fit, 1)); }
.wcard.lg .wc-mean { font-size: 14px; max-height: none; }
.wcard.lg .wc-rar { font-size: 12px; }
.wcard.lg .wc-tier i { width: 18px; height: 4px; }
.wcard.sm .wc-word { font-size: calc(16px * var(--fit, 1)); }
.wcard:active .wc-in { transform: scale(.97); }
.wcard.hidden:active .wc-in { transform: rotateY(180deg) scale(.97); }
@keyframes sheen { 0%, 55% { background-position: 120% 0; } 100% { background-position: -40% 0; } }
@keyframes foil { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.card-reveal { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 10px; margin: 16px -6px 4px; }
.card-reveal .wcard { flex: none; width: 86px; border-radius: 13px; transform: rotate(var(--rot, 0deg)) translateY(var(--ty, 0px)); transition: transform .35s var(--ease); box-shadow: 0 14px 24px -16px rgba(0, 0, 0, .4); }
.card-reveal .wcard:hover, .card-reveal .wcard:focus-visible { transform: rotate(0deg) translateY(-6px); z-index: 2; }
.card-reveal .wcard .wc-word { font-size: calc(16px * var(--fit, 1)); }
.card-reveal .wcard .wc-mean { font-size: 10px; margin-top: 4px; max-height: 3em; }
.card-reveal .wcard .wc-pos, .card-reveal .wcard .wc-lv, .card-reveal .wcard .wc-tier { display: none; }
.card-reveal .wcard .wc-rar { font-size: 9px; }
.card-reveal .wcard .wc-front { padding: 8px 6px 10px; }
.card-reveal .wcard .wc-back::before { inset: 5px; border-radius: 9px; }
.card-reveal .wcard.lit { animation: litUp .9s var(--ease); }
@keyframes litUp { 40% { filter: drop-shadow(0 0 14px var(--r2)); translate: 0 -8px; } }
.rarity-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 6px; }
.rarity-row .rr { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 11px; color: var(--ink-3); font-weight: 600; }
.rarity-row .rr b { font-size: 16px; color: var(--ink); }
.cards-hero { display: flex; align-items: center; gap: 14px; }
.cards-hero .fan { position: relative; width: 104px; height: 96px; flex: none; }
.cards-hero .fan .wcard { position: absolute; width: 58px; top: 6px; left: 22px; pointer-events: none; }
.cards-hero .fan .wcard .wc-mean, .cards-hero .fan .wcard .wc-pos, .cards-hero .fan .wcard .wc-tier, .cards-hero .fan .wcard .wc-lv, .cards-hero .fan .wcard .wc-rar { display: none; }
.cards-hero .fan .wcard .wc-word { font-size: calc(11px * var(--fit, 1)); }
.chip-row { display: flex; gap: 6px; overflow-x: auto; margin: 12px -18px 14px; padding: 0 18px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip { flex: none; height: 34px; padding: 0 12px; cursor: pointer; }
.chip-row .chip.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; }
.card-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px; }
.card-facts div { padding: 10px 6px; border-radius: 14px; background: var(--card-2); text-align: center; font-size: 11px; color: var(--ink-3); }
.card-facts b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 2px; }

/* home: play row */
.play-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
/* a lone last tile (an odd count) takes the whole row instead of leaving a hole beside it */
.play-row > :last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 108px; }
.play-row > :last-child:nth-child(odd) .tiny { max-width: 64%; }
/* home group titles: a quiet label, its (?) and a hairline */
.hgroup { display: flex; align-items: center; gap: 4px; margin: 26px 4px 10px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.hgroup > span { white-space: nowrap; }
.hgroup > i { flex: 1; height: 1px; margin-inline-start: 6px; background: linear-gradient(to left, var(--line-2), transparent); }
.hgroup .help-q { width: 24px; height: 24px; }
.play-groups .hgroup:first-child { margin-top: 14px; }
.play-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 120px; padding: 14px; border-radius: 22px; overflow: hidden; text-align: right; color: #fff; isolation: isolate; box-shadow: var(--sh-1); }
.play-tile::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--pt-bg); }
.play-tile .pt-art { position: absolute; left: -6px; bottom: -8px; z-index: -1; opacity: .95; }
.play-tile .eyebrow { color: rgba(255, 255, 255, .72); }
.play-tile b { font-size: 16px; font-weight: 800; }
.play-tile .tiny { color: rgba(255, 255, 255, .78); margin-top: auto; max-width: 62%; }
.play-tile.duel { --pt-bg: linear-gradient(150deg, #34306F, #191934 70%); }
.play-tile.cards { --pt-bg: linear-gradient(150deg, #5B3A14, #22160A 75%); }
.play-tile .cards-hero .fan { transform: scale(.8) rotate(-4deg); transform-origin: 0 100%; }
.play-tile.cards .tiny { max-width: 52%; }
.play-tile .pt-badge { position: absolute; top: 12px; left: 12px; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }

/* duels */
.vs { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 6px; padding: 18px 10px 14px; border-radius: 26px; overflow: hidden; isolation: isolate; color: #fff; }
.vs::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(120% 90% at 50% 0%, #4B4592, #1A1938 70%); }
.vs::after { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-conic-gradient(from 0deg at 50% 62%, rgba(255, 255, 255, .05) 0 8deg, transparent 8deg 16deg); }
.vs .side { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.vs .side .nm { font-weight: 800; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs .side .sc { font-size: 26px; font-weight: 800; line-height: 1; }
.vs .side .sc small { font-size: 12px; opacity: .7; font-weight: 600; margin-right: 2px; }
.vs .side .tm { font-size: 11px; opacity: .7; }
.vs .side .sc.hide { opacity: .4; }
.duel-cmp { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 14px; padding: 14px 16px 12px; }
.dc-row { display: flex; align-items: center; gap: 12px; }
.dc-v { min-width: 58px; font-weight: 800; font-size: 14px; text-align: center; }
.dc-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dc-l { font-size: 11.5px; color: var(--ink-3); }
.dc-bar { display: flex; width: 100%; height: 8px; border-radius: 99px; overflow: hidden; background: color-mix(in srgb, #6F68C9 30%, var(--card-3)); }
.dc-bar i { height: 100%; border-radius: 99px; background: linear-gradient(270deg, var(--gold-3), var(--gold-2)); transition: width .8s var(--ease); }
.dc-who { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); padding: 0 16px; margin-top: -4px; }
.vs .side.win .nm::before { content: ''; display: inline-block; width: 14px; height: 10px; margin-left: 5px; background: var(--gold-3); clip-path: polygon(0 100%, 0 20%, 28% 55%, 50% 0, 72% 55%, 100% 20%, 100% 100%); }
.vs .side.lose { opacity: .78; }
.vs .mid { align-self: center; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(160deg, #F2DBA6, #A97E3A); color: #1d1607; font-family: var(--display); font-size: 22px; font-style: italic; box-shadow: 0 0 0 6px rgba(242, 219, 166, .14), 0 10px 22px -8px rgba(0, 0, 0, .6); }
.vs .mystery { width: 104px; height: 104px; display: grid; place-items: center; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .55); }
.duel-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); width: 100%; text-align: right; }
.duel-row:last-child { border-bottom: 0; }
.duel-row .dr-score { font-weight: 800; font-size: 15px; direction: ltr; }
.duel-rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.duel-rules div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); text-align: center; line-height: 1.5; }
.duel-rules .tile-ico { width: 34px; height: 34px; border-radius: 11px; }

/* victory hero */
.victory { position: relative; display: grid; place-items: center; width: 210px; height: 190px; margin: 0 auto; }
.victory .rays { position: absolute; inset: -20px; border-radius: 50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--gold-3) 50%, transparent) 0 9deg, transparent 9deg 20deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: spin 18s linear infinite; }
.victory .emb { position: relative; animation: rise .8s var(--ease) .55s both; }
.victory .mon { position: absolute; }
.next-world { position: relative; align-self: stretch; width: 100%; height: 128px; margin-top: 14px; border-radius: 22px; overflow: hidden; isolation: isolate; border: 1px solid var(--line); box-shadow: var(--sh-1); text-align: right; animation: pageIn .6s var(--ease) 1s both; }
.next-world .world { position: absolute; inset: 0; z-index: -2; }
.next-world::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(270deg, rgba(10, 11, 16, .72), rgba(10, 11, 16, .25) 60%, rgba(10, 11, 16, 0)); }
.next-world .nw-tx { position: absolute; right: 16px; bottom: 14px; display: flex; flex-direction: column; gap: 2px; color: #fff; max-width: 70%; }
.next-world .nw-tx b { font-size: 19px; font-weight: 800; }
.next-world .nw-tx span { font-size: 12px; opacity: .85; }
.next-world .nw-eb { display: inline-flex; align-self: flex-start; padding: 2px 9px; border-radius: 999px; background: var(--gold-2); color: var(--acc-ink, #1d1607); font-weight: 800; opacity: 1 !important; font-size: 11px !important; margin-bottom: 4px; }
.next-world .nw-lock { position: absolute; top: 12px; left: 12px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #1b1c22; }
@keyframes rise { from { transform: scale(.3) translateY(20px); opacity: 0; } }

/* prefs */
.pref { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: right; }
.pref + .pref { border-top: 1px solid var(--line); }
/* settings wait for «ذخیره»: a dot on what changed, a bar to save or undo, a question before leaving */
.pref-dot { display: inline-block; width: 7px; height: 7px; margin-inline-start: 7px; border-radius: 50%; background: var(--green); vertical-align: middle; box-shadow: 0 0 0 3px var(--green-soft); }
.settings-page.has-savebar { padding-bottom: calc(110px + var(--safe-b)); }
.savebar { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; padding-inline-start: 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line-2); box-shadow: var(--sh-3); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); animation: saveIn .32s var(--ease) both; }
.savebar b { font-size: 14px; }
.savebar .btn.sm { height: 40px; padding: 0 14px; }
@keyframes saveIn { from { opacity: 0; transform: translateY(14px); } }
.leave-card { position: relative; z-index: 41; padding-top: 26px; }
.leave-card .btn { width: 100%; }
.leave-stay { display: block; margin: 10px auto 0; padding: 6px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--card-3); transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(-18px); }
@media (prefers-reduced-motion: reduce) { .mon .mon-body, .mon .wisps, .wc-sheen, .wc-foil, .victory .rays, .map-buddy .chw { animation: none !important; } }

/* ───────────────────────── lesson quest ───────────────────────── */
.quest-head { position: relative; padding: 20px 18px 18px; border-radius: 24px; background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--lc, var(--gold)) 16%, var(--card)), var(--card) 62%); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.quest-head h2 { margin-top: 4px; }
.quest-head p { margin: 6px 0 0; line-height: 1.8; }
.quest-coins { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; height: 30px; padding: 0 12px; border-radius: 999px; background: #FBF0D2; color: #94680F; font-size: 12.5px; font-weight: 800; }
.quest-coins .faint { color: inherit; opacity: .7; font-weight: 600; }
.dark .quest-coins { background: rgba(246, 203, 85, .12); color: #F6CB55; }
.quest-path { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; }
.qs { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 4px 12px 2px; }
.qs + .qs::before { content: ''; position: absolute; right: 27px; top: -14px; height: 28px; width: 2px; border-radius: 2px; background: var(--line-2); }
.qs.done + .qs::before { background: var(--green); opacity: .55; }
.qs-node { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 19px; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-3); box-shadow: var(--sh-1); transition: transform .2s var(--ease); }
.qs.done .qs-node { background: var(--green); border-color: transparent; color: #fff; }
.qs.cur .qs-node { background: var(--pri); border-color: transparent; color: var(--pri-ink); box-shadow: 0 14px 30px -14px rgba(19, 20, 24, .6), 0 0 0 5px var(--line); animation: qsPulse 2.4s ease-in-out infinite; }
.qs.later { opacity: .62; }
.qs-node:active { transform: scale(.95); }
.qs-tx b { font-size: 15px; }
.qs-tx .tiny { margin-top: 2px; line-height: 1.6; }
.qs-lock { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--card-2); color: var(--ink-3); }
@keyframes qsPulse { 0%, 100% { box-shadow: 0 14px 30px -14px rgba(19, 20, 24, .6), 0 0 0 5px var(--line); } 50% { box-shadow: 0 14px 30px -14px rgba(19, 20, 24, .6), 0 0 0 9px var(--line); } }
.q-stage { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 26px; padding: 0 11px; margin: -8px 0 14px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 700; }
.stage-done .sd-badge { position: relative; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 34px; background: radial-gradient(90% 90% at 30% 20%, var(--noir-1), var(--noir-2)); color: var(--gold-3); box-shadow: var(--sh-3), inset 0 1px 0 rgba(255, 255, 255, .08); animation: sdRise .6s var(--ease) both; }
.stage-done .sd-badge.round .num { font-size: 44px; font-weight: 800; line-height: 1; }
.stage-done .sd-check { position: absolute; left: -6px; bottom: -6px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; border: 3px solid var(--bg); animation: sdPop .4s var(--ease) .35s both; }
.stage-done .pill-row { margin-top: 12px; }
.stage-done .btn .tiny { margin-inline-start: 4px; }
@keyframes sdPop { from { transform: scale(0); } 70% { transform: scale(1.15); } to { transform: scale(1); } }
.q-def { font-family: var(--read); font-size: 20px; line-height: 1.65; direction: ltr; text-align: left; margin-bottom: 22px; padding: 16px 18px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); font-style: italic; color: var(--ink); }
.q-sentence.colloc .gap { min-width: 74px; color: var(--gold); border-bottom-color: var(--gold-2); }

/* ───────────────────────── placement ───────────────────────── */
.pl-ladder { display: flex; gap: 4px; margin: 0 0 16px; direction: rtl; }
.pl-ladder i { flex: 1; height: 4px; border-radius: 9px; background: var(--line-2); transition: background .3s; }
.pl-ladder i.ok { background: var(--gold-2); }
.pl-ladder i.cur { background: var(--ink); }
.pl-track i.done { background: var(--ink-3); }
.opt.picked { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.opt.picked .k { background: var(--ink); color: var(--bg); border-color: transparent; }
.pl-noted { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); animation: up .2s var(--ease) both; }
.pl-miss { margin-top: 18px; padding: 14px 14px 8px; text-align: right; }
.pl-miss .pm-sub { margin: 4px 0 6px; line-height: 1.7; }
.pm-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.pm-sub + .pm-row { border-top: 0; }
.pm-say { width: 32px; height: 32px; flex: none; }
.pm-w { direction: ltr; font-size: 17px; font-weight: 600; flex: none; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-m { font-size: 13.5px; color: var(--ink-2); min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-more { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 40px; font-size: 13px; font-weight: 700; color: var(--ink-2); border-top: 1px solid var(--line); }
.pl-kick { text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-top: 6px; }
.pl-word.fa { font-family: var(--font); font-size: 24px; font-weight: 800; direction: rtl; line-height: 1.6; }
.btn.quiet.sel { color: var(--ink); background: var(--card-2); }

/* ───────────────────────── guardian duel ───────────────────────── */
.arena.grim { height: 214px; border-color: rgba(0, 0, 0, .3); background: #0c0b12; }
.arena.grim .world { filter: brightness(.42) saturate(.6) contrast(1.1); }
.arena.grim::after { background: radial-gradient(70% 90% at 22% 80%, color-mix(in srgb, var(--b-aura, #7C5FCF) 34%, transparent), transparent 70%), linear-gradient(180deg, rgba(6, 6, 12, .5), rgba(6, 6, 12, .15) 45%, rgba(6, 6, 12, .55)); }
.arena.grim .hp { align-items: flex-start; justify-content: space-between; direction: ltr; }
.arena .foe-hp { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; max-width: 56%; padding: 4px 10px 4px 5px; border-radius: 999px; background: rgba(8, 8, 14, .62); backdrop-filter: blur(6px); direction: ltr; }
.arena .foe-hp .hp-name { padding: 2px 9px; background: color-mix(in srgb, var(--b-aura, #7C5FCF) 40%, rgba(255, 255, 255, .08)); font-size: 11.5px; direction: rtl; }
.arena .hp-bar { position: relative; flex: 1; height: 7px; border-radius: 9px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.arena .hp-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 9px; background: linear-gradient(90deg, #E24A3B, #FF8A5C); box-shadow: 0 0 10px rgba(255, 110, 80, .7); transition: width .5s var(--ease); }
.arena .hp-num { color: #fff; font-size: 11.5px; font-weight: 800; min-width: 14px; text-align: center; }
.arena .hearts.mine { max-width: 42%; justify-content: flex-end; gap: 2px; background: rgba(8, 8, 14, .55); }
.arena .hearts.mine i { width: 11px; height: 10px; clip-path: path('M5.5 10L1.1 5.7A2.75 2.75 0 0 1 5.5 1.65A2.75 2.75 0 0 1 9.9 5.7Z'); }
.arena .ar-phase { position: absolute; top: 46px; left: 12px; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }
.arena.grim .ko { top: 72px; left: 14px; }
.arena .ar-me.recoil { animation: recoil .5s var(--ease); }
.arena .shot.foe { right: auto; left: 110px; bottom: 92px; animation-duration: .38s; }
.arena .ar-banner { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: rgba(6, 6, 12, .58); backdrop-filter: blur(3px); color: #fff; animation: bannerIn .28s var(--ease) both; pointer-events: none; transition: opacity .3s; }
.arena .ar-banner.out { opacity: 0; }
.arena .ar-banner .eyebrow { color: rgba(255, 255, 255, .7); }
.arena .ar-banner b { display: inline-flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--b-eye, #fff); text-shadow: 0 0 18px color-mix(in srgb, var(--b-eye, #fff) 60%, transparent); }
.intro .arena.grim.poster { height: 268px; }
.arena.grim.poster .ar-mon { left: 6px; bottom: 34px; }
.arena.grim.poster .pst-line { left: 128px; right: auto; top: 50px; bottom: auto; max-width: 52%; }
.arena .pst-name { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: baseline; gap: 8px; color: #fff; }
.arena .pst-name b { font-size: 22px; font-weight: 800; color: var(--b-eye, #fff); text-shadow: 0 0 16px color-mix(in srgb, var(--b-eye, #fff) 55%, transparent); }
.arena .pst-name span { font-size: 12px; color: rgba(255, 255, 255, .72); }
.phase-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: -8px 0 12px; }
.phase-row span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 6px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.phase-row i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; background: var(--pri); color: var(--pri-ink); font-style: normal; font-size: 11px; }
.victory.grim { border-radius: 50%; background: radial-gradient(circle, rgba(20, 16, 30, .14), transparent 66%); }
.float-txt.hurt { color: #FF6B6B; font-size: 19px; text-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
@keyframes recoil { 0% { transform: none; } 30% { transform: translateX(14px) rotate(5deg); } 100% { transform: none; } }
@keyframes bannerIn { from { opacity: 0; transform: scale(1.04); } }
@keyframes sdRise { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qs.cur .qs-node, .arena .ar-banner { animation: none !important; } }

/* ───────────────────────── halls (league) ───────────────────────── */
.hall-hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; border-radius: 28px; padding: 26px 22px 20px; color: #fff;
  background: radial-gradient(120% 90% at 50% -10%, color-mix(in srgb, var(--h1) 55%, transparent) 0%, transparent 60%), linear-gradient(170deg, color-mix(in srgb, var(--h2) 70%, #15161b) 0%, color-mix(in srgb, var(--h3) 55%, #0c0d10) 100%);
  box-shadow: var(--sh-2); }
.hall-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 16px 16px; mask-image: radial-gradient(circle at 50% 20%, #000, transparent 70%); }
.hh-glow { position: absolute; z-index: -1; left: 50%; top: -60px; width: 260px; height: 260px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--h1) 60%, transparent), transparent 65%); filter: blur(6px); }
.hh-crest { display: grid; place-items: center; margin-bottom: 8px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); }
.hall-hero .eyebrow { color: rgba(255, 255, 255, .7); }
.hall-hero h2 { font-size: 24px; margin-top: 2px; }
.hh-keeper { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .88); margin-top: 4px; }
.hh-lore { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, .74); margin: 10px auto 0; max-width: 360px; }
.hh-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hh-meta span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-size: 12px; color: rgba(255, 255, 255, .9); }
.hall-ladder { position: relative; display: flex; justify-content: space-between; align-items: flex-end; margin: 18px 6px 16px; }
.hall-ladder::before { content: ''; position: absolute; left: 20px; right: 20px; top: 22px; height: 1px; background: var(--line-2); }
.hall-ladder .hstep { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); min-width: 48px; }
.hall-ladder .hstep.on { color: var(--ink); font-weight: 700; }
.hall-ladder .hstep svg { background: var(--bg); border-radius: 12px; }
.caravan .cv-name { font-size: 16px; }
.cv-goal { margin-top: 14px; display: grid; gap: 8px; }
.bar.green > i { background: var(--green); }
.portrait { position: relative; flex: none; width: var(--ps); height: var(--ps); border-radius: 50%; padding: 2px; background: var(--card-3); }
.portrait.framed { background: conic-gradient(from 210deg, var(--f1), var(--f2), var(--f3), var(--f2), var(--f1)); padding: 2.5px; }
.portrait .pt-in { display: grid; place-items: end center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 30%, var(--card), var(--card-2)); }
.portrait .pt-in > * { margin-bottom: -14%; }
.portrait .pt-in .avatar { margin: 0; width: 100%; height: 100%; }
.lb-xp small { font-size: 10.5px; margin-inline-start: 3px; }
.chronicle { display: flex; gap: 12px; align-items: flex-start; }
.chronicle p { margin: 6px 0 8px; font-size: 13.5px; line-height: 1.95; color: var(--ink-2); white-space: pre-line; }

/* the weekly hand */
.hand { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hand-slot { display: flex; flex-direction: column; align-items: stretch; gap: 7px; }
.hand-slot .wcard { pointer-events: none; }
.hand-slot.empty { align-items: center; justify-content: center; gap: 6px; aspect-ratio: 5 / 7; border-radius: 16px; border: 1.5px dashed var(--line-2); color: var(--ink-3); background: var(--card-2); }
.hs-plus { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); }
.hs-pips { display: flex; justify-content: center; gap: 3px; }
.hs-pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--card-3); }
.hs-pips i.on { background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); box-shadow: 0 0 6px color-mix(in srgb, var(--gold-2) 60%, transparent); }
.hs-pts { text-align: center; font-size: 13px; font-weight: 800; }
.hs-pts small { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.rate-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rate-row span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; }
.cards-grid.pick { padding-bottom: 80px; }
.pick-card { position: relative; border-radius: 18px; transition: transform .15s var(--ease); }
.pick-card.on { outline: 2.5px solid var(--gold-2); outline-offset: 2px; }
.pick-card.locked { opacity: 1; }
.pick-card.locked::after { content: ''; position: absolute; inset: 0; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--gold-2); pointer-events: none; }
.pc-n { position: absolute; top: -7px; left: -7px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-2); color: #20180A; font-size: 12px; font-weight: 800; box-shadow: var(--sh-1); }
.sheet-foot { position: sticky; bottom: 0; z-index: 2; margin-top: 10px; padding: 16px 0 2px; background: linear-gradient(180deg, transparent, var(--card) 16px); }

/* duel modes and the group duel podium */
.duel-make { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.duel-make .dm { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1); text-align: start; }
.duel-make .dm b { font-size: 15px; margin-top: 6px; }
.duel-make .dm:disabled { opacity: .5; }
.dr-score small { font-size: 11px; }
.gd-podium { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin-top: 14px; padding: 22px 10px 16px; border-radius: 26px; overflow: hidden; isolation: isolate; color: #fff; }
.gd-podium::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(120% 90% at 50% 0%, #6A5A2C, #1C1A14 72%); }
.gd-podium::after { content: ''; position: absolute; inset: 0; z-index: -1; background: repeating-conic-gradient(from 0deg at 50% 70%, rgba(255, 230, 170, .06) 0 8deg, transparent 8deg 16deg); }
.gd-podium .gp { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; max-width: 34%; }
.gd-podium .gp.p1 { order: 2; } .gd-podium .gp.p2 { order: 1; } .gd-podium .gp.p3 { order: 3; }
.gd-podium .nm { font-weight: 800; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-podium .sc { font-size: 20px; font-weight: 800; line-height: 1; }
.gd-podium .sc small { font-size: 11px; opacity: .7; }
.gd-podium .portrait { background: rgba(255, 255, 255, .14); }
.gd-podium .gp.p1 .portrait { background: conic-gradient(from 210deg, #FFF0C2, #D6A93A, #86600F, #D6A93A, #FFF0C2); padding: 3px; }
.lv-use { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.lv-use::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6; flex: none; }
.noir .lv-use { color: var(--noir-ink-2); }
.pl-word { position: relative; }
.pl-say { width: 34px; height: 34px; vertical-align: middle; margin-inline-start: 10px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 6px; }
.stat-row > * { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; background: none; border: 0; color: inherit; font: inherit; }
.stat-row > * + * { border-inline-start: 1px solid var(--line); }
.stat-row b { font-size: 19px; font-weight: 800; }
.stat-row span { font-size: 11.5px; color: var(--ink-3); }
.sec-link { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.medal-strip { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px 6px; }
.medal-strip::-webkit-scrollbar { display: none; }
.medal-strip .medal { flex: 0 0 76px; }
/* goal: a light card tinted with the level colour */
.goal-lite { background: radial-gradient(120% 120% at 100% 0%, var(--lc-s), transparent 60%), var(--card); }
.gl-top { display: flex; align-items: center; gap: 14px; }
.gl-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; line-height: 1.35; }
.gl-days { display: flex; flex-direction: column; align-items: center; min-width: 58px; color: var(--lc-d); }
.dark .gl-days { color: var(--lc-l); }
.gl-days b { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.gl-days span { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.goal-lite .bar { margin-top: 16px; }
.bar.lc > i { background: linear-gradient(90deg, var(--lc-l), var(--lc)); }
.gl-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: 12px; color: var(--ink-3); }
.admin-btn { width: 38px; height: 38px; }
.sets { display: grid; gap: 8px; margin-top: 12px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.set-row b { font-size: 13.5px; }
.set-row .bar { margin-top: 7px; height: 5px; }
.set-row.done { background: radial-gradient(120% 140% at 100% 0%, var(--lc-s), transparent 70%), var(--card); }

/* ── rarity, gifts ── */
.rar-tag { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border-radius: 99px; font-size: 10.5px; font-weight: 800; vertical-align: middle; background: var(--card-2); }
.rar-tag.r-rare { color: #2A5BB0; background: #E3EDFF; } .rar-tag.r-epic { color: #6531B5; background: #F0E6FF; }
.rar-tag.r-legendary { color: #8A5A0E; background: #FFF1CC; } .rar-tag.r-mythic { color: #0B6B5C; background: #D6FFF4; }
.dark .rar-tag { background: rgba(255, 255, 255, .08); } .dark .rar-tag.r-rare { color: #9DBFFF; } .dark .rar-tag.r-epic { color: #CDA8FF; } .dark .rar-tag.r-legendary { color: #F6CB55; } .dark .rar-tag.r-mythic { color: #7FF0D8; }
.w-rar { position: absolute; top: 7px; left: 7px; line-height: 0; }
.w-tile.r-rare { border-color: color-mix(in srgb, #4C86E6 28%, var(--line)); }
.w-tile.r-epic { border-color: color-mix(in srgb, #9157E3 32%, var(--line)); }
.w-tile.r-legendary { border-color: color-mix(in srgb, #D9A02E 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #FFE7A8 22%, var(--card)), var(--card)); }
.w-tile.r-mythic { border-color: color-mix(in srgb, #22B39B 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #C8FFF0 26%, var(--card)), var(--card)); }
.w-tile.on { border-color: color-mix(in srgb, var(--green) 60%, transparent); }
.gift-card { position: relative; overflow: hidden; }
.gift-glow { position: absolute; inset: -40% -20% auto; height: 70%; background: radial-gradient(closest-side, color-mix(in srgb, var(--gold-2) 30%, transparent), transparent); pointer-events: none; }
.gift-items { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.gift-it { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; padding: 10px 6px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); }
.gift-it .w-art { width: 76px; height: 64px; display: grid; place-items: center; }
.gift-it.r-legendary { border-color: #E2B04A; } .gift-it.r-mythic { border-color: #22B39B; } .gift-it.r-epic { border-color: #9157E3; }
.gift-sum { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.badge-c { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 6px 14px -8px rgba(0, 0, 0, .5); }

/* ── challenges ── */
.ch-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: right; }
.ch-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; flex: none; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--cc) 80%, #fff), var(--cc)); box-shadow: 0 8px 18px -10px var(--cc); }
.ch-ico.big { width: 52px; height: 52px; border-radius: 17px; }
.ch-card.ready, .ch-full.ready { border-color: color-mix(in srgb, var(--gold-2) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-2) 16%, transparent), var(--sh-1); }
.ch-prog { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ch-prog .bar { flex: 1; }
.ch-prog.big { margin-top: 14px; } .ch-prog.big .bar { height: 10px; }
.ch-full { margin-bottom: 12px; }
.ch-prize { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ch-pi { display: grid; place-items: center; width: 40px; height: 34px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); overflow: hidden; }
.ch-pi .item-art, .ch-pi .item-art svg { width: 34px; height: 26px; }
.ch-pi.r-legendary { border-color: #E2B04A; } .ch-pi.r-mythic { border-color: #22B39B; }

/* ── play tiles: lobby, chat ── */
.play-tile.lobby { --pt-bg: linear-gradient(150deg, #0F5E63, #0A2A33 75%); }
.play-tile.talk { --pt-bg: linear-gradient(150deg, #6A2C5E, #2A1230 75%); }
.play-tile.talk.soon { --pt-bg: linear-gradient(150deg, #4A3550, #221A28 75%); }
.play-tile.soon .pt-art { filter: saturate(.6); opacity: .85; }
.play-tile.soon .pt-badge { background: rgba(232, 196, 126, .2); color: #F1D9A6; }
.play-tile .lb-mini { display: flex; align-items: flex-end; left: 2px; bottom: -4px; }
.play-tile .lb-mini .chw { margin-left: -12px; }
.play-tile.lobby .tiny { max-width: 58%; }
.talk-head { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.talk-left { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* ── live lobby ── */
.lb-crew { display: flex; justify-content: center; align-items: flex-end; margin: 14px 0 0; }
.lb-crew-c { margin: 0 -8px; animation: pop .5s calc(var(--i) * .07s) var(--ease) both; }
.lb-join { display: flex; gap: 8px; }
.lb-code-in { flex: 1; height: 50px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--card); padding: 0 14px; font-size: 20px; letter-spacing: .3em; text-transform: uppercase; text-align: center; direction: ltr; font-weight: 800; }
.lb-codecard { text-align: center; margin-top: 12px; padding: 18px; }
.lb-code { display: flex; justify-content: center; gap: 6px; margin: 10px 0 14px; direction: ltr; width: 100%; }
.lb-code span { display: grid; place-items: center; width: 42px; height: 52px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 26px; font-weight: 800; }
.lb-room { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.lb-p { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); animation: pop .4s var(--ease) both; }
.lb-p .tiny { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-p.ghost { background: transparent; border-style: dashed; }
.lb-empty { display: grid; place-items: center; width: 66px; height: 66px; color: var(--ink-3); }
.lb-host { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); }
.lb-wait { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; color: var(--ink-2); text-align: center; }
.lb-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: lbp 1.2s ease-in-out infinite; }
.lb-pulse.big { width: 22px; height: 22px; margin-bottom: 10px; }
@keyframes lbp { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }
.lb-count { font-size: 96px; font-weight: 800; line-height: 1; animation: pop .5s var(--ease) both; margin-bottom: 8px; }
.lb-timer { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-top: 4px; }
.lb-timer i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .15s linear; margin-right: auto; }
.lb-timer.low i { background: var(--red); }
.lb-q { margin-top: 18px; }
.lb-q .opt { position: relative; overflow: hidden; }
.lb-share { position: absolute; inset: 0 0 0 auto; background: currentColor; opacity: .08; pointer-events: none; }
.lb-board { padding: 4px 14px; }
.lb-board .lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-radius: 0; }
.lb-board .lb-row.me { padding-inline: 10px; margin-inline: -10px; border-radius: 12px; }
.lb-board .lb-row + .lb-row { margin-top: 0; border-top: 1px solid var(--line); }
.lb-board .lb-row.me b { color: var(--pri); }
.lb-board .lb-rank { width: 22px; text-align: center; color: var(--ink-3); font-weight: 800; }
.lb-podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 18px 0 8px; }
.lb-pod { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100px; }
.lb-pod b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-step { width: 100%; margin-top: 6px; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 20px; color: var(--ink-3); }
.lb-pod.p1 .lb-step { height: 74px; background: linear-gradient(180deg, #FFE7A8, #E2B04A); color: #6B4710; border: 0; }
.lb-pod.p2 .lb-step { height: 54px; } .lb-pod.p3 .lb-step { height: 40px; }
.lb-mine { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.lb-rev { display: flex; align-items: center; gap: 8px; padding: 9px 0; font-size: 14px; }
.lb-rev + .lb-rev { border-top: 1px solid var(--line); }

/* ── decks ── */
.field-in { width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); padding: 10px 14px; font: inherit; color: inherit; resize: vertical; }
.field-in:focus { outline: none; border-color: var(--pri); }
.field-in.en, textarea.field-in[dir="ltr"] { font-family: var(--read); font-size: 16px; }
.fl { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin: 12px 2px 6px; }
.fl:first-child { margin-top: 0; }
.dk-form { display: flex; flex-direction: column; gap: 8px; }
.dk-form .fl { margin-bottom: 0; }
.dk-colors, .dk-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.dk-colors button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line-2); }
.dk-colors button.on { border-color: var(--card); box-shadow: 0 0 0 2px var(--ink); }
.dk-icons button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); color: var(--ink-2); }
.dk-icons button.on { background: var(--dk); color: #fff; border-color: transparent; }
.deck-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: right; }
.deck-row + .deck-row { border-top: 1px solid var(--line); }
.dk-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; flex: none; color: #fff; background: linear-gradient(160deg, color-mix(in srgb, var(--dk) 75%, #fff), var(--dk)); box-shadow: 0 6px 14px -8px var(--dk); }
.dk-ico.xl { width: 72px; height: 72px; border-radius: 22px; }
.dk-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 8px 0 14px; }
.dk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin: 4px 0 14px; width: 100%; }
.dk-stats div { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.dk-stats b { font-size: 19px; } .dk-stats span { font-size: 11.5px; color: var(--ink-3); }
.dk-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.dk-card + .dk-card { border-top: 1px solid var(--line); }
.dk-card .en { font-family: var(--read); font-weight: 400; font-size: 16.5px; display: block; text-align: right; }
.dk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.dk-dot.learning { background: var(--dk); } .dk-dot.strong { background: var(--green); }
.deck-home { display: flex; align-items: center; gap: 14px; width: 100%; text-align: right; }
.dk-stack { position: relative; width: 48px; height: 48px; flex: none; }
.dk-stack i { position: absolute; inset: 4px 6px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line-2); }
.dk-stack i:nth-child(1) { transform: rotate(-12deg) translate(-3px, 2px); }
.dk-stack i:nth-child(2) { transform: rotate(7deg) translate(3px, 1px); background: var(--gold-soft); }
.dk-stack i:nth-child(3) { display: grid; place-items: center; background: var(--pri); color: var(--pri-ink); border: 0; }
.fc { perspective: 1200px; margin: 26px 0 10px; cursor: pointer; flex: 1; min-height: 300px; display: flex; }
.fc-in { position: relative; flex: 1; transform-style: preserve-3d; transition: transform .5s var(--ease); }
.fc.flipped .fc-in { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1); text-align: center; border-top: 5px solid var(--dk); }
.fc-face.back { transform: rotateY(180deg); }
.fc-word { font-family: var(--read); font-size: 40px; line-height: 1.15; }
.fc-word.small-w { font-size: 24px; color: var(--ink-3); }
.fc-mean { font-size: 26px; font-weight: 800; line-height: 1.5; }
.fc-ex { font-family: var(--read); font-size: 16.5px; color: var(--ink-2); line-height: 1.6; max-width: 32ch; }
.fc-hint { position: absolute; bottom: 18px; }
.fc-tag { position: absolute; top: 14px; right: 14px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.fc-tag.again { background: var(--red-soft); color: var(--red); }
.fc-rates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.fr { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh-1); }
.fr b { font-size: 14.5px; } .fr span { font-size: 11px; color: var(--ink-3); }
.fr.again b { color: var(--red); } .fr.good b { color: var(--green); } .fr.easy b { color: var(--pri); }
.study-done .dk-stats { max-width: 340px; }

/* ── rooms that stay: my rooms, room settings, presence ── */
.lb-rooms { display: flex; flex-direction: column; gap: 8px; }
.lb-roomrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: right; color: var(--ink); }
.lb-roomrow b { display: block; font-size: 14.5px; }
.lb-rr-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--card-2); color: var(--ink-2); flex: none; }
.lb-rr-ico.live { background: var(--green-soft); color: var(--green); }
.lb-on-t { color: var(--green); font-weight: 700; }
.lb-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 0; }
.lb-title h2 { margin: 0; font-size: 21px; text-align: center; }
.lb-title .icon-btn { width: 32px; height: 32px; }
.lb-title-edit { display: flex; gap: 8px; margin-top: 8px; }
.lb-title-edit .field-in { flex: 1; }
.lb-set { margin-top: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.lb-set-r { display: flex; align-items: center; gap: 10px; }
.lb-set-r > .tiny { width: 46px; flex: none; }
.seg.sm { gap: 6px; flex-wrap: nowrap; flex: 1; }
.seg.sm button { flex: 1; justify-content: center; height: 36px; padding: 0 8px; border-radius: 11px; font-size: 13px; }
.lb-chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.lb-p .tiny { display: inline-flex; align-items: center; gap: 4px; }
.lb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); flex: none; }
.lb-p.on .lb-dot { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.lb-p:not(.on) .chw { opacity: .55; filter: saturate(.5); }
.lb-kick { position: absolute; top: 6px; left: 6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--card-2); border: 1px solid var(--line-2); color: var(--ink-3); }
button.lb-p.ghost { color: var(--ink-3); }
.btn.quiet.red-t { color: var(--red); }
.lb-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #5BE38F; box-shadow: 0 0 0 3px rgba(91, 227, 143, .25); animation: lbp 1.2s ease-in-out infinite; }
.play-tile.lobby.is-live { box-shadow: 0 0 0 2px rgba(91, 227, 143, .45), var(--sh-2, 0 8px 24px -12px rgba(0, 0, 0, .4)); }

/* room footer: the main action on its own line, leave/close side by side under it */
.lb-foot { flex-direction: column; align-items: stretch; gap: 6px; z-index: 5; margin: 0 -18px; padding: 22px 18px 0; background: linear-gradient(to top, var(--bg) 62%, transparent); }
.lb-foot .lb-wait { justify-content: center; }
.lb-foot > .btn { width: 100%; }
.lb-foot-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lb-foot-sub .btn, .lb-foot > .btn.quiet { white-space: nowrap; min-height: 44px; font-size: 14px; }

/* placement: intro, sentence questions, feedback, result */
.pl-intro { display: flex; flex-direction: column; flex: 1; }
.pl-intro h1 { margin-top: 4px; }
.pl-lead { margin: 10px 0 0; color: var(--ink-2); line-height: 1.85; }
.pl-how { margin-top: 16px; display: grid; gap: 2px; }
.pl-how .ob-feat { padding: 8px 0; }
.pl-tip { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 13px 15px; border-radius: 16px; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold-2) 40%, transparent); font-size: 13.5px; line-height: 1.8; color: var(--ink); }
.pl-tip .i { color: var(--gold-2); flex: none; margin-top: 3px; }
.pl-tip b { font-weight: 800; }
.pl-head { margin: 2px 0 8px; }
.pl-sent { font-family: var(--read); font-size: 21px; line-height: 1.7; direction: ltr; text-align: left; margin: 14px 0 18px; padding: 16px 18px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); }
.pl-sent mark.hw { padding: 0 3px; }
.pl-sent .gap { color: var(--ink-3); }
.pl-sent .gap.on { color: var(--green); }
.opt.dim { opacity: .55; }
.pl-fb { display: flex; gap: 12px; align-items: center; margin: 12px 0 10px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); animation: up .25s var(--ease) both; }
.pl-fb .fb-ico { width: 32px; height: 32px; }
.pl-fb.right { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); }
.pl-fb.right .fb-ico { background: var(--green); }
.pl-fb.right b { color: var(--green); }
.pl-fb.wrong .fb-ico { background: var(--ink-3); }
.pl-note { margin-top: 2px; color: var(--ink-2); }
.pl-dk { margin-top: 8px; border: 1px dashed var(--line-2); }
.pl-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; font-size: 13.5px; color: var(--ink-2); }
.pl-stats > span { display: inline-flex; align-items: center; gap: 5px; }
.pl-stats b { color: var(--ink); font-size: 16px; line-height: 1; }
.pl-nw { font-family: var(--read); font-size: 15px; direction: ltr; unicode-bidi: isolate; color: var(--ink); font-weight: 600; }
.pl-sure { display: inline-flex; align-items: center; gap: 7px; }
.pl-sure .dots { display: inline-flex; gap: 3px; }
.pl-sure .dots i { width: 14px; height: 5px; border-radius: 9px; background: var(--line-2); }
.pl-sure .dots i.on { background: var(--gold-2); }
.pl-how .ob-feat:last-child { border-bottom: 0; }

/* glossary: tap a word for its meaning */
.gl-w { cursor: pointer; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
.gl-w:active { background: var(--line); }
.gl-w.hard { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--pri) 55%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 4px; text-decoration-skip-ink: auto; }
mark.hw.gl-w { cursor: pointer; }
.gl-scrim { position: fixed; inset: 0; z-index: 60; }
.gl-pop { position: fixed; z-index: 61; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-3); animation: pageIn .18s both; direction: rtl; text-align: right; }
.gl-en { font-family: var(--read); font-size: 19px; direction: ltr; text-align: right; line-height: 1.25; color: var(--ink); }
.gl-fa { font-size: 15px; font-weight: 600; color: var(--ink); margin-top: 2px; line-height: 1.6; }
.gl-lv { font-size: 11px; color: var(--ink-3); white-space: nowrap; align-self: flex-start; }
.gl-more { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; color: var(--ink-2); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.gl-tr { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }

/* synonym stacks on the cards screen */
.stack-toggle { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 10px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1); text-align: right; transition: border-color .25s, background .25s; }
.stack-toggle b { font-size: 14px; }
.stack-toggle .tile-ico { width: 36px; height: 36px; border-radius: 12px; transition: background .25s, color .25s; }
.stack-toggle.on { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.stack-toggle.on .tile-ico { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.wstack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ws-pile { position: relative; display: block; }
.ws-pile .wcard.ws-b { position: absolute; inset: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(.96); filter: saturate(.8) brightness(.96); pointer-events: none; transition: transform .4s var(--ease); }
.dark .ws-pile .wcard.ws-b { filter: saturate(.75) brightness(.78); }
.ws-pile .wcard.ws-b .wc-sheen, .ws-pile .wcard.ws-b .wc-foil { display: none; }
.ws-pile .wcard.ws-b .wc-front > * { visibility: hidden; }
.ws-pile .wcard.ws-top { z-index: 1; }
.ws-pile .wcard.ws-top .wc-front { box-shadow: 0 14px 24px -14px rgba(0, 0, 0, .45), inset 0 0 0 3px color-mix(in srgb, var(--r1) 40%, transparent); }
.wstack:active .ws-b { transform: translate(calc(var(--tx) * 1.7), calc(var(--ty) - 3px)) rotate(calc(var(--rot) * 1.6)) scale(.96); }
.ws-n { position: absolute; z-index: 2; top: -7px; left: -7px; display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 800; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5), 0 0 0 2px var(--bg); }
.ws-label { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 2px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.ws-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-label .i { flex: none; color: var(--gold); }
.ws-open { grid-column: 1 / -1; min-width: 0; padding: 12px 12px 14px; border-radius: 22px; background: var(--card-2); border: 1px solid var(--line); }
.ws-open > .row { margin-bottom: 12px; }
.ws-open-h { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--ink-2); }
.ws-open-h b { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-open-h .i { color: var(--gold); flex: none; }
@keyframes wsDeal { from { opacity: 0; transform: translateY(-14px) rotate(-4deg) scale(.92); } }
@supports not (view-transition-name: none) { .ws-open .cards-grid .wcard { animation: wsDeal .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); } }
::view-transition-group(*) { animation-duration: .44s; animation-timing-function: cubic-bezier(.3, 1.15, .45, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.wild-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); font-size: 13px; color: var(--ink-2); }
.wild-line .i { flex: none; color: var(--green); }

/* play tiles: hands-free review and the word hunt */
.play-tile.listen { --pt-bg: radial-gradient(120% 90% at 85% 0%, #2C5A73, transparent 60%), linear-gradient(150deg, #173445, #0B1820 75%); }
.play-tile.hunt { --pt-bg: radial-gradient(120% 90% at 85% 0%, #3C6B4C, transparent 60%), linear-gradient(150deg, #1C3A28, #0C1A12 75%); }
.pt-wave { position: absolute; left: 14px; bottom: 16px; z-index: -1; display: flex; align-items: center; gap: 4px; height: 44px; }
.pt-wave i { width: 4px; height: calc(var(--h) * 1px); border-radius: 9px; background: linear-gradient(180deg, #9FD6EE, #4E95B5); opacity: .85; animation: ptWave 1.6s ease-in-out infinite; animation-delay: calc(var(--k) * -0.18s); }
@keyframes ptWave { 50% { transform: scaleY(.45); } }
.pt-hunt { position: absolute; left: 10px; bottom: 12px; z-index: -1; width: 62px; height: 58px; }
.play-tile.hunt .tiny, .play-tile.listen .tiny { max-width: 58%; }
.pt-hunt .ph-w { position: absolute; left: 0; bottom: 0; padding: 3px 8px; border-radius: 8px; font-family: var(--read); font-size: 12px; font-weight: 700; direction: ltr; color: #E9F5EC; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); white-space: nowrap; }
.pt-hunt .ph-w.hit { color: #20180A; background: linear-gradient(180deg, #EED3A0, #C99F5B); border-color: transparent; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6); }
.pt-hunt .ph-lens { position: absolute; left: 24px; top: 0; width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(233, 245, 236, .85); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .08); }
.pt-hunt .ph-lens::after { content: ''; position: absolute; width: 14px; height: 4px; border-radius: 3px; background: rgba(233, 245, 236, .85); left: -11px; bottom: -3px; transform: rotate(-45deg); }

/* hands-free review */
.ls-hero { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 24px; color: #EAF4F8; background: radial-gradient(120% 100% at 90% 0%, #2C5A73, transparent 60%), linear-gradient(150deg, #173445, #0B1820 80%); box-shadow: var(--sh-2); }
.ls-hero .small { color: rgba(234, 244, 248, .8); }
.ls-hero h2 { margin: 0 0 4px; font-size: 19px; color: #fff; }
.ls-hero .ls-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; flex: none; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #CFEAF5; }
.ls-mode-sub { margin: 8px 2px 0; }
.ls-words { display: flex; flex-wrap: wrap; gap: 6px; direction: ltr; justify-content: flex-start; }
.ls-words .chip { font-family: var(--read); font-size: 14px; }
.ls-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 340px; padding: 26px 18px 22px; border-radius: 28px; text-align: center; overflow: hidden; color: #EEF6F9; background: radial-gradient(110% 80% at 50% 0%, #2C5A73, transparent 65%), linear-gradient(170deg, #173445, #0A151C 85%); box-shadow: var(--sh-3); }
.ls-stage .ls-word { font-family: var(--read); font-size: calc(40px * var(--fit, 1)); font-weight: 700; line-height: 1.15; direction: ltr; color: #fff; letter-spacing: -.01em; }
.ls-stage .ls-ph { font-family: var(--read); font-size: 15px; direction: ltr; color: rgba(238, 246, 249, .6); }
.ls-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 150px; width: 100%; margin-top: 10px; }
.ls-cue { font-size: 13px; font-weight: 600; color: rgba(238, 246, 249, .65); }
.ls-bars { display: flex; align-items: center; gap: 5px; height: 40px; }
.ls-bars i { width: 5px; height: calc(var(--h) * 1px); border-radius: 9px; background: linear-gradient(180deg, #A9DDF2, #4E95B5); animation: ptWave 1.1s ease-in-out infinite; animation-delay: calc(var(--k) * -0.12s); }
.ls-stage:not(.on) .ls-bars i { animation-play-state: paused; }
.ls-ring { position: relative; width: 88px; height: 88px; }
.ls-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ls-ring circle { fill: none; stroke-width: 5; }
.ls-ring .bg { stroke: rgba(255, 255, 255, .12); }
.ls-ring .fg { stroke: #E2C285; stroke-linecap: round; }
.ls-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; }
.ls-mean { font-size: 24px; font-weight: 800; color: #F2DBA6; line-height: 1.5; animation: pop .35s var(--ease) both; }
.ls-ex { max-width: 34ch; font-family: var(--read); font-size: 16px; line-height: 1.55; direction: ltr; color: rgba(238, 246, 249, .9); animation: fade .5s .15s both; }
.ls-ex-fa { max-width: 36ch; font-size: 13px; line-height: 1.7; color: rgba(238, 246, 249, .6); animation: fade .5s .25s both; }
.ls-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .1); }
.ls-prog i { position: absolute; inset: 0; transform-origin: 100% 50%; transform: scaleX(0); background: linear-gradient(90deg, #E2C285, #9FD6EE); }
.ls-count { position: absolute; top: 14px; right: 16px; font-size: 12px; font-weight: 700; color: rgba(238, 246, 249, .6); }
.ls-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0 6px; direction: ltr; }
.ls-ctrl .pp { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--pri); color: var(--pri-ink); box-shadow: var(--sh-2); transition: transform .15s var(--ease); }
.ls-ctrl .pp:active { transform: scale(.94); }
.ls-ctrl .speed { min-width: 46px; height: 34px; padding: 0 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; font-weight: 800; color: var(--ink-2); font-feature-settings: 'tnum'; }
.ls-time { display: flex; justify-content: space-between; direction: ltr; font-size: 12px; color: var(--ink-3); font-feature-settings: 'tnum'; margin: 0 4px; }
.ls-queue { padding: 0; overflow: hidden; }
.ls-q { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; text-align: right; }
.ls-q + .ls-q { border-top: 1px solid var(--line); }
.ls-q .w { font-family: var(--read); font-weight: 700; font-size: 15.5px; direction: ltr; }
.ls-q .m { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-q .n { min-width: 22px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ls-q.cur { background: var(--card-2); }
.ls-q.cur .n { color: var(--gold); }
.ls-q.next .m { filter: blur(4px); user-select: none; }
.ls-send { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: right; box-shadow: var(--sh-1); }
.ls-send[disabled] { opacity: .55; }

/* word hunt */
.hn-hero { position: relative; overflow: hidden; padding: 18px; border-radius: 24px; color: #E9F5EC; background: radial-gradient(120% 100% at 90% 0%, #3C6B4C, transparent 60%), linear-gradient(150deg, #1C3A28, #0C1A12 80%); box-shadow: var(--sh-2); }
.hn-hero h2 { margin: 0 0 6px; font-size: 19px; color: #fff; }
.hn-hero .small { color: rgba(233, 245, 236, .8); }
.hn-hero .hn-stat { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hn-hero .hn-stat span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 12px; font-weight: 700; }
.hn-box { margin-top: 14px; }
.hn-box textarea { min-height: 150px; line-height: 1.6; }
.hn-meta { display: flex; justify-content: space-between; margin: 6px 4px 12px; font-size: 12px; color: var(--ink-3); }
.hn-list { padding: 4px 0; }
.hn-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: right; }
.hn-item + .hn-item { border-top: 1px solid var(--line); }
.hn-item .sn { font-family: var(--read); font-size: 14px; direction: ltr; text-align: left; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-snip { font-family: var(--read); font-size: 15px; line-height: 1.6; direction: ltr; text-align: left; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hn-known { display: flex; flex-wrap: wrap; gap: 8px; }
.hn-known button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); font-size: 13px; }
.hn-known button b { font-family: var(--read); font-size: 15px; direction: ltr; }
.hn-known button .num { font-size: 11px; color: var(--gold); font-weight: 800; }
.hn-fresh { padding: 4px 0; }
.hn-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 13px 14px; text-align: right; }
.hn-row + .hn-row { border-top: 1px solid var(--line); }
.hn-row .box { display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 8px; border: 1.5px solid var(--line-2); flex: none; color: transparent; transition: all .2s var(--ease); }
.hn-row.on .box { background: var(--green); border-color: transparent; color: #fff; }
.hn-row[disabled] { opacity: .6; }
.hn-row[disabled] .box { background: var(--card-3); border-color: transparent; color: var(--ink-3); }
.hn-row .lm { font-family: var(--read); font-weight: 700; font-size: 17px; direction: ltr; }
.hn-row .mn { font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.hn-row .sx { font-family: var(--read); font-size: 14px; line-height: 1.55; direction: ltr; text-align: left; color: var(--ink-3); margin-top: 6px; }
.hn-row .sx mark { background: none; color: var(--ink); font-weight: 700; text-decoration: underline 2px var(--gold); text-underline-offset: 3px; }
.hn-row .tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; background: var(--green-soft); color: var(--green); }
.i.spin { animation: spin .9s linear infinite; }
.ws-open .wcard .wc-word { font-size: calc(17px * var(--fit, 1)); }

/* ---------- help: the (?) next to a section and its sheet ---------- */
.sec-t { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.help-q { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -4px 0; border-radius: 50%; color: var(--ink-3); flex: none; transition: color .2s, background .2s; }
.help-q:active { background: var(--card-2); color: var(--ink); }
.help-q.inline { width: auto; height: auto; margin: 0 2px; vertical-align: -2px; display: inline-flex; }
.help-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 12px; }
.help-head h3 { margin: 0; }
.help-en { direction: ltr; text-align: right; font-size: 12.5px; color: var(--ink-3); letter-spacing: .2px; }
.help-body p { margin: 0 0 10px; font-size: 14px; line-height: 2; color: var(--ink-2); }
.help-back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px; font-size: 13px; color: var(--ink-3); }
.help-list { padding: 4px 0; }
.help-g { margin: 16px 4px 6px; font-size: 12px; font-weight: 800; color: var(--ink-3); letter-spacing: .02em; }

/* ---------- XP star ---------- */
.xp-ico { display: inline-grid; place-items: center; color: var(--gold); flex: none; }
.xp-ico svg { fill: currentColor; }
.xp-n { display: inline-flex; align-items: center; gap: 4px; }
.lb-xp { display: inline-flex; align-items: center; gap: 4px; }
.hs-pts { display: inline-flex; align-items: center; gap: 3px; }

/* ---------- me ---------- */
.profile { position: relative; }
.me-gear { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); color: var(--ink-2); }
.me-gear:active { transform: scale(.94); }
.me-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.me-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.me-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 12px 4px 10px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); text-align: center; }
.me-tile b { font-size: 12.5px; line-height: 1.35; font-weight: 700; }
.me-tile .tiny { line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 350px) { .me-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- style: light / dark ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mode-opt { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: right; transition: border-color .2s, box-shadow .2s; }
.mode-opt b { font-size: 14px; }
.mode-opt .tile-ico { width: 36px; height: 36px; }
.mode-opt.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* ---------- league: english names, caravan ranking ---------- */
.hh-help { position: absolute; top: 12px; left: 12px; }
.hh-help .help-q { color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .1); width: 32px; height: 32px; margin: 0; }
.hh-en { font-size: 13px; letter-spacing: .4px; color: rgba(255, 255, 255, .72); margin-top: 2px; direction: ltr; }
.hh-keeper .en { color: rgba(255, 255, 255, .7); font-weight: 500; }
.hall-ladder .hstep small { font-size: 9.5px; letter-spacing: .2px; opacity: .8; margin-top: -2px; }
.cv-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.cv-fa { font-size: 12.5px; color: var(--ink-3); }
.caravan .help-q { margin-inline-start: -4px; }
.cv-rank { padding: 6px; }
.cr-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 15px; }
.cr-row + .cr-row { margin-top: 2px; }
.cr-row.me { background: var(--card-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.cr-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 7px; }
.cr-name b { font-size: 14.5px; }
.cr-name .tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; background: var(--gold-soft); color: var(--gold); }
.cr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; min-width: 44px; }
.cr-side b { font-size: 14px; }
.cr-side .tiny { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); }
.cr-note { padding: 8px 10px 4px; line-height: 1.8; }

/* ---------- hunt: daily cap ---------- */
.hn-row.capped { opacity: .5; }

/* ---------- cards: tabs, dust, showcase, albums ---------- */
.cards-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.cards-tabs button { position: relative; }
.dot-n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: var(--card); font-size: 10.5px; font-weight: 800; margin-inline-start: 2px; }
.seg button.on .dot-n { background: var(--gold-3); color: #20180A; }
.dust-banner { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; text-align: right; background: linear-gradient(160deg, #F4EEE3, var(--card) 70%); }
.dust-banner b { font-size: 14px; }
.dust-banner .tile-ico { background: #EAE0CE; color: #7D6A4C; border-color: transparent; }
.dark .dust-banner { background: linear-gradient(160deg, rgba(200, 180, 140, .09), var(--card) 70%); }
.dark .dust-banner .tile-ico { background: rgba(200, 180, 140, .14); color: #CBB58E; }

/* dusty cards: a grey film and specks that a polish wipes off */
.wcard.dusty .wc-front { filter: saturate(.55) brightness(.98); }
.wcard.dusty.d2 .wc-front { filter: saturate(.25) brightness(.95) contrast(.92); }
.wcard.dusty .wc-front::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background:
    radial-gradient(circle at 18% 22%, rgba(120, 104, 80, .28) 0 1px, transparent 1.6px) 0 0 / 13px 11px,
    radial-gradient(circle at 70% 64%, rgba(120, 104, 80, .22) 0 .9px, transparent 1.5px) 0 0 / 9px 14px,
    linear-gradient(180deg, rgba(214, 204, 186, .38), rgba(190, 178, 156, .5));
  opacity: .55; }
.wcard.dusty.d2 .wc-front::after { opacity: 1; }
.dark .wcard.dusty .wc-front::after { mix-blend-mode: screen; opacity: .35; }
.dark .wcard.dusty.d2 .wc-front::after { opacity: .6; }
.wcard.dusty .wc-sheen, .wcard.dusty .wc-foil { display: none; }
.wcard.cleaned .wc-front::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .85) 48%, transparent 64%); background-size: 260% 100%; background-position: 130% 0; animation: polishSweep 1.3s .35s var(--ease) both; }
.wcard.cleaned { animation: polishGlow 1.6s .3s var(--ease) both; }
@keyframes polishSweep { to { background-position: -50% 0; } }
@keyframes polishGlow { 40% { filter: drop-shadow(0 0 16px var(--r2)); translate: 0 -6px; } }
.dust-note { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: #F4EEE3; color: #5E4F37; }
.dust-note .i { color: #8D7A5F; flex: none; }
.dust-note b { font-size: 14px; color: #3F3424; }
.dust-note .btn { flex: none; }
.dark .dust-note { background: rgba(200, 180, 140, .1); color: #D8C7A6; }
.dark .dust-note b { color: #EFE2C6; }
.dark .dust-note .i { color: #CBB58E; }

.showcase { margin: 4px 0 6px; padding: 12px; border-radius: 22px; background: var(--card-2); border: 1px solid var(--line); }
.sc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.sc-h b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.sc-h b .i { color: var(--gold); }
.sc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 5 / 7; border-radius: 16px; border: 1.5px dashed var(--line-2); color: var(--ink-3); background: transparent; }
.me-show .sc-row { padding: 2px; }
.me-show-empty { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: right; }
.me-show-empty b { font-size: 14px; }
.me-show-empty .tile-ico { color: var(--gold); }

.albums { display: flex; flex-direction: column; gap: 10px; }
.album { border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-1); overflow: hidden; }
.album.ready { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 25%, transparent), var(--sh-1); }
.album.full { background: radial-gradient(130% 120% at 100% 0%, var(--gold-soft), transparent 65%), var(--card); }
.al-main { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px 10px; text-align: right; }
.al-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--gold-soft); color: var(--gold); flex: none; }
.al-ico.lg { width: 58px; height: 58px; border-radius: 18px; }
.al-t { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 700; }
.al-t .en, .al-head .en, .pl-hall .en { font-family: var(--read); font-weight: 400; font-size: 13px; color: var(--ink-3); direction: ltr; }
.al-bar { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.al-bar .bar { flex: 1; height: 5px; }
.al-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px 11px; border-top: 1px dashed var(--line-2); }
.al-stamps { display: flex; gap: 6px; }
.stamp { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px dashed var(--line-2); color: var(--ink-3); font-size: 10px; font-weight: 800; flex: none; transition: all .3s var(--ease); }
.stamp.ready { border-color: var(--gold); color: var(--gold); animation: stampReady 1.8s ease-in-out infinite; }
.stamp.on { border: none; color: #FFF7E6; background: radial-gradient(circle at 35% 30%, #E7C27A, #B3842F 70%, #8C6420); box-shadow: inset 0 0 0 2px rgba(255, 240, 200, .45), inset 0 0 0 4px rgba(140, 100, 32, .9), 0 3px 8px -3px rgba(140, 100, 32, .6); transform: rotate(-10deg); }
.stamp.lg { width: 46px; height: 46px; font-size: 12.5px; }
@keyframes stampReady { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); } }
.al-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; }
.al-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.al-step { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 4px 10px; border-radius: 16px; background: var(--card-2); }
.al-step.on { background: var(--gold-soft); }
.al-step.ready { box-shadow: inset 0 0 0 1px var(--gold); }
.al-missing { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); color: var(--ink-2); line-height: 1.7; }
.al-missing .i { color: var(--gold); flex: none; }
.wcard.ghost { pointer-events: none; }
.wcard.ghost .wc-front { justify-content: center; border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; color: var(--ink-3); opacity: .7; }

/* card sheet: senses, synonyms, actions */
.senses { margin-top: 14px; padding: 12px 14px 6px; border-radius: 18px; background: var(--card-2); }
.sec-mini { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
.sense { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; }
.sense + .sense { border-top: 1px solid var(--line); }
.sense .si { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 7px; background: var(--card-3); font-size: 11px; font-weight: 800; color: var(--ink-3); flex: none; align-self: center; }
.sense.main .si { background: var(--gold-soft); color: var(--gold); }
.sense b { font-size: 14.5px; }
.sense .en { margin-inline-start: auto; font-size: 14px; color: var(--ink-3); direction: ltr; text-align: left; }
.syn-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.syn-line > .tiny { margin-inline-end: 2px; }
.card-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-acts .chip { cursor: pointer; }
.card-acts .chip.on { background: var(--pri); color: var(--pri-ink); border-color: transparent; }

/* polishing: the dusty cards fanned out */
.polish-row { position: relative; width: 100%; height: 156px; flex: none; }
.polish-row .wcard { --o: calc(var(--i) - (var(--n) - 1) / 2); position: absolute; top: 8px; left: 50%; width: 92px; margin-left: -46px; transform: translateX(calc(var(--o) * 52px)) translateY(calc(var(--o) * var(--o) * 5px)) rotate(calc(var(--o) * 7deg)); box-shadow: 0 16px 26px -18px rgba(0, 0, 0, .45); border-radius: 16px; }
.polish-row .wcard .wc-mean, .polish-row .wcard .wc-pos { display: none; }
.polish-row.done { margin: 6px 0 4px; }
.polish-row.done .wcard.cleaned { animation-delay: calc(.3s + var(--i) * .12s); }
.polish-row.done .wcard.cleaned .wc-front::after { animation-delay: calc(.35s + var(--i) * .12s); }

/* another learner's profile */
.pl-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 4px; }
.pl-hall { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--hc, var(--gold)); }
.pl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 14px; }
.pl-stats div { padding: 10px 4px; border-radius: 14px; background: var(--card-2); text-align: center; font-size: 11px; color: var(--ink-3); }
.pl-stats b { display: block; font-size: 16px; color: var(--ink); margin-bottom: 2px; }
.lb-row.tap { cursor: pointer; transition: background .2s var(--ease); }
.lb-row.tap:active { background: var(--card-2); }

/* ---------- synonym game ---------- */
.play-tile.syn { --pt-bg: radial-gradient(110% 90% at 85% 0%, #2E6B55, transparent 60%), linear-gradient(150deg, #1A4436, #0B1C16 75%); }
.play-tile.syn .tiny { max-width: 56%; }
.pt-syn { position: absolute; left: 12px; bottom: 14px; z-index: -1; display: flex; flex-direction: column; align-items: center; gap: 2px; direction: ltr; }
.pt-syn span { font-size: 16px; font-style: italic; padding: 3px 10px; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #E4F4EC; border: 1px solid rgba(255, 255, 255, .14); }
.pt-syn span:first-child { transform: rotate(-5deg) translateX(-6px); }
.pt-syn span:last-child { transform: rotate(4deg) translateX(6px); }
.pt-syn i { font-style: normal; font-weight: 800; color: #E8CB8C; line-height: 1; }
.en-sub { font-family: var(--read); font-style: italic; font-size: 15px; color: var(--ink-3); direction: ltr; }
.syn-hero { position: relative; width: 250px; height: 136px; flex: none; }
.sh-w { position: absolute; padding: 7px 15px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh-2); font-size: 22px; color: var(--ink); animation: shFloat 4s ease-in-out infinite; }
.sh-w.a { left: 6px; top: 18px; --r: -6deg; }
.sh-w.b { right: 4px; top: 8px; --r: 5deg; animation-delay: -1s; border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.sh-w.c { right: 34px; bottom: 4px; --r: -3deg; animation-delay: -2s; border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.sh-w.x { left: 28px; bottom: 0; --r: 5deg; animation-delay: -3s; color: var(--ink-3); background: var(--card-2); border-style: dashed; text-decoration: line-through; text-decoration-color: var(--red); box-shadow: none; }
.sh-eq { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 36px; height: 36px; margin: -24px 0 0 -18px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-size: 20px; font-weight: 800; }
@keyframes shFloat { 0%, 100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(var(--r)) translateY(-5px); } }
.syn-how { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.syn-how > div { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: right; }
.syn-how b { font-size: 14px; }
.syn-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -6px 0 18px; }
.syn-score { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); font-weight: 800; font-size: 14px; }
.syn-clock { position: relative; flex: 0 1 140px; height: 6px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.syn-clock i { position: absolute; top: 0; bottom: 0; right: 0; width: calc(var(--f) * 100%); border-radius: inherit; background: color-mix(in srgb, var(--gold-2) calc(var(--f) * 100%), var(--red)); }
.q-kicker.syn-k .i { color: var(--green); }
.q-kicker.syn-k.odd .i { color: var(--red); }
.opt .opt-gl { display: block; margin-top: 2px; font-family: 'Vazirmatn', system-ui, sans-serif; font-size: 12px; font-weight: 500; color: var(--ink-3); direction: rtl; text-align: left; }
.opt.right .opt-gl, .opt.wrong .opt-gl { color: inherit; opacity: .8; }
.syn-result { display: flex; flex-direction: column; align-items: center; padding: 26px 0 6px; text-align: center; }
.sr-score { font-family: var(--display); font-size: 68px; line-height: 1; color: var(--ink); }
.syn-review { padding: 6px 10px; }
.sv-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; }
.sv-row + .sv-row { border-top: 1px solid var(--line); }
.sv-row .read { font-size: 15px; }
.sv-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; }
.sv-row.ok .sv-ic { background: var(--green-soft); color: var(--green); }
.sv-row.no .sv-ic { background: var(--red-soft); color: var(--red); }

/* ---------- duel card powers ---------- */
.power-bar { --pc: #9AA3B2; position: fixed; z-index: 15; left: 12px; right: 12px; bottom: calc(14px + var(--safe-b)); max-width: 540px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 20px; background: var(--card); border: 1px solid color-mix(in srgb, var(--pc) 55%, var(--line)); box-shadow: var(--sh-3); animation: up .3s var(--ease) both; }
.power-bar b { font-size: 15px; }
.power-bar .tiny { color: var(--ink-2); }
.power-bar.r-rare { --pc: #4C86E6; } .power-bar.r-epic { --pc: #9157E3; } .power-bar.r-legendary { --pc: #D9A02E; }
.power-bar.fired { animation: powerFire .8s var(--ease); }
@keyframes powerFire { 30% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--pc) 30%, transparent), var(--sh-3); transform: translateY(-4px); } }
.power-bar .chip { cursor: pointer; flex: none; }
.power-bar .chip:disabled { opacity: .5; cursor: default; }
.opt.cut { opacity: .28; filter: grayscale(1); box-shadow: none; text-decoration: line-through; transform: scale(.98); }
.opt.cut .lbl { text-decoration: line-through; }
.power-pick { padding-bottom: 24px; }
.pp-list { display: flex; flex-direction: column; gap: 10px; }
.pp-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-align: right; transition: all .2s var(--ease); box-shadow: var(--sh-1); }
.pp-card .wcard { width: 64px; flex: none; pointer-events: none; }
.pp-card .wcard .wc-mean, .pp-card .wcard .wc-pos, .pp-card .wcard .wc-tier, .pp-card .wcard .wc-lv { display: none; }
.pp-card .wcard .wc-word { font-size: calc(13px * var(--fit, 1)); }
.pp-card .wcard .wc-rar { font-size: 8px; }
.pp-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pp-pw { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 14.5px; }
.pp-pw .i { color: var(--gold); }
.pw-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: 12.5px; margin-top: 2px; }

/* ---------- first-visit tour ---------- */
.tour { position: fixed; inset: 0; z-index: 70; }
.tour-veil { position: absolute; inset: 0; background: rgba(8, 8, 12, .62); animation: fadeIn .3s both; }
.tour-hole { position: absolute; border-radius: 20px; box-shadow: 0 0 0 9999px rgba(8, 8, 12, .62); outline: 2px solid rgba(232, 203, 140, .85); outline-offset: 0; transition: all .35s var(--ease); pointer-events: none; }
.tour-tip { position: absolute; left: 14px; right: 14px; max-width: 440px; margin: 0 auto; padding: 14px 16px 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-3); animation: pageIn .3s var(--ease) both; }
.tour-tip p { margin: 4px 0 14px; font-size: 13.5px; line-height: 1.85; color: var(--ink-2); }
.tour-dots { display: flex; gap: 4px; direction: ltr; }
.tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--card-3); transition: all .3s var(--ease); }
.tour-dots i.done { background: var(--gold-2); }
.tour-dots i.on { width: 18px; background: var(--ink); }
.tour-skip { font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 6px 2px; }
.tt-head { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tt-head b { font-size: 17px; font-weight: 800; }
.tour-tip .btn.sm { flex: 1; }
@keyframes fadeIn { from { opacity: 0; } }
.al-step.on .stamp { border: none; color: #FFF7E6; background: radial-gradient(circle at 35% 30%, #E7C27A, #B3842F 70%, #8C6420); box-shadow: inset 0 0 0 2px rgba(255, 240, 200, .45), inset 0 0 0 4px rgba(140, 100, 32, .9), 0 3px 8px -3px rgba(140, 100, 32, .6); transform: rotate(-10deg); }
.al-step.ready .stamp { border-color: var(--gold); color: var(--gold); animation: stampReady 1.8s ease-in-out infinite; }

/* «اشتباه نگیری با»: a lookalike word next to this one (quite ≠ quiet), the letters that differ lit in gold */
.confuse { margin-top: 14px; padding: 12px 14px; border-radius: 18px; background: color-mix(in srgb, var(--gold-soft) 70%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold-2) 22%, transparent); text-align: right; }
.confuse-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.confuse-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; }
.confuse-row + .confuse-row { border-top: 1px dashed color-mix(in srgb, var(--gold-2) 25%, transparent); }
.confuse-pair { display: flex; align-items: baseline; gap: 8px; font-size: 19px; white-space: nowrap; }
.confuse-pair .cf-me { color: var(--ink-3); font-size: 15px; }
.confuse-pair .cf-ne { color: var(--gold-2); font-size: 15px; font-family: var(--font); }
.confuse-pair .cf-other { color: var(--ink); font-weight: 600; }
.confuse-pair em { font-style: normal; color: var(--gold); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--gold-2) 70%, transparent); }
.confuse-fa { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; min-width: 0; text-align: left; }
.confuse-fa b { font-size: 14px; }

/* waiting for the server anywhere in the app: the breathing mark on a page, three soft dots inside a card or sheet */
.page.full.ld-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 40px); min-height: calc(100dvh - 40px); padding-bottom: 8vh; }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; animation: splIn .4s var(--ease, ease-out) both; }
.loading .ld-t { font-size: 13px; color: var(--ink-3); max-width: 260px; line-height: 1.7; }
.loading .splash-bar { margin-top: 2px; }
.splash-mark.sm { width: 46px; height: 46px; margin-bottom: 4px; }
.splash-mark.sm::before { inset: -16px; }
.loading.in { width: 100%; padding: 22px 12px; border-radius: 22px; background: var(--card-2); border: 1px dashed var(--line-2); gap: 10px; }
.loading.fill { height: 100%; border-radius: 0; border: 0; }
.ld-dots { display: inline-flex; gap: 6px; direction: ltr; }
.ld-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); opacity: .35; animation: ldDot 1.1s ease-in-out infinite; }
.ld-dots i:nth-child(2) { animation-delay: .15s; }
.ld-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ldDot { 0%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

/* parts of speech: English · Persian, one tone per family */
.pos-tag { --pt: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--pt); background: color-mix(in srgb, var(--pt) 11%, transparent); border: 1px solid color-mix(in srgb, var(--pt) 22%, transparent); vertical-align: middle; }
.pos-tag .pe { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 13px; direction: ltr; letter-spacing: .01em; }
.pos-tag .pe + .pfa::before { content: ''; display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; margin-inline-end: 5px; vertical-align: middle; }
.pos-tag.sm { height: 20px; padding: 0 7px; font-size: 11px; gap: 4px; }
.pos-tag.sm .pe { font-size: 12px; }
.pos-tag.pf-noun { --pt: var(--blue); }
.pos-tag.pf-verb { --pt: var(--green); }
.pos-tag.pf-adjective { --pt: var(--gold); }
.pos-tag.pf-adverb { --pt: #9b6ee0; }
.pos-tag.pf-phrase { --pt: #d0679a; }
.pos-tag.pf-link, .pos-tag.pf-det { --pt: #3aa6a0; }
.q-kicker .q-pos { margin-inline-start: 2px; display: inline-flex; }
.word-row .pos-tag { flex-shrink: 0; }
.gl-en .pos-tag { margin-inline-start: 6px; transform: translateY(-2px); }

/* Konkur: the school books */
.k-hero { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 24px; color: #F6EEDC; background: radial-gradient(120% 100% at 90% 0%, #6B5420, transparent 62%), linear-gradient(150deg, #2A2214, #14100A 80%); box-shadow: var(--sh-2); }
.k-hero h2 { margin: 0 0 4px; font-size: 18px; color: #fff; line-height: 1.5; }
.k-hero .small { color: rgba(246, 238, 220, .8); line-height: 1.8; }
.k-hero-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; flex: none; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); color: var(--gold-3); }
.k-setup .sec { justify-content: flex-start; gap: 8px; align-items: center; }
.k-step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; background: var(--gold-soft); color: var(--gold); }
.k-grades { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.k-grade { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); text-align: right; transition: border-color .2s, background .2s, transform .15s; }
.k-grade b { font-size: 17px; }
.k-grade span { font-size: 12px; color: var(--ink-3); font-family: var(--display); }
.k-grade.on { border-color: var(--gold-2); background: linear-gradient(180deg, var(--gold-soft), var(--card) 80%); }
.k-grade.on b { color: var(--gold); }
.k-books { display: flex; flex-direction: column; gap: 10px; }
.k-book { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); text-align: right; transition: border-color .2s, background .2s; }
.k-book.on { border-color: color-mix(in srgb, var(--gold-2) 70%, transparent); }
.k-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-2); flex: none; color: #fff; transition: background .2s, border-color .2s; }
.k-book.on .k-check { background: var(--gold); border-color: var(--gold); }
.k-rank { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line); font-size: 12px; font-weight: 800; color: var(--ink-2); flex: none; }
.k-paces { padding: 4px 0; }
.k-pace { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: right; transition: background .2s; }
.k-pace:last-child { border-bottom: 0; }
.k-pace .kp-n { font-size: 18px; font-weight: 800; min-width: 26px; }
.k-pace .kp-l { font-size: 12.5px; color: var(--ink-3); }
.k-pace .kp-d { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.k-pace .kp-m { font-size: 12px; color: var(--ink-3); min-width: 64px; text-align: left; }
.k-pace.on { background: var(--gold-soft); }
.k-pace.on .kp-n, .k-pace.on .kp-d { color: var(--gold); }
.k-est { margin-top: 12px; border-color: color-mix(in srgb, var(--gold-2) 40%, transparent); background: linear-gradient(180deg, var(--gold-soft), var(--card) 75%); }
.k-est-big { font-size: 26px; font-weight: 800; margin: 4px 0 6px; }
.k-est-big small { font-size: 15px; font-weight: 700; color: var(--gold); margin-inline-start: 4px; }
.k-est .small { line-height: 1.9; }
.k-switch { flex: none; }
.k-today .k-dots i.on { background: var(--gold); }
.k-books-card, .k-back, .k-entry { display: block; width: 100%; text-align: right; }
.k-back, .k-entry { display: flex; align-items: center; gap: 14px; }
.k-entry { border-color: color-mix(in srgb, var(--gold-2) 35%, transparent); }
.k-bk { margin-top: 10px; }
.k-bk .bar { margin-top: 6px; }
.k-back { margin-top: 12px; }
.k-plan .k-pbook { margin-bottom: 12px; }
.k-pbook.off { opacity: .62; }
.k-lessons { display: flex; flex-direction: column; margin-top: 8px; }
.k-lesson { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 2px; border-top: 1px solid var(--line); text-align: right; font-weight: 600; }
.k-ln { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); flex: none; }
.k-ln.part { border-color: color-mix(in srgb, var(--gold-2) 60%, transparent); color: var(--gold); }
.k-ln.full { background: var(--gold); border-color: var(--gold); color: #fff; }
.k-words { max-height: 56vh; overflow: auto; margin: 6px 0 12px; overscroll-behavior: contain; }
.k-wrow { align-items: flex-start; }
.k-wrow .k-ex { margin-top: 3px; direction: ltr; text-align: right; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.k-wr { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; max-width: 46%; }
.k-wr .w { font-size: 19px !important; }
.k-done { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; }
