:root {
  color-scheme: dark;
  --bg: #080b15;
  --panel: rgba(17, 22, 39, .82);
  --panel-solid: #111627;
  --line: rgba(136, 160, 197, .16);
  --line-bright: rgba(99, 239, 230, .34);
  --text: #f2f5ff;
  --muted: #8994ad;
  --dim: #59657e;
  --cyan: #58f3e6;
  --cyan-soft: rgba(88, 243, 230, .12);
  --lime: #c5ff65;
  --magenta: #ff5bc8;
  --mono: 'DM Mono', 'SFMono-Regular', Consolas, monospace;
  --jp: 'Noto Sans JP', 'Yu Gothic UI', 'Meiryo', sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh; margin: 0; overflow-x: hidden; color: var(--text); background: var(--bg);
  font-family: 'Inter', var(--jp); font-feature-settings: 'palt'; -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
::selection { color: #081015; background: var(--lime); }

#fxCanvas { position: fixed; z-index: 3; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.scanlines { position: fixed; z-index: 1; inset: 0; pointer-events: none; opacity: .15; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(120, 150, 204, .035) 4px); }
.ambient { position: fixed; z-index: 0; width: 580px; height: 580px; border-radius: 50%; filter: blur(120px); pointer-events: none; opacity: .11; }
.ambient-one { top: -340px; left: 10%; background: #0b72a5; }
.ambient-two { right: -340px; bottom: -220px; background: #812a85; opacity: .08; }
.site-shell { position: relative; z-index: 2; width: min(1360px, calc(100% - 72px)); margin: auto; }

.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(148, 165, 201, .12); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(88, 243, 230, .65); color: var(--cyan); font: 500 20px var(--mono); position: relative; transform: skew(-7deg); box-shadow: inset 0 0 16px rgba(88, 243, 230, .1), 0 0 20px rgba(88, 243, 230, .1); }
.brand-mark span { position: absolute; right: -6px; top: -8px; font-size: 12px; color: var(--lime); }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { font: 500 12px var(--mono); letter-spacing: .17em; }
.brand-copy small { color: var(--muted); font: 9px var(--mono); letter-spacing: .14em; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.live-pill { display: flex; align-items: center; gap: 8px; color: #96a0b7; font: 10px var(--mono); letter-spacing: .05em; margin-right: 16px; }
.live-pill i, .signal-dot, .input-live i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.icon-toggle { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; color: #9ba7bf; background: rgba(17, 22, 39, .52); cursor: pointer; font-size: 10px; transition: border-color .2s, color .2s, background .2s; }
.icon-toggle:hover, .icon-toggle[aria-pressed="true"] { color: var(--cyan); border-color: rgba(88, 243, 230, .5); background: rgba(88, 243, 230, .08); }
.toggle-icon { font-size: 13px; }

.main-content { padding: 31px 0 22px; }
.intro-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; color: var(--cyan); font: 10px var(--mono); letter-spacing: .14em; }
.eyebrow-line { width: 24px; height: 1px; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
h1 { margin: 0; font: 800 clamp(32px, 4vw, 50px)/1.17 var(--jp); letter-spacing: -.07em; }
h1 em { color: var(--lime); font-style: normal; text-shadow: 0 0 24px rgba(197, 255, 101, .2); }
.intro-sub { margin: 10px 0 0; color: #b0b9cb; font-size: 13px; letter-spacing: .015em; }
.intro-sub span { color: #7f8ba3; margin-left: 8px; font-size: 11px; }
.best-chip { min-width: 156px; display: flex; align-items: center; gap: 12px; padding: 11px 15px; border: 1px solid rgba(197, 255, 101, .22); background: linear-gradient(120deg, rgba(197, 255, 101, .08), rgba(197, 255, 101, .015)); }
.best-icon { color: var(--lime); font-size: 14px; text-shadow: 0 0 12px var(--lime); }
.best-chip small { display: block; color: #9ba77f; font: 9px var(--mono); letter-spacing: .08em; margin-bottom: 4px; }
.best-chip strong { font: 500 17px var(--mono); }
.best-chip i { color: #788367; font-size: 9px; font-style: normal; }

.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 18px; }
.play-column { min-width: 0; }
.stats-row { display: grid; grid-template-columns: 1.06fr 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-card { min-height: 93px; padding: 13px 15px 11px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(22, 29, 49, .84), rgba(13, 17, 31, .75)); position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; height: 1px; left: 0; right: 0; top: 0; background: linear-gradient(90deg, transparent, rgba(88, 243, 230, .33), transparent); opacity: .5; }
.stat-head { display: flex; align-items: center; justify-content: space-between; color: #8d99b0; font: 9px var(--mono); letter-spacing: .13em; }
.stat-icon { color: var(--cyan); font-size: 15px; opacity: .85; }
.combo-icon { color: var(--lime); }
.timer-value { margin-top: 3px; font: 500 26px/1.1 var(--mono); letter-spacing: -.05em; }
.timer-value span { margin-left: 3px; color: #76819b; font-size: 12px; }
.timer-track { position: absolute; left: 15px; right: 15px; bottom: 10px; height: 2px; background: rgba(121, 143, 175, .18); }
.timer-track span { display: block; width: 100%; height: 100%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transform-origin: left; transition: transform .2s linear, background .3s; }
.stat-value { margin-top: 5px; font: 500 22px/1.15 var(--mono); letter-spacing: -.04em; }
.stat-unit { color: #8290a8; font-size: 10px; letter-spacing: .04em; }
.stat-caption { margin-top: 5px; color: #69758d; font-size: 9px; letter-spacing: .02em; }
.score-card .stat-value { color: var(--lime); text-shadow: 0 0 15px rgba(197, 255, 101, .16); }

.arena { --arena-glow: rgba(88, 243, 230, .08); position: relative; min-height: 340px; padding: 17px 24px 16px; overflow: hidden; border: 1px solid rgba(101, 136, 178, .22); background: radial-gradient(ellipse at 50% 30%, rgba(32, 67, 85, .21), transparent 55%), linear-gradient(140deg, rgba(15, 22, 39, .94), rgba(10, 14, 27, .96)); box-shadow: 0 16px 55px rgba(0, 0, 0, .22), inset 0 0 50px rgba(19, 42, 65, .15); }
.arena::before, .arena::after { content: ''; position: absolute; z-index: 1; width: 38px; height: 38px; pointer-events: none; }
.arena::before { left: -1px; top: -1px; border-left: 2px solid var(--cyan); border-top: 2px solid var(--cyan); }
.arena::after { right: -1px; bottom: -1px; border-right: 2px solid var(--magenta); border-bottom: 2px solid var(--magenta); }
.arena-grid { position: absolute; inset: 0; pointer-events: none; opacity: .22; background-image: linear-gradient(rgba(103, 150, 184, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(103, 150, 184, .08) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to bottom, black, transparent 90%); }
.arena-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; color: #74839b; font: 9px var(--mono); letter-spacing: .14em; }
.arena-topline > span:first-child { display: flex; align-items: center; gap: 8px; }
.signal-dot { width: 5px; height: 5px; background: var(--cyan); box-shadow: 0 0 9px var(--cyan); }
.target-wrap { position: relative; z-index: 2; padding: 35px 8px 26px; text-align: center; }
.target-kicker { margin: 0 0 14px; color: #6e7b94; font: 9px var(--mono); letter-spacing: .2em; }
.target-word { min-height: 54px; display: flex; align-items: center; justify-content: center; color: #f5f7ff; font: 700 clamp(25px, 3.05vw, 37px)/1.45 var(--jp); letter-spacing: .015em; text-shadow: 0 0 25px rgba(170, 226, 255, .13); transition: transform .15s, filter .2s; }
.target-word.is-complete { color: var(--lime); text-shadow: 0 0 26px rgba(197, 255, 101, .43); }
.reading-row { display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 11px; }
.reading-label { color: #65738b; font: 9px var(--mono); letter-spacing: .1em; }
.reading { color: #8996ac; font: 13px var(--jp); letter-spacing: .13em; }
.reading .read-done { color: var(--cyan); text-shadow: 0 0 9px rgba(88, 243, 230, .5); }
.reading .read-current { color: var(--lime); border-bottom: 1px solid var(--lime); }
.roman-panel { position: relative; z-index: 2; width: min(620px, 100%); min-height: 66px; margin: 0 auto; padding: 11px 16px 12px; border: 1px solid rgba(94, 123, 160, .2); background: rgba(4, 9, 19, .53); text-align: center; }
.roman-head { display: flex; align-items: center; justify-content: center; gap: 12px; color: #78869f; font: 8px var(--mono); letter-spacing: .14em; }
.roman-hint { color: #59667e; font: 9px var(--jp); letter-spacing: 0; }
.roman-text { margin-top: 8px; min-height: 21px; font: 500 14px/1.5 var(--mono); letter-spacing: .16em; overflow-wrap: anywhere; }
.roman-done { color: #516077; }
.roman-next { color: var(--cyan); text-shadow: 0 0 10px rgba(88, 243, 230, .22); }
.roman-next.is-direct { color: var(--lime); }
.progress-line { position: relative; z-index: 2; height: 2px; margin: 18px 0 13px; background: rgba(119, 143, 177, .13); }
.progress-line span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--lime)); box-shadow: 0 0 10px var(--cyan); transition: width .12s linear; }
.input-row { position: relative; z-index: 2; display: flex; align-items: center; gap: 11px; height: 48px; padding: 0 14px; border: 1px solid rgba(99, 131, 166, .27); background: rgba(5, 10, 21, .8); transition: border-color .2s, box-shadow .2s; }
.input-row:focus-within { border-color: rgba(88, 243, 230, .62); box-shadow: 0 0 0 2px rgba(88, 243, 230, .07), 0 0 24px rgba(88, 243, 230, .08); }
.input-prompt { color: var(--lime); font: 500 13px var(--mono); }
#typingInput { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; color: var(--text); background: transparent; font: 14px var(--jp); caret-color: var(--lime); }
#typingInput::placeholder { color: #56627b; font-size: 12px; }
.input-live { display: flex; align-items: center; gap: 7px; color: #5a6c7c; white-space: nowrap; font: 8px var(--mono); letter-spacing: .08em; }
.input-live i { width: 4px; height: 4px; background: #607c79; box-shadow: none; }
.input-row:focus-within .input-live { color: var(--cyan); }
.input-row:focus-within .input-live i { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.arena-bottom { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; margin-top: 11px; color: #66738a; font: 9px var(--jp); }
.keycap { color: #8894a9; font: 9px var(--mono); }
.keycap span { color: #657189; font-family: var(--jp); margin-left: 4px; }
.fever-banner { position: absolute; z-index: 4; top: 12px; left: 50%; padding: 5px 17px; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; border: 1px solid rgba(255, 91, 200, .54); color: #ff9adc; background: rgba(65, 14, 58, .82); box-shadow: 0 0 20px rgba(255, 91, 200, .18); font: 9px var(--mono); letter-spacing: .2em; transition: opacity .3s, transform .3s; }
.fever-banner span { color: var(--lime); margin: 0 5px; }
body.fever .fever-banner { transform: translate(-50%, 0); opacity: 1; }
body.fever .arena { border-color: rgba(255, 91, 200, .56); box-shadow: 0 0 35px rgba(255, 91, 200, .11), inset 0 0 48px rgba(93, 15, 82, .14); }
body.fever .target-word { text-shadow: 0 0 24px rgba(255, 91, 200, .22); }

.control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 0; }
.mode-switch { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); background: rgba(15, 20, 35, .68); }
.mode-button { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 1px solid transparent; color: #8c98ad; background: transparent; cursor: pointer; font: 10px var(--jp); transition: .2s; }
.mode-button:hover { color: var(--text); }
.mode-button.is-selected { color: var(--cyan); border-color: rgba(88, 243, 230, .25); background: rgba(88, 243, 230, .08); }
.mode-glyph { color: var(--lime); font: 10px var(--mono); }
.action-group { display: flex; align-items: center; gap: 8px; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 39px; padding: 0 17px; border-radius: 2px; cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; font: 600 11px var(--jp); }
.primary-button { color: #071014; border: 1px solid var(--lime); background: var(--lime); box-shadow: 0 0 20px rgba(197, 255, 101, .14); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 0 25px rgba(197, 255, 101, .29); background: #d4ff8c; }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.button-arrow { font: 13px var(--mono); }
.secondary-button { color: #b0bdd0; border: 1px solid rgba(116, 139, 172, .28); background: rgba(18, 24, 40, .7); }
.secondary-button:hover:not(:disabled) { color: var(--cyan); border-color: rgba(88, 243, 230, .38); }
.secondary-button:disabled { opacity: .4; cursor: not-allowed; }

.side-column { display: grid; gap: 12px; }
.side-card { padding: 16px 17px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(21, 27, 46, .87), rgba(12, 17, 31, .84)); }
.side-card-head { display: flex; align-items: center; gap: 8px; color: #8290a8; font: 9px var(--mono); letter-spacing: .12em; }
.side-icon { color: var(--lime); font-size: 14px; }
.record-live { margin-left: auto; padding: 3px 5px; color: #75877a; border: 1px solid rgba(197, 255, 101, .15); font-size: 7px; letter-spacing: .08em; }
.side-title { margin: 15px 0 3px; color: #aeb9cb; font: 12px var(--jp); }
.record-score { display: flex; align-items: baseline; gap: 7px; }
.record-score strong { color: var(--lime); font: 500 31px var(--mono); letter-spacing: -.08em; }
.record-score span { color: #7b8967; font: 9px var(--mono); }
.record-divider { height: 1px; margin: 12px 0 10px; background: var(--line); }
.record-line { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; color: #7e8ba1; font-size: 10px; }
.record-line strong { color: #c9d1df; font: 10px var(--mono); }
.record-note { margin: 15px 0 0; color: #59657b; font-size: 9px; }
.tip-card { padding-bottom: 14px; }
.tip-icon { color: var(--cyan); }
.tip-card .side-title { margin: 14px 0 15px; color: #e0e5f0; font-size: 13px; font-weight: 600; }
.tip-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(136, 160, 197, .1); }
.tip-num { padding-top: 2px; color: var(--cyan); font: 9px var(--mono); }
.tip-item b { display: block; color: #aeb8c9; font: 10px var(--jp); font-weight: 500; }
.tip-item small { display: block; margin-top: 4px; color: #69758b; font: 9px var(--jp); }
.side-footer { display: flex; justify-content: space-between; padding: 1px 3px; color: #526078; font: 8px var(--mono); letter-spacing: .07em; }
.footer-mark { color: var(--cyan); }
.page-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 12px; border-top: 1px solid rgba(148, 165, 201, .1); color: #59657b; font: 8px var(--mono); letter-spacing: .08em; }
.page-footer span:last-child { color: #69758a; font-family: var(--jp); letter-spacing: 0; }

.overlay { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; }
.overlay[hidden] { display: none; }
.overlay-backdrop { position: absolute; inset: 0; background: rgba(4, 7, 14, .72); backdrop-filter: blur(8px); }
.dialog-card { position: relative; width: min(460px, 100%); padding: 40px 38px 31px; border: 1px solid rgba(88, 243, 230, .38); background: radial-gradient(ellipse at 50% 0, rgba(47, 90, 106, .24), transparent 65%), #101627; box-shadow: 0 30px 100px rgba(0, 0, 0, .55), 0 0 55px rgba(88, 243, 230, .08); text-align: center; animation: dialog-in .32s cubic-bezier(.2,.8,.2,1) both; }
.dialog-corners i { position: absolute; width: 16px; height: 16px; border-color: var(--lime); border-style: solid; opacity: .8; }
.dialog-corners i:nth-child(1) { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.dialog-corners i:nth-child(2) { right: -1px; top: -1px; border-width: 2px 2px 0 0; }
.dialog-corners i:nth-child(3) { left: -1px; bottom: -1px; border-width: 0 0 2px 2px; }
.dialog-corners i:nth-child(4) { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.dialog-eyebrow { margin: 0 0 12px; color: var(--cyan); font: 9px var(--mono); letter-spacing: .2em; }
.dialog-card h2 { margin: 0; font: 700 28px var(--jp); letter-spacing: -.04em; }
.dialog-description { margin: 12px 0 0; color: #a2aec2; font: 12px/1.8 var(--jp); }
.dialog-actions { display: flex; justify-content: center; gap: 9px; margin-top: 25px; }
.dialog-primary { min-width: 170px; }
.dialog-secondary { min-width: 115px; }
.dialog-footnote { margin: 17px 0 0; color: #64718a; font: 9px var(--jp); }
.dialog-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; }
.dialog-stat { padding: 12px 5px; border: 1px solid rgba(130, 153, 188, .17); background: rgba(4, 9, 19, .5); }
.dialog-stat span { display: block; color: #75829a; font: 8px var(--jp); }
.dialog-stat strong { display: block; margin-top: 7px; color: var(--lime); font: 500 19px var(--mono); }
.dialog-stat strong small { color: #79866a; font-size: 8px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes hit-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.025); filter: brightness(1.7); } 100% { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translate(0,0); } 15% { transform: translate(-3px,1px); } 30% { transform: translate(3px,-2px); } 45% { transform: translate(-2px,2px); } 60% { transform: translate(2px,1px); } 75% { transform: translate(-1px,-1px); } }
.arena.hit-pulse .target-word { animation: hit-pulse .2s ease-out; }
.arena.shake { animation: shake .25s linear; }
.arena.is-paused > :not(.arena-grid) { opacity: .23; }
.arena.is-paused::before { z-index: 2; content: 'PAUSED'; display: grid; place-items: center; top: 50%; left: 50%; width: auto; height: auto; padding: 10px 19px; transform: translate(-50%, -50%); border: 1px solid rgba(88, 243, 230, .6); color: var(--cyan); background: rgba(5, 9, 18, .92); font: 11px var(--mono); letter-spacing: .18em; }
.arena.error { border-color: rgba(255, 91, 140, .68); box-shadow: 0 0 22px rgba(255, 91, 140, .14); }
body.low-effects *, body.low-effects *::before, body.low-effects *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
body.low-effects .scanlines { opacity: .05; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@media (max-width: 1050px) {
  .site-shell { width: min(100% - 42px, 900px); }
  .game-layout { grid-template-columns: minmax(0, 1fr) 245px; gap: 13px; }
  .side-card { padding: 14px; }
  .stats-row { gap: 7px; }
  .stat-card { padding-left: 11px; padding-right: 11px; }
  .timer-track { left: 11px; right: 11px; }
}
@media (max-width: 820px) {
  .site-shell { width: min(100% - 32px, 700px); }
  .game-layout { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; }
  .side-footer { grid-column: 1 / -1; }
  .record-note { margin-top: 12px; }
  .intro-row { margin-bottom: 21px; }
  .best-chip { min-width: 134px; }
}
@media (max-width: 580px) {
  .site-shell { width: calc(100% - 26px); }
  .topbar { height: 68px; }
  .brand-mark { width: 32px; height: 32px; font-size: 17px; }
  .brand-copy strong { font-size: 10px; }
  .brand-copy small { font-size: 7px; }
  .topbar-right { gap: 5px; }
  .live-pill { display: none; }
  .icon-toggle { width: 34px; padding: 0; justify-content: center; }
  .toggle-label { display: none; }
  .main-content { padding-top: 23px; }
  .intro-row { align-items: flex-start; }
  h1 { font-size: clamp(29px, 8.3vw, 40px); }
  .intro-sub { max-width: 270px; font-size: 11px; line-height: 1.8; }
  .intro-sub span { display: block; margin: 0; font-size: 10px; }
  .best-chip { min-width: auto; padding: 8px 9px; gap: 8px; }
  .best-chip small { font-size: 7px; }
  .best-chip strong { font-size: 13px; }
  .best-icon { font-size: 11px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 7px; }
  .stat-card { min-height: 78px; padding: 10px 12px; }
  .stat-head { font-size: 8px; }
  .timer-value { font-size: 23px; }
  .stat-value { font-size: 19px; }
  .stat-caption { font-size: 8px; margin-top: 3px; }
  .timer-track { left: 12px; right: 12px; bottom: 7px; }
  .arena { min-height: 320px; padding: 13px 13px 13px; }
  .target-wrap { padding: 34px 2px 21px; }
  .target-word { min-height: 57px; font-size: clamp(22px, 6vw, 31px); }
  .reading { font-size: 12px; letter-spacing: .08em; }
  .roman-panel { padding: 9px 8px; }
  .roman-head { gap: 8px; font-size: 7px; }
  .roman-hint { font-size: 8px; }
  .roman-text { font-size: 12px; letter-spacing: .1em; }
  .input-row { height: 44px; padding: 0 10px; gap: 8px; }
  #typingInput { font-size: 13px; }
  .input-live { font-size: 7px; }
  .arena-bottom { font-size: 8px; }
  .control-row { align-items: stretch; flex-direction: column; }
  .mode-switch { justify-content: stretch; }
  .mode-button { flex: 1; justify-content: center; font-size: 9px; }
  .action-group { display: grid; grid-template-columns: .85fr 1.15fr; }
  .action-group button { width: 100%; }
  .side-column { grid-template-columns: 1fr; }
  .side-footer { grid-column: auto; }
  .page-footer { margin-top: 17px; font-size: 7px; }
  .page-footer span:last-child { text-align: right; }
  .dialog-card { padding: 34px 22px 25px; }
}
