/* Fonts are hosted with the site (Bricolage Grotesque and Atkinson Hyperlegible, SIL Open Font License). */
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/atkinson-hyperlegible-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(../fonts/bricolage-grotesque-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root{--bg:#EEF2EC;--surface:#FFFFFF;--ink:#1F2B24;--muted:#5E6B62;--line:#D5DDD3;--accent:#C8962E;--mid:#9CB8A4;--good:#2F7D4F;--bad:#B8412F;--chip:#E3EADF;--sea:#DCE6EA;
box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#141C17;--surface:#1E2922;--ink:#E8EDE6;--muted:#9AA79E;--line:#2F3D34;--accent:#E0B24F;--mid:#4E6B57;--good:#5FBF84;--bad:#E07A66;--chip:#26332B;--sea:#18242A}}
:root[data-theme="dark"]{--bg:#141C17;--surface:#1E2922;--ink:#E8EDE6;--muted:#9AA79E;--line:#2F3D34;--accent:#E0B24F;--mid:#4E6B57;--good:#5FBF84;--bad:#E07A66;--chip:#26332B;--sea:#18242A}
*,*::before,*::after{box-sizing:inherit}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Atkinson Hyperlegible",system-ui,sans-serif;font-size:16px;line-height:1.5}
.wrap{max-width:560px;margin:0 auto;padding:16px}
h1{font-family:"Bricolage Grotesque",system-ui,sans-serif;font-weight:800;font-size:1.9rem;line-height:1.1;margin:8px 0 4px;letter-spacing:-.02em}
.sub{color:var(--muted);margin:0 0 14px}
.bar{height:8px;background:var(--line);border-radius:4px;overflow:hidden}
.bar i{display:block;height:100%;background:var(--good);width:0;transition:width .4s}
.prog{font-size:.9rem;color:var(--muted);margin:4px 0 12px}
.chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:4px;margin-bottom:8px;scrollbar-width:none}
.chips button{font:inherit;border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:7px 13px;border-radius:999px;cursor:pointer;white-space:nowrap;font-size:.92rem}
#tabs button[aria-pressed="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.small button{background:var(--chip);border-color:transparent;font-size:.85rem;padding:5px 11px}
.small button[aria-pressed="true"]{background:var(--accent);color:#1F2B24}
button:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;margin-top:6px}
.flag{display:flex;justify-content:center;align-items:center;min-height:130px;margin:4px 0 12px}
.flag img{max-width:220px;max-height:140px;border-radius:4px;box-shadow:0 0 0 1px var(--line)}
.big{font-family:"Bricolage Grotesque",system-ui,sans-serif;font-weight:700;font-size:1.5rem;text-align:center;margin:0}
.meta{text-align:center;color:var(--muted);margin:2px 0 10px}
.badge{display:block;width:max-content;max-width:100%;margin:0 auto 6px;background:var(--accent);color:#1F2B24;font-weight:700;padding:3px 12px;border-radius:999px;font-size:.9rem;text-align:center}
.hook{background:var(--chip);border-radius:10px;padding:10px 12px;margin:8px 0;font-size:.95rem}
.hook b{font-family:"Bricolage Grotesque",sans-serif}
.map{margin:8px 0;border-radius:12px;overflow:hidden;background:var(--sea)}
.map svg{display:block;width:100%;height:auto}
.legend{display:flex;gap:12px;justify-content:center;font-size:.8rem;color:var(--muted);margin-top:4px}
.legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:4px;vertical-align:-1px}
.row{display:flex;gap:8px;margin-top:14px}
.btn{flex:1;font:inherit;font-weight:700;padding:12px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer}
.btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.hidden{display:none!important}
.tap{text-align:center;color:var(--muted);font-size:.9rem}
.q{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;font-size:1.2rem;text-align:center;margin:4px 0 14px}
.opts{display:grid;gap:8px}
.opts.fl{grid-template-columns:1fr 1fr}
.opt{font:inherit;text-align:left;padding:12px 14px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);cursor:pointer}
.opt img{width:100%;border-radius:3px;display:block}
.opt.right{border-color:var(--good);background:color-mix(in srgb,var(--good) 14%,var(--surface))}
.opt.wrong{border-color:var(--bad);background:color-mix(in srgb,var(--bad) 14%,var(--surface))}
.score{display:flex;justify-content:space-between;font-size:.9rem;color:var(--muted);margin-bottom:6px}
.pair{border-bottom:1px solid var(--line);padding:14px 0}
.pair:last-child{border-bottom:0}
.pair .imgs{display:flex;gap:8px;flex-wrap:wrap}
.pair img{height:44px;border-radius:3px;box-shadow:0 0 0 1px var(--line)}
.pair p{margin:4px 0 0}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:8px}
.cell{border:1px solid var(--line);border-radius:10px;padding:8px 6px;text-align:center;font-size:.78rem;cursor:pointer;background:var(--surface);color:var(--ink);font-family:inherit;line-height:1.25}
.cell img{width:100%;height:52px;object-fit:contain;display:block;margin-bottom:4px}
.cell.m{border-color:var(--good);box-shadow:inset 0 0 0 1px var(--good)}
.gh{font-family:"Bricolage Grotesque",sans-serif;font-weight:700;margin:16px 0 8px}
.gh:first-child{margin-top:0}
.diff button[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
.dnote{font-size:.85rem;color:var(--muted);margin:0 0 8px}
.opt .who{display:flex;align-items:center;gap:8px;font-size:.85rem;color:var(--muted);margin-top:6px}
.opt .who img{width:34px;height:auto;border-radius:2px;box-shadow:0 0 0 1px var(--line)}
.opt.fl-opt .who{justify-content:center;text-align:center}
.typed{display:flex;gap:8px}
.typed input{flex:1;font:inherit;padding:12px;border-radius:12px;border:1.5px solid var(--line);background:var(--surface);color:var(--ink);min-width:0}
.regs{display:flex;flex-wrap:wrap;gap:6px}
.regs .opt{padding:8px 10px;font-size:.88rem}
#qTimer{font-weight:700;color:var(--bad)}
.row.sticky{position:sticky;bottom:0;z-index:5;background:var(--surface);margin:14px -18px -18px;padding:10px 18px calc(10px + env(safe-area-inset-bottom,0px));border-top:1px solid var(--line);border-radius:0 0 16px 16px}
.map{position:relative}
.map svg{touch-action:pan-y;cursor:grab}
.mctl{position:absolute;right:6px;top:6px;display:flex;flex-direction:column;gap:4px}
.mctl button{width:34px;height:34px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:700 1.05rem/1 system-ui;cursor:pointer;padding:0}
.mhint{font-size:.75rem;color:var(--muted);text-align:center;margin-top:4px}
.hist{border-left:3px solid var(--accent)}
@media (max-width:480px){.flag{min-height:96px;margin-bottom:8px}.flag img{max-width:180px;max-height:110px}h1{font-size:1.6rem}.panel{padding:14px}.row.sticky{margin:14px -14px -14px;padding-left:14px;padding-right:14px}}
.note{font-size:.85rem;color:var(--muted);margin-top:14px}
@media (prefers-reduced-motion:reduce){.bar i{transition:none}}

/* Home-screen app polish. Only applies when installed, the normal browser view is unchanged. */
@media (display-mode:standalone){
  *{-webkit-tap-highlight-color:transparent}
  html,body{overscroll-behavior-y:none}
  button{touch-action:manipulation}
  img{-webkit-touch-callout:none}
}
