/* セネト固有スタイル */

.game-panel {
  margin-top: 20px;
}

.sn-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin: 0 auto 14px;
  padding: 12px 14px;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
}

.sn-status__text {
  margin: 0;
  color: var(--md-sys-color-on-surface);
  font-size: 0.95rem;
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--md-sys-color-primary) 14%, var(--md-sys-color-surface));
  color: var(--md-sys-color-on-surface);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.status-pill.is-player {
  background: color-mix(in srgb, #22d3ee 22%, var(--md-sys-color-surface));
  color: #0e7490;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.28);
}

.status-pill.is-cpu {
  background: color-mix(in srgb, #a78bfa 22%, var(--md-sys-color-surface));
  color: #6d28d9;
}

.status-pill.is-win {
  background: color-mix(in srgb, var(--success, #16a34a) 18%, var(--md-sys-color-surface));
  color: var(--success, #15803d);
}

.status-pill.is-lose {
  background: color-mix(in srgb, #ef4444 16%, var(--md-sys-color-surface));
  color: #b91c1c;
}

.sn-result {
  margin: 0 auto 14px;
  padding: 14px 16px;
  border: 1px solid rgba(63, 196, 255, 0.35);
  border-radius: var(--md-sys-shape-corner-medium);
  background:
    radial-gradient(ellipse 80% 120% at 10% 0%, rgba(63, 196, 255, 0.12), transparent 55%),
    #0f1a34;
  text-align: center;
  animation: sn-pop 0.35s ease-out;
}

.sn-result.is-win {
  border-color: rgba(63, 196, 255, 0.55);
  box-shadow: 0 0 20px rgba(63, 196, 255, 0.22);
}

.sn-result.is-lose {
  border-color: rgba(167, 139, 250, 0.45);
}

.sn-result__title {
  margin: 0 0 4px;
  color: #e8f4ff;
  font-family: Outfit, "Noto Sans JP", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.sn-result.is-win .sn-result__title {
  color: #7ee0ff;
  text-shadow: 0 0 14px rgba(63, 196, 255, 0.45);
}

.sn-result__detail {
  margin: 0 0 12px;
  color: rgba(220, 236, 255, 0.9);
  font-size: 0.92rem;
  line-height: 1.5;
}

.sn-result__actions {
  display: flex;
  justify-content: center;
}

@keyframes sn-pop {
  0% { transform: translateY(-6px) scale(0.98); opacity: 0.4; }
  100% { transform: none; opacity: 1; }
}

/* ゲームエリア */
.sn-stage {
  --sn-player: #22d3ee;
  --sn-player-deep: #0891b2;
  --sn-cpu: #a78bfa;
  --sn-cpu-deep: #7c3aed;
  --sn-neon: #3fc4ff;
  --sn-sand: #e8c872;

  width: 100%;
  max-width: min(100%, 720px);
  margin: 0 auto 14px;
  padding: clamp(8px, 2.4vw, 18px);
  border: 1px solid rgba(96, 154, 214, 0.35);
  border-radius: var(--md-sys-shape-corner-large);
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(34, 211, 238, 0.1), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(167, 139, 250, 0.12), transparent 60%),
    #0d1730;
  box-shadow: 0 14px 34px rgba(28, 52, 96, 0.24);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sn-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(6px, 1.6vw, 12px);
  margin-bottom: 8px;
}

.sn-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 6px 4px;
  border: 1px solid rgba(96, 154, 214, 0.3);
  border-radius: var(--md-sys-shape-corner-medium);
  background: rgba(10, 19, 40, 0.6);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.sn-score__name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d7e8ff;
  font-family: Outfit, "Noto Sans JP", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.sn-score__mark {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.sn-score--player .sn-score__mark {
  border-radius: 50%;
  background: var(--sn-player-deep);
}

.sn-score--cpu .sn-score__mark {
  border-radius: 2px;
  background: var(--sn-cpu-deep);
  transform: rotate(45deg) scale(0.9);
}

.sn-score__value {
  color: rgba(190, 214, 245, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.sn-score__value strong {
  color: #eaf5ff;
  font-family: Outfit, "Noto Sans JP", sans-serif;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.sn-stage.is-player-turn .sn-score--player {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.22);
}

.sn-stage.is-cpu-turn .sn-score--cpu {
  border-color: rgba(167, 139, 250, 0.7);
  background: rgba(167, 139, 250, 0.1);
  box-shadow: 0 0 14px rgba(167, 139, 250, 0.22);
}

/* 脱出済みエリア */
.sn-tray {
  display: flex;
  gap: 3px;
  padding: 3px 5px;
  border: 1px dashed rgba(120, 160, 210, 0.35);
  border-radius: 999px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sn-tray.is-target {
  border-color: #7ee0ff;
  border-style: solid;
  box-shadow: 0 0 10px rgba(63, 196, 255, 0.5);
}

.sn-tray.is-escape {
  animation: sn-escape 0.7s ease-out;
}

@keyframes sn-escape {
  0% { box-shadow: 0 0 0 0 rgba(232, 200, 114, 0.9); }
  100% { box-shadow: 0 0 0 10px rgba(232, 200, 114, 0); }
}

.sn-mini {
  width: clamp(9px, 2.4vw, 13px);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(160, 190, 230, 0.35);
  background: transparent;
}

.sn-mini--player {
  border-radius: 50%;
}

.sn-mini--cpu {
  border-radius: 2px;
  transform: rotate(45deg) scale(0.82);
}

.sn-mini--player.is-filled {
  border-color: #ffffff;
  background: var(--sn-player);
}

.sn-mini--cpu.is-filled {
  border-color: #ffffff;
  background: var(--sn-cpu);
}

/* 投げ棒 */
.sn-throw {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sn-sticks {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid rgba(120, 160, 210, 0.35);
  border-radius: 8px;
  background: rgba(6, 12, 28, 0.55);
}

.sn-stick {
  position: relative;
  display: block;
  width: 11px;
  height: 38px;
  border: 1px solid rgba(140, 180, 220, 0.35);
  border-radius: 6px;
  background: rgba(120, 150, 190, 0.18);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.sn-stick::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.sn-stick.is-up {
  border-color: #fff7dc;
  background: linear-gradient(180deg, #fffaf0 0%, #f3dfa6 100%);
  box-shadow: 0 0 8px rgba(232, 200, 114, 0.45);
}

.sn-stick.is-up::after {
  background: #3a2a08;
}

.sn-stick.is-down {
  border-color: rgba(120, 150, 200, 0.6);
  background: linear-gradient(180deg, #24345e 0%, #16224a 100%);
}

.sn-stick.is-down::after {
  border: 1px solid rgba(190, 210, 240, 0.7);
  background: transparent;
}

.sn-sticks.is-throwing .sn-stick {
  animation: sn-stick-throw 0.48s ease-in-out;
}

.sn-sticks.is-throwing .sn-stick:nth-child(2) { animation-delay: 0.04s; }
.sn-sticks.is-throwing .sn-stick:nth-child(3) { animation-delay: 0.08s; }
.sn-sticks.is-throwing .sn-stick:nth-child(4) { animation-delay: 0.02s; }

@keyframes sn-stick-throw {
  0% { transform: none; }
  35% { transform: translateY(-6px) rotate(-14deg); }
  70% { transform: translateY(1px) rotate(9deg); }
  100% { transform: none; }
}

.sn-throw__text {
  color: rgba(190, 214, 245, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.sn-throw__text strong {
  display: inline-block;
  min-width: 0.8em;
  color: #eaf5ff;
  font-family: Outfit, "Noto Sans JP", sans-serif;
  font-size: 1.15rem;
  text-align: center;
}

.sn-throw__btn {
  min-height: 44px;
  white-space: nowrap;
}

.sn-message {
  min-height: 1.5em;
  margin: 0 0 8px;
  color: rgba(190, 214, 245, 0.85);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.sn-message.is-swap {
  color: #ddd6fe;
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.45);
  animation: sn-fade 0.25s ease-out;
}

.sn-message.is-escape,
.sn-message.is-safe {
  color: #f6e3a8;
  text-shadow: 0 0 10px rgba(232, 200, 114, 0.35);
  animation: sn-fade 0.25s ease-out;
}

.sn-message.is-water {
  color: #a5f3fc;
  text-shadow: 0 0 10px rgba(63, 196, 255, 0.4);
  animation: sn-fade 0.25s ease-out;
}

.sn-message.is-pass {
  color: #cbd5e1;
  animation: sn-fade 0.25s ease-out;
}

@keyframes sn-fade {
  0% { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: none; }
}

/* 盤面 */
.sn-board-wrap {
  width: 100%;
}

.sn-board {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(2px, 0.5vw, 4px);
  width: 100%;
  padding: clamp(4px, 1vw, 8px);
  border: 2px solid rgba(63, 196, 255, 0.45);
  border-radius: clamp(8px, 2vw, 14px);
  background: #08122a;
  box-shadow: 0 0 18px rgba(63, 196, 255, 0.14), inset 0 0 0 1px rgba(232, 200, 114, 0.12);
}

.sn-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(110, 150, 210, 0.28);
  border-radius: clamp(3px, 0.8vw, 6px);
  background: linear-gradient(160deg, #1a2a52 0%, #142144 100%);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.sn-cell > * {
  grid-area: 1 / 1;
}

.sn-cell__num {
  position: absolute;
  top: 2px;
  left: 4px;
  z-index: 1;
  color: rgba(190, 210, 240, 0.7);
  font-family: Outfit, sans-serif;
  font-size: clamp(0.5rem, 1.6vw, 0.72rem);
  font-weight: 600;
  line-height: 1;
}

/* 進行方向の矢印 */
.sn-cell[data-dir]::after {
  position: absolute;
  right: 3px;
  bottom: 1px;
  color: rgba(126, 224, 255, 0.4);
  font-size: clamp(0.5rem, 1.6vw, 0.75rem);
  line-height: 1;
}

.sn-cell[data-dir="right"]::after { content: "›"; }
.sn-cell[data-dir="left"]::after { content: "‹"; right: auto; left: 3px; }
.sn-cell[data-dir="down"]::after { content: "⌄"; color: rgba(126, 224, 255, 0.65); }

.sn-cell__icon,
.sn-cell__digit {
  display: grid;
  place-items: center;
  width: 62%;
  opacity: 0.85;
}

.sn-cell__icon svg {
  display: block;
  width: 100%;
  height: auto;
}

.sn-cell__digit {
  font-family: Outfit, "Noto Sans JP", sans-serif;
  font-size: clamp(1rem, 4.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1;
}

.sn-cell__caption {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  z-index: 1;
  font-size: clamp(0.5rem, 1.4vw, 0.62rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.sn-cell.is-happy {
  border-color: rgba(232, 200, 114, 0.6);
  background: linear-gradient(160deg, #2a3358 0%, #1d2748 100%);
  color: var(--sn-sand);
}

.sn-cell.is-water {
  border-color: rgba(63, 196, 255, 0.6);
  background: linear-gradient(160deg, #0d4466 0%, #0b2f52 100%);
  color: #7ee0ff;
}

.sn-cell.is-truth {
  border-color: rgba(167, 139, 250, 0.55);
  background: linear-gradient(160deg, #2b2457 0%, #1f1a46 100%);
  color: var(--sn-sand);
}

.sn-cell.is-special .sn-cell__num {
  color: rgba(240, 232, 205, 0.85);
}

.sn-cell.is-special[data-dir]::after {
  content: none;
}

.sn-cell.is-last {
  box-shadow: inset 0 0 0 2px rgba(126, 224, 255, 0.45);
}

.sn-cell.is-target {
  outline: 2px dashed #7ee0ff;
  outline-offset: -4px;
  box-shadow: inset 0 0 12px rgba(63, 196, 255, 0.35);
}

.sn-cell.is-splash {
  animation: sn-splash 0.7s ease-out;
}

@keyframes sn-splash {
  0% { box-shadow: 0 0 0 0 rgba(63, 196, 255, 0.9); }
  100% { box-shadow: 0 0 0 10px rgba(63, 196, 255, 0); }
}

.sn-cell__slot {
  z-index: 2;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.sn-cell__slot:empty {
  pointer-events: none;
}

/* 駒 */
.sn-piece {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: default;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.sn-piece:disabled {
  opacity: 1;
}

.sn-piece__token {
  display: block;
  width: 64%;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 5px rgba(2, 8, 24, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.sn-piece--player .sn-piece__token {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cffafe 0%, var(--sn-player) 45%, var(--sn-player-deep) 100%);
}

.sn-piece--cpu .sn-piece__token {
  width: 54%;
  border-radius: 18%;
  background: radial-gradient(circle at 35% 30%, #ede9fe 0%, var(--sn-cpu) 45%, var(--sn-cpu-deep) 100%);
  transform: rotate(45deg);
}

/* 保護中の駒: 二重の縁 */
.sn-piece.is-guarded .sn-piece__token {
  box-shadow:
    0 0 0 2px #0b1430,
    0 0 0 4px rgba(255, 255, 255, 0.75),
    0 2px 5px rgba(2, 8, 24, 0.55);
}

.sn-piece.is-movable {
  cursor: pointer;
}

.sn-piece.is-movable .sn-piece__token {
  animation: sn-pulse 1.2s ease-in-out infinite;
}

@keyframes sn-pulse {
  0%, 100% { box-shadow: 0 0 0 2px #7ee0ff, 0 0 6px 2px rgba(63, 196, 255, 0.55); }
  50% { box-shadow: 0 0 0 2px #7ee0ff, 0 0 14px 4px rgba(63, 196, 255, 0.85); }
}

.sn-piece.is-movable:hover .sn-piece__token,
.sn-piece.is-movable:focus-visible .sn-piece__token {
  transform: scale(1.12);
}

.sn-piece:focus-visible {
  outline: none;
}

.sn-piece:focus-visible .sn-piece__token {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

.sn-piece.is-arrived .sn-piece__token {
  animation: sn-arrive 0.45s ease-out;
}

.sn-piece--cpu.is-arrived .sn-piece__token {
  animation-name: sn-arrive-cpu;
}

@keyframes sn-arrive {
  0% { transform: scale(1.3); box-shadow: 0 0 14px 5px rgba(63, 196, 255, 0.7); }
  100% { transform: scale(1); }
}

@keyframes sn-arrive-cpu {
  0% { transform: rotate(45deg) scale(1.3); box-shadow: 0 0 14px 5px rgba(167, 139, 250, 0.7); }
  100% { transform: rotate(45deg) scale(1); }
}

.sn-piece.is-swapped .sn-piece__token {
  animation: sn-swapped 0.7s ease-out;
}

.sn-piece--cpu.is-swapped .sn-piece__token {
  animation-name: sn-swapped-cpu;
}

@keyframes sn-swapped {
  0% { box-shadow: 0 0 16px 6px rgba(244, 114, 182, 0.85); }
  100% { box-shadow: 0 2px 5px rgba(2, 8, 24, 0.55); }
}

@keyframes sn-swapped-cpu {
  0% { transform: rotate(45deg); box-shadow: 0 0 16px 6px rgba(244, 114, 182, 0.85); }
  100% { transform: rotate(45deg); box-shadow: 0 2px 5px rgba(2, 8, 24, 0.55); }
}

/* 凡例 */
.sn-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.sn-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(214, 234, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 600;
}

.sn-legend__swatch {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.sn-legend__swatch--player {
  border-radius: 50%;
  background: var(--sn-player-deep);
}

.sn-legend__swatch--cpu {
  border-radius: 2px;
  background: var(--sn-cpu-deep);
  transform: rotate(45deg) scale(0.85);
}

.sn-legend__swatch--guard {
  border-radius: 50%;
  background: var(--sn-player-deep);
  box-shadow: 0 0 0 2px #0b1430, 0 0 0 4px rgba(255, 255, 255, 0.75);
  margin: 0 3px;
}

.sn-houses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 6px;
  margin: 10px 0 0;
}

.sn-houses__item {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(96, 154, 214, 0.25);
  border-radius: 8px;
  background: rgba(10, 19, 40, 0.55);
}

.sn-houses dt {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  color: #eaf2ff;
  font-size: 0.8rem;
  font-weight: 700;
}

.sn-houses dd {
  margin: 0;
  color: rgba(200, 220, 245, 0.88);
  font-size: 0.76rem;
  line-height: 1.45;
}

.sn-houses__key {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  min-width: 26px;
  height: 20px;
  padding: 0 4px;
  border: 1px solid;
  border-radius: 5px;
  font-family: Outfit, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.sn-houses__key.is-happy {
  border-color: rgba(232, 200, 114, 0.6);
  background: #1d2748;
  color: var(--sn-sand);
}

.sn-houses__key.is-water {
  border-color: rgba(63, 196, 255, 0.6);
  background: #0b2f52;
  color: #7ee0ff;
}

.sn-houses__key.is-truth {
  border-color: rgba(167, 139, 250, 0.55);
  background: #1f1a46;
  color: var(--sn-sand);
}

.sn-guide {
  max-width: min(100%, 720px);
  margin: 0 auto 12px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: center;
}

.how-to-list--ordered {
  list-style: decimal;
  padding-left: 1.35em;
}

.how-to-list--ordered li {
  margin: 0.35em 0;
}

@media (max-width: 560px) {
  .sn-stage {
    width: calc(100% + 24px);
    max-width: none;
    margin-right: -12px;
    margin-left: -12px;
    padding: 8px 6px;
  }

  .sn-board {
    gap: 2px;
    padding: 3px;
  }

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

  .sn-throw {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
  }

  .sn-cell__caption,
  .sn-cell[data-dir="right"]::after,
  .sn-cell[data-dir="left"]::after {
    display: none;
  }

  .sn-cell__num {
    top: 1px;
    left: 2px;
  }

  .sn-cell__digit {
    padding-top: 30%;
    font-size: 0.82rem;
  }

  .sn-cell__icon {
    width: 56%;
    padding-top: 22%;
  }

  .sn-piece__token {
    width: 70%;
  }

  .sn-piece--cpu .sn-piece__token {
    width: 58%;
  }
}

@media (hover: none) {
  .sn-piece.is-movable:hover .sn-piece__token {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sn-piece.is-movable .sn-piece__token,
  .sn-piece.is-arrived .sn-piece__token,
  .sn-piece.is-swapped .sn-piece__token,
  .sn-sticks.is-throwing .sn-stick,
  .sn-cell.is-splash,
  .sn-tray.is-escape,
  .sn-message,
  .sn-result {
    animation: none;
  }

  .sn-piece.is-movable .sn-piece__token {
    box-shadow: 0 0 0 2px #7ee0ff, 0 0 10px 3px rgba(63, 196, 255, 0.7);
  }
}

/* 外枠・HUD・操作は共通プレイUI。横長の30マス盤と投げ棒のみ固有配置。 */
html.gs-playing .game-panel { align-items: center; }
html.gs-playing .game-panel > .gs-bar,
html.gs-playing .game-panel > .gs-hud,
html.gs-playing .game-controls { flex: none; width: 100%; max-width: 640px; }
html.gs-playing .status-pill { padding: 0; background: none; box-shadow: none; color: var(--play-accent); font-size: 1rem; }
html.gs-playing .status-pill.is-cpu,
html.gs-playing .status-pill.is-lose { color: #c4b5fd; }
html.gs-playing .sn-status__text { flex: none; width: 100%; max-width: 640px; min-height: 3em; margin: 0 0 8px; color: var(--play-text); text-align: center; font-size: .8125rem; line-height: 1.5; }
html.gs-playing .sn-stage { flex: none; width: 100%; max-width: 640px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
html.gs-playing .sn-hud { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); margin: 0 0 8px; }
html.gs-playing .sn-tray { justify-self: center; }
html.gs-playing .sn-board-wrap { position: relative; margin: 0; }
html.gs-playing .sn-message { min-height: 3em; height: 3em; margin: 0 0 8px; font-size: .8125rem; line-height: 1.5; }
html.gs-playing .sn-legend { margin: 8px 0 0; font-size: .75rem; color: var(--play-text-muted); }
html.gs-playing .sn-guide { display: none; }
html.gs-playing .game-controls { display: flex; justify-content: center; gap: 12px; margin: 12px 0 0; }
html.gs-playing .sn-result { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; padding: 8px; border-color: var(--play-border); background: rgba(8, 15, 31, .96); }
html.gs-playing .sn-result__title { font-size: clamp(1rem, 4vw, 1.35rem); }
html.gs-playing .sn-result__detail { margin-bottom: 6px; font-size: .8125rem; }
@media (min-width: 768px) and (min-height: 600px) {
  html.gs-playing .game-panel { padding-top: max(clamp(24px, 5vh, 56px), env(safe-area-inset-top)); }
  html.gs-playing .game-panel > .gs-bar { margin-bottom: 24px; }
  html.gs-playing .game-panel > .gs-hud { margin-bottom: 18px; }
  html.gs-playing .sn-hud { margin-bottom: 16px; }
  html.gs-playing .game-controls { margin-top: 20px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  html.gs-playing .game-panel { display: grid; grid-template-columns: 44px minmax(0, 586px); column-gap: 10px; align-content: start; justify-content: center; }
  html.gs-playing .game-panel > .gs-bar { grid-column: 1; grid-row: 1; margin: 0; }
  html.gs-playing .game-panel > .gs-hud { grid-column: 2; margin: 0; }
  html.gs-playing .sn-status__text,
  html.gs-playing .sn-stage,
  html.gs-playing .game-controls { grid-column: 1 / -1; }
  html.gs-playing .sn-status__text { min-height: 1.5em; margin: 2px 0; }
  html.gs-playing .sn-hud { margin-bottom: 0; }
  html.gs-playing .sn-message { height: 1.5em; min-height: 1.5em; margin: 0; }
  html.gs-playing .sn-board { max-width: min(100%, calc((100dvh - 280px) * 10 / 3)); margin: auto; }
  html.gs-playing .sn-legend { margin-top: 4px; }
  html.gs-playing .game-controls { margin-top: 4px; }
}
