:root {
  --bg: #fff6ec;
  --cream: #fffdf7;
  --panel: #ffffff;
  --border: #f5ddc2;
  --text: #5b4636;
  --muted: #bd9c80;
  --accent: #ff9f43;
  --accent-2: #e17055;
  --field-bg: #2b2126;
  --field-line: rgba(255, 255, 255, 0.07);
  --chip-bg: #3a2c33;
  --chip-border: #5c4650;
  --ok: #4fd08c;
  --bad: #f2695c;
  --warn: #f7c948;
}

* { box-sizing: border-box; }

.ko-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 800px;
  margin: 16px auto 0;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 16px 20px;
  box-shadow: 0 8px 24px rgba(225, 112, 85, 0.18);
}

.ko-bar.hidden { display: none; }

.ko-label {
  font-weight: bold;
  color: var(--accent-2);
  white-space: nowrap;
  font-size: 1.1rem;
}

.ko-next {
  color: var(--accent-2);
  font-weight: bold;
  font-size: 1.7rem;
  white-space: nowrap;
  min-width: 2.2em;
  text-align: center;
}

.ko-input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1.9rem;
  min-height: 60px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  letter-spacing: 0.05em;
}

.ko-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background-color: var(--bg);
  background-image: linear-gradient(rgba(16, 12, 36, 0.8), rgba(16, 12, 36, 0.84)), url('assets/img/field-bg.png');
  background-size: cover;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  line-height: 1.6;
}

.site-header {
  position: relative;
  text-align: center;
  padding: 30px 16px 6px;
}

.lang-select {
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}

.site-header h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--accent-2);
}

.logo {
  display: inline-grid;
  width: 34px;
  height: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M7 6 L6 17 L13 12 Z' fill='%23e17055'/%3E%3Cpath d='M27 6 L28 17 L21 12 Z' fill='%23e17055'/%3E%3Cpath d='M6 19 C6 11 12 5 17 5 C22 5 28 11 28 19 L28 25 C28 28 25 30 22 30 L12 30 C9 30 6 28 6 25 Z' fill='%23ff9f43'/%3E%3Ccircle cx='12' cy='16' r='2.2' fill='%235b4636'/%3E%3Ccircle cx='22' cy='16' r='2.2' fill='%235b4636'/%3E%3Cpath d='M14 21 L17 24 L20 21 Z' fill='%23e17055'/%3E%3Cpath d='M3 19 L8 18 M3 22 L8 21 M26 18 L31 19 M26 21 L31 22' stroke='%235b4636' stroke-width='1' fill='none'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 8px;
  vertical-align: -8px;
}

.site-header .sub {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px clamp(12px, 2.5vw, 40px) 40px;
}

/* プレイ中はメイン画面 + キーボード + ボタンだけを画面内に収める */
body.playing {
  overflow: hidden;
}

body.playing main {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px clamp(12px, 2.5vw, 40px) 10px;
  overflow: hidden;
}

body.playing .site-header,
body.playing .help {
  display: none;
}

body.playing .panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(124, 108, 240, 0.14);
  padding: 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.toolbar .spacer { flex: 1; }

.diff-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.diff-row .stat-label {
  font-size: 0.82rem;
  font-weight: bold;
}

.diff-row .mode-switch .mode-btn {
  padding: 5px 12px;
}

.diff-row .mode-switch .mode-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.panel {
  position: relative;
}

/* パネル上部の猫耳 */
.panel::before,
.panel::after {
  content: '';
  position: absolute;
  top: -28px;
  width: 54px;
  height: 44px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 44'%3E%3Cpath d='M27 2 L50 38 Q27 43 4 38 Z' fill='%23ff9f43'/%3E%3Cpath d='M27 13 L40 34 Q27 37 14 34 Z' fill='%23ffc8a3'/%3E%3C/svg%3E") no-repeat center/contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.08));
  z-index: -1;
}

.panel::before { left: 18px; transform: rotate(-4deg); }
.panel::after { right: 18px; transform: rotate(4deg) scaleX(-1); }

button {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.06s ease, background 0.15s ease, box-shadow 0.15s ease;
}

button:hover:not(:disabled) { background: #fff0e0; }
button:active:not(:disabled) { transform: scale(0.96); }
button:disabled { opacity: 0.45; cursor: default; }

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(225, 112, 85, 0.35);
  font-weight: bold;
  padding: 12px 28px;
}

button.primary:hover { filter: brightness(1.06); }

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  background: #fdeeda;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.mode-switch .mode-btn {
  white-space: nowrap;
}

.mode-switch .mode-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 10px;
}

.mode-switch .mode-btn.active {
  background: #fff;
  color: var(--accent-2);
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(225, 112, 85, 0.25);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.stat-block {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 14px;
  min-width: 86px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
}

.stat-block b {
  display: block;
  font-size: 1.15rem;
  color: var(--accent-2);
}

#lives {
  color: #f2695c;
  letter-spacing: 3px;
  font-size: 1.25rem;
}

.combo {
  background: linear-gradient(135deg, #f7c948, #f59a4a);
  color: #6b4300;
  font-weight: bold;
  border-radius: 14px;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(247, 201, 72, 0.45);
  animation: pop 0.25s ease;
}

.combo.hidden { display: none; }

@keyframes pop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.field {
  position: relative;
  height: clamp(380px, 58vh, 72vh);
  background-color: var(--field-bg);
  background-image: linear-gradient(var(--field-line) 1px, transparent 1px);
  background-size: 100% 44px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
  touch-action: none;
}

body.playing .field {
  flex: 1;
  min-height: 0;
  height: auto;
}

.field.shake { animation: shake 0.14s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.fx-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 2.3rem;
  pointer-events: none;
  z-index: 30;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  animation: fxRise 0.9s ease-out forwards;
}
.fx-big { font-size: 3.2rem; }
.fx-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 2.3rem;
  pointer-events: none;
  z-index: 30;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
  animation: fxRise 0.9s ease-out forwards;
}
.fx-big { font-size: 3.2rem; }
@keyframes fxRise {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  15% { opacity: 1; transform: translate(-50%, -60%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -170%) scale(1); }
}

.danger-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 82%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--bad) 0 12px, transparent 12px 24px);
  opacity: 0.55;
  pointer-events: none;
}

.ime-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(242, 105, 92, 0.95);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: bold;
  z-index: 8;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.ime-hint.hidden { display: none; }

.chip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 14px;
  padding: 6px 12px;
  text-align: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  max-width: min(94%, 560px);
  will-change: transform;
  user-select: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.chip .word {
  display: block;
  font-size: clamp(2.6rem, 2.3rem + 1.5vw, 5rem); /* 単語は約3倍 */
  font-weight: bold;
  letter-spacing: 0.08em;
  max-width: 100%;
  overflow-wrap: anywhere; /* 英語の文章は全部見えるように折り返す */
}

.chip.sentence .word {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.8rem);
}

.chip .furigana {
  display: block;
  font-size: clamp(0.7rem, 0.62rem + 0.35vw, 1.05rem);
  color: #d9b39a;
  letter-spacing: 0.06em;
}

.chip .romaji {
  display: block;
  font-size: clamp(0.8rem, 0.7rem + 0.4vw, 1.2rem);
  letter-spacing: 0.06em;
  color: #aeb6d8;
  min-height: 1em;
}

.chip .romaji .done { color: var(--ok); }
.chip .romaji .next { color: var(--warn); font-weight: bold; }

.chip.active {
  border-color: var(--warn);
  box-shadow: 0 0 0 2px rgba(247, 201, 72, 0.65), 0 6px 18px rgba(0, 0, 0, 0.45);
}

.chip.poof {
  animation: poof 0.28s ease forwards;
  pointer-events: none;
}

.chip.explode {
  animation: explode 0.5s ease-out forwards;
  pointer-events: none;
}

@keyframes explode {
  0% { transform: translate(-50%, -50%) scale(1); }
  35% { transform: translate(-50%, -50%) scale(1.7); }
  100% { transform: translate(-50%, -50%) scale(0.15); opacity: 0; }
}

.particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c, #ff9f43);
  pointer-events: none;
  animation: particle-fly 0.55s ease-out forwards;
}

@keyframes particle-fly {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3);
    opacity: 0;
  }
}

@keyframes poof {
  to {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0;
  }
}

.chip.fall {
  animation: fallaway 0.45s ease forwards;
  pointer-events: none;
}

@keyframes fallaway {
  to {
    transform: translate(-50%, -50%) translateY(24px) scale(0.85);
    opacity: 0;
    filter: grayscale(1);
  }
}

.now-typing {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  background: rgba(10, 12, 24, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 40px;
  pointer-events: none;
  z-index: 5;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.now-kana {
  font-size: clamp(1.8rem, 1.6rem + 0.8vw, 3rem);
  font-weight: bold;
  color: #fff;
  min-width: 64px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.now-romaji {
  font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.5rem);
  letter-spacing: 0.1em;
  color: #dbe1f5;
  word-break: break-all;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.now-romaji .done { color: var(--ok); }
.now-romaji .next { color: var(--warn); font-weight: bold; text-decoration: underline; }
.now-romaji .pending { color: #6f779c; }

/* 文章モードのスペース: 下線で位置を表示 */
.now-romaji .sp,
.chip .romaji .sp {
  display: inline-block;
  width: 0.42em;
}

.now-romaji .sp.pending,
.chip .romaji .sp.pending {
  border-bottom: 1px dotted #6f779c;
}

.now-romaji .sp.next,
.chip .romaji .sp.next {
  border-bottom: 2px solid var(--warn);
}

.now-romaji .sp.done,
.chip .romaji .sp.done {
  border-bottom: 2px solid var(--ok);
}

.last-key {
  margin-left: auto;
  font-size: clamp(1.8rem, 1.6rem + 0.8vw, 3rem);
  color: var(--muted);
  letter-spacing: 0.12em;
  min-width: 1.8em;
  text-align: right;
  font-family: "SFMono-Regular", Consolas, "Noto Sans Mono CJK JP", monospace;
}

/* 韓国語モード: 入力途中の音節表示 (タッチ端末用) */
.ko-pend-view {
  margin-left: auto;
  font-size: clamp(1.8rem, 1.6rem + 0.8vw, 3rem);
  font-weight: bold;
  color: var(--accent-2);
  min-width: 1.8em;
  text-align: center;
  letter-spacing: 0.04em;
}

/* キーボード表示 */
.keyboard {
  display: none; /* プレイ中のみ表示 */
  max-width: none;
  width: 100%;
  margin: 14px auto 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

body.playing .keyboard {
  display: block;
  margin-top: 0;
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

.kb-key {
  flex: 1;
  max-width: none;
  height: clamp(64px, 8.5vh, 110px);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom: 3px solid #e3c7a9;
  border-radius: 8px;
  font-weight: bold;
  font-size: clamp(1.6rem, 1.4rem + 1vw, 3.2rem);
  color: var(--text);
  transition: background 0.08s, box-shadow 0.08s, transform 0.08s, border-color 0.08s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.kb-sub {
  position: absolute;
  top: 2px;
  right: 5px;
  font-size: 0.5em;
  color: var(--muted);
  font-weight: normal;
}

.kb-key.lit,
.kb-key.pressed {
  background: var(--accent);
  color: #fff;
  border-bottom-color: var(--accent-2);
  box-shadow: 0 0 16px rgba(255, 159, 67, 0.9);
  transform: translateY(2px);
}

.kb-space {
  flex: 8;
  max-width: none;
  font-size: clamp(0.9rem, 0.8rem + 0.4vw, 1.4rem);
  color: var(--muted);
}

.kb-shift,
.kb-back {
  flex: 2;
  font-size: clamp(1rem, 0.9rem + 0.6vw, 1.8rem);
  color: var(--muted);
}

/* シフト/バックスペースは韓国語モードのときだけ表示 */
.keyboard:not(.ko) .kb-shift,
.keyboard:not(.ko) .kb-back {
  display: none;
}

.kb-shift.shift-on {
  background: var(--accent);
  color: #fff;
  border-bottom-color: var(--accent-2);
  box-shadow: 0 0 12px rgba(255, 159, 67, 0.7);
}

.last-key.bad { color: var(--bad); font-weight: bold; }

.overlay {
  position: fixed; /* 全画面 */
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 23, 42, 0.72);
  border-radius: 0;
  z-index: 10;
  padding: 16px;
}
/* タイトル画面は全画面のグラデーション背景 */
.overlay.title-mode {
  background:
    linear-gradient(160deg, rgba(27,16,53,.42) 0%, rgba(42,26,94,.48) 55%, rgba(16,24,40,.58) 100%),
    url('assets/img/title-bg.png') center/cover no-repeat,
    #1b1035;
}
.overlay.title-mode .overlay-box {
  max-width: 640px;
  padding: 34px 36px;
}

.overlay.hidden { display: none; }

.overlay-box {
  background: var(--panel);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  padding: 24px 28px;
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.menu-sections {
  margin: 0 0 18px;
}

.menu-sections.hidden { display: none; }

.menu-sections .menu-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: bold;
  margin: 12px 0 6px;
}

.menu-sections .mode-switch {
  justify-content: center;
}

.overlay-box h2 {
  margin: 0 0 4px;
  color: var(--accent-2);
  font-size: 2rem;
}
.overlay-logo { font-size: 2.4rem; line-height: 1.2; margin-bottom: 2px; }
.overlay-sub { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; }
.overlay-best {
  display: inline-block;
  margin: 0 auto 12px;
  padding: 4px 16px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
}

.overlay-box p {
  margin: 0 0 18px;
  color: var(--muted);
  white-space: pre-line;
}

.overlay-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.overlay-box .result-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.overlay-box .result-stats .stat-block { min-width: 92px; }

.help {
  margin: 14px 4px 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 560px), (max-height: 500px) {
  html, body { height: 100%; }

  body.playing {
    overscroll-behavior: none;
  }

  a[href="https://ai.noela.moe/"] {
    top: 6px;
    left: 6px;
    font-size: 0.68rem;
    padding: 3px 9px;
  }

  .lang-select {
    top: 6px;
    right: 8px;
    padding: 4px 8px;
    font-size: 0.72rem;
    border-radius: 8px;
  }

  body.playing main {
    padding: 8px;
    gap: 6px;
  }

  .panel { padding: 10px; border-radius: 16px; }
  .toolbar { margin-bottom: 6px; gap: 6px; }
  .toolbar button { padding: 5px 8px; font-size: 0.76rem; border-radius: 10px; }

  .stats { margin-bottom: 6px; gap: 4px; }
  .stat-block {
    min-width: 0;
    flex: 1;
    padding: 4px 4px;
    border-radius: 10px;
  }
  .stat-label { font-size: 0.58rem; }
  .stat-block b { font-size: 0.9rem; }
  #lives { font-size: 1rem; letter-spacing: 1px; }
  .combo { padding: 5px 8px; font-size: 0.8rem; }

  .field { height: clamp(300px, calc(100vh - 300px), 78vh); border-radius: 14px; }
  body.playing .field { height: auto; flex: 1; min-height: 0; }

  .now-typing { padding: 5px 10px; gap: 8px; min-height: 40px; }
  .now-kana { min-width: 48px; font-size: clamp(1.5rem, 1.4rem + 1vw, 2.2rem); }
  .now-romaji { font-size: 0.85rem; }
  .last-key { display: none; }
  .ko-pend-view { font-size: clamp(1.5rem, 1.4rem + 1vw, 2.2rem); min-width: 1.5em; }

  .chip { padding: 4px 8px; }
  .chip .word { font-size: clamp(1.7rem, 1.4rem + 2.5vw, 3rem); }
  .chip.sentence .word { font-size: clamp(0.9rem, 0.85rem + 1vw, 1.25rem); }
  .chip .furigana { font-size: 0.65rem; }
  .chip .romaji { font-size: 0.78rem; }

  .kb-row { gap: 3px; margin-bottom: 3px; }
  .kb-key {
    height: clamp(38px, 7.5dvh, 50px);
    font-size: clamp(1rem, 0.95rem + 1vw, 1.35rem);
    border-radius: 6px;
    border-bottom-width: 2px;
  }
  .kb-sub { font-size: 0.45em; top: 1px; right: 3px; }
  .kb-space { font-size: 0.75rem; }
  .kb-shift, .kb-back { font-size: 0.95rem; }

  /* タイトル/一時停止オーバーレイも1画面に収める */

  .overlay-box {
    max-height: 92dvh;
    overflow-y: auto;
    padding: 16px 10px;
    border-radius: 16px;
  }
  .menu-sections .mode-switch .mode-btn { padding: 4px 8px; font-size: 0.8rem; }

  .ko-bar { margin-top: 8px; padding: 10px 12px; gap: 8px; }
  .ko-input { font-size: 1.5rem; padding: 12px 14px; min-height: 52px; }
  .ko-label { font-size: 0.9rem; }
  .ko-next { font-size: 1.4rem; }
}

/* 高さが低いスマホ(横持ちなど): 統計をさらに小型化して盤面を優先 */
@media (max-height: 500px) {
  body.playing main { padding: 5px; gap: 4px; }
  .panel { padding: 6px; }
  .toolbar { margin-bottom: 3px; }
  .toolbar button { padding: 3px 6px; font-size: 0.68rem; }
  .stats { margin-bottom: 3px; gap: 3px; }
  .stat-block { padding: 2px 3px; }
  .stat-label { font-size: 0.52rem; }
  .stat-block b { font-size: 0.78rem; }
  .kb-key { height: 34px; font-size: 0.95rem; }
  .kb-row { gap: 2px; margin-bottom: 2px; }
  .now-typing { min-height: 34px; }
  .now-kana { font-size: 1.3rem; }
  .now-romaji { font-size: 0.78rem; }
  .combo { display: none; }
}
