/* ================================================================
   Amra's Workspace — ягаан, зөөлөн, ретро цонхтой загвар
   ================================================================ */
:root {
  --bg: #fff6fb;
  --bg-dots: #ffe3f0;
  --surface: #ffffff;
  --surface-2: #fff0f7;
  --ink: #4b3550;
  --ink-soft: #7d6683;
  --muted: #a28fa7;
  --line: #f1c9de;
  --line-strong: #e7a9c8;
  --pink: #ec6fa8;
  --pink-deep: #c94785;
  --pink-soft: #ffd3e7;
  --lav: #a98be6;
  --lav-soft: #ece4ff;
  --mint: #bfead8;
  --mint-ink: #2f7a5f;
  --sky: #d9ecff;
  --title-grad: linear-gradient(90deg, #ffb3d6 0%, #d9c2ff 100%);
  --shadow: 3px 3px 0 #f6cfe2;
  --flag-yellow: #fff4b8; --flag-yellow-line: #e2bd18; --flag-yellow-ink: #6f5a00;
  --flag-red: #ffe0e0; --flag-red-line: #e05a6a; --flag-red-ink: #8b1e2c;
  --ok: #d9f5e8; --ok-line: #57b98d;
  --radius: 14px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Comfortaa', 'Nunito', system-ui, sans-serif;
  --font-pixel: 'Pixelify Sans', 'Comfortaa', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1f1724; --bg-dots: #2b2032; --surface: #2a2030; --surface-2: #33273b; --ink: #f6e7f1; --ink-soft: #d6bfd0;
    --muted: #a891a5; --line: #4d3a52; --line-strong: #6b4f6f; --pink: #ff8cc0; --pink-deep: #ffa9cf; --pink-soft: #4a2b3d;
    --lav: #c2a8ff; --lav-soft: #352a4a; --mint: #234b3d; --mint-ink: #a5ecc9; --sky: #23344a;
    --title-grad: linear-gradient(90deg, #6d3657 0%, #4b3c73 100%); --shadow: 3px 3px 0 #140e18;
    --flag-yellow: #4a3f12; --flag-yellow-line: #d3b134; --flag-yellow-ink: #ffe9a0;
    --flag-red: #4d1f27; --flag-red-line: #ff7d8d; --flag-red-ink: #ffd0d6; --ok: #1f3d31; --ok-line: #5fcf9e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1f1724; --bg-dots: #2b2032; --surface: #2a2030; --surface-2: #33273b; --ink: #f6e7f1; --ink-soft: #d6bfd0;
  --muted: #a891a5; --line: #4d3a52; --line-strong: #6b4f6f; --pink: #ff8cc0; --pink-deep: #ffa9cf; --pink-soft: #4a2b3d;
  --lav: #c2a8ff; --lav-soft: #352a4a; --mint: #234b3d; --mint-ink: #a5ecc9; --sky: #23344a;
  --title-grad: linear-gradient(90deg, #6d3657 0%, #4b3c73 100%); --shadow: 3px 3px 0 #140e18;
  --flag-yellow: #4a3f12; --flag-yellow-line: #d3b134; --flag-yellow-ink: #ffe9a0;
  --flag-red: #4d1f27; --flag-red-line: #ff7d8d; --flag-red-ink: #ffd0d6; --ok: #1f3d31; --ok-line: #5fcf9e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  background-image: radial-gradient(var(--bg-dots) 1.2px, transparent 1.3px); background-size: 18px 18px;
  line-height: 1.55; font-size: 16px; min-height: 100vh;
}
a { color: var(--pink-deep); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Ретро цонх ---------- */
.win { background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.win-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; background: var(--title-grad);
  border-bottom: 2px solid var(--line-strong); font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--ink); }
.win-title::before { content: '♥'; color: var(--pink-deep); margin-right: 6px; }
.win-title > span { flex: 1; }
.win-x { border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.win-body { padding: 14px 16px; }
.win + .win { margin-top: 16px; }

/* ---------- Товч ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 12px;
  border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 700 1rem var(--font); cursor: pointer;
  box-shadow: 2px 2px 0 var(--line); transition: transform .06s, box-shadow .06s; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translate(2px, 2px); box-shadow: none; }
.btn.primary { background: var(--pink); border-color: var(--pink-deep); color: #fff; }
.btn.primary:hover { background: var(--pink-deep); }
.btn.lav { background: var(--lav-soft); border-color: var(--lav); }
.btn.ok { background: var(--ok); border-color: var(--ok-line); }
.btn.danger { background: var(--flag-red); border-color: var(--flag-red-line); color: var(--flag-red-ink); }
.btn.big { min-height: 58px; font-size: 1.1rem; padding: 12px 24px; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--lav); outline: none; }
label { font-weight: 700; font-size: .92rem; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.field { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }

/* ---------- Үндсэн бүтэц ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 2px solid var(--line); }
.brand { font-family: var(--font-pixel); font-size: 1.35rem; color: var(--pink-deep); text-decoration: none; white-space: nowrap; letter-spacing: .5px; }
.brand small { font-family: var(--font); font-size: .7rem; color: var(--muted); display: block; letter-spacing: 0; }
.topbar .spacer { flex: 1; }
.topbar .today { font-size: .9rem; color: var(--ink-soft); }
.icon-btn { border: 2px solid var(--line); background: var(--surface); border-radius: 10px; min-width: 44px; height: 44px; cursor: pointer; font-size: 1.1rem; color: var(--ink); }
.layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; max-width: 1400px; margin: 0 auto; padding: 18px 16px 120px; }
.sidenav .win-body { padding: 8px; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.sidenav a:hover { background: var(--surface-2); }
.sidenav a.active { background: var(--pink-soft); color: var(--pink-deep); box-shadow: inset 3px 0 0 var(--pink); }
.sidenav a .ico { width: 24px; text-align: center; }
.sidenav .badge { margin-left: auto; }
.badge { display: inline-block; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: var(--pink); color: #fff; font-size: .78rem; text-align: center; }
main { min-width: 0; }
.bottomnav { display: none; }

.page-head { margin-bottom: 16px; }
.crumbs { font-size: .88rem; color: var(--ink-soft); margin-bottom: 4px; }
.crumbs .here { color: var(--muted); }
.crumbs a { text-decoration: none; }
.hint { color: var(--ink-soft); margin: 0; }
.empty { text-align: center; padding: 30px 16px; color: var(--ink-soft); border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-2); }
.empty-icon { font-size: 2rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.stat { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow); }
.stat .n { font-family: var(--font-pixel); font-size: 2rem; color: var(--pink-deep); }
.stat .l { color: var(--ink-soft); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--lav-soft); color: var(--ink); font-size: .8rem; margin: 2px; border: 1px solid var(--line); }
.pill-ok { background: var(--ok); border-color: var(--ok-line); }
hr { border: 0; border-top: 2px dashed var(--line); margin: 16px 0; }

/* ---------- Нэвтрэх / нүүр ---------- */
.hero-title { font-family: var(--font-pixel); font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.05; text-align: center; margin: 10px 0 4px;
  color: var(--pink); text-shadow: 3px 3px 0 var(--lav-soft), 5px 5px 0 var(--line-strong); letter-spacing: 1px; }
.hero-sub { text-align: center; color: var(--ink-soft); margin-bottom: 18px; }
.quote { font-family: var(--font-display); font-size: 1.12rem; text-align: center; padding: 18px; border-radius: var(--radius); background: var(--lav-soft); border: 2px dashed var(--lav); }
.quote::before { content: '✿ '; color: var(--pink); }
.login-wrap { max-width: 980px; margin: 0 auto; padding: 18px 16px 60px; }
.login-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }

/* Календарь */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head b { font-family: var(--font-display); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal .dow { font-size: .78rem; color: var(--muted); font-weight: 700; }
.cal .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; font-weight: 700; font-size: .95rem; position: relative; }
.cal .d.out { color: var(--muted); opacity: .45; }
.cal .d.today { background: var(--pink); color: #fff; box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--pink-soft); }
.cal .d.has::after { content: ''; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--lav); }
.cal-today-text { text-align: center; margin-top: 8px; color: var(--ink-soft); font-weight: 700; }

/* ---------- Мэдэгдэл, модал ---------- */
#toasts { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line-strong); box-shadow: var(--shadow); font-weight: 700; transition: opacity .3s, transform .3s; }
.toast-ok { border-color: var(--ok-line); background: var(--ok); }
.toast-err { border-color: var(--flag-red-line); background: var(--flag-red); color: var(--flag-red-ink); }
.toast-warn { border-color: var(--flag-yellow-line); background: var(--flag-yellow); color: var(--flag-yellow-ink); }
.toast.out { opacity: 0; transform: translateY(10px); }
.modal-wrap { position: fixed; inset: 0; background: rgba(60, 30, 60, .35); z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal-wrap.calm { background: rgba(80, 60, 120, .45); backdrop-filter: blur(3px); }
.modal { width: min(560px, 100%); max-height: 92vh; display: flex; flex-direction: column; }
.modal.wide { width: min(1000px, 100%); }
.modal .win-body { overflow: auto; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 16px 16px; flex-wrap: wrap; }

/* ---------- Туслаач товч ---------- */
.help-fab { position: fixed; right: 16px; bottom: 18px; z-index: 40; border-radius: 999px; padding: 12px 20px; min-height: 52px; border: 2px solid var(--lav);
  background: var(--lav-soft); color: var(--ink); font: 800 1rem var(--font); cursor: pointer; box-shadow: 0 6px 18px rgba(140, 100, 200, .25); }
.help-fab:hover { background: var(--surface); }

/* ---------- Шивэх ---------- */
.dropzone { border: 3px dashed var(--line-strong); border-radius: 18px; padding: 26px 16px; text-align: center; background: var(--surface-2); }
.dropzone.drag { background: var(--pink-soft); border-color: var(--pink); }
.order-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.order-guide div { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; font-weight: 700; font-size: .9rem; }
.order-guide b { display: block; font-family: var(--font-pixel); font-size: 1.4rem; color: var(--pink); }
.groups { display: flex; flex-direction: column; gap: 10px; }
.group { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); }
.group.bad { border-color: var(--flag-red-line); background: var(--flag-red); }
.group.done { border-color: var(--ok-line); }
.group .gname { font-weight: 800; }
.group .slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot { position: relative; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 3/4; cursor: grab; }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot .cap { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--surface) 85%, transparent); font-size: .75rem; font-weight: 800; padding: 2px 6px; text-align: center; }
.slot.selected { outline: 4px solid var(--lav); }
.slot.dragover { outline: 4px dashed var(--pink); }
.problems { color: var(--flag-red-ink); font-weight: 700; font-size: .88rem; grid-column: 1 / -1; }
.progress { height: 18px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--line); overflow: hidden; }
.progress > div { height: 100%; background: repeating-linear-gradient(45deg, var(--pink) 0 10px, #f59cc6 10px 20px); transition: width .4s; }
.progress-text { font-family: var(--font-pixel); font-size: 1.3rem; color: var(--pink-deep); }
.banner { padding: 12px 14px; border-radius: 12px; border: 2px solid var(--flag-yellow-line); background: var(--flag-yellow); color: var(--flag-yellow-ink); font-weight: 700; margin-bottom: 14px; }
.banner.info { border-color: var(--lav); background: var(--lav-soft); color: var(--ink); }
.banner.err { border-color: var(--flag-red-line); background: var(--flag-red); color: var(--flag-red-ink); }

/* ---------- Шалгах ---------- */
.review { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.viewer { position: sticky; top: 72px; }
.viewer-tabs { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.viewer-tabs button.active { background: var(--pink-soft); border-color: var(--pink); }
.zoom { position: relative; overflow: hidden; height: min(72vh, 820px); background: #2b2230; border-radius: 12px; touch-action: none; cursor: grab; }
.zoom img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; max-width: none; }
.zoom-tools { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.fieldrow { padding: 8px 10px; border-radius: 10px; border: 2px solid transparent; margin-bottom: 6px; }
.fieldrow.yellow { background: var(--flag-yellow); border-color: var(--flag-yellow-line); }
.fieldrow.red { background: var(--flag-red); border-color: var(--flag-red-line); }
.fieldrow label { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.fieldrow .why { font-size: .82rem; font-weight: 700; margin-top: 4px; }
.fieldrow.yellow .why { color: var(--flag-yellow-ink); } .fieldrow.red .why { color: var(--flag-red-ink); }
.prov { font-size: .75rem; font-weight: 700; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.prov.src { background: var(--sky); } .prov.lookup { background: var(--mint); color: var(--mint-ink); } .prov.ai { background: var(--lav-soft); }
.transcript { white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; background: var(--surface-2); padding: 10px; border-radius: 10px; border: 1px solid var(--line); }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: .85rem; font-weight: 700; }
.legend span { padding: 2px 10px; border-radius: 8px; border: 2px solid; }
.legend .y { background: var(--flag-yellow); border-color: var(--flag-yellow-line); } .legend .r { background: var(--flag-red); border-color: var(--flag-red-line); }
.review-actions { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0; border-top: 2px dashed var(--line); display: flex; gap: 10px; flex-wrap: wrap; z-index: 5; }
.list-item { display: flex; gap: 10px; align-items: center; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; margin-bottom: 8px; }
.list-item:hover { border-color: var(--pink); }
.list-item .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot.red { background: var(--flag-red-line); } .dot.yellow { background: var(--flag-yellow-line); } .dot.ok { background: var(--ok-line); }

/* ---------- Хүснэгт ---------- */
.table-wrap { overflow: auto; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); max-height: 70vh; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: var(--surface-2); font-family: var(--font-display); z-index: 1; white-space: nowrap; }
tr:hover td { background: var(--surface-2); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }

/* ---------- Сэтгэл амар ---------- */
.calm-page { --calm: #f2ecff; }
.breath-wrap { display: grid; place-items: center; padding: 10px 0 20px; }
.breath { width: min(70vw, 280px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-align: center;
  background: radial-gradient(circle at 35% 35%, #fff 0%, var(--pink-soft) 45%, var(--lav-soft) 100%); border: 3px solid var(--lav);
  transform: scale(.6); transition-property: transform; transition-timing-function: ease-in-out; box-shadow: 0 0 0 14px color-mix(in srgb, var(--lav-soft) 50%, transparent); }
.breath .phase { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.breath .count { font-family: var(--font-pixel); font-size: 2.2rem; color: var(--pink-deep); }
.ground-step { text-align: center; }
.ground-step .big { font-family: var(--font-pixel); font-size: 3rem; color: var(--lav); }
.hotline { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); margin-bottom: 8px; }
.hotline .num { font-family: var(--font-pixel); font-size: 1.6rem; color: var(--pink-deep); min-width: 130px; }
.hotline a.btn { margin-left: auto; }
.mood-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.mood-pick button { flex: 1 1 80px; min-height: 72px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font: 700 .85rem var(--font); color: var(--ink); }
.mood-pick button .f { font-size: 1.6rem; display: block; }
.mood-pick button.on { border-color: var(--lav); background: var(--lav-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border-radius: 999px; border: 2px solid var(--line); background: var(--surface); padding: 6px 12px; cursor: pointer; font: 700 .85rem var(--font); color: var(--ink); min-height: 38px; }
.chips button.on { background: var(--pink-soft); border-color: var(--pink); }

/* ---------- Ургамлын мэдээлэл ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-2); }
.gallery figcaption { font-size: .75rem; padding: 6px 8px; color: var(--ink-soft); }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 4px 12px; font-size: .92rem; }
.kv dt { font-weight: 800; color: var(--ink-soft); } .kv dd { margin: 0; }
#map { height: 70vh; border-radius: 12px; border: 2px solid var(--line); }

/* ---------- Хэвлэх шошго ---------- */
.print-labels { display: none; }
@media print {
  body { background: #fff; }
  body > *:not(.print-labels) { display: none !important; }
  .print-labels { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 6mm; padding: 0; color: #000; font-family: 'Times New Roman', serif; }
  .plabel { border: 1px solid #000; padding: 4mm; font-size: 9.5pt; line-height: 1.3; break-inside: avoid; height: 70mm; overflow: hidden; }
  .plabel h4 { margin: 0 0 2mm; font-size: 10pt; text-align: center; text-transform: uppercase; }
  .plabel .sp { font-style: italic; font-weight: bold; font-size: 11pt; }
  .plabel .bc { text-align: right; font-family: monospace; }
}

/* ---------- Утас ---------- */
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; padding: 12px 12px 140px; }
  .sidenav { display: none; }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--surface);
    border-top: 2px solid var(--line-strong); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; font: 800 .72rem var(--font); color: var(--ink-soft);
    text-decoration: none; border: 0; background: none; cursor: pointer; border-radius: 10px; min-height: 52px; justify-content: center; }
  .bottomnav .ico { font-size: 1.25rem; }
  .bottomnav a.active { color: var(--pink-deep); background: var(--pink-soft); }
  .help-fab { bottom: calc(72px + env(safe-area-inset-bottom)); right: 12px; padding: 10px 16px; min-height: 46px; }
  .topbar .today { display: none; }
  .review { grid-template-columns: 1fr; }
  .viewer { position: static; }
  .zoom { height: 52vh; }
  .login-grid { grid-template-columns: 1fr; }
  .group { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  #toasts { bottom: 140px; }
}
.drawer { position: fixed; inset: 0; z-index: 80; background: rgba(60, 30, 60, .35); display: flex; justify-content: flex-end; }
.drawer .panel { width: min(320px, 86vw); height: 100%; background: var(--surface); border-left: 2px solid var(--line-strong); padding: 12px; overflow: auto; }
.drawer a { display: flex; gap: 10px; padding: 14px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 800; }
.drawer a.active { background: var(--pink-soft); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
