@font-face {
  font-family: "Iosevka Charon Mono";
  src: url("../font/IosevkaCharonMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Iosevka Charon Mono";
  src: url("../font/IosevkaCharonMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Iosevka Charon Mono";
  src: url("../font/IosevkaCharonMono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --bg: #090909;
  --panel: #101010;
  --panel-soft: #151515;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f3f3;
  --muted: #8d8d8d;
  --accent: #8dfc72;
  --accent-soft: rgba(141, 252, 114, 0.14);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --cell-size: 30px;
  --board-size: 720px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(141, 252, 114, 0.08), transparent 30%),
    linear-gradient(180deg, #111111 0%, var(--bg) 45%);
  color: var(--text);
  font-family: "Iosevka Charon Mono", monospace;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 780px) minmax(220px, 280px);
  gap: 24px;
  width: min(100%, 1120px);
  justify-content: center;
  align-items: center;
  justify-items: center;
}

.game-panel,
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.game-panel {
  padding: 24px;
  width: 100%;
  min-width: 0;
}

.panel-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-header-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.panel-score {
  width: min(290px, 48%);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.panel-score-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.panel-score-label,
.panel-score-speed-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
}

.panel-score-value {
  margin: 0;
  line-height: 1;
  color: var(--accent);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}

.panel-score-speed {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-speed-track {
  height: 4px;
}

.eyebrow,
.card-label,
.card-caption {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.eyebrow,
.card-caption {
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.board-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 14px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-controls {
  display: none;
  margin-top: 16px;
  gap: 14px;
  justify-items: center;
}

.mobile-dpad {
  display: grid;
  grid-template-columns: repeat(3, minmax(56px, 72px));
  grid-template-areas:
    ". up ."
    "left . right"
    ". down .";
  gap: 10px;
}

.touch-btn,
.touch-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  color: var(--text);
  font-family: "Iosevka Charon Mono", monospace;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.touch-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  font-size: 1.35rem;
}

.touch-btn:active,
.touch-action-btn:active {
  transform: scale(0.98);
  border-color: rgba(141, 252, 114, 0.45);
}

.touch-up { grid-area: up; }
.touch-left { grid-area: left; }
.touch-right { grid-area: right; }
.touch-down { grid-area: down; }

.touch-action-btn {
  min-width: 180px;
  padding: 12px 18px;
  font-size: 0.9rem;
}

.game-board {
  display: block;
  width: min(100%, var(--board-size));
  height: auto;
  aspect-ratio: 1 / 1;
  max-width: 100%;
  touch-action: none;
  border-radius: 14px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.maintenance-overlay {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 14px;
  background: rgba(5, 5, 5, 0.42);
  backdrop-filter: blur(6px);
}

.maintenance-overlay[hidden] {
  display: none;
}

.maintenance-card {
  width: min(100%, 360px);
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.88), rgba(18, 18, 18, 0.8));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.maintenance-eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

.maintenance-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1;
}

.maintenance-copy {
  margin: 14px 0 0;
  color: rgba(243, 243, 243, 0.78);
  line-height: 1.5;
}

.sidebar {
  display: grid;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

.card {
  padding: 22px;
}

.score-card {
  background:
    linear-gradient(180deg, rgba(141, 252, 114, 0.16), rgba(141, 252, 114, 0.03)),
    var(--panel-soft);
}

.score-value {
  margin: 18px 0 0;
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1;
  color: var(--accent);
}

.card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.highscore-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}

.highscore-list li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.highscore-list li span:last-child {
  color: var(--accent);
}

.hs-rank {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hs-rank[data-rank="1"] { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.45); }
.hs-rank[data-rank="2"] { color: #c0c0c0; text-shadow: 0 0 8px rgba(192, 192, 192, 0.35); }
.hs-rank[data-rank="3"] { color: #cd7f32; text-shadow: 0 0 8px rgba(205, 127, 50, 0.35); }

.hs-separator {
  height: 0;
  border: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding: 0;
  background: none;
  margin: 2px 0;
}

.hs-personal {
  opacity: 0.75;
  border-style: dashed;
}

.speed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.speed-bar-track {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.speed-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: var(--accent);
  transition: width 0.15s ease-out;
}

.gameover-overlay {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 14px;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(8px);
}

.gameover-overlay[hidden] {
  display: none;
}

.updating-overlay {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 14px;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(8px);
}

.updating-overlay[hidden] {
  display: none;
}

.updating-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#snake-loader-canvas {
  display: block;
}

.updating-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gameover-card {
  width: min(100%, 340px);
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.92), rgba(18, 18, 18, 0.88));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gameover-eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

.gameover-score {
  margin: 0;
  font-size: clamp(3rem, 10vw, 4.5rem);
  line-height: 1;
  color: var(--accent);
}

.gameover-score-label {
  margin: 0 0 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.gameover-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.submit-notice {
  margin: 0;
  font-size: 0.68rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.submit-notice a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.submit-notice a:hover {
  color: var(--text);
}

.name-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--text);
  font-family: "Iosevka Charon Mono", monospace;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}

.name-input::placeholder {
  color: var(--muted);
}

.name-input:focus {
  border-color: rgba(141, 252, 114, 0.4);
}

.btn {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  font-family: "Iosevka Charon Mono", monospace;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.88;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.player-card {
  padding: 16px 22px;
}

.skin-picker {
  position: relative;
  margin-top: 8px;
  margin-bottom: 8px;
}

.skin-trigger {
  width: 100%;
  display: block;
  padding: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  overflow: hidden;
}

.skin-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
}

#skin-preview-trigger {
  display: block;
  width: 100%;
  height: 38px;
}

.skin-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  z-index: 100;
}

.skin-dropdown[hidden] {
  display: none;
}

.skin-option {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.38;
  transition: opacity 0.15s, border-color 0.15s;
}

.skin-option:not([data-locked="true"]):hover,
.skin-option[data-active="true"] {
  opacity: 1;
}

.skin-option:not([data-locked="true"]):hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.skin-option[data-active="true"] {
  border-color: var(--accent);
}

.skin-option[data-locked="true"] {
  opacity: 0.22;
  cursor: not-allowed;
}

.skin-option[data-locked="true"]:hover {
  opacity: 0.32;
}

.skin-option canvas {
  display: block;
  width: 100%;
  height: 38px;
}

.skin-lock-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.skin-lock-badge:empty {
  display: none;
}

.skin-tabs {
  display: flex;
  gap: 3px;
  margin-bottom: 5px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  flex-shrink: 0;
}

.skin-tab {
  flex: 1;
  padding: 5px 6px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--muted);
  font-family: "Iosevka Charon Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.skin-tab:hover {
  color: var(--text);
}

.skin-tab[data-active="true"] {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.skin-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skin-panel[hidden] {
  display: none;
}

.signin-overlay {
  position: absolute;
  inset: 14px;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 14px;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(8px);
}

.signin-overlay[hidden] {
  display: none;
}

.signin-card {
  width: min(100%, 300px);
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(12, 12, 12, 0.92), rgba(18, 18, 18, 0.88));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signin-eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
}

.signin-subtitle {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.signin-subtitle[hidden] {
  display: none;
}

.signin-close-btn {
  margin-top: 4px;
}

.sign-in-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  font-size: 0.8rem;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.oauth-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font-family: "Iosevka Charon Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  transition: background 0.15s, border-color 0.15s;
}

.oauth-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.oauth-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0;
}

.oauth-google .oauth-icon  { background: #4285f4; color: #fff; }
.oauth-discord .oauth-icon { background: #5865f2; color: #fff; }
.oauth-github .oauth-icon  { background: #f0f6fc; color: #0d1117; }

.account-oauth-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
}

.account-provider-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  flex-shrink: 0;
}

.account-oauth-name {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-username {
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-stats {
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.account-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.02);
}

.account-stat-item-wide {
  grid-column: 1 / -1;
}

.account-stat-label {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.account-stat-value {
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.account-stats-details {
  margin-top: 8px;
  display: grid;
  grid-template-areas: "summary";
  gap: 8px;
}

.account-stats-details summary {
  grid-area: summary;
  cursor: pointer;
  list-style: none;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.account-stats-details[open] {
  grid-template-areas:
    "content"
    "summary";
}

.account-stats-details summary::-webkit-details-marker {
  display: none;
}

.account-stats-expanded {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-subtitle {
  font-size: 0.62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.achievement-progress-list,
.account-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.achievement-progress-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achievement-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.7rem;
}

.achievement-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.achievement-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5ff242, #99f07f);
}

.account-recent-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.account-recent-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-recent-meta {
  color: var(--muted);
}

.username-picker-hint {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

.username-error {
  margin: 0;
  font-size: 0.75rem;
  color: #ff6b6b;
}

.username-error[hidden] {
  display: none;
}

.connect-account-btn,
.sign-out-btn {
  margin-top: 6px;
  width: 100%;
  padding: 8px;
  font-size: 0.8rem;
}

.oauth-btn[hidden] {
  display: none;
}

.gameover-rank {
  margin: 0 0 12px;
  min-height: 1.1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.gameover-rank-badge {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
}

.gameover-rank-badge[data-rank="1"] { color: #ffd700; text-shadow: 0 0 18px rgba(255, 215, 0, 0.5); }
.gameover-rank-badge[data-rank="2"] { color: #c0c0c0; text-shadow: 0 0 14px rgba(192, 192, 192, 0.4); }
.gameover-rank-badge[data-rank="3"] { color: #cd7f32; text-shadow: 0 0 14px rgba(205, 127, 50, 0.4); }
.gameover-rank-badge { color: var(--accent); text-shadow: 0 0 12px rgba(141, 252, 114, 0.35); }

.gameover-rank-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

@keyframes score-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); color: #a8fca0; }
  100% { transform: scale(1); }
}

.score-pulse {
  animation: score-pulse 0.22s ease-out;
}

@keyframes hs-new {
  0%   { opacity: 0; transform: translateX(10px); border-color: rgba(141, 252, 114, 0.55); box-shadow: 0 0 14px rgba(141, 252, 114, 0.18); }
  55%  { opacity: 1; transform: translateX(0);    border-color: rgba(141, 252, 114, 0.45); box-shadow: 0 0 10px rgba(141, 252, 114, 0.12); }
  100% { border-color: rgba(255, 255, 255, 0.04); box-shadow: none; }
}

@keyframes hs-improved {
  0%   { background: rgba(141, 252, 114, 0.14); border-color: rgba(141, 252, 114, 0.35); }
  100% { background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.04); }
}

.highscore-list li.hs-new {
  animation: hs-new 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.highscore-list li.hs-improved {
  animation: hs-improved 0.9s ease-out forwards;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  margin-left: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes live-flash {
  0%   { opacity: 1; box-shadow: 0 0 5px var(--accent); }
  60%  { opacity: 1; }
  100% { opacity: 0; box-shadow: none; }
}

.live-dot.active {
  animation: live-flash 1.5s ease-out forwards;
}

.is-maintenance .sidebar {
  opacity: 0.45;
}

.site-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 0.72rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--text);
}

@media (max-width: 780px) {
  body {
    padding: 12px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game-panel,
  .card {
    border-radius: 20px;
  }

  .game-panel {
    width: 100%;
    padding: 14px;
  }

  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-score {
    width: 100%;
  }

  .board-frame {
    padding: 8px;
  }

  .sidebar {
    width: 100%;
  }

  .mobile-controls {
    display: grid;
  }
}
