:root {
  --bg1: #e9f7ec; --bg2: #b9e2c3; --panel: #ffffff; --panel2: #eef6f0; --line: rgba(20, 60, 30, 0.16);
  --text: #12291a; --dim: #5d7464; --accent: #15803d; --accent2: #166534; --gold: #d99a06; --bad: #dc2626;
  --board: #123d24; --boardLine: #0a2615; --boardText: #f0fdf4;
  --lS: #facc15; --lB: #22c55e; --lO: #ef4444; --lOff: rgba(255, 255, 255, 0.13);
  --dg: #ffffff; --dgText: #12291a; --me: #2563eb; --op: #e11d48;
  --r: 16px;
}
body.t-night { --bg1: #0f172a; --bg2: #1e293b; --panel: #1e2a44; --panel2: #263552; --line: rgba(148, 163, 184, 0.22); --text: #e2e8f0; --dim: #94a3b8; --accent: #3b82f6; --accent2: #93c5fd; --board: #050b1a; --boardLine: #000; --dg: #0f1a33; --dgText: #e2e8f0; }
body.t-chalk { --bg1: #23402f; --bg2: #1a3123; --panel: #2c4a37; --panel2: #355a43; --line: rgba(240, 253, 244, 0.2); --text: #f4f7ef; --dim: #b8cbb9; --accent: #f5d76e; --accent2: #fde68a; --board: #183024; --boardLine: #0c1c13; --dg: #234030; --dgText: #fdfdf5; }
body.t-led { --bg1: #0b0b0b; --bg2: #1a1a1a; --panel: #161616; --panel2: #222; --line: rgba(255, 160, 40, 0.22); --text: #ffd9a8; --dim: #b98a55; --accent: #f97316; --accent2: #fdba74; --board: #000; --boardLine: #2a1600; --boardText: #ffb35c; --dg: #0d0d0d; --dgText: #ffb35c; }
body.t-note { --bg1: #fdfaf1; --bg2: #f1e9d2; --panel: #fffdf6; --panel2: #f6efdc; --line: rgba(80, 100, 160, 0.22); --text: #1f2a44; --dim: #6b7280; --accent: #b45309; --accent2: #92400e; --board: #fffdf6; --boardLine: #93a6d8; --boardText: #1f2a44; --lOff: rgba(31, 42, 68, 0.1); --dg: #fff; --dgText: #1f2a44; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
  color: var(--text);
  font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  display: flex; flex-direction: column; overflow: hidden;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
body.t-note { background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(80, 100, 160, 0.12) 27px 28px), linear-gradient(180deg, var(--bg1), var(--bg2)); }
body.t-led .digit, body.t-led .sb-msg, body.t-led .entry .slot { font-family: ui-monospace, 'Courier New', monospace; text-shadow: 0 0 6px rgba(255, 140, 0, 0.6); }
body.t-chalk .digit, body.t-chalk h1 { text-shadow: 0 0 1px rgba(255, 255, 255, 0.6); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.45; }
[hidden] { display: none !important; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent2);
  text-decoration: none; font-size: 0.85rem; font-weight: 700;
}
.total { margin-left: auto; font-weight: 800; }
.tools { display: flex; gap: 6px; }
.mini { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-weight: 800; }

/* ── 메뉴 ── */
.screen { flex: 1; overflow-y: auto; padding: 4px 16px 32px; }
.screen > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.logo { text-align: center; margin: 2px auto 12px; }
.logo-art { width: 160px; height: 60px; display: block; margin: 0 auto; }
.la-board { fill: #123d24; stroke: #0a2615; stroke-width: 2; }
.la-l { fill: #f0fdf4; font: 800 15px system-ui, sans-serif; }
.la-s { fill: #facc15; } .la-b { fill: #22c55e; } .la-off { fill: rgba(255, 255, 255, 0.15); }
.la-ball circle { fill: #fff; } .la-ball path { fill: none; stroke: #dc2626; stroke-width: 2; stroke-dasharray: 3 2; }
.la-ball { transform-origin: 120px 30px; animation: laSpin 3s linear infinite; }
@keyframes laSpin { to { transform: rotate(360deg); } }
h1 { margin: 6px 0 2px; font-size: 1.6rem; letter-spacing: -0.02em; }
h1 span { color: var(--accent); }
.tagline { margin: 0; color: var(--dim); font-size: 0.9rem; }
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.tab { padding: 9px 2px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.dim { color: var(--dim); }
.small { font-size: 0.82rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.btn { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-weight: 800; }
.btn.go { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.small { padding: 6px 10px; font-size: 0.85rem; }
.btn.wide { width: 100%; }
.continue {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 12px;
  border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 12%, var(--panel));
}
.continue .ci { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; }
.continue b { display: block; } .continue small { color: var(--dim); }
.reg-h { display: flex; align-items: baseline; gap: 8px; margin: 14px 2px 6px; }
.reg-h b { font-size: 1.02rem; } .reg-h small { color: var(--dim); }
.mission { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.mission .mi { font-size: 1.8rem; width: 40px; text-align: center; flex: none; }
.mission .mt { flex: 1; min-width: 0; }
.mission .mt b { display: block; } .mission .mt small { color: var(--dim); font-size: 0.75rem; }
.mission .ms { color: var(--gold); font-size: 0.95rem; letter-spacing: 1px; white-space: nowrap; }
.mission.lock { opacity: 0.45; }
.mission.next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.chip { font-style: normal; font-size: 0.68rem; padding: 1px 6px; border-radius: 999px; background: var(--panel2); color: var(--dim); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin: 8px 0; }
.kpis div { background: var(--panel2); border-radius: 12px; padding: 8px 2px; }
.kpis b { display: block; font-size: 1.2rem; } .kpis small { color: var(--dim); font-size: 0.72rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 8px auto 0; max-width: 420px; }
.cal span, .cal button { aspect-ratio: 1; border-radius: 6px; background: var(--panel2); display: grid; place-items: center; color: var(--dim); border: 0; padding: 0; font: inherit; font-size: 0.7rem; min-width: 0; }
.cal .w { background: var(--accent); color: #fff; font-weight: 800; } .cal .t { outline: 2px solid var(--accent); }
.cal .f { background: color-mix(in srgb, var(--bad) 25%, var(--panel2)); color: var(--text); }
.cal button.past { cursor: pointer; box-shadow: inset 0 0 0 1.5px #a78bfa; color: var(--text); }
.cal button.past:hover, .cal button.past:focus-visible { box-shadow: inset 0 0 0 2.5px #8b5cf6; }
.cal .redo { background: #8b5cf6; color: #fff; font-weight: 800; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 10px; }
.seg button { flex: 1; min-width: 56px; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-weight: 700; font-size: 0.82rem; }
.seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.lbl { font-size: 0.8rem; color: var(--dim); margin-top: 6px; }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ach div { background: var(--panel2); border-radius: 10px; padding: 8px; font-size: 0.78rem; opacity: 0.45; }
.ach div.got { opacity: 1; border: 1px solid rgba(217, 154, 6, 0.5); }
.ach b { display: block; font-size: 0.85rem; }
.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.themes button { padding: 8px 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); font-size: 0.75rem; font-weight: 700; }
.themes button.on { outline: 2px solid var(--accent); }
.themes i { display: block; height: 22px; border-radius: 6px; margin-bottom: 4px; border: 1px solid var(--line); }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.9rem; }
.opt button { min-width: 64px; }
.lesson { font-size: 0.85rem; line-height: 1.55; margin: 0; padding-left: 18px; }
.pz-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 4px; }
.pz-grid button { padding: 8px 2px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); font-weight: 800; font-size: 0.9rem; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pz-grid button small { color: var(--gold); font-size: 0.7rem; letter-spacing: 1px; min-height: 1em; }
.pz-grid button.next { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pz-grid button:disabled { opacity: 0.4; }
.bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.bars div { background: var(--panel2); border-radius: 12px; padding: 8px 2px; font-size: 0.75rem; color: var(--dim); }
.bars b { display: block; font-size: 1.05rem; color: var(--text); }

/* ── 경기 ── */
#game { flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 0 10px calc(8px + env(safe-area-inset-bottom)); position: relative; }
#game > * { max-width: 560px; width: 100%; margin-left: auto; margin-right: auto; }
.g-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.g-title { flex: 1; min-width: 0; }
.g-title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-title small { color: var(--dim); font-size: 0.78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-count { font-weight: 900; font-variant-numeric: tabular-nums; font-size: 0.95rem; white-space: nowrap; }
.sboard { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 4px 12px; padding: 8px 12px; border-radius: 14px; background: var(--board); border: 2px solid var(--boardLine); color: var(--boardText); margin-bottom: 6px; }
.lamps { display: flex; align-items: center; gap: 4px; }
.ll { font-weight: 900; font-size: 0.9rem; width: 12px; }
.lamp { width: 15px; height: 15px; border-radius: 50%; background: var(--lOff); }
.lamp.on.s { background: var(--lS); box-shadow: 0 0 10px var(--lS); }
.lamp.on.b { background: var(--lB); box-shadow: 0 0 10px var(--lB); }
.lamp.on.o { background: var(--lO); box-shadow: 0 0 10px var(--lO); }
.lamp.on { animation: lampOn 0.25s ease-out; }
@keyframes lampOn { from { transform: scale(1.6); } }
.lamp.x { display: none; }
.sb-msg { text-align: right; font-weight: 900; font-size: 1.15rem; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-msg small { display: block; font-size: 0.72rem; font-weight: 700; opacity: 0.75; }
.sb-msg.pop { animation: bump 0.4s; }
@keyframes bump { 50% { transform: scale(1.2); } }
.status { text-align: center; font-weight: 800; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 6px; font-size: 0.88rem; min-height: 2.1em; }
.status.op { background: color-mix(in srgb, var(--op) 12%, var(--panel)); border-color: color-mix(in srgb, var(--op) 40%, transparent); }
.status.me { background: color-mix(in srgb, var(--me) 10%, var(--panel)); border-color: color-mix(in srgb, var(--me) 40%, transparent); }
.status.good { background: #fef9c3; border-color: #facc15; color: #713f12; }
.status.bad { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }
.logs { flex: 1; min-height: 80px; display: grid; gap: 8px; grid-template-columns: 1fr; overflow: hidden; }
.logs.two { grid-template-columns: 1fr 1fr; }
.col { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.col.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.col h4 { margin: 0; padding: 6px 10px; font-size: 0.8rem; background: var(--panel2); display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; }
.col h4 small { color: var(--dim); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.col.me h4 { color: var(--me); } .col.op h4 { color: var(--op); }
.list { flex: 1; overflow-y: auto; padding: 4px 6px 6px; }
.row { display: flex; align-items: center; gap: 6px; padding: 4px 2px; border-bottom: 1px dashed var(--line); }
.row:last-child { border-bottom: 0; }
.row .no { width: 1.4em; text-align: right; font-size: 0.72rem; color: var(--dim); font-variant-numeric: tabular-nums; flex: none; }
.row .code { display: flex; gap: 3px; }
.row.new { animation: rowIn 0.3s ease-out; }
@keyframes rowIn { from { transform: translateY(8px); opacity: 0; } }
.row.given .no { color: var(--accent); }
.row.miss { opacity: 0.85; }
.digit { width: 1.75em; height: 1.95em; display: grid; place-items: center; border-radius: 7px; background: var(--dg); color: var(--dgText); border: 1px solid var(--line); font-weight: 900; font-size: 1rem; font-variant-numeric: tabular-nums; padding: 0; }
button.digit { cursor: pointer; }
.digit.no { opacity: 0.35; text-decoration: line-through; }
.digit.yes { background: #bbf7d0; color: #14532d; border-color: #22c55e; }
.two .digit { width: 1.5em; height: 1.75em; font-size: 0.9rem; }
.two .n5 .digit { width: 1.3em; font-size: 0.84rem; }
.fb { margin-left: auto; display: flex; gap: 3px; white-space: nowrap; }
.fb i { font-style: normal; font-weight: 900; font-size: 0.78rem; padding: 2px 6px; border-radius: 8px; }
.fb .s { background: var(--lS); color: #3f2d00; }
.fb .b { background: var(--lB); color: #052e13; }
.fb .o { background: var(--lO); color: #fff; }
.fb .h { background: linear-gradient(90deg, #f59e0b, #ef4444); color: #fff; }
.fb .z { opacity: 0.35; }
.row .tag { font-size: 0.66rem; color: var(--dim); }
.row .bad { color: var(--bad); font-size: 0.7rem; font-weight: 800; }
.empty { color: var(--dim); text-align: center; font-size: 0.82rem; padding: 14px 6px; }
.clue-check { font-size: 0.72rem; color: var(--dim); padding: 2px 4px 6px 2em; }
.clue-check b { color: var(--bad); }
.secret { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: var(--dim); }
.secret .code { display: flex; gap: 3px; }
.secret .digit { width: 1.5em; height: 1.6em; font-size: 0.9rem; }
.secret button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; font-weight: 700; }
.entry-wrap { position: relative; margin-top: 8px; }
.entry { display: flex; justify-content: center; gap: 8px; }
.slot { width: 3rem; height: 3.3rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.7rem; font-weight: 900; background: var(--panel); border: 2px solid var(--line); font-variant-numeric: tabular-nums; }
.slot.cur { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.slot.f { animation: slotIn 0.15s ease-out; }
@keyframes slotIn { from { transform: scale(0.7); } }
.entry.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.entry.fly .slot { animation: fly 0.35s ease-in forwards; }
@keyframes fly { to { transform: translateY(-40px) scale(0.6); opacity: 0; } }
.pad { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.key { position: relative; padding: 0; height: 3rem; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-size: 1.35rem; font-weight: 900; touch-action: manipulation; }
.key:active:not(:disabled) { transform: scale(0.95); }
.key.used { opacity: 0.35; }
.key.no { background: var(--panel2); color: var(--dim); text-decoration: line-through; }
.key.yes { background: #bbf7d0; color: #14532d; border-color: #22c55e; }
.key.na { visibility: hidden; }
.memo-on .key { border-style: dashed; border-color: var(--accent); }
.acts { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.cbtn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 7px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-size: 1.1rem; }
.cbtn span { font-size: 0.72rem; font-weight: 700; color: var(--dim); }
.cbtn.on { background: color-mix(in srgb, var(--accent) 20%, var(--panel)); border-color: var(--accent); }
.cbtn.go:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.cbtn.go:not(:disabled) span { color: #fff; }
.toast { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 800; font-size: 0.88rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); z-index: 3; max-width: calc(100% - 24px); text-align: center; pointer-events: none; white-space: nowrap; }
.toast.bad { background: #fee2e2; color: #7f1d1d; }
.toast.good { background: #fef9c3; color: #713f12; }
.cover { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: var(--bg2); padding: 20px; text-align: center; max-width: none !important; }
.cover .box { max-width: 340px; }
.cover .big { font-size: 3.4rem; }
.cover h2 { margin: 8px 0; }
.homer { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 3rem; font-weight: 900; color: #f59e0b; text-shadow: 0 4px 0 #b45309, 0 8px 22px rgba(0, 0, 0, 0.3); pointer-events: none; z-index: 8; animation: homer 1.2s ease-out forwards; white-space: nowrap; }
@keyframes homer { 0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } 25% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -90%) scale(1); opacity: 0; } }

/* ── 모달 ── */
.modal { position: fixed; inset: 0; background: rgba(5, 20, 10, 0.55); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal-box { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); }
.modal-box h2 { margin: 0 0 8px; font-size: 1.25rem; }
.modal-box p { line-height: 1.5; }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.modal-btns .btn { flex: 1; white-space: nowrap; padding: 10px 8px; }
.big-stars { color: var(--gold); text-align: center; font-size: 2.2rem; letter-spacing: 6px; margin: 4px 0; }
.big-stars .off { opacity: 0.2; }
.res-line { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.res-line .code { display: flex; gap: 3px; }
.res-line .digit { width: 1.5em; height: 1.6em; font-size: 0.9rem; }
.quote { background: var(--panel2); border-radius: 12px; padding: 10px 12px; font-size: 0.9rem; }
.opp { text-align: center; font-size: 3rem; }
.trail { font-size: 0.8rem; margin-top: 8px; background: var(--panel2); border-radius: 12px; padding: 8px 10px; }
.trail div { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.trail .x { color: var(--bad); font-weight: 800; }
.err { font-family: ui-monospace, monospace; font-size: 0.75rem; background: #1f1a12; padding: 8px; border-radius: 8px; white-space: pre-wrap; color: #fecaca; max-height: 140px; overflow: auto; user-select: text; -webkit-user-select: text; }
.ach-pop { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); pointer-events: none; transform: translateX(-50%); background: #fef9c3; color: #713f12; padding: 10px 16px; border-radius: 14px; font-weight: 800; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3); z-index: 20; animation: pop 0.3s ease-out; max-width: calc(100% - 32px); }
@keyframes pop { from { transform: translate(-50%, -20px); opacity: 0; } }
.help-ex { display: flex; flex-direction: column; gap: 4px; background: var(--panel2); border-radius: 12px; padding: 8px 10px; font-size: 0.85rem; margin: 8px 0; }
.help-ex .row { border: 0; padding: 1px 0; }
.noscript { padding: 20px; text-align: center; }
@media (max-width: 420px) {
  .back-txt { display: none; }
  .slot { width: 2.7rem; height: 3rem; font-size: 1.5rem; }
  .key { height: 2.8rem; }
  .two .digit { width: 1.3em; height: 1.6em; font-size: 0.82rem; }
  .two .n5 .digit { width: 1.12em; font-size: 0.76rem; border-radius: 5px; }
  .two .fb i { padding: 2px 4px; font-size: 0.7rem; }
  .two .row .no { display: none; }
  .sboard { gap: 4px 8px; padding: 6px 10px; }
  .lamp { width: 13px; height: 13px; }
}
@media (max-height: 640px) {
  .key { height: 2.5rem; font-size: 1.15rem; }
  .slot { height: 2.6rem; font-size: 1.35rem; }
  .cbtn { padding: 4px; }
  .cbtn span { display: none; }
  .status { padding: 3px; min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
