*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #ffffff;
  --text: #1a1a2e;
  --muted: #8a8a9a;
  --accent: #1e3a5f;
  --accent-light: #2d5a8a;
  --dot: #d8dde6;
  --card: #ffffff;
  --shadow: rgba(30, 58, 95, 0.12);
}

body.dark {
  --bg: #12121a;
  --text: #eef0f6;
  --muted: #8b8da0;
  --accent: #6ea8e8;
  --accent-light: #8bc4ff;
  --dot: #2a2a3a;
  --card: #1e1e2a;
  --shadow: rgba(0, 0, 0, 0.4);
}

html, body {
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  user-select: text;
  -webkit-user-select: text;
  touch-action: manipulation;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
  width: 100%;
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
}

.header {
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 10px;
}

.header-left {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--card);
  color: var(--accent);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--shadow);
}

.icon-btn:active {
  transform: scale(0.96);
}

.level-label {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
}

.header-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.toast {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  z-index: 200;
  transform: translateX(-50%) translateY(-6px);
  width: min(86vw, 400px);
  max-width: none;
  background: var(--card);
  color: var(--accent);
  border: 1px solid rgba(30, 58, 95, 0.14);
  box-shadow: 0 6px 20px var(--shadow);
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

body.dark .toast {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

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

.lives {
  text-align: right;
  font-size: 22px;
  letter-spacing: 3px;
}

.board-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  /** Канвас растягиваем явно inset: 0 — иначе в flex блок ~300×150 и поле режется по краям. */
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

#gameCanvas.shake {
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}


.footer {
  flex-shrink: 0;
  padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-hint-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.hint-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--dot);
  border-radius: 24px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--shadow);
}

.hint-btn-ad-offer {
  border-color: rgba(30, 58, 95, 0.22);
  box-shadow: 0 2px 12px rgba(30, 58, 95, 0.16);
}

.hint-btn:active {
  transform: scale(0.97);
}

.hint-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.hint-icon {
  font-size: 20px;
  line-height: 1;
}

.hint-badge {
  position: absolute;
  top: -7px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e8193a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(232, 25, 58, 0.45);
  pointer-events: none;
}

.hint-ad-badge {
  position: absolute;
  top: -9px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 6px 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2d5a8a 0%, #1e3a5f 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(30, 58, 95, 0.35);
  pointer-events: none;
}

.hint-ad-plus {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hint-ad-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.hint-ad-badge.hidden,
.hint-badge.hidden {
  display: none;
}

.zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--dot);
  border-radius: 50%;
  background: var(--card);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.zoom-reset-btn {
  font-size: 16px;
  flex-shrink: 0;
}

#zoomSlider {
  flex: 1;
  accent-color: var(--accent);
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.overlay.hidden {
  display: none;
}

.overlay-card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 12px 40px var(--shadow);
  max-width: 300px;
  width: 90%;
}

.overlay-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.overlay-card p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 14px;
}

.gen-overlay-card p {
  margin-bottom: 16px;
}

.gen-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border: 3px solid rgba(30, 58, 95, 0.14);
  border-top-color: #1e3a5f;
  border-radius: 50%;
  animation: gen-spin 0.75s linear infinite;
}

@keyframes gen-spin {
  to {
    transform: rotate(360deg);
  }
}

body.dark .gen-spinner {
  border-color: rgba(139, 196, 255, 0.18);
  border-top-color: #8bc4ff;
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.primary-btn:active {
  opacity: 0.85;
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* ——— Экран победы ——— */
.win-overlay-card {
  max-width: min(92vw, 380px);
  width: 92%;
  padding: 24px 20px 20px;
  max-height: min(92dvh, 640px);
  overflow-y: auto;
}

.win-lb-section {
  margin: 4px 0 18px;
  text-align: center;
}

.win-lb-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.win-rank-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  min-height: 56px;
  margin-bottom: 8px;
}

.win-rank-from,
.win-rank-to {
  font-size: clamp(36px, 10vw, 48px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
}

.win-rank-from {
  opacity: 0.35;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.win-rank-from.win-rank-from-out {
  opacity: 0.15;
  transform: scale(0.82);
}

.win-rank-arrow {
  font-size: 22px;
  font-weight: 800;
  color: #2ecc71;
  animation: win-rank-arrow-pop 0.55s ease 0.35s both;
}

.win-rank-to.win-rank-pop {
  animation: win-rank-pop 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.win-rank-delta {
  width: 100%;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #2ecc71;
  animation: win-rank-delta-in 0.5s ease 1s both;
}

.win-lb-loading,
.win-lb-fallback {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 4px;
}

.win-lb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  max-height: 220px;
  overflow: hidden;
}

.win-lb-row {
  display: grid;
  grid-template-columns: 44px 32px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(30, 58, 95, 0.06);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.win-lb-row-you {
  background: linear-gradient(180deg, #2d5a8a 0%, #1e3a5f 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 95, 0.28);
  z-index: 2;
}

.win-lb-rank {
  font-variant-numeric: tabular-nums;
  text-align: left;
}

.win-lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(30, 58, 95, 0.1);
  font-size: 14px;
}

.win-lb-row-you .win-lb-avatar {
  background: rgba(255, 255, 255, 0.18);
}

.win-lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.win-lb-name {
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-lb-score {
  font-size: 12px;
  opacity: 0.85;
  white-space: nowrap;
}

.win-lb-row-enter {
  animation: win-lb-row-in 0.45s ease both;
}

.win-continue-btn {
  width: 100%;
}

.win-continue-btn.hidden {
  display: none;
}

@keyframes win-rank-pop {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes win-rank-arrow-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes win-rank-delta-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes win-lb-row-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.dark .win-lb-row {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

body.dark .win-lb-row-you {
  background: linear-gradient(180deg, #3a6a9a 0%, #1e3a5f 100%);
  color: #fff;
}

body.dark .win-rank-from,
body.dark .win-rank-to {
  color: var(--accent-light);
}

/* ——— Модальные окна (проигрыш, настройки) ——— */
.game-over-overlay,
.modal-overlay {
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: rgba(18, 22, 32, 0.72);
}

.game-over-panel,
.modal-panel {
  width: min(100%, 340px);
  background: #fff;
  border: 4px solid #7ec8f5;
  border-radius: 28px;
  padding: 28px 22px 24px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.game-over-title,
.modal-title {
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 800;
  color: #5eb8ea;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.game-over-heart-wrap {
  position: relative;
  display: inline-block;
  margin: 4px 0 10px;
}

.game-over-heart {
  width: clamp(88px, 22vw, 108px);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(232, 25, 58, 0.35));
}

.game-over-heart-badge {
  position: absolute;
  top: 4px;
  right: -10px;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c8ef5a 0%, #9fd62e 100%);
  border: 3px solid #fff;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 32px;
  box-shadow: 0 4px 10px rgba(120, 170, 30, 0.45);
}

.game-over-subtitle {
  font-size: clamp(17px, 4.2vw, 22px);
  font-weight: 800;
  color: #1a4a7a;
  margin-bottom: 22px;
  line-height: 1.25;
}

.game-over-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-over-btn,
.modal-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 16px 20px;
  font-size: clamp(17px, 4vw, 20px);
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.game-over-btn:active,
.modal-btn:active {
  transform: translateY(2px);
  filter: brightness(0.96);
}

.game-over-btn-restart,
.modal-btn-primary {
  background: linear-gradient(180deg, #7ec8f5 0%, #5eb0e8 55%, #4a9fd9 100%);
  box-shadow:
    0 5px 0 #3a84bc,
    0 10px 24px rgba(74, 159, 217, 0.45);
}

.game-over-btn-restart:active,
.modal-btn-primary:active {
  box-shadow:
    0 2px 0 #3a84bc,
    0 6px 16px rgba(74, 159, 217, 0.35);
}

.game-over-btn-revive,
.modal-btn-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #c8ef5a 0%, #a8db38 55%, #94c92a 100%);
  box-shadow:
    0 5px 0 #6fa01e,
    0 10px 24px rgba(148, 201, 42, 0.45);
}

.game-over-btn-revive:active,
.modal-btn-success:active {
  box-shadow:
    0 2px 0 #6fa01e,
    0 6px 16px rgba(148, 201, 42, 0.35);
}

.game-over-ad-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.game-over-back,
.modal-back {
  border: none;
  background: transparent;
  color: #fff;
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 700;
  cursor: pointer;
  padding: 8px 16px;
  opacity: 0.95;
}

.game-over-back:active,
.modal-back:active {
  opacity: 0.7;
}

/* ——— Настройки ——— */
.settings-panel {
  position: relative;
  text-align: left;
}

.settings-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #eef6fc;
  color: #5eb0e8;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  transition: background 0.12s ease, color 0.12s ease;
}

.settings-close:active {
  background: #d6ecfa;
  color: #3a84bc;
}

.settings-panel .modal-title {
  text-align: center;
  margin-bottom: 22px;
}

.settings-sound-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: #f3f9fd;
  border: 2px solid #d6ecfa;
  cursor: pointer;
  user-select: none;
}

.settings-sound-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.settings-check {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 3px solid #5eb0e8;
  background: #fff;
  box-shadow: inset 0 2px 4px rgba(30, 58, 95, 0.08);
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.settings-check::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 10px;
  height: 16px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.settings-sound-input:checked + .settings-check {
  background: linear-gradient(180deg, #7ec8f5 0%, #4a9fd9 100%);
  border-color: #3a84bc;
}

.settings-sound-input:checked + .settings-check::after {
  transform: rotate(45deg) scale(1);
}

.settings-sound-label {
  font-size: clamp(18px, 4.2vw, 22px);
  font-weight: 800;
  color: #1a4a7a;
}

.settings-panel .modal-btn-primary {
  margin-top: 0;
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-in-game-only.hidden {
  display: none;
}

.screen-hidden {
  display: none !important;
}

/* ——— Стартовое меню ——— */
.start-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--accent);
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

.start-menu-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #f4f6fa 0%, #e8ecf2 45%, #d5dbe8 100%);
  z-index: 0;
}

.start-menu-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='78' viewBox='0 0 90 78'%3E%3Cg fill='none' stroke='%231e3a5f' stroke-width='1.4' stroke-opacity='0.14' stroke-linejoin='round'%3E%3Cpath d='M45 4 L69.9 18.3 L69.9 46.9 L45 61.2 L20.1 46.9 L20.1 18.3 Z'/%3E%3Cpath d='M90 43 L114.9 57.3 L114.9 85.9 L90 100.2 L65.1 85.9 L65.1 57.3 Z' transform='translate(-45 35)'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 90px 78px;
}

.start-menu-top,
.start-menu-hero,
.start-leaderboard,
.start-menu-footer {
  position: relative;
  z-index: 1;
}

.start-menu-top {
  flex-shrink: 0;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 16px 0;
}

.start-menu-top-left {
  display: flex;
  gap: 6px;
}

.start-icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--card);
  color: var(--accent);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--shadow);
}

.start-icon-btn:active {
  transform: scale(0.96);
}

.start-menu-hero {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 16px;
  line-height: 0;
}

.start-menu-art {
  width: min(100%, 340px);
  aspect-ratio: 5 / 3.1;
  margin-top: -20px;
  margin-bottom: -18px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.start-menu-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.start-leaderboard {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  margin-top: -6px;
  overflow: hidden;
}

.start-leaderboard-hint {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
}

.start-lb-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-bottom: 8px;
}

.start-lb-row {
  display: grid;
  grid-template-columns: 56px 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(30, 58, 95, 0.08);
  font-weight: 700;
  font-size: clamp(15px, 3.8vw, 18px);
  color: var(--accent);
}

.start-lb-row-you {
  background: linear-gradient(180deg, #2d5a8a 0%, #1e3a5f 100%);
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.28);
  color: #fff;
  border-color: transparent;
}

.start-lb-rank {
  font-variant-numeric: tabular-nums;
}

.start-lb-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(30, 58, 95, 0.08);
  font-size: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.start-lb-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.start-lb-score {
  font-size: clamp(13px, 3.2vw, 15px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
  white-space: nowrap;
}

.start-lb-row-you .start-lb-score {
  opacity: 0.95;
}

.start-lb-row-you .start-lb-avatar {
  background: rgba(255, 255, 255, 0.18);
}

.start-lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-menu-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
}

.start-play-btn {
  width: min(100%, 340px);
  border: none;
  border-radius: 999px;
  padding: 18px 24px;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #2d5a8a 0%, #1e3a5f 100%);
  box-shadow:
    0 5px 0 #152238,
    0 12px 28px rgba(30, 58, 95, 0.32);
}

.start-play-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #152238,
    0 6px 16px rgba(30, 58, 95, 0.25);
}

.start-level-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--card);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 10px var(--shadow);
}

body.dark .start-menu {
  color: var(--text);
}

body.dark .start-menu-bg {
  background: linear-gradient(180deg, #1e1e2a 0%, #16161f 45%, #12121a 100%);
}

body.dark .start-menu-bg::before {
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='78' viewBox='0 0 90 78'%3E%3Cg fill='none' stroke='%238bc4ff' stroke-width='1.4' stroke-opacity='0.12' stroke-linejoin='round'%3E%3Cpath d='M45 4 L69.9 18.3 L69.9 46.9 L45 61.2 L20.1 46.9 L20.1 18.3 Z'/%3E%3Cpath d='M90 43 L114.9 57.3 L114.9 85.9 L90 100.2 L65.1 85.9 L65.1 57.3 Z' transform='translate(-45 35)'/%3E%3C/g%3E%3C/svg%3E");
}

body.dark .start-lb-row {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

body.dark .start-lb-row-you {
  background: linear-gradient(180deg, #3a6a9a 0%, #1e3a5f 100%);
}
