/* Site shell */
[hidden] { display: none !important; }
#view { overflow-x: clip; }
:root { --mono: var(--body); --ink: #23563f; --c1: #23563f; --c2: #23563f; --c3: #a9c4af; --c4: #cfdccb; --c5: #6f8f7a; --paperc: #f4f7ec; }
[data-mode="kid"] { --ink: #7a4a22; --c1: #3fae5a; --c2: #ef5b48; --c3: #ffc23d; --c4: #fff0d2; --c5: #4fb5e8; --paperc: #ffffff; }
.wrap { max-width: 1040px; margin: 0 auto; width: 100%; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
#stage { padding-block: 14px 36px; }
.narrow { max-width: 620px; width: 100%; margin: 0 auto; }
.wide { width: 100%; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 10px; }
.brand { background: none; border: 0; padding: 0; display: flex; align-items: baseline; gap: 7px; font: 400 1.15rem var(--display); color: var(--forest); }
.brand b { font-weight: 400; }
.brand span { font: 600 .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--sage); }
.back { background: none; border: 2px solid var(--line); border-radius: 8px; padding: 5px 11px; font-size: .84rem; font-weight: 700; color: var(--sage); white-space: nowrap; }
.back:hover { border-color: var(--forest); color: var(--forest); }
.mini { background: var(--btn); color: var(--btn-ink); border: 0; border-radius: 7px; padding: 6px 12px; font-weight: 800; font-size: .84rem; }
.agewrap { padding-block: clamp(24px, 6vh, 64px); }
.who { display: grid; gap: 8px; width: 100%; }
.who .field { text-align: center; font-size: 1.15rem; background: var(--white); }
.nudge { color: var(--coral); font-weight: 800; }
img.art { height: auto; display: block; user-select: none; }

.acts { display: flex; gap: 6px; }
.field { width: 100%; font: inherit; color: var(--pine); background: var(--paper); border: 2px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.report { max-width: 720px; width: 100%; margin: 0 auto; }
.growth { font-weight: 800; color: var(--forest); text-align: center; }
.tablewrap { overflow-x: auto; }
.rtable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rtable th { text-align: left; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--sage); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.rtable td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rtable td small { display: block; color: var(--sage); font-size: .78rem; }
.rtable tr.off td { color: var(--sage); }
@media print {
  #top, .noprint { display: none !important; }
  :root, [data-mode] { --paper: #fff; --white: #fff; --pine: #111; --forest: #111; --sage: #444; --line: #bbb; --mist: #eee; }
  body, #view { background: #fff !important; }
  .panel { border: 0; box-shadow: none !important; }
}

.finish { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; background: var(--white); border: 2px solid var(--forest); border-radius: 10px; }
.finish > div { flex: 1 1 220px; display: grid; min-width: 0; }
.finish b { font: 400 1.35rem/1.15 var(--display); color: var(--forest); }
.finish span { color: var(--sage); font-size: .9rem; }
.finish .btn { width: auto; flex: 0 1 auto; }
.town-stack { display: grid; gap: 16px; }
[data-mode="kid"] .finish { border-radius: 20px; border-color: #b77a3d; }
[data-mode="kid"] .finish span { color: var(--pine); }

/* Workshop path */
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.path li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: var(--white); min-width: 0; opacity: .72; }
.path li.now, .path li.done { opacity: 1; }
.path li.now { border-color: var(--forest); }
.path li > div { flex: 1; min-width: 0; line-height: 1.25; }
.path b { display: block; font-size: .95rem; }
.path li > div span { font-size: .8rem; color: var(--sage); }
.dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); color: var(--forest); font: 600 .82rem var(--mono); }
.done .dot { background: var(--forest); color: var(--white); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; }

/* 13 and up: a dark wall of game posters */
[data-mode="teen"] {
  --paper: #11141d; --white: #1a1f2c; --pine: #f1f3f7; --sage: #a2abbd; --mist: #272e3f; --line: #333b4e;
  --forest: #ffd23f; --coral: #ff7a5c; --sky: #2f7de1; --btn: #ffd23f; --btn-edge: #b48d10; --btn-ink: #14161f;
  --display: "Anton", "Arial Narrow", Impact, sans-serif; --bezel: #05060a; --c1: #14161f; --c2: #14161f; --c3: #ffffff; --c4: #ffffff; --c5: #14161f; --ink: #14161f; --paperc: #ffffff;
}
[data-mode="teen"] h1, [data-mode="teen"] h2, [data-mode="teen"] h3 { letter-spacing: .02em; font-weight: 400; }
[data-mode="teen"] h2 { font-size: clamp(1.7rem, 4.6vw, 2.3rem); text-transform: uppercase; }
[data-mode="teen"] h3 { font-size: 1.3rem; }
[data-mode="teen"] .brand { font-size: 1.25rem; color: var(--pine); text-transform: uppercase; }
[data-mode="teen"] .eyebrow { color: var(--forest); }
[data-mode="teen"] .panel { border-width: 1px; }
[data-mode="teen"] .choice.wrong, [data-mode="teen"] .tag.wrong, [data-mode="teen"] .bigcard.bad { background: #4c241f; }
[data-mode="teen"] .choice.right, [data-mode="teen"] .tag.right, [data-mode="teen"] .bigcard.good, [data-mode="teen"] .choice.on { background: #1f4634; color: #fff; border-color: #4fd08f; }
[data-mode="teen"] .choice.on small { color: #d5ecdf; }
[data-mode="teen"] .chip { background: #1f4634; color: #c9f3dc; } [data-mode="teen"] .chip.down { background: #4c241f; color: #ffc4b6; }
[data-mode="teen"] .flip.got { color: #fff; background: #1f4634; border-color: #1f4634; }
[data-mode="teen"] .icecv, [data-mode="teen"] #coinbox { border: 1px solid var(--line); }
.hero { padding-block: clamp(24px, 6vw, 58px) clamp(18px, 4vw, 34px); display: grid; gap: 12px; }
.hero h1 { font-size: clamp(3.6rem, 13vw, 8rem); line-height: .98; text-transform: uppercase; color: var(--pine); }
.hero em { font-style: normal; color: var(--forest); }
.hero p { max-width: 46ch; color: var(--sage); font-size: 1.1rem; }
.ticker { overflow: hidden; background: var(--forest); color: #14161f; transform: rotate(-.6deg) scale(1.02); }
.ticker div { display: flex; width: max-content; animation: slide 34s linear infinite; }
.ticker span { font: 400 1.05rem var(--display); letter-spacing: .05em; text-transform: uppercase; padding: 7px 26px; white-space: nowrap; }
.ticker span::after { content: "$"; margin-left: 52px; }
@keyframes slide { to { transform: translateX(-50%); } }
.wall { padding-block: 26px 36px; display: grid; gap: 20px; }
.posters { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 250px; gap: 12px; }
.poster { --bg: #2f7de1; position: relative; grid-column: span 3; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; text-align: left; padding: 13px 14px; border: 0; border-radius: 6px; background: var(--bg); color: #14161f; transition: transform .14s; min-width: 0; }
.poster:hover { transform: translateY(-4px) rotate(-.6deg); }
.poster:hover .art { transform: rotate(-3deg) scale(1.08); }
.poster .art { position: absolute; right: 10px; top: 28px; width: 46%; transition: transform .18s; }
.poster:not(.p-tree):not(.p-match):not(.p-coin) .title small { display: none; }
.meta { position: relative; display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.title { position: relative; display: grid; gap: 3px; }
.title b { font: 400 clamp(1.75rem, 3vw, 2.25rem)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.title small { font-size: .83rem; font-weight: 700; line-height: 1.25; }
.hs { position: absolute; left: 14px; top: 36px; background: #14161f; color: #ffd23f; font-size: .76rem; font-weight: 800; padding: 3px 9px; border-radius: 4px; }
.p-tree { grid-column: span 6; grid-row: span 2; --bg: #1fa463; color: #0d1f16; }
.p-tree .art { width: 62%; right: 5%; top: 30px; }
.p-tree .title b { font-size: clamp(3rem, 7.4vw, 5.6rem); }
.p-tree .title small { font-size: 1rem; max-width: 30ch; }
.p-stand { --bg: #ff6f4d; } .p-scam { --bg: #f5f5f0; } .p-deal { --bg: #ffc72e; } .p-need { --bg: #38b6ff; }
.p-guess, .p-match, .p-coin { grid-column: span 4; }
.p-match { --bg: #b892ff; } .p-coin { --bg: #ff9fc2; } .p-guess { --bg: #2fd3b5; }
.p-guess .title small, .p-match .title small, .p-coin .title small { display: none; }
.p-guess .art, .p-match .art, .p-coin .art { width: 44%; right: 12px; top: 34px; }
[data-mode="teen"] .path li { opacity: 1; }
[data-mode="teen"] .path li:not(.now):not(.done) b { color: var(--sage); }
[data-mode="teen"] .dot { font-family: var(--body); }
[data-mode="teen"] .seg { border-color: var(--line); background: var(--white); }
[data-mode="teen"] .seg button.on { color: var(--btn-ink); }

/* Under 13: Money Town */
[data-mode="kid"] body { background: #bfe9ff; }
[data-mode="kid"] #top { background: #bfe9ff; }
[data-mode="kid"] .brand span { font-family: var(--body); font-weight: 900; }
[data-mode="kid"] .back { background: var(--white); border-radius: 99px; }
[data-mode="kid"] .path li, [data-mode="kid"] .mini { border-radius: 16px; }
[data-mode="kid"] #view { background: linear-gradient(#bfe9ff, #e6f8ff 55%, #d8f5c8); min-height: 100vh; }
.town-head .buddy img { width: 118px; height: 118px; }
.sky { position: relative; overflow: hidden; }
.town-head { position: relative; padding-block: 8px 28px; display: grid; gap: 8px; justify-items: start; }
.town-head h1 { font-size: clamp(3.3rem, 12vw, 5.6rem); color: #ff7a2f; text-shadow: 0 4px 0 #fff; transform: rotate(-2deg); }
.sun { position: absolute; right: 7%; top: 16px; width: 88px; height: 88px; border-radius: 50%; background: #ffd24d; box-shadow: 0 0 0 16px rgba(255,210,77,.3); }
.cloud { position: absolute; width: 110px; height: 34px; border-radius: 30px; background: #fff; opacity: .9; }
.cloud::before { content: ""; position: absolute; left: 24px; top: -20px; width: 52px; height: 52px; border-radius: 50%; background: inherit; }
.c-a { right: 26%; top: 62px; } .c-b { right: 2%; top: 128px; transform: scale(.7); }
.town { background: #8fd465; padding-block: 16px 22px; border-top: 8px solid #6dbb48; }
.town-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.lot { position: relative; display: grid; justify-items: center; background: none; border: 0; padding: 0; transition: transform .14s; min-width: 0; }
.lot:hover { transform: translateY(-5px) rotate(-1deg); }
.lot .art { width: 100%; max-width: 200px; display: block; }
.sign { width: 100%; display: grid; gap: 1px; background: #fff8e6; border: 3px solid #b77a3d; border-radius: 14px; padding: 7px 9px; box-shadow: 0 4px 0 #8d5a2b; }
.sign b { font: 400 1.32rem/1.1 var(--display); color: #8a3f12; }
.sign small { font-size: .84rem; line-height: 1.25; font-weight: 700; color: var(--pine); }
.star { position: absolute; top: 4px; right: 0; background: #ffc23d; color: #4a2b00; font-size: .76rem; font-weight: 900; padding: 2px 9px; border-radius: 99px; transform: rotate(4deg); }
.below { padding-block: 18px 34px; display: grid; gap: 14px; }
[data-mode="kid"] .below .muted { color: var(--pine); }

/* Shared game pieces */
.treeimg { display: block; width: 100%; height: auto; transform-origin: 50% 100%; }
.treeimg.grow { animation: treepop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes treepop { from { transform: scale(.7); } to { transform: scale(1); } }
.ico { display: inline-block; width: 1.35em; height: 1.35em; margin-right: .3em; vertical-align: -.32em; object-fit: contain; }
.hi { text-align: center; color: var(--sage); font-size: .95rem; }
.stat span { white-space: nowrap; }
.pick3 .ico { display: block; width: 60px; height: 60px; margin: 0 0 6px; }
.opts [data-secs] .ico { display: block; width: 34px; height: 34px; margin: 0 auto 3px; }
.flip:not(.up):not(.got) { background: var(--pine) var(--back) center / contain no-repeat; }
[data-mode="teen"] .flip:not(.up):not(.got) { background-color: #272e3f; }
.record { background: var(--gold); color: #3b2400; font-weight: 800; padding: 4px 14px; border-radius: 99px; transform: rotate(-2deg); }
.hud { display: flex; justify-content: space-between; gap: 10px; font: 600 .95rem var(--mono); font-variant-numeric: tabular-nums; }
[data-mode="kid"] .hud { font-family: var(--body); font-weight: 900; }
.timebar { height: 12px; background: var(--mist); border-radius: 7px; overflow: hidden; }
.timebar i { display: block; height: 100%; background: var(--forest); }
.bigcard { min-height: 140px; display: grid; place-items: center; text-align: center; font: 400 clamp(1.6rem, 6vw, 2.4rem)/1.15 var(--display); color: var(--forest); padding: 14px; background: var(--paper); border-radius: 12px; }
.bigcard.good { background: var(--mist); } .bigcard.bad { background: #fbeae6; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.two .btn { font-size: 1.2rem; padding-block: 20px; }
.btn.alt { background: var(--sky); color: #fff; box-shadow: 0 4px 0 #1b6280; }
.fb { min-height: 3em; font-size: .95rem; color: var(--sage); text-align: center; }

.phone { max-width: 340px; width: 100%; margin: 0 auto; background: var(--bezel, var(--pine)); border-radius: 26px; padding: 14px 10px; }
.screen { background: #f2f4f7; color: #1e2733; border-radius: 16px; padding: 12px; min-height: 180px; display: grid; gap: 8px; align-content: start; }
.from { font-size: .8rem; font-weight: 800; color: #5b6675; }
.bubble { background: #fff; border-radius: 14px; padding: 10px 12px; font-size: .98rem; font-weight: 500; line-height: 1.4; }
mark { background: #ffd24d; color: inherit; border-radius: 3px; padding: 0 2px; }

.deals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tag { display: grid; gap: 4px; align-content: center; min-height: 140px; text-align: center; background: var(--paper); border: 2px dashed var(--forest); border-radius: 12px 12px 12px 40px; padding: 14px 8px; font-weight: 700; }
.tag:hover { background: var(--mist); }
.tag b { font: 400 1.5rem var(--display); color: var(--forest); }
.tag.right { background: var(--mist); border-style: solid; } .tag.wrong { background: #fbeae6; border-color: var(--coral); }

.board { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flip { aspect-ratio: 1 / .9; border-radius: 10px; border: 2px solid var(--forest); background: var(--forest); color: transparent; font-size: .8rem; font-weight: 700; line-height: 1.15; padding: 4px; overflow: hidden; display: grid; place-items: center; }
.flip.term { font: 400 .98rem/1.1 var(--display); }
.flip.up { background: var(--white); color: var(--pine); }
.flip.got { background: var(--mist); color: var(--forest); border-color: var(--mist); }

.icegame { max-width: 760px; margin: 0 auto; width: 100%; }
.icecv { display: block; width: 100%; aspect-ratio: 12 / 7; border-radius: 12px; background: #83cdf3; }
[data-mode="kid"] .icecv { border-radius: 20px; }
.pick { display: grid; gap: 6px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts .choice { width: auto; flex: 1 1 64px; text-align: center; padding: 10px 6px; }
.live { display: flex; justify-content: space-between; gap: 12px; font: 400 1.3rem var(--display); color: var(--forest); font-variant-numeric: tabular-nums; }

.pricetag { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 14px 12px; background: var(--paper); border: 2px dashed var(--line); border-radius: 12px; }
.pgicon { font-size: 3.4rem; line-height: 1.15; }
.pgvalue { text-align: center; font: 400 clamp(2.3rem, 9vw, 3.2rem)/1.1 var(--display); color: var(--forest); font-variant-numeric: tabular-nums; }
.reveal { display: grid; justify-items: center; }
.reveal b { font: 400 clamp(2.6rem, 11vw, 3.8rem)/1.1 var(--display); color: var(--forest); font-variant-numeric: tabular-nums; }
.pgline { position: relative; height: 8px; margin: 26px 16px 8px; background: var(--mist); border-radius: 4px; }
.pgline i { position: absolute; top: -5px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 3px solid var(--white); }
.pgline .you { background: var(--sky); } .pgline .real { background: var(--coral); }
.pgline span { position: absolute; left: 50%; transform: translateX(-50%); font: 800 .72rem var(--body); font-style: normal; color: var(--sage); }
.pgline .you span { top: -21px; } .pgline .real span { top: 19px; }
.pgres { display: grid; justify-items: center; text-align: center; padding-top: 8px; }
.pgres b { font: 400 1.6rem var(--display); color: var(--forest); }
.pgres span { color: var(--sage); font-size: .92rem; }
#coinbox { width: 100%; display: block; aspect-ratio: 3 / 2.2; touch-action: none; border-radius: 12px; background: var(--mist); }

@media (prefers-reduced-motion: reduce) { .ticker div { animation: none; } }
@media (max-width: 760px) {
  .path { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .finish .btn { width: 100%; flex-basis: 100%; }
  .brand span { display: none; }
  .back { padding: 5px 8px; font-size: .78rem; }
  .posters { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 214px; gap: 9px; }
  .poster, .p-match, .p-coin { grid-column: span 1; }
  .p-guess { grid-column: span 2; }
  .p-guess .art { width: 36%; right: 16px; top: 22px; }
  .p-tree { grid-column: span 2; grid-row: span 2; }
  .p-tree .title b { font-size: 3.1rem; }
  .p-tree .art { width: 70%; right: 15%; top: 34px; }
  .title small { font-size: .78rem; }
  .poster .art { width: 60%; right: 8px; top: 26px; }
  .town-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .sun { width: 58px; height: 58px; right: 5%; } .cloud { display: none; }
  .board { gap: 5px; } .flip { font-size: .68rem; } .flip.term { font-size: .82rem; }
}
