/* Oraculik mini app · "Night sky" design
 * Data colours carry meaning, not decoration: three families validated for
 * colour-vision deficiency on both surfaces (support / tension / merge),
 * a diverging weather scale, and gold reserved for "now". */

:root {
  color-scheme: dark;
  --bg-1: #120d22;
  --bg-2: #1e1538;
  --surface: #1d1731;
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .10);
  --ink: #f4effb;
  --ink-2: #c9bfdb;
  --muted: #958aa8;
  --brand: #a98bf0;
  --brand-soft: rgba(169, 139, 240, .16);
  --now: #f3c969;
  --now-ink: #2a1d05;
  --support: #199e70;
  --tension: #d95926;
  --merge: #9085e9;
  --neutral: #3a3346;
  --transit: #f3c969;
  --natal: #c9bfdb;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35);
  --serif: "Georgia", "PT Serif", "Times New Roman", serif;
  --radius: 24px;
  --app-top-inset: calc(max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) + var(--tg-content-safe-area-inset-top, 0px));
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg-1: #f3eefb;
    --bg-2: #fbf6ee;
    --surface: #fffdf8;
    --glass: rgba(255, 255, 255, .78);
    --glass-strong: #ffffff;
    --line: rgba(60, 35, 100, .10);
    --ink: #22183a;
    --ink-2: #4b4060;
    --muted: #7d7290;
    --brand: #6a46b8;
    --brand-soft: rgba(106, 70, 184, .10);
    --now: #e2a52a;
    --now-ink: #2a1d05;
    --support: #1a9a6c;
    --tension: #e05f2c;
    --merge: #5b4bc0;
    --neutral: #e3dcea;
    --transit: #b07a00;
    --natal: #4b4060;
    --shadow: 0 14px 34px rgba(60, 35, 100, .10);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg-1: #f3eefb;
  --bg-2: #fbf6ee;
  --surface: #fffdf8;
  --glass: rgba(255, 255, 255, .78);
  --glass-strong: #ffffff;
  --line: rgba(60, 35, 100, .10);
  --ink: #22183a;
  --ink-2: #4b4060;
  --muted: #7d7290;
  --brand: #6a46b8;
  --brand-soft: rgba(106, 70, 184, .10);
  --now: #e2a52a;
  --support: #1a9a6c;
  --tension: #e05f2c;
  --merge: #5b4bc0;
  --neutral: #e3dcea;
  --transit: #b07a00;
  --natal: #4b4060;
  --shadow: 0 14px 34px rgba(60, 35, 100, .10);
}

* { box-sizing: border-box; }
.hub-quick { margin:0 0 30px; }
.hub-quick-heading { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:5px 12px; margin:2px 0 16px; }
.hub-quick-heading h1 { font:normal 25px/1.2 var(--serif); letter-spacing:-.02em; margin:0; }
.hub-date { color:var(--muted); font-size:11px; white-space:nowrap; }
.teaser-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.service-teaser { --teaser-color:var(--brand); display:flex; align-items:center; gap:10px; min-width:0; min-height:108px; padding:10px; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:var(--glass); text-decoration:none; transition:background .15s,border-color .15s; }
.service-teaser:hover { background:var(--glass-strong); border-color:var(--teaser-color); }
.service-teaser:focus-visible { outline:3px solid var(--brand); outline-offset:3px; }
.teaser-art { flex:none; width:50px; min-height:76px; display:grid; place-items:center; }
.teaser-art img { display:block; max-width:100%; width:46px; height:76px; object-fit:contain; border-radius:5px; }
.teaser-art img.teaser-mascot { width:50px; height:60px; }
.teaser-copy { min-width:0; display:flex; flex-direction:column; gap:6px; }
.teaser-copy strong { font-size:14px; font-weight:650; line-height:1.3; overflow-wrap:anywhere; }
.teaser-copy>span { font-size:11.5px; color:var(--ink-2); line-height:1.4; }
.teaser-symbol { display:block; width:38px; height:38px; background:var(--teaser-color); mask-repeat:no-repeat; mask-size:contain; mask-position:center; -webkit-mask-repeat:no-repeat; -webkit-mask-size:contain; -webkit-mask-position:center; }
.teaser-symbol-gem { mask-image:url('teaser-gem.svg'); -webkit-mask-image:url('teaser-gem.svg'); }
.teaser-symbol-sun-moon { mask-image:url('teaser-sun-moon.svg'); -webkit-mask-image:url('teaser-sun-moon.svg'); }
.teaser-symbol-calendar-days { mask-image:url('teaser-calendar-days.svg'); -webkit-mask-image:url('teaser-calendar-days.svg'); }
.teaser-runes { --teaser-color:var(--support); }
.teaser-today { --teaser-color:var(--now); }
.teaser-best { --teaser-color:var(--brand); }
@media (max-width:359px) { .teaser-grid { gap:8px; } .service-teaser { padding:8px; gap:7px; } .teaser-art { width:38px; } .teaser-copy strong { font-size:13px; } .teaser-symbol { width:32px; height:32px; } }
@media (prefers-reduced-motion:reduce) { .service-teaser { transition:none; } }
.hub-section { margin:0 0 30px; }
.hub-section h2,.hub-chat h2 { font:normal 22px/1.2 var(--serif); margin:0 0 14px; }
.hub-section-note { color:var(--muted); font-size:12px; margin:-6px 0 15px; }
.hub-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.hub-card { position:relative; display:flex; text-align:left; align-items:flex-start; gap:13px; color:var(--ink); background:var(--glass); border:1px solid var(--line); border-radius:20px; padding:20px 17px; cursor:pointer; font:inherit; min-height:148px; transition:background .15s,transform .15s; }
.hub-card:hover { background:var(--glass-strong); transform:translateY(-2px); }
.hub-card:focus-visible,.app-header button:focus-visible,.app-menu button:focus-visible { outline:3px solid var(--brand); outline-offset:3px; }
.hub-icon { color:var(--brand); font:30px/1.2 var(--serif); flex:none; width:29px; text-align:center; }
.hub-card-copy { display:flex; flex-direction:column; gap:7px; }
.hub-card-copy strong { font:normal 23px/1.2 var(--serif); }
.hub-card-copy>span { font-size:13px; line-height:1.5; color:var(--ink-2); }
.hub-card-copy small { font-size:11px; color:var(--muted); margin-top:8px; }
.hub-arrow { position:absolute; top:14px; right:15px; color:var(--muted); font-size:15px; }
.hub-lila { grid-column:1/-1; min-height:156px; padding:24px; background:radial-gradient(ellipse at 100% 0%,#a38aef26,transparent 70%),var(--surface); border-color:color-mix(in srgb,var(--brand) 40%,var(--line)); }
.hub-lila .hub-icon { font-size:42px; width:48px; margin-right:5px; }
.hub-lila .hub-card-copy strong { font-size:30px; }
.hub-lila .hub-card-copy>span { max-width:350px; font-size:14px; }
.hub-lila .hub-card-copy small { color:var(--brand); }
.hub-sky .hub-card { min-height:135px; }
.hub-chat { border-top:1px solid var(--line); padding-top:24px; }
.hub-chat p { color:var(--ink-2); font-size:14px; }
.hub-device-note { padding:16px; border:1px solid var(--line); border-radius:16px; color:var(--ink-2); font-size:12px; line-height:1.6; }
.hub-footer { color:var(--muted); text-align:center; font-size:11px; margin:24px 0; }
@media (max-width:430px) {
  .hub-grid { gap:10px; }
  .hub-card { padding:18px 14px; flex-direction:column; gap:9px; }
  .hub-lila { flex-direction:row; padding:21px 18px; }
  .hub-sky .hub-card:last-child { grid-column:1/-1; flex-direction:row; min-height:100px; }
  .hub-card-copy strong { font-size:21px; }
}
@media (prefers-reduced-motion:reduce) { .hub-card { transition:none; } .hub-card:hover { transform:none; } }
html { background: var(--bg-1); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(120% 70% at 50% -10%, var(--bg-2) 0%, var(--bg-1) 62%) fixed;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--brand); }

.stars {
  position: fixed; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 9%, #fff 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 84% 32%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 41%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 52% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 61%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 7% 72%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 44% 88%, #fff 50%, transparent 51%);
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .stars { opacity: 0; } }
:root[data-theme="light"] .stars { opacity: 0; }

.app {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px calc(28px + env(safe-area-inset-bottom));
}

/* Typography ------------------------------------------------------------ */
.serif { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }
.page-title { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin: 6px 0 4px; }
.lead { color: var(--ink-2); margin: 0 0 16px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.section { margin: 26px 2px 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section h2 { margin: 0; font-family: var(--serif); font-size: 21px; }
.section .link { border: 0; background: none; color: var(--brand); font-size: 14px; font-weight: 650; padding: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.45; }

/* Oracle character + speech bubble -------------------------------------- */
.oracle { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: end; margin-bottom: 16px; }
.oracle.compact { grid-template-columns: 46px 1fr; align-items: center; }
.mascot { display: block; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(243, 201, 105, .55), 0 8px 22px rgba(144, 110, 230, .45); }
.mascot.mood-think { animation: bob 1.6s ease-in-out infinite; }
.mascot.mood-joy { animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { .mascot { animation: none !important; } }
.bubble {
  position: relative; background: var(--glass-strong); border: 1px solid var(--line);
  border-radius: 20px 20px 20px 6px; padding: 11px 14px; box-shadow: var(--shadow);
}
.bubble p { margin: 0; }
.bubble .hello { font-weight: 700; }
.bubble .line { color: var(--ink-2); font-size: 14.5px; margin-top: 2px; }

/* Day ribbon ---------------------------------------------------------------- */
.ribbon { scroll-padding-inline: 16px; display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; margin: 0 -16px 16px; padding: 2px 16px 6px; scrollbar-width: none; }
.ribbon::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 48px; scroll-snap-align: start; border: 1px solid var(--line); background: var(--glass);
  border-radius: 16px; padding: 7px 0 8px; display: grid; justify-items: center; gap: 2px; position: relative;
}
.day small { font-size: 11px; color: var(--muted); text-transform: lowercase; }
.day b { font-size: 17px; }
.day i { width: 10px; height: 10px; border-radius: 50%; background: var(--neutral); }
.day.is-selected { background: var(--ink); color: var(--bg-1); border-color: transparent; }
.day.is-selected small { color: inherit; opacity: .7; }
.day.is-window::after { content: ""; position: absolute; top: 5px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--now); }

/* Cards ----------------------------------------------------------------- */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card + .card { margin-top: 10px; }

.hero { padding: 20px 18px 16px; }
.hero h1 { font-family: var(--serif); font-size: 28px; line-height: 1.15; margin: 10px 0 10px; }
.hero .text { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); font-size: 13px; font-weight: 650; }
.pill i { width: 10px; height: 10px; border-radius: 50%; }
.hero-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.notes { display: grid; gap: 8px; margin-top: 14px; }
.note { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 10px 12px; border-radius: 16px; background: var(--brand-soft); font-size: 15px; }
.note b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.react { display: flex; gap: 8px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.react span { font-size: 13px; color: var(--muted); margin-right: auto; }
.react button { border: 1px solid var(--line); background: var(--glass-strong); border-radius: 999px; padding: 7px 13px; font-size: 14px; font-weight: 600; }
.react button.is-on { background: var(--ink); color: var(--bg-1); border-color: transparent; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.btn { border: 1px solid var(--line); background: var(--glass-strong); border-radius: 16px; padding: 13px 8px; font-weight: 650; font-size: 14px; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--brand); color: #fff; border-color: transparent; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.btn.wide { width: 100%; }

/* Storyline -------------------------------------------------------------- */
.story {
  display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--glass);
  border-radius: 22px; padding: 16px 16px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.story + .story { margin-top: 10px; }
.story::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--fam); }
.story .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 6px; }
.story h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 19px; line-height: 1.2; }
.story .why { margin: 6px 0 0; color: var(--ink-2); font-size: 14.5px; }
.story .foot .when, .story .foot .chapters + span { white-space: nowrap; }
.story .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.story svg.arc { display: block; width: 100%; height: auto; margin: 10px 0 2px; }
.fam { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fam i { width: 9px; height: 9px; border-radius: 50%; background: var(--fam); }
.status { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); white-space: nowrap; }
.status.hot { background: var(--now); color: var(--now-ink); border-color: transparent; }
.chapters { display: inline-flex; gap: 4px; align-items: center; }
.chapters i { width: 18px; height: 6px; border-radius: 3px; border: 1.5px solid var(--fam); }
.chapters i.done { background: var(--fam); }
.chapters i.now { background: var(--now); border-color: var(--now); box-shadow: 0 0 8px var(--now); }

.mini-list .row { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 12px 2px; border-top: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.mini-list .row:first-child { border-top: 0; }
.mini-list .row > i { width: 10px; height: 10px; border-radius: 50%; background: var(--fam); }
.mini-list .row b { display: block; font-weight: 650; }
.mini-list .row small { color: var(--muted); }

/* Sky tiles ---------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { border: 1px solid var(--line); background: var(--glass); border-radius: 22px; padding: 14px; text-align: left; display: grid; gap: 6px; align-content: start; }
.tile .k { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tile b { font-size: 16px; line-height: 1.25; }
.tile small { color: var(--muted); font-size: 12.5px; }
.bar { height: 5px; border-radius: 3px; background: var(--neutral); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

/* Wave (10 days) ------------------------------------------------------------ */
.wave { display: block; width: 100%; height: auto; }
.wave-caption { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.window { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--glass); border-radius: 20px; padding: 12px; }
.window + .window { margin-top: 8px; }
.window .date { text-align: center; border-radius: 14px; background: var(--brand-soft); padding: 6px 0; }
.window .date b { display: block; font-size: 20px; line-height: 1; }
.window .date small { font-size: 11px; color: var(--muted); }
details.more { margin-top: 10px; }
details.more summary { cursor: pointer; color: var(--brand); font-weight: 650; padding: 8px 2px; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
.heat { display: grid; grid-template-columns: 82px repeat(var(--days), minmax(18px, 1fr)); gap: 3px; margin-top: 8px; }
.heat .h { font-size: 10.5px; color: var(--muted); text-align: center; }
.heat .l { font-size: 11px; line-height: 1.15; color: var(--ink-2); align-self: center; }
.heat .c { min-height: 22px; border-radius: 5px; border: 0; padding: 0; position: relative; }
.heat .c.empty { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.heat .c.best::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: #fff; }

/* Me ------------------------------------------------------------------------- */
.profile { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; }
.profile h1 { margin: 0; font-family: var(--serif); font-size: 26px; }
.three { display: grid; gap: 0; padding: 6px 16px; }
.three .t { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.three .t:first-child { border-top: 0; }
.three .t .g { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--brand-soft); color: var(--brand); }
.three .t small { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.three .t b { display: block; font-family: var(--serif); font-size: 19px; }
.three .t p { margin: 0; font-size: 14px; color: var(--ink-2); }
.wheel { display: block; width: 100%; height: auto; touch-action: manipulation; }
.wheel text { font-family: "Segoe UI Symbol", "Noto Sans Symbols", "Noto Sans Symbols 2", "DejaVu Sans", system-ui, sans-serif; }
.segmented { display: inline-flex; background: var(--glass-strong); border: 1px solid var(--line); border-radius: 14px; padding: 3px; margin-bottom: 10px; }
.segmented button { border: 0; background: transparent; border-radius: 11px; padding: 6px 12px; font-size: 13px; font-weight: 650; color: var(--muted); }
.segmented button.is-on { background: var(--ink); color: var(--bg-1); }
.planet-info { min-height: 58px; margin-top: 8px; font-size: 14.5px; }
.life { display: block; width: 100%; height: auto; }
.event { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.event:first-child { border-top: 0; padding-top: 4px; }
.event .g { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: var(--brand-soft); color: var(--brand); }
.event.now .g { background: var(--now); color: var(--now-ink); }
.event b { display: block; }
.event small { color: var(--muted); }

/* Sheet ------------------------------------------------------------------------ */
.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 5, 18, .6); backdrop-filter: blur(3px); }
.sheet-body {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-radius: 28px 28px 0 0; border-top: 1px solid var(--line);
  padding: 12px 16px calc(28px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto;
  animation: up .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(40px); opacity: .3; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass-strong); display: grid; place-items: center; }
.sheet h2 { font-family: var(--serif); font-size: 26px; line-height: 1.15; margin: 8px 44px 8px 0; }
.chapter { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.chapter:first-child { border-top: 0; }
.chapter .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--fam); color: var(--fam); }
.chapter.now .n { background: var(--now); border-color: var(--now); color: var(--now-ink); }
.chapter.future .n { border-style: dashed; }
.chapter p { margin: 2px 0 0; color: var(--ink-2); font-size: 14.5px; }
.chapter .mine { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.chapter .mine button { border: 1px solid var(--line); background: var(--glass-strong); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
.chapter .mine button.is-on { background: var(--ink); color: var(--bg-1); }
details.tech { margin-top: 14px; border: 1px solid var(--line); border-radius: 18px; padding: 4px 14px; background: var(--glass); }
details.tech summary { cursor: pointer; padding: 10px 0; font-weight: 650; color: var(--ink-2); }
details.tech dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 14px; }
details.tech dt { color: var(--muted); }
details.tech dd { margin: 0; }

/* Navigation: one persistent header, a catalog that can grow. */
.app-header { position:sticky; top:0; z-index:20; padding-top:var(--app-top-inset); background:var(--bg-1); background:color-mix(in srgb,var(--bg-1) 90%,transparent); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px); border-bottom:1px solid var(--line); }
.app-header-inner { max-width:520px; min-height:76px; padding:10px 16px; margin:auto; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.app-brand { display:flex; align-items:center; gap:10px; min-width:0; padding:3px 0; border:0; background:none; text-align:left; }
.app-brand-symbol { color:var(--brand); font:30px/1 var(--serif); }
.app-brand strong { display:block; font:normal 22px/1.2 var(--serif); }
#current-section { display:block; max-width:180px; color:var(--muted); font-size:11px; line-height:1.5; }
.app-menu-toggle { flex:none; min-height:44px; display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:var(--glass); font-size:12px; font-weight:600; }
.app-menu-toggle:hover,.app-menu-toggle[aria-expanded="true"] { background:var(--brand-soft); border-color:var(--brand); }
.app-menu { position:fixed; inset:calc(var(--app-top-inset) + 86px) 0 auto; width:calc(100% - 24px); max-width:496px; max-height:calc(100vh - var(--app-top-inset) - 102px - env(safe-area-inset-bottom)); max-height:calc(100dvh - var(--app-top-inset) - 102px - env(safe-area-inset-bottom)); margin:0 auto; padding:22px; border:1px solid var(--line); border-radius:24px; color:var(--ink); background:var(--surface); box-shadow:var(--shadow); overflow:auto; overscroll-behavior:contain; }
.app-menu::backdrop { background:rgba(8,5,18,.55); backdrop-filter:blur(3px); }
.app-menu-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.app-menu-heading h2 { margin:0; font:normal 27px/1.2 var(--serif); }
.app-menu-close { flex:none; width:44px; height:44px; border:1px solid var(--line); border-radius:50%; background:var(--glass); font-size:26px; line-height:1; }
.app-menu-group { margin-top:22px; }
.app-menu-group h3 { margin:0 0 10px 3px; color:var(--muted); font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.app-menu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.app-menu-item { width:100%; min-width:0; min-height:60px; display:flex; align-items:center; gap:10px; padding:12px; text-align:left; border:1px solid var(--line); border-radius:14px; background:var(--glass); font-size:13px; line-height:1.4; }
.app-menu-icon { flex:none; width:22px; text-align:center; color:var(--brand); font:25px/1 var(--serif); }
.app-menu-item:hover { background:var(--glass-strong); }
.app-menu-item[aria-current="page"] { background:var(--brand-soft); border-color:var(--brand); }
body.menu-open { overflow:hidden; }
@media (max-width:359px) { .app-menu { padding:16px; } .app-menu-item { gap:7px; padding:10px; font-size:12px; } .app-brand strong { font-size:20px; } .app-menu-toggle { gap:6px; padding-inline:10px; } }

/* States ----------------------------------------------------------------------- */
.loading { display: grid; justify-items: center; gap: 14px; padding: 18vh 20px 0; text-align: center; color: var(--ink-2); }
.skeleton { border-radius: 22px; background: linear-gradient(90deg, var(--glass) 0%, var(--glass-strong) 50%, var(--glass) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { text-align: center; padding: 12vh 12px 0; }
.empty-state h1 { font-family: var(--serif); font-size: 26px; margin: 14px 0 6px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; background: var(--ink); color: var(--bg-1); padding: 10px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.demo { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--now); color: var(--now-ink); font-size: 11px; font-weight: 800; margin-left: 6px; vertical-align: 2px; }

/* Plans ------------------------------------------------------------------------ */
.personal { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; margin-left: 6px; vertical-align: 2px; letter-spacing: .02em; }
.plan-list { display: grid; gap: 6px; margin-top: 10px; }
.plan-list p { margin: 0; display: grid; grid-template-columns: 20px 1fr; gap: 6px; font-size: 14.5px; }
.plan-list span { color: var(--brand); font-weight: 800; }
.invite { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: start; margin-top: 12px; border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.invite b { font-family: var(--serif); font-size: 18px; }
.invite p { margin: 4px 0 0; color: var(--ink-2); }
.invite .btn { padding: 9px 14px; }
.meaning { margin-top: 14px; }
.meaning p { margin: 6px 0 0; }
a.btn { color: inherit; }
a.btn.primary { color: #fff; }

/* Explicit planets, footnotes, timeline, "when is it better" ------------------ */
.planets { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-weight: 700; font-size: 15px; margin: 2px 0 4px; }
.planets .sym { color: var(--brand); font-size: 17px; }
.planets .arrow { color: var(--muted); font-weight: 400; }
.strength { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.strength .bar i { background: var(--fam); }
.notes-src { display: grid; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.notes-src sup, .text sup { color: var(--brand); font-weight: 800; }
.gantt { display: grid; grid-template-columns: 112px 1fr; gap: 7px 8px; align-items: center; font-size: 12px; }
.gantt .lbl { line-height: 1.15; border: 0; background: none; padding: 0; text-align: left; color: var(--ink); }
.gantt .lbl small { display: block; color: var(--muted); font-size: 10.5px; }
.gantt .track { position: relative; height: 14px; border-radius: 4px; background: var(--neutral); border: 0; padding: 0; width: 100%; }
.gantt .track b { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--fam); }
.gantt .track .now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--now); }
.gantt .axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.acts { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 14px; padding: 2px 16px 6px; scrollbar-width: none; }
.acts button { flex: none; border: 1px solid var(--line); background: var(--glass); border-radius: 999px; padding: 7px 13px; font-weight: 650; font-size: 13.5px; }
.acts button.is-on { background: var(--ink); color: var(--bg-1); border-color: transparent; }
.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month .wd { text-align: center; font-size: 10.5px; color: var(--muted); }
.month .d { aspect-ratio: 1; border-radius: 10px; border: 0; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink); padding: 0; max-width: 100%; }
.month .d.empty { background: transparent; }
.month .d.today { box-shadow: inset 0 0 0 2px var(--now); }
.pick { display: grid; grid-template-columns: 54px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.pick:first-of-type { border-top: 0; }
.pick .date { text-align: center; border-radius: 14px; padding: 6px 0; font-weight: 800; }
.pick.good .date { background: color-mix(in srgb, var(--support) 22%, transparent); }
.pick.bad .date { background: color-mix(in srgb, var(--tension) 22%, transparent); }

/* 3D Oraculik on Today ------------------------------------------------------- */
.oracle3d { display: grid; gap: 4px; justify-items: center; margin-bottom: 14px; }
.stage3d { position: relative; width: min(260px, 70vw); aspect-ratio: 1; display: grid; place-items: center; }
.stage3d .c3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage3d.is-3d > .mascot { visibility: hidden; }
.stage3d > .mascot.ball { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.oracle3d .bubble { border-radius: 20px; text-align: center; width: 100%; }

/* Questionnaire -------------------------------------------------------------- */
.ob { display: grid; gap: 14px; }
.ob-head { display: grid; gap: 6px; margin: 4px 2px 12px; }
.ob-steps { display: flex; gap: 6px; }
.ob-steps i { width: 26px; height: 5px; border-radius: 3px; background: var(--neutral); }
.ob-steps i.on { background: var(--brand); }
.field { display: grid; gap: 6px; }
.field .label { font-weight: 650; font-size: 14px; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field input, .search input {
  width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-strong);
  color: var(--ink); font: inherit; font-size: 16px; padding: 10px 14px;
}
.field input:focus-visible, .search input:focus-visible, .btn:focus-visible, .place:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.field input:disabled { opacity: .45; }
.field input[aria-invalid="true"] { border-color: var(--tension); }
.err { color: var(--tension); font-size: 13px; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); }
.ob-nav { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-top: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.danger { color: var(--tension); }
.search { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.search .btn { padding-inline: 16px; }
.places { display: grid; gap: 8px; margin-top: 10px; }
.place { display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); background: var(--glass-strong); border-radius: 16px; padding: 12px 14px; }
.place.is-on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-soft); }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.kv:first-child { border-top: 0; }

/* Tarot ---------------------------------------------------------------------- */
.taro-stage { display: grid; justify-items: center; gap: 10px; margin: 2px 0 16px; }
.taro-hint { margin: 0; text-align: center; }
.tcard { position: relative; display: block; width: min(210px, 56vw); aspect-ratio: 420 / 688; padding: 0; border: 0; background: none; border-radius: 14px; perspective: 1400px; }
.tcard .in { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2, .8, .2, 1); }
.tcard.is-open .in { transform: rotateY(180deg); }
.tcard .face { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 16px 34px rgba(0, 0, 0, .42); }
.tcard .front { transform: rotateY(180deg); background: #efe6cf; }
.tcard .front img, .card-back { display: block; width: 100%; height: 100%; object-fit: cover; }
.tcard:not(.is-open):not(.ghost) .back { animation: taro-glow 2.6s ease-in-out infinite; }
@keyframes taro-glow { 50% { box-shadow: 0 16px 34px rgba(0, 0, 0, .42), 0 0 28px rgba(243, 201, 105, .5); } }
.tcard:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.tcard.ghost { opacity: .5; }
.taro-details { display: grid; gap: 10px; }
.taro-details > * { animation: taro-in .5s ease both; }
.taro-details > .card + .card { margin-top: 0; }
@keyframes taro-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .tcard .in { transition: none; }
  .tcard:not(.is-open):not(.ghost) .back, .taro-details > *, .spread-text { animation: none; }
}
.taro-body h2 { font-size: 28px; line-height: 1.15; margin: 4px 0 10px; }
.taro-body .text { margin: 12px 0 0; color: var(--ink-2); font-size: 16.5px; }
.kw { display: flex; flex-wrap: wrap; gap: 6px; }
.kw span { padding: 4px 10px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.kw .astro { background: var(--brand-soft); border-color: transparent; }
.note.shade { background: color-mix(in srgb, var(--tension) 13%, transparent); }
.taro-link p { margin: 6px 0 0; }
.taro-link .btn { margin-top: 12px; padding: 10px 14px; }
.spread-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spot { display: grid; justify-items: center; gap: 6px; text-align: center; }
.spot .tcard { width: 100%; min-width: 0; max-width: 100%; justify-self: stretch; border-radius: 9px; }
.spot small { font-size: 12.5px; color: var(--muted); font-weight: 650; }
.spread-texts { display: grid; gap: 8px; margin-top: 12px; }
.spread-text { padding: 12px 14px; border-radius: 16px; background: var(--brand-soft); animation: taro-in .4s ease both; }
.spread-text.is-hidden { display: none; }
.spread-text p { margin: 0; }
.spread-text .eyebrow { margin-bottom: 4px; }
.deck-teaser { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; }
.deck-teaser b { display: block; font-family: var(--serif); font-size: 18px; }
.deck-teaser small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.fan { position: relative; display: block; height: 76px; }
.fan img { position: absolute; top: 5px; width: 38px; height: 67px; border-radius: 5px; object-fit: cover; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.fan img:nth-child(1) { left: 0; transform: rotate(-14deg); }
.fan img:nth-child(2) { left: 18px; transform: rotate(-5deg); }
.fan img:nth-child(3) { left: 36px; transform: rotate(5deg); }
.fan img:nth-child(4) { left: 54px; transform: rotate(14deg); }
.deck-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
@media (min-width: 440px) { .deck-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.deck-card { min-width: 0; border: 0; background: none; padding: 0; display: grid; gap: 5px; align-content: start; text-align: center; font-size: 12.5px; line-height: 1.2; color: var(--ink-2); }
.deck-card span { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.deck-card img { width: 100%; height: auto; aspect-ratio: 160 / 262; border-radius: 7px; object-fit: cover; background: var(--glass-strong); box-shadow: 0 6px 14px rgba(0, 0, 0, .3); }
.card-view { display: grid; justify-items: center; margin: 6px 0 14px; }
.card-view img { width: min(200px, 54vw); height: auto; border-radius: 12px; box-shadow: 0 16px 34px rgba(0, 0, 0, .42); }
.back-link { border: 0; background: none; color: var(--brand); font-weight: 650; font-size: 14px; padding: 6px 0; }
.taro-teaser { display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: center; width: 100%; margin-top: 12px; text-align: left; font: inherit; color: inherit; }
.taro-teaser img, .taro-teaser .mini-back { display: block; width: 46px; height: 81px; border-radius: 6px; overflow: hidden; object-fit: cover; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.taro-teaser .eyebrow { display: block; }
.taro-teaser b { display: block; font-family: var(--serif); font-size: 18px; margin-top: 2px; }
.taro-teaser small { display: block; color: var(--brand); font-weight: 650; font-size: 13.5px; margin-top: 2px; }
.credit { text-align: center; margin: 22px 8px 0; }
.spread-row.many { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.spread .acts { margin: 0 -18px 12px; padding: 2px 18px 6px; }
.ask { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.ask textarea { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); font: inherit; font-size: 16px; padding: 10px 14px; resize: vertical; }
.ask textarea:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.reading { margin: 0 0 14px; padding: 14px; border-radius: 18px; background: var(--brand-soft); }
.reading-head { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; margin-bottom: 6px; }
.reading-head small { display: block; }
.reading p { margin: 8px 0 0; }
.spot { min-width: 0; }
.spot small { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; font-size: 11.5px; line-height: 1.25; }
/* Spread list, runes and the tarot/runes switch */
.spread-list { display: grid; gap: 8px; }
.spread-item { display: grid; grid-template-columns: 38px 1fr 16px; gap: 12px; align-items: center; width: 100%; text-align: left;
  border: 1px solid var(--line); background: var(--glass-strong); border-radius: 16px; padding: 11px 12px; color: inherit; }
.spread-item .n { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--brand-soft); color: var(--brand); }
.spread-item b { display: block; font-size: 15px; }
.spread-item small { display: block; color: var(--muted); font-size: 13px; }
.spread-item .go { color: var(--muted); font-size: 22px; }
.spread-item.busy { opacity: .6; }
.div-switch { display: flex; width: 100%; margin: 0 0 8px; }
.div-switch button { flex: 1; padding: 8px 12px; font-size: 14px; }
.rune { display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 4; border-radius: 40% 40% 36% 36% / 30% 30% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #8d8597, #4b4456 70%); box-shadow: inset 0 -6px 12px rgba(0,0,0,.35), 0 10px 22px rgba(0,0,0,.35); }
.rune svg { width: 46%; height: auto; fill: none; stroke: #f3c969; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(243, 201, 105, .6)); }
.rune.big { width: 92px; }
.rune-day { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: start; }
.rune-day h2 { margin: 4px 0 8px; font-size: 26px; }
.rune-day .text { color: var(--ink-2); margin: 10px 0 0; }
.rune-row { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; }
.rune-row .rune { max-width: 64px; justify-self: center; }
.rune-row .spot small { overflow-wrap: normal; hyphens: auto; font-size: 11px; }

/* Divination hub: Oraculik's invitation, the card of the day, the spread screen */
.ask-hero { margin: 4px 0 12px; border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 18%, transparent), var(--glass)); }
.ask-head { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; margin-bottom: 10px; }
.ask-head b { font-family: var(--serif); font-size: 20px; }
.ask-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ask-chips button { border: 1px solid var(--line); background: var(--glass-strong); border-radius: 999px; padding: 6px 11px; font-size: 13px; text-align: left; }
.ask-input { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-strong); color: var(--ink); font: inherit; font-size: 16px; padding: 10px 14px; resize: vertical; margin-bottom: 10px; }
.ask-input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ask-note { margin: 8px 0 0; text-align: center; font-size: 13px; font-weight: 650; color: var(--brand); }
.free-tag { font-size: 12px; font-weight: 800; color: var(--support); text-transform: uppercase; letter-spacing: .05em; }
.daily { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; }
.daily .tcard.mini { width: 92px; border-radius: 8px; }
.daily-text b { display: block; font-family: var(--serif); font-size: 19px; margin-top: 2px; }
.daily-text p:not(.eyebrow) { margin: 4px 0 6px; color: var(--ink-2); font-size: 14px; }
.daily-text .link { border: 0; background: none; padding: 0; color: var(--brand); font-weight: 650; font-size: 14px; }
.flow-head { margin: 0 0 4px; }
.flow-q { font-style: italic; }
.shuffle-wrap { display: grid; justify-items: center; gap: 16px; padding: 30px 0 10px; text-align: center; }
.shuffle { position: relative; width: 120px; height: 200px; }
.shuffle.runes { width: 90px; height: 110px; }
.shuffle .sc { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
  animation: riffle 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * -.16s); }
.shuffle.runes .sc { border-radius: 40% 40% 36% 36% / 30% 30% 40% 40%; overflow: visible; }
@keyframes riffle { 0%, 100% { transform: translateX(0) rotate(0); } 30% { transform: translateX(-46px) rotate(-10deg); } 65% { transform: translateX(46px) rotate(9deg); } }
.slots { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; margin: 10px 0 6px; }
.slot { display: grid; gap: 5px; justify-items: center; text-align: center; min-width: 0; }
.slot small { font-size: 11px; line-height: 1.25; color: var(--muted); font-weight: 650; overflow-wrap: anywhere; }
.slot-box { position: relative; display: grid; place-items: center; width: 100%; max-width: 92px; aspect-ratio: 420 / 688; border-radius: 9px; border: 1.5px dashed var(--line); }
.slots.runes .slot-box { max-width: 64px; aspect-ratio: 3 / 4; border-radius: 40% 40% 36% 36% / 30% 30% 40% 40%; }
.slot.filled .slot-box { border-color: transparent; }
.slot-n { color: var(--muted); font-weight: 800; }
.slot-box > .tcard, .slot-back { position: absolute; inset: 0; width: 100%; border-radius: inherit; }
.slot-back { overflow: hidden; animation: drop .35s ease both; }
.slot-box > .rune, .stone-btn { width: 100%; }
.stone-btn { border: 0; background: none; padding: 0; }
.stone-btn.appear { animation: drop .4s ease both; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.9); } }
.pick-hint { text-align: center; font-weight: 650; margin: 12px 0 10px; }
.pick-grid { display: grid; gap: 5px; }
.pick-grid.taro { grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 8px 0; padding: 0 8px; }
.pick-grid.runes { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pick-item { border: 0; background: none; padding: 0; min-width: 0; transform: rotate(calc(var(--r) * 1deg)); transition: transform .2s, opacity .25s; }
/* Cards lie on the table overlapping, like a spread-out deck. */
.pick-grid.taro .pick-item .card-back { display: block; width: 150%; margin-left: -25%; height: auto; aspect-ratio: 420 / 688; border-radius: 4px; box-shadow: -2px 3px 8px rgba(0, 0, 0, .45); }
.pick-item:hover, .pick-item:focus-visible { transform: translateY(-4px) rotate(calc(var(--r) * 1deg)); }
.pick-item.taken { opacity: .12; transform: translateY(-10px) scale(.9); pointer-events: none; }
.rune.blank { background: radial-gradient(circle at 35% 30%, #8d8597, #4b4456 70%); }
.reveal-status { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; margin: 16px 0; }
.reveal-status p { margin: 0; color: var(--ink-2); }
.answer-box { margin-top: 14px; }
.oracle-invite { grid-template-columns: 56px 1fr; border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
@media (prefers-reduced-motion: reduce) { .shuffle .sc, .slot-back, .stone-btn.appear { animation: none; } }
/* First paint, shortcuts and export preview keep the existing visual language. */
.launch-welcome { min-height: 65vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.launch-welcome img { object-fit: contain; filter: drop-shadow(0 0 32px #af8bd244); }
.launch-welcome h1 { font: 38px Georgia, serif; margin: 20px 0 8px; }
.launch-welcome p { margin: 0 0 24px; opacity: .75; }
.launch-welcome span { font-size: 13px; opacity: .55; }
.home-shortcut { width: 100%; margin: 18px 0; }
.home-shortcut[hidden] { display: none; }
.share-preview img { display: block; width: 100%; max-height: 55vh; object-fit: contain; margin: 16px auto; border-radius: 12px; }
.author-reading p { margin: 8px 0 0; color: var(--ink-2); }

/* Reversed tarot cards and the large view */
img.rev { transform: rotate(180deg); }
.rev-note { margin: 4px 0 8px; padding: 8px 12px; border-radius: 12px; background: rgba(180, 140, 255, .12); color: var(--muted, #b6abd3); font-size: 14px; }
.zoom-btn { display: grid; justify-items: center; padding: 0; border: 0; background: none; cursor: zoom-in; }
.card-view small { margin-top: 6px; font-size: 12px; }
.zoom { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto 1fr auto; background: #0b0618; animation: zoom-in .2s ease-out; }
.zoom-stage { overflow: auto; display: grid; place-items: center; padding: 8px; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; }
.zoom-stage img, .zoom-stage svg { display: block; max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); cursor: zoom-in; }
.zoom.is-big .zoom-stage { place-items: start; }
.zoom-stage svg { width: min(100vw - 16px, 100vh - 110px); }
.zoom.is-big .zoom-stage svg { width: 200vw; max-width: none; max-height: none; }
.zoom.is-big .zoom-stage img { max-width: none; max-height: none; width: 200vw; border-radius: 0; cursor: zoom-out; }
.zoom-close { justify-self: end; margin: max(10px, env(safe-area-inset-top)) 12px 0 0; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 40px; }
.zoom-caption { margin: 6px 16px max(12px, env(safe-area-inset-bottom)); text-align: center; color: #d9d0f3; font-size: 14px; }
@keyframes zoom-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .zoom { animation: none; } }

/* Night-sky wheel in «Моя карта» and «Показать на карте» */
:root { --birth: #8fc8ff; --wheel-bg: rgba(10, 6, 26, .55); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --birth: #2f6fb0; --wheel-bg: rgba(255, 255, 255, .6); } }
:root[data-theme="light"] { --birth: #2f6fb0; --wheel-bg: rgba(255, 255, 255, .6); }
.chart-block .wheel { display: block; width: 100%; height: auto; margin: 6px auto 0; }
.wheel-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
.wheel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wheel-legend .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid; }
.wheel-legend .bar { width: 16px; height: 4px; border-radius: 2px; }
.chart-block .small-btn { display: block; margin: 8px auto 4px; padding: 7px 14px; font-size: 13px; }
.link-list { display: grid; gap: 8px; }
.link-card { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; width: 100%; padding: 10px 12px; text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--fam); border-radius: 14px; background: var(--glass); color: inherit; font: inherit; cursor: pointer; }
.link-card.is-on { background: color-mix(in srgb, var(--fam) 16%, transparent); }
.link-card .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--fam); color: #14092a; font-weight: 800; font-size: 13px; }
.link-card b { display: block; font-size: 15px; }
.link-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.link-card em { display: block; margin-top: 4px; font-style: normal; font-weight: 700; font-size: 12px; color: var(--fam); }
