/* Шагайн мэрэг — төгрөгийн сийлбэр: гильош хээ, алтан хүрээ, алхан хээ, серийн дугаар */
:root {
  --ground: #0b1613;
  --ground-2: #10201b;
  --ground-3: #183029;
  --line: #24453b;
  --mist: #b9c8bf;
  --mist-2: #8fa69a;

  --paper: #ece7d8;
  --paper-2: #e3dcc8;
  --paper-edge: #cfc5ab;
  --ink: #16302a;      /* сийлбэрийн ногоон бэх */
  --ink-2: #3f5a51;
  --serial: #9b2b1f;   /* серийн дугаарын улаан */

  --gold: #c8a45c;
  --gold-hi: #ecd8a2;
  --gold-lo: #8c6b2c;
  --foil: linear-gradient(135deg, #8c6b2c 0%, #e9d29a 38%, #c8a45c 55%, #f3e3b6 72%, #8c6b2c 100%);

  --ink-mori: #8f3524;
  --ink-temee: #86662a;
  --ink-honi: #2e4c69;
  --ink-yamaa: #245a49;
  --ink-mori-lt: #e0a08a;
  --ink-temee-lt: #e2c68a;
  --ink-honi-lt: #a9c0d8;
  --ink-yamaa-lt: #9fd2bd;

  --f-display: "Prata", Georgia, serif;
  --f-caps: "Forum", Georgia, serif;
  --f-body: "Onest", "Segoe UI", Roboto, sans-serif;

  --gutter: 16px;
  --radius: 2px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh;
  background-color: var(--ground);
  background-image: radial-gradient(90% 55% at 50% 0%, rgba(36, 69, 59, 0.55), transparent 70%);
  color: var(--mist);
  font: 400 1.0625rem/1.65 var(--f-body);
  display: flex; flex-direction: column;
}
::selection { background: var(--gold); color: var(--ground); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 1px; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
img, svg { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html { scrollbar-color: var(--line) var(--ground); }

.ic { width: 1.2em; height: 1.2em; flex: none; }
.ic-lg { width: 2.75rem; height: 2.75rem; flex: none; }
.ink-mori { color: var(--ink-mori); }
.ink-temee { color: var(--ink-temee); }
.ink-honi { color: var(--ink-honi); }
.ink-yamaa { color: var(--ink-yamaa); }

/* ── Толгой ─────────────────────────────────── */
.bar { display: flex; align-items: center; justify-content: space-between; max-width: 72rem; width: 100%; margin: 0 auto; padding: 14px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 400 1.0625rem/1 var(--f-caps); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-hi); }
.brand .ic { color: var(--gold); width: 1.6rem; height: 1.6rem; }
.bar-link { font: 400 0.9375rem/1 var(--f-caps); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); padding: 12px 4px; text-decoration: none; border-bottom: 1px solid var(--line); }

main { flex: 1; width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter) 3rem; }

/* ── Дэвсгэрт (судрын хуудас) ───────────────── */
.leaf {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 1.75rem 1fr;
  background-color: var(--paper);
  background-image: url("/img/field.svg");
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 var(--paper-edge), 0 24px 48px -24px rgba(0, 0, 0, 0.8);
  margin-bottom: 1.5rem;
}
.leaf::before { /* алтан давхар хүрээ */
  content: ""; position: absolute; inset: 7px; z-index: -1;
  border: 1px solid var(--gold-lo);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--gold);
  pointer-events: none;
}
.leaf::after { /* алхан хээний тууз дээд ба доод ирмэгт */
  content: ""; position: absolute; left: 14px; right: 14px; top: 14px; bottom: 14px; z-index: -1;
  background: url("/img/hee.svg") repeat-x top left / auto 10px, url("/img/hee.svg") repeat-x bottom left / auto 10px;
  opacity: 0.55; pointer-events: none;
}
.leaf-margin { margin: 30px 0 30px 14px; border-right: 1px solid var(--paper-edge); display: flex; align-items: center; justify-content: center; }
.leaf-margin span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 400 0.75rem/1 var(--f-caps); letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold-lo);
}
.leaf-body { padding: 2.1rem 1.4rem 2.1rem 1.1rem; min-width: 0; }
.leaf-narrow { max-width: 40rem; margin-inline: auto; }
.leaf p { color: var(--ink-2); }

h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.35rem, 8.6vw, 4.5rem); color: var(--ink); }
.h-md { font-size: clamp(1.75rem, 5.6vw, 2.6rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.5rem, 4.6vw, 2.15rem); }
h3 { font-size: 1.2rem; }
.lede { font-size: 1.0625rem; max-width: 34rem; margin: 0.9rem 0 0; }
.fine { font-size: 0.875rem; margin: 0.75rem 0 0; color: var(--ink-2); }

/* Серийн дугаар: заяаны тоо */
.serial { font: 400 1.0625rem/1 var(--f-caps); letter-spacing: 0.18em; color: var(--serial); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Нүүр: дэвсгэрт ─────────────────────────── */
.leaf-hero { margin-top: 0.25rem; overflow: hidden; }
.note-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.1rem; }
.note-top .caps { font: 400 0.8125rem/1 var(--f-caps); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold-lo); }
.hero-grid { display: grid; gap: 1.4rem; position: relative; }
.hero-copy { position: relative; }
.medallion {
  position: absolute; z-index: -1; pointer-events: none;
  width: 19rem; height: 19rem; right: -8.5rem; top: -4.25rem;
  background: url("/img/medallion.svg") center / contain no-repeat;
  opacity: 0.6;
}
.medallion svg { position: absolute; inset: 37%; width: 26%; height: 26%; color: var(--gold-lo); }
.hero-bones { display: flex; gap: 0.5rem; margin-top: 1.1rem; color: var(--ink); }
.hero-bones .bone { width: 2.4rem; height: 2.4rem; }
.hero-bones .bone:nth-child(1) { transform: rotate(-12deg); }
.hero-bones .bone:nth-child(2) { transform: rotate(7deg); }
.hero-bones .bone:nth-child(3) { transform: rotate(-3deg); }
.hero-bones .bone:nth-child(4) { transform: rotate(15deg); }

@media (min-width: 860px) {
  .leaf { grid-template-columns: 2.5rem 1fr; }
  .leaf-body { padding: 3rem 3.25rem 3rem 2.25rem; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; align-items: center; }
  .cast-form { border-left: 1px solid var(--paper-edge); padding-left: 3rem; }
  .medallion { width: 30rem; height: 30rem; right: -4rem; top: -7rem; opacity: 0.5; }
  .hero-bones .bone { width: 3.25rem; height: 3.25rem; }
  .hero-bones { gap: 0.9rem; margin-top: 1.75rem; }
  .lede { font-size: 1.125rem; }
}

/* ── Маягт ──────────────────────────────────── */
.cast-form { display: grid; gap: 1.05rem; }
.field { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 0.35rem; }
.field legend, .field .label { font: 400 0.8125rem/1.2 var(--f-caps); letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-2); padding: 0; margin-bottom: 0.4rem; }
.date-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0.5rem; }
input, select {
  width: 100%; min-height: 3.25rem;
  font: 500 1.125rem/1.2 var(--f-body);
  color: var(--ink); background: rgba(255, 253, 246, 0.72);
  border: 1px solid #b7ab8c; border-radius: var(--radius);
  padding: 0.7rem 0.85rem; caret-color: var(--serial);
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
  font-variant-numeric: tabular-nums;
}
input::placeholder { color: #6e6a58; }
input:hover, select:hover { border-color: var(--gold-lo); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--ink); background: #fffdf6; box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.45); }
input[aria-invalid="true"] { border-color: var(--serial); background: #f8ece6; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; min-height: 0; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; border: 1px solid #b7ab8c; border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.72); font-weight: 500; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.seg label:hover span { border-color: var(--gold-lo); }
.seg input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.seg input:checked + span .ic { color: var(--gold); }
.seg input:focus-visible + span { box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.6); }

.form-error { margin: 0; color: var(--serial); font-weight: 500; display: flex; gap: 0.4rem; font-size: 0.9375rem; }

/* ── Товч ───────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.4rem; padding: 0 1.5rem;
  font: 400 0.9375rem/1 var(--f-caps); letter-spacing: 0.2em; text-transform: uppercase;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform 0.12s var(--ease-out), background-color 0.15s, box-shadow 0.2s, filter 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--gold-hi); box-shadow: inset 0 0 0 1px var(--gold-lo), inset 0 0 0 4px var(--ink), inset 0 0 0 5px rgba(200, 164, 92, 0.55), 0 10px 22px -12px rgba(0, 0, 0, 0.9); }
.btn-primary:hover { background: #1d3d35; }
.btn-primary .ic { color: var(--gold); }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn-quiet { background: transparent; color: var(--ink); border-color: #b7ab8c; }
.btn-quiet:hover { background: var(--paper-2); }
.btn-ghost { background: transparent; color: var(--gold-hi); border-color: var(--gold-lo); }
.btn-ghost:hover { background: var(--ground-3); }
.cast-form .btn-primary { width: 100%; margin-top: 0.35rem; min-height: 3.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ── Дэвсгэр дээрх хэсгүүд ──────────────────── */
.band { max-width: 50rem; margin: 5rem auto 0; }
.band h2 { color: var(--paper); margin-bottom: 0.8rem; }
.band-lede, .band p { color: var(--mist); max-width: 40rem; margin: 0 0 1.75rem; }
.band b { color: var(--gold-hi); font-weight: 500; }
.band::before { content: ""; display: block; height: 20px; margin-bottom: 2rem; background: url("/img/band.svg") repeat-x center / auto 20px; opacity: 0.45; }

.faces-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.faces-strip li { display: grid; gap: 0.3rem; align-content: start; padding: 1.4rem 1.1rem 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.faces-strip .ic-lg { color: var(--gold); }
.faces-strip b { font: 400 1.375rem/1.1 var(--f-display); color: var(--paper); margin-top: 0.6rem; }
.faces-strip span { color: var(--mist-2); font-size: 0.9375rem; line-height: 1.45; }
@media (min-width: 720px) { .faces-strip { grid-template-columns: repeat(4, 1fr); } }

.leaf-index { list-style: none; counter-reset: leaf; margin: 0; padding: 0; }
.leaf-index li { counter-increment: leaf; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 0.75rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.leaf-index li::before { content: counter(leaf, upper-roman); grid-row: span 2; font: 400 1rem/1.4 var(--f-caps); letter-spacing: 0.1em; color: var(--gold); }
.leaf-index b { font: 400 1.1875rem/1.3 var(--f-display); color: var(--paper); }
.leaf-index span { font-size: 0.9375rem; color: var(--mist-2); }

/* ── Шагай хаях ─────────────────────────────── */
.throw-stage { position: relative; height: 9.25rem; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; justify-items: center; border-bottom: 1px solid var(--paper-edge); margin-bottom: 1.1rem; }
.throw-stage .throw-bone { display: grid; justify-items: center; gap: 0.45rem; }
.throw-stage svg { width: 4.25rem; height: 4.25rem; }
.throw-stage b { font: 400 0.75rem/1 var(--f-caps); letter-spacing: 0.24em; text-transform: uppercase; }
.throw-stage .throw-bone.is-falling { animation: fall 900ms var(--ease-out) both; animation-delay: calc(var(--i) * 160ms); }
.throw-stage .throw-bone.is-falling svg { animation: spin 900ms var(--ease-out) both; animation-delay: calc(var(--i) * 160ms); }
.throw-stage .throw-bone.is-falling b { animation: ink 500ms ease-out both; animation-delay: calc(var(--i) * 160ms + 750ms); }
@keyframes fall { 0% { transform: translate(var(--dx), -14rem); opacity: 0; } 20% { opacity: 1; } 70% { transform: translate(0, 0.35rem); } 100% { transform: translate(0, 0); } }
@keyframes spin { from { transform: rotate(var(--r0)); } to { transform: rotate(var(--r1)); } }
@keyframes ink { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.throw-caption { font: 400 0.8125rem/1.4 var(--f-caps); letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-lo); margin: 0 0 0.6rem; min-height: 1.2rem; }

.free-text > * { animation: rise 650ms var(--ease-out) both; }
.free-text > :nth-child(2) { animation-delay: 80ms; }
.free-text > :nth-child(3) { animation-delay: 160ms; }
.free-text > :nth-child(4) { animation-delay: 240ms; }
.free-text > :nth-child(5) { animation-delay: 320ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.free-text p { max-width: 38rem; }
.trait { font-size: 1.45rem; margin-top: 1.6rem; }

/* Заяаны тоо = серийн дугаар; далд цифр ч зурагдана */
.number { margin-top: 1.9rem; padding-top: 1.3rem; border-top: 1px solid var(--paper-edge); }
.number h3 { font: 400 0.8125rem/1.2 var(--f-caps); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-2); }
.cells { display: flex; gap: 0.35rem; margin-top: 0.8rem; align-items: center; }
.cells::before { content: "№"; font: 400 1.5rem/1 var(--f-caps); color: var(--serial); margin-right: 0.35rem; }
.cell { width: 2.5rem; height: 3.25rem; display: grid; place-items: center; font: 400 2rem/1 var(--f-caps); font-variant-numeric: tabular-nums; color: var(--serial); border-bottom: 1.5px solid var(--serial); }
.cell.ghost { color: transparent; border-bottom: 1.5px dashed #b7ab8c; background: repeating-linear-gradient(135deg, transparent 0 5px, rgba(140, 107, 44, 0.16) 5px 6px); }
.cell.ghost svg { width: 1rem; height: 1rem; color: var(--gold-lo); }

/* ── Банкны туузтай боодол ─────────────────── */
.bundle { position: relative; max-width: 50rem; margin: 2.75rem auto 0; }
.bundle-stack { position: absolute; left: 0; right: 0; top: -12px; height: 40px; }
.bundle-stack i { position: absolute; left: 0; right: 0; height: 100%; background: var(--paper-2); border-radius: var(--radius); border-top: 1px solid var(--paper-edge); }
.bundle-stack i:nth-child(1) { top: -8px; left: 18px; right: 18px; opacity: 0.45; }
.bundle-stack i:nth-child(2) { top: -4px; left: 9px; right: 9px; opacity: 0.75; }
.wrapper { position: relative; background: var(--paper) url("/img/field.svg"); color: var(--ink); border-radius: var(--radius); padding: 2.6rem 1.4rem 1.5rem; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.85); overflow: hidden; }
.wrapper::before { /* банкны тууз */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3.5rem; transform: translateX(-50%);
  background: var(--foil); opacity: 0.92;
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.35), inset -2px 0 0 rgba(0, 0, 0, 0.15);
}
.wrapper > * { position: relative; }
.wrapper h2 { color: var(--ink); margin-bottom: 0.9rem; font-size: 1.5rem; background: var(--paper); display: inline; box-shadow: 0 0 0 0.4rem var(--paper); }
.cord { position: absolute; top: 0.8rem; left: 50%; transform: translateX(-50%); width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--serial); color: var(--gold-hi); box-shadow: 0 0 0 2px var(--gold), 0 4px 10px -2px rgba(0, 0, 0, 0.5); z-index: 1; }
.cord .ic-lg { width: 1.6rem; height: 1.6rem; }
.wrapper h2 { margin-top: 1.4rem; display: block; box-shadow: none; background: none; }
.leaf-index.compact { margin-top: 0.4rem; background: rgba(236, 231, 216, 0.88); }
.leaf-index.compact li { border-color: var(--paper-edge); padding: 0.6rem 0.4rem; grid-template-columns: 2.25rem 1fr; }
.leaf-index.compact li::before { color: var(--gold-lo); font-size: 0.9375rem; grid-row: auto; }
.leaf-index.compact b { color: var(--ink); font-size: 1.0625rem; }

/* ── 5 000₮-ийн дэвсгэрт: ганцаараа, ойр нь өөр үйлдэлгүй ── */
.pay { position: relative; isolation: isolate; max-width: 30rem; margin: 3.75rem auto 1rem; text-align: center; display: grid; justify-items: center; padding: 2.2rem 1.5rem 1.6rem; border-radius: var(--radius); background: var(--ground-2); box-shadow: inset 0 0 0 1px var(--gold-lo), inset 0 0 0 5px var(--ground-2), inset 0 0 0 6px rgba(200, 164, 92, 0.45); overflow: hidden; }
.pay::before { content: ""; position: absolute; inset: -30% -30% auto auto; width: 22rem; height: 22rem; background: url("/img/medallion.svg") center / contain no-repeat; opacity: 0.22; z-index: -1; }
.price { margin: 0 0 1.4rem; color: var(--mist); font: 400 0.8125rem/1.4 var(--f-caps); letter-spacing: 0.24em; text-transform: uppercase; }
.price span { display: block; font: 400 3.6rem/1 var(--f-display); letter-spacing: -0.01em; color: var(--gold-hi); font-variant-numeric: lining-nums tabular-nums; margin-bottom: 0.5rem; text-transform: none; }
.btn-pay { width: 100%; min-height: 4rem; font-size: 1rem; background: var(--foil); color: #1b170c; border-color: var(--gold-lo); box-shadow: 0 12px 26px -14px rgba(200, 164, 92, 0.8); }
.btn-pay:hover { filter: brightness(1.06); }
.btn-pay .ic { color: #1b170c; }
.pay .fine { color: var(--mist-2); }
.pay .form-error { color: var(--ink-mori-lt); justify-content: center; margin-top: 0.75rem; }

/* ── Баталгаажуулах ─────────────────────────── */
.facts { margin: 1.25rem 0 0; display: grid; }
.facts > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; padding: 0.85rem 0; border-bottom: 1px solid var(--paper-edge); align-items: baseline; }
.facts dt { font: 400 0.8125rem/1.3 var(--f-caps); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 500; font-size: 1.125rem; }
.facts small { display: block; margin-top: 0.4rem; color: var(--ink-2); font-size: 0.875rem; line-height: 1.45; }

/* ── Бүтэн судар ────────────────────────────── */
.reading-head { text-align: center; margin: 1.25rem auto 2.75rem; max-width: 40rem; }
.reading-head h1 { color: var(--paper); }
.reading-head p { color: var(--mist); }
.reading-head .serial { display: inline-block; margin-top: 0.4rem; color: #e07a66; }
.reading-faces { display: flex; justify-content: center; gap: 0.9rem; margin-top: 1.4rem; color: var(--gold); }
.reading-faces svg { width: 3rem; height: 3rem; }
.reading-leaf { max-width: 50rem; margin-inline: auto; }
.reading-leaf h2 { margin-bottom: 1rem; }
.reading-leaf h2[data-ink="mori"] { color: var(--ink-mori); }
.reading-leaf h2[data-ink="temee"] { color: var(--ink-temee); }
.reading-leaf h2[data-ink="honi"] { color: var(--ink-honi); }
.reading-leaf h2[data-ink="yamaa"] { color: var(--ink-yamaa); }
.reading-leaf p { max-width: 38rem; }
.reading-leaf ul { padding-left: 1.2rem; margin: 0.5rem 0 0; color: var(--ink); }
.reading-leaf li { margin: 0.45rem 0; }
.reading-leaf li::marker { color: var(--gold-lo); }
.digits { display: grid; }
.digit-row { display: grid; grid-template-columns: 2.5rem 1fr; gap: 1rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--paper-edge); }
.digit-row b { font: 400 0.8125rem/1.3 var(--f-caps); letter-spacing: 0.2em; text-transform: uppercase; display: block; color: var(--ink); }
.digit-row span { color: var(--ink-2); font-size: 0.9375rem; }
.guardian { display: grid; gap: 1.5rem; align-items: center; }
.guardian-art { position: relative; width: min(100%, 15rem); aspect-ratio: 1; border-radius: 50%; background: var(--ground) url("/img/medallion.svg") center / 118% no-repeat; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 1px var(--gold-lo), 0 0 0 5px var(--paper), 0 0 0 6px var(--gold); }
.guardian-art img { width: 100%; height: 100%; object-fit: cover; }
.guardian-art svg { width: 42%; height: 42%; color: var(--gold-hi); }
.guardian h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.verse { font: 400 1.1875rem/1.65 var(--f-display); color: var(--ink); margin: 0; }
@media (min-width: 720px) { .guardian { grid-template-columns: 15rem 1fr; } }
.reading-end { max-width: 40rem; margin: 2.75rem auto 0; text-align: center; display: grid; gap: 0.75rem; justify-items: center; }
.reading-end p { color: var(--mist); margin: 0; }

.mine-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.mine-list a { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--paper-edge); text-decoration: none; font-weight: 500; }

/* ── Хөл ────────────────────────────────────── */
.foot { max-width: 48rem; margin: 0 auto; padding: 2rem var(--gutter) 2.5rem; color: var(--mist-2); font-size: 0.875rem; text-align: center; }
.foot p { margin: 0 0 0.5rem; }
.foot-sm { font: 400 0.75rem/1 var(--f-caps); letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  html { scroll-behavior: auto; }
}

/* ── Засвар: тууз баруун талд, товчны үсгийн зай, нэг өнгийн шагай ── */
.wrapper::before { left: auto; right: 1.75rem; transform: none; width: 3rem; }
.cord { left: auto; right: 1.95rem; transform: none; }
.wrapper h2 { padding-right: 4.5rem; }
.leaf-index.compact { margin-right: 4.25rem; background: none; }
.btn { letter-spacing: 0.12em; font-size: 0.875rem; padding: 0 1.15rem; }
.cast-form .btn-primary, .btn-pay { font-size: 0.9375rem; letter-spacing: 0.16em; }
@media (max-width: 559px) { .actions .btn { width: 100%; } }
.throw-stage .throw-bone { color: var(--ink); }
.throw-stage svg { width: 3.6rem; height: 3.6rem; }
.throw-stage .throw-bone.is-dominant { color: var(--serial); }
.reading-faces span { color: var(--gold); }
@media (min-width: 860px) {
  h1 { font-size: clamp(3rem, 4.6vw, 4.25rem); }
  .medallion { width: 26rem; height: 26rem; right: -13rem; top: -5rem; }
}
/* Тодосгол (WCAG AA) */
.note-top .caps, .leaf-margin span, .throw-caption, .cell.ghost svg, .leaf-index.compact li::before { color: #6f531c; }
.btn-pay:hover { background: var(--foil); color: #1b170c; }
.leaf-margin { padding-right: 6px; }

/* ── Сар бүрийн хэмнэл ─────────────────────── */
.months { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); border-top: 1px solid var(--paper-edge); border-left: 1px solid var(--paper-edge); }
.months li { display: grid; gap: 0.2rem; align-content: start; padding: 0.85rem 0.9rem 1rem; border-right: 1px solid var(--paper-edge); border-bottom: 1px solid var(--paper-edge); }
.months b { font: 400 1.125rem/1.1 var(--f-display); color: var(--ink); }
.months em { font: 400 0.6875rem/1.2 var(--f-caps); font-style: normal; letter-spacing: 0.22em; text-transform: uppercase; }
.months span { font-size: 0.875rem; line-height: 1.4; color: var(--ink-2); }
.months .lv-3 { background: rgba(200, 164, 92, 0.16); }
.months .lv-3 em { color: #6f531c; }
.months .lv-2 em { color: var(--ink-2); }
.months .lv-1 em { color: var(--serial); }
.months .lv-1 { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(155, 43, 31, 0.05) 6px 7px); }

/* ── Өлзийтэй зүйлс ────────────────────────── */
.lucky { margin: 0 0 1.25rem; display: grid; }
.lucky > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--paper-edge); align-items: baseline; }
.lucky dt { font: 400 0.8125rem/1.3 var(--f-caps); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.lucky dd { margin: 0; font: 400 1.125rem/1.35 var(--f-display); color: var(--ink); }
.months { grid-template-columns: repeat(auto-fill, minmax(8.75rem, 1fr)); }
.months li { padding: 0.75rem 0.7rem 0.85rem; }
@media (max-width: 400px) { .lucky > div { grid-template-columns: 6.5rem 1fr; } }
@media (max-width: 559px) { .months { grid-template-columns: 1fr 1fr; } .months span { font-size: 0.8125rem; } }

/* ── Ганц шийдвэр ───────────────────────────── */
.callout { margin-top: 1.5rem; padding: 1.1rem 1.2rem 1.2rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--gold-lo), inset 0 0 0 4px var(--ink), inset 0 0 0 5px rgba(200, 164, 92, 0.5); }
.callout b { display: block; font: 400 0.75rem/1.3 var(--f-caps); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.45rem; }
.leaf .callout p { margin: 0; font: 400 1.25rem/1.45 var(--f-display); color: var(--paper); }

/* ── Гарзын үндэс ───────────────────────────── */
.roots { list-style: none; counter-reset: root; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.25rem; }
.roots li { counter-increment: root; position: relative; padding: 1rem 0 1rem 2.75rem; border-top: 1px solid var(--paper-edge); }
.roots li::before { content: counter(root); position: absolute; left: 0; top: 0.95rem; font: 400 1.75rem/1 var(--f-display); color: var(--serial); }
.roots em { font: 400 0.75rem/1.3 var(--f-caps); font-style: normal; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); }
.roots p { margin: 0.35rem 0 0; }
.leaf .roots .fix { color: var(--ink); }
.roots .fix b { font-weight: 600; color: var(--ink-yamaa); }

/* ── Таван жил ──────────────────────────────── */
.years { list-style: none; margin: 1rem 0 0; padding: 0; }
.years li { padding: 1rem 0 1.05rem; border-top: 1px solid var(--paper-edge); }
.y-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.75rem; }
.y-head b { font: 400 1.75rem/1 var(--f-display); color: var(--ink); font-variant-numeric: lining-nums; }
.y-head span { font-size: 0.9375rem; color: var(--ink-2); }
.y-head em { font: 400 0.6875rem/1 var(--f-caps); font-style: normal; letter-spacing: 0.2em; text-transform: uppercase; padding: 0.35rem 0.55rem; border-radius: 2px; margin-left: auto; }
.years .lv-3 em { background: rgba(200, 164, 92, 0.28); color: #5b4415; }
.years .lv-2 em { background: rgba(36, 90, 73, 0.12); color: var(--ink); }
.years .lv-1 em { background: rgba(155, 43, 31, 0.1); color: var(--serial); }
.years p { margin: 0.45rem 0 0; font-size: 0.9375rem; }

/* ── 21 хоног ───────────────────────────────── */
.tracker { margin-top: 1.25rem; }
.tracker-count { font: 400 0.8125rem/1.2 var(--f-caps); letter-spacing: 0.2em; text-transform: uppercase; }
.tracker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; margin-top: 0.6rem; }
.day { aspect-ratio: 1; min-height: 2.75rem; border: 1px solid #b7ab8c; border-radius: 50%; background: rgba(255, 253, 246, 0.6); font: 400 1rem/1 var(--f-display); color: var(--ink-2); cursor: pointer; transition: background-color 0.15s, color 0.15s, transform 0.12s var(--ease-out); }
.day:hover { border-color: var(--gold-lo); }
.day:active { transform: scale(0.94); }
.day[aria-pressed="true"] { background: var(--ink); color: var(--gold-hi); border-color: var(--ink); }

/* ── Утасны дэлгэцийн сахиус ───────────────── */
.wallpaper { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--paper-edge); display: grid; gap: 0.9rem; justify-items: start; }
.wallpaper p { margin: 0; }
.wallpaper-out { display: grid; gap: 0.75rem; justify-items: start; }
.wallpaper-out img { width: min(100%, 15rem); border-radius: 10px; box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.7); }
.hero-bones .bone { width: 3.1rem; height: 2.6rem; }
@media (min-width: 860px) { .hero-bones .bone { width: 4.25rem; height: 3.5rem; } }
.reading-faces svg { width: 3.75rem; height: 3.1rem; }
.throw-stage svg { width: 4.4rem; height: 3.7rem; }

/* ── Шагай: эзэмшигчийн зурагнаас тайрсан бодит дүрс ── */
.bone-img, .hero-bones .bone, .faces-strip .ic-lg { object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.28)); }
.hero-bones .bone { width: 3.6rem; height: 2.8rem; }
@media (min-width: 860px) { .hero-bones .bone { width: 5rem; height: 3.9rem; } }
.faces-strip .ic-lg { width: 4.25rem; height: 3.3rem; }
.throw-stage .throw-bone img { width: 4.5rem; height: 3.5rem; }
.throw-stage .throw-bone.is-falling img { animation: spin 900ms var(--ease-out) both; animation-delay: calc(var(--i) * 160ms); }
.reading-faces img { width: 4rem; height: 3.1rem; }
.guardian-art img.bone-img { width: 62%; height: auto; object-fit: contain; }
.throw-stage .throw-bone.is-dominant b { color: var(--serial); }
