/*
  14 дүгээр сургуулийн шатрын клуб — нийтийн хуудсуудын загвар
  (admin.html нь энэ файлыг суурь болгож, нэмээд css/admin.css-ийг ачаална)

  Агуулга:
    1.  Өнгө, хэмжээний хувьсагч
    2.  Суурь
    3.  Толгой хэсэг, цэс
    4.  Товч, холбоос
    5.  Хуудасны гарчиг, хэсэг
    6.  Нүүр хуудас
    7.  Сургалт: түвшин, хуваарь, төлбөр
    8.  Шатрын бодлого
    9.  Багш нар
    10. Тамирчид, амжилт
    11. Холбоо барих, түгээмэл асуулт
    12. Бүртгэлийн уриалга
    13. Хөл хэсэг
    14. Админ горим (нэвтэрсэн үед)
    15. Дэлгэцийн хэмжээ
*/

/* ==========================================================================
   1. Өнгө, хэмжээний хувьсагч
   ========================================================================== */

/*
  Өнгө цөөн: цагаан, зөөлөн саарал дэвсгэр, бараан хөх бичвэр, нэг хөх (товч, холбоос).
  Бараан хөх дэвсгэр зөвхөн бүртгэлийн уриалгад. Шар өнгө зөвхөн бараан дэвсгэр дээр.
*/
:root {
  --body: #fff8ef; /* дулаан цагаан */
  --paper: #f5e9d6; /* ээлжлэх хэсгийн дэвсгэр: элсэн шар */
  --surface: #ffffff; /* карт */
  --soft: #f1e4c8; /* дүрс, зургийн дэвсгэр */
  --ink: #2a2118; /* хүрэн хар бичвэр */
  --muted: #65584a;
  --line: #e8dac4;
  --blue: #2f5a2c; /* холбоос, идэвхтэй элемент: шатрын хөлгийн ногоон */
  --blue-hover: #234520;
  --on-blue: #ffffff;
  --accent: #e39b2d; /* үндсэн товч: зөгийн балны шар */
  --accent-hover: #d08a1f;
  --on-accent: #2a2118;
  --navy: #2f4a2c; /* бараан ногоон хэсэг */
  --gold: #f3c873;
  --success: #17663f;
  --danger: #b3261e;

  --board-light: #f1e4c8;
  --board-dark: #8fa672;

  --font: 'Golos Text', Arial, Helvetica, sans-serif;
  --font-display: Literata, Georgia, 'Times New Roman', serif;

  --radius: 12px;
  --section-space: 88px;
  --gutter: 32px;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --body: #17120d;
  --paper: #1f1812;
  --surface: #261e17;
  --soft: #2f251c;
  --ink: #f5ece0;
  --muted: #c4b5a2;
  --line: #3a2e23;
  --blue: #a9c98f;
  --blue-hover: #c2dcae;
  --on-blue: #17120d;
  --accent: #e9a940;
  --accent-hover: #f3bd5e;
  --on-accent: #1b140e;
  --navy: #1f2f1d;
  --success: #7fd6a6;
  --danger: #ffb4ad;

  --board-light: #e8dcc2;
  --board-dark: #7f9663;
  color-scheme: dark;
}

/* ==========================================================================
   2. Суурь
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* наалттай толгой хэсгийн доор гарчиг нуугдахгүй */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--body);
  color: var(--ink);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 4.2vw, 52px);
}

h2 {
  font-size: clamp(27px, 2.8vw, 36px);
}

h3,
.as-h3 {
  font-family: var(--font);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus {
  outline: none;
}

.container {
  width: min(1160px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 600;
}

.skip:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Сайтын цорын ганц чимэглэл: шатрын хөлгийн ирмэг шиг нүдэн зурвас */
.checker {
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--navy) 0 8px, transparent 8px 16px);
}

/* ==========================================================================
   3. Толгой хэсэг, цэс
   ========================================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--body) 92%, transparent);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-right: auto;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand > span {
  display: grid;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.brand small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.header nav {
  display: flex;
  order: 2;
  gap: 4px;
}

.header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.header nav a:hover {
  color: var(--ink);
  background: var(--paper);
}

.header nav a[aria-current='page'] {
  color: var(--ink);
  background: var(--soft);
}

.header-tools {
  display: flex;
  order: 3;
  align-items: center;
  gap: 16px;
}

.menu,
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
}

.menu {
  display: none;
}

.menu:hover,
.theme-toggle:hover {
  border-color: var(--muted);
}

/* ==========================================================================
   4. Товч, холбоос
   ========================================================================== */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s;
}

/* Үндсэн үйлдэл (admin.html-д «gold» нэрээр ч ашиглагдана) */
.button.primary,
.button.gold {
  background: var(--accent);
  color: var(--on-accent);
}

.button.primary:hover,
.button.gold:hover {
  background: var(--accent-hover);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--muted);
}

/* Бараан дэвсгэр дээрх товчнууд */
.button.light {
  background: var(--accent);
  color: var(--on-accent);
}

.button.light:hover {
  background: var(--accent-hover);
}

.button.outline-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.button.outline-light:hover {
  border-color: #fff;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.text-link:hover {
  color: var(--blue-hover);
}

/* ==========================================================================
   5. Хуудасны гарчиг, хэсэг
   ========================================================================== */

.section {
  padding-block: var(--section-space);
}

.section.alt {
  background: var(--paper);
}

/* Дэд хуудасны эхлэл: гарчиг, нэг өгүүлбэр тайлбар */
.page-head {
  padding-block: 64px 40px;
}

.page-head .lede {
  max-width: 62ch;
  margin-top: 16px;
  color: var(--muted);
  font-size: 18px;
}

/* Хуудасны үндсэн хэсэг, доор нь уриалга ирэх үед */
.page-body {
  padding-bottom: var(--section-space);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 36px;
}

.section-head p {
  margin-top: 12px;
  color: var(--muted);
}

.note {
  color: var(--muted);
  font-size: 15px;
}

.note a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   6. Нүүр хуудас
   ========================================================================== */

.hero {
  padding-block: 72px var(--section-space);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.08;
}

.hero .lede {
  max-width: 52ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: 18px;
}

.hero .actions {
  margin-top: 32px;
}

/* Хуваарь, төлбөрийн карт: эцэг эхийн хамгийн их асуудаг мэдээлэл нэг дор */
.hero-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 40px -28px rgba(92, 64, 30, 0.35);
}

.hero-card-body {
  padding: 26px 28px 28px;
}

.hero-card h2 {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.hero-card-days {
  margin-top: 2px;
  color: var(--muted);
  font-size: 15px;
}

.slot-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.slot-list > div {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 12px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.slot-list dt {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.slot-list dd {
  color: var(--muted);
  font-size: 15px;
}

.fact-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.fact-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
}

.fact-list dt {
  color: var(--muted);
}

.fact-list dd {
  font-weight: 600;
  text-align: right;
}

.fact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--blue);
}

/* Шатрын ач тус */
.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
  padding: 0;
  list-style: none;
}

.benefits li {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.benefits p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

/* Сургалтын түвшин (нүүр хуудас): ижил бүтэцтэй карт, хооронд нь харьцуулахад амар */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0;
  list-style: none;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.plan img {
  width: 44px;
  height: 44px;
}

.plan h3 {
  margin-top: 16px;
  font-size: 21px;
}

.plan-for {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.plan-facts {
  display: grid;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.plan-facts > div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}

.plan-facts dt {
  color: var(--muted);
}

.plan-facts dd {
  font-variant-numeric: tabular-nums;
}

.plan-price {
  margin: auto 0 16px;
  padding-top: 20px;
  color: var(--muted);
}

.plan-price strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
}

.plan .text-link {
  align-self: center;
  margin-top: 6px;
}

/* «Хүүхдийн тоо хязгаартай» мэдэгдэл */
.limit-note {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-top: 14px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.limit-note::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2a72e;
  transform: translateY(-1px);
}

/* Багш нарын товч танилцуулга (нүүр хуудас) */
.coach-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0;
  list-style: none;
}

.coach-strip a {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 16px;
}

.coach-strip img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}

.coach-strip strong {
  display: block;
  font-weight: 600;
}

.coach-strip span {
  color: var(--muted);
  font-size: 15px;
}

.coach-strip a:hover strong {
  color: var(--blue);
}

.section-foot {
  margin-top: 28px;
}

/* ==========================================================================
   7. Сургалт: түвшин, хуваарь, төлбөр
   ========================================================================== */

.program-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: start;
}

/* JavaScript-гүй үед: нээгдэж хаагддаг жагсаалт */
.program-level {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.program-level + .program-level {
  margin-top: 12px;
}

.program-level > summary {
  min-height: 56px;
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
}

.program-level > summary span,
.program-tabs button span {
  margin-right: 10px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.program-level > .program-panel {
  padding: 0 20px 22px;
}

/* JavaScript ажилласны дараа: таб */
.program-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 12px;
  background: var(--soft);
}

.program-tabs button {
  min-height: 48px;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.program-tabs button:hover {
  color: var(--ink);
}

.program-tabs button[aria-selected='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(92, 64, 30, 0.12);
}

.program-panel[role='tabpanel'] {
  padding: 4px 2px;
}

.program-panel[role='tabpanel']:focus-visible {
  outline-offset: 6px;
}

.program-for {
  font-size: 18px;
}

.program-panel h3 {
  margin-top: 24px;
  font-size: 16px;
}

/* Хөтөлбөрийн сэдвүүд: дарааллаар үзэх тул дугаартай */
.modules {
  display: grid;
  gap: 2px;
  margin: 14px 0 0;
  padding: 0;
  counter-reset: module;
  list-style: none;
}

.modules li {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  counter-increment: module;
}

.modules li:first-child {
  border-top: 0;
}

.modules li::before {
  content: counter(module);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.modules strong {
  color: var(--ink);
  font-weight: 600;
}

.modules span {
  color: var(--muted);
}

.check-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: '';
  position: absolute;
  top: 0.55em;
  left: 4px;
  width: 10px;
  height: 6px;
  border-bottom: 2px solid var(--blue);
  border-left: 2px solid var(--blue);
  transform: rotate(-45deg);
}

.program-goal {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 10px;
  background: var(--paper);
}

.program-goal strong {
  display: block;
  font-size: 14px;
}

.program-goal p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
}

.program-note {
  margin-top: 24px;
}

/* Тохирох түвшин баримжаалах */
.level-check {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.level-check fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.level-check legend {
  padding: 0;
  font-weight: 600;
}

.level-check .hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.level-check label {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
}

.level-check label:has(input:checked) {
  border-color: var(--blue);
}

.level-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.level-result {
  margin-top: 14px;
  font-size: 15px;
}

.level-result p {
  color: var(--muted);
}

.level-result strong {
  display: block;
}

.level-result a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Хуваарь */
.schedule {
  border-top: 1px solid var(--line);
}

.schedule-row {
  display: grid;
  grid-template-columns: 170px 240px 1fr;
  gap: 16px;
  align-items: baseline;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}

.schedule-row .time {
  font-family: var(--font-display);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.schedule-row .length {
  color: var(--muted);
  font-size: 15px;
}

.fee {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fee p {
  color: var(--muted);
}

.fee strong {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
}

.fee strong small {
  margin-left: 6px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 15px;
}

.fee + .note {
  margin-top: 16px;
}

/* ==========================================================================
   8. Шатрын бодлого
   ========================================================================== */

.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
}

.practice-copy p {
  margin-top: 14px;
  color: var(--muted);
}

.practice-how {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.keyboard-help {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.keyboard-help summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.puzzle-shell {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

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

.board-heading strong {
  font-size: 17px;
}

.puzzle-count {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.puzzle-turn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.puzzle-turn strong {
  color: var(--ink);
  font-weight: 600;
}

.puzzle-turn > span {
  width: 12px;
  height: 12px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: #fff;
}

.is-solved .puzzle-turn strong {
  color: var(--success);
}

.board-frame {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 6px;
}

.ranks {
  display: grid;
  grid-template-rows: repeat(8, 1fr);
}

.files {
  display: grid;
  grid-column: 2;
  grid-template-columns: repeat(8, 1fr);
}

.ranks span,
.files span {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--line);
}

.square {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  aspect-ratio: 1;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.board {
  user-select: none;
  -webkit-user-select: none;
}

.square.moving {
  z-index: 3;
}

.square.light {
  background: var(--board-light);
}

.square.dark {
  background: var(--board-dark);
}

.square img {
  width: 90%;
  height: 90%;
  pointer-events: none;
  transition: transform 0.15s ease;
  will-change: transform;
}

.square.selected img {
  transform: translateY(-3px) scale(1.07);
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.25));
}

@media (hover: hover) {
  .square.own:hover img {
    transform: scale(1.06);
  }
}

.square.selected,
.square.answer {
  box-shadow: inset 0 0 0 3px #e2a72e;
}

.square.available::after {
  content: '';
  position: absolute;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: rgba(42, 33, 24, 0.32);
  animation: dot-in 0.16s ease-out;
}

@keyframes dot-in {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

.square.available:has(img)::after {
  width: 86%;
  height: 86%;
  border: 4px solid rgba(42, 33, 24, 0.32);
  background: none;
}

.square.last {
  background-image: linear-gradient(rgba(242, 207, 99, 0.55), rgba(242, 207, 99, 0.55));
}

.square.check {
  box-shadow: inset 0 0 0 3px var(--danger);
}

.square:focus-visible {
  z-index: 1;
  outline: 3px solid var(--ink);
  outline-offset: -3px;
}

.board-fallback {
  grid-column: 2;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.puzzle-message {
  min-height: 5.6em;
  transition: background-color 0.2s ease, color 0.2s ease;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
}

.puzzle-message.success {
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  color: var(--success);
}

.puzzle-message.error {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  color: var(--danger);
}

.puzzle-message.notice {
  background: color-mix(in srgb, var(--blue) 10%, var(--surface));
}

.puzzle-moves {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.puzzle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.puzzle-controls .button {
  min-height: 44px;
  padding: 0 16px;
}

#next-puzzle {
  margin-left: auto;
}

.puzzle-progress {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

/* Бодлого сонгох дугаарууд: өнгөт зураас нь түвшнийг заана */
.puzzle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.puzzle-chip {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.puzzle-chip::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: 6px;
  left: 10px;
  height: 3px;
  border-radius: 2px;
  background: var(--level-color, var(--line));
}

.puzzle-chip[aria-current='true'] {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.puzzle-chip.done {
  background: color-mix(in srgb, var(--success) 12%, var(--surface));
  color: var(--success);
}

.puzzle-chip.done::before {
  content: '✓';
  margin-right: 3px;
  font-size: 13px;
}

[data-level='Амархан'] {
  --level-color: #3f9a6b;
}

[data-level='Дунд'] {
  --level-color: #d99a1e;
}

[data-level='Хэцүү'] {
  --level-color: #c8463b;
}

[data-level='Маш хэцүү'] {
  --level-color: #6b2fa0;
}

.puzzle-level {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.puzzle-level::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--level-color);
}

.board-heading strong {
  flex: 1;
  min-width: 0;
}

.square.own {
  cursor: grab;
  touch-action: none;
}

.square.dragging img {
  opacity: 0.35;
}

.drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  pointer-events: none;
  cursor: grabbing;
  will-change: transform;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3));
}

@media (prefers-reduced-motion: reduce) {
  .square,
  .square img {
    transition: none;
  }

  .square.available::after {
    animation: none;
  }
}

.is-busy .board {
  cursor: progress;
}

/* ==========================================================================
   9. Багш нар
   ========================================================================== */

.coach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.coach-photo {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--soft);
}

.coach-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

/* Зураг бүрийн нүүр ойролцоогоор нэг өндөрт байрлана */
[data-teacher='oyunchimeg'] .coach-photo img {
  object-position: center 20%;
}

[data-teacher='ganerdene'] .coach-photo img {
  object-position: 55% 35%;
}

[data-teacher='chinguun'] .coach-photo img {
  object-position: 45% 30%;
}

.coach-role {
  margin-top: 20px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}

.coach h2 {
  margin-top: 4px;
  font-family: var(--font);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.coach ul {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
}

.coach-duty {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

/* ==========================================================================
   10. Тамирчид, амжилт
   ========================================================================== */

.data-status {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 15px;
}

.data-status:empty {
  display: none;
}

.data-status:focus {
  outline: none;
}

.data-status.is-error {
  color: var(--danger);
  font-weight: 600;
}

.athlete-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.athlete-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 18px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.athlete-photo {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--soft);
}

.athlete-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.athlete-photo .athlete-photo-placeholder {
  width: 52%;
  height: 52%;
  object-fit: contain;
  opacity: 0.8;
}

.athlete-card h3 {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.athlete-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.athlete-ranks {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.athlete-ranks dt {
  color: var(--muted);
}

.athlete-ranks dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.athlete-highlights {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.athlete-highlights-title {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.athlete-results {
  display: grid;
  gap: 4px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
}

.athlete-results strong {
  color: var(--ink);
}

.achievement-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.achievement-card {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.achievement-result {
  justify-self: start;
  margin-bottom: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 14px;
  font-weight: 600;
}

.achievement-card h3 {
  font-size: 17px;
  overflow-wrap: anywhere;
}

.achievement-event,
.achievement-card time,
.achievement-card p {
  color: var(--muted);
  font-size: 15px;
}

/* Бүртгэлгүй үед */
.achievements-empty {
  display: flex;
  grid-column: 1 / -1;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.achievements-empty img {
  width: 40px;
  height: 40px;
  opacity: 0.7;
}

.achievements-empty h3 {
  font-size: 17px;
}

.achievements-empty p {
  color: var(--muted);
  font-size: 15px;
}

/* Тамирчны замнал: дараалсан алхам тул дугаартай */
/* Хүүхдийн хөгжлийн зам: шат шатаар өгсөх тул баганууд өндөрсөнө */
.growth {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.growth li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.growth li:nth-child(1) { min-height: 170px; }
.growth li:nth-child(2) { min-height: 200px; }
.growth li:nth-child(3) { min-height: 230px; }
.growth li:nth-child(4) { min-height: 260px; }
.growth li:nth-child(5) {
  min-height: 290px;
  border-color: var(--navy);
  background: var(--navy);
}

.growth-stage {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.growth h3 {
  margin-top: auto;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.2;
}

.growth p {
  color: var(--muted);
  font-size: 15px;
}

.growth li:nth-child(5) .growth-stage,
.growth li:nth-child(5) p {
  color: #dfe8d5;
}

.growth li:nth-child(5) h3 {
  color: #ffffff;
}

.growth-note {
  margin-top: 20px;
  max-width: 70ch;
}

@media (max-width: 900px) {
  .growth {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 18px;
    border-left: 2px solid var(--line);
  }

  .growth li,
  .growth li:nth-child(n) {
    min-height: 0;
    margin-bottom: 10px;
  }

  .growth h3 {
    margin-top: 0;
  }
}

.path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.path li {
  counter-increment: step;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}

.path li::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: 26px;
}

.path p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

/* ==========================================================================
   11. Холбоо барих, түгээмэл асуулт
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.contact-phone {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 44px);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.contact-phone:hover {
  color: var(--blue);
}

.contact-actions {
  margin-top: 16px;
}

.contact-list {
  display: grid;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.contact-list > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 12px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}

.contact-list dt {
  color: var(--muted);
  font-size: 15px;
}

.contact-list dd {
  overflow-wrap: anywhere;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copy-contact {
  min-height: 44px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#copy-status {
  min-height: 1.5em;
  color: var(--success);
  font-size: 14px;
}

.steps {
  padding: 28px;
  border-radius: 16px;
  background: var(--paper);
}

.steps ol {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-weight: 600;
}

.steps li p {
  color: var(--muted);
  font-size: 15px;
}

.steps > .button {
  margin-top: 24px;
}

/* Онлайн бүртгэл ----------------------------------------------------------- */

.register-section {
  background: var(--paper);
}

.register-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.register-card {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.register-lede {
  margin-top: 8px;
  color: var(--muted);
}

.register-form {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.register-form fieldset {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.register-form legend {
  margin-bottom: 4px;
  padding: 0;
  font-family: var(--font-display);
  font-size: 20px;
}

.register-form label,
.register-label {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
}

.register-form .optional {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.register-form input[type='text'],
.register-form input[type='tel'],
.register-form input[type='number'],
.register-form select,
.register-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #b7a68c;
  border-radius: 10px;
  background: var(--body);
  font-size: 16px;
}

.register-form textarea {
  resize: vertical;
}

.register-form :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.register-form [aria-invalid='true'] {
  border-color: var(--danger);
}

.register-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0 14px;
}

.register-row > div {
  display: grid;
  gap: 6px;
  align-content: start;
}

.choice-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.choice-options label {
  position: relative;
  margin: 0;
}

.choice-options input {
  position: absolute;
  opacity: 0;
}

.choice-options span {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 10px 8px;
  border: 1px solid #b7a68c;
  border-radius: 10px;
  background: var(--body);
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
}

.choice-options small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.choice-options input:checked + span {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--on-blue);
}

.choice-options input:checked + span small {
  color: inherit;
}

.choice-options input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.register-consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 400 !important;
}

.register-consent input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--blue);
}

.register-form .button {
  justify-content: center;
  min-height: 52px;
  margin-top: 18px;
  border: 0;
}

.register-error {
  color: var(--danger);
  font-weight: 600;
}

.register-error:empty {
  display: none;
}

.register-form[hidden],
.register-done[hidden] {
  display: none;
}

.register-done {
  margin-top: 16px;
}

.register-done .copy-contact {
  display: block;
}

.register-done:focus {
  outline: none;
}

.register-done h3 {
  font-size: 24px;
}

.ref-code {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  background: repeating-conic-gradient(var(--board-light) 0 25%, var(--board-dark) 0 50%) 0 0 / 24px 24px;
}

.ref-code span {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 48px);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.choice-options.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.done-summary {
  display: grid;
  margin: 8px 0 20px;
  border-top: 1px solid var(--line);
}

.done-summary > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}

.done-summary dt {
  color: var(--muted);
}

.done-summary dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.done-summary .is-amount dd {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
}

.fee-other {
  font-weight: 600;
  color: var(--ink);
}

.pay-title {
  margin-top: 8px;
  font-size: 20px;
}

.pay-details {
  display: grid;
  margin: 10px 0 0;
  border-radius: 12px;
  background: var(--paper);
  padding: 6px 18px;
}

.pay-details > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}

.pay-details > div:last-child {
  border-bottom: 0;
}

.pay-details dt {
  color: var(--muted);
}

.pay-details dd,
.done-summary dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.pay-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.pay-details .is-ref .pay-value {
  padding: 2px 8px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
}

.copy-button {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
}

.copy-button:hover {
  background: var(--blue);
  color: var(--on-blue);
}

.copy-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.copy-feedback {
  min-height: 1.6em;
  margin-top: 8px;
  color: var(--success);
  font-size: 14px;
}

.plan-price-note {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 14px;
}

#copy-code-status {
  min-height: 1.5em;
  color: var(--success);
  font-size: 14px;
}

.register-small {
  margin-block: 16px;
  color: var(--muted);
  font-size: 15px;
}

.register-side {
  display: grid;
  gap: 20px;
}

.register-side-block {
  padding: 24px;
  border-radius: 16px;
  background: var(--body);
}

.register-side-block h3 {
  font-size: 22px;
}

.register-side-block > p {
  margin-top: 6px;
  color: var(--muted);
}

.register-form.compact {
  margin-top: 8px;
}

.bank-details {
  margin-top: 14px;
}

.bank-details dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding-block: 6px;
  border-bottom: 1px solid var(--line);
}

.bank-details dt {
  color: var(--muted);
}

.bank-details dd {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.bank-details a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
}

.bank-ref {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 4px solid var(--accent);
  background: var(--paper);
}

.status-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: var(--paper);
}

.status-due,
.status-next {
  margin-top: 10px;
  font-weight: 600;
}

.status-due {
  color: var(--danger);
}

.paid-list {
  margin: 6px 0 0;
  padding-left: 20px;
}

.paid-list li::marker {
  content: '✓  ';
  color: var(--success);
}

@media (max-width: 860px) {
  .register-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .pay-details > div,
  .done-summary > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .choice-options {
    grid-template-columns: 1fr;
  }

  .choice-options span {
    min-height: 52px;
  }

  .register-row {
    grid-template-columns: 90px minmax(0, 1fr);
  }
}

.faq-list {
  max-width: 820px;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  min-height: 60px;
  padding: 18px 40px 18px 0;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  position: absolute;
  top: 14px;
  right: 6px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 400;
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list details p {
  max-width: 68ch;
  padding-bottom: 20px;
  color: var(--muted);
}

/* ==========================================================================
   12. Бүртгэлийн уриалга
   ========================================================================== */

.cta-band {
  background: var(--navy);
  color: #fff;
}

.cta-band .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding-block: 56px;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  max-width: 54ch;
  margin-top: 10px;
  color: #dfe8d5;
}

.cta-band .checker {
  background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 16px);
}

/* ==========================================================================
   13. Хөл хэсэг
   ========================================================================== */

footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 15px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 32px 48px;
  padding-block: 48px 32px;
}

.footer-brand p {
  max-width: 34ch;
  margin-top: 12px;
}

.footer-top .brand {
  color: var(--ink);
}

.footer-nav ul,
.footer-contact {
  display: grid;
  align-content: start;
  padding: 0;
  list-style: none;
}

.footer-nav a,
.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 36px;
}

.footer-nav a:hover,
.footer-contact a:hover,
.footer-bottom a:hover {
  color: var(--blue);
}

.footer-nav a[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   14. Админ горим (админ нэвтэрсэн үед л: js/admin-bar.js, js/athletes.js)
   ========================================================================== */

.admin-mode-bar {
  background: var(--navy);
  color: #fff;
  font-size: 14px;
}

.admin-mode-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
}

.admin-mode-bar p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.admin-mode-bar p span {
  color: #f3c873;
}

.admin-mode-bar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 20px;
}

.admin-mode-bar a,
.admin-mode-bar button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-mode-bar a:hover,
.admin-mode-bar button:hover {
  color: var(--gold);
}

.section-admin {
  margin-bottom: 24px;
}

.card-admin {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.card-admin .admin-badges {
  margin-top: 0;
}

.card-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card-admin-actions .admin-button {
  min-height: 40px;
  padding: 6px 12px;
}

/* Ноорог: зочид харахгүй гэдгийг тасархай хүрээгээр ялгана */
.athlete-card.is-draft,
.achievement-card.is-draft {
  border-style: dashed;
  border-color: var(--muted);
}

.athlete-card.is-draft > :not(.card-admin),
.achievement-card.is-draft > :not(.card-admin) {
  opacity: 0.72;
}

/* ==========================================================================
   15. Дэлгэцийн хэмжээ
   ========================================================================== */

@media (max-width: 1060px) {
  .hero-grid,
  .program-layout,
  .practice-layout,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-card {
    max-width: 560px;
  }

  .level-check {
    max-width: 640px;
  }

  .puzzle-shell {
    max-width: 560px;
  }

  .athlete-list,
  .achievement-list,
  .benefits,
  .path {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --section-space: 64px;
  }

  /* Гар утасны цэс: JavaScript-тэй үед товчоор нээгдэнэ, JavaScript-гүй үед үргэлж нээлттэй */
  .menu {
    display: grid;
    order: 3;
  }

  .header-tools {
    order: 2;
  }

  .header nav {
    display: none;
    flex: 0 0 100%;
    order: 4;
    flex-direction: column;
    gap: 0;
    padding-bottom: 12px;
  }

  .header nav.open,
  html:not(.js) .header nav {
    display: flex;
  }

  html:not(.js) .menu {
    display: none;
  }

  .header nav a {
    min-height: 48px;
    font-size: 16px;
  }

  .plans,
  .coach-strip,
  .coach-grid {
    grid-template-columns: 1fr;
  }

  .plans {
    max-width: 560px;
  }

  .coach-grid {
    gap: 48px;
  }

  .coach {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0 24px;
    align-items: start;
  }

  .coach-photo {
    grid-row: span 5;
  }

  .coach-role {
    margin-top: 0;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .schedule-row {
    grid-template-columns: 150px 1fr;
  }

  .schedule-row p:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  :root {
    --gutter: 18px;
    --section-space: 52px;
  }

  .header-inner {
    min-height: 64px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero .lede,
  .page-head .lede {
    font-size: 17px;
  }

  .hero .actions .button {
    flex: 1 1 100%;
  }

  .hero-card-body {
    padding: 20px;
  }

  .slot-list > div {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .page-head {
    padding-block: 40px 28px;
  }

  .athlete-list,
  .achievement-list,
  .benefits,
  .path {
    grid-template-columns: 1fr;
  }

  .athlete-card {
    grid-template-columns: 72px 1fr;
    padding: 18px;
  }

  .athlete-photo {
    width: 72px;
    height: 72px;
  }

  .coach {
    grid-template-columns: 1fr;
  }

  .coach-photo {
    grid-row: auto;
    max-width: 240px;
    aspect-ratio: 1;
  }

  .coach-role {
    margin-top: 18px;
  }

  .program-tabs {
    grid-template-columns: 1fr;
  }

  .program-tabs button {
    text-align: left;
  }

  .schedule-row {
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
  }

  .schedule-row .length {
    text-align: right;
  }

  .fee strong {
    font-size: 28px;
  }

  .puzzle-shell {
    padding: 14px;
  }

  .board-frame {
    grid-template-columns: 12px 1fr;
    gap: 4px;
  }

  .contact-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .steps {
    padding: 22px;
  }

  .cta-band .actions,
  .cta-band .button {
    width: 100%;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-block: 36px 20px;
  }

  .footer-nav ul {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }

  .footer-nav a,
  .footer-contact a {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* Утсан дээр хөлөг тайлбараас өмнө гарна */
@media (max-width: 1060px) {
  .practice-layout {
    gap: 20px;
  }

  .practice-copy {
    display: contents;
  }

  .practice-copy > h2,
  .practice-copy > p {
    order: 0;
  }

  .practice-layout .puzzle-shell {
    order: 1;
  }

  .practice-how,
  .keyboard-help {
    order: 2;
    margin-top: 0;
  }

}

@media (max-width: 650px) {
  #next-puzzle {
    flex: 1 1 100%;
  }
}

/* Утасны дугаар мөр хооронд тасрахгүй */
[data-club='phone'] {
  white-space: nowrap;
}
