@charset "UTF-8";
:root {
  font-family: "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #f5f7ff;
  background: #30467b;
  font-synthesis: none;
  --board-size: min(420px, calc(100vw - 36px), calc(100svh - 532px));
  --blue: #518de9;
  --muted: #a8b8db;
  --gold: #ffce66;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow-x: hidden; background: radial-gradient(ellipse at 50% 20%, #42619a 0%, #344e86 43%, #293d6c 100%); -webkit-tap-highlight-color: transparent; }
button, a, #board { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button:focus-visible, a:focus-visible, #board:focus-visible { outline: 2px solid #ffda7b; outline-offset: 5px; }
button:disabled { cursor: default; }
button, a { touch-action: manipulation; }
svg { width: 24px; height: 24px; flex-shrink: 0; }
[hidden] { display: none !important; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.background-art { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient-glow { position: absolute; width: 650px; height: 650px; left: calc(50% - 325px); top: 80px; border-radius: 50%; background: #729ce4; opacity: .035; filter: blur(65px); }
.outline-piece { position: absolute; width: 104px; height: 104px; border: 2px solid #a6c5ff; border-radius: 10px; opacity: .035; transform: rotate(-15deg); }
.outline-piece::before, .outline-piece::after { content: ""; position: absolute; width: 100%; height: 100%; border: inherit; border-radius: inherit; }
.outline-piece::before { left: 100%; top: -2px; }
.outline-piece::after { left: -2px; top: 100%; }
.outline-one { top: 27%; left: 8%; }
.outline-two { bottom: 25%; right: 9%; transform: rotate(16deg); width: 76px; height: 76px; }
.outline-three { bottom: 8%; left: 23%; width: 42px; height: 42px; transform: rotate(12deg); }
.site-header { width: 100%; padding: 27px 42px; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: #fff; font-size: 17px; font-weight: 900; letter-spacing: -.7px; }
.brand-blast { color: #ffcb59; margin-left: 4px; }
.brand-n { color: #a3c6ff; }
.brand-wordmark { display: flex; flex-direction: column; gap: 3px; }
.brand-name { line-height: 1; }
.brand-credit { color: #c6d4ef; font-size: 10px; font-weight: 500; line-height: 1.2; letter-spacing: .5px; }
.brand-blast { margin-left: 0; }
.toolbar-actions { display: flex; align-items: center; gap: 5px; }
.ranking-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 9px; color: #ffdc8b; background: #ffcc6812; border: 1px solid #ffcc6826; font-size: 10px; font-weight: 800; letter-spacing: .5px; }
.ranking-button:hover { background: #ffcc6825; }
.ranking-button svg { width: 14px; height: 14px; }
.ranking-modal { width: min(410px, calc(100vw - 28px)); padding: 24px; }
.ranking-eyebrow { font-size: 9px; letter-spacing: 1.5px; color: #9fb9e5; margin: 0 0 9px; }
.ranking-modal h1 { font-size: 27px; letter-spacing: -.7px; }
.ranking-modal h1 span { color: #ffcf73; }
.ranking-modal .modal-subtitle { margin: 10px 0 18px; }
.ranking-columns, .ranking-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ranking-columns { padding: 0 12px 9px; font-size: 9px; color: #a9bee0; }
.ranking-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.ranking-row { min-height: 39px; border-radius: 8px; padding: 9px 12px; background: #20365e55; border: 1px solid transparent; font-size: 12px; }
.ranking-position { color: #a6b9db; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ranking-row:nth-child(-n+3):not(.is-empty) .ranking-position { color: #ffd67d; }
.ranking-row:first-child:not(.is-empty) { background: #ffcc6813; border-color: #ffcc6833; }
.ranking-player { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-score { font-size: 13px; font-variant-numeric: tabular-nums; }
.ranking-row.is-me { border-color: #9bbcff66; }
.ranking-row.is-empty { color: #91a7ce; }
.ranking-row.is-empty .ranking-player { font-size: 10px; }
.ranking-status { color: #c1d0ed; font-size: 11px; text-align: center; line-height: 1.6; min-height: 18px; margin: 16px 0 0; }
.ranking-footnote { font-size: 10px; color: #9bb2d8; line-height: 1.7; text-align: center; margin: 16px 0 0; }
.ranking-form { margin-top: 19px; text-align: left; }
.ranking-form label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 9px; }
.ranking-input-row { display: flex; gap: 6px; }
.ranking-input-row input { min-width: 0; flex: 1; width: 100%; background: #20365e; color: #fff; border: 1px solid #92b4e65c; border-radius: 8px; padding: 10px; font: inherit; font-size: 16px; }
.ranking-input-row input::placeholder { color: #9eb5d9; font-size: 11px; }
.ranking-input-row input:focus-visible { outline: 2px solid #ffda7b; outline-offset: 2px; }
.ranking-input-row button { background: #ffd074; color: #2c3e64; border-radius: 8px; padding: 10px 12px; white-space: nowrap; font-size: 12px; font-weight: 800; }
.ranking-input-row button:disabled { opacity: .55; }
#ranking-submit-status { margin: 8px 0 0; color: #b9cbea; font-size: 10px; line-height: 1.6; }
.gameover-modal .round-stats { margin-top: 14px; padding: 10px; }
.gameover-modal .primary-button { margin-top: 18px; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 2px; transform: rotate(-7deg); }
.brand-mark i { width: 9px; height: 9px; background: #ffce68; border-radius: 1.5px; box-shadow: inset 0 1px 0 #ffe8ad, 0 1px 1px #1b3059; }
.brand-mark i:last-child { background: #72a4fc; box-shadow: inset 0 1px 0 #b2cfff; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.mode-label { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; letter-spacing: 2px; color: #d2dff7; margin-right: 13px; }
.mode-label > span { width: 5px; height: 5px; border-radius: 50%; background: #8bccac; box-shadow: 0 0 7px #8bcca955; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 38px; height: 38px; border-radius: 12px; background: transparent; color: #c6d4ef; transition: color .2s, background .2s, transform .2s; }
.icon-button:hover { background: #ffffff0d; color: #fff; }
.icon-button:active { transform: scale(.9); }
.header-actions .icon-button svg { width: 20px; height: 20px; }
.game { width: calc(var(--board-size) + 12px); margin: auto; position: relative; z-index: 1; padding-bottom: 9px; user-select: none; -webkit-user-select: none; }
.game-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 0 5px; height: 38px; }
.best-score { display: flex; gap: 8px; align-items: center; color: var(--gold); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.best-score svg { width: 24px; height: 24px; filter: drop-shadow(0 2px 1px #11234755); }
.best-label { font-size: 9px; font-weight: 700; color: #a5b8da; letter-spacing: 1.5px; padding-top: 4px; margin-left: 2px; }
.settings-button { color: #aabbdc; }
.settings-button svg { width: 26px; height: 26px; }
.score-area { height: 106px; text-align: center; position: relative; }
.score-label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 3px; color: #b4c5e5; margin-top: 1px; }
.score { font-size: 64px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -2px; text-shadow: 0 3px 0 #23386666; }
.score.bump { animation: score-bump .28s ease-out; }
.combo-indicator { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; align-items: center; white-space: nowrap; gap: 5px; color: #ffdb80; font-size: 10px; font-weight: 800; letter-spacing: 1px; }
.combo-indicator strong { font-size: 15px; }
.combo-flame { font-size: 16px; }
.combo-life { display: flex; gap: 3px; margin-left: 3px; }
.combo-life i { width: 5px; height: 5px; border-radius: 50%; background: #ffda75; }
.combo-life i.spent { background: #8095be55; }
.board-wrap { position: relative; width: 100%; padding: 6px; background: #1d3159; border-radius: 9px; box-shadow: 0 5px 0 #20345e, 0 12px 30px #16294830, inset 0 1px 0 #263f6e; }
.board { width: var(--board-size); height: var(--board-size); display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); gap: 3px; border-radius: 4px; touch-action: none; }
.board-row { display: contents; }
.cell { position: relative; min-width: 0; min-height: 0; border-radius: 3px; background: #263c65; box-shadow: inset 0 1px 2px #15264755; }
.block { background: linear-gradient(145deg, var(--block-light), var(--block-color) 58%, var(--block-dark)); border-radius: 3px; box-shadow: inset 0 2px 0 var(--block-edge), inset 2px 0 0 #ffffff16, inset -2px 0 0 #0000000b, inset 0 -3px 0 var(--block-shadow), 0 1px 1px #0c204044; }
.block::after { content: ""; position: absolute; inset: 5px 5px 6px; border: 1px solid #ffffff14; border-top-color: #ffffff21; border-radius: 1px; background: linear-gradient(145deg, #ffffff08, transparent); pointer-events: none; }
[data-color="blue"] { --block-color: #4689eb; --block-light: #579df6; --block-dark: #3578d4; --block-edge: #78b6ff; --block-shadow: #2862bb; }
[data-color="cyan"] { --block-color: #36b6d4; --block-light: #50c8e3; --block-dark: #219abf; --block-edge: #83e1eb; --block-shadow: #1783a5; }
[data-color="green"] { --block-color: #77bb49; --block-light: #94ce58; --block-dark: #5ca231; --block-edge: #b6e680; --block-shadow: #48892e; }
[data-color="yellow"] { --block-color: #edbe36; --block-light: #f9d052; --block-dark: #dba027; --block-edge: #ffe58a; --block-shadow: #b8861b; }
[data-color="orange"] { --block-color: #ef883b; --block-light: #ffa153; --block-dark: #dc6c2a; --block-edge: #ffc07a; --block-shadow: #ba5426; }
[data-color="red"] { --block-color: #e96577; --block-light: #f17e8b; --block-dark: #d54b62; --block-edge: #ffa5ae; --block-shadow: #b73954; }
[data-color="purple"] { --block-color: #a56be0; --block-light: #b780ed; --block-dark: #8b50c9; --block-edge: #d4a5ff; --block-shadow: #7139ae; }
.cell.preview { background: var(--block-color); opacity: .42; box-shadow: inset 0 0 0 2px var(--block-edge); }
.cell.line-preview { filter: brightness(1.35); box-shadow: inset 0 0 0 2px #ffffff80, 0 0 10px #ffffff15; }
.cell.invalid-preview { box-shadow: inset 0 0 0 2px #ff9d9d; background: #c35f7470; }
.cell.keyboard-anchor { outline: 2px solid #ffde8c; outline-offset: -2px; z-index: 1; }
.cell.just-placed { animation: block-place .21s ease-out; }
.cell.clearing { animation: block-clear .34s ease-in forwards; z-index: 2; }
.board-wrap.blast { animation: board-blast .3s ease-out; }
.board-message { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); pointer-events: none; z-index: 6; text-align: center; font-size: 37px; font-weight: 950; font-style: italic; letter-spacing: -1px; color: #ffe38a; text-shadow: 0 3px 0 #9a622f, 0 5px 0 #344c7d, 0 0 25px #263b66; opacity: 0; white-space: nowrap; }
.board-message small { display: block; font-size: 18px; color: #fff; font-style: normal; margin-top: 3px; text-shadow: 0 2px 0 #243a69; letter-spacing: 0; }
.board-message.show { animation: celebrate 1.25s ease-out forwards; }
.effects { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5; }
.particle { position: absolute; width: 7px; height: 7px; background: var(--particle-color); border-radius: 1px; animation: particle-burst .65s ease-out forwards; }
.point-popup { position: absolute; color: #fff; font-size: 21px; font-weight: 800; text-shadow: 0 2px 2px #203966; white-space: nowrap; animation: point-float .85s ease-out forwards; }
.tray { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; height: 138px; gap: 8px; margin-top: 5px; touch-action: none; }
.piece-slot { position: relative; height: 120px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: 13px; display: flex; align-items: center; justify-content: center; touch-action: none; transition: background .16s, border-color .16s; }
.piece-slot:not(:disabled):hover { background: #ffffff04; }
.piece-slot.selected { background: #9dbdff0c; border-color: #a4c6ff44; }
.piece-slot.selected::after { content: ""; position: absolute; width: 4px; height: 4px; bottom: 4px; background: #c6d9ff; border-radius: 50%; }
.piece-slot.unavailable .piece-shape { filter: saturate(.55); opacity: .4; }
.piece-slot.dragging .piece-shape { opacity: .15; transform: scale(.92); }
.piece-slot:disabled { pointer-events: none; }
.piece-shape { display: grid; gap: 2px; pointer-events: none; transition: opacity .15s, transform .15s; filter: drop-shadow(0 4px 2px #1b2f5522); }
.piece-shape .block { position: relative; }
.piece-shape .block::after { inset: 4px 4px 5px; }
.piece-shape.appear { animation: piece-appear .28s ease-out backwards; }
.empty-slot { width: 5px; height: 5px; border-radius: 50%; background: #8ca4d02e; }
.game-instruction { text-align: center; color: #bdcbe5; font-size: 12px; letter-spacing: -.1px; height: 23px; }
.game-actions { display: flex; align-items: center; justify-content: center; gap: 19px; margin-top: 9px; }
.text-button { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; color: #aebfdd; background: transparent; padding: 9px 2px; transition: color .15s; }
.text-button:hover { color: #fff; }
.text-button svg { width: 16px; height: 16px; }
.action-divider { height: 12px; width: 1px; background: #a5b9da26; }
.site-footer { padding: 20px 42px 23px; display: flex; justify-content: space-between; align-items: center; color: #9bafd080; font-size: 10px; position: relative; z-index: 1; }
.footer-caption { letter-spacing: .3px; }
.keyboard-hint { display: flex; align-items: center; gap: 4px; }
.keyboard-hint > span { margin: 0 12px 0 4px; }
.keyboard-hint > span:last-child { margin-right: 0; }
kbd { font: 10px "Segoe UI", sans-serif; color: #afc0dd90; border: 1px solid #afc0dd22; padding: 3px 5px; min-width: 19px; text-align: center; border-radius: 4px; background: #ffffff03; }
.drag-ghost { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 15; filter: drop-shadow(0 12px 12px #10234f55); will-change: transform; }
.drag-ghost .piece-shape { gap: 3px; }
.drag-ghost.valid { filter: drop-shadow(0 0 8px #b9d5ff44); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #182b51ed; color: #e6edfc; padding: 13px 21px; border: 1px solid #8cafe433; border-radius: 12px; box-shadow: 0 5px 30px #14254744; font-size: 13px; z-index: 50; white-space: nowrap; }
.modal { width: min(370px, calc(100vw - 36px)); border: 1px solid #7094cb55; border-radius: 23px; padding: 29px 27px 23px; background: linear-gradient(150deg, #3b5991, #2c4578); color: #f7f9ff; box-shadow: 0 24px 80px #101d4399, inset 0 1px 0 #b7d3ff16; max-height: calc(100svh - 40px); overflow-y: auto; }
.modal[open] { animation: modal-in .2s ease-out; }
.modal::backdrop { background: #0a193d99; backdrop-filter: blur(7px); }
.modal-heading { display: flex; align-items: center; justify-content: space-between; }
.modal h1 { font-size: 23px; letter-spacing: -1px; margin: 0; font-weight: 800; }
.modal-close { margin: -8px -9px -6px 0; color: #adc1e6; }
.modal-subtitle { color: #b7c8e7; font-size: 12px; line-height: 1.8; margin: 11px 0 24px; word-break: keep-all; }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 17px 0; border-bottom: 1px solid #bdd1ff12; font-size: 14px; }
.setting-row > span { display: flex; align-items: center; gap: 12px; }
.setting-row svg { width: 20px; height: 20px; color: #bdd0f2; }
.setting-symbol { display: inline-block; font-size: 26px; line-height: 20px; width: 20px; text-align: center; color: #bdd0f2; }
.toggle { width: 43px; height: 25px; border-radius: 20px; background: #1f345c; border: 1px solid #ffffff0f; padding: 3px; transition: background .2s; }
.toggle i { display: block; width: 17px; height: 17px; border-radius: 50%; background: #c3cfe3; transition: transform .2s; box-shadow: 0 1px 4px #13244b55; }
.toggle[aria-checked="true"] { background: #88ba61; }
.toggle[aria-checked="true"] i { transform: translateX(17px); background: #fff; }
.primary-button { width: 100%; display: flex; justify-content: center; align-items: center; gap: 10px; padding: 16px; margin-top: 25px; border-radius: 11px; background: linear-gradient(#a3d367, #87bf4f); box-shadow: inset 0 2px 0 #c5e796, 0 4px 0 #5b8d34, 0 6px 14px #172d4922; text-shadow: 0 1px 1px #47712b66; font-weight: 800; font-size: 16px; transition: filter .15s, transform .15s; }
.primary-button:hover { filter: brightness(1.08); }
.primary-button:active { transform: translateY(2px); }
.primary-button svg { width: 18px; height: 18px; }
.secondary-button { width: 100%; background: transparent; color: #bfceeb; padding: 16px 10px 5px; margin-top: 6px; font-size: 13px; }
.secondary-button:hover { color: #fff; }
.modal-footnote { text-align: center; font-size: 10px; color: #94aed7; margin: 22px -10px 0; }
.help-illustration { display: flex; justify-content: center; gap: 24px; align-items: center; background: #213b693f; border-radius: 13px; height: 112px; position: relative; margin-top: -3px; }
.mini-piece { display: grid; grid-template-columns: repeat(2, 20px); gap: 2px; transform: rotate(-8deg); }
.mini-piece i { height: 20px; background: #f0bf46; box-shadow: inset 0 2px #ffdb79, inset 0 -2px #c2932c; border-radius: 2px; }
.help-illustration > svg { width: 20px; color: #8fa9d4; }
.mini-board { display: grid; grid-template-columns: repeat(4, 16px); gap: 2px; background: #1e3258; padding: 3px; border-radius: 4px; }
.mini-board i { height: 16px; background: #314c79; border-radius: 1px; }
.mini-board .lit { background: #f4c752; box-shadow: 0 0 7px #f4c75233; }
.help-spark { position: absolute; right: 35px; top: 19px; color: #ffe49d; font-size: 24px; }
.help-steps { list-style: none; padding: 0; margin: 24px 0 0; }
.help-steps li { display: flex; gap: 14px; margin: 19px 0; }
.help-steps li > span { font-size: 11px; font-weight: 800; color: #ffce75; background: #d9b66912; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.help-steps strong { font-size: 13px; }
.help-steps p { font-size: 11px; line-height: 1.8; color: #aec2e4; margin: 5px 0 0; }
.help-modal .primary-button { margin-top: 20px; }
.compact-modal, .gameover-modal { text-align: center; }
.modal-badge { width: 64px; height: 64px; display: grid; place-items: center; background: #b4cfff12; border-radius: 50%; margin: 0 auto 23px; color: #d5e4ff; }
.modal-badge svg { width: 30px; height: 30px; }
.gameover-crown { width: 90px; height: 77px; margin: 0 auto 8px; color: #ffcf64; position: relative; }
.gameover-crown svg { width: 65px; height: 65px; filter: drop-shadow(0 4px 0 #b47d35) drop-shadow(0 0 20px #efbd4930); }
.gameover-crown span { position: absolute; left: -7px; top: 32px; font-size: 16px; }
.gameover-crown span:last-child { left: auto; right: -5px; top: 4px; font-size: 22px; }
.gameover-eyebrow { letter-spacing: 3px; font-size: 10px; font-weight: 800; color: #ffcf73; margin: 2px 0 13px; }
.gameover-modal .modal-subtitle { margin-bottom: 4px; }
.final-score { font-size: 60px; font-weight: 850; letter-spacing: -2px; line-height: 1.4; text-shadow: 0 3px #1b325866; }
.final-best { display: flex; justify-content: center; gap: 7px; align-items: center; color: #ffcf73; font-size: 12px; }
.final-best svg { width: 16px; height: 16px; }
.round-stats { display: grid; grid-template-columns: 1fr 1fr; background: #20396366; border-radius: 13px; padding: 15px; margin-top: 25px; }
.round-stats > div + div { border-left: 1px solid #abc6f41a; }
.round-stats strong { display: block; font-size: 21px; }
.round-stats span { display: block; font-size: 10px; color: #a8bee2; margin-top: 5px; }
body.is-dragging { cursor: grabbing; }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
@keyframes block-place { 0% { transform: scale(.87); filter: brightness(1.4); } 65% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes block-clear { 0% { filter: brightness(1); transform: scale(1); } 30% { filter: brightness(2.3); transform: scale(1.04); } 100% { transform: scale(.3); opacity: 0; } }
@keyframes board-blast { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-2px); } 45% { transform: translateX(2px); } 70% { transform: translateX(-1px); } }
@keyframes score-bump { 40% { transform: scale(1.1); color: #fff0c2; } }
@keyframes piece-appear { from { transform: scale(.65) translateY(8px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
@keyframes celebrate { 0% { opacity: 0; transform: translate(-50%, -25%) scale(.65) rotate(-6deg); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(-5deg); } 30%, 65% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-5deg); } 100% { opacity: 0; transform: translate(-50%, -95%) scale(1.04) rotate(-5deg); } }
@keyframes particle-burst { to { transform: translate(var(--dx), var(--dy)) rotate(var(--spin)); opacity: 0; } }
@keyframes point-float { 0% { opacity: 0; transform: translate(-50%, 0) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -10px) scale(1); } 100% { transform: translate(-50%, -55px); opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(9px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (min-width: 900px) and (min-height: 820px) { .game { transform: translateY(-10px); } }
@media (max-width: 600px) {
  :root { --board-size: min(420px, calc(100vw - 36px), calc(100svh - 480px)); }
  .site-header { padding: max(18px, env(safe-area-inset-top)) 22px 10px; }
  .brand { font-size: 14px; gap: 8px; }
  .brand-mark { grid-template-columns: repeat(2, 8px); }
  .brand-mark i { width: 8px; height: 8px; }
  .header-actions { gap: 4px; }
  .mode-label { font-size: 8px; letter-spacing: 1.4px; margin-right: 3px; }
  .fullscreen-button { display: none; }
  .game { padding-top: 10px; padding-bottom: 0; }
  .score-area { height: 104px; }
  .score { font-size: 62px; }
  .tray { height: 128px; gap: 3px; }
  .piece-slot { height: 112px; }
  .site-footer { justify-content: center; padding: 20px 12px max(18px, env(safe-area-inset-bottom)); }
  .keyboard-hint { display: none; }
  .footer-caption { opacity: .7; font-size: 9px; }
  .outline-piece { display: none; }
  .game-instruction { font-size: 11px; }
}
@media (max-height: 800px), (min-width: 601px) and (max-height: 900px) {
  :root { --board-size: min(420px, calc(100vw - 36px), calc(100svh - 356px)); }
  .site-header { padding-top: 10px; padding-bottom: 4px; }
  .header-actions .icon-button { height: 32px; }
  .game-toolbar { height: 32px; }
  .score-area { height: 74px; }
  .score { font-size: 45px; }
  .score-label { font-size: 8px; }
  .tray { height: 100px; margin-top: 0; }
  .piece-slot { height: 94px; }
  .site-footer { padding-top: 4px; padding-bottom: 5px; }
  .game { padding-top: 0; padding-bottom: 0; }
  .game-instruction { height: 20px; }
  .game-actions { margin-top: 1px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  :root { --board-size: min(290px, calc(100svh - 80px)); }
  .site-header { padding: 10px 20px; }
  .game { display: grid; grid-template-columns: calc(var(--board-size) + 12px) 210px; grid-template-rows: 36px auto 30px; width: max-content; gap: 0 20px; }
  .board-wrap { grid-column: 1; grid-row: 1 / 4; }
  .game-toolbar { grid-column: 2; grid-row: 1; }
  .score-area { grid-column: 2; grid-row: 2; height: 90px; margin-top: 10px; }
  .tray { grid-column: 2; grid-row: 2; align-self: end; height: 115px; gap: 0; }
  .piece-slot { height: 90px; }
  .game-instruction { display: none; }
  .game-actions { grid-column: 2; grid-row: 3; }
  .site-footer { display: none; }
}
