/* *-*-*-*-*-*-*-*-*-*-*-* font: served from this site, so the page never waits on another host *-*-*-*-*-*-*-*-*-*-*-* */
@font-face {
  font-family: "Jersey 15"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("vendor/jersey-15-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jersey 15"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("vendor/jersey-15-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* *-*-*-*-*-*-*-*-*-*-*-* palettes *-*-*-*-*-*-*-*-*-*-*-* */
:root, [data-palette="candy"] {
  --bg: #241832; --bg2: #2f2042; --panel: #3a2a50; --panel-d: #1a1026; --board: #1b1229;
  --ink: #fff6fc; --mute: #b7a5cc; --accent: #ffe08a; --accent-d: #c59f3c; --on-accent: #3a2a12;
  --p1: #ff9ecb; --p1l: #ffd9ea; --p1d: #c2668f; --p1x: #8f4468;
  --p2: #8fe3c8; --p2l: #d9faee; --p2d: #4fa489; --p2x: #327563;
  --face: #3a2540;
}
[data-palette="meadow"] {
  --bg: #f7edd9; --bg2: #fdf6e8; --panel: #ecdcbc; --panel-d: #cdb98f; --board: #e3d3b1;
  --ink: #45372c; --mute: #84715d; --accent: #f2c14e; --accent-d: #bd8d24; --on-accent: #45372c;
  --p1: #f08a6c; --p1l: #ffcdbc; --p1d: #b85e44; --p1x: #8a3f2a;
  --p2: #5fb3a3; --p2l: #b9e6dc; --p2d: #3a8375; --p2x: #245e53;
  --face: #45372c;
}
[data-palette="arcade"] {
  --bg: #0c1330; --bg2: #141f47; --panel: #1c2a55; --panel-d: #060a1c; --board: #080d22;
  --ink: #eef3ff; --mute: #8fa0cc; --accent: #ff7ab8; --accent-d: #b9417c; --on-accent: #2a0b1c;
  --p1: #ffd447; --p1l: #fff3bf; --p1d: #c79a12; --p1x: #8f6c05;
  --p2: #5ad1ff; --p2l: #cdf2ff; --p2d: #2494c4; --p2x: #136a91;
  --face: #0c1330;
}

/* *-*-*-*-*-*-*-*-*-*-*-* base: one font, four sizes *-*-*-*-*-*-*-*-*-*-*-* */
:root { --t1: clamp(64px, 8vw, 104px); --t2: 34px; --t3: 24px; --t4: 20px; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg2), var(--bg) 70%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Jersey 15", ui-monospace, Menlo, monospace;
  font-size: var(--t3);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: none;
}
[hidden] { display: none !important; }
canvas { image-rendering: pixelated; display: block; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.bar, main { position: relative; z-index: 1; }
p { margin: 0; }
.label { color: var(--mute); font-size: var(--t4); }
.hint { color: var(--mute); font-size: var(--t4); max-width: 34ch; }
.status { color: var(--mute); font-size: var(--t4); min-height: 1.3em; margin-top: 16px; max-width: 40ch; }
.code { font-size: var(--t1); line-height: .95; letter-spacing: .08em; color: var(--ink); }

/* *-*-*-*-*-*-*-*-*-*-*-* top bar *-*-*-*-*-*-*-*-*-*-*-* */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 56px); min-height: 60px; flex: none;
}
.logo { display: block; }
.logo.off { visibility: hidden; }
.bar-tools { display: flex; align-items: center; gap: 14px; }
.swatches { display: flex; gap: 8px; }
.swatch {
  width: 24px; height: 24px; padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(90deg, var(--a) 50%, var(--b) 50%);
  box-shadow: 0 3px 0 var(--panel-d);
  transition: transform .08s;
}
.swatch[data-set-palette="candy"] { --a: #ff9ecb; --b: #8fe3c8; }
.swatch[data-set-palette="meadow"] { --a: #f08a6c; --b: #5fb3a3; }
.swatch[data-set-palette="arcade"] { --a: #ffd447; --b: #5ad1ff; }
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-pressed="true"] { transform: translateY(-4px); box-shadow: 0 7px 0 var(--panel-d); }
.tool {
  font: inherit; font-size: var(--t4); color: var(--ink); background: var(--panel);
  border: 0; height: 30px; min-width: 38px; padding: 0 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 0 var(--panel-d);
}
.tool:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--panel-d); }
.tool svg { width: 16px; height: 16px; }
svg.pix { display: block; fill: currentColor; shape-rendering: crispEdges; }

/* *-*-*-*-*-*-*-*-*-*-*-* buttons and fields *-*-*-*-*-*-*-*-*-*-*-* */
.btn {
  font: inherit; font-size: var(--t3); line-height: 1;
  color: var(--on-accent); background: var(--accent);
  border: 0; padding: 14px 24px 15px; cursor: pointer; text-align: center;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 6px 0 var(--accent-d), 0 10px 0 var(--panel-d);
  transition: transform .06s, box-shadow .06s;
}
.btn:hover { transform: translateY(-2px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 8px 0 var(--accent-d), 0 12px 0 var(--panel-d); }
.btn:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 1px 0 var(--accent-d), 0 3px 0 var(--panel-d); }
.btn:disabled { opacity: .35; cursor: default; pointer-events: none; }
.btn.ghost {
  background: var(--panel); color: var(--ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08), 0 6px 0 var(--panel-d);
}
.btn.ghost:hover { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08), 0 8px 0 var(--panel-d); }
.btn.ghost:active { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08), 0 1px 0 var(--panel-d); }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--mute); font-size: var(--t4); }
.field input {
  font: inherit; font-size: var(--t3); color: var(--ink); background: var(--panel-d);
  border: 0; outline: 0; padding: 11px 14px 12px; width: 100%;
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, .22);
}
.field input:focus { box-shadow: inset 0 4px 0 rgba(0, 0, 0, .22), 0 4px 0 var(--accent); }
.field input::placeholder { color: var(--mute); opacity: .5; }
.code-field { flex: 1; }
.code-field input { text-transform: uppercase; letter-spacing: .2em; }
.menu { display: grid; gap: 22px; }
.menu.row { display: flex; flex-wrap: wrap; gap: 18px; }
.joinrow { display: flex; align-items: flex-end; gap: 14px; margin-top: 8px; }
.roomline { font-size: var(--t2); }
.roomline b { font-weight: 400; letter-spacing: .12em; }

.scores { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; color: var(--mute); font-size: var(--t4); text-align: left; }
.scores { --rows: 5; max-height: calc(var(--rows) * 1.5em + (var(--rows) - 1) * 4px); max-height: calc(var(--rows) * 1lh + (var(--rows) - 1) * 4px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--panel) transparent; scroll-snap-type: y proximity; }
.scores li { scroll-snap-align: start; }
.top .scores { --rows: 8; }
.scores li { display: grid; grid-template-columns: 2ch 6ch minmax(0, 1fr); gap: 10px; }
.scores li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scores li.now { color: var(--ink); }
.scores li.bump { animation: bump .5s steps(5); }
.scores li.live span:last-child::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: 7px; background: var(--accent); animation: liveblink 1.2s steps(2, jump-none) infinite; }
@keyframes liveblink { from { opacity: 1; } to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .scores li.live span:last-child::before { animation: none; } }
@keyframes bump { 0% { transform: translateY(10px); } 40% { transform: translateY(-4px); } 100% { transform: none; } }
.top { width: min(100%, 240px); padding: 0 18px; }
.top .scores li { grid-template-columns: 2ch 5ch minmax(0, 1fr); gap: 8px; }
.home-menu .status:empty { display: none; }
.quiet { display: inline-block; margin-top: 18px; color: var(--mute); font-size: var(--t4); text-decoration: none; }
.quiet:hover { color: var(--ink); }

/* *-*-*-*-*-*-*-*-*-*-*-* the cabinet frame around a board *-*-*-*-*-*-*-*-*-*-*-* */
.frame {
  position: relative; padding: 10px; background: var(--panel);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .1), inset 0 -4px 0 rgba(0, 0, 0, .18), 0 12px 0 var(--panel-d);
}
.frame canvas { box-shadow: 0 0 0 4px var(--panel-d); }

/* *-*-*-*-*-*-*-*-*-*-*-* screens *-*-*-*-*-*-*-*-*-*-*-* */
main { flex: 1; min-height: 0; display: flex; }
.screen { flex: 1; min-height: 0; padding: 8px clamp(16px, 4vw, 56px) 28px; }

#home, #lobby {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.home-menu { justify-self: end; width: min(100%, 448px); display: grid; gap: 26px; }
.home-menu .status { margin-top: 0; }
#logo-big { margin-bottom: 10px; }
.home-demo { justify-self: start; }

.lobby-qr { justify-self: end; background: #fff; padding: 18px; box-shadow: 0 12px 0 var(--panel-d); }
.lobby-qr canvas { width: min(36vw, 50vh, 340px); height: min(36vw, 50vh, 340px); }
.lobby-info { justify-self: start; width: min(100%, 470px); display: grid; gap: 14px; }
.lobby-qr[hidden] + .lobby-info { grid-column: 1 / -1; justify-self: center; }
.slots { list-style: none; padding: 0; margin: 12px 0 14px; display: grid; gap: 10px; }
.slot { display: flex; align-items: center; gap: 12px; background: var(--panel); padding: 11px 14px 12px; box-shadow: 0 4px 0 var(--panel-d); }
.chip { width: 20px; height: 20px; flex: none; }
.p1 .chip { background: var(--p1); box-shadow: inset 3px 3px 0 var(--p1l), inset -3px -3px 0 var(--p1d); }
.p2 .chip { background: var(--p2); box-shadow: inset 3px 3px 0 var(--p2l), inset -3px -3px 0 var(--p2d); }
.waiting { color: var(--mute); }
.waiting::after { content: ""; display: inline-block; width: 1.5em; text-align: left; animation: dots 1.8s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* *-*-*-*-*-*-*-*-*-*-*-* game *-*-*-*-*-*-*-*-*-*-*-* */
#game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "c0 hud c1" "c0 board c1" "c0 pad c1";
  column-gap: clamp(20px, 3vw, 48px); row-gap: 12px;
}
.hud { grid-area: hud; display: flex; justify-content: space-between; gap: 20px; padding: 0 10px; }
.hud div { display: flex; align-items: baseline; gap: 10px; color: var(--mute); font-size: var(--t4); }
.hud b { color: var(--ink); font-size: var(--t2); font-weight: 400; line-height: 1; }
.boardwrap { grid-area: board; min-height: 0; display: flex; align-items: flex-start; justify-content: center; }
.side { display: grid; gap: 26px; align-content: start; padding-top: 44px; }
.side.left { grid-area: c0; justify-items: end; }
.side.right { grid-area: c1; justify-items: start; }
.card {
  background: var(--panel); padding: 16px 18px 18px; width: min(100%, 240px); display: grid; gap: 14px;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .08), 0 6px 0 var(--panel-d);
}
.card { grid-template-columns: auto minmax(0, 1fr); }
.card .who, .card .plines { grid-column: 1 / -1; }
.face { justify-self: end; width: 80px; height: 88px; object-fit: cover; background: var(--board); box-shadow: 0 0 0 3px var(--panel-d); }
.face.own { transform: scaleX(-1); }
.face[hidden] { display: none; }
.card.mine { box-shadow: inset 0 4px 0 rgba(255, 255, 255, .08), 0 6px 0 var(--accent); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you { font-style: normal; font-size: var(--t4); line-height: 1; color: var(--on-accent); background: var(--accent); padding: 1px 7px 3px; }
.next { background: var(--board); box-shadow: 0 0 0 3px var(--panel-d); }
.plines { color: var(--mute); font-size: var(--t4); }
.plines b { color: var(--ink); font-size: var(--t3); font-weight: 400; }
.legend { list-style: none; margin: 0; padding: 0 18px; width: min(100%, 240px); display: grid; gap: 12px; color: var(--mute); font-size: var(--t4); }
.legend li { display: flex; align-items: center; gap: 12px; }
.keys2 { display: flex; gap: 6px; width: 74px; flex: none; }
kbd {
  font: inherit; color: var(--ink); background: var(--panel); min-width: 30px; height: 28px; padding: 0 6px 2px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .1), 0 4px 0 var(--panel-d);
}
kbd svg { width: 12px; height: 12px; }
kbd.space { width: 66px; }
.chat { width: min(100%, 240px); padding: 0 18px; display: grid; gap: 10px; }
.chatlog { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--mute); font-size: var(--t4); line-height: 1.1; }
.chatlog li { overflow-wrap: anywhere; }
.chatlog b { color: var(--ink); font-weight: 400; margin-right: 8px; }
.chat input {
  font: inherit; font-size: var(--t4); color: var(--ink); background: var(--panel-d);
  border: 0; outline: 0; padding: 7px 10px 9px; width: 100%; min-width: 0;
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .22);
}
.chatrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.tool.mic { height: auto; flex: none; min-width: 0; padding: 0 8px 2px; }
.chatrow input { flex: 1 1 100%; }
.tool.mic { height: 30px; }
.tool.mic.on { color: var(--on-accent); background: var(--accent); box-shadow: 0 3px 0 var(--accent-d); }
.micnote { margin: 0; color: var(--mute); font-size: var(--t4); line-height: 1.1; }
.micnote:empty { display: none; }
#voice { display: none; }
.chat input:focus { box-shadow: inset 0 3px 0 rgba(0, 0, 0, .22), 0 3px 0 var(--accent); }
.chat input::placeholder { color: var(--mute); opacity: .5; }
.say {
  position: absolute; z-index: 4; margin: 0; pointer-events: none; max-width: 78%; width: max-content;
  font-size: var(--t4); line-height: 1.05; padding: 5px 10px 8px; overflow-wrap: anywhere;
  color: var(--face); box-shadow: 0 4px 0 rgba(0, 0, 0, .3);
}
#game:has(.overlay:not([hidden])) .say { display: none; }
.say.p1 { background: var(--p1l); }
.say.p2 { background: var(--p2l); }
.say::after { content: ""; position: absolute; left: var(--tail, 12px); top: 100%; width: 8px; height: 8px; background: inherit; }
.say.under::after { top: auto; bottom: 100%; }
.say.pop { animation: saypop .2s steps(4); }
@keyframes saypop { from { transform: translateY(10px); } to { transform: none; } }
.botset { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px; margin-top: -8px; position: relative; }
.tool.speed { background: var(--panel); box-shadow: 0 3px 0 var(--panel-d); justify-self: start; height: 32px; padding: 0 10px 2px; }
.tool.speed:hover { color: var(--accent); }
.tool.help { min-width: 32px; margin-right: 100%; }
.tool.help[aria-expanded="true"] { color: var(--on-accent); background: var(--accent); box-shadow: 0 3px 0 var(--accent-d); }
.helpbox {
  list-style: none; margin: 0; display: grid; gap: 10px; color: var(--mute); font-size: var(--t4); line-height: 1.15;
  position: absolute; top: calc(100% + 10px); left: 18px; z-index: 6; width: 250px; padding: 14px; overflow-y: auto;
  background: var(--panel); box-shadow: inset 0 4px 0 rgba(255, 255, 255, .08), 0 6px 0 var(--panel-d);
}
.helpbox[hidden] { display: none; }
.helpbox li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.helpbox li.on { color: var(--ink); }
.helpbox .hp { padding-top: 4px; }
.helpbox .hp svg { width: 18px; height: 18px; }
.pad { display: none; }
#watching { padding: 0 18px; }
.next.swapped { animation: swapped .45s steps(4); }
@keyframes swapped { 0% { filter: brightness(2.4); transform: scale(1.08); } 100% { filter: none; transform: none; } }
.reacts { grid-area: pad; display: flex; justify-content: center; gap: 14px; padding-top: 4px; }
.reacts button {
  width: 56px; height: 50px; border: 0; cursor: pointer; background: var(--panel);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08), 0 5px 0 var(--panel-d);
}
.reacts button:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08), 0 1px 0 var(--panel-d); }
.reacts button svg { width: 24px; height: 24px; }
.emote { position: absolute; bottom: 18px; width: 30px; height: 30px; z-index: 3; pointer-events: none; animation: rise 1.7s steps(17) forwards; }
.emote svg { width: 100%; height: 100%; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-190px); opacity: 0; } }

.overlay {
  position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 16px; background: color-mix(in srgb, var(--board) 90%, transparent);
}
.overlay .hint { margin-bottom: 8px; }
.shake { animation: shake .14s steps(3); }
@keyframes shake { 0% { transform: translate(0, 0); } 33% { transform: translate(-2px, 3px); } 66% { transform: translate(2px, 1px); } 100% { transform: translate(0, 0); } }

/* *-*-*-*-*-*-*-*-*-*-*-* narrow desktop window *-*-*-*-*-*-*-*-*-*-*-* */
@media (max-width: 1080px) and (min-width: 761px) {
  .card, .legend, .top { width: min(100%, 200px); }
  .helpbox { left: 0; width: 250px; }
}

/* *-*-*-*-*-*-*-*-*-*-*-* phone *-*-*-*-*-*-*-*-*-*-*-* */
@media (max-width: 760px), (pointer: coarse) {
  :root { --t2: 28px; --t3: 22px; --t4: 18px; }
  .bar { padding: 10px 16px; min-height: 50px; }
  .screen { padding: 4px 16px 18px; }
  #home, #lobby { grid-template-columns: 1fr; align-content: start; gap: 28px; overflow-y: auto; }
  .home-menu, .lobby-info { justify-self: center; }
  .home-demo { justify-self: center; padding-bottom: 14px; }
  .lobby-qr { justify-self: center; padding: 12px; }
  .lobby-qr canvas { width: min(58vw, 230px); height: min(58vw, 230px); }
  #game {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    grid-template-areas: "hud hud" "c0 c1" "set set" "board board" "pad pad";
    column-gap: 10px; row-gap: 10px; padding: 0 12px 10px;
  }
  .hud { justify-content: center; gap: 26px; }
  .side { display: contents; }
  #card-0 { grid-area: c0; }
  #card-1 { grid-area: c1; }
  #watching { grid-area: set; justify-self: start; align-self: center; }
  .legend, .top { display: none; }
  #game.talk {
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "hud hud" "c0 c1" "set set" "board board" "chat chat" "pad pad";
  }
  .chat { grid-area: chat; width: 100%; padding: 0; }
  .chatlog { display: none; }
  .chat input { font-size: var(--t4); padding: 8px 12px 10px; }
  .card { width: 100%; padding: 8px 10px 10px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px; }
  .card .who, .card .plines { grid-column: 1; }
  .chatrow { flex-wrap: nowrap; }
  .chatrow input { flex: 1 1 60px; }
  .tool.mic { height: auto; }
  .card .next { grid-row: 1 / span 2; grid-column: 2; }
  .card .face { grid-row: 2; grid-column: 3; width: 44px; height: 44px; }
  /* with a camera on, the name takes the whole first line and the face sits beside the next piece. */
  #game.faces .card { grid-template-columns: minmax(0, 1fr) auto auto; }
  #game.faces .card .who { grid-column: 1 / -1; }
  #game.faces .card .next { grid-row: 2; grid-column: 2; }
  .you { display: none; }
  .botset { grid-area: set; justify-content: flex-end; padding: 0; margin: 0; }
  .tool.help { margin-right: 0; }
  .helpbox { left: auto; right: 0; top: calc(100% + 8px); width: min(100%, 340px); }
  .frame { padding: 6px; }
  .overlay { inset: 6px; }
  .pad {
    grid-area: pad; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
    touch-action: none; user-select: none; -webkit-user-select: none;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }
  .pad button {
    font: inherit; font-size: var(--t3); height: 52px; border: 0; color: var(--ink); background: var(--panel);
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08), 0 5px 0 var(--panel-d); touch-action: none;
  }
  .pad button svg { width: 22px; height: 22px; }
  .pad button.down { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .08), 0 1px 0 var(--panel-d); }
  .pad .wide {
    grid-column: 1 / -1; height: 48px; color: var(--on-accent); background: var(--accent);
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 5px 0 var(--accent-d);
  }
  .pad .wide.down { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 1px 0 var(--accent-d); }
}

@media (prefers-reduced-motion: reduce) {
  .say.pop { animation: none; }
  .waiting::after { animation: none; content: "..."; }
  .btn, .swatch { transition: none; }
  .shake { animation: none; }
}
