:root { color-scheme: dark; --bg: #15161d; --panel: #22242f; --text: #f3f1ea; --muted: #a9a6b8; --accent: #d64545; --ok: #6cc070; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.45 system-ui, sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 820px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.4rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 12px 0 4px; }
header { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.bar { display: flex; gap: 16px; color: var(--muted); }
#timer { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
#players { display: grid; gap: 2px; padding: 8px 12px; margin: 12px 0; background: var(--panel); border-radius: 8px; font-size: .92rem; }
.player.ghost { color: var(--muted); }
.player.me { font-weight: 600; }
#prompt { font-size: 1.15rem; font-weight: 600; }
#info p { margin: 4px 0; }
button, input, select, textarea { font: inherit; padding: 10px 12px; border-radius: 6px; border: 1px solid #555; }
button { cursor: pointer; background: #ece9df; color: #111; }
button:disabled { opacity: .35; cursor: not-allowed; }
button.on { background: var(--ok); color: #111; font-weight: 700; }
button.primary { background: var(--accent); color: #fff; }
button.secondary { background: transparent; color: var(--muted); border-color: #444; }
input, select, textarea { background: #fff; color: #111; -webkit-text-fill-color: #111; caret-color: #111;
  color-scheme: light; max-width: 100%; opacity: 1; }
input:focus, select:focus, textarea:focus { outline: 3px solid #e0a800; outline-offset: 1px; }
input:-webkit-autofill, input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #fff inset; -webkit-text-fill-color: #111; }
::placeholder { color: #666; -webkit-text-fill-color: #666; }
textarea { width: 100%; }
.choices { display: grid; gap: 8px; margin: 10px 0; }
.choices.cols3 { grid-template-columns: repeat(3, 1fr); }
.grid { display: grid; gap: 6px; margin: 10px 0; max-width: 420px; }
.grid button { min-height: 48px; padding: 4px; }
form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 10px 0; }
form.inline label { flex: 1 1 220px; display: grid; gap: 4px; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.gallery figure { margin: 0; background: #fff; color: #111; border-radius: 6px; padding: 6px; display: grid; gap: 4px; max-width: 100%; }
svg.drawing { width: 280px; max-width: 100%; height: auto; background: #f4f1e8; }
svg.drawing polyline { fill: none; stroke: #222; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.canvasbox canvas { display: block; max-width: 100%; height: auto; background: #fff; border-radius: 6px; touch-action: none; }
#error { color: #ffadad; }
.note { color: var(--muted); }
#logbox { margin: 16px 0; color: var(--muted); font-size: .9rem; }
label { display: block; margin: 8px 0; }
/* Grandpappy Jack's glasses: distorted interface for mad players */
body.madness #stage { animation: wobble 3s ease-in-out infinite; filter: hue-rotate(90deg) blur(.4px); }
body.madness .choices button:nth-child(odd) { transform: scaleX(-1); }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(1.5deg) skewX(2deg); } }
@media (prefers-reduced-motion: reduce) { body.madness #stage { animation: none; } }
