:root {
  color-scheme: dark;
  --ink: #f6f0df;
  --muted: #a9b7ad;
  --pine-950: #071713;
  --pine-900: #0b211c;
  --pine-850: #102a25;
  --pine-800: #15372f;
  --pine-700: #245347;
  --line: rgba(238, 229, 201, 0.13);
  --amber: #f0bd64;
  --amber-strong: #ffcf78;
  --snow: #efe7d3;
  --stone: #789087;
  --light-square: #d8c9a6;
  --dark-square: #55766b;
  --danger: #e27567;
  --board-size: min(72vh, 620px, calc(100vw - 48px));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--pine-950);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(56, 100, 85, 0.24), transparent 28rem),
    radial-gradient(circle at 92% 88%, rgba(160, 125, 64, 0.1), transparent 30rem),
    linear-gradient(145deg, var(--pine-900), var(--pine-950) 68%);
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--pine-950);
  background: var(--amber);
  border-radius: 12px 12px 17px 12px;
  font: 700 27px/1 Georgia, "Times New Roman", serif;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.brand strong { display: block; font-size: 1.1rem; letter-spacing: 0.08em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.7rem; letter-spacing: 0.14em; }

.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 13px;
  color: #cfddd6;
  background: rgba(31, 73, 62, 0.46);
  border: 1px solid rgba(126, 169, 153, 0.17);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #75d09d;
  box-shadow: 0 0 0 4px rgba(117, 208, 157, 0.1);
}

.connection.offline .connection-dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(240, 189, 100, 0.1); }

.game-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(34px, 6vw, 82px);
  align-items: center;
  padding: 30px 0 24px;
}

.play-area { width: min(100%, 680px); justify-self: end; }

.player-row {
  width: var(--board-size);
  max-width: 100%;
  min-height: 49px;
  margin: 10px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.opponent-row { margin: 0 auto 10px; }

.player-identity { display: flex; align-items: center; gap: 11px; }
.player-identity strong { display: block; font-size: 0.92rem; }
.player-identity small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.75rem; }

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-weight: 800;
}

.computer-avatar { color: var(--pine-950); background: var(--snow); font: 26px/1 Georgia, serif; }
.human-avatar { color: var(--pine-950); background: var(--amber); font-size: 0.76rem; }

.thinking-badge, .turn-indicator {
  color: var(--amber-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.thinking-badge { display: inline-flex; align-items: center; gap: 7px; }
/* Keep the opponent row's wrapping identical while the computer is idle. */
.thinking-badge[hidden] { visibility: hidden; }
.thinking-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); animation: pulse 1s ease-in-out infinite; }
.thinking-badge[hidden] i { animation: none; }

.board-frame {
  width: var(--board-size);
  height: var(--board-size);
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  padding: 9px;
  background: #2d4e45;
  border: 1px solid rgba(244, 230, 191, 0.24);
  border-radius: 8px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.3), 0 2px 0 rgba(255, 255, 255, 0.07) inset;
}

.board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  overflow: hidden;
  border-radius: 2px;
  background: var(--light-square);
}

.square {
  position: relative;
  min-width: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--light-square);
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.square.dark { background: var(--dark-square); }
.square:focus-visible { z-index: 5; outline: 3px solid var(--amber-strong); outline-offset: -3px; }
.square.selected::after, .square.checked::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.square.selected::after { z-index: 1; background: rgba(137, 232, 199, 0.32); box-shadow: inset 0 0 0 3px #b4ffe0; }
.square.last-from { background: #d9b65e; }
.square.last-from.dark { background: #b99b4a; }
.square.last-to { background: #f3cf70; }
.square.last-to.dark { background: #d5b251; }
.square.last-from::before {
  content: ""; position: absolute; width: 24%; aspect-ratio: 1;
  border: 2px solid rgba(99, 64, 13, 0.58); border-radius: 50%; pointer-events: none;
}
.square.last-to::before {
  content: ""; position: absolute; inset: 2px; z-index: 4;
  border: 3px solid #a46b18; pointer-events: none;
}
.square.just-moved .piece { animation: piece-land 350ms ease-out; }
.square.checked::after { background: radial-gradient(circle, rgba(194, 56, 45, 0.72), rgba(194, 56, 45, 0.16) 58%, transparent 72%); }

.piece {
  position: relative;
  z-index: 2;
  display: block;
  width: 94%;
  height: 94%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.18));
}

.move-dot, .capture-ring { position: absolute; z-index: 3; pointer-events: none; }
.move-dot { width: 22%; aspect-ratio: 1; border-radius: 50%; background: rgba(14, 37, 31, 0.5); }
.capture-ring { inset: 8%; border: clamp(4px, 0.8vw, 8px) solid rgba(14, 37, 31, 0.45); border-radius: 50%; }

.coord { position: absolute; z-index: 4; font-size: clamp(0.52rem, 1.2vw, 0.68rem); font-weight: 900; pointer-events: none; opacity: 0.78; }
.coord.file { right: 4px; bottom: 2px; }
.coord.rank { left: 4px; top: 2px; }
.square:not(.dark) .coord { color: var(--dark-square); }
.square.dark .coord { color: var(--light-square); }

.control-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
}

.language-control { align-self: flex-end; display: flex; align-items: center; gap: 9px; margin-bottom: 12px; color: var(--muted); font-size: 0.72rem; font-weight: 700; }
.language-control select { min-height: 34px; padding: 4px 26px 4px 9px; color: var(--ink); background: var(--pine-850); border: 1px solid var(--line); border-radius: 8px; font: inherit; cursor: pointer; }

.status-card {
  padding: 22px 22px 20px;
  background: linear-gradient(145deg, rgba(31, 74, 63, 0.68), rgba(18, 50, 42, 0.68));
  border: 1px solid rgba(238, 229, 201, 0.15);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.eyebrow { color: var(--amber); font-size: 0.69rem; font-weight: 900; letter-spacing: 0.14em; }
/* Reserve two lines for each status: German turn/check text can wrap.
   Use minimums, not fixed heights, so larger user fonts never get clipped. */
.status-card h1 { min-height: 2.4em; margin: 7px 0 5px; font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.03em; }
.status-card p { min-height: 3em; margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.side-choice, .difficulty-choice-section, .moves-section { padding-top: 20px; }
.section-heading { margin-bottom: 10px; display: flex; align-items: baseline; justify-content: space-between; }
.section-heading h2 { margin: 0; font-size: 0.86rem; }
.section-heading span { color: var(--muted); font-size: 0.7rem; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: rgba(3, 17, 14, 0.48);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.side-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.side-button img { width: 26px; height: 26px; }
.side-button.active { color: var(--pine-950); background: var(--snow); box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16); }

.difficulty-choice {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: rgba(3, 17, 14, 0.48);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.difficulty-button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.difficulty-button.active { color: var(--pine-950); background: var(--snow); box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16); }
.difficulty-detail { margin: 7px 0 0; color: var(--muted); font-size: 0.68rem; line-height: 1.5; }

.moves-list {
  height: 132px;
  overflow: auto;
  padding: 8px 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--pine-700) transparent;
}

.moves-list.empty { display: grid; place-items: center; }
.empty-moves { color: var(--muted); text-align: center; }
.empty-moves span { color: rgba(238, 229, 201, 0.28); font: 30px/1 Georgia, serif; }
.empty-moves p { margin: 6px 0 0; font-size: 0.76rem; }

.move-row {
  display: grid;
  grid-template-columns: 28px 1fr 1fr;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 0.8rem;
}

.move-row:nth-child(odd) { background: rgba(255, 255, 255, 0.025); }
.move-row .number { color: var(--muted); font-size: 0.69rem; }
.move-row .move { font-weight: 700; }
.move-row .move.latest { padding: 5px 8px; margin-left: -8px; color: var(--amber-strong); background: rgba(240, 189, 100, 0.16); border-radius: 5px; }
.last-move-summary { min-height: calc(2.8em + 18px); margin: 0 0 10px; padding: 9px 11px; color: var(--amber-strong); border-left: 3px solid var(--amber); background: rgba(240, 189, 100, 0.08); border-radius: 0 7px 7px 0; font-size: 0.875rem; line-height: 1.4; font-weight: 700; font-variant-numeric: tabular-nums; }
/* Reserve the same slot before the first move and after undo/new game.
   visibility also keeps the empty live region out of the accessibility tree. */
.last-move-summary[hidden] { display: block; visibility: hidden; }

.actions { display: grid; grid-template-columns: 1fr 46px 46px; gap: 8px; padding-top: 18px; }
.primary-action, .icon-action, .install-button, .dialog-confirm {
  border: 0;
  cursor: pointer;
  font-weight: 900;
  transition: transform 120ms ease, background 120ms ease;
}

.primary-action:active, .icon-action:active, .install-button:active, .dialog-confirm:active { transform: translateY(1px); }
.primary-action { min-height: 46px; color: var(--pine-950); background: var(--amber); border-radius: 12px; }
.primary-action span:first-child { margin-right: 7px; font-size: 1.15rem; }
.primary-action:hover { background: var(--amber-strong); }
.icon-action { min-height: 46px; color: var(--ink); background: rgba(31, 73, 62, 0.52); border: 1px solid var(--line); border-radius: 12px; font-size: 1.3rem; }
.icon-action:disabled { opacity: 0.35; cursor: not-allowed; }

.install-button {
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  padding: 8px 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 1px dashed rgba(238, 229, 201, 0.25);
  border-radius: 12px;
}

.install-button > span:first-child { width: 29px; height: 29px; display: grid; place-items: center; color: var(--amber); border: 1px solid rgba(240, 189, 100, 0.34); border-radius: 8px; font-size: 1.1rem; }
.install-button strong { display: block; font-size: 0.79rem; }
.install-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 0.67rem; }

footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
}

.footer-mark { letter-spacing: 0.08em; }
.footer-mark a { color: inherit; text-underline-offset: 3px; }

.travel-tools { display: grid; gap: 7px; }
.travel-button { min-height: 42px; padding: 9px 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; background: var(--pine-850); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 0.77rem; }
.travel-button[aria-pressed="true"] { border-color: var(--stone); }
.travel-button[aria-pressed="true"] #powerSaveState { color: var(--amber); }
.travel-button:disabled { opacity: 0.65; cursor: wait; }
.travel-detail { margin: 0 0 7px; font-size: 0.68rem; line-height: 1.6; color: var(--muted); }
.connection.unready .connection-dot { background: var(--amber); box-shadow: none; }
body.power-saving *, body.power-saving *::before, body.power-saving *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
body.power-saving .result-confetti { display: none; }
body.power-saving dialog::backdrop { backdrop-filter: none; }
body.power-saving .piece { filter: none; }

dialog { width: min(390px, calc(100vw - 32px)); max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 0; color: var(--ink); background: transparent; border: 0; border-radius: 20px; }
dialog::backdrop { background: rgba(0, 10, 8, 0.74); backdrop-filter: blur(5px); }
.dialog-card, .promotion-card { position: relative; width: 100%; padding: 30px; text-align: center; background: var(--pine-850); border: 1px solid rgba(238, 229, 201, 0.2); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38); }
.dialog-close { position: absolute; top: 9px; right: 11px; width: 34px; height: 34px; color: var(--muted); background: transparent; border: 0; font-size: 1.5rem; cursor: pointer; }
.dialog-icon { width: 52px; height: 52px; margin: 0 auto 16px; display: grid; place-items: center; color: var(--pine-950); background: var(--amber); border-radius: 15px; font: 32px/1 Georgia, serif; }
.dialog-card h2, .promotion-card h2 { margin: 0 0 10px; font-size: 1.35rem; }
.dialog-card p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.65; }
.dialog-confirm { width: 100%; min-height: 44px; margin-top: 22px; color: var(--pine-950); background: var(--amber); border-radius: 11px; }
.promotion-options { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.promotion-options button { display: grid; place-items: center; padding: 2px; aspect-ratio: 1; color: var(--ink); background: var(--light-square); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }

.board-frame[data-result="win"] { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(240, 189, 100, 0.2), 0 0 38px rgba(240, 189, 100, 0.15); }
.board-frame[data-result="loss"] { border-color: var(--danger); }
.board-frame[data-result="draw"] { border-color: #a9ccbd; }
.result-dialog { max-height: calc(100dvh - 32px); border-radius: 24px; overflow: auto; }
.result-dialog::backdrop { background: rgba(0, 12, 8, 0.62); backdrop-filter: blur(3px); }
.result-card {
  --result-accent: var(--amber);
  position: relative; isolation: isolate; overflow: hidden;
  width: 100%; padding: 34px 28px 22px;
  border: 1px solid var(--result-accent); border-radius: 24px;
  text-align: center; background: radial-gradient(ellipse at 50% 0, #305444, var(--pine-850) 70%);
}
.result-dialog[open] .result-card { animation: result-enter 380ms cubic-bezier(.2,.7,.3,1); }
.result-card[data-result="loss"] { --result-accent: #e6a295; background: radial-gradient(ellipse at 50% 0, #473d36, var(--pine-850) 70%); }
.result-card[data-result="draw"] { --result-accent: #b9d8cc; }
.result-card .dialog-close { z-index: 3; color: var(--ink); }
.result-emblem {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 94px; height: 94px; margin: 0 auto 21px; border-radius: 50%;
  background: #d8b56e; border: 1px solid var(--result-accent);
  box-shadow: 0 0 0 8px rgba(240, 189, 100, 0.045);
}
.result-emblem .piece { width: 72px; height: 72px; }
.result-card[data-result="draw"] .result-emblem { width: 128px; border-radius: 24px; background: #aec4b8; box-shadow: none; }
.result-card[data-result="draw"] .result-emblem .piece { width: 59px; height: 67px; }
.result-card[data-result="loss"] .result-emblem { background: #c09586; box-shadow: none; }
.result-card[data-result="loss"] .result-emblem .piece { transform: rotate(-22deg); }
.result-dialog[open] .result-card[data-result="win"] .result-emblem { animation: victory-glow 1s ease-out 2; }
.result-eyebrow { position: relative; z-index: 1; margin: 0 0 9px; color: var(--result-accent); font-size: 0.875rem; font-weight: 800; letter-spacing: 0.08em; }
.result-card h2 { position: relative; z-index: 1; margin: 0 0 12px; color: var(--ink); font-size: 2rem; letter-spacing: -0.03em; }
.result-description { position: relative; z-index: 1; margin: 0; min-height: 3.2em; color: #cfdbd4; font-size: 1rem; line-height: 1.6; }
.result-score { position: relative; z-index: 1; margin: 15px 0 0; padding: 13px; color: var(--result-accent); background: rgba(0, 0, 0, 0.16); border-radius: 10px; font-size: 1.05rem; font-weight: 800; white-space: pre; }
.result-card .dialog-confirm { position: relative; z-index: 1; min-height: 48px; margin-top: 20px; }
.result-board-button { position: relative; z-index: 1; width: 100%; min-height: 44px; margin-top: 4px; color: #cfdbd4; background: none; border: 0; font-size: 0.875rem; cursor: pointer; }
.result-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.result-confetti i { position: absolute; top: -18px; left: var(--x); width: 6px; height: 11px; background: var(--amber-strong); opacity: 0; }
.result-confetti i:nth-child(3n) { background: #fff4cf; border-radius: 50%; width: 7px; height: 7px; }
.result-confetti i:nth-child(3n + 1) { background: #8dd2b0; }
.result-dialog[open] .result-confetti i { animation: confetti-fall 2400ms var(--delay) ease-in forwards; }
@keyframes result-enter { from { opacity: 0; transform: translateY(16px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes piece-land { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes victory-glow { 50% { box-shadow: 0 0 0 14px rgba(240, 189, 100, 0.05), 0 0 30px rgba(240, 189, 100, 0.25); } }
@keyframes confetti-fall { 8% { opacity: 0.9; } 85% { opacity: 0.75; } to { opacity: 0; transform: translate(var(--drift), 480px) rotate(var(--spin)); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(100vw - 36px);
  padding: 10px 15px;
  color: var(--pine-950);
  background: var(--snow);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.7); } }

@media (max-width: 900px) {
  :root { --board-size: min(64vw, 570px); }
  .app-shell { width: min(100% - 28px, 760px); }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand language" "connection connection"; gap: 8px 12px; padding: max(12px, env(safe-area-inset-top)) 0 10px; }
  .brand { grid-area: brand; min-width: 0; }
  .connection { grid-area: connection; justify-self: start; }
  .topbar .language-control { grid-area: language; align-self: center; margin: 0; }
  .topbar .language-control > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar .language-control select { min-height: 44px; max-width: 112px; font-size: 0.8rem; }
  .game-layout { grid-template-columns: 1fr; gap: 14px; padding-top: 22px; }
  .play-area { justify-self: center; }
  .control-panel { width: var(--board-size); max-width: 100%; min-height: 0; justify-self: center; }
  .control-panel > .actions { padding-top: 0; margin-bottom: 12px; grid-template-columns: minmax(0, 1fr) 48px 48px; }
  .control-panel > .actions button { min-height: 48px; }
  .status-card { padding: 12px 14px; border-radius: 12px; }
  .status-card .eyebrow { display: none; }
  .status-card h1 { min-height: 1.3em; margin: 0 0 4px; font-size: 1rem; line-height: 1.3; }
  .status-card p { min-height: 2.9em; font-size: 0.8rem; line-height: 1.45; }
  footer { margin-top: 26px; }
}

@media (max-width: 580px) {
  :root { --board-size: calc(100vw - 28px); }
  .app-shell { width: calc(100% - 20px); }
  .topbar { min-height: 72px; }
  .brand-mark { width: 37px; height: 37px; font-size: 24px; }
  .brand strong { font-size: 1rem; }
  .brand small { font-size: 0.58rem; }
  .connection { min-height: 31px; padding: 0 9px; font-size: 0.67rem; }
  .connection span:last-child { line-height: 1.2; }
  .game-layout { padding-top: 14px; }
  .board-frame { padding: 6px; }
  .player-row { min-height: 44px; margin-top: 7px; }
  .opponent-row { margin: 0 auto 7px; }
  .avatar { width: 36px; height: 36px; }
  .player-identity strong { font-size: 0.84rem; }
  .player-identity small { font-size: 0.68rem; }
  footer { min-height: 70px; flex-direction: column; justify-content: center; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .result-confetti { display: none; }
}
