:root {
  color-scheme: light;
  --bg: #1c1642;
  --bg-deep: #09061b;
  --panel: rgba(18, 22, 50, 0.84);
  --line: rgba(255, 255, 255, 0.14);
  --text: #fff7ef;
  --muted: #d9d0ef;
  --green: #8fdc8a;
  --green-deep: #4ca86f;
  --coral: #ffb703;
  --sky: #5eead4;
  --gold: #ffd166;
  --cream: #241b55;
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  width: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 183, 3, 0.38), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(94, 234, 212, 0.26), transparent 24%),
    radial-gradient(circle at 18% 90%, rgba(255, 107, 53, 0.24), transparent 32%),
    radial-gradient(circle at 80% 82%, rgba(127, 90, 240, 0.22), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  background-color: var(--bg-deep);
}

body {
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 5%, rgba(255, 183, 3, 0.38), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(94, 234, 212, 0.26), transparent 24%),
    radial-gradient(circle at 18% 90%, rgba(255, 107, 53, 0.24), transparent 32%),
    radial-gradient(circle at 80% 82%, rgba(127, 90, 240, 0.22), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  background-color: var(--bg-deep);
  color: var(--text);
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  height: 100svh;
  height: 100dvh;
  min-height: 100svh;
  min-height: 100dvh;
  width: min(100vw, 920px);
  max-width: 100vw;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 5px) 6px calc(env(safe-area-inset-bottom, 0px) + 1px);
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr;
  gap: 3px;
  overflow: hidden;
}

@supports (-webkit-touch-callout: none) {
  html,
  body {
    min-height: -webkit-fill-available;
  }

  .app-shell {
    height: -webkit-fill-available;
    min-height: -webkit-fill-available;
  }
}

.app-shell.is-onboarding-focus .lobby-panel,
.app-shell.is-onboarding-focus .dice-strip,
.app-shell.is-onboarding-focus .scoreboard-panel,
.app-shell.is-onboarding-focus .install-warning,
.app-shell.is-onboarding-focus .winner-banner,
.app-shell.is-onboarding-focus #player-two-chip {
  opacity: 0.3;
  filter: grayscale(0.95) blur(1px);
}

.app-shell.is-onboarding-focus #player-one-chip,
.app-shell.is-onboarding-focus #new-game-button {
  opacity: 1;
  filter: none;
}

.app-shell.is-onboarding-focus .player-strip {
  grid-template-columns: minmax(0, 2.45fr) minmax(0, 0.35fr) 98px;
}

.app-shell.is-onboarding-focus #player-one-chip {
  grid-template-columns: 24px minmax(0, 1fr);
}

.app-shell.is-onboarding-focus #player-one-total {
  display: none;
}

.app-shell.is-waiting-focus .dice-strip,
.app-shell.is-waiting-focus .scoreboard-panel,
.app-shell.is-waiting-focus .install-warning,
.app-shell.is-waiting-focus .winner-banner,
.app-shell.is-waiting-focus #player-two-chip {
  opacity: 0.3;
  filter: grayscale(0.95) blur(1px);
}

.app-shell.is-waiting-focus #player-one-chip,
.app-shell.is-waiting-focus #new-game-button,
.app-shell.is-waiting-focus .queue-card,
.app-shell.is-waiting-focus .queue-empty {
  opacity: 1;
  filter: none;
}

.app-shell.is-waiting-focus .queue-card,
.app-shell.is-waiting-focus .queue-empty {
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  border-color: rgba(191, 242, 183, 0.9);
  box-shadow: 0 10px 22px rgba(76, 168, 111, 0.26);
  color: #16395d;
}

.app-shell.is-waiting-focus .queue-card strong,
.app-shell.is-waiting-focus .queue-card span,
.app-shell.is-waiting-focus .queue-empty {
  color: #16395d;
  font-weight: 700;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.top-strip {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.28), rgba(94, 234, 212, 0.16));
}

.dice-strip {
  background: linear-gradient(135deg, rgba(255, 183, 3, 0.18), rgba(255, 107, 53, 0.14));
}

.lobby-panel {
  padding: 6px;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.12), rgba(47, 99, 200, 0.18));
}

.queue-heading {
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.lobby-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.queue-section {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.queue-heading {
  margin: 0;
}

.queue-list {
  display: grid;
  gap: 6px;
}

.queue-card,
.queue-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.queue-card {
  width: 100%;
  font: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  appearance: none;
}

.queue-card:hover {
  border-color: rgba(191, 242, 183, 0.58);
  box-shadow: 0 10px 20px rgba(47, 99, 200, 0.14);
}

.queue-card:focus-visible {
  outline: 2px solid rgba(191, 242, 183, 0.85);
  outline-offset: 2px;
}

.queue-card strong,
.queue-card span {
  display: block;
}

.queue-card span,
.queue-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 8, 24, 0.08);
  pointer-events: auto;
}

.tutorial-bubble {
  position: fixed;
  z-index: 61;
  width: min(92vw, 320px);
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 209, 102, 0.72);
  background: linear-gradient(155deg, rgba(13, 21, 49, 0.98), rgba(25, 18, 57, 0.98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
  pointer-events: auto;
}

.tutorial-step {
  margin: 0 0 3px;
  color: #ffd166;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tutorial-title {
  margin: 0;
  font-size: 1.1rem;
  font-family: "Baskerville", "Georgia", serif;
}

.tutorial-text {
  margin: 6px 0 10px;
  color: #f5f8fc;
  font-size: 0.9rem;
  line-height: 1.34;
}

.tutorial-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.is-tutorial-focus {
  position: relative;
  z-index: 52;
  box-shadow: 0 0 0 2px rgba(255, 209, 102, 0.55), 0 0 20px rgba(255, 209, 102, 0.3);
}

.top-strip,
.dice-strip,
.scoreboard-panel {
  padding: 3px;
}

.player-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 98px;
  gap: 4px;
}

.player-chip {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 5px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-chip.is-active {
  background: linear-gradient(180deg, rgba(47, 99, 200, 0.55), rgba(11, 29, 73, 0.88));
  border-color: rgba(191, 242, 183, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 2px rgba(143, 220, 138, 0.18);
}

.player-chip.is-active input,
.player-chip.is-active strong,
.player-chip.is-active .player-slot {
  color: #ffffff;
}

.player-chip.is-active .player-slot {
  background: rgba(255, 255, 255, 0.24);
}

.player-chip.is-awaiting-name {
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  border-color: rgba(191, 242, 183, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 0 2px rgba(143, 220, 138, 0.24), 0 10px 22px rgba(76, 168, 111, 0.26);
  animation: name-pulse 1.4s ease-in-out infinite alternate;
}

.player-chip.is-awaiting-name input,
.player-chip.is-awaiting-name strong,
.player-chip.is-awaiting-name .player-slot {
  color: #16395d;
}

.player-chip.is-awaiting-name .player-slot {
  background: rgba(255, 255, 255, 0.52);
}

.player-chip.is-awaiting-name input::placeholder {
  color: #0d3326;
  font-weight: 900;
  font-size: 0.9rem;
  opacity: 1;
}

.player-chip.is-dimmed {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.player-chip.is-dimmed input,
.player-chip.is-dimmed strong,
.player-chip.is-dimmed .player-slot {
  color: rgba(236, 240, 245, 0.55);
}

.player-chip.is-dimmed .player-slot {
  background: rgba(255, 255, 255, 0.1);
}

.player-slot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff6df;
  font-size: 0.72rem;
  font-weight: 700;
}

.player-chip input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.player-chip input:focus {
  outline: none;
}

.player-chip strong {
  min-width: 28px;
  text-align: right;
  font-size: 0.86rem;
}

.primary-button,
.secondary-button,
.score-button,
.die {
  border: 0;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.primary-button,
.secondary-button {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  color: #16395d;
  box-shadow: 0 10px 22px rgba(76, 168, 111, 0.28);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.compact-button {
  min-width: 58px;
}

.secondary-button.is-new-game-ready {
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  color: #16395d;
  border-color: rgba(191, 242, 183, 0.9);
  box-shadow: 0 10px 22px rgba(76, 168, 111, 0.32);
  animation: new-game-pulse 1.1s ease-in-out infinite alternate;
}

.secondary-button.is-onboarding-primary {
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  color: #16395d;
  border-color: rgba(191, 242, 183, 0.9);
  box-shadow: 0 10px 22px rgba(76, 168, 111, 0.32);
  font-weight: 800;
}

.primary-button:hover,
.secondary-button:hover,
.score-button:hover,
.die:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.score-button:disabled,
.die:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.secondary-button.is-onboarding-primary:disabled {
  opacity: 0.85;
  box-shadow: 0 10px 22px rgba(76, 168, 111, 0.2);
}

.dice-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 4px;
  align-items: stretch;
}

.dice-strip.is-opponent-turn {
  grid-template-columns: 1fr;
}

.dice-strip.is-opponent-turn .dice-grid {
  display: none;
}

.dice-strip.is-opponent-turn .roll-button {
  width: 100%;
  min-height: 42px;
  font-size: 0.86rem;
  font-weight: 800;
}

.dice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.die {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  border: 1px solid rgba(191, 242, 183, 0.9);
  box-shadow: inset 0 -8px 16px rgba(36, 93, 59, 0.18), 0 6px 14px rgba(76, 168, 111, 0.24);
}

.die.is-held {
  background: linear-gradient(180deg, #ffe29f, #ff8a3d 42%, #ff4d8d 75%, #7f5af0);
  color: #fff9f0;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.12), 0 10px 22px rgba(255, 77, 141, 0.28);
}

.die.is-open {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(89, 104, 135, 0.18));
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 -6px 12px rgba(19, 29, 53, 0.18);
}

.die-value {
  font-family: "Baskerville", "Georgia", serif;
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  font-weight: 800;
  line-height: 1;
  color: #16395d;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.die.is-held .die-value {
  color: #ffffff;
}

.die.is-open .die-value {
  color: rgba(245, 248, 252, 0.82);
  text-shadow: none;
}

.roll-button {
  min-height: 42px;
  border-radius: 16px;
  padding: 0 8px;
  font-size: 0.74rem;
  line-height: 1;
  white-space: nowrap;
}

.roll-button.is-your-turn:disabled {
  opacity: 1;
}

.roll-button.is-your-turn,
.roll-button.is-your-turn:disabled {
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  color: #16395d;
  border: 1px solid rgba(191, 242, 183, 0.9);
  box-shadow: 0 10px 22px rgba(76, 168, 111, 0.3);
}

.roll-button.is-their-turn {
  background: linear-gradient(180deg, rgba(84, 90, 102, 0.96), rgba(46, 50, 58, 0.98));
  color: #ffffff;
  box-shadow: none;
}

.roll-button.is-their-turn:disabled {
  opacity: 1;
  background: linear-gradient(180deg, rgba(84, 90, 102, 0.96), rgba(46, 50, 58, 0.98));
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.install-warning {
  margin: 0 4px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 183, 3, 0.18);
  color: #fff0c7;
  font-size: 0.78rem;
  line-height: 1.2;
}

.session-banner {
  margin: 0 4px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  background: rgba(47, 99, 200, 0.22);
  border: 1px solid rgba(191, 242, 183, 0.24);
  color: #f7fbff;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.winner-banner {
  position: relative;
  overflow: hidden;
  margin: 0 2px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.36), rgba(255, 77, 141, 0.28), rgba(127, 90, 240, 0.34), rgba(255, 209, 102, 0.28));
  border-color: rgba(255, 209, 102, 0.3);
}

.winner-banner.is-tie {
  background: linear-gradient(135deg, rgba(123, 197, 215, 0.24), rgba(215, 176, 96, 0.3));
}

.winner-banner.is-live {
  animation: winner-flash 1s ease-in-out infinite alternate;
}

.winner-banner.is-resettable {
  cursor: pointer;
}

.winner-kicker {
  margin: 0;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--green-deep);
}

.winner-banner h2 {
  margin: 2px 0 4px;
  font-family: "Baskerville", "Georgia", serif;
  font-size: 1.55rem;
}

.winner-banner.is-live h2 {
  animation: winner-zoom-spin 1.2s cubic-bezier(.2,.7,.2,1) infinite alternate;
  transform-origin: center left;
}

.winner-copy {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.winner-banner.is-live .winner-copy {
  color: #fff7d6;
}

.winner-confetti {
  position: absolute;
  inset: 0 0 auto auto;
  padding: 8px 10px;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  color: rgba(255, 240, 199, 0.9);
  transform: rotate(-10deg);
  animation: confetti-bob 1.1s ease-in-out infinite alternate;
}

@keyframes confetti-bob {
  from {
    transform: rotate(-10deg) translateY(0);
  }
  to {
    transform: rotate(-4deg) translateY(4px);
  }
}

@keyframes name-pulse {
  from {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 0 rgba(143, 220, 138, 0.12);
    filter: saturate(1);
  }
  to {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 22px rgba(143, 220, 138, 0.26);
    filter: saturate(1.1);
  }
}

@keyframes new-game-pulse {
  from {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(76, 168, 111, 0.24);
  }
  to {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(76, 168, 111, 0.42);
  }
}

@keyframes winner-flash {
  from {
    box-shadow: 0 0 0 rgba(255, 107, 53, 0), 0 14px 28px rgba(0, 0, 0, 0.22);
    filter: saturate(1);
  }
  to {
    box-shadow: 0 0 26px rgba(255, 209, 102, 0.42), 0 18px 36px rgba(0, 0, 0, 0.3);
    filter: saturate(1.16);
  }
}

@keyframes winner-zoom-spin {
  from {
    transform: scale(1) rotate(0deg);
  }
  to {
    transform: scale(1.08) rotate(-2deg);
  }
}

.scoreboard-panel {
  min-height: 0;
  height: 100%;
  grid-row: -2 / -1;
}

.scoreboard-wrap {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 44px);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
}

table {
  width: 100%;
  height: auto;
  min-height: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

thead th {
  background: var(--cream);
}

th,
td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.category-version {
  white-space: nowrap;
  opacity: 0.9;
}

thead th:first-child,
.category-label {
  width: 42%;
}

.section-row td {
  padding-top: 5px;
  padding-bottom: 2px;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.category-label {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.score-cell {
  width: 29%;
}

.score-cell.stagger-left,
.score-cell.stagger-right {
  position: relative;
  text-align: left;
}

.score-cell.stagger-right {
  text-align: right;
}

.score-button,
.score-value,
.score-open {
  width: 100%;
  min-height: 25px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.88rem;
  font-weight: 700;
}

.score-button {
  background: linear-gradient(180deg, #bff2b7, #8fdc8a 58%, #4ca86f);
  color: #16395d;
}

.score-button.is-active,
.score-button.is-scratch {
  background: linear-gradient(180deg, #2f63c8, #163d87 56%, #081b49);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(191, 242, 183, 0.58), 0 0 0 2px rgba(12, 21, 47, 0.34), 0 10px 18px rgba(8, 18, 43, 0.36);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.score-cell.stagger-left .score-button.is-active,
.score-cell.stagger-left .score-button.is-scratch {
  width: 50%;
  margin: 0;
}

.score-cell.stagger-right .score-button.is-active,
.score-cell.stagger-right .score-button.is-scratch {
  width: 50%;
  margin: 0 0 0 auto;
}

.score-value {
  background: linear-gradient(180deg, #ffffff, #eef2f5);
  color: #111111;
  border: 1px solid rgba(10, 16, 24, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.score-open {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(217, 208, 239, 0.72);
}

.totals-row td,
.winner-row td {
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
}

.winner-row td {
  color: #fff5c8;
  font-weight: 700;
}

@media (max-width: 620px) {
  .queue-card,
  .queue-empty {
    grid-template-columns: 1fr;
  }

  .player-strip {
    grid-template-columns: 1fr 1fr 92px;
  }

  .player-chip {
    grid-template-columns: 20px minmax(0, 1fr) auto;
    min-height: 26px;
    padding: 2px 4px;
  }

  .player-slot {
    width: 20px;
    height: 20px;
    font-size: 0.66rem;
  }

  .player-chip strong,
  .category-label,
  .score-button,
  .score-value,
  .score-open {
    font-size: 0.78rem;
  }

  .player-chip input {
    font-size: 16px;
    line-height: 1.1;
  }

  th {
    font-size: 0.64rem;
  }

  .section-row td {
    font-size: 0.56rem;
  }

  .score-cell.stagger-left .score-button.is-active,
  .score-cell.stagger-left .score-button.is-scratch,
  .score-cell.stagger-right .score-button.is-active,
  .score-cell.stagger-right .score-button.is-scratch {
    width: 50%;
  }

  .score-cell.stagger-left .score-button.is-active,
  .score-cell.stagger-left .score-button.is-scratch {
    margin: 0;
  }

  .score-cell.stagger-right .score-button.is-active,
  .score-cell.stagger-right .score-button.is-scratch {
    margin: 0 0 0 auto;
  }

  .dice-strip {
    grid-template-columns: minmax(0, 1fr) 114px;
  }

  .die,
  .roll-button {
    min-height: 39px;
  }

  th,
  td {
    padding: 4px 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
