@font-face { font-family: "Baloo 2"; src: url(/fonts/baloo2.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Nunito"; src: url(/fonts/nunito.woff2) format("woff2"); font-weight: 200 1000; font-display: swap; }

/* Style D "Night Navigator" — the app's palette (Palette.night) */
:root {
  --night: #10143A; --deep: #0A0D2A; --panel: #1B2056; --panel-2: #252B6B; --line: #3A4190;
  --cream: #FFF4DC; --lilac: #C9C3E6; --gold: #F2B53A; --gold-hi: #FFD873; --gold-ink: #2A1700;
  --ruby: #D7263D; --emerald: #1FA77A; --tile: #161B4C;
  --r: 22px; --wrap: 1120px;
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--cream); font: 17px/1.6 var(--body); min-height: 100vh;
  background: var(--deep);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 9%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 34%, #ffe9a8aa 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 52%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 71%, #fff7 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 83%, #fff5 50%, transparent 51%),
    linear-gradient(180deg, var(--deep) 0, var(--night) 520px, #151a4a 100%);
  background-size: 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 420px 420px, 100% 100%;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--gold-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 8.5vw, 58px); font-weight: 800; color: var(--gold-hi); }
h2 { font-size: clamp(26px, 5.6vw, 36px); font-weight: 800; color: var(--gold-hi); margin-top: 1.6em; }
h3 { font-size: 21px; font-weight: 700; color: var(--cream); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--lilac); }
.eyebrow { font: 700 13px/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.lede { font-size: 19px; color: var(--lilac); max-width: 620px; }
.scroll-x { overflow-x: auto; scrollbar-width: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* header */
.top { position: relative; z-index: 3; }
.top .wrap { display: flex; align-items: center; gap: 14px; padding-top: 14px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-hi); font: 800 23px/1 var(--display); flex: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 2px #f2b53a55; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--lilac); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--gold-ink); background: var(--gold); }
@media (max-width: 720px) {
  .top .wrap { flex-wrap: wrap; }
  .nav { margin: 0 -16px; padding: 0 16px 4px; width: calc(100% + 32px); }
}

/* game hero */
.hero { padding-top: 18px; padding-bottom: 8px; position: relative; }
.hero-head { position: relative; z-index: 2; }
.hero h1 { margin-bottom: 8px; }
.game { display: grid; gap: 18px; margin-top: 44px; }
@media (min-width: 960px) {
  .game { grid-template-columns: 1.08fr 1fr; gap: 36px; align-items: start; }
  .stage { position: sticky; top: 16px; }
}
.stage { position: relative; }
.frame {
  position: relative; border-radius: 18px; padding: 10px;
  background: linear-gradient(160deg, #ffe08a, #b47a14 45%, #f6c858 70%, #8d5a0c);
  box-shadow: 0 18px 50px #0009, 0 0 0 1px #00000040 inset;
}
.frame-in { border-radius: 10px; overflow: hidden; background: var(--tile); line-height: 0; }
#flag { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; }
.owl-peek { position: absolute; width: 92px; height: auto; right: -6px; top: -66px; z-index: 2; filter: drop-shadow(0 8px 14px #0008); pointer-events: none; }
.owl-head { display: none; }
@media (min-width: 960px) {
  .owl-peek { display: none; }
  .hero-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
  .owl-head { display: block; width: 170px; height: auto; margin-bottom: -36px; filter: drop-shadow(0 10px 18px #0009); }
  .game { margin-top: 28px; }
}
.uncover { display: flex; justify-content: center; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line); font-weight: 800; font-size: 15px; }
.pill b { color: var(--gold-hi); font-variant-numeric: tabular-nums; }

.play { display: grid; gap: 12px; }
.ask { position: relative; display: flex; gap: 8px; }
.ask input {
  flex: 1; min-width: 0; height: 56px; border-radius: 16px; border: 2px solid #8C7434; background: #151A48; color: var(--cream);
  font: 700 18px var(--body); padding: 0 16px 0 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23F2B53A' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='9.5' cy='9.5' r='6.5'/%3E%3Cpath d='m15 15 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px 50%;
}
.ask input::placeholder { color: #a9a3cf; font-weight: 600; }
.ask input:focus { outline: none; border-color: var(--gold-hi); box-shadow: 0 0 0 4px #f2b53a33; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 22px; border: 0; border-radius: 16px; cursor: pointer;
  font: 800 19px var(--display); color: var(--gold-ink); text-decoration: none;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #c98c1d); box-shadow: 0 4px 0 #8d5a0c, 0 10px 24px #0006;
}
.btn:hover { color: var(--gold-ink); filter: brightness(1.06); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #8d5a0c; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.ghost { background: var(--panel); color: var(--cream); box-shadow: 0 0 0 2px var(--line) inset; }
.btn.ghost:hover { color: #fff; }
.sugg { position: absolute; left: 0; right: 0; top: 62px; z-index: 5; margin: 0; padding: 6px; list-style: none; background: #1d2360; border: 1.5px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px #000a; }
.sugg li { display: flex; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.sugg li[aria-selected="true"], .sugg li:hover { background: var(--panel-2); color: var(--gold-hi); }
.sugg img { width: 30px; height: 20px; object-fit: cover; border-radius: 3px; }
.msg { min-height: 22px; margin: 0; color: var(--gold-hi); font-weight: 700; font-size: 15px; }

.board { list-style: none; margin: 0; padding: 8px 14px; border-radius: var(--r); background: linear-gradient(180deg, #1d2360, var(--panel)); border: 1.5px solid var(--line); }
.board li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; min-height: 58px; padding: 6px 0; border-top: 1px solid #ffffff12; }
.board li:first-child { border-top: 0; }
.board .n { color: #8f89c0; font-weight: 800; font-size: 15px; text-align: center; }
.board .empty { height: 12px; border-radius: 999px; background: #262c6a; grid-column: 2 / 4; }
.board .c { display: flex; align-items: center; gap: 10px; min-width: 0; }
.board .c img { width: 34px; height: 23px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px #0004; flex: none; }
.board .nm { font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.board .nm small { display: block; font-weight: 600; color: var(--lilac); font-size: 13px; }
.board .meta { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.board .arr { width: 20px; height: 20px; color: var(--gold); transition: transform .5s; }
.board .pct { min-width: 50px; text-align: center; padding: 2px 8px; border-radius: 999px; background: #8f8fb3; color: #12152f; font-size: 14px; }
.board .pct.hi { background: var(--gold); color: var(--gold-ink); }
.board .ok .pct { background: var(--emerald); color: #fff; }
.board .ok .nm { color: #7ff0c2; }
.board li.new { animation: rowIn .45s ease-out; }
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.result { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: var(--r); background: linear-gradient(160deg, #262c6a, var(--panel)); border: 1.5px solid #8C7434; }
.result img.owl { width: 76px; height: auto; align-self: start; }
@media (min-width: 600px) { .result { grid-template-columns: 110px 1fr; } .result img.owl { width: 110px; align-self: center; } }
.result h2 { margin: 0 0 4px; font-size: 28px; }
.result p { margin: 0 0 10px; color: var(--lilac); }
.result .row { display: flex; flex-wrap: wrap; gap: 8px; }
.result .btn { height: 46px; font-size: 17px; padding: 0 16px; }
.next { font-variant-numeric: tabular-nums; color: var(--gold-hi); font-weight: 800; }
[hidden] { display: none !important; }

/* sections */
section { padding: 10px 0; }
.steps { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 18px; border-radius: var(--r); background: var(--panel); border: 1.5px solid var(--line); }
.step h3 { color: var(--gold-hi); margin-bottom: 6px; }
.step p { margin: 0; color: var(--lilac); }
.card { padding: 18px; border-radius: var(--r); background: var(--panel); border: 1.5px solid var(--line); }

/* flag grids */
.flags { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 14px 0 8px; padding: 0; list-style: none; }
.flags a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--cream); font-weight: 800; line-height: 1.2; font-size: 15px; padding: 10px; border-radius: 16px; background: #171c4f; border: 1.5px solid transparent; height: 100%; }
.flags a:hover { border-color: var(--gold); color: var(--gold-hi); }
.flags .fi { display: flex; align-items: center; justify-content: center; height: 78px; }
.flags .fi img { max-height: 78px; width: auto; border-radius: 4px; box-shadow: 0 2px 8px #0007; }
.flags small { color: var(--lilac); font-weight: 600; font-size: 13px; }
.conts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-top: 14px; }
.cont { display: block; padding: 16px; border-radius: var(--r); background: var(--panel); border: 1.5px solid var(--line); text-decoration: none; color: var(--cream); }
.cont:hover { border-color: var(--gold); color: var(--cream); }
.cont h3 { color: var(--gold-hi); margin: 0 0 2px; }
.cont .strip { display: flex; gap: 6px; margin-top: 10px; }
.cont .strip img { height: 30px; width: auto; border-radius: 3px; }

/* country page */
.flagpage { display: grid; gap: 22px; margin-top: 10px; }
@media (min-width: 860px) { .flagpage { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.bigflag { padding: 10px; border-radius: 18px; background: linear-gradient(160deg, #ffe08a, #b47a14 45%, #f6c858 70%, #8d5a0c); justify-self: start; }
.bigflag img { display: block; border-radius: 9px; max-height: 320px; width: auto; }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { text-align: left; padding: 10px 0; border-bottom: 1px solid #ffffff18; vertical-align: top; }
.facts th { color: var(--lilac); font-weight: 700; width: 42%; }
.colours { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.colours li { display: grid; grid-template-columns: 22px 110px 1fr 44px; align-items: center; gap: 10px; font-weight: 700; }
.colours .sw { width: 22px; height: 22px; border-radius: 6px; box-shadow: 0 0 0 1.5px #ffffff40 inset; }
.colours .bar { height: 10px; border-radius: 999px; background: #262c6a; overflow: hidden; }
.colours .bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.colours .v { text-align: right; color: var(--lilac); font-variant-numeric: tabular-nums; }

/* look-alikes */
.pair { padding: 18px; border-radius: var(--r); background: var(--panel); border: 1.5px solid var(--line); margin: 14px 0; }
.pair .flags { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin: 6px 0 12px; }
.pair p { margin: 0; color: var(--lilac); }

/* example board */
.ex { display: grid; gap: 12px; margin: 14px 0; }
.ex-step { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line); }
.ex-step svg { width: 140px; height: auto; border-radius: 6px; display: block; box-shadow: 0 0 0 2px #8C7434; }
.ex-step p { margin: 0; }
.ex-step b { color: var(--gold-hi); }

/* answers */
.alist { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.alist a { display: block; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1.5px solid var(--line); text-decoration: none; color: var(--cream); font-weight: 800; }
.alist a:hover { border-color: var(--gold); }
.alist small { display: block; color: var(--lilac); font-weight: 600; }
details { margin: 10px 0; border-radius: 16px; background: var(--panel); border: 1.5px solid var(--line); }
summary { cursor: pointer; padding: 14px 16px; font-weight: 800; color: var(--gold-hi); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "＋"; display: inline-block; width: 22px; color: var(--gold); }
details[open] summary::before { content: "－"; }
details > div { padding: 0 16px 16px; }
.prevnext { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0; }

/* app block */
.app { display: grid; gap: 22px; align-items: center; margin: 34px 0 10px; padding: 22px; border-radius: 28px; background: radial-gradient(120% 120% at 0% 0%, #2b3180, var(--panel) 60%); border: 1.5px solid #8C7434; }
@media (min-width: 900px) { .app { grid-template-columns: 1fr 1.1fr; padding: 34px; } }
.app-id { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.app-id img { width: 64px; height: 64px; border-radius: 16px; }
.app-id b { display: block; font: 800 24px/1.1 var(--display); color: var(--gold-hi); }
.app ul { margin: 0 0 16px; padding-left: 20px; color: var(--lilac); }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; border-radius: 14px; background: #000; color: #fff; text-decoration: none; box-shadow: 0 0 0 1.5px #ffffff55 inset; }
.store:hover { color: #fff; box-shadow: 0 0 0 2px var(--gold) inset; }
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.1; font-size: 12px; }
.store b { font-size: 18px; font-family: var(--display); }
.store.soon { opacity: .6; pointer-events: none; }
.shots { display: flex; gap: 12px; justify-content: center; }
.shots img { width: 31%; max-width: 190px; height: auto; border-radius: 18px; box-shadow: 0 14px 30px #0008; }
.shots img:nth-child(2) { transform: translateY(-14px); }

/* footer */
.foot { margin-top: 40px; position: relative; }
.foot .sky { display: block; width: 100%; height: 170px; object-fit: cover; object-position: center bottom; opacity: .9; -webkit-mask-image: linear-gradient(180deg, transparent, #000 45%); mask-image: linear-gradient(180deg, transparent, #000 45%); }
.foot-in { background: #070a22; padding: 22px 0 30px; font-size: 15px; color: var(--lilac); }
.foot-in h2 { font-size: 20px; margin: 0 0 10px; color: var(--cream); }
.more { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.more a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: #151a48; text-decoration: none; color: var(--cream); font-weight: 700; }
.more a:hover { background: var(--gold); color: var(--gold-ink); }
.crumbs { font-size: 14px; color: var(--lilac); margin: 10px 0 6px; }
.crumbs a { color: var(--lilac); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.toc a { padding: 6px 12px; border-radius: 999px; background: var(--panel); text-decoration: none; color: var(--cream); font-weight: 700; font-size: 15px; }

/* printable */
.sheet { background: #fff; color: #111; border-radius: 12px; padding: 22px; margin: 18px 0; }
.sheet h2 { color: #111; margin: 0 0 12px; font-size: 26px; }
.sheet ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; padding: 0; margin: 0; list-style: none; counter-reset: q; }
.sheet li { counter-increment: q; display: flex; flex-direction: column; gap: 6px; }
.sheet li::before { content: counter(q) "."; font-weight: 800; }
.sheet li img { height: 70px; width: auto; align-self: flex-start; border: 1px solid #ccc; }
.sheet .line { border-bottom: 1.5px solid #555; height: 22px; }
.key { color: #333; font-size: 14px; columns: 2; }
@media print {
  body { background: #fff !important; color: #000; }
  .top, .foot, .noprint, .crumbs, .app { display: none !important; }
  .sheet { page-break-after: always; margin: 0; border-radius: 0; padding: 0; }
  .sheet li img { border: 1px solid #999; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
