:root {
  --moksh-ink: #14213d;
  --moksh-muted: #667085;
  --moksh-surface: #ffffff;
  --moksh-canvas: #f4f7fb;
  --moksh-border: #dbe4f0;
  --moksh-primary: #3157d5;
  --moksh-primary-dark: #2443aa;
  --moksh-success: #15803d;
  --moksh-warning: #b45309;
  --moksh-danger: #b42318;
  --moksh-shadow: 0 18px 50px rgba(20, 33, 61, 0.1);
}

body.moksh-modern {
  background:
    radial-gradient(circle at top left, rgba(49, 87, 213, 0.08), transparent 32rem),
    var(--moksh-canvas);
  color: var(--moksh-ink);
}

.moksh-modern .mokshpatam-hero {
  max-width: 1120px;
  margin: 1.5rem auto;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  border: 1px solid var(--moksh-border);
  border-radius: 1.75rem;
  box-shadow: var(--moksh-shadow);
}

.moksh-modern .mokshpatam-hero-title {
  margin-bottom: 0.35rem;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -0.035em;
}

.moksh-modern .mokshpatam-hero-desc {
  max-width: 720px;
  margin-bottom: 1.25rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.moksh-modern .mokshpatam-options {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.moksh-quick-host {
  display: grid;
  gap: 1rem;
}

.moksh-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.14);
}

.moksh-mode-option {
  min-height: 44px;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.moksh-mode-option.is-selected {
  background: #fff;
  color: var(--moksh-primary-dark);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.2);
}

.moksh-mode-description {
  min-height: 2.6em;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
}

.moksh-join-card {
  align-content: center;
}

.moksh-modern .mokshpatam-card {
  min-width: 0;
  max-width: none;
  padding: 1.35rem;
  border-width: 1px;
  border-color: var(--moksh-border);
  border-radius: 1.1rem;
  box-shadow: none;
  cursor: default;
}

.moksh-modern .mokshpatam-card:hover {
  border-width: 1px;
}

.moksh-modern .mokshpatam-card-featured {
  background: linear-gradient(145deg, #1d3d9e, #3157d5);
  color: #fff;
  border-color: transparent;
}

.moksh-modern .mokshpatam-card-featured .mokshpatam-card-title,
.moksh-modern .mokshpatam-card-featured .mokshpatam-card-desc,
.moksh-modern .mokshpatam-card-featured .mokshpatam-card-icon {
  color: #fff !important;
}

.moksh-modern .mokshpatam-card-featured .mokshpatam-card-button {
  background: #fff;
  color: var(--moksh-primary);
}

.moksh-modern .mokshpatam-card-button {
  width: 100%;
  margin-top: auto;
  border-radius: 0.75rem;
}

.moksh-modern .mokshpatam-card-button:focus-visible,
.moksh-modern button:focus-visible {
  outline: 3px solid rgba(49, 87, 213, 0.35);
  outline-offset: 3px;
}

.moksh-eyebrow {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--moksh-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.moksh-free-note {
  margin: 0.8rem 0 0;
  color: var(--moksh-muted);
  font-size: 0.88rem;
}

.moksh-modern .moksh-party-lobby {
  width: min(1120px, calc(100% - 2rem));
  min-height: min(720px, calc(100vh - 2.5rem));
  margin: 1.25rem auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--moksh-border);
  border-radius: 1.75rem;
  box-shadow: var(--moksh-shadow);
}

.moksh-modern.moksh-party-waiting .moksh-party-lobby {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.65fr);
}

.moksh-lobby-kicker {
  display: inline-flex;
  margin-bottom: 0.65rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #e9efff;
  color: var(--moksh-primary-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.moksh-modern .moksh-party-code {
  margin: 1rem 0;
  padding: 0.65rem;
  background: #f1f5ff;
  color: var(--moksh-primary-dark);
}

.moksh-lobby-roster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  min-height: 3.25rem;
  margin: 1rem 0;
}

.moksh-roster-chip {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--moksh-border);
  border-radius: 999px;
  background: #fff;
}

.moksh-modern .game-container {
  max-width: 1440px;
  padding: 1rem;
}

.moksh-modern .control-panel {
  padding: 0.9rem;
  border: 1px solid var(--moksh-border);
  border-radius: 1rem;
  box-shadow: 0 6px 24px rgba(20, 33, 61, 0.06);
}

.moksh-modern .control-panel:hover,
.moksh-modern .board-container:hover,
.moksh-modern .moksh-info-tile:hover {
  transform: none;
}

.moksh-stage-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

.moksh-stage-copy h1 {
  margin: 0;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
}

.moksh-stage-copy p {
  margin: 0.2rem 0 0;
  color: var(--moksh-muted);
  font-size: 0.9rem;
}

.moksh-stage-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.moksh-stage-actions button,
.moksh-stage-actions summary {
  min-height: 42px;
  margin: 0 !important;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--moksh-border);
  border-radius: 999px;
  background: #fff;
  color: var(--moksh-ink);
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.moksh-stage-actions details {
  position: relative;
}

.moksh-stage-actions details[open] summary {
  background: #eef3ff;
  border-color: #9fb2ef;
}

.moksh-more-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.45rem);
  right: 0;
  display: grid;
  gap: 0.4rem;
  width: 190px;
  padding: 0.55rem;
  border: 1px solid var(--moksh-border);
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: var(--moksh-shadow);
}

.moksh-more-menu button {
  width: 100%;
  border-radius: 0.6rem;
  text-align: left;
}

.moksh-competition-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 1rem;
}

.moksh-modern .board-container {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(0.65rem, 2vw, 1.25rem);
  border: 1px solid var(--moksh-border);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 50% 20%, rgba(251, 191, 36, 0.12), transparent 44%),
    linear-gradient(145deg, #fffdf8, #f8f2e8);
  box-shadow: 0 18px 42px rgba(66, 44, 16, 0.12);
  transition: box-shadow 320ms ease, background 320ms ease;
}

.moksh-modern .board-container.is-cinematic {
  box-shadow: 0 22px 56px rgba(66, 44, 16, 0.24);
}

.moksh-modern .board-container.is-ladder-event {
  background:
    radial-gradient(circle at 50% 45%, rgba(251, 191, 36, 0.28), transparent 54%),
    linear-gradient(145deg, #fffdf8, #f8f2e8);
}

.moksh-modern .board-container.is-snake-event {
  background:
    radial-gradient(circle at 50% 45%, rgba(220, 38, 38, 0.18), transparent 54%),
    linear-gradient(145deg, #fffdf8, #f8f2e8);
}

.moksh-modern .board-container.is-cinematic .game-board {
  scale: 1.018;
}

.moksh-modern .game-board {
  position: relative;
  isolation: isolate;
  width: min(100%, 680px);
  padding: clamp(0.35rem, 1.4vw, 0.7rem);
  gap: 2px;
  border: clamp(5px, 1vw, 10px) solid #744210;
  border-radius: 1rem;
  background: #744210;
  box-shadow:
    0 4px 0 #4a2a0b,
    0 18px 36px rgba(78, 52, 23, 0.24),
    inset 0 0 0 2px #f9d98b;
  transform: perspective(1100px) rotateX(0.7deg);
  transform-origin: center bottom;
  transition: scale 360ms cubic-bezier(.2, .8, .35, 1);
}

.moksh-modern .board-cell {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0.2rem;
  background: linear-gradient(145deg, #fff8dc, #f6df9b);
  color: #553512;
  font-size: clamp(0.55rem, 1.5vw, 0.82rem);
  font-weight: 850;
  box-shadow: none;
  transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.moksh-modern .board-cell:nth-child(4n + 2),
.moksh-modern .board-cell:nth-child(4n + 3) {
  background: linear-gradient(145deg, #f7e5af, #edcf75);
}

.moksh-modern .board-cell::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(113, 72, 22, 0.12);
  content: "";
  pointer-events: none;
}

.moksh-modern .board-cell.moksha,
.moksh-modern .board-cell#cell-100 {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0 8%, transparent 9%),
    conic-gradient(from 0deg, #fde68a, #f59e0b, #fde68a, #f59e0b, #fde68a);
  color: #6b3300;
  text-shadow: 0 1px #fff8dc;
}

.moksh-modern .board-cell.is-move-focus {
  z-index: 4;
  filter: brightness(1.14) saturate(1.2);
  transform: scale(1.08);
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px #3157d5, 0 0 24px rgba(49, 87, 213, 0.7);
}

.moksh-modern .board-cell.is-snake-focus {
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px #dc2626, 0 0 28px rgba(220, 38, 38, 0.72);
}

.moksh-modern .board-cell.is-ladder-focus {
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px #f59e0b, 0 0 28px rgba(245, 158, 11, 0.72);
}

.moksh-modern #boardOverlay {
  z-index: 4;
  overflow: visible;
}

.moksh-snake-illustration,
.moksh-ladder-illustration {
  transition: opacity 180ms ease, filter 180ms ease;
}

.moksh-snake-pattern {
  animation: moksh-snake-shimmer 3.4s linear infinite;
}

.moksh-snake-face {
  transform-box: fill-box;
  transform-origin: center;
  animation: moksh-snake-watch 2.8s ease-in-out infinite;
}

.moksh-ladder-rail,
.moksh-ladder-rung {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.65));
}

@keyframes moksh-snake-shimmer {
  to { stroke-dashoffset: -28; }
}

@keyframes moksh-snake-watch {
  0%, 100% { scale: 1; }
  50% { scale: 1.08; }
}

.moksh-turn-rail {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  padding: 0.55rem;
  overflow-x: auto;
  border: 1px solid var(--moksh-border);
  border-radius: 0.9rem;
  background: #fff;
  scrollbar-width: thin;
}

.moksh-turn-player {
  display: grid;
  grid-template-columns: auto minmax(64px, auto) auto;
  gap: 0.4rem;
  align-items: center;
  flex: 0 0 auto;
  padding: 0.35rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--moksh-muted);
  font-size: 0.8rem;
}

.moksh-turn-player.is-current {
  border-color: #9fb2ef;
  background: #eef3ff;
  color: var(--moksh-primary-dark);
  box-shadow: 0 0 0 3px rgba(49, 87, 213, 0.08);
}

.moksh-turn-position {
  min-width: 1.8rem;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  background: #edf1f7;
  text-align: center;
  font-weight: 800;
}

.moksh-token {
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  background: var(--token-color, #3157d5);
  color: #fff;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(20, 33, 61, 0.22);
}

.moksh-token-name em {
  color: var(--moksh-primary);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

.moksh-token--circle { border-radius: 50%; }
.moksh-token--diamond { border-radius: 0.25rem; transform: rotate(45deg); }
.moksh-token--diamond::first-letter { transform: rotate(-45deg); }
.moksh-token--square { border-radius: 0.2rem; }
.moksh-token--triangle { clip-path: polygon(50% 0, 100% 100%, 0 100%); padding-top: 0.35rem; }
.moksh-token--hexagon { clip-path: polygon(25% 7%, 75% 7%, 100% 50%, 75% 93%, 25% 93%, 0 50%); }
.moksh-token--shield { clip-path: polygon(8% 0, 92% 0, 88% 65%, 50% 100%, 12% 65%); }
.moksh-token--star { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 95%, 50% 72%, 21% 95%, 32% 57%, 2% 35%, 39% 35%); }
.moksh-token--ring { border: 5px solid var(--token-color, #3157d5); border-radius: 50%; background: #fff; color: var(--moksh-ink); }
.moksh-token--player-1 { --token-color: #3157d5; }
.moksh-token--player-2 { --token-color: #d92d20; }
.moksh-token--player-3 { --token-color: #15803d; }
.moksh-token--player-4 { --token-color: #b45309; }
.moksh-token--player-5 { --token-color: #7e22ce; }
.moksh-token--player-6 { --token-color: #0e7490; }
.moksh-token--player-7 { --token-color: #be185d; }
.moksh-token--player-8 { --token-color: #475467; }

.moksh-side-panel {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.moksh-panel-card {
  padding: 0.9rem;
  border: 1px solid var(--moksh-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 6px 20px rgba(20, 33, 61, 0.05);
}

.moksh-panel-card h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.moksh-standings {
  display: grid;
  gap: 0.4rem;
}

.moksh-standing {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 0.65rem;
}

.moksh-standing.is-current {
  background: #eef3ff;
}

.moksh-standing-rank {
  color: var(--moksh-muted);
  font-size: 0.8rem;
  font-weight: 850;
  text-align: center;
}

.moksh-standing-player {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-width: 0;
}

.moksh-last-move {
  margin: 0;
  color: var(--moksh-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.moksh-empty-state {
  margin: 0;
  color: var(--moksh-muted);
  font-size: 0.85rem;
}

.moksh-modern .dice-control-panel {
  position: sticky;
  top: 0.75rem;
  border: 2px solid #cbd7fa;
  background:
    radial-gradient(circle at 90% 5%, rgba(96, 165, 250, 0.2), transparent 38%),
    #fff;
  box-shadow: 0 12px 34px rgba(49, 87, 213, 0.16);
}

.moksh-modern #rollDiceBtn {
  min-height: 52px;
  font-size: 1rem !important;
  box-shadow: 0 7px 0 #2443aa, 0 14px 24px rgba(49, 87, 213, 0.2);
  transform: translateY(-2px);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.moksh-modern #rollDiceBtn.pulse-animation {
  animation: none;
}

.moksh-modern #rollDiceBtn:not(:disabled):active {
  box-shadow: 0 2px 0 #2443aa, 0 7px 14px rgba(49, 87, 213, 0.16);
  transform: translateY(3px);
}

.moksh-modern .dice {
  position: relative;
  transform-style: preserve-3d;
  box-shadow:
    0 9px 0 #d9e2f2,
    0 15px 22px rgba(20, 33, 61, 0.18),
    inset 0 2px 0 #fff;
}

.moksh-modern .dice.is-rolling {
  animation: moksh-dice-tumble 620ms cubic-bezier(.2, .75, .3, 1);
}

.moksh-modern .dice.is-landed {
  animation: moksh-dice-land 380ms cubic-bezier(.2, .9, .35, 1.35);
}

.moksh-modern .dice.is-six {
  box-shadow:
    0 9px 0 #d97706,
    0 0 0 5px rgba(251, 191, 36, 0.3),
    0 18px 32px rgba(245, 158, 11, 0.4);
}

@keyframes moksh-dice-tumble {
  0% { transform: rotate(0) scale(1); }
  28% { transform: rotate(-16deg) scale(1.08) translateY(-8px); }
  62% { transform: rotate(14deg) scale(.95) translateY(3px); }
  100% { transform: rotate(0) scale(1); }
}

@keyframes moksh-dice-land {
  0% { transform: scale(.84); }
  70% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

.moksh-modern .turn-status.active,
.moksh-modern .my-turn-highlight {
  background: #e9f8ef;
  color: #166534;
  border-color: #86efac;
  animation: none;
}

.moksh-modern .player-piece {
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(20, 33, 61, 0.3);
}

.moksh-modern .player-piece.moksh-token-shape {
  background: var(--token-color, #3157d5);
  z-index: 8;
  outline: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 3px 0 color-mix(in srgb, var(--token-color, #3157d5), #000 34%),
    0 7px 13px rgba(20, 33, 61, 0.34);
  transition:
    left 120ms cubic-bezier(.2, .8, .35, 1.2),
    top 120ms cubic-bezier(.2, .8, .35, 1.2),
    transform 180ms ease;
}

.moksh-modern .player-piece.moving {
  z-index: 12;
  transform: translateY(-7px) scale(1.12);
  filter: drop-shadow(0 9px 6px rgba(20, 33, 61, 0.3));
}

.moksh-modern .player-piece.current-turn {
  animation: moksh-token-turn 1.35s ease-in-out infinite;
}

@keyframes moksh-token-turn {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(49, 87, 213, 0)); }
  50% { filter: drop-shadow(0 0 9px rgba(49, 87, 213, 0.85)); }
}

.moksh-board-event {
  position: fixed;
  z-index: 12000;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  width: min(390px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
  background: #172554;
  color: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -140%);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(.2, .9, .35, 1.2);
}

.moksh-board-event.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.moksh-board-event.is-ladder {
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.moksh-board-event.is-snake {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
}

.moksh-board-event.is-win {
  background: linear-gradient(135deg, #4338ca, #7c3aed 52%, #d97706);
}

.moksh-board-event-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
  font-weight: 900;
}

.moksh-board-event strong,
.moksh-board-event small {
  display: block;
}

.moksh-board-event small {
  margin-top: 0.1rem;
  color: rgba(255, 255, 255, 0.82);
}

.moksh-modern .player-piece.moksh-token--ring {
  border: 7px solid var(--token-color, #3157d5);
  background: #fff;
  color: var(--moksh-ink);
}

.moksh-modern .players-list .player-card {
  border: 1px solid transparent;
  box-shadow: none;
}

.moksh-modern .players-list .player-card:hover {
  border: 1px solid var(--moksh-border);
  transform: none;
  box-shadow: none;
}

.moksh-modern .moksh-status-bar .row {
  --bs-gutter-x: 0.5rem;
}

@media (max-width: 900px) {
  .moksh-modern .mokshpatam-options,
  .moksh-competition-layout {
    grid-template-columns: 1fr;
  }

  .moksh-modern.moksh-party-waiting .moksh-party-lobby {
    grid-template-columns: 1fr;
  }

  .moksh-side-panel {
    display: contents;
  }

  .moksh-side-panel .dice-control-panel {
    order: -1;
  }

  .moksh-side-panel > :not(.dice-control-panel) {
    order: 1;
  }
}

@media (max-width: 600px) {
  .moksh-modern .mokshpatam-hero {
    width: calc(100% - 1rem);
    margin: 0.5rem;
    padding: 1rem;
    border-radius: 1.1rem;
  }

  .moksh-modern .mokshpatam-options {
    gap: 0.65rem;
  }

  .moksh-modern .mokshpatam-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.25rem 0.8rem;
    align-items: center;
    min-height: 0;
    padding: 0.85rem;
    text-align: left;
  }

  .moksh-modern .mokshpatam-card.moksh-quick-host {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    padding: 1rem;
    text-align: center;
  }

  .moksh-modern .mokshpatam-card.moksh-quick-host .mokshpatam-card-icon {
    margin: 0;
    font-size: 1.8rem;
  }

  .moksh-modern .mokshpatam-card.moksh-quick-host .mokshpatam-card-button {
    width: 100%;
  }

  .moksh-modern .mokshpatam-card-icon {
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 1.45rem;
  }

  .moksh-modern .mokshpatam-card-title,
  .moksh-modern .mokshpatam-card-desc {
    margin: 0;
  }

  .moksh-modern .mokshpatam-card-button,
  .moksh-modern .mokshpatam-card #joinGameForm {
    grid-column: 1 / -1;
  }

  .moksh-modern .mokshpatam-card-desc {
    font-size: 0.82rem;
  }

  .moksh-modern .moksh-party-lobby {
    width: calc(100% - 1rem);
    min-height: calc(100vh - 1rem);
    margin: 0.5rem;
    border-radius: 1.1rem;
  }

  .moksh-stage-bar {
    grid-template-columns: 1fr;
  }

  .moksh-stage-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .moksh-stage-actions button,
  .moksh-stage-actions summary {
    width: 100%;
    text-align: center;
  }

  .moksh-more-menu {
    right: auto;
    left: 0;
  }

  .moksh-modern .game-container {
    padding: 0.5rem;
  }

  .moksh-modern .board-container {
    padding: 0.4rem;
  }

  .moksh-modern .board-container h4 {
    margin: 0.25rem 0 0.5rem !important;
    font-size: 0.95rem;
  }

  .moksh-modern .game-board {
    width: 100%;
    max-width: none;
    gap: 1px;
    border-width: 5px;
    border-radius: 0.65rem;
    transform: none;
  }

  .moksh-modern .board-cell {
    min-height: 0;
    font-size: clamp(0.44rem, 2vw, 0.68rem);
  }

  .moksh-modern .dice-control-panel {
    position: sticky;
    z-index: 15;
    bottom: 0.35rem;
    top: auto;
    margin-bottom: 0.5rem;
    padding: 0.65rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .moksh-modern .moksh-status-bar {
    padding: 0.35rem 0;
  }

  .moksh-modern .moksh-info-tile {
    min-height: 58px;
    margin: 0;
    padding: 0.45rem;
  }

  .moksh-modern .tile-label {
    font-size: 0.62rem;
  }

  .moksh-modern .code-tile .tile-value,
  .moksh-modern .player-tile .tile-value,
  .moksh-modern .status-tile .tile-value {
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .moksh-modern *,
  .moksh-modern *::before,
  .moksh-modern *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
