/* 2027 bingo card maker. Look: party poster + live scoreboard (设计图/首页设计-D.png, picked by the owner 2026-12-03).
   Three colours only (cobalt, coral, sunflower) on off-white with black type, thick outlines, hard offset shadows. */
@font-face { font-family: Bricolage; src: url(/fonts/bricolage.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
:root {
  --bg: #fbf6ec; --paper: #fff; --ink: #111; --mute: #55524c;
  --blue: #2a50e8; --coral: #ff4b4b; --sun: #ffc62b;
  --t-sun: #ffd65e; --t-coral: #ff9fb0; --t-blue: #94b6ff;
  --line: 3px solid var(--ink); --r: 22px;
  --font: Bricolage, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
/* The big colour shapes hang off the right edge; clip them at the page so phones cannot zoom out or pan sideways. */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 17px/1.45 var(--font); overflow-x: hidden; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 0.98; margin: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; position: relative; z-index: 3; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; text-decoration: none; }
.brand i { width: 34px; height: 34px; border: var(--line); border-radius: 9px; background: var(--paper); display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 4px; transform: rotate(-6deg); box-shadow: 3px 3px 0 var(--ink); }
.brand i b { border-radius: 2px; background: var(--coral); }
.brand i b:nth-child(2n) { background: var(--ink); }
.brand i b:nth-child(5) { background: var(--sun); }
/* A white pill behind the links: on wide screens the blue shape sits under the right half of the menu. */
.nav { display: flex; gap: 24px; font-weight: 700; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; padding: 8px 20px; box-shadow: 3px 3px 0 var(--ink); }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 30px; border: var(--line); border-radius: 999px; background: var(--paper); font-weight: 800; font-size: 19px; text-decoration: none; cursor: pointer; transition: transform .08s, box-shadow .08s; box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--sun); }
.btn.primary:hover { box-shadow: 6px 6px 0 var(--sun); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); padding: 6px 14px; font-weight: 700; font-size: 15px; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--ink); color: #fff; }

/* Hero */
.hero { position: relative; padding: 18px 0 70px; }
.hero::before { content: ''; position: absolute; right: -180px; top: -140px; width: 620px; height: 520px; background: var(--blue); border-radius: 46% 54% 38% 62% / 55% 45% 55% 45%; transform: rotate(-14deg); z-index: 0; }
.hero::after { content: ''; position: absolute; left: -200px; bottom: -120px; width: 900px; height: 300px; background: var(--coral); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transform: rotate(-7deg); z-index: 0; }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr) minmax(0, 0.78fr); gap: 34px; align-items: start; }
.pitch { padding-top: 34px; }
.live { display: inline-flex; align-items: center; gap: 8px; background: var(--coral); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .04em; border-radius: 999px; padding: 6px 14px; transform: rotate(-5deg); margin-bottom: 18px; }
.live::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.pitch h1 { font-size: clamp(40px, 4.7vw, 66px); }
.pitch .sub { font-size: 21px; font-weight: 600; margin: 20px 0 8px; max-width: 22em; }
.squiggle { display: block; width: 240px; height: 12px; margin: 6px 0 26px; background: var(--sun); border-radius: 999px; transform: rotate(-2deg); }
.cta { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.cta .btn { min-width: 270px; }
.join-note { background: var(--sun); border: var(--line); border-radius: 16px; padding: 12px 16px; font-weight: 700; margin-bottom: 18px; box-shadow: 4px 4px 0 var(--ink); }

/* The bingo card */
.stage { position: relative; }
.burst { position: absolute; left: 50%; top: -46px; width: 300px; height: 300px; margin-left: -150px; background: var(--sun); z-index: 0; clip-path: polygon(50% 0, 59% 28%, 79% 9%, 72% 37%, 98% 34%, 77% 52%, 100% 68%, 72% 67%, 79% 95%, 58% 76%, 50% 100%, 41% 76%, 21% 95%, 28% 67%, 0 68%, 23% 52%, 2% 34%, 28% 37%, 21% 9%, 41% 28%); }
.bcard { position: relative; z-index: 1; background: var(--paper); border: 3px solid var(--ink); border-radius: calc(var(--r) * var(--rf, 1)); box-shadow: 9px 9px 0 var(--coral); overflow: hidden; container-type: inline-size; }
.stage .bcard { transform: rotate(-1.2deg); }
.bcard-head { background: var(--blue); color: var(--head-ink, #fff); text-align: center; padding: 4.2cqw 3cqw 3.4cqw; border-bottom: 3px solid var(--ink); }
.bcard-head h2, .bcard-head h1 { font-size: 8.6cqw; text-transform: uppercase; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.own { display: flex; align-items: baseline; justify-content: center; gap: 0; font-size: 8.6cqw; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.own input { field-sizing: content; min-width: 1ch; max-width: 62cqw; background: transparent; border: 0; border-bottom: 3px dashed rgba(255,255,255,.65); color: #fff; font: inherit; text-transform: uppercase; letter-spacing: inherit; text-align: center; padding: 0; outline: none; }
.own input::placeholder { color: rgba(255,255,255,.7); }
.letters { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; font-weight: 800; font-size: 5cqw; padding: 1.6cqw 2.4cqw 0; }
.card-grid { list-style: none; margin: 0; padding: 1.4cqw 2.4cqw 2.6cqw; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.3cqw; }
.sq { position: relative; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: calc(2.2cqw * var(--rf, 1)); background: var(--t-sun); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1cqw; font-weight: 700; font-size: 3.05cqw; line-height: 1.08; cursor: pointer; overflow: hidden; user-select: none; -webkit-tap-highlight-color: transparent; }
.sq:nth-child(3n+2) { background: var(--t-coral); }
.sq:nth-child(3n) { background: var(--t-blue); }
.sq span { display: block; overflow-wrap: anywhere; max-height: 100%; font-size: calc(1em * var(--fs, 1)); }
.sq.long { font-size: 2.55cqw; }
.sq.xlong { font-size: 2.15cqw; }
.sq:hover { filter: brightness(1.04); }
.sq:focus-visible, .btn:focus-visible, .chip:focus-visible, input:focus-visible, textarea:focus-visible { outline: 4px solid var(--blue); outline-offset: 2px; }
.sq.free { background: var(--sun); color: var(--free-ink, inherit); cursor: default; font-size: 3.6cqw; font-weight: 800; }
.sq.free::before { content: '★'; font-size: 7cqw; line-height: .9; }
.sq.empty { background: var(--paper); border: 2px dashed var(--blue); color: var(--blue); }
.sq.empty.slot { font-size: 2.3cqw; background: #eef3ff; }
.slots { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.sq.empty.closed { border-color: #c9c4b8; cursor: default; }
.sq.empty .plus { font-size: 6cqw; line-height: .8; font-weight: 800; }
.sq small { position: absolute; left: 50%; bottom: .9cqw; transform: translateX(-50%); max-width: 92%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--stamp, var(--ink)); color: var(--stamp-ink, #fff); border-radius: 999px; padding: .3cqw 1.4cqw; font-size: 1.95cqw; font-weight: 700; }
.sq.friend { justify-content: flex-start; padding-top: 1.6cqw; }
.sq.done { filter: saturate(1.15); }
.sq.done::after { content: '✓'; position: absolute; right: 3%; top: 3%; width: 30%; height: 30%; border: .7cqw solid var(--stamp, var(--ink)); border-radius: 50%; display: grid; place-items: center; font-size: 3.9cqw; font-weight: 800; color: var(--stamp-ink, #fff); background: var(--stamp, var(--ink)); transform: rotate(-10deg); animation: stamp .28s cubic-bezier(.2,1.6,.4,1); }
.sq.done { justify-content: flex-end; padding-bottom: 2cqw; }
.sq.done.friend { justify-content: flex-start; padding-top: 1.6cqw; }
.sq.done span { opacity: .82; max-height: 62%; }
.sq.done.friend span { padding-right: 30%; text-align: left; padding-left: .6cqw; }
@keyframes stamp { from { transform: rotate(-10deg) scale(2.6); opacity: 0; } }
.sq textarea { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; resize: none; background: var(--paper); text-align: center; font-weight: 700; font-size: max(16px, 3.05cqw); line-height: 1.1; padding: 1cqw; outline: 3px solid var(--blue); border-radius: inherit; }
.tools { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; align-items: center; }
.tools .sep { flex-basis: 100%; height: 0; }
.hint { font-size: 14px; color: var(--mute); font-weight: 600; margin-top: 10px; position: relative; z-index: 1; }

/* The table (scoreboard) */
.panel { position: relative; background: var(--paper); border: var(--line); border-radius: var(--r); padding: 20px 20px 10px; box-shadow: 6px 6px 0 var(--ink); }
.panel h2, .panel h3 { font-size: 30px; margin-bottom: 10px; }
.panel .tag { position: absolute; right: 14px; top: -14px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 800; transform: rotate(4deg); }
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 2px solid #e6e0d2; font-weight: 700; }
.board li:first-child { border-top: 0; }
.board li.lead { background: #fff3c4; margin: 0 -12px; padding: 11px 12px; border-radius: 14px; border-top-color: transparent; }
.board li.lead + li { border-top-color: transparent; }
.board a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board a:hover { text-decoration: underline; }
.av { width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--t-coral); }
.board li:nth-child(3n+2) .av { background: var(--t-blue); }
.board li:nth-child(3n) .av { background: var(--t-sun); }
.mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; width: 44px; }
.mini i { aspect-ratio: 1; border-radius: 50%; background: #d9d4c7; }
.mini i.on { background: var(--blue); }
.score { font-size: 19px; font-weight: 800; white-space: nowrap; text-align: right; }
.score em { display: block; font-style: normal; font-size: 12px; background: var(--sun); border: 2px solid var(--ink); border-radius: 999px; padding: 0 8px; margin-top: 2px; }
.score em::before { content: '♛ '; }
.side { display: grid; gap: 22px; padding-top: 44px; }
.codebox { background: var(--paper); border: var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: 6px 6px 0 var(--ink); }
.codebox h3 { font-size: 22px; margin-bottom: 10px; }
.codebox form { display: flex; gap: 8px; }
.codebox input, .field input, .field textarea { width: 100%; min-height: 48px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; padding: 8px 12px; font-weight: 700; font-size: 17px; }
.codebox input { text-transform: uppercase; letter-spacing: .14em; text-align: center; }
.toast { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 12px; background: var(--paper); border: var(--line); border-radius: 999px; padding: 8px 22px 8px 8px; font-weight: 700; box-shadow: 5px 5px 0 var(--sun); margin: 26px 0 0 40px; animation: pop .4s cubic-bezier(.2,1.5,.4,1); }
.toast .av { background: var(--coral); color: #fff; }
@keyframes pop { from { transform: translateY(14px) scale(.9); opacity: 0; } }

/* Sections under the hero */
.band { position: relative; z-index: 2; background: var(--bg); padding: 70px 0; }
.band h2 { font-size: clamp(34px, 4vw, 54px); margin-bottom: 30px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: var(--paper); border: var(--line); border-radius: var(--r); padding: 22px; box-shadow: 6px 6px 0 var(--blue); }
.steps li:nth-child(2) { box-shadow: 6px 6px 0 var(--coral); }
.steps li:nth-child(3) { box-shadow: 6px 6px 0 var(--sun); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 22px; margin-bottom: 14px; }
.steps h3 { font-size: 25px; margin-bottom: 8px; letter-spacing: -0.02em; line-height: 1.05; }
.steps p { color: var(--mute); font-weight: 600; }
.foot { position: relative; z-index: 2; border-top: var(--line); padding: 26px 0 40px; font-size: 15px; font-weight: 600; color: var(--mute); display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }

/* Card and table pages */
.page { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: 34px; align-items: start; padding: 10px 0 70px; }
.page .bcard { box-shadow: 9px 9px 0 var(--blue); }
.note { background: var(--paper); border: var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: 6px 6px 0 var(--sun); font-weight: 600; }
.note h2 { font-size: 30px; margin-bottom: 8px; }
.note .row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.stack { display: grid; gap: 22px; }
.gone { text-align: center; padding: 90px 0; position: relative; z-index: 2; }
.gone h1 { font-size: 56px; margin-bottom: 14px; }
.gone p { margin-bottom: 24px; font-weight: 600; }
.feed { list-style: none; padding: 0; margin: 0; font-weight: 600; font-size: 15px; }
.feed li { padding: 7px 0; border-top: 2px solid #e6e0d2; }
.feed b { font-weight: 800; }
.bigcode { font-size: 44px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Dialog */
dialog { border: var(--line); border-radius: var(--r); padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 8px 8px 0 var(--ink); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(17, 17, 17, .55); }
dialog h2 { font-size: 30px; margin-bottom: 6px; }
dialog p { color: var(--mute); font-weight: 600; margin-bottom: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 800; }
.field textarea { min-height: 84px; resize: none; }
.field .count { justify-self: end; font-size: 13px; color: var(--mute); font-weight: 600; }
.err { color: #c21f1f; font-weight: 700; margin: 0 0 12px; }
.acts { display: grid; gap: 10px; }
.acts .btn { width: 100%; }
.linkish { background: none; border: 0; padding: 6px; font-weight: 700; text-decoration: underline; cursor: pointer; color: var(--mute); justify-self: center; }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .side { grid-column: 1 / -1; grid-template-columns: 1.4fr 1fr; padding-top: 10px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .brand { font-size: 19px; }
  .hero { padding-bottom: 50px; }
  .hero::before { width: 300px; height: 260px; right: -222px; top: -190px; }
  .hero-grid, .page { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .pitch { padding-top: 6px; }
  .pitch h1 { font-size: 42px; }
  .pitch .sub { font-size: 18px; }
  .cta { align-items: stretch; }
  .cta .btn { min-width: 0; }
  .burst { width: 220px; height: 220px; margin-left: -110px; top: -34px; }
  .bcard { box-shadow: 6px 6px 0 var(--coral); }
  .sq { font-size: 3.2cqw; border-width: 1.5px; }
  .sq.long { font-size: 2.7cqw; }
  .sq.xlong { font-size: 2.3cqw; }
  .sq small { font-size: 2.2cqw; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .toast { margin-left: 0; font-size: 15px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .band { padding: 50px 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Party mode (/t/<code>/tv/): the scoreboard on a TV. Sizes follow the screen (vw / vh), nothing scrolls. */
body.tv { overflow: hidden; }
main.tv { height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) min(34vw, 62vh); gap: 2.2vw; padding: 2.6vh 2.4vw 2.4vh; }
.tv-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2vw; margin-bottom: 2vh; }
.tv-head h1 { font-size: clamp(34px, 5.2vw, 110px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-bottom: .08em; }
.tv-head > div:first-child { min-width: 0; }
.tv-kicker { display: flex; align-items: center; gap: 1vw; white-space: nowrap; font-weight: 800; font-size: clamp(14px, 1.35vw, 28px); margin-bottom: .6vh; }
.tv-kicker .live { margin: 0; font-size: 1em; }
.tv-clock { flex: none; text-align: right; background: var(--ink); color: #fff; border-radius: 1.2vw; padding: 1.1vh 1.4vw 1.3vh; box-shadow: .45vw .45vw 0 var(--sun); }
.tv-clock b { display: block; font-size: clamp(22px, 3.1vw, 64px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.tv-clock span { font-size: clamp(12px, 1.05vw, 22px); font-weight: 700; opacity: .85; }
.tv-board { --rows: 8; list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: 1vh; }
.tv-board li { display: grid; grid-template-columns: 2.6vw auto minmax(0, 1fr) auto 8.6vw 7.4vw; align-items: center; gap: 1.2vw; background: var(--paper); border: var(--line); border-radius: 1.3vw; padding: 0 1.4vw; font-weight: 800; font-size: clamp(18px, 2.3vw, 48px); }
.tv-board li.lead { background: var(--sun); box-shadow: .45vw .45vw 0 var(--ink); }
.tv-board .rk { font-size: .78em; opacity: .5; text-align: center; }
.tv-board .av { width: min(4.6vw, calc(54vh / var(--rows))); height: min(4.6vw, calc(54vh / var(--rows))); font-size: .78em; }
.tv-board li:nth-child(3n+2) .av { background: var(--t-blue); }
.tv-board li:nth-child(3n) .av { background: var(--t-sun); }
.tv-board li.lead .av { background: var(--paper); }
.tv-board .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-board .mini { width: min(5vw, calc(46vh / var(--rows))); gap: 8%; }
.tv-board li.lead .mini i { background: rgba(17, 17, 17, .18); }
.tv-board li.lead .mini i.on { background: var(--ink); }
.tv-board em { justify-self: start; font-style: normal; font-size: .5em; background: var(--coral); color: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: .25em .9em; white-space: nowrap; }
.tv-board .sc { text-align: right; font-variant-numeric: tabular-nums; }
.tv-hint { min-height: 1.5em; margin-top: 1.2vh; font-size: clamp(13px, 1.3vw, 26px); font-weight: 700; color: var(--mute); }
.tv-ticker { display: flex; align-items: center; gap: 1vw; min-height: 6.6vh; margin-top: 1vh; padding: .8vh 1.6vw .8vh 1vh; border: var(--line); border-style: dashed; border-radius: 999px; font-size: clamp(14px, 1.5vw, 30px); font-weight: 700; color: var(--mute); }
.tv-ticker > span:only-child { padding-left: 1vw; }
.tv-ticker.on { border-style: solid; background: var(--paper); color: var(--ink); font-size: clamp(18px, 2.1vw, 44px); box-shadow: .45vw .45vw 0 var(--coral); animation: tvpop .35s cubic-bezier(.2, 1.5, .4, 1); }
.tv-ticker .av { width: 5vh; height: 5vh; flex: none; background: var(--coral); color: #fff; font-size: .7em; }
.tv-ticker span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-ticker b { font-weight: 800; }
.tv-right { min-height: 0; background: var(--blue); color: #fff; border: var(--line); border-radius: 2vw; box-shadow: .6vw .6vw 0 var(--ink); padding: 2.8vh 1.8vw 1.6vh; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tv-right h2 { font-size: clamp(22px, 2.6vw, 54px); margin-bottom: 2vh; }
.tv-qr { width: min(100%, 36vh); aspect-ratio: 1; background: #fff; border: var(--line); border-radius: 1.3vw; padding: 1vw; box-shadow: .5vw .5vw 0 var(--sun); }
.tv-qr svg { display: block; width: 100%; height: 100%; }
.tv-or { font-size: clamp(13px, 1.3vw, 26px); font-weight: 700; margin: 2.6vh 0 1.2vh; }
.tv-or b { font-weight: 800; }
.tv-code { display: flex; gap: .5vw; justify-content: center; }
.tv-code span { width: 4vw; background: var(--sun); color: var(--ink); border: var(--line); border-radius: .8vw; padding: .5vh 0; font-size: clamp(22px, 3vw, 62px); font-weight: 800; line-height: 1.15; text-transform: uppercase; }
.tv-feed { list-style: none; margin: auto 0 0; padding: 1.4vh 0 0; width: 100%; text-align: left; font-size: clamp(12px, 1.15vw, 23px); font-weight: 600; }
.tv-feed li { padding: .8vh 0; border-top: 2px solid rgba(255, 255, 255, .3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-feed b { font-weight: 800; }
.tv-flash { position: fixed; inset: 0; z-index: 6; display: grid; place-content: center; background: var(--coral); color: #fff; text-align: center; padding: 4vw; animation: tvpop .4s cubic-bezier(.2, 1.4, .4, 1); }
.tv-flash b { display: block; font-size: clamp(60px, 15vw, 320px); font-weight: 800; letter-spacing: -.04em; line-height: .9; text-shadow: .5vw .5vw 0 var(--ink); }
.tv-flash span { display: block; font-size: clamp(22px, 3.6vw, 76px); font-weight: 800; margin-top: 3vh; }
.tv-flash.year { background: var(--blue); }
.tv-flash.year b { color: var(--sun); font-size: clamp(50px, 12vw, 260px); }
.tv-ctl { display: flex; gap: 1.2vw; margin-left: 1vw; font-size: .8em; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .3s; }
.tv-ctl button, .tv-ctl a { background: none; border: 0; padding: 0; color: var(--mute); text-decoration: underline; cursor: pointer; font-weight: 700; }
body.tv.awake .tv-ctl { opacity: 1; pointer-events: auto; }
@keyframes tvpop { from { transform: scale(.7); opacity: 0; } }
@media (max-width: 760px), (orientation: portrait) {
  body.tv { overflow: auto; }
  main.tv { height: auto; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px 16px 30px; }
  .tv-head { flex-wrap: wrap; align-items: flex-start; }
  .tv-head h1 { white-space: normal; }
  .tv-board { grid-template-rows: none; grid-auto-rows: 62px; gap: 8px; }
  .tv-board li { grid-template-columns: 22px 40px minmax(0, 1fr) auto auto; gap: 10px; border-radius: 16px; padding: 0 12px; font-size: 19px; }
  .tv-board .av { width: 40px; height: 40px; } .tv-board em { font-size: 12px; }
  .tv-ticker { min-height: 54px; } .tv-ticker .av { width: 38px; height: 38px; }
  .tv-right { border-radius: 22px; padding: 22px 18px; } .tv-qr { width: min(70vw, 300px); padding: 12px; border-radius: 16px; }
  .tv-code { gap: 6px; } .tv-code span { width: 44px; border-radius: 10px; }
  .tv-ctl { opacity: 1; pointer-events: auto; }
  .tv-kicker { flex-wrap: wrap; font-size: 15px; gap: 10px; }
  .tv-board .mini { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tv-ticker.on, .tv-flash { animation: none; } }

/* Idea pages: /<topic>/ and /<year>/, and the topic cards on the home page */
.pagehead { position: relative; padding: 24px 0 44px; }
.pagehead::before { content: ''; position: absolute; right: -170px; top: -230px; width: 560px; height: 430px; background: var(--blue); border-radius: 46% 54% 38% 62% / 55% 45% 55% 45%; transform: rotate(-14deg); z-index: 0; }
.pagehead .wrap { position: relative; z-index: 2; }
.crumb { font-weight: 700; font-size: 15px; color: var(--mute); margin-bottom: 16px; }
.pagehead h1 { font-size: clamp(40px, 6vw, 84px); max-width: 11em; }
.pagehead .sub { font-size: 21px; font-weight: 600; margin: 22px 0 28px; max-width: 34em; }
.cta.row { flex-direction: row; flex-wrap: wrap; }
.cta.row .btn { min-width: 0; }
.band.tight { padding: 34px 0; }
.band-sub { font-weight: 600; font-size: 19px; color: var(--mute); margin: -14px 0 28px; max-width: 40em; }
.idea-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.idea-grid li { min-height: 86px; display: grid; place-items: center; text-align: center; padding: 12px; border: 2px solid var(--ink); border-radius: 16px; background: var(--t-sun); font-weight: 700; font-size: 17px; line-height: 1.15; }
.idea-grid li:nth-child(3n+2) { background: var(--t-coral); }
.idea-grid li:nth-child(3n) { background: var(--t-blue); }
.tipbox { margin-top: 36px; max-width: 760px; background: var(--paper); border: var(--line); border-radius: var(--r); padding: 24px; box-shadow: 6px 6px 0 var(--sun); }
.tipbox h3 { font-size: 28px; margin-bottom: 10px; }
.tipbox p { font-weight: 600; margin-bottom: 12px; }
.tipbox .btn { margin-top: 8px; }
.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.topics a { display: block; height: 100%; text-decoration: none; background: var(--paper); border: var(--line); border-radius: 18px; padding: 16px 18px; box-shadow: 5px 5px 0 var(--blue); transition: transform .08s, box-shadow .08s; }
.topics li:nth-child(3n+2) a { box-shadow: 5px 5px 0 var(--coral); }
.topics li:nth-child(3n) a { box-shadow: 5px 5px 0 var(--sun); }
.topics a:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink) !important; }
.topics h3 { font-size: 24px; margin-bottom: 8px; letter-spacing: -0.02em; }
.topics p { font-size: 15px; font-weight: 600; color: var(--mute); line-height: 1.35; }
.topics span { display: inline-block; margin-top: 12px; font-weight: 800; font-size: 15px; }
.prose { max-width: 760px; margin-top: 60px; }
.prose.wide { margin-top: 0; }
.band .prose h2 { font-size: clamp(30px, 3.4vw, 44px); margin: 44px 0 14px; }
.band .prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 23px; letter-spacing: -0.02em; line-height: 1.1; margin: 26px 0 8px; }
.prose p, .prose li { font-size: 18px; line-height: 1.55; }
.prose p { margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose b { font-weight: 800; }
.prose a, .crumb a, .pick p a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 700; }
.picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.pick h3 { font-size: 26px; margin-bottom: 12px; }
.pick h3 a { text-decoration: none; }
.pick h3 a:hover { text-decoration: underline; }
.pick .idea-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pick .idea-grid li { min-height: 72px; font-size: 14.5px; padding: 8px; border-radius: 12px; }
.pick p { margin-top: 10px; font-weight: 600; font-size: 15px; }
.foot-links { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.foot-links a { color: var(--ink); font-weight: 700; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
@media (max-width: 1080px) { .topics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .pagehead { padding: 10px 0 30px; }
  .pagehead::before { width: 300px; height: 260px; right: -222px; top: -190px; }
  .pagehead h1 { font-size: 40px; }
  .pagehead .sub { font-size: 18px; }
  .cta.row { flex-direction: column; }
  .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .idea-grid li { min-height: 78px; font-size: 15px; padding: 8px; }
  .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .topics a { padding: 12px 14px; }
  .topics h3 { font-size: 20px; }
  .topics p { font-size: 13.5px; }
  .picks { grid-template-columns: minmax(0, 1fr); }
  .pick .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose p, .prose li { font-size: 17px; }
}

/* Footer links to privacy / terms / contact; plain page heads (no colour shape behind legal text). */
.foot-legal { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.foot-legal a { color: var(--mute); font-weight: 700; padding: 6px 0; }
.pagehead.plain { padding-bottom: 8px; }
.pagehead.plain::before { display: none; }
.pagehead.plain h1 { font-size: clamp(36px, 5vw, 64px); }
.linkish.danger { color: var(--coral, #c2410c); margin-top: 4px; justify-self: start; }

/* Card page side column: fixed slots (card.js), save / look / premium panels. */
.stack > .slot { display: contents; }
.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 10px; }
.btn.file { border-radius: 16px; display: grid; gap: 1px; text-align: left; justify-items: stretch; align-content: center; padding: 10px 14px; min-height: 58px; width: 100%; }
.btn.file small { font-size: 12.5px; font-weight: 600; color: var(--mute); line-height: 1.2; }
.btn.file:disabled { opacity: .55; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin: 4px 0 12px; }
.look { display: grid; gap: 6px; justify-items: center; padding: 8px 4px 7px; white-space: nowrap; background: var(--paper); border: 2px solid var(--ink); border-radius: 14px; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; color: var(--ink); min-height: 76px; }
.look i { width: 100%; height: 34px; border: 2px solid var(--ink); border-radius: 8px; background: linear-gradient(90deg, var(--a) 0 34%, var(--b) 34% 67%, var(--c) 67%); box-shadow: inset 0 -9px 0 var(--p); }
.look[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--ink); background: var(--sun); }
.panel.premium { box-shadow: 6px 6px 0 var(--coral); padding-bottom: 14px; }
.panel.premium.on { box-shadow: 6px 6px 0 var(--sun); }
.perks { margin: 0 0 12px; padding-left: 1.2em; font-weight: 600; }
.perks li { margin-bottom: 5px; }
.row.buy { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.row.buy .btn[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--sun), 3px 3px 0 var(--ink); }
#checkout { margin: 6px 0 10px; }
.panel .hint { margin: 6px 0 10px; }
.field-label { font-weight: 700; margin: 12px 0 4px; }
.band-sub.after { margin-top: 26px; }
.band-sub a { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* Checkout pieces from the shared payment module (class names are fixed there). */
.pay-box { display: grid; gap: 6px; min-width: 0; }
.payment-wallets { display: grid; gap: 10px; width: 100%; min-width: 0; }
.payment-paypal-button, .payment-apple-button, .payment-google-button { min-width: 0; }
.payment-apple-button:empty, .payment-google-button:empty { display: none; }
.payment-fallback { justify-self: center; margin: 4px 0 8px; }
.text-button { background: none; border: 0; padding: 6px 0; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 15px; cursor: pointer; }
.btn-lg { width: 100%; min-height: 50px; justify-content: center; }
.btn-ink { background: var(--ink); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.card-checkout { margin-top: 4px; text-align: left; min-width: 0; }
.card-checkout > .btn, .card-checkout form > .btn { width: 100%; margin-top: 12px; }
.card-caption { font-size: 15px; line-height: 1.5; margin: 12px 0 8px; color: var(--mute); }
.card-field-wrap { margin: 12px 0; }
.card-field-wrap > span, .card-address label { font-size: 14px; font-weight: 700; color: var(--mute); }
.secure-card-field { height: 48px; width: 100%; background: #fff; border: 2px solid var(--ink); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.card-address { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.card-address label { display: block; min-width: 0; }
.card-address input, .card-address select { display: block; min-width: 0; width: 100%; height: 48px; padding: 8px 10px; font: inherit; font-size: 16px; background: #fff; color: #111; border: 2px solid var(--ink); border-radius: 10px; margin-top: 6px; }
.card-note { font-size: 14px; line-height: 1.5; color: var(--mute); margin-top: 12px; }
.card-error { font-size: 15px; line-height: 1.5; color: #b42318; margin: 12px 0; font-weight: 600; }
/* Blank template page */
.tpl { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 34px; align-items: start; }
.tpl-view { border: var(--line); border-radius: 14px; background: #fff; box-shadow: 9px 9px 0 var(--blue); overflow: hidden; }
.tpl-view canvas { display: block; width: 100%; height: auto; }
.tpl-side { display: grid; gap: 22px; }
.tpl-side .field input { font-size: 17px; }
@media (max-width: 860px) { .tpl { grid-template-columns: 1fr; } .file-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 400px) { .card-address { grid-template-columns: 1fr; } }

/* Card looks (written by build.mjs from src/data/themes.mjs) */
.bcard[data-theme="classic"]{--paper:#ffffff;--ink:#111111;--blue:#2a50e8;--head-ink:#ffffff;--t-sun:#fff3c9;--t-coral:#ffe1dd;--t-blue:#dfe7ff;--sun:#ffc62b;--free-ink:#111111;--stamp:#111111;--stamp-ink:#ffffff;--rf:1;font-family:Bricolage, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;color:#111111}
.bcard[data-theme="confetti"]{--paper:#ffffff;--ink:#1b1035;--blue:#ff3d8b;--head-ink:#ffffff;--t-sun:#d9fbf2;--t-coral:#fff1b8;--t-blue:#ffd9ea;--sun:#19c3a6;--free-ink:#ffffff;--stamp:#1b1035;--stamp-ink:#ffffff;--rf:1.3;font-family:Bricolage, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;color:#1b1035}
.bcard[data-theme="notebook"]{--paper:#fffef8;--ink:#1d2b53;--blue:#1d2b53;--head-ink:#fffef8;--t-sun:#fffef8;--t-coral:#f3f6ff;--t-blue:#fff7e0;--sun:#ffd84d;--free-ink:#1d2b53;--stamp:#d9342b;--stamp-ink:#ffffff;--rf:0.35;font-family:Bricolage, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;color:#1d2b53}
.bcard[data-theme="midnight"]{--paper:#141a3a;--ink:#f4f1ff;--blue:#7c5cff;--head-ink:#ffffff;--t-sun:#1d2550;--t-coral:#252e63;--t-blue:#2b2260;--sun:#ffc62b;--free-ink:#0b1026;--stamp:#ffc62b;--stamp-ink:#0b1026;--rf:1;font-family:Bricolage, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;color:#f4f1ff}
.bcard[data-theme="letterpress"]{--paper:#f7f1e1;--ink:#23302b;--blue:#23302b;--head-ink:#f7f1e1;--t-sun:#f7f1e1;--t-coral:#efe7d2;--t-blue:#f7f1e1;--sun:#b5442c;--free-ink:#f7f1e1;--stamp:#b5442c;--stamp-ink:#f7f1e1;--rf:0.15;font-family:Georgia, 'Times New Roman', serif;color:#23302b}
.bcard[data-theme="gold-foil"]{--paper:#16140f;--ink:#f6e7b4;--blue:#d9b24c;--head-ink:#16140f;--t-sun:#1f1c14;--t-coral:#262218;--t-blue:#1f1c14;--sun:#d9b24c;--free-ink:#16140f;--stamp:#f6e7b4;--stamp-ink:#16140f;--rf:0.5;font-family:Georgia, 'Times New Roman', serif;color:#f6e7b4}
.bcard[data-theme="scrapbook"]{--paper:#fbf3e4;--ink:#3b2a20;--blue:#e2725b;--head-ink:#fffaf0;--t-sun:#fde2c8;--t-coral:#d8ecd8;--t-blue:#f9d5dc;--sun:#f2c14e;--free-ink:#3b2a20;--stamp:#3b2a20;--stamp-ink:#fbf3e4;--rf:0.4;font-family:Bricolage, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;color:#3b2a20}
.bcard[data-theme="disco"]{--paper:#1a0b3b;--ink:#ffffff;--blue:#f72585;--head-ink:#ffffff;--t-sun:#4361ee;--t-coral:#7209b7;--t-blue:#b5179e;--sun:#4cc9f0;--free-ink:#1a0b3b;--stamp:#ffe066;--stamp-ink:#1a0b3b;--rf:1.4;font-family:Bricolage, 'Avenir Next', 'Segoe UI', system-ui, sans-serif;color:#ffffff}
.bcard[data-theme="botanical"]{--paper:#fbfaf3;--ink:#24392c;--blue:#3f6b4f;--head-ink:#fbfaf3;--t-sun:#eef4e6;--t-coral:#fbfaf3;--t-blue:#f6ead8;--sun:#d98b5f;--free-ink:#fbfaf3;--stamp:#3f6b4f;--stamp-ink:#fbfaf3;--rf:0.9;font-family:Georgia, 'Times New Roman', serif;color:#24392c}
.bcard[data-theme="arcade"]{--paper:#0c0c0c;--ink:#39ff88;--blue:#ff2bd6;--head-ink:#050505;--t-sun:#0f1a13;--t-coral:#150f1a;--t-blue:#0f1a13;--sun:#39ff88;--free-ink:#050505;--stamp:#ff2bd6;--stamp-ink:#050505;--rf:0;font-family:ui-monospace, 'SF Mono', Menlo, Consolas, monospace;color:#39ff88}
