/* The look of the Pocketorama home pages. Phone first (390 x 780), fine on desktop. No network: fonts are local. */
@font-face { font-family: 'Sora'; src: url('fonts/Sora-Bold.ttf') format('truetype'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Medium.ttf') format('truetype'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Noto Sans Devanagari'; src: url('fonts/NotoSansDevanagari-Regular.ttf') format('truetype'); font-weight: 400 500; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CFF, U+A8E0-A8FF, U+200C-200D, U+25CC; }
@font-face { font-family: 'Noto Sans Devanagari'; src: url('fonts/NotoSansDevanagari-Bold.ttf') format('truetype'); font-weight: 600 800; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CFF, U+A8E0-A8FF, U+200C-200D, U+25CC; }

:root { --col: 760px; --pkt-ad-bottom: 0px; } /* the colours, radii and fonts come from theme.css (shared/app/theme.json) */
html { background: #0a0f1e; color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
html[data-band="little"], html[data-band="senior"] { font-size: 112.5%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font: 500 1rem/1.45 var(--body);
  background: linear-gradient(180deg, #17224d 0, #0f1736 420px, #0a0f1e 900px) #0a0f1e no-repeat; -webkit-tap-highlight-color: transparent; }
html[lang="hi"] body { line-height: 1.6; }
* { box-sizing: border-box; }
h1, h2, b { font-family: var(--display); font-weight: 700; }
h1, h2, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 10px; }
#view:focus { outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--gold); color: #2a1b00; padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 10px; }
.grow { flex: 1; }
.soft { color: var(--faint); font-size: .875rem; }
.center { text-align: center; }

#app { max-width: var(--col); margin: 0 auto; padding: 0 16px calc(28px + var(--pkt-ad-bottom)); }
.site-foot { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.64); font-size: .9rem; text-align: center; }
.site-foot p { max-width: 46em; margin: 0 auto 10px; }
.site-foot a { color: #ffd84a; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 0;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: rgba(19,29,66,.94); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; min-height: 44px; }
.brand-mark { display: block; width: 34px; height: 34px; flex: none; border-radius: 9px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.brand-name { font: 700 20px/1 var(--display); letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title { font-size: 1.25rem; line-height: 1.2; }
.icon-btn { flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); text-decoration: none; font-size: 1.15rem; padding: 0; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 44px; max-width: 46vw; padding: 0 12px 0 6px; border-radius: 22px;
  border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 600; font-size: .875rem; }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { flex: none; width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 1.2rem; line-height: 1; }
.av.big { width: 64px; height: 64px; font-size: 2.3rem; background: color-mix(in srgb, var(--accent) 30%, transparent); border: 2px solid var(--accent); }
@media (max-width: 519px) { .chip-btn { padding: 0 4px; } .chip-name { display: none; } }
@media (max-width: 330px) { .brand-name { display: none; } }

/* Home */
.home h2, .page h2 { font-size: 1.0625rem; margin: 22px 0 10px; display: flex; align-items: baseline; gap: 8px; }
.hello { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); }
.hello h1 { font-size: 1.375rem; line-height: 1.2; overflow-wrap: anywhere; }
.hello p { color: var(--soft); font-size: .9375rem; margin-top: 2px; }
.hello .btn { margin-top: 10px; }
.quick { display: flex; gap: 8px; margin-top: 10px; }
.quick-btn { flex: 1; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 700; font-size: .875rem; text-align: center; }
.quick-btn small { color: var(--faint); font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 48px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 1rem; }
.search input::placeholder { color: var(--faint); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 12px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar, .recent::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: .875rem; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #06201c; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; text-align: left; text-decoration: none; padding: 0; border-radius: 22px; overflow: hidden; background: #141c3c;
  border: 1px solid var(--line); box-shadow: 0 6px 16px rgba(0,0,0,.28); contain: content; content-visibility: auto; contain-intrinsic-size: auto 190px;
  transition: transform .15s ease-out; }
.tile .art { position: relative; height: 84px; display: grid; place-items: center; background: linear-gradient(140deg, var(--a), var(--b)); }
.tile .e { font-size: 2.75rem; line-height: 1; filter: drop-shadow(0 4px 5px rgba(0,0,0,.28)); }
.tile .lbl { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; flex: 1; }
.tile b { font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.tile .p { font-size: .8125rem; line-height: 1.35; color: var(--soft); }
.tile .best { margin-top: auto; padding-top: 4px; font-size: .8125rem; font-weight: 700; color: var(--gold); }
.tile.locked { color: inherit; width: 100%; }
.tile.locked .art { filter: saturate(.35) brightness(.75); }
.tile .cake { position: absolute; right: 8px; top: 8px; font-size: 1.4rem; }
@media (hover: hover) { .tile:hover { transform: translateY(-3px); } .btn:hover, .quick-btn:hover, .icon-btn:hover, .chip-btn:hover { filter: brightness(1.12); } }
.tile:active { transform: scale(.97); }
html[data-band="little"] .tile .p { display: none; }
html[data-band="little"] .tile .art { height: 104px; }
html[data-band="little"] .tile .e { font-size: 3.4rem; }
html[data-band="little"] .tile.locked .p { display: block; }
.recent { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.tile.small { flex: none; width: 124px; content-visibility: visible; }
.tile.small .art { height: 64px; }
.tile.small .e { font-size: 2.1rem; }
.tile.small b { font-size: .875rem; }
.empty { grid-column: 1 / -1; padding: 22px 12px; text-align: center; color: var(--soft); }
.foot { margin-top: 26px; text-align: center; color: var(--faint); font-size: .8125rem; }

/* Pages */
.page { padding-top: 14px; }
.lead { color: var(--soft); margin: 4px 0 12px; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.row, .set { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 60px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.row.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 0; text-align: left; min-height: 44px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text b { font-size: 1rem; overflow-wrap: anywhere; }
.row-text small { color: var(--faint); font-size: .8125rem; line-height: 1.4; }
.btn { min-height: 48px; padding: 0 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.btn.main { background: linear-gradient(180deg, #ffe680, #ffc21a); color: #3a2400; border: 0; box-shadow: 0 4px 0 #c98f00; }
.btn.main:active { transform: translateY(2px); box-shadow: 0 2px 0 #c98f00; }
.btn.danger { border-color: #fda4af; color: #fecdd3; }
.btn.wide { width: 100%; margin-top: 16px; }
.group { margin-bottom: 4px; }
.group .set + .set { margin-top: 8px; }
.set.link { text-decoration: none; }
.set.text { display: block; color: var(--soft); font-size: .9375rem; }
.set.text p + p { margin-top: 8px; }
.switch { flex: none; width: 56px; height: 32px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.14); padding: 3px; }
.switch i { display: block; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"] i { transform: translateX(24px); background: #06201c; }
.switch:disabled, input:disabled { opacity: .45; }
.vol input { width: 46%; accent-color: var(--accent); height: 32px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: 52px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font-weight: 700; font-size: 1.0625rem; }
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #06201c; }

/* Trophies and stats */
.big-cup { font-size: 1.8rem; vertical-align: middle; }
.shelf { content-visibility: auto; contain-intrinsic-size: auto 250px; }
.shelf h2 small { margin-left: auto; color: var(--faint); font: 600 .8125rem var(--body); }
.trophy { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.cup { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.07); font-size: 1.15rem; filter: grayscale(1); opacity: .7; }
.trophy.have { border-color: rgba(255,216,74,.55); }
.trophy.have .cup { background: linear-gradient(135deg, #fde68a, #f59e0b); filter: none; opacity: 1; }
.bar { display: block; height: 6px; margin-top: 5px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.count { flex: none; color: var(--soft); font-size: .8125rem; font-weight: 700; }
.trophy.have .count { color: var(--gold); font-size: 1.1rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 600px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.stat b { font-size: 1.5rem; line-height: 1.2; }
.stat small { color: var(--faint); font-size: .8125rem; }

/* Premium */
.crown { font-size: 3.4rem; text-align: center; margin-top: 8px; }
.premium h2 { justify-content: center; font-size: 1.375rem; margin-top: 4px; }
.note { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); color: var(--soft); text-align: center; }
.note.hot { background: rgba(255,216,74,.16); color: #fff; border: 1px solid rgba(255,216,74,.5); }

/* Cards over the page */
dialog.sheet { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px - var(--pkt-ad-bottom)); padding: 0; border: 1px solid var(--line); border-radius: 26px;
  background: #18214a; color: var(--ink); box-shadow: 0 24px 70px rgba(0,0,0,.55); overflow: auto; }
dialog.sheet::backdrop { background: rgba(5,8,20,.66); }
dialog.sheet form { padding: 20px 20px 16px; }
dialog.sheet h2 { font-size: 1.25rem; margin-bottom: 10px; }
.sheet-body { display: flex; flex-direction: column; gap: 10px; }
.sheet-body p { color: var(--soft); }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.sheet-actions .btn { min-width: 88px; }
.sheet-actions .btn.danger { margin-right: auto; }
.field, select { width: 100%; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.28); font-size: 1rem; }
select option { background: #18214a; color: #fff; }
.err { color: #fecdd3; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.born { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.born legend { padding: 0; margin-bottom: 6px; font-weight: 700; }
.lbl-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
#who { display: flex; flex-direction: column; gap: 10px; }
.fun { display: flex; align-items: center; gap: 12px; }
.fun b { font-size: 1.25rem; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.av-pick { aspect-ratio: 1; min-height: 44px; border-radius: 14px; border: 2px solid transparent; background: rgba(255,255,255,.08); font-size: 1.4rem; padding: 0; }
.av-pick[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.big-emoji { font-size: 3rem; text-align: center; line-height: 1; }

#toast { position: fixed; left: 50%; bottom: calc(22px + var(--pkt-ad-bottom)); transform: translate(-50%, 20px); z-index: 40; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 16px; background: #fff; color: #10172f; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.4); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .tile:hover, .tile:active { transform: none; } }

/* Comfort (shell/comfort.js), from Settings: bigger text, bolder text, calmer motion. */
html.pkt-big { font-size: 120%; }
html.pkt-big[data-band="little"], html.pkt-big[data-band="senior"] { font-size: 135%; }
html.pkt-bold { --soft: rgba(255,255,255,.92); --faint: rgba(255,255,255,.82); }
html.pkt-bold body, html.pkt-bold p, html.pkt-bold small, html.pkt-bold .soft, html.pkt-bold button, html.pkt-bold .chip, html.pkt-bold input { font-weight: 700; }
html.pkt-calm *, html.pkt-calm *::before, html.pkt-calm *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
html.pkt-calm .tile:hover, html.pkt-calm .tile:active, html.pkt-calm .btn.main:active { transform: none; }

/* Settings rows that open a choice, and the break reminder's list */
.set.pick { width: 100%; text-align: left; color: inherit; font: inherit; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices .btn { justify-content: flex-start; gap: 10px; width: 100%; }
.choices .btn[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* How to play (shell/howto.js): the page of games and the card of three steps */
.howto-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.howto-steps li { display: flex; align-items: center; gap: 12px; color: var(--ink); line-height: 1.4; }
.howto-e { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--accent) 22%, transparent); font-size: 1.3rem; }
.howto-list .row-main b { font-size: 1rem; }

/* Privacy policy and terms (shell/legal.js) */
.doc h2 { font-size: 1.0625rem; margin: 22px 0 6px; }
.doc p { color: var(--soft); margin: 0 0 10px; overflow-wrap: anywhere; }
.doc .doc-date { color: var(--faint); font-size: .875rem; }
.doc .note { text-align: left; margin: 0 0 14px; }

/* Family account, high scores and online games (shell/account.js, scores.js, online.js) */
#family h3 { font-size: 1rem; margin: 18px 0 4px; }
#family > .soft { margin-top: 8px; }
#family .set + .set, #family .soft + .set { margin-top: 8px; }
.ticks { margin: 10px 0 0; padding-left: 1.2em; }
.ticks li { margin: 4px 0; }
.row .place { flex: none; width: 32px; text-align: center; font-weight: 700; }
.row .score { margin-left: auto; font-size: 1.0625rem; }
#score-list { margin-top: 12px; }
#score-list .set { margin-bottom: 8px; }
.page .code { font-size: 2.5rem; font-weight: 700; letter-spacing: .3em; text-align: center; margin: 12px 0; user-select: all; }
#online-code-field { text-transform: uppercase; letter-spacing: .2em; margin: 4px 0 8px; }
.page .chip { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }

/* Weekly tournament and public lists (tournament.js) */
.btn.small { min-height: 40px; padding: 0 14px; flex: none; display: inline-flex; align-items: center; }
.linkish { background: none; border: 0; padding: 4px 0; min-height: 44px; color: var(--accent); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.tourney-head .list { margin-top: 8px; }
.tournament h3 { margin: 18px 0 8px; }
.name-picks { border: 0; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.name-pick { cursor: pointer; min-height: 52px; }
.name-pick input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.name-pick:has(input:checked) { border-color: var(--accent); }
.join-public .lbl-field { margin-top: 14px; }
