:root {
  color-scheme: light;
  --font-ui: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-display: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-score: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Avenir Next", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-emphasis-weight: 700;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #1f1f1f;
  --muted: #6b6b6b;
  --line: #d9d9d9;
  --accent: #207a73;
  --accent-soft: #d8efea;
  --warn: #aa5932;
  --own: #1e1d1b;
  --borrowed: #b93545;
  --borrowed-soft: #fff3f5;
  --special: #8f1022;
  --special-soft: #8f1022;
  --special-ink: #fff;
  --shadow: none;
  --board-width: 527px;
  --board-axis-width: 13px;
  --board-column-gap: 5px;
  --board-cell-gap: 4px;
  --compose-width: 495px;
  --range-line-size: 5px;
  --score-delta-duration: 1900ms;
  --result-section-gap: 28px;
  --result-section-gap-mobile: 24px;
  --result-secondary-button-bg: #e2eaf0;
  --result-secondary-button-hover: #d7e2e9;
  --result-secondary-button-border: #c8d4dc;
  --result-secondary-button-ink: #465a68;
  --result-ranking-surface: #f5f3ee;
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.95);
}

.app-shell {
  width: min(900px, calc(100% - 24px));
  margin: 0 auto;
  padding: 0 0 92px;
}

.topbar,
.builder {
  display: grid;
  gap: 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin: 0;
  padding: 14px 0 10px;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.play-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  max-width: var(--board-width);
  margin: 12px auto 18px;
  border: 1px solid #e4ddd6;
  border-radius: 12px;
  background: #faf8f5;
  padding: 12px 14px;
}

.play-progress-copy span,
.answer-progress-stat span,
.total-progress-stat span,
.red-progress-label span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.play-progress-copy strong {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.3;
}

.play-progress-stats {
  display: grid;
  grid-template-columns: auto auto 126px;
  align-items: center;
  gap: 14px;
}

.answer-progress-stat,
.total-progress-stat {
  min-width: 58px;
  text-align: center;
}

.answer-progress-stat strong {
  display: block;
  color: var(--accent);
  font-size: 30px;
  line-height: 1;
}

.total-progress-stat strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.red-progress-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.red-progress-label span {
  display: inline;
}

.red-progress-label strong {
  color: var(--borrowed);
  font-size: 13px;
}

.red-progress-label b {
  font-size: 20px;
}

.red-progress-track,
.result-red-progress-track {
  height: 7px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eadde0;
}

.red-progress-track span,
.result-red-progress-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--borrowed);
  transition: width 280ms ease;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: #e6e6e6;
  opacity: 0;
}

body.has-page-scroll .topbar::after {
  opacity: 1;
}

.top-stats {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.service-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 34px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: 0;
}

.compose-topic {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 700;
}

.compose-topic #topicName {
  display: inline-block;
  min-width: 3.4em;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.compose-topic #topicName.topic-name-revealing {
  opacity: 0;
  transform: translateY(4px);
}

.compose-topic small {
  font-size: 13px;
}

h1 small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.date-label,
.section-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.score-chip,
.limit-badge,
.fate-chip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.topbar .score-chip {
  min-width: 84px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  text-align: right;
}

.score-chip span,
.score-chip strong {
  display: block;
}

.score-chip span {
  color: var(--muted);
  font-size: 12px;
}

.score-chip strong {
  font-size: 22px;
}

.score-chip:first-child {
  border-color: var(--accent);
  background: #fff;
  min-width: 96px;
}

.topbar .score-chip:first-child {
  min-width: 84px;
  border-color: transparent;
  background: transparent;
}

.score-chip:first-child span,
.score-chip:first-child strong {
  color: var(--accent);
}

.score-chip:first-child strong {
  font-size: 30px;
}

.topbar .score-chip span,
.topbar .score-chip strong,
.topbar .score-chip:first-child span,
.topbar .score-chip:first-child strong {
  color: var(--ink);
}

.topbar .score-chip span {
  font-size: 11px;
  text-align: right;
}

.topbar .score-chip strong {
  font-size: 24px;
  line-height: 1.05;
  text-align: right;
}

.score-chip b {
  font: inherit;
}

.score-chip.score-pop,
.simple-score-panel.score-pop,
.total-score.score-pop {
  animation: pop-feedback 360ms ease;
}

h1.topic-pop {
  animation: topic-change-feedback 560ms ease;
}

.simple-score-panel.score-pop-strong,
.score-pop-strong {
  animation: strong-score-feedback 520ms ease;
}

@keyframes pop-feedback {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.045);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes strong-score-feedback {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(139, 95, 18, 0);
  }
  35% {
    transform: scale(1.075);
    box-shadow: 0 0 0 5px rgba(139, 95, 18, 0.22);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(139, 95, 18, 0);
  }
}

@keyframes topic-change-feedback {
  0% {
    transform: translateY(0) scale(1);
    color: var(--ink);
  }
  35% {
    transform: translateY(-3px) scale(1.045);
    color: var(--accent);
  }
  100% {
    transform: translateY(0) scale(1);
    color: var(--ink);
  }
}

.dictionary-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.inventory-panel {
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px 0 0;
  margin: 0;
}

.compose-score-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  max-width: var(--compose-width);
  margin: 0 auto 16px;
}

.compose-panel,
.live-score-panel {
  min-width: 0;
}

.compose-panel {
  position: relative;
  width: min(100%, var(--compose-width));
  justify-self: center;
}

.live-score-panel {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  align-content: start;
  width: min(112px, calc(100% - 20px));
  justify-self: end;
  margin: 0;
  z-index: 2;
}

.live-score-panel.score-open::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -12px;
  width: 100%;
  height: 12px;
}

.live-score-panel .danger-actions {
  align-self: end;
  justify-content: end;
  margin-top: 14px;
  padding-top: 8px;
}

.live-score-panel .danger-actions button {
  width: auto;
}

.score-view-actions {
  display: none;
}

.score-view-toggle {
  min-height: 34px;
  padding: 0 12px;
  color: #fff;
  font-size: 12px;
}

.board-control-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: var(--board-width);
  margin: 0 auto 8px;
  padding-right: calc(var(--board-axis-width) + var(--board-column-gap));
}

.inventory-legend {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.legend-item {
  display: inline-grid;
  min-width: 86px;
  min-height: 26px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
}

.legend-item.all {
  background: var(--muted);
}

.legend-item.borrowed {
  background: var(--borrowed);
}

.legend-item.own {
  background: var(--own);
}

.legend-item.active {
  box-shadow:
    0 0 0 2px rgba(32, 122, 115, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.95);
}

.range-visual {
  display: grid;
  gap: 6px;
  max-width: var(--board-width);
  margin: 0 auto 10px;
  padding: 0;
  padding-right: calc(var(--board-axis-width) + var(--board-column-gap));
}

.range-row {
  display: block;
}

.range-track {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  direction: rtl;
  gap: var(--board-cell-gap);
  min-height: var(--range-line-size);
}

.range-segment {
  min-height: var(--range-line-size);
  border-radius: 999px;
  background: rgba(200, 188, 169, 0.36);
  direction: ltr;
}

.range-row.borrowed .range-segment.active {
  background: var(--borrowed);
  box-shadow: 0 0 0 2px rgba(185, 53, 69, 0.12);
}

.range-row.own .range-segment.active {
  background: var(--own);
  box-shadow: 0 0 0 2px rgba(30, 29, 27, 0.1);
}

.kana-board-with-axis {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--board-axis-width);
  gap: var(--board-column-gap);
  align-items: stretch;
  max-width: var(--board-width);
  margin: 0 auto;
}

.vertical-axis-stack {
  display: grid;
  grid-template-columns: repeat(2, var(--range-line-size));
  justify-content: start;
  align-items: stretch;
  gap: var(--board-cell-gap);
  min-width: 0;
}

.vertical-axis {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  justify-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.vertical-axis.borrowed {
  color: var(--borrowed);
}

.vertical-axis.own {
  color: var(--own);
}

.vertical-track {
  display: grid;
  grid-template-rows: repeat(5, minmax(0, 1fr));
  gap: var(--board-cell-gap);
  width: var(--range-line-size);
  min-height: 100%;
}

.vertical-segment {
  border-radius: 999px;
  min-height: 100%;
  background: rgba(200, 188, 169, 0.36);
}

.vertical-axis.borrowed .vertical-segment.active {
  background: var(--borrowed);
  box-shadow: 0 0 0 2px rgba(185, 53, 69, 0.12);
}

.vertical-axis.own .vertical-segment.active {
  background: var(--own);
  box-shadow: 0 0 0 2px rgba(30, 29, 27, 0.1);
}

.kana-panel {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  grid-auto-flow: column;
  direction: rtl;
  gap: var(--board-cell-gap);
}

.kana-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 1px solid #d3d6da;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 5px 3px 12px;
  font-size: 19px;
  font-weight: 600;
  direction: ltr;
  overflow: hidden;
}

.kana-cell.borrowed.available {
  border-color: var(--borrowed);
  color: var(--borrowed);
  font-weight: 900;
}

.kana-cell.own.available {
  border-color: #2b2925;
  color: var(--own);
  font-weight: 900;
}

.kana-cell.special.available {
  border-color: var(--special);
  background: var(--special-soft);
  color: var(--special-ink);
  font-weight: 900;
}

.kana-cell.borrowed-in-range::before,
.kana-cell.own-in-range::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.kana-cell.borrowed-in-range::before {
  background: rgba(185, 53, 69, 0.18);
}

.kana-cell.own-in-range::after {
  background: rgba(30, 29, 27, 0.11);
}

.kana-cell.overlap-in-range {
  background: #fff3a6;
  border-color: #d4ad62;
  box-shadow: inset 0 0 0 1px rgba(212, 173, 98, 0.36);
}

.kana-cell.overlap-in-range.borrowed {
  color: var(--borrowed);
  font-weight: 900;
}

.kana-cell.overlap-in-range.own {
  color: var(--own);
  font-weight: 900;
}

.kana-cell.overlap-in-range.special {
  background: var(--special);
  border-color: #d4ad62;
  box-shadow: inset 0 0 0 2px rgba(255, 243, 166, 0.72);
  color: var(--special-ink);
  font-weight: 900;
}

.kana-cell.overlap-in-range::before {
  display: none;
}

.kana-cell.overlap-in-range::after {
  display: none;
}

.kana-cell.borrowed-used {
  background: #fff;
  border-color: var(--borrowed);
  box-shadow: inset 0 0 0 2px var(--borrowed);
  color: var(--borrowed);
  font-weight: 900;
}

.kana-cell.own-used {
  background: #fff;
  border-color: var(--own);
  box-shadow: inset 0 0 0 2px var(--own);
  font-weight: 900;
}

.kana-cell.overlap-in-range.borrowed-used,
.kana-cell.overlap-in-range.own-used {
  background: #fff3a6;
  border-color: #d4ad62;
  box-shadow: inset 0 0 0 2px rgba(212, 173, 98, 0.44);
}

.kana-cell.overlap-in-range.borrowed-used {
  color: var(--borrowed);
}

.kana-cell.overlap-in-range.own-used {
  color: var(--own);
}

.kana-cell.special.borrowed-used,
.kana-cell.overlap-in-range.special.borrowed-used {
  background: var(--special);
  color: var(--special-ink);
  border-color: var(--special);
}

.kana-cell.borrowed.available:hover,
.kana-cell.borrowed.available:focus-visible {
  border-color: var(--borrowed);
  background: #fff0f2;
  box-shadow: inset 0 0 0 2px rgba(185, 53, 69, 0.42);
  color: var(--borrowed);
  filter: none;
}

.kana-cell.own.available:hover,
.kana-cell.own.available:focus-visible {
  border-color: var(--own);
  background: #f0efed;
  box-shadow: inset 0 0 0 2px rgba(30, 29, 27, 0.42);
  color: var(--own);
  filter: none;
}

.kana-cell.special.available:hover,
.kana-cell.special.available:focus-visible {
  border-color: var(--special);
  background: #a9152b;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
  color: var(--special-ink);
  filter: none;
}

.kana-cell > span {
  position: relative;
  z-index: 1;
}

.kana-cell.empty {
  opacity: 0.34;
  cursor: default;
}

.kana-cell.empty.in-range {
  opacity: 0.62;
}

.kana-cell.empty.used-in-word,
.kana-cell.used-in-word {
  opacity: 1;
  border-width: 2px;
  font-weight: 900;
}

.kana-cell .count {
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: var(--own);
  font-size: 10px;
  font-weight: 600;
}

.kana-cell.used-in-word .count {
  font-weight: 900;
}

.kana-cell.borrowed-used .count,
.kana-cell.own-used .count {
  font-weight: 900;
}

.special-keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: var(--board-width);
  margin: 10px auto 0;
  padding-right: calc(var(--board-axis-width) + var(--board-column-gap));
}

.special-key {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

@media (min-width: 821px) {
  .inventory-panel {
    padding: 12px 0 0;
  }

  .compose-score-grid {
    grid-template-columns: minmax(0, var(--compose-width));
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
  }

  .compose-panel {
    justify-self: center;
  }

  .live-score-panel {
    justify-self: end;
    padding-top: 0;
  }

  .keyboard-display {
    min-height: 96px;
    padding: 10px;
  }

  .built-word {
    min-height: 44px;
    gap: 6px;
  }

  .built-letter,
  .typing-preview {
    min-height: 40px;
    font-size: 24px;
  }

  .built-letter {
    width: auto;
    min-width: 26px;
    height: 40px;
    font-size: 30px;
  }

  .typing-caret {
    height: 38px;
  }

  .score-box {
    padding: 8px 9px;
  }

  .score-box strong {
    font-size: 22px;
  }

  .simple-factor {
    min-height: 56px;
    padding: 8px;
  }

  .kana-cell {
    min-height: 0;
    padding: 5px 3px 12px;
    font-size: 19px;
  }

  .special-key {
    min-height: 40px;
  }
}

.legacy-hidden {
  display: none !important;
}

.bag-board {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 14px;
  margin: 14px 0;
}

.bag-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.letter-bag {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 108px;
}

.letter-tile {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  font-size: 28px;
  font-weight: 900;
  cursor: grab;
  user-select: none;
}

.letter-tile:active {
  cursor: grabbing;
}

.letter-tile.borrowed {
  border-color: #dc9aa3;
  background: #fff4f5;
  color: var(--borrowed);
}

.letter-tile.own {
  border-color: #2b2925;
  background: #fff;
  color: var(--own);
}

.built-letter {
  display: grid;
  place-items: center;
  width: auto;
  min-width: 28px;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 1px;
  font-size: 31px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.built-letter.borrowed {
  color: var(--borrowed);
}

.built-letter.own {
  color: var(--own);
}

.built-letter.special {
  border-radius: 6px;
  background: var(--special);
  color: var(--special-ink);
  padding: 1px 5px 3px;
}

.built-letter.special.chain-hot {
  color: var(--special-ink);
}

.built-letter.free-letter {
  color: var(--muted);
}

.built-letter.chain-hot {
  color: #8b5f12;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  box-shadow: none;
  animation: strong-score-feedback 520ms ease;
}

.tail-card .from {
  color: var(--muted);
  font-size: 14px;
}

.tail-card .from strong {
  color: var(--ink);
}

.builder {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.support-source {
  display: none;
}

.dictionary-panel {
  padding: 12px;
}

.dictionary-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(180px, 0.7fr) minmax(220px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.dictionary-panel.support-source {
  display: none;
}

.dictionary-panel .panel-title {
  display: none;
}

.support-dock {
  position: fixed;
  right: 50%;
  bottom: 12px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(760px, calc(100% - 24px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(50%);
}

.support-dock-button {
  min-height: 42px;
  border: 1px solid #d3d6da;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.support-dock-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  filter: none;
}

.support-modal-card {
  width: min(620px, 100%);
  padding: 16px;
}

.support-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.support-close-button {
  min-height: 36px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.support-modal-body .hint-panel,
.support-modal-body .history-panel {
  margin: 0;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-title.compact {
  max-width: 900px;
  margin: 0 auto 10px;
}

.limit-badge,
.fate-chip {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.craft-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.drop-zone {
  min-height: 108px;
  border: 1px dashed #c7bba9;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  padding: 12px;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.selected-words {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  min-height: 44px;
}

.selected-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.score-formula,
.bonus-formula {
  display: grid;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 10px;
}

.simple-score-panel {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  cursor: default;
}

.topbar .simple-score-panel {
  width: 100%;
}

.keyboard-display .simple-score-panel {
  width: 100%;
}

.simple-score-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 4px 8px;
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
}

.simple-score-total {
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.score-breakdown-panel {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  min-height: 24px;
  margin: -2px 0 14px;
}

.score-breakdown-panel[hidden] {
  display: none;
}

.simple-score-formula {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 2px 4px;
  overflow-wrap: anywhere;
}

.simple-score-term {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  padding: 1px 4px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.simple-score-term:focus-visible {
  outline: 2px solid rgba(32, 122, 115, 0.45);
  outline-offset: 2px;
}

.simple-score-term.red {
  border-color: rgba(195, 51, 74, 0.52);
  color: var(--borrowed);
}

.simple-score-term.black {
  border-color: rgba(43, 41, 37, 0.5);
  color: var(--own);
}

.simple-score-term.yellow {
  border-color: #d4ad62;
  background: #fff7c2;
  color: #8b5f12;
}

.simple-score-term.chain {
  border-color: rgba(68, 94, 128, 0.32);
  color: #445e80;
}

.simple-score-term.combo {
  border-color: rgba(107, 83, 132, 0.32);
  color: #6b5384;
}

.simple-score-term.combo.final-turn {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #fff;
  box-shadow:
    0 0 0 2px rgba(124, 58, 237, 0.18),
    0 0 12px rgba(124, 58, 237, 0.62);
  animation: final-multiplier-pulse 1.35s ease-in-out infinite;
}

@keyframes final-multiplier-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 2px rgba(124, 58, 237, 0.18),
      0 0 10px rgba(124, 58, 237, 0.5);
  }

  50% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 3px rgba(124, 58, 237, 0.24),
      0 0 17px rgba(124, 58, 237, 0.78);
  }
}

@media (prefers-reduced-motion: reduce) {
  .simple-score-term.combo.final-turn {
    animation: none;
  }
}

.simple-score-operator {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.simple-score-term-delta {
  position: absolute;
  left: 50%;
  bottom: 100%;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 7px) scale(0.96);
}

.simple-score-term-delta.paint {
  bottom: calc(100% + 13px);
  border-radius: 999px;
  padding: 3px 6px;
  box-shadow: 0 4px 10px rgba(29, 28, 26, 0.16);
  color: #fff;
}

.simple-score-term-delta.paint.red {
  background: var(--borrowed);
}

.simple-score-term-delta.paint.black {
  bottom: calc(100% + 27px);
  background: var(--own);
}

.simple-score-term-delta.paint.yellow {
  background: #ffe16a;
  color: #5f4510;
}

.simple-score-term-delta-run {
  animation: score-term-delta-float var(--score-delta-duration) ease-out;
}

@keyframes score-term-delta-float {
  0% {
    opacity: 0;
    transform: translate(-50%, 7px) scale(0.96);
  }

  22% {
    opacity: 1;
    transform: translate(-50%, -3px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -17px) scale(1.04);
  }
}

.simple-score-factors {
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.simple-factor {
  display: grid;
  align-content: center;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 10px;
}

.simple-factor b {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 22px;
}

.score-detail-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 16;
  width: min(780px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.topbar .danger-actions {
  position: absolute;
  top: calc(100% + 164px);
  right: 0;
  z-index: 17;
  width: max-content;
}

.live-score-panel.score-open .danger-actions {
  display: flex;
}

.live-score-panel:not(.score-open) .danger-actions {
  display: none;
}

.simple-factor.red {
  border-color: #dc9aa3;
  color: var(--borrowed);
}

.simple-factor.black {
  border-color: #2b2925;
  color: var(--own);
}

.simple-factor.yellow {
  border-color: #d4ad62;
  background: #fff7c2;
  color: #8b5f12;
}

.simple-factor.special {
  border-color: var(--special);
  background: var(--special-soft);
  color: var(--special-ink);
}

.score-formula {
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.3fr;
}

.bonus-formula {
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1.3fr;
  margin-top: -6px;
}

.score-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 12px;
}

.score-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.score-box strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
}

.score-box small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.score-box small b {
  color: inherit;
  font-weight: 900;
}

.red-score {
  border-color: #dc9aa3;
}

.red-score span,
.red-score strong {
  color: var(--borrowed);
}

.black-score {
  border-color: #2b2925;
}

.black-score span,
.black-score strong {
  color: var(--own);
}

.yellow-score {
  border-color: #d4ad62;
  background: #fff7c2;
}

.yellow-score span,
.yellow-score strong {
  color: #8b5f12;
}

.base-score {
  border-color: var(--accent);
}

.chain-score {
  border-color: #b8aa96;
}

.combo-score {
  border-color: #d4ad62;
}

.combo-score strong {
  color: #8b5f12;
}

.special-score {
  border-color: var(--special);
  background: var(--special-soft);
}

.special-score span,
.special-score strong {
  color: var(--special-ink);
}

.special-score small {
  color: rgba(255, 255, 255, 0.82);
}

.range-score {
  border-color: #8aa7a3;
}

.range-score strong {
  color: var(--accent);
}

.total-score {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.total-score strong {
  color: var(--accent);
}

.operator {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 26px;
  font-weight: 900;
}

.word-drop-zone {
  min-height: 92px;
  border: 2px solid #d3d6da;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
}

.keyboard-display {
  position: relative;
  min-height: 148px;
  margin-bottom: 10px;
  background: #fff;
}

.word-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.word-drop-zone:focus,
.word-drop-zone:focus-visible,
.word-drop-zone.typing {
  outline: 3px solid rgba(32, 122, 115, 0.22);
  border-color: var(--accent);
  background: #fffefb;
}

.type-capture {
  position: fixed;
  top: 0;
  left: -1000px;
  width: 1px;
  height: 1px;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  opacity: 0;
  pointer-events: none;
  font-size: 16px;
  transform: translateX(-200vw);
}

.built-word {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  min-height: 50px;
  align-items: center;
  padding-right: min(112px, 28%);
}

.typing-caret {
  display: none;
  width: 2px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent);
  animation: caret-blink 1s steps(2, start) infinite;
}

.word-drop-zone.typing .typing-caret {
  display: inline-flex;
}

.typing-preview {
  min-width: 42px;
  min-height: 42px;
  max-width: 100%;
  border: 1px dashed rgba(32, 122, 115, 0.42);
  border-radius: 8px;
  background: rgba(32, 122, 115, 0.08);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.typing-placeholder {
  color: rgba(29, 28, 26, 0.34);
  font-size: 15px;
  font-weight: 700;
}

.word-drop-zone.typing .typing-placeholder {
  color: rgba(32, 122, 115, 0.52);
}

@keyframes caret-blink {
  0%,
  45% {
    opacity: 1;
  }
  46%,
  100% {
    opacity: 0;
  }
}

.hint-panel,
.history-panel {
  border: 1px solid #8aa7a3;
  border-radius: 8px;
  background: #eef8f5;
  padding: 12px;
  margin-bottom: 10px;
}

.history-panel {
  border-color: #c8bca9;
  background: rgba(255, 255, 255, 0.7);
}

.hint-panel span,
.history-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hint-panel strong,
.history-panel strong {
  display: block;
  color: var(--accent);
  font-size: 22px;
}

.hint-button {
  min-height: 38px;
  margin: 8px 0;
  background: var(--accent);
  font-size: 13px;
}

.hint-list,
.answer-history {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.hint-card,
.history-card,
.history-empty {
  border: 1px solid rgba(32, 122, 115, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 10px;
}

.history-card,
.history-empty {
  border-color: rgba(200, 188, 169, 0.82);
}

.hint-card strong,
.history-card strong {
  color: var(--ink);
  font-size: 20px;
}

.hint-card.masked-hint strong {
  display: block;
  font-size: 24px;
  letter-spacing: 0;
}

.hint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hint-chip {
  border: 1px solid rgba(32, 122, 115, 0.18);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.hint-chip.borrowed {
  border-color: rgba(195, 52, 74, 0.36);
  background: rgba(255, 230, 235, 0.86);
  color: var(--borrowed);
}

.hint-chip.own {
  border-color: rgba(29, 28, 26, 0.28);
  background: rgba(244, 243, 239, 0.88);
  color: var(--ink);
}

.hint-card span,
.hint-card small,
.history-card span,
.history-card small,
.history-empty {
  margin-top: 2px;
  font-size: 12px;
}

.hint-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.history-card small,
.history-empty {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.secondary-button {
  width: 100%;
  background: #3e5063;
}

.secondary-button.debug-button {
  min-height: 30px;
  padding: 0 10px;
  background: #f1eee8;
  color: #615b52;
  font-size: 12px;
  border: 1px solid var(--line);
}

.secondary-button.give-up-button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #d8d2c9;
  background: rgba(255, 255, 255, 0.68);
  color: #6e675e;
  font-size: 12px;
}

.secondary-button.give-up-button:hover,
.secondary-button.give-up-button:focus-visible {
  border-color: #b9afa3;
  background: #fff;
  color: var(--ink);
}

.action-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  margin-top: 16px;
}

.action-row.keyboard-actions {
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 8px;
  margin: 0;
}

.action-row.keyboard-actions .secondary-button {
  min-height: 34px;
  width: auto;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
}

.action-row .secondary-button {
  width: 100%;
}

.action-row.keyboard-actions .secondary-button {
  width: auto;
}

.submit-actions {
  display: grid;
  grid-template-columns: auto;
  justify-content: center;
  align-items: start;
  justify-items: center;
  gap: 8px;
}

.danger-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
  margin-top: 10px;
}

.submit-strip {
  margin: 0 0 28px;
  padding-top: 2px;
}

.submit-primary {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.submit-actions button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.submit-actions .give-up-button {
  width: auto;
  min-height: 28px;
}

.submit-actions #submitButton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 0 20px;
  font-size: 14px;
}

.submit-actions #submitButton:disabled:not(.is-submitting) {
  background: #d8d6d1;
  color: #77736c;
  cursor: not-allowed;
  filter: none;
  opacity: 1;
}

.submit-actions #submitButton.high-score-heartbeat:not(:disabled):not(.is-submitting) {
  isolation: isolate;
  animation: submit-high-score-heartbeat 2.4s ease-in-out infinite;
  transform-origin: center;
  will-change: transform;
}

.submit-actions #submitButton.high-score-heartbeat:not(:disabled):not(.is-submitting)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgba(32, 122, 115, 0.26);
  border-radius: inherit;
  background: rgba(32, 122, 115, 0.3);
  opacity: 0;
  pointer-events: none;
  animation: submit-high-score-afterimage 2.4s ease-out infinite;
  transform-origin: center;
}

@keyframes submit-high-score-heartbeat {
  0% {
    transform: scale(1);
  }
  6% {
    transform: scale(1.06);
  }
  13% {
    transform: scale(1);
  }
  19% {
    transform: scale(1.035);
  }
  27%,
  100% {
    transform: scale(1);
  }
}

@keyframes submit-high-score-afterimage {
  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
  3% {
    opacity: 0.28;
    transform: scale(1.015);
  }
  18.75% {
    opacity: 0;
    transform: scale(1.1);
  }
  22% {
    opacity: 0.2;
    transform: scale(1.01);
  }
  40.75% {
    opacity: 0;
    transform: scale(1.07);
  }
}

.submit-actions #submitButton.is-submitting {
  background: #55636f;
  color: #fff;
  cursor: wait;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  .submit-actions #submitButton.high-score-heartbeat:not(:disabled):not(.is-submitting) {
    animation: submit-high-score-heartbeat-reduced 2.4s ease-in-out infinite;
  }

  .submit-actions #submitButton.high-score-heartbeat:not(:disabled):not(.is-submitting)::after {
    display: block;
    animation: submit-high-score-afterimage-reduced 2.4s ease-out infinite;
  }
}

@keyframes submit-high-score-heartbeat-reduced {
  0%,
  100% {
    transform: scale(1);
  }
  6% {
    transform: scale(1.025);
  }
  13% {
    transform: scale(1);
  }
  19% {
    transform: scale(1.015);
  }
  27% {
    transform: scale(1);
  }
}

@keyframes submit-high-score-afterimage-reduced {
  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }
  3% {
    opacity: 0.16;
    transform: scale(1.008);
  }
  18.75% {
    opacity: 0;
    transform: scale(1.045);
  }
  22% {
    opacity: 0.12;
    transform: scale(1.006);
  }
  40.75% {
    opacity: 0;
    transform: scale(1.03);
  }
}

.submit-actions #submitButton.is-submitting::before {
  content: "";
  width: 0.8em;
  height: 0.8em;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 999px;
  animation: submit-spin 760ms linear infinite;
}

.submit-main-label {
  font-size: 17px;
  font-weight: 800;
}

.submit-sub-label {
  font-size: 12px;
  font-weight: 500;
}

@keyframes submit-spin {
  to {
    transform: rotate(360deg);
  }
}

.check-result {
  display: none;
  pointer-events: none;
}

.check-result:empty {
  display: none;
}

.check-result.valid {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.check-result.invalid {
  border-color: #dc9aa3;
  background: #fff0f2;
  color: var(--borrowed);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(34, 32, 28, 0.46);
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.post-game-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #fff;
  padding: 28px 14px;
}

.post-game-screen.hidden {
  display: none;
}

.post-game-card {
  width: min(520px, 100%);
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  padding: clamp(24px, 6vw, 42px);
  text-align: center;
}

.post-game-character {
  position: relative;
  width: 84px;
  height: 66px;
  margin: 6px auto 12px;
}

.post-game-character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gojuo-name-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  border: 1px solid #b9dcd5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 6px rgba(30, 54, 51, 0.1);
  color: #267b75;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
}

.post-game-character .gojuo-name-tag,
.judgement-character .gojuo-name-tag,
.result-character .gojuo-name-tag,
.onboarding-gojuo-figure .gojuo-name-tag {
  position: absolute;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
}

.post-game-character .gojuo-name-tag {
  bottom: -6px;
}

.post-game-card h1 {
  margin: 0;
  font-size: clamp(24px, 6vw, 32px);
}

.post-game-lead {
  margin: 10px auto 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.post-game-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-block: 1px solid var(--line);
}

.post-game-summary div {
  padding: 18px 10px;
}

.post-game-summary div + div {
  border-left: 1px solid var(--line);
}

.post-game-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.post-game-summary dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
}

.post-game-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.post-game-share {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  text-align: left;
}

.post-game-share label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.post-game-url-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.post-game-url-copy input {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 0 11px;
  font-size: 12px;
}

.post-game-url-copy button {
  width: auto;
  min-width: 82px;
}

.post-game-retry-button {
  display: grid;
  gap: 3px;
  min-height: 62px;
  padding: 10px 18px;
}

.post-game-retry-button strong {
  font-size: 17px;
}

.post-game-retry-button small {
  font-size: 10px;
  font-weight: 800;
  opacity: 0.8;
}

.post-game-status {
  min-height: 1.5em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.post-game-ad-slot {
  min-height: 76px;
  margin-top: 28px;
  border: 1px solid #dedbd5;
  background: #faf9f6;
  color: #8a857d;
  padding: 12px;
}

.post-game-ad-slot small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.post-game-ad-slot p {
  margin: 12px 0 0;
  font-size: 11px;
}

.reward-ad-card {
  width: min(440px, 100%);
  text-align: center;
}

.reward-ad-card h2 {
  margin: 4px 0 18px;
}

.reward-ad-creative {
  min-height: 210px;
  display: grid;
  align-content: center;
  gap: 9px;
  border: 1px solid #dedbd5;
  background: #f6f5f2;
  padding: 24px;
}

.reward-ad-creative small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.reward-ad-creative strong {
  color: var(--ink);
  font-size: 23px;
}

.reward-ad-creative p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.reward-ad-progress {
  height: 5px;
  margin-top: 18px;
  overflow: hidden;
  background: #e9e7e2;
}

.reward-ad-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 1s linear;
}

.reward-ad-countdown,
.reward-ad-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reward-ad-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 9px;
  margin-top: 16px;
}

.reward-ad-status {
  min-height: 1.5em;
  margin: 10px 0 0;
}

@media (max-width: 420px) {
  .post-game-summary {
    grid-template-columns: 1fr;
  }

  .post-game-summary div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .post-game-url-copy,
  .reward-ad-actions {
    grid-template-columns: 1fr;
  }
}

.landing-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: #fff;
  overflow-y: auto;
  padding: 28px 20px;
}

.landing-card {
  width: min(540px, 100%);
  text-align: center;
}

.landing-card h1 {
  margin: 6px 0 14px;
  font-size: clamp(38px, 8vw, 58px);
  line-height: 1;
}

.landing-card .landing-lead {
  margin: 0 auto 12px;
  max-width: 26em;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.65;
}

.landing-card .landing-ai-note {
  margin: 0 auto 22px;
  max-width: 30em;
  border-left: 3px solid var(--accent);
  color: #4f5e5b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
  padding-left: 12px;
  text-align: left;
}

.landing-board-preview {
  display: grid;
  grid-template-columns: repeat(4, 52px);
  justify-content: center;
  gap: 7px;
  margin-bottom: 22px;
}

.landing-board-preview span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 26px;
  font-weight: 800;
}

.landing-board-preview .borrowed {
  border-color: var(--borrowed);
  color: var(--borrowed);
}

.landing-board-preview .own {
  border-color: var(--own);
  color: var(--own);
}

.landing-board-preview .overlap {
  border-color: #cba148;
  background: #fff1a6;
  color: var(--ink);
}

.landing-board-preview .empty {
  color: #aaa49b;
}

.landing-name-field {
  display: grid;
  gap: 7px;
  width: min(360px, 100%);
  margin: 0 auto;
  text-align: left;
}

.landing-name-field > span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.landing-name-field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.landing-name-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  padding: 0 14px;
}

.landing-name-field input:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.landing-card .landing-name-note {
  margin: 7px auto 18px;
  width: min(360px, 100%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.landing-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(320px, 100%);
  margin: 0 auto;
}

.landing-actions #landingStartButton {
  min-height: 52px;
  font-size: 17px;
}

.landing-legal-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
}

.landing-legal-links a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.legal-page header {
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  padding-bottom: 22px;
}

.legal-page h1 {
  margin: 8px 0;
  font-size: 34px;
}

.legal-page h2 {
  margin: 30px 0 10px;
  font-size: 20px;
}

.legal-page p,
.legal-page li {
  color: #4f4f4f;
  line-height: 1.8;
}

.legal-page footer {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.legal-page a {
  color: var(--accent);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.modal-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.modal-card strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 48px;
  line-height: 1;
}

.modal-card p {
  color: var(--muted);
  font-weight: 800;
}

.onboarding-card {
  width: min(560px, 100%);
  max-height: min(94vh, 760px);
  overflow-y: auto;
  padding: 18px;
}

.daily-date-change-card {
  width: min(420px, 100%);
  text-align: center;
}

.daily-date-change-card h2 {
  margin: 8px 0 12px;
}

.daily-date-change-card p:not(.section-kicker) {
  margin: 0 0 20px;
  line-height: 1.7;
}

.daily-date-change-card button {
  width: 100%;
}

.onboarding-slider {
  position: relative;
  margin: 14px 0 10px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.onboarding-slide {
  display: none;
  animation: onboarding-panel-in 260ms ease-out both;
}

.onboarding-details {
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.onboarding-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 11px 13px;
}

.onboarding-details ul {
  margin: 0;
  padding: 0 18px 14px 34px;
}

.onboarding-details li {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.65;
}

.onboarding-slide.active {
  display: block;
}

.onboarding-header {
  text-align: center;
}

.onboarding-header .section-kicker {
  margin: 0 0 3px;
}

.onboarding-header h2 {
  margin: 0;
  font-size: clamp(21px, 5vw, 28px);
  line-height: 1.2;
}

.onboarding-comic {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 172px;
  grid-template-rows: auto minmax(240px, 1fr);
  min-height: 388px;
  overflow: hidden;
  border-radius: 18px;
  background: #f5e8b8;
  isolation: isolate;
}

.onboarding-comic::before,
.onboarding-comic::after {
  position: absolute;
  border-radius: 999px;
  content: "";
  z-index: -1;
}

.onboarding-comic::before {
  right: -72px;
  bottom: -88px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.56);
}

.onboarding-comic::after {
  left: -45px;
  top: 28px;
  width: 120px;
  height: 120px;
  border: 18px solid rgba(255, 255, 255, 0.3);
}

.onboarding-comic-tiles {
  background: #f4d6d8;
}

.onboarding-comic-judge {
  background: #cfe8e3;
}

.onboarding-scene-number {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--own);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  z-index: 3;
}

.onboarding-gojuo-figure {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  justify-self: center;
  width: 170px;
  height: 160px;
  margin-top: 58px;
}

.onboarding-gojuo {
  display: block;
  width: 170px;
  height: 142px;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(49, 41, 29, 0.16));
}

.onboarding-gojuo-figure .gojuo-name-tag {
  bottom: 0;
}

.onboarding-speech {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  justify-self: center;
  width: 150px;
  margin: 0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink) !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  padding: 13px 14px;
  text-align: center;
  box-shadow: 0 5px 0 rgba(39, 36, 31, 0.12);
}

.onboarding-speech::before {
  position: absolute;
  top: -15px;
  left: 50%;
  width: 26px;
  height: 26px;
  background: #fff;
  content: "";
  transform: translateX(-50%) rotate(45deg);
  z-index: -1;
}

.onboarding-scene-copy {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  padding: 54px 8px 30px 62px;
  text-align: left;
}

.onboarding-scene-copy h3 {
  margin: 0 0 18px;
  font-size: clamp(27px, 5.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.onboarding-scene-copy > p {
  margin: 14px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.onboarding-scene-copy > p strong {
  display: inline;
  margin: 0;
  color: var(--accent);
  font-size: inherit;
  line-height: inherit;
}

.onboarding-word-race {
  display: grid;
  align-items: end;
  gap: 7px;
}

.onboarding-word-race > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: min(100%, 250px);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  padding: 7px 10px;
}

.onboarding-word-race > span.winner {
  width: min(100%, 294px);
  background: #fff;
  box-shadow: 0 4px 0 #d39f17;
}

.onboarding-word-race b {
  font-size: 15px;
  white-space: nowrap;
}

.onboarding-word-race small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.onboarding-word-race .winner small {
  color: #9b6f00;
  font-size: 13px;
}

.onboarding-comic-word {
  display: flex;
  gap: 4px;
}

.onboarding-comic-word b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 52px;
  border: 2px solid currentColor;
  border-radius: 9px;
  background: #fff;
  font-size: 26px;
}

.onboarding-comic-word .borrowed {
  color: var(--borrowed);
}

.onboarding-comic-word .own {
  color: var(--own);
}

.onboarding-score-pop {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  transform: rotate(-2deg);
}

.onboarding-score-pop strong {
  display: inline;
  margin: 0;
  color: var(--accent);
  font-size: 27px;
  line-height: 1;
}

.onboarding-judge-result {
  display: flex;
  gap: 8px;
  margin: 12px 0 18px;
}

.onboarding-judge-result span {
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 13px;
}

.onboarding-judge-result .ok {
  background: var(--accent);
}

.onboarding-judge-result .ng {
  background: var(--borrowed);
}

.onboarding-scene-copy .onboarding-appeal-note {
  margin-top: 4px;
}

.onboarding-scene-copy .onboarding-appeal-note strong {
  color: var(--borrowed);
}

@keyframes onboarding-panel-in {
  from {
    opacity: 0;
    transform: translateX(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 0 4px;
}

.onboarding-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #d8d0c5;
  padding: 0;
}

.onboarding-dots button.active {
  background: var(--accent);
  transform: scale(1.25);
}

.onboarding-swipe-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: minmax(88px, 0.38fr) minmax(0, 1fr);
  gap: 9px;
}

.onboarding-actions button {
  width: 100%;
  min-height: 48px;
}

.onboarding-actions #onboardingStartButton {
  background: #e2a51c;
  color: #281d08;
  box-shadow: 0 4px 0 #b57c05;
}

.onboarding-actions #onboardingStartButton:active {
  box-shadow: none;
  transform: translateY(3px);
}

@media (max-width: 560px) {
  .onboarding-modal {
    align-items: start;
    padding: 10px;
  }

  .onboarding-card {
    max-height: calc(100dvh - 20px);
    padding: 14px;
  }

  .onboarding-comic {
    grid-template-columns: minmax(0, 1fr) 118px;
    grid-template-rows: auto minmax(220px, 1fr);
    min-height: 355px;
    border-radius: 15px;
  }

  .onboarding-gojuo {
    width: 118px;
    height: 104px;
  }

  .onboarding-gojuo-figure {
    width: 118px;
    height: 120px;
    margin-top: 62px;
  }

  .onboarding-speech {
    width: 112px;
    font-size: 13px !important;
    padding: 10px 8px;
  }

  .onboarding-scene-copy {
    padding: 54px 3px 24px 48px;
  }

  .onboarding-scene-copy h3 {
    margin-bottom: 14px;
    font-size: clamp(24px, 7.2vw, 32px);
  }

  .onboarding-scene-copy > p {
    font-size: 12px;
  }

  .onboarding-comic-word b {
    width: clamp(38px, 11vw, 46px);
    height: 46px;
    font-size: 23px;
  }

  .onboarding-word-race > span,
  .onboarding-word-race > span.winner {
    width: 100%;
  }

  .onboarding-word-race b {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  .onboarding-details {
    margin-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .onboarding-slide {
    animation: none;
  }
}

.transient-modal {
  background: rgba(34, 32, 28, 0.28);
}

.missing-input-card {
  border-color: #dc9aa3;
  background: #fff0f2;
  text-align: center;
}

.missing-input-card h2 {
  color: var(--borrowed);
}

.missing-input-card p {
  color: var(--borrowed);
}

.missing-input-card .missing-input-chars {
  color: var(--borrowed);
  font-size: 42px;
  letter-spacing: 0;
}

.judgement-card.valid {
  border-color: #5cb7ae;
}

.judgement-card.invalid {
  border-color: #dc9aa3;
}

.judgement-card.unavailable {
  border-color: #d3a23f;
}

.judgement-card.valid .section-kicker,
.judgement-card.valid h2 {
  color: #167c73;
}

.judgement-card.valid .section-kicker {
  display: inline-flex;
  border-radius: 999px;
  background: #167c73;
  color: #fff;
  padding: 3px 7px;
}

.judgement-card.invalid .section-kicker,
.judgement-card.invalid h2 {
  color: var(--borrowed);
}

.judgement-card.unavailable .section-kicker,
.judgement-card.unavailable h2 {
  color: #9a6710;
}

.judgement-card {
  width: min(380px, 100%);
  padding: 18px;
}

.judgement-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  gap: 8px;
  min-height: 78px;
}

.judgement-heading {
  align-self: center;
}

.judgement-kicker-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}

.judgement-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border: 1px solid #d9d6d0;
  border-radius: 999px;
  background: #f1f0ed;
  padding: 1px 6px;
  color: #68645e;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.judgement-source-badge.hidden {
  display: none;
}

.judgement-character {
  position: relative;
  width: 118px;
  margin: -12px -4px -10px 0;
  text-align: center;
  transform-origin: 50% 80%;
}

.judgement-character img {
  display: block;
  width: 118px;
  height: 78px;
  object-fit: contain;
}

.judgement-character .gojuo-name-tag {
  bottom: -2px;
}

.judgement-character.is-changing {
  animation: judgement-character-arrive 360ms cubic-bezier(.2, .85, .28, 1.25) both;
}

@keyframes judgement-character-arrive {
  0% { opacity: 0; transform: translateY(7px) scale(.9) rotate(-2deg); }
  65% { opacity: 1; transform: translateY(-2px) scale(1.03) rotate(1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.judgement-card .section-kicker {
  margin: 0;
  font-size: 11px;
  line-height: 1.2;
}

.judgement-card h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.judgement-word {
  display: block;
  margin: 16px 0 9px;
  color: var(--ink);
  font-size: clamp(20px, 5vw, 25px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.judgement-card #judgementReason {
  margin: 0;
  color: #55514b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.judgement-score {
  display: block;
  margin: 8px 0 12px;
  color: var(--accent);
  font-size: clamp(34px, 9vw, 48px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.judgement-card.appeal-pending #judgementCloseButton {
  display: none;
}

.judgement-card .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.judgement-card .modal-actions button {
  min-height: 42px;
}

.judgement-card.invalid #judgementCloseButton,
.judgement-card.unavailable #judgementCloseButton {
  border: 1px solid #d8d5d0;
  background: #efeeeb;
  color: #4f4c47;
}

.judgement-card.valid.game-final #judgementCloseButton {
  background: #168a72;
  color: #fff;
  box-shadow: 0 5px 14px rgba(22, 138, 114, 0.2);
}

@media (max-width: 370px) {
  .judgement-header {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .judgement-character,
  .judgement-character img {
    width: 96px;
  }

  .judgement-character img {
    height: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .judgement-character.is-changing {
    animation: none;
  }
}

.result-card {
  position: relative;
  width: min(620px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 18px 30px 10px;
}

.result-confetti {
  position: absolute;
  inset: 0 0 auto;
  height: 150px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.result-confetti i {
  position: absolute;
  top: -18px;
  left: var(--confetti-x);
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: var(--confetti-color);
  opacity: 0;
  transform: translateY(-10px) rotate(0deg);
}

.result-confetti i:nth-child(1) { --confetti-x: 7%; --confetti-color: #ef476f; --confetti-delay: 0ms; }
.result-confetti i:nth-child(2) { --confetti-x: 15%; --confetti-color: #ffd166; --confetti-delay: 90ms; }
.result-confetti i:nth-child(3) { --confetti-x: 24%; --confetti-color: #6845d6; --confetti-delay: 30ms; }
.result-confetti i:nth-child(4) { --confetti-x: 34%; --confetti-color: #31a891; --confetti-delay: 150ms; }
.result-confetti i:nth-child(5) { --confetti-x: 43%; --confetti-color: #ef476f; --confetti-delay: 65ms; }
.result-confetti i:nth-child(6) { --confetti-x: 51%; --confetti-color: #ffd166; --confetti-delay: 190ms; }
.result-confetti i:nth-child(7) { --confetti-x: 59%; --confetti-color: #6845d6; --confetti-delay: 15ms; }
.result-confetti i:nth-child(8) { --confetti-x: 67%; --confetti-color: #31a891; --confetti-delay: 120ms; }
.result-confetti i:nth-child(9) { --confetti-x: 74%; --confetti-color: #ef476f; --confetti-delay: 210ms; }
.result-confetti i:nth-child(10) { --confetti-x: 82%; --confetti-color: #ffd166; --confetti-delay: 50ms; }
.result-confetti i:nth-child(11) { --confetti-x: 89%; --confetti-color: #6845d6; --confetti-delay: 170ms; }
.result-confetti i:nth-child(12) { --confetti-x: 95%; --confetti-color: #31a891; --confetti-delay: 105ms; }

.result-card.celebrating .result-confetti i {
  animation: result-confetti-fall 900ms cubic-bezier(0.2, 0.75, 0.35, 1) var(--confetti-delay) both;
}

.result-card:not(.result-design-variant) .result-confetti {
  height: 210px;
  overflow: visible;
}

.result-card:not(.result-design-variant) .result-confetti i {
  top: 72px;
  left: var(--cracker-origin-x);
  width: 9px;
  height: 13px;
  border-radius: 2px;
}

.result-card:not(.result-design-variant) .result-confetti i:nth-child(-n+6) {
  --cracker-origin-x: 13%;
}

.result-card:not(.result-design-variant) .result-confetti i:nth-child(n+7) {
  --cracker-origin-x: 87%;
}

.result-card:not(.result-design-variant) .result-confetti i:nth-child(1) { --cracker-x: -58px; --cracker-y: -66px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(2) { --cracker-x: -31px; --cracker-y: -91px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(3) { --cracker-x: 5px; --cracker-y: -104px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(4) { --cracker-x: 38px; --cracker-y: -84px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(5) { --cracker-x: 65px; --cracker-y: -52px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(6) { --cracker-x: 82px; --cracker-y: -18px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(7) { --cracker-x: 58px; --cracker-y: -66px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(8) { --cracker-x: 31px; --cracker-y: -91px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(9) { --cracker-x: -5px; --cracker-y: -104px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(10) { --cracker-x: -38px; --cracker-y: -84px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(11) { --cracker-x: -65px; --cracker-y: -52px; }
.result-card:not(.result-design-variant) .result-confetti i:nth-child(12) { --cracker-x: -82px; --cracker-y: -18px; }

.result-card:not(.result-design-variant).celebrating .result-confetti i {
  animation: result-confetti-cracker 1050ms cubic-bezier(0.18, 0.72, 0.3, 1) var(--confetti-delay) both;
}

.result-card.celebrating .result-score-hero {
  animation: result-score-reveal 520ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

.result-summary {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

.result-character {
  width: 86px;
  height: 70px;
  margin: 18px auto 0;
  overflow: hidden;
  pointer-events: none;
}

.result-character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-summary-title .section-kicker {
  margin: 0 0 2px;
  font-size: 10px;
}

.result-summary-title h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.result-praise {
  margin: 2px 0 0;
  color: var(--accent);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.result-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.result-achievements span {
  border-radius: 999px;
  background: #fff0c9;
  color: #765514;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
}

@keyframes result-score-reveal {
  0% { opacity: 0; transform: translateY(8px) scale(0.84); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes result-confetti-fall {
  0% { opacity: 0; transform: translateY(-10px) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(150px) rotate(300deg); }
}

@keyframes result-confetti-cracker {
  0% {
    opacity: 0;
    transform: translate(0, 8px) scale(0.5) rotate(0deg);
  }
  12% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform: translate(var(--cracker-x), var(--cracker-y)) scale(1) rotate(250deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--cracker-x), calc(var(--cracker-y) + 42px)) scale(0.82) rotate(410deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-card.celebrating .result-confetti i,
  .result-card.celebrating .result-score-hero {
    animation: none;
  }

  .result-confetti {
    display: none;
  }
}

.result-score-hero {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 3px;
  grid-column: 1;
  grid-row: auto;
}

.result-card:not(.result-design-variant) .result-summary {
  justify-items: center;
  text-align: center;
}

.result-card:not(.result-design-variant) .result-summary-title .section-kicker {
  display: none;
}

.result-card:not(.result-design-variant) .result-summary-title h2 {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

#gameOverTitle:focus {
  outline: none;
}

.result-card:not(.result-design-variant) .result-score-hero {
  justify-content: center;
  width: 100%;
}

.result-score-hero span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 900;
}

.result-score-hero strong {
  display: inline;
  margin: 0;
  color: var(--accent);
  font-size: clamp(54px, 10.5vw, 75px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.result-summary > #gameOverReason {
  grid-column: 1;
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.result-daily-status {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1;
  gap: 6px 14px;
  margin-top: 5px;
}

.result-card:not(.result-design-variant) .result-summary > #gameOverReason,
.result-card:not(.result-design-variant) .result-daily-status {
  display: none;
}

.result-daily-status > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.result-daily-status strong {
  display: inline;
  margin: 0 0 0 3px;
  margin-left: 4px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
}

.result-red-progress {
  margin-top: var(--result-section-gap);
  border: 1px solid #e5c7cc;
  border-radius: 10px;
  background: #fff8f9;
  padding: 12px;
}

.result-red-progress > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--borrowed);
  font-size: 12px;
  font-weight: 900;
}

.result-red-progress strong {
  font-size: 16px;
}

.result-red-progress-track {
  height: 10px;
  background: #eadde0;
}

.result-remaining-reds {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.result-remaining-red {
  position: relative;
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--borrowed);
  border-radius: 5px;
  background: var(--borrowed-soft);
  color: var(--borrowed);
  font-size: 17px;
  font-weight: 900;
}

.result-remaining-red small {
  position: absolute;
  right: -4px;
  bottom: -4px;
  border-radius: 999px;
  background: var(--borrowed);
  color: #fff;
  padding: 1px 4px;
  font-size: 8px;
  line-height: 1.2;
}

.result-best-word-section {
  margin-top: var(--result-section-gap);
}

.result-best-word-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.result-best-word-heading h3 {
  margin: 0;
  font-size: 15px;
}

.result-card .result-section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin: 0;
  border-radius: 6px;
  background: #efeeeb;
  color: var(--ink);
  padding: 4px 9px 5px;
  font-size: 15px;
  line-height: 1.1;
}

.result-best-word-heading strong {
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 3px 9px;
  font-size: 16px;
}

.result-best-word {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1px;
}

.result-best-word .built-letter {
  position: relative;
  min-width: 0;
  padding: 0;
  font-size: 31px;
  pointer-events: none;
}

.result-best-word .built-letter.special {
  min-width: 36px;
  border-radius: 6px;
  background: var(--special);
  color: var(--special-ink);
  padding: 1px 5px 3px;
}

.result-best-word .built-letter.free-letter {
  color: var(--muted);
}

@media (max-width: 520px) {
  .result-score-hero strong { font-size: 54px; }
}

.result-best-word.empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.result-footer {
  display: grid;
  gap: 32px;
  margin-top: var(--result-section-gap);
  border-top: 0;
  background: var(--surface);
  padding-top: 0;
}

.result-share-option {
  display: grid;
  gap: 12px;
  border-radius: 0;
  background: transparent;
  padding: 0 2px;
}

.result-share-option + .result-share-option {
  border-top: 0;
  padding-top: 0;
}

.result-share-option > div:first-child {
  display: grid;
  gap: 8px;
}

.result-share-option h3,
.result-share-option p {
  margin: 0;
}

.result-share-option h3 {
  font-size: 15px;
}

.result-share-option p {
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.result-share-option button {
  min-height: 42px;
  border: 1px solid var(--result-secondary-button-border);
  background: var(--result-secondary-button-bg);
  color: var(--result-secondary-button-ink);
}

.result-share-option button:hover:not(:disabled) {
  background: var(--result-secondary-button-hover);
}

#resultShareButton {
  min-height: 40px;
  height: 40px;
}

.result-url-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.result-url-copy input {
  min-width: 0;
  height: 42px;
  border: 1px solid #d7d3cc;
  border-radius: 6px;
  background: #fff;
  color: #4d4943;
  padding: 0 10px;
  font-size: 12px;
}

.result-url-copy button {
  width: auto;
  min-width: 82px;
  padding: 0 14px;
}

.result-done-button {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
}

.result-board-section,
.result-history-section {
  margin-top: var(--result-section-gap);
}

.result-board-section + .result-history-section {
  margin-top: 42px;
}

.result-board-section h3,
.result-history-section h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.result-history-section > .result-section-label {
  margin-bottom: 12px;
}

.result-board {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  grid-template-rows: repeat(5, minmax(0, 1fr));
  grid-auto-flow: column;
  direction: rtl;
  gap: 4px;
}

.result-board-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border: 1px solid #e7e2da;
  border-radius: 4px;
  background: #fff;
  color: #c5c0ba;
  font-size: 16px;
  font-weight: 900;
  direction: ltr;
  overflow: hidden;
}

.result-board-cell > span,
.result-board-cell .result-board-order {
  position: relative;
  z-index: 1;
}

.result-board-cell .result-board-order {
  position: absolute;
  right: 3px;
  bottom: 2px;
  color: inherit;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.82;
}

.result-board-cell.sequence-start {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.result-board-cell.sequence-end {
  outline: 2px solid var(--borrowed);
  outline-offset: -3px;
}

.result-board-cell.empty {
  background: #fafafa;
  color: transparent;
}

.result-board-cell.borrowed-in-range::before,
.result-board-cell.own-in-range::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.result-board-cell.borrowed-in-range::before {
  background: rgba(185, 53, 69, 0.18);
}

.result-board-cell.own-in-range::after {
  background: rgba(30, 29, 27, 0.11);
}

.result-board-cell.overlap-in-range {
  border-color: #d4ad62;
  background: #fff3a6;
  box-shadow: inset 0 0 0 1px rgba(212, 173, 98, 0.36);
}

.result-board-cell.overlap-in-range::before,
.result-board-cell.overlap-in-range::after {
  display: none;
}

.result-board-cell.borrowed,
.result-board-cell.borrowed-used {
  border-color: var(--borrowed);
  color: var(--borrowed);
}

.result-board-cell.own,
.result-board-cell.own-used {
  border-color: var(--own);
  color: var(--own);
}

.result-board-cell.borrowed-used,
.result-board-cell.own-used {
  background: #fff;
}

.result-board-cell.overlap,
.result-board-cell.overlap-in-range.borrowed-used,
.result-board-cell.overlap-in-range.own-used {
  border-color: #d4ad62;
  background: #fff3a6;
  color: var(--ink);
}

.result-board-cell.overlap.borrowed-used {
  color: var(--borrowed);
}

.result-board-cell.overlap.own-used {
  color: var(--own);
}

.result-board-cell.overlap-in-range.borrowed-used {
  color: var(--borrowed);
}

.result-board-cell.overlap-in-range.own-used:not(.borrowed-used) {
  color: var(--own);
}

.result-board-cell.special,
.result-board-cell.special.borrowed-used,
.result-board-cell.overlap-in-range.special.borrowed-used {
  border-color: var(--special);
  background: var(--special);
  color: var(--special-ink);
}

.result-history-list {
  display: grid;
  gap: 0;
}

.result-history-row,
.result-history-empty {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-bottom: 1px dotted #c8c3bb;
  border-radius: 0;
  padding: 10px 2px;
}

.result-history-row:last-child {
  border-bottom: 0;
}

.result-history-row strong {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.result-history-word {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
}

.result-history-letter {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

.result-history-letter.borrowed {
  color: var(--borrowed);
}

.result-history-letter.own {
  color: var(--ink);
}

.result-history-letter.special {
  display: inline-grid;
  min-width: 25px;
  min-height: 28px;
  margin: -5px 1px;
  padding: 0 4px;
  place-items: center;
  border-radius: 5px;
  background: var(--special);
  color: var(--special-ink);
}

.result-history-meta,
.result-history-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.result-history-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  text-align: right;
}

.result-ranking-section,
.result-world-ranking-section {
  margin-top: var(--result-section-gap);
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.result-ranking-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.result-ranking-heading h3 {
  margin: 0;
  font-size: 15px;
}

.result-ranking-period-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid #d9d4cb;
}

.result-ranking-period-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 8px 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  box-shadow: none;
}

.result-ranking-period-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.result-ranking-period-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.result-ranking-period-range {
  min-height: 18px;
  margin: 10px 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.result-ranking-summary-status {
  margin: 18px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.result-ranking-top {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-ranking-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border-bottom: 1px dotted #c8c3bb;
  padding: 7px 4px;
  color: var(--muted);
}

.result-ranking-top-row:last-child {
  border-bottom: 0;
}

.result-ranking-top-row span {
  font-size: 12px;
  font-weight: 800;
}

.result-ranking-top-row strong {
  color: var(--ink);
  font-family: var(--font-score);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.result-ranking-status {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-ranking-position {
  --ranking-position: 0%;
  --ranking-visible-position: var(--ranking-position);
  display: grid;
  margin-top: 0;
  border-radius: 10px;
  background: var(--result-ranking-surface);
  padding: 10px 12px 12px;
}

.result-ranking-position.ranking-awaiting-reveal {
  --ranking-visible-position: 0%;
}

.result-ranking-position-track {
  position: relative;
  height: 24px;
  margin: 0 7px;
}

.result-ranking-position-track::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 0;
  left: 0;
  height: 18px;
  border-right: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat;
}

.result-ranking-position-marker {
  position: absolute;
  top: 0;
  left: clamp(0px, var(--ranking-visible-position), 100%);
  width: 3px;
  height: 24px;
  border-radius: 1px;
  background: var(--special);
  transform: translateX(-50%);
  transition: left 960ms cubic-bezier(0.16, 0.78, 0.24, 1) 420ms;
}

.result-ranking-position-marker::after {
  content: "";
  position: absolute;
  top: 0;
  left: 3px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid var(--special);
}

.result-ranking-position-edges {
  display: flex;
  justify-content: space-between;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.result-card .result-ranking-position-label {
  display: block;
  position: relative;
  left: clamp(42px, var(--ranking-visible-position), calc(100% - 42px));
  width: max-content;
  margin: -12px 0 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  transform: translateX(-50%);
  transition: left 960ms cubic-bezier(0.16, 0.78, 0.24, 1) 420ms;
}

.result-ranking-around {
  display: grid;
  gap: 5px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.result-ranking-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 0;
  border-bottom: 1px dotted #c8c3bb;
  border-radius: 0;
  background: transparent;
  padding: 6px 2px;
  color: #77736c;
  font-size: 12px;
  font-weight: 800;
}

.result-ranking-row.current {
  min-height: 50px;
  border: 0;
  border-bottom: 0;
  background: var(--accent-soft);
  color: var(--accent);
  margin: 0 0 6px;
  padding: 14px 12px;
  font-size: 14px;
  box-shadow: none;
}

.result-ranking-row:has(+ .result-ranking-row.current) {
  border-bottom: 0;
}

.result-ranking-row:last-child {
  border-bottom: 0;
}

.result-ranking-rank {
  color: inherit;
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

.result-ranking-row.current .result-ranking-rank {
  font-size: 18px;
}

.result-ranking-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-ranking-score {
  color: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 950;
}

.result-ranking-score-cell {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 0;
}

.result-ranking-next {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.result-card .result-ranking-row:not(.current) .result-ranking-score {
  display: inline;
  margin: 0;
  font-size: 12px;
  line-height: 1;
}

.result-ranking-row.current .result-ranking-score {
  color: var(--accent);
  font-size: 20px;
}

.result-ranking-section > #resultRankingButton {
  width: 100%;
  margin-top: 10px;
}

.result-retry-section {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-top: var(--result-section-gap);
  border-radius: 12px;
  background: #edf8f5;
  padding: 22px 20px;
  text-align: center;
}

.result-footer + .result-retry-section {
  margin-top: var(--result-section-gap);
}

.result-retry-section .section-kicker,
.result-retry-section p {
  margin: 0;
}

.result-retry-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: min(100%, 430px);
  margin: 0 auto 2px;
}

.result-retry-section .result-character {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 108px;
  height: 88px;
  margin: 0;
  overflow: visible;
  background: none;
}

.result-retry-section .result-character img {
  display: block;
  transform: scale(1.28);
  transform-origin: center;
}

.result-retry-section .result-character .gojuo-name-tag {
  bottom: -5px;
}

.result-retry-speech {
  position: relative;
  min-width: 0;
  border: 1px solid #b9dcd5;
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  text-align: left;
}

.result-retry-speech::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -8px;
  width: 14px;
  height: 14px;
  border-bottom: 1px solid #b9dcd5;
  border-left: 1px solid #b9dcd5;
  background: #fff;
  transform: translateY(-50%) rotate(45deg);
}

.result-retry-section #restartButton {
  width: min(100%, 420px);
  min-height: 58px;
  margin-top: 4px;
  font-size: 18px;
  box-shadow: 0 5px 14px rgba(27, 125, 111, 0.2);
}

@media (max-width: 520px) {
  .result-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .result-red-progress,
  .result-best-word-section,
  .result-board-section,
  .result-history-section,
  .result-ranking-section,
  .result-world-ranking-section,
  .result-footer,
  .result-footer + .result-retry-section {
    margin-top: var(--result-section-gap-mobile);
  }

  .result-board-section + .result-history-section {
    margin-top: 36px;
  }

  .result-ranking-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .result-ranking-row.current {
    margin: 0 0 6px;
    padding: 12px 8px;
  }

  .result-footer {
    gap: 28px;
  }

  .result-ranking-position {
    padding: 9px 10px 11px;
  }

  .result-retry-section {
    padding: 18px 14px;
  }

  .result-retry-message {
    gap: 2px;
  }

  .result-retry-section .result-character {
    width: 94px;
    height: 78px;
  }

  .result-retry-section .result-character img {
    transform: scale(1.18);
  }

  .result-retry-speech {
    padding: 9px 10px;
    font-size: 13px;
  }

  .result-retry-section #restartButton {
    width: 100%;
    min-height: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-ranking-position-marker,
  .result-card .result-ranking-position-label {
    transition-duration: 620ms;
    transition-delay: 320ms;
  }
}

/*
 * Typography roles
 *
 * Chrome synthesizes unusually heavy glyphs when a Japanese font has no
 * matching 800/900 face. Headings and key figures therefore use only real,
 * commonly available 600/700 faces. Kana tiles keep their stronger weight so
 * the puzzle board remains easy to scan.
 */
h1,
h2,
h3,
h4,
h5,
h6,
.compose-topic,
.landing-card h1,
.legal-page h1,
.legal-page h2,
.onboarding-header h2,
.onboarding-scene-copy h3,
.judgement-card h2,
.result-summary-title h2,
.result-best-word-heading h3,
.result-board-section h3,
.result-history-section h3,
.result-ranking-heading h3,
.result-share-option h3 {
  font-family: var(--font-display);
  font-weight: var(--font-heading-weight);
}

h1 small,
.compose-topic small,
.play-progress-copy strong,
.landing-card .landing-lead,
.landing-card .landing-ai-note,
.onboarding-scene-copy > p,
.onboarding-word-race small,
.onboarding-score-pop,
.onboarding-judge-result span,
.result-praise,
.result-achievements span,
.result-red-progress > div:first-child,
.result-ranking-status,
.result-ranking-row,
.result-retry-section > p:not(.section-kicker) {
  font-weight: var(--font-emphasis-weight);
}

.onboarding-scene-number,
.onboarding-speech {
  font-weight: var(--font-emphasis-weight) !important;
}

.judgement-word {
  font-family: var(--font-display);
  font-weight: var(--font-heading-weight);
}

.answer-progress-stat strong,
.total-progress-stat strong,
.red-progress-label b,
.onboarding-score-pop strong,
.judgement-score,
.result-score-hero strong,
.result-best-word-heading strong,
.result-ranking-rank,
.result-ranking-score {
  font-family: var(--font-score);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-emphasis-weight);
}

.result-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #f3f0ea;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-chip.total {
  background: var(--accent-soft);
  color: var(--accent);
}

.result-chip.red {
  background: #fff0f2;
  color: var(--borrowed);
}

.result-chip.red-special {
  background: var(--special);
  color: var(--special-ink);
}

.result-chip.black {
  background: #efeeeb;
  color: var(--own);
}

.result-chip.yellow {
  background: #fff4b8;
  color: #8d6b18;
}

.result-chip.yellow-muted {
  background: #eee9d6;
  color: #756a48;
}

.result-chip.chain {
  background: #eef3fb;
  color: #40566e;
}

.result-chip.combo {
  background: var(--accent-soft);
  color: var(--accent);
}

.result-share-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--accent);
  font-size: 13px;
  text-align: center;
}

.result-share-status:empty {
  display: none;
}

.appeal-button {
  border-color: #9f2435;
  background: #a72e40;
  color: #fff5f7;
}

.appeal-remaining {
  margin: 0.7rem 0 0;
  color: #c83243;
  font-weight: 800;
  text-align: center;
}

@media (max-width: 820px) {
  :root {
    --board-width: 100%;
    --board-axis-width: clamp(10px, 3.4vw, 13px);
    --board-column-gap: clamp(3px, 1.1vw, 5px);
    --board-cell-gap: clamp(2px, 0.9vw, 4px);
    --range-line-size: clamp(4px, 1.1vw, 5px);
  }

  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 18px;
  }

  .landing-screen {
    align-items: start;
    padding: 22px 16px 34px;
  }

  .landing-board-preview {
    grid-template-columns: repeat(4, 46px);
    margin-bottom: 18px;
  }

  .landing-board-preview span {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }

  .builder {
    grid-template-columns: 1fr;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .top-stats {
    justify-content: end;
  }

  .bag-board,
  .compose-score-grid,
  .simple-score-panel,
  .score-formula,
  .bonus-formula,
  .dictionary-panel,
  .action-row {
    grid-template-columns: 1fr;
  }

  .submit-strip,
  .submit-actions {
    grid-template-columns: 1fr;
  }

  .submit-actions button {
    width: auto;
  }

  .submit-primary {
    justify-content: start;
  }

  .submit-primary #submitButton {
    width: 100%;
  }

  .danger-actions {
    justify-content: end;
  }

  .simple-score-factors {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operator {
    min-height: 20px;
  }

  .kana-board-with-axis {
    grid-template-columns: minmax(0, 1fr) var(--board-axis-width);
    gap: var(--board-column-gap);
    width: 100%;
    max-width: 100%;
  }

  .range-visual,
  .special-keys {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .board-control-strip {
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-right: 0;
  }

  .vertical-axis-stack {
    grid-template-columns: repeat(2, var(--range-line-size));
    gap: var(--board-cell-gap);
  }

  .vertical-axis {
    font-size: 9px;
  }

  .vertical-track {
    width: var(--range-line-size);
  }

  .action-row.keyboard-actions {
    grid-template-columns: auto auto;
  }

  .keyboard-display {
    min-height: 86px;
  }

  h1 {
    font-size: 34px;
  }

  .kana-cell {
    min-height: 0;
    border-radius: clamp(5px, 1.8vw, 8px);
    padding: clamp(3px, 1vw, 5px) 2px clamp(9px, 2.8vw, 11px);
    font-size: clamp(15px, 4.8vw, 18px);
  }

  .kana-cell .count {
    right: 3px;
    bottom: 1px;
    font-size: clamp(8px, 2.7vw, 10px);
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .result-url-copy {
    grid-template-columns: 1fr;
  }

  .result-url-copy button {
    width: 100%;
  }

  .play-progress {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 8px 0 14px;
    padding: 10px 12px;
  }

  .play-progress-copy {
    text-align: center;
  }

  .play-progress-stats {
    grid-template-columns: 64px 64px minmax(0, 1fr);
    gap: 12px;
  }

  .result-history-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}
