/* MIX (prototype): match the color. */
:root {
  --paper: #edeae1; --card: #fbfaf6; --ink: #121212; --ink-2: #57554e; --rule: #121212; --soft: #d6d1c4;
  --accent: #0b78b5; --accent-ink: #ffffff;
  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #0d0e10; --card: #16181c; --ink: #f1eee6; --ink-2: #a19f97; --rule: #f1eee6; --soft: #2e3036; --accent: #4cb8f0; --accent-ink: #0d0e10; color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #0d0e10; --card: #16181c; --ink: #f1eee6; --ink-2: #a19f97; --rule: #f1eee6; --soft: #2e3036; --accent: #4cb8f0; --accent-ink: #0d0e10; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; }
html { touch-action: manipulation; overscroll-behavior-y: none; }
body { background: var(--paper); color: var(--ink); font: 16px/1.45 var(--sans); }
.mx-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); position: sticky; top: 0; z-index: 5; }
.dd-mark { font: 900 18px/1 var(--display); background: var(--ink); color: var(--card); padding: 6px 7px; text-decoration: none; }
.mx-top .title { font: 900 26px/1 var(--display); text-transform: uppercase; }
.mx-top .step { color: var(--ink-2); font-weight: 700; font-size: 13px; }
.mx-top .status { margin-left: auto; font: 900 24px/1 var(--display); }
.mx { max-width: 560px; margin: 0 auto; padding: 14px 16px 16px; }
.card { background: var(--card); border-radius: 18px; padding: 18px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-weight: 800; font-size: 13px; }
.big { font: 900 clamp(48px, 12vw, 84px)/.9 var(--display); text-transform: uppercase; margin: 0 0 10px; }
.lede { margin: 0 0 14px; font-size: 17px; }
.muted { color: var(--ink-2); margin: 0 0 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 14px; border: 0; background: transparent; color: var(--ink); font: 700 16px var(--sans); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent); text-underline-offset: 4px; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); text-decoration: none; border-radius: 12px; padding: 0 24px; min-height: 52px; font-size: 17px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .4; cursor: default; }

/* ---- Mix, the clean look (December 2026): a flat palette, round dabs of paint, one smooth swatch ---- */

/* the swatch: one smooth swipe of paint, the color to match on top, yours below */
.swipe { position: relative; }
.swipe svg { display: block; width: 100%; height: auto; }
.swipe .sw-t { fill: var(--t); }
.swipe .sw-m { fill: var(--m, color-mix(in srgb, var(--ink) 7%, var(--card))); transition: fill .3s ease; }
.swipe .sw-hint { position: absolute; left: 0; right: 0; top: 62%; text-align: center; font: 700 13px var(--sans); color: var(--ink-2); pointer-events: none; }
.swipe.filled .sw-hint { display: none; }
.swipe .sw-pct { position: absolute; right: 12%; top: 50%; transform: translateY(-50%); font: 900 28px/1 var(--display); }
.swipes { display: grid; gap: 10px; margin: 6px 0 20px; }

/* the round: the swatch and the clock, then the palette and the tools */
.mx-round { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; padding: 16px; }
.mx-match { margin: 0 0 14px; }
.clock { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.timer { flex: 1; height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.timer i { display: block; height: 100%; width: 100%; background: var(--ink); border-radius: 99px; }
.secs { font: 800 14px var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.mx-match.low .timer i { background: #e5484d; }
.mx-match.low .secs { color: #e5484d; }
.mx-match.met .swipe { animation: met .5s ease-out; }
@keyframes met { 40% { transform: scale(1.03); } }

/* the palette: flat light birch, clean outline and thumb hole; the paint layer is cut to the same shape */
.palette { --wood: #e6cfa7; position: relative; width: 100%; aspect-ratio: 4 / 3; touch-action: none; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .14)); }
:root[data-theme="dark"] .palette { --wood: #d9bf93; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .palette { --wood: #d9bf93; } }
.board-wood, .board-wood svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.board-wood .pw { fill: var(--wood); stroke: rgba(90, 60, 20, .18); stroke-width: 1.5; }
.pal-cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20400%20300%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M30%2034Q30%2012%2052%2012H352Q388%2012%20388%2048V256Q388%20290%20352%20290H138C120%20290%20114%20272%20100%20266C84%20259%2070%20268%2062%20278C55%20286%2046%20290%2038%20290Q12%20290%2012%20262V60Q12%2034%2030%2034ZM78%20203a19%2019%200%201%200%200.1%200Z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20400%20300%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M30%2034Q30%2012%2052%2012H352Q388%2012%20388%2048V256Q388%20290%20352%20290H138C120%20290%20114%20272%20100%20266C84%20259%2070%20268%2062%20278C55%20286%2046%20290%2038%20290Q12%20290%2012%20262V60Q12%2034%2030%2034ZM78%20203a19%2019%200%201%200%200.1%200Z%22%20fill-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E") 0 0 / 100% 100% no-repeat; }

.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 0; }
.kit { display: grid; justify-items: center; gap: 4px; padding: 4px 0; border: 0; background: none; color: var(--ink-2); font: 700 12px var(--sans); cursor: pointer; box-sizing: border-box; }
.kit .ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--ink) 6%, transparent); transition: transform .12s ease, background .12s ease; box-sizing: border-box; }
.kit .ic svg { width: 24px; height: 24px; color: var(--ink); }
.kit .tip { fill: color-mix(in srgb, var(--ink) 25%, transparent); transition: fill .2s ease; }
.kit.on { color: var(--ink); }
.kit.on .ic { background: var(--ink); }
.kit.on .ic svg { color: var(--card); }
.kit:active .ic { transform: scale(.92); }
.kit:disabled { opacity: .4; }

.lock { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; margin-top: 14px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); font: 900 20px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; cursor: pointer; transition: background .25s ease, transform .1s ease; }
.lock .ic svg { width: 20px; height: 20px; display: block; }
.lock:not(:disabled):active { transform: scale(.98); }
.lock:disabled { cursor: default; }
.lock.go { background: var(--accent); color: var(--accent-ink); }

/* the dropper's magnifier, floating above the finger so the finger never hides what it picks */
.loupe { position: absolute; width: 104px; height: 104px; margin: -152px 0 0 -52px; border-radius: 50%; border: 5px solid #fff; box-sizing: content-box; transform: translate(-5px, -5px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 10px 24px rgba(0, 0, 0, .25); pointer-events: none; z-index: 4; }
.loupe[hidden] { display: none; }

/* the reveal */
.mx-result { text-align: center; margin-top: 8px; }
.mx-pct { font: 900 64px/1 var(--display); }
.mx-verdict { margin: 2px 0 8px; font-weight: 800; font-size: 18px; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .mx-match.met .swipe { animation: none; } }

/* the day's rank and the leaderboard */
.mx-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mx-score .big { margin: 0; }
.mx-rank { font: 900 34px/1 var(--display); text-transform: uppercase; color: var(--accent); }
.mx-today { margin: -6px 0 14px; font-size: 17px; }
.mx-today b { font: 900 22px/1 var(--display); text-transform: uppercase; color: var(--accent); }
.mx-h { font: 900 24px/1 var(--display); text-transform: uppercase; margin: 4px 0 8px; }
.mx-lb { list-style: none; margin: 0 0 14px; padding: 0; }
.mx-lb li { display: grid; grid-template-columns: 2em 1fr auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 10px; }
.mx-lb li.me { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.mx-lb .n { font-weight: 700; color: var(--ink-2); }
.mx-lb li.p1 .n, .mx-lb li.p2 .n, .mx-lb li.p3 .n { font: 900 22px/1 var(--display); }
.mx-lb li.p1 .n { color: #c99a00; } .mx-lb li.p2 .n { color: #8a8f98; } .mx-lb li.p3 .n { color: #b5651d; }
.mx-lb .who { display: grid; min-width: 0; }
.mx-lb .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-lb .who small { color: var(--ink-2); font-size: 13px; }
.mx-lb .pc { font: 900 22px/1 var(--display); }

/* nothing in the game selects as text, or pops up a menu on a long press (phones) */
.mx, .mx * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
