/* Shalini · private Jyotiṣa study */
:root {
  --bg: #0e0f1d;
  --bg2: #121427;
  --surface: #171a30;
  --surface2: #1d2140;
  --line: rgba(236, 226, 206, 0.09);
  --line2: rgba(236, 226, 206, 0.16);
  --text: #ece4d4;
  --muted: #a7a092;
  --faint: #767185;
  --gold: #d6ab5f;
  --gold2: #f0cf8e;
  --rose: #d3958d;
  --teal: #84b9ad;
  --violet: #a48ad8;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --glow: radial-gradient(1200px 600px at 80% -10%, rgba(214, 171, 95, 0.08), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(164, 138, 216, 0.07), transparent 60%);
  --serif: "EB Garamond", Georgia, serif;
  --display: "Cormorant", "EB Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 16px;
  --side: 272px;
  --c-Sun: #e8a64a; --c-Moon: #c7d4ec; --c-Mars: #dd6a55; --c-Mercury: #72c497; --c-Jupiter: #e8c95e; --c-Venus: #e79ac4; --c-Saturn: #8f97d6; --c-Rahu: #a689df; --c-Ketu: #c09170;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f5efe3; --bg2: #efe7d8; --surface: #fffaf0; --surface2: #f8f0e1;
  --line: rgba(60, 44, 30, 0.10); --line2: rgba(60, 44, 30, 0.18);
  --text: #2b2433; --muted: #6c6372; --faint: #9a90a0;
  --gold: #9c6c1e; --gold2: #b8832d; --rose: #a85b52; --teal: #3f7f72; --violet: #6b51a6;
  --shadow: 0 18px 50px -24px rgba(70, 50, 20, 0.35);
  --glow: radial-gradient(1200px 600px at 80% -10%, rgba(214, 171, 95, 0.18), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(164, 138, 216, 0.12), transparent 60%);
  --c-Sun: #c47b16; --c-Moon: #6f7ea0; --c-Mars: #b8432f; --c-Mercury: #2f8c5b; --c-Jupiter: #a98a12; --c-Venus: #b7558a; --c-Saturn: #4f58a3; --c-Rahu: #6c4cb0; --c-Ketu: #8d5f3e;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]), :root[data-theme="auto"] {
    --bg: #f5efe3; --bg2: #efe7d8; --surface: #fffaf0; --surface2: #f8f0e1;
    --line: rgba(60, 44, 30, 0.10); --line2: rgba(60, 44, 30, 0.18);
    --text: #2b2433; --muted: #6c6372; --faint: #9a90a0;
    --gold: #9c6c1e; --gold2: #b8832d; --rose: #a85b52; --teal: #3f7f72; --violet: #6b51a6;
    --shadow: 0 18px 50px -24px rgba(70, 50, 20, 0.35);
    --glow: radial-gradient(1200px 600px at 80% -10%, rgba(214, 171, 95, 0.18), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(164, 138, 216, 0.12), transparent 60%);
    --c-Sun: #c47b16; --c-Moon: #6f7ea0; --c-Mars: #b8432f; --c-Mercury: #2f8c5b; --c-Jupiter: #a98a12; --c-Venus: #b7558a; --c-Saturn: #4f58a3; --c-Rahu: #6c4cb0; --c-Ketu: #8d5f3e;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); background-image: var(--glow); background-attachment: fixed; color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(214, 171, 95, 0.35); }
.boot { height: 100vh; display: grid; place-items: center; }
.boot-orb { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--gold); position: relative; animation: breathe 2.4s ease-in-out infinite; }
.boot-orb::after { content: ""; position: absolute; width: 46px; height: 46px; border-radius: 50%; background: var(--bg); top: -6px; left: 14px; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: 0.7; } }

/* ---------- lock ---------- */
.lock { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.lock-sky { position: absolute; inset: 0; pointer-events: none; }
.lock-card { position: relative; width: min(440px, 100%); text-align: center; }
.lock-mark { width: 84px; height: 84px; margin: 0 auto 26px; }
.lock h1 { font-family: var(--display); font-weight: 500; font-size: 54px; letter-spacing: 0.01em; margin: 0; line-height: 1; }
.lock .sub { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 19px; margin: 12px 0 34px; }
.lock form { display: grid; gap: 12px; }
.field { width: 100%; background: var(--surface); border: 1px solid var(--line2); border-radius: 12px; padding: 14px 16px; color: var(--text); font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(214, 171, 95, 0.15); }
textarea.field { resize: vertical; line-height: 1.6; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.check { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--surface); border-radius: 11px; padding: 10px 16px; cursor: pointer; font-weight: 600; font-size: 14px; transition: transform .15s, background .2s, border-color .2s; text-decoration: none; }
.btn:hover { border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1b1408; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: default; }
.err { color: var(--rose); font-size: 14px; min-height: 20px; }
.lock .fine { margin-top: 30px; color: var(--faint); font-size: 12.5px; letter-spacing: .02em; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 82%, transparent); backdrop-filter: blur(14px); padding: 22px 16px 28px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 18px; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand b { display: block; font-family: var(--display); font-size: 26px; font-weight: 500; line-height: 1; letter-spacing: .01em; }
.brand span { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: 5px; }
.search-btn { display: flex; align-items: center; gap: 10px; margin: 0 4px 12px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 13.5px; text-align: left; }
.search-btn kbd { margin-left: auto; font-family: var(--sans); font-size: 11px; border: 1px solid var(--line2); border-radius: 5px; padding: 1px 6px; }
.nav-group { margin-top: 10px; }
.nav-head { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; padding: 6px 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); cursor: pointer; }
.nav-head svg { transition: transform .2s; opacity: .7; }
.nav-group.closed .nav-head svg { transform: rotate(-90deg); }
.nav-group.closed .nav-items { display: none; }
.nav-items { display: grid; gap: 1px; margin-top: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; position: relative; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.on { background: var(--surface2); color: var(--text); }
.nav a.on::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold); }
.nav a .ico { width: 18px; height: 18px; flex: none; opacity: .85; display: grid; place-items: center; font-size: 15px; }
.nav a .g { font-family: var(--serif); font-size: 17px; line-height: 1; }
.nav a .badge { margin-left: auto; font-size: 11px; color: var(--gold); }
.side-foot { margin-top: auto; padding: 18px 10px 0; display: flex; gap: 8px; align-items: center; color: var(--faint); font-size: 12px; }
.side-foot button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; }
.side-foot button:hover { color: var(--text); }
.main { min-width: 0; }
.page { max-width: 1080px; margin: 0 auto; padding: 46px 48px 120px; animation: rise .35s ease both; }
.page.wide { max-width: 1280px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.eyebrow { font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
h1.title { font-family: var(--display); font-weight: 500; font-size: clamp(38px, 5vw, 58px); line-height: 1.02; margin: 10px 0 12px; letter-spacing: .005em; }
.lede { font-family: var(--serif); font-size: 20px; color: var(--muted); max-width: 720px; margin: 0 0 30px; line-height: 1.5; }
h2.sec { font-family: var(--display); font-weight: 500; font-size: 30px; margin: 54px 0 16px; letter-spacing: .005em; }
h3.sub { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 26px 0 8px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.serif { font-family: var(--serif); }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow); position: relative; }
.card.flat { box-shadow: none; }
.card.link { text-decoration: none; display: block; transition: transform .2s, border-color .2s; }
.card.link:hover { transform: translateY(-2px); border-color: var(--line2); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line2); font-size: 12px; color: var(--muted); white-space: nowrap; }
.pill.gold { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--faint); } .kv dd { margin: 0; }
.hr { height: 1px; background: var(--line); margin: 22px 0; border: 0; }

/* hero */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; align-items: stretch; }
.hero-now { padding: 30px 32px; overflow: hidden; }
.hero-now .greet { font-family: var(--display); font-size: 40px; line-height: 1.05; margin: 6px 0 4px; font-weight: 500; }
.hero-now .date { color: var(--muted); font-family: var(--serif); font-size: 18px; font-style: italic; }
.dasha-stack { display: grid; gap: 14px; margin-top: 26px; }
.dasha-line { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; }
.dasha-line .lvl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.dasha-line .nm { font-family: var(--display); font-size: 24px; line-height: 1; display: flex; align-items: center; gap: 10px; }
.bar { height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 9px; }
.dasha-line .dates { font-size: 12px; color: var(--faint); margin-top: 5px; display: flex; justify-content: space-between; }
.quote { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.45; color: var(--text); border-left: 2px solid var(--gold); padding: 2px 0 2px 18px; margin: 18px 0; }

/* timenav */
.timenav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 6px; }
.timenav button { background: none; border: 0; padding: 7px 10px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.timenav button:hover { background: var(--surface2); color: var(--text); }
.timenav input[type=date] { background: var(--bg2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 6px 9px; font: inherit; font-size: 13px; }
.timenav .now { color: var(--gold); }

/* sky list */
.sky { display: grid; gap: 2px; }
.sky-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 12px; align-items: center; padding: 9px 6px; border-radius: 10px; text-decoration: none; }
.sky-row:hover { background: var(--surface2); }
.glyph { font-family: var(--serif); font-size: 21px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.sky-row .nm b { font-weight: 600; } .sky-row .nm span { color: var(--faint); font-size: 12.5px; display: block; }
.bh { font-family: var(--display); font-size: 20px; min-width: 50px; text-align: right; }
.rx { font-style: normal; font-size: 11px; color: var(--rose); border: 1px solid color-mix(in srgb, var(--rose) 50%, transparent); border-radius: 6px; padding: 0 5px; margin-left: 6px; }

/* event list */
.events { display: grid; gap: 0; }
.ev { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.ev:first-child { border-top: 0; }
.ev .when { font-size: 12.5px; color: var(--faint); padding-top: 2px; }
.ev .when b { display: block; color: var(--text); font-size: 15px; font-weight: 600; }
.ev .what { font-size: 14.5px; }
.ev .what small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
a.ev:hover .what { color: var(--gold2); }

/* chart */
.chart-wrap { display: grid; grid-template-columns: minmax(300px, 460px) 1fr; gap: 28px; align-items: start; }
.nchart { width: 100%; height: auto; display: block; }
.nchart .cell { fill: transparent; stroke: var(--line2); stroke-width: 1; transition: fill .2s; }
.nchart .cell.hl { fill: color-mix(in srgb, var(--gold) 9%, transparent); }
.nchart .frame { fill: color-mix(in srgb, var(--surface) 80%, transparent); stroke: var(--line2); }
.nchart text { font-family: var(--sans); }
.nchart .rn { font-size: 10px; fill: var(--faint); }
.nchart .gl { font-size: 13px; font-weight: 600; }
.nchart .tr { font-size: 11px; font-style: italic; opacity: .85; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--surface2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line2); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--surface2); }
.state { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 6px; margin: 1px 3px 1px 0; border: 1px solid var(--line2); color: var(--muted); }
.state.good { color: var(--teal); border-color: color-mix(in srgb, var(--teal) 45%, transparent); }
.state.press { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 45%, transparent); }
.tbl-scroll { overflow-x: auto; }

/* graha cards */
.gcard { text-decoration: none; display: grid; gap: 8px; padding: 20px; }
.gcard .glyph { width: 44px; height: 44px; font-size: 26px; }
.gcard .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.gcard h3 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 500; }
.gcard p { margin: 0; color: var(--muted); font-family: var(--serif); font-size: 16.5px; line-height: 1.45; }
.essence { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.essence .big { font-family: var(--serif); font-size: 19px; line-height: 1.6; }
.essence h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.essence p { margin: 0 0 14px; font-family: var(--serif); font-size: 17px; line-height: 1.55; }

/* reader */
.reader { display: grid; grid-template-columns: 1fr 230px; gap: 46px; }
.prose { font-family: var(--serif); font-size: 19.5px; line-height: 1.7; max-width: 690px; }
.prose p { margin: 0 0 1.05em; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: 36px; line-height: 1.1; margin: 1.8em 0 .5em; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 25px; line-height: 1.2; margin: 1.9em 0 .55em; scroll-margin-top: 30px; }
.prose blockquote, .prose .pq { font-style: italic; font-size: 22px; line-height: 1.45; margin: 1.3em 0; padding-left: 20px; border-left: 2px solid var(--gold); color: var(--text); }
.prose > p:first-of-type::first-letter { font-family: var(--display); float: left; font-size: 3.6em; line-height: .85; padding: 6px 10px 0 0; color: var(--gold); }
.prose em { color: var(--text); }
.toc { position: sticky; top: 30px; align-self: start; max-height: calc(100vh - 60px); overflow-y: auto; font-size: 13px; scrollbar-width: thin; }
.toc b { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; font-weight: 600; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--line2); color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover, .toc a.on { color: var(--text); border-left-color: var(--gold); }
.progress { position: fixed; top: 0; left: var(--side); right: 0; height: 2px; z-index: 30; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--rose)); width: 0; }

/* text block */
.textblock { font-family: var(--serif); font-size: 18.5px; line-height: 1.68; }
.textblock p { margin: 0 0 .9em; }
.practice { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); font-size: 14.5px; }
.practice .ico { color: var(--gold); font-size: 16px; line-height: 1.4; }

/* timeline (daśā) */
.tl { position: relative; padding: 8px 0 4px; }
.tl-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 6px; }
.tl-bands { display: flex; height: 54px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.tl-band { position: relative; border-right: 1px solid color-mix(in srgb, var(--bg) 60%, transparent); cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.4); transition: filter .2s; min-width: 0; overflow: hidden; white-space: nowrap; }
.tl-band:hover, .tl-band.on { filter: brightness(1.15) saturate(1.1); }
.tl-band.on { box-shadow: inset 0 0 0 2px var(--text); }
.tl-now { position: absolute; top: 0; bottom: 18px; width: 2px; background: var(--text); border-radius: 2px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bg) 60%, transparent); pointer-events: none; }
.tl-now::after { content: "now"; position: absolute; top: -18px; left: -12px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ad-list { display: grid; gap: 10px; }
.ad { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.ad > button { width: 100%; display: grid; grid-template-columns: 38px 1fr auto 22px; gap: 14px; align-items: center; padding: 14px 18px; background: none; border: 0; cursor: pointer; text-align: left; }
.ad > button:hover { background: var(--surface2); }
.ad .t1 { font-family: var(--display); font-size: 21px; line-height: 1.1; }
.ad .t2 { font-size: 12.5px; color: var(--faint); }
.ad .body { padding: 2px 22px 20px 70px; }
.ad.cur { border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.ad.cur .t1::after { content: "  now"; font-family: var(--sans); font-size: 11px; color: var(--gold); letter-spacing: .1em; text-transform: uppercase; }
.chev { transition: transform .2s; color: var(--faint); }
.ad.open .chev { transform: rotate(180deg); }

/* atlas (gantt) */
.atlas { overflow-x: auto; }
.atlas svg { display: block; min-width: 820px; width: 100%; height: auto; }
.atlas .lab { font-size: 12px; fill: var(--muted); font-family: var(--sans); font-weight: 600; }
.atlas .yr { font-size: 10.5px; fill: var(--faint); font-family: var(--sans); }
.atlas .segm { cursor: pointer; transition: opacity .15s; }
.atlas .segm:hover { opacity: .8; }
.atlas .segm text { font-size: 10.5px; font-weight: 700; fill: #fff; pointer-events: none; font-family: var(--sans); }
.atlas .grid-l { stroke: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* years */
.years { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.years a { flex: none; text-decoration: none; padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--muted); }
.years a:hover { color: var(--text); border-color: var(--line2); }
.years a.on { color: #1b1408; background: linear-gradient(180deg, var(--gold2), var(--gold)); border-color: transparent; }
.years a.cur:not(.on) { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.seasons { display: grid; gap: 0; position: relative; margin-left: 6px; }
.season { position: relative; padding: 0 0 18px 26px; border-left: 1px solid var(--line2); }
.season::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.season b { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 3px; }
.season span { font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.year-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }

/* eclipses */
.ecl { display: grid; grid-template-columns: 64px 1fr; gap: 18px; }
.ecl-disc { width: 64px; height: 64px; border-radius: 50%; position: relative; overflow: hidden; }
.ecl-disc.solar { background: radial-gradient(circle at 50% 50%, #f6c76a 0 46%, #e48f3a 47% 50%, transparent 52%); }
.ecl-disc.solar::after { content: ""; position: absolute; width: 60%; height: 60%; border-radius: 50%; background: var(--bg); top: 20%; left: var(--off, 20%); box-shadow: 0 0 18px 4px rgba(246, 199, 106, .25); }
.ecl-disc.lunar { background: radial-gradient(circle at 40% 40%, #e9d9c6, #b98f75 60%, #7a3e2c); }
.ecl-disc.lunar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 70% 60%, rgba(120, 30, 20, .75), transparent 70%); opacity: var(--depth, .8); }
.saros-strip { position: relative; height: 26px; margin: 10px 0 4px; }
.saros-strip::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 1px; background: var(--line2); }
.saros-strip i { position: absolute; top: 7px; width: 3px; height: 11px; border-radius: 2px; background: var(--faint); transform: translateX(-1px); }
.saros-strip i.life { background: var(--teal); }
.saros-strip i.here { background: var(--gold); height: 19px; top: 3px; width: 4px; }

/* dialogue */
.dlg { display: grid; grid-template-columns: 240px 1fr; height: 100vh; }
.dlg-side { border-right: 1px solid var(--line); padding: 26px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.dlg-side a { display: block; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-side a.on, .dlg-side a:hover { background: var(--surface); color: var(--text); }
.dlg-main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.dlg-head { padding: 20px 34px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dlg-scroll { flex: 1; overflow-y: auto; padding: 30px 34px; }
.msgs { max-width: 760px; margin: 0 auto; display: grid; gap: 22px; }
.msg { display: grid; gap: 6px; }
.msg .who { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.msg.user .bubble { background: var(--surface2); border: 1px solid var(--line); border-radius: 16px 16px 4px 16px; padding: 12px 16px; justify-self: end; max-width: 85%; white-space: pre-wrap; }
.msg.user { justify-items: end; }
.msg.ai .bubble { font-family: var(--serif); font-size: 18.5px; line-height: 1.65; }
.msg.ai .bubble p { margin: 0 0 .8em; }
.msg.ai .bubble ul, .msg.ai .bubble ol { margin: 0 0 .8em; padding-left: 1.2em; }
.msg.ai .bubble h1, .msg.ai .bubble h2, .msg.ai .bubble h3 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: .9em 0 .3em; }
.typing { display: inline-flex; gap: 4px; } .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; } .typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.composer { border-top: 1px solid var(--line); padding: 14px 34px 20px; }
.composer form { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; align-items: flex-end; background: var(--surface); border: 1px solid var(--line2); border-radius: 16px; padding: 8px 8px 8px 16px; }
.composer textarea { flex: 1; border: 0; outline: none; background: none; resize: none; font: inherit; font-size: 15.5px; color: var(--text); max-height: 220px; padding: 7px 0; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.chip { border: 1px solid var(--line2); background: var(--surface); border-radius: 99px; padding: 8px 14px; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.chip:hover { color: var(--text); border-color: var(--gold); }
.empty-dlg { text-align: center; padding: 8vh 10px 0; }
.empty-dlg h2 { font-family: var(--display); font-weight: 500; font-size: 40px; margin: 14px 0 6px; }
.sources { font-size: 12px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px; }
.sources a { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 7px; padding: 1px 7px; }

/* journal */
.entry { padding: 18px 20px; }
.entry .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--faint); margin-bottom: 8px; }
.entry .body { font-family: var(--serif); font-size: 18px; line-height: 1.6; white-space: pre-wrap; }

/* palette */
.overlay { position: fixed; inset: 0; background: rgba(5, 6, 14, .55); backdrop-filter: blur(6px); z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.palette { width: min(680px, 100%); background: var(--surface); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 18px 20px; font: inherit; font-size: 17px; color: var(--text); outline: none; }
.palette .res { max-height: 56vh; overflow-y: auto; padding: 6px; }
.palette .r { display: block; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.palette .r.on, .palette .r:hover { background: var(--surface2); }
.palette .r b { display: block; font-weight: 600; font-size: 14px; }
.palette .r span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .r em { font-style: normal; color: var(--gold); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface); border-left: 1px solid var(--line2); z-index: 55; box-shadow: var(--shadow); padding: 30px 32px 60px; overflow-y: auto; animation: slide .25s ease; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer .x { position: absolute; top: 16px; right: 16px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--surface2); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 16px; font-size: 14px; z-index: 80; box-shadow: var(--shadow); animation: rise .2s ease; }

/* home tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { text-decoration: none; padding: 18px 20px; display: grid; gap: 6px; }
.tile b { font-family: var(--display); font-size: 22px; font-weight: 500; }
.tile span { font-size: 13.5px; color: var(--muted); }

/* responsive */
@media (max-width: 1100px) {
  .reader { grid-template-columns: 1fr; } .toc { display: none; }
  .hero, .year-hero, .essence, .chart-wrap { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); background: var(--bg2); }
  .shell.menu .side { transform: none; }
  .shell.menu::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
  .page { padding: 26px 16px 100px; }
  .progress { left: 0; }
  .g2, .g3, .tiles { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose { font-size: 18.5px; }
  .dlg { grid-template-columns: 1fr; height: calc(100vh - 57px); }
  .dlg-side { display: none; }
  .dlg-main { height: calc(100vh - 57px); }
  .dlg-head, .dlg-scroll, .composer { padding-left: 16px; padding-right: 16px; }
  .dasha-line { grid-template-columns: 1fr; gap: 4px; }
  .ad .body { padding: 2px 18px 18px; }
  .hero-now { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* month */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); text-align: center; padding: 4px 0; }
.cal-d { min-height: 86px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.cal-d:hover { border-color: var(--line2); transform: translateY(-1px); }
.cal-d.on { border-color: var(--gold); }
.cal-d.today { box-shadow: inset 0 0 0 1px var(--gold); }
.cal-d b { font-size: 15px; }
.mb { font-size: 10.5px; font-weight: 700; color: #fff; border-radius: 6px; padding: 1px 6px; }
.cal-ev { display: flex; flex-wrap: wrap; gap: 5px; font-size: 14px; line-height: 1; }
@media (max-width: 860px) { .cal { gap: 3px; } .cal-d { min-height: 62px; padding: 5px; border-radius: 8px; } .cal-d b { font-size: 12.5px; } .mb { font-size: 9px; padding: 0 4px; } .cal-ev { font-size: 11px; gap: 3px; } }
@media (max-width: 1100px) { .court-grid { grid-template-columns: 1fr !important; } }
.chart-wrap > *, .grid > *, .hero > *, .year-hero > * { min-width: 0; }

/* round 3: practice, check-ins, dreams, session */
.pcard .ptext, .ptext { font-size: 18.5px; line-height: 1.55; margin: 10px 0 14px; }
.pcard.done { border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
.pstrip { display: grid; grid-template-columns: repeat(14, 12px); gap: 4px; }
.pstrip i { width: 12px; height: 12px; border-radius: 3px; background: var(--surface2); border: 1px solid var(--line); }
.pstrip i.on { background: var(--gold); border-color: var(--gold); }
.checkin { display: grid; gap: 10px; }
.ci-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; }
.ci-l { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.ci-opts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ci-opts button { border: 1px solid var(--line2); background: var(--surface); border-radius: 10px; padding: 8px 4px; font-size: 12.5px; color: var(--muted); cursor: pointer; font-weight: 600; transition: all .15s; }
.ci-opts button:hover { border-color: var(--gold); color: var(--text); }
.ci-opts button.on { color: #fff; }
.ci-opts button.on.alt { background: var(--surface2); color: var(--text); border-color: var(--gold); }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--surface2); border: 1px solid var(--line); cursor: pointer; }
.heat i.sel { outline: 2px solid var(--gold); outline-offset: 1px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.gbars { display: flex; gap: 6px; align-items: flex-end; margin-top: 14px; }
.gb { flex: 1; display: grid; justify-items: center; gap: 4px; min-width: 0; }
.gb-col { height: 120px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; background: linear-gradient(to top, var(--line) 1px, transparent 1px) 0 0 / 100% 24px; border-radius: 6px; }
.gb-col i { display: block; border-radius: 4px 4px 1px 1px; transition: height .4s; }
.gb-col i.m { width: 58%; }
.gb-col i.e { width: 14%; background: var(--muted); opacity: .55; }
.gb.thin .gb-col i { opacity: .38; }
.gb-l { font-size: 13px; color: var(--text); }
.gb-n { font-size: 10.5px; color: var(--faint); min-height: 12px; }
.letter { white-space: pre-wrap; font-family: var(--serif); font-size: 16.5px; line-height: 1.6; margin: 0; color: var(--text); }
@media (max-width: 860px) { .ci-opts button { font-size: 11px; padding: 8px 2px; } .gbars { gap: 3px; } .gb-col { height: 90px; } .pstrip { grid-template-columns: repeat(14, 9px); gap: 3px; } .pstrip i { width: 9px; height: 9px; } }
.card.tile { display: grid; align-content: start; }
.gbars .gb { max-width: 120px; }
@media (max-width: 500px) { .ci-row { grid-template-columns: 1fr; gap: 6px; } .ci-opts button { font-size: 11.5px; } }

/* ---------- round 5: chrome ---------- */
.main { display: flex; flex-direction: column; }
.view { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 35; height: 58px; padding: 0 22px 0 18px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.tb-ico { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: 10px; padding: 7px 8px; cursor: pointer; color: var(--muted); }
.tb-ico:hover { color: var(--text); background: var(--surface); border-color: var(--line); }
.tb-ico kbd { font-family: var(--sans); font-size: 10.5px; border: 1px solid var(--line2); border-radius: 5px; padding: 0 5px; color: var(--faint); }
.tb-menu, .tb-brand { display: none; }
.tb-brand { font-family: var(--display); font-size: 22px; font-weight: 500; text-decoration: none; font-size-adjust: var(--dadj); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumb .cg { color: var(--faint); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.crumb b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumb .sep { color: var(--faint); opacity: .6; }
.moonchip { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 11px 5px 9px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.moonchip:hover { border-color: var(--line2); color: var(--text); }
.mc-g { color: var(--c-Moon); font-size: 15px; line-height: 1; }
.mc-b { color: var(--gold); font-weight: 700; font-variant-numeric: lining-nums; }
.ap-wrap { position: relative; }
.ap-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); border-radius: 99px; padding: 5px 12px 5px 6px; cursor: pointer; font-size: 13px; font-weight: 600; }
.ap-btn:hover, .ap-btn.on { border-color: var(--gold); }
.ap-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--bg); background-image: var(--motif); background-size: 14px; box-shadow: inset 0 0 0 1px rgba(128,128,128,.3), inset 0 0 0 5px var(--surface), inset 0 0 0 7px var(--gold); }
.ap-dot.pv-auto { background: linear-gradient(135deg, #0e0f1d 50%, #f5efe3 50%); }
.apm { position: absolute; right: 0; top: calc(100% + 10px); width: min(560px, calc(100vw - 24px)); max-height: min(78vh, 720px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line2); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.55); z-index: 70; animation: pop .16s ease both; overflow: hidden; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.apm-head { display: flex; align-items: center; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.apm-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 6px 8px; border-radius: 8px; } .apm-x:hover { background: var(--surface2); color: var(--text); }
.apm-body { overflow-y: auto; padding: 6px 14px 14px; }
.apm-now { font-size: 13px; color: var(--muted); margin: 8px 0 2px; line-height: 1.45; } .apm-now b { color: var(--text); }
.apm-g { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 14px 0 8px; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.lk { display: grid; gap: 2px; text-align: left; padding: 0 0 8px; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface); cursor: pointer; overflow: hidden; color: var(--text); font: inherit; transition: transform .15s, border-color .15s; }
.lk:hover { transform: translateY(-1px); border-color: var(--gold); }
.lk.on { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 45%, transparent); }
.lk-prev { display: block; height: 58px; position: relative; background-color: var(--bg); background-image: var(--glow), var(--motif); background-size: auto, var(--msize); padding: 14px 10px 0; }
.lk-prev::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--bandh) * .7); background: var(--band) left top / auto 100% repeat-x; }
.lk.tc-auto .lk-prev { background: linear-gradient(135deg, #0e0f1d 50%, #f5efe3 50%); }
.lk-card { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 8px; box-shadow: var(--card-ring); }
.lk-card b { font-family: var(--display); font-size: 19px; font-weight: 500; line-height: 1; color: var(--text); font-size-adjust: var(--dadj); }
.lk-sw { display: flex; gap: 3px; } .lk-sw i { width: 9px; height: 9px; border-radius: 50%; }
.lk-name { font-size: 12.5px; font-weight: 700; padding: 6px 9px 0; color: var(--text); }
.lk-place { font-size: 11px; color: var(--muted); padding: 0 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-list { display: grid; gap: 6px; margin-top: 10px; }
.ft { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 14px; cursor: pointer; color: var(--text); font: inherit; }
.ft:hover { border-color: var(--line2); } .ft.on { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 40%, transparent); }
.ft .fp-d { font-size: 25px; white-space: nowrap; }
.ft-n { font-size: 13px; font-weight: 700; } .ft-n small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.apm-rows { display: grid; gap: 12px; margin-top: 12px; }
.apm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; flex-wrap: wrap; }
.apm-sample { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); background-image: var(--motif); background-size: var(--msize); }
.apm-sample p { margin: 6px 0 0; font-size: 19px; line-height: 1.5; }
.apm-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.apm-foot a { color: var(--muted); }
.pal-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.pal-foot kbd { font-family: var(--sans); border: 1px solid var(--line2); border-radius: 4px; padding: 0 4px; margin-right: 3px; font-size: 10.5px; }
.view { animation: rise .32s ease both; }
.progress { top: 58px; }
.dlg, .dlg-main { height: calc(100vh - 58px); }

/* folded sidebar */
.shell.mini { grid-template-columns: 74px 1fr; }
.shell.mini .side { padding-left: 10px; padding-right: 10px; overflow-x: hidden; }
.shell.mini .side::before { margin-left: -10px; margin-right: -10px; }
.shell.mini .brand { padding: 4px 6px 16px; justify-content: center; } .shell.mini .brand > div { display: none; }
.shell.mini .search-btn { justify-content: center; padding: 9px 0; font-size: 0; gap: 0; } .shell.mini .search-btn kbd { display: none; }
.shell.mini .nav-head { font-size: 0; justify-content: center; padding: 4px 0; border-top: 1px solid var(--line); margin-top: 6px; } .shell.mini .nav-head svg { display: none; }
.shell.mini .nav-group.closed .nav-items { display: grid; }
.shell.mini .nav a { justify-content: center; padding: 10px 0; } .shell.mini .nav a .lbl { display: none; }
.shell.mini .nav a.on::before { left: -10px; }
.shell.mini .side-foot { flex-direction: column; padding: 14px 0 0; } .shell.mini .side-foot > span { display: none; }

/* welcome */
.welcome { border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.wl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wl-i { display: grid; gap: 4px; align-content: start; text-align: left; text-decoration: none; padding: 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--surface2); cursor: pointer; color: var(--text); font: inherit; transition: border-color .15s, transform .15s; }
.wl-i:hover { border-color: var(--gold); transform: translateY(-1px); }
.wl-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--on-gold); font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.wl-i b { font-size: 14.5px; } .wl-i span:last-child { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* phone tab bar */
.tabbar { display: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 1100px) { .wl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .crumb .cg, .crumb .cg + .sep { display: none; } }
@media (max-width: 860px) {
  .topbar { height: 56px; padding: 0 10px; gap: 4px; backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--bg) 96%, var(--surface)); }
  .tb-menu, .tb-brand { display: inline-flex; } .tb-mini, .crumb, .tb-lock, .tb-ico kbd, .ap-l { display: none; }
  .tb-brand { margin-left: 2px; }
  .ap-btn { padding: 4px; } .moonchip { padding: 4px 9px; }
  .apm { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 82vh; border-radius: 20px 20px 0 0; animation: sheet .22s ease both; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
  .lk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft { grid-template-columns: 110px 1fr; } .ft .fp-d { font-size: 21px; }
  .progress { top: 56px; }
  .dlg, .dlg-main { height: calc(100vh - 56px); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 36; background: color-mix(in srgb, var(--bg2) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 3px; text-decoration: none; color: var(--faint); font-size: 10.5px; font-weight: 600; background: none; border: 0; padding: 4px 0; cursor: pointer; font-family: var(--sans); }
  .tabbar a.on { color: var(--gold); }
  .shell.in-dlg .tabbar { display: none; }
  .page { padding-bottom: 110px; }
  .wl { grid-template-columns: 1fr 1fr; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) {
  .timenav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; padding: 4px; width: 100%; }
  .timenav::-webkit-scrollbar { display: none; }
  .timenav button { padding: 7px 8px; flex: none; } .timenav input[type=date] { flex: 1 0 128px; min-width: 128px; }
}
.dlg { background: color-mix(in srgb, var(--bg) 92%, transparent); } .dlg-side { background: color-mix(in srgb, var(--bg2) 60%, transparent); }

/* ---------- round 6: passwords and access ---------- */
.pw-row { display: flex; gap: 8px; align-items: center; } .pw-row .field { flex: 1; }
.pw-eye { flex: none; padding: 0 14px; align-self: stretch; }
.lock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--gold); cursor: pointer; font: inherit; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.forgot { text-align: left; display: grid; gap: 12px; }
.forgot h2 { font-family: var(--display); font-weight: 500; font-size: 30px; margin: 0; font-size-adjust: var(--dadj); }
.forgot p { margin: 0; color: var(--muted); line-height: 1.5; } .forgot form { display: grid; gap: 10px; }
.pwform { display: grid; gap: 10px; max-width: 520px; text-align: left; }
.pwform label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pw-meter { height: 5px; border-radius: 4px; background: var(--surface2); overflow: hidden; margin-top: -2px; }
.pw-meter i { display: block; height: 100%; transition: width .25s, background .25s; background: var(--rose); }
.pw-meter i.s3 { background: var(--gold); } .pw-meter i.s4, .pw-meter i.s5 { background: var(--teal); }
.pw-hint { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); margin-top: -4px; }
.sec-grid { display: grid; gap: 14px; }
.owner-note { display: grid; gap: 4px; border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, var(--surface)); }
.owner-note span { color: var(--muted); font-size: 14px; }
.owner-pill { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--on-gold); background: var(--gold); border-radius: 99px; padding: 4px 10px; }
.switch { position: relative; display: inline-block; width: 46px; height: 27px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line2); transition: background .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--muted); transition: transform .22s cubic-bezier(.3,1.4,.6,1), background .2s; }
.switch input:checked + i { background: var(--gold); border-color: var(--gold); } .switch input:checked + i::after { transform: translateX(19px); background: var(--on-gold); }

/* ---------- round 7: phone feel ---------- */
html { -webkit-tap-highlight-color: transparent; }
a, button, .lk, .tile, label { touch-action: manipulation; }
body { overscroll-behavior-y: none; }
.topbar { view-transition-name: topbar; } .tabbar { view-transition-name: tabbar; } .side { view-transition-name: side; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; animation-timing-function: ease; }
::view-transition-new(root) { animation-name: vt-in; } ::view-transition-old(root) { animation-name: vt-out; }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } } @keyframes vt-out { to { opacity: 0; } }
@supports (view-transition-name: x) { .view { animation: none; } }
.off-pill { font-size: 11.5px; font-weight: 700; color: var(--muted); border: 1px dashed var(--line2); border-radius: 99px; padding: 3px 9px; }
.sheet-grab { display: none; }
.qa { display: none; }
.install { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; margin-top: 16px; }
.install b { display: block; font-size: 14.5px; } .install span { font-size: 13px; color: var(--muted); }
.ins-ico { display: grid; place-items: center; }
.dlg-list { display: none; }
.sheet-back { position: fixed; inset: 0; z-index: 75; background: rgba(5, 6, 14, .45); display: flex; align-items: flex-end; animation: fade .2s; }
.sheet { width: 100%; max-height: 78dvh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; border: 1px solid var(--line2); padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); animation: sheet .24s cubic-bezier(.2,.9,.3,1) both; }
.sheet-list { display: grid; gap: 4px; } .sheet-list a { display: grid; gap: 2px; padding: 12px; border-radius: 12px; text-decoration: none; } .sheet-list a.on, .sheet-list a:active { background: var(--surface2); }
.sheet-list b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sheet-list span { font-size: 12.5px; color: var(--faint); }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.set-toc { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 0; position: sticky; top: 66px; z-index: 5; }
.set-toc a { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line2); background: var(--surface); border-radius: 99px; padding: 6px 12px; }
.set-toc a:hover { color: var(--text); border-color: var(--gold); }
h2.sec[id] { scroll-margin-top: 120px; }

@media (max-width: 860px) {
  .topbar { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
  .field, textarea, select, input[type=text], input[type=password], input[type=email], input[type=date], .composer textarea { font-size: 16px !important; }
  .side { transition: transform .28s cubic-bezier(.2,.9,.3,1); padding-top: calc(22px + env(safe-area-inset-top)); }
  .shell::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .shell.menu::after { opacity: 1; pointer-events: auto; }
  html.drawer-open, html.drawer-open body { overflow: hidden; }
  .nav a { padding: 11px 10px; font-size: 15px; }
  .nav-head { padding: 10px 10px 6px; }
  .tabbar a, .tabbar button { position: relative; min-height: 48px; transition: color .15s, transform .1s; }
  .tabbar a:active, .tabbar button:active { transform: scale(.94); }
  .tabbar a.on::before { content: ""; position: absolute; top: 0; width: 42px; height: 30px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 16%, transparent); left: 50%; transform: translateX(-50%); z-index: -1; animation: pop .2s ease; }
  .tabbar a svg, .tabbar button svg { margin-top: 4px; }
  .qa { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 16px -16px 0; padding: 2px 16px 4px; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
  .qa::-webkit-scrollbar { display: none; }
  .qa-i { flex: none; display: grid; justify-items: center; gap: 6px; width: 74px; padding: 12px 4px 10px; text-decoration: none; border: 1px solid var(--line); background: var(--surface); border-radius: 16px; font-size: 12px; font-weight: 600; color: var(--muted); scroll-snap-align: start; transition: transform .1s; }
  .qa-i:active { transform: scale(.95); }
  .qa-ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--gold) 14%, var(--surface2)); color: var(--gold); }
  .dlg, .dlg-main { height: calc(100dvh - 56px - env(safe-area-inset-top)); }
  .dlg-list { display: inline-flex; }
  .dlg-head { padding-top: 12px; padding-bottom: 10px; gap: 10px; }
  .composer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .sheet-grab, .apm .sheet-grab { display: block; width: 42px; height: 5px; border-radius: 9px; background: var(--line2); margin: 6px auto 10px; }
  .apm { padding-top: 0; }
  .card { padding: 18px; }
  h1.title { font-size: clamp(34px, 9vw, 44px); }
  .lede { font-size: 18px; }
  .install { grid-template-columns: auto 1fr auto; } .install .btn { grid-column: 2; justify-self: start; }
  .set-toc { top: calc(62px + env(safe-area-inset-top)); overflow-x: auto; flex-wrap: nowrap; margin: 0 -16px; padding: 6px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); scrollbar-width: none; }
  .set-toc a { flex: none; }
  .btn { min-height: 40px; } .btn.sm { min-height: 34px; }
  .lock { align-items: start; padding-top: calc(10vh + env(safe-area-inset-top)); }
}
@media (hover: none) { .card.link:hover, .lk:hover, .wl-i:hover, .theme-card:hover { transform: none; } }
.timenav button[aria-label] { font-size: 17px; line-height: 1; padding: 5px 11px; }
@media (max-width: 860px) {
  .today-head { flex-wrap: nowrap; gap: 10px; margin-bottom: 4px !important; }
  .today-head .timenav { width: auto; flex: 0 1 auto; } .timenav .tn-far { display: none; }
  .timenav input[type=date] { flex: 0 1 150px; min-width: 0; }
  .qa { margin-bottom: 18px; }
}

/* ---------- round 8: Lajjitādi depth ---------- */
.pd-now { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.pd-head { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.pd-head .eyebrow { grid-column: 1; } .pd-head b { grid-column: 1; font-family: var(--serif); font-weight: 500; font-size: 18px; font-size-adjust: calc(var(--sadj) * var(--ts)); } .pd-head .chev { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.pd-body { margin-top: 8px; } .pd-card { margin-top: 12px; }
button.pill { cursor: pointer; background: none; font: inherit; font-size: 12px; } button.pill.sel { border-color: var(--gold); color: var(--text); }
.guide .g-sec { scroll-margin-top: 80px; margin-top: 46px; }
.guide .g-sec h2 { display: flex; gap: 14px; align-items: baseline; }
.g-n { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; color: var(--gold); font-weight: 700; font-variant-numeric: lining-nums; }
.toc a.on { color: var(--text); border-left-color: var(--gold); } .toc-cta { margin-top: 14px; color: var(--gold) !important; font-weight: 600; }
.portrait { margin-top: 34px; }
.infl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.inf { border-top: 3px solid var(--ic); }
.inf-tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--ic); text-transform: uppercase; }
.inf-v { font-family: var(--display); font-size: 24px; font-variant-numeric: lining-nums; } .inf-v small { font-size: 12px; color: var(--faint); font-family: var(--sans); }
.inf-bar { height: 4px; border-radius: 3px; background: var(--surface2); margin: 6px 0 4px; overflow: hidden; } .inf-bar i { display: block; height: 100%; background: var(--ic); }
.inf h4 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 10px 0 4px; font-size-adjust: var(--dadj); }
.inf .textblock p, .portrait .textblock p { font-size: 17px; }
.prompt { margin-top: 16px; } .prompt .serif { font-size: 19px; margin: 8px 0 12px; line-height: 1.5; }
.path-weeks { display: grid; gap: 10px; margin-top: 18px; }
.pw { display: grid; grid-template-columns: 34px 34px 1fr; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; transition: border-color .15s, transform .15s; }
.pw:hover { border-color: var(--line2); transform: translateY(-1px); } .pw.cur { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 30%, transparent); }
.pw-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line2); font-weight: 700; font-size: 13px; color: var(--muted); }
.pw.done .pw-n { background: var(--gold); color: var(--on-gold); border-color: var(--gold); } .pw.cur .pw-n { border-color: var(--gold); color: var(--gold); }
.pw-g { font-size: 24px; text-align: center; } .pw b { display: block; font-family: var(--display); font-weight: 500; font-size: 20px; font-size-adjust: var(--dadj); } .pw span { font-size: 13px; color: var(--muted); }
.pw-big { font-size: 46px; line-height: 1; }
.nights { display: grid; gap: 4px; margin-top: 12px; } .night { display: grid; grid-template-columns: 22px 64px 1fr; gap: 8px; font-size: 14px; align-items: baseline; }
.nm { font-weight: 700; } .nm.plus { color: var(--teal); } .nm.minus { color: var(--rose); }
.path-card { display: block; }
@media (max-width: 860px) { .infl { grid-template-columns: 1fr; } .pw { grid-template-columns: 30px 28px 1fr; padding: 12px; } }
.ci-opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide > .lede::first-letter { all: unset; } .guide > .eyebrow { font-family: var(--sans); font-variant: normal; }

/* ---------- the threshold (lock) ---------- */
.lock { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 18px; }
.lock-stage { position: relative; width: min(470px, 100%); display: grid; place-items: center; }
.lock-halo { position: absolute; width: min(760px, 170vw); height: min(760px, 170vw); left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; opacity: .55; }
.lh-spin { transform-origin: 0 0; animation: lh 240s linear infinite; } .lh-spin.rev { animation-direction: reverse; animation-duration: 180s; }
@keyframes lh { to { transform: rotate(360deg); } }
:root[data-motion="off"] .lh-spin { animation: none; }
.lock-card { width: 100%; padding: calc(30px + var(--bandh)) 34px calc(10px + var(--bandh)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line2); border-radius: 22px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.55), var(--card-ring); overflow: hidden; }
.lock-mark { margin: 0 auto 18px; }
.lock h1 { font-size: 56px; font-size-adjust: var(--dadj); font-synthesis: none; }
.lock .sub { margin: 10px 0 8px; }
.lock-today { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 0 0 24px; }
.lock .check { justify-content: flex-start; }
.lock-look { display: inline-flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line2); border-radius: 99px; padding: 6px 14px 6px 7px; cursor: pointer; color: var(--text); font: inherit; text-align: left; position: relative; z-index: 1; backdrop-filter: blur(6px); }
.lock-look:hover { border-color: var(--gold); }
.lock-look b { display: block; font-size: 13px; } .lock-look small { display: block; font-size: 11.5px; color: var(--muted); }
.ll-next { font-size: 20px; color: var(--gold); margin-left: 4px; }
.lock .fine { margin-top: 0; text-align: center; max-width: 440px; position: relative; z-index: 1; }
@media (max-width: 860px) { .lock { justify-content: flex-start; padding-top: calc(7vh + env(safe-area-inset-top)); } .lock-card { padding-left: 22px; padding-right: 22px; } .lock h1 { font-size: 46px; } }
.mk-flame { transform-origin: 32px 25px; animation: flame 3.6s ease-in-out infinite; }
.mk-halo { animation: halo 3.6s ease-in-out infinite; }
@keyframes flame { 0%, 100% { transform: scale(1) rotate(0deg); } 30% { transform: scale(1.04, .97) rotate(-1.5deg); } 60% { transform: scale(.97, 1.04) rotate(1.2deg); } }
@keyframes halo { 50% { opacity: .65; } }
:root[data-motion="off"] .mk-flame, :root[data-motion="off"] .mk-halo { animation: none; }
.boot-orb { border: 0; animation: none; width: 64px; height: 64px; background: url(../icons/icon.svg) center / contain no-repeat; border-radius: 14px; } .boot-orb::after { display: none; }

/* ---------- round 11: customisation ---------- */
html { zoom: var(--uiz, 1); }
.prose { max-width: var(--measure, 690px); line-height: calc(1.7 * var(--lhm, 1)); letter-spacing: var(--track, 0); }
.prose p { margin-bottom: calc(1.05em * var(--pgm, 1)); }
.textblock, .msg.ai .bubble, .entry .body, .ptext, .letter { line-height: calc(1.66 * var(--lhm, 1)); letter-spacing: var(--track, 0); }
.textblock p { margin-bottom: calc(.9em * var(--pgm, 1)); }
.textblock, .prose, .msg.ai .bubble, .lede { text-align: var(--align, left); }
:root[data-align="justify"] .prose, :root[data-align="justify"] .textblock, :root[data-align="justify"] .msg.ai .bubble { hyphens: auto; -webkit-hyphens: auto; }
.msg.ai .bubble { max-width: var(--measure, 760px); }
h1.title { font-size: calc(clamp(38px, 5vw, 58px) * var(--hsm, 1)); }
h2.sec { font-size: calc(30px * var(--hsm, 1)); } h3.sub { font-size: calc(22px * var(--hsm, 1)); } .prose h2 { font-size: calc(36px * var(--hsm, 1)); } .prose h3 { font-size: calc(25px * var(--hsm, 1)); }
:root[data-contrast="high"] { --muted: color-mix(in srgb, var(--text) 84%, var(--bg)); --faint: color-mix(in srgb, var(--text) 66%, var(--bg)); --line: color-mix(in srgb, var(--text) 16%, transparent); --line2: color-mix(in srgb, var(--text) 30%, transparent); }
:root[data-density="compact"] .card { padding: 15px 17px; } :root[data-density="compact"] .page { padding-top: 28px; } :root[data-density="compact"] h2.sec { margin-top: 38px; } :root[data-density="compact"] .grid { gap: 11px; }
:root[data-dropcap="off"] .prose > p:first-of-type::first-letter { all: unset; }
.cz { display: grid; gap: 10px; }
.cz-g { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-top: 8px; }
.cz-row { display: grid; grid-template-columns: 150px 1fr 56px; align-items: center; gap: 12px; font-size: 14px; }
.cz-row > .seg, .cz-row > .cz-sel { grid-column: 2 / 4; justify-self: start; }
.cz-row input[type=range] { width: 100%; accent-color: var(--gold); }
.cz-row output { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); text-align: right; }
.cz-sel { padding: 8px 12px; font-size: 15px; max-width: 300px; }
.cz-sample { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg); }
.cz-sample p { margin: 6px 0 0; font-size: 18px; line-height: calc(1.6 * var(--lhm, 1)); text-align: var(--align, left); letter-spacing: var(--track, 0); }
.cz.compact .cz-row { grid-template-columns: 116px 1fr 48px; font-size: 13px; }

/* ---------- the assistant ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.step { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 3px 10px; }
.step.done { color: var(--faint); }
.spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--gold); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.mapcards { display: flex; flex-wrap: wrap; gap: 8px; }
.mapcard { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); background: color-mix(in srgb, var(--gold) 8%, var(--surface)); border-radius: 12px; padding: 9px 14px; color: var(--gold); }
.mapcard b { display: block; color: var(--text); font-size: 14px; } .mapcard small { display: block; color: var(--muted); font-size: 12px; }
.msg-acts { display: flex; gap: 4px; flex-wrap: wrap; opacity: .75; } .msg:hover .msg-acts { opacity: 1; }
.modes { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.mode { border: 1px solid var(--line2); background: var(--surface); color: var(--muted); border-radius: 99px; padding: 5px 13px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--sans); }
.mode.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.dlg-q { padding: 8px 11px; font-size: 13.5px; margin-bottom: 6px; }
.dlg-side a small { display: block; color: var(--faint); font-size: 11px; }
.dlg-title { min-width: 0; } .dlg-title .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw; }
.dlg-acts { display: flex; gap: 2px; }
.chips.left { justify-content: flex-start; }
.ask-fab { position: fixed; right: 22px; bottom: 22px; z-index: 34; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 99px; padding: 12px 18px; background: var(--pbtn); color: var(--on-gold); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 14px 34px -10px rgba(0,0,0,.5), var(--pbtn-glow); }
.ask-fab:hover { filter: brightness(1.06); }
.comp-back { position: fixed; inset: 0; z-index: 72; background: rgba(5, 6, 14, .3); animation: fade .2s; }
.comp { position: absolute; right: 0; top: 0; bottom: 0; width: min(500px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line2); box-shadow: -30px 0 80px -30px rgba(0,0,0,.5); animation: slidein .24s cubic-bezier(.2,.9,.3,1); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.comp-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.comp-title { font-family: var(--display); font-weight: 500; font-size: 20px; display: block; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size-adjust: var(--dadj); }
.comp-scroll { flex: 1; overflow-y: auto; padding: 16px; }
.comp-scroll .msgs { gap: 16px; } .comp .msg.ai .bubble { font-size: 17px; }
.comp-foot { border-top: 1px solid var(--line); padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
.comp-foot form { display: flex; gap: 8px; align-items: flex-end; } .comp-foot textarea { flex: 1; resize: none; border: 1px solid var(--line2); background: var(--bg); color: var(--text); border-radius: var(--field-r); padding: 10px 12px; font: inherit; font-size: 15px; outline: none; }
.comp-foot .modes { justify-content: flex-start; margin-bottom: 8px; }
.selchip { position: fixed; z-index: 70; transform: translateX(-50%); display: flex; gap: 2px; background: var(--text); color: var(--bg); border-radius: 12px; padding: 4px; box-shadow: 0 12px 30px -8px rgba(0,0,0,.5); animation: pop .14s ease; }
.selchip button { background: none; border: 0; color: inherit; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.selchip button:hover { background: color-mix(in srgb, var(--bg) 18%, transparent); }
.selmaps { display: grid; max-height: 220px; overflow-y: auto; }
.selmaps button { text-align: left; }

/* ---------- mental maps ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tpl { text-align: left; cursor: pointer; display: grid; gap: 6px; font: inherit; color: var(--text); }
.tpl:hover { border-color: var(--gold); } .tpl b { font-family: var(--display); font-weight: 500; font-size: 20px; font-size-adjust: var(--dadj); } .tpl span { font-size: 13px; color: var(--muted); }
.maps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.mapthumb { text-decoration: none; display: grid; gap: 6px; } .mapthumb b { font-size: 15px; } .mapthumb span { font-size: 12px; }
.thumb { width: 100%; height: 130px; background: var(--bg); border-radius: 10px; border: 1px solid var(--line); }
.mapwrap { display: flex; flex-direction: column; height: calc(100dvh - 58px); }
.maptool { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); }
.map-title { max-width: 320px; padding: 7px 11px; font-family: var(--display); font-size: 18px; }
.mapbody { position: relative; flex: 1; min-height: 0; }
.mapsvg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.mapsvg:active { cursor: grabbing; }
.mn-bg { fill: var(--surface); stroke-width: 1.6; filter: drop-shadow(0 6px 14px rgba(0,0,0,.18)); }
.mnode { cursor: pointer; } .mnode.on .mn-bg { stroke-width: 3; } .mnode.from .mn-bg { stroke-dasharray: 5 4; stroke-width: 3; }
.mn-t { fill: var(--text); font-family: var(--sans); font-size: 13.5px; font-weight: 600; pointer-events: none; }
.mn-g { font-size: 15px; pointer-events: none; }
.ml { stroke: var(--muted); stroke-width: 1.6; opacity: .75; } .ml.ghost { stroke-dasharray: 6 5; stroke: var(--gold); }
.mlink { cursor: pointer; } .mlink.on .ml { stroke: var(--gold); stroke-width: 2.6; opacity: 1; }
.mll-bg { fill: var(--bg); stroke: var(--line2); } .mll { fill: var(--muted); font-family: var(--sans); font-size: 11.5px; font-weight: 600; pointer-events: none; }
.handle circle { fill: var(--gold); cursor: crosshair; } .handle text { fill: var(--on-gold); font-size: 13px; font-weight: 700; pointer-events: none; }
.mappanel { position: absolute; right: 14px; top: 14px; width: 320px; max-height: calc(100% - 28px); overflow-y: auto; display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line2); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.mappanel .field { padding: 9px 12px; }
.kinds { display: flex; flex-wrap: wrap; gap: 5px; }
.kind { border: 1px solid color-mix(in srgb, var(--kc, var(--gold)) 55%, var(--line)); background: none; color: var(--text); border-radius: 99px; padding: 3px 9px; font-size: 12px; cursor: pointer; font-family: var(--sans); }
.kind.on { background: var(--kc, var(--gold)); color: #fff; border-color: transparent; }
.maphint { position: absolute; left: 16px; bottom: 14px; font-size: 12.5px; background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); }
@media (max-width: 860px) {
  .ask-fab { bottom: calc(76px + env(safe-area-inset-bottom)); right: 14px; padding: 11px 15px; }
  .comp { top: auto; height: 86dvh; width: 100%; border-radius: 20px 20px 0 0; border-left: 0; border-top: 1px solid var(--line2); animation: sheet .24s cubic-bezier(.2,.9,.3,1); }
  .mapwrap { height: calc(100dvh - 56px - env(safe-area-inset-top)); } .mappanel { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .maptool { padding: 8px 10px; gap: 4px; overflow-x: auto; flex-wrap: nowrap; } .maptool .btn { flex: none; } .map-title { min-width: 140px; }
  .mappanel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 55%; border-radius: 18px 18px 0 0; }
  .maphint { display: none; }
  .cz-row, .cz.compact .cz-row { grid-template-columns: 1fr 52px; } .cz-row > span { grid-column: 1 / 3; } .cz-row > .seg, .cz-row > .cz-sel { grid-column: 1 / 3; }
  .dlg-acts { display: none; }
}
.mll-g { cursor: pointer; }

/* ---------- the sidebar, dressed by each look ---------- */
:root { --side: 296px; --navs: 1; }
.side { padding: 0 14px 22px; gap: 4px; background:
  linear-gradient(180deg, color-mix(in srgb, var(--bg2) 94%, transparent), color-mix(in srgb, var(--bg2) 88%, transparent)),
  var(--motif) 0 0 / var(--msize) repeat, var(--bg2);
  border-right: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line)); box-shadow: inset -12px 0 24px -22px color-mix(in srgb, var(--gold) 40%, transparent); }
.side::before { margin: 0 -14px 0; position: sticky; top: 0; z-index: 2; }
.side-top { padding: 18px 6px 14px; margin: 0 -14px 10px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 7%, transparent), transparent); }
.brand { padding: 0 14px; gap: 13px; }
.brand b { font-size: calc(30px * var(--navs)); font-size-adjust: var(--dadj); font-synthesis: none; color: var(--text); }
.brand span { font-size: calc(11.5px * var(--navs)); color: var(--gold); opacity: .85; letter-spacing: .18em; font-weight: 600; }
.search-btn { margin: 4px 2px 8px; padding: 11px 13px; font-size: calc(14.5px * var(--navs)); color: var(--muted); background: color-mix(in srgb, var(--surface) 92%, transparent); border-color: var(--line2); }
.search-btn:hover { border-color: var(--gold); color: var(--text); }
.side-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 2px 6px; }
.side-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: min(var(--btn-r), 10px); font: inherit; font-size: calc(12.5px * var(--navs)); font-weight: 600; cursor: pointer; }
.side-tools button:hover { color: var(--text); border-color: color-mix(in srgb, var(--gold) 50%, var(--line)); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.nav-group { margin-top: 14px; }
.nav-head { padding: 6px 10px 6px 8px; gap: 9px; justify-content: flex-start; color: var(--gold); text-transform: none; letter-spacing: .01em; font-family: var(--display); font-size: calc(17px * var(--navs)); font-weight: 500; font-size-adjust: var(--dadj); font-synthesis: none; border-radius: 10px; }
.nav-head::before { content: ""; width: 14px; height: 14px; flex: none; background: var(--glyph) center / contain no-repeat; }
.nav-head .nh-t { flex: 1; text-align: left; }
.nav-head .nh-n { font-family: var(--sans); font-size: 11px; color: var(--faint); font-weight: 700; }
.nav-head:hover { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.nav-head svg { color: var(--faint); }
.nav-items { gap: 2px; margin-top: 4px; padding-left: 4px; border-left: 1px solid color-mix(in srgb, var(--gold) 16%, transparent); margin-left: 15px; }
.nav a { padding: 9px 10px 9px 12px; gap: 12px; color: color-mix(in srgb, var(--text) 80%, var(--bg)); font-size: calc(15.5px * var(--navs)); font-weight: 500; line-height: 1.25; border-radius: min(var(--btn-r), 11px); }
.nav a .ico { width: 20px; height: 20px; opacity: 1; color: color-mix(in srgb, var(--gold) 70%, var(--muted)); }
.nav a:hover { background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text); }
.nav a.on { color: var(--text); font-weight: 650; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 16%, var(--surface2)), color-mix(in srgb, var(--gold) 4%, var(--surface2))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent); }
.nav a.on .ico { color: var(--gold); }
.nav a.on::before { left: -9px; top: 8px; bottom: 8px; width: 3px; }
.nav a.on::after { display: none; }
.nav a .lbl { flex: 1; min-width: 0; }
.nav .pin { opacity: 0; background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 15px; padding: 0 2px; line-height: 1; transition: opacity .15s, color .15s; }
.nav a:hover .pin, .nav .pin.is { opacity: 1; } .nav .pin.is { color: var(--gold); } .nav .pin:hover { color: var(--gold); }
.side-foot { padding: 16px 8px 0; font-size: calc(12.5px * var(--navs)); border-top: 1px solid var(--line); margin-top: 18px; }
@media (hover: none) { .nav .pin { opacity: .55; } }
/* rail */
.shell.mini .side-tools { grid-template-columns: 1fr; } .shell.mini .side-tools span { display: none; }
.shell.mini .nav-items { border: 0; margin-left: 0; padding-left: 0; } .shell.mini .nav .pin { display: none; }
.shell.mini .nav-head::before { display: none; } .shell.mini .brand { padding: 0; } .shell.mini .side-top { padding: 16px 0 12px; }
.shell.mini .nav a.on::before { left: -12px; }
/* unpinned: the sidebar waits at the edge */
@media (min-width: 861px) {
  .shell.float { grid-template-columns: 1fr; }
  .shell.float .side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); z-index: 60; transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.9,.3,1), box-shadow .28s; }
  .shell.float.peek .side { transform: none; box-shadow: 30px 0 80px -30px rgba(0,0,0,.55); }
  .side-edge { position: fixed; left: 0; top: 0; bottom: 0; width: 14px; z-index: 59; }
  .shell.float .progress { left: 0; }
}
@media (max-width: 860px) {
  .side { width: min(320px, 88vw); } .side-tools { grid-template-columns: 1fr 1fr; }
  .side-tools button:last-child { display: none; } .side-tools { grid-template-columns: 1fr; }
  .nav a { padding: 11px 10px 11px 12px; } .nav .pin { opacity: .55; }
}

/* ---- round 13: the month, in full ---- */
.month .mo-top { align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.mo-nav { display: flex; gap: 6px; }
.moonph { flex: none; vertical-align: middle; }
.moonph .mp-d { fill: color-mix(in srgb, var(--text) 14%, var(--surface)); stroke: color-mix(in srgb, var(--gold) 35%, transparent); stroke-width: .8; }
.moonph .mp-l { fill: color-mix(in srgb, var(--gold) 55%, #fff6dc); }
.mo-brief { margin: 14px 0 20px; position: relative; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 8%, var(--surface)), var(--surface) 55%); }
.mo-brief::after { content: ""; position: absolute; inset: 0; background: var(--motif); opacity: .05; pointer-events: none; }
.mo-brief p.serif { font-size: 17px; line-height: 1.65; margin: 10px 0 0; position: relative; z-index: 1; }
.mo-brief p.lead1 { font-family: var(--display); font-size: 21px; line-height: 1.4; color: var(--gold); margin-top: 12px; }
.mo-lun { margin-bottom: 26px; }
.card.lun.full { background: linear-gradient(170deg, color-mix(in srgb, #fff6dc 7%, var(--surface)), var(--surface)); }
.card.lun.new { background: linear-gradient(170deg, color-mix(in srgb, var(--bg) 40%, var(--surface)), var(--surface)); }
.mn-l { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 4px 0 6px; }
.mn-box { width: 100%; resize: vertical; font-family: var(--serif); font-size: 16px; line-height: 1.5; }
.mo-bar { margin: 8px 0 12px; align-items: center; }
.mo-cal .cal-d { position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--bh) 13%, var(--surface)), var(--surface) 70%); border-top: 2px solid color-mix(in srgb, var(--bh) 70%, transparent); min-height: 104px; }
.mo-cal .cal-d.vis { box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--gold) 55%, transparent); }
.mo-cal .cal-d.today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.mo-cal .cal-d.on { border-color: var(--gold); outline: 2px solid color-mix(in srgb, var(--gold) 40%, transparent); outline-offset: 1px; }
.cal-ev .vg { font-weight: 700; text-shadow: 0 0 8px color-mix(in srgb, currentColor 40%, transparent); }
.hm { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: auto; min-height: 12px; }
.hm i { font-style: normal; }
.hm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 70%, transparent); }
.hm-pm { font-weight: 800; } .hm-pm.p { color: #6f9f7a; } .hm-pm.m { color: #c46e62; }
.mo-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--faint); margin: 12px 2px 0; }
.mo-legend span { display: inline-flex; align-items: center; gap: 5px; }
.daypanel { margin-top: 16px; border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); scroll-margin: 90px; }
.dp-moon { font-size: 18px; line-height: 1.55; margin: 12px 0; }
.dp-her { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dp-her .checkin { margin-top: 8px; }
.dp-note { display: flex; gap: 10px; padding: 8px 0; font-size: 14.5px; color: var(--muted); text-decoration: none; border-top: 1px dashed var(--line); }
.dp-note span { color: var(--gold); }
.visit { border-left: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); }
.visit.sm { margin: 10px 0; padding: 12px 14px; }
.visit .vh { font-family: var(--display); font-size: 18px; font-weight: 500; }
.visit .v-t { font-size: 16.5px; line-height: 1.6; margin: 8px 0; }
.visit .v-q { font-size: 17px; margin: 10px 0; }
.visit .v-p { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 8px 0 10px; }
.visit .v-p b { color: var(--gold); font-weight: 600; margin-right: 4px; }
.mo-g p.serif { font-size: 16.5px; line-height: 1.6; margin: 10px 0 8px; }
.mo-g p.faint2 { color: var(--muted); font-size: 15.5px; }
.mo-slow { margin-top: 14px; display: grid; gap: 4px; }
.mo-slow .ms { display: flex; gap: 12px; align-items: center; padding: 8px 4px; text-decoration: none; color: var(--text); border-top: 1px solid var(--line); font-size: 15px; }
.mo-slow .ms:first-child { border-top: 0; }
.mo-slow .ms em { color: var(--muted); font-style: normal; font-size: 13.5px; }
.ticks { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 5px; }
.tk { aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line2); background: var(--surface); color: var(--muted); font-size: 12px; cursor: pointer; transition: transform .12s, background .15s; }
.tk:active { transform: scale(.9); }
.tk.today { border-color: var(--gold); color: var(--text); }
.tk.on { background: var(--gold); border-color: var(--gold); color: var(--on-gold, #1a1206); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.stats div { background: color-mix(in srgb, var(--surface2) 70%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stats b { display: block; font-family: var(--display); font-size: 22px; font-weight: 500; color: var(--gold); line-height: 1.2; }
.stats b small { font-size: 13px; color: var(--muted); }
.stats span { font-size: 12px; color: var(--faint); letter-spacing: .04em; }
.pat .pt { font-size: 14.5px; line-height: 1.55; margin: 8px 0; color: var(--muted); }
.pat .pt b { color: var(--text); font-weight: 600; }
.pat .mb { margin-right: 6px; }
.mo-rev { margin-top: 16px; }
.agenda { display: grid; gap: 6px; }
.ag-row { display: grid; grid-template-columns: 52px 150px 1fr auto; gap: 12px; align-items: center; text-align: left; background: linear-gradient(90deg, color-mix(in srgb, var(--bh) 14%, var(--surface)), var(--surface) 40%); border: 1px solid var(--line); border-left: 3px solid var(--bh); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; }
.ag-row.today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.ag-row.on { border-color: var(--gold); }
.ag-d b { display: block; font-family: var(--display); font-size: 22px; line-height: 1; }
.ag-d span { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.ag-m { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.ag-m .ag-bh { font-size: 14px; font-weight: 600; }
.ag-m small { grid-column: 2; font-size: 12px; color: var(--faint); }
.ag-c { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 14px; }
.ag-i.lu { color: var(--gold); font-weight: 600; }
.ag-i.vi { color: var(--text); }
.ag-i.faint { color: var(--faint); font-size: 13px; }
.agenda .daypanel { margin: 2px 0 10px; }
.yearstrip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ys { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); }
.ys b { font-family: var(--display); font-weight: 500; font-size: 16px; }
.ys span { display: flex; gap: 3px; flex-wrap: wrap; }
.ys .mb { font-style: normal; font-size: 10px; }
.ys.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.ys.done b::after { content: " ✓"; color: var(--gold); font-size: 12px; }
.ys-nav { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-top: 4px; }
@media (max-width: 860px) {
  .mo-cal .cal-d { min-height: 70px; }
  .mo-cal .cal-d .moonph { display: none; }
  .hm { gap: 2px; font-size: 10px; } .hm-dot { width: 7px; height: 7px; }
  .yearstrip { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); } .stats b { font-size: 18px; }
}
@media (max-width: 600px) {
  .ag-row { grid-template-columns: 40px 1fr auto; gap: 10px; padding: 10px; }
  .ag-m { grid-column: 2; } .ag-c { grid-column: 2 / 4; } .ag-row .hm { grid-row: 1; grid-column: 3; }
  .ag-d b { font-size: 19px; }
  .yearstrip { grid-template-columns: repeat(3, 1fr); }
  .mo-brief p.lead1 { font-size: 19px; }
}
.mo-visits { align-items: start; }
.visit .v-g + .v-g { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line2); }
.month .grid.g2 { align-items: start; }

/* ---------- round 14: going back, explanations, page guides, robustness ---------- */
:root { --xpw: 400px; }
.tb-back { color: var(--text); border-color: var(--line); background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 13px; font-weight: 600; padding: 6px 11px 6px 6px; gap: 4px; flex: none; }
.tb-back:hover { border-color: var(--gold); }
.tb-help { flex: none; }
.upd-pill { flex: none; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 14%, var(--surface)); color: var(--text); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; animation: fade .4s; }
.upd-pill:hover { border-color: var(--gold); }
.pagebar { display: flex; align-items: center; gap: 10px; max-width: 1080px; margin: 0 auto; padding: 22px 48px 0; }
.view:has(> .page.wide) > .pagebar, .view:has(> .page.wide) > .hint14 { max-width: 1280px; }
.pagebar ~ .page { padding-top: 22px; }
.pb-back, .pb-how { display: inline-flex; align-items: center; gap: 6px; min-width: 0; background: none; border: 1px solid var(--line2); border-radius: 99px; padding: 6px 14px 6px 9px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.pb-back span, .pb-how span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-back { max-width: 62%; }
.pb-back:hover, .pb-how:hover { color: var(--text); border-color: var(--gold); background: var(--surface); }
.pb-how { padding: 6px 14px 6px 10px; color: var(--muted); }
.pb-how svg { color: var(--gold); flex: none; }
.dp-back { margin: -4px 0 12px; }
.hint14 { max-width: 1080px; margin: 10px auto 0; padding: 0 48px; animation: fade .5s .3s both; }
.hint14 > div { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--gold) 9%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 12px; padding: 7px 8px 7px 14px; font-size: 13.5px; color: var(--muted); }
.hint14 .linkish { font-size: 13.5px; font-weight: 600; }
.h14-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent); }
.map-back { flex: none; }

/* clickable terms */
.glo { text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--gold) 72%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: .24em; text-decoration-skip-ink: none; cursor: pointer; border-radius: 3px; transition: background-color .15s, text-decoration-color .15s; -webkit-tap-highlight-color: transparent; }
.glo:hover { background: color-mix(in srgb, var(--gold) 13%, transparent); text-decoration-color: var(--gold); }
.glo:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; background: color-mix(in srgb, var(--gold) 13%, transparent); }
.glo.on { background: color-mix(in srgb, var(--gold) 20%, transparent); text-decoration-style: solid; text-decoration-color: var(--gold); }
:root[data-contrast="high"] .glo { text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

/* the explanation panel */
.xp { position: fixed; top: 0; right: 0; bottom: 0; width: var(--xpw); z-index: 50; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line2); box-shadow: -24px 0 70px -34px rgba(0,0,0,.5); animation: slidein .22s cubic-bezier(.2,.9,.3,1); }
.xp-back { display: none; }
.xp-resize { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 2; touch-action: none; }
.xp-resize::after { content: ""; position: absolute; left: 4px; top: 50%; height: 44px; margin-top: -22px; width: 2px; border-radius: 2px; background: var(--line2); transition: background .15s; }
.xp-resize:hover::after { background: var(--gold); }
html.xp-resizing, html.xp-resizing * { cursor: col-resize !important; user-select: none; }
.xp-head { display: flex; align-items: center; gap: 6px; min-height: 58px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--line); }
.xp-head .eyebrow { margin: 0; }
.xp-prev { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 60%; background: none; border: 0; padding: 6px 8px 6px 2px; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.xp-prev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-prev:hover { color: var(--text); }
.xp-gl { font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 5px 9px; border-radius: 8px; }
.xp-gl:hover { color: var(--text); background: var(--surface2); }
.xp-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 34px; }
.xp-h { font-family: var(--display); font-weight: 500; font-size: calc(36px * var(--hsm, 1)); line-height: 1.08; margin: 0 0 6px; font-size-adjust: var(--dadj); outline: none; }
.xp-plain { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.xp-short { font-family: var(--serif); font-size: calc(20px * var(--ts, 1)); line-height: 1.5; margin: 16px 0 18px; font-size-adjust: var(--sadj); color: var(--text); }
.xp-body, .xp-term .md { font-family: var(--serif); font-size: calc(17.5px * var(--ts, 1)); line-height: calc(1.66 * var(--lhm, 1)); font-size-adjust: var(--sadj); }
.xp-term .md p { margin: 0 0 12px; } .xp-term .md ul { margin: 0 0 12px; padding-left: 20px; } .xp-term .md li { margin: 4px 0; } .xp-term .md li::marker { color: var(--gold); }
.xp-you { margin: 20px 0; padding: 14px 16px 4px; border-radius: 14px; background: color-mix(in srgb, var(--gold) 8%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent); }
.xp-you .eyebrow { color: var(--gold); margin-bottom: 6px; }
.xp-sub { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin: 22px 0 8px; }
.xp-see { display: flex; flex-wrap: wrap; gap: 6px; }
.xp-see .chip { display: inline-grid; text-align: left; gap: 1px; padding: 7px 13px; color: var(--text); }
.xp-see .chip small { font-size: 11.5px; color: var(--faint); }
.xp-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.xp-q { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 15.5px; margin: 10px 0 0; }
.xp-how { margin: 0; padding-left: 0; list-style: none; counter-reset: how; display: grid; gap: 10px; }
.xp-how li { counter-increment: how; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.xp-how li::before { content: counter(how); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); margin-top: 3px; }
.xp-how .md p:last-child { margin-bottom: 0; }
@media (min-width: 1100px) { :root.xp-on .shell .main { margin-right: var(--xpw); } :root.xp-on .ask-fab { right: calc(var(--xpw) + 22px); } :root.xp-on .shell .topbar { padding-right: 18px; } }
@media (min-width: 861px) and (max-width: 1099px) { .xp { width: min(var(--xpw), 46vw); } }

/* the glossary page and the chapters list */
.gl-tools { position: sticky; top: 58px; z-index: 6; display: grid; gap: 10px; padding: 10px 0 12px; margin-bottom: 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.gl-q { max-width: 460px; }
.gl-az { display: flex; flex-wrap: wrap; gap: 2px; }
.gl-az button, .gl-az span { min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 700; }
.gl-az button { background: none; border: 0; color: var(--text); cursor: pointer; font-family: var(--sans); } .gl-az button:hover { background: var(--surface2); color: var(--gold); }
.gl-az span { color: var(--faint); opacity: .45; }
.gl-sec { scroll-margin-top: 150px; }
.gl-L { font-family: var(--display); font-weight: 500; font-size: 30px; color: var(--gold); margin: 26px 0 10px; font-size-adjust: var(--dadj); }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.gl-item { display: grid; gap: 3px; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .15s; }
.gl-item:hover { border-color: var(--gold); }
.gl-item b { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.15; font-size-adjust: var(--dadj); }
.gl-plain { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.gl-short { font-family: var(--serif); font-size: 15.5px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.rp-ch { display: grid; grid-template-columns: 36px 1fr; gap: 2px 10px; text-decoration: none; align-items: baseline; }
.rp-ch .rp-n { grid-row: span 2; font-family: var(--display); color: var(--gold); font-size: 20px; }
.rp-ch b { font-family: var(--display); font-weight: 500; font-size: 21px; font-size-adjust: var(--dadj); }
.rp-ch .faint { font-size: 12.5px; }

/* calm failure and not found */
.oops-card { max-width: 560px; margin: 30px auto; text-align: center; padding: 30px 26px; }
.oops.compact .oops-card { margin: 10px 0; padding: 22px 18px; }
.oops-mark { font-size: 30px; color: var(--gold); opacity: .8; }
.oops h2.sub { margin: 8px 0 6px; }
.nf .row .btn svg { margin-left: -4px; }

@media (max-width: 860px) {
  .topbar.has-back .tb-brand { display: none; }
  .tb-back { padding: 6px; border-color: transparent; background: none; } .tb-bl { display: none; }
  .pagebar { padding: 14px 16px 0; gap: 8px; }
  .pagebar ~ .page { padding-top: 14px; }
  .pb-back { max-width: 58%; padding: 6px 12px 6px 7px; font-size: 13px; }
  .pb-how { padding: 6px 12px 6px 9px; font-size: 13px; }
  .hint14 { padding: 0 16px; }
  .xp { top: auto; left: 0; width: auto; max-height: 84dvh; border-left: 0; border-top: 1px solid var(--line2); border-radius: 20px 20px 0 0; z-index: 81; animation: sheet .24s cubic-bezier(.2,.9,.3,1); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.45); }
  .xp-back { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(5, 6, 14, .38); animation: fade .2s; }
  .xp-resize { display: none; }
  .xp .sheet-grab { margin-bottom: 0; }
  .xp-head { min-height: 48px; padding: 2px 8px 8px 16px; }
  .xp-scroll { padding: 16px 18px 26px; }
  .xp-h { font-size: calc(31px * var(--hsm, 1)); }
  .gl-tools { top: calc(56px + env(safe-area-inset-top)); }
  .gl-az { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; } .gl-az::-webkit-scrollbar { display: none; }
  .gl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .pb-how span { display: none; } .pb-how { padding: 6px 8px; } }
@media (min-width: 1100px) and (max-width: 1500px) { :root.xp-on .ap-l, :root.xp-on .crumb .cg, :root.xp-on .crumb .cg + .sep, :root.xp-on .tb-ico kbd { display: none; } :root.xp-on .ap-btn { padding: 4px; } }
.gl-tools { margin: 0 -14px 8px; padding: 10px 14px 12px; border-radius: 0 0 16px 16px; background: color-mix(in srgb, var(--bg) 78%, transparent); }
@media (max-width: 860px) { .gl-tools { margin: 0 -16px 8px; padding: 8px 16px 10px; border-radius: 0; border-bottom: 1px solid var(--line); } }

@media (max-width: 720px) { html, body { overflow-x: clip; } }

/* sign in with an emailed code */
.lock-sent { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--muted, inherit); opacity: .9; }
.code-field { text-align: center; font-size: 28px; letter-spacing: .42em; padding-left: .42em; font-variant-numeric: tabular-nums; }
.code-field::placeholder { letter-spacing: .3em; opacity: .35; }
.code-field.shake { animation: codeShake .45s; }
@keyframes codeShake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.lock .linkish:disabled { opacity: .55; cursor: default; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .code-field.shake { animation: none; } }

.rp-ch { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.rp-ch b { flex: 1 1 auto; min-width: 0; }
.rp-ch .faint { flex: none; font-size: 13px; }
.card.rp-ch { display: block; }
.card.rp-ch b { display: block; }
.card.rp-ch .faint { display: block; margin-top: 5px; }

/* ---------- the workbook ---------- */
.wb-prog { padding: 16px 18px; }
.wb-bar { height: 6px; border-radius: 3px; background: var(--surface2); margin-top: 10px; overflow: hidden; }
.wb-bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; transition: width .3s; }
.wb-rule { margin: 6px 0 4px; border-left: 3px solid var(--gold); }
.wb-rule p { margin: 8px 0 0; }
.wb-q { display: flex; gap: 14px; margin: 12px 0; padding: 16px 18px; align-items: flex-start; }
.wb-q.ok { border-color: color-mix(in srgb, var(--teal) 55%, var(--line)); }
.wb-q.miss { border-color: color-mix(in srgb, var(--rose) 45%, var(--line)); }
.wb-n { font-family: var(--display); font-size: 22px; line-height: 1.1; color: var(--gold); min-width: 1.4em; text-align: right; }
.wb-b { flex: 1; min-width: 0; }
.wb-qt { margin: 0 0 10px; font-weight: 500; font-size: 1.02em; }
.wb-a { margin: 4px 0 12px; padding-top: 10px; border-top: 1px dashed var(--line2); }
.wb-m { gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- The Book: its own reader, set like a printed book ---------- */
.bkr { --bk-page: #f6f2e8; --bk-plate: #f1ecdf; --bk-ink: #1d1b17; --bk-ink2: #38425f; --bk-soft: #6c675c; --bk-rule: #d8d0bd; --bk-accent: #2c3a66; --bk-gold: #94763a;
  --bk-wall: #f6f2e8; --bk-earth: #e9e2d0; --bk-line: #b9b09a; --bk-warm: #b98a2e; --bk-cold: #6d7895; --bk-moon: #d9cfb6;
  position: fixed; inset: 0; z-index: 400; overflow-y: auto; background: var(--bk-page); color: var(--bk-ink);
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif; font-size: var(--bk-fs, 21px); line-height: 1.58; font-feature-settings: "liga", "onum", "kern"; -webkit-font-smoothing: antialiased; }
.bkr[data-look="stone"] { --bk-page: #e8e8e4; --bk-plate: #e1e1dc; --bk-ink: #1a1c20; --bk-ink2: #2f3d63; --bk-soft: #5e6068; --bk-rule: #c5c6c2; --bk-accent: #27386b; --bk-gold: #7a6a44; --bk-wall: #e8e8e4; --bk-earth: #d9d9d4; --bk-line: #a3a5a6; --bk-warm: #9c7a2c; --bk-cold: #63708f; --bk-moon: #cfcfc6; }
.bkr[data-look="night"] { --bk-page: #12141b; --bk-plate: #171a23; --bk-ink: #e7e2d6; --bk-ink2: #aeb8d4; --bk-soft: #8d8f9a; --bk-rule: #2b2f3d; --bk-accent: #b9c4e6; --bk-gold: #c9a968; --bk-wall: #171a23; --bk-earth: #0d0f15; --bk-line: #3a4054; --bk-warm: #e0b565; --bk-cold: #8d99bb; --bk-moon: #d9d4c6; }
.bkr ::selection { background: color-mix(in srgb, var(--bk-gold) 30%, transparent); }
.bkr a { color: var(--bk-accent); text-underline-offset: 3px; }
.bk-sc { font-family: 'Cormorant SC', 'EB Garamond', serif; font-size: .78em; letter-spacing: .14em; color: var(--bk-gold); }
.bk-fl { display: block; width: 120px; height: 12px; margin: 1.4em auto; color: var(--bk-gold); }
/* the bar: close, running head, type */
.bk-bar { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 52px; padding: 0 22px; background: color-mix(in srgb, var(--bk-page) 94%, transparent); backdrop-filter: blur(6px); font-size: 16px; }
.bk-x { justify-self: start; font-family: 'Cormorant SC', serif; letter-spacing: .12em; text-decoration: none; color: var(--bk-soft) !important; padding: 8px 0; }
.bk-x:hover { color: var(--bk-ink) !important; }
.bk-run { font-family: 'Cormorant SC', serif; letter-spacing: .16em; color: var(--bk-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-run i { font-style: normal; margin-left: .9em; padding-left: .9em; border-left: 1px solid var(--bk-rule); }
.bk-aa { justify-self: end; background: none; border: 1px solid var(--bk-rule); border-radius: 2px; color: var(--bk-ink); font: inherit; font-size: 17px; padding: 3px 11px; cursor: pointer; }
.bk-aa:focus-visible, .bk-x:focus-visible, .bk-play:focus-visible, .bk-pop button:focus-visible, .bk-toc a:focus-visible { outline: 2px solid var(--bk-accent); outline-offset: 3px; }
.bk-meter { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--bk-rule); }
.bk-meter i { display: block; height: 1px; background: var(--bk-gold); transform-origin: left; }
.bk-pop { position: absolute; right: 22px; top: 50px; width: 230px; background: var(--bk-page); border: 1px solid var(--bk-rule); padding: 16px 18px 18px; box-shadow: 0 14px 34px -18px rgba(0,0,0,.45); }
.bk-pop .bk-sc { display: block; margin-bottom: 8px; }
.bk-sw { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.bk-swb { font: inherit; font-size: 15px; padding: 9px 0; min-width: 0; text-align: center; border: 1px solid #b9b3a4; border-radius: 2px; cursor: pointer; }
.bk-swb.paper { background: #f6f2e8; color: #1d1b17; } .bk-swb.stone { background: #e8e8e4; color: #1a1c20; } .bk-swb.night { background: #12141b; color: #e7e2d6; }
.bk-swb.on { box-shadow: 0 0 0 2px var(--bk-gold); }
.bk-sz { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bk-sz button { font: inherit; font-size: 15px; background: none; color: var(--bk-ink); border: 1px solid var(--bk-rule); border-radius: 2px; padding: 5px 0; cursor: pointer; }
.bk-sz button.big { font-size: 22px; padding: 0; }
/* the sheet and its leaves */
.bk-sheet { max-width: 34em; margin: 0 auto; padding: 0 28px 16vh; }
.bk-leaf { min-height: calc(100vh - 52px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 8vh 0; }
.bk-leaf h1 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(2.6em, 9vw, 4.6em); line-height: 1.02; letter-spacing: .005em; margin: .5em 0 .1em; text-wrap: balance; }
.bk-leaf h2, .bk-comp h2 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.9em; line-height: 1.1; margin: 0; }
.bk-ded, .bk-arg { font-style: italic; font-size: 1.12em; line-height: 1.5; max-width: 25em; margin: 0; text-wrap: balance; }
.bk-tp > .bk-sc { margin-top: .2em; }
.bk-imp { margin-top: 14vh; font-size: .82em; line-height: 1.7; color: var(--bk-soft); }
.bk-yr { margin-top: 2.2em; }
.bk-epi blockquote { font-style: italic; font-size: 1.42em; line-height: 1.42; margin: 0 0 1.2em; max-width: 21em; text-wrap: balance; }
.bk-epi p { font-size: .82em; color: var(--bk-soft); margin: 0; max-width: 26em; }
.bk-how dl, .bk-toc ol { text-align: left; width: 100%; margin: .6em 0 0; padding: 0; list-style: none; }
.bk-how dt { font-family: 'Cormorant SC', serif; letter-spacing: .1em; color: var(--bk-gold); margin-top: 1.25em; }
.bk-how dd { margin: .1em 0 0; }
.bk-toc li { border-top: 1px solid var(--bk-rule); }
.bk-toc li:last-child { border-bottom: 1px solid var(--bk-rule); }
.bk-toc a, .bk-toc li > div { display: grid; grid-template-columns: 2.6em 1fr; gap: 0 .5em; padding: 1em 0; text-decoration: none; color: var(--bk-ink) !important; }
.bk-tn { font-family: 'Cormorant Garamond', serif; font-size: 1.25em; color: var(--bk-gold); }
.bk-tt b { display: block; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 1.32em; line-height: 1.15; }
.bk-tt i { display: block; font-size: .9em; line-height: 1.45; color: var(--bk-soft); margin-top: .25em; }
.bk-tt em { display: block; font-style: normal; font-family: 'Cormorant SC', serif; font-size: .74em; letter-spacing: .12em; color: var(--bk-soft); margin-top: .45em; }
.bk-toc a:hover b { color: var(--bk-accent); }
.bk-toc li.off { opacity: .62; }
/* plate */
.bk-plate { margin: 0 -8% 0; }
.bk-plate-in { border: 1px solid var(--bk-rule); padding: 10px; }
.bk-plate-in .bk-art { display: block; width: 100%; height: auto; max-height: none; }
.bk-plate figcaption { text-align: center; font-style: italic; font-size: .84em; color: var(--bk-soft); margin-top: .9em; }
.bk-prayer { animation: bk-rise 7s linear infinite; }
.bk-steam { animation: bk-breathe 4s ease-in-out infinite; }
@keyframes bk-rise { to { stroke-dashoffset: -110; } }
@keyframes bk-breathe { 50% { opacity: .35; } }
/* programme cards: music, scent */
.bk-prog { margin: 4.5em 0 0; padding: 1.5em 0 1.6em; border-top: 1px solid var(--bk-ink); border-bottom: 1px solid var(--bk-rule); font-size: .88em; line-height: 1.55; }
.bk-prog > .bk-sc { display: block; text-align: center; margin-bottom: 1.2em; font-size: .9em; }
.bk-prog-g { display: grid; grid-template-columns: 116px 1fr; gap: 1.6em; align-items: start; }
.bk-qr { background: #fff; padding: 8px; line-height: 0; border: 1px solid var(--bk-rule); }
.bk-qr svg { width: 100%; height: auto; display: block; }
.bk-sct { font-family: 'Cormorant Garamond', serif; font-size: 1.7em; line-height: 1.1; }
.bk-sca { font-style: italic; color: var(--bk-soft); margin: .1em 0 .7em; }
.bk-prog p { margin: 0 0 1em; color: var(--bk-ink); }
.bk-play { display: inline-block; font-family: 'Cormorant SC', serif; letter-spacing: .12em; text-decoration: none; color: var(--bk-page) !important; background: var(--bk-accent); padding: .45em 1em .5em; border-radius: 2px; }
.bkr[data-look="night"] .bk-play { color: #12141b !important; }
.bk-hint { margin-left: 1em; font-style: italic; color: var(--bk-soft); }
.bk-scent dl { display: grid; grid-template-columns: 4.5em 1fr; gap: .6em 1em; margin: 0 0 1.1em; }
.bk-scent dt { font-family: 'Cormorant SC', serif; letter-spacing: .1em; color: var(--bk-gold); }
.bk-scent dd { margin: 0; }
.bk-scn { font-style: italic; text-align: center; margin: 0 !important; }
/* the text */
.bk-text { margin-top: 4.5em; hyphens: auto; -webkit-hyphens: auto; }
.bk-scene { margin: 0; text-indent: 1.5em; text-align: justify; }
.bk-scene.lead { text-indent: 0; }
.bk-text > .bk-scene:first-of-type::first-letter, .bk-slug:first-child + .bk-scene::first-letter { font-family: 'Cormorant Garamond', serif; }
.bk-slug { font-family: 'Cormorant SC', serif; font-weight: 400; font-size: .86em; letter-spacing: .16em; text-align: center; color: var(--bk-ink2); margin: 3.6em 0 1.5em; hyphens: none; }
.bk-slug::before { content: ""; display: block; width: 28px; height: 1px; background: var(--bk-gold); margin: 0 auto 1.3em; }
.bk-vo { margin: 0; padding: 0 0 0 1.5em; border-left: 1px solid var(--bk-gold); color: var(--bk-ink2); font-size: .93em; line-height: 1.6; text-indent: 1.4em; text-align: justify; }
.bk-vo.open { text-indent: 0; margin-top: 1.5em; }
.bk-vo + .bk-scene, .bk-vo + .bk-q, .bk-vo + .bk-spread { margin-top: 1.5em; }
.bk-text > .bk-vo:first-child::before, .bk-card + .bk-vo::before { content: "Commentary"; display: block; font-family: 'Cormorant SC', serif; letter-spacing: .14em; font-size: .84em; color: var(--bk-gold); margin-bottom: .3em; }
.bk-q { margin: 2.3em 0; padding: 0 4%; text-align: center; hyphens: none; }
.bk-q blockquote { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 500; font-size: 1.5em; line-height: 1.28; margin: 0; text-wrap: balance; }
.bk-q blockquote::before { content: "\201C"; } .bk-q blockquote::after { content: "\201D"; }
.bk-q figcaption { font-family: 'Cormorant SC', serif; font-size: .74em; letter-spacing: .12em; color: var(--bk-soft); margin-top: .7em; }
.bk-card { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.7em; line-height: 1.15; text-align: center; margin: 3.4em 0 1.2em; hyphens: none; }
.bk-card .bk-fl { margin: 0 auto 1.1em; }
.bk-cut { font-family: 'Cormorant SC', serif; font-size: .86em; letter-spacing: .16em; text-align: right; color: var(--bk-gold); margin: 3.2em 0 0; hyphens: none; }
.bk-spread { display: grid; grid-template-columns: 1fr 1fr; margin: 2.6em -12%; min-height: 20em; hyphens: none; }
.bk-pp { display: flex; flex-direction: column; justify-content: center; padding: 2.2em 2.4em; }
.bk-pp.a { background: #0b0b0d; }
.bk-pp.a p { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.6em; line-height: 1.25; margin: 0 0 .8em; color: #f3efe6; }
.bk-pp.a span { font-family: 'Cormorant SC', serif; font-size: .7em; letter-spacing: .12em; color: #9a968c; }
.bk-pp.b { border: 1px solid var(--bk-rule); border-left: 0; }
.bk-pp.b p { margin: 0; font-size: .95em; }
/* chapters */
.bk-ch { padding-top: 5.5em; }
.bk-cht { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 2em; line-height: 1.1; text-align: center; margin: 0 0 2.2em; text-wrap: balance; }
.bk-chn { display: block; font-family: 'Cormorant SC', serif; font-size: .5em; letter-spacing: .18em; color: var(--bk-gold); margin-bottom: .9em; }
.bk-ch .bk-text { margin-top: 0; }
.bk-ch .bk-text > .bk-scene:first-child::first-letter { font-family: 'Cormorant Garamond', serif; font-size: 2.9em; line-height: 1; padding-right: .04em; color: var(--bk-ink); font-variant-caps: normal; }
.bk-ch .bk-text > .bk-scene:first-child { line-height: 1.35; margin-bottom: .2em; }
.bk-ch .bk-text > .bk-scene:first-child::first-line { font-variant-caps: small-caps; letter-spacing: .04em; }
.bk-line { text-align: center; font-size: 1.15em; margin: 1.5em 0; text-indent: 0; hyphens: none; text-wrap: balance; }
.bk-line + .bk-scene { text-indent: 0; }
.bk-brk { margin: 2em 0; }
.bk-ded-leaf .bk-ded { font-size: 1.3em; }
.bk-toc .bk-tt .bk-sc { display: block; margin-bottom: .2em; }
.bk-toc a, .bk-toc li > div { grid-template-columns: 1fr !important; }
.bk-next { display: block; text-decoration: none; margin: 0 0 2em; }
.bk-next b { display: block; font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 1.7em; letter-spacing: 0; color: var(--bk-ink); margin-top: .2em; }
.bk-next:hover b { color: var(--bk-accent); }
.bk-tbc { font-family: 'EB Garamond', serif; font-style: italic; letter-spacing: 0; font-size: 1.1em; color: var(--bk-soft); margin: 0 0 2em; }
/* appendix and colophon */
.bk-comp { margin-top: 5em; text-align: center; }
.bk-comp > .bk-sc { display: block; margin-bottom: .5em; }
.bk-tw { overflow-x: auto; text-align: left; }
.bk-comp table { width: 100%; border-collapse: collapse; font-size: .8em; line-height: 1.45; border-top: 1px solid var(--bk-ink); border-bottom: 1px solid var(--bk-ink); }
.bk-comp th, .bk-comp td { text-align: left; vertical-align: top; padding: .65em .9em .65em 0; border-bottom: 1px solid var(--bk-rule); font-weight: 400; }
.bk-comp tr:last-child th, .bk-comp tr:last-child td { border-bottom: 0; }
.bk-comp th { font-family: 'Cormorant SC', serif; letter-spacing: .08em; white-space: nowrap; color: var(--bk-ink); }
.bk-comp td:last-child { color: var(--bk-soft); font-style: italic; }
.bk-ex { text-align: left; font-size: .9em; margin: 2em 0 0; }
.bk-ex .bk-sc { display: block; margin-bottom: .2em; }
.bk-src { text-align: left; font-size: .76em; line-height: 1.5; color: var(--bk-soft); margin: 1.4em 0 0; }
.bk-colo { text-align: center; margin-top: 5em; font-family: 'Cormorant SC', serif; letter-spacing: .12em; font-size: .86em; }
@media (max-width: 760px) {
  .bkr { --bk-fs: 19px; }
  .bk-sheet { padding: 0 22px 14vh; }
  .bk-plate { margin: 0 -10px; } .bk-spread { grid-template-columns: 1fr; margin: 2.2em -22px; min-height: 0; }
  .bk-pp.b { border: 0; border-bottom: 1px solid var(--bk-rule); }
  .bk-scene, .bk-vo { text-align: left; } .bk-vo { padding-left: 1em; }
  .bk-prog-g { grid-template-columns: 92px 1fr; gap: 1.1em; } .bk-hint { display: block; margin: .7em 0 0; }
  .bk-run i { display: none; } .bk-bar { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) { .bk-prayer, .bk-steam { animation: none; } }
@media print { .bk-bar { display: none; } .bkr { position: static; overflow: visible; } }

/* labels in the interface teach too, with a quieter underline than the reading text */
.glo.glo-ui { text-decoration-color: color-mix(in srgb, var(--gold) 45%, transparent); text-decoration-thickness: 1px; text-underline-offset: .22em; }
.glo.glo-ui:hover, .glo.glo-ui:focus-visible { text-decoration-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
/* chart labels teach: tap a graha to read what it is */
svg text.tch { cursor: pointer; } svg text.tch:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* Daśā table: the five levels at a glance */
.dt { padding: 12px 0 0; max-width: 380px; overflow: hidden; }
.dt-head { display: flex; align-items: center; gap: 10px; padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
.dt-name { font-family: var(--display); font-size: 17px; flex: 1; min-width: 0; }
.dt-lv { display: flex; gap: 6px; }
.dt-lv button { width: 30px; height: 30px; border: 1px solid var(--line2); border-radius: 6px; background: transparent; color: var(--text); font: 600 13px var(--sans); cursor: pointer; }
.dt-lv button.on { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.dt-lv button:disabled { opacity: .35; cursor: default; }
.dt-step { display: flex; flex-direction: column; gap: 2px; }
.dt-step button { width: 26px; height: 14px; line-height: 12px; font-size: 8px; border: 1px solid var(--line2); border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.dt-step button:disabled { opacity: .35; }
.dt-ctx { padding: 7px 14px; font-size: 12.5px; color: var(--faint); border-bottom: 1px solid var(--line); }
.dt-list { max-height: 296px; overflow-y: auto; padding: 4px 0; }
.dt-row { display: grid; grid-template-columns: 4.4em 6.6em 1fr; gap: 12px; width: 100%; align-items: baseline; padding: 7px 14px; background: none; border: 0; color: var(--text); font: 15px/1.2 var(--sans); font-variant-numeric: tabular-nums; text-align: start; cursor: pointer; }
.dt-row:hover { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.dt-row.past { color: var(--faint); }
.dt-row.cur { font-weight: 700; background: color-mix(in srgb, var(--gold) 13%, transparent); }
.dt-l { font-weight: 600; }
.dt-d, .dt-t { direction: ltr; unicode-bidi: isolate; }
.dt-foot { padding: 9px 14px 11px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
.dt-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; margin-top: 26px; }
.dt-wrap > .dt { position: sticky; top: 76px; }
@media (max-width: 900px) { .dt-wrap { grid-template-columns: 1fr; } .dt { max-width: none; } .dt-wrap > .dt { position: static; } }

/* Face ID: a choice, never required */
.face-in { display: grid; gap: 10px; margin: 6px 0 4px; }
.face-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; font-size: 16px; }
.face-or { font-size: 12.5px; color: var(--faint); text-align: center; letter-spacing: .04em; }
.face-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; justify-items: start; }
.face-row-t { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--muted); }
.face-row-t svg { flex: none; margin-top: 1px; color: var(--gold); }
.face-offer { position: fixed; z-index: 60; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(460px, calc(100vw - 28px)); display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line2); box-shadow: 0 24px 60px -24px rgba(0,0,0,.55); animation: foIn .45s cubic-bezier(.2,.8,.2,1) both; }
.face-offer > svg { width: 30px; height: 30px; color: var(--gold); }
.face-offer b { display: block; font-size: 15.5px; } .face-offer span { font-size: 13.5px; color: var(--muted); }
.face-offer .fo-b { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@keyframes foIn { from { opacity: 0; transform: translate(-50%, 16px); } }
@media (prefers-reduced-motion: reduce) { .face-offer { animation: none; } }
