@import url('/tokens.css');

:root { font-family: var(--font); color: var(--color-ink); -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--color-bg); }
body { min-height: 100dvh; overflow-wrap: break-word; }
button, input, select { font: inherit; }

/* Доод зай: тогтмол «Асуух» товч сүүлийн товчийг хаахгүй */
.app { max-width: 460px; margin: 0 auto; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 16px; }
.logo { font-weight: 900; font-size: var(--fs-xl); letter-spacing: -.02em; color: var(--color-primary); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; min-width: 0; }
.logo-badge { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--color-primary-soft); }
/* Логоны дугуй хэсгийг (хүүхдийн дүр) тайрч харуулна: зураг 720px, дугуй төв (395,255), радиус 190 */
.logo-badge img { position: absolute; width: 83px; height: 83px; left: -24px; top: -8px; }
.logo .o { color: var(--color-accent); }
/* Brand mascot (дугуйлж тайрсан PNG/WebP) бол дүрсийг бүтнээр нь дүүргэнэ */
.logo-badge img[src*="himommy-mascot"], .loader-badge img[src*="himommy-mascot"] { left: 0; top: 0; width: 100%; height: 100%; }
.link { background: none; border: 0; color: var(--color-muted); font-size: var(--fs-sm); padding: 12px 8px; cursor: pointer; text-decoration: underline; }

h1 { font-size: var(--fs-2xl); line-height: 1.2; margin: 8px 0; letter-spacing: -.01em; }
h2 { font-size: var(--fs-lg); margin: 0 0 12px; }
p { line-height: 1.5; margin: 0 0 12px; }
.muted { color: var(--color-muted); }
.small { font-size: var(--fs-sm); }

.card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-card); margin-bottom: 16px; }
.cd-schedule { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; font-size: var(--fs-sm); }
.cd-schedule > li { display: grid; gap: 4px; min-width: 0; }
.cd-when { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.cd-schedule b { flex: none; font-variant-numeric: tabular-nums; color: var(--color-ink); }
.cd-schedule span { color: var(--color-muted); min-width: 0; }
.cd-schedule > li.past { opacity: .5; }
.cd-schedule > li.past .cd-when { text-decoration: line-through; }

label { display: block; font-weight: 700; font-size: var(--fs-md); margin: 0 0 6px; }
.input { width: 100%; padding: 14px; border: 1.5px solid var(--color-line); border-radius: 12px; background: var(--color-surface); font-size: var(--fs-base); color: var(--color-ink); }
.input:focus-visible { outline: none; border-color: var(--color-focus); box-shadow: 0 0 0 3px var(--color-brand-blue-soft); }
.input.otp { letter-spacing: .5em; text-align: center; font-size: var(--fs-2xl); font-weight: 800; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 14px; border: 0; font-weight: 800; font-size: var(--fs-base); cursor: pointer; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--color-cta), var(--color-cta-2)); color: var(--color-on-cta); box-shadow: var(--shadow-cta); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--color-ink); border: 1.5px solid var(--color-line); }
.btn[disabled] { opacity: .55; cursor: progress; }
/* Бүртгэл хаалттай үед зураг авах товчнууд */
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }
label.btn[aria-disabled="true"] { pointer-events: none; }
.stack > * + * { margin-top: 10px; }
.btn:focus-visible, .link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.alert { border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: var(--fs-md); line-height: 1.45; }
.alert-err { background: var(--color-warn-soft); color: var(--color-warn); }
.alert-ok { background: var(--color-ok-soft); color: var(--color-ok); }
.alert-info { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 700; text-align: center; }
.alert .err-action { display: inline-block; min-height: 44px; padding: 12px 4px; color: inherit; font-weight: 800; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.big-count { display: flex; align-items: baseline; gap: 8px; }
.big-count b { font-size: var(--fs-display); line-height: 1; color: var(--color-primary); font-weight: 900; }

.checklist { list-style: none; padding: 0; margin: 0 0 16px; }
.checklist li { position: relative; padding: 7px 0 7px 34px; line-height: 1.4; }
.checklist li::before { content: '✓'; position: absolute; left: 0; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--color-ok-soft); color: var(--color-ok); font-weight: 900; font-size: var(--fs-xs); display: grid; place-items: center; }
.checklist li.no::before { content: '✕'; background: var(--color-warn-soft); color: var(--color-warn); }

.guide-img { display: block; width: 100%; max-width: 210px; margin: 0 auto 8px; }
.g-phone { fill: var(--color-ink); }
.g-screen { fill: var(--color-photo-bg); }
.g-frame { stroke: var(--color-primary); stroke-width: 3; fill: none; }
.g-paper { fill: var(--color-surface); stroke: var(--color-sketch-line); }
.g-line { fill: var(--color-sketch-soft); }
.g-title { fill: var(--color-sketch); }
.g-mark { fill: var(--color-primary-soft); }
.g-label { fill: var(--color-primary); font-weight: 900; font-size: var(--fs-svg); }
.g-qr { fill: var(--color-ink); }
.g-qr-in { fill: var(--color-surface); }

.fields { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 16px; }
.fields dt { color: var(--color-muted); font-size: var(--fs-sm); }
.fields dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; min-width: 0; }
.thumb { width: 100%; max-height: 240px; object-fit: contain; border-radius: 12px; background: var(--color-photo-bg); margin-bottom: 16px; }

.win-banner { display: flex; align-items: baseline; justify-content: center; gap: 10px; background: var(--color-ok-soft); color: var(--color-ok); border-radius: var(--radius); padding: 18px; margin: 4px 0 16px; font-weight: 800; font-size: var(--fs-lg); }
.win-banner b { font-size: var(--fs-display); line-height: 1; font-weight: 900; }
.preview-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; }
.preview-row .fields { margin: 0; }
.thumb-sm { width: 88px; height: 120px; object-fit: cover; border-radius: 10px; background: var(--color-photo-bg); }

.ocr-status { margin: 0 0 4px; font-weight: 700; font-size: var(--fs-md); }
.ocr-status.ok { color: var(--color-ok); }
.ocr-status.warn { color: var(--color-warn); }
.ocr-status.busy::before { content: ''; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 50%; border: 2px solid var(--color-primary-soft); border-top-color: var(--color-primary); animation: spin 1s linear infinite; }

/* Нууц үг харах / нуух */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 84px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); min-width: 72px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--color-primary); font-weight: 800; font-size: var(--fs-sm); cursor: pointer; }
.pw-toggle:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 0; }
.field-hint { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--color-muted); }
.input.code { letter-spacing: .08em; font-weight: 800; text-transform: uppercase; }
.input.filled { border-color: var(--color-ok-dash); background: var(--color-ok-soft); }
.mt { margin-top: 12px; }
.my-card { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 12px 16px; margin: 0 0 12px; border: 1.5px solid var(--color-primary-dash); border-radius: var(--radius); background: var(--color-surface); color: var(--color-ink); font-weight: 700; cursor: pointer; text-align: left; }
.my-card b { font-size: var(--fs-xl); color: var(--color-primary); font-weight: 900; }
.my-card-go { margin-left: auto; color: var(--color-primary); }
.my-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; flex: none; border: 1.5px solid var(--color-primary); border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary); font-weight: 800; font-size: var(--fs-md); cursor: pointer; white-space: nowrap; }
.my-btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.link.inline { padding: 0; font-size: inherit; }

.tickets { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket { padding: 10px 14px; border-radius: 10px; background: var(--color-primary-soft); color: var(--color-primary); font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .02em; border: 1.5px dashed var(--color-primary-dash); }
.ticket.won { background: var(--color-ok-soft); color: var(--color-ok); border-color: var(--color-ok-dash); }
.ticket.void { background: var(--color-disabled-soft); color: var(--color-disabled); text-decoration: line-through; border-color: var(--color-disabled-line); }

.receipt-row { padding: 14px 0; border-top: 1px solid var(--color-line); }
.receipt-row:first-child { border-top: 0; padding-top: 0; }
.receipt-row .meta { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); color: var(--color-muted); margin-bottom: 8px; }

.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--color-primary-soft); border-top-color: var(--color-primary); animation: spin 1s linear infinite; margin: 8px auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, .ocr-status.busy::before { animation-duration: 3s; } }

/* Сайн дурын мэдээлэл: хүүхэд, байршил, эх сурвалж */
.opt { font-weight: 400; font-size: var(--fs-xs); color: var(--color-muted); margin-left: 4px; }
.field-hint.top { margin: -6px 0 12px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%); background-position: right 18px center, right 12px center; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.kid { border: 1.5px solid var(--color-line); border-radius: 12px; padding: 12px; margin: 0 0 10px; }
.kid-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 700; font-size: var(--fs-md); }
.kid-head .link { padding: 6px 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--color-line); border-radius: 999px; font-weight: 700; font-size: var(--fs-md); background: var(--color-surface); }
.chip input:checked + span { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary); }
.chip input:focus-visible + span { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.kid-field { margin-top: 10px; }
.add-kid { padding: 4px 0 12px; text-decoration: none; color: var(--color-primary); font-weight: 700; }

.center { text-align: center; }
html [hidden] { display: none; } /* класс дээрх display-ийг дарна */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hash { word-break: break-all; }
.footer { text-align: center; font-size: var(--fs-xs); color: var(--color-muted); margin-top: 24px; }
.empty { text-align: center; color: var(--color-muted); padding: 12px 0; }
[tabindex="-1"]:focus { outline: none; }

/* ---------- Нүүр: hero → тоолуур → товч → хонжвор → алхмууд ---------- */
.hero { text-align: center; padding: 8px 4px 4px; }
.kicker { display: inline-block; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px; background: var(--color-highlight); font-size: var(--fs-xs); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--color-on-highlight); }
.hero h1 { font-size: var(--fs-3xl); line-height: 1.15; margin: 0 0 10px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--color-accent); background: linear-gradient(transparent 62%, var(--color-brand-pink-soft) 62%); border-radius: 4px; padding: 0 2px; }
.hero-sub { margin: 0; color: var(--color-muted); font-size: var(--fs-md); }
.hero-sub b { color: var(--color-primary); font-weight: 900; }

.countdown { margin: 20px 0; padding: 16px 12px 14px; background: var(--color-surface); border-radius: 22px; box-shadow: var(--shadow-card); text-align: center; }
.cd-label { margin: 0 0 12px; font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--color-muted); }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-grid div { background: var(--color-primary-soft); border: 1px solid var(--color-brand-blue-soft); border-radius: 14px; padding: 12px 2px 10px; min-width: 0; }
.cd-grid b { display: block; font-size: var(--fs-3xl); font-weight: 900; line-height: 1; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.cd-grid span { display: block; margin-top: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--color-muted); }

.cta { margin-top: 4px; }
.btn-lg { min-height: 58px; font-size: var(--fs-lg); border-radius: 16px; box-shadow: 0 8px 20px -8px var(--color-primary); }
.tip { margin: 10px 4px 0; text-align: center; font-size: var(--fs-sm); color: var(--color-muted); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }

.steps { margin: 28px 0 8px; }
.steps h2 { margin: 0 0 12px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: start; padding: 12px 14px; border-radius: 16px; background: var(--color-surface); border: 1.5px solid var(--color-line); min-width: 0; }
.steps li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-cta); color: var(--color-on-cta); font-weight: 900; font-size: var(--fs-md); }
.steps b { display: block; font-size: var(--fs-base); line-height: 1.3; }
.steps span { display: block; margin-top: 3px; font-size: var(--fs-sm); color: var(--color-muted); line-height: 1.4; }
.known-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--color-primary-soft); color: var(--color-ink); font-weight: 700; font-size: var(--fs-sm); }
.foot { margin-top: 28px; text-align: center; font-size: var(--fs-sm); color: var(--color-muted); }
.foot p { margin: 0 0 4px; }

/* Хонжвор: зураг + нэр */
/* ---------- Урамшууллын баннер ---------- */
.banner { display: block; margin: 0 0 14px; border-radius: 22px; overflow: hidden; background: var(--color-brand-blue-soft); box-shadow: var(--shadow-prize); }
.banner img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 771; }
.hero h1 { font-size: var(--fs-2xl); }

/* «Тохирлын шагнал» нээх товч */
.prize-open { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin: 14px 0; padding: 10px 14px; border: 0; border-radius: 18px; font: inherit; text-align: left; cursor: pointer;
  background: linear-gradient(135deg, var(--color-brand-pink-soft), var(--color-highlight)); color: var(--color-on-highlight); box-shadow: var(--shadow-card); transition: transform .15s; }
.prize-open:active { transform: scale(.98); }
.prize-open:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.prize-open-ico { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; background: var(--color-on-cta-soft); font-size: var(--fs-xl); }
.prize-open-txt { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.prize-open-txt b { font-size: var(--fs-base); font-weight: 900; }
.prize-open-txt small { font-size: var(--fs-sm); font-weight: 700; }
.prize-soon { margin: 14px 0; padding: 14px 16px; border-radius: var(--radius); border: 1.5px dashed var(--color-brand-pink); background: var(--color-surface); text-align: center; font-weight: 800; color: var(--color-ink); }

/* ---------- Шагналын карт ---------- */
.prize-box { margin: 28px 0 0; }
.prize-box h2 { margin: 0; font-size: var(--fs-lg); }
.prize-box .sec-head .link { padding: 10px 4px; font-weight: 800; color: var(--color-primary); text-decoration: none; }
.prize-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 47%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; margin: 0 -2px; scrollbar-width: none; }
.prize-grid::-webkit-scrollbar { display: none; }
.prize-card { --tone-a: var(--color-primary-soft); --tone-b: var(--color-brand-blue-soft); --tone-line: var(--color-brand-blue-soft); --tone-tag: var(--color-surface);
  position: relative; scroll-snap-align: start; display: flex; flex-direction: column; margin: 0; background: var(--color-surface); border: 1.5px solid var(--tone-line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; }
.prize-card.tone-pink { --tone-a: var(--color-brand-pink-soft); --tone-b: var(--color-highlight-soft); --tone-line: var(--color-brand-pink-soft); }
.prize-card.tone-grand { --tone-a: var(--color-gold-soft); --tone-b: var(--color-brand-pink-soft); --tone-line: var(--color-gold); --tone-tag: var(--color-gold); }
.prize-card:active { transform: scale(.98); }
@media (hover: hover) { .prize-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-prize); } }
.prize-media { position: relative; display: grid; place-items: center; aspect-ratio: 5 / 4; overflow: hidden;
  background: radial-gradient(60% 60% at 30% 25%, var(--prize-star), transparent 70%), linear-gradient(160deg, var(--tone-a), var(--tone-b)); }
.prize-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prize-media .pa { width: 68%; height: auto; margin-top: 10px; filter: drop-shadow(0 6px 8px var(--color-art-shadow)); }
.prize-draw { position: absolute; top: 8px; left: 8px; max-width: calc(100% - 16px); padding: 3px 9px; border-radius: 999px; background: var(--tone-tag); color: var(--color-navy); font-size: var(--fs-xs); font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow-card); }
.prize-card figcaption { display: grid; gap: 4px; align-content: start; padding: 10px 12px 12px; min-width: 0; }
.prize-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; font-weight: 800; font-size: var(--fs-md); line-height: 1.3; }
.prize-card figcaption small { color: var(--color-muted); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) {
  .prize-grid { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; }
}

/* Шагналын SVG зураглал (prize-art.js) */
.pa { stroke-linecap: round; stroke-linejoin: round; }
.pa-s { stroke: var(--color-navy); stroke-width: 3; }
.pa-line { fill: none; stroke: var(--color-navy); stroke-width: 3; }
.pa-bars { fill: none; stroke: var(--color-brand-blue); stroke-width: 3.5; }
.pa-handle { fill: none; stroke: var(--color-cta-2); stroke-width: 8; }
.pa-ribbon { fill: none; stroke: var(--color-highlight); stroke-width: 5; }
.pa-dash { fill: none; stroke: var(--color-navy); stroke-width: 2; stroke-dasharray: 4 4; opacity: .5; }
.pa-spk { fill: none; stroke: var(--color-brand-blue-soft); stroke-width: 3; }
.pa-b { fill: var(--color-brand-blue); }
.pa-b2 { fill: var(--color-cta-2); }
.pa-bs { fill: var(--color-brand-blue-soft); }
.pa-p { fill: var(--color-highlight); }
.pa-ps { fill: var(--color-highlight-soft); }
.pa-w { fill: var(--color-surface); }
.pa-n { fill: var(--color-navy); }
.pa-g { fill: var(--color-gold); }
.pa-shine { fill: var(--prize-star); opacity: .35; }
.pa-spark { fill: var(--color-gold); }
.pa-t { fill: var(--color-navy); font-family: var(--font); font-weight: 900; }
.pa-small { font-size: var(--fs-art-label); letter-spacing: .04em; font-weight: 800; }

/* ---------- Тохирлын шагнал: bottom sheet (утас), төвд цонх (desktop) ---------- */
.sheet-open { overflow: hidden; }
.sheet { width: 100%; max-width: 100%; max-height: 90dvh; margin: auto 0 0; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-radius: 26px 26px 0 0; background: var(--color-bg); color: var(--color-ink); box-shadow: var(--chat-shadow); overflow-y: auto; overscroll-behavior: contain; }
.sheet[open] { animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: var(--color-overlay-soft); }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 18px 0 6px; background: var(--color-bg); }
.sheet-grip { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--color-line); }
.sheet-head h2 { flex: 1; margin: 0; font-size: var(--fs-xl); font-weight: 900; }
.sheet-x { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--color-surface); color: var(--color-ink); font-size: var(--fs-lg); cursor: pointer; box-shadow: var(--shadow-card); }
.sheet-x:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.sheet-hint { margin: 0 0 14px; color: var(--color-muted); font-size: var(--fs-sm); }
.sheet-foot { margin: 14px 0 0; text-align: center; }
.draws { display: grid; gap: 10px; }
.draw { background: var(--color-surface); border: 1.5px solid var(--color-line); border-radius: 18px; overflow: hidden; }
.draw.tone-grand { border-color: var(--color-gold); }
.draw h3 { margin: 0; }
.draw-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.draw-btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: -3px; border-radius: 18px; }
.draw-date { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 14px; background: var(--color-primary-soft); color: var(--color-navy); line-height: 1; }
.draw.tone-pink .draw-date { background: var(--color-brand-pink-soft); }
.draw.tone-grand .draw-date { background: var(--color-gold); }
.draw-date b { font-size: var(--fs-xl); font-weight: 900; }
.draw-date small { font-size: var(--fs-xs); font-weight: 800; }
.draw-txt { display: grid; flex: 1; min-width: 0; gap: 2px; }
.draw-txt b { font-size: var(--fs-base); font-weight: 900; }
.draw-txt small { color: var(--color-muted); font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.draw-chip { flex: none; padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, var(--color-cta), var(--color-cta-2)); color: var(--color-on-cta); font-size: var(--fs-xs); font-weight: 900; }
.draw-chip.done { background: var(--color-disabled-soft); color: var(--color-muted); }
.draw-caret { flex: none; width: 10px; height: 10px; margin: 0 4px; border-right: 2.5px solid var(--color-muted); border-bottom: 2.5px solid var(--color-muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.draw-btn[aria-expanded="true"] .draw-caret { transform: rotate(-135deg) translateY(-3px); }
.draw.past .draw-date, .draw.past .draw-txt b { opacity: .6; }
.draw-body { padding: 0 12px 14px; }
.draw-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.draw-grid .prize-card { box-shadow: none; }
@media (min-width: 640px) {
  .sheet { max-width: 720px; max-height: 86vh; margin: auto; padding: 0 22px 22px; border-radius: 26px; }
  .draw-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .sheet[open] { animation: none; }
  .prize-card, .prize-open, .draw-caret { transition: none; }
  .prize-card:hover { transform: none; }
}

/* Буцаж ирсэн хэрэглэгч: нэр, утсыг нэг мөрөөр */
.me-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--color-line); border-radius: 14px; background: var(--color-bg); }
.me-card div { display: grid; min-width: 0; }
.me-card b { font-size: var(--fs-base); }
.me-card span { color: var(--color-muted); font-size: var(--fs-sm); }
.me-card .me-actions { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.me-actions .link { padding: 12px 4px; min-height: 44px; }
.opt-sec { margin-top: 20px; }
.opt-sec summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; font-weight: 800; font-size: var(--fs-base); padding: 6px 0; min-height: 44px; align-items: center; }
.opt-sec summary::-webkit-details-marker { display: none; }
.opt-sec summary::after { content: '▾'; color: var(--color-muted); }
.opt-sec[open] summary::after { content: '▴'; }
.opt-sec summary:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-radius: 8px; }

.sched-sec summary { font-size: var(--fs-md); }
.sched-sec .cd-schedule > li { padding: 8px 0; border-top: 1px solid var(--color-line); }
.opt-sec summary > span:first-child { flex: 1 1 auto; min-width: 0; }
.opt-sec summary .small { font-weight: 600; white-space: nowrap; }

/* ---------- AI туслах ---------- */
.ai-fab {
  position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px;
  border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 800; font-size: var(--fs-md);
  background: linear-gradient(135deg, var(--color-cta-2), var(--color-highlight)); color: var(--color-on-cta);
  box-shadow: var(--chat-shadow);
}
.ai-fab:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.ai-fab.on { opacity: 0; pointer-events: none; }
.ai-spark { font-size: var(--fs-lg); }
.ai-panel {
  position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 41;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 22px; box-shadow: var(--chat-shadow);
  animation: aiIn .22s ease-out;
}
.ai-panel[hidden] { display: none; }
@keyframes aiIn { from { transform: translateY(16px); opacity: 0; } }
.ai-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, var(--color-cta), var(--color-highlight)); color: var(--color-on-cta); }
.ai-top div { flex: 1; display: grid; }
.ai-top small { opacity: .85; font-size: var(--fs-xs); }
.ai-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface); font-size: var(--fs-lg); }
.ai-x { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: inherit; font-size: var(--fs-lg); cursor: pointer; }
.ai-x:focus-visible { outline: 2px solid var(--color-on-cta); }
.ai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--color-bg); }
.ai-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: var(--fs-md); white-space: pre-wrap; }
.ai-msg.bot { align-self: flex-start; background: var(--color-surface); border: 1px solid var(--color-line); border-bottom-left-radius: 6px; }
.ai-msg.me { align-self: flex-end; background: var(--color-primary); color: var(--color-on-primary); border-bottom-right-radius: 6px; }
.ai-msg.typing { display: flex; gap: 5px; }
.ai-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--color-muted); animation: aiDot 1s infinite; }
.ai-msg.typing span:nth-child(2) { animation-delay: .15s; }
.ai-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 50% { opacity: .3; transform: translateY(-3px); } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: var(--color-bg); }
.ai-chips[hidden] { display: none; }
.ai-chips button { min-height: 36px; padding: 6px 12px; border: 1.5px solid var(--color-primary-dash); border-radius: 999px; background: var(--color-surface); color: var(--color-primary); font: inherit; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; }
.ai-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--color-line); background: var(--color-surface); }
.ai-form input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--color-line); border-radius: 999px; font: inherit; font-size: var(--fs-base); }
.ai-form input:focus-visible { outline: none; border-color: var(--color-primary); }
.ai-form button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--color-primary); color: var(--color-on-primary); font-size: var(--fs-lg); cursor: pointer; }
.ai-chips button:focus-visible, .ai-form button:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ai-panel, .ai-msg.typing span { animation: none; } }

/* ---------- Ачааллын дэлгэц (Hi Mommy лого үсэрнэ) ---------- */
.loader { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--color-bg); transition: opacity .35s, visibility .35s; }
.loader.out { opacity: 0; visibility: hidden; }
.loader-hop { animation: hop .9s cubic-bezier(.3, 0, .4, 1) infinite; }
.loader-badge { position: relative; display: block; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--color-primary-soft); box-shadow: var(--shadow-card); }
.loader-badge img { position: absolute; width: 181px; height: 181px; left: -52px; top: -17px; }
.loader-shadow { width: 64px; height: 10px; border-radius: 50%; background: var(--color-sketch-soft); animation: squash .9s cubic-bezier(.3, 0, .4, 1) infinite; }
.loader p { margin: 8px 0 0; font-weight: 800; color: var(--color-ink); font-size: var(--fs-md); }
.loader-dots i { font-style: normal; animation: blink 1.2s infinite; }
.loader-dots i:nth-child(2) { animation-delay: .2s; }
.loader-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes hop { 0%, 100% { transform: translateY(0) scale(1.04, .96); } 45% { transform: translateY(-34px) rotate(-6deg) scale(.98, 1.03); } 55% { transform: translateY(-34px) rotate(6deg); } }
@keyframes squash { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.55); opacity: .45; } }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loader-hop, .loader-shadow, .loader-dots i { animation: none; } }

/* ---------- Баримтын зураг авах товч ---------- */
.shoot { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 16px; border-radius: 18px; border: 0; font: inherit; text-align: left; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
.shoot:active { transform: scale(.98); }
.shoot:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.shoot-main { min-height: 76px; background: linear-gradient(135deg, var(--color-cta), var(--color-cta-2)); color: var(--color-on-cta); box-shadow: var(--shadow-cta); }
.shoot-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, var(--color-shine) 50%, transparent 70%); transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
.shoot-alt { background: var(--color-surface); color: var(--color-ink); border: 1.5px solid var(--color-line); }
.shoot-ico { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; }
.shoot-main .shoot-ico { background: var(--color-on-cta-soft); }
.shoot-alt .shoot-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--color-primary-soft); color: var(--color-primary); }
.shoot-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.shoot-alt .shoot-ico svg { width: 22px; height: 22px; }
.shoot-txt { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.shoot-txt b { font-size: var(--fs-lg); font-weight: 900; }
.shoot-alt .shoot-txt b { font-size: var(--fs-base); font-weight: 800; }
.shoot-txt small { font-size: var(--fs-sm); opacity: .85; font-weight: 600; }
.shoot-alt .shoot-txt small { color: var(--color-muted); opacity: 1; }
.shoot-arr { flex: none; font-size: var(--fs-2xl); font-weight: 900; line-height: 1; opacity: .9; }
.shoot[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
/* Ажилтантай холбогдох (утсаар залгах) */
.contact-card { display: flex; align-items: center; gap: 14px; min-height: 64px; margin-top: 18px; padding: 12px 16px; border-radius: 18px; background: var(--color-surface); border: 1.5px solid var(--color-line); color: var(--color-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
.contact-card:active { transform: scale(.98); }
.contact-card:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.contact-ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--color-highlight); color: var(--color-on-highlight); }
.contact-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.contact-txt { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.contact-txt b { font-size: var(--fs-base); font-weight: 800; }
.contact-txt small { font-size: var(--fs-sm); color: var(--color-muted); font-weight: 600; }
.shoot[aria-disabled="true"]::after { animation: none; }
label.shoot[aria-disabled="true"] { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .shoot-main::after { animation: none; } }

/* Нарийн утас (≤380px): толгойн товч логотой давхцахгүй */
@media (max-width: 380px) {
  .brand .logo { font-size: var(--fs-lg); gap: 8px; }
  .brand .logo-badge { width: 38px; height: 38px; }
  .my-btn { padding: 8px 10px; font-size: var(--fs-sm); }
  .foot p { line-height: 1.9; }
}
