@font-face {
  font-family: Bricolage;
  src: url("./fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #fbf7ee;
  --panel: #fffdf7;
  --ink: #211d38;
  --muted: #5b536c;
  --green: #205b4c;
  --gold: #f5c567;
  --coral: #a54334;
  --line: #ded7e9;
  --soft: #f2eafb;
  --focus: #6744c0;
  --display: Bricolage, system-ui, "Segoe UI", "Nirmala UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 system-ui, "Nirmala UI", sans-serif; }
.shell { width: min(100% - 2rem, 68rem); margin-inline: auto; }
main { padding-bottom: 2rem; }
.topbar, .between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .65rem; }
.topbar { padding-block: .85rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; color: inherit; text-decoration: none; }
.brand img { width: 2.65rem; height: 2.65rem; flex: none; }
.brand strong { font: 800 1.22rem/1 var(--display); }
.brand small { display: block; color: #554191; text-decoration: underline; text-underline-offset: .18em; }
.language { display: flex; flex-wrap: wrap; gap: .42rem; align-items: center; max-width: 100%; font-size: .9rem; font-weight: 700; }
select, button { min-height: 46px; border: 1px solid #a99dbc; border-radius: .76rem; padding: .48rem .8rem; background: var(--panel); color: var(--ink); font: inherit; font-weight: 700; }
select { max-width: 100%; }
button { cursor: pointer; }
button:hover { background: var(--soft); }
button:disabled { background: #eee9f2; color: #62596f; border-color: var(--line); cursor: default; }
:is(a,button,select,summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.primary { background: var(--gold); border-color: #ae7d3b; box-shadow: 0 3px 0 #a2733a; }
.primary:hover { background: #ffe9ad; }
.primary:disabled { box-shadow: none; }
.hero button:focus-visible { outline-color: var(--gold); }
h1, h2, h3 { font-family: var(--display); line-height: 1.14; margin: 0 0 .5rem; letter-spacing: -.024em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.45rem, 6.2vw, 4.55rem); font-weight: 800; }
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3, :lang(zh-CN) h1, :lang(zh-CN) h2, :lang(zh-CN) h3 { font-family: inherit; letter-spacing: 0; line-height: 1.28; }
h2 { font-size: clamp(1.28rem, 3vw, 1.7rem); }
h3 { font-size: 1.17rem; }
p { margin: .3rem 0 .95rem; overflow-wrap: break-word; }
.eyebrow { color: #554191; font-size: .79rem; font-weight: 820; letter-spacing: .055em; }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; background: #211d38; color: #fffaf2; border: 1px solid #32284e; border-radius: 1.45rem; overflow: hidden; }
.hero .intro { align-self: center; padding: clamp(1.3rem, 4.4vw, 3rem); }
.hero h1 { margin-top: .4rem; }
.hero .eyebrow { color: var(--gold); }
.hero p { max-width: 35rem; color: #e8deef; }
.fair-art { display: block; width: 100%; height: 100%; min-width: 0; max-height: 24rem; object-fit: cover; object-position: 56% center; }
.dashboard { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: min-content 1fr; grid-template-areas: "map daily" "map album"; gap: .9rem 1.1rem; margin-top: 1.5rem; align-items: start; }
.map { grid-area: map; min-width: 0; }
.section-head { margin-bottom: .65rem; }
.section-head h2 { margin-bottom: 0; }
.chip { display: inline-block; padding: .24rem .56rem; border-radius: .55rem; background: #ede4fa; color: var(--ink); font-size: .82rem; font-weight: 760; }
.mission-meter { display: block; width: 100%; height: .55rem; margin: .75rem 0; accent-color: #5a45a8; }
.tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.panel, .tile { min-width: 0; border: 1px solid var(--line); border-radius: 1.12rem; padding: clamp(.85rem, 2.4vw, 1.3rem); background: var(--panel); box-shadow: 0 5px 0 #2728440a; }
.tile { display: flex; flex-direction: column; }
.tile:nth-child(3n + 1) { border-top: 4px solid #e7a757; }
.tile:nth-child(3n + 2) { border-top: 4px solid #9b83db; }
.tile:nth-child(3n + 3) { border-top: 4px solid #79b9a5; }
.tile:nth-child(3n + 1) { background: #fff8e6; }
.tile:nth-child(3n + 2) { background: #f7effb; }
.tile:nth-child(3n + 3) { background: #ecf7f0; }
.tile h3 { margin-top: .6rem; }
.tile p { flex: 1; color: var(--muted); }
.tile.complete { border-color: #80a68b; }
.tile.locked { background: #f8f3fc; }
.emblem { width: 3rem; height: 3rem; display: block; flex: none; }
.daily { grid-area: daily; background: #fff0c9; border-color: #dfbf77; }
.daily .emblem { width: 3.1rem; height: 3.1rem; margin-block: .65rem; }
.daily .chip { background: #fff9e8; }
.album { grid-area: album; }
.album p { color: var(--muted); }
.seals { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.seals li, .seal { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .58rem; background: #e5f1e7; border: 1px solid #80a68b; border-radius: .7rem; color: #153d34; font-weight: 760; }
.seals li { font-size: .85rem; }
.seals svg, .seal svg { width: 1.35rem; height: 1.35rem; }
.stage { max-width: 48rem; margin: .4rem auto; }
.playhead { margin-bottom: .85rem; }
.play-card { padding: clamp(1rem, 3vw, 2rem); border-top: 5px solid #ac93c2; box-shadow: 0 6px 0 #3028440b; }
.play-card h1 { font-size: clamp(1.75rem, 5vw, 2.65rem); margin-top: .6rem; }
.play-card h2 { margin-top: .65rem; }
.choices, .actions { display: grid; gap: .55rem; }
.choices { margin-top: .8rem; }
.actions { margin-top: .85rem; justify-items: start; }
.actions:not(:has(button:not([hidden]))) { display: none; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: .55rem; text-align: left; }
.choice[aria-pressed=true] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: #e5f1e7; }
.choice-copy { display: flex; align-items: baseline; gap: .6rem; }
.choice-copy::before { content: ''; width: .77rem; height: .77rem; border: 1px solid #686161; flex: none; border-radius: .22rem; }
.choice[aria-pressed=true] .choice-copy::before { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 2px #fffdf6; }
.cost { flex: none; font-size: .88rem; }
.budget { margin-block: .75rem; border: 1px solid var(--line); border-radius: .86rem; background: var(--soft); padding: .65rem .75rem; }
.token-trays { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .65rem; }
.token-tray { min-width: 0; padding: .55rem; border: 1px solid #b8cfc0; border-radius: .65rem; background: #e4f1e7; font-size: .85rem; }
.spent-tray { border-color: #d8c9e4; background: #fffaf3; }
.coins { display: flex; flex-wrap: wrap; min-height: 1.1rem; gap: .32rem; margin-top: .42rem; }
.coin { width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 2px solid #8c621b; background: var(--gold); box-shadow: inset 0 0 0 1px #ffeec8; }
.spent-tray .coin { border-color: #74579f; background: #d6c1f2; box-shadow: inset 0 0 0 1px #f5edfc; }
.feedback { margin-top: .8rem; border-radius: .65rem; border-left: 4px solid var(--coral); background: #faecdd; padding: .68rem .8rem; }
.feedback p { margin: 0; }
.feedback p + p { margin-top: .45rem; }
.feedback.good { border-color: var(--green); background: #e9f3e9; }
.seal { margin-top: .8rem; }
details, .family-task { margin-top: .9rem; padding-top: .4rem; border-top: 1px solid var(--line); }
summary { min-height: 44px; padding-block: .55rem; font-weight: 760; cursor: pointer; }
details p { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .seal { animation: welcome-stamp .25s ease-out both; }
  @keyframes welcome-stamp { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .fair-art { max-height: 12rem; aspect-ratio: 16 / 8; object-position: 50% 47%; }
  .dashboard { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "map" "daily" "album"; }
}
@media (max-width: 430px) {
  .language label { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .language select { padding-inline: .55rem; font-size: .85rem; }
  .tiles { grid-template-columns: 1fr; }
  .fair-art { max-height: 9rem; }
  .actions { justify-items: stretch; }
  .choice { flex-wrap: wrap; }
}
