/* لفّ ليبيا مع بيلا — game app. One committed look (Bella red, wheat gold, sugar), light only. */
:root {
  --red: #b3242f; --red-deep: #861b24; --red-hot: #e3051b;
  --gold: #c9a25a; --gold-soft: #ecd9ae; --sugar: #fff7f2; --cream: #fbeae0; --milk: #fff;
  --ink: #2a1610; --ink-soft: #6e4b40; --line: rgba(43, 18, 14, .12); --ok: #2f7a45; --warn: #9a5b00;
  --f-display: "Baloo Bhaijaan 2", "Readex Pro", "Segoe UI", sans-serif;
  --f-body: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --r: 20px; --r-s: 12px;
  --gl: max(16px, env(safe-area-inset-left, 0px)); --gr: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root:lang(ar) { --f-display: "Tajawal", "Baloo Bhaijaan 2", sans-serif; --f-body: "Tajawal", "Segoe UI", Tahoma, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.play { background: var(--sugar); color: var(--ink); font: 500 1.0625rem/1.55 var(--f-body); -webkit-tap-highlight-color: transparent; }
:root:lang(ar) body.play { font-size: 1.125rem; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.app { min-height: 100dvh; }
.loading { display: grid; place-items: center; min-height: 100dvh; padding: 24px; font-family: var(--f-display); font-size: 1.4rem; color: var(--red); text-align: center; }
.muted { color: var(--ink-soft); }
.small { font-size: .88em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: .55em 1.35em; border: 0; border-radius: 999px; font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s; }
.btn:active { transform: translateY(2px); }
.btn--play { background: var(--red); color: var(--milk); box-shadow: 0 5px 0 var(--red-deep), 0 12px 24px -10px rgba(134, 27, 36, .6); }
.btn--play:hover { background: #c32a36; }
.btn--gold { background: var(--gold); color: #3a2208; box-shadow: 0 5px 0 #9c7a38; }
.btn--ghost { background: var(--milk); color: var(--red-deep); box-shadow: inset 0 0 0 2px rgba(179, 36, 47, .25); }
.btn--s { min-height: 40px; padding: .35em 1em; font-size: .95rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.chip { display: inline-flex; align-items: center; min-height: 38px; padding: .2em .9em; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .85); box-shadow: inset 0 0 0 1.5px var(--line); font-size: .92rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.chip[aria-pressed="false"] { opacity: .75; }
.chip--gold { background: var(--gold-soft); }
.icon-btn { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 800; }
.link { background: none; border: 0; padding: 0; color: var(--red); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pill { display: inline-flex; align-items: baseline; gap: 2px; padding: .3em .9em; border-radius: 999px; border: 0; background: var(--ink); color: var(--gold-soft); font-family: var(--f-display); }
.pill b { font-size: 1.15rem; color: var(--milk); }
.note { padding: .7em 1em; border-radius: var(--r-s); background: var(--cream); color: var(--ink); font-size: .95rem; }
.note--ok { background: #e7f3ea; }
.note--warn { background: #fdf0d8; color: #5d3800; }
.count b { font-family: var(--f-display); font-size: 1.15em; color: var(--red); }

/* Top bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px var(--gr) 10px var(--gl); background: rgba(255, 247, 242, .92); backdrop-filter: blur(8px); border-block-end: 1px solid var(--line); }
.bar__title { font-size: 1.25rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__side { display: flex; align-items: center; gap: 8px; }
.bar__side--end { justify-content: flex-end; flex-wrap: wrap; }
.bar--menu { grid-template-columns: auto 1fr; background: transparent; border: 0; backdrop-filter: none; position: relative; }
.bar__logo img { display: block; inline-size: 96px; block-size: auto; }
.langs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .7); }
.langs a { padding: .25em .7em; border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 600; }
.langs a[aria-current] { background: var(--red); color: var(--milk); }

/* Menu */
.menu { min-height: 100dvh; display: flex; flex-direction: column; background:
  radial-gradient(120% 80% at 80% 0%, #fde6c6 0%, rgba(253, 230, 198, 0) 60%),
  linear-gradient(180deg, #ffe9d6 0%, var(--sugar) 55%, #f6dccb 100%); overflow: hidden; }
.menu__stage { flex: 1; display: grid; gap: 24px; align-items: center; padding: 8px var(--gr) 24px var(--gl); max-inline-size: 1240px; margin-inline: auto; inline-size: 100%; }
.menu__copy { position: relative; z-index: 1; display: grid; gap: 14px; justify-items: start; min-width: 0; }
.menu__title { font-size: clamp(2.6rem, 1.6rem + 5vw, 5.2rem); font-weight: 800; color: var(--red); letter-spacing: -.01em; }
:root:lang(ar) .menu__title { letter-spacing: 0; }
.menu__flag { font-size: .55em; vertical-align: .35em; }
.menu__tag { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.3rem, 1rem + 1.4vw, 2rem); color: var(--ink); }
.menu__intro { max-inline-size: 34ch; color: var(--ink-soft); font-size: 1.1rem; }
.menu__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-block: 6px; }
.menu__cta .btn--play { font-size: 1.3rem; min-height: 58px; padding-inline: 2em; }
.menu__art { position: relative; min-width: 0; }
.menu__art .libya-map { inline-size: 100%; block-size: auto; opacity: .95; }
.family { position: absolute; inset-inline: 4%; bottom: -2%; display: flex; justify-content: center; align-items: flex-end; gap: 0; pointer-events: none; }
.family__m { inline-size: 19%; block-size: auto; margin-inline: -1.5%; filter: drop-shadow(0 10px 10px rgba(80, 30, 10, .25)); animation: hop .7s var(--ease) both; animation-delay: calc(.25s + var(--i) * .12s); }
@keyframes hop { from { transform: translateY(40%) scale(.9); opacity: 0; } 60% { transform: translateY(-8%); opacity: 1; } to { transform: none; opacity: 1; } }
.menu__foot { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; padding: 14px var(--gr) calc(14px + env(safe-area-inset-bottom, 0px)) var(--gl); font-size: .92rem; color: var(--ink-soft); }
.menu__foot a { text-decoration: none; }
.menu__foot .link { color: var(--ink-soft); font-weight: 600; }
.menu__foot .link[aria-pressed="true"] { color: var(--red); }
@media (min-width: 900px) { .menu__stage { grid-template-columns: 1fr 1.05fr; } }

/* Libya map */
.libya-map { display: block; overflow: hidden; }
.lm__nb { fill: #f1e2d6; stroke: #e2cdbd; stroke-width: 1; }
.lm__land { fill: #f3c98f; stroke: #d29a5b; stroke-width: 2; stroke-linejoin: round; }
.lm__route { fill: none; stroke: var(--red); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; opacity: .55; }
.lm__route.is-done { stroke-dasharray: none; opacity: 1; stroke-width: 4; }
.lm__pin circle { fill: var(--milk); stroke: var(--red); stroke-width: 3; }
.lm__pin .lm__ring { fill: rgba(179, 36, 47, .12); stroke: none; }
.lm__pin.is-done circle:not(.lm__ring) { fill: var(--red); }
.lm__pin.is-locked circle:not(.lm__ring) { fill: #eadfd7; stroke: #a8968a; }
.lm__pin.is-locked .lm__ring { fill: none; }
.lm__n { font: 800 14px var(--f-display); fill: var(--red); pointer-events: none; }
.lm__pin.is-done .lm__n { fill: var(--milk); }
.lm__pin.is-locked .lm__n { fill: #8a786c; }
.lm__label { font: 800 17px var(--f-display); fill: var(--ink); paint-order: stroke; stroke: rgba(255, 247, 242, .9); stroke-width: 5px; pointer-events: none; }
.lm__pin.is-locked .lm__label { fill: #8a786c; }
.lm__pin[role="button"] { cursor: pointer; }
.lm__pin[role="button"]:focus-visible { outline: none; }
.lm__pin[role="button"]:focus-visible circle:not(.lm__ring) { stroke: var(--gold); stroke-width: 5; }
.lm__pin.is-next .lm__ring { animation: ping 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { from { transform: scale(.8); opacity: 1; } to { transform: scale(2.1); opacity: 0; } }

/* Map screen */
.map { min-height: 100dvh; background: linear-gradient(180deg, #fde9d6, var(--sugar)); }
.map__body { display: grid; gap: 18px; padding: 16px var(--gr) 32px var(--gl); max-inline-size: 1240px; margin-inline: auto; }
.map__art { min-width: 0; }
.map__art .libya-map { inline-size: 100%; block-size: auto; max-block-size: 70vh; }
.map__side { display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (min-width: 900px) { .map__body { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stop { inline-size: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-s); border: 0; background: var(--milk); box-shadow: inset 0 0 0 1.5px var(--line); text-align: start; }
.stop__n { display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: var(--cream); color: var(--red); font: 800 1.1rem var(--f-display); }
.stop.is-done .stop__n { background: var(--red); color: var(--milk); }
.stop.is-locked { opacity: .62; }
.stop__txt { display: grid; min-width: 0; }
.stop__txt b { font-family: var(--f-display); font-size: 1.15rem; }
.stop__txt small { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop__st { font-family: var(--f-display); font-weight: 800; color: var(--red); }
.stop__st small { color: var(--ink-soft); font-weight: 600; }
.stops--compact .stop { padding: 6px 10px; grid-template-columns: 36px 1fr; }
.stops--compact .stop__n { inline-size: 32px; block-size: 32px; font-size: .95rem; }

/* Sheets */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; background: rgba(42, 22, 16, .55); animation: fade .2s; }
@media (min-width: 700px) { .sheet { align-items: center; padding: 24px; } }
.sheet__card { inline-size: min(560px, 100%); max-block-size: 92dvh; overflow: auto; overscroll-behavior: contain; background: var(--sugar); border-radius: var(--r) var(--r) 0 0; padding: 0 var(--gr) calc(22px + env(safe-area-inset-bottom, 0px)) var(--gl); animation: rise .28s var(--ease); }
.sheet__card.is-wide { inline-size: min(760px, 100%); }
@media (min-width: 700px) { .sheet__card { border-radius: var(--r); padding-inline: 26px; } }
.sheet__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px 10px; background: var(--sugar); }
.sheet__head h2 { font-size: 1.5rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.city { display: grid; gap: 14px; }
.city > canvas { inline-size: 100%; block-size: auto; aspect-ratio: 560 / 200; border-radius: var(--r-s); }
.city__lm { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; }
.city__h { font-size: 1.2rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts canvas { flex: none; }
.facts__card, .facts__best { flex: none; display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 8px; background: var(--gold-soft); color: var(--red); font-weight: 800; }
.facts--row { grid-template-columns: 1fr; text-align: start; }
.heroes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.hero-opt input { position: absolute; opacity: 0; pointer-events: none; }
.hero-opt__card { display: grid; justify-items: center; gap: 2px; padding: 10px 8px; border-radius: var(--r-s); background: var(--milk); box-shadow: inset 0 0 0 2px var(--line); text-align: center; cursor: pointer; block-size: 100%; }
.hero-opt__card .hero-img { block-size: 84px; inline-size: auto; object-fit: contain; }
.hero-opt__card b { font-family: var(--f-display); }
.hero-opt__card small { font-size: .82rem; color: var(--ink-soft); line-height: 1.3; }
.hero-opt input:checked + .hero-opt__card { box-shadow: inset 0 0 0 3px var(--red); background: #fff1ec; }
.hero-opt input:focus-visible + .hero-opt__card { outline: 3px solid var(--gold); }
.hero-img.is-xs { block-size: 30px; inline-size: auto; }
.how { display: grid; gap: 14px; }
.how__list { margin: 0; padding-inline-start: 1.3em; display: grid; gap: 8px; }
.how__icons { display: flex; flex-wrap: wrap; gap: 6px; }

/* Game */
.game { position: fixed; inset: 0; overflow: hidden; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; }
.game__cv { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; display: block; }
.hud { position: absolute; z-index: 2; inset-block-start: calc(8px + env(safe-area-inset-top, 0px)); inset-inline: var(--gl) var(--gr); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; pointer-events: none; direction: ltr; }
.hud > * { pointer-events: auto; }
.hud__it, .hud__hearts { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(255, 247, 242, .9); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); font-family: var(--f-display); font-weight: 800; }
.hud__it small { color: var(--ink-soft); font-weight: 700; }
.hud__hearts { padding: 6px 10px; gap: 5px; }
.hud__hearts i { inline-size: 20px; block-size: 18px; background: #cdbdb2; clip-path: path("M10 18 L1.6 9.6 A4.8 4.8 0 0 1 10 3.2 A4.8 4.8 0 0 1 18.4 9.6 Z"); }
.hud__hearts i.is-on { background: var(--red-hot); }
.hud__time { min-inline-size: 3.2ch; font-variant-numeric: tabular-nums; }
.hud { padding-inline-end: 54px; }
.hud__pause { position: absolute; inset-inline-end: 0; inset-block-start: 0; font-family: var(--f-display); }
@media (max-width: 520px) { .hud { gap: 5px; } .hud__it { padding: 2px 9px 2px 4px; font-size: .92rem; } .hud__hearts { padding: 5px 8px; } .hud__hearts i { inline-size: 16px; block-size: 15px; clip-path: path("M8 15 L1.3 8 A3.9 3.9 0 0 1 8 2.6 A3.9 3.9 0 0 1 14.7 8 Z"); } }
.pad { position: absolute; z-index: 2; inset-inline: 0; inset-block-end: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 var(--gr) calc(14px + env(safe-area-inset-bottom, 0px)) var(--gl); pointer-events: none; direction: ltr; }
.pad > * { pointer-events: auto; }
.pad__move { display: flex; inline-size: min(240px, 46vw); block-size: 92px; border-radius: 46px; background: rgba(255, 247, 242, .3); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); touch-action: none; }
.pad__move span { flex: 1; display: grid; place-items: center; color: #fff; font-size: 1.7rem; text-shadow: 0 2px 4px rgba(0, 0, 0, .4); border-radius: 46px; }
.pad__move[data-dir="l"] .pad__l, .pad__move[data-dir="r"] .pad__r { background: rgba(255, 255, 255, .35); }
.pad__acts { display: flex; gap: 12px; align-items: flex-end; }
.pad__btn { display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; font: 800 1rem var(--f-display); touch-action: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.pad__jump { inline-size: 92px; block-size: 92px; background: rgba(179, 36, 47, .82); box-shadow: 0 5px 0 rgba(134, 27, 36, .9); }
.pad__act { inline-size: 70px; block-size: 70px; background: rgba(201, 162, 90, .9); box-shadow: 0 4px 0 #8c6a2c; }
.pad__btn.is-down { transform: translateY(3px); box-shadow: none; }
@media (pointer: fine) { .pad { display: none; } }
.rotate { position: absolute; z-index: 2; inset-inline: 0; inset-block-start: calc(64px + env(safe-area-inset-top, 0px)); margin-inline: auto; inline-size: max-content; max-inline-size: calc(100% - 32px); padding: 6px 14px; border-radius: 999px; background: rgba(42, 22, 16, .75); color: #fff; font-size: .9rem; text-align: center; }
@media (orientation: landscape) { .rotate { display: none; } }
.game__over:not(:empty) { position: absolute; z-index: 3; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(42, 22, 16, .35); }
.panel { display: grid; gap: 12px; justify-items: center; inline-size: min(440px, 100%); max-block-size: calc(100dvh - 32px); overflow: auto; padding: 24px; border-radius: var(--r); background: var(--sugar); text-align: center; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); animation: rise .3s var(--ease); }
.panel h2 { font-size: 2.2rem; color: var(--red); }
.panel__kicker { font-family: var(--f-display); font-weight: 800; color: var(--gold); }
.panel .btn { inline-size: 100%; }
.panel .facts li { justify-content: flex-start; text-align: start; }

/* Result */
.result { min-height: 100dvh; display: grid; place-items: start center; padding: 18px var(--gr) 32px var(--gl); background: linear-gradient(180deg, #fde3c9, var(--sugar) 40%); }
.res { inline-size: min(640px, 100%); display: grid; gap: 14px; }
.res__head { position: relative; }
.res__head canvas { inline-size: 100%; block-size: auto; aspect-ratio: 640 / 180; border-radius: var(--r); display: block; }
.res__hero { position: absolute; inset-inline-end: 6%; bottom: -14px; block-size: 70%; inline-size: auto; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .25)); animation: hop .6s var(--ease) both .2s; }
.res__hero.is-sad { transform: rotate(-8deg); animation: none; }
.res__title { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); color: var(--red); outline: none; }
.res__rows { margin: 0; display: grid; gap: 2px; }
.res__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-block-end: 1px dashed var(--line); }
.res__row dt { color: var(--ink-soft); }
.res__row dd { margin: 0; font-family: var(--f-display); font-weight: 800; }
.res__total { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-display); }
.res__total span { font-weight: 800; font-size: 1.2rem; }
.res__total-n { font-size: clamp(3rem, 2rem + 4vw, 4.6rem); color: var(--red); line-height: 1; font-variant-numeric: tabular-nums; }
.res__total small { color: var(--ink-soft); font-size: 1.1rem; }
.res__status { padding: .6em 1em; border-radius: var(--r-s); background: var(--cream); }
.res__status.is-ok { background: #e7f3ea; color: #1f4f2d; }
.res__status.is-warn { background: #fdf0d8; color: #5d3800; }
.res__best { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; }
.res__extra { display: grid; gap: 8px; justify-items: start; }
.res__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.secret { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--milk); box-shadow: inset 0 0 0 2px var(--gold-soft); }
.secret img { inline-size: 92px; block-size: 92px; object-fit: contain; flex: none; }
.secret b { font-family: var(--f-display); color: var(--red); font-size: 1.15rem; }
.badge-line { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.badge-dot { display: grid; place-items: center; inline-size: 26px; block-size: 26px; border-radius: 50%; background: var(--gold); color: #3a2208; }

/* Dashboard */
.dash { min-height: 100dvh; background: var(--sugar); }
.dash__tabs { position: sticky; top: calc(65px + env(safe-area-inset-top, 0px)); z-index: 4; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px var(--gr) 8px var(--gl); background: var(--sugar); border-block-end: 1px solid var(--line); }
.dash__tabs::-webkit-scrollbar { display: none; }
.dash__tab { flex: none; padding: .45em 1em; border-radius: 999px; border: 0; background: transparent; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.dash__tab[aria-selected="true"] { background: var(--red); color: var(--milk); }
.dash__panel { max-inline-size: 1000px; margin-inline: auto; padding: 18px var(--gr) 40px var(--gl); outline: none; }
.tab { display: grid; gap: 16px; }
.tab h3 { font-size: 1.25rem; margin-block-start: 6px; }
.journey { display: grid; gap: 18px; }
.journey__map .libya-map { inline-size: 100%; block-size: auto; }
@media (min-width: 820px) { .journey { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.kpi { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--r-s); background: var(--milk); box-shadow: inset 0 0 0 1.5px var(--line); }
.kpi b { font: 800 2rem/1 var(--f-display); color: var(--red); }
.kpi span { font-weight: 700; }
.kpi small { color: var(--ink-soft); }
.meter { position: relative; block-size: 16px; margin-block: 10px 30px; border-radius: 999px; background: var(--cream); }
.meter__fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--red)); }
:root[dir="rtl"] .meter__fill { background: linear-gradient(270deg, var(--gold), var(--red)); }
.meter__mark { position: absolute; inset-block-start: -4px; block-size: 24px; inline-size: 3px; background: var(--ink-soft); translate: -50% 0; }
:root[dir="rtl"] .meter__mark { translate: 50% 0; }
.meter__mark small { position: absolute; inset-block-start: 26px; translate: -50% 0; white-space: nowrap; font-size: .78rem; color: var(--ink-soft); }
.meter__mark.is-on { background: var(--red); }
.tablewrap { overflow-x: auto; }
.tbl { inline-size: 100%; border-collapse: collapse; font-size: .96rem; }
.tbl th, .tbl td { padding: 8px 10px; text-align: start; border-block-end: 1px solid var(--line); white-space: nowrap; }
.tbl thead th { color: var(--ink-soft); font-weight: 700; font-size: .88rem; }
.tbl tbody th { font-family: var(--f-display); }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--cream); justify-self: start; }
.seg__b { border: 0; background: transparent; padding: .4em 1.1em; border-radius: 999px; font-weight: 700; }
.seg__b[aria-pressed="true"] { background: var(--milk); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); color: var(--red); }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.board li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-s); background: var(--milk); }
.board li:nth-child(-n+3) .board__r { background: var(--gold); color: #3a2208; }
.board li.is-me { box-shadow: inset 0 0 0 2px var(--red); }
.board__r { display: grid; place-items: center; inline-size: 32px; block-size: 32px; border-radius: 50%; background: var(--cream); font: 800 .95rem var(--f-display); }
.board__n { display: grid; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.board__c { color: var(--ink-soft); font-weight: 500; }
.board b { font-family: var(--f-display); font-size: 1.15rem; color: var(--red); }
.fine { padding: 10px 14px; border-radius: var(--r-s); background: var(--cream); }
.fine summary { cursor: pointer; font-weight: 700; }
.fine p, .fine form { margin-block-start: 8px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks li::before { content: "·"; flex: none; display: grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 50%; background: var(--cream); font-weight: 800; }
.checks li.is-on::before { content: "✓"; background: #2f7a45; color: #fff; }
.checks li.is-wait::before { content: "…"; background: #f2d38a; }
.prizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.prize { display: grid; gap: 6px; padding: 12px; border-radius: var(--r-s); background: var(--milk); box-shadow: inset 0 0 0 1.5px var(--line); }
.prize img { inline-size: 100%; aspect-ratio: 1; object-fit: contain; }
.missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.missions li { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-s); background: var(--milk); box-shadow: inset 0 0 0 1.5px var(--line); }
.missions li.is-done { box-shadow: inset 0 0 0 2px #2f7a45; }
.missions__i { flex: none; display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 50%; background: var(--gold-soft); color: var(--red); font-weight: 800; }
.missions b { font-family: var(--f-display); font-size: 1.1rem; }
.missions small { color: var(--ink-soft); }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: grid; justify-items: center; gap: 4px; padding: 14px 10px; border-radius: var(--r-s); background: var(--milk); box-shadow: inset 0 0 0 1.5px var(--line); text-align: center; opacity: .55; }
.badge.is-on { opacity: 1; box-shadow: inset 0 0 0 2px var(--gold); }
.badge__m { display: grid; place-items: center; inline-size: 52px; block-size: 52px; border-radius: 50%; background: var(--cream); font-size: 1.6rem; color: #a8968a; }
.badge.is-on .badge__m { background: radial-gradient(circle at 35% 30%, #f4dc9f, var(--gold)); color: var(--red-deep); }
.badge b { font-family: var(--f-display); line-height: 1.2; }
.badge small { color: var(--ink-soft); font-size: .8rem; line-height: 1.25; }
.share { justify-items: center; }
.share__card { inline-size: min(420px, 100%); }
.share__cv, .cert__cv { inline-size: 100%; block-size: auto; border-radius: var(--r-s); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .4); display: block; }
.share__btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cert { display: grid; gap: 14px; }

/* Forms */
.form { display: grid; gap: 14px; }
.form--inline { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.f { display: grid; gap: 4px; }
.f > label { font-weight: 700; }
.f input:not([type="checkbox"]), .f select { inline-size: 100%; min-height: 48px; padding: .5em .8em; border: 1.5px solid rgba(43, 18, 14, .22); border-radius: var(--r-s); background: var(--milk); font: inherit; color: inherit; }
.f input:focus, .f select:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px rgba(179, 36, 47, .15); }
.f small { color: var(--ink-soft); font-size: .86rem; }
.f__tel { display: flex; direction: ltr; }
.f__tel span { display: grid; place-items: center; padding-inline: .8em; border: 1.5px solid rgba(43, 18, 14, .22); border-inline-end: 0; border-radius: var(--r-s) 0 0 var(--r-s); background: var(--cream); font-weight: 700; }
.f__tel input { border-radius: 0 var(--r-s) var(--r-s) 0 !important; }
.f--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.f--check input { inline-size: 22px; block-size: 22px; margin-block-start: 3px; accent-color: var(--red); flex: none; }
.f__err { color: #a3141f; font-size: .9rem; font-weight: 700; }
.f__err:empty, .f__msg:empty { display: none; }
.f__msg { padding: .6em 1em; border-radius: var(--r-s); background: #fde4e1; color: #7a1018; }
.form__alt { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* Toasts */
.toasts { position: fixed; z-index: 60; inset-inline: 0; inset-block-start: calc(12px + env(safe-area-inset-top, 0px)); display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast { max-inline-size: 520px; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--milk); font-weight: 700; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: rise .3s var(--ease); transition: opacity .5s; }
.toast.ok { background: #1f5f34; }
.toast.warn { background: #7a4a00; }
.toast.is-out { opacity: 0; }

/* Reduced motion: no hops, pings or slides */
.is-reduced *, .is-reduced *::before, .is-reduced *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
