/* ═══════════════════════════════════════
   WOBAZI — Intent paths (app/paths.js)
   Everything is scoped to #results.path-on or to the new blocks, so nothing changes when the layer
   is off. A path's own colour (--band-*: Self sapphire blue, Wealth jade green, Love moon rose) appears
   only in the top banner and on its card in the dialog. Everything else uses the site's gold and
   orange (--path-accent, --path-grad, --path-soft) for buttons and selected states, and neutral
   text and fills for the rest. Bump ?v= in app/index.html on every change.
═══════════════════════════════════════ */

#results, .path-dialog {
  --path-accent: var(--gold); --path-soft: var(--gold-dim); --path-on-accent: var(--on-gold);
  --path-grad: linear-gradient(135deg, #f0c040, #e08020); --path-aura: rgba(224, 128, 32, 0.22);
  --path-neutral: color-mix(in srgb, var(--text) 7%, transparent);
  --path-bar-bg: rgba(7, 7, 15, 0.8);
}
#results, .path-pick, .path-menu-btn { --band-on: #0d0716; }
#results[data-path="self"], .path-pick[data-path="self"], .path-menu-btn[data-path="self"] {
  --band-accent: #9CC4FF; --band-grad: linear-gradient(120deg, #9CC4FF, #5B8DEF); --band-aura: rgba(91, 141, 239, 0.32); --band-soft: rgba(91, 141, 239, 0.14);
}
#results[data-path="career"], .path-pick[data-path="career"], .path-menu-btn[data-path="career"] {
  --band-accent: #7FE3B0; --band-grad: linear-gradient(120deg, #7FE3B0, #2FBF84); --band-aura: rgba(47, 191, 132, 0.28); --band-soft: rgba(47, 191, 132, 0.14);
}
#results[data-path="love"], .path-pick[data-path="love"], .path-menu-btn[data-path="love"] {
  --band-accent: #FFA9C0; --band-grad: linear-gradient(120deg, #FFA9C0, #F0648E); --band-aura: rgba(240, 100, 142, 0.3); --band-soft: rgba(240, 100, 142, 0.14);
}
body.light-mode #results, body.light-mode .path-dialog { --path-on-accent: #fff; --path-bar-bg: rgba(232, 232, 236, 0.86); }
body.light-mode #results, body.light-mode .path-pick, body.light-mode .path-menu-btn { --band-on: #fff; }
body.light-mode #results[data-path="self"], body.light-mode .path-pick[data-path="self"], body.light-mode .path-menu-btn[data-path="self"] {
  --band-accent: #1F4FB8; --band-grad: linear-gradient(120deg, #1F4FB8, #2F62D0); --band-aura: rgba(31, 79, 184, 0.16); --band-soft: rgba(31, 79, 184, 0.1);
}
body.light-mode #results[data-path="career"], body.light-mode .path-pick[data-path="career"], body.light-mode .path-menu-btn[data-path="career"] {
  --band-accent: #0B6B48; --band-grad: linear-gradient(120deg, #0B6B48, #0E7F56); --band-aura: rgba(14, 127, 86, 0.16); --band-soft: rgba(14, 127, 86, 0.1);
}
body.light-mode #results[data-path="love"], body.light-mode .path-pick[data-path="love"], body.light-mode .path-menu-btn[data-path="love"] {
  --band-accent: #A81850; --band-grad: linear-gradient(120deg, #A81850, #C42A68); --band-aura: rgba(168, 24, 80, 0.14); --band-soft: rgba(168, 24, 80, 0.09);
}

/* ── The layer: a site has its own nav (the pills under its banner) and shows only the sections
   its page lists ── */
body.path-mode #app-bottom-nav,
#results.path-on .results-tab-bar,
#results.path-on .results-toc-bar,
#results.path-on #tab-nav,
#results.path-on #context-strip,
#results.path-on #hero-card { display: none !important; }
#results.path-on[data-page="today"] #hero-card { display: block !important; order: 1; }
#results.path-on .section[data-tab]:not(.path-show) { display: none !important; }
#results.path-on .section.path-show { display: block !important; order: 2; }
#results.path-on.rel-detail-open #toc-person { display: block !important; }
#results.path-on:not([data-page="overview"]) #portal-keep { display: none; }
#results.path-on #path-view:empty, #results.path-on #path-top:empty { display: none; }

#results.path-on .scroll-body {
  display: flex; flex-direction: column; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  /* The night sky: an aura over the top of the page and a few fixed stars. Doesn't scroll with the content. */
  background-image:
    radial-gradient(1px 1px at 12% 90px, var(--text), transparent),
    radial-gradient(1.5px 1.5px at 82% 150px, var(--text), transparent),
    radial-gradient(1px 1px at 64% 60px, var(--text), transparent),
    radial-gradient(1px 1px at 33% 210px, var(--text), transparent),
    radial-gradient(130% 380px at 50% -60px, rgba(120, 110, 200, 0.1), transparent 72%);
  background-repeat: no-repeat;
}
#results.path-on .scroll-body > * { order: 9; flex-shrink: 0; }
#results.path-on #focus-bar { order: -4; } /* Focus (All · Self · Wealth · Love) leads every path page */
#results.path-on #path-bar { order: -3; margin-bottom: 24px; padding-bottom: 4px; } /* room between the banner and the page's first heading */
#results.path-on #path-top { order: -2; }
#results.path-on #res-you-hero.path-show { order: -2; margin-bottom: 14px; }
#results.path-on #res-you-hero .you-hero { margin-top: 0; }
#results.path-on[data-page="fengshui"] #birthplace-section { order: 3; }
#results.path-on #path-view { order: -1; }
#results.path-on #portal-keep { order: 3; }
#results.path-on #path-foot { order: 8; }

/* ── Reveal ── */
.path-reveal { padding: 20px 0 4px; }
.path-eyebrow {
  display: flex; align-items: center; gap: 2px; margin: 0 0 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--m6);
}
.path-reveal-line { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.25; color: var(--text); }

/* ── Dialog ── */
.path-dialog {
  position: fixed; inset: 0; z-index: 8000; display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  background: radial-gradient(90% 70% at 50% 35%, rgba(70, 44, 140, 0.45), transparent 75%), rgba(4, 4, 10, 0.82);
}
.path-dialog-card {
  position: relative; width: min(460px, 100%); padding: 22px 20px 12px;
  background: var(--bg-card); border: 1px solid var(--m25); border-radius: var(--radius-lg); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55); outline: none;
}
.path-dialog .path-reveal { padding: 0 0 14px; --path-accent: var(--gold); }
.path-dialog .path-reveal-line { font-size: 22px; }
.path-dialog-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; background: none; border: 0; color: var(--m6); font-size: 15px; cursor: pointer; }
.path-focus { margin: 0 0 14px; padding-right: 28px; font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--text); }
.path-cards { display: flex; flex-direction: column; gap: 10px; }
.path-pick {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 8px 14px 8px 8px;
  background: var(--bg); border: 0; border-radius: var(--radius-md);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.path-pick { background-image: radial-gradient(120% 160% at 0% 50%, var(--band-soft), transparent 70%); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.path-pick:focus-visible, .path-pick.is-on { box-shadow: 0 0 22px var(--band-aura); background-color: var(--band-soft); outline: none; }
@media (hover: hover) { .path-pick:hover { box-shadow: 0 0 22px var(--band-aura); background-color: var(--band-soft); outline: none; } }
.path-pick .path-glyph { color: var(--band-accent); filter: drop-shadow(0 0 7px var(--band-aura)); }
.path-glyph { flex: none; width: 56px; height: 56px; overflow: visible; color: var(--path-accent); filter: drop-shadow(0 0 7px var(--path-aura)); }
.path-glyph text { font-family: 'Noto Serif SC', serif; font-size: 34px; font-weight: 700; }
.path-glyph-orbit { transform-box: view-box; transform-origin: 50% 50%; animation: pathOrbit 60s linear infinite; }
@keyframes pathOrbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .path-glyph-orbit { animation: none; } }
.path-pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.path-pick-name { font-size: 16px; font-weight: 600; color: var(--band-accent); }
.path-pick-sub { font-size: 13px; line-height: 1.35; color: var(--m6); }
.path-link {
  display: block; min-height: 44px; margin: 4px auto 0; padding: 10px 8px;
  background: none; border: 0; color: var(--m6); font: inherit; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
@media (hover: hover) { .path-link:hover { color: var(--text); } }

/* ── A site's own header and pages ── */
#path-bar { position: sticky; top: 0; z-index: 6; margin: 0 -16px; padding: 2px 16px 0; background: var(--path-bar-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#path-bar:empty { display: none; }
/* The banner is the one loud thing on the page: a solid band in the path's colour. */
/* On a path the app header is the banner: one band in the path's colour with the 八字 mark, the
   path's name and Switch path; the logo, greeting and edit link step aside, the account menu stays. */
#path-head { display: none; }
/* The logo stays: the path banner no longer takes the header (app/paths.js mount), so it never steps aside. */
#results.path-on #path-head.path-brand:not(:empty) { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--band-on); }
#results.path-on .results-header:has(> .path-brand:not(:empty)) {
  background-image: var(--band-grad); border-bottom: 0; box-shadow: 0 6px 24px var(--band-aura);
}
/* The full site's path chooser: a round icon by the account menu, ringed in the three paths' colours. */
.path-choose-btn {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; padding: 0;
  border: 1.5px solid transparent; border-radius: 50%; color: var(--text); cursor: pointer;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box, conic-gradient(from 200deg, #5B8DEF, #2FBF84, #F0648E, #5B8DEF) border-box;
  box-shadow: 0 0 14px rgba(160, 120, 240, 0.25); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) { .path-choose-btn:hover { transform: translateY(-1px); box-shadow: 0 0 18px rgba(160, 120, 240, 0.4); } }
.path-choose-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#results.path-on .path-choose-btn { display: none; }
.path-mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: none; border: 0; cursor: pointer; }
.path-mark img { display: block; width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }
.path-brand .path-mark:focus-visible { outline: 2px solid var(--band-on); outline-offset: 2px; border-radius: 10px; }
.path-brand-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.path-brand-name { overflow: hidden; font-size: 20px; font-weight: 700; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.path-brand-sub { display: none; font-size: 13px; line-height: 1.3; opacity: 0.85; }
.path-switch-btn {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 14px;
  background: var(--path-soft); border: 0; border-radius: 999px;
  color: var(--path-accent); font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: opacity 0.2s ease;
}
@media (hover: hover) { .path-switch-btn:hover { opacity: 0.85; } }
.path-brand .path-switch-btn { min-height: 36px; padding: 0 12px; background: var(--band-on); color: var(--band-accent); }
.path-switch-btn:focus-visible { outline: 2px solid var(--path-accent); outline-offset: 2px; }
.path-switch-ic { flex: none; }
.path-nav { display: flex; gap: 2px; padding: 8px 0; overflow-x: auto; scrollbar-width: none; }
.path-nav::-webkit-scrollbar { display: none; }
.path-seg { position: relative; flex: 0 0 auto; min-height: 30px; padding: 0 10px; background: none; border: 0; border-radius: 999px; color: var(--m6); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.path-seg::after { content: ''; position: absolute; inset: -6px 0; } /* 42px to tap, 30px to look at */
.path-seg.is-on { background: var(--path-soft); color: var(--path-accent); font-weight: 600; }
.path-seg:focus-visible { outline: 2px solid var(--path-accent); outline-offset: 2px; }
#path-foot { margin-top: 8px; }

/* The pills scroll, the Oracle stays pinned beside them in its bottom-nav colours. */
.path-nav-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.path-nav-row .path-nav { flex: 1; min-width: 0; }
.path-oracle-pill {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 12px;
  background: linear-gradient(90deg, #7c3aed, #db2777, #2563eb, #7c3aed) 0 0 / 300% 100%; border: 0; border-radius: 999px;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.55); color: #fff; font: inherit; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer;
  animation: pathOracleFlow 6s linear infinite;
}
.path-oracle-pill svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.path-oracle-pill::after { content: ''; position: absolute; inset: -6px 0; }
.path-oracle-pill:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@keyframes pathOracleFlow { to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { .path-oracle-pill { animation: none; } }

/* "All of Wobazi" closes the path list: the site's gold, no path colour. */
.path-pick-all { --band-accent: var(--gold); --band-soft: rgba(240, 192, 64, 0.1); --band-aura: rgba(240, 192, 64, 0.3); min-height: 64px; background-image: none; }
.path-all-logo { flex: none; width: 44px; height: 44px; margin: 0 6px; border-radius: 10px; }

/* ── Cards ── */
#path-view { padding-top: 0; }
.path-card { margin-bottom: 14px; padding: 16px; background: var(--bg-card); border-radius: var(--radius-md); min-width: 0; }
.path-head { display: flex; align-items: center; gap: 2px; margin: 0 0 10px; }

.path-title { margin: 0 0 8px; line-height: 1.25; color: var(--text); }
.path-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--m8); }
.path-extra { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.path-note { margin: 10px 0 0; font-size: 12px; color: var(--m5); }
.path-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.path-tag { padding: 4px 10px; background: var(--path-neutral); border-radius: 999px; font-size: 13px; color: var(--text); }
.path-month { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: 14px; line-height: 1.45; color: var(--m7); }
.path-month strong { color: var(--text); font-weight: 600; }
.path-month-name { font-size: 12px; color: var(--m5); }
.path-inline { padding: 0; background: none; border: 0; color: var(--path-accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* Cloned modules keep their own styles but sit flush inside the card. */
.path-card .decades-card, .path-card .career-card { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.path-card .luck-bar { overflow-x: auto; }
.path-card .radar-svg { max-width: 240px; }
.path-card .soul-card { margin: 0; }

/* ── Next action + Oracle ── */
.path-cta {
  display: inline-block; max-width: 100%; min-height: 48px; padding: 12px 28px; background-image: linear-gradient(135deg, #f0c040, #e08020); border: 0; border-radius: 100px; box-shadow: 0 0 20px rgba(224, 128, 32, 0.3);
  color: var(--on-gold); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.path-cta:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.path-chips { display: flex; flex-direction: column; gap: 8px; }
.path-chip {
  min-height: 44px; padding: 10px 14px; background: var(--path-neutral); border: 0; border-radius: var(--radius-sm);
  color: var(--text); font: inherit; font-size: 14px; line-height: 1.35; text-align: left; cursor: pointer;
}
.path-chip:focus-visible { box-shadow: inset 0 0 0 2px var(--path-accent); outline: none; }
@media (hover: hover) { .path-chip:hover { box-shadow: inset 0 0 0 2px var(--path-accent); outline: none; } }
.path-more { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 20px; padding: 0 0 8px; }
.path-more { align-items: center; }
.path-more .path-link { margin: 0; }


/* ── The chart in this path's words ── */
.path-page-title { margin: 0 0 16px; }
.path-lens-row { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid var(--border); }
.path-lens-row:first-of-type { padding-top: 0; border-top: 0; }
.path-lens-row:last-child { padding-bottom: 0; }
.path-lens-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.path-lens-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.path-el-ic {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  background: color-mix(in srgb, var(--el) 34%, transparent);
  color: var(--text); font-family: 'Noto Serif SC', serif; font-size: 14px; font-weight: 700; line-height: 1;
}
.path-lens-tag { flex: none; font-size: 12px; color: var(--m5); }
.path-pillar-row { flex-direction: row; align-items: flex-start; gap: 12px; }
.path-lens-chars { flex: none; display: flex; flex-direction: column; align-items: center; width: 30px; font-family: 'Noto Serif SC', serif; font-size: 21px; font-weight: 700; line-height: 1.2; }
.path-pillar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; color: var(--text); }
.path-pillar-text strong { font-weight: 600; }

/* ── My chart: at a glance ── */

.path-medal-row { display: flex; align-items: center; gap: 14px; }
.path-medal {
  flex: none; display: flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--el) 42%, transparent), color-mix(in srgb, var(--el) 10%, transparent));
  box-shadow: 0 0 22px color-mix(in srgb, var(--el) 40%, transparent);
  color: var(--text); font-family: 'Noto Serif SC', serif; font-size: 36px; font-weight: 700; line-height: 1;
}
.path-medal-text { display: flex; flex-direction: column; min-width: 0; }
.path-medal-text .path-eyebrow { margin-bottom: 2px; }
.path-medal-line { font-size: 19px; font-weight: 600; line-height: 1.25; color: var(--text); }
.path-stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.path-stat-label { font-size: 11px; line-height: 1.25; color: var(--m6); }
.path-stat-value { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }

/* ── My chart: the four pillars ── */
#path-view > .section { margin: 22px 0 14px; }
.path-under { margin-top: 12px; }
.path-card > .path-under:first-child { margin-top: 0; border-top: 0; }
.path-card > .path-under:first-child .path-lens-row:first-of-type { padding-top: 0; border-top: 0; }
.path-under .path-lens-row:first-of-type { padding-top: 10px; border-top: 1px solid var(--border); }
.path-key-tag { margin-left: 8px; padding: 1px 8px; background: var(--path-soft); border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--path-accent); white-space: nowrap; }

/* ── Best dates: best time of day ── */
#power-hours { margin-top: 14px; }
/* The chart in plain words under the full site's sections; a path shows its own wording instead. */
.site-read { margin-top: 14px; }
.site-read:empty, #results.path-on .site-read { display: none; }
#res-daymaster .site-read { margin-top: 0; }
.site-read .path-card { margin-bottom: 0; }
#power-hours:empty { display: none; }
.path-hours { margin-bottom: 14px; }
.path-hours-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-bottom: 12px; }
.path-hours-head .path-head { margin: 0; }
.path-hours-warn { margin: 0 0 12px; padding: 8px 12px; background: var(--path-neutral); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.45; color: var(--m8); }
.path-hours-split { display: flex; flex-direction: column; gap: 18px; }
.path-hours-wheel { min-width: 0; }
.path-hour-wheel { display: block; width: 100%; max-width: 310px; margin: 0 auto; overflow: visible; filter: drop-shadow(0 0 20px var(--path-aura)); }
.path-hb-ticks { animation: none; }
.path-hb { cursor: pointer; outline: none; }
.path-hb path { fill: transparent; transition: fill 0.2s ease; }
.path-hb text { fill: var(--m6); font-family: 'Noto Serif SC', serif; font-size: 15px; font-weight: 600; pointer-events: none; }
.path-hb.is-best path { fill: url(#path-hb-glow); }
.path-hb.is-best text { fill: var(--path-accent); font-size: 17px; font-weight: 700; }
.path-hb.is-good path { fill: var(--path-accent); fill-opacity: 0.08; }
.path-hb.is-good text { fill: var(--text); }
.path-hb.is-avoid text { fill: var(--m3, var(--m35)); opacity: 0.55; text-decoration: line-through; }
@media (hover: hover) { .path-hb:hover path { fill-opacity: 0.16; } }
.path-hb.is-sel text { fill: var(--text); }
.path-hb:focus-visible path { stroke: var(--path-accent); stroke-width: 1.5; }
.path-hb-tick { fill: var(--m5); font-size: 9.5px; font-weight: 500; letter-spacing: 0.04em; }
.path-hb-time { fill: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.path-hb-tier { fill: var(--path-accent); font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.path-hb-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; font-size: 12px; color: var(--m6); }
.path-hb-key { display: inline-flex; align-items: center; gap: 6px; }
.path-hb-key i { width: 9px; height: 9px; border-radius: 50%; }
.path-hb-key.is-best i { background: var(--path-accent); box-shadow: 0 0 6px var(--path-aura); }
.path-hb-key.is-good i { background: var(--path-accent); opacity: 0.4; }
.path-hb-key.is-plain i { border: 1px solid var(--m35); }
.path-hb-key.is-avoid i { background: none; border: 1px solid var(--m25); opacity: 0.7; }
.path-hours-list { display: flex; flex-direction: column; min-width: 0; }
.path-hours-list > .path-eyebrow { margin-bottom: 6px; }
.path-time { display: flex; flex-direction: column; gap: 3px; width: 100%; min-height: 56px; padding: 11px 12px; background: none; border: 0; border-top: 1px solid var(--border); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.path-time:focus-visible { box-shadow: inset 0 0 0 2px var(--path-accent); outline: none; }
.path-time.is-on { background: var(--path-soft); }
@media (hover: hover) { .path-time:hover { background: var(--path-soft); } }
.path-time-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.path-time-top b { font-size: 15px; font-weight: 500; color: var(--m8); font-variant-numeric: tabular-nums; }
.path-time-tier { flex: none; font-size: 15px; font-weight: 700; letter-spacing: var(--t-track, 0.12em); text-transform: uppercase; color: var(--m8); }
.path-time-tier.is-best { color: var(--path-accent); }
.path-time-why { font-size: 13px; line-height: 1.4; color: var(--m7); }
.path-hour-detail { margin: 12px 0 0; padding: 10px 12px; background: var(--path-neutral); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.45; color: var(--m8); }
.path-hour-detail strong { color: var(--text); font-weight: 600; }
.path-hours-list .path-note { margin-top: 14px; }

/* ── Feng Shui ── */
.path-fs-hero { text-align: center; }
.path-luopan { display: block; width: 100%; max-width: min(330px, 32dvh); margin: 0 auto; overflow: visible; filter: drop-shadow(0 0 22px var(--path-aura)); }
.path-lp-ring { fill: none; stroke: var(--path-accent); stroke-opacity: 0.45; stroke-width: 0.75; }
.path-lp-ticks { transform-box: view-box; transform-origin: 50% 50%; animation: pathOrbit 180s linear infinite; }
.path-lp-ticks line { stroke: var(--path-accent); stroke-opacity: 0.4; stroke-width: 0.6; }
.path-lp-ticks line.is-long { stroke-opacity: 0.85; stroke-width: 1; }
.path-lp-trigrams line { stroke: var(--path-accent); stroke-opacity: 0.8; stroke-width: 2.4; stroke-linecap: round; }
.path-lp-spokes line { stroke: var(--path-accent); stroke-opacity: 0.2; stroke-width: 0.6; }
.path-lp-sector path { fill: transparent; }
.path-lp-sector.is-good path { fill: var(--path-accent); fill-opacity: 0.09; }
.path-lp-sector.is-sel path { fill: url(#path-lp-glow); fill-opacity: 1; }
.path-lp-dir { fill: var(--text); font-size: 13px; font-weight: 600; }
.path-lp-sector.is-less .path-lp-dir { fill: var(--m5); font-size: 11px; font-weight: 500; }
.path-lp-star { fill: var(--path-accent); font-family: 'Noto Serif SC', serif; font-size: 11px; letter-spacing: 0.08em; }
.path-lp-sector.is-sel .path-lp-star { fill: var(--text); }
.path-lp-hub { fill: var(--bg-card); stroke: var(--path-accent); stroke-width: 1; }
.path-lp-kua { fill: var(--path-accent); font-family: 'Noto Serif SC', serif; font-size: 32px; font-weight: 700; }
.path-lp-num { fill: var(--m7); font-size: 9px; font-weight: 600; letter-spacing: 0.18em; }
.path-lp-needle { transform-box: view-box; transform-origin: 50% 50%; transform: rotate(var(--a)); animation: pathNeedle 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.path-lp-needle path { fill: var(--path-accent); }
.path-lp-needle line { stroke: var(--path-accent); stroke-width: 1.5; stroke-linecap: round; }
@keyframes pathNeedle { from { transform: rotate(var(--from)); } to { transform: rotate(var(--a)); } }
@media (prefers-reduced-motion: reduce) { .path-lp-ticks, .path-lp-needle { animation: none; } }
.path-hb-key.is-lp-good i { background: var(--path-accent); opacity: 0.45; border-radius: 50%; }
.path-hb-key.is-lp-less i { border: 1px solid var(--m35); border-radius: 50%; }
/* The luopan carries the Kua number here, so the older card keeps only its words. */
#results.path-on .kua-compass-wrap { display: none; }
.path-fs-stage { display: flex; flex-direction: column; gap: 12px; }
.path-fs-dial { min-width: 0; }
.path-fs-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; text-align: left; }
.path-fs-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.path-fs-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; min-height: 60px; padding: 8px 2px 6px; background: none; border: 0; border-radius: var(--radius-sm); color: var(--m7); font: inherit; font-size: 12px; font-weight: 500; line-height: 1.2; text-align: center; cursor: pointer; }
@media (hover: hover) { .path-fs-tile:hover { background: var(--path-neutral); } }
.path-fs-tile.is-on { background: var(--path-soft); color: var(--path-accent); font-weight: 600; }
.path-fs-tile:focus-visible { box-shadow: inset 0 0 0 2px var(--path-accent); outline: none; }
.path-fs-ic { flex: none; width: 24px; height: 24px; }
.path-fs-detail { display: flex; flex-direction: column; gap: 3px; padding: 2px 4px 0; }
.path-fs-detail .path-eyebrow { margin: 0; }
.path-fs-answer { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--text); }
.path-fs-stars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* ── Power Days calendar: the top 3 dates, on every screen that draws the calendar ── */
.cal-day.cal-top { box-shadow: inset 0 0 0 2px #93c5fd, 0 0 7px rgba(96, 165, 250, 0.35); }
.cal-day.cal-top::after {
  content: '★'; position: absolute; top: -6px; right: -6px; z-index: 1; width: 18px; height: 18px; border-radius: 50%;
  background: #60a5fa; color: #fff; box-shadow: 0 0 6px rgba(96, 165, 250, 0.6);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; text-decoration: none; text-shadow: none;
}
.cal-legend-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.cal-legend-star { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 6px rgba(96, 165, 250, 0.6); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
body.light-mode .cal-day.cal-top { box-shadow: inset 0 0 0 2px #1d4ed8, 0 0 7px rgba(29, 78, 216, 0.25); }
body.light-mode .cal-day.cal-top::after, body.light-mode .cal-legend-star { background: #1d4ed8; }

/* ── My chart: the Day Master card ── */
.path-identity-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.path-identity-body .path-title { margin-top: 2px; }
.path-yinyang { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.path-yinyang .yinyang-card { padding: 0; background: none; border: 0; box-shadow: none; }

/* ── Feng Shui: the basics ── */
.path-guide-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.path-guide-pill { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; background: var(--path-neutral); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; line-height: 1.25; text-align: center; color: var(--text); }
.path-guide-ic { flex: none; width: 22px; height: 22px; color: var(--path-accent); }
.path-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.path-plans-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.path-plan-tile { margin: 0; text-align: center; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--text); }
.path-plan-tile figcaption { margin-top: 6px; }
.path-plan { display: block; width: 100%; max-width: 170px; margin: 0 auto; }
.path-plan-room { stroke: color-mix(in srgb, var(--path-accent) 22%, transparent); stroke-width: 0.8; }
.path-plan.is-bad .path-plan-room { stroke: rgba(249,168,184,0.22); }
.path-plan-star { fill: #fff; opacity: 0.55; }
.path-plan-gap { stroke: var(--bg-card); stroke-width: 3; }
.path-plan-door { fill: none; stroke: color-mix(in srgb, var(--path-accent) 45%, transparent); stroke-width: 0.9; stroke-dasharray: 1.5 2.5; }
.path-plan.is-bad .path-plan-door { stroke: rgba(249,168,184,0.5); }
.path-plan-item { fill: rgba(255,255,255,0.03); stroke: rgba(240,240,255,0.42); stroke-width: 0.9; }
.path-plan-soft { fill: none; stroke: rgba(240,240,255,0.26); stroke-width: 0.9; stroke-linecap: round; }
.path-plan-x { fill: none; stroke: #f9a8b8; stroke-width: 1.8; stroke-linecap: round; }
body.light-mode .path-plan-star { fill: var(--path-accent); opacity: 0.35; }
body.light-mode .path-plan-item { fill: rgba(0,0,0,0.02); stroke: rgba(20,20,40,0.35); }
body.light-mode .path-plan-soft { stroke: rgba(20,20,40,0.22); }
body.light-mode .path-plan-x { stroke: #be123c; }
body.light-mode .path-plan { --plan-bad: #e11d48; }
.path-guide-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.path-guide-list li { display: flex; align-items: flex-start; gap: 10px; font-size: var(--t-body, 15px); line-height: 1.4; color: var(--text); }
.path-guide-list .path-guide-ic { width: 20px; height: 20px; }
.path-guide-pair .path-card { min-width: 0; }
.path-cmd { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.path-cmd-plans, .path-cmd-text { min-width: 0; }
.path-cmd .path-plans { margin: 0; }
.path-plan-key { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 12px; color: var(--m6); }
.path-plan-key span { display: inline-flex; align-items: center; gap: 6px; }
.path-plan-key i { display: block; }
.path-plan-key .is-you i { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle, #fff 0, var(--path-accent) 45%, transparent 75%); box-shadow: 0 0 8px var(--path-accent); }
.path-plan-key .is-wall i { width: 16px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--path-accent), transparent); box-shadow: 0 0 6px var(--path-accent); }
.path-plan-key .is-view i { width: 16px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--path-accent), transparent); }

.path-card-head { margin-bottom: 14px; }
.path-card-head .path-head, .path-card-head .path-eyebrow { margin: 0; }

/* ── Label above value, and a module's own frame dropped inside a card ── */
.path-kvs { display: grid; gap: 14px; }
.path-kv { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.path-card .soul-card { padding: 0; background: none; border: 0; box-shadow: none; }

/* ── The header menu: Self, Wealth, Love in one row ── */
.path-menu-paths { margin: 4px 0 14px; }
.path-menu-label { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--m6); }
.path-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.path-menu-btn {
  display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 4px;
  background-image: var(--band-grad); border: 0; border-radius: 999px; box-shadow: 0 4px 14px var(--band-aura);
  color: var(--band-on); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) { .path-menu-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--band-aura); } }
.path-menu-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.path-menu-btn.is-on { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--band-accent), 0 6px 18px var(--band-aura); }

/* ── Jargon hints ── */
.path-q {
  /* 18px mark inside a 32px tap target */
  position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: -6px -4px -6px 0; padding: 0; background: none; border: 0;
  color: var(--m6); font: inherit; font-size: 11px; font-weight: 600; text-transform: none; cursor: pointer;
}
.path-q::before { content: ''; position: absolute; width: 16px; height: 16px; border: 1px solid var(--m35); border-radius: 50%; }
.path-q[aria-expanded="true"] { color: var(--text); }
@media (hover: hover) { .path-q:hover { color: var(--text); } }
.path-q:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; border-radius: 50%; }
.path-hint {
  position: fixed; z-index: 9000; width: min(280px, calc(100vw - 24px)); padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--m25); border-radius: var(--radius-sm); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  color: var(--text); font-size: 13px; line-height: 1.5;
}

@media (min-width: 768px) {
  .path-reveal-line { font-size: 32px; }
  .path-brand-sub { display: block; }
  .path-fs-stage { flex-direction: row; align-items: center; gap: 28px; }
  .path-fs-dial { flex: 0 0 340px; }
  .path-luopan { max-width: 340px; }
  .path-fs-side { flex: 1; }
  .path-fs-answer { font-size: 24px; }
  .path-guide-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .path-cmd { flex-direction: row; align-items: center; gap: 32px; }
  .path-cmd-plans { flex: 1.5; }
  .path-cmd-text { flex: 1; }
  .path-kvs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path-hours-split { flex-direction: row; align-items: center; gap: 32px; }
  .path-hours-wheel { flex: 0 0 330px; }
  .path-hour-wheel { max-width: 330px; }
  .path-hours-list { flex: 1; }
}
