/* MJL PRODUCTIONS - website styles.
   Colours, corner roundness, spacing and text size come from the theme in data/content.js
   (Dev Mode > Appearance), written onto :root as CSS variables by js/app.js. */

@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(../fonts/BarlowCondensed-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(../fonts/BarlowCondensed-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(../fonts/Barlow-400.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(../fonts/Barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(../fonts/Barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Share Tech Mono"; font-display: swap; src: url(../fonts/ShareTechMono-400.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-display: swap; src: url(../fonts/Caveat.woff2) format("woff2"); }
@font-face { font-family: "Schoolbell"; font-display: swap; src: url(../fonts/Schoolbell.woff2) format("woff2"); }

:root {
  --bg: #0b0d12; --surface: #151923; --text: #f3efe6; --muted: #9aa3b4;
  --accent: #ffb21a; --hot: #ff4f3a; --ok: #3ddc97; --power: #a184ff; --cool: #4cc9f0;
  --page: var(--accent);
  --radius: 14px; --sp: 1; --fs: 1;
  --surface-2: color-mix(in srgb, var(--surface) 86%, #fff);
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --line-2: color-mix(in srgb, var(--text) 18%, transparent);
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Share Tech Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 44px);
  --top: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 calc(17px * var(--fs)) / 1.55 var(--body);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body::before { /* page-accent glow + fine grain, fixed behind everything */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -6%, color-mix(in srgb, var(--page) 16%, transparent), transparent 70%),
    radial-gradient(700px 600px at 100% 110%, color-mix(in srgb, var(--cool) 9%, transparent), transparent 70%),
    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%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transition: background .6s;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--page); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--page); color: #111; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: #111; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 8px; }
.noscript { padding: 40px; text-align: center; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: var(--top);
  display: flex; align-items: center; gap: 22px; padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-block {
  position: relative; display: grid; place-items: center; width: 50px; height: 34px;
  background: linear-gradient(180deg, #3a3f4b, #23272f); border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -3px 0 rgba(0,0,0,.4), 0 3px 0 #0a0b0e;
  font: 700 19px/1 var(--display); letter-spacing: .04em; color: var(--accent);
  transition: transform .25s var(--bounce);
}
.logo-block::after { content: ""; position: absolute; inset: 3px; border-radius: 4px; border: 1px dashed rgba(255,178,26,.28); }
.logo:hover .logo-block { transform: translateY(-2px) rotate(-3deg); }
.logo-word { font: 700 17px/1 var(--display); letter-spacing: .22em; }
.tabs { display: flex; gap: 4px; margin-left: auto; position: relative; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none; padding: 9px 13px; border-radius: 9px; text-decoration: none;
  font: 600 15px/1 var(--display); letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
  transition: color .2s, background .2s;
}
.tab:hover { color: var(--text); background: var(--line); }
.tab[aria-current="page"] { color: var(--text); }
.tab-ink {
  position: absolute; bottom: 2px; height: 3px; border-radius: 3px; background: var(--page);
  box-shadow: 0 0 14px var(--page); transition: transform .45s var(--ease), width .45s var(--ease), background .4s;
  left: 0; pointer-events: none;
}
.dev-chip {
  position: fixed; left: 14px; bottom: 14px; z-index: 60; padding: 8px 12px; border-radius: 10px;
  background: #1d2230; border: 1px solid var(--line-2); font: 13px var(--mono); text-decoration: none; color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.dev-chip:hover { background: #262c3d; }

/* ---------- shared type + buttons ---------- */
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 400 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--page); }
.kicker::before { content: ""; width: 22px; height: 10px; background: var(--page); border-radius: 2px; box-shadow: 0 0 12px var(--page); }
.h1 { font: 700 clamp(46px, 7vw, 96px)/.92 var(--display); letter-spacing: .01em; text-transform: uppercase; margin: 14px 0 0; text-wrap: balance; }
.h2 { font: 700 clamp(34px, 4.6vw, 60px)/.95 var(--display); text-transform: uppercase; margin: 12px 0 0; text-wrap: balance; }
.lede { font-size: calc(19px * var(--fs)); color: color-mix(in srgb, var(--text) 78%, var(--muted)); max-width: 62ch; margin: 16px 0 0; text-wrap: pretty; }
.btn {
  --c: var(--page);
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px 11px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--c); color: #12100c; text-decoration: none; white-space: nowrap;
  font: 700 16px/1 var(--display); letter-spacing: .1em; text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 4px 0 color-mix(in srgb, var(--c) 45%, #000), 0 10px 24px -8px color-mix(in srgb, var(--c) 70%, transparent);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 0 color-mix(in srgb, var(--c) 45%, #000), 0 16px 30px -8px color-mix(in srgb, var(--c) 70%, transparent); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 0 color-mix(in srgb, var(--c) 45%, #000); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line-2); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--page); }
.btn[aria-disabled="true"] { background: #3a3f4b; color: var(--muted); box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------- badges ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 3px; border-radius: 6px;
  font: 400 11.5px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  background: color-mix(in srgb, var(--b, var(--muted)) 14%, transparent); color: color-mix(in srgb, var(--b, var(--muted)) 75%, #fff);
  border: 1px solid color-mix(in srgb, var(--b, var(--muted)) 30%, transparent);
}
.badge svg { width: 12px; height: 12px; flex: none; }
.badge.chromebook { --b: var(--ok); }
.badge.threed { --b: var(--power); }
.badge.ok { --b: var(--ok); }
.badge.blocked { --b: var(--hot); }
.badge.unknown { --b: var(--muted); }
.badge.tag { --b: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; }

/* ---------- cards ---------- */
.grid { display: grid; gap: calc(22px * var(--sp)); grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  animation: card-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }
[data-cards="block"] .card { box-shadow: 0 7px 0 color-mix(in srgb, var(--surface) 55%, #000), 0 18px 34px -18px rgba(0,0,0,.8); }
[data-cards="block"] .card:hover { transform: translateY(-5px); box-shadow: 0 12px 0 color-mix(in srgb, var(--surface) 55%, #000), 0 30px 44px -20px rgba(0,0,0,.85), 0 0 0 1px color-mix(in srgb, var(--page) 45%, transparent); }
[data-cards="outline"] .card { background: transparent; border: 2px solid var(--line-2); }
[data-cards="outline"] .card:hover { border-color: var(--page); transform: translateY(-3px); }
[data-cards="flat"] .card { border-color: transparent; }
[data-cards="flat"] .card:hover { background: var(--surface-2); }
[data-cards="glass"] .card { background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--line-2); }
[data-cards="glass"] .card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--page) 55%, transparent); }
.cover {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #1b1f2a;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; }
.card:hover .cover img { transform: scale(1.05); }
.cover::after { /* sheen sweep */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.16) 50%, transparent 65%);
  transform: translateX(-110%); transition: transform .9s var(--ease);
}
.card:hover .cover::after { transform: translateX(110%); }
.cover-play {
  position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px 6px; border-radius: 8px; background: rgba(8,9,12,.78); color: #fff;
  font: 700 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease);
}
.cover-play svg { width: 12px; height: 12px; }
.card:hover .cover-play, .cover:focus-visible .cover-play { opacity: 1; transform: none; }
.art { /* generated cover when there is no picture */
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    linear-gradient(135deg, hsl(var(--h1) 70% 46%), hsl(var(--h2) 65% 22%));
}
.art::before {
  content: ""; position: absolute; inset: -40%;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 18px, transparent 18px 36px);
  transform: rotate(var(--rot, 0deg));
}
.art span { position: relative; font: 700 clamp(40px, 7vw, 68px)/1 var(--display); letter-spacing: .02em; color: rgba(255,255,255,.92); text-shadow: 0 6px 0 rgba(0,0,0,.25); }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: calc(16px * var(--sp)) calc(18px * var(--sp)) calc(18px * var(--sp)); flex: 1; }
.card-title { margin: 0; font: 700 calc(25px * var(--fs))/1 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.card-title a { text-decoration: none; }
.card-title a:hover { color: var(--page); }
.card-desc { margin: 0; color: color-mix(in srgb, var(--text) 74%, var(--muted)); font-size: calc(15.5px * var(--fs)); line-height: 1.5; }
.card-desc.empty { color: var(--muted); font-style: italic; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 6px; }
.host { font: 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.warn {
  display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 9px;
  background: color-mix(in srgb, var(--hot) 12%, transparent); border: 1px solid color-mix(in srgb, var(--hot) 35%, transparent);
  color: color-mix(in srgb, var(--hot) 35%, #fff); font-size: calc(13.5px * var(--fs)); line-height: 1.4;
}
.warn svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--hot); }
.card.is-blocked .cover::before { /* hazard tape corner */
  content: "SCHOOL BLOCKS THIS HOST"; position: absolute; z-index: 2; top: 16px; right: -46px; width: 200px; transform: rotate(35deg);
  background: repeating-linear-gradient(-45deg, var(--hot) 0 10px, #2a0d09 10px 20px); color: #fff;
  font: 700 9.5px/18px var(--display); letter-spacing: .12em; text-align: center; text-shadow: 0 1px 2px #000;
}
.card.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 20%, 60% { box-shadow: 0 0 0 4px var(--page), 0 0 40px var(--page); } }

/* ---------- library pages ---------- */
.page { padding: calc(54px * var(--sp)) 0 calc(80px * var(--sp)); animation: page-in .5s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } }
.page-head { display: grid; gap: 4px; margin-bottom: calc(30px * var(--sp)); }
.page-head .count { font: 13px var(--mono); color: var(--muted); margin-top: 12px; }
.toolbar {
  position: sticky; top: calc(var(--top) + 10px); z-index: 20; display: grid; gap: 12px;
  padding: 14px; margin-bottom: calc(28px * var(--sp)); border-radius: calc(var(--radius) + 4px);
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 16px 40px -24px rgba(0,0,0,.9);
}
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 92px 0 44px; border-radius: 11px; border: 2px solid var(--line);
  background: var(--bg); font-size: 17px; transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--page); box-shadow: 0 0 0 4px color-mix(in srgb, var(--page) 20%, transparent); }
.search input::-webkit-search-cancel-button { display: none; }
.search .kbd { position: absolute; right: 12px; font: 12px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 7px; }
.search .clear { position: absolute; right: 8px; height: 34px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--line); cursor: pointer; font-size: 13px; }
.search .clear:hover { background: var(--line-2); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.fgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fgroup-label { font: 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; font-size: 14px; font-weight: 500; color: color-mix(in srgb, var(--text) 85%, var(--muted));
  transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease);
}
.chip:hover { border-color: var(--page); color: var(--text); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--page); border-color: var(--page); color: #12100c; font-weight: 600; }
.chip .n { font: 11px var(--mono); opacity: .7; }
.filters .reset { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.filters .reset:hover { color: var(--text); }
.filters select { height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); padding: 0 8px; font-size: 14px; }
.empty-state { display: grid; justify-items: center; gap: 14px; padding: 70px 20px; text-align: center; color: var(--muted); border: 2px dashed var(--line-2); border-radius: calc(var(--radius) + 4px); }
.empty-state .big { font: 700 34px/1 var(--display); text-transform: uppercase; color: var(--text); }
.group-head { display: flex; align-items: baseline; gap: 14px; margin: calc(34px * var(--sp)) 0 calc(16px * var(--sp)); }
.group-head:first-child { margin-top: 0; }
.group-head h2 { margin: 0; font: 700 30px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.group-head p { margin: 0; color: var(--muted); font-size: 15px; }
mark { background: color-mix(in srgb, var(--page) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- websites directory ---------- */
.page-websites .card { flex-direction: row; }
.page-websites .cover { flex: 0 0 42%; aspect-ratio: auto; min-height: 100%; border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px); }
.page-websites .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 470px), 1fr)); }
.page-websites .art span { font-size: 44px; }
@media (max-width: 560px) { .page-websites .card { flex-direction: column; } .page-websites .cover { aspect-ratio: 16/9; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; } }

/* ---------- classic games: cartridges ---------- */
.page-classic .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 232px), 1fr)); gap: calc(26px * var(--sp)) calc(20px * var(--sp)); }
.cart {
  --c: hsl(var(--h1) 72% 55%);
  position: relative; display: flex; flex-direction: column; padding: 30px 12px 14px; min-width: 0;
  background: linear-gradient(180deg, #2b2f3a, #1d2029 60%, #181a22);
  clip-path: polygon(0 14px, 14px 0, 38% 0, 42% 10px, 58% 10px, 62% 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), inset 0 -6px 0 rgba(0,0,0,.35);
  transition: transform .35s var(--bounce), filter .3s;
  animation: card-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms);
}
.cart:hover { transform: translateY(-8px) rotate(-.8deg); filter: drop-shadow(0 18px 22px rgba(0,0,0,.55)); }
.cart::before { /* grip ridges */
  content: ""; position: absolute; left: 14px; right: 14px; top: 16px; height: 6px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.1) 0 2px, transparent 2px 7px);
}
.cart-no { position: absolute; top: 5px; left: 18px; font: 12px var(--mono); color: var(--c); letter-spacing: .1em; }
.cart-label { position: relative; border-radius: 8px; overflow: hidden; background: var(--c); padding: 6px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); }
.cart-label .cover { border-radius: 4px; aspect-ratio: 4 / 3; }
.cart-label .cover img { filter: saturate(1.1) contrast(1.05); }
.cart-label h3 { margin: 7px 2px 2px; font: 700 calc(19px * var(--fs))/1.02 var(--display); text-transform: uppercase; color: #111; letter-spacing: .02em; min-height: 2.04em; }
.cart-label h3 a { text-decoration: none; }
.cart .card-desc { font-size: calc(14px * var(--fs)); margin: 12px 2px 0; }
.cart .badges { margin: 10px 2px 0; }
.cart .warn { margin-top: 10px; font-size: 12.5px; }
.cart .card-foot { padding: 12px 2px 0; }
.cart .btn { padding: 10px 14px 9px; font-size: 14px; --c: var(--page); }
.cart-slot { position: absolute; bottom: 0; left: 30%; right: 30%; height: 5px; background: #0c0d11; border-radius: 3px 3px 0 0; }

/* ---------- old games: the archive ---------- */
.archive { position: relative; display: grid; gap: calc(26px * var(--sp)); padding-left: 38px; }
.archive::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; background: linear-gradient(var(--page), color-mix(in srgb, var(--page) 15%, transparent)); border-radius: 3px; }
.file { position: relative; display: grid; grid-template-columns: minmax(0, 300px) 1fr; background: color-mix(in srgb, var(--page) 9%, var(--surface)); border-radius: 4px var(--radius) var(--radius) var(--radius); border: 1px solid color-mix(in srgb, var(--page) 22%, transparent); animation: card-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.file::before { content: ""; position: absolute; left: -33px; top: 26px; width: 17px; height: 17px; border-radius: 4px; background: var(--bg); border: 3px solid var(--page); }
.file-tab { position: absolute; top: -26px; left: -1px; height: 27px; padding: 0 16px; display: flex; align-items: center; font: 12.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--page); background: color-mix(in srgb, var(--page) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--page) 22%, transparent); border-bottom: 0; border-radius: 8px 8px 0 0; }
.file .cover { aspect-ratio: auto; height: 100%; min-height: 190px; border-radius: 3px 0 0 var(--radius); }
.file .cover img { filter: sepia(.65) saturate(.7) contrast(1.05) brightness(.9); }
.file:hover .cover img { filter: none; }
.file .art { filter: sepia(.6) saturate(.6); }
.file-body { position: relative; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.stamp { position: absolute; right: 18px; top: 16px; padding: 4px 10px 3px; border: 3px double color-mix(in srgb, var(--hot) 80%, #fff); color: color-mix(in srgb, var(--hot) 80%, #fff); font: 700 15px/1 var(--display); letter-spacing: .2em; transform: rotate(-7deg); opacity: .78; border-radius: 4px; }
.file h3 { margin: 0; padding-right: 110px; font: 700 calc(28px * var(--fs))/1 var(--display); text-transform: uppercase; }
.file .version { font: 13px var(--mono); color: var(--page); letter-spacing: .08em; }
.newer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 9px; background: var(--bg); border: 1px dashed var(--line-2); font-size: 14.5px; }
.newer a { color: var(--page); font-weight: 600; }
.newer svg { width: 18px; height: 18px; color: var(--page); flex: none; }
@media (max-width: 700px) { .file { grid-template-columns: 1fr; } .file .cover { min-height: 0; aspect-ratio: 16/9; border-radius: 3px var(--radius) 0 0; } .archive { padding-left: 26px; } .file::before { left: -24px; } .archive::before { left: 5px; } }

/* ---------- game submissions ---------- */
.ideas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(28px, 5vw, 70px); align-items: start; }
@media (max-width: 920px) { .ideas { grid-template-columns: 1fr; } }
.ideas .h1 { font-size: clamp(42px, 6vw, 80px); }
.notes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.note { padding: 14px 16px 12px; width: 200px; background: #fff3a8; color: #2b2410; font: 23px/1.1 "Caveat", "Comic Sans MS", cursive; border-radius: 2px; box-shadow: 0 10px 18px -8px rgba(0,0,0,.6); transform: rotate(var(--r)); transition: transform .3s var(--bounce); }
.note:nth-child(2) { background: #c8f1ff; } .note:nth-child(3) { background: #ffd6e7; }
.note:hover { transform: rotate(0) scale(1.04); }
.promise { margin-top: 26px; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.promise div { display: flex; gap: 10px; align-items: flex-start; }
.promise svg { width: 18px; height: 18px; flex: none; color: var(--page); margin-top: 2px; }
.idea-card {
  position: relative; padding: 30px 28px 26px; border-radius: 6px 6px var(--radius) var(--radius);
  background:
    linear-gradient(90deg, transparent 52px, rgba(255,90,90,.35) 52px 54px, transparent 54px),
    repeating-linear-gradient(transparent 0 33px, rgba(70,130,220,.22) 33px 34px),
    #fbf8ef;
  color: #1d1b16; box-shadow: 0 26px 50px -24px rgba(0,0,0,.9), 0 8px 0 #c9c1ab;
  transform-origin: 50% 100%;
}
.idea-card::before { content: ""; position: absolute; top: -14px; left: 50%; width: 120px; height: 28px; margin-left: -60px; background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.06); transform: rotate(-2deg); }
.idea-card label { display: block; padding-left: 38px; font: 700 15px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #6b6352; margin-bottom: 8px; }
.idea-card input, .idea-card textarea {
  width: 100%; border: 0; background: transparent; color: #1d1b16; padding: 0 0 0 38px;
  font: 27px/34px "Caveat", "Comic Sans MS", cursive;
}
.idea-card input { height: 34px; margin-bottom: 26px; }
.idea-card textarea { min-height: 238px; resize: vertical; }
.idea-card input::placeholder, .idea-card textarea::placeholder { color: #a59d8a; }
.idea-card input:focus, .idea-card textarea:focus { outline: none; }
.idea-card .field:focus-within label { color: #c0392b; }
.idea-card .meta { display: flex; justify-content: space-between; gap: 12px; padding-left: 38px; font: 12px var(--mono); color: #8a826e; margin-top: 4px; }
.idea-card .send { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; padding-left: 38px; }
.idea-card .btn { --c: #1fbf7a; color: #062014; }
.idea-card .fine { font-size: 13px; color: #6b6352; max-width: 30ch; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-top: 16px; padding: 12px 14px; border-radius: 10px; font-size: 15px; display: none; }
.form-msg.show { display: block; animation: page-in .4s var(--ease); }
.form-msg.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.form-msg.bad { background: color-mix(in srgb, var(--hot) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--hot) 45%, transparent); }
.idea-box { position: relative; margin: 34px auto 0; width: 230px; height: 120px; }
.idea-box .box { position: absolute; inset: 26px 0 0; border-radius: 8px; background: linear-gradient(180deg, #d79a4a, #a86d2a); box-shadow: inset 0 -10px 0 rgba(0,0,0,.18), 0 14px 26px -10px rgba(0,0,0,.7); display: grid; place-items: center; font: 700 22px/1 var(--display); letter-spacing: .2em; color: #4a2a0a; }
.idea-box .slot { position: absolute; top: 34px; left: 40px; right: 40px; height: 9px; background: #2a1606; border-radius: 6px; }
.idea-card.sending { animation: post 1s var(--ease) forwards; }
@keyframes post { 30% { transform: translateY(-14px) rotate(-1deg); } 100% { transform: translateY(160px) scale(.25); opacity: 0; } }
.idea-card.back { animation: back .6s var(--bounce); }
@keyframes back { from { transform: translateY(40px) scale(.9); opacity: 0; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px var(--gutter) 46px; display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14px; position: relative; z-index: 2; background: color-mix(in srgb, var(--bg) 92%, transparent); }
.footer strong { font: 700 18px/1 var(--display); letter-spacing: .16em; color: var(--text); }
.footer p { margin: 6px 0 0; max-width: 60ch; }
.footer a { color: var(--muted); }

/* ================= HOME ================= */
.home section { position: relative; }
.globe-layer {
  position: fixed; z-index: 1; pointer-events: none; top: 0; left: 0; width: 100vw; height: 100vh;
  opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility .7s;
}
.globe-layer.on { opacity: 1; visibility: visible; }
.globe-layer canvas { position: absolute; left: 0; top: 0; pointer-events: none; will-change: transform, opacity; opacity: 0; }
.globe-hud {
  position: absolute; display: grid; gap: 3px; text-align: center; transform: translate(-50%, 0);
  font: 12px/1.25 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cool);
  transition: left .9s var(--ease), top .9s var(--ease), opacity .5s;
  text-shadow: 0 0 10px color-mix(in srgb, var(--cool) 60%, transparent);
}
.globe-hud .hud-label { opacity: .7; }
.globe-hud .hud-place { color: var(--text); font-size: 13px; }
.globe-hud .hud-coords { opacity: .8; }
.home .wrap.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); gap: 40px; }
.home .wrap.split > .col { grid-column: 1; }
@media (max-width: 980px) { .home .wrap.split { grid-template-columns: 1fr; } }

.hero { min-height: calc(100vh - var(--top)); display: flex; align-items: center; padding: 40px 0 80px; }
.hero-title { margin: 22px 0 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: .82; }
.hero-title .l1 { display: block; font-size: clamp(110px, 17vw, 236px); letter-spacing: -.01em; color: var(--accent); }
.hero-title .l2 { display: block; font-size: clamp(38px, 5.6vw, 78px); letter-spacing: .14em; margin-top: 8px; }
.hero-title .ch { display: inline-block; animation: drop .9s var(--bounce) both; animation-delay: calc(var(--d) * 70ms + 120ms); }
.hero-title .l1 .ch { text-shadow: 0 .045em 0 color-mix(in srgb, var(--accent) 40%, #000), 0 .09em 0 color-mix(in srgb, var(--accent) 22%, #000), 0 .2em .25em rgba(0,0,0,.45); }
@keyframes drop { 0% { opacity: 0; transform: translateY(-120%) rotate(var(--rr, -8deg)); } 55% { opacity: 1; transform: translateY(6%) rotate(0); } 75% { transform: translateY(-3%); } 100% { transform: none; } }
.hero .lede { font-size: clamp(19px, 2vw, 23px); max-width: 34ch; margin-top: 26px; animation: page-in .8s var(--ease) .8s both; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; animation: page-in .8s var(--ease) 1s both; }
.scroll-cue { margin-top: 56px; display: inline-flex; align-items: center; gap: 12px; font: 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); animation: page-in .8s var(--ease) 1.3s both; }
.scroll-cue i { position: relative; width: 22px; height: 34px; border: 2px solid var(--line-2); border-radius: 12px; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 6px; width: 6px; height: 6px; margin-left: -3px; background: var(--accent); border-radius: 1px; animation: cue 1.6s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

.band { padding: calc(110px * var(--sp)) 0; }
.coll-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
@media (max-width: 560px) { .coll-grid { grid-template-columns: 1fr; } }
.coll {
  position: relative; display: grid; gap: 8px; padding: 22px 22px 20px; min-height: 178px; border-radius: calc(var(--radius) + 2px); overflow: hidden;
  text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 7px 0 color-mix(in srgb, var(--surface) 55%, #000);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  animation: card-in .6s var(--ease) both; animation-delay: calc(var(--i) * 80ms);
}
.coll:hover { transform: translateY(-5px); box-shadow: 0 12px 0 color-mix(in srgb, var(--surface) 55%, #000), 0 0 0 1px var(--c); }
.coll .num { font: 700 64px/.8 var(--display); color: var(--c); }
.coll .name { font: 700 24px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.coll .sub { color: var(--muted); font-size: 14.5px; line-height: 1.4; }
.coll .go { position: absolute; right: 18px; top: 20px; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); transition: transform .3s var(--bounce); }
.coll:hover .go { transform: translateX(4px) rotate(-8deg); }
.coll .go svg { width: 18px; height: 18px; }
.coll .stack { position: absolute; right: -16px; bottom: -22px; display: flex; opacity: .5; transform: rotate(-10deg); transition: opacity .3s, transform .5s var(--ease); }
.coll:hover .stack { opacity: .9; transform: rotate(-6deg) translateY(-6px); }
.coll .stack img, .coll .stack .mini { width: 92px; height: 56px; object-fit: cover; border-radius: 6px; margin-left: -46px; box-shadow: 0 6px 14px rgba(0,0,0,.5); border: 2px solid var(--surface); }
.coll .stack .mini { background: linear-gradient(135deg, hsl(var(--h1) 70% 46%), hsl(var(--h2) 65% 22%)); }

/* school scene */
.school { height: 330vh; }
.school-stage { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: hidden; background: #0d1118; }
.school-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.school-caps { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; }
.cap {
  position: absolute; left: 50%; width: min(92%, 980px); transform: translate(-50%, 20px); text-align: center; opacity: 0;
  font: 700 clamp(34px, 5.4vw, 76px)/.95 var(--display); text-transform: uppercase; letter-spacing: .01em;
  text-shadow: 0 4px 0 rgba(0,0,0,.35), 0 10px 40px rgba(0,0,0,.6); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.cap.on { opacity: 1; transform: translate(-50%, 0); }
.cap-1 { top: 9%; color: #e9eef7; }
.cap-2 { top: auto; bottom: 3.5%; color: var(--accent); font-size: clamp(38px, 5.6vw, 84px); }
.school-caps::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: linear-gradient(transparent, rgba(6,8,12,.55)); opacity: var(--cap2, 0); transition: opacity .6s; pointer-events: none; z-index: -1; }
.cap-2 small { display: block; margin-top: 14px; font: 500 clamp(15px, 1.6vw, 19px)/1.4 var(--body); text-transform: none; letter-spacing: 0; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.school-skip { position: absolute; right: 16px; bottom: 16px; pointer-events: auto; transition: opacity .3s, visibility .3s; font: 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.35); color: #fff; cursor: pointer; text-decoration: none; }
.school-skip:hover { background: rgba(0,0,0,.6); }
.school-progress { position: absolute; left: 16px; bottom: 18px; width: 120px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.15); overflow: hidden; }
.school-progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }
.school.static { height: auto; }
.school.static .school-stage { position: relative; top: 0; height: min(80vh, 720px); }

.home-games .group-head { margin-top: 0; }
.home-games .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.home-games .card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.section-head { margin-bottom: 30px; }
.more-link { margin-top: 30px; }

/* classic strip on home */
.classic-band { padding: calc(100px * var(--sp)) 0; overflow: hidden; background: linear-gradient(180deg, transparent, color-mix(in srgb, #ff7a45 7%, transparent) 30%, color-mix(in srgb, #ff7a45 7%, transparent) 70%, transparent); }
.classic-band .kicker { color: #ff7a45; } .classic-band .kicker::before { background: #ff7a45; box-shadow: 0 0 12px #ff7a45; }
.marquee { margin-top: 40px; display: flex; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 18px; padding: 14px 9px 22px; animation: slide var(--dur, 60s) linear infinite; flex: none; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.mini-cart { flex: none; width: 168px; padding: 22px 8px 10px; text-decoration: none; position: relative; background: linear-gradient(180deg, #2b2f3a, #1b1d25); clip-path: polygon(0 10px, 10px 0, 38% 0, 42% 7px, 58% 7px, 62% 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); border-radius: 0 0 10px 10px; transition: transform .3s var(--bounce); }
.mini-cart:hover { transform: translateY(-8px) rotate(-2deg); }
.mini-cart .lab { background: hsl(var(--h1) 72% 55%); padding: 5px; border-radius: 6px; }
.mini-cart .lab .cover { aspect-ratio: 4/3; border-radius: 3px; }
.mini-cart .lab b { display: block; margin: 5px 2px 1px; font: 700 14px/1 var(--display); text-transform: uppercase; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-cart .no { position: absolute; top: 5px; left: 12px; font: 10px var(--mono); color: hsl(var(--h1) 72% 60%); }

.origin { min-height: 118vh; display: flex; align-items: flex-end; padding-bottom: 90px; }
.origin .wrap { text-align: center; display: grid; justify-items: center; }
.origin .h1 { font-size: clamp(42px, 6.4vw, 90px); }
.origin .lede { margin-inline: auto; text-align: center; }

@media (max-width: 980px) {
  .hero { min-height: auto; padding-top: calc(min(46vw, 260px) + min(41.5vw, 235px) + 84px); } /* clears the globe and its place label (js/globe.js layoutFor) */
  .hero-title .l1 { font-size: clamp(96px, 28vw, 200px); }
  .origin { min-height: 100vh; }
}
@media (max-width: 720px) {
  :root { --top: 58px; }
  .topbar { gap: 12px; }
  .logo-word { display: none; }
  .tab { padding: 9px 10px; font-size: 14px; }
  .search .kbd { display: none; }
  .toolbar { position: relative; top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
}
.school-stage.done .school-skip { opacity: 0; visibility: hidden; } /* nothing left to skip */

/* ============================================================ homepage animations: Bored? */
.bored-stage { background: #05060f; will-change: transform; }
.bored-q { top: 12%; font-size: clamp(48px, 8vw, 120px); color: var(--accent); }
.bored-line { top: auto; bottom: 10%; width: min(880px, 90vw); font-size: clamp(22px, 3vw, 40px); line-height: 1.15; color: #fff; text-shadow: 0 3px 18px rgba(0,0,0,.75); }
.bored-tags { position: absolute; right: 6%; top: 50%; transform: translateY(-40%); display: grid; gap: 10px; text-align: right; opacity: 0; transition: opacity .6s, transform .6s var(--ease); pointer-events: none; }
.bored-tags.on { opacity: 1; transform: translateY(-50%); }
.bored-tags b { font: 700 clamp(28px, 4.4vw, 68px)/0.95 var(--display); text-transform: uppercase; letter-spacing: .01em; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.6); }
.bored-tags b + b { color: var(--accent); }
.bored-tags small { font: 500 clamp(14px, 1.5vw, 18px)/1.4 var(--body); color: #fff; opacity: .85; }
@media (max-width: 760px) { .bored-tags { right: 0; left: 0; top: auto; bottom: 8%; transform: none; text-align: center; } .bored-tags.on { transform: none; } }

/* ============================================================ themes (html[data-season]) */
.season-snow { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.season-lights { position: absolute; left: 0; right: 0; bottom: -9px; height: 14px; display: flex; justify-content: space-between; pointer-events: none; padding: 0 8px; }
.season-lights::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 2px; background: #1d3a26; border-radius: 2px; }
.season-lights i { position: relative; width: 8px; height: 12px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; margin-top: 3px;
  background: hsl(calc(var(--i) * 90 % 360), 90%, 58%); box-shadow: 0 0 10px hsl(calc(var(--i) * 90 % 360), 90%, 58%); animation: twinkle 1.6s calc(var(--i) * -0.23s) infinite steps(2); }
.season-lights i:nth-child(4n+1) { background: #e0313f; box-shadow: 0 0 10px #e0313f; }
.season-lights i:nth-child(4n+2) { background: #36b45f; box-shadow: 0 0 10px #36b45f; }
.season-lights i:nth-child(4n+3) { background: #e2b23c; box-shadow: 0 0 10px #e2b23c; }
.season-lights i:nth-child(4n) { background: #fff6e0; box-shadow: 0 0 10px #fff6e0; }
@keyframes twinkle { 50% { opacity: .35; box-shadow: none; } }
@media (max-width: 760px) { .season-lights i:nth-child(n+21) { display: none; } }

[data-season="christmas"] body { background-image: radial-gradient(circle at 15% 0, rgba(224,49,63,.16), transparent 40%), radial-gradient(circle at 85% 20%, rgba(54,180,95,.14), transparent 45%); }
[data-season="christmas"] .topbar { box-shadow: inset 0 -2px 0 #e0313f; }
[data-season="christmas"] .logo-block { background: repeating-linear-gradient(45deg, #e0313f 0 10px, #fff 10px 20px); color: #0a1a11; }
[data-season="christmas"] .card, [data-season="christmas"] .coll, [data-season="christmas"] .cart { position: relative; }
[data-season="christmas"] .card::after, [data-season="christmas"] .coll::after, [data-season="christmas"] .cart::after {
  content: ""; position: absolute; top: -10px; right: 10px; width: 46px; height: 30px; pointer-events: none; z-index: 3;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 30'%3E%3Cpath d='M23 14C17 2 4 4 2 10c5 0 8 3 9 8 3-4 8-5 12-4z' fill='%2336b45f'/%3E%3Cpath d='M23 14c6-12 19-10 21-4-5 0-8 3-9 8-3-4-8-5-12-4z' fill='%232a9d4b'/%3E%3Ccircle cx='20' cy='17' r='4.5' fill='%23e0313f'/%3E%3Ccircle cx='27' cy='18' r='4.5' fill='%23ff4b55'/%3E%3Ccircle cx='23.5' cy='11.5' r='4' fill='%23c41f2d'/%3E%3C/svg%3E"); }
[data-season="christmas"] .btn { background-image: linear-gradient(135deg, rgba(255,255,255,.18) 25%, transparent 25% 50%, rgba(255,255,255,.18) 50% 75%, transparent 75%); background-size: 22px 22px; }
[data-season="christmas"] .kicker::before { background: #36b45f; }
[data-season="christmas"] .h1, [data-season="christmas"] .h2 { text-shadow: 0 0 22px rgba(224,49,63,.35); }
[data-season="christmas"] .footer { border-top: 6px solid transparent; border-image: repeating-linear-gradient(90deg, #e0313f 0 18px, #fff 18px 36px, #36b45f 36px 54px, #fff 54px 72px) 6; }
[data-season="christmas"]:not([data-lights="off"]) .school-stage::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 10px 6px, #e0313f 4px, transparent 5px) 0 0/40px 26px, radial-gradient(circle at 30px 10px, #e2b23c 4px, transparent 5px) 0 0/40px 26px, linear-gradient(#1d3a26, #1d3a26) 0 3px/100% 2px no-repeat; }

/* Halloween: black, white and grey - red is the only colour anywhere */
[data-season="halloween"] { --c: var(--accent) !important; --page: var(--accent) !important; --h1: 0 !important; --h2: 0 !important; }
[data-season="halloween"] *, [data-season="halloween"] *::before, [data-season="halloween"] *::after { --c: var(--accent) !important; }
[data-season="halloween"] img, [data-season="halloween"] .art, [data-season="halloween"] .mini, [data-season="halloween"] #globe,
[data-season="halloween"] .globe-hud { filter: grayscale(1) contrast(1.1); }
[data-season="halloween"] .badge.chromebook, [data-season="halloween"] .badge.threed, [data-season="halloween"] .badge.ok, [data-season="halloween"] .badge.unknown, [data-season="halloween"] .badge.tag { color: #e6e6e6 !important; background: #222 !important; border-color: #555 !important; }
[data-season="halloween"] .badge.blocked, [data-season="halloween"] .warn { color: var(--accent) !important; border-color: var(--accent) !important; background: #1a0000 !important; }
[data-season="halloween"] .logo-block { background: var(--accent); color: #000; }
[data-season="halloween"] .h1, [data-season="halloween"] .h2, [data-season="halloween"] .hero-title { text-shadow: 0 0 18px rgba(224,11,11,.35); }
[data-season="halloween"] .cap-1 { color: #f1f1f1; }
[data-season="halloween"] mark { background: var(--accent); color: #000; }
[data-season="halloween"] .file, [data-season="halloween"] .cart, [data-season="halloween"] .note { filter: grayscale(1); }
[data-season="halloween"] .card:hover, [data-season="halloween"] .coll:hover { box-shadow: 0 0 0 1px var(--accent), 0 18px 50px rgba(224,11,11,.18) !important; }
[data-season="halloween"] body::after { content: ""; position: fixed; top: 64px; left: 0; width: 160px; height: 160px; pointer-events: none; z-index: 5; opacity: .35;
  background: no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160' fill='none' stroke='%23ddd' stroke-width='1'%3E%3Cpath d='M0 0L160 40M0 0L120 120M0 0L40 160M0 0L90 150M0 0L150 90'/%3E%3Cpath d='M30 8Q24 24 8 30M62 15Q48 48 15 62M95 24Q70 70 24 95M128 32Q92 92 32 128'/%3E%3C/svg%3E"); }
.season-fog { position: fixed; left: 0; right: 0; bottom: 0; height: 40vh; pointer-events: none; z-index: 4; overflow: hidden; }
.season-fog i { position: absolute; left: -50%; bottom: -10vh; width: 200%; height: 50vh; background: radial-gradient(ellipse at 30% 70%, rgba(200,200,200,.12), transparent 60%), radial-gradient(ellipse at 70% 80%, rgba(200,200,200,.1), transparent 55%); animation: fog 38s linear infinite; }
.season-fog i + i { animation-duration: 56s; animation-direction: reverse; opacity: .7; }
@keyframes fog { to { transform: translateX(25%); } }
.season-bats { position: fixed; inset: 0; pointer-events: none; z-index: 61; overflow: hidden; }
.bat { position: absolute; top: calc(12% + var(--i) * 13%); left: -80px; width: calc(34px + var(--i) * 6px); animation: batfly calc(18s + var(--i) * 5s) calc(var(--i) * -6s) linear infinite; }
.bat svg { display: block; width: 100%; fill: #0a0a0a; stroke: #3a3a3a; stroke-width: 1; animation: flap .25s ease-in-out infinite alternate; transform-origin: center; }
@keyframes batfly { 0% { transform: translate(0, 0); } 25% { transform: translate(30vw, -30px); } 50% { transform: translate(60vw, 20px); } 75% { transform: translate(90vw, -20px); } 100% { transform: translate(115vw, 10px); } }
@keyframes flap { to { transform: scaleY(.45); } }

/* Easter: chocolate, eggs and bunnies on cream. No pink or purple anywhere. */
[data-season="easter"] { color-scheme: light; --surface-2: #f6e6cf; --line: rgba(59,35,20,.14); --line-2: rgba(59,35,20,.28); }
[data-season="easter"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'%3E%3Cg fill='%237b4424' opacity='.07'%3E%3Cellipse cx='40' cy='34' rx='6' ry='17' transform='rotate(-10 40 34)'/%3E%3Cellipse cx='56' cy='34' rx='6' ry='17' transform='rotate(10 56 34)'/%3E%3Ccircle cx='48' cy='60' r='16'/%3E%3Cellipse cx='160' cy='150' rx='15' ry='20'/%3E%3Cellipse cx='170' cy='40' rx='8' ry='11' transform='rotate(18 170 40)'/%3E%3Cellipse cx='70' cy='160' rx='4' ry='11' transform='rotate(-10 70 160)'/%3E%3Cellipse cx='80' cy='160' rx='4' ry='11' transform='rotate(10 80 160)'/%3E%3Ccircle cx='75' cy='177' r='10'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(circle at 10% 8%, #ffe2a6 0, transparent 30%), radial-gradient(circle at 92% 18%, #dcefff 0, transparent 34%), radial-gradient(circle at 50% 100%, #e4f2d2 0, transparent 42%); background-size: 220px 220px, auto, auto, auto; }
[data-season="easter"] .topbar { background: rgba(255,248,236,.94) !important; border-bottom-color: #5a2f17; }
[data-season="easter"] .topbar::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 24'%3E%3Cpath fill='%235a2f17' d='M0 0H160V7C154 7 152 9 151 13C150 19 143 19 142 13C141 9 138 7 132 7C124 7 122 10 121 16C120 23 112 23 111 16C110 10 106 7 98 7C90 7 88 8 87 10C86 13 81 13 80 10C79 8 76 7 68 7C60 7 57 10 56 15C55 21 47 21 46 15C45 10 42 7 34 7C26 7 24 9 23 12C22 16 16 16 15 12C14 9 10 7 0 7Z'/%3E%3Cpath fill='%238a4d29' d='M0 0H160V3H0Z'/%3E%3Cg fill='%23fff' opacity='.28'%3E%3Cellipse cx='114' cy='16' rx='1.4' ry='3'/%3E%3Cellipse cx='49' cy='15' rx='1.3' ry='2.6'/%3E%3Cellipse cx='145' cy='13' rx='1.1' ry='2.2'/%3E%3Cellipse cx='18' cy='12' rx='1' ry='2'/%3E%3C/g%3E%3C/svg%3E") 0 0/160px 18px repeat-x; filter: drop-shadow(0 2px 2px rgba(59,35,20,.25)); }
[data-season="easter"] .tab { color: #5a3a24; }
[data-season="easter"] .logo-block { background: #5a2f17; color: #fbe7c6; box-shadow: inset 3px 3px 0 rgba(255,255,255,.18), inset -3px -3px 0 rgba(0,0,0,.35); }
[data-season="easter"] .card, [data-season="easter"] .coll { box-shadow: 0 10px 30px rgba(91,52,26,.14) !important; }
[data-season="easter"] .btn { background: linear-gradient(180deg, #8a4d29, #5e3119); color: #fff4e0; box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 4px 0 #3b2314; }
[data-season="easter"] .btn.ghost { background: #fff; color: #3b2314; box-shadow: none; }
[data-season="easter"] .cap-1, [data-season="easter"] .cap-2 small { text-shadow: 0 2px 10px rgba(59,35,20,.6); }
[data-season="easter"] .cap-2 { color: #f2c14e; text-shadow: 0 3px 0 #3b2314, 0 6px 22px rgba(0,0,0,.55); }
[data-season="easter"] .footer { background: #f4e4c9; border-top: 0; padding-top: 56px; }
[data-season="easter"] .footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 24px; pointer-events: none; box-shadow: 0 3px 0 rgba(59,35,20,.25);
  background: linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,0) 35%, rgba(0,0,0,.2)), repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 3px, transparent 3px 44px), repeating-linear-gradient(90deg, #6b3a1d 0 41px, #3f2010 41px 44px); }
[data-season="easter"] .globe-layer { opacity: .55; }
[data-season="easter"] .note:nth-child(3) { background: #ffe7c2; }
[data-season="easter"] .cover-play, [data-season="easter"] .school-skip { color: #fff; }
/* hopping bunnies along the bottom of the screen (the Hopping bunnies switch) */
.season-bunnies { position: fixed; left: 0; right: 0; bottom: 0; height: 90px; pointer-events: none; z-index: 5; overflow: hidden; }
.bunny { position: absolute; bottom: 6px; left: 0; width: calc(46px + var(--i) * 8px); color: var(--fur); animation: bunnyrun calc(24s + var(--i) * 7s) calc(var(--i) * -9s - 4s) linear infinite; }
.bunny.back { animation-direction: reverse; } .bunny.back svg { transform: scaleX(-1); }
.bunny i { display: block; animation: hop .62s cubic-bezier(.3,0,.4,1) infinite alternate; }
.bunny svg { display: block; width: 100%; overflow: visible; filter: drop-shadow(0 3px 2px rgba(59,35,20,.3)); }
@keyframes bunnyrun { 0% { transform: translateX(-90px); } 45%, 100% { transform: translateX(calc(100vw + 90px)); } }
@keyframes hop { 0% { transform: translateY(0) scale(1.06, .9); } 30% { transform: translateY(-14px) scale(.96, 1.05); } 100% { transform: translateY(-30px) scale(1, 1); } }
@media (prefers-reduced-motion: reduce) { .season-bunnies { display: none; } }

.egg-hidden { position: absolute; z-index: 6; width: 30px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; transform: rotate(var(--rot, 0deg)); filter: drop-shadow(0 3px 4px rgba(59,35,20,.4)); transition: transform .2s var(--bounce); }
.egg-hidden:hover, .egg-hidden:focus-visible { transform: rotate(var(--rot, 0deg)) scale(1.25); }
.egg-hidden svg { width: 100%; height: 100%; display: block; }
.egg-hidden.got { animation: eggpop .6s var(--ease) forwards; }
.egg-hidden .spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--c); animation: spark .6s var(--ease) forwards; transform: rotate(var(--a)); }
@keyframes eggpop { 40% { transform: scale(1.6) rotate(0); } 100% { transform: scale(0) rotate(40deg); opacity: 0; } }
@keyframes spark { to { transform: rotate(var(--a)) translateY(-46px); opacity: 0; } }
.egg-counter { position: fixed; left: 14px; bottom: 14px; z-index: 70; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: #fff; color: #3b2314; font: 600 14px var(--body); box-shadow: 0 8px 24px rgba(59,35,20,.25); }
.egg-counter svg { width: 20px; height: 26px; }
.egg-counter b { font-weight: 800; }
.egg-counter.pop { animation: cpop .5s var(--bounce); }
.egg-counter.all { background: linear-gradient(90deg, #f6cf5a, #e8a13a); }
@keyframes cpop { 50% { transform: scale(1.18); } }
.season-toast { position: fixed; left: 50%; bottom: 70px; z-index: 72; transform: translate(-50%, 20px); opacity: 0; transition: .35s var(--ease); padding: 10px 16px; border-radius: 12px; background: #3b2314; color: #fff4e0; font: 600 15px var(--body); pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.season-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* the giant secret egg + FLIP CHICK */
.egg-lock, .egg-lock body { overflow: hidden; }
.giant-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: radial-gradient(circle, rgba(255,248,236,.95), rgba(214,160,100,.95)); opacity: 0; transition: opacity .4s; }
.giant-wrap.on { opacity: 1; }
.giant-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #3b2314; color: #fff4e0; font-size: 28px; line-height: 1; cursor: pointer; }
.giant-stage { position: relative; width: min(94vw, 1000px); height: min(86vh, 620px); display: grid; place-items: center; }
.giant-egg { border: 0; background: none; padding: 0; cursor: pointer; width: min(56vw, 300px); animation: wobble 2.4s ease-in-out infinite; filter: drop-shadow(0 24px 30px rgba(59,35,20,.4)); }
.giant-egg.hit { animation: hit .35s ease-out; }
.giant-svg { width: 100%; display: block; overflow: visible; }
.giant-svg .half { transition: transform .9s var(--ease), opacity .9s; transform-origin: 50% 60%; }
.crack { stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset .35s ease-out; }
.crack.on { stroke-dashoffset: 0; }
.giant-egg.open { animation: none; }
.giant-egg.open .giant-svg .half.top { transform: translateY(-40%) rotate(-25deg) scale(1.1); opacity: 0; }
.giant-egg.open .cracks { opacity: 0; transition: opacity .3s; }
.giant-light { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 #fff; opacity: 0; }
.giant-light.on { animation: burst 1s ease-out forwards; }
@keyframes burst { 0% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,1); } 100% { opacity: 0; box-shadow: 0 0 0 120vmax rgba(255,255,255,0); } }
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes hit { 25% { transform: rotate(-9deg) scale(1.04); } 60% { transform: rotate(7deg); } }
.giant-hint { position: absolute; bottom: 4%; margin: 0; font: 700 clamp(18px, 2.4vw, 26px) var(--display); letter-spacing: .04em; text-transform: uppercase; color: #3b2314; }
.giant-stage.done .giant-egg, .giant-stage.done .giant-hint { display: none; }
.giant-stage.done { grid-template-rows: auto 1fr; gap: 10px; place-items: stretch; }
.giant-title { text-align: center; color: #3b2314; }
.giant-title b { display: block; font: 700 clamp(26px, 3.6vw, 44px)/1 var(--display); text-transform: uppercase; }
.giant-title span { font: 500 15px var(--body); }
.giant-game { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(59,35,20,.4); min-height: 280px; animation: rise .6s var(--bounce); }
.flipchick { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: manipulation; }
@keyframes rise { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .giant-egg, .season-lights i, .season-fog i, .bat { animation: none; } }
[data-season="easter"] .bored-tags b, [data-season="easter"] .bored-line { text-shadow: 0 2px 0 #3b2314, 0 4px 18px rgba(59,35,20,.55); }
[data-season="easter"] .bored-q, [data-season="easter"] .bored-tags b + b { color: #f2c14e; text-shadow: 0 3px 0 #3b2314, 0 6px 22px rgba(59,35,20,.55); }
[data-season="christmas"] *, [data-season="easter"] * { --c: var(--accent) !important; }
[data-season="christmas"] .coll:nth-child(even) { --c: var(--ok) !important; }
[data-season="easter"] .coll:nth-child(2) { --c: var(--power) !important; } [data-season="easter"] .coll:nth-child(3) { --c: var(--cool) !important; } [data-season="easter"] .coll:nth-child(4) { --c: var(--ok) !important; }
[data-season="halloween"] .mini-cart, [data-season="halloween"] .idea-card, [data-season="halloween"] .box { filter: grayscale(1); }
[data-season="halloween"] .kicker { color: var(--accent) !important; }
[data-season="halloween"] .cover { background-color: #1b1b1b !important; }
[data-season="halloween"] .dev-chip { background: #222 !important; color: #eee !important; }
