﻿﻿:root {
  color-scheme: light;
  --ink: #253044;
  --muted: #68758b;
  --line: #dbe5ed;
  --accent: #1c92a9;
  --accent-dark: #126b7d;
  --glow: #40e6ff;
  --back: #eef7f8;
  font-family: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, #dff4f6 0, transparent 34rem),
    linear-gradient(145deg, #f8fbfc, var(--back));
}
button,
input {
  font: inherit;
}
.app {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  padding: 26px 0 20px;
}
.app__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.app__eyebrow {
  margin: 0 0 4px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
h1 {
  margin: 0;
  color: #126b7d;
  font-size: clamp(1.35rem, 3vw, 2rem);
}
.title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}
.is-challenge h1 { color: #c35d0b; }
.status {
  display: flex;
  gap: 8px;
  margin: 0;
}
.status__item {
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffffe0;
  text-align: center;
  box-shadow: 0 5px 18px #29535e0f;
}
.status dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}
.status dd {
  margin: 2px 0 0;
  color: var(--accent-dark);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1;
}
.status small {
  font-size: 0.72rem;
}
.play-area {
  position: relative;
  height: clamp(420px, 48vh, 480px);
  overflow: hidden;
  border: 3px solid #b9dbe0;
  border-radius: 22px;
  background:
    linear-gradient(#ffffffb8, #ffffffe8),
    repeating-linear-gradient(90deg, transparent 0 79px, #d9eef0 80px);
  box-shadow: 0 18px 45px #254c581f;
}
.falling-key,
.effect-key,
.challenge-key {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  width: 1.25em;
  color: var(--accent-dark);
  font:
    900 clamp(4rem, 10vw, 6.5rem) / 1 Arial,
    sans-serif;
  text-align: center;
  text-shadow: 0 5px 0 #d4edf0;
  will-change: transform, opacity;
}
.challenge-keys {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}
.challenge-key {
  will-change: transform, opacity;
}
.challenge-key.is-hit {
  animation: challenge-key-hit 0.2s ease-out forwards;
}
.combo-display {
  position: absolute;
  z-index: 7;
  top: 16px;
  right: 18px;
  min-width: 150px;
  padding: 9px 14px;
  border: 2px solid #ffbf47;
  border-radius: 14px;
  color: #813b00;
  background: #fff8dced;
  text-align: center;
  box-shadow: 0 7px 24px #dc750035;
  pointer-events: none;
}
.combo-display strong,
.combo-display small { display: block; }
.combo-display strong { font: 900 1.45rem/1 Arial, sans-serif; }
.combo-display small { margin-top: 4px; font-weight: 800; }
.combo-display.is-milestone { animation: combo-milestone .48s ease-out; }
.combo-flash {
  position: absolute;
  z-index: 6;
  inset: 0;
  background: #ef334433;
  opacity: 0;
  pointer-events: none;
}
.combo-flash.is-active { animation: combo-break .25s ease-out; }
.effect-key.is-hit {
  animation: effect-key-hit 0.18s ease-out forwards;
}
.effect-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.panel {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100% - 32px));
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffffff5;
  text-align: center;
  box-shadow: 0 20px 50px #254c5826;
  transform: translate(-50%, -50%);
}
.start-panel {
  padding-block: 16px;
}
.start-panel .mode-selector {
  gap: 6px 8px;
  margin-top: 8px;
}
.start-panel .mode-option > span {
  min-height: 54px;
  padding-block: 6px;
}
.start-panel .mode-divider {
  margin-block: 2px 0;
}
.start-panel .challenge-controls {
  margin-top: 8px;
}
.start-panel .panel__main {
  margin: 0;
}
.start-panel .sound-setting {
  margin: 0;
}
.panel__label,
.panel__sub {
  margin: 0;
  color: var(--muted);
}
.panel__main {
  margin: 14px 0 9px;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 800;
}
kbd {
  display: inline-block;
  padding: 0.28em 0.65em;
  border: 1px solid #9eb8bf;
  border-bottom-width: 4px;
  border-radius: 8px;
  color: var(--accent-dark);
  background: #f8ffff;
  font: inherit;
}
.mode-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
.mode-option {
  cursor: pointer;
}
.mode-option--numpad {
  grid-column: 2/4;
}
.mode-option--japanese {
  grid-column: 1/3;
}
.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mode-option > span {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 62px;
  padding: 8px 5px;
  border: 2px solid #c7dade;
  border-radius: 12px;
  color: #40576a;
  background: #f7fbfc;
  font-weight: 800;
  transition: 0.15s;
}
.mode-option > span > strong { font: inherit; }
.start-panel [data-typing-mode-label] {
  font-size: clamp(.72rem, 1.45vw, .9rem);
  line-height: 1.25;
}
.mode-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font:
    600 0.62rem Arial,
    sans-serif;
}
.mode-option input:checked + span {
  color: #07404c;
  border-color: #29c5db;
  background: #d8fbff;
  box-shadow:
    0 0 0 3px #40e6ff2e,
    0 7px 18px #1c92a91f;
}
.mode-option input:checked + span::before {
  content: "✓";
  position: absolute;
  top: 3px;
  left: 7px;
  color: #08798d;
  font-size: 1rem;
  line-height: 1;
}
.mode-divider {
  grid-column: 1/-1;
  height: 1px;
  margin: 5px 0 1px;
  background: linear-gradient(90deg, transparent, #aacbd1 12%, #aacbd1 88%, transparent);
}
.challenge-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}
.challenge-toggle {
  padding: 8px 15px;
  border: 2px solid #b7c8ce;
  border-radius: 999px;
  color: #526477;
  background: #f7fbfc;
  font-weight: 800;
  cursor: pointer;
}
.challenge-toggle.is-on {
  color: #6a2500;
  border-color: #ff9c3d;
  background: #fff0d9;
  box-shadow: 0 0 0 3px #ffae4933;
}
.level-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #813b00;
  font-weight: 800;
}
.level-control input { width: min(180px, 24vw); accent-color: #f08022; }
.selection-warning {
  margin: 9px 0 -5px;
  color: #b32635;
  font-weight: 800;
}

.materials-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  color: #385f7b;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.materials-status.is-ready {
  color: #22714b;
}

.materials-status.is-error {
  color: #b93434;
}
.start-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 30px);
  margin: 10px 0 7px;
}
.placement-line {
  position: fixed;
  z-index: 18;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.placement-line.is-visible { opacity: 1; }
.placement-line line {
  stroke: #55becb;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
  filter: drop-shadow(0 0 4px #71eafa);
}
.is-challenge .mode-option input:checked + span {
  color: #672d00;
  border-color: #ff9c3d;
  background: #fff0d9;
  box-shadow: 0 0 0 3px #ffae4933, 0 7px 18px #d66e161f;
}
.is-challenge .mode-option input:checked + span::before { color: #c35d0b; }
.sound-setting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--muted);
  font-weight: 700;
}
.sound-setting small {
  font-weight: 500;
}
.sound-toggle {
  min-width: 54px;
  padding: 4px 10px;
  border: 1px solid #75bdc9;
  border-radius: 99px;
  color: #07404c;
  background: #d8fbff;
  font-weight: 800;
  cursor: pointer;
}
.sound-toggle[aria-pressed="false"] {
  color: #68758b;
  border-color: #becbd0;
  background: #edf1f2;
}
.countdown {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  background: #ffffffd6;
  font:
    900 clamp(6rem, 22vw, 13rem) / 1 Arial,
    sans-serif;
  text-shadow: 0 8px 0 #d4edf0;
}
.exit-panel h2,
.result h2 {
  margin: 8px 0 20px;
}
.exit-panel__buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.result__scores {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 10px;
}
.dialog-button,
.change-mode {
  padding: 10px 18px;
  border: 1px solid #9eb8bf;
  border-radius: 99px;
  color: var(--accent-dark);
  background: #f6fcfd;
  font-weight: 800;
  cursor: pointer;
}
.dialog-button--danger {
  color: #9b2833;
  border-color: #dfaab0;
  background: #fff1f2;
}
.result__scores {
  margin-bottom: 18px;
}
.result__scores p {
  flex: 0 1 150px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  color: var(--muted);
  background: #edf8f9;
  font-size: 0.82rem;
  font-weight: 700;
}
.result__scores strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-dark);
  font-size: 2.2rem;
}
.result__scores small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}
#final-speed {
  white-space: nowrap;
  font-size: 1.45rem;
}
.result-retry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.result-retry .panel__sub {
  margin: 0;
}
.result-retry .change-mode {
  flex: 0 0 auto;
  padding: 7px 14px;
}
.guide {
  margin-top: 12px;
  padding: 12px 14px 9px;
  border: 1px solid #cfe2e6;
  border-radius: 18px;
  background: #ffffffe0;
  box-shadow: 0 10px 30px #254c5814;
}
.guide__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  margin-bottom: 9px;
}
.guide__title {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.exit-hint {
  position: absolute;
  right: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.exit-hint kbd {
  padding: 0.12em 0.45em;
  border-bottom-width: 2px;
}
.keyboard-viewport {
  overflow-x: auto;
  padding: 4px 3px 7px;
}
.screen-keyboard {
  --key-width: clamp(43px, 6.3vw, 68px);
  width: calc(var(--key-width) * 10 + 63px);
  min-width: 493px;
  margin: auto;
}
.keyboard-row {
  display: grid;
  grid-template-columns: repeat(10, var(--key-width));
  gap: 7px;
  width: max-content;
  margin-bottom: 6px;
  transition: 0.18s;
}
.keyboard-row[data-row="top"] {
  margin-left: 15px;
}
.keyboard-row[data-row="home"] {
  margin-left: 29px;
}
.keyboard-row[data-row="bottom"] {
  margin-left: 43px;
}
.keyboard-row.is-inactive-row {
  opacity: 0.48;
  filter: saturate(0.65);
}
.keycap,
.numpad-key {
  position: relative;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 1px solid #a9c0c6;
  border-bottom: 5px solid #819ba2;
  border-radius: 9px;
  color: #33475b;
  background: linear-gradient(#fff, #eaf1f3);
  font:
    800 clamp(0.95rem, 2vw, 1.28rem) / 1 Arial,
    sans-serif;
  box-shadow: 0 3px 6px #254c581f;
  transition: 0.08s;
}
.keycap:before,
.numpad-key:before {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: -1;
  border-radius: 7px;
  opacity: 0.28;
}
.keycap[data-zone*="little"]:before,
.numpad-key[data-finger="little"]:before {
  background: #f6acc1;
}
.keycap[data-zone*="ring"]:before,
.numpad-key[data-finger="ring"]:before {
  background: #efc57f;
}
.keycap[data-zone*="middle"]:before,
.numpad-key[data-finger="middle"]:before {
  background: #d9dc75;
}
.keycap[data-zone*="index"]:before,
.numpad-key[data-finger="index"]:before {
  background: #8edcc4;
}
.numpad-key[data-finger="thumb"]:before {
  background: #b6c8ef;
}
.keycap[data-bump="true"]:after,
.numpad-key[data-bump="true"]:after {
  content: "";
  position: absolute;
  left: 33%;
  right: 33%;
  bottom: 7px;
  height: 3px;
  border-radius: 2px;
  background: #718c94;
}
.is-zone-target {
  opacity: 1 !important;
  border-color: #68cbd8 !important;
  background: #e5fbfd !important;
  box-shadow: 0 0 10px #40e6ff4d !important;
}
.is-target {
  z-index: 2;
  color: #073e4b !important;
  background: #bdf8ff !important;
  box-shadow:
    0 0 0 2px #5edbec,
    0 0 18px #40e6ffd9 !important;
  transform: translateY(-1px);
}
.is-correct {
  color: #fff !important;
  background: #23cde6 !important;
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 0 0 3px #fff,
    0 0 30px var(--glow) !important;
}
.is-wrong {
  z-index: 3;
  color: #fff !important;
  background: #ef5360 !important;
  border-color: #b32635 !important;
  box-shadow: 0 0 18px #ef3243d9 !important;
  animation: wrong-shake 0.24s linear;
}
.hands {
  display: flex;
  justify-content: center;
  gap: clamp(34px, 11vw, 130px);
  margin: 7px auto 0;
}
.hand {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 5px 13px 0;
  border-bottom: 7px solid #b8c9ce;
  border-radius: 0 0 24px 24px;
}
.finger,
.numpad-finger {
  display: grid;
  place-items: start center;
  width: clamp(22px, 4vw, 34px);
  height: var(--finger-height);
  padding-top: 6px;
  border: 2px solid #a9bcc2;
  border-radius: 15px 15px 8px 8px;
  color: #60727a;
  background: linear-gradient(#edf5f6, #dce9eb);
  font-size: clamp(0.56rem, 1.4vw, 0.68rem);
  font-weight: 800;
  transition: 0.1s;
}
.finger.is-target,
.numpad-finger.is-target {
  transform: translateY(-4px);
}
.numpad-question {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 30px;
}
.current-question {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  min-height: 1.2em;
  color: #33475b;
  font:
    900 clamp(3.1rem, 9vw, 6rem) / 1 Arial,
    sans-serif;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 0 #e3eff1;
}
.current-question span {
  transition: 0.08s;
}
.current-question span.is-entered {
  color: #1cb9cf;
  text-shadow: 0 0 14px #40e6ff99;
}
.current-question span.is-current {
  text-decoration: underline;
  text-decoration-color: #ef9f24;
  text-underline-offset: 8px;
}
.current-question .comma {
  margin-right: 0.05em;
  color: #738595;
  font-style: normal;
}
.question-enter {
  margin-left: 0.35em;
  font-size: 0.27em;
  letter-spacing: 0;
  text-shadow: none;
}
.question-enter.is-ready {
  color: #073e4b;
  border-color: #29c5db;
  background: #bdf8ff;
  box-shadow: 0 0 18px #40e6ffd9;
}
.next-question {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 10px 20px;
  border: 1px solid #b9dbe0;
  border-radius: 13px;
  background: #edf8f9d9;
  color: var(--muted);
}
.next-question span {
  font-size: 0.8rem;
  font-weight: 800;
}
.next-question strong {
  color: #40576a;
  font:
    800 clamp(1.3rem, 4vw, 2rem) / 1 Arial,
    sans-serif;
  letter-spacing: 0.05em;
}
.comma-note {
  z-index: 4;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}
.current-question.is-promoting {
  animation: promote 0.3s ease-out;
}
.question-shatter {
  position: absolute;
  z-index: 6;
  top: 39%;
  animation: shatter 0.28s ease-out forwards;
  pointer-events: none;
}
.numpad-guide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(34px, 8vw, 100px);
  padding: 4px 0 10px;
}
.screen-numpad {
  display: grid;
  grid-template-columns: repeat(3, 62px);
  grid-template-rows: repeat(4, 52px);
  gap: 7px;
}
.numpad-key {
  font-size: 1.1rem;
}
.numpad-key[data-numpad-key="0"] {
  grid-column: 1/3;
}
.numpad-key[data-numpad-key="."] {
  grid-column: 3;
  opacity: 0.32;
  filter: grayscale(1);
}
.numpad-key[data-numpad-key="Enter"] {
  grid-column: 1/4;
}

/* Ver.0.9：成績・ランキング・分析・CSV管理 */
.brand-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-line .app__eyebrow { margin: 0; }
.app-version { margin: 0; padding-left: 10px; border-left: 1px solid #9fc5cc; color: #496a73; font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.record-links { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }
.record-links button, .result-actions button { padding: 5px 11px; border: 1px solid #9ecbd2; border-radius: 99px; color: #176273; background: #effcfe; font-size: .72rem; font-weight: 800; cursor: pointer; }
.is-challenge .record-links button, .is-challenge .result-actions button { border-color: #e8b783; color: #9b4d0a; background: #fff6ed; }
.result { width: min(940px, calc(100% - 28px)); max-height: calc(100% - 20px); overflow: auto; }
.result-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; width: min(900px, 100%); margin: 0 auto 12px; }
.result-card { padding: 10px; border: 1px solid #cce3e7; border-radius: 12px; background: #f8feff; text-align: left; }
.result-card h3 { margin: 0 0 6px; color: #155b69; font-size: .9rem; }
.result-card p { margin: 2px 0; color: #536c74; font-size: .78rem; }
.result-card--listening p {
  font-size: .68rem;
  letter-spacing: -.025em;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .result-card--listening p {
    font-size: .72rem;
    white-space: normal;
  }
}
.ranking-result { margin: 8px 0; color: #b55208; font-weight: 900; }
.result-actions { display: flex; justify-content: center; gap: 8px; margin: 8px 0; }

.records-screen { position: fixed; z-index: 100; inset: 0; padding: 20px; overflow: auto; background: #16333bd9; }
.records-window { width: min(980px, 100%); min-height: min(680px, calc(100vh - 40px)); margin: 0 auto; padding: 22px; border-radius: 22px; background: #f8fcfd; box-shadow: 0 20px 80px #0007; }
.records-window > header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #cce0e4; }
.records-window h2 { margin: 4px 0 14px; color: #164c58; }
.close-records { width: 40px; height: 40px; border: 0; border-radius: 50%; color: #49656b; background: #e6f1f3; font-size: 1.5rem; cursor: pointer; }
.records-tabs { display: flex; gap: 8px; margin: 18px 0; }
.records-tabs button { padding: 9px 18px; border: 1px solid #b6d0d5; border-radius: 99px; color: #49656b; background: #fff; font-weight: 800; cursor: pointer; }
.records-tabs button.is-active { color: #fff; border-color: #19869a; background: #19869a; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.summary-card { padding: 14px; border: 1px solid #cce0e4; border-radius: 14px; background: #fff; }
.summary-card h3 { margin: 0 0 8px; color: #1b6674; font-size: .9rem; }
.summary-card strong { display: block; color: #163e47; font-size: 1.35rem; }
.summary-card small { color: #6b7e83; font-size: .72rem; line-height: 1.45; }
.history-title { margin: 24px 0 10px; color: #345b64; }
.history-list { display: grid; gap: 8px; }
.history-item, .ranking-item { padding: 12px 14px; border: 1px solid #d4e4e7; border-radius: 12px; background: #fff; }
.history-item h4, .ranking-item h3 { margin: 0 0 5px; color: #215d69; }
.history-item p, .ranking-item p { margin: 2px 0; color: #586f75; font-size: .82rem; }
.ranking-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ranking-filters label { color: #45636a; font-size: .82rem; font-weight: 800; }
.ranking-filters select { margin-left: 6px; padding: 7px 10px; border: 1px solid #b5ced3; border-radius: 8px; background: #fff; }
#ranking-list { display: grid; gap: 8px; }
.ranking-item { border-left: 5px solid #ef912e; }
.empty-records { padding: 50px 20px; color: #71858a; text-align: center; }
.records-window footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid #d4e4e7; text-align: right; }
.delete-records { padding: 8px 14px; border: 1px solid #dba4aa; border-radius: 9px; color: #9b2833; background: #fff1f2; font-weight: 800; cursor: pointer; }

.chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid #c6dde1; border-radius: 12px; background: #fff; color: #45636a; font-size: .84rem; font-weight: 800; }
.chart-toolbar select { margin-left: 7px; padding: 7px 10px; border: 1px solid #acc9cf; border-radius: 8px; background: #fff; }
.analysis-comment { margin-bottom: 14px; padding: 14px 18px; border: 1px solid #bce0d6; border-left: 5px solid #27a47f; border-radius: 13px; background: #f2fcf8; color: #345c53; }
.analysis-comment h3 { margin: 0 0 7px; font-size: .95rem; }
.analysis-comment ul { margin: 0; padding-left: 1.3em; }
.analysis-comment li { margin: 4px 0; font-size: .84rem; }
.chart-card { margin: 12px 0; padding: 14px; border: 1px solid #d1e2e5; border-radius: 15px; background: #fff; }
.chart-card h3 { margin: 0 0 3px; color: #215d69; }
.chart-card > p { margin: 0 0 8px; color: #71858a; font-size: .78rem; }
.chart-frame { min-height: 220px; }
.data-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid-line { stroke: #dbe8ea; stroke-width: 1; }
.chart-axis-label { fill: #6b7e83; font: 11px sans-serif; }
.chart-value-label { fill: #236878; font: 700 12px sans-serif; }
.chart-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.chart-line--main { stroke: #238fa5; }
.chart-line--average { stroke: #ef922f; stroke-width: 4; }
.chart-dot { fill: #fff; stroke: #238fa5; stroke-width: 3; }
.chart-bar { fill: #43a9bb; }
.chart-bar:hover, .chart-dot:hover { filter: brightness(.9); }
.chart-legend { display: flex; justify-content: center; gap: 18px; margin: -3px 0 0; color: #5d7479; font-size: .75rem; }
.chart-legend span::before { display: inline-block; width: 20px; height: 4px; margin-right: 6px; border-radius: 5px; vertical-align: middle; content: ""; }
.legend-main::before { background: #238fa5; }
.legend-average::before { background: #ef922f; }
.chart-empty { display: grid; min-height: 220px; place-items: center; margin: 0; color: #71858a; }

.csv-card { margin-bottom: 14px; padding: 18px; border: 1px solid #d0e2e5; border-radius: 15px; background: #fff; }
.csv-card h3 { margin: 0 0 6px; color: #215d69; }
.csv-card p { margin: 0 0 13px; color: #60787e; font-size: .84rem; line-height: 1.7; }
.csv-button, .file-picker span { display: inline-block; padding: 9px 15px; border: 1px solid #a9cbd1; border-radius: 9px; color: #176273; background: #effcfe; font-weight: 800; cursor: pointer; }
.csv-button--primary { color: #fff; border-color: #19869a; background: #19869a; }
.csv-button--danger { color: #a22c37; border-color: #d7a3a9; background: #fff1f2; }
.csv-button:disabled { cursor: not-allowed; opacity: .45; }
.file-picker input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.import-summary { display: grid; gap: 4px; margin: 14px 0; padding: 13px; border: 1px dashed #b9d0d5; border-radius: 11px; color: #657b80; background: #f8fbfc; font-size: .82rem; }
.import-summary.is-valid { border-style: solid; border-color: #a8d9c9; color: #286451; background: #f0fbf7; }
.import-summary.is-error { border-style: solid; border-color: #e0aeb4; color: #8f2934; background: #fff3f4; }
.import-actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* 14桁＋カンマ＋Enterでも中央枠に収める */
.number-row { box-sizing: border-box; padding: 0 10px; white-space: nowrap; font-size: clamp(1.45rem, 5.2vw, 3.4rem); letter-spacing: clamp(.01em, .15vw, .04em); }
.number-row[data-length="10"], .number-row[data-length="11"] { font-size: clamp(1.35rem, 4.1vw, 2.65rem); }
.number-row[data-length="12"], .number-row[data-length="13"], .number-row[data-length="14"] { font-size: clamp(1.12rem, 3.45vw, 2.15rem); letter-spacing: 0; }
.number-row .question-enter { flex: 0 0 auto; }

@media (max-width: 680px) {
  .records-screen { padding: 8px; }
  .records-window { min-height: calc(100vh - 16px); padding: 14px; border-radius: 15px; }
  .result__scores { gap: 5px; }
  .result__scores p { flex-basis: 118px; padding: 9px 5px; }
  .result__scores strong { font-size: clamp(1.15rem, 5.4vw, 2.2rem); }
  #final-speed { font-size: clamp(.9rem, 3.8vw, 1.45rem); }
  .title-line { align-items: flex-start; flex-direction: column; gap: 7px; }
  .record-links { margin-bottom: 8px; }
  .records-tabs { flex-wrap: wrap; }
  .records-tabs button { flex: 1 1 120px; }
  .chart-toolbar { align-items: flex-start; flex-direction: column; }
  .chart-frame { min-height: 150px; overflow-x: auto; }
  .data-chart { min-width: 610px; }
}

.numpad-hand {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 10px 0;
  border-bottom: 7px solid #b8c9ce;
  border-radius: 0 0 24px 24px;
}
.numpad-finger {
  width: 34px;
}
.numpad-finger[data-finger="thumb"] {
  height: 42px;
}
.numpad-finger[data-finger="index"] {
  height: 57px;
}
.numpad-finger[data-finger="middle"] {
  height: 63px;
}
.numpad-finger[data-finger="ring"] {
  height: 57px;
}
.numpad-finger[data-finger="little"] {
  height: 46px;
}
.laser {
  position: fixed;
  z-index: 2;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(
    #0877bd 0 20%,
    #69d8ff 20% 40%,
    #fff 40% 60%,
    #69d8ff 60% 80%,
    #0877bd 80%
  );
  box-shadow:
    0 0 5px #0877bd,
    0 0 12px #39c8ff,
    0 0 24px #1e9de2cc;
  transform-origin: 0 50%;
  pointer-events: none;
  animation: laser-shot 0.2s ease-out forwards;
}
.wrong-laser {
  position: fixed;
  z-index: 20;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(#665978, #93869e, #554b61);
  box-shadow: 0 0 5px #5c4c6dbf;
  transform-origin: 0 50%;
  pointer-events: none;
  animation: wrong-laser-shot 0.11s ease-out forwards;
}
.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px var(--glow);
  animation: spark-burst 0.28s ease-out forwards;
}
.message {
  min-height: 1.5em;
  margin: 10px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
@keyframes wrong-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-5px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}
@keyframes laser-shot {
  from {
    opacity: 1;
    clip-path: inset(0 100% 0 0);
  }
  45% {
    clip-path: inset(0);
  }
  to {
    opacity: 0;
    clip-path: inset(0);
  }
}
@keyframes wrong-laser-shot {
  from {
    opacity: 0.9;
    clip-path: inset(0 100% 0 0);
  }
  70% {
    opacity: 0.8;
    clip-path: inset(0);
  }
  to {
    opacity: 0;
  }
}
@keyframes effect-key-hit {
  to {
    opacity: 0;
    filter: blur(5px);
    transform: translate(var(--effect-x, 0), var(--effect-y, 0)) scale(1.65)
      rotate(12deg);
  }
}
@keyframes challenge-key-hit {
  to { opacity: 0; filter: blur(5px); transform: translate(var(--hit-x, 0), var(--hit-y, 0)) scale(1.65) rotate(12deg); }
}
@keyframes combo-break {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes combo-milestone {
  0%,100% { transform: scale(1) translate(0); }
  25% { transform: scale(1.3) translate(-3px,2px) rotate(-2deg); }
  40% { transform: scale(1.24) translate(4px,-2px) rotate(2deg); }
  55% { transform: scale(1.18) translate(-3px,1px); }
}
@keyframes spark-burst {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--spark-x)),
        calc(-50% + var(--spark-y))
      )
      scale(0.1);
  }
}
@keyframes promote {
  from {
    opacity: 0.45;
    transform: translateY(58px) scale(0.65);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes shatter {
  to {
    opacity: 0;
    filter: blur(5px);
    transform: scale(1.55) rotate(6deg);
  }
}
@media (max-width: 720px) {
  .app {
    width: min(100% - 20px, 1100px);
    padding-top: 16px;
  }
  .app__header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .status {
    width: 100%;
  }
  .status__item {
    flex: 1;
    min-width: 0;
    padding: 8px 4px;
  }
  .play-area {
    height: 410px;
    border-radius: 16px;
  }
  .panel {
    padding: 16px 12px;
  }
  .mode-selector {
    grid-template-columns: repeat(2, 1fr);
  }
  .mode-option--numpad {
    grid-column: 1/3;
    width: calc(50% - 4px);
    justify-self: center;
  }
  .mode-option--japanese { grid-column: 1/2; }
  .mode-option span {
    min-height: 49px;
  }
  .challenge-controls { flex-direction: column; gap: 7px; }
  .level-control input { width: 180px; }
  .combo-display { top: 10px; right: 10px; min-width: 125px; }
  .combo-display strong { font-size: 1.2rem; }
  .screen-keyboard {
    --key-width: 43px;
    margin-left: 0;
  }
  .keycap {
    min-height: 43px;
  }
  .hands {
    gap: 18px;
  }
  .hand {
    gap: 2px;
    padding-inline: 4px;
  }
  .guide__header {
    justify-content: space-between;
    gap: 8px;
  }
  .exit-hint {
    position: static;
  }
  .numpad-guide {
    flex-direction: column;
    gap: 16px;
  }
  .screen-numpad {
    grid-template-columns: repeat(3, 56px);
    grid-template-rows: repeat(4, 48px);
  }
  .numpad-question {
    padding-bottom: 0;
  }
  .question-enter {
    display: block;
  }
  .next-question {
    margin-top: 20px;
  }
}

/* Ver.1.6：日本語＋英単語3択タイピング */
.english-mode-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px auto;
}
.english-mode-card { margin: 0; cursor: pointer; }
.english-mode-card input:checked + span {
  border-color: #596fc9;
  color: #263f91;
  background: linear-gradient(145deg, #eef1ff, #dce5ff);
  box-shadow: 0 0 0 3px #7188e733, 0 8px 20px #5368bb24;
}
.english-mode-card input:focus-visible + span { outline: 3px solid #d77b18; outline-offset: 2px; }
.english-mode-card input:disabled + span { opacity: .55; cursor: not-allowed; }
.english-choice-question {
  width: min(920px, 100%);
  margin: 0 auto;
}
.choice-question-label {
  margin: 0 0 3px;
  color: #70858c;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.english-choice-japanese {
  margin: 0;
  color: #263c50;
  font: 900 clamp(2.25rem, 6vw, 4.25rem)/1.15 "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  text-shadow: 0 4px 0 #e3eff1;
}
.english-choice-note {
  box-sizing: border-box;
  min-height: 2.9em;
  margin: 5px 0 8px;
  color: #6a596a;
  font-size: clamp(.72rem, 1.5vw, .92rem);
  font-weight: 800;
  line-height: 1.45;
}
.english-choice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(850px, 100%);
  margin: 0 auto;
}
.english-choice {
  display: grid;
  grid-template-rows: minmax(50px, auto) 2.8em;
  min-width: 0;
  text-align: center;
}
.english-choice-word {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 0;
  padding: 8px 10px;
  border: 2px solid #85b5c0;
  border-radius: 15px;
  color: #244852;
  background: #f3fcfe;
  box-shadow: 0 6px 14px #244f5818;
  font: 900 clamp(1.2rem, 3vw, 2rem)/1.15 Arial, sans-serif;
  overflow-wrap: anywhere;
}
.english-choice-meaning {
  display: grid;
  place-items: start center;
  box-sizing: border-box;
  min-height: 2.8em;
  padding: 6px 4px 0;
  color: #5f747a;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
}
.english-choice.is-correct .english-choice-word {
  border-color: #e88720;
  color: #713b08;
  background: linear-gradient(145deg, #ffdca2, #ffb950);
  box-shadow: 0 0 0 4px #ffb63b33, 0 8px 18px #b8641838;
}
.english-choice.is-correct {
  color: inherit !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none;
}
.english-stage:not(.is-break) .english-choice-question + .english-input { margin-top: 2px; }
.english-stage.is-choice-break .english-question.is-shifted {
  padding: 7px 10px 4px;
  justify-content: flex-start;
}
.english-stage.is-choice-break .english-choice-japanese {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
}
.english-stage.is-choice-break .english-choice-note {
  min-height: 2.5em;
  margin-block: 2px 4px;
}
.english-stage.is-choice-break .english-choice-options { gap: 7px; }
.english-stage.is-choice-break .english-choice {
  grid-template-rows: minmax(42px, auto) 2.8em;
}
.english-stage.is-choice-break .english-choice-word {
  min-height: 42px;
  padding: 5px;
  border-radius: 12px;
  font-size: clamp(.92rem, 1.8vw, 1.3rem);
}
.english-stage.is-choice-break .english-input {
  margin-top: 0;
  font-size: clamp(1.15rem, 2.4vw, 1.8rem);
}

@media (max-width: 720px) {
  .english-mode-selector { grid-template-columns: 1fr; }
  .english-choice-options { gap: 6px; }
  .english-choice { grid-template-rows: minmax(44px, auto) 2.8em; }
  .english-choice-word { padding: 5px 3px; border-radius: 10px; font-size: clamp(.86rem, 4vw, 1.2rem); }
  .english-choice-meaning { font-size: .66rem; }
  .english-choice-note { min-height: 2.8em; }
  .english-stage.is-choice-break .english-question.is-shifted { padding-bottom: 34px; }
}

@keyframes promote {
  from {
    transform: translate(var(--promote-x), var(--promote-y))
      scale(var(--promote-scale));
    transform-origin: center;
  }
  to {
    transform: none;
    transform-origin: center;
  }
}

/* テンキー：視線を固定したまま一段ずつ送る数字リール */
.numpad-question {
  padding-bottom: 0;
}
.number-reel {
  --row-step: 88px;
  position: relative;
  width: min(620px, calc(100% - 32px));
  height: 286px;
  overflow: hidden;
}
.number-reel__frame {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100% - 24px));
  height: 76px;
  border: 3px solid #55d8e8;
  border-radius: 16px;
  background: #dffbff47;
  box-shadow:
    0 0 0 5px #fff9,
    0 8px 28px #1c92a92e,
    0 0 24px #40e6ff45;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.number-track {
  position: absolute;
  inset: 0;
}
.number-row {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(500px, calc(100% - 44px));
  height: 70px;
  color: #526477;
  font:
    850 clamp(2rem, 6vw, 3.4rem) / 1 Arial,
    sans-serif;
  letter-spacing: 0.04em;
  opacity: 0.58;
  transform: translate(-50%, calc(-50% + var(--row-offset) * var(--row-step)))
    scale(0.82);
  transition:
    transform 0.28s cubic-bezier(0.22, 0.75, 0.25, 1),
    opacity 0.28s,
    color 0.28s;
  will-change: transform, opacity;
}
.number-row[data-offset="-1"] {
  --row-offset: -1;
  opacity: 0.18;
}
.number-row[data-offset="0"] {
  --row-offset: 0;
  z-index: 4;
  color: #253044;
  opacity: 1;
  transform: translate(-50%, calc(-50% + var(--row-offset) * var(--row-step)))
    scale(1);
}
.number-row[data-offset="1"] {
  --row-offset: 1;
}
.number-row[data-offset="2"] {
  --row-offset: 2;
  opacity: 0.3;
}
.number-row.is-new {
  opacity: 0;
}
.number-row span {
  transition:
    color 0.08s,
    text-shadow 0.08s;
}
.number-row span.is-entered {
  color: #1cb9cf;
  text-shadow: 0 0 14px #40e6ff99;
}
.number-row span.is-current {
  text-decoration: underline;
  text-decoration-color: #ef9f24;
  text-underline-offset: 8px;
}
.number-row .comma {
  margin-right: 0.05em;
  color: #738595;
  font-style: normal;
}
.number-row .question-enter {
  margin-left: 0.55em;
  font-size: 0.3em;
  letter-spacing: 0;
  text-shadow: none;
}
.comma-note {
  position: absolute;
  z-index: 5;
  bottom: 12px;
  margin: 0;
}
@media (max-width: 720px) {
  .number-reel {
    --row-step: 82px;
    width: 100%;
    height: 280px;
  }
  .number-reel__frame {
    width: calc(100% - 20px);
    height: 72px;
  }
  .number-row {
    width: calc(100% - 30px);
    font-size: clamp(1.8rem, 9vw, 3rem);
  }
  .number-row .question-enter {
    margin-left: 0.35em;
  }
}

/* 実物のテンキー配置：Enterは3とドットの右側で縦2段 */
.screen-numpad {
  grid-template-columns: repeat(4, 62px);
}
.numpad-key[data-numpad-key="7"] {
  grid-area: 1/1;
}
.numpad-key[data-numpad-key="8"] {
  grid-area: 1/2;
}
.numpad-key[data-numpad-key="9"] {
  grid-area: 1/3;
}
.numpad-key[data-numpad-key="4"] {
  grid-area: 2/1;
}
.numpad-key[data-numpad-key="5"] {
  grid-area: 2/2;
}
.numpad-key[data-numpad-key="6"] {
  grid-area: 2/3;
}
.numpad-key[data-numpad-key="1"] {
  grid-area: 3/1;
}
.numpad-key[data-numpad-key="2"] {
  grid-area: 3/2;
}
.numpad-key[data-numpad-key="3"] {
  grid-area: 3/3;
}
.numpad-key[data-numpad-key="0"] {
  grid-area: 4/1/5/3;
}
.numpad-key[data-numpad-key="."] {
  grid-area: 4/3;
}
.numpad-key[data-numpad-key="Enter"] {
  grid-area: 3/4/5/5;
}

/* Ver.1.0 日本語ローマ字入力 */
.japanese-question {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}
.japanese-word {
  margin: 0;
  color: #263c50;
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-weight: 900;
  line-height: 1.15;
  text-shadow: 0 4px 0 #e3eff1;
}
.japanese-reading {
  margin: 8px 0 20px;
  color: #65798a;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: .12em;
}
.romaji-guide {
  min-height: 1.25em;
  margin: 0;
  color: #33475b;
  font: 900 clamp(2.2rem, 7vw, 4.7rem)/1 Arial, sans-serif;
  letter-spacing: .06em;
}
.romaji-guide span { transition: color .08s, text-shadow .08s; }
.romaji-guide .is-entered { color: #1cb9cf; text-shadow: 0 0 14px #40e6ff99; }
.romaji-guide .is-next { color: #c2660d; text-decoration: underline; text-decoration-color: #ef9f24; text-underline-offset: 9px; }
.romaji-branch-hint {
  height: 1.5em;
  margin: 13px 0 0;
  color: #526c7e;
  font-size: clamp(.9rem, 2vw, 1.05rem);
  font-weight: 800;
  line-height: 1.5;
  visibility: hidden;
  white-space: nowrap;
}
.romaji-branch-hint.is-visible { visibility: visible; }
.romaji-branch-hint strong {
  color: #c2660d;
  letter-spacing: .12em;
}
.caps-warning {
  margin: 18px 0 0;
  padding: 8px 14px;
  border: 1px solid #e8b44e;
  border-radius: 999px;
  color: #7c4800;
  background: #fff6d9;
  font-weight: 800;
}
.challenge-toggle:disabled { cursor: not-allowed; opacity: .45; }

/* Ver.1.1：英字Oと数字0を見分けやすくする（数字だけ字形を変更） */
.is-numeric,
.status dd,
.result__scores strong,
.result-details,
.ranking-result,
.summary-card strong,
.summary-card small,
.history-item p,
.ranking-item,
.chart-toolbar,
.chart-axis-label,
.chart-value-label,
.import-summary,
.checker-summary {
  font-family: Consolas, "Cascadia Mono", "DejaVu Sans Mono", "Liberation Mono", monospace;
  font-variant-numeric: slashed-zero tabular-nums;
  font-feature-settings: "zero" 1, "tnum" 1;
}
.checker-card code { padding: 2px 5px; border-radius: 5px; background: #edf5f6; }
.checker-summary { margin: 14px 0; padding: 13px; border: 1px solid #b9d0d5; border-radius: 11px; color: #657b80; background: #f8fbfc; font-size: .84rem; font-weight: 800; }
.checker-summary.is-valid { border-color: #a8d9c9; color: #286451; background: #f0fbf7; }
.checker-summary.is-warning { border-color: #e5c36f; color: #79520a; background: #fff9e9; }
.checker-summary.is-error { border-color: #e0aeb4; color: #8f2934; background: #fff3f4; }
.checker-filter { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.checker-filter button { padding: 7px 13px; border: 1px solid #b8d0d5; border-radius: 99px; color: #526b70; background: #fff; font-weight: 800; cursor: pointer; }
.checker-filter button.is-active { color: #fff; border-color: #19869a; background: #19869a; }
.checker-results { display: grid; gap: 9px; max-height: 430px; overflow: auto; }
.checker-result { padding: 12px 14px; border-left: 5px solid #60ae91; border-radius: 10px; background: #f4fbf8; }
.checker-result.is-warning { border-left-color: #d4a12d; background: #fffaf0; }
.checker-result.is-error { border-left-color: #ce5360; background: #fff4f5; }
.checker-result h4 { margin: 0 0 5px; font-size: .93rem; }
.checker-result p { margin: 3px 0; color: #5b7075; font-size: .8rem; line-height: 1.55; }
@media (max-width: 720px) {
  .screen-numpad {
    grid-template-columns: repeat(4, 56px);
  }
  .japanese-question { padding: 18px; }
  .japanese-reading { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Ver.1.3：日本語単語 成績保存・グラフ対応 */
.records-window {
  width: min(1180px, 100%);
}
.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.summary-card {
  min-width: 0;
}
.summary-card small {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.summary-card--japanese {
  border-color: #b7d7e9;
  background: #f5fbff;
}
.history-item p {
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}
.chart-toolbar__filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 1080px) {
  .summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }
}
@media (max-width: 760px) {
  .records-screen { padding: 8px; }
  .records-window { width: 100%; }
  .chart-toolbar { align-items: flex-start; }
  .chart-toolbar__filters { align-items: flex-start; }
  .history-item p { white-space: normal; overflow-x: visible; }
}

/* Ver.1.4：上部UI・大分類モード・魔改造履歴・全画面 */
.app__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 28px;
}
.header-main {
  display: grid;
  min-width: 0;
  gap: 8px;
}
.header-primary,
.practice-nav-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-primary { flex-wrap: wrap; }
.practice-nav-row h1 {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
.utility-links,
.utility-links .record-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.utility-links { justify-content: flex-start; }
.utility-button {
  padding: 5px 11px;
  border: 1px solid #9ecbd2;
  border-radius: 99px;
  color: #176273;
  background: #effcfe;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.utility-button--magic {
  border-color: #c8a6df;
  color: #6b3989;
  background: #faf3ff;
}
.utility-button[aria-pressed="true"] {
  color: #fff;
  border-color: #176273;
  background: #176273;
}
.fullscreen-control {
  position: relative;
  display: inline-flex;
}
.fullscreen-guide {
  position: absolute;
  z-index: 80;
  top: calc(100% + 12px);
  right: 0;
  width: max-content;
  max-width: min(330px, 78vw);
  padding: 10px 13px;
  border: 2px solid #e2a044;
  border-radius: 13px;
  color: #6b4316;
  background: #fff7dc;
  box-shadow: 0 9px 22px #6d4a1f38;
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.45;
  pointer-events: none;
}
.fullscreen-guide::before {
  content: "";
  position: absolute;
  right: 25px;
  bottom: 100%;
  border: 8px solid transparent;
  border-bottom-color: #e2a044;
}
.fullscreen-guide::after {
  content: "";
  position: absolute;
  right: 27px;
  bottom: 100%;
  border: 6px solid transparent;
  border-bottom-color: #fff7dc;
}
.fullscreen-guide small {
  display: block;
  color: #866235;
  font-size: .68rem;
}
.fullscreen-guide[hidden],
html:fullscreen .fullscreen-guide { display: none; }
.category-switcher {
  display: grid;
  flex: 1 1 520px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.category-button {
  position: relative;
  min-height: 38px;
  padding: 7px 13px;
  overflow: hidden;
  border: 2px solid #b9d7dd;
  border-radius: 15px;
  color: #506c73;
  background: #ffffffd9;
  font-weight: 900;
  letter-spacing: .03em;
  cursor: pointer;
  transition: color .25s, border-color .25s, background .25s, transform .25s, box-shadow .25s;
}
.category-button:hover:not(:disabled) { transform: translateY(-2px); }
.category-button.is-active {
  border-color: #198ba0;
  color: #fff;
  background: linear-gradient(135deg, #1ba0b8, #14788b);
  box-shadow: 0 7px 18px #14788b35;
}
.category-button:disabled { cursor: not-allowed; opacity: .58; }
.category-switcher.is-guiding .category-button:not(:disabled) {
  animation: category-soft-guide 6s ease-in-out infinite;
}
.category-switcher.is-guiding .category-button:nth-child(2) { animation-delay: 2s; }
.category-switcher.is-guiding .category-button:nth-child(3) { animation-delay: 4s; }
@keyframes category-soft-guide {
  0%, 28%, 100% { box-shadow: 0 0 0 0 #55d8ef00; }
  10%, 18% { box-shadow: 0 0 0 4px #80e9f045, 0 0 24px 8px #45dced55; }
}
.coming-soon-panel {
  min-height: clamp(420px, 48vh, 480px);
  padding: clamp(40px, 8vw, 90px) 24px;
  border: 3px solid #c7dce1;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 15%, #e4fbff 0, transparent 17rem),
    #ffffffd9;
  text-align: center;
  box-shadow: 0 18px 45px #254c581f;
}
.coming-soon-panel__badge {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid #b698ca;
  border-radius: 99px;
  color: #70418d;
  background: #faf4ff;
  font-size: .8rem;
  font-weight: 900;
}
.coming-soon-panel h2 { margin: 18px 0 8px; color: #215d69; font-size: clamp(1.8rem, 5vw, 3rem); }
.coming-soon-panel p { margin: 0 auto 20px; color: #61777d; line-height: 1.8; }
.coming-soon-panel strong { color: #1c92a9; font-size: clamp(1.3rem, 4vw, 2.1rem); letter-spacing: .12em; }
.is-panel-entering { animation: category-panel-enter .42s cubic-bezier(.2, .8, .2, 1); }
@keyframes category-panel-enter {
  from { opacity: .18; transform: scale(.94) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.changelog-screen {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  padding: 20px;
  overflow: auto;
  place-items: center;
  background: #16333be0;
}
.changelog-screen[hidden],
.coming-soon-panel[hidden],
#typing-workspace[hidden] { display: none !important; }
.changelog-window {
  width: min(720px, 100%);
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid #d9c6e5;
  border-radius: 22px;
  background: #fcfaff;
  box-shadow: 0 20px 80px #0007;
}
.changelog-window > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e2d5ea; }
.changelog-window h2 { margin: 4px 0 15px; color: #613a7a; }
.changelog-window ul { margin: 20px 0; padding-left: 1.4em; color: #4f6268; line-height: 1.75; }
.changelog-window li + li { margin-top: 5px; }
.changelog-window__links { padding: 14px 16px; border-radius: 13px; background: #f3edf7; color: #53656a; font-size: .84rem; line-height: 1.65; }
.changelog-window__links p { margin: 8px 0 0; }
.changelog-window__links a { color: #6b3989; font-weight: 900; }
.result {
  max-width: calc(100% - 28px);
  overflow-x: hidden;
  overflow-y: auto;
}
.result__scores,
.result-details,
.result-card { min-width: 0; max-width: 100%; }
.result-card p {
  white-space: normal;
  overflow-wrap: anywhere;
}
html:fullscreen .app {
  width: min(1240px, calc(100% - 32px));
  padding-top: 18px;
}
html:fullscreen .play-area,
html:fullscreen .coming-soon-panel { height: clamp(440px, 52vh, 620px); }
@media (max-width: 900px) {
  .app__header { grid-template-columns: 1fr; }
  .header-primary,
  .practice-nav-row { align-items: flex-start; }
  .practice-nav-row { flex-direction: column; }
  .category-switcher { width: 100%; flex-basis: auto; }
  .status { justify-self: end; }
  .utility-links { justify-content: flex-start; }
  .fullscreen-guide { right: auto; left: 0; }
  .fullscreen-guide::before { right: auto; left: 25px; }
  .fullscreen-guide::after { right: auto; left: 27px; }
}
@media (max-width: 600px) {
  .category-switcher { grid-template-columns: 1fr; gap: 7px; }
  .category-button { min-height: 42px; }
  .utility-links { align-items: stretch; }
  .utility-links .record-links { justify-content: flex-start; }
  .changelog-screen { padding: 8px; }
}

/* Ver.1.5：英単語を見て打つ */
.english-stage {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 24px;
}
.english-level-badge {
  position: absolute;
  z-index: 8;
  top: 14px;
  left: 16px;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 6px 11px;
  border: 1px solid #9ab0df;
  border-radius: 999px;
  color: #344f9b;
  background: #f4f7ffeb;
  box-shadow: 0 5px 14px #3f599329;
  font-size: clamp(.69rem, 1.35vw, .82rem);
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
}
.english-question {
  min-width: 0;
  text-align: center;
  transition: transform .42s cubic-bezier(.2,.8,.2,1), width .42s;
}
.english-question.is-shifted {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  display: flex;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 18px 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transform: none;
}
.english-word {
  margin: 0;
  color: #263c50;
  font: 900 clamp(3rem, 9vw, 6rem)/1.1 Arial, sans-serif;
  overflow-wrap: anywhere;
  text-shadow: 0 4px 0 #e3eff1;
}
.english-input {
  min-height: 1.2em;
  margin: 22px 0 0;
  color: #1b9cb2;
  font: 900 clamp(2.4rem, 7vw, 4.8rem)/1.1 Arial, sans-serif;
  letter-spacing: .04em;
  overflow-wrap: anywhere;
  text-shadow: 0 0 14px #40e6ff77;
}
.english-input::after {
  content: "│";
  color: #d77b18;
  animation: english-caret .85s steps(1) infinite;
}
.english-question.is-shifted .english-word {
  width: 100%;
  max-width: 100%;
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  white-space: normal;
  overflow-wrap: anywhere;
}
.english-question.is-shifted .english-input {
  width: 100%;
  max-width: 100%;
  margin-top: 18px;
  font-size: clamp(1.45rem, 3.3vw, 2.6rem);
  white-space: normal;
  overflow-wrap: anywhere;
}
@keyframes english-caret { 50% { opacity: 0; } }
.english-break-title {
  position: relative;
  z-index: 7;
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: center;
  width: 100%;
  color: #df7a18;
  text-align: center;
  font: 900 clamp(1.25rem, 2.4vw, 1.85rem)/1.2 Arial, sans-serif;
  letter-spacing: .035em;
  text-shadow: 0 2px 0 #fff3df, 0 5px 12px #de81294a;
  pointer-events: none;
}
.english-break-title span {
  display: inline-block;
  animation: break-time-hop 1.65s ease-in-out infinite;
  animation-delay: calc(var(--letter-index) * .07s);
}
.english-break-title .break-space { width: .34em; }
@keyframes break-time-hop {
  0%, 34%, 100% { transform: translateY(0); }
  15% { transform: translateY(-5px); }
}
.english-study-panel {
  position: relative;
  grid-column: 2;
  grid-row: 2 / 4;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 18px 20px;
  overflow-y: auto;
  border: 2px solid #b8dce2;
  border-radius: 18px;
  color: #405860;
  background: #fffffff2;
  box-shadow: 0 15px 35px #254c5823;
  animation: study-panel-in .38s ease-out;
}
@keyframes study-panel-in { from { opacity: 0; transform: translateX(28px); } }
.study-label { margin: 0; color: #658087; font-size: .78rem; font-weight: 900; }
.english-study-panel h2 { margin: 4px 0 8px; color: #176b7a; font-size: clamp(1.35rem, 3vw, 2rem); }
.study-meaning { margin: 0 0 11px; line-height: 1.6; }
.speak-button,.preview-button {
  padding: 7px 12px;
  border: 1px solid #81bdc8;
  border-radius: 99px;
  color: #176273;
  background: #effcfe;
  font-weight: 800;
  cursor: pointer;
}
.speak-button:disabled { opacity: .45; cursor: not-allowed; }
.study-example { margin-top: 13px; padding: 12px; border-radius: 12px; background: #f0f8f9; }
.study-example p { margin: 6px 0; line-height: 1.55; }
#english-example { color: #253e49; font-weight: 800; }
#english-example-ja { color: #647b82; }
.other-meanings { margin-top: 15px; padding-top: 13px; border-top: 1px solid #c8dde1; }
.other-meanings ol { margin: 8px 0 0; padding-left: 1.5em; line-height: 1.65; }
.study-next {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  width: 100%;
  margin: 0;
  color: #724611;
  text-align: center;
  font-weight: 900;
}
.study-next kbd { margin-right: .28em; }
.english-stage.is-break {
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  grid-template-rows: 42px minmax(0, 1fr) 52px;
  column-gap: 18px;
  align-items: stretch;
  padding: 18px;
}
.english-start-panel { width: min(1010px, calc(100% - 28px)); padding-block: 14px; }
.japanese-start-panel { width: min(660px, calc(100% - 28px)); }
.japanese-mode-card { display: block; width: min(420px, 100%); margin: 16px auto 22px; }
.japanese-mode-card > span { min-height: 68px; }
.english-mode-card { display: block; margin: 8px auto; cursor: default; }
.english-mode-card input { position: absolute; opacity: 0; }
.english-mode-card span { display: grid; place-items: center; min-height: 50px; padding: 7px; border: 2px solid #45bfd2; border-radius: 13px; color: #134e59; background: #dcfaff; box-shadow: 0 7px 18px #1c92a91f; font-weight: 900; }
.english-mode-card small { display: block; margin-top: 3px; color: #617b81; font-size: .68rem; }
.english-settings { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin: 9px 0; text-align: left; }
.english-level-setting { grid-column: span 2; }
.english-settings label { display: grid; gap: 3px; color: #5b7379; font-size: .73rem; font-weight: 900; }
.english-settings select { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid #abcbd1; border-radius: 8px; color: #344d55; background: #fff; font-weight: 700; }
.english-level-setting select { font-size: .75rem; }
.english-settings .preview-button { align-self: end; border-radius: 9px; }
body.is-english { --accent: #5572d8; --accent-dark: #314da8; }
body.is-english .category-button[data-category="english"].is-active { border-color: #596fc9; background: linear-gradient(135deg,#7188e7,#4e61b6); }

@media (max-width: 720px) {
  .english-settings { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .english-level-setting { grid-column: 1 / -1; }
  .english-start-panel { max-height: calc(100% - 20px); overflow-y: auto; }
  .english-stage { padding: 12px; }
  .english-level-badge { top: 8px; left: 9px; }
  .english-stage.is-break {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 38px minmax(105px, .7fr) 42px minmax(0, 1.3fr);
    gap: 0;
    padding: 10px;
  }
  .english-question.is-shifted {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    padding: 8px 6px 42px;
  }
  .english-question.is-shifted .english-word { font-size: clamp(1.7rem, 9vw, 3rem); }
  .english-question.is-shifted .english-input { margin-top: 8px; font-size: clamp(1.4rem, 7vw, 2.5rem); }
  .english-break-title { grid-column: 1; grid-row: 1; }
  .english-study-panel { grid-column: 1; grid-row: 4; width: 100%; height: 100%; }
  .study-next { grid-column: 1; grid-row: 3; width: 100%; }
}

/* Ver.1.8：Level表記・教材件数・全画面誘導 */

/* Ver.1.8r1：累積正答率・出題教材Level連動 */

/* Ver.1.8r2：出題Level別成績・開発者コマンド */

/* Ver.1.9：教材ID統合・日本語reading対応・UI修正 */
.developer-command {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: #10272ebf;
}
.developer-command[hidden] { display: none; }
.developer-command__panel {
  width: min(360px, 100%);
  padding: 20px;
  border: 1px solid #90bdc6;
  border-radius: 16px;
  color: #214d58;
  background: #f8feff;
  box-shadow: 0 18px 60px #0007;
}
.developer-command__panel label {
  display: block;
  margin-bottom: 9px;
  font-weight: 900;
}
.developer-command__panel input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #94c9d3;
  border-radius: 9px;
  color: #173e48;
  background: #fff;
  font: 800 1rem/1.2 Arial, sans-serif;
}
.developer-command__panel input:focus {
  outline: 3px solid #45bfd244;
  border-color: #299bb0;
}
.developer-command__panel p {
  min-height: 1.4em;
  margin: 9px 0 0;
  color: #658087;
  font-size: .76rem;
}

.english-mode-selector .english-mode-card { margin: 0; cursor: pointer; }

/* Ver.1.7r1：リスニング英単語 */
.english-listening-question {
  width: min(900px, 100%);
  margin: 0 auto;
  text-align: center;
}
.listening-label {
  margin: 0 0 10px;
  color: #687996;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .13em;
}
.english-listening-mask {
  display: flex;
  min-height: 1.2em;
  margin: 0;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .04em;
  color: #586b9e;
  font: 900 clamp(2.7rem, 7.4vw, 5.1rem)/1.15 Arial, sans-serif;
  letter-spacing: .04em;
  text-shadow: 0 4px 0 #e3e8f6;
}
.english-listening-mask span {
  display: inline-grid;
  min-width: .72em;
  place-items: center;
}
.english-listening-mask .is-entered {
  color: #1b9cb2;
  text-shadow: 0 0 14px #40e6ff77;
}
.english-listening-mask .is-hint {
  color: #db7616;
  text-shadow: 0 2px 0 #fff0d8;
}
.english-listening-stats {
  margin: 18px 0 0;
  color: #314a78;
  font-size: clamp(.78rem, 1.8vw, 1rem);
  font-weight: 900;
}
.english-listening-note {
  margin: 7px 0 0;
  color: #795c3d;
  font-size: clamp(.68rem, 1.5vw, .82rem);
  font-weight: 700;
}
.english-listening-replay {
  margin: 14px 0 0;
  color: #526886;
  font-size: .85rem;
  font-weight: 900;
}
.english-listening-replay kbd { margin-right: .3em; }
.english-stage.is-listening-speaking .english-listening-mask,
.english-stage.is-listening-speaking .english-input { opacity: .62; }
.english-stage.is-listening-speaking .english-listening-replay::after {
  content: "　再生中…";
  color: #d06b11;
}
.english-stage:not(.is-break) .english-listening-question + .english-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  opacity: 0;
}
.english-stage.is-break .english-listening-question { display: none; }

@media (max-width: 960px) and (min-width: 721px) {
  .english-mode-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .english-mode-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .english-listening-stats { line-height: 1.65; }
  .english-listening-note { line-height: 1.5; }
}


/* Ver.2.0r1：英語中分類の研究中表示・待機ガイド修正 */
.japanese-mode-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
}
.japanese-mode-selector .mode-option--japanese { grid-column: auto; }
.japanese-question.is-sentence { padding-inline: clamp(18px, 4vw, 46px); }
.japanese-question.is-sentence .japanese-word {
  max-width: 100%;
  font-size: clamp(1.7rem, 4.3vw, 3.1rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.japanese-question.is-sentence .japanese-reading {
  max-width: 100%;
  margin: 10px 0 14px;
  font-size: clamp(.92rem, 2vw, 1.18rem);
  line-height: 1.65;
  letter-spacing: .06em;
  overflow-wrap: anywhere;
}
.japanese-question.is-sentence .romaji-guide {
  width: 100%;
  font-size: clamp(1.25rem, 3.4vw, 2.25rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.english-category-panel {
  width: min(980px, calc(100% - 28px));
  padding-block: 18px;
}
.english-category-panel h2 { margin: 6px 0 12px; color: #304c60; font-size: 1.2rem; }
.english-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 10px;
}
.english-category-card {
  position: relative;
  min-height: 92px;
  padding: 15px 10px 11px;
  border: 2px solid #c9d9df;
  border-radius: 13px;
  background: #f7fbfc;
  color: #40576a;
  text-align: center;
}
button.english-category-card { font: inherit; }
.english-category-card strong, .english-category-card small { display: block; }
.english-category-card strong { font-size: 1rem; }
.english-category-card small { margin-top: 5px; color: #71808e; font-size: .7rem; font-weight: 700; line-height: 1.4; }
.english-category-card.is-available { cursor: pointer; border-color: #6e83d9; background: linear-gradient(145deg, #f4f6ff, #e6ebff); color: #263f91; box-shadow: 0 7px 20px #5368bb1f; }
.english-category-card.is-available:hover { transform: translateY(-1px); box-shadow: 0 10px 24px #5368bb2b; }
.english-category-card.is-researching { opacity: .52; cursor: default; user-select: none; }
.english-category-card.is-researching > span { position: absolute; top: 7px; right: 7px; padding: 2px 6px; border-radius: 999px; background: #e8edf0; color: #6b7881; font-size: .58rem; font-weight: 900; }
.english-submenu-header { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 4px; }
.english-back-button { padding: 6px 10px; border: 1px solid #b8c9d0; border-radius: 999px; background: #f7fbfc; color: #4b6374; font-weight: 800; cursor: pointer; }
@media (max-width: 820px) {
  .english-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .japanese-mode-selector, .english-category-grid { grid-template-columns: 1fr; }
  .english-submenu-header { align-items: stretch; flex-direction: column; gap: 6px; }
}


/* Ver.2.1：英語分析・成熟度表示・教材診断・ガイド制御 */
.utility-button--maturity { border-color: #c4b7df; color: #5c4783; background: #f7f2ff; }
.maturity-badge { display: inline-flex; align-items: center; justify-content: center; width: fit-content; padding: 2px 7px; border-radius: 999px; font-size: .66rem; font-weight: 900; line-height: 1.25; }
.maturity-badge--alpha { color: #8b3b12; border: 1px solid #e8a670; background: #fff1df; }
.maturity-badge--beta { color: #465b96; border: 1px solid #9aabe0; background: #eef1ff; }
.english-mode-card > span { position: relative; }
.english-mode-card .maturity-badge { position: absolute; top: 5px; right: 6px; }
.maturity-modal { position: fixed; z-index: 170; inset: 0; display: grid; place-items: center; padding: 18px; background: #10272ebf; }
.maturity-modal[hidden] { display: none; }
.maturity-modal__panel { width: min(560px, 100%); padding: 24px; border: 1px solid #c9d9df; border-radius: 20px; background: #fbfeff; box-shadow: 0 20px 70px #0007; text-align: center; }
.maturity-modal__panel h2 { margin: 6px 0 16px; color: #284e5a; }
.maturity-modal__panel dl { display: grid; gap: 10px; margin: 0 0 18px; text-align: left; }
.maturity-modal__panel dl > div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #dce8eb; border-radius: 12px; background: #fff; }
.maturity-modal__panel dt, .maturity-modal__panel dd { margin: 0; }
.chart-card--english { border-color: #d9def1; background: linear-gradient(180deg, #fff, #fafbff); }
.chart-card--english h3 { color: #485d98; }
.chart-frame--comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.comparison-chart-part { min-width: 0; padding: 10px; border: 1px solid #e1e5f2; border-radius: 12px; background: #fff; }
.comparison-chart-part h4 { margin: 0 0 4px; color: #596a96; text-align: center; }
.developer-terminal { margin-top: 18px; padding: 14px; border: 1px solid #254c57; border-radius: 14px; color: #d7f3e4; background: #0d1d22; text-align: left; }
.developer-terminal h4 { margin: 0 0 5px; color: #8be3ad; }
.developer-terminal p { margin: 0 0 10px; color: #a8c8bc; font-size: .78rem; }
.developer-terminal code { color: #d7f3e4; background: #173038; }
.developer-terminal__form { display: flex; align-items: center; gap: 8px; }
.developer-terminal__prompt { flex: 0 0 auto; color: #8be3ad; font: 800 .85rem/1.2 Consolas, monospace; }
.developer-terminal__form input { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid #466e70; border-radius: 7px; color: #f3fff7; background: #112a2c; font: 700 .86rem/1.25 Consolas, monospace; }
.developer-terminal__form input:focus { outline: 2px solid #7fd6a744; border-color: #7fd6a7; }
.developer-terminal__output { min-height: 150px; max-height: 360px; overflow: auto; margin: 10px 0 0; padding: 12px; border: 1px solid #27484a; border-radius: 8px; color: #d9f7e4; background: #071316; white-space: pre-wrap; word-break: break-word; font: 600 .78rem/1.55 Consolas, "Yu Gothic UI", monospace; }
@media (max-width: 760px) { .chart-frame--comparison { grid-template-columns: 1fr; } .english-mode-card .maturity-badge { position: static; margin-top: 2px; } }


/* Ver.2.2：無制限モード・単語練習ヘッダー調整 */
.unlimited-toggle.is-on {
  color: #075541;
  border-color: #4bbd91;
  background: #e4f8ef;
  box-shadow: 0 0 0 3px #4bbd9130;
}
.japanese-unlimited-controls {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.unlimited-exit-button {
  position: absolute;
  z-index: 11;
  right: 18px;
  bottom: 16px;
  min-width: 92px;
  padding: 9px 18px;
  border: 2px solid #d69ca5;
  border-radius: 999px;
  color: #8d2835;
  background: #fff4f5f2;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 7px 20px #8d28351c;
}
.unlimited-exit-button:hover { transform: translateY(-1px); }
.result-card--unlimited {
  border: 1px solid #8bcbb2;
  background: #effaf5;
  color: #315f50;
  font-weight: 800;
}
.english-submenu-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 36px;
  margin-bottom: 4px;
}
.english-submenu-header .english-back-button {
  grid-column: 1;
  justify-self: start;
}
.english-submenu-header .panel__label {
  grid-column: 2;
  justify-self: center;
  font-weight: 800;
}
@media (max-width: 560px) {
  .english-submenu-header {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }
  .english-submenu-header .english-back-button { align-self: flex-start; }
  .english-submenu-header .panel__label { align-self: center; }
}


/* Ver.2.2r1：F2終了・nasponカンマ区切り・リスニング準備表示調整 */
.countdown.is-listening-preparing {
  padding: 24px;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 1.12;
  text-align: center;
}
