/* ======================================================================
   MUNCH MADNESS — interface styles
   ====================================================================== */
@font-face { font-family: 'Orbitron'; font-weight: 500; font-display: swap; src: url(../fonts/orbitron-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Orbitron'; font-weight: 700; font-display: swap; src: url(../fonts/orbitron-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Orbitron'; font-weight: 800; font-display: swap; src: url(../fonts/orbitron-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Orbitron'; font-weight: 900; font-display: swap; src: url(../fonts/orbitron-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url(../fonts/nunito-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url(../fonts/nunito-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url(../fonts/nunito-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(../fonts/nunito-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: swap; src: url(../fonts/nunito-latin-900-normal.woff2) format('woff2'); }

:root {
  --bg: #05060f;
  --panel: rgba(14, 16, 38, 0.82);
  --panel-solid: #0e1026;
  --panel-2: rgba(255, 255, 255, 0.05);
  --line: rgba(130, 150, 255, 0.18);
  --line-strong: rgba(130, 150, 255, 0.35);
  --text: #eef0ff;
  --muted: #9aa0c8;
  --cyan: #4de8ff;
  --pink: #ff3dcf;
  --yellow: #ffe14d;
  --green: #7dffc4;
  --red: #ff4d6d;
  --coin: #ffcf3d;
  --radius: 16px;
  --display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --body: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); overflow: hidden; }
body { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; user-select: text; -webkit-user-select: text; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
#stage { position: relative; flex: 1; min-height: 0; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ------------------------------------------------------------- HUD */
#hud {
  display: flex; align-items: center; gap: 22px; padding: 8px 18px; padding-top: max(8px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(5,6,15,0.95), rgba(5,6,15,0.6)); border-bottom: 1px solid var(--line);
  z-index: 5; flex-wrap: nowrap;
}
.hud-block { display: flex; flex-direction: column; line-height: 1.1; }
.hud-label { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.hud-value { font-family: var(--body); font-weight: 900; font-variant-numeric: tabular-nums; font-size: 18px; color: #fff; text-shadow: 0 0 10px rgba(77,232,255,0.45); }
.hud-lives { flex-direction: row; gap: 4px; margin-left: auto; }
.hud-lives canvas { width: 22px; height: 22px; }
.hud-coins { flex-direction: row; align-items: center; gap: 6px; }
.coin-dot { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6b0, var(--coin) 45%, #c98a00); box-shadow: 0 0 10px rgba(255,207,61,0.6); display: inline-block; flex: none; }
.hud-pause { background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px; width: 40px; height: 36px; cursor: pointer; font-size: 13px; }
.hud-pause:hover { background: rgba(255,255,255,0.12); }

#effects-bar { position: absolute; left: 50%; transform: translateX(-50%); top: 98px; z-index: 6; display: flex; gap: 8px; pointer-events: none; }
.effect-pill { background: rgba(10,12,30,0.85); border: 1px solid currentColor; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 800; position: relative; overflow: hidden; }
.effect-pill i { position: absolute; left: 0; bottom: 0; height: 3px; background: currentColor; }

/* ------------------------------------------------------------- screens */
#screen-root { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; overflow-y: auto; overflow-x: hidden;
  padding: 28px 18px 40px; pointer-events: auto;
  background: radial-gradient(ellipse at 50% 0%, rgba(80,40,160,0.35), transparent 60%), rgba(3,4,12,0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}
.screen.clear { background: rgba(3,4,12,0.55); justify-content: center; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wrap { width: 100%; max-width: 1040px; }
.top-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; width: 100%; }
.top-bar h2 { font-family: var(--display); font-weight: 800; letter-spacing: 0.06em; margin: 0; font-size: 26px; flex: 1; }
.coins-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,207,61,0.08); border: 1px solid rgba(255,207,61,0.35); color: var(--coin); padding: 7px 14px; border-radius: 999px; font-family: var(--body); font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; }

/* logo */
.presents { margin: 4vh 0 10px; font-family: var(--display); font-weight: 700; font-size: clamp(11px, 1.6vw, 14px); letter-spacing: 0.42em; color: #c9cdf2; opacity: 0.85; text-align: center; padding-left: 0.42em; }
.logo { font-family: var(--display); font-weight: 900; font-size: clamp(40px, 8.4vw, 92px); letter-spacing: 0.05em; margin: 0; line-height: 1.02;
  background: linear-gradient(90deg, #4de8ff, #b18cff 40%, #ff3dcf 70%, #ffe14d); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(177,140,255,0.55)) drop-shadow(0 0 40px rgba(77,232,255,0.25)); text-align: center; }
.tagline { color: var(--muted); margin: 10px 0 30px; font-size: 16px; letter-spacing: 0.04em; text-align: center; }

.menu-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 680px; }
.menu-grid > .btn { grid-column: span 2; }
.menu-grid > .btn-play { grid-column: span 3; flex-direction: column; gap: 4px; }
.btn-play small { font-family: var(--body); font-size: 12px; letter-spacing: 0.02em; font-weight: 800; opacity: 0.75; }
.btn-arcade { font-family: var(--display); }

/* buttons */
.btn {
  appearance: none; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-weight: 800; font-size: 15px;
  padding: 13px 18px; border-radius: 14px; cursor: pointer; transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 6px 24px rgba(77,232,255,0.18); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .ico { font-size: 18px; }
.btn-primary { background: linear-gradient(135deg, #4de8ff, #7a6bff 55%, #ff3dcf); border: none; color: #070816; text-shadow: none; }
.btn-primary:hover { box-shadow: 0 8px 34px rgba(122,107,255,0.55); }
.btn-play { font-family: var(--display); font-size: 22px; letter-spacing: 0.12em; padding: 18px; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: transparent; }
.btn-danger { border-color: rgba(255,77,109,0.5); color: #ff9db0; }
.btn-danger:hover { border-color: var(--red); box-shadow: 0 6px 24px rgba(255,77,109,0.2); }
.btn-coin { border-color: rgba(255,207,61,0.5); color: var(--coin); }
.btn-coin:hover { border-color: var(--coin); box-shadow: 0 6px 24px rgba(255,207,61,0.2); }
.btn-back { padding: 10px 14px; }

.menu-foot { margin-top: 26px; color: var(--muted); font-size: 13px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.menu-foot b { color: var(--text); font-weight: 900; }

/* panels + cards */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; font-size: 14px; }
.tab.active { background: rgba(77,232,255,0.12); border-color: var(--cyan); color: #fff; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; position: relative; transition: border-color 0.15s, transform 0.15s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card.is-equipped { border-color: var(--green); box-shadow: 0 0 0 1px var(--green) inset, 0 0 24px rgba(125,255,196,0.15); }
.card canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; background: #070818; display: block; }
.card h4 { margin: 2px 0 0; font-size: 16px; font-weight: 800; }
.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.35; flex: 1; }
.card .btn { width: 100%; }
.badge { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(5,6,15,0.85); border: 1px solid var(--line-strong); letter-spacing: 0.04em; }
.badge.gold { color: var(--coin); border-color: rgba(255,207,61,0.5); }
.badge.green { color: var(--green); border-color: rgba(125,255,196,0.5); }
.badge.pink { color: #ff9be6; border-color: rgba(255,61,207,0.5); }
.lock-note { font-size: 12px; color: #ff9be6; font-weight: 700; }

/* achievements */
.ach-progress { height: 10px; background: rgba(255,255,255,0.07); border-radius: 999px; overflow: hidden; margin: 4px 0 18px; }
.ach-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--pink)); border-radius: 999px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ach { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.ach .ach-ico { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(255,255,255,0.05); filter: grayscale(1) opacity(0.45); }
.ach.done { border-color: rgba(125,255,196,0.45); }
.ach.done .ach-ico { filter: none; background: rgba(125,255,196,0.1); box-shadow: 0 0 16px rgba(125,255,196,0.2); }
.ach h4 { margin: 0; font-size: 15px; }
.ach p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.ach .reward { font-size: 12px; font-weight: 800; color: var(--coin); margin-top: 3px; }
.ach .reward.item { color: #ff9be6; }

/* forms */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.field label, .field .lbl { font-weight: 800; font-size: 14px; }
.field small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.field .row { display: flex; align-items: center; gap: 10px; }
.field output { font-weight: 900; min-width: 56px; text-align: right; color: var(--cyan); }
input[type=range] { flex: 1; accent-color: #7a6bff; }
input[type=text], input[type=number], select {
  background: rgba(0,0,0,0.35); border: 1px solid var(--line-strong); color: var(--text); padding: 10px 12px; border-radius: 10px; font-size: 15px; width: 100%;
}
input[type=color] { width: 46px; height: 36px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; padding: 2px; cursor: pointer; }
.switch { position: relative; width: 50px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.12); transition: 0.2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: 0.2s; }
.switch input:checked + span { background: linear-gradient(90deg, var(--cyan), #7a6bff); }
.switch input:checked + span::after { transform: translateX(22px); }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; line-height: 1.4; }
.note.warn { color: #ffd38a; }

/* list rows */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row small { color: var(--muted); }
.list-row input[type=checkbox] { width: 20px; height: 20px; accent-color: #7a6bff; }
.mini-maze { width: 64px; height: 64px; border-radius: 8px; background: #070818; flex: none; }

/* workshop tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 26px; }
.big-tile { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer; color: var(--text); transition: 0.15s; }
.big-tile:hover { border-color: var(--cyan); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(77,232,255,0.12); }
.big-tile .big-ico { font-size: 34px; }
.big-tile h3 { font-family: var(--display); margin: 10px 0 6px; font-size: 17px; letter-spacing: 0.04em; }
.big-tile p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.section-title { font-family: var(--display); font-size: 15px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin: 6px 0 12px; }

/* modal dialogs (pause, game over, confirm) */
.dialog { background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 22px; padding: 28px; width: min(440px, 100%); text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(122,107,255,0.15); }
.dialog h2 { font-family: var(--display); font-weight: 900; letter-spacing: 0.08em; margin: 0 0 6px; font-size: 30px; }
.dialog .stack { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.stat span { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.stat b { font-weight: 900; font-size: 24px; font-variant-numeric: tabular-nums; }
.stat.coins b { color: var(--coin); }
.new-best { display: inline-block; margin-top: 8px; color: #070816; background: var(--yellow); font-weight: 900; padding: 4px 12px; border-radius: 999px; font-size: 13px; letter-spacing: 0.08em; animation: pulse 1s infinite alternate; }
@keyframes pulse { from { box-shadow: 0 0 0 rgba(255,225,77,0.4); } to { box-shadow: 0 0 24px rgba(255,225,77,0.8); } }

/* help */
.help { max-width: 760px; line-height: 1.6; font-size: 16px; }
.help h3 { font-family: var(--display); font-size: 16px; letter-spacing: 0.06em; margin: 22px 0 6px; color: var(--cyan); }
.help p { margin: 6px 0; }
.keys { display: inline-flex; gap: 4px; }
kbd { background: rgba(255,255,255,0.08); border: 1px solid var(--line-strong); border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; font-family: var(--display); font-size: 12px; }
.legend-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.legend-row canvas { width: 40px; height: 40px; flex: none; }

/* toasts */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; gap: 12px; align-items: center; background: var(--panel-solid); border: 1px solid rgba(125,255,196,0.5); border-radius: 14px; padding: 12px 16px; min-width: 260px; max-width: 360px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 30px rgba(125,255,196,0.15); animation: toastIn 0.35s cubic-bezier(.2,1.4,.4,1); }
.toast.out { animation: toastOut 0.3s forwards; }
.toast .t-ico { font-size: 28px; }
.toast small { display: block; color: var(--green); font-weight: 800; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.toast b { display: block; font-size: 15px; }
.toast span { color: var(--muted); font-size: 13px; }
@keyframes toastIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastOut { to { transform: translateX(120%); opacity: 0; } }

/* touch controls */
#touchpad { position: fixed; z-index: 8; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 58px); gap: 4px; opacity: 0.75; }
#touchpad button { background: rgba(14,16,38,0.75); border: 1px solid var(--line-strong); color: var(--text); border-radius: 14px; font-size: 20px; touch-action: none; }
#touchpad button:active, #touchpad button.on { background: rgba(77,232,255,0.3); }
#touchpad [data-dir=up] { grid-column: 2; grid-row: 1; }
#touchpad [data-dir=left] { grid-column: 1; grid-row: 2; }
#touchpad [data-dir=right] { grid-column: 3; grid-row: 2; }
#touchpad [data-dir=down] { grid-column: 2; grid-row: 3; }

/* ------------------------------------------------------------- editor */
.editor { position: absolute; inset: 0; display: grid; grid-template-columns: 250px 1fr 260px; background: #04050d; pointer-events: auto; }
.editor aside { background: var(--panel-solid); border-right: 1px solid var(--line); padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.editor aside.right { border-right: 0; border-left: 1px solid var(--line); }
.editor .canvas-wrap { position: relative; min-width: 0; min-height: 0; }
.editor canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.editor h3 { font-family: var(--display); font-size: 13px; letter-spacing: 0.12em; color: var(--muted); margin: 6px 0 0; text-transform: uppercase; }
.tool-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tool { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.03); color: var(--text); cursor: pointer; font-weight: 700; font-size: 13px; text-align: left; }
.tool.active { border-color: var(--cyan); background: rgba(77,232,255,0.12); }
.tool canvas { position: static; width: 22px; height: 22px; flex: none; }
.editor .btn { width: 100%; }
.editor .two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.check-box { font-size: 13px; line-height: 1.45; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); }
.check-box .ok { color: var(--green); font-weight: 800; }
.check-box .err { color: #ff9db0; }
.check-box .wrn { color: #ffd38a; }
.size-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.size-row label { font-size: 12px; color: var(--muted); font-weight: 700; }

/* creator */
.creator { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; }
.preview-box { align-self: start; aspect-ratio: 4 / 3; background: radial-gradient(circle at 50% 40%, rgba(122,107,255,0.18), rgba(5,6,15,0.9)); border: 1px solid var(--line); border-radius: var(--radius); display: grid; place-items: center; min-height: 260px; position: relative; }
.preview-box canvas { width: 100%; height: 100%; position: absolute; inset: 0; }
.color-row { display: flex; gap: 14px; flex-wrap: wrap; }
.color-row label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.style-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.style-pick button { background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 12px; padding: 6px; color: var(--text); cursor: pointer; font-size: 12px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.style-pick button.active { border-color: var(--cyan); background: rgba(77,232,255,0.12); }
.style-pick canvas { width: 56px; height: 56px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .editor aside { border: 0; border-bottom: 1px solid var(--line); max-height: 34vh; }
  .editor aside.right { border-top: 1px solid var(--line); border-bottom: 0; }
  .tool-list { grid-template-columns: repeat(4, 1fr); }
  .creator { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #hud { gap: 12px; padding: 6px 10px; }
  .hud-value { font-size: 15px; }
  .hud-block:nth-child(2) { display: none; }
  .menu-grid { grid-template-columns: 1fr 1fr; }
  .top-bar h2 { font-size: 20px; }
  .screen { padding: 18px 12px 40px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* leave room for the on-screen arrows so they never cover the maze */
#app.pad-on #stage { margin-bottom: 210px; }
#app.pad-on #touchpad { bottom: max(14px, env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
  #toasts { left: 12px; right: 12px; top: 70px; bottom: auto; align-items: center; }
  .toast { min-width: 0; width: 100%; }
}
@media (min-width: 900px) and (pointer: fine) {
  #app.pad-on #stage { margin-bottom: 0; }
  #app.pad-on #touchpad { left: auto; right: 24px; transform: none; }
}
@media (max-width: 900px) {
  .editor .tool-list .tool { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 4px; text-align: center; min-width: 0; }
  .editor .tool-list .tool canvas { width: 20px; height: 20px; }
}

/* ------------------------------------------------------------- v2: status bar */
#status-bar { position: absolute; left: 50%; transform: translateX(-50%); top: 60px; z-index: 6; display: flex; gap: 8px; pointer-events: none; flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px); }
.st-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(8,10,26,0.88); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 900; letter-spacing: 0.06em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-wave.calm { color: var(--green); border-color: rgba(125,255,196,0.45); }
.st-wave.warn { color: #fff; background: rgba(255,40,80,0.85); border-color: #ff4d6d; animation: warnPulse 0.5s infinite alternate; }
.st-wave.surge { color: #ff6b8b; border-color: rgba(255,77,109,0.6); }
.st-wave.scared { color: #8fa0ff; border-color: rgba(120,140,255,0.6); }
@keyframes warnPulse { from { transform: scale(1); } to { transform: scale(1.08); } }
.st-goal { color: #fff; }
.st-goal.open { color: var(--green); border-color: rgba(125,255,196,0.6); }
.st-meter { width: 70px; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; display: inline-block; }
.st-meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width 0.15s; }
.st-heat[data-level=noticed] { color: #ffcf6b; } .st-heat[data-level=noticed] .st-meter i { background: #ffcf6b; }
.st-heat[data-level=hunted] { color: #ff6b8b; border-color: rgba(255,77,109,0.6); } .st-heat[data-level=hunted] .st-meter i { background: #ff4d6d; }
.st-heat[data-level=hidden] { color: var(--green); }
.st-eye { font-size: 13px; }
.st-shelter { color: var(--green); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------- v2: campaign */
.worlds { display: flex; flex-direction: column; gap: 18px; }
.world { border: 1px solid color-mix(in srgb, var(--w-wall) 45%, transparent); border-radius: 20px; padding: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--w-bg) 85%, transparent), rgba(14,16,38,0.85)); box-shadow: 0 0 40px color-mix(in srgb, var(--w-glow) 14%, transparent) inset; }
.world-head h3 { font-family: var(--display); margin: 2px 0 2px; font-size: 20px; color: var(--w-wall); text-shadow: 0 0 14px var(--w-glow); letter-spacing: 0.04em; }
.world-head p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.world-num { font-family: var(--display); font-size: 11px; letter-spacing: 0.2em; color: var(--muted); }
.level-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.level-card { display: flex; gap: 12px; align-items: center; text-align: left; background: rgba(5,6,15,0.7); border: 1px solid var(--line); border-radius: 14px; padding: 10px; color: var(--text); cursor: pointer; transition: 0.15s; min-width: 0; }
.level-card:hover:not(:disabled) { border-color: var(--w-wall); transform: translateY(-2px); box-shadow: 0 8px 24px color-mix(in srgb, var(--w-glow) 25%, transparent); }
.level-card canvas { width: 76px; height: 64px; flex: none; border-radius: 8px; }
.level-card.locked { opacity: 0.45; cursor: not-allowed; }
.lv-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lv-info b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-info small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.lv-id { font-family: var(--display); font-size: 11px; color: var(--w-wall); letter-spacing: 0.1em; }
.lv-new { font-size: 10px; font-weight: 900; color: #070816; background: var(--yellow); border-radius: 99px; padding: 1px 8px; align-self: flex-start; margin-top: 2px; }
.stars { display: inline-flex; gap: 1px; }
.star { color: rgba(255,255,255,0.18); line-height: 1; }
.star.on { color: var(--yellow); text-shadow: 0 0 10px rgba(255,225,77,0.6); }
.star-badge { color: var(--yellow); border-color: rgba(255,225,77,0.4); background: rgba(255,225,77,0.07); }
.goal-box { display: flex; flex-direction: column; gap: 2px; margin: 14px 0 6px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(125,255,196,0.4); background: rgba(125,255,196,0.07); }
.goal-box span { font-size: 11px; letter-spacing: 0.18em; color: var(--green); font-weight: 900; }
.goal-box b { font-size: 16px; }
.intro-text { font-size: 14.5px; line-height: 1.5; text-align: left; }
.star-goals { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; text-align: left; font-size: 14px; font-weight: 700; }
.star-goals > div { display: flex; align-items: center; gap: 10px; }
.star-goals.compact .ok { color: var(--green); } .star-goals.compact .no { color: var(--muted); }
.big-stars { display: flex; justify-content: center; gap: 10px; margin: 12px 0 6px; font-size: 52px; }
.big-stars .star.pop { animation: starPop 0.45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes starPop { from { transform: scale(0) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 760px) {
  .level-row { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-grid > .btn, .menu-grid > .btn-play { grid-column: span 1; }
  .menu-grid > .btn-play { grid-column: 1 / -1; }
  #status-bar { top: 52px; }
  .st-meter { width: 46px; }
}
@media (prefers-reduced-motion: reduce) { .st-wave.warn, .big-stars .star.pop, .new-best { animation: none; } }

#app.playing #stage { margin-top: 38px; }
@media (max-width: 640px) {
  #status-bar { flex-wrap: nowrap; gap: 5px; top: 50px; }
  .st-pill { font-size: 10px; padding: 3px 8px; gap: 5px; letter-spacing: 0.02em; }
  .st-heat b, .st-shelter > span:first-child { display: none; }
  .st-meter { width: 34px; }
  #app.playing #stage { margin-top: 30px; }
}

/* v2.1 campaign cards: 5 per world */
.level-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.level-card { flex-direction: column; align-items: stretch; }
.level-card canvas { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.level-card.boss { border-color: rgba(255,77,109,0.55); background: linear-gradient(180deg, rgba(60,8,20,0.7), rgba(5,6,15,0.8)); }
.level-card.boss .lv-id { color: #ff6b8b; }
.level-card.big .lv-id { color: var(--yellow); }
@media (max-width: 980px) { .level-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .level-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

#status-bar { left: 12px; right: 12px; transform: none; max-width: none; }
#effects-bar { left: 12px; right: 12px; transform: none; justify-content: center; }

/* v3 campaign map: worlds fold open */
.world { padding: 0; overflow: hidden; }
.world-head { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; cursor: pointer; }
.world-head:focus-visible { outline: 3px solid var(--w-wall); outline-offset: -3px; border-radius: 20px; }
.world-head:disabled { cursor: not-allowed; }
.world-title { flex: 1; min-width: 0; }
.world-title p { margin: 0; }
.world-progress { text-align: right; font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.world-progress > span:first-child { display: block; color: var(--text); }
.world-chev { font-size: 20px; color: var(--w-wall); width: 20px; text-align: center; }
.world.locked { opacity: 0.5; }
.world .level-row { padding: 0 18px 18px; }
.world:not(.expanded) .level-row { display: none; }
.level-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .level-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .world-progress .ach-progress { display: none; } }

/* controller / keyboard highlight */
.pad-focus, button:focus-visible, .btn:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--yellow) !important; outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255,225,77,0.18), 0 0 24px rgba(255,225,77,0.35) !important; }
.level-card.pad-focus, .big-tile.pad-focus { transform: translateY(-3px); }

.pad-ask { font-family: var(--display); font-size: 34px; font-weight: 900; color: var(--yellow); margin: 10px 0; text-shadow: 0 0 16px rgba(255,225,77,0.5); animation: pulse 0.8s infinite alternate; }
.pad-steps { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pad-steps span { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--muted); }
.pad-steps span.now { color: #070816; background: var(--yellow); border-color: var(--yellow); }
.pad-steps span.done { color: var(--green); border-color: rgba(125,255,196,0.5); }

.daily-thumb { width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; margin-top: 10px; background: #070818; }
.menu-grid > [data-act=daily], .menu-grid > [data-act=custom], .menu-grid > [data-act=settings], .menu-grid > [data-act=help] { grid-column: span 3; }
@media (max-width: 760px) {
  .menu-grid > [data-act=daily], .menu-grid > [data-act=custom], .menu-grid > [data-act=settings] { grid-column: span 1; }
  .menu-grid > [data-act=help] { grid-column: 1 / -1; }
}

/* ---- v3.1: players toggle, high scores, initials, arcade start ---- */
.players-pick { justify-content: center; margin: 0 0 14px; }
.players-pick .tab { font-size: 15px; padding: 9px 20px; }
.initials { display: flex; gap: 12px; justify-content: center; margin: 6px 0 14px; }
.initials span { width: 52px; height: 62px; border-radius: 12px; border: 2px solid var(--line-strong); display: grid; place-items: center;
  font: 900 36px/1 'Nunito', sans-serif; color: #ffe14d; text-shadow: 0 0 12px rgba(255,225,77,0.6); background: rgba(255,255,255,0.03); }
.initials span.cur { border-color: var(--cyan); animation: blinkBorder 0.9s steps(2) infinite; }
@keyframes blinkBorder { 50% { border-color: transparent; } }
.letter-board { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; max-width: 420px; margin: 0 auto; }
.letter-board .btn { padding: 8px 0; min-width: 0; font-weight: 900; justify-content: center; }
.hof-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.hof-card { border: 1px solid var(--line-strong); border-radius: 16px; padding: 14px 16px; background: rgba(255,255,255,0.03); }
.hof-card h3 { margin: 0 0 10px; font-size: 17px; }
.hof { width: 100%; border-collapse: collapse; font-weight: 800; }
.hof th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 6px; }
.hof td { padding: 6px; border-top: 1px solid rgba(255,255,255,0.06); }
.hof td:nth-child(3) { font-family: 'Nunito', sans-serif; font-weight: 900; }
.hof .hof-name { color: #ffe14d; letter-spacing: 0.12em; }
.hof tr:first-child td { color: #ffe14d; }
.hof tr.me td { background: rgba(77,232,255,0.1); }
.start-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.start-grid .btn { flex-direction: column; gap: 2px; }
.start-grid small { font-weight: 700; opacity: 0.75; font-size: 12px; }
@media (max-width: 420px) { .letter-board { grid-template-columns: repeat(6, minmax(0, 1fr)); } .initials span { width: 44px; height: 54px; font-size: 30px; } }

/* ---- v3.2: Munch Madness branding ---- */
.logo span { display: inline-block; }
.menu-credit { margin-top: 10px; font-size: 13px; color: var(--muted); opacity: 0.8; text-align: center; letter-spacing: 0.02em; }
@media (max-width: 560px) { .logo span { display: block; } }

.intro { position: fixed; inset: 0; z-index: 2000; background: radial-gradient(ellipse at 50% 45%, #141048 0%, #05060f 70%); display: grid; place-items: center; cursor: pointer; transition: opacity 0.45s ease; overflow: hidden; }
.intro.out { opacity: 0; pointer-events: none; }
.intro > div { grid-area: 1 / 1; text-align: center; padding: 0 16px; }
.intro-pub { animation: introPub 2.1s ease forwards; opacity: 0; }
.intro-name { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 6vw, 58px); letter-spacing: 0.32em; padding-left: 0.32em; color: #fff;
  text-shadow: 0 0 24px rgba(77,232,255,0.55), 0 0 60px rgba(122,107,255,0.35); }
.intro-presents { margin-top: 12px; font-family: var(--body); font-weight: 700; font-style: italic; font-size: clamp(16px, 2.6vw, 24px); color: #c9cdf2; letter-spacing: 0.12em; }
.intro-title { opacity: 0; animation: introTitle 2.2s 2s cubic-bezier(.2,.9,.3,1.2) forwards; }
.intro-by { margin-top: 18px; color: #c9cdf2; font-weight: 700; letter-spacing: 0.06em; font-size: clamp(13px, 1.8vw, 16px); }
.intro-skip { position: absolute; bottom: 28px; left: 0; right: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.08em; opacity: 0.6; }
@keyframes introPub { 0% { opacity: 0; transform: translateY(10px); letter-spacing: 0.2em; } 25% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }
@keyframes introTitle { 0% { opacity: 0; transform: scale(0.6); } 45% { opacity: 1; transform: scale(1.05); } 60% { transform: scale(1); } 100% { opacity: 1; transform: scale(1); } }
.intro.still .intro-pub { animation: none; opacity: 1; }
.intro.still .intro-title { display: none; }
/* attract mode */
.attract { position: fixed; inset: 0; z-index: 1500; background: rgba(5,6,15,0.9); backdrop-filter: blur(6px); display: grid; place-items: center; animation: fadeIn 0.4s ease; transition: opacity 0.35s; padding: 16px; }
.attract.out { opacity: 0; }
@keyframes fadeIn { from { opacity: 0; } }
.att-box { width: min(520px, 100%); text-align: center; }
.att-logo { font-size: clamp(32px, 7vw, 64px); margin-bottom: 18px; }
.att-head { font-family: var(--display); letter-spacing: 0.2em; color: #ffe14d; text-shadow: 0 0 16px rgba(255,225,77,0.6); margin: 8px 0 14px; font-size: clamp(18px, 3vw, 26px); }
.att-sub { font-family: var(--display); letter-spacing: 0.18em; color: var(--cyan); margin: 18px 0 8px; font-size: 15px; }
.att-row { display: grid; grid-template-columns: 2.2em 4.5em 1fr 4em; gap: 10px; align-items: center; font-weight: 900; font-size: clamp(16px, 2.4vw, 22px); padding: 5px 10px; }
.att-row:nth-child(odd) { background: rgba(255,255,255,0.03); border-radius: 8px; }
.att-rank { color: var(--muted); } .att-name { color: #ffe14d; letter-spacing: 0.15em; text-align: left; } .att-score { text-align: right; font-family: 'Nunito', sans-serif; } .att-extra { color: var(--muted); font-size: 0.75em; text-align: right; }
.att-empty { color: var(--muted); font-weight: 700; }
.att-start { margin-top: 26px; font-family: var(--display); letter-spacing: 0.25em; color: #fff; animation: blinkText 1.1s steps(2) infinite; }
@keyframes blinkText { 50% { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) { .att-start { animation: none; } }

/* ---- v3.3: community ---- */
.comm-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.comm-tools select, .comm-tools input { background: var(--panel-solid, #11132b); color: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700; }
.comm-tools input { flex: 1; min-width: 160px; }
.comm-card canvas { width: 100%; height: 130px; }
.comm-by { color: var(--muted); font-size: 13px; margin: 0; }
.comm-stats { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin: 4px 0; }
.comm-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.comm-btns .liked { color: #ff6b8b; border-color: #ff6b8b; }
.comm-empty { grid-column: 1 / -1; text-align: center; padding: 30px 10px; color: var(--muted); font-weight: 700; }
.share-ok { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.comm-tools select { width: auto; flex: 0 0 auto; }
.comm-tools .btn { width: auto; }
.comm-btns .btn { width: auto; flex: 1 1 auto; margin: 0; }
.comm-btns [data-like], .comm-btns [data-report] { flex: 0 0 auto; min-width: 40px; }

/* ---- v3.4: editor tooltips ---- */
.tool-tip { position: absolute; z-index: 50; max-width: 260px; background: #0d1030; border: 1px solid var(--cyan); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 18px rgba(77,232,255,0.2); pointer-events: none; display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.4; color: #e8ebff; }
.tool-tip b { font-size: 14px; color: #fff; }
.tool-tip small { color: var(--muted); font-weight: 700; }
.tool-tip[hidden] { display: none; }
/* arcade mode chooser */
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-btn { flex-direction: column; align-items: flex-start; text-align: left; gap: 3px; padding: 12px 14px; height: auto; }
.mode-btn .mode-ico { font-size: 24px; }
.mode-btn small { font-weight: 600; opacity: 0.8; font-size: 12px; line-height: 1.35; }
.mode-best { font-size: 12px; font-weight: 900; color: #ffe14d; margin-top: 2px; }
.mode-btn.btn-primary .mode-best { color: #1a1030; }
@media (max-width: 480px) { .mode-grid { grid-template-columns: 1fr; } }

/* ---- v3.5: progress panel, level rewards ---- */
.today { width: 100%; max-width: 680px; border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(255,255,255,0.03); padding: 12px 14px; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; align-items: center; }
.today-level { display: flex; align-items: center; gap: 12px; }
.lvl-badge { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 900 20px/1 'Nunito', sans-serif; color: #1a1030;
  background: radial-gradient(circle at 35% 30%, #fff6b0, #ffd24d 55%, #e0a400); box-shadow: 0 0 16px rgba(255,210,77,0.45); }
.lvl-badge.sm { width: 34px; height: 34px; font-size: 15px; }
.lvl-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lvl-info small { color: var(--muted); font-weight: 700; font-size: 12px; }
.lvl-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd24d, #ff8ad8); border-radius: 99px; }
.streak { text-align: center; font-size: 18px; line-height: 1; }
.streak b { display: block; font: 900 20px/1.1 'Nunito', sans-serif; color: #ffb347; }
.streak small { color: var(--muted); font-size: 11px; font-weight: 700; }
.quests { display: flex; flex-direction: column; gap: 5px; }
.quests-title { font-size: 11px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.quest { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.q-tick { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; color: #1a1030; flex: 0 0 auto; }
.quest.done .q-tick { background: #7dffc4; border-color: #7dffc4; }
.quest.done .q-text { color: var(--muted); text-decoration: line-through; }
.q-text { flex: 1; }
.q-prog { color: #ffe14d; font-family: 'Nunito', sans-serif; font-weight: 900; font-size: 12px; }
@media (max-width: 640px) { .today { grid-template-columns: 1fr; } }
.lvl-list { display: flex; flex-direction: column; gap: 8px; }
.lvl-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255,255,255,0.02); }
.lvl-row .grow { flex: 1; display: flex; flex-direction: column; }
.lvl-row small { color: var(--muted); font-weight: 700; }
.lvl-row.got { border-color: rgba(125,255,196,0.45); }
.lvl-row:not(.got) .lvl-badge { filter: grayscale(0.8) brightness(0.7); }
.daily-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.daily-card { border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,0.03); }
.daily-card h3 { margin: 0; font-size: 16px; }
.daily-card .daily-thumb { width: 100%; height: 110px; }
.daily-card .note { margin: 0; font-size: 13px; }
.done-note { color: #7dffc4 !important; font-weight: 800; }
@media (max-width: 480px) { .daily-pair { grid-template-columns: 1fr; } }
/* who's playing + character picker */
.who-row { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.who-row .players-pick { margin: 0; }
.who-chips { display: flex; gap: 8px; }
.who-chip { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04); color: #fff; cursor: pointer; text-align: left; }
.who-chip:hover, .who-chip:focus-visible { border-color: var(--cyan); }
.who-chip canvas { width: 34px; height: 34px; }
.who-chip span { display: flex; flex-direction: column; line-height: 1.15; }
.who-chip small { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.who-chip b { font-size: 14px; }
.who-chip.p2 { border-color: rgba(125,255,196,0.45); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; padding: 4px; margin: 10px 0; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.03); color: #fff; cursor: pointer; font-weight: 800; font-size: 12px; }
.pick canvas { width: 52px; height: 52px; }
.pick.on { border-color: #ffe14d; background: rgba(255,225,77,0.1); box-shadow: 0 0 0 1px #ffe14d inset; }
.pick[disabled] { opacity: 0.4; cursor: not-allowed; }
.pick small { color: var(--muted); font-size: 10px; }
