/* made you a card — design system: pixel cat + postage stamps + gummy buttons. One theme per occasion via --t-* vars. */
@font-face { font-family: "PS2P"; src: url(/vendor/ps2p.woff2) format("woff2"); font-display: swap; }

:root {
  color-scheme: light;
  --paper: #fff8ee; --cream: #fff1dd; --ink: #3b2840; --ink-soft: #725f76; --line: #f0dccb;
  --rose: #ff5d8f; --rose-deep: #d9356b; --rose-shadow: #b8285a; --blush: #ffd9e6;
  --lemon: #ffe27a; --mint: #8fe3bd; --sky: #9fd3ff; --lilac: #d4c0ff; --peach: #ffc6a3; --stamp: #ff6b6b; --plum: #4f072b;
  --n-peach: #ffe6d6; --n-mint: #dbf7ea; --n-sky: #def0ff; --n-lilac: #eee5ff; --n-lemon: #fff5c9; --n-rose: #ffe3ec; --n-paper: #fffdf8;
  /* theme (defaults = birthday); themes.js overrides these per occasion */
  --t-bg1: #fff1dd; --t-bg2: #ffe3ee; --t-env: #ffd0df; --t-pocket1: #ffe1eb; --t-pocket2: #ffc4d8; --t-flap1: #ffb7cf; --t-flap2: #ff9fc0;
  --t-seal1: #ff9bb9; --t-seal2: #e23e72; --t-accent: #ff6f9c; --t-accent-deep: #d9356b; --t-accent-soft: #ffd0df;
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pixel: "PS2P", ui-monospace, monospace;
  --radius: 22px;
  --bounce: cubic-bezier(.34, 1.56, .64, 1);
}
html[lang="ko"], html[lang="zh-Hans"], html[lang="hi"], html[lang="ar"], html[lang="ja"] { --pixel: var(--round); --px: 1.38; }
html[lang="ko"] .kicker, html[lang="zh-Hans"] .kicker, html[lang="hi"] .kicker, html[lang="ar"] .kicker, html[lang="ja"] .kicker, html[lang="ko"] .pixel, html[lang="zh-Hans"] .pixel, html[lang="hi"] .pixel, html[lang="ar"] .pixel, html[lang="ja"] .pixel { font-weight: 900; letter-spacing: 0; }
/* right-to-left (Arabic): the page mirrors, but pictures, boards and cards keep their drawn direction */
[dir="rtl"] .bd, [dir="rtl"] .bdwrap .rollrow, [dir="rtl"] .envelope, [dir="rtl"] .ccard .cc-top, [dir="rtl"] .ccard .cc-stats, [dir="rtl"] .stamp, [dir="rtl"] canvas, [dir="rtl"] .cassette, [dir="rtl"] .sticks, [dir="rtl"] .candles, [dir="rtl"] .padrow { direction: ltr; }
[dir="rtl"] .envelope .addr { direction: rtl; text-align: right; left: auto; right: 7%; }
[dir="rtl"] .catw .bubble, [dir="rtl"] .note, [dir="rtl"] .seat .who, [dir="rtl"] .youbar, [dir="rtl"] .goody, [dir="rtl"] table.sb td { text-align: right; }
[dir="rtl"] table.sb td.p { text-align: left; }
[dir="rtl"] .note .sticker { right: auto; left: 10px; } [dir="rtl"] .note .del, [dir="rtl"] .note .heart { right: auto; left: 10px; } [dir="rtl"] .note .heart ~ .by { padding-right: 0; padding-left: 90px; }
[dir="rtl"] .note .latestamp { left: auto; right: 12px; }
[dir="rtl"] .front .corner { right: auto; left: 18px; }
[dir="rtl"] .ico { margin-right: 0; margin-left: 6px; }
/* another language is being loaded: don't flash the English first (public/i18n-boot.js) */
html.i18n-wait body { visibility: hidden; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; font-family: var(--round); color: var(--ink); line-height: 1.5;
  background:
    radial-gradient(circle at 12% 8%, var(--t-bg2) 0 120px, transparent 260px),
    radial-gradient(circle at 92% 18%, #e4f3ff 0 110px, transparent 250px),
    radial-gradient(circle at 80% 95%, var(--t-bg1) 0 120px, transparent 260px),
    var(--paper);
  min-height: 100vh; overflow-x: clip;
}
img.px, canvas.doodle, canvas.padc { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--rose-deep); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.pixel { font-family: var(--pixel); letter-spacing: .02em; line-height: 1.6; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); font-weight: 900; }
html[lang="ja"] h1, html[lang="zh-Hans"] h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); } /* CJK: whole lines of full-width characters need a smaller size to fit the column */
h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 900; }
h3 { font-size: 1.2rem; font-weight: 800; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-soft); }
.kicker { font-family: var(--pixel); font-size: calc(.62rem * var(--px, 1)); color: var(--t-accent-deep); text-transform: uppercase; letter-spacing: .08em; }
em.wiggle { font-style: normal; color: var(--rose); display: inline-block; animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-2px); } }
.ico { vertical-align: -6px; margin-right: 6px; }

/* ---------- nav / footer ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo b { font-family: var(--pixel); font-size: calc(.72rem * var(--px, 1)); line-height: 1.4; }
.logo .env { width: 34px; height: 24px; background: #fff; border: 3px solid var(--ink); border-radius: 4px; position: relative; flex: none; }
.logo .env::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom right, transparent 49%, var(--ink) 50%, transparent 56%), linear-gradient(to bottom left, transparent 49%, var(--ink) 50%, transparent 56%); background-size: 50% 100%; background-repeat: no-repeat; background-position: left, right; clip-path: inset(0 0 45% 0); }
.logo .env::after { content: "♥"; position: absolute; top: 30%; left: 50%; transform: translate(-50%, -20%); color: var(--rose); font-size: 11px; }
.navlinks { display: flex; align-items: center; gap: 16px; }
.navlinks a.plain { color: var(--ink); text-decoration: none; font-weight: 700; }
footer.foot { padding: 40px 0 50px; color: var(--ink-soft); font-size: .9rem; text-align: center; }
footer.foot a { color: var(--ink-soft); }
footer.foot .links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- gummy buttons ---------- */
.btn {
  --c1: #ff86ad; --c2: #ff4f86; --sh: var(--rose-shadow);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 800 1.02rem/1 var(--round); color: #fff; text-decoration: none; cursor: pointer;
  padding: 15px 24px 16px; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow: inset 0 3px 0 rgba(255,255,255,.5), inset 0 -4px 0 rgba(0,0,0,.12), 0 6px 0 var(--sh), 0 12px 20px rgba(184,40,90,.28);
  transition: transform .18s var(--bounce), box-shadow .18s; -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn::after { content: ""; position: absolute; left: 14%; right: 14%; top: 5px; height: 34%; border-radius: 999px; background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,0)); pointer-events: none; }
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: translateY(4px) scale(.97); box-shadow: inset 0 3px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.12), 0 2px 0 var(--sh), 0 4px 10px rgba(184,40,90,.25); }
.btn:focus-visible { outline: 4px solid #7cc7ff; outline-offset: 3px; }
.btn[disabled] { filter: grayscale(.5) opacity(.6); pointer-events: none; }
.btn.mint { --c1: #a8f0cf; --c2: #4fcf97; --sh: #2e9e6d; color: #10432c; }
.btn.lemon { --c1: #fff0a6; --c2: #ffd23f; --sh: #c99a12; color: #4a3700; }
.btn.ghost { --c1: #fff; --c2: #fff3f7; --sh: #f0c4d4; color: var(--rose-deep); }
.btn.small { font-size: .9rem; padding: 10px 16px 11px; }
.btn.big { font-size: 1.15rem; padding: 18px 30px 19px; }
.btn .px { width: 26px; height: 26px; margin: -6px 0; }

/* ---------- surfaces ---------- */
.panel { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 0 var(--line), 0 14px 34px rgba(120, 60, 90, .10); border: 2px solid #fff; }
.panel + .panel { margin-top: 18px; }
.grid-panels > .panel { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; padding: 6px 12px; border-radius: 999px; background: var(--blush); color: var(--rose-deep); }
.pill.mint { background: #d8f6e8; color: #1f7a52; } .pill.lemon { background: #fff2bf; color: #7a5a00; } .pill.sky { background: #dcefff; color: #22598a; } .pill.red { background: #ffe0e0; color: #b42318; }

/* postage stamp with perforated edge */
.stamp { --r: 5px; --s: calc(var(--r) * 3); display: inline-grid; place-items: center; padding: calc(var(--r) * 2.4); background: #fff;
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - var(--s)) calc(100% - var(--s)) no-repeat, radial-gradient(circle, #0000 var(--r), #000 calc(var(--r) + .6px)) calc(var(--s) / -2) calc(var(--s) / -2) / var(--s) var(--s) round;
          mask: linear-gradient(#000 0 0) center / calc(100% - var(--s)) calc(100% - var(--s)) no-repeat, radial-gradient(circle, #0000 var(--r), #000 calc(var(--r) + .6px)) calc(var(--s) / -2) calc(var(--s) / -2) / var(--s) var(--s) round;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.08)); }
.stamp .inner { background: var(--stamp-bg, var(--t-accent-soft)); border-radius: 3px; padding: 8px; display: grid; place-items: center; }
.postmark { position: absolute; width: 92px; height: 92px; opacity: .55; color: #7b4a6b; pointer-events: none; }

/* ---------- form bits ---------- */
label.f { display: block; font-weight: 800; margin: 14px 0 6px; }
.hint { font-weight: 600; color: var(--ink-soft); font-size: .88rem; }
input.t, textarea.t, select.t {
  width: 100%; font: 600 1.05rem/1.4 var(--round); color: var(--ink); background: var(--n-paper);
  border: 2.5px solid #f2d7e2; border-radius: 16px; padding: 13px 15px; transition: border-color .15s, box-shadow .15s;
}
textarea.t { min-height: 130px; resize: vertical; }
input.t:focus, textarea.t:focus, select.t:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 5px rgba(255, 93, 143, .16); }
.row { display: flex; gap: 12px; flex-wrap: wrap; } .row > * { flex: 1 1 200px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font: 800 .95rem/1 var(--round); color: var(--ink); background: #fff; border: 2.5px solid #f3dbe5; border-radius: 999px; padding: 11px 15px; cursor: pointer; transition: transform .15s var(--bounce), background .15s, border-color .15s; display: inline-flex; align-items: center; gap: 8px; }
.chip .px { width: 24px; height: 24px; margin: -6px 0; }
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { background: var(--blush); border-color: var(--rose); color: var(--rose-deep); transform: scale(1.04); }
.chip.tiny { font-size: .82rem; padding: 8px 12px; }
.stickers { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.sticker-btn { height: 56px; border-radius: 14px; border: 2.5px solid #f3e1d4; background: #fff; display: grid; place-items: center; font-size: 26px; cursor: pointer; transition: transform .15s var(--bounce); padding: 0; }
.sticker-btn img { width: 44px; height: 44px; }
.sticker-btn img.cat { width: 50px; height: auto; }
.sticker-btn[aria-pressed="true"] { border-color: var(--rose); background: var(--blush); transform: scale(1.08) rotate(-3deg); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #ecd6c6; cursor: pointer; transition: transform .15s var(--bounce); padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--rose); transform: scale(1.12); }
.copyrow { display: flex; gap: 8px; align-items: stretch; }
.copyrow input { flex: 1; min-width: 0; font-size: .95rem; }

/* ---------- notes (the messages) ---------- */
.board { columns: 3 260px; column-gap: 18px; }
.note {
  --bg: var(--n-paper); break-inside: avoid; position: relative; margin: 0 0 18px; padding: 26px 18px 16px; border-radius: 16px;
  background: var(--bg); box-shadow: 0 2px 0 rgba(0,0,0,.05), 0 10px 22px rgba(120, 60, 90, .10); transform: rotate(var(--rot, 0deg));
}
.note::before { content: ""; position: absolute; top: -10px; left: 50%; width: 86px; height: 22px; transform: translateX(-50%) rotate(-2deg);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.65) 0 6px, rgba(255,255,255,.25) 6px 12px), var(--tape, #ffb3cc); opacity: .85; border-radius: 3px; }
.note .sticker { position: absolute; top: -20px; right: 10px; font-size: 34px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.08)); line-height: 1; }
.note .sticker img { width: 56px; height: 56px; display: block; }
.note .sticker img[src*="/img/cat-"] { width: 64px; height: auto; }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 10px; font-size: 1.04rem; font-weight: 600; }
.note .by { font-weight: 900; color: var(--rose-deep); }
.note .del { position: absolute; bottom: 8px; right: 10px; border: 0; background: none; color: var(--ink-soft); font-weight: 800; cursor: pointer; font-size: .82rem; }
.note .doodle { display: block; margin: 2px 0 12px; border-radius: 10px; background: #fff; border: 2px solid rgba(0,0,0,.06); }
.note.peach { --bg: var(--n-peach); --tape: #ffbf99; } .note.mint { --bg: var(--n-mint); --tape: #8fe3bd; } .note.sky { --bg: var(--n-sky); --tape: #9fd3ff; }
.note.lilac { --bg: var(--n-lilac); --tape: #c8b2ff; } .note.lemon { --bg: var(--n-lemon); --tape: #ffe27a; } .note.rose { --bg: var(--n-rose); --tape: #ff9fbf; }
.pop { animation: pop .55s var(--bounce) both; }
@keyframes pop { 0% { opacity: 0; transform: scale(.6) rotate(var(--rot, 0deg)); } 100% { opacity: 1; transform: scale(1) rotate(var(--rot, 0deg)); } }

/* awards pinned on a note */
.award { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin: 0 0 10px; padding: 3px 11px 3px 4px; border-radius: 999px; background: #fff6d2; border: 2px solid #f0b429; color: #7a5300; font-weight: 900; font-size: .8rem; line-height: 1.2; }
.award img { width: 24px; height: 24px; flex: none; }
.shelf { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px auto 4px; }
.shelf .award { margin: 0; font-size: .85rem; }

/* late notes */
.note.late { --tape: #ffb3b3; outline: 2px dashed #ff9b9b; outline-offset: 3px; padding-top: 44px; }
.note.late .quip { font-family: var(--pixel); font-size: calc(.55rem * var(--px, 1)); line-height: 1.7; color: #b42318; margin: -2px 0 10px; }
.note .latestamp { position: absolute; top: 10px; left: 12px; font-family: var(--pixel); font-size: calc(.55rem * var(--px, 1)); color: #d92d20; border: 2px solid #d92d20; border-radius: 4px; padding: 3px 5px; transform: rotate(-9deg); opacity: .8; background: rgba(255,255,255,.6); }

/* ---------- envelope ---------- */
.envelope { position: relative; width: min(340px, 82vw); aspect-ratio: 1.45; margin: 0 auto; perspective: 900px; container-type: inline-size; }
.envelope .back, .envelope .pocket, .envelope .flap { position: absolute; inset: 0; border-radius: 14px; }
.envelope .back { background: var(--t-env); box-shadow: 0 18px 40px rgba(120, 40, 90, .22); }
.envelope .letter { position: absolute; left: 7%; right: 7%; top: 8%; bottom: 10%; background: #fffdf8; border-radius: 10px; box-shadow: 0 2px 0 rgba(0,0,0,.05); transition: transform .9s var(--bounce) .35s; display: grid; place-items: center; }
.envelope .pocket { background: linear-gradient(160deg, var(--t-pocket1), var(--t-pocket2)); clip-path: polygon(0 34%, 50% 70%, 100% 34%, 100% 100%, 0 100%); }
.envelope .flap { background: linear-gradient(180deg, var(--t-flap1), var(--t-flap2)); clip-path: polygon(0 0, 100% 0, 50% 62%); transform-origin: top; transition: transform .6s ease, z-index 0s .3s; z-index: 3; }
.envelope .seal { position: absolute; left: 50%; top: 57%; transform: translate(-50%, -50%); width: 16cqw; height: 16cqw; font-size: 7cqw !important; border-radius: 50%; z-index: 4;
  background: radial-gradient(circle at 35% 30%, var(--t-seal1), var(--t-seal2) 70%); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 4px 8px rgba(0,0,0,.2); display: grid; place-items: center; color: #fff; font-size: 24px; transition: transform .35s var(--bounce), opacity .3s; }
.envelope .addr { position: absolute; left: 7%; bottom: 8%; max-width: 58%; z-index: 4; font-family: var(--pixel); font-size: calc(max(6px, 2.5cqw) * var(--px, 1)); color: #6b2f4f; line-height: 1.8; text-align: left; }
.envelope .addr span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.envelope .env-stamp { position: absolute; right: 6%; bottom: 9%; z-index: 4; transform: rotate(4deg); }
.envelope .env-stamp > .inner > img { width: 14cqw; }
.envelope .postmark { right: 4%; top: 6%; width: 24cqw; height: 24cqw; transform: rotate(-12deg); z-index: 5; }
.envelope.open .flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .seal { transform: translate(-50%, -50%) scale(0); opacity: 0; }
.envelope.open .letter { transform: translateY(-46%); }
.floaty { animation: floaty 3.2s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.shake { animation: shake 2.6s ease-in-out infinite; }
@keyframes shake { 0%, 84%, 100% { transform: rotate(0); } 87% { transform: rotate(-3deg); } 90% { transform: rotate(3deg); } 93% { transform: rotate(-2deg); } 96% { transform: rotate(2deg); } }
.nope { animation: nope .45s ease-in-out; }
@keyframes nope { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px) rotate(-2deg); } 40% { transform: translateX(10px) rotate(2deg); } 60% { transform: translateX(-7px); } 80% { transform: translateX(7px); } }

/* ---------- the cat ---------- */
.catw { position: relative; width: var(--size, 170px); aspect-ratio: 126 / 116; display: inline-block; vertical-align: bottom; }
.catw .face, .catw .acc { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; pointer-events: none; }
.catw .accs { position: absolute; inset: 0; }
.catw.pokeable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.catw .bubble { position: absolute; left: 78%; bottom: 82%; min-width: 120px; max-width: 220px; width: max-content; padding: 8px 12px; background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; font-weight: 800; font-size: .92rem; line-height: 1.3; text-align: left;
  opacity: 0; transform: translateY(6px) scale(.9); transform-origin: bottom left; transition: opacity .2s, transform .25s var(--bounce); pointer-events: none; z-index: 5; }
.catw .bubble::after { content: ""; position: absolute; left: 10px; bottom: -11px; width: 14px; height: 14px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: skewX(20deg) rotate(45deg); }
.catw .bubble.show { opacity: 1; transform: none; }
.catw.bubble-left .bubble { left: auto; right: 78%; transform-origin: bottom right; }
.catw.bubble-left .bubble::after { left: auto; right: 10px; transform: skewX(-20deg) rotate(45deg); }
.catw.hop .face, .catw.hop .acc { animation: hop 1.1s var(--bounce) infinite alternate; }
@keyframes hop { from { transform: translateY(0) scaleY(1); } to { transform: translateY(-12px) scaleY(1.04); } }
.catw.squish .face, .catw.squish .acc { animation: squish .35s var(--bounce); }
@keyframes squish { 0% { transform: scale(1, 1); } 35% { transform: scale(1.12, .82) translateY(6%); } 70% { transform: scale(.94, 1.08); } 100% { transform: none; } }
.catw.leave { animation: leave 1.1s ease-in forwards; }
@keyframes leave { to { transform: translateX(140vw) rotate(20deg); } }
.catw.return { animation: ret .9s var(--bounce) both; }
@keyframes ret { from { transform: translateX(-140vw); } to { transform: none; } }
.catw.swat .acc-paw { animation: swat .4s ease-out; }
@keyframes swat { 0% { transform: translate(14%, -6%) rotate(-25deg); } 60% { transform: translate(-6%, 4%) rotate(10deg); } 100% { transform: none; } }

/* ---------- décor particles (behind the content) ---------- */
.decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.decor > * { position: absolute; left: var(--x); top: var(--y); animation-delay: var(--delay); animation-duration: var(--d); animation-iteration-count: infinite; animation-timing-function: linear; }
.d-balloons { width: 34px; height: 42px; background: radial-gradient(circle at 35% 30%, #fff8 0 6px, transparent 7px), var(--c); border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%; top: 110%; animation-name: d-rise, sway; animation-timing-function: linear, ease-in-out; animation-duration: var(--d), 3s; opacity: .9; transform: scale(var(--s)); }
.d-balloons::before { content: ""; position: absolute; left: 50%; bottom: -8px; width: 8px; height: 8px; background: var(--c); transform: translateX(-50%) rotate(45deg); }
.d-balloons::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 46px; background: rgba(59,40,64,.35); transform: translateX(-50%); }
@keyframes d-rise { from { transform: translateY(0) scale(var(--s)); } to { transform: translateY(-140vh) scale(var(--s)); } }
@keyframes sway { 0%, 100% { margin-left: 0; } 50% { margin-left: 26px; } }
.d-hearts { width: 22px; height: 22px; top: 105%; color: var(--c); animation-name: d-rise, sway; animation-duration: var(--d), 2.6s; animation-timing-function: linear, ease-in-out; transform: scale(var(--s)); }
.d-hearts::before, .d-hearts::after { content: ""; position: absolute; width: 11px; height: 18px; left: 11px; top: 0; background: currentColor; border-radius: 11px 11px 0 0; transform: rotate(-45deg); transform-origin: 0 100%; }
.d-hearts::after { left: 0; transform: rotate(45deg); transform-origin: 100% 100%; }
.d-bubbles { width: 26px; height: 26px; border: 3px solid rgba(255,255,255,.9); border-radius: 50%; box-shadow: inset 2px 2px 0 rgba(255,255,255,.6), 0 0 0 2px rgba(120,180,255,.25); top: 105%; animation-name: d-rise, sway; animation-duration: var(--d), 3.4s; animation-timing-function: linear, ease-in-out; transform: scale(var(--s)); }
.d-petals { width: 16px; height: 22px; background: var(--c); border-radius: 60% 60% 60% 60% / 80% 80% 40% 40%; top: -10%; opacity: .85; animation-name: d-fall, spin; animation-duration: var(--d), 3s; transform: scale(var(--s)); }
.d-snow { width: 9px; height: 9px; background: #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(159,211,255,.35); top: -10%; animation-name: d-fall, sway; animation-duration: var(--d), 4s; animation-timing-function: linear, ease-in-out; transform: scale(var(--s)); }
@keyframes d-fall { from { transform: translateY(0) scale(var(--s)); } to { transform: translateY(130vh) scale(var(--s)); } }
@keyframes spin { 0%, 100% { margin-left: 0; rotate: 0deg; } 50% { margin-left: 30px; rotate: 180deg; } }
.d-gold, .d-stars { width: 14px; height: 14px; background: var(--c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation-name: twinkle; animation-timing-function: ease-in-out; opacity: 0; }
.d-gold { background: #f6c453; }
.d-planes { width: 54px; height: 36px; left: -12%; animation-name: fly; animation-timing-function: linear; transform: scale(var(--s)); filter: drop-shadow(0 4px 0 rgba(0,0,0,.08)); }
.d-planes svg { width: 100%; height: 100%; display: block; }
@keyframes fly { 0% { transform: translateX(0) translateY(0) rotate(0) scale(var(--s)); } 50% { transform: translateX(60vw) translateY(-40px) rotate(-6deg) scale(var(--s)); } 100% { transform: translateX(125vw) translateY(10px) rotate(4deg) scale(var(--s)); } }

.sparkles { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sparkles i { position: absolute; width: 10px; height: 10px; background: var(--c, #ffd23f); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle var(--d, 3s) ease-in-out infinite var(--delay, 0s); opacity: .0; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: .9; transform: scale(1) rotate(45deg); } }
main, .nav, footer { position: relative; z-index: 1; }

/* ---------- card page bits ---------- */
.front { position: relative; max-width: 720px; margin: 20px auto 26px; padding: 44px 24px 30px; text-align: center; background: #fffdf8; border-radius: 28px;
  box-shadow: 0 3px 0 var(--line), 0 24px 60px rgba(120, 40, 90, .18); border: 3px solid #fff; overflow: hidden; }
.front::before { content: ""; position: absolute; inset: 10px; border: 3px dashed color-mix(in srgb, var(--t-accent) 45%, #fff); border-radius: 20px; pointer-events: none; }
.front .occ { font-family: var(--pixel); font-size: calc(clamp(.72rem, 2.4vw, 1rem) * var(--px, 1)); color: var(--t-accent-deep); line-height: 1.7; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.front .occ img { width: 28px; height: 28px; }
.front .who { font-size: clamp(2.8rem, 10vw, 5.2rem); font-weight: 900; line-height: 1; margin: 10px 0 10px; background: linear-gradient(180deg, var(--t-accent), var(--t-accent-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 var(--t-accent-soft)); overflow-wrap: anywhere; }
.front .catw { margin: 2px auto 0; display: block; }
.greet { font-weight: 800; color: var(--t-accent-deep); font-size: 1.08rem; line-height: 1.5; margin: 4px 0 0; overflow-wrap: anywhere; }
.front .from { font-weight: 800; color: var(--ink-soft); font-size: 1.05rem; margin-top: 8px; }
.front .catw.bubble-left .bubble { right: 60%; }
@media (max-width: 560px) { .front .catw.bubble-left .bubble { right: 45%; max-width: 150px; } }
.front .corner { position: absolute; top: 18px; right: 18px; transform: rotate(6deg); }
.front .corner .inner { padding: 4px; }
.front .corner .catw { --size: 52px !important; }
.appear { animation: rise .8s var(--bounce) both; }
@keyframes rise { from { opacity: 0; transform: translateY(40px) scale(.92); } to { opacity: 1; transform: none; } }
.end { text-align: center; margin: 30px auto 10px; max-width: 560px; }
.banner { background: var(--lemon); font-weight: 800; text-align: center; padding: 10px 14px; position: relative; z-index: 2; }
.count { font-family: var(--pixel); font-size: calc(2rem * var(--px, 1)); color: var(--t-accent-deep); }
.stage { min-height: 82vh; display: grid; place-items: center; text-align: center; padding: 20px 0; }
.stage .envelope { width: min(400px, 88vw); cursor: pointer; }
.stage .addr { font-size: .68rem; }
.stage .env-stamp > .inner > img { width: 64px; }
.tap { margin-top: 30px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* candles on a birthday card */
.candles { display: flex; justify-content: center; gap: 18px; margin: 10px 0 4px; min-height: 70px; }
.candle { position: relative; width: 16px; height: 46px; border-radius: 4px; background: repeating-linear-gradient(135deg, var(--c, #ff9fbf) 0 6px, #fff 6px 12px); cursor: pointer; border: 0; padding: 0; margin-top: 22px; box-shadow: 0 2px 0 rgba(0,0,0,.08); -webkit-tap-highlight-color: transparent; }
.candle::before { content: ""; position: absolute; left: 50%; top: -8px; width: 2px; height: 8px; background: #3b2840; transform: translateX(-50%); }
.candle .flame { position: absolute; left: 50%; top: -26px; width: 14px; height: 20px; transform: translateX(-50%); background: radial-gradient(circle at 50% 70%, #fff 0 3px, #ffd23f 4px, #ff8a3d 70%, transparent 72%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transform-origin: bottom; animation: flicker .5s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: translateX(-50%) scale(1) rotate(-4deg); } to { transform: translateX(-50%) scale(1.1, .92) rotate(4deg); } }
.candle.out .flame { animation: none; opacity: 0; }
.candle.out::after { content: ""; position: absolute; left: 50%; top: -30px; width: 10px; height: 10px; border-radius: 50%; background: rgba(120,120,120,.35); animation: smoke 1.2s ease-out forwards; }
@keyframes smoke { from { transform: translate(-50%, 0) scale(.6); opacity: .9; } to { transform: translate(-30%, -40px) scale(2.2); opacity: 0; } }
.wish { font-weight: 900; color: var(--t-accent-deep); min-height: 1.4em; margin: 2px 0 0; }

/* the spotlight where each message gets its moment */
.spot { max-width: 560px; margin: 0 auto 10px; min-height: 40px; position: relative; }
.spot .note { margin: 20px auto; max-width: 440px; transform: none; }
.flyin { animation: flyin .7s var(--bounce) both; }
@keyframes flyin { from { opacity: 0; transform: translate(60vw, 40px) rotate(12deg) scale(.7); } to { opacity: 1; transform: none; } }
.flyout { animation: flyout .5s ease-in both; }
@keyframes flyout { to { opacity: 0; transform: translateY(80px) scale(.8); } }
.who-from { text-align: center; font-family: var(--pixel); font-size: calc(.6rem * var(--px, 1)); color: var(--t-accent-deep); margin: 0 0 4px; }
.skip { text-align: center; margin: 4px 0 14px; }

/* the locked envelope with a guard cat */
.guard { display: flex; align-items: flex-end; justify-content: center; gap: 0; flex-wrap: wrap; }
.guard .catw { margin-left: -40px; margin-bottom: 10px; z-index: 6; }
@media (max-width: 560px) {
  .guard .catw { margin-left: -28px; --size: 120px !important; }
  /* on a phone the guard cat sits under the envelope, so its bubble goes straight up instead of off the left edge */
  .guard .catw.bubble-left .bubble { left: 50%; right: auto; translate: -50% 0; transform-origin: bottom center; }
  .guard .catw.bubble-left .bubble::after { left: 50%; right: auto; margin-left: -7px; transform: rotate(45deg); }
  .front .catw { --size: 150px !important; }
}

/* thank-you back */
.thanksbar { display: flex; gap: 14px; align-items: center; background: #fff; border: 3px solid var(--t-accent-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 auto 22px; max-width: 760px; }
.thanksbar .catw { flex: none; }
.thanksbar p { margin: 0; font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
.thanksbar .k { font-family: var(--pixel); font-size: calc(.55rem * var(--px, 1)); color: var(--t-accent-deep); margin-bottom: 4px; }

/* sign page: the coach */
.coach { display: grid; grid-template-columns: 1fr 150px; gap: 10px; align-items: end; }
.coach .catw { --size: 140px !important; justify-self: center; }
.coach .catw .bubble { left: auto; right: 70%; bottom: 80%; transform-origin: bottom right; }
.coach .catw .bubble::after { left: auto; right: 10px; transform: skewX(-20deg) rotate(45deg); }
@media (max-width: 480px) { .coach { grid-template-columns: 1fr 110px; } .coach .catw { --size: 104px !important; } }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.prompts .chip { font-size: .85rem; padding: 9px 12px; text-align: left; line-height: 1.25; }

/* doodle pad */
.pad { display: grid; gap: 10px; justify-items: start; }
.padc { width: 240px; height: 240px; background: #fff; border: 3px solid #f3e1d4; border-radius: 12px; touch-action: none; cursor: crosshair; background-image: linear-gradient(rgba(0,0,0,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.035) 1px, transparent 1px); background-size: calc(100% / 24) calc(100% / 24); }
.padrow { display: flex; flex-wrap: wrap; gap: 6px; max-width: 320px; }
.padsw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #ecd6c6; background: var(--c); cursor: pointer; padding: 0; }
.padsw.eraser { background: repeating-linear-gradient(45deg, #fff 0 4px, #e9e9e9 4px 8px); }
.padsw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--rose); transform: scale(1.15); }

/* landing: the live demo + occasion tiles */
.demo { position: relative; width: min(420px, 92vw); margin: 0 auto; min-height: 330px; }
.demo .envelope { width: min(340px, 85%); position: absolute; left: 50%; top: 40px; transform: translateX(-50%); transition: opacity .4s, transform .5s; z-index: 2; }
.demo .mini { position: relative; display: grid; align-content: start; justify-items: center; gap: 8px; opacity: 0; transition: opacity .5s; pointer-events: none; }
.demo .mini .front { margin: 0; padding: 26px 18px 18px; width: 100%; max-width: 420px; }
.demo .mini .front .who { font-size: clamp(2rem, 8vw, 3rem); }
.demo .mini .front .catw { --size: 120px !important; }
.demo .mini .minis { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; width: 100%; }
.demo .mini .note { width: 46%; margin: 14px 0 0; padding: 20px 12px 10px; font-size: .8rem; }
.demo .mini .note p { font-size: .82rem; margin-bottom: 6px; } .demo .mini .note .by { font-size: .8rem; } .demo .mini .note .sticker img { width: 40px; height: 40px; }
.demo.opened .envelope { opacity: 0; transform: translate(-50%, -30px) scale(.9); pointer-events: none; }
.demo.opened .mini { opacity: 1; }
.demo-switch { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 22px; }
.tile { display: grid; justify-items: center; gap: 4px; padding: 16px 10px 14px; border-radius: 20px; text-decoration: none; color: var(--ink); font-weight: 900; background: linear-gradient(160deg, var(--bg1), var(--bg2)); border: 3px solid #fff; box-shadow: 0 2px 0 var(--line), 0 10px 24px rgba(120,60,90,.08); transition: transform .2s var(--bounce); }
.tile:hover { transform: translateY(-4px) rotate(-1deg); }
.tile .catw { --size: 96px !important; }
.tile small { font-family: var(--pixel); font-size: calc(.5rem * var(--px, 1)); color: var(--ink-soft); }

/* ---------- photos, voice notes, hearts ---------- */
.polaroid { margin: 4px auto 12px; padding: 10px 10px 26px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.06), 0 10px 22px rgba(120,60,90,.14); transform: rotate(-1.5deg); width: fit-content; max-width: 100%; position: relative; }
.polaroid::before { content: ""; position: absolute; top: -9px; left: 50%; width: 70px; height: 18px; transform: translateX(-50%) rotate(3deg); background: repeating-linear-gradient(45deg, rgba(255,255,255,.6) 0 6px, rgba(255,255,255,.2) 6px 12px), var(--tape, #ffb3cc); opacity: .9; border-radius: 3px; }
.polaroid img { display: block; max-width: 100%; max-height: 260px; width: auto; height: auto; border-radius: 3px; background: #f3e9dc; }
.spot .polaroid img { max-height: 320px; }
.cassette { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; padding: 8px 10px; background: #3b2840; border-radius: 12px; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 4px 0 #26182a; }
.cassette .play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: linear-gradient(180deg, #ff86ad, #ff4f86); box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 3px 0 var(--rose-shadow); cursor: pointer; display: grid; place-items: center; }
.cassette .play .tri { width: 0; height: 0; border-left: 13px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.cassette.playing .play .tri { border: 0; width: 12px; height: 14px; margin: 0; background: linear-gradient(90deg, #fff 0 35%, transparent 35% 65%, #fff 65%); }
.cassette .body { flex: 1; min-width: 0; display: grid; gap: 5px; }
.cassette .reels { display: flex; justify-content: space-between; padding: 0 14px; }
.cassette .reels i { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #d4c0ff; background: radial-gradient(circle, #3b2840 0 3px, #fff 3px 5px, #3b2840 5px); }
.cassette.playing .reels i { animation: reel 1.1s linear infinite; }
@keyframes reel { to { transform: rotate(360deg); } }
.cassette .label { display: flex; justify-content: space-between; gap: 8px; font-family: var(--pixel); font-size: calc(.45rem * var(--px, 1)); color: #ffe27a; background: #fff3; padding: 3px 6px; border-radius: 4px; }
.cassette .label .who { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cassette .bar { height: 6px; background: #fff3; border-radius: 3px; overflow: hidden; }
.cassette .bar b { display: block; height: 100%; width: 0; background: #ffe27a; }
.cassette .time { font-family: var(--pixel); font-size: calc(.5rem * var(--px, 1)); color: #d4c0ff; flex: none; }
.note .heart { position: absolute; bottom: 8px; right: 10px; border: 0; background: #fff; border-radius: 999px; padding: 6px 10px 6px 8px; font-weight: 900; font-size: .8rem; color: var(--rose-deep); cursor: pointer; display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 2px 0 rgba(0,0,0,.06); transition: transform .2s var(--bounce); }
.note .heart img { width: 20px; height: 20px; }
.note .heart:hover { transform: scale(1.08); }
.note .heart[aria-pressed="true"] { background: var(--blush); }
.note .loved { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 8px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--blush); color: var(--rose-deep); font-weight: 900; font-size: .78rem; }
.note .loved img { width: 18px; height: 18px; }
.note .heart ~ .by { padding-right: 90px; }
.recbox { display: grid; gap: 10px; justify-items: start; margin-top: 12px; }
.recbox .meter { width: min(300px, 100%); height: 12px; background: #f3e1d4; border-radius: 6px; overflow: hidden; }
.recbox .meter b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8fe3bd, #ffd23f, #ff5d8f); transition: width .08s; }
.recbox .recdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #ff4f86; margin-right: 8px; animation: pulse 1s ease-in-out infinite; vertical-align: -1px; }
.mediarow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.mediarow .thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 2px 0 var(--line); }
.catw.tilt .face, .catw.tilt .acc { animation: tilt .7s ease-in-out; }
@keyframes tilt { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(5deg) translateX(2%); } }
.catw.twitch .face, .catw.twitch .acc { animation: twitch .5s ease-in-out; }
@keyframes twitch { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.03, .97) translateY(2%); } 70% { transform: scale(.98, 1.03); } }

/* ---------- games: cat cards (public/deck.js) ---------- */
.ccard { --w: 170px; --rc: #b9a7c2; width: var(--w); aspect-ratio: 5 / 7; container-type: inline-size; perspective: 800px; flex: none; }
.ccard.r-uncommon { --rc: #3fbf87; } .ccard.r-rare { --rc: #4a9cf0; } .ccard.r-legendary { --rc: #f0a80f; } .ccard.r-mythic { --rc: #ff5d8f; }
.ccard .cc-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s var(--bounce); }
.ccard.facedown .cc-in { transform: rotateY(180deg); }
.ccard .cc-face { position: absolute; inset: 0; border-radius: 7cqw; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.ccard .cc-front { background: linear-gradient(165deg, #fffdf8 0 50%, color-mix(in srgb, var(--rc) 26%, #fff) 100%); border: 2.6cqw solid var(--rc); box-shadow: 0 2px 0 rgba(0,0,0,.06), 0 10px 22px rgba(120,60,90,.16);
  padding: 3cqw 4cqw 3.5cqw; display: grid; grid-template-rows: auto 1fr auto auto auto; text-align: center; }
.ccard .cc-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--pixel); font-size: calc(4.3cqw * var(--px, 1)); color: var(--ink-soft); }
.ccard .cc-r { background: var(--rc); color: #fff; padding: 1.5cqw 2.4cqw 1.2cqw; border-radius: 99px; }
.ccard .cc-art { display: grid; place-items: end center; min-height: 0; margin: 1cqw 0; background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--rc) 30%, #fff) 0 44%, transparent 45%); }
.ccard .cc-art .catw { display: block; }
.ccard .cc-name { font-weight: 900; font-size: 9.4cqw; line-height: 1.1; color: var(--ink); }
.ccard .cc-line { font-weight: 700; font-size: 6.3cqw; line-height: 1.22; color: var(--ink-soft); min-height: 2.44em; margin-top: 1cqw; }
.ccard .cc-stats { display: flex; justify-content: space-between; gap: 1cqw; font-weight: 900; font-size: 4.9cqw; letter-spacing: .02em; color: var(--ink-soft); margin-top: 1.5cqw; padding-top: 1.6cqw; border-top: 1px dashed var(--rc); }
.ccard .cc-by { position: absolute; top: 14cqw; left: 3cqw; max-width: 72%; background: #fff; color: var(--rose-deep); border-radius: 99px; padding: 1cqw 3cqw; font-weight: 900; font-size: 6cqw; box-shadow: 0 1px 0 rgba(0,0,0,.08); transform: rotate(-4deg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ccard .cc-foil { position: absolute; top: 14cqw; right: 3cqw; background: linear-gradient(90deg, #ff9fbf, #ffe27a, #8fe3bd, #9fd3ff); color: var(--ink); font-family: var(--pixel); font-size: calc(3.3cqw * var(--px, 1)); padding: 1.4cqw 2.2cqw 1.1cqw; border-radius: 99px; transform: rotate(6deg); }
.ccard .cc-count { position: absolute; left: 3cqw; top: 14cqw; background: var(--ink); color: #fff; font-weight: 900; font-size: 5.4cqw; padding: .6cqw 2.6cqw; border-radius: 99px; }
.ccard .cc-back { transform: rotateY(180deg); background: repeating-linear-gradient(45deg, #ff86ad 0 9px, #ff6f9c 9px 18px); border: 2.6cqw solid #fff; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.06), 0 10px 22px rgba(120,60,90,.16); }
.ccard .cc-back img { width: 30cqw; height: 30cqw; background: #fff; border-radius: 50%; padding: 6cqw; box-sizing: content-box; }
.ccard.r-rare .cc-front { box-shadow: 0 0 0 1cqw #dcefff, 0 0 20px rgba(74,156,240,.45), 0 10px 22px rgba(120,60,90,.16); }
.ccard.r-legendary .cc-front { box-shadow: 0 0 0 1cqw #fff0bf, 0 0 26px rgba(240,168,15,.6), 0 10px 22px rgba(120,60,90,.16); }
.ccard.r-mythic .cc-front { border-color: transparent; background: linear-gradient(165deg, #fffdf8 0 50%, #ffe9f1 100%) padding-box, linear-gradient(135deg, #ff5d8f, #ffd23f, #8fe3bd, #9fd3ff, #d4c0ff, #ff5d8f) border-box; box-shadow: 0 0 0 1cqw #fff, 0 0 30px rgba(255,93,143,.6), 0 10px 22px rgba(120,60,90,.16); }
.ccard.r-mythic .catw .face { filter: sepia(1) saturate(4.2) hue-rotate(-10deg) brightness(1.03); }
.ccard.shiny .cc-front::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.7) 46%, rgba(159,211,255,.45) 50%, rgba(255,159,191,.45) 54%, transparent 60%); background-size: 320% 320%; animation: foil 3.2s ease-in-out infinite; }
@keyframes foil { 0% { background-position: 120% 0; } 60%, 100% { background-position: -20% 0; } }
.ccard.unknown .cc-front { background: #f8f1e8; border-style: dashed; box-shadow: none; }
.ccard.unknown .cc-art { background: none; }
.ccard.unknown .catw { filter: brightness(0); opacity: .12; }
.ccard.unknown .cc-name, .ccard.unknown .cc-top { color: #b9a9b5; }
.ccard.unknown .cc-r { background: #d8cbd3; }
.cdeck { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 14px 0 6px; }
.cdeck .ccard { --w: 186px; }
.pull { display: grid; justify-items: center; gap: 10px; margin: 20px 0 4px; padding-top: 18px; border-top: 2px dashed #f3e3d6; }
.pull .ccard { --w: 190px; cursor: pointer; }
.pull .ccard.facedown { animation: pulse 1.4s ease-in-out infinite; }
.pull .pullmsg { font-weight: 900; min-height: 1.5em; margin: 0; }
/* phones: two cards per row, as wide as the row allows */
@media (max-width: 560px) { .cdeck { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .cdeck .ccard { --w: 100%; } }

/* ---------- games: guess who wrote it ---------- */
.gameask, .scorecard { text-align: center; max-width: 480px; margin: 12px auto; border: 3px solid var(--t-accent-soft); }
.gameask .row, .scorecard .row { justify-content: center; margin-top: 12px; }
.gameask .row > *, .scorecard .row > * { flex: 0 0 auto; }
.gameask img.px, .scorecard img.px { width: 48px; height: 48px; }
.scorecard .big { font-family: var(--pixel); font-size: calc(clamp(1.5rem, 7vw, 2.4rem) * var(--px, 1)); color: var(--t-accent-deep); margin: 10px 0 12px; }
.guessq { text-align: center; font-weight: 900; margin: 0 0 10px; }
.guessrow { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 auto 4px; max-width: 520px; }
.guessrow .chip { font-size: 1rem; padding: 13px 18px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guessrow .chip[disabled] { cursor: default; transform: none; opacity: .6; }
.guessrow .chip.right { background: #d8f6e8; border-color: #4fcf97; color: #1f7a52; opacity: 1; transform: scale(1.06); }
.guessrow .chip.wrong { background: #ffe0e0; border-color: #ff9b9b; color: #b42318; opacity: 1; text-decoration: line-through; }
.verdict { text-align: center; font-weight: 800; min-height: 3em; color: var(--t-accent-deep); margin: 8px auto 0; max-width: 460px; }
.note .guessed { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 8px; padding: 3px 10px 3px 6px; border-radius: 999px; font-weight: 900; font-size: .78rem; background: #d8f6e8; color: #1f7a52; }
.note .guessed.no { background: #fff2bf; color: #7a5a00; padding-left: 10px; }
.note .guessed img { width: 18px; height: 18px; margin: 0; }
.gamebar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: center; text-align: center; background: #fff; border: 3px solid var(--t-accent-soft); border-radius: var(--radius); padding: 12px 16px; margin: 0 auto 22px; max-width: 760px; font-weight: 800; }
.gamebar img.px { width: 28px; height: 28px; }

/* ---------- games: the extras under the card front, and the cat's story ---------- */
.goodies { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 4px auto 22px; max-width: 760px; }
.goody { flex: 1 1 250px; display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: center; text-align: left; background: #fff; border: 3px solid var(--t-accent-soft); border-radius: 20px; padding: 13px 16px; cursor: pointer; font: inherit; color: var(--ink);
  box-shadow: 0 2px 0 var(--line), 0 10px 24px rgba(120,60,90,.08); transition: transform .2s var(--bounce), background .15s; -webkit-tap-highlight-color: transparent; }
.goody:hover { transform: translateY(-3px) rotate(-.6deg); }
.goody img { grid-row: span 2; width: 48px; height: 48px; }
.goody b { font-weight: 900; font-size: 1.05rem; align-self: end; } .goody small { color: var(--ink-soft); font-weight: 700; align-self: start; }
.goody[aria-expanded="true"] { background: var(--t-accent-soft); }
.gamebox { max-width: 760px; margin: 0 auto 26px; }
.gamebox.panel { border: 3px solid var(--t-accent-soft); }
#deckbox { max-width: 880px; }
.story-head { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 12px; padding-top: 52px; }
.story-head .catw .bubble { bottom: 104%; left: 34%; }
.story-head .catw { flex: none; }
.story-head h3 { margin: 6px 0 0; font-size: clamp(1.25rem, 4vw, 1.6rem); }
.story-text { font-size: clamp(1.05rem, 3.4vw, 1.2rem); font-weight: 700; line-height: 1.85; min-height: 7em; margin: 0 0 6px; }
.story-text mark.w { background: var(--t-accent-soft); color: var(--t-accent-deep); font-weight: 900; padding: 0 7px; border-radius: 8px; display: inline-block; line-height: 1.5; animation: wordpop .4s var(--bounce); }
.story-text mark.w.fill { background: #f3ece4; color: var(--ink-soft); }
@keyframes wordpop { from { transform: scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.story-foot .row > * { flex: 0 0 auto; }
.story-foot .hint { margin: 14px 0 0; text-align: center; }
.wordask { background: var(--t-accent-soft); border-radius: 16px; padding: 12px 14px 14px; margin-top: 18px; }
.wordask label.f { margin-top: 0; }
.wordask .hint { color: var(--ink); }

/* ---------- /play/: online classic games (public/arcade.js draws the boards) ---------- */
.bd { --bw: 340px; width: min(var(--bw), 100%); margin: 0 auto; display: block; touch-action: manipulation; }
.bd.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; background: #fff; border-radius: 24px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.ttt .cell { aspect-ratio: 1; border: 0; border-radius: 16px; background: var(--c, #fbf2ea); cursor: pointer; display: grid; place-items: center; padding: 0; transition: transform .15s var(--bounce), background .15s; -webkit-tap-highlight-color: transparent; }
.bd.ttt .cell:not(:disabled):hover { background: var(--blush); transform: scale(1.04); }
.bd.ttt .cell:disabled { cursor: default; }
.bd.ttt .cell img { width: 62%; height: 62%; }
.bd.ttt .cell.new img { animation: pop .35s var(--bounce); }
.bd.ttt .cell.win { box-shadow: 0 0 0 4px #ffd23f; animation: pulse 1s ease-in-out infinite; }
.bd.four { --bw: 378px; display: grid; grid-template-columns: repeat(7, 1fr); padding: 10px; background: linear-gradient(180deg, #7fb9f5, #4a9cf0); border-radius: 22px; box-shadow: inset 0 3px 0 rgba(255,255,255,.4), inset 0 -5px 0 rgba(0,0,0,.14), 0 6px 0 #2f6fb8, 0 16px 30px rgba(47,111,184,.3); }
.bd.four .col { display: grid; gap: 0; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.bd.four .col:disabled { cursor: default; }
.bd.four.go .col:not(:disabled):hover { background: rgba(255,255,255,.22); }
.bd.four .slot { aspect-ratio: 1; margin: 7%; border-radius: 50%; background: #fff8ee; box-shadow: inset 0 3px 0 rgba(0,0,0,.14); display: block; position: relative; }
.bd.four .disc { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55) 0 18%, transparent 19%), var(--c); box-shadow: inset 0 -4px 0 rgba(0,0,0,.16); }
.bd.four .disc.drop { animation: drop .45s cubic-bezier(.3, 0, .6, 1.25); }
@keyframes drop { from { transform: translateY(calc(var(--rows) * -118%)); } to { transform: none; } }
.bd.four .slot.win { box-shadow: 0 0 0 4px #ffe27a; animation: pulse 1s ease-in-out infinite; }
.bd.dots { --bw: 360px; background: #fffdf8; border-radius: 22px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12);
  background-image: linear-gradient(rgba(0,0,0,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,.03) 1px, transparent 1px); background-size: 14px 14px; }
.bd.dots .edge { stroke-width: 7; stroke-linecap: round; }
.bd.dots .edge.free { stroke-width: 4; stroke-dasharray: 2 8; }
.bd.dots .edge.last { stroke-width: 10; }
.bd.dots .hit { stroke: transparent; stroke-width: 24; stroke-linecap: round; cursor: pointer; outline: none; }
.bd.dots .hit:hover, .bd.dots .hit:focus-visible { stroke: var(--me, #ff5d8f); stroke-opacity: .45; stroke-width: 10; }
.bd.dots .dot { fill: var(--ink); }
.bd.dots .box.new { animation: pop .4s var(--bounce); transform-box: fill-box; transform-origin: center; }
.bd.dots image { image-rendering: pixelated; }
/* omok: stones on the crossings of a wooden board */
.bd.omok { --bw: 380px; background: #f6dfb4; border-radius: 18px; border: 3px solid #e2bd7e; box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.omok .grid { stroke: #b98d4f; stroke-width: 1.3; } .bd.omok .star { fill: #b98d4f; }
.bd.omok .hit { fill: transparent; cursor: pointer; outline: none; }
.bd.omok.go .hit:hover, .bd.omok.go .hit:focus-visible { fill: var(--me, #ff5d8f); fill-opacity: .45; }
.bd.omok .stone circle:first-child { stroke: rgba(0,0,0,.18); stroke-width: 1.5; }
.bd.omok .stone.new, .bd.tapatan .man.new, .bd.snakes .tok.new { animation: pop .35s var(--bounce); transform-box: fill-box; transform-origin: center; }
.bd.omok .stone.win circle:first-child { stroke: #ffd23f; stroke-width: 4; }
/* tapatan: nine points joined by lines */
.bd.tapatan { --bw: 330px; background: #fffdf8; border-radius: 22px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.tapatan .grid { stroke: #d9c3b3; stroke-width: 5; stroke-linecap: round; }
.bd.tapatan .pt { fill: #d9c3b3; }
.bd.tapatan .hit { fill: transparent; outline: none; pointer-events: none; }
.bd.tapatan .hit.on { pointer-events: auto; cursor: pointer; fill: var(--me, #ff5d8f); fill-opacity: .18; stroke: var(--me, #ff5d8f); stroke-width: 3; stroke-dasharray: 6 6; }
.bd.tapatan .hit.on:hover, .bd.tapatan .hit.on:focus-visible { fill-opacity: .4; }
.bd.tapatan .man image { image-rendering: pixelated; pointer-events: none; }
.bd.tapatan .man.mine { cursor: pointer; outline: none; }
.bd.tapatan .man.sel circle:first-child, .bd.tapatan .man.mine:focus-visible circle:first-child { stroke: var(--ink); stroke-width: 4; }
.bd.tapatan .man.win circle:first-child { stroke: #ffd23f; stroke-width: 6; }
/* mancala: two rows of six pits and a store at each end; your row is the bottom one */
.bd.mancala { --bw: 430px; display: grid; grid-template-columns: 1.15fr repeat(6, 1fr) 1.15fr; grid-template-rows: 1fr 1fr; gap: 6px; padding: 10px; background: linear-gradient(180deg, #d9a66b, #c48a4a); border-radius: 26px; box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -5px 0 rgba(0,0,0,.14), 0 6px 0 #9a6a35, 0 16px 30px rgba(120,80,40,.25); }
.bd.mancala .store { grid-row: 1 / 3; } .bd.mancala .store.left { grid-column: 1; } .bd.mancala .store.right { grid-column: 8; }
.bd.mancala .pit, .bd.mancala .store { position: relative; border: 0; border-radius: 999px; background: var(--c, #fff8ee); box-shadow: inset 0 4px 0 rgba(0,0,0,.16); display: grid; place-items: center; padding: 4px 2px 14px; min-width: 0; font: inherit; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.bd.mancala .pit { aspect-ratio: 1 / 1.25; }
.bd.mancala button.pit { cursor: pointer; transition: transform .15s var(--bounce); }
.bd.mancala button.pit:disabled { cursor: default; }
.bd.mancala.go button.pit:not(:disabled) { box-shadow: inset 0 4px 0 rgba(0,0,0,.16), 0 0 0 3px var(--d); }
.bd.mancala.go button.pit:not(:disabled):hover { transform: translateY(-3px); }
.bd.mancala .pit.last { outline: 3px dashed #fff; outline-offset: -5px; }
.bd.mancala b { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font-family: var(--pixel); font-size: calc(.55rem * var(--px, 1)); color: var(--ink); }
.bd.mancala .seeds { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; align-content: center; width: 78%; }
.bd.mancala .seeds i { width: 7px; height: 7px; border-radius: 50%; background: var(--d); box-shadow: inset -1px -1px 0 rgba(0,0,0,.2); }
.bd.mancala .store .seeds { width: 70%; }
@media (max-width: 480px) { .bd.mancala { gap: 4px; padding: 7px; border-radius: 20px; } .bd.mancala .seeds i { width: 5px; height: 5px; } .bd.mancala .seeds { gap: 1.5px; } }
/* snakes and ladders */
.bd.snakes { --bw: 360px; background: #fffdf8; border-radius: 18px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.snakes .sq { fill: #fff3e2; } .bd.snakes .sq.odd { fill: #e9f6ff; } .bd.snakes .sq.end { fill: #fff0a6; }
.bd.snakes .num { font: 800 9px var(--round); fill: #a08c95; }
.bd.snakes .ladder { stroke: #3fbf87; stroke-width: 11; stroke-linecap: round; opacity: .85; } .bd.snakes .rungs { stroke: #fff; stroke-width: 5; stroke-dasharray: 2 9; }
.bd.snakes .snake { fill: none; stroke: #ff6b6b; stroke-width: 8; stroke-linecap: round; opacity: .85; } .bd.snakes .head { fill: #e04a4a; }
.bd.snakes image { image-rendering: pixelated; }
/* ludo: the cross-shaped board */
.bd.ludo { --bw: 380px; background: #fffdf8; border-radius: 20px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.ludo .sq { stroke: #eadccf; stroke-width: 1; }
.bd.ludo .star { font: 900 13px var(--round); text-anchor: middle; }
.bd.ludo image, .bd.goose image { image-rendering: pixelated; pointer-events: none; }
.bd.ludo .tok.new, .bd.goose .tok.new { animation: pop .35s var(--bounce); transform-box: fill-box; transform-origin: center; }
.bd.ludo .tok.can { cursor: pointer; outline: none; }
.bd.ludo .tok.can circle { stroke: var(--ink); stroke-width: 3; animation: pulse 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bd.ludo .tok.done { opacity: .9; }
/* the game of the goose */
.bd.goose { --bw: 400px; background: #fffdf8; border-radius: 18px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.goose .sq { fill: #fff6ea; } .bd.goose .sq.odd { fill: #eef7ff; } .bd.goose .sq.g { fill: #fff0a6; } .bd.goose .sq.m { fill: #ffe3ec; } .bd.goose .sq.end { fill: #d8f6e8; }
.bd.goose .num { font: 800 8px var(--round); fill: #a08c95; }
.bd.goose .mark { font-size: 17px; text-anchor: middle; }
.bd.goose .tok.wait { opacity: .55; }
.bdwrap .legend { font-size: .8rem; max-width: 34em; }
/* yut nori: a square of stations with two diagonals; the sticks show flat (striped) or round sides */
.bd.yut { --bw: 360px; background: #fffdf8; border-radius: 20px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.yut .edge { fill: none; stroke: #d9c3b3; stroke-width: 4; stroke-dasharray: 2 7; stroke-linecap: round; }
.bd.yut .st { fill: #fff3e2; stroke: #c9a98d; stroke-width: 2.5; } .bd.yut .st.big { fill: #ffe3ec; stroke: #e68aa8; } .bd.yut .st.start { fill: #d8f6e8; stroke: #4fcf97; }
.bd.yut .lbl { font: 900 9px var(--round); fill: #a08c95; }
.bd.yut .cnt { font: 900 10px var(--round); fill: var(--ink); }
.bd.yut image { image-rendering: pixelated; pointer-events: none; }
.bd.yut .tok.new { animation: pop .35s var(--bounce); transform-box: fill-box; transform-origin: center; }
.bd.yut .tok.can { cursor: pointer; outline: none; } .bd.yut .tok.can circle { stroke: var(--ink); stroke-width: 3; animation: pulse 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sticks { display: inline-flex; gap: 5px; align-items: center; height: 56px; }
.sticks i { display: block; width: 11px; height: 50px; border-radius: 6px; border: 2.5px solid #7a4b24; background: #d9a066; box-shadow: inset -3px 0 0 rgba(0,0,0,.15); }
.sticks i.flat { background: repeating-linear-gradient(0deg, #f6dfb4 0 6px, #7a4b24 6px 8px); }
.sticks i.idle { opacity: .45; }
.sticks.new i { animation: roll .45s var(--bounce); } .sticks.new i:nth-child(2) { animation-delay: .05s; } .sticks.new i:nth-child(3) { animation-delay: .1s; } .sticks.new i:nth-child(4) { animation-delay: .15s; }
/* animal chess: a 7 × 9 board with two rivers, traps and dens */
.bd.jungle { --bw: 330px; background: #fffdf8; border-radius: 18px; border: 3px solid var(--t-accent-soft); box-shadow: 0 2px 0 var(--line), 0 14px 30px rgba(120,60,90,.12); }
.bd.jungle .sq { fill: #e9f7dc; stroke: #d3e7c1; stroke-width: 1; } .bd.jungle .sq.water { fill: #bfe3ff; stroke: #9fd3ff; } .bd.jungle .sq.trap { fill: #f3e6d6; } .bd.jungle .sq.den { fill: #ffe3ec; } .bd.jungle .sq.last { stroke: #ffd23f; stroke-width: 3; }
.bd.jungle .mark { font-size: 20px; text-anchor: middle; opacity: .55; pointer-events: none; }
.bd.jungle .animal { font-size: 21px; text-anchor: middle; pointer-events: none; }
.bd.jungle .rank { font: 900 10px var(--round); text-anchor: middle; pointer-events: none; }
.bd.jungle .pc.can { cursor: pointer; outline: none; } .bd.jungle .pc.can circle { stroke-dasharray: 4 3; }
.bd.jungle .pc.sel circle, .bd.jungle .pc.can:focus-visible circle { stroke: var(--ink); stroke-dasharray: none; }
.bd.jungle .pc.new { animation: pop .35s var(--bounce); transform-box: fill-box; transform-origin: center; }
.bd.jungle .hit { fill: var(--me, #ff5d8f); fill-opacity: .35; stroke: var(--me, #ff5d8f); stroke-width: 2.5; cursor: pointer; outline: none; }
.bd.jungle .hit:hover, .bd.jungle .hit:focus-visible { fill-opacity: .6; }
/* congkak: seven houses a side between the two stores */
.bd.mancala.congkak { --bw: 460px; grid-template-columns: 1.2fr repeat(7, 1fr) 1.2fr; }
.bdwrap { display: grid; justify-items: center; gap: 10px; }
.bdwrap .cap { margin: 0; text-align: center; min-height: 1.4em; max-width: 30em; }
.rollrow { display: flex; gap: 14px; align-items: center; justify-content: center; }
.die { width: 52px; height: 52px; border-radius: 14px; background: #fff; border: 3px solid var(--ink); display: grid; place-items: center; font-family: var(--pixel); font-size: calc(1.2rem * var(--px, 1)); box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.die.new { animation: roll .5s var(--bounce); }
@keyframes roll { 0% { transform: rotate(-200deg) scale(.5); } 100% { transform: none; } }
.bd.mini { --bw: 150px; width: var(--bw); flex: none; pointer-events: none; box-shadow: none; }
.bd.mini.mancala { --bw: 190px; padding: 5px; gap: 3px; border-radius: 14px; box-shadow: inset 0 2px 0 rgba(255,255,255,.35), 0 4px 0 #9a6a35; } .bd.mini.mancala b { display: none; } .bd.mini.mancala .pit, .bd.mini.mancala .store { padding: 2px; } .bd.mini.mancala .seeds i { width: 4px; height: 4px; } .bd.mini.mancala .seeds { gap: 1px; }
.gamecard .origin { font-weight: 800; font-size: .9rem; color: var(--ink-soft); margin: -2px 0 0; }
.gamecard .origin .fl { font-size: 1.25rem; vertical-align: -2px; margin-right: 4px; }
.grouphead { text-align: center; margin: 34px 0 14px; } .grouphead:first-of-type { margin-top: 0; } .grouphead h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); margin: 4px 0 0; }
.bd.mini.ttt { gap: 5px; padding: 7px; border-radius: 14px; } .bd.mini.ttt .cell { border-radius: 8px; }
.bd.mini.four { padding: 6px; border-radius: 12px; box-shadow: inset 0 2px 0 rgba(255,255,255,.4), 0 4px 0 #2f6fb8; }

/* players around the board */
.seats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 auto 14px; max-width: 760px; }
.seat { --c: #ff5d8f; position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border: 3px solid #f3e3d6; border-radius: 18px; padding: 8px 14px 8px 8px; min-width: 0; flex: 0 1 auto; transition: border-color .2s, transform .2s var(--bounce); }
.seat.turn { border-color: var(--c); transform: translateY(-3px); box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 35%, #fff); }
.seat.out, .seat.away { opacity: .55; }
.seat .catw { flex: none; }
.seat .who { min-width: 0; text-align: left; }
.seat .nm { font-weight: 900; line-height: 1.15; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.seat .nm img { width: 20px; height: 20px; }
.seat .pl { font-size: .8rem; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.seat .tag { font-family: var(--pixel); font-size: calc(.5rem * var(--px, 1)); background: var(--c); color: #fff; border-radius: 99px; padding: 3px 6px 2px; }
.seat .sc { font-family: var(--pixel); font-size: calc(.7rem * var(--px, 1)); color: var(--c); margin-left: 6px; flex: none; }
.seat .catw .bubble { left: 40%; bottom: 96%; min-width: 0; font-size: .82rem; padding: 6px 10px; }
/* phones: two players per row, smaller cats, so the board stays on screen */
@media (max-width: 560px) {
  .seats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .seat { padding: 6px 8px 6px 4px; gap: 4px; border-radius: 14px; }
  .seat .catw { --size: 40px !important; }
  .seat .nm { font-size: .88rem; gap: 4px; } .seat .nm img { width: 16px; height: 16px; margin: 0; }
  .seat .pl { font-size: .72rem; }
  .seat .sc { margin-left: auto; }
  .seats > .seat:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; }
}
.status { text-align: center; font-weight: 900; font-size: 1.2rem; min-height: 1.6em; margin: 0 0 6px; }
.clock { width: min(260px, 70vw); height: 8px; margin: 0 auto 14px; border-radius: 99px; background: #f3e1d4; overflow: hidden; visibility: hidden; }
.clock.on { visibility: visible; } .clock b { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff5d8f, #ffd23f, #8fe3bd); border-radius: 99px; transform-origin: left; }
.emotes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px auto 0; }
.playbox { text-align: center; max-width: 560px; margin: 0 auto 18px; border: 3px solid var(--t-accent-soft); }
.playbox .row { justify-content: center; margin-top: 12px; } .playbox .row > * { flex: 0 0 auto; }
.playbox .big { font-family: var(--pixel); font-size: calc(clamp(1.1rem, 5vw, 1.7rem) * var(--px, 1)); color: var(--t-accent-deep); margin: 6px 0 8px; line-height: 1.5; }
.roster { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 4px; }
.dotsloader::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dotsload 1.2s steps(4, end) infinite; }
@keyframes dotsload { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* the hub */
.youbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; background: #fff; border: 3px solid var(--t-accent-soft); border-radius: var(--radius); padding: 14px 18px; margin: 0 auto 26px; max-width: 760px; text-align: left; }
.youbar .nm { font-weight: 900; font-size: 1.25rem; line-height: 1.15; } .youbar .pl { font-weight: 700; color: var(--ink-soft); }
.youbar .row { gap: 8px; } .youbar .row > * { flex: 0 0 auto; }
.gamegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(236px, 1fr)); gap: 18px; }
.gamegrid > .panel, .boards > .panel, .how > .panel { margin: 0; }
@media (max-width: 560px) { .gamegrid { max-width: 460px; margin: 0 auto; } }
.gamecard { text-align: center; display: grid; gap: 8px; justify-items: center; align-content: start; }
.gamecard .art { height: 168px; display: grid; place-items: center; }
.gamecard h3 { margin: 4px 0 0; font-size: 1.4rem; }
.gamecard .meta { font-family: var(--pixel); font-size: calc(.55rem * var(--px, 1)); color: var(--t-accent-deep); }
.gamecard .acts { display: grid; gap: 8px; width: 100%; margin-top: 6px; } .gamecard .acts .btn { width: 100%; }
.scopes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 22px auto 0; font-weight: 800; }
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 760px) { .boards { grid-template-columns: 1fr; } }
table.sb { width: 100%; border-collapse: collapse; font-weight: 800; }
table.sb td { padding: 8px 6px; border-top: 2px dashed #f3e3d6; text-align: left; }
table.sb td.r { font-family: var(--pixel); font-size: calc(.6rem * var(--px, 1)); color: var(--ink-soft); width: 2.4em; } table.sb td.p { text-align: right; font-family: var(--pixel); font-size: calc(.7rem * var(--px, 1)); color: var(--rose-deep); white-space: nowrap; }
table.sb tr.me td { background: var(--blush); } table.sb tr.me td:first-child { border-radius: 10px 0 0 10px; } table.sb tr.me td:last-child { border-radius: 0 10px 10px 0; }
table.sb .fl { font-size: 1.3rem; margin-right: 6px; vertical-align: -2px; }

/* language picker in the footer */
.langs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 14px; }
.langs button { font: 800 .85rem/1 var(--round); color: var(--ink-soft); background: #fff; border: 2px solid #f0dccb; border-radius: 999px; padding: 7px 12px; cursor: pointer; }
.langs button[aria-pressed="true"] { color: var(--rose-deep); border-color: var(--rose); background: var(--blush); }

.mute { position: fixed; right: 14px; bottom: 14px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: #fff8; backdrop-filter: blur(6px); font-size: 20px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.mute.off { opacity: .7; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; font-weight: 800; padding: 12px 18px; border-radius: 999px; z-index: 50; transition: transform .35s var(--bounce); box-shadow: 0 10px 26px rgba(0,0,0,.25); max-width: calc(100vw - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.err { color: #c0264f; font-weight: 800; margin-top: 10px; min-height: 1.2em; }
.center { text-align: center; }
.hide { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .sparkles, .decor { display: none; }
}
@media (max-width: 560px) {
  .panel { padding: 18px; border-radius: 18px; }
  .board { columns: 1; }
  .navlinks a.plain { display: none; }
  .catw .bubble { max-width: 170px; font-size: .84rem; }
}
