/* Чапаев Онлайн — тёмная игровая тема. */

:root {
  --page: #0d1012;
  --surface: #171a1c;
  --surface-2: #202426;
  --surface-raised: #272b2d;
  --border: rgba(241, 232, 210, 0.13);
  --border-strong: rgba(241, 232, 210, 0.23);
  --text: #f1e8d2;
  --text-2: #c3bca9;
  --muted: #8e8b82;
  --accent: #e35238;
  --accent-hover: #f06449;
  --accent-dark: #b93625;
  --good: #50a77a;
  --bad: #e56a5a;
  --grid: #2d3030;
  --radius: 6px;
  --display: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 22%, rgba(227, 82, 56, 0.08), transparent 30rem),
    linear-gradient(rgba(255, 255, 255, 0.017) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.017) 1px, transparent 1px),
    var(--page);
  background-size: auto, 48px 48px, 48px 48px, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }

/* --- шапка --- */

#header {
  padding: 0 24px;
  background: rgba(13, 16, 18, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  width: min(1120px, 100%);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
}
.logo-mark { width: 34px; height: 28px; position: relative; display: inline-block; }
.logo-disc {
  position: absolute;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12), 0 3px 7px rgba(0, 0, 0, 0.35);
}
.logo-disc.light { left: 0; top: 1px; background: #e9dfc5; }
.logo-disc.red { right: 0; bottom: 0; background: var(--accent); }
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-spacer { flex: 1; }
.nav-link {
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 5px;
  font-size: 13px;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-symbol { width: 14px; height: 14px; display: inline-block; position: relative; opacity: 0.8; }
.nav-symbol.trophy::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 2px 2px 5px 5px;
}
.nav-symbol.trophy::after {
  content: '';
  position: absolute;
  left: 4px;
  bottom: 0;
  width: 6px;
  height: 5px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid transparent;
  border-right: 1.5px solid transparent;
}
.nav-symbol.settings {
  width: 17px;
  height: 17px;
  border: 0;
  box-shadow: none;
  display: grid;
  place-items: center;
}
.nav-symbol.settings::before { content: '⚙︎'; font-size: 18px; line-height: 1; }
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text) !important;
  padding: 5px 8px 5px 5px;
  border-radius: 5px;
  border: 1px solid transparent;
}
.header-user:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border); }
.header-user-copy { display: flex; flex-direction: column; min-width: 84px; }
.header-user-name { font-size: 13px; font-weight: 700; line-height: 1.25; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.header-rating { color: var(--muted); font-size: 10px; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.06em; }

#app { max-width: 980px; margin: 0 auto; padding: 42px 24px 72px; }

/* --- общие элементы --- */

.card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 50%), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.12);
}
h1 { font-family: var(--display); font-size: clamp(28px, 5vw, 42px); line-height: 1.06; margin: 0 0 20px; letter-spacing: -0.025em; }
h2 { font-family: var(--display); font-size: 19px; margin: 0 0 14px; color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 10px 18px;
  font-weight: 650;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: var(--surface-raised); border-color: rgba(241, 232, 210, 0.35); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff7eb; box-shadow: 0 10px 30px rgba(227, 82, 56, 0.18); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--bad); }
.btn.big { font-size: 17px; padding: 14px 28px; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }

.icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  line-height: 1;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.edit-name-btn { font-family: var(--display); font-size: 19px; font-weight: 400; }

.input {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 10px 12px;
  width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); }

.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }

/* аватарки */
.avatar {
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-link { color: var(--text); font-weight: 600; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; }

/* --- главная --- */

.home-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: 28px;
  position: relative;
  isolation: isolate;
}
.home-copy { padding: 34px 0 48px; position: relative; z-index: 2; }
.home-eyebrow, .page-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.home-title {
  max-width: 620px;
  margin: 0 0 20px;
  font-size: clamp(48px, 6.3vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.home-sub { color: var(--text-2); max-width: 510px; margin: 0 0 30px; font-size: 17px; line-height: 1.65; }
.home-actions { display: flex; align-items: stretch; gap: 10px; max-width: 610px; }
.hero-button { min-height: 54px; padding: 12px 22px; }
.hero-button.primary { min-width: 190px; justify-content: space-between; }
.hero-button.secondary { background: transparent; }
.button-arrow { font-size: 20px; font-weight: 400; transition: transform 0.18s ease; }
.hero-button:hover .button-arrow { transform: translateX(4px); }
.bot-link { width: max-content; display: flex; align-items: center; gap: 8px; color: var(--text-2); margin-top: 20px; font-size: 13px; }
.bot-link:hover { color: var(--text); }
.bot-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(80, 167, 122, 0.1); }
.board-scene {
  width: 100%;
  min-height: 430px;
  display: grid;
  place-items: center;
  position: relative;
  perspective: 900px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.board-scene:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: var(--radius); }
.board-scene:hover .board-preview { transform: rotateX(55deg) rotateZ(-9deg) translateY(-4%) scale(1.025); }
.board-scene:hover .board-glow { background: rgba(227, 82, 56, 0.18); }
.board-glow { position: absolute; width: 90%; aspect-ratio: 1; border-radius: 50%; background: rgba(227, 82, 56, 0.13); filter: blur(60px); }
.board-preview {
  width: min(390px, 90%);
  aspect-ratio: 1;
  position: relative;
  padding: 10px;
  background: #77533b;
  border: 2px solid #a57651;
  outline: 7px solid #3b2a20;
  box-shadow: 0 38px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  transform: rotateX(55deg) rotateZ(-9deg) translateY(-2%);
  transition: transform 0.25s ease;
  animation: board-enter 0.7s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}
.preview-grid, .pieces-layer { position: absolute; inset: 10px; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.pieces-layer { z-index: 2; pointer-events: none; }
.preview-cell { background: #c69a69; }
.preview-cell:nth-child(16n + 1), .preview-cell:nth-child(16n + 3), .preview-cell:nth-child(16n + 5), .preview-cell:nth-child(16n + 7),
.preview-cell:nth-child(16n + 10), .preview-cell:nth-child(16n + 12), .preview-cell:nth-child(16n + 14), .preview-cell:nth-child(16n + 16) { background: #76503a; }
.preview-piece {
  grid-column: var(--col);
  grid-row: var(--row);
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  align-self: center;
  justify-self: center;
  border: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, 0.12), 0 6px 4px rgba(0, 0, 0, 0.3);
}
.preview-piece.light { background: #eee2c5; }
.preview-piece.red { background: #c5412e; }
.scene-caption { position: absolute; right: 2%; bottom: 5%; font-family: var(--display); font-size: 17px; font-style: italic; color: var(--muted); }
@keyframes board-enter { from { opacity: 0; transform: rotateX(55deg) rotateZ(-5deg) translate(10%, 4%); } }
.home-shortcuts { border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(3, 1fr); }
.shortcut-card { color: var(--text); padding: 22px 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; border-right: 1px solid var(--border); transition: background 0.18s ease; }
.shortcut-card:first-child { padding-left: 0; }
.shortcut-card:last-child { border-right: 0; padding-right: 0; }
.shortcut-card:hover { background: rgba(255, 255, 255, 0.025); }
.shortcut-index { color: var(--accent); font-family: var(--display); font-size: 12px; font-style: italic; }
.shortcut-copy { display: flex; flex-direction: column; min-width: 0; }
.shortcut-copy strong { font-family: var(--display); font-size: 17px; }
.shortcut-copy small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shortcut-arrow { color: var(--muted); font-size: 18px; transition: transform 0.18s ease, color 0.18s ease; }
.shortcut-card:hover .shortcut-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* --- об игре --- */

.static-header .btn { padding: 7px 16px; }
.about-page { max-width: 720px !important; }
.about-intro { padding: 20px 0 28px; border-bottom: 1px solid var(--border); }
.about-intro h1 { margin-bottom: 10px; font-size: 32px; }
.about-intro p { margin: 0; color: var(--text-2); font-size: 17px; }
.about-section { padding: 26px 0; border-bottom: 1px solid var(--border); }
.about-section h2 { color: var(--text); font-size: 20px; }
.about-section p { margin: 10px 0 0; color: var(--text-2); }
.about-list { margin: 0; padding-left: 22px; color: var(--text-2); }
.about-list li { margin: 7px 0; }
.about-actions { max-width: 360px; margin: 28px auto 0; }

/* --- игра --- */

.game-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.game-player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(92vw, 540px);
  padding: 6px 4px;
}
.clock {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  background: var(--surface-2);
  border-radius: 4px;
  padding: 4px 12px;
  color: var(--muted);
}
.clock.active { color: var(--text); background: #2e3d55; box-shadow: inset 0 0 0 1px var(--accent); }
.clock.low { color: var(--bad); }

.board-shell {
  position: relative;
  width: min(92vw, 540px);
  aspect-ratio: 1;
}
#board { touch-action: none; border-radius: 4px; display: block; box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28); }
body.slingshot-active { touch-action: none; overscroll-behavior: none; user-select: none; }

.shot-tutorial {
  --tutorial-x: 43.75%;
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
  border-radius: 4px;
  background: rgba(13, 16, 18, 0.12);
  box-shadow: inset 0 0 70px rgba(13, 16, 18, 0.24);
  animation: tutorial-fade-in 0.25s ease-out both;
}
.shot-tutorial[hidden] { display: none; }
.shot-tutorial-label {
  position: absolute;
  top: 35%;
  left: 50%;
  width: max-content;
  max-width: 82%;
  transform: translate(-50%, -50%);
  padding: 8px 13px;
  border: 1px solid rgba(241, 232, 210, 0.24);
  border-radius: 999px;
  background: rgba(13, 16, 18, 0.68);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.24);
}
.shot-tutorial-arrow {
  position: absolute;
  left: var(--tutorial-x);
  top: 53%;
  bottom: 11%;
  width: 4px;
  margin-left: -2px;
  border-radius: 999px;
  background: rgba(57, 135, 229, 0.92);
  box-shadow: 0 0 14px rgba(57, 135, 229, 0.55);
  transform-origin: bottom;
  animation: tutorial-arrow 2.5s ease-in-out infinite;
}
.shot-tutorial-arrow::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -7px;
  border-right: 9px solid transparent;
  border-bottom: 14px solid rgba(57, 135, 229, 0.92);
  border-left: 9px solid transparent;
}
.shot-tutorial-pull {
  position: absolute;
  top: 93.75%;
  left: var(--tutorial-x);
  height: 58px;
  border-left: 3px dashed rgba(57, 135, 229, 0.9);
  transform: scaleY(0);
  transform-origin: top;
  animation: tutorial-pull-line 2.5s ease-in-out infinite;
}
.shot-tutorial-ghost {
  position: absolute;
  top: 93.75%;
  left: var(--tutorial-x);
  width: 9.5%;
  aspect-ratio: 1;
  border: 2px dashed rgba(57, 135, 229, 0.95);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: tutorial-drag 2.5s ease-in-out infinite;
}
.shot-tutorial-touch {
  position: absolute;
  top: 93.75%;
  left: var(--tutorial-x);
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.08), 0 5px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: tutorial-drag 2.5s ease-in-out infinite;
}
.shot-tutorial-touch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}
@keyframes tutorial-fade-in {
  from { opacity: 0; }
}
@keyframes tutorial-drag {
  0%, 12% { opacity: 0; transform: translate(-50%, -50%) translateY(0); }
  20%, 42% { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
  70%, 84% { opacity: 1; transform: translate(-50%, -50%) translateY(58px); }
  100% { opacity: 0; transform: translate(-50%, -50%) translateY(58px); }
}
@keyframes tutorial-pull-line {
  0%, 42% { opacity: 0; transform: scaleY(0); }
  48% { opacity: 1; }
  70%, 84% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}
@keyframes tutorial-arrow {
  0%, 42% { opacity: 0; transform: scaleY(0.15); }
  56%, 84% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}

.game-status { width: min(92vw, 540px); min-height: 24px; color: var(--text-2); text-align: center; }
.game-status .warn { color: #fab219; }

.game-over-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.game-over-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 40px;
  text-align: center;
  max-width: 360px;
}
.game-over-box .headline { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.delta-good { color: var(--good); font-weight: 700; }
.delta-bad { color: var(--bad); font-weight: 700; }

/* --- профиль --- */

.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-name { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 400;
}
.stat-tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.stat-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 9px 14px; min-width: 84px; }
.stat-tile .v { font-size: 20px; font-weight: 700; }
.stat-tile .l { font-size: 12px; color: var(--muted); }

.report-link {
  color: var(--muted);
  font-size: 12px;
  opacity: 0.6;
}
.report-link:hover { opacity: 1; }

.friend-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.friend-row:last-child { border-bottom: none; }

.games-table { width: 100%; border-collapse: collapse; }
.games-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
.games-table tr:last-child td { border-bottom: none; }
.games-table tr.replay-row { cursor: pointer; }
.games-table tr.replay-row:hover td { background: var(--surface-2); }

/* график рейтинга */
.chart-box { position: relative; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 12px;
  white-space: nowrap;
  transform: translate(-50%, -130%);
  display: none;
}

/* --- топ --- */

.page-heading { margin: 10px 0 30px; max-width: 640px; }
.page-heading h1 { margin-bottom: 10px; }
.page-heading p:last-child { margin: 0; color: var(--muted); font-size: 16px; }
.leaderboard-card { padding: 8px 22px 22px; overflow: hidden; }
.top-table { width: 100%; border-collapse: collapse; }
.top-table td, .top-table th { padding: 14px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.top-table th { color: var(--muted); font-weight: 700; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.top-table td.num { font-variant-numeric: tabular-nums; }
.top-rank { color: var(--muted); width: 46px; font-family: var(--display); font-style: italic; }
.top-table tr.podium td { background: rgba(255, 255, 255, 0.018); }
.top-table tr.podium .top-rank { color: var(--accent); font-size: 18px; font-weight: 700; }
.top-table tr.rank-1 td { background: rgba(227, 82, 56, 0.06); }
.top-table tr:last-child td { border-bottom: 0; }

/* --- модалки и тосты --- */

#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 18px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: min(92vw, 400px);
}

.challenge-pop {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 80;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  max-width: 320px;
}

/* --- админка --- */

.complaint-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.complaint-row:last-child { border-bottom: none; }

@media (max-width: 820px) {
  .header-inner { gap: 12px; }
  .nav-label { display: none; }
  .nav-link { padding: 9px; }
  .header-user-copy { min-width: 0; }
  .header-rating { display: none; }
  .home-hero { grid-template-columns: 1fr; min-height: auto; gap: 0; }
  .home-copy { padding-bottom: 0; }
  .home-title { max-width: 700px; }
  .board-scene { min-height: 370px; margin-top: -20px; }
  .board-preview { width: min(370px, 74vw); }
  .scene-caption { right: 12%; }
  .home-shortcuts { margin-top: 14px; }
  .shortcut-card { grid-template-columns: auto 1fr; }
  .shortcut-arrow { display: none; }
}

@media (max-width: 560px) {
  #header { padding: 0 12px; }
  .header-inner { min-height: 62px; }
  .logo-copy { display: none; }
  .logo-mark { width: 32px; }
  .header-nav { margin-left: auto; }
  .header-user { padding-right: 5px; }
  .header-user-copy { display: none; }
  #app { padding: 26px 14px 52px; }
  .card { padding: 15px; }
  .home-copy { padding-top: 24px; }
  .home-eyebrow { font-size: 10px; margin-bottom: 14px; }
  .home-title { font-size: clamp(43px, 14vw, 62px); }
  .home-sub { font-size: 15px; line-height: 1.55; }
  .home-actions { flex-direction: column; }
  .hero-button, .hero-button.primary { width: 100%; }
  .board-scene { min-height: 300px; margin-top: -5px; }
  .board-preview { width: min(310px, 76vw); }
  .scene-caption { display: none; }
  .home-shortcuts { grid-template-columns: 1fr; }
  .shortcut-card, .shortcut-card:first-child, .shortcut-card:last-child { padding: 15px 4px; border-right: 0; border-bottom: 1px solid var(--border); }
  .shortcut-card:last-child { border-bottom: 0; }
  .shortcut-copy small { white-space: normal; }
  .leaderboard-card { padding: 4px 8px 15px; }
  .top-table td, .top-table th { padding: 12px 7px; }
  .top-table td:nth-child(4), .top-table th:nth-child(4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .shot-tutorial-arrow { opacity: 1; transform: scaleY(1); animation: none !important; }
  .shot-tutorial-pull { opacity: 1; transform: scaleY(0.5); animation: none !important; }
  .shot-tutorial-ghost, .shot-tutorial-touch {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(29px);
    animation: none !important;
  }
}
