:root { color-scheme: light; font-family: var(--arcade-font-family); color: #19353a; background: #eef2ed; font-synthesis: none; --teal: #087c77; --orange: #eb8a48; --board-width: clamp(210px, calc((100dvh - 280px) / 2), 300px); }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 5% 25%, #d8ede4, transparent 50%), radial-gradient(ellipse at 95% 75%, #f5e9db, transparent 50%); min-height: 100vh; }
button, select, input { font: inherit; }
button { cursor: pointer; border: 1px solid #c7d3ce; background: #f9fbf8; color: #19353a; border-radius: 9px; padding: 10px 15px; font-weight: 650; transition: background .15s, transform .15s; }
button:hover { background: #e2eee6; }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #e7a56d; outline-offset: 3px; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
.site-bar { height: 54px; padding: 0 max(20px, calc((100vw - 1000px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #f9fbf5d9; border-bottom: 1px solid #d7e0d8; }
.home-link { font-size: 13px; font-weight: 800; letter-spacing: .5px; white-space: nowrap; }
.home-link span { margin-left: 10px; font-weight: 450; color: #6e8179; }
.account { display: flex; align-items: center; gap: 8px; max-width: 230px; font-size: 13px; }
.account > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-avatar { position: relative; display: grid; place-items: center; background: #e1ece3; border-radius: 50%; width: 30px; height: 30px; flex: 0 0 30px; font-weight: 800; }
.account-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.arcade { max-width: 1000px; margin: auto; padding: 22px 28px 18px; }
.game-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 800; margin: 0 0 8px; color: #5b7468; }
.brand-mark { color: var(--teal); font-size: 18px; vertical-align: middle; margin-right: 5px; }
.edition { letter-spacing: 1px; margin-left: 12px; padding-left: 12px; border-left: 1px solid #a9bfb0; }
h1 { font-size: clamp(34px, 4vw, 48px); font-weight: 850; margin: 0; line-height: 1.12; letter-spacing: -1.8px; }
h1 > span:not(.title-dot) { color: var(--teal); }
.title-dot { color: var(--orange); }
.tagline { color: #718378; font-size: 13px; margin: 8px 0 0; }
.heading-actions { display: flex; align-items: center; gap: 22px; }
.arcade-badge { border: 1px solid #a6b9aa; padding: 9px 14px; border-radius: 50%; font-size: 8px; text-align: center; line-height: 1.8; letter-spacing: 1px; transform: rotate(-9deg); }
.arcade-badge strong { font-size: 9px; }
.icon-button { font-size: 12px; background: transparent; padding: 9px 12px; }
.tabs { display: flex; border-bottom: 3px solid #424664; gap: 8px; }
.tabs button { flex: 1; min-width: 0; border: 2px solid #525773; border-bottom: 0; border-radius: 0; padding: 15px 10px; background: #13162b; color: #777e9b; font-size: 13px; line-height: 1.5; font-weight: 700; box-shadow: none; }
.tabs span { color: #cbd0e2; margin-left: 8px; }
.tabs button:hover { background: #343954; border-color: #fff0c9; }
.tabs button:active { transform: translate(2px, 2px); }
.tabs .selected { background: #30334d; border-color: #ffcf5b; color: #ffcf5b; box-shadow: inset 0 3px 0 #ffcf5b; }
.tabs .selected span { color: #ffcf5b; }
.practice-speed { display: flex; justify-content: flex-start; align-items: center; gap: 10px; padding: 8px 2px; color: #48665d; font-size: 12px; font-weight: 650; }
.practice-speed select { padding: 6px 28px 6px 10px; border: 1px solid #b8d0c4; border-radius: 8px; background: #f9fbf8; color: #19353a; }
.notice { background: #fff0d8; border: 1px solid #dfbf84; border-radius: 9px; font-size: 13px; padding: 11px 15px; margin: 14px 0; }
.control-bar { display: flex; align-items: center; gap: 14px; margin: 16px 0; min-height: 39px; }
.control-bar label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 650; }
select { border: 1px solid #c7d4ca; background: #f9fbf6; border-radius: 8px; padding: 9px 25px 9px 10px; color: #234039; font-size: 12px; }
.connection-label { margin-left: auto; font-size: 10px; color: #718578; }
.control-bar button { font-size: 11px; padding: 9px 11px; }
.danger-button { color: #ab563d; }
.cabinet { border-radius: 20px; border: 1px solid #c7d6cb; background: linear-gradient(135deg, #f7faf3, #e0e7dc); box-shadow: 0 15px 45px #2846380d, inset 0 1px #fff; overflow: hidden; }
.cabinet-label { display: flex; justify-content: space-between; padding: 14px 24px 10px; color: #7a8d7d; font-size: 9px; letter-spacing: 1.3px; font-weight: 750; }
.status-light { display: inline-block; background: #2ea99b; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 3px #2ea99b18; margin-right: 6px; }
.arena { display: grid; grid-template-columns: 150px calc(var(--board-width) + 20px) 150px; justify-content: center; gap: 25px; padding: 6px 20px 13px; }
.left-panel, .right-panel { padding-top: 4px; min-width: 0; }
.hud-panel { background: linear-gradient(145deg, #213c41, #142b31); border: 1px solid #314b4f; border-radius: 13px; color: #e7efe7; box-shadow: inset 0 1px #ffffff15, 0 4px 0 #ced7c9; padding: 14px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 750; letter-spacing: 1px; color: #b9d2c6; }
.panel-title > span { color: #577e75; font-size: 9px; }
kbd { font-family: inherit; font-size: 11px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; min-width: 23px; height: 22px; background: #f4f7f0; border: 1px solid #c3d1c4; border-bottom-width: 2px; color: #415d52; font-weight: 650; }
.panel-title kbd { height: 19px; min-width: 19px; background: #2b4549; border-color: #466460; color: #bdd1c7; font-size: 9px; }
.hold-panel canvas, .next-panel canvas { display: block; width: 100%; height: auto; }
.hold-panel p { color: #819d92; font-size: 9px; text-align: center; margin: 0; }
.score-panel { margin-top: 18px; padding: 3px 15px; }
.stat { padding: 12px 0; border-bottom: 1px solid #ffffff0e; }
.stat:last-child { border: none; }
.stat span { display: block; font-size: 8px; letter-spacing: 1.5px; color: #9ebcaf; }
.stat strong { display: block; font-family: var(--arcade-font-family); font-variant-numeric: tabular-nums; font-size: 24px; margin-top: 5px; line-height: 1; font-weight: 700; }
.stat:first-child strong { color: #ffcf7c; font-size: 25px; }
.time-stat strong { font-size: 16px; color: #acc6ba; }
.personal-best { margin-top: 19px; padding: 0 5px; }
.practice-layout .personal-best { display: none; }
.personal-best span { display: block; font-size: 8px; letter-spacing: .9px; color: #718b79; }
.personal-best strong { display: block; margin-top: 4px; font-size: 17px; color: var(--teal); font-variant-numeric: tabular-nums; }
.board-column { min-width: 0; }
.board-frame { position: relative; padding: 9px; border: 1px solid #96aaa0; border-radius: 15px; background: linear-gradient(135deg, #edf3e9, #afbdb4 35%, #dce5da 60%, #93a99e); box-shadow: 0 6px 0 #a9bbb0, 0 12px 20px #1b42371b, inset 0 1px 2px #fff; }
#boardCanvas { display: block; width: var(--board-width); height: calc(var(--board-width) * 2); background: #0b1c24; border: 1px solid #071d23; border-radius: 6px; box-shadow: 0 0 0 2px #0b202c, 0 0 0 3px #597a70; outline: none; touch-action: none; }
#boardCanvas:focus-visible { box-shadow: 0 0 0 2px #15362f, 0 0 0 4px #5eac8f; }
.board-overlay { position: absolute; inset: 10px; border-radius: 6px; background: linear-gradient(#0b1c24dc, #0b1c24eb); color: #edf2df; display: grid; place-items: center; padding: 12px; text-align: center; }
.overlay-eyebrow { font-size: 8px; letter-spacing: 2px; color: #83baa8; }
.overlay-content h2 { font-size: clamp(20px, 2.4vw, 29px); letter-spacing: -.5px; margin: 13px 0; line-height: 1.2; }
.overlay-content p { font-size: 12px; color: #a4bfb3; line-height: 1.7; margin: 0 0 23px; white-space: pre-line; }
.primary { background: linear-gradient(#168f83, #08766f); border: 1px solid #48ae95; color: #fff9e9; box-shadow: 0 4px 0 #034c4b, inset 0 1px #ffffff35; font-weight: 750; padding: 13px 20px; min-width: 140px; }
.primary:hover { background: #17968b; }
.board-foot { display: flex; justify-content: space-between; margin: 13px 3px 0; font-size: 8px; font-weight: 600; color: #708575; gap: 6px; }
.combo-toast { position: absolute; top: 40%; left: 50%; transform: translateX(-50%); font-size: 17px; font-weight: 800; text-align: center; padding: 10px; width: 95%; color: #ffe3a8; text-shadow: 0 2px 7px #000; pointer-events: none; }
.next-panel { padding-bottom: 6px; }
.quick-guide { margin-top: 19px; padding: 0 5px; }
.quick-guide p { font-size: 8px; letter-spacing: .8px; color: #79927e; margin: 0 0 10px; font-weight: 750; }
.quick-guide > div { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; }
.quick-guide > div span { font-size: 10px; margin-left: auto; color: #5f7b69; }
.quick-guide small { display: block; font-size: 9px; line-height: 1.7; color: #8a9c88; margin-top: 10px; }
.cabinet-footer { display: flex; align-items: center; gap: 12px; padding: 13px 24px; border-top: 1px solid #cdd8c9; background: #edf2e7aa; }
.footer-mark { color: #76a192; font-size: 23px; }
.cabinet-footer p { margin: 0; color: #7b8e7c; font-size: 10px; line-height: 1.6; }
.footer-decoration { color: #a0b29b; margin-left: auto; font-size: 9px; white-space: nowrap; letter-spacing: 4px; }
.touch-controls { display: none; justify-content: center; gap: 8px; padding: 4px 12px 14px; touch-action: none; }
.touch-controls button { width: 44px; height: 42px; padding: 0; font-size: 21px; background: #d6e3d4; border-color: #a8beaa; box-shadow: 0 2px #a8beaa; user-select: none; -webkit-user-select: none; touch-action: none; }
.rules { margin-top: 17px; font-size: 11px; color: #708577; }
.rules summary { cursor: pointer; font-weight: 650; }
.rules > div { padding: 4px 12px; line-height: 1.9; max-width: 800px; }
.page-footer { text-align: center; color: #94a393; font-size: 9px; letter-spacing: .6px; margin-top: 22px; }
.top-view { padding: 25px 0 10px; }
.top-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.top-heading h2 { font-size: 25px; letter-spacing: -.7px; margin: 0; }
.period-tabs { display: flex; gap: 6px; }
.period-tabs button { font-size: 11px; }
.period-tabs .selected { background: var(--teal); color: #fff; border-color: var(--teal); }
.own-rank { padding: 15px; border: 1px solid #bdd6c5; background: #e1eee1; color: #44735a; border-radius: 10px; font-size: 13px; margin: 22px 0; }
.ranking-header, .ranking-row { display: grid; grid-template-columns: minmax(0, 1fr) 60px 110px; gap: 14px; align-items: center; }
.ranking-header { font-size: 10px; color: #819783; padding: 0 15px 10px; }
.ranking-header > span:not(:first-child), .ranking-row > span { text-align: right; }
.ranking-row { border: 1px solid #d3e0d2; background: #f9fbf5; border-radius: 10px; margin: 7px 0; padding: 13px 15px; font-size: 13px; }
.ranking-row.own { border-color: #7cb699; background: #ebf6e8; }
.ranking-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rank-number { min-width: 26px; font-size: 13px; font-weight: 800; color: #91a18b; }
.ranking-row:nth-child(-n+3) .rank-number { color: #c2873a; }
.ranking-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.ranking-avatar { position: relative; background: #dde9d9; border-radius: 50%; width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: #507255; font-weight: 750; overflow: hidden; }
.ranking-avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.ranking-score { color: #078072; font-weight: 800; font-variant-numeric: tabular-nums; }
.ranking-lines { color: #82957d; font-size: 11px; }
.top-note, .empty-top { font-size: 12px; line-height: 1.7; color: #8b9b84; text-align: center; padding: 18px 8px; }
.room-panel { padding: 15px; margin-bottom: 16px; border: 1px solid #c7d6cb; border-radius: 12px; background: #f7faf3; }
.room-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.room-actions label { font-size: 12px; }
.room-actions input { width: 115px; padding: 10px; margin-left: 8px; border: 1px solid #c7d4ca; border-radius: 8px; text-transform: uppercase; }
.room-actions .primary { min-width: 0; padding: 10px 15px; }
#roomCode { color: var(--teal); letter-spacing: 2px; }
#roomStatus { margin: 12px 0 0; font-size: 12px; line-height: 1.6; }
.versus-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; --board-width: clamp(210px, calc((100dvh - 350px) / 2), 300px); }
.versus-layout .arena { grid-template-columns: calc(var(--board-width) + 20px); gap: 0; padding-inline: 0; }
.versus-layout .left-panel, .versus-layout .right-panel { display: none; }
.versus-layout .cabinet-label > span + span { display: none; }
.versus-layout .quick-guide { display: none; }
.versus-layout .personal-best { display: none; }
.versus-player { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; padding: 14px; min-width: 0; min-height: 85px; }
.versus-player > div { min-width: 0; flex: 1; }
.versus-player strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.versus-player > div > span { display: block; font-size: 10px; margin-top: 5px; color: #607a70; }
.attack-label { grid-column: 1 / -1; text-align: center; font-size: 10px; color: #ab563d; white-space: nowrap; }
.duel-preview { display: none; }
.versus-layout .duel-preview { display: flex; justify-content: center; gap: 8px; padding: 0 5px 5px; }
.duel-preview > div { width: 42%; max-width: 135px; min-width: 0; text-align: center; }
.duel-preview span { color: #607a70; font-size: 8px; letter-spacing: .5px; }
.duel-preview canvas { display: block; width: 100%; height: auto; }
.opponent-board { width: calc(var(--board-width) + 20px); margin: 6px auto 13px; }
#opponentCanvas { display: block; width: var(--board-width); height: calc(var(--board-width) * 2); border-radius: 6px; background: #0b1c24; }
.opponent-note { text-align: center; font-size: 11px; color: #607a70; line-height: 1.8; margin: 18px 10px; }
@media (max-width: 960px) {
    .versus-layout { grid-template-columns: 1fr 1fr; --board-width: clamp(120px, calc((100vw - 130px) / 2), 240px); }
    .versus-layout .arena { grid-template-columns: calc(var(--board-width) + 20px); gap: 0; padding-inline: 0; }
    .versus-layout .left-panel, .versus-layout .right-panel { display: none; }
    .versus-layout .cabinet-label { padding: 8px 12px; font-size: 8px; letter-spacing: .2px; }
    .versus-layout .cabinet-label > span + span { display: none; }
}
@media (max-width: 600px) {
    .versus-layout { gap: 8px; --board-width: calc((100vw - 68px) / 2); }
    .versus-layout .arena, .opponent-board { width: calc(var(--board-width) + 16px); grid-template-columns: calc(var(--board-width) + 16px); }
    .versus-player { padding: 10px 7px; gap: 6px; grid-template-columns: 24px minmax(0, 1fr); min-height: 90px; }
    .versus-player .ranking-avatar { width: 24px; height: 24px; flex-basis: 24px; }
    .versus-player strong { font-size: 10px; }
    .versus-player > div > span, .attack-label { font-size: 8px; }
    .duel-preview span { font-size: 7px; }
    .room-actions button { font-size: 11px; }
    .room-actions label { font-size: 11px; }
    .versus-layout .touch-controls { flex-wrap: wrap; padding: 8px 4px; gap: 5px; }
    .versus-layout .touch-controls button { width: 35px; }
    .versus-layout .cabinet-footer { display: none; }
    .opponent-note { font-size: 9px; }
}
@media (max-width: 760px) {
    :root { --board-width: clamp(190px, calc((100dvh - 290px) / 2), 260px); }
    .arcade { padding: 17px 18px; }
    .arena { grid-template-columns: 115px calc(var(--board-width) + 20px) 115px; gap: 15px; padding-inline: 10px; }
    .hud-panel { padding: 11px; }
    .score-panel { padding-block: 3px; }
    .stat { padding-block: 10px; }
    .stat strong, .stat:first-child strong { font-size: 21px; }
    .time-stat strong { font-size: 15px; }
    .quick-guide { padding: 0; }
    .quick-guide kbd { font-size: 9px; min-width: 18px; }
    .quick-guide > div span { font-size: 9px; }
    .control-bar { gap: 9px; flex-wrap: wrap; }
    .connection-label { font-size: 9px; }
    .arcade-badge { display: none; }
}
@media (max-width: 600px) {
    :root { --board-width: min(calc(100vw - 193px), 240px); }
    .site-bar { padding-inline: 14px; height: 48px; }
    .home-link { font-size: 11px; }
    .home-link span { display: none; }
    .account { max-width: 160px; font-size: 11px; }
    .arcade { padding: 16px 10px; }
    .game-heading { padding-inline: 5px; margin-bottom: 16px; }
    h1 { font-size: 35px; }
    .eyebrow { font-size: 8px; letter-spacing: 1px; }
    .edition { margin-left: 6px; padding-left: 6px; }
    .tagline { font-size: 11px; }
    .heading-actions button { font-size: 10px; padding: 8px; }
    .tabs { padding-inline: 5px; }
    .tabs button { font-size: 11px; }
    .control-bar { padding: 0 4px; gap: 8px; }
    .control-bar label { font-size: 10px; gap: 5px; }
    select { padding: 8px 16px 8px 7px; font-size: 11px; max-width: 105px; }
    .connection-label { flex: 1 1 100%; order: 4; margin: 1px 0 0; }
    .control-bar button { padding: 8px 9px; font-size: 10px; }
    .cabinet { border-radius: 14px; }
    .cabinet-label { padding: 13px 12px 8px; font-size: 7px; letter-spacing: .7px; }
    .arena { grid-template-columns: 65px calc(var(--board-width) + 16px) 65px; gap: 7px; padding: 5px 4px 12px; }
    .board-frame { padding: 7px; border-radius: 11px; }
    .board-overlay { inset: 8px; padding: 7px; }
    .overlay-content h2 { font-size: 22px; }
    .overlay-content p { font-size: 10px; line-height: 1.7; margin-bottom: 18px; }
    .overlay-eyebrow { font-size: 7px; letter-spacing: 1px; }
    .primary { min-width: 120px; font-size: 12px; padding: 11px 13px; }
    .hud-panel { padding: 9px 5px; border-radius: 8px; }
    .panel-title { font-size: 7px; letter-spacing: .3px; justify-content: center; }
    .panel-title kbd, .panel-title > span, .hold-panel p { display: none; }
    .hold-panel canvas { margin-top: 7px; }
    .score-panel { margin-top: 12px; padding-block: 0; }
    .stat { padding: 11px 2px; }
    .stat span { font-size: 6px; letter-spacing: .5px; }
    .stat strong, .stat:first-child strong { font-size: 13px; }
    .time-stat strong { font-size: 10px; }
    .personal-best { margin-top: 15px; padding: 0 2px; }
    .personal-best span { font-size: 6px; letter-spacing: .1px; line-height: 1.7; }
    .personal-best strong { font-size: 13px; }
    .next-panel canvas { margin-top: 10px; }
    .quick-guide { display: none; }
    .board-foot { font-size: 7px; margin-top: 11px; }
    .touch-controls { display: flex; gap: 7px; }
    .touch-controls button { width: 41px; }
    .cabinet-footer { padding: 11px; gap: 7px; }
    .cabinet-footer p { font-size: 9px; }
    .footer-decoration { display: none; }
    .top-heading { align-items: flex-start; flex-direction: column; }
    .top-heading h2 { font-size: 22px; }
    .ranking-header, .ranking-row { grid-template-columns: minmax(0, 1fr) 35px 75px; gap: 8px; padding-inline: 10px; }
    .ranking-person { gap: 7px; }
    .rank-number { min-width: 20px; font-size: 11px; }
    .ranking-avatar { width: 27px; height: 27px; flex-basis: 27px; font-size: 11px; }
    .ranking-row { font-size: 11px; }
}
@media (pointer: coarse) { .touch-controls { display: flex; } }
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
.arcade { max-width: 1400px; }
.control-bar { flex-wrap: wrap; }
@media (max-width: 999px), (max-height: 599px) {
    .heading-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 58%; }
    .heading-actions .control-bar { order: 1; flex-basis: 100%; min-height: 0; margin: 0; justify-content: flex-end; gap: 6px; }
    .heading-actions .connection-label { flex: 0 1 auto; order: 0; margin: 0; text-align: right; }
}
@media (min-width: 1051px) and (max-width: 1200px) {
    .arcade-game-layout:not(.is-versus) .arena { grid-template-columns: 110px calc(var(--board-width) + 20px) 110px; gap: 16px; padding-inline: 10px; }
    .arcade-game-layout:not(.is-versus) .quick-guide { padding: 0; }
    .arcade-game-layout:not(.is-versus) .quick-guide > div span { font-size: 9px; }
}
@media (min-width: 1000px) and (min-height: 600px) {
    .site-bar { height: 42px; }
    .arcade { height: calc(100dvh - 42px); display: flex; flex-direction: column; padding: 10px 22px 8px; }
    .game-heading { flex-shrink: 0; margin-bottom: 8px; }
    .eyebrow { display: none; }
    h1 { font-size: 32px; }
    .tagline, .arcade-badge { display: none; }
    .tabs { flex-shrink: 0; }
    .tabs button { padding: 6px 10px; font-size: 11px; line-height: 1.3; }
    .arcade-game-layout { flex: 1; }
    #gameView { display: flex; flex-direction: column; min-height: 0; }
    .control-bar { flex-shrink: 0; min-height: 28px; margin: 0; gap: 10px; }
    .control-bar select, .control-bar button { padding-block: 7px; }
    #cabinetLayout { flex: 1; min-height: 300px; }
    .arcade .cabinet { height: 100%; min-height: 0; container-type: size; display: flex; flex-direction: column; --board-width: min(calc((100cqh - 100px) / 2), calc(100cqw - 296px)); }
    .cabinet-label { flex-shrink: 0; padding: 8px 14px 6px; font-size: 8px; }
    .arcade-game-layout:not(.is-versus) .arena { grid-template-columns: 110px calc(var(--board-width) + 20px) 110px; gap: 16px; padding: 4px 12px 8px; }
    .arena { flex: 1; min-height: 0; }
    .hud-panel { padding: 10px; }
    .hold-panel p { display: none; }
    .score-panel { margin-top: 8px; padding: 0 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
    .stat { padding: 8px 0; }
    .stat:first-child, .time-stat { grid-column: 1 / -1; }
    .stat span { font-size: 7px; letter-spacing: .7px; }
    .stat strong { font-size: 18px; margin-top: 3px; }
    .stat:first-child strong { font-size: 21px; }
    .time-stat strong { font-size: 13px; }
    .personal-best { margin-top: 8px; }
    .personal-best span { font-size: 7px; letter-spacing: .3px; }
    .personal-best strong { font-size: 14px; }
    .next-panel canvas { max-width: 80px; margin-inline: auto; }
    .quick-guide { margin-top: 10px; padding: 0; }
    .quick-guide p { margin-bottom: 6px; font-size: 7px; }
    .quick-guide > div { margin-bottom: 4px; }
    .quick-guide > div span { font-size: 9px; }
    .quick-guide kbd { min-width: 19px; height: 18px; font-size: 9px; }
    .quick-guide small { margin-top: 6px; font-size: 8px; }
    .board-foot { margin-top: 7px; }
    .overlay-content h2 { font-size: 22px; margin: 8px 0; }
    .overlay-content p { font-size: 10px; line-height: 1.5; margin-bottom: 14px; }
    .board-overlay .primary { min-width: 0; max-width: 100%; padding: 10px 14px; font-size: 12px; }
    .cabinet-footer { flex-shrink: 0; padding: 5px 14px; }
    .cabinet-footer p { font-size: 9px; }
    .footer-mark, .footer-decoration { display: none; }
    .rules { flex-shrink: 0; margin-top: 7px; font-size: 10px; }
    .rules[open] { max-height: 160px; overflow-y: auto; }
    .page-footer { flex-shrink: 0; margin-top: 7px; font-size: 8px; }
    .room-panel { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; margin-bottom: 8px; }
    .room-actions { gap: 8px; }
    .room-actions button, .room-actions input, .room-actions .primary { padding-block: 7px; }
    #roomStatus { margin: 0; font-size: 10px; }
    #cabinetLayout.versus-layout { min-height: 364px; }
    .arcade .versus-layout .cabinet { display: grid; grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; --board-width: min(calc((100cqh - 124px) / 2), calc(100cqw - 184px)); }
    .versus-layout .cabinet-label { grid-column: 1 / -1; grid-row: 1; }
    .versus-player { grid-column: 1; grid-row: 2; align-self: start; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 12px; min-height: 0; }
    .versus-player > div { width: 100%; }
    .versus-player .ranking-avatar { width: 28px; height: 28px; flex-basis: 28px; }
    .versus-player > div > span { font-size: 9px; margin-top: 3px; }
    .attack-label { font-size: 9px; white-space: normal; text-align: left; }
    .versus-layout .duel-preview { grid-column: 3; grid-row: 2; align-self: start; flex-direction: column; align-items: center; gap: 14px; padding: 12px 5px; }
    .duel-preview > div { max-width: 80px; }
    .versus-layout .duel-preview > div { width: 100%; }
    .versus-layout .arena { grid-column: 2; grid-row: 2; align-self: start; padding-top: 3px; padding-bottom: 6px; }
    .versus-layout .cabinet-footer { grid-column: 1 / -1; grid-row: 3; min-height: 44px; }
    .versus-layout .footer-decoration { display: none; }
    .opponent-board { grid-column: 2; grid-row: 2; align-self: start; margin: 3px auto 6px; }
    .opponent-note { grid-column: 1 / -1; grid-row: 3; min-height: 44px; margin: 0; padding: 6px 10px; border-top: 1px solid #cdd8c9; font-size: 10px; line-height: 1.5; }
}

.ranking-speed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.arcade-ranking .ranking-speed button { padding: 7px 4px; font-size: 12px; font-weight: 700; color: #c9d6cc; }
.arcade-ranking .ranking-speed button.selected { background: var(--ranking-accent); border-color: var(--ranking-accent); color: #172c30; }
