:root {
  color-scheme: light;
  --bg: #f5f1e8;
  --paper: #fffaf0;
  --paper-strong: #fff6df;
  --ink: #20201d;
  --muted: #746f63;
  --line: rgba(32, 32, 29, 0.16);
  --accent: #d84d35;
  --accent-dark: #a73525;
  --teal: #166b72;
  --gold: #d99a2b;
  --green: #29735f;
  --shadow: 0 20px 70px rgba(54, 44, 28, 0.14);
  --radius: 8px;
  --font-ui: "Zen Kaku Gothic New", "Noto Sans JP", "Yu Gothic UI", "Hiragino Sans", system-ui, sans-serif;
  --font-display: "M PLUS Rounded 1c", "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255, 251, 244, 0.84), rgba(245, 241, 232, 0.96)),
    var(--bg);
  font-family: var(--font-ui);
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(32, 32, 29, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 32, 29, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 64%);
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(32, 32, 29, 0.1);
  background: rgba(245, 241, 232, 0.84);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  line-height: 1.1;
}

.brand span,
.section-kicker,
.microcopy,
.net-status,
.players-list small,
.battle-log {
  color: var(--muted);
}

.brand span {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.net-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.72);
  font-size: 0.86rem;
}

.net-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9b9485;
}

.net-status[data-state="online"] .net-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(41, 115, 95, 0.14);
}

.net-status[data-state="connecting"] .net-dot {
  background: var(--gold);
  animation: pulse 1.2s ease-in-out infinite;
}

.net-status[data-state="error"] .net-dot {
  background: var(--accent);
}

.connection-notice {
  position: fixed;
  top: 86px;
  left: 50%;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(720px, calc(100vw - 28px));
  border: 1px solid rgba(216, 77, 53, 0.32);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #fffaf0;
  background: rgba(114, 43, 31, 0.96);
  box-shadow: 0 18px 44px rgba(54, 44, 28, 0.22);
  transform: translateX(-50%);
}

.connection-notice div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.connection-notice strong {
  font-size: 0.95rem;
}

.connection-notice span {
  color: rgba(255, 250, 240, 0.78);
  font-size: 0.82rem;
  line-height: 1.45;
}

.connection-notice .icon-button {
  border-color: rgba(255, 250, 240, 0.28);
  color: #fffaf0;
  background: rgba(255, 250, 240, 0.1);
}

.app-shell {
  position: relative;
  width: min(1480px, 100%);
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 36px);
}

.home-screen {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
  min-height: calc(100svh - 120px);
}

.home-copy {
  max-width: 680px;
  animation: settle-in 220ms cubic-bezier(0.2, 0, 0.2, 1) both;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 8.6vw, 7.4rem);
  font-weight: 900;
  line-height: 0.88;
}

h1 span {
  display: block;
  white-space: nowrap;
}

h2 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
}

h3 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
}

.lead {
  max-width: 36rem;
  margin-bottom: 30px;
  color: #4c463b;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.85;
}

.entry-panel {
  display: grid;
  gap: 14px;
  max-width: 480px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.72);
  box-shadow: var(--shadow);
}

.server-fields,
.server-join {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.server-join {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.server-auth-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(22, 107, 114, 0.2);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(22, 107, 114, 0.08);
}

.server-auth-panel strong {
  display: block;
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field {
  display: grid;
  gap: 7px;
}

.field span,
.label-row label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(32, 32, 29, 0.2);
  border-radius: var(--radius);
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

input:focus {
  border-color: rgba(216, 77, 53, 0.8);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(216, 77, 53, 0.12);
}

select {
  appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(32, 32, 29, 0.72) 50%),
    linear-gradient(135deg, rgba(32, 32, 29, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

select:focus {
  border-color: rgba(216, 77, 53, 0.8);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(216, 77, 53, 0.12);
}

.join-row,
.word-input-row,
.theme-row,
.label-row {
  display: flex;
  align-items: end;
  gap: 10px;
}

.host-credentials {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(32, 32, 29, 0.1);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.32);
}

.credential-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.credential-line span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.credential-line strong {
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.password-line {
  grid-template-columns: 72px minmax(0, 1fr) 40px;
}

.password-line .icon-button {
  width: 40px;
  min-height: 40px;
  padding: 0;
}

.join-row .compact {
  flex: 1 1 auto;
}

.primary-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(32, 32, 29, 0.2);
  border-radius: var(--radius);
  padding: 0 15px;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.82);
  transition:
    transform 120ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  min-height: 50px;
  border-color: transparent;
  color: #fffaf0;
  background: var(--accent);
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(216, 77, 53, 0.24);
}

.icon-button {
  width: 44px;
  flex: 0 0 auto;
}

.icon-button.labeled {
  width: auto;
}

.primary-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: rgba(32, 32, 29, 0.34);
  box-shadow: 0 10px 22px rgba(54, 44, 28, 0.12);
}

.primary-button:active:not(:disabled),
.icon-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
}

.primary-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.microcopy {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
}

.home-visual {
  position: relative;
  min-height: min(680px, 72svh);
  animation: settle-in 240ms 40ms cubic-bezier(0.2, 0, 0.2, 1) both;
}

.large-seal {
  position: absolute;
  top: 4%;
  right: 2%;
  width: min(42vw, 460px);
  max-width: 84%;
  filter: drop-shadow(0 28px 45px rgba(72, 48, 21, 0.2));
  transform: rotate(4deg);
}

.preview-board {
  position: absolute;
  inset: auto 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(46px, 78px));
  gap: 9px;
  padding: 18px;
  border: 1px solid rgba(32, 32, 29, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.preview-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(32, 32, 29, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 223, 0.86)),
    var(--paper);
  color: #312d26;
  font-size: clamp(1.2rem, 2.5vw, 2.1rem);
  font-family: var(--font-display);
  font-weight: 900;
  transform: translateY(calc(var(--offset, 0) * 1px));
}

.game-screen {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(430px, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: stretch;
  min-height: calc(100svh - 120px);
  animation: settle-in 180ms cubic-bezier(0.2, 0, 0.2, 1) both;
}

.side-panel,
.battlefield {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 240, 0.74);
  box-shadow: 0 14px 36px rgba(54, 44, 28, 0.1);
  backdrop-filter: blur(14px);
}

.side-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 16px;
}

.battlefield {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: clamp(16px, 2.5vw, 24px);
}

.room-head,
.phase-strip,
.entry-title,
.attack-header,
.player-row,
.word-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-head h2 {
  font-size: 1.45rem;
  word-break: break-all;
}

.theme-box,
.starter-box,
.word-entry,
.log-box {
  display: grid;
  gap: 10px;
}

.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.log-head .section-kicker {
  margin-bottom: 0;
}

.log-head .icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.log-summary {
  overflow: hidden;
  border: 1px solid rgba(32, 32, 29, 0.1);
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.32);
  font-size: 0.84rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-box.collapsed .battle-log {
  display: none;
}

.log-box.expanded .log-summary {
  display: none;
}

.select-field {
  display: grid;
  gap: 7px;
}

.select-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.starter-box select {
  min-height: 42px;
}

.theme-row input {
  min-height: 44px;
}

.players-list,
.word-boards {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.player-row {
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(32, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.38);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.player-row.current-turn {
  border-color: color-mix(in srgb, var(--player-color) 56%, transparent);
  background: color-mix(in srgb, var(--player-color) 10%, rgba(255, 255, 255, 0.44));
  box-shadow: inset 4px 0 0 var(--player-color);
}

.player-row.winner {
  border-color: rgba(217, 154, 43, 0.5);
  background: rgba(217, 154, 43, 0.12);
  box-shadow: inset 4px 0 0 var(--gold);
}

.player-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.player-color {
  width: 12px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--player-color, var(--accent));
}

.player-name {
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip,
.turn-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid rgba(32, 32, 29, 0.12);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-chip svg,
.turn-badge svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.status-chip.ready,
.turn-badge.live {
  color: #fffaf0;
  border-color: transparent;
  background: var(--teal);
}

.status-chip.out {
  color: #fffaf0;
  border-color: transparent;
  background: #6f5f55;
}

.status-chip.host {
  color: #2d2515;
  background: rgba(217, 154, 43, 0.22);
}

.status-chip.turn {
  color: #fffaf0;
  border-color: transparent;
  background: var(--player-color, var(--accent));
}

.status-chip.winner,
.turn-badge.winner {
  color: #2d2515;
  border-color: rgba(217, 154, 43, 0.34);
  background: rgba(217, 154, 43, 0.3);
}

.phase-strip {
  min-height: 72px;
  border-bottom: 1px solid rgba(32, 32, 29, 0.1);
  padding-bottom: 16px;
}

.setup-panel {
  display: grid;
  align-items: center;
  min-height: 350px;
}

.word-entry {
  max-width: 680px;
}

.word-input-row {
  align-items: center;
}

.word-input-row input {
  flex: 1 1 auto;
  min-height: 56px;
  font-size: 1.2rem;
  font-weight: 900;
}

.normalized-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 48px;
  align-items: center;
  color: var(--muted);
}

.mini-slot,
.slot {
  display: grid;
  place-items: center;
  width: 38px;
  height: 44px;
  border: 1px solid rgba(32, 32, 29, 0.14);
  border-radius: var(--radius);
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 900;
}

.mini-slot.empty,
.slot.empty {
  color: rgba(32, 32, 29, 0.32);
  background: rgba(255, 250, 240, 0.45);
}

.battle-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
}

.attack-header {
  color: var(--muted);
}

.attack-header p {
  margin: 0;
}

.attack-header p:first-child {
  color: var(--ink);
  font-weight: 900;
}

.kana-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: clamp(8px, 1.3vw, 12px);
  align-content: center;
}

.kana-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid rgba(32, 32, 29, 0.16);
  border-radius: var(--radius);
  color: var(--ink);
  background: linear-gradient(155deg, #fffefa, #fff0c7);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.1vw, 2.35rem);
  font-weight: 950;
  transition:
    transform 140ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.kana-cell:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(216, 77, 53, 0.58);
  color: var(--accent-dark);
}

.kana-cell:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.kana-cell.spacer {
  pointer-events: none;
  opacity: 0;
}

.kana-cell.used {
  color: rgba(32, 32, 29, 0.3);
  background: rgba(255, 250, 240, 0.34);
  text-decoration: line-through;
}

.kana-cell.pending {
  animation: press-pop 180ms ease-out both;
}

.word-board {
  display: grid;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 0 12px;
  border-bottom: 1px solid rgba(32, 32, 29, 0.1);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    padding-inline 160ms ease;
}

.word-board:last-child {
  border-bottom: 0;
}

.word-board.current-turn {
  border-color: color-mix(in srgb, var(--player-color) 44%, transparent);
  border-bottom-color: color-mix(in srgb, var(--player-color) 44%, transparent);
  padding-inline: 10px;
  background: color-mix(in srgb, var(--player-color) 9%, rgba(255, 255, 255, 0.18));
}

.word-board.winner {
  border-color: rgba(217, 154, 43, 0.44);
  border-bottom-color: rgba(217, 154, 43, 0.44);
  padding-inline: 10px;
  background: rgba(217, 154, 43, 0.09);
}

.word-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.turn-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--player-color, var(--accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--player-color) 20%, transparent);
}

.winner-dot {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(217, 154, 43, 0.18);
}

.winner-dot::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fffaf0;
  content: "";
}

.word-board-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slots {
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 5px;
}

.slot {
  width: auto;
  min-width: 0;
  height: 40px;
  font-size: 1.08rem;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.slot.hidden-letter {
  color: rgba(32, 32, 29, 0.48);
}

.slot.revealed {
  color: #fffaf0;
  background: var(--accent);
  animation: card-reveal 220ms cubic-bezier(0.2, 0, 0.2, 1) both;
}

.slot.opened {
  color: var(--ink);
  border-color: rgba(217, 154, 43, 0.42);
  background: rgba(255, 250, 240, 0.9);
  animation: card-reveal 180ms cubic-bezier(0.2, 0, 0.2, 1) both;
}

.slot.private {
  color: var(--teal);
  background: rgba(22, 107, 114, 0.1);
}

.private-word {
  color: var(--muted);
  font-size: 0.78rem;
}

.battle-log {
  display: grid;
  gap: 8px;
  max-height: 280px;
  margin: 8px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  font-size: 0.86rem;
  line-height: 1.5;
}

.battle-log li {
  padding: 9px 10px;
  border-left: 3px solid rgba(216, 77, 53, 0.36);
  background: rgba(255, 255, 255, 0.36);
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 8px;
}

.toast {
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(32, 32, 29, 0.16);
  border-radius: var(--radius);
  background: rgba(32, 32, 29, 0.94);
  color: #fffaf0;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  animation: toast-in 140ms ease both;
}

@keyframes settle-in {
  from {
    transform: translateY(16px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.35);
  }
}

@keyframes press-pop {
  from {
    transform: translateY(1px) scale(0.96);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes card-reveal {
  from {
    transform: rotateX(48deg) translateY(2px);
  }
  to {
    transform: rotateX(0) translateY(0);
  }
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1120px) {
  .home-screen,
  .game-screen {
    grid-template-columns: 1fr;
  }

  .home-visual {
    min-height: 460px;
  }

  .game-screen {
    min-height: auto;
  }

  .side-panel,
  .battlefield {
    width: 100%;
  }

  .reveal-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 64px;
    padding: 10px 14px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand span {
    display: none;
  }

  .net-status {
    padding: 8px;
    font-size: 0.76rem;
  }

  .app-shell {
    min-height: calc(100svh - 64px);
    padding: 14px;
  }

  .home-screen {
    min-height: auto;
    padding-top: 18px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.85rem, 13vw, 3.95rem);
    line-height: 0.94;
    overflow-wrap: anywhere;
  }

  #netStatusText {
    display: none;
  }

  .net-status {
    min-width: 36px;
    width: 36px;
    justify-content: center;
  }

  .entry-panel {
    padding: 14px;
  }

  .join-row,
  .server-join,
  .word-input-row,
  .theme-row {
    align-items: stretch;
  }

  .join-row,
  .server-fields,
  .server-join {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .server-join .icon-button {
    width: 100%;
  }

  .word-input-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .word-input-row .primary-button {
    padding-inline: 12px;
  }

  .home-visual {
    min-height: 340px;
  }

  .large-seal {
    width: 300px;
  }

  .preview-board {
    grid-template-columns: repeat(5, 1fr);
    width: 100%;
    gap: 6px;
    padding: 10px;
  }

  .game-screen {
    gap: 12px;
  }

  .side-panel,
  .battlefield {
    padding: 14px;
  }

  .reveal-panel {
    grid-template-columns: 1fr;
  }

  .phase-strip,
  .attack-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .kana-board {
    gap: 7px;
  }

  .kana-cell {
    min-height: 52px;
    font-size: clamp(1.05rem, 8vw, 1.8rem);
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
  }

  .connection-notice {
    top: 74px;
    align-items: stretch;
    flex-direction: column;
  }

  .connection-notice .icon-button {
    width: 100%;
  }
}
