* { margin: 0; padding: 0; box-sizing: border-box; }

html, body, body * { cursor: default; }
a { cursor: pointer; }

:root {
  --bg: #0b0705;
  --bg-2: #140c08;
  --wood: #2b1710;
  --wood-2: #3b2015;
  --lacquer: #7c1713;
  --lacquer-2: #a3281f;
  --gold: #cfae6d;
  --gold-2: #efd49a;
  --gold-3: #9c793f;
  --paper: #ecdfc5;
  --paper-2: #e2d0ae;
  --paper-3: #d9c39b;
  --ink: #291a12;
  --ink-2: #725b44;
  --ink-3: #8d714c;
  --jade: #5f7a67;
  --clay: #8b3b2d;
  --line: rgba(207, 174, 109, .3);
  --line-soft: rgba(207, 174, 109, .15);
  --line-ink: rgba(120, 83, 40, .24);
  --top-h: 84px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --shadow: 0 24px 50px rgba(0, 0, 0, .38);
  --shadow-ink: 0 18px 38px rgba(70, 44, 21, .18);
}

html { scroll-behavior: smooth; }

body {
  font: 16px/1.65 var(--serif);
  color: var(--paper);
  background:
    radial-gradient(ellipse at 50% -20%, rgba(146, 43, 27, .18), transparent 55%),
    linear-gradient(180deg, #0d0806 0%, #120b08 45%, #090605 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

h1, h2, h3, strong { font-family: var(--serif); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }

.muted { color: var(--ink-2); font-size: 0.85rem; }
.lacquer-panel .muted { color: rgba(203, 185, 149, .72); }
.eyebrow {
  font-size: 0.68rem; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold-3); font-weight: 700; margin-bottom: 0.6rem;
}

.gold-text {
  background: linear-gradient(180deg, #faeac4 0%, #e3c387 42%, #b98d47 68%, #8b642d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.seal {
  display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #a32b21, #6f110f);
  color: #f3dfb6; border: 1px solid rgba(240, 206, 140, .55);
  box-shadow: inset 0 0 0 2px rgba(80, 9, 7, .55), 0 5px 14px rgba(0, 0, 0, .35);
  font-family: var(--kai); letter-spacing: 0;
}

/* ---------------- boot ---------------- */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2rem;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(138, 37, 24, .2), transparent 55%),
    #0b0705;
  color: rgba(236, 223, 197, .6);
  font-family: var(--serif); letter-spacing: .2em;
}
.boot-seal {
  width: 58px; height: 58px; border-radius: 3px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #a32b21, #6f110f);
  color: var(--gold-2); font-family: var(--kai); font-size: 1.9rem;
  border: 1px solid rgba(240, 206, 140, .55);
  box-shadow: inset 0 0 0 2px rgba(80, 9, 7, .55), 0 10px 30px rgba(0, 0, 0, .45);
  animation: breathe 1.8s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .82; transform: scale(1); } 50% { opacity: 1; transform: scale(1.035); } }
.boot-box { display: grid; justify-items: center; gap: .8rem; text-align: center; max-width: 390px; padding: 2rem 1.8rem; color: var(--ink); background: linear-gradient(160deg, #f0e4cc, #e3d1b0); border: 1px solid var(--line); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,251,240,.4); }
.boot-box strong { font-size: 1.08rem; color: #352216; letter-spacing: .08em; }
.boot-box p { color: var(--ink-2); font-size: .85rem; line-height: 1.7; }
.boot-actions { display: flex; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; justify-content: center; }
.boot-box .btn { min-width: 148px; }
.recover-box { max-width: 430px; }
.boot-note { font-family: var(--kai); font-size: .76rem !important; letter-spacing: .12em; color: #7c6546 !important; margin-top: .1rem; }
.boot > p { font-size: .8rem; }

/* ---------------- onboarding ---------------- */
.onboarding {
  position: relative; min-height: 100vh;
  display: grid; place-items: center; padding: 3rem 1.25rem;
  background: #0b0705; overflow: hidden;
}
.onboarding-bg {
  position: absolute; inset: 0;
  background: url("./assets/hall-hero.jpg") center 42% / cover no-repeat;
  filter: brightness(.34) saturate(.85) contrast(1.05);
  transform: scale(1.02);
}
.onboarding::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,4,3,.86), rgba(7,4,3,.28) 42%, rgba(7,4,3,.9)),
    radial-gradient(ellipse at 50% 45%, transparent 18%, rgba(7,4,3,.55) 100%);
}
.onboarding-glow {
  position: absolute; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 197, 106, .14), transparent 62%);
  filter: blur(10px); pointer-events: none; z-index: 1;
}
.onboarding-inner {
  position: relative; z-index: 2; width: min(460px, 100%); text-align: center;
  animation: rise .7s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.brand { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.brand-seal {
  width: 68px; height: 68px; border-radius: 3px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #a32b21, #6f110f);
  color: var(--gold-2); font-family: var(--kai); font-size: 2.2rem;
  border: 1px solid rgba(240, 206, 140, .55);
  box-shadow: inset 0 0 0 2px rgba(80, 9, 7, .55), 0 12px 34px rgba(0,0,0,.45);
}
.brand-seal.small { width: 42px; height: 42px; font-size: 1.35rem; border-radius: 2px; }
.brand h1 { font-size: 2.3rem; font-weight: 600; letter-spacing: .3em; color: #f0dfbd; text-indent: .3em; text-align: left; }
.brand p { color: rgba(236, 223, 197, .6); font-size: .82rem; letter-spacing: .24em; text-align: left; }

.onboard-card {
  position: relative;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 250, 236, .5), transparent 52%),
    linear-gradient(160deg, #f0e4cc, #e3d1b0);
  border-radius: 0; padding: 1.8rem;
  box-shadow: 0 34px 80px rgba(0,0,0,.52), inset 0 0 0 1px rgba(255, 251, 240, .4);
  border: 1px solid rgba(207, 174, 109, .6);
  text-align: left;
  color: var(--ink);
}
.onboard-card::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(120, 83, 40, .2); pointer-events: none; }
.onboard-card > * { position: relative; z-index: 1; }
.onboard-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
  background: rgba(120, 83, 40, .1); border: 1px solid rgba(120, 83, 40, .14);
  border-radius: 0; padding: .28rem; margin-bottom: 1.5rem;
}
.onboard-tab {
  border: 0; background: none; padding: .62rem; border-radius: 0;
  font-weight: 600; font-size: .9rem; color: var(--ink-2); letter-spacing: .08em; transition: all .2s;
}
.onboard-tab.is-active { background: rgba(255, 251, 240, .62); color: #352216; box-shadow: 0 4px 12px rgba(70,44,21,.1); }

.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field > span { font-size: 0.76rem; color: var(--ink-2); font-weight: 600; letter-spacing: .12em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.72rem 0.85rem; border-radius: 0;
  border: 1px solid rgba(120, 83, 40, .28); background: rgba(255, 252, 244, .52); color: var(--ink);
  font-family: var(--sans); font-size: .9rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-3);
  background: rgba(255, 252, 244, .82);
  box-shadow: 0 0 0 3px rgba(156, 121, 63, .14);
}
.field input::placeholder, .field textarea::placeholder { color: rgba(114, 91, 68, .54); }
.form-hint { font-size: 0.72rem; color: var(--ink-2); text-align: center; letter-spacing: .04em; }
.onboarding .form { gap: .85rem; }
.device-entry {
  display: grid; gap: .55rem; padding: .9rem 1rem;
  border: 1px solid rgba(120, 83, 40, .2); background: rgba(255, 251, 240, .46);
}
.device-entry-title { font-size: .72rem; font-weight: 700; letter-spacing: .3em; color: #6d3a24; }
.device-entry-note { font-size: .72rem; line-height: 1.75; color: var(--ink-2); letter-spacing: .03em; }
.device-entry .btn { width: 100%; margin-top: .1rem; }
.onboard-divider { display: flex; align-items: center; gap: .7rem; color: rgba(114, 91, 68, .7); font-size: .68rem; letter-spacing: .16em; }
.onboard-divider::before, .onboard-divider::after { content: ""; flex: 1; height: 1px; background: rgba(120, 83, 40, .22); }
.field-inline { display: flex; gap: .5rem; align-items: stretch; }
.field-inline input { flex: 1; min-width: 0; }
.btn-code { flex: none; padding: .55rem .8rem; font-size: .72rem; letter-spacing: .04em; white-space: nowrap; }
.form-links { display: flex; justify-content: space-between; gap: .8rem; margin-top: -.15rem; }
.link-btn {
  border: 0; background: none; padding: 0; color: #7c5a2e;
  font-family: var(--sans); font-size: .76rem; letter-spacing: .04em;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: #8b2d22; }
.family-mode {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .3rem; padding: .26rem;
  background: rgba(120, 83, 40, .1); border: 1px solid rgba(120, 83, 40, .16);
}
.family-mode-btn {
  border: 0; background: none; padding: .48rem .2rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 600; color: var(--ink-2);
  letter-spacing: .04em; transition: background .2s, color .2s, box-shadow .2s;
}
.family-mode-btn.is-active { background: rgba(255, 251, 240, .62); color: #5c1f1b; box-shadow: 0 3px 10px rgba(70, 44, 21, .1); }
.family-fields { display: grid; gap: .8rem; }
.form-note { font-size: .7rem; line-height: 1.65; color: #7c6141; letter-spacing: .02em; text-align: center; }
.recover-direct-toggle { justify-self: start; margin-top: -.2rem; text-align: left; }
#security-body { display: grid; gap: .3rem; }
#security-body .body-copy { margin: .55rem 0 0; }
#security-body .archive-actions { margin-top: .8rem; }
.onboarding-foot { margin-top: 1.7rem; color: rgba(236, 223, 197, .46); font-family: var(--kai); font-size: 0.8rem; letter-spacing: 0.36em; }

/* ---------------- buttons ---------------- */
.btn {
  border: 1px solid transparent; border-radius: 0; padding: 0.74rem 1.3rem;
  font-weight: 600; font-size: 0.86rem; letter-spacing: .12em;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s, color .16s;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: linear-gradient(180deg, #a83426, #74140f);
  color: #f4e1bd; border-color: rgba(226, 190, 121, .5);
  box-shadow: inset 0 1px 0 rgba(255, 233, 196, .2), 0 9px 22px rgba(0, 0, 0, .3);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); background: linear-gradient(180deg, #b93b2c, #831a13); box-shadow: inset 0 1px 0 rgba(255, 233, 196, .24), 0 12px 28px rgba(0, 0, 0, .38); }
.btn-ghost {
  background: rgba(0, 0, 0, .12); color: #bba37a; border-color: rgba(207, 174, 109, .3);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }
.paper-panel .btn-ghost, .modal .btn-ghost, .boot-box .btn-ghost, .onboard-card .btn-ghost { color: #654928; border-color: rgba(101, 73, 40, .34); background: rgba(255, 250, 236, .22); }
.paper-panel .btn-ghost:hover, .modal .btn-ghost:hover, .boot-box .btn-ghost:hover, .onboard-card .btn-ghost:hover { border-color: #9b7c4e; color: #352216; background: rgba(255, 250, 236, .5); }
.btn-small {
  padding: 0.34rem 0.65rem; font-size: 0.72rem; border-radius: 0; letter-spacing: .08em;
  background: rgba(255, 250, 236, .3); color: #654928; border: 1px solid rgba(101, 73, 40, .28);
}
.btn-small:hover { border-color: #9b7c4e; color: #352216; background: rgba(255, 250, 236, .55); }
.btn-small.btn-primary {
  background: linear-gradient(180deg, #a83426, #74140f);
  color: #f4e1bd; border-color: rgba(226, 190, 121, .5);
}
.btn-small.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #b93b2c, #831a13); color: #f4e1bd;
}
.btn-danger { background: transparent; color: #8b3b2d; border: 1px solid rgba(139, 59, 45, .35); }
.btn-danger:hover { background: rgba(139, 59, 45, .08); border-color: rgba(139, 59, 45, .6); }

/* ---------------- app shell ---------------- */
.app { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  height: var(--top-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center;
  gap: 1.5rem; padding: 0 clamp(1.4rem, 4vw, 3.4rem);
  background: linear-gradient(180deg, #170e0a, #100a07);
  border-bottom: 1px solid rgba(207, 174, 109, .22);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
  transition: background .3s, border-color .3s, box-shadow .3s;
}
body[data-view="hall"]:not(.is-scrolled) .app-header {
  background: linear-gradient(180deg, rgba(7, 4, 3, .9), rgba(7, 4, 3, .28) 62%, transparent);
  border-bottom-color: transparent;
  box-shadow: none;
}
.app-brand { display: flex; align-items: center; gap: 0.85rem; min-width: 0; justify-self: start; }
.app-brand-text { display: grid; line-height: 1.2; min-width: 0; gap: 3px; }
.app-brand-text strong { color: #f0dfbd; font-size: 1.03rem; font-weight: 600; letter-spacing: 0.14em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-brand-text span { color: rgba(197, 173, 130, .58); font-size: 0.62rem; letter-spacing: 0.26em; }

.app-nav { display: flex; align-items: center; justify-content: center; gap: 2px; justify-self: center; }
.nav-btn {
  position: relative; border: 0; background: none; padding: 0.72rem 1.05rem;
  color: #bba781; font-size: 0.9rem; letter-spacing: 0.2em; white-space: nowrap;
  display: flex; align-items: center; gap: .4rem; transition: color .2s;
}
.nav-btn svg { display: none; width: 20px; height: 20px; }
.nav-btn::after {
  content: ""; position: absolute; left: 50%; bottom: 7px; width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-50%); transition: width .25s;
}
.nav-btn:hover { color: var(--gold-2); background: none; }
.nav-btn.is-active { color: var(--gold-2); background: none; text-shadow: 0 0 22px rgba(221, 181, 104, .28); }
.nav-btn.is-active::after { width: 30px; }
.nav-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: -5px; }

.header-meta { display: flex; align-items: center; justify-content: flex-end; gap: 0.55rem; justify-self: end; }
.level-chip {
  color: #d8c49c; border: 1px solid rgba(207, 174, 109, .32); border-radius: 2px;
  background: linear-gradient(180deg, rgba(61, 34, 21, .7), rgba(22, 12, 8, .78));
  padding: 0.28rem 0.72rem; font-size: 0.72rem; letter-spacing: .1em; white-space: nowrap;
}
.merit-chip {
  display: flex; align-items: baseline; gap: 0.35rem;
  border: 1px solid rgba(207, 174, 109, .25); border-radius: 2px;
  background: rgba(0, 0, 0, .26); padding: 0.28rem 0.72rem;
  color: rgba(216, 196, 156, .7); font-size: 0.66rem; letter-spacing: .12em; white-space: nowrap;
}
.merit-chip strong { color: var(--gold-2); font-family: Baskerville, "Times New Roman", serif; font-size: 0.95rem; font-weight: 500; }

.app-main { flex: 1; width: 100%; padding: var(--top-h) 0 calc(64px + env(safe-area-inset-bottom)); }
body[data-view="hall"] .app-main { padding-top: 0; }
.view { display: none; animation: fade .4s ease both; }
.view.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#view-calendar, #view-stories, #view-rank, #view-family, #view-fortune {
  width: min(1180px, 100%); margin: 0 auto;
  padding: clamp(1.4rem, 3.6vw, 2.6rem) clamp(1.1rem, 4vw, 2.5rem) 0;
}

/* ---------------- hall hero ---------------- */
.hall { position: relative; }
.hero {
  position: relative; height: auto; min-height: 715px; overflow: hidden;
  background: #0b0705;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 44%;
  filter: saturate(.96) contrast(1.04) brightness(.98);
  transform: scale(1.012);
}
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 4, 3, .84) 0%, rgba(7, 4, 3, .26) 24%, rgba(7, 4, 3, .06) 43%, rgba(8, 5, 4, .52) 69%, rgba(8, 5, 4, .92) 87%, #0c0806 100%),
    radial-gradient(ellipse at 50% 45%, transparent 18%, rgba(7, 4, 3, .38) 78%, rgba(7, 4, 3, .74) 100%);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 320px 220px at 16% 20%, rgba(190, 80, 40, .16), transparent 68%),
    radial-gradient(ellipse 320px 220px at 84% 20%, rgba(190, 80, 40, .14), transparent 68%),
    radial-gradient(ellipse 520px 260px at 50% 62%, rgba(220, 166, 86, .1), transparent 72%);
  mix-blend-mode: screen;
}
.hero-inner {
  position: relative; z-index: 5; height: auto; min-height: 715px;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--top-h) + 36px) 1.2rem 72px;
}
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, transparent, #0c0806 90%); pointer-events: none; z-index: 6; }

.plaque {
  position: relative; width: min(566px, 92vw); padding: 24px 52px 22px; text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(128, 39, 27, .22), transparent 62%),
    linear-gradient(180deg, #20120c 0%, #0d0705 58%, #180d09 100%);
  border: 1px solid rgba(218, 180, 109, .55);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .7), inset 0 2px 0 rgba(255, 235, 195, .08), inset 0 0 70px rgba(115, 23, 16, .18);
}
.plaque::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(218, 180, 109, .3); pointer-events: none; }
.plaque::after { content: ""; position: absolute; inset: 11px; border: 1px solid rgba(0, 0, 0, .45); pointer-events: none; }
.plaque-corner { position: absolute; width: 17px; height: 17px; border-color: rgba(238, 204, 137, .8); border-style: solid; z-index: 2; }
.plaque-corner.tl { top: 4px; left: 4px; border-width: 2px 0 0 2px; }
.plaque-corner.tr { top: 4px; right: 4px; border-width: 2px 2px 0 0; }
.plaque-corner.bl { bottom: 4px; left: 4px; border-width: 0 0 2px 2px; }
.plaque-corner.br { bottom: 4px; right: 4px; border-width: 0 2px 2px 0; }
.plaque-overline { font-size: 9.5px; letter-spacing: .48em; color: #a98c5e; margin-bottom: 12px; padding-left: .48em; }
.plaque h2 {
  font-size: clamp(2.3rem, 4vw, 3.85rem); line-height: 1.18; font-weight: 600;
  letter-spacing: .2em; text-indent: .2em;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: linear-gradient(180deg, #faeac4 0%, #e3c387 42%, #b98d47 68%, #8b642d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.6));
}
.plaque-sub { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 11px; font-size: 10.5px; letter-spacing: .26em; color: #c4ad85; }
.plaque-sub i { width: 26px; height: 1px; background: linear-gradient(90deg, transparent, rgba(207, 174, 109, .65)); }
.plaque-sub i:last-child { transform: rotate(180deg); }
.plaque-seal { position: absolute; right: 25px; bottom: 18px; width: 23px; height: 23px; font-size: 10px; line-height: 1.15; border-radius: 1px; opacity: .85; writing-mode: vertical-rl; }

.hall-lamp {
  position: absolute; right: clamp(1.2rem, 3vw, 2.4rem); top: calc(var(--top-h) + 20px); z-index: 7;
  display: grid; justify-items: center; gap: 2px; opacity: .5; transition: opacity .3s;
}
.hall-lamp.is-lit { opacity: 1; }
.lamp-flame {
  width: 12px; height: 20px; border-radius: 50% 50% 45% 45% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 75%, #ffe9a8, #e8a13a 55%, rgba(200, 80, 40, 0) 78%);
  filter: drop-shadow(0 0 8px rgba(232, 161, 58, .9));
  opacity: 0; transition: opacity .3s;
}
.hall-lamp.is-lit .lamp-flame { opacity: 1; animation: flicker .6s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.08, 1.14) rotate(2deg); } }
.lamp-base { width: 16px; height: 14px; border-radius: 1px; background: linear-gradient(180deg, #8a5a2b, #4a2c18); border: 1px solid var(--gold); }

.altar {
  position: relative; width: min(846px, 94vw); margin-top: 22px;
  background: linear-gradient(180deg, rgba(17, 10, 7, .68), rgba(10, 6, 4, .8));
  border: 1px solid rgba(207, 174, 109, .3);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 233, 190, .09);
  backdrop-filter: blur(15px) saturate(.9);
}
.altar::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(207, 174, 109, .12); pointer-events: none; }
.altar-head { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 12px 0 2px; }
.altar-head span { height: 1px; width: 74px; background: linear-gradient(90deg, transparent, rgba(207, 174, 109, .5)); }
.altar-head span:last-child { transform: rotate(180deg); }
.altar-head p { font-size: 9px; letter-spacing: .4em; color: #b49a70; padding-left: .4em; }

.hero-altar {
  display: grid; gap: 3px; min-height: 84px; padding: 7px clamp(20px, 4vw, 44px) 3px;
}
.altar-compact { display: none; }
.altar-generations { display: grid; gap: 1px; width: 100%; }
.gen-row {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr);
  align-items: center; gap: clamp(12px, 2vw, 24px); min-height: 82px; padding: 2px 0;
}
.gen-row + .gen-row { border-top: 1px solid rgba(207, 174, 109, .08); }
.gen-row::before {
  content: ""; position: absolute; left: 62px; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(207, 174, 109, .16), transparent 72%);
}
.gen-tag {
  display: grid; justify-items: center; gap: 1px; align-self: center;
  padding: 5px 0 4px; border-left: 1px solid rgba(207, 174, 109, .24);
  color: #c7a974;
}
.gen-num { font-family: var(--serif); font-size: 19px; line-height: 1; color: #e4c88d; text-shadow: 0 1px 0 rgba(0,0,0,.7); }
.gen-unit { font-size: 8px; letter-spacing: .28em; padding-left: .28em; color: #a78a5a; }
.gen-count {
  margin-top: 3px; padding-top: 3px; border-top: 1px solid rgba(207, 174, 109, .16);
  font-family: var(--serif); font-size: 8px; color: #8d7550;
}
.gen-tablets {
  display: flex; justify-content: center; align-items: flex-end; flex-wrap: nowrap;
  gap: clamp(8px, 1.15vw, 15px); min-width: 0;
}
.tablet {
  position: relative; display: flex; flex-direction: column; align-items: center;
  width: 54px; height: 88px; flex: 0 0 auto; color: #f1d9a1;
  font-family: var(--serif);
}
.gen-row[data-gen="1"] .tablet { width: 54px; height: 78px; }
.gen-row[data-gen="2"] .tablet { width: 50px; height: 74px; }
.gen-row[data-gen="3"] .tablet { width: 47px; height: 70px; }
.gen-row[data-gen="4"] .tablet { width: 44px; height: 68px; }
.gen-row[data-gen="5"] .tablet { width: 42px; height: 66px; }
.tablet::before {
  content: ""; position: absolute; inset: 6px 0 10px; z-index: 0;
  border-radius: 50% 50% 2px 2px / 24% 24% 2px 2px;
  background:
    repeating-linear-gradient(92deg, rgba(255, 244, 213, .018) 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 50% 0%, rgba(147, 82, 35, .46), transparent 54%),
    linear-gradient(180deg, #2a120b 0%, #431b12 23%, #2d100b 64%, #180805 100%);
  border: 1px solid rgba(219, 178, 104, .74);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, .52),
    inset 0 0 0 3px rgba(207, 168, 93, .28),
    inset 0 -12px 20px rgba(0, 0, 0, .55),
    0 12px 22px rgba(0, 0, 0, .48),
    0 0 20px rgba(181, 121, 48, .07);
}
.tablet::after {
  content: ""; position: absolute; inset: 10px 4px 16px; z-index: 1;
  border: 1px solid rgba(219, 178, 104, .24);
  border-radius: 50% 50% 1px 1px / 20% 20% 1px 1px;
  pointer-events: none;
}
.tablet-crown {
  position: absolute; top: 0; left: 50%; z-index: 3; width: 88%; height: 17px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 48%, #fff0c4 0 8%, #d9ae61 9% 17%, transparent 18%),
    radial-gradient(ellipse at 50% 4%, #edd197 0 24%, transparent 26%),
    linear-gradient(90deg, #6e491f 0%, #d7ae67 16%, #9b6a2c 38%, #f0d69c 58%, #a97a34 78%, #704a20 100%);
  clip-path: polygon(50% 0%, 61% 14%, 78% 4%, 84% 25%, 100% 31%, 90% 47%, 100% 64%, 76% 70%, 63% 88%, 50% 100%, 37% 88%, 24% 70%, 0 64%, 10% 47%, 0 31%, 16% 25%, 22% 4%, 39% 14%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .68));
}
.tablet-name {
  position: relative; z-index: 2; margin-top: 18px; padding: 0 3px;
  max-height: calc(100% - 27px); overflow: hidden; text-align: center;
  writing-mode: vertical-rl; text-orientation: upright; white-space: nowrap;
  font-size: var(--name-size, 12px); line-height: 1; letter-spacing: var(--name-track, .06em);
  color: #f3dda8;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .85), 0 0 9px rgba(224, 183, 102, .2);
}
.tablet-base {
  position: absolute; bottom: 0; left: 50%; z-index: 4; width: 118%; height: 9px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #713423 0%, #3a170f 42%, #1b0a06 100%);
  border: 1px solid rgba(219, 178, 104, .56);
  border-radius: 1px;
  box-shadow: 0 2px 0 rgba(14, 6, 4, .9), 0 4px 0 rgba(207, 168, 93, .13), 0 8px 12px rgba(0, 0, 0, .42);
}
.tablet-base::before {
  content: ""; position: absolute; left: -7%; right: -7%; top: -4px; height: 5px;
  background: linear-gradient(180deg, #4b2016, #210d08);
  border: 1px solid rgba(219, 178, 104, .34);
}
.tablet-base::after {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -4px; height: 4px;
  background: linear-gradient(180deg, #2a110a, #130705);
  border: 1px solid rgba(219, 178, 104, .2);
}
.altar-extra {
  align-self: center; padding: 6px 7px; border: 1px dashed rgba(207, 174, 109, .3);
  background: transparent; font-family: var(--sans); font-size: 8px;
  letter-spacing: .1em; color: #a88c60; white-space: nowrap; cursor: pointer;
}
.altar-extra:hover { color: #e1c58f; border-color: rgba(207, 174, 109, .55); }
.altar-overflow {
  margin-top: 4px; text-align: center; font-size: 8px; letter-spacing: .18em; color: #8e744d;
}
.tablet.empty { opacity: .5; }
.tablet.empty::before { border-color: rgba(201, 154, 63, .32); box-shadow: none; }
.tablet.empty .tablet-name { color: rgba(232, 197, 106, .52); }
.altar-empty { width: 100%; display: grid; justify-items: center; gap: .35rem; color: rgba(236, 223, 197, .46); font-size: .68rem; text-align: center; }

.worship-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch;
  padding: 0 10px 7px;
}
.worship-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 10px 8px 8px; border: 0; border-radius: 0;
  background: transparent; color: var(--paper);
  font-family: var(--sans); transition: background .2s, opacity .2s;
}
.worship-btn + .worship-btn::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; border-left: 1px solid rgba(207, 174, 109, .14); }
.worship-btn:hover { background: rgba(193, 141, 70, .07); transform: none; }
.worship-btn:active { transform: scale(.98); }
.worship-btn:disabled { opacity: .5; transform: none; }
.worship-btn.is-on { background: rgba(201, 154, 63, .1); }
.worship-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: -4px; }
.worship-icon {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: #e4c98f; border: 1px solid rgba(207, 174, 109, .42);
  background: radial-gradient(circle at 33% 26%, #4f3421 0%, #2a180f 42%, #130b07 100%);
  box-shadow: inset 0 1px 0 rgba(255, 237, 194, .2), inset 0 -6px 14px rgba(0, 0, 0, .5), 0 8px 16px rgba(0, 0, 0, .38), 0 0 22px rgba(191, 139, 68, .08);
}
.worship-icon svg { width: 25px; height: 25px; }
.worship-label { font-family: var(--serif); font-weight: 500; font-size: 16px; letter-spacing: .18em; padding-left: .18em; color: #ebd9b5; }
.worship-cost { font-size: 8.5px; letter-spacing: .14em; color: #a48a60; margin-top: -3px; }
.worship-stock {
  margin: -1px 12px 8px; padding-top: 7px; border-top: 1px dashed rgba(207, 174, 109, .14);
  font-size: 9px; line-height: 1.6; letter-spacing: .08em; color: #b49a70; text-align: center;
}
.worship-stock[hidden] { display: none; }
.redeem-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px 8px; border-top: 1px solid rgba(207, 174, 109, .13);
}
.redeem-input {
  flex: 1; min-width: 0; height: 26px; padding: 0 10px;
  border: 1px solid rgba(207, 174, 109, .24); border-radius: 2px;
  background: rgba(15, 9, 6, .4); color: #ebd9b5;
  font-family: var(--sans); font-size: 10px; letter-spacing: .1em;
}
.redeem-input::placeholder { color: rgba(196, 175, 140, .55); letter-spacing: .08em; }
.redeem-input:focus { outline: none; border-color: rgba(207, 174, 109, .55); }
.redeem-btn {
  flex: none; height: 26px; padding: 0 12px; border-radius: 2px;
  border: 1px solid rgba(207, 174, 109, .38); background: rgba(201, 154, 63, .1);
  color: #e2c78f; font-family: var(--sans); font-size: 10px; letter-spacing: .14em;
}
.redeem-btn:hover { background: rgba(201, 154, 63, .18); }
.redeem-btn:disabled { opacity: .5; }
.altar-foot {
  display: flex; align-items: center; justify-content: center; gap: 15px;
  padding: 9px 12px 11px; border-top: 1px solid rgba(207, 174, 109, .13);
  font-size: 9.5px; letter-spacing: .16em; color: #b29b74;
}
.altar-foot i { width: 3px; height: 3px; transform: rotate(45deg); background: rgba(207, 174, 109, .55); }
.altar-foot b { color: #e2c78f; font-weight: 500; letter-spacing: .1em; }

/* hall body */
.hall-main {
  position: relative; z-index: 8; width: min(1480px, 100%); margin: 0 auto;
  padding: 34px clamp(1.2rem, 4vw, 3.4rem) 0;
}
.section-label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-label .seal { width: 22px; height: 22px; font-size: 11px; border-radius: 1px; }
.section-label p { font-size: 10px; letter-spacing: .38em; color: #9d8561; }
.section-label > span:last-child { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(207, 174, 109, .18), transparent); }
.hall-grid { display: grid; grid-template-columns: minmax(0, 1fr) 388px; gap: 24px; align-items: start; }
.col-main, .col-side { display: grid; gap: 22px; min-width: 0; }

.lacquer-panel {
  position: relative; padding: 24px 28px;
  background:
    radial-gradient(ellipse at 18% 0%, rgba(126, 36, 24, .16), transparent 48%),
    linear-gradient(155deg, rgba(43, 24, 16, .97), rgba(19, 11, 8, .98));
  border: 1px solid rgba(207, 174, 109, .22);
  border-radius: 0;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 233, 190, .06);
}
.lacquer-panel::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(207, 174, 109, .08); pointer-events: none; }
.lacquer-panel > * { position: relative; z-index: 1; }
.paper-panel {
  position: relative; padding: 24px 26px; color: var(--ink); border-radius: 0;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 250, 236, .45), transparent 52%),
    linear-gradient(160deg, #f0e4cc, #e3d1b0);
  border: 1px solid rgba(207, 174, 109, .55);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 251, 240, .35), inset 0 0 40px rgba(123, 83, 38, .07);
}
.paper-panel::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(120, 83, 40, .18); pointer-events: none; }
.paper-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .26;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.25'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.paper-panel > * { position: relative; z-index: 2; }

.panel { border-radius: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: .8rem; }
.panel-head h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: .14em; color: #ead7b2; line-height: 1.25; }
.paper-panel .panel-head h3 { color: #352216; }
.panel-kicker { font-size: 8px; letter-spacing: .36em; color: #8e7551; margin-bottom: 5px; }
.paper-panel .panel-kicker { color: #9b7c4e; }
.panel-count { font-size: 10px; color: #947b55; letter-spacing: .08em; padding-top: 4px; text-align: right; }
.paper-panel .panel-count { color: #87683c; }
.panel-count b { color: #e1c68e; font-weight: 500; }
.paper-stamp {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  color: #8b2d22; border: 1px solid rgba(139, 45, 34, .4); font-family: var(--kai); font-size: 10px;
  transform: rotate(3deg); opacity: .8;
}

/* tasks */
.task-panel { margin: 0; }
.task-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.task-card {
  border: 0; border-top: 1px solid rgba(207, 174, 109, .12); border-radius: 0;
  padding: 13px 2px; background: transparent; display: grid; gap: .55rem;
}
.task-card:first-child { border-top: 0; }
.task-card.is-ready { background: linear-gradient(90deg, rgba(201,154,63,.08), transparent 72%); border-color: rgba(201,154,63,.24); }
.task-card.is-claimed { opacity: .56; }
.task-top { display: flex; gap: .8rem; align-items: flex-start; }
.task-icon {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(207, 174, 109, .27); background: rgba(117, 30, 20, .18);
  font-size: 15px; line-height: 1; color: #ddc28e;
}
.task-text { flex: 1; display: grid; gap: .1rem; min-width: 0; }
.task-text strong { color: #e2d0ad; font-size: 14px; font-weight: 500; letter-spacing: .06em; }
.task-text span { color: #927b5a; font-size: 10px; letter-spacing: .04em; }
.task-reward { color: #cbaa6b; font-weight: 500; font-size: 10.5px; white-space: nowrap; padding-top: 2px; letter-spacing: .06em; }
.task-progress { height: 3px; border-radius: 0; background: rgba(207, 174, 109, .12); }
.task-progress .progress-fill { border-radius: 0; background: linear-gradient(90deg, #8b652e, var(--gold)); }
.task-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.task-foot .muted { font-size: 9.5px; letter-spacing: .08em; }
.task-btn { min-width: 76px; background: transparent; color: #d7b574; border: 1px solid rgba(207, 174, 109, .3); font-size: 10px; letter-spacing: .1em; padding: .32rem .5rem; }
.task-btn:hover:not(:disabled) { background: rgba(201, 154, 63, .12); border-color: var(--gold); color: var(--gold-2); }
.task-btn:disabled { opacity: .46; cursor: default; border-color: rgba(207, 174, 109, .14); color: #927b5a; }

.progress { height: 10px; border-radius: 0; background: rgba(120, 83, 40, .16); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.08); }
.progress-fill { height: 100%; border-radius: 0; background: linear-gradient(90deg, #b8862e, var(--gold-2)); transition: width .7s cubic-bezier(.2,.8,.2,1); }

/* achievements */
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid rgba(207, 174, 109, .12); }
.badge {
  display: flex; align-items: center; gap: .65rem; padding: 14px 12px;
  border: 0; border-bottom: 1px solid rgba(207, 174, 109, .1); border-right: 1px solid rgba(207, 174, 109, .1);
  background: transparent; opacity: .44; transition: all .2s;
}
.badge:nth-child(3n) { border-right: 0; }
.badge:nth-last-child(-n+3) { border-bottom: 0; }
.badge.is-unlocked { opacity: 1; background: linear-gradient(180deg, rgba(201,154,63,.08), transparent); }
.badge-icon {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border: 1px solid rgba(207, 174, 109, .28); background: rgba(117, 30, 20, .18); font-size: 14px;
}
.badge-name { display: block; font-size: 12px; font-weight: 500; color: #dfcba8; letter-spacing: .08em; }
.badge-desc { display: block; font-size: 9px; color: #927b5a; line-height: 1.5; }

/* feed */
.feed-panel .panel-head { margin-bottom: .3rem; }
.feed-list { list-style: none; display: grid; }
.feed-item { display: flex; gap: .75rem; align-items: center; padding: 12px 0; border-top: 1px solid rgba(207, 174, 109, .1); }
.feed-item:first-child { border-top: 0; }
.feed-icon {
  width: 30px; height: 30px; flex: none; border-radius: 0;
  display: grid; place-items: center; background: rgba(117, 30, 20, .24);
  border: 1px solid rgba(207, 174, 109, .28); font-size: 13px;
}
.feed-body { flex: 1; min-width: 0; }
.feed-line { font-size: 12.5px; color: #cbb995; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .03em; }
.feed-line strong { color: #ecd9b8; font-weight: 500; }
.feed-meta { font-size: 9px; color: #806a4d; letter-spacing: .1em; }
.feed-merit { color: #cbaa6b; font-weight: 500; font-size: 10.5px; white-space: nowrap; letter-spacing: .04em; }
.feed-empty { padding: 1.1rem .2rem; color: rgba(203, 185, 149, .6); font-size: 11px; text-align: center; letter-spacing: .04em; }

/* side paper today */
.today-panel .panel-head { margin-bottom: .5rem; }
.today-strip {
  display: grid; gap: .3rem; padding: .85rem 0 1rem;
  border-bottom: 1px solid var(--line-ink);
  color: #6f5335; font-size: 10.5px; letter-spacing: .04em;
}
.today-strip strong { color: #8b2d21; font-family: Baskerville, serif; font-size: 18px; font-weight: 500; }
.today-strip span + span { border-top: 1px dashed rgba(115, 79, 36, .16); padding-top: .28rem; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 10px 0 0; border-bottom: 1px solid var(--line-ink); }
.stat-card {
  background: transparent; border: 0; border-radius: 0; padding: 13px 8px 12px;
  display: grid; justify-items: center; gap: 2px; box-shadow: none;
  border-right: 1px solid rgba(115, 79, 36, .14);
}
.stat-card:nth-child(2n) { border-right: 0; }
.stat-card:nth-child(-n+2) { border-bottom: 1px solid rgba(115, 79, 36, .14); }
.stat-seal {
  width: 19px; height: 19px; display: grid; place-items: center; font-family: var(--kai);
  font-size: 9px; color: #8b2d22; border: 1px solid rgba(139, 45, 34, .32); margin-bottom: 3px;
}
.stat-card strong { font-family: Baskerville, "Times New Roman", serif; font-size: 22px; font-weight: 500; color: #4b311b; line-height: 1.1; }
.stat-card span:last-child { font-family: var(--serif); font-size: 9px; color: #97784c; letter-spacing: .12em; }
.level-panel { background: transparent; border: 0; border-radius: 0; padding: 14px 0 0; margin: 0; box-shadow: none; }
.level-row { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; margin-bottom: .55rem; }
.level-row strong { color: #4b311b; font-family: var(--serif); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.level-row span { color: #8d6e44; font-size: 9px; text-align: right; }
.level-hint { margin-top: .5rem; font-size: 9.5px; color: #7c6141; line-height: 1.65; }

.verse-panel { text-align: center; padding: 30px 26px 26px; }
.verse-mark {
  width: 30px; height: 30px; margin: 0 auto 14px; display: grid; place-items: center;
  color: #8b2d22; border: 1px solid rgba(139, 45, 34, .37); font-family: var(--kai); font-size: 13px;
  transform: rotate(-2deg);
}
.verse-panel blockquote { font-family: var(--kai); font-size: 14.5px; line-height: 2; color: #5b402a; letter-spacing: .08em; }
.verse-src { margin-top: 12px; font-size: 8.5px; letter-spacing: .24em; color: #9b7b4d; }

.hall-foot { padding: 34px 0 34px; text-align: center; }
.hall-foot .ornament { display: flex; align-items: center; justify-content: center; gap: 13px; }
.hall-foot .ornament i { width: 74px; height: 1px; background: linear-gradient(90deg, transparent, rgba(207, 174, 109, .3)); }
.hall-foot .ornament i:last-child { transform: rotate(180deg); }
.hall-foot .ornament b { width: 4px; height: 4px; transform: rotate(45deg); background: rgba(207, 174, 109, .5); }
.hall-foot p { margin-top: 12px; font-family: var(--kai); font-size: 11px; letter-spacing: .5em; color: #8b7554; padding-left: .5em; }

/* ---------------- page heads ---------------- */
.page-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem;
  margin-bottom: 1.8rem; flex-wrap: wrap;
  padding-bottom: 18px; border-bottom: 1px solid rgba(207, 174, 109, .18);
}
.page-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 600; color: #ecd6a9; letter-spacing: 0.16em; line-height: 1.2; text-wrap: balance; }
.page-lead { margin-top: 8px; font-size: 11.5px; letter-spacing: .08em; color: rgba(203, 185, 149, .6); }
.page-head .btn { margin-bottom: 5px; }
.page-head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }

/* ---------------- tree ---------------- */
.tree-banner { position: relative; height: 314px; overflow: hidden; background: #0b0705; }
.tree-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 53%; filter: brightness(.72) saturate(.92) contrast(1.04); }
.tree-banner .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 5, 4, .92) 0%, rgba(9, 5, 4, .56) 42%, rgba(9, 5, 4, .2) 70%, rgba(9, 5, 4, .7) 100%), linear-gradient(180deg, rgba(9, 5, 4, .5), transparent 35%, rgba(9, 5, 4, .86) 100%); }
.tree-banner-inner {
  position: relative; z-index: 4; width: min(1480px, 100%); height: 100%; margin: 0 auto;
  padding: 0 clamp(1.4rem, 4vw, 3.4rem) 38px; display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
}
.tree-title .eyebrow { font-size: 9px; letter-spacing: .5em; color: #b49662; margin-bottom: 10px; padding-left: .5em; }
.tree-title h2 { font-size: clamp(2.4rem, 4.4vw, 3.4rem); font-weight: 600; letter-spacing: .22em; line-height: 1.1; color: #ecd6a9; }
.tree-title p { margin-top: 11px; font-size: 11.5px; letter-spacing: .22em; color: #b8a17c; }
.tree-banner-meta { display: flex; align-items: center; gap: 0; padding-bottom: 6px; }
.tree-banner-meta div { padding: 0 22px; border-left: 1px solid rgba(207, 174, 109, .24); text-align: center; }
.tree-banner-meta div:first-child { border-left: 0; }
.tree-banner-meta strong { display: block; font-family: Baskerville, "Times New Roman", serif; font-size: 25px; font-weight: 500; color: #e6cc94; line-height: 1; }
.tree-banner-meta span { display: block; margin-top: 7px; font-size: 8.5px; letter-spacing: .2em; color: #9e8764; }
.tree-banner .btn { flex: none; margin-bottom: 0; }

.tree-layout {
  width: min(1480px, 100%); margin: 0 auto;
  padding: 28px clamp(1.4rem, 4vw, 3.4rem) 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start;
}
.scroll-column { position: relative; min-width: 0; }
.tree-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 14px; }
.tree-summary { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; font-size: 10px; color: #9d8561; letter-spacing: .06em; }
.tree-summary strong { color: #e2c78f; font-size: 12.5px; font-weight: 500; letter-spacing: .1em; }
.tree-summary i { width: 1px; height: .8rem; background: rgba(207, 174, 109, .25); }
.segmented {
  display: inline-flex; gap: 2px; padding: 3px; border: 1px solid rgba(207, 174, 109, .26);
  background: rgba(0, 0, 0, .26); border-radius: 0;
}
.segmented-btn {
  border: 0; background: transparent; color: #a99066; padding: 0.32rem 0.9rem;
  border-radius: 0; font-size: 10px; letter-spacing: .1em; transition: background .16s, color .16s;
}
.segmented-btn.is-active { background: rgba(201, 154, 63, .16); color: var(--gold-2); font-weight: 500; box-shadow: inset 0 0 0 1px rgba(207, 174, 109, .18); }
.segmented-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

.rod {
  position: relative; height: 15px; margin: 0 -13px; z-index: 3;
  background: linear-gradient(180deg, #59351f, #2b160d 38%, #150b07 70%, #3a2114);
  border: 1px solid rgba(218, 180, 109, .3);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 232, 190, .14);
}
.rod::before, .rod::after {
  content: ""; position: absolute; top: 50%; width: 14px; height: 23px; transform: translateY(-50%);
  background: linear-gradient(180deg, #d5b473, #8b652e 55%, #4d3518);
  border: 1px solid rgba(239, 210, 150, .35); box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
}
.rod::before { left: -8px; border-radius: 3px 1px 1px 3px; }
.rod::after { right: -8px; border-radius: 1px 3px 3px 1px; }
.scroll-mount {
  position: relative; z-index: 2; padding: 12px;
  background: linear-gradient(150deg, #3a2014, #20100a 55%, #31190f);
  border: 1px solid rgba(207, 174, 109, .36);
  box-shadow: 0 34px 70px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 232, 190, .06);
}
.scroll-mount::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(207, 174, 109, .2); pointer-events: none; z-index: 4; }
.scroll-paper {
  position: relative; padding: 24px 28px 18px; color: var(--ink);
  background:
    radial-gradient(ellipse at 22% 8%, rgba(255, 253, 245, .65), transparent 40%),
    radial-gradient(ellipse at 84% 72%, rgba(146, 105, 54, .12), transparent 55%),
    linear-gradient(150deg, #f0e5cf, #e5d4b3 62%, #decaa6);
  box-shadow: inset 0 0 0 1px rgba(129, 92, 46, .35), inset 0 0 55px rgba(105, 69, 31, .1);
  overflow: hidden;
}
.scroll-paper::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(129, 92, 46, .2); pointer-events: none; z-index: 1; }
.scroll-paper::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .4;
  background:
    radial-gradient(ellipse 60% 28% at 32% 96%, rgba(92, 71, 47, .12), transparent 70%),
    radial-gradient(ellipse 46% 26% at 74% 100%, rgba(85, 70, 52, .1), transparent 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.42' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)' opacity='.2'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.scroll-paper > * { position: relative; z-index: 2; }
.scroll-head { text-align: center; padding: 2px 0 15px; border-bottom: 1px solid rgba(114, 79, 37, .2); }
.scroll-head h3 { font-size: 28px; font-weight: 600; letter-spacing: .34em; color: #332116; padding-left: .34em; }
.scroll-head p { margin-top: 6px; font-size: 9px; letter-spacing: .26em; color: #806743; }
.scroll-head .head-ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.scroll-head .head-ornament i { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, rgba(123, 88, 42, .5)); }
.scroll-head .head-ornament i:last-child { transform: rotate(180deg); }
.scroll-head .head-ornament b { width: 4px; height: 4px; transform: rotate(45deg); background: rgba(123, 88, 42, .6); }
.scroll-seal { position: absolute; right: 2px; top: 2px; width: 33px; height: 33px; border-radius: 1px; font-size: 12px; line-height: 1.1; writing-mode: vertical-rl; opacity: .9; }

.tree { display: grid; gap: 1.4rem; padding-top: 18px; }
.tree.tree-lineage { display: block; padding-top: 10px; }
.lineage-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding: .5rem .2rem .7rem; -webkit-overflow-scrolling: touch; }
.kin-forest { display: flex; align-items: flex-start; gap: 56px; min-width: max-content; padding: 1.4rem .9rem 1rem; }
.kin-node { display: flex; flex-direction: column; align-items: center; }
.kin-couple { display: flex; justify-content: center; align-items: stretch; position: relative; z-index: 1; }
.kin-bond { width: 34px; flex: 0 0 34px; display: flex; align-items: center; justify-content: center; position: relative; color: #8d2a20; }
.kin-bond::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: 1.5px solid #8d2a20; }
.kin-bond span {
  position: relative; z-index: 1; width: 13px; height: 13px; display: grid; place-items: center;
  border-radius: 0; border: 1px solid #b08a55; background: #e9d9ba;
  font-size: 0; line-height: 1; transform: rotate(45deg);
  box-shadow: 0 0 0 3px #e9d9ba;
}
.kin-card {
  position: relative; width: 158px; min-height: 110px; display: block;
  padding: 13px 10px 10px; text-align: center; color: #2e1d13; font: inherit;
  background: linear-gradient(165deg, rgba(255, 251, 242, .72), rgba(239, 226, 202, .74) 58%, rgba(228, 211, 181, .84));
  border: 1px solid rgba(121, 87, 43, .46); border-radius: 0;
  box-shadow: 0 7px 14px rgba(70, 44, 21, .16), inset 0 0 0 3px rgba(255, 252, 244, .24), inset 0 0 20px rgba(135, 93, 41, .05);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.kin-card::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(130, 94, 46, .2); pointer-events: none; }
.kin-card::after { content: ""; position: absolute; left: 50%; top: -5px; width: 8px; height: 8px; margin-left: -4px; transform: rotate(45deg); border: 1px solid rgba(134, 96, 46, .45); background: #ecdec1; box-shadow: 0 0 0 2px rgba(236, 222, 193, .8); }
.kin-card:hover { transform: translateY(-2px); border-color: #b08a55; box-shadow: 0 10px 20px rgba(70, 44, 21, .22), inset 0 0 0 3px rgba(255, 252, 244, .3); }
.kin-card:focus-visible { outline: 2px solid var(--gold-3); outline-offset: 2px; }
.kin-card.is-inlaw { border-style: dashed; border-color: rgba(139, 53, 37, .44); background: linear-gradient(165deg, rgba(255, 249, 238, .74), rgba(240, 224, 199, .78) 58%, rgba(230, 211, 181, .86)); }
.kin-card.is-inlaw::before { border-color: rgba(139, 53, 37, .16); }
.kin-card.is-inlaw::after { content: ""; left: -1px; top: 9px; bottom: 9px; width: 3px; height: auto; margin: 0; transform: none; background: linear-gradient(180deg, #a43a2b, #6f1712); border: 0; box-shadow: 1px 0 3px rgba(111, 23, 18, .18); }
.kin-avatar { display: none; }
.kin-body { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; }
.kin-name-line { display: flex; align-items: center; justify-content: center; gap: .3rem; min-width: 0; width: 100%; }
.kin-name-line strong { font-family: var(--serif); font-size: 17px; font-weight: 600; color: #2e1d13; letter-spacing: .08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kin-gen {
  position: absolute; top: 5px; right: 5px; z-index: 2; flex: none;
  min-width: 17px; padding: 2px 4px; font-size: 7px; line-height: 1.15; letter-spacing: .02em;
  color: #f1ddb4; background: #8b2017; border: 1px solid rgba(255, 227, 177, .4);
  border-radius: 0; white-space: nowrap;
}
.kin-gen.is-inlaw { background: #efe1c6; color: #8b2d22; border-color: rgba(139, 45, 34, .35); }
.kin-self {
  flex: none; padding: 1px 3px; font-size: 7px; line-height: 1.2; letter-spacing: .04em;
  color: #f1ddb4; background: #8b2017; border: 1px solid rgba(255, 227, 177, .4);
}
.kin-meta { margin-top: 3px; font-size: 8px; letter-spacing: .1em; color: #796246; }
.kin-life { margin-top: 4px; font-family: Baskerville, "Times New Roman", serif; font-size: 10.5px; letter-spacing: .04em; color: #7b2d21; white-space: nowrap; }
.kin-migrate { margin-top: 2px; font-size: 7.5px; letter-spacing: .02em; color: #88704f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kin-spouse { margin-top: 2px; font-size: 7.5px; color: #8b3b2d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kin-children { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 20px; width: 100%; }
.kin-children::before { content: ""; position: absolute; top: 0; left: 50%; height: 17px; border-left: 1.5px solid #9b7a50; }
.kin-unit { position: relative; flex: none; padding-top: 34px; display: flex; justify-content: center; }
.kin-unit::before, .kin-unit::after { content: ""; position: absolute; top: 17px; height: 0; border-top: 1.5px solid #9b7a50; }
.kin-unit::before { left: -10px; right: 50%; }
.kin-unit::after { left: 50%; right: -10px; }
.kin-unit:first-child::before { display: none; }
.kin-unit:last-child::after { display: none; }
.kin-stem { position: absolute; top: 17px; left: 50%; height: 17px; border-left: 1.5px solid #9b7a50; }
.kin-stem::after { content: ""; position: absolute; left: -2.5px; bottom: -3px; width: 4px; height: 4px; transform: rotate(45deg); background: #b08a55; }
.lineage-hint { margin-top: .2rem; text-align: center; font-size: 8px; color: #8a6f49; letter-spacing: .12em; }

/* list mode */
.generation { display: grid; gap: .7rem; }
.generation-head { display: flex; align-items: center; gap: .7rem; }
.generation-chip {
  background: #3a2014; color: #e2c78f; border-radius: 0;
  padding: .22rem .8rem; font-size: 9px; letter-spacing: .16em;
}
.generation-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(123, 88, 42, .4), transparent); }
.generation-head .muted { color: #8a6f49; font-size: 9px; }
.member-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: .8rem; }
.member-card {
  position: relative; background: linear-gradient(165deg, rgba(255, 251, 242, .68), rgba(239, 226, 202, .74));
  border: 1px solid rgba(121, 87, 43, .4); border-radius: 0;
  padding: .85rem .9rem; display: grid; gap: .4rem;
  box-shadow: 0 6px 14px rgba(70, 44, 21, .12), inset 0 0 0 3px rgba(255, 252, 244, .2);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.member-card:hover { transform: translateY(-2px); border-color: rgba(134, 96, 46, .7); box-shadow: 0 10px 20px rgba(70, 44, 21, .2); }
.member-card.is-inlaw { border-style: dashed; border-color: rgba(139, 53, 37, .44); background: linear-gradient(165deg, rgba(255, 249, 238, .72), rgba(240, 224, 199, .76)); }
.member-card.is-inlaw::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; background: linear-gradient(180deg, #a43a2b, #6f1712); }
.member-top { display: flex; align-items: center; gap: .6rem; }
.member-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 1px; display: grid; place-items: center;
  background: rgba(255, 250, 236, .35); border: 1px solid rgba(121, 87, 43, .3); font-size: 1rem;
}
.member-heading { flex: 1; min-width: 0; }
.member-name { font-family: var(--serif); font-weight: 600; color: #2e1d13; font-size: 15px; letter-spacing: .06em; }
.member-name .member-flag.is-self { margin-left: .35rem; vertical-align: middle; }
.member-card.is-self { border-color: rgba(139, 32, 23, .55); }
.member-relation { font-size: 8.5px; color: #8b3b2d; letter-spacing: .08em; }
.member-flag {
  flex: none; font-size: 7px; color: #f1ddb4; background: #8b2017; border: 1px solid rgba(255, 227, 177, .4);
  border-radius: 0; padding: .1rem .32rem; letter-spacing: .04em;
}
.member-life { font-family: Baskerville, serif; font-size: 10px; color: #7b2d21; letter-spacing: .03em; }
.member-parent { font-size: 8.5px; color: #7c6141; }
.member-migration { font-size: 8px; color: #88704f; }
.member-bio { font-size: 10px; color: #5f472f; line-height: 1.65; }
.member-card .member-actions { display: flex; gap: .35rem; justify-content: flex-end; margin-top: .2rem; }
.member-card .btn-small { padding: .25rem .55rem; font-size: 9px; }

/* tree side */
.tree-side { display: grid; gap: 22px; min-width: 0; }
.tree-side .panel { padding: 20px 20px 18px; }
.health-panel { margin: 0; min-height: 130px; }
.health-top { display: grid; grid-template-columns: 82px 1fr; gap: 14px; align-items: center; position: relative; z-index: 2; }
.health-score {
  width: 82px; height: 82px; border-radius: 50%; flex: none; padding: 5px;
  background: conic-gradient(var(--gold-3) calc(var(--score) * 3.6deg), rgba(120, 83, 40, .18) 0);
  box-shadow: var(--shadow-ink);
  position: relative;
}
.health-score::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px dashed rgba(126, 91, 43, .3); pointer-events: none; }
.health-score > div {
  width: 100%; height: 100%; border-radius: 50%; background: #ede0c7;
  display: grid; place-items: center; align-content: center; line-height: 1.1;
}
.health-score strong { font-family: Baskerville, "Times New Roman", serif; font-size: 27px; color: #4b311b; font-weight: 500; }
.health-score small { font-size: 7px; color: #8b6b41; letter-spacing: .1em; }
.health-copy { min-width: 0; }
.health-copy > strong { color: #3b2517; font-size: 18px; font-weight: 600; letter-spacing: .1em; display: block; margin-bottom: .2rem; }
.health-copy p { font-size: 9.5px; color: #7c6141; line-height: 1.7; }
.health-issues { display: flex; flex-direction: column; gap: .1rem; margin-top: .35rem; font-size: 9px; color: #8b3b2d; line-height: 1.55; }
.health-top .btn { grid-column: 1 / -1; width: 100%; margin-top: 4px; padding: .55rem; font-size: 10px; }
.health-panel .loading, .health-panel .empty { margin-top: 4px; }
.legend-panel .panel-head { margin-bottom: .6rem; }
.legend { display: grid; gap: 11px; margin-top: 6px; }
.legend-row { display: flex; align-items: center; gap: 11px; font-size: 9.5px; letter-spacing: .05em; color: #a99066; }
.legend-swatch { width: 46px; height: 12px; flex: none; display: flex; align-items: center; }
.legend-swatch.blood::before { content: ""; width: 100%; border-top: 1.5px solid #b08a55; }
.legend-swatch.blood::after { content: ""; width: 4px; height: 4px; transform: rotate(45deg); background: #cbaa6b; margin-left: -25px; }
.legend-swatch.spouse::before { content: ""; width: 100%; border-top: 1.5px solid #8d2a20; }
.legend-swatch.spouse::after { content: ""; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid #b08a55; background: #e9d9ba; margin-left: -28px; }
.legend-swatch.inlaw { border-top: 1.5px dashed #9b4637; height: 1px; margin-top: 5px; }
.legend-row em { font-style: normal; margin-left: auto; font-size: 8px; color: #806a4d; letter-spacing: .04em; }
.legend-note { margin-top: 15px; padding-top: 12px; border-top: 1px solid rgba(207, 174, 109, .12); font-size: 9px; color: #8e7654; line-height: 1.75; }
.tree-verse { text-align: center; padding: 26px 20px !important; }
.tree-verse p { font-family: var(--kai); font-size: 12.5px; line-height: 2; color: #60452d; letter-spacing: .08em; }
.scroll-foot { display: flex; align-items: center; justify-content: center; gap: 11px; margin-top: 15px; padding-top: 11px; border-top: 1px solid rgba(112, 78, 37, .18); font-size: 8px; letter-spacing: .14em; color: #8a6f49; }
.scroll-foot b { width: 3px; height: 3px; transform: rotate(45deg); background: rgba(128, 92, 44, .55); }

/* ---------------- events ---------------- */
.event-list { display: grid; gap: 10px; }
.event-item {
  display: flex; align-items: center; gap: 1rem; padding: .95rem 1.15rem;
  color: var(--ink); position: relative;
  background: linear-gradient(160deg, #f0e4cc, #e3d1b0);
  border: 1px solid rgba(207, 174, 109, .44); border-radius: 0;
  box-shadow: 0 10px 24px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,251,240,.32);
}
.event-item::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(120, 83, 40, .16); pointer-events: none; }
.event-date {
  min-width: 62px; text-align: center; border-radius: 0; padding: .35rem .4rem;
  background: rgba(255, 250, 236, .32); color: #573a22; border: 1px solid rgba(111, 76, 33, .26);
  font-family: Baskerville, var(--serif); font-weight: 500; font-size: 11px; line-height: 1.25;
}
.event-date.is-next { background: linear-gradient(180deg, #a83426, #74140f); color: #f4e1bd; border-color: rgba(226, 190, 121, .4); }
.event-body { flex: 1; min-width: 0; }
.event-title { font-weight: 600; color: #3c2718; font-size: 15px; letter-spacing: .05em; }
.event-meta { font-size: 9.5px; color: #8d714c; letter-spacing: .06em; }
.event-days { font-size: 10px; color: #8b3b2d; font-weight: 600; white-space: nowrap; letter-spacing: .06em; }
.event-days.is-past { color: #97784c; font-weight: 400; }
.event-item .item-actions { display: flex; gap: .35rem; justify-content: flex-end; flex: none; }
.empty .event-item .btn-small { position: relative; z-index: 2; }

/* ---------------- stories ---------------- */
.story-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.story-card {
  position: relative; color: var(--ink);
  background:
    radial-gradient(ellipse at 25% 0%, rgba(255, 252, 244, .55), transparent 46%),
    linear-gradient(160deg, #f0e5cf, #e4d3b3);
  border: 1px solid rgba(207, 174, 109, .5); border-left: 3px solid #8b2d22; border-radius: 0;
  padding: 1.2rem 1.25rem 1rem; box-shadow: 0 14px 30px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,251,240,.3);
  display: grid; gap: .55rem;
}
.story-card::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(120, 83, 40, .14); pointer-events: none; }
.story-card > * { position: relative; z-index: 2; }
.story-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.story-speaker { font-family: var(--serif); font-weight: 600; color: #3c2718; font-size: 15px; letter-spacing: .08em; }
.story-text { font-size: 12.5px; color: #4d3826; line-height: 1.95; white-space: pre-wrap; letter-spacing: .02em; }
.story-meta { font-size: 8.5px; color: #8d714c; letter-spacing: .08em; }
.role-tag { font-size: 7.5px; padding: .12rem .5rem; border-radius: 0; background: rgba(139, 45, 34, .1); border: 1px solid rgba(139, 45, 34, .24); color: #8b3b2d; letter-spacing: .04em; white-space: nowrap; }
.story-card .item-actions { display: flex; gap: .35rem; justify-content: flex-end; margin-top: .1rem; }
.story-organize-bar {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .7rem;
  padding: .7rem .9rem; border: 1px dashed rgba(207, 174, 109, .42); background: rgba(255, 250, 236, .05);
  color: rgba(236, 214, 169, .82); font-size: 10.5px; letter-spacing: .06em;
}
.story-organize-bar strong { color: #f0d9a6; font-weight: 600; }
.story-organize-actions { display: flex; align-items: center; gap: .4rem; }
.story-card.is-picked { border-left-color: #b8862e; box-shadow: 0 14px 30px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,251,240,.3), 0 0 0 1px rgba(184, 134, 46, .45); }
.story-pick {
  display: flex; align-items: center; justify-content: flex-end; gap: .45rem;
  font-size: 10px; color: #4d3826; letter-spacing: .06em; cursor: pointer;
}
.story-pick input { width: 14px; height: 14px; accent-color: #8b2d22; cursor: pointer; }

/* ---------------- 家书 ---------------- */
.letter-form { display: grid; gap: 1rem; }
.letter-field { display: grid; gap: .45rem; }
.letter-label { font-size: 0.76rem; color: var(--ink-2); font-weight: 600; letter-spacing: .12em; }
.letter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.letter-chip {
  padding: .32rem .8rem; border: 1px solid rgba(101, 73, 40, .28); border-radius: 999px;
  background: rgba(255, 250, 236, .28); font-family: var(--serif); font-size: .8rem;
  color: #654928; letter-spacing: .04em; cursor: pointer;
}
.letter-chip:hover { border-color: #9b7c4e; }
.letter-chip.is-active { border-color: #8b2d22; background: rgba(139, 45, 34, .1); color: #6b1f17; }
.letter-form .field textarea { min-height: 76px; }
.letter-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.letter-actions .btn { flex: 0 1 auto; }
.letter-result {
  margin-top: 1.1rem; padding-top: 1rem; border-top: 1px dashed rgba(101, 73, 40, .3);
  display: grid; gap: .8rem;
}
.letter-result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .7rem; }
.letter-result-head > span:first-child { font-size: .95rem; color: #352216; letter-spacing: .1em; }
.letter-note { font-size: .7rem; color: #7c6141; line-height: 1.6; }
.letter-result .field textarea { min-height: 230px; background: rgba(255, 252, 243, .66); line-height: 1.9; }
@media (max-width: 600px) {
  .letter-actions { justify-content: stretch; }
  .letter-actions .btn { flex: 1 1 auto; }
  .letter-result .field textarea { min-height: 200px; }
}

/* ---------------- 口述成谱 ---------------- */
.bio-source { margin-top: .2rem; border: 1px dashed rgba(101, 73, 40, .3); background: rgba(255, 250, 236, .28); }
.bio-source > summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .8rem; font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  color: #6b4a2b; cursor: pointer; list-style: none;
}
.bio-source > summary::-webkit-details-marker { display: none; }
.bio-source > summary::after { content: "▾"; font-size: .7rem; color: #9b7c4e; transition: transform .2s; }
.bio-source[open] > summary::after { transform: rotate(180deg); }
.bio-source-body { padding: 0 .8rem .8rem; display: grid; gap: .55rem; }
.bio-source-list { display: grid; gap: .35rem; max-height: 220px; overflow-y: auto; padding-right: .15rem; }
.bio-source-item {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .45rem .55rem; border: 1px solid rgba(101, 73, 40, .16); background: rgba(255, 255, 250, .5);
  cursor: pointer;
}
.bio-source-item:hover { border-color: rgba(139, 45, 34, .35); }
.bio-source-item input { width: 14px; height: 14px; margin-top: .15rem; accent-color: #8b2d22; cursor: pointer; flex: none; }
.bio-source-main { display: grid; gap: .12rem; min-width: 0; }
.bio-source-speaker { display: flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 600; color: #4d3826; letter-spacing: .05em; }
.bio-own { font-style: normal; font-size: .62rem; padding: .05rem .3rem; color: #8b3b2d; border: 1px solid rgba(139, 45, 34, .28); }
.bio-source-text { font-size: .7rem; line-height: 1.6; color: #7c6141; }
.bio-source-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.bio-source-hint { font-size: .66rem; color: #7c6141; letter-spacing: .05em; }
.bio-source-note { font-size: .68rem; line-height: 1.6; color: #7c6141; }
.bio-source-note.is-error { color: #8b2d22; }
.bio-source-privacy { font-size: .64rem; line-height: 1.55; color: rgba(124, 97, 65, .8); }
@media (max-width: 600px) {
  .bio-source-list { max-height: 180px; }
  .bio-source-actions .btn { flex: 1 1 auto; }
}

/* ---------------- rank ---------------- */
.rank-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: start; }
.rank-list { list-style: none; display: grid; gap: 0; }
.rank-item { display: flex; align-items: center; gap: .8rem; padding: .68rem .25rem; border-bottom: 1px dashed rgba(115, 79, 36, .2); }
.rank-item:last-child { border-bottom: none; }
.rank-no {
  width: 28px; height: 28px; flex: none; border-radius: 0; display: grid; place-items: center;
  background: rgba(255, 250, 236, .32); color: #8d714c; font-family: Baskerville, serif;
  font-weight: 500; font-size: 11px; border: 1px solid rgba(115, 79, 36, .22);
}
.rank-item:nth-child(1) .rank-no { background: linear-gradient(145deg, #e8c56a, #b8862e); color: #2a1a0e; border-color: rgba(139, 100, 48, .4); }
.rank-item:nth-child(2) .rank-no { background: #d8d8d8; color: #444; }
.rank-item:nth-child(3) .rank-no { background: #d8a778; color: #3a2110; }
.rank-body { flex: 1; min-width: 0; display: grid; }
.rank-name { font-weight: 600; color: #3c2718; font-size: 13.5px; letter-spacing: .04em; }
.rank-breakdown { font-size: 8.5px; color: #8d714c; font-weight: 400; letter-spacing: .03em; }
.rank-score { color: #8b3b2d; font-family: Baskerville, var(--serif); font-weight: 600; font-size: 12px; white-space: nowrap; }
.account-list { list-style: none; display: grid; gap: 0; }
.account-list li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .62rem .2rem; border-bottom: 1px dashed rgba(115, 79, 36, .2); font-size: 11.5px; color: #3c2718; }
.account-list li:last-child { border-bottom: none; }
.account-list .role-tag { flex: none; }

/* ---------------- family ---------------- */
.invite-panel { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap; }
.invite-copy .panel-kicker { margin-bottom: 2px; }
.invite-copy strong { display: block; font-family: Baskerville, var(--serif); font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 500; letter-spacing: .3em; color: #8b2d22; margin: 0.1rem 0 0.25rem; }
.invite-hint { font-size: 9.5px; color: #7c6141; letter-spacing: .04em; }
.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 22px 0; }
.info-list { display: grid; gap: .5rem; }
.info-list div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dashed rgba(115, 79, 36, .2); padding-bottom: .42rem; }
.info-list div:last-child { border-bottom: none; }
.info-list dt { color: #8d714c; font-size: 10px; letter-spacing: .04em; }
.info-list dd { font-weight: 600; font-size: 11.5px; color: #3c2718; text-align: right; }
.body-copy { font-size: 11.5px; color: #60452d; line-height: 1.9; }
.body-copy + .archive-actions { margin-top: 1rem; }
.archive-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
#view-family > .panel { margin-top: 22px; }
#view-family > .panel:first-of-type { margin-top: 0; }
.admin-codes-panel[hidden] { display: none; }
.admin-code-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: .6rem; align-items: end; margin: 1rem 0 .6rem; }
.admin-field { display: flex; flex-direction: column; gap: .28rem; font-size: 9.5px; letter-spacing: .06em; color: #8d714c; }
.admin-field select, .admin-field input {
  width: 100%; min-width: 0; padding: .42rem .5rem; font-family: var(--serif); font-size: 11.5px; color: #3c2718;
  background: rgba(255, 250, 236, .55); border: 1px solid rgba(120, 83, 40, .32); border-radius: 0;
}
.admin-field select:focus, .admin-field input:focus { outline: none; border-color: #8b2d22; background: #fffaf0; }
.admin-code-submit { height: 33px; padding: 0 1rem; white-space: nowrap; }
.admin-code-summary { margin: .55rem 0 0; font-size: 10px; line-height: 1.7; letter-spacing: .03em; color: #6d5436; }
.admin-code-summary[hidden] { display: none; }
.admin-code-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.admin-filter {
  padding: .2rem .7rem; font-family: var(--serif); font-size: 9.5px; letter-spacing: .06em;
  color: #7a5d3a; background: none; border: 1px solid rgba(120, 83, 40, .28); border-radius: 999px; cursor: pointer;
}
.admin-filter:hover { border-color: rgba(139, 45, 34, .4); }
.admin-filter.is-active { color: #6d2a1f; border-color: rgba(139, 45, 34, .45); background: rgba(139, 45, 34, .07); }
.admin-code-filters + .admin-code-list { margin-top: .5rem; }
.admin-code-result {
  margin-top: .8rem; padding: .8rem .9rem; border: 1px dashed rgba(139, 45, 34, .38);
  background: rgba(255, 246, 224, .5);
}
.admin-code-result-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .55rem; }
.admin-code-result-head strong { font-size: 10.5px; letter-spacing: .06em; color: #6d2a1f; }
.admin-code-result-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .22rem 0; border-top: 1px dashed rgba(115, 79, 36, .16); }
.admin-code-result-row code { font-family: "SF Mono", Menlo, monospace; font-size: 12px; letter-spacing: .1em; color: #3c2718; }
.admin-code-result-row button {
  padding: .16rem .5rem; font-size: 9px; letter-spacing: .08em; color: #7a4a22;
  background: none; border: 1px solid rgba(120, 83, 40, .34); border-radius: 0; cursor: pointer;
}
.admin-code-result-row button:hover { color: #8b2d22; border-color: #8b2d22; }
.admin-code-list { display: grid; gap: .3rem; margin-top: .9rem; }
.admin-code-list li {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap;
  padding: .42rem 0; border-bottom: 1px dashed rgba(115, 79, 36, .18); font-size: 10.5px; color: #60452d;
}
.admin-code-list li:last-child { border-bottom: none; }
.admin-code-list .code-side { display: inline-flex; align-items: center; gap: .55rem; margin-left: auto; }
.admin-code-list .code-state { font-size: 9px; letter-spacing: .05em; color: #8d714c; }
.admin-code-list .code-state.is-dead { color: #a1503f; }
.admin-code-list .code-revoke {
  padding: .12rem .45rem; font-family: var(--serif); font-size: 9px; letter-spacing: .08em; color: #a1503f;
  background: none; border: 1px solid rgba(161, 80, 63, .4); border-radius: 0; cursor: pointer;
}
.admin-code-list .code-revoke:hover { color: #8b2d22; border-color: #8b2d22; }
.admin-code-more {
  display: block; width: 100%; margin-top: .55rem; padding: .36rem 0;
  font-family: var(--serif); font-size: 9.5px; letter-spacing: .12em; color: #7a5d3a;
  background: none; border: 1px dashed rgba(120, 83, 40, .32); border-radius: 0; cursor: pointer;
}
.admin-code-more:hover { color: #6d2a1f; border-color: rgba(139, 45, 34, .45); }
.admin-code-more[hidden] { display: none; }
.admin-code-more:disabled { opacity: .55; cursor: default; }
.admin-subhead { margin: 1rem 0 .3rem; font-size: 9.5px; letter-spacing: .08em; color: #8d714c; }
.admin-redeem-list { margin-top: 0; }
.admin-code-empty { font-size: 9.5px; color: #8d714c; letter-spacing: .04em; }

.admin-ai-panel[hidden] { display: none; }
.admin-ai-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: .9rem; }
.admin-ai-stat {
  display: flex; flex-direction: column; gap: .18rem; min-width: 0;
  padding: .55rem .65rem; border: 1px solid rgba(120, 83, 40, .22); background: rgba(255, 250, 236, .42);
}
.admin-ai-stat span { font-size: 9px; letter-spacing: .06em; color: #8d714c; }
.admin-ai-stat strong { font-size: 12px; font-weight: 600; color: #3c2718; overflow-wrap: anywhere; }
.admin-ai-summary { margin: .7rem 0 0; font-size: 10px; line-height: 1.8; letter-spacing: .02em; color: #6d5436; }
.admin-ai-features { display: grid; gap: .15rem; margin-top: .7rem; }
.admin-ai-features li {
  display: flex; align-items: center; gap: .6rem; padding: .4rem 0; font-size: 10.5px; color: #60452d;
  border-top: 1px dashed rgba(115, 79, 36, .18);
}
.admin-ai-feature-name { min-width: 5.5em; }
.admin-ai-feature-meta { font-size: 9px; color: #8d714c; }
.admin-ai-state { margin-left: auto; font-size: 9px; letter-spacing: .05em; color: #9a6a3a; }
.admin-ai-state.is-ready { color: #4f6b45; }
.admin-ai-failures[hidden] { display: none; }
.admin-ai-failure-list { display: grid; gap: .25rem; }
.admin-ai-failure-list li {
  display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .32rem 0;
  font-size: 10px; color: #8b2d22; border-bottom: 1px dashed rgba(115, 79, 36, .18);
}
.admin-ai-failure-detail { font-size: 9px; color: #8d714c; overflow-wrap: anywhere; }
.admin-ai-empty { grid-column: 1 / -1; margin: 0; font-size: 9.5px; color: #8d714c; letter-spacing: .04em; }

.admin-ai-probe {
  display: grid; gap: .45rem; margin-top: .9rem; padding-top: .8rem;
  border-top: 1px dashed rgba(115, 79, 36, .22);
}
.admin-ai-probe .admin-subhead { margin: 0; }
.admin-ai-probe .body-copy { margin: 0; }
.admin-ai-probe-row { display: flex; gap: .45rem; align-items: stretch; }
.admin-ai-probe-row input {
  flex: 1; min-width: 0; padding: .55rem .65rem; font: inherit; font-size: 11px;
  color: #352216; background: rgba(255, 250, 236, .5);
  border: 1px solid rgba(120, 83, 40, .26); border-radius: 0;
}
.admin-ai-probe-row input:focus { outline: 2px solid rgba(139, 45, 34, .28); outline-offset: 1px; }
.admin-ai-probe-row .btn-small { flex: none; }
.admin-ai-probe-result {
  display: grid; gap: .4rem; padding: .65rem .7rem;
  border: 1px solid rgba(120, 83, 40, .2); background: rgba(255, 250, 236, .38);
}
.admin-ai-probe-result[hidden] { display: none; }
.admin-ai-probe-hit { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.admin-ai-probe-kicker {
  padding: .08rem .35rem; font-size: 9px; letter-spacing: .08em; color: #8b2d22;
  border: 1px solid rgba(139, 45, 34, .28);
}
.admin-ai-probe-hit strong { font-size: 12px; font-weight: 600; color: #352216; letter-spacing: .02em; }
.admin-ai-probe-hit em { font-style: normal; font-size: 9px; color: #8d714c; }
.admin-ai-probe-meta { margin: 0; font-size: 10px; line-height: 1.7; color: #6d5436; overflow-wrap: anywhere; }
.admin-ai-probe-badges { display: flex; flex-wrap: wrap; gap: .3rem; }
.admin-ai-probe-badge {
  padding: .06rem .35rem; font-size: 9px; letter-spacing: .04em;
  color: #8b2d22; border: 1px solid rgba(139, 45, 34, .24);
}
.admin-ai-probe-badge.is-calm { color: #4f6b45; border-color: rgba(79, 107, 69, .3); }
.admin-ai-probe-caveat { margin: 0; font-size: 10px; line-height: 1.7; color: #7c4a32; }
.admin-ai-probe-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: 9.5px; color: #8d714c; }
.admin-ai-probe-suggest button {
  padding: .1rem .4rem; font: inherit; font-size: 9.5px; color: #6d5436;
  background: transparent; border: 1px dashed rgba(139, 45, 34, .3); cursor: pointer;
}
.admin-ai-probe-suggest button:hover { color: #8b2d22; border-color: rgba(139, 45, 34, .5); }

/* ---------------- empty / loading ---------------- */
.empty {
  padding: 2rem 1rem; text-align: center; color: #8d714c;
  border: 1px dashed rgba(120, 83, 40, .32); border-radius: 0; background: rgba(255, 250, 236, .2);
}
.empty strong { display: block; color: #4b311b; margin-bottom: 0.3rem; font-size: 14px; letter-spacing: .08em; font-weight: 600; }
.empty p { font-size: 10.5px; line-height: 1.7; }
.empty .btn { margin-top: 0.9rem; }
.lacquer-panel .empty { color: rgba(203, 185, 149, .65); border-color: rgba(207, 174, 109, .2); background: rgba(0, 0, 0, .12); }
.lacquer-panel .empty strong { color: #dfcba8; }
.loading { padding: 2rem; text-align: center; color: #8d714c; font-size: 11px; letter-spacing: .08em; }
.lacquer-panel .loading { color: rgba(203, 185, 149, .6); }
.loading::after { content: "…"; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------------- modal ---------------- */
.modal-root {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(8, 5, 3, .72); backdrop-filter: blur(6px); padding: 1rem;
}
.modal {
  position: relative; color: var(--ink);
  width: min(470px, 100%); max-height: 88vh; overflow-y: auto;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 250, 236, .5), transparent 52%),
    linear-gradient(160deg, #f0e4cc, #e3d1b0);
  border-radius: 0; padding: 1.55rem 1.5rem 1.4rem;
  box-shadow: 0 34px 90px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255, 251, 240, .4);
  border: 1px solid rgba(207, 174, 109, .6);
  animation: rise .25s ease both;
}
.modal::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(120, 83, 40, .18); pointer-events: none; }
.modal > * { position: relative; z-index: 1; }
.modal h3 { color: #352216; font-size: 1.3rem; font-weight: 600; margin-bottom: 0.3rem; padding-right: 2.2rem; letter-spacing: .1em; }
.modal-x {
  position: absolute; top: .8rem; right: .8rem; z-index: 3; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 0;
  border: 1px solid rgba(101, 73, 40, .28); background: rgba(255, 250, 236, .3); color: #654928;
  font-family: var(--sans); font-size: 1.1rem; line-height: 1;
}
.modal-x:hover { border-color: #9b7c4e; color: #352216; }
.modal-sub { color: #7c6141; font-size: 10px; margin-bottom: 1.2rem; letter-spacing: .04em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.modal-error {
  color: #8b3b2d; font-size: 10px; line-height: 1.6;
  background: rgba(139, 59, 45, .08); border: 1px solid rgba(139, 59, 45, .15); border-radius: 0; padding: 0.6rem 0.75rem;
}
.form-note { font-size: 9px; color: #8d714c; line-height: 1.7; letter-spacing: .02em; }
.modal-wide { width: min(620px, 100%); }
.check-list { list-style: none; display: grid; gap: .55rem; }
.check-item {
  display: flex; gap: .7rem; align-items: flex-start;
  padding: .75rem; border: 1px solid rgba(120, 83, 40, .2); border-radius: 0; background: rgba(255, 250, 236, .24);
}
.check-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: .35rem; background: var(--jade); flex: none; }
.check-item.is-warn .check-dot { background: var(--gold-3); }
.check-item.is-bad .check-dot { background: #8b3b2d; }
.check-body { flex: 1; min-width: 0; }
.check-body strong { display: block; font-size: 11px; color: #3c2718; letter-spacing: .04em; }
.check-body p { font-size: 10px; color: #5f472f; }
.check-body span { font-size: 8.5px; color: #8d714c; }
.check-item .btn-small { flex: none; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 1.6rem; transform: translate(-50%, 20px);
  background: linear-gradient(180deg, #2b1710, #1a0f0a); color: var(--gold-2);
  padding: 0.72rem 1.3rem; border-radius: 0; font-size: 11px; letter-spacing: .05em;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 120;
  box-shadow: 0 14px 34px rgba(0,0,0,.5); border: 1px solid rgba(201, 154, 63, .4);
  max-width: min(90vw, 480px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #42130f; border-color: rgba(200, 80, 63, .5); color: #ffd9c9; }

/* ---------------- effects ---------------- */
.smoke {
  position: absolute; width: 5px; height: 46px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(230, 230, 230, .55), transparent);
  pointer-events: none; animation: smoke 2.8s ease-out forwards;
}
@keyframes smoke {
  0% { opacity: 0; transform: translateY(0) scaleX(1); }
  20% { opacity: .7; }
  100% { opacity: 0; transform: translateY(-90px) scaleX(2.6); }
}
.petal {
  position: absolute; width: 9px; height: 9px; border-radius: 50% 0;
  pointer-events: none; animation: petal 2.2s ease-in forwards;
}
@keyframes petal {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(130px) rotate(320deg); }
}
.merit-float {
  position: absolute; transform: translate(-50%, 0); pointer-events: none; z-index: 20;
  color: var(--gold-2); font-family: var(--serif); font-weight: 600; font-size: 15px; letter-spacing: .08em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .75); white-space: nowrap;
  animation: floatUp 1.25s ease-out forwards;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(.85); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -74px) scale(1.08); }
}
.hero.is-pulsing { animation: hallPulse .75s ease; }
@keyframes hallPulse {
  0% { box-shadow: inset 0 0 0 0 rgba(232, 197, 106, 0); }
  35% { box-shadow: inset 0 0 0 2px rgba(232, 197, 106, .18), inset 0 0 120px rgba(232, 197, 106, .1); }
  100% { box-shadow: inset 0 0 0 0 rgba(232, 197, 106, 0); }
}

/* print archive */
.print-sheet { display: none; }
@media print {
  @page { margin: 16mm; }
  body { background: #fff; color: #111; }
  body::before { display: none; }
  body > * { display: none !important; }
  body > .print-sheet { display: block !important; }
  .print-sheet { font-family: var(--serif); font-size: 12px; line-height: 1.7; color: #111; }
  .print-head { text-align: center; border-bottom: 2px solid #8a1f16; padding-bottom: 14px; margin-bottom: 20px; }
  .print-head p { letter-spacing: 0.3em; font-size: 10px; color: #8a1f16; }
  .print-head h1 { font-size: 28px; letter-spacing: 0.18em; }
  .print-head span { font-size: 11px; color: #555; }
  .print-section { margin-bottom: 18px; page-break-inside: avoid; }
  .print-section h2 { font-size: 15px; border-left: 4px solid #8a1f16; padding-left: 8px; margin-bottom: 8px; }
  .print-section h3 { font-size: 13px; margin: 10px 0 6px; color: #8a1f16; }
  .print-stats { display: flex; gap: 20px; flex-wrap: wrap; border: 1px solid #ccc; padding: 10px; }
  .print-stats div { display: grid; text-align: center; }
  .print-stats strong { font-size: 16px; }
  .print-stats span { font-size: 10px; color: #555; }
  .print-members { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .print-member { border: 1px solid #ddd; padding: 8px; page-break-inside: avoid; }
  .print-member strong { font-size: 12px; }
  .print-member p { font-size: 10.5px; color: #333; }
  .print-events { padding-left: 18px; }
  .print-events li { font-size: 11px; margin-bottom: 2px; }
  .print-story { border-bottom: 1px dashed #bbb; padding: 6px 0; page-break-inside: avoid; }
  .print-story strong { font-size: 12px; }
  .print-story p { font-size: 11px; white-space: pre-wrap; }
  .print-story span { font-size: 9px; color: #666; }
  .print-foot {
    text-align: center; font-size: 9px; color: #777; margin-top: 24px;
    border-top: 1px solid #ccc; padding-top: 8px; letter-spacing: 0.2em;
  }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .hall-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .tree-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .achievement-grid { grid-template-columns: repeat(2, 1fr); }
  .badge:nth-child(3n) { border-right: 1px solid rgba(207, 174, 109, .1); }
  .badge:nth-child(2n) { border-right: 0; }
  .badge:nth-last-child(-n+3) { border-bottom: 1px solid rgba(207, 174, 109, .1); }
  .badge:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 1024px) {
  :root { --top-h: 72px; }
  .app-header { gap: 1rem; padding: 0 1.4rem; }
  .nav-btn { padding: .7rem .72rem; font-size: .84rem; letter-spacing: .12em; }
  .level-chip { display: none; }
  .hall-grid { grid-template-columns: 1fr; }
  .col-side { grid-template-columns: 1fr; align-items: start; }
  .tree-layout { grid-template-columns: 1fr; }
  .tree-side { grid-template-columns: 1fr 1fr; align-items: start; }
  .tree-side .tree-verse { display: none; }
  .tree-banner-meta div { padding: 0 15px; }
}

@media (max-width: 860px) {
  :root { --top-h: 60px; }
  body { padding-bottom: 0; }
  .app-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1rem; height: var(--top-h);
    background: linear-gradient(180deg, #170e0a, #100a07);
  }
  body[data-view="hall"] .app-header { background: linear-gradient(180deg, rgba(7,4,3,.86), rgba(7,4,3,.22) 70%, transparent); border-bottom-color: transparent; }
  body[data-view="hall"].is-scrolled .app-header { background: linear-gradient(180deg, #170e0a, #100a07); border-bottom-color: rgba(207,174,109,.22); }
  .app-brand { gap: .6rem; }
  .brand-seal.small { width: 32px; height: 32px; font-size: 1.05rem; }
  .app-brand-text strong { font-size: .9rem; letter-spacing: .1em; }
  .app-brand-text span { font-size: .54rem; letter-spacing: .2em; }
  .header-meta .merit-chip { padding: .26rem .55rem; gap: .3rem; }
  .merit-chip span { display: inline; font-size: .6rem; letter-spacing: .06em; }
  .merit-chip strong { font-size: .86rem; }

  .app-nav {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50;
    width: auto; justify-self: auto;
    height: calc(66px + env(safe-area-inset-bottom));
    display: flex; align-items: flex-start; justify-content: space-around;
    padding: 7px 4px calc(5px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(19, 11, 8, .98), rgba(10, 6, 4, .99));
    border-top: 1px solid rgba(207, 174, 109, .25);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .45);
  }
  .nav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px;
    padding: 5px 1px; border-radius: 0; font-size: 9.5px; letter-spacing: .06em;
    color: #7e6a50; background: none; text-shadow: none;
  }
  .nav-btn svg { display: block; width: 20px; height: 20px; }
  .nav-btn::after { display: none; }
  .nav-btn.is-active { color: #e0c58e; background: none; text-shadow: none; }
  .nav-btn.is-active svg { filter: drop-shadow(0 0 7px rgba(226, 189, 118, .5)); }
  .nav-btn:hover { color: #c4ab80; }

  .app-main { padding: var(--top-h) 0 calc(78px + env(safe-area-inset-bottom)); }
  body[data-view="hall"] .app-main { padding-top: 0; }
  #view-calendar, #view-stories, #view-rank, #view-family, #view-fortune { padding: 18px 14px 0; }

  .hero { height: 520px; min-height: 0; }
  .hero-bg { object-position: 49% 42%; filter: brightness(.92) saturate(.96); }
  .hero-inner { height: 100%; min-height: 0; padding: calc(var(--top-h) + 18px) 14px 0; }
  .hero-fade { height: 70px; }
  .plaque { width: min(292px, 78vw); padding: 16px 18px 14px; }
  .plaque-overline { font-size: 7px; letter-spacing: .4em; margin-bottom: 7px; }
  .plaque h2 { font-size: clamp(1.9rem, 8.4vw, 2.35rem); letter-spacing: .16em; text-indent: .16em; }
  .plaque-sub { gap: 8px; margin-top: 6px; font-size: 7.4px; letter-spacing: .17em; }
  .plaque-sub i { width: 16px; }
  .plaque-seal { width: 16px; height: 16px; font-size: 7px; right: 11px; bottom: 9px; }
  .hall-lamp { top: calc(var(--top-h) + 8px); right: 12px; }
  .altar { width: calc(100vw - 28px); max-width: 420px; margin-top: 16px; }
  .altar-head { padding: 8px 0 0; gap: 10px; }
  .altar-head span { width: 34px; }
  .altar-head p { font-size: 7.2px; letter-spacing: .3em; }
  .hero-altar { display: block; min-height: 62px; padding: 6px 8px 0; }
  .altar-generations { display: none; }
  .altar-compact { display: flex; justify-content: center; align-items: flex-end; gap: .5rem; flex-wrap: nowrap; }
  .altar-compact .tablet { width: 34px; height: 58px; }
  .altar-compact .tablet::before { inset: 4px 0 7px; border-radius: 50% 50% 2px 2px / 22% 22% 2px 2px; }
  .altar-compact .tablet::after { inset: 7px 3px 11px; }
  .altar-compact .tablet-crown { width: 90%; height: 13px; }
  .altar-compact .tablet-name { margin-top: 14px; font-size: min(var(--name-size, 8.5px), 8.5px); line-height: 1; letter-spacing: var(--name-track, .05em); max-height: calc(100% - 20px); }
  .altar-compact .tablet-base { width: 120%; height: 6px; }
  .altar-compact .tablet-base::before { top: -3px; height: 4px; }
  .altar-compact .tablet-base::after { bottom: -3px; height: 3px; }
  .worship-grid { padding: 0 4px 4px; }
  .worship-btn { gap: 4px; padding: 6px 2px 4px; }
  .worship-icon { width: 34px; height: 34px; }
  .worship-icon svg { width: 17px; height: 17px; }
  .worship-label { font-size: 10.5px; letter-spacing: .1em; }
  .worship-cost { font-size: 6.4px; margin-top: -2px; letter-spacing: .04em; }
  .worship-stock { margin: -1px 6px 6px; padding-top: 5px; font-size: 7.2px; letter-spacing: .05em; }
  .redeem-row { padding: 5px 6px 6px; gap: 5px; }
  .redeem-input { height: 22px; padding: 0 7px; font-size: 8px; letter-spacing: .04em; }
  .redeem-input::placeholder { letter-spacing: .02em; }
  .redeem-btn { height: 22px; padding: 0 8px; font-size: 8px; letter-spacing: .08em; }
  .altar-foot { padding: 6px 8px 7px; gap: 9px; font-size: 7.2px; letter-spacing: .08em; }
  .altar-foot i { width: 2px; height: 2px; }
  .altar-empty { font-size: .6rem; }
  .smoke { height: 34px; }

  .hall-main { padding: 20px 14px 0; }
  .section-label { margin-bottom: 14px; }
  .section-label p { font-size: 8px; }
  .hall-grid { gap: 14px; }
  .col-main, .col-side { gap: 14px; }
  .col-side { grid-template-columns: 1fr; }
  .lacquer-panel, .paper-panel { padding: 18px 16px; }
  .panel-head h3 { font-size: 1.12rem; letter-spacing: .1em; }
  .panel-kicker { font-size: 6.8px; }
  .panel-count { font-size: 8px; padding-top: 3px; }
  .task-text strong { font-size: 12px; }
  .task-text span { font-size: 9px; }
  .task-reward { font-size: 9.5px; }
  .task-icon { width: 30px; height: 30px; font-size: 13px; }
  .task-card { padding: 11px 0; }
  .task-btn { font-size: 9px; }
  .badge { padding: 10px 7px; gap: .45rem; }
  .badge-icon { width: 27px; height: 27px; font-size: 12px; }
  .badge-name { font-size: 10px; }
  .badge-desc { font-size: 8px; }
  .feed-line { font-size: 11px; }
  .feed-icon { width: 27px; height: 27px; font-size: 12px; }
  .feed-item { padding: 10px 0; }
  .today-strip { font-size: 10px; }
  .stat-card strong { font-size: 20px; }
  .verse-panel { display: none; }
  .hall-foot { padding: 22px 0 26px; }

  .page-head { margin-bottom: 15px; padding-bottom: 13px; }
  .page-head h2 { font-size: 1.8rem; }
  .page-lead { font-size: 9.5px; margin-top: 5px; }
  .page-head .btn { padding: .62rem 1rem; font-size: 11px; }

  .tree-banner { height: 268px; }
  .tree-banner-inner { padding: 0 16px 22px; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
  .tree-title { flex: 1; min-width: 60%; }
  .tree-title h2 { font-size: clamp(1.9rem, 8vw, 2.4rem); letter-spacing: .16em; }
  .tree-title p { font-size: 9px; letter-spacing: .12em; margin-top: 7px; }
  .tree-title .eyebrow { font-size: 7.5px; margin-bottom: 7px; }
  .tree-banner-meta { display: none; }
  .tree-banner .btn { padding: .58rem .8rem; font-size: 10px; letter-spacing: .06em; }
  .tree-layout { padding: 16px 12px 0; gap: 16px; }
  .tree-toolbar { gap: 8px; margin-bottom: 10px; }
  .tree-summary { font-size: 8.5px; gap: .35rem; }
  .tree-summary strong { font-size: 10.5px; }
  .segmented-btn { padding: .3rem .65rem; font-size: 9px; }
  .rod { margin: 0 -4px; }
  .rod::before { left: -6px; }
  .rod::after { right: -6px; }
  .scroll-mount { padding: 7px; }
  .scroll-paper { padding: 16px 10px 12px; }
  .scroll-head { padding-bottom: 10px; }
  .scroll-head h3 { font-size: 20px; }
  .scroll-head p { font-size: 7px; }
  .scroll-head .head-ornament { margin-top: 7px; }
  .scroll-seal { width: 24px; height: 24px; font-size: 8px; }
  .scroll-foot { font-size: 6.5px; gap: 7px; }
  .tree-side { grid-template-columns: 1fr; gap: 14px; }
  .tree-side .panel { padding: 18px 16px; }
  .tree-verse { display: none; }
  .legend-panel { display: none; }
  .health-panel { min-height: 0; }
  .health-top { grid-template-columns: 72px 1fr; gap: 12px; }
  .health-score { width: 72px; height: 72px; }
  .health-score strong { font-size: 23px; }
  .health-copy > strong { font-size: 16px; }
  .health-copy p { font-size: 9px; }
  .health-issues { font-size: 8.5px; }
  .health-top .btn { font-size: 9px; padding: .45rem; }
  .tree { padding-top: 12px; }
  .kin-forest { gap: 38px; padding: 1.1rem .5rem .8rem; }
  .kin-card { width: 146px; min-height: 104px; padding: 12px 8px 9px; }
  .kin-name-line strong { font-size: 15.5px; }
  .kin-children { gap: 14px; }
  .lineage-hint { font-size: 7px; }
  .member-row { grid-template-columns: 1fr; }
  .member-card { padding: .75rem .8rem; }
  .generation { gap: .55rem; }

  .event-item { flex-wrap: wrap; padding: .85rem .9rem; gap: .7rem; }
  .event-date { min-width: 55px; }
  .event-title { font-size: 13px; }
  .event-item .item-actions { width: 100%; }
  .story-list { grid-template-columns: 1fr; }
  .rank-layout, .family-grid { grid-template-columns: 1fr; gap: 14px; }
  .family-grid { margin: 14px 0; }
  #view-family > .panel { margin-top: 14px; }
  .invite-panel { gap: 1rem; }
  .invite-copy strong { font-size: 2rem; }
  .invite-panel .btn { width: 100%; }
  .admin-code-form { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .admin-code-submit { grid-column: 1 / -1; width: 100%; height: 30px; }
  .admin-code-result-row code { font-size: 11px; letter-spacing: .06em; }
  .admin-ai-stats { grid-template-columns: 1fr 1fr; gap: .4rem; }
  .admin-ai-stat { padding: .5rem .55rem; }
  .rank-layout { gap: 14px; }
  .story-card { padding: 1rem; }
  .story-text { font-size: 11.5px; }

  .modal { padding: 1.3rem 1.1rem 1.1rem; max-height: 90vh; }
  .modal h3 { font-size: 1.15rem; }
  .form-row { grid-template-columns: 1fr; gap: .8rem; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; }
  .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }

  .onboarding { padding: 2rem 1rem; place-items: start center; }
  .brand-seal { width: 56px; height: 56px; font-size: 1.8rem; }
  .brand h1 { font-size: 1.9rem; }
  .brand p { font-size: .72rem; }
  .onboard-card { padding: 1.35rem 1.15rem; }
  .onboard-tabs { margin-bottom: 1.1rem; }
  .onboard-tab { padding: .52rem .3rem; font-size: .82rem; letter-spacing: .04em; }
  .btn-code { padding: .5rem .6rem; font-size: .68rem; }
  .onboarding-foot { margin-top: 1.2rem; font-size: .7rem; }
}

@media (max-width: 380px) {
  .nav-btn { font-size: 8.5px; }
  .nav-btn svg { width: 18px; height: 18px; }
  .worship-icon { width: 30px; height: 30px; }
  .worship-label { font-size: 9.5px; }
  .hero { height: 508px; min-height: 0; }
  .altar { width: calc(100vw - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------------- 观时 ---------------- */
.fortune-head-actions { display: flex; align-items: center; gap: .55rem; flex: none; }
#fortune-self-btn.is-unset { color: #8b2017; border-color: rgba(139, 32, 23, .45); }
.fortune-head-actions .btn { margin-bottom: 5px; }
.fortune-head-actions .btn-ghost {
  color: #d6bb85; border-color: rgba(207, 174, 109, .4); background: rgba(16, 9, 5, .45);
}
.fortune-head-actions .btn-ghost:hover {
  color: #f2e2bd; border-color: var(--gold); background: rgba(124, 23, 19, .22);
}

.fortune-empty {
  display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 26px; align-items: center;
  padding: 38px 34px;
}
.fortune-empty-seal {
  width: 96px; height: 96px; display: grid; place-items: center;
  border: 1px solid rgba(139, 45, 34, .45); color: #8b2d22; font-family: var(--kai); font-size: 2.5rem;
  background: radial-gradient(circle at 50% 38%, rgba(255, 250, 236, .6), rgba(226, 209, 176, .22));
  transform: rotate(-2deg); box-shadow: inset 0 0 0 4px rgba(255, 250, 236, .25);
}
.fortune-empty h3 { font-size: 1.55rem; color: #352216; letter-spacing: .14em; margin: 2px 0 9px; }
.fortune-empty .body-copy { max-width: 58ch; margin-bottom: 18px; color: #5c4733; }

.fortune-loading { display: grid; justify-items: center; gap: 16px; padding: 96px 0; }
.fortune-loading p { color: rgba(203, 185, 149, .55); font-size: 11px; letter-spacing: .22em; }
.fortune-loading-ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(207, 174, 109, .18); border-top-color: var(--gold);
  animation: fortune-spin 1.6s linear infinite;
}
@keyframes fortune-spin { to { transform: rotate(360deg); } }
.fortune-error { padding: 34px; }
.fortune-error h3 { font-size: 1.4rem; color: #352216; letter-spacing: .12em; margin: 2px 0 8px; }
.fortune-error .body-copy { margin-bottom: 16px; color: #5c4733; }

.fortune-ruler { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; }
.fortune-ruler-track {
  display: flex; align-items: stretch; gap: 4px;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
}
.fortune-ruler-track::-webkit-scrollbar { display: none; }
.fortune-horizon {
  flex: 1 0 auto; min-width: 64px; display: grid; gap: 2px; text-align: center;
  border: 1px solid rgba(207, 174, 109, .16); background: rgba(255, 255, 255, .015);
  padding: 9px 10px 8px; color: #9e8860;
  transition: border-color .2s, color .2s, background .2s;
}
.fortune-horizon strong { font-size: 12px; font-weight: 500; letter-spacing: .12em; color: inherit; }
.fortune-horizon span { font-size: 8px; letter-spacing: .12em; color: rgba(203, 185, 149, .35); }
.fortune-horizon:hover { border-color: rgba(207, 174, 109, .34); color: #cfb787; }
.fortune-horizon.is-active {
  color: #f0d8a4; border-color: rgba(207, 174, 109, .5);
  background: linear-gradient(180deg, rgba(124, 23, 19, .28), rgba(20, 12, 8, .38));
  box-shadow: inset 0 -2px 0 rgba(207, 174, 109, .55);
}
.fortune-horizon.is-active span { color: rgba(239, 212, 154, .6); }
.fortune-horizon:focus-visible, .fortune-dim:focus-visible, .fortune-year:focus-visible,
.fortune-evidence-toggle:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.fortune-ruler-sep {
  flex: 0 0 1px; align-self: stretch; margin: 4px 6px;
  background: linear-gradient(180deg, transparent, rgba(207, 174, 109, .3), transparent);
}
.fortune-ruler-note { font-size: 9px; letter-spacing: .1em; color: rgba(203, 185, 149, .38); }

.fortune-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 268px;
  gap: 16px; align-items: start;
}
.fortune-main { display: grid; gap: 16px; min-width: 0; }
.fortune-side { display: grid; gap: 14px; align-content: start; min-width: 0; }

.fortune-plate, .fortune-reading, .fortune-long, .fortune-dims-card, .fortune-home-card {
  position: relative; border: 1px solid rgba(207, 174, 109, .26);
  background:
    radial-gradient(ellipse at 18% 0%, rgba(124, 23, 19, .17), transparent 56%),
    linear-gradient(165deg, rgba(34, 20, 14, .92), rgba(16, 10, 7, .97));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 233, 190, .05);
}
.fortune-plate::before, .fortune-reading::before, .fortune-long::before, .fortune-dims-card::before, .fortune-home-card::before {
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(207, 174, 109, .07);
  pointer-events: none;
}
.fortune-plate { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); gap: 28px; padding: 26px 28px; }
.fortune-plate > *, .fortune-reading > *, .fortune-long > *, .fortune-dims-card > * { position: relative; z-index: 1; }

.fortune-wheel-wrap { display: grid; justify-items: center; align-content: center; gap: 12px; }
.fortune-wheel { position: relative; width: min(288px, 100%); aspect-ratio: 1; }
.fortune-wheel::before {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(207, 174, 109, .26) 0 .5deg, transparent .5deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 67%, #000 67.5%, #000 70%, transparent 70.5%);
  mask: radial-gradient(circle, transparent 67%, #000 67.5%, #000 70%, transparent 70.5%);
}
.wheel-orbit { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(207, 174, 109, .26); }
.wheel-orbit.inner { inset: 24px; border-color: rgba(207, 174, 109, .14); }
.wheel-branch { position: absolute; inset: 5px; transform: rotate(var(--angle)); }
.wheel-branch i {
  position: absolute; top: 1px; left: 50%; transform: translateX(-50%) rotate(calc(-1 * var(--angle)));
  width: 26px; height: 26px; display: grid; place-items: center;
  font-style: normal; font-family: var(--kai); font-size: 15px; color: rgba(216, 196, 156, .5);
  background: #150e09; border-radius: 50%;
}
.wheel-branch.is-now i {
  color: #f4dfae; border: 1px solid rgba(207, 174, 109, .55);
  box-shadow: 0 0 18px rgba(207, 174, 109, .25);
}
.wheel-hand { position: absolute; inset: 0; transform: rotate(var(--angle)); pointer-events: none; }
.wheel-hand i {
  position: absolute; top: 19%; left: 50%; width: 1px; height: 31%;
  background: linear-gradient(180deg, rgba(239, 212, 154, .9), rgba(163, 40, 31, .15));
  transform: translateX(-50%);
}
.wheel-hand i::before {
  content: ""; position: absolute; top: -3px; left: 50%; width: 7px; height: 7px;
  border-radius: 50%; background: #d8b06a; transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(216, 176, 106, .6);
}
.wheel-core {
  position: absolute; inset: 31%; border-radius: 50%; display: grid; place-content: center; justify-items: center;
  gap: 1px; text-align: center; border: 1px solid rgba(207, 174, 109, .3);
  background: radial-gradient(circle at 50% 28%, #2a1811, #110b08 72%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .65), 0 0 30px rgba(207, 174, 109, .06);
}
.wheel-core em { font-style: normal; font-size: 10px; letter-spacing: .28em; color: #9b7c4e; padding-left: .28em; }
.wheel-core strong { font-family: Baskerville, "Times New Roman", serif; font-size: 1.75rem; font-weight: 400; color: #efd49a; letter-spacing: .04em; line-height: 1.15; }
.wheel-core small { font-size: 8px; letter-spacing: .08em; color: rgba(203, 185, 149, .45); }
.fortune-wheel-caption { font-size: 9px; letter-spacing: .14em; color: rgba(203, 185, 149, .42); }

.fortune-plate-info { display: grid; align-content: center; gap: 18px; min-width: 0; }
.fortune-plate-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fortune-plate-head h3 { font-size: 1.35rem; font-weight: 600; letter-spacing: .1em; color: #ead7b2; line-height: 1.3; }
.fortune-schools { flex: none; font-size: 8px; letter-spacing: .1em; color: #a98a55; border: 1px solid rgba(207, 174, 109, .24); padding: 3px 7px; white-space: nowrap; }
.fortune-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.fortune-pillar {
  display: grid; justify-items: center; gap: 1px; padding: 9px 3px 7px;
  border: 1px solid rgba(207, 174, 109, .16); background: rgba(0, 0, 0, .18);
}
.fp-label { font-size: 8px; letter-spacing: .18em; color: rgba(203, 185, 149, .45); }
.fp-char { font-family: var(--kai); font-size: 1.55rem; line-height: 1.15; }
.fp-god { font-size: 8px; letter-spacing: .04em; color: rgba(203, 185, 149, .5); white-space: nowrap; }
.el-wood { color: #9fc2a0; }
.el-fire { color: #e0937a; }
.el-earth { color: #d8bd8c; }
.el-metal { color: #ece2cd; }
.el-water { color: #8fb3c7; }
.fortune-chart-foot { display: grid; gap: 10px; }
.fortune-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.fortune-tag {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 7px;
  border: 1px solid rgba(207, 174, 109, .16); font-size: 9.5px; color: #cbb487;
}
.fortune-tag em { font-style: normal; font-size: 8px; color: #8e7551; letter-spacing: .1em; }
.fortune-yun { font-size: 10px; letter-spacing: .04em; color: rgba(203, 185, 149, .5); }
.fortune-yun strong { color: #dfc794; font-weight: 500; font-family: var(--kai); font-size: 12px; }

.fortune-reading { padding: 26px 28px; }
.fortune-reading-top { display: grid; grid-template-columns: 126px minmax(0, 1fr); gap: 24px; align-items: center; }
.fortune-ring {
  position: relative; width: 118px; height: 118px; border-radius: 50%;
  display: grid; place-content: center; justify-items: center; gap: 0; text-align: center;
  background: conic-gradient(from -90deg, var(--ring, #cfae6d) calc(var(--score, 50) * 1%), rgba(207, 174, 109, .11) 0);
}
.fortune-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #14100a; border: 1px solid rgba(207, 174, 109, .16); }
.fortune-ring strong { position: relative; z-index: 1; font-family: Baskerville, "Times New Roman", serif; font-size: 2.15rem; font-weight: 400; line-height: 1; color: var(--ring, #cfae6d); }
.fortune-ring span { position: relative; z-index: 1; margin-top: 3px; font-size: 9px; letter-spacing: .16em; color: rgba(203, 185, 149, .55); }
.fortune-ring[data-tone="good"] { --ring: #c9a45a; }
.fortune-ring[data-tone="steady"] { --ring: #a9b39a; }
.fortune-ring[data-tone="caution"] { --ring: #c08066; }
.fortune-reading-copy { min-width: 0; }
.fortune-reading-copy h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 600; letter-spacing: .1em; color: #eed9ad; line-height: 1.35; }
.fortune-summary { margin-top: 10px; font-size: 13px; line-height: 1.95; color: rgba(236, 223, 197, .76); letter-spacing: .01em; }
.fortune-polish { margin-top: 11px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.fortune-polish-btn {
  padding: 0; border: 0; border-bottom: 1px solid rgba(201, 164, 90, .38); background: none;
  font-family: inherit; font-size: 11px; letter-spacing: .14em; line-height: 1.8; color: #c9a45a;
  cursor: pointer; transition: color .2s, border-color .2s;
}
.fortune-polish-btn:hover { color: #ecd9ad; border-color: rgba(236, 217, 173, .62); }
.fortune-polish-btn:focus-visible { outline: 1px solid rgba(201, 164, 90, .6); outline-offset: 3px; }
.fortune-polish-note { font-size: 10px; letter-spacing: .05em; color: rgba(203, 185, 149, .42); }
.fortune-polish[data-state="busy"] .fortune-polish-btn { color: rgba(203, 185, 149, .5); border-color: transparent; cursor: default; }
.fortune-polish[data-state="done"] .fortune-polish-btn { color: rgba(203, 185, 149, .72); border-color: rgba(203, 185, 149, .26); }
.fortune-polish[data-state="done"] .fortune-polish-note { color: rgba(201, 164, 90, .62); }
.fortune-method { margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(207, 174, 109, .13); }
.fortune-method summary {
  display: flex; align-items: baseline; gap: 10px; list-style: none;
  cursor: pointer; line-height: 1.7;
}
.fortune-method summary::-webkit-details-marker { display: none; }
.fortune-method summary span { flex: 0 0 auto; font-size: 8px; letter-spacing: .2em; color: #9b7c4e; }
.fortune-method summary em {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-style: normal; font-size: 10.5px; letter-spacing: .03em; color: rgba(203, 185, 149, .52);
}
.fortune-method[open] summary em { white-space: normal; }
.fortune-method summary::after { content: "＋"; margin-left: auto; font-size: 10px; color: rgba(203, 185, 149, .4); }
.fortune-method[open] summary::after { content: "－"; }
.fortune-method-body { margin-top: 10px; display: grid; gap: 9px; }
.fm-focus { font-size: 11px; line-height: 1.8; color: rgba(236, 223, 197, .58); }
.fm-list { display: grid; gap: 7px; margin: 0; }
.fm-list > div { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.fm-list dt { font-size: 8px; letter-spacing: .16em; color: rgba(201, 164, 90, .55); }
.fm-list dd { margin: 0; display: flex; flex-wrap: wrap; gap: 5px 8px; font-size: 10px; line-height: 1.7; color: rgba(203, 185, 149, .68); }
.fm-list dd span { padding: 1px 7px; border: 1px solid rgba(207, 174, 109, .16); background: rgba(255, 255, 255, .015); }
.fm-blocks { list-style: none; display: grid; gap: 4px; margin: 2px 0 0; }
.fm-blocks li {
  display: grid; grid-template-columns: minmax(0, 1fr) 42px auto; gap: 8px; align-items: baseline;
  padding: 5px 8px; border-left: 1px solid rgba(207, 174, 109, .22);
  font-size: 10px; color: rgba(203, 185, 149, .6);
}
.fm-blocks li.is-anchor { border-left-color: rgba(201, 164, 90, .62); background: rgba(124, 23, 19, .12); }
.fm-blocks li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-blocks li em { font-style: normal; color: #c9a45a; }
.fm-blocks li i { font-style: normal; color: rgba(236, 223, 197, .7); }
#fortune-horizons.is-loading .fortune-horizon { opacity: .55; }
#fortune-horizons.is-loading .fortune-horizon.is-active { opacity: 1; }
.fortune-detail { margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(207, 174, 109, .15); }
.fortune-prose { margin-bottom: 16px; font-size: 12.5px; line-height: 1.95; color: rgba(236, 223, 197, .64); }
.fortune-do { display: grid; gap: 8px; }
.fortune-do .panel-kicker { color: #9b7c4e; }
.fortune-do ol { list-style: none; display: grid; gap: 8px; counter-reset: fortune-step; }
.fortune-do li { position: relative; padding-left: 27px; font-size: 12.5px; line-height: 1.8; color: #ddcbaa; }
.fortune-do li::before {
  counter-increment: fortune-step; content: counter(fortune-step);
  position: absolute; left: 0; top: 2px; width: 17px; height: 17px; display: grid; place-items: center;
  border: 1px solid rgba(207, 174, 109, .34); border-radius: 50%;
  font-family: Baskerville, serif; font-size: 9px; color: #c7a86c;
}
.fortune-watch {
  margin-top: 14px; padding: 10px 12px; font-size: 11.5px; line-height: 1.85;
  color: rgba(226, 199, 154, .66); background: rgba(124, 23, 19, .12); border-left: 2px solid rgba(163, 40, 31, .55);
}
.fortune-watch span { display: inline-block; margin-right: 9px; font-size: 8px; letter-spacing: .2em; color: #c98d72; }
.fortune-schools-row { display: flex; gap: 8px; margin-top: 14px; }
.fortune-schools-row > span {
  flex: 1; display: flex; align-items: baseline; gap: 8px; padding: 8px 10px;
  border: 1px solid rgba(207, 174, 109, .15); background: rgba(255, 255, 255, .018);
  font-size: 9px; color: rgba(203, 185, 149, .5);
}
.fortune-schools-row em { font-style: normal; letter-spacing: .16em; }
.fortune-schools-row strong { font-family: Baskerville, serif; font-size: 1.1rem; font-weight: 400; color: #e9d3a4; }
.fortune-schools-row i { font-style: normal; margin-left: auto; color: #9b7c4e; }
.fortune-evidence-toggle {
  width: 100%; margin-top: 16px; padding: 12px 2px; display: flex; align-items: center; justify-content: space-between;
  border: 0; border-top: 1px solid rgba(207, 174, 109, .15); border-bottom: 1px solid rgba(207, 174, 109, .15);
  background: none; color: #b89a68; font-size: 10px; letter-spacing: .14em;
}
.fortune-evidence-toggle i {
  width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: rotate(45deg); transition: transform .25s;
}
.fortune-evidence-toggle.is-open i { transform: rotate(-135deg); }
.fortune-evidence { list-style: none; margin-top: 4px; }
.evidence-item { margin-top: 10px; padding: 2px 0 2px 12px; border-left: 2px solid rgba(207, 174, 109, .22); }
.evidence-item.is-support { border-left-color: rgba(120, 150, 110, .55); }
.evidence-item.is-caution { border-left-color: rgba(163, 40, 31, .5); }
.evidence-school {
  display: inline-block; margin-right: 8px; padding: 1px 5px; vertical-align: 1px;
  font-size: 8px; letter-spacing: .16em; color: #96794b; border: 1px solid rgba(207, 174, 109, .24);
}
.evidence-item strong { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: #e3d2ad; }
.evidence-item p { margin-top: 4px; font-size: 11px; line-height: 1.8; color: rgba(203, 185, 149, .58); }

.fortune-dims-card { padding: 22px 20px; }
.fortune-side-head h3 { margin-bottom: 12px; font-size: 1.2rem; font-weight: 600; letter-spacing: .14em; color: #ead7b2; }
.fortune-dims { display: grid; gap: 8px; }
.fortune-dim {
  display: grid; gap: 5px; padding: 9px 11px; text-align: left;
  border: 1px solid rgba(207, 174, 109, .15); background: rgba(255, 255, 255, .015);
  color: #c9b58e; transition: border-color .2s, background .2s;
}
.fortune-dim:hover { border-color: rgba(207, 174, 109, .38); background: rgba(255, 255, 255, .03); }
.fortune-dim.is-active {
  border-color: rgba(207, 174, 109, .52);
  background: linear-gradient(180deg, rgba(124, 23, 19, .22), rgba(255, 255, 255, .02));
  box-shadow: inset 0 0 0 1px rgba(239, 212, 154, .07);
}
.fd-top { display: flex; align-items: baseline; justify-content: space-between; }
.fd-top span { font-size: 11px; letter-spacing: .18em; }
.fd-top strong { font-family: Baskerville, serif; font-size: 1.12rem; font-weight: 400; color: #ecd6a9; }
.fd-bar { display: block; height: 2px; background: rgba(207, 174, 109, .13); }
.fd-bar i { display: block; height: 100%; background: linear-gradient(90deg, rgba(163, 40, 31, .75), #cfae6d); }
.fd-level { font-size: 8.5px; letter-spacing: .16em; color: #8e7551; }
.fortune-dims-note { margin-top: 10px; font-size: 8.5px; letter-spacing: .08em; color: rgba(203, 185, 149, .33); }
.fortune-legend { padding: 20px; border: 1px solid rgba(207, 174, 109, .15); background: rgba(0, 0, 0, .18); }
.fortune-legend ul { list-style: none; display: grid; gap: 8px; }
.fortune-legend li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; font-size: 10px; line-height: 1.7; color: rgba(203, 185, 149, .52); }
.fortune-legend li span { color: #a98a55; letter-spacing: .1em; }
.fortune-legend li b { font-weight: 400; color: #cbb487; }
.fortune-privacy { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(207, 174, 109, .12); font-size: 8.5px; line-height: 1.7; color: rgba(203, 185, 149, .34); }

.fortune-long { padding: 24px 26px; }
.fortune-long-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.fortune-long-head h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: .14em; color: #ead7b2; }
.fortune-long-note { font-size: 8.5px; letter-spacing: .06em; color: rgba(203, 185, 149, .38); }
.fortune-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 5px; align-items: end; }
.fortune-years.is-dense { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.fortune-years.is-brief { max-width: 560px; margin-inline: auto; }
.fortune-year {
  display: grid; grid-template-rows: auto 74px auto auto; justify-items: center; gap: 5px;
  padding: 6px 2px 8px; border: 1px solid transparent; background: none; color: #a38c62;
  transition: border-color .2s, background .2s;
}
.fortune-year:hover { border-color: rgba(207, 174, 109, .24); }
.fortune-year.is-active { border-color: rgba(207, 174, 109, .44); background: rgba(124, 23, 19, .14); }
.fy-score { font-family: Baskerville, serif; font-size: 1rem; color: #dfc794; }
.fy-bar { width: 14px; height: 74px; display: flex; align-items: flex-end; background: rgba(207, 174, 109, .07); }
.fy-bar i { width: 100%; background: linear-gradient(180deg, #cfae6d, rgba(139, 45, 34, .82)); }
.fy-year { display: grid; gap: 1px; text-align: center; font-size: 9.5px; color: rgba(203, 185, 149, .62); }
.fy-year em { font-style: normal; font-size: 7.5px; color: rgba(203, 185, 149, .34); }
.fy-level { font-size: 7.5px; color: rgba(203, 185, 149, .34); }
.fortune-year-detail { margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(207, 174, 109, .14); }
.fyd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fyd-head p { margin: 0; }
.fyd-head span { font-size: 9.5px; letter-spacing: .08em; color: #c9ab74; }
.fyd-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-top: 10px; }
.fyd-cell { display: grid; justify-items: center; gap: 1px; padding: 8px 3px; border: 1px solid rgba(207, 174, 109, .12); background: rgba(0, 0, 0, .15); }
.fyd-cell em { font-style: normal; font-size: 8px; letter-spacing: .06em; color: rgba(203, 185, 149, .44); }
.fyd-cell strong { font-family: Baskerville, serif; font-size: 1rem; font-weight: 400; color: #e5cfa0; }
.fyd-cell i { font-style: normal; font-size: 7.5px; color: rgba(203, 185, 149, .33); }
.fyd-note { margin-top: 9px; font-size: 9px; line-height: 1.7; color: rgba(203, 185, 149, .38); }

.fortune-stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.fortune-stage {
  position: relative; display: grid; gap: 3px; padding: 12px 14px;
  border: 1px solid rgba(207, 174, 109, .14); background: rgba(255, 255, 255, .014);
}
.fortune-stage.is-current { border-color: rgba(207, 174, 109, .5); background: linear-gradient(180deg, rgba(124, 23, 19, .24), rgba(0, 0, 0, .14)); }
.fs-range { font-size: 8px; letter-spacing: .08em; color: rgba(203, 185, 149, .4); }
.fortune-stage strong { font-family: var(--kai); font-size: 1.3rem; font-weight: 400; color: #e2c893; }
.fs-age { font-size: 8.5px; color: rgba(203, 185, 149, .43); }
.fs-score { font-family: Baskerville, serif; font-size: 1.05rem; color: #dfc794; }
.fs-score em { margin-left: 5px; font-family: var(--serif); font-style: normal; font-size: 7.5px; color: rgba(203, 185, 149, .38); }
.fortune-stage p { font-size: 9px; line-height: 1.6; color: rgba(203, 185, 149, .43); }
.fs-seal {
  position: absolute; top: 9px; right: 9px; width: 21px; height: 21px; display: grid; place-items: center;
  color: #a3372b; border: 1px solid rgba(163, 55, 43, .48); font-family: var(--kai); font-size: 9px;
  transform: rotate(4deg);
}

/* 观时 · 个人 / 家族 */
.fortune-mode {
  display: inline-flex; gap: 3px; margin: -2px 0 16px; padding: 3px;
  border: 1px solid rgba(207, 174, 109, .22); background: rgba(0, 0, 0, .24);
}
.fortune-mode-btn {
  display: grid; gap: 2px; min-width: 108px; padding: 7px 14px 6px;
  border: 1px solid transparent; background: transparent; color: #8e7754;
  text-align: left; cursor: pointer; transition: color .2s, background .2s, border-color .2s;
}
.fortune-mode-btn strong { font-size: 11.5px; font-weight: 500; letter-spacing: .16em; color: inherit; }
.fortune-mode-btn span { font-size: 7.5px; letter-spacing: .12em; color: rgba(203, 185, 149, .34); }
.fortune-mode-btn:hover { color: #cfb787; border-color: rgba(207, 174, 109, .24); }
.fortune-mode-btn.is-active {
  color: #f0dfb8; border-color: rgba(207, 174, 109, .42);
  background: linear-gradient(180deg, rgba(124, 23, 19, .3), rgba(0, 0, 0, .18));
}
.fortune-mode-btn.is-active span { color: rgba(239, 212, 154, .58); }
.fortune-mode-btn:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

.fortune-home-card { padding: 18px; }
.fortune-home-card > * { position: relative; z-index: 1; }
.fh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fh-head span { font-size: 8px; letter-spacing: .1em; color: rgba(203, 185, 149, .4); }
.fh-note { margin-top: 9px; font-size: 11px; line-height: 1.85; color: rgba(236, 223, 197, .64); }
.fh-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 9px; font-size: 8px; letter-spacing: .08em; color: rgba(203, 185, 149, .38); }
.fh-link {
  margin-top: 12px; padding: 0; border: 0; background: none; color: #c7a465;
  font-size: 9.5px; letter-spacing: .1em; cursor: pointer;
}
.fh-link:hover { color: #eed6a0; }
.fh-link i { font-style: normal; margin-left: 3px; }

.fortune-family { display: grid; gap: 14px; }
.ff-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end;
  padding: 26px 28px; border: 1px solid rgba(207, 174, 109, .24);
  background: linear-gradient(135deg, rgba(54, 21, 14, .58), rgba(10, 6, 4, .7) 62%);
  overflow: hidden;
}
.ff-hero::after {
  content: "族"; position: absolute; right: 18px; top: -20px;
  font-family: var(--kai); font-size: 9rem; line-height: 1; color: rgba(207, 174, 109, .045); pointer-events: none;
}
.ff-hero-copy { position: relative; z-index: 1; max-width: 70ch; }
.ff-hero-copy h3 { margin: 5px 0 10px; font-size: clamp(1.5rem, 2.8vw, 2rem); font-weight: 600; letter-spacing: .12em; color: #f0dbb0; }
.ff-hero-copy > p:last-child { font-size: 12px; line-height: 1.95; color: rgba(236, 223, 197, .66); }
.ff-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(74px, 1fr)); gap: 7px; }
.ff-stats > div { padding: 9px 12px; border: 1px solid rgba(207, 174, 109, .16); background: rgba(0, 0, 0, .24); }
.ff-stats strong { display: block; font-family: Baskerville, serif; font-size: 1.4rem; font-weight: 400; line-height: 1.1; color: #e7cd97; }
.ff-stats span { display: block; margin-top: 3px; font-size: 8px; letter-spacing: .1em; color: rgba(203, 185, 149, .44); }

.ff-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 14px; }
.ff-card {
  padding: 22px 24px; border: 1px solid rgba(207, 174, 109, .18);
  background: linear-gradient(180deg, rgba(26, 17, 11, .72), rgba(10, 6, 4, .62));
}
.ff-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ff-card-head h3 { margin-top: 3px; font-size: 1.2rem; font-weight: 600; letter-spacing: .12em; color: #ead7b2; }
.ff-count { flex: none; font-size: 8px; letter-spacing: .1em; color: rgba(203, 185, 149, .4); border: 1px solid rgba(207, 174, 109, .16); padding: 2px 6px; }
.ff-gen-list { list-style: none; margin-top: 12px; }
.ff-gen-list li {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; align-items: baseline; gap: 3px 10px;
  padding: 9px 0; border-bottom: 1px solid rgba(207, 174, 109, .1);
}
.ff-gen-list li:last-child { border-bottom: 0; }
.ff-gen-index { grid-row: span 2; align-self: center; font-family: var(--kai); font-size: 13px; letter-spacing: .08em; color: #c8a66a; }
.ff-gen-list li strong { font-size: 11.5px; font-weight: 500; color: #ded0b2; }
.ff-gen-list li > span:not(.ff-gen-index) { font-size: 8.5px; letter-spacing: .04em; color: rgba(203, 185, 149, .45); }
.ff-gen-list li em { justify-self: end; font-style: normal; font-size: 8px; letter-spacing: .06em; color: rgba(203, 185, 149, .34); }
.ff-link {
  margin-top: 12px; padding: 0; border: 0; background: none; color: #c7a465;
  font-size: 9.5px; letter-spacing: .1em; cursor: pointer;
}
.ff-link:hover { color: #eed6a0; }
.ff-link i { font-style: normal; margin-left: 3px; }
.ff-relations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.ff-relations > span { display: grid; justify-items: center; gap: 2px; padding: 9px 4px; border: 1px solid rgba(207, 174, 109, .16); background: rgba(0, 0, 0, .22); }
.ff-relations em { font-style: normal; font-size: 8px; letter-spacing: .12em; color: rgba(203, 185, 149, .46); }
.ff-relations strong { font-family: Baskerville, serif; font-size: 1.25rem; font-weight: 400; color: #e9d3a4; }
.ff-relations i { font-style: normal; font-size: 7px; color: rgba(203, 185, 149, .32); }
.ff-zodiacs { margin-top: 10px; font-size: 8.5px; letter-spacing: .05em; color: rgba(203, 185, 149, .46); }
.ff-copy { margin-top: 10px; font-size: 11.5px; line-height: 1.9; color: rgba(236, 223, 197, .62); }
.ff-disclaimer { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(207, 174, 109, .1); font-size: 8px; line-height: 1.7; color: rgba(203, 185, 149, .32); }

.ff-upcoming-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; }
.ff-upcoming-col h4 { display: flex; align-items: center; gap: 7px; font-size: 9px; font-weight: 500; letter-spacing: .14em; color: #a98a55; }
.ff-upcoming-col h4 span { font-family: Baskerville, serif; font-size: 11px; color: rgba(203, 185, 149, .5); }
.ff-upcoming-col ul { list-style: none; margin-top: 7px; }
.ff-upcoming-col li {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: baseline; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid rgba(207, 174, 109, .08);
}
.ff-upcoming-col li:last-child { border-bottom: 0; }
.ff-date { font-family: Baskerville, serif; font-size: 12px; letter-spacing: .04em; color: #dcc28c; }
.ff-upcoming-col li strong { font-size: 10.5px; font-weight: 400; color: rgba(236, 223, 197, .78); }
.ff-upcoming-col li em { font-style: normal; font-size: 8px; color: rgba(203, 185, 149, .38); white-space: nowrap; }
.ff-empty { padding: 12px 0 4px; font-size: 9.5px; line-height: 1.8; color: rgba(203, 185, 149, .36); }
.ff-actions ol { list-style: none; display: grid; gap: 8px; margin-top: 13px; counter-reset: ff-step; }
.ff-actions li { position: relative; padding-left: 26px; font-size: 12px; line-height: 1.8; color: #ddcbaa; }
.ff-actions li::before {
  counter-increment: ff-step; content: counter(ff-step);
  position: absolute; left: 0; top: 2px; width: 17px; height: 17px; display: grid; place-items: center;
  border: 1px solid rgba(163, 55, 43, .48); color: #c07a63; font-family: Baskerville, serif; font-size: 9px;
}
.ff-personal { margin-top: 14px; padding: 12px 14px; border-left: 2px solid rgba(207, 174, 109, .35); background: rgba(0, 0, 0, .2); font-size: 11px; line-height: 1.85; color: rgba(236, 223, 197, .62); }
.ff-privacy { font-size: 8px; line-height: 1.8; color: rgba(203, 185, 149, .3); text-align: center; padding: 0 12px; }

/* 长程导读 */
.fortune-guide { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid rgba(207, 174, 109, .16); }
.fortune-guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fortune-guide-head h3 { margin-top: 3px; font-size: 1.2rem; font-weight: 600; letter-spacing: .14em; color: #ead7b2; }
.fortune-guide-arc {
  flex: none; padding: 4px 9px; border: 1px solid rgba(207, 174, 109, .3);
  font-family: var(--kai); font-size: 11px; letter-spacing: .12em; color: #d9be84;
}
.fortune-guide-arc-text { margin-top: 10px; font-size: 11.5px; line-height: 1.9; color: rgba(236, 223, 197, .66); }
.fortune-guide-markers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fgu-marker {
  display: grid; gap: 1px; min-width: 118px; padding: 8px 11px;
  border: 1px solid rgba(207, 174, 109, .18); background: rgba(0, 0, 0, .2);
}
.fgu-marker em { font-style: normal; font-size: 7.5px; letter-spacing: .12em; color: rgba(203, 185, 149, .44); }
.fgu-marker strong { font-family: Baskerville, serif; font-size: 13px; font-weight: 400; letter-spacing: .03em; color: #dfc794; }
.fgu-marker i { font-style: normal; font-size: 8px; color: rgba(203, 185, 149, .38); }
.fgu-marker.is-peak { border-color: rgba(207, 174, 109, .4); background: rgba(124, 23, 19, .14); }
.fgu-marker.is-valley { border-color: rgba(160, 104, 75, .34); }
.fgu-marker.is-valley strong { color: #cb9a7e; }
.fgu-marker.is-current { border-color: rgba(207, 174, 109, .5); background: rgba(124, 23, 19, .24); }
.fortune-guide-focus { margin-top: 12px; font-size: 11.5px; line-height: 1.9; color: rgba(236, 223, 197, .64); }
.fortune-guide-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.fortune-guide-foot p {
  padding: 9px 11px; border: 1px solid rgba(207, 174, 109, .12);
  font-size: 10px; line-height: 1.75; color: rgba(236, 223, 197, .55);
}
.fortune-guide-foot em { display: block; margin-bottom: 3px; font-style: normal; font-size: 7.5px; letter-spacing: .14em; color: #a98a55; }
.fortune-guide-note { margin-top: 10px; font-size: 8px; letter-spacing: .04em; color: rgba(203, 185, 149, .3); }
.fortune-guide + .fortune-long-head { margin-top: 0; }

@media (max-width: 1024px) {
  .ff-hero { grid-template-columns: 1fr; align-items: start; }
  .ff-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ff-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .fortune-mode { display: flex; width: 100%; margin-bottom: 12px; }
  .fortune-mode-btn { flex: 1; min-width: 0; text-align: center; justify-items: center; }
  .fortune-home-card { order: 5; padding: 16px 14px; }
  .fortune-legend { order: 6; }
  .ff-hero { padding: 20px 16px; gap: 16px; }
  .ff-hero-copy h3 { font-size: 1.45rem; }
  .ff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-card { padding: 18px 16px; }
  .ff-upcoming-grid { grid-template-columns: 1fr; gap: 12px; }
  .fortune-guide-foot { grid-template-columns: 1fr; }
  .fortune-guide { padding-bottom: 14px; margin-bottom: 14px; }
}

@media (max-width: 420px) {
  .ff-relations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ff-gen-list li { grid-template-columns: 56px minmax(0, 1fr); }
  .ff-gen-list li em { grid-column: 2; justify-self: start; }
  .ff-stats strong { font-size: 1.25rem; }
  .fortune-mode-btn { padding: 7px 8px 6px; }
  .fortune-guide-head { flex-direction: column; gap: 6px; }
}

@media (max-width: 1180px) {
  .fortune-layout { grid-template-columns: minmax(0, 1fr) 240px; }
  .fortune-plate { grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); gap: 22px; padding: 22px; }
  .fortune-wheel { width: min(250px, 100%); }
  .fortune-reading { padding: 22px; }
}

@media (max-width: 1024px) {
  .app-nav { gap: 0; }
  .nav-btn { padding: .72rem .68rem; font-size: .82rem; letter-spacing: .12em; }
  .fortune-plate { grid-template-columns: 1fr; gap: 20px; }
  .fortune-wheel-wrap { grid-template-columns: auto 1fr; align-items: center; gap: 16px; }
  .fortune-wheel { width: 210px; }
  .fortune-wheel-caption { display: none; }
  .fortune-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .fortune-head { align-items: flex-start; }
  .fortune-head-actions { width: 100%; }
  .fortune-head-actions .btn { flex: 1; }
  .fortune-empty { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 30px 22px; gap: 18px; }
  .fortune-empty-seal { width: 78px; height: 78px; font-size: 2rem; }
  .fortune-empty .body-copy { margin-left: auto; margin-right: auto; }

  .fortune-ruler { padding-bottom: 12px; }
  .fortune-ruler-track { margin: 0 -14px; padding: 0 14px 2px; }
  .fortune-horizon { min-width: 62px; padding: 8px 9px 7px; }
  .fortune-horizon strong { font-size: 11.5px; }

  .fortune-layout { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
  .fortune-main { display: contents; }
  .fortune-side { display: contents; }
  .fortune-plate { order: 1; }
  .fortune-dims-card { order: 2; }
  .fortune-reading { order: 3; }
  .fortune-long { order: 4; }
  .fortune-legend { order: 5; }

  .fortune-plate { padding: 18px 16px 16px; }
  .fortune-wheel-wrap { grid-template-columns: 1fr; justify-items: center; gap: 0; }
  .fortune-wheel { width: min(244px, 66vw); }
  .fortune-plate-info { gap: 14px; }
  .fortune-plate-head h3 { font-size: 1.2rem; }
  .fortune-pillars { gap: 5px; }
  .fp-char { font-size: 1.35rem; }
  .fortune-tags { gap: 4px; }
  .fortune-tag { padding: 2px 6px; font-size: 9px; }

  .fortune-reading { padding: 20px 16px; }
  .fortune-reading-top { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .fortune-ring { width: 92px; height: 92px; }
  .fortune-ring strong { font-size: 1.7rem; }
  .fortune-summary { font-size: 12px; line-height: 1.9; }
  .fortune-reading-copy h3 { font-size: 1.25rem; }
  .fortune-schools-row { gap: 6px; }
  .fortune-schools-row > span { padding: 7px 8px; gap: 6px; }

  .fortune-dims-card { padding: 16px 14px; }
  .fortune-side-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .fortune-side-head h3 { margin-bottom: 8px; font-size: 1.05rem; }
  .fortune-dims { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .fortune-dim { padding: 8px 9px; }
  .fortune-dims-note { display: none; }

  .fortune-long { padding: 18px 14px; }
  .fortune-long-head { margin-bottom: 12px; }
  .fortune-long-head h3 { font-size: 1.1rem; }
  .fortune-years { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 2px; }
  .fortune-year { grid-template-rows: auto 62px auto auto; }
  .fy-bar { height: 62px; width: 12px; }
  .fyd-grid { grid-template-columns: repeat(3, 1fr); }
  .fortune-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .fortune-years.is-dense { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .fortune-reading-top { grid-template-columns: 1fr; justify-items: start; }
  .fortune-ring { width: 84px; height: 84px; }
  .fortune-ring strong { font-size: 1.55rem; }
  .fortune-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fortune-stages { grid-template-columns: 1fr; }
  .fortune-head-actions { gap: .4rem; }
}

/* ---------------- 此刻气机 ---------------- */
.moment-host { margin: 2px 0 4px; }
.moment-card { display: grid; gap: 10px; position: relative; }
.moment-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.moment-head-copy { display: grid; gap: 1px; min-width: 0; }
.moment-head .panel-kicker { margin: 0; }
.moment-range {
  font-family: Baskerville, "Times New Roman", serif;
  font-size: 18px; font-weight: 500; letter-spacing: .04em; color: #4b311b; line-height: 1.25;
}
.moment-countdown {
  flex: none; padding-bottom: 1px; font-size: 9.5px; letter-spacing: .04em; color: #8d6e44;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.moment-countdown.is-expired { color: #8b2d21; }
.moment-meter { height: 2px; overflow: hidden; background: rgba(115, 79, 36, .16); }
.moment-meter span { display: block; height: 100%; background: linear-gradient(90deg, #c29a55, #8b2d21); transition: width .5s ease; }
.moment-verdict { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 7px; font-size: 10.5px; color: #6f5335; }
.moment-verdict-k {
  flex: none; padding: 1px 4px; border: 1px solid rgba(115, 79, 36, .3);
  font-family: var(--kai); font-size: 9.5px; letter-spacing: .08em; color: #8b6c40;
}
.moment-level { font-family: var(--kai); font-size: 20px; font-weight: 600; letter-spacing: .08em; line-height: 1; color: #8a6224; }
.moment-level.is-good { color: #7d5a20; }
.moment-level.is-steady { color: #6f6141; }
.moment-level.is-caution { color: #8b2d21; }
.moment-score { font-family: Baskerville, serif; font-size: 12.5px; color: #97784c; }
.moment-verdict em { font-style: normal; font-size: 10px; letter-spacing: .05em; color: #6f5335; }
.moment-dims { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.moment-dim {
  display: grid; justify-items: center; gap: 0; padding: 7px 1px 6px;
  border: 1px solid rgba(115, 79, 36, .18); background: rgba(255, 250, 236, .22);
  color: #7c6141; cursor: pointer; transition: border-color .18s, background .18s, color .18s;
}
.moment-dim span { font-size: 9.5px; letter-spacing: .02em; line-height: 1.4; }
.moment-dim b { font-family: Baskerville, serif; font-size: 13px; font-weight: 500; line-height: 1.2; }
.moment-dim:hover { border-color: rgba(139, 45, 34, .32); color: #6b3a28; }
.moment-dim.is-active {
  color: #6b2a1e; border-color: rgba(139, 45, 34, .46);
  background: rgba(139, 45, 34, .07); box-shadow: inset 0 -2px 0 rgba(139, 45, 34, .38);
}
.moment-dim:focus-visible { outline: 1px solid #9b7c4e; outline-offset: 1px; }
.moment-shared {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 7px 9px; border-left: 2px solid rgba(139, 45, 34, .3);
  background: linear-gradient(90deg, rgba(139, 45, 34, .05), rgba(255, 250, 236, 0));
  font-size: 11px; line-height: 1.8; color: #7b6244; letter-spacing: .02em;
}
.moment-shared > span {
  flex: none; margin-top: 1px; padding: 0 4px;
  font-family: var(--kai); font-size: 10px; line-height: 1.6; letter-spacing: .1em;
  color: #8b2d21; border: 1px solid rgba(139, 45, 34, .3);
}
.moment-board {
  display: grid; gap: 7px; padding: 10px 9px;
  border: 1px solid rgba(115, 79, 36, .16); background: rgba(255, 250, 236, .24);
}
.moment-board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.moment-board-head span { font-size: 9.5px; line-height: 1.6; color: #8a6f4b; }
.moment-board-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.moment-board-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label score" "verdict tag";
  align-items: baseline; gap: 2px 4px; min-width: 0;
  padding: 6px 7px; text-align: left;
  border: 1px solid rgba(115, 79, 36, .18); background: rgba(255, 253, 246, .4);
  font-family: var(--serif); color: #6f5736; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.moment-board-item:hover { border-color: rgba(139, 45, 34, .32); background: rgba(255, 250, 236, .66); }
.moment-board-item:focus-visible { outline: 1px solid #9b7c4e; outline-offset: 1px; }
.moment-board-item:disabled { opacity: .55; cursor: default; }
.moment-board-label {
  grid-area: label; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 10px; letter-spacing: .03em; color: #7c6141;
}
.moment-board-item b { grid-area: score; font-family: Baskerville, serif; font-size: 12px; font-weight: 500; line-height: 1.2; color: #97784c; }
.moment-board-item em { grid-area: verdict; font-style: normal; font-size: 9.5px; letter-spacing: .05em; line-height: 1.4; }
.moment-board-item em.is-good { color: #4c6b3b; }
.moment-board-item em.is-steady { color: #8b6c40; }
.moment-board-item em.is-caution { color: #8b2d21; }
.moment-board-item em.is-medical { color: #6d6250; }
.moment-board-tag {
  grid-area: tag; justify-self: end; padding: 0 4px;
  border: 1px solid rgba(115, 79, 36, .22);
  font-size: 8.5px; line-height: 1.5; color: #8b6c40; white-space: nowrap;
}
.moment-board-tag.is-yi { color: #4c6b3b; border-color: rgba(76, 107, 59, .34); }
.moment-board-tag.is-ji,
.moment-board-tag.is-blocked { color: #8b2d21; border-color: rgba(139, 45, 34, .34); }
.moment-board-tag.is-note { color: #8b6c40; }
.moment-picks {
  display: grid; gap: 7px; padding: 10px 9px;
  border: 1px solid rgba(115, 79, 36, .16); background: rgba(255, 250, 236, .24);
}
.moment-picks-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.moment-picks-head span { font-size: 9.5px; line-height: 1.6; color: #8a6f4b; }
.moment-picks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
.moment-pick-group { display: grid; gap: 3px; align-content: start; min-width: 0; }
.moment-pick-label { font-family: var(--kai); font-size: 9px; letter-spacing: .1em; color: #8b2d21; }
.moment-pick {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline; gap: 5px; min-width: 0;
  padding: 4px 6px; text-align: left;
  border: 1px solid rgba(115, 79, 36, .16); background: rgba(255, 253, 246, .36);
  font-family: var(--serif); color: #6f5736; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.moment-pick:hover { border-color: rgba(139, 45, 34, .32); background: rgba(255, 250, 236, .66); }
.moment-pick:focus-visible { outline: 1px solid #9b7c4e; outline-offset: 1px; }
.moment-pick b { font-family: Baskerville, serif; font-size: 12px; font-weight: 500; line-height: 1.2; color: #97784c; }
.moment-pick-copy { display: grid; gap: 1px; min-width: 0; }
.moment-pick-copy em {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-style: normal; font-size: 10px; line-height: 1.4; color: #5c4733;
}
.moment-pick-copy i {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-style: normal; font-size: 8px; line-height: 1.4; color: #9a7d54;
}
.moment-pick-tag {
  justify-self: end; padding: 0 4px;
  border: 1px solid rgba(115, 79, 36, .22);
  font-size: 8px; line-height: 1.5; color: #8b6c40; white-space: nowrap;
}
.moment-pick-tag.is-yi,
.moment-pick-tag.is-advance { color: #4c6b3b; border-color: rgba(76, 107, 59, .34); }
.moment-pick-tag.is-ji,
.moment-pick-tag.is-blocked,
.moment-pick-tag.is-risk,
.moment-pick-tag.is-score { color: #8b2d21; border-color: rgba(139, 45, 34, .34); }
.moment-pick-meta { justify-self: end; display: inline-flex; align-items: center; gap: 3px; }
.moment-pick-risk,
.moment-choice-risk {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 10px; height: 10px; border: 1px solid rgba(139, 45, 34, .45); border-radius: 50%;
  font-family: var(--serif); font-size: 7px; line-height: 1; color: #8b2d21;
}
.moment-choice-risk { margin-left: 3px; }
.moment-pick-empty { font-size: 9.5px; line-height: 1.65; color: #8a6f4b; }
.moment-picks-note { font-size: 8.5px; line-height: 1.6; color: #9a7d54; }
.moment-body { font-size: 12px; line-height: 1.85; color: #5c4733; letter-spacing: .02em; }
.moment-lists { display: grid; gap: 5px; padding-top: 8px; border-top: 1px dashed rgba(115, 79, 36, .2); }
.moment-lists p { display: flex; align-items: flex-start; gap: 7px; font-size: 10.5px; line-height: 1.7; color: #5c4733; }
.moment-tag {
  flex: none; width: 18px; height: 18px; margin-top: 1px; display: grid; place-items: center;
  border: 1px solid rgba(115, 79, 36, .3); font-family: var(--kai); font-size: 10px;
}
.moment-tag.is-do { color: #4c6b3b; border-color: rgba(76, 107, 59, .42); }
.moment-tag.is-avoid { color: #8b2d21; border-color: rgba(139, 45, 34, .42); }
.moment-lists b { font-weight: 400; }
.moment-schedule {
  display: grid; gap: 4px; padding: 8px 10px;
  border: 1px solid rgba(115, 79, 36, .16); background: rgba(255, 250, 236, .22);
}
.moment-schedule-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; }
.moment-schedule-head span { font-family: var(--kai); font-size: 10px; letter-spacing: .12em; color: #8b6c40; }
.moment-schedule-head em { font-style: normal; font-size: 8.5px; line-height: 1.6; color: #9b7b4d; }
.moment-schedule-hours {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px;
  margin: 0; padding: 0; list-style: none;
}
.moment-hour {
  display: grid; justify-items: center; gap: 1px; min-width: 0;
  padding: 3px 0 2px; border: 1px solid transparent; border-radius: 2px;
  background: rgba(115, 79, 36, .04);
}
.moment-hour span { font-family: var(--kai); font-size: 10px; line-height: 1.2; color: #7c6141; }
.moment-hour b {
  max-width: 100%; overflow: hidden;
  font-family: Baskerville, "Times New Roman", serif; font-size: 7.5px; font-weight: 500; line-height: 1.15;
  color: #9b7b4d; font-variant-numeric: tabular-nums;
}
.moment-hour.is-up b { color: #4c6b3b; }
.moment-hour.is-down b { color: #8b2d21; }
.moment-hour.is-past { opacity: .38; }
.moment-hour.is-best { background: rgba(76, 107, 59, .13); border-color: rgba(76, 107, 59, .38); }
.moment-hour.is-current { border-color: rgba(139, 45, 34, .55); background: rgba(139, 45, 34, .07); }
.moment-hour.is-current.is-best { box-shadow: inset 0 -2px 0 rgba(139, 45, 34, .4); }
.moment-schedule-note { font-size: 9.5px; line-height: 1.7; color: #6f5335; }
.moment-schedule-foot { font-size: 8px; line-height: 1.6; color: #9b7b4d; }
.moment-days-list { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.moment-day em { font-style: normal; font-family: var(--kai); font-size: 8.5px; line-height: 1.15; color: #7c6141; }
.moment-day > span { font-size: 9px; }
.moment-day-why { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; font-size: 8.5px; line-height: 1.6; color: #7c6141; }
.moment-day-why span { font-family: var(--kai); font-size: 8.5px; letter-spacing: .08em; color: #8b2d21; }
.moment-schedule-inline { display: flex; align-items: baseline; gap: 6px; font-size: 9px; line-height: 1.65; color: #7c6141; }
.moment-schedule-inline span { flex: none; font-family: var(--kai); font-size: 9px; letter-spacing: .08em; color: #8b2d21; }
.moment-basis { font-size: 9.5px; line-height: 1.75; color: #8a6f4b; }
.moment-basis span { margin-right: 5px; color: #8b6c40; font-family: var(--kai); letter-spacing: .06em; }
.moment-almanac { display: flex; flex-wrap: wrap; gap: 4px 5px; }
.moment-almanac > span {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px;
  border: 1px solid rgba(115, 79, 36, .16); background: rgba(255, 250, 236, .2);
  font-size: 9px; line-height: 1.45; color: #7c6141;
}
.moment-almanac > span.is-wide { flex-basis: 100%; }
.moment-almanac i, .moment-almanac-line i {
  font-style: normal; font-family: var(--kai); font-size: 9px; color: #8b6c40; letter-spacing: .04em;
}
.moment-almanac-line { display: flex; flex-wrap: wrap; gap: 1px 10px; font-size: 9px; line-height: 1.7; color: #8a6f4b; }
.moment-almanac-line span { display: inline-flex; align-items: baseline; gap: 3px; }
.moment-hexagram {
  display: grid; gap: 4px; padding: 8px 10px;
  border-left: 2px solid rgba(139, 45, 34, .3); background: rgba(255, 250, 236, .2);
}
.moment-hexagram-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.moment-hexagram-mark {
  padding: 1px 5px; border: 1px solid rgba(115, 79, 36, .28);
  font-family: var(--kai); font-size: 9px; letter-spacing: .05em; color: #8b6c40;
}
.moment-hexagram-head strong { font-family: var(--kai); font-size: 14px; font-weight: 600; letter-spacing: .08em; color: #6b2a1e; }
.moment-hexagram-head em { font-style: normal; font-size: 9px; color: #8a6f4b; }
.moment-hexagram p { font-size: 9.5px; line-height: 1.7; color: #7c6141; }
.moment-hexagram-moving { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; }
.moment-hexagram-moving span {
  padding: 0 4px; border: 1px solid rgba(115, 79, 36, .22);
  font-family: var(--kai); font-size: 9px; color: #8b6c40; letter-spacing: .05em;
}
.moment-hexagram-moving b { font-weight: 500; font-family: var(--kai); font-size: 9.5px; letter-spacing: .05em; color: #6b2a1e; }
.moment-hexagram-moving em { font-style: normal; font-size: 9px; color: #8a6f4b; }
.moment-hexagram-reading span { margin-right: 5px; font-family: var(--kai); font-size: 9px; color: #8b6c40; letter-spacing: .05em; }
.moment-ledger-wrap { display: grid; gap: 4px; padding-top: 7px; border-top: 1px dashed rgba(115, 79, 36, .18); }
.moment-ledger-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; }
.moment-ledger-head span { font-family: var(--kai); font-size: 10px; letter-spacing: .12em; color: #8b6c40; }
.moment-ledger-head em { font-style: normal; font-size: 8.5px; line-height: 1.6; color: #9b7b4d; }
.moment-ledger { display: grid; gap: 0; }
.moment-layer {
  display: grid; grid-template-columns: 72px minmax(0, 1fr) 34px; gap: 6px; align-items: baseline;
  padding: 3px 0; border-bottom: 1px dotted rgba(115, 79, 36, .14);
}
.moment-layer:last-child { border-bottom: 0; }
.moment-layer-k { font-family: var(--kai); font-size: 9px; letter-spacing: .03em; color: #8b6c40; white-space: nowrap; }
.moment-layer-v { min-width: 0; font-size: 9px; line-height: 1.55; color: #6f5335; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moment-layer-p { text-align: right; font-family: Baskerville, "Times New Roman", serif; font-size: 10px; font-weight: 500; }
.moment-layer-p.is-up { color: #4c6b3b; }
.moment-layer-p.is-down { color: #8b2d21; }
.moment-layer-p.is-flat { color: #9b7b4d; }
.moment-ledger-more summary {
  width: fit-content; padding: 2px 0; font-size: 8.5px; letter-spacing: .06em; color: #8b6c40; cursor: pointer;
}
.moment-ledger-more[open] summary { margin-bottom: 3px; }
.moment-ledger-audit { margin-top: 1px; padding-top: 1px; border-top: 1px dotted rgba(139, 45, 34, .2); }
.moment-ledger-audit .moment-layer-k { color: #8b2d21; }
.moment-ledger-audit .moment-layer-v { font-style: italic; }
.moment-personal {
  display: grid; gap: 4px; padding: 8px 10px;
  border: 1px solid rgba(139, 45, 34, .2); background: rgba(139, 45, 34, .035);
}
.moment-personal.is-compact {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px;
  padding: 0; border: 0; background: none; font-size: 9px; line-height: 1.65; color: #7c6141;
}
.moment-personal.is-compact span { font-family: var(--kai); font-size: 9px; letter-spacing: .08em; color: #8b2d21; }
.moment-personal-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; }
.moment-personal-head span { font-family: var(--kai); font-size: 9.5px; letter-spacing: .1em; color: #8b2d21; }
.moment-personal-head b { font-size: 9.5px; font-weight: 500; color: #5c4733; }
.moment-personal-pattern { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-pattern b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-focus { font-size: 9.5px; line-height: 1.75; color: #6f5335; }
.moment-personal-profile { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-profile b,
.moment-personal-contribution b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-contribution { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-focus b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-fusion { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-fusion b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-resonance { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-resonance b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-natal { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-natal b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-hexagram { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-hexagram b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-season { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-season b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-combo { font-size: 9.5px; line-height: 1.75; color: #6f5335; overflow-wrap: anywhere; }
.moment-personal-combo b {
  margin-right: 4px; font-family: var(--kai); font-size: 9px; font-weight: 600;
  letter-spacing: .08em; color: #8b6c40;
}
.moment-personal-signals { display: flex; flex-wrap: wrap; gap: 4px; }
.moment-personal-signal {
  padding: 1px 5px; border: 1px solid rgba(115, 79, 36, .2);
  font-size: 8.5px; color: #6f5335;
}
.moment-personal-signal.is-support { border-color: rgba(76, 107, 59, .34); color: #4c6b3b; }
.moment-personal-signal.is-caution { border-color: rgba(139, 45, 34, .3); color: #8b2d21; }
.moment-personal em { font-style: normal; font-size: 8.5px; line-height: 1.6; color: #9b7b4d; }
.moment-hint { font-size: 10px; line-height: 1.7; color: #7c6141; }
.moment-guide { display: grid; gap: 4px; padding: 8px 9px; border: 1px solid rgba(115, 79, 36, .16); background: rgba(255, 250, 236, .24); }
.moment-guide p { font-size: 10px; line-height: 1.7; color: #7c6141; }
.moment-guide strong { display: block; margin-bottom: 2px; font-size: 9.5px; font-weight: 600; letter-spacing: .12em; color: #8b6c40; }
.moment-decision {
  display: grid; gap: 8px; padding: 10px 9px;
  border: 1px solid rgba(115, 79, 36, .16); background: rgba(255, 250, 236, .24);
}
.moment-decision-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.moment-decision-head span { font-size: 9.5px; line-height: 1.6; color: #8a6f4b; }
.moment-decision-form { display: flex; gap: 6px; }
.moment-decision-form input {
  flex: 1; min-width: 0; padding: 7px 9px;
  border: 1px solid rgba(115, 79, 36, .24); background: rgba(255, 253, 246, .62);
  font-family: var(--serif); font-size: 11px; color: #4c3a26;
}
.moment-decision-form input::placeholder { color: #a58a63; }
.moment-decision-form .btn { flex: none; }
.moment-decision-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.moment-chip {
  padding: 3px 9px; border: 1px solid rgba(115, 79, 36, .2); border-radius: 999px;
  background: transparent; font-family: var(--serif); font-size: 10px; color: #6f5736; cursor: pointer;
}
.moment-chip.is-active { border-color: #8b6c40; background: rgba(139, 108, 64, .12); color: #5c4733; }
.moment-decision-items { display: grid; gap: 5px; }
.moment-decision-items-label { font-size: 9px; letter-spacing: .08em; color: #8a6f4b; }
.moment-decision-items-list { display: flex; flex-wrap: wrap; gap: 4px; }
.moment-decision-suggest { display: grid; gap: 5px; }
.moment-decision-suggest-label { font-size: 9px; letter-spacing: .04em; color: #8a6f4b; }
.moment-decision-suggest-list { display: flex; flex-wrap: wrap; gap: 4px; }
.moment-suggest-category { margin-left: 3px; font-size: 8px; line-height: 1; color: #97784c; }
.moment-choice {
  padding: 2px 8px; border: 1px solid rgba(115, 79, 36, .18); border-radius: 999px;
  background: transparent; font-family: var(--serif); font-size: 9.5px; color: #6f5736; cursor: pointer;
}
.moment-choice:hover { border-color: rgba(139, 108, 64, .45); }
.moment-choice.is-active { border-color: #8b6c40; background: rgba(139, 108, 64, .12); color: #5c4733; }
.moment-choice-tag { margin-left: 3px; font-size: 8px; line-height: 1; letter-spacing: .04em; }
.moment-choice-score { margin-left: 3px; font-family: Baskerville, serif; font-size: 8.5px; line-height: 1; color: #97784c; }
.moment-choice-tag.is-yi { color: #4c6b3b; }
.moment-choice-tag.is-ji,
.moment-choice-tag.is-blocked { color: #8b2d21; }
.moment-decision-status,
.moment-decision-error { font-size: 10px; line-height: 1.7; color: #7c6141; }
.moment-decision-error { color: #8b2d21; }
.moment-decision-result {
  display: grid; gap: 5px; padding-top: 8px;
  border-top: 1px dashed rgba(115, 79, 36, .2);
}
.moment-decision-verdict { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.moment-decision-subject { font-size: 10.5px; letter-spacing: .04em; color: #6f5335; }
.moment-decision-verdict strong { font-size: 11px; letter-spacing: .08em; }
.moment-decision-verdict strong.is-good { color: #4c6b3b; }
.moment-decision-verdict strong.is-steady { color: #8b6c40; }
.moment-decision-verdict strong.is-caution { color: #8b2d21; }
.moment-decision-verdict strong.is-medical { color: #6d6250; }
.moment-decision-verdict strong.is-procedure { color: #7a5b3a; }
.moment-decision-verdict strong.is-risk { color: #8b2d21; }
.moment-decision-verdict b { margin-left: auto; font-size: 13px; font-weight: 500; color: #5c4733; }
.moment-decision-line { font-size: 10.5px; line-height: 1.75; color: #5c4733; }
.moment-decision-focus { display: flex; flex-wrap: wrap; gap: 4px; }
.moment-decision-focus span {
  padding: 1px 6px; border: 1px solid rgba(115, 79, 36, .18);
  font-size: 8.5px; color: #6f5335;
}
.moment-decision-note,
.moment-decision-list { display: flex; gap: 6px; font-size: 10px; line-height: 1.7; color: #6f5736; }
.moment-decision-note span,
.moment-decision-list span {
  flex: none; font-family: var(--kai); font-size: 9px; letter-spacing: .08em; color: #8b6c40;
}
.moment-decision-note.is-blocked,
.moment-decision-note.is-blocked span { color: #8b2d21; }
.moment-decision-caveat { font-size: 9.5px; line-height: 1.7; color: #8a6f4b; }
.moment-decision-disclaimer { font-size: 9px; line-height: 1.7; color: #9b7b4d; }
.moment-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap;
  padding-top: 7px; border-top: 1px solid rgba(115, 79, 36, .14);
}
.moment-actions { display: inline-flex; flex: none; flex-wrap: wrap; gap: 4px 12px; }
.moment-foot > span { font-size: 9px; letter-spacing: .03em; color: #907450; line-height: 1.6; }
.moment-link {
  flex: none; padding: 0; border: 0; background: none;
  color: #8b2d21; font-family: var(--serif); font-size: 10px; letter-spacing: .06em; cursor: pointer;
}
.moment-link:hover { color: #5e1d15; }
.moment-link i { font-style: normal; margin-left: 2px; }
.moment-methods, .moment-disclaimer { font-size: 8.5px; line-height: 1.7; color: #9b7b4d; }
.moment-methods { padding-top: 6px; border-top: 1px dashed rgba(115, 79, 36, .18); }
.moment-loading { display: grid; justify-items: center; gap: 10px; padding: 24px 0; }
.moment-loading p { font-size: 9px; letter-spacing: .18em; color: #8d6e44; }
.moment-loading .fortune-loading-ring { width: 30px; height: 30px; border-color: rgba(115, 79, 36, .16); border-top-color: #8b6c40; }
.moment-error { display: grid; justify-items: start; gap: 5px; padding: 6px 0; }
.moment-error p { font-family: var(--kai); font-size: 13px; color: #4b311b; }
.moment-error span { font-size: 9px; line-height: 1.6; color: #8a6f4b; }
.moment-error .btn-small { margin-top: 4px; }
.today-divider { display: flex; align-items: center; gap: 8px; margin: 12px 0 2px; }
.today-divider i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(115, 79, 36, .3)); }
.today-divider i:last-child { transform: rotate(180deg); }
.today-divider span { font-size: 8px; letter-spacing: .22em; color: #9b7c4e; padding-left: .22em; }

.fortune-moment { margin-bottom: 16px; }
.fortune-moment .moment-card {
  padding: 22px 24px;
  color: #d8c5a2;
  background:
    radial-gradient(ellipse at 16% 0%, rgba(126, 36, 24, .22), transparent 54%),
    linear-gradient(155deg, rgba(43, 24, 16, .96), rgba(19, 11, 8, .98));
  border: 1px solid rgba(207, 174, 109, .28);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 233, 190, .06);
}
.fortune-moment .moment-card::before {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(207, 174, 109, .08); pointer-events: none;
}
.fortune-moment .moment-card > * { position: relative; z-index: 1; }
.fortune-moment .moment-range { color: #ecd6a9; }
.fortune-moment .moment-countdown { color: rgba(203, 185, 149, .58); }
.fortune-moment .moment-countdown.is-expired { color: #e0a08c; }
.fortune-moment .moment-meter { background: rgba(207, 174, 109, .16); }
.fortune-moment .moment-meter span { background: linear-gradient(90deg, #8d6a38, #d9b46a); }
.fortune-moment .moment-verdict { color: rgba(203, 185, 149, .66); }
.fortune-moment .moment-verdict-k { color: #b79a6a; border-color: rgba(207, 174, 109, .3); }
.fortune-moment .moment-level { color: #e7c987; }
.fortune-moment .moment-level.is-good { color: #efd498; }
.fortune-moment .moment-level.is-steady { color: #cdbd93; }
.fortune-moment .moment-level.is-caution { color: #d99a83; }
.fortune-moment .moment-score { color: rgba(203, 185, 149, .5); }
.fortune-moment .moment-verdict em { color: #d7c19a; }
.fortune-moment .moment-dim {
  color: #a99066; border-color: rgba(207, 174, 109, .2); background: rgba(255, 255, 255, .015);
}
.fortune-moment .moment-dim:hover { color: #e0c58e; border-color: rgba(207, 174, 109, .4); }
.fortune-moment .moment-dim.is-active {
  color: #f2dfb6; border-color: rgba(207, 174, 109, .52);
  background: linear-gradient(180deg, rgba(124, 23, 19, .28), rgba(20, 12, 8, .38));
  box-shadow: inset 0 -2px 0 rgba(207, 174, 109, .55);
}
.fortune-moment .moment-dim:focus-visible { outline-color: var(--gold); }
.fortune-moment .moment-shared {
  color: rgba(236, 223, 197, .72);
  border-left-color: rgba(207, 174, 109, .4);
  background: linear-gradient(90deg, rgba(124, 23, 19, .22), rgba(255, 255, 255, 0));
}
.fortune-moment .moment-shared > span { color: #d3b172; border-color: rgba(207, 174, 109, .3); }
.fortune-moment .moment-board { border-color: rgba(207, 174, 109, .16); background: rgba(255, 255, 255, .02); }
.fortune-moment .moment-board-head span { color: rgba(203, 185, 149, .5); }
.fortune-moment .moment-board-item { border-color: rgba(207, 174, 109, .2); background: rgba(255, 255, 255, .03); }
.fortune-moment .moment-board-item:hover { border-color: rgba(207, 174, 109, .42); background: rgba(255, 255, 255, .05); }
.fortune-moment .moment-board-label { color: rgba(226, 207, 169, .76); }
.fortune-moment .moment-board-item b { color: rgba(203, 185, 149, .6); }
.fortune-moment .moment-board-item em.is-good { color: #9cc184; }
.fortune-moment .moment-board-item em.is-steady { color: #d3b172; }
.fortune-moment .moment-board-item em.is-caution { color: #d99a86; }
.fortune-moment .moment-board-item em.is-medical { color: #cdbb96; }
.fortune-moment .moment-board-tag { color: #c3a570; border-color: rgba(207, 174, 109, .26); }
.fortune-moment .moment-board-tag.is-yi { color: #a9c08e; border-color: rgba(137, 168, 110, .42); }
.fortune-moment .moment-board-tag.is-ji,
.fortune-moment .moment-board-tag.is-blocked { color: #df9a86; border-color: rgba(190, 110, 90, .42); }
.fortune-moment .moment-board-tag.is-note { color: #c3a570; }
.fortune-moment .moment-picks { border-color: rgba(207, 174, 109, .16); background: rgba(255, 255, 255, .02); }
.fortune-moment .moment-picks-head span,
.fortune-moment .moment-pick-empty,
.fortune-moment .moment-picks-note { color: rgba(203, 185, 149, .5); }
.fortune-moment .moment-pick { border-color: rgba(207, 174, 109, .2); background: rgba(255, 255, 255, .03); color: rgba(226, 207, 169, .76); }
.fortune-moment .moment-pick:hover { border-color: rgba(207, 174, 109, .42); background: rgba(255, 255, 255, .05); }
.fortune-moment .moment-pick b { color: rgba(203, 185, 149, .6); }
.fortune-moment .moment-pick-copy em { color: #e2cfa9; }
.fortune-moment .moment-pick-copy i { color: rgba(203, 185, 149, .5); }
.fortune-moment .moment-pick-tag { color: #c3a570; border-color: rgba(207, 174, 109, .26); }
.fortune-moment .moment-pick-tag.is-yi,
.fortune-moment .moment-pick-tag.is-advance { color: #a9c08e; border-color: rgba(137, 168, 110, .42); }
.fortune-moment .moment-pick-tag.is-ji,
.fortune-moment .moment-pick-tag.is-blocked,
.fortune-moment .moment-pick-tag.is-risk,
.fortune-moment .moment-pick-tag.is-score { color: #df9a86; border-color: rgba(190, 110, 90, .42); }
.fortune-moment .moment-pick-risk,
.fortune-moment .moment-choice-risk { color: #df9a86; border-color: rgba(190, 110, 90, .48); }
.fortune-moment .moment-choice-score { color: rgba(203, 185, 149, .62); }
.fortune-moment .moment-body { color: rgba(236, 223, 197, .78); }
.fortune-moment .moment-lists { border-top-color: rgba(207, 174, 109, .18); }
.fortune-moment .moment-lists p { color: rgba(236, 223, 197, .7); }
.fortune-moment .moment-tag { border-color: rgba(207, 174, 109, .3); }
.fortune-moment .moment-tag.is-do { color: #a9c08e; border-color: rgba(137, 168, 110, .42); }
.fortune-moment .moment-tag.is-avoid { color: #df9a86; border-color: rgba(190, 110, 90, .42); }
.fortune-moment .moment-schedule { border-color: rgba(207, 174, 109, .18); background: rgba(255, 255, 255, .02); }
.fortune-moment .moment-schedule-head span { color: #c3a570; }
.fortune-moment .moment-schedule-head em { color: rgba(203, 185, 149, .45); }
.fortune-moment .moment-hour { background: rgba(255, 255, 255, .025); }
.fortune-moment .moment-hour span { color: rgba(215, 193, 154, .7); }
.fortune-moment .moment-hour b { color: rgba(203, 185, 149, .42); }
.fortune-moment .moment-hour.is-up b { color: #a9c08e; }
.fortune-moment .moment-hour.is-down b { color: #df9a86; }
.fortune-moment .moment-hour.is-best { background: rgba(137, 168, 110, .14); border-color: rgba(137, 168, 110, .38); }
.fortune-moment .moment-hour.is-current { border-color: rgba(211, 177, 114, .62); background: rgba(124, 23, 19, .16); }
.fortune-moment .moment-schedule-note { color: rgba(236, 223, 197, .7); }
.fortune-moment .moment-schedule-foot { color: rgba(203, 185, 149, .34); }
.fortune-moment .moment-day em { color: #c3a570; }
.fortune-moment .moment-day > span { color: rgba(236, 223, 197, .82); }
.fortune-moment .moment-day-why { color: rgba(203, 185, 149, .5); }
.fortune-moment .moment-day-why span { color: #d3b172; }
.fortune-moment .moment-schedule-inline { color: rgba(203, 185, 149, .56); }
.fortune-moment .moment-schedule-inline span { color: #d3b172; }
.fortune-moment .moment-basis { color: rgba(203, 185, 149, .48); }
.fortune-moment .moment-basis span { color: #c3a570; }
.fortune-moment .moment-almanac > span {
  border-color: rgba(207, 174, 109, .2); background: rgba(255, 255, 255, .02); color: rgba(215, 193, 154, .68);
}
.fortune-moment .moment-almanac i, .fortune-moment .moment-almanac-line i { color: #c3a570; }
.fortune-moment .moment-almanac-line { color: rgba(203, 185, 149, .48); }
.fortune-moment .moment-hexagram { border-left-color: rgba(207, 174, 109, .4); background: rgba(255, 255, 255, .025); }
.fortune-moment .moment-hexagram-mark { border-color: rgba(207, 174, 109, .28); color: #c3a570; }
.fortune-moment .moment-hexagram-head strong { color: #ecd6a9; }
.fortune-moment .moment-hexagram-head em { color: rgba(203, 185, 149, .55); }
.fortune-moment .moment-hexagram p { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-hexagram-moving span { border-color: rgba(207, 174, 109, .28); color: #c3a570; }
.fortune-moment .moment-hexagram-moving b { color: #ecd6a9; }
.fortune-moment .moment-hexagram-moving em { color: rgba(203, 185, 149, .55); }
.fortune-moment .moment-hexagram-reading span { color: #c3a570; }
.fortune-moment .moment-ledger-wrap { border-top-color: rgba(207, 174, 109, .16); }
.fortune-moment .moment-ledger-head span { color: #c3a570; }
.fortune-moment .moment-ledger-head em { color: rgba(203, 185, 149, .4); }
.fortune-moment .moment-layer { border-bottom-color: rgba(207, 174, 109, .12); }
.fortune-moment .moment-layer-k { color: #c3a570; }
.fortune-moment .moment-layer-v { color: rgba(236, 223, 197, .6); }
.fortune-moment .moment-layer-p.is-up { color: #a9c08e; }
.fortune-moment .moment-layer-p.is-down { color: #df9a86; }
.fortune-moment .moment-layer-p.is-flat { color: rgba(203, 185, 149, .42); }
.fortune-moment .moment-ledger-more summary { color: #c3a570; }
.fortune-moment .moment-ledger-audit { border-top-color: rgba(207, 174, 109, .24); }
.fortune-moment .moment-ledger-audit .moment-layer-k { color: #d3b172; }
.fortune-moment .moment-personal {
  border-color: rgba(207, 174, 109, .22); background: rgba(124, 23, 19, .1);
}
.fortune-moment .moment-personal.is-compact { border: 0; background: none; color: rgba(203, 185, 149, .56); }
.fortune-moment .moment-personal.is-compact span { color: #d3b172; }
.fortune-moment .moment-personal-head span { color: #d3b172; }
.fortune-moment .moment-personal-head b { color: rgba(236, 223, 197, .8); }
.fortune-moment .moment-personal-pattern { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-pattern b { color: #c3a570; }
.fortune-moment .moment-personal-focus { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-focus b { color: #c3a570; }
.fortune-moment .moment-personal-profile { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-profile b { color: #c3a570; }
.fortune-moment .moment-personal-contribution { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-contribution b { color: #c3a570; }
.fortune-moment .moment-personal-fusion { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-fusion b { color: #c3a570; }
.fortune-moment .moment-personal-resonance { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-resonance b { color: #c3a570; }
.fortune-moment .moment-personal-natal { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-natal b { color: #c3a570; }
.fortune-moment .moment-personal-hexagram { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-hexagram b { color: #c3a570; }
.fortune-moment .moment-personal-season { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-season b { color: #c3a570; }
.fortune-moment .moment-personal-combo { color: rgba(236, 223, 197, .66); }
.fortune-moment .moment-personal-combo b { color: #c3a570; }
.fortune-moment .moment-personal-signal { border-color: rgba(207, 174, 109, .22); color: rgba(215, 193, 154, .66); }
.fortune-moment .moment-personal-signal.is-support { border-color: rgba(137, 168, 110, .4); color: #a9c08e; }
.fortune-moment .moment-personal-signal.is-caution { border-color: rgba(190, 110, 90, .4); color: #df9a86; }
.fortune-moment .moment-personal em { color: rgba(203, 185, 149, .36); }
.fortune-moment .moment-hint { color: rgba(203, 185, 149, .5); }
.fortune-moment .moment-guide { border-color: rgba(207, 174, 109, .16); background: rgba(255, 255, 255, .02); }
.fortune-moment .moment-guide p { color: rgba(203, 185, 149, .56); }
.fortune-moment .moment-guide strong { color: #c3a570; }
.fortune-moment .moment-decision { border-color: rgba(207, 174, 109, .16); background: rgba(255, 255, 255, .02); }
.fortune-moment .moment-decision-head span,
.fortune-moment .moment-decision-status,
.fortune-moment .moment-decision-caveat { color: rgba(203, 185, 149, .5); }
.fortune-moment .moment-decision-form input {
  border-color: rgba(207, 174, 109, .24); background: rgba(0, 0, 0, .16); color: rgba(236, 223, 197, .86);
}
.fortune-moment .moment-decision-form input::placeholder { color: rgba(203, 185, 149, .4); }
.fortune-moment .moment-chip { border-color: rgba(207, 174, 109, .22); color: rgba(203, 185, 149, .66); }
.fortune-moment .moment-chip.is-active { border-color: #c3a570; background: rgba(207, 174, 109, .14); color: #e2cfa9; }
.fortune-moment .moment-decision-items-label,
.fortune-moment .moment-decision-suggest-label { color: rgba(203, 185, 149, .6); }
.fortune-moment .moment-suggest-category { color: rgba(203, 185, 149, .62); }
.fortune-moment .moment-choice { border-color: rgba(207, 174, 109, .2); color: rgba(203, 185, 149, .66); }
.fortune-moment .moment-choice.is-active { border-color: #c3a570; background: rgba(207, 174, 109, .14); color: #e2cfa9; }
.fortune-moment .moment-choice-tag.is-yi { color: #a9c08e; }
.fortune-moment .moment-choice-tag.is-ji,
.fortune-moment .moment-choice-tag.is-blocked { color: #df9a86; }
.fortune-moment .moment-decision-error { color: #d99a86; }
.fortune-moment .moment-decision-result { border-top-color: rgba(207, 174, 109, .18); }
.fortune-moment .moment-decision-subject { color: rgba(226, 207, 169, .76); }
.fortune-moment .moment-decision-verdict strong.is-good { color: #9cc184; }
.fortune-moment .moment-decision-verdict strong.is-steady { color: #d3b172; }
.fortune-moment .moment-decision-verdict strong.is-caution { color: #d99a86; }
.fortune-moment .moment-decision-verdict strong.is-medical { color: #cdbb96; }
.fortune-moment .moment-decision-verdict strong.is-procedure { color: #d9bd8d; }
.fortune-moment .moment-decision-verdict strong.is-risk { color: #d99a86; }
.fortune-moment .moment-decision-verdict b { color: #e2cfa9; }
.fortune-moment .moment-decision-line { color: rgba(236, 223, 197, .76); }
.fortune-moment .moment-decision-focus span { border-color: rgba(207, 174, 109, .2); color: rgba(203, 185, 149, .68); }
.fortune-moment .moment-decision-note,
.fortune-moment .moment-decision-list { color: rgba(203, 185, 149, .66); }
.fortune-moment .moment-decision-note span,
.fortune-moment .moment-decision-list span { color: #c3a570; }
.fortune-moment .moment-decision-note.is-blocked,
.fortune-moment .moment-decision-note.is-blocked span { color: #d99a86; }
.fortune-moment .moment-decision-disclaimer { color: rgba(203, 185, 149, .42); }
.fortune-moment .moment-foot { border-top-color: rgba(207, 174, 109, .16); }
.fortune-moment .moment-foot > span { color: rgba(203, 185, 149, .42); }
.fortune-moment .moment-link { color: #d3b172; }
.fortune-moment .moment-link:hover { color: #f0d9a5; }
.fortune-moment .moment-methods, .fortune-moment .moment-disclaimer { color: rgba(203, 185, 149, .34); }
.fortune-moment .moment-methods { border-top-color: rgba(207, 174, 109, .14); }
.fortune-moment .moment-card-loading { display: grid; justify-items: center; gap: 12px; padding: 34px 0; }
.fortune-moment .moment-card-loading p { font-size: 9px; letter-spacing: .2em; color: rgba(203, 185, 149, .48); }
.fortune-moment .moment-card-error h3 { margin: 2px 0 6px; font-size: 1.25rem; letter-spacing: .1em; color: #ecd6a9; }
.fortune-moment .moment-card-error p:not(.panel-kicker) { font-size: 10px; line-height: 1.7; color: rgba(203, 185, 149, .5); }

@media (max-width: 860px) {
  .hall-grid { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .col-main, .col-side { display: contents; }
  #today-panel { order: -1; }
  .verse-panel { display: none; }

  .moment-card { gap: 8px; }
  .moment-range { font-size: 18px; }
  .moment-countdown { font-size: 9px; }
  .moment-dims { gap: 3px; }
  .moment-dim { padding: 7px 1px 6px; }
  .moment-dim span { font-size: 10px; }
  .moment-dim b { font-size: 13.5px; }
  .moment-body { font-size: 12px; line-height: 1.8; }
  .moment-lists p { font-size: 10.5px; }
  .moment-basis { font-size: 9.5px; }
  .moment-almanac > span { font-size: 8.5px; padding: 3px 5px; }
  .moment-layer { grid-template-columns: 62px minmax(0, 1fr) 30px; gap: 5px; }
  .moment-layer-k, .moment-layer-v { font-size: 8.5px; }
  .moment-personal-head b { font-size: 9px; }
  .moment-personal-pattern { font-size: 9px; }
  .moment-personal-fusion { font-size: 9px; }
  .moment-personal-resonance { font-size: 9px; }
  .moment-personal-natal { font-size: 9px; }
  .moment-personal-hexagram { font-size: 9px; }
  .moment-personal-season { font-size: 9px; }
  .moment-personal-combo { font-size: 9px; }
  .moment-personal-focus { font-size: 9px; }
  .moment-foot { flex-wrap: wrap; }
  .moment-foot > span { font-size: 8.5px; }
  .fortune-moment { margin-bottom: 12px; }
  .fortune-moment .moment-card { padding: 16px 14px; }
}

@media (max-width: 600px) {
  .moment-dims { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .moment-dim { padding: 8px 2px 7px; }
  .moment-dim span { font-size: 11px; }
  .moment-dim b { font-size: 14px; }
  .moment-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .moment-board-item { padding: 6px; }
  .moment-picks-grid { grid-template-columns: 1fr; gap: 5px; }
  .moment-pick { padding: 5px 6px; }
}

@media (max-width: 360px) {
  .moment-dim { padding: 7px 1px 6px; }
}

@media (min-width: 861px) {
  .today-panel { grid-column: 1 / -1; }
}

@media (min-width: 1101px) {
  .today-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    column-gap: 32px;
    align-items: start;
  }
  .today-panel > .panel-head { grid-column: 1 / -1; }
  .today-panel > .moment-host { grid-column: 1; grid-row: 2 / span 4; min-width: 0; }
  .today-panel > .today-divider { grid-column: 2; grid-row: 2; margin: 0 0 6px; }
  .today-panel > .today-strip { grid-column: 2; grid-row: 3; padding-top: 0; }
  .today-panel > .stat-grid { grid-column: 2; grid-row: 4; }
  .today-panel > .level-panel { grid-column: 2; grid-row: 5; }
}

/* 后置覆盖 1024 断点，避免 320 窄屏底部导航挤出视口。 */
@media (max-width: 380px) {
  .app-nav { gap: 0; padding-left: 2px; padding-right: 2px; }
  .nav-btn { min-width: 0; padding: 5px 1px; font-size: 8.5px; letter-spacing: .03em; }
  .nav-btn svg { width: 18px; height: 18px; }
}

@media (min-width: 861px) {
  .today-panel .moment-card {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, .92fr);
    column-gap: 28px;
  }
  .today-panel .moment-head,
  .today-panel .moment-meter,
  .today-panel .moment-verdict,
  .today-panel .moment-dims,
  .today-panel .moment-basis,
  .today-panel .moment-guide,
  .today-panel .moment-foot,
  .today-panel .moment-methods,
  .today-panel .moment-disclaimer { grid-column: 1 / -1; }
  .today-panel .moment-body { grid-column: 1; max-width: none; }
  .today-panel .moment-lists {
    grid-column: 2; align-self: start;
    border-top: 0; padding: 0 0 0 20px;
    border-left: 1px dashed rgba(115, 79, 36, .2);
  }
}
