/* Layout: a rink drawn in light on a dark grid. Glowing cyan lines frame sections, an amber center line splits the page; one 64rem column. */
:root {
  --bg: #0b1118;
  --panel: #111a24;
  --panel-2: #152130;
  --ink: #dbe6ef;
  --muted: #8a9db0;
  --rule: #1f3142;
  --cyan: #5fd4e8;
  --cyan-dim: rgba(95, 212, 232, .18);
  --amber: #f0a64a;
  --amber-dim: rgba(240, 166, 74, .18);
  --win: #5fd4e8;
  --loss: #f08a6a;
  --display: "Chakra Petch", "Bahnschrift", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(95, 212, 232, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 212, 232, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
a { color: var(--cyan); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.wrap { max-width: 64rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; text-wrap: balance; margin: 0; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: 1.25rem; letter-spacing: .02em; }
p { margin: 0; max-width: 65ch; }
.label { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.placeholder { font-size: .8rem; color: var(--muted); font-style: italic; }

/* Top bar */
header.top { background: rgba(11, 17, 24, .88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
header.top .wrap { display: flex; align-items: center; gap: 1rem 1.5rem; padding-block: .7rem; flex-wrap: wrap; }
.mark { font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-decoration: none; color: var(--ink); letter-spacing: .12em; }
.mark span { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
nav { flex: 1; min-width: 0; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0; padding: 0; }
nav a { color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
nav a:hover { color: var(--cyan); }
.tab-private { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--amber); border: 1px solid var(--amber); border-radius: 4px; padding: .35rem .8rem; box-shadow: 0 0 12px var(--amber-dim), inset 0 0 8px var(--amber-dim); }
.tab-private:hover { background: var(--amber-dim); }
.tab-private svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.tab-private[aria-current="page"] { background: var(--amber-dim); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; padding-block: 4rem 3.25rem; }
.hero h1 { font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.hero h1 em { font-style: normal; display: block; color: var(--cyan); text-shadow: 0 0 18px rgba(95, 212, 232, .35); }
.hero .intro { display: grid; gap: 1.1rem; }
.hero .lede { font-size: 1.15rem; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.tags li { border: 1px solid var(--rule); color: var(--muted); padding: .2rem .7rem; border-radius: 3px; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 6px; border: 1px solid var(--cyan); box-shadow: 0 0 24px var(--cyan-dim), inset 0 0 30px var(--cyan-dim); background: radial-gradient(circle at 50% 38%, var(--panel-2) 0 22%, transparent 23%), radial-gradient(ellipse at 50% 100%, var(--panel-2) 0 45%, transparent 46%), var(--panel); display: grid; place-items: end center; padding: 1rem; position: relative; }
.portrait.has-photo { padding: 0; background: var(--panel); }
.portrait.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; display: block; }
.portrait::before, .portrait::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--cyan); }
.portrait::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.portrait::after { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }

/* Rink lines in light */
.line { height: 2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan), 0 0 22px var(--cyan-dim); opacity: .7; }
.line.red { background: var(--amber); box-shadow: 0 0 8px var(--amber), 0 0 22px var(--amber-dim); position: relative; opacity: .85; }
.line.red::after { content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid var(--amber); background: var(--bg); box-shadow: 0 0 10px var(--amber-dim); }

section.block .wrap { padding-block: 3.5rem; display: grid; gap: 1.75rem; }
.head { display: grid; gap: .5rem; }
.head p { color: var(--muted); }

/* Panels */
.panel, .family article, .builds article { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--rule); border-radius: 6px; }
.panel { padding: 1.25rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.family { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.family article { padding: 1.25rem; display: grid; gap: .4rem; align-content: start; }
.family article p { color: var(--muted); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; }
.gallery figure { margin: 0; display: grid; gap: .35rem; }
.shot { aspect-ratio: 3 / 2; max-width: 100%; border-radius: 4px; border: 1px solid var(--rule); filter: saturate(.85); }
.s1 { background: linear-gradient(170deg, #c98f55, #8e3f55 55%, #1d2340); }
.s2 { background: linear-gradient(180deg, #6f93ad, #b8c8d3 60%, #4c5a66); }
.s3 { background: linear-gradient(160deg, #1d3322, #4d6a39 50%, #a39463); }
.s4 { background: linear-gradient(200deg, #0d1424, #2a3a63 60%, #c79b45); }
.s5 { background: linear-gradient(180deg, #a8a197, #615a50 70%, #2c2823); }
.s6 { background: linear-gradient(135deg, #0a2a3f, #20708c 50%, #9fd2da); }
.shot.photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; filter: none; }
.gallery a { display: block; }
.gallery.collapsed figure:nth-child(n+9) { display: none; }
.more { display: block; margin: 1.25rem auto 0; padding: .65rem 1.4rem; font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); background: transparent; border: 1px solid var(--cyan); border-radius: 4px; cursor: pointer; box-shadow: 0 0 12px var(--cyan-dim); }
.more:hover { background: var(--cyan-dim); }
figcaption { font-family: var(--mono); font-size: .7rem; color: var(--muted); display: flex; flex-direction: column; gap: .15rem; }
figcaption span:first-child { color: var(--ink); }

/* Hockey */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.statline { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.statline div { padding: .6rem .25rem; border-left: 1px solid var(--rule); }
.statline div:first-child { border-left: 0; }
.statline b { display: block; font-family: var(--display); font-size: 1.9rem; font-weight: 600; line-height: 1; color: var(--cyan); font-variant-numeric: tabular-nums; }
.statline span { font-family: var(--mono); font-size: .68rem; color: var(--muted); letter-spacing: .08em; }
.tracks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); column-gap: 2rem; }
.tracks li { display: grid; grid-template-columns: 2rem 44px minmax(0, 1fr); gap: .75rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--rule); }
.tracks .rank { font-family: var(--mono); font-size: .8rem; color: var(--cyan); }
.tracks img { border-radius: 3px; display: block; }
.tracks a { color: inherit; text-decoration: none; min-width: 0; }
.tracks a:hover b { color: var(--cyan); }
.tracks b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracks a span { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.games-list { list-style: none; padding: 0; margin: 0; display: grid; }
.games-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--rule); }
.games-list li:first-child { border-top: 0; }
.games-list .label { white-space: nowrap; color: var(--muted); }
.pill { font-family: var(--mono); font-size: .7rem; padding: .1rem .5rem; border-radius: 3px; border: 1px solid currentColor; white-space: nowrap; align-self: center; }
.pill.w { color: var(--win); } .pill.l { color: var(--loss); }
tr.us td { color: var(--cyan); }

/* Tables and chart */
.tablebox { overflow-x: auto; }
.goals { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.goal-top { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.goal-top .num { font-family: var(--mono); color: var(--muted); font-size: .85rem; }
.goals small { display: block; margin-top: .3rem; font-size: .75rem; color: var(--muted); }
.meter { height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.statline.week { grid-template-columns: repeat(2, 1fr); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
td.num { font-family: var(--mono); }
.up { color: var(--cyan); font-family: var(--mono); font-size: .8rem; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
svg.chart .grid { stroke: var(--rule); stroke-width: 1; }
svg.chart .area { fill: var(--cyan); opacity: .1; }
svg.chart .ln { fill: none; stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 4px rgba(95, 212, 232, .6)); }
svg.chart .dot { fill: var(--amber); }

/* DIY */
.builds { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; }
.builds article { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.builds .shot { border-radius: 0; border: 0; border-bottom: 1px solid var(--rule); aspect-ratio: 16 / 9; }
.builds .body { padding: 1.25rem; display: grid; gap: .75rem; align-content: start; }
.builds .body > p { color: var(--muted); }
dl.specs { display: grid; grid-template-columns: auto 1fr; gap: .2rem 1rem; margin: 0; font-size: .9rem; }
dl.specs dt { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: .2rem; }
dl.specs dd { margin: 0; }

/* Private pages */
.lock { font-family: var(--mono); font-size: .72rem; color: var(--amber); text-transform: uppercase; letter-spacing: .14em; }
.cal { list-style: none; padding: 0; margin: 0; display: grid; }
.cal li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: .6rem 0; border-top: 1px solid var(--rule); }
.cal li:first-child { border-top: 0; }
.cal time { font-family: var(--mono); font-size: .85rem; color: var(--amber); }
.draft-banner { border: 1px dashed var(--amber); border-radius: 6px; padding: 1rem 1.25rem; color: var(--muted); display: grid; gap: .35rem; }
.draft-banner strong { color: var(--amber); font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; }
.status { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); border: 1px solid var(--amber); border-radius: 3px; padding: .05rem .45rem; justify-self: start; }

footer .wrap { padding-block: 2.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
footer code { font-family: var(--mono); color: var(--ink); user-select: all; }

@media (max-width: 760px) {
  .hero .wrap, .split { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 16rem; }
  nav { order: 3; flex-basis: 100%; }
}

/* Hidden arcade: the center-ice dot above the footer is a link. */
.coin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%; z-index: 1; animation: coin 2.6s ease-in-out infinite; }
.coin::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.coin:hover::after, .coin:focus-visible::after { background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
@keyframes coin { 0%, 100% { box-shadow: 0 0 0 0 var(--amber-dim); } 50% { box-shadow: 0 0 0 10px transparent, 0 0 18px var(--amber); } }
@media (prefers-reduced-motion: reduce) { .coin { animation: none; } }
.arena { position: relative; width: 100%; max-width: 640px; margin: 0 auto; border: 1px solid var(--cyan); border-radius: 6px; box-shadow: 0 0 24px var(--cyan-dim); overflow: hidden; }
.arena canvas { display: block; width: 100%; height: auto; touch-action: none; }
.overlay { position: absolute; inset: 0; display: grid; place-content: center; gap: .5rem; text-align: center; background: rgba(11, 17, 24, .72); }
.overlay[hidden] { display: none; }
.overlay .big { font-family: var(--display); font-size: clamp(1.5rem, 5vw, 2.4rem); text-transform: uppercase; letter-spacing: .06em; color: var(--cyan); text-shadow: 0 0 14px var(--cyan-dim); }
.overlay .more { margin-top: .5rem; }
.scoreline { display: flex; justify-content: center; gap: 2rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.scoreline b { font-size: 1.4rem; margin-left: .4rem; color: var(--ink); }
.pad { display: grid; grid-template-columns: repeat(3, 3.5rem); grid-template-areas: ". u ." "l d r"; gap: .4rem; justify-content: center; }
.pad button { height: 3.5rem; font-size: 1.1rem; color: var(--cyan); background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; touch-action: manipulation; }
.pad [data-dir="up"] { grid-area: u; } .pad [data-dir="left"] { grid-area: l; } .pad [data-dir="down"] { grid-area: d; } .pad [data-dir="right"] { grid-area: r; }
@media (hover: hover) and (pointer: fine) { .pad { display: none; } }

/* Bird sightings */
.birdlink { display: grid; gap: .2rem; margin-top: .5rem; padding: .9rem 1.1rem; border: 1px solid var(--rule); border-left: 3px solid var(--cyan); border-radius: 4px; color: var(--ink); text-decoration: none; background: var(--panel); }
.birdlink::after { content: "View the map →"; font-family: var(--mono); font-size: .75rem; color: var(--cyan); }
.birdlink:hover { border-color: var(--cyan); }
.statline.birdcount { grid-template-columns: repeat(2, 1fr); max-width: 28rem; }
.yard svg { width: 100%; height: auto; display: block; }
.yard .zone { fill: rgba(95, 212, 232, .04); stroke: var(--rule); }
.yard .field { fill: rgba(240, 166, 74, .05); }
.yard .house { fill: var(--panel-2); }
.yard .fence { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 2 8; }
.yard .spruce path { fill: rgba(95, 212, 232, .15); stroke: var(--cyan); stroke-width: 1; }
.yard .feeder { stroke: var(--muted); stroke-width: 2; fill: none; }
.yard .zlabel { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; fill: var(--muted); }
.yard .pin { fill: var(--cyan); stroke: var(--bg); stroke-width: 3; filter: drop-shadow(0 0 6px var(--cyan)); }
.yard .plabel { font-family: var(--display); font-size: 15px; font-weight: 600; fill: var(--ink); }
.yard a:hover .pin, .yard a:focus .pin { fill: var(--amber); }
.birds figure { scroll-margin-top: 5rem; }
.birds figure:target img { outline: 2px solid var(--cyan); outline-offset: 2px; }
.wishlist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.wishlist li { border: 1px dashed var(--rule); color: var(--muted); padding: .25rem .75rem; border-radius: 3px; font-family: var(--mono); font-size: .78rem; }

/* Kids corner */
.kids { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; }
.artwall { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; }
.frame { margin: 0; aspect-ratio: 4 / 5; border: 2px solid var(--amber); border-radius: 4px; box-shadow: 0 0 12px var(--amber-dim); overflow: hidden; background: var(--bg); }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame.empty { display: grid; place-items: center; text-align: center; padding: 1rem; border-style: dashed; box-shadow: none; color: var(--muted); font-size: .85rem; }
.favs { list-style: none; margin: 0; padding: 0; display: grid; }
.favs li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--rule); }
.favs li:first-child { border-top: 0; }
.favs span { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--amber); }
@media (max-width: 760px) { .kids { grid-template-columns: minmax(0, 1fr); } }

/* Books */
.books { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1rem; }
.book { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1.1rem; align-items: start; padding: 1.1rem; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--rule); border-radius: 6px; }
.book img, .cover-fallback { width: 6.5rem; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; border: 1px solid var(--rule); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); display: block; }
.cover-fallback { display: grid; place-items: center; padding: .5rem; text-align: center; font-family: var(--display); font-size: .85rem; line-height: 1.15; color: var(--cyan); background: var(--bg); border-color: var(--cyan); }
.book > div { display: grid; gap: .3rem; }
.book .by { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.book p:last-child { font-size: .95rem; color: var(--ink); }
.status { justify-self: start; font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: .1rem .5rem; }
.status.now { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 10px var(--amber-dim); }

/* Homepage background: a slow 3D light grid behind the page that tilts with the mouse or phone. */
.tron-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; perspective: 520px; background: radial-gradient(ellipse 90% 45% at 50% 52%, rgba(95,212,232,.05), transparent 70%), var(--bg); }
.tron-bg .floor, .tron-bg .ceil { position: absolute; left: -60%; width: 220%; height: 120%; transform-origin: 50% 0; will-change: transform, background-position;
  background-image: linear-gradient(rgba(95,212,232,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(95,212,232,.2) 1px, transparent 1px);
  background-size: 64px 64px; animation: tron-run 6s linear infinite; }
.tron-bg .floor { top: 52%; transform: rotateX(calc(78deg + var(--ty, 0deg))) rotateZ(var(--tx, 0deg)); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 70%, transparent); }
.tron-bg .ceil { bottom: 48%; transform-origin: 50% 100%; opacity: .18; transform: rotateX(calc(-78deg + var(--ty, 0deg))) rotateZ(calc(var(--tx, 0deg) * -1)); -webkit-mask-image: linear-gradient(to top, transparent, #000 40%, transparent); mask-image: linear-gradient(to top, transparent, #000 40%, transparent); }
@keyframes tron-run { to { background-position: 0 64px, 0 0; } }
@media (prefers-reduced-motion: reduce) { .tron-bg .floor, .tron-bg .ceil { animation: none; } }
body.grid-bg { background-image: none; }

/* Stick fight */
.playlink::after { content: "Play →"; }
.fight-setup { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.fight-setup[hidden] { display: none; }
.vs { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--amber); text-shadow: 0 0 12px var(--amber-dim); }
.pad-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.record { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.drawpad { display: block; width: 100%; max-width: 300px; height: auto; aspect-ratio: 3 / 4; margin: 0 auto; background: var(--bg); border: 1px dashed var(--cyan); border-radius: 6px; touch-action: none; cursor: crosshair; }
.drawpad.foe { border-color: var(--amber); border-style: solid; cursor: default; }
.statbars { display: grid; gap: .35rem; min-height: 4.6rem; }
.statbars div { display: grid; grid-template-columns: 4rem 1fr 2.5rem; gap: .6rem; align-items: center; font-family: var(--mono); font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.statbars i { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.statbars b { display: block; height: 100%; background: var(--cyan); }
.drawpad.foe ~ .statbars b { background: var(--amber); }
.statbars em { font-style: normal; color: var(--ink); text-align: right; }
.btnrow { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.btnrow .more { margin: 0; }
.ghost { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: none; border: 1px solid var(--rule); border-radius: 4px; padding: .4rem .9rem; cursor: pointer; }
.ghost:hover { color: var(--ink); border-color: var(--muted); }
.fight-btn { font-size: 1rem; padding: .8rem 2.6rem; margin-top: 0; color: var(--amber); border-color: var(--amber); box-shadow: 0 0 16px var(--amber-dim); }
.fight-btn:hover { background: var(--amber-dim); }
.fight-btn[hidden] { display: none; }
.hint { text-align: center; color: var(--amber); margin: 0 auto; min-height: 1.5em; }
.arena-wrap { position: relative; border: 1px solid var(--cyan); border-radius: 6px; overflow: hidden; box-shadow: 0 0 24px var(--cyan-dim); }
.arena-wrap[hidden] { display: none; }
.arena-wrap canvas { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .fight-setup { grid-template-columns: minmax(0, 1fr); } .vs { text-align: center; } }
@media (max-width: 640px) { .arena-wrap .overlay .btnrow { flex-direction: column; align-items: center; } }

/* Silent Paws (FMV game) */
.fmv { max-width: 760px; width: 100%; margin: 0 auto; display: grid; gap: .9rem; }
.screen { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; border-radius: 10px; border: 1px solid var(--cyan); box-shadow: 0 0 28px var(--cyan-dim), inset 0 0 60px #000; cursor: pointer; user-select: none; }
.screen > img, .screen > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: contrast(1.1) saturate(.75) sepia(.15); }
.screen > canvas { filter: none; }
.screen [hidden] { display: none !important; }
.tint { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; }
.tint.sea { background: linear-gradient(180deg, rgba(60, 150, 170, .55), rgba(10, 50, 80, .75)); }
.tint.deep { background: radial-gradient(ellipse 45% 50% at 35% 60%, rgba(255, 240, 190, .9), rgba(5, 25, 45, .95) 70%); }
.tint.red { background: rgba(200, 40, 40, .55); }
.tint.alarm { animation: alarm 1s steps(2) infinite; }
@keyframes alarm { 50% { background: rgba(220, 30, 30, .7); } }
.grain { position: absolute; inset: -50%; pointer-events: none; opacity: .14; animation: grain .5s steps(4) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
.scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .65)); }
@media (prefers-reduced-motion: reduce) { .grain, .tint.alarm { animation: none; } }
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .8rem; font-family: var(--mono); font-size: clamp(.6rem, 1.8vw, .78rem); letter-spacing: .1em; color: #7dffbf; text-shadow: 0 0 6px rgba(80, 255, 170, .6); background: linear-gradient(rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.hud b { font-weight: 500; }
.titlecard { position: absolute; inset: 0; display: grid; place-content: center; gap: .4rem; text-align: center; pointer-events: none; padding: 1rem; }
.titlecard span { font-family: var(--display); font-size: clamp(1.3rem, 5vw, 2.2rem); letter-spacing: .12em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 12px #000; opacity: 0; animation: fadein 1s forwards; }
.titlecard span + span { font-family: var(--body); font-size: clamp(.95rem, 3vw, 1.2rem); letter-spacing: .02em; text-transform: none; }
.titlecard .stamp { font-size: clamp(1.8rem, 7vw, 3rem); border: 3px solid; padding: .1rem 1rem; transform: rotate(-4deg); background: rgba(0, 0, 0, .55); }
.stamp.good { color: #7dffbf; } .stamp.bad { color: #ff6a5a; }
@keyframes fadein { to { opacity: 1; } }
.caption { position: absolute; left: 4%; right: 4%; bottom: 4%; padding: .7rem .9rem; background: rgba(0, 0, 0, .72); border: 1px solid rgba(255, 255, 255, .15); border-radius: 4px; font-size: clamp(.9rem, 2.6vw, 1.05rem); line-height: 1.45; color: #f2f2e8; min-height: 3.6em; }
.caption .who { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: .15rem; }
.caption .next { position: absolute; right: .6rem; bottom: .3rem; font-size: .7rem; color: var(--amber); animation: fadein .6s infinite alternate; }
.start { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .5rem; text-align: center; padding: 1rem; background: radial-gradient(ellipse at center, rgba(10, 40, 60, .85), rgba(0, 0, 0, .95)); cursor: default; }
.start .big { font-family: var(--display); font-size: clamp(2rem, 8vw, 3.4rem); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 20px var(--cyan-dim); }
.start .more { margin: .6rem 0 0; }
.start .small { font-size: .8rem; color: var(--muted); max-width: 34ch; }
.choices { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; min-height: 2.8rem; }
.choices .more { margin: 0; }
.fmv-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--mono); font-size: .75rem; color: var(--muted); }

/* Lincoln Log builds viewer */
.viewer { display: grid; gap: .8rem; }
.stage { position: relative; aspect-ratio: 4 / 3; max-height: 70vh; width: 100%; border: 1px solid var(--amber); border-radius: 8px; overflow: hidden; box-shadow: 0 0 22px var(--amber-dim);
  background: radial-gradient(ellipse at 50% 85%, rgba(240, 166, 74, .12), transparent 60%), radial-gradient(ellipse at center, var(--panel-2), var(--bg)); }
.stage .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 1rem; max-width: none; }
.stage model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
.spin { position: absolute; inset: 0; display: grid; place-items: center; cursor: grab; touch-action: none; outline: none; }
.spin:active { cursor: grabbing; }
.spin img { max-width: 92%; max-height: 92%; object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; transition: transform .08s linear; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .55)); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.viewer-bar .by { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.viewer-bar .ghost { min-width: 2.6rem; }
.build-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); gap: .6rem; }
.build-list button { display: grid; gap: .3rem; padding: .4rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; color: var(--ink); font: inherit; font-size: .85rem; cursor: pointer; text-align: left; }
.build-list button[aria-current="true"] { border-color: var(--amber); box-shadow: 0 0 10px var(--amber-dim); }
.build-list img, .build-list .glb { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--bg); border-radius: 4px; }
.build-list .glb { display: grid; place-items: center; font-family: var(--display); color: var(--amber); }
.buildlink::after { content: "Open the viewer →"; }

/* Phone fixes for the hockey card: keep stat values on one line, fit the standings without clipping. */
.statline b { white-space: nowrap; font-size: clamp(1.25rem, 5.6vw, 1.9rem); }
@media (max-width: 480px) {
  .statline div { padding-inline: .1rem; }
  .tablebox table { font-size: .85rem; }
  .tablebox th, .tablebox td { padding: .45rem .3rem; }
  .tablebox th:nth-child(6), .tablebox td:nth-child(6) { display: none; } /* ties column */
  .tablebox td:nth-child(2) { white-space: normal; }
}

/* Family activities reuse the book cards with a landscape photo */
.activities .book { grid-template-columns: 9rem minmax(0, 1fr); }
.activities .book img, .activities .cover-fallback { width: 9rem; aspect-ratio: 4 / 3; }
@media (max-width: 480px) { .activities .book { grid-template-columns: minmax(0, 1fr); } .activities .book img, .activities .cover-fallback { width: 100%; } }
