/* Стили сайта — S01-003. Поле как на нашем макете (docs/source/gungi-mat.pdf): чёрно-белая клетка,
   ходы — голубые клетки, ярусы — чёрные плашки. Фишки одного цвета (Р-07). Светлая и тёмная тема. */

:root {
  color-scheme: light dark;
  --bg: #f2efe8;
  --ink: #18171a;
  --muted: #6d6a64;
  --panel: #fffdf9;
  --line: #ddd7cb;
  --sq-dark: #121212;
  --sq-light: #fbfaf7;
  --frame: #121212;
  --chip: #f6efdf;
  --chip-edge: #b4a37f;
  --chip-shade: #d8c9a6;
  --cyan: #19a7da;        /* голубой ходов с нашего поля */
  --cyan-soft: #b5e4f6;
  --red: #d23b2a;         /* контроль, удар */
  --amber: #e29a12;       /* рокировка */
  --green: #2e9d62;       /* постановка, вброс */
  --shadow: 0 10px 30px rgba(20, 18, 14, .16);
  --radius: 14px;
  --chip-r: 18%;          /* квадратные фишки, как наши за столом; круглые — data-chip="round" */
}
:root[data-chip="round"] { --chip-r: 50%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113;
    --ink: #ebe7df;
    --muted: #9a968e;
    --panel: #1c1c20;
    --line: #2f2f35;
    --sq-dark: #050505;
    --sq-light: #d9d6cf;
    --frame: #000;
    --chip: #ece3cf;
    --chip-edge: #8f8063;
    --chip-shade: #b9aa88;
    --cyan-soft: #18495c;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
    --bg: #111113;
    --ink: #ebe7df;
    --muted: #9a968e;
    --panel: #1c1c20;
    --line: #2f2f35;
    --sq-dark: #050505;
    --sq-light: #d9d6cf;
    --frame: #000;
    --chip: #ece3cf;
    --chip-edge: #8f8063;
    --chip-shade: #b9aa88;
    --cyan-soft: #18495c;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
#app { min-height: 100%; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-danger { color: var(--red); }
.btn.btn-danger:not(.btn-ghost) { background: var(--red); color: #fff; }

/* ---------- главная (временная, до S01-004) ---------- */
.home { max-width: 420px; margin: 0 auto; padding: 48px 16px; text-align: center; }
.home-title { font-size: 44px; letter-spacing: .14em; margin: 0 0 24px; }

/* ---------- экран партии ---------- */
.game {
  --board: min(calc(100vw - 16px), 520px, max(300px, calc(100dvh - 300px)));
  max-width: 560px; margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top)) 8px max(12px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 100dvh;
}
.side { width: var(--board); }
.side-name {
  margin: 0 0 4px; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.arrow-up, .arrow-down { width: 0; height: 0; border: 5px solid transparent; }
.arrow-up { border-bottom: 7px solid var(--muted); border-top: 0; }
.arrow-down { border-top: 7px solid var(--muted); border-bottom: 0; }
.tray { display: flex; flex-wrap: wrap; gap: 3px; min-height: 36px; align-items: center; }
.tray-empty { margin: 0; font-size: 13px; color: var(--muted); }

.status { width: var(--board); min-height: 42px; }
.st-main { margin: 0; font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-main.is-over { font-size: 18px; }
.st-dim { color: var(--muted); font-weight: 400; }
.st-check {
  background: var(--red); color: #fff; font-size: 13px; padding: 2px 9px; border-radius: 999px;
  animation: pulse 1.2s ease-in-out infinite alternate;
}
@keyframes pulse { to { opacity: .7; } }
.st-last { margin: 0; font-size: 13px; color: var(--muted); }
.hint { width: var(--board); margin: 0; font-size: 13px; color: var(--ink); text-align: center; }

/* ---------- доска ---------- */
.board-frame { padding: 4px; background: var(--frame); border-radius: 4px; box-shadow: var(--shadow); }
.board {
  width: calc(var(--board) - 8px); aspect-ratio: 1;
  display: grid; grid-template: repeat(9, 1fr) / repeat(9, 1fr);
}
.board.is-busy { opacity: .85; pointer-events: none; }
.cell {
  position: relative; border: 0; padding: 0; margin: 0; cursor: pointer;
  display: grid; place-items: center; min-width: 0; min-height: 0;
}
.cell.is-dark { background: var(--sq-dark); }
.cell.is-light { background: var(--sq-light); }
.cell.is-last::before {
  content: ""; position: absolute; inset: 0;
  background: color-mix(in srgb, var(--amber) 38%, transparent);
}
.cell.is-sel::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--cyan) 55%, transparent); }
.cell.is-check .chip { box-shadow: 0 0 0 3px var(--red), 0 0 12px var(--red); }

/* метки разрешённых действий: ход — точка, удар — уголки, вброс — пунктир, рокировка — ⇄, постановка — зелёная клетка */
.cell.t-move::after, .cell.t-cap::after, .cell.t-drop::after, .cell.t-swap::after, .cell.t-setup::after, .cell.t-place::after {
  content: ""; position: absolute; pointer-events: none; z-index: 3;
}
.cell.t-move::after, .cell.t-setup::after {
  width: 30%; height: 30%; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 0 2px var(--sq-light);
}
.cell.t-move:has(.chip)::after { width: 26%; height: 26%; top: 3%; left: 3%; }
.cell.t-cap::after {
  inset: 3px; border-radius: 4px;
  background:
    linear-gradient(var(--red) 0 0) top left / 34% 3px no-repeat, linear-gradient(var(--red) 0 0) top left / 3px 34% no-repeat,
    linear-gradient(var(--red) 0 0) top right / 34% 3px no-repeat, linear-gradient(var(--red) 0 0) top right / 3px 34% no-repeat,
    linear-gradient(var(--red) 0 0) bottom left / 34% 3px no-repeat, linear-gradient(var(--red) 0 0) bottom left / 3px 34% no-repeat,
    linear-gradient(var(--red) 0 0) bottom right / 34% 3px no-repeat, linear-gradient(var(--red) 0 0) bottom right / 3px 34% no-repeat;
}
.cell.t-drop::after { inset: 4px; border: 2px dashed var(--green); border-radius: 6px; background: color-mix(in srgb, var(--green) 18%, transparent); }
.cell.t-swap::after {
  content: "⇄"; width: 52%; height: 52%; top: 2%; right: 2%; width: 44%; height: 44%;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--amber); color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.cell.t-place::after { inset: 0; background: color-mix(in srgb, var(--green) 55%, transparent); box-shadow: inset 0 0 0 2px var(--green); }
.cell.t-setup::after { background: var(--green); }

/* фишка: деревянный диск, иконка из макета. Чужая повернута на 180° и с тонким внутренним кольцом (не цвет). */
.chip {
  position: relative; z-index: 1;
  width: 84%; aspect-ratio: 1; border-radius: var(--chip-r);
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fffaf0, var(--chip) 55%, var(--chip-shade));
  border: 1px solid var(--chip-edge);
  box-shadow: 0 1px 0 var(--chip-edge), 0 2px 3px rgba(0, 0, 0, .35);
}
.chip img { width: 74%; height: 74%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.chip.is-opp { transform: rotate(180deg); }
.chip.is-opp::before { content: ""; position: absolute; inset: 3px; border-radius: var(--chip-r); border: 1px solid var(--chip-edge); }
/* башня: под фишкой видны края нижних */
.chip.h2 { box-shadow: 0 1px 0 var(--chip-edge), 0 3px 0 var(--chip-shade), 0 4px 0 var(--chip-edge), 0 5px 4px rgba(0, 0, 0, .35); }
.chip.h3 { box-shadow: 0 1px 0 var(--chip-edge), 0 3px 0 var(--chip-shade), 0 4px 0 var(--chip-edge), 0 6px 0 var(--chip-shade), 0 7px 0 var(--chip-edge), 0 8px 4px rgba(0, 0, 0, .35); }
.cell .chip.h2, .cell .chip.h3 { margin-top: -10%; }
.tier {
  position: absolute; z-index: 2; top: 1px; right: 1px;
  min-width: 14px; height: 14px; padding: 0 3px; border-radius: 4px;
  background: #000; color: var(--cyan); font-size: 10px; font-weight: 700; line-height: 14px; text-align: center;
  box-shadow: 0 0 0 1px #fff;
}
/* метки нижних фишек: ▲ своя, ▼ чужая (снизу вверх слева направо) */
.under { position: absolute; z-index: 2; left: 2px; bottom: 2px; display: flex; gap: 1px; }
.under b { width: 0; height: 0; border: 4px solid transparent; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
.under .u-me { border-bottom: 6px solid #000; border-top: 0; }
.under .u-opp { border-top: 6px solid #000; border-bottom: 0; }

/* рука и резерв */
.tchip {
  position: relative; width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 10px;
}
.tchip .chip { width: 32px; }
.tchip.is-sel { background: var(--cyan-soft); box-shadow: inset 0 0 0 2px var(--cyan); }
.tnum {
  position: absolute; right: -2px; bottom: -2px; z-index: 2;
  min-width: 15px; height: 15px; border-radius: 8px; padding: 0 3px;
  background: var(--ink); color: var(--bg); font-size: 10px; font-weight: 700; line-height: 15px; text-align: center;
}
.tback {
  position: absolute; left: -2px; bottom: -2px; z-index: 2; width: 15px; height: 15px; padding: 1px;
  border-radius: var(--chip-r); background: var(--chip-shade); border: 1px solid var(--chip-edge);
}

/* нижняя панель */
.bar { width: var(--board); display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 4px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--ink); }

/* ---------- лист снизу: карточка фигуры, выбор, подтверждение ---------- */
.sheet {
  position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100vw, 520px); max-height: 46dvh; overflow: auto;
  background: var(--panel); border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 16px max(16px, env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .22); border: 1px solid var(--line); border-bottom: 0;
  animation: up .16s ease-out;
}
@keyframes up { from { transform: translate(-50%, 24px); opacity: 0; } }
.sheet-close {
  position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer;
}
.sh-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-right: 32px; }
.sh-icon { width: 44px; height: 44px; border-radius: var(--chip-r); padding: 6px; background: var(--chip); border: 1px solid var(--chip-edge); }
.sh-icon.is-opp { transform: rotate(180deg); }
.sh-title { margin: 0; font-weight: 700; font-size: 17px; }
.sh-title small { font-weight: 400; color: var(--muted); font-size: 13px; text-transform: capitalize; }
.sh-sub, .sh-text { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sh-text { margin: 8px 0; color: var(--ink); }
.sh-label { margin: 12px 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sh-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.sh-actions .btn { width: 100%; }

/* карточка ходов по ярусам — как на макете: чёрная плашка «Ярус», голубые клетки */
.mc { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-tier { margin: 0; flex: 1 1 0; min-width: 84px; max-width: 120px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.mc-tier figcaption {
  background: #000; color: var(--cyan); font-size: 11px; font-weight: 700; text-align: center;
  letter-spacing: .08em; text-transform: uppercase; padding: 2px 0;
}
.mc-tier.is-cur { box-shadow: 0 0 0 2px var(--red); }
.mc-tier.is-cur figcaption { background: var(--red); color: #fff; }
.mc-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); padding: 1px; }
.mc-grid i { aspect-ratio: 1; background: var(--panel); position: relative; display: grid; place-items: center; }
.mc-grid .mc-step { background: var(--cyan-soft); }
.mc-grid .mc-ray { background: var(--cyan-soft); }
.mc-grid .mc-ray::after {
  content: ""; width: 0; height: 0; border: 4px solid transparent; border-bottom: 6px solid var(--cyan); border-top: 0;
  transform: rotate(var(--a));
}
.mc-grid .mc-me { background: #000; }
.mc-grid .mc-me img { width: 80%; filter: invert(1); }
.mc-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.stack-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stack-list li { display: flex; align-items: center; gap: 8px; }
.stack-list img { width: 28px; height: 28px; border-radius: var(--chip-r); padding: 3px; background: var(--chip); border: 1px solid var(--chip-edge); }
.stack-list img.is-opp { transform: rotate(180deg); }
.stack-list em { color: var(--muted); font-style: normal; font-size: 13px; margin-left: auto; }

.toast {
  position: fixed; z-index: 30; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: 14px;
}

@media (min-width: 900px) {
  .game { padding-top: 24px; }
}

/* ---------- S01-004: главная, вход по ссылке, ожидание соперника ---------- */
.field { display: grid; gap: 4px; text-align: left; }
.field span { font-size: 13px; color: var(--muted); }
.field input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 16px;
}
.field input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.home { max-width: 440px; padding: 40px 16px 32px; }
.home-title { margin-bottom: 4px; }
.home-sub { margin: 0 0 24px; color: var(--muted); }
.home-form { display: grid; gap: 12px; }
.home-actions { display: grid; gap: 10px; margin-top: 4px; }
.home-actions .btn { width: 100%; min-height: 48px; }
.home-err { margin: 0; color: var(--red); font-size: 14px; text-align: left; }
.btn:disabled { opacity: .6; cursor: default; }
.mine { margin-top: 32px; text-align: left; }
.mine-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; font-weight: 600; }
.mine-empty { margin: 0; color: var(--muted); font-size: 14px; }
.mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mine-row { display: flex; align-items: stretch; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mine-link { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; color: inherit; text-decoration: none; }
.mine-link b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-st { font-size: 13px; color: var(--cyan); text-align: right; }
.mine-link small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.mine-x { width: 40px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }

.ol-top {
  max-width: 560px; margin: 0 auto; padding: max(6px, env(safe-area-inset-top)) 12px 0;
  display: flex; align-items: center; gap: 8px; min-height: 36px;
}
.ol-home { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.ol-net { background: var(--red); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.ol-role { font-size: 12px; color: var(--muted); }
.ol-links { margin-left: auto; min-height: 32px; padding: 4px 12px; font-size: 13px; }
.ol-panel { max-width: 520px; margin: 6px auto 0; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 8px; }
.ol-panel[hidden], .ol-net[hidden], .ol-role[hidden], .ol-links[hidden], .home-err[hidden] { display: none; }
.ol-panel .sh-label { margin: 0; }
.ol .game { min-height: calc(100dvh - 40px); padding-top: 4px; }
.ol-card { max-width: 440px; margin: 0 auto; padding: 32px 16px; display: grid; gap: 14px; text-align: center; }
.ol-title { margin: 0; font-size: 24px; }
.ol-text { margin: 0; color: var(--muted); }
.ol-dim { margin: 0; color: var(--muted); font-size: 13px; }
.ol-form { display: grid; gap: 10px; }
.ol-form .btn { min-height: 48px; }
.link-box { display: flex; gap: 6px; }
.link-box input {
  flex: 1; min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 14px;
}
.personal { text-align: left; border-top: 1px solid var(--line); padding-top: 10px; }
.personal summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.personal > * + * { margin-top: 8px; }
.wait-dots { display: flex; justify-content: center; gap: 8px; }
.wait-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); animation: pulse .8s ease-in-out infinite alternate; }
.wait-dots i:nth-child(2) { animation-delay: .25s; }
.wait-dots i:nth-child(3) { animation-delay: .5s; }

/* ---------- S01-006: избранные расстановки ---------- */
.fav-on { background: var(--green); color: #fff; }
.fav-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.fav-list li { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.fav-info { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fav-info small { color: var(--muted); font-size: 12px; }
.fav-btns { display: flex; gap: 8px; }
.fav-btns .btn { flex: 1; min-height: 36px; }
.fav-mini {
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 1px; padding: 2px; border-radius: 4px;
  background: var(--frame); max-width: 260px;
}
.fav-sheet .fav-mini { margin: 4px 0 10px; }
.fav-mini i { aspect-ratio: 1; background: var(--sq-light); display: grid; place-items: center; }
.fav-mini img { width: 78%; height: 78%; object-fit: contain; }
.fav-form { display: grid; gap: 10px; }

/* ---------- отзыв на приёмке Sprint 01: настройки, правила у доски, координаты ---------- */
/* фишки соперника темнее (настройка «Поворот и темнее») */
:root[data-opp="shade"] .chip.is-opp {
  background: radial-gradient(circle at 35% 30%, #e9dcc0, #bfa97c 55%, #9c875c);
  border-color: #6f5e3e;
}
/* координаты: буква колонки в нижнем ряду, номер ряда в левой колонке */
.co { display: none; position: absolute; z-index: 2; font-size: 9px; font-weight: 700; line-height: 1; pointer-events: none; }
:root[data-coords="on"] .co { display: block; }
.co-x { right: 2px; bottom: 1px; }
.co-y { left: 2px; top: 1px; }
.cell.is-dark .co { color: var(--sq-light); }
.cell.is-light .co { color: var(--sq-dark); }

/* лист настроек: подпись и ряд кнопок-вариантов */
.set-row .sh-label { margin-top: 14px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn {
  flex: 1 1 auto; min-height: 38px; padding: 6px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; font-size: 14px;
}
.seg-btn.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.sh-live { margin: 2px 0 0; font-size: 13px; color: var(--cyan); font-weight: 600; }

/* панели правил: над доской — эффекты, под доской — ходы фигур; сворачиваются */
.play-col { display: contents; }
.bar { order: 2; }
.rules-mv { order: 1; }
.rules {
  width: var(--board); background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.rules > summary {
  cursor: pointer; list-style: none; padding: 8px 12px; font-size: 13px; font-weight: 650;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; user-select: none;
}
.rules > summary::-webkit-details-marker { display: none; }
.rules > summary::after { content: "▾"; color: var(--muted); transition: transform .15s; }
.rules[open] > summary::after { transform: rotate(180deg); }
.rules[open] > summary { border-bottom: 1px solid var(--line); }
.fx { margin: 0; padding: 8px 12px 10px; display: grid; gap: 8px; max-height: 42dvh; overflow: auto; }
.fx dt { font-weight: 650; font-size: 13px; }
.fx dd { margin: 1px 0 0; font-size: 13px; color: var(--muted); }
.mv-body { padding: 10px 12px 12px; }
.mv-hint { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 2px; }
.mv-type {
  display: grid; justify-items: center; gap: 2px; padding: 4px 2px; border: 0; border-radius: 8px;
  background: transparent; cursor: pointer; font-size: 11px; line-height: 1.15; text-align: center;
}
.mv-type:active, .mv-type:hover { background: var(--cyan-soft); }
.mv-type .chip { width: 34px; }
.mv-back {
  border: 0; background: transparent; padding: 0 0 8px; color: var(--cyan); font-weight: 600; font-size: 13px; cursor: pointer;
}

/* компьютер: правила по бокам доски, а не над и под ней */
@media (min-width: 1100px) {
  .game {
    max-width: 1320px; display: grid; align-items: start; justify-content: center; gap: 24px;
    grid-template-columns: minmax(260px, 340px) auto minmax(280px, 380px);
  }
  .game { --board: min(560px, max(320px, calc(100dvh - 260px))); }
  .play-col { display: flex; flex-direction: column; align-items: center; gap: 6px; grid-column: 2; grid-row: 1; }
  .rules { width: auto; position: sticky; top: 16px; }
  .rules-fx { grid-column: 1; grid-row: 1; }
  .rules-mv { grid-column: 3; grid-row: 1; }
  .fx { max-height: calc(100dvh - 90px); }
}
.home-foot { margin: 24px 0 0; text-align: center; }
/* карточка в панели — компактнее листа, чтобы на телефоне помещалась под доской */
.mv-body { position: relative; padding: 8px 12px 10px; }
.mv-back { position: absolute; top: 8px; right: 10px; padding: 0; z-index: 1; }
.rules-mv .sh-head { gap: 8px; margin-bottom: 6px; padding-right: 96px; }
.rules-mv .sh-icon { width: 34px; height: 34px; padding: 4px; }
.rules-mv .sh-title { font-size: 15px; }
.rules-mv .mc-tier { max-width: 100px; }
.rules-mv .sh-label { margin-top: 8px; }
