:root {
  color-scheme: dark;
  --ink: #080b12;
  --ink-soft: #0d121c;
  --panel: #101620;
  --panel-raised: #151b26;
  --text: #f2eee5;
  --muted: #98a3b3;
  --faint: #657183;
  --line: rgba(174, 190, 211, .18);
  --line-strong: rgba(190, 207, 229, .3);
  --cinnabar: #d9776e;
  --cinnabar-soft: #f1a29a;
  --gold: #cfaf78;
  --jade: #7fa89a;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(ellipse 75% 42% at 50% -12%, rgba(73, 91, 119, .24), transparent 68%),
    radial-gradient(circle at 92% 26%, color-mix(in srgb, var(--accent, var(--cinnabar)) 9%, transparent), transparent 28%),
    linear-gradient(180deg, #090c13 0%, #080b12 68%, #070a10 100%);
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 74%);
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

.app-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, .9);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand-copy { display: grid; gap: 3px; }
.brand strong, h1, h2, h3, .serif {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}
.brand strong { font-size: 17px; letter-spacing: .16em; }
.brand small { color: #748091; font-size: 8px; letter-spacing: .19em; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 9px 12px; border-radius: 999px; color: var(--muted); font-size: 13px; text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.055); }

.growth-shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 58px 0 100px; }
.feature-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 30px; align-items: end; padding: 42px; border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(145deg, rgba(22,29,42,.94), rgba(11,15,23,.92)); overflow: hidden; }
.feature-hero::after { content: none; }
.feature-hero-mark { position:absolute;right:32px;top:28px;width:176px;height:176px;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--accent,var(--cinnabar)) 18%,transparent);border-radius:50%;color:color-mix(in srgb,var(--accent,var(--cinnabar)) 26%,transparent);pointer-events:none; }
.feature-hero-mark::before,.feature-hero-mark::after{content:"";position:absolute;border:1px solid currentColor;border-radius:50%}
.feature-hero-mark::before{inset:14px}.feature-hero-mark::after{inset:34px}
.feature-hero-mark svg{position:relative;z-index:1;width:78px;height:78px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.eyebrow { margin: 0 0 15px; color: var(--accent, var(--cinnabar-soft)); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.feature-hero h1 { max-width: 760px; margin: 0; font-size: clamp(40px, 7vw, 74px); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; }
.feature-hero p:not(.eyebrow) { max-width: 720px; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-aside { position: relative; z-index: 1; display: grid; gap: 10px; padding-left: 22px; border-left: 1px solid var(--line); }
.hero-aside span { color: var(--faint); font-size: 12px; }
.hero-aside strong { font-size: 19px; line-height: 1.5; }
.hero-aside em { color: var(--jade); font-size: 12px; font-style: normal; }

.feature-tabs { display: flex; gap: 8px; margin: 18px 0; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: rgba(13,18,28,.72); }
.feature-tabs button { min-height: 44px; flex: 1; border: 0; border-radius: 11px; color: var(--muted); background: transparent; cursor: pointer; }
.feature-tabs button.active { color: var(--text); background: var(--panel-raised); box-shadow: inset 0 0 0 1px var(--line-strong); }

.surface { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(15,21,31,.9); }
.section { margin-top: 18px; padding: clamp(22px, 4vw, 36px); }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: clamp(26px, 4vw, 38px); font-weight: 600; }
.section-head p { max-width: 560px; margin: 7px 0 0; color: var(--muted); line-height: 1.75; }
.free-pill { flex: 0 0 auto; padding: 8px 12px; border: 1px solid color-mix(in srgb, var(--jade) 45%, transparent); border-radius: 999px; color: #a8d6c5; background: rgba(86,139,120,.12); font-size: 12px; }

.primary, .secondary, .year-picker button {
  min-height: 48px;
  border-radius: 13px;
  cursor: pointer;
}
.primary { border: 1px solid color-mix(in srgb, var(--accent, var(--cinnabar)) 72%, white 8%); color: #160d0c; background: var(--accent, var(--cinnabar-soft)); font-weight: 800; }
.primary:hover { filter: brightness(1.06); }
.secondary { border: 1px solid var(--line-strong); color: var(--text); background: rgba(255,255,255,.025); }
.primary:focus-visible, .secondary:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent, var(--cinnabar-soft)); outline-offset: 3px; }
.notice { padding: 16px 18px; border-left: 3px solid var(--accent, var(--cinnabar)); color: var(--muted); background: rgba(255,255,255,.026); line-height: 1.75; }
.heluo-question-label { display:block; margin-bottom:8px; color:var(--text); font-weight:600; }
#heluoQuestion { display:block; width:100%; min-height:96px; box-sizing:border-box; padding:14px 16px; border:1px solid var(--line-strong); border-radius:12px; background:var(--panel-raised); color:var(--text); font:inherit; resize:vertical; }
.heluo-ai-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:14px; }
.heluo-ai-actions button { min-height:44px; padding:10px 18px; }
.heluo-ai-actions span { color:var(--muted); line-height:1.5; }
#heluoInterpretResult { white-space:pre-wrap; margin-top:16px; }

/* Daoge */
.daoge-page { --accent: #c96158; }
.quiz-frame { min-height: 530px; }
.quiz-progress { display: grid; gap: 10px; margin-bottom: 32px; }
.quiz-progress div { height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.quiz-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--cinnabar), var(--gold)); transition: width .25s ease; }
.quiz-progress span { color: var(--muted); font-size: 12px; }
.question-kicker { color: var(--cinnabar-soft); font-size: 12px; letter-spacing: .18em; }
.question-title { max-width: 760px; margin: 15px 0 28px; font-family: "Songti SC", serif; font-size: clamp(26px, 4vw, 38px); line-height: 1.45; }
.option-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.option { display: flex; gap: 13px; align-items: flex-start; min-height: 88px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; color: var(--muted); background: rgba(255,255,255,.018); text-align: left; cursor: pointer; }
.option b { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text); font-size: 12px; }
.option.selected { border-color: rgba(217,119,110,.72); color: var(--text); background: rgba(217,119,110,.1); }
.option.selected b { border-color: var(--cinnabar); color: #170d0c; background: var(--cinnabar-soft); }
.quiz-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; }
.quiz-actions button { min-width: 0; flex: 1 1 130px; padding: 0 22px; }
.result-lead { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 190px; gap: 24px 34px; align-items: center; overflow: hidden; }
.result-lead::after { content:""; position:absolute; right:-80px; top:-90px; width:310px; height:310px; border:1px solid rgba(207,175,120,.1); border-radius:50%; pointer-events:none; }
.result-heading { position:relative; z-index:1; align-self:end; }
.result-heading h2 { margin: 4px 0 8px; font-size: clamp(32px,5vw,54px); line-height:1.18; }
.result-heading h2 span { color: var(--cinnabar-soft); }
.archetype-note { margin:0; color:var(--faint); font-size:12px; letter-spacing:.08em; }
.archetype-portrait { position:relative; z-index:1; width:190px; margin:0; }
.archetype-portrait img { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:cover; border:1px solid rgba(207,175,120,.48); border-radius:50%; box-shadow:0 18px 50px rgba(0,0,0,.34),0 0 0 8px rgba(207,175,120,.035); }
.archetype-portrait figcaption { margin-top:10px; color:var(--gold); font-family:"Songti SC",serif; font-size:13px; letter-spacing:.22em; text-align:center; }
.result-summary { position:relative; z-index:1; grid-column:1 / -1; }
.result-summary > p { max-width:820px; margin:20px 0 0; color:var(--muted); font-size:16px; line-height:1.95; }
.result-metrics { display: grid; grid-template-columns: minmax(150px,.55fr) minmax(220px,1.45fr); gap: 28px; margin: 0 0 18px; padding:18px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.result-metrics > div { min-width:0; }
.result-metrics small { display: block; margin-bottom: 7px; color: var(--faint); font-size: 11px; letter-spacing: .1em; }
.result-metrics strong { color: var(--gold); font-family: "Songti SC",serif; font-size: 25px; font-weight: 600; }
.result-metrics em { margin-left: 5px; color: var(--faint); font-size: 11px; font-style: normal; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row span { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.dimension-sheet,.report-sheet,.letter { margin-top:18px; }
.dimension-head { display:flex; justify-content:space-between; gap:22px; align-items:flex-end; }
.dimension-head h2 { margin:0 0 8px; font-size:clamp(27px,4vw,42px); }
.dimension-head p:not(.eyebrow) { margin:0; color:var(--muted); line-height:1.7; }
.dimension-head > strong { color:var(--cinnabar-soft); font-family:"Songti SC",serif; font-size:clamp(58px,8vw,92px); font-weight:500; line-height:.9; }
.radar-wrap { display: grid; place-items: center; width:100%; min-height:430px; padding:24px 20px 10px; color:var(--muted); }
.radar-wrap svg { width: min(100%, 520px); height: auto; overflow: visible; }
.dimension-list { display:grid; grid-template-columns:repeat(3,1fr); gap:10px 22px; padding-top:20px; border-top:1px solid var(--line); }
.dimension-list > div { display:grid; grid-template-columns:auto minmax(44px,1fr) 28px; gap:10px; align-items:center; color:var(--muted); font-size:12px; }
.dimension-list i { height:4px; border-radius:99px; background:linear-gradient(90deg,var(--cinnabar-soft) 0 var(--value),rgba(255,255,255,.08) var(--value)); }
.dimension-list strong { color:var(--gold); text-align:right; }
.report-blocks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 34px; margin-top:16px; }
.report-block { padding:24px 0; border-top:1px solid var(--line); }
.report-block small { color: var(--cinnabar-soft); letter-spacing: .12em; }
.report-block h3 { margin: 9px 0; font-size: 22px; }
.report-block p { margin: 0; color: var(--muted); line-height: 1.9; }
.letter { position: relative; padding: 36px; background:linear-gradient(145deg,rgba(207,175,120,.08),rgba(255,255,255,.016)); color:var(--text); }
.letter::before { content: "天机来信"; position: absolute; right: 24px; top: 22px; color: rgba(207,175,120,.13); font-family: "Songti SC",serif; font-size: 42px; }
.letter p { position: relative; margin: 0 0 14px; line-height: 2; }
.reflection-card, .history-panel { margin-top: 18px; }
.reflection-card textarea { width: 100%; min-height: 126px; margin: 4px 0 14px; padding: 16px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.025); font: inherit; line-height: 1.8; }
.history-list { display: grid; gap: 12px; }
.history-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.018); }
.history-card small { color: var(--faint); }
.history-card h3 { margin: 7px 0; font-size: 21px; }
.history-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.history-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.text-button { border: 0; color: var(--muted); background: transparent; }
.text-button.danger { color: #dc8f88; }
.empty-copy { padding: 34px; color: var(--muted); text-align: center; }

/* Heluo */
.heluo-page { --accent: #c9aa76; }
.dual-map { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.map-panel { padding: 26px; }
.map-panel h3 { margin: 0 0 18px; font-size: 26px; }
.river-pairs { display: grid; gap: 9px; }
.river-pair { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.river-pair strong { color: var(--gold); font-size: 20px; }
.river-pair span { color: var(--muted); }
.year-picker { display: flex; align-items: end; gap: 10px; }
.year-picker label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.year-picker select { min-width: 130px; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--ink-soft); }
.year-picker button { padding: 0 20px; }
.nine-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.palace { min-height: 150px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg,rgba(255,255,255,.025),transparent); }
.palace[data-center="true"] { border-color: rgba(207,175,120,.58); background: rgba(207,175,120,.08); }
.palace-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.palace strong { display: block; margin: 18px 0 6px; color: var(--gold); font-family: "Songti SC",serif; font-size: 27px; }
.palace p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.method-ledger { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 18px; }
.method-ledger div { padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.method-ledger span { display: block; color: var(--faint); font-size: 11px; }
.method-ledger strong { display: block; margin-top: 7px; font-size: 13px; line-height: 1.5; }
.natal-entry { margin-bottom: 18px; }
.natal-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.natal-summary h2 { margin: 4px 0 8px; font-size: clamp(27px,4vw,42px); }
.natal-summary p:last-child { margin: 0; color: var(--muted); }
.hexagram-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.hexagram-card { padding: 28px; }
.hexagram-card h3 { margin: 7px 0; color: var(--gold); font-family: "Songti SC","STSong",serif; font-size: clamp(32px,5vw,54px); font-weight: 500; }
.hexagram-meta { color: var(--muted); font-size: 13px; }
.hexagram-lines { display: grid; gap: 9px; width: min(280px,100%); margin: 28px 0 20px; }
.hexagram-lines > div { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; height: 11px; }
.hexagram-lines i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg,#b89a67,#e0c58f); }
.hexagram-lines .yang-line { grid-template-columns: 1fr; }
.hexagram-lines .yang-line i:last-child { display: none; }
.hexagram-lines > div[data-yuan="true"]::after { content: "元"; position: absolute; top: 50%; right: -34px; transform: translateY(-50%); display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(217,119,110,.7); border-radius: 50%; color: var(--cinnabar-soft); font-size: 10px; }
.pillar-ledger { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.pillar-ledger article { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.018); }
.pillar-ledger span, .pillar-ledger small { color: var(--faint); font-size: 11px; }
.pillar-ledger strong { color: var(--gold); font-family: "Songti SC","STSong",serif; font-size: 25px; }
.pillar-ledger p { margin: 0; color: var(--muted); font-size: 12px; }
.calculation-steps { display: grid; gap: 0; margin-top: 24px; border-top: 1px solid var(--line); }
.calculation-steps article { display: grid; grid-template-columns: 38px 112px minmax(150px,.7fr) minmax(220px,1.3fr); gap: 14px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.calculation-steps b { color: var(--cinnabar-soft); font-size: 11px; letter-spacing: .12em; }
.calculation-steps span { color: var(--muted); font-size: 12px; }
.calculation-steps strong { font-size: 14px; }
.calculation-steps p { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.65; }
.period-timeline { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.period-timeline article { display: grid; gap: 8px; min-height: 138px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg,rgba(255,255,255,.024),transparent); }
.period-timeline article[data-active="true"] { border-color: rgba(217,119,110,.68); background: linear-gradient(145deg,rgba(217,119,110,.13),rgba(207,175,120,.04)); box-shadow: inset 3px 0 0 var(--cinnabar); }
.period-timeline span, .period-timeline small { color: var(--faint); font-size: 10px; }
.period-timeline strong { color: var(--gold); font-size: 18px; }
.period-timeline p { margin: 0; color: var(--muted); font-size: 12px; }
.selected-year-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.selected-year-grid article { min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; }
.selected-year-grid span { display: block; color: var(--faint); font-size: 11px; }
.selected-year-grid strong { display: block; margin-top: 10px; line-height: 1.55; }
.method-details { margin-top: 22px; padding: 0 18px; border: 1px solid var(--line); border-radius: 15px; }
.method-details summary { padding: 17px 0; color: var(--muted); cursor: pointer; }
.method-details > div { padding: 0 0 18px; color: var(--faint); font-size: 12px; line-height: 1.8; }
.method-details ul { margin: 10px 0 0; padding-left: 20px; }

/* Wellbeing */
.wellbeing-page { --accent: #7fa89a; }
.state-score { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 26px; align-items: center; }
.score-ring { --score: 68; display: grid; place-items: center; width: 150px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--jade) calc(var(--score) * 1%), rgba(255,255,255,.07) 0); }
.score-ring::before { content: ""; grid-area: 1/1; width: 126px; aspect-ratio: 1; border-radius: 50%; background: var(--panel); }
.score-ring div { position: relative; grid-area: 1/1; text-align: center; }
.score-ring strong { display: block; font-size: 44px; }
.score-ring span { color: var(--muted); font-size: 11px; }
.state-copy h2 { margin: 0 0 12px; font-size: clamp(27px,4vw,40px); }
.state-copy p { color: var(--muted); line-height: 1.85; }
.metric-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 26px; }
.metric { padding: 17px; border: 1px solid var(--line); border-radius: 14px; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 8px; font-size: 22px; }
.metric small { color: var(--faint); }
.connect-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.connect-card { padding: 20px; border: 1px solid var(--line); border-radius: 16px; }
.connect-card b { display: block; margin-bottom: 9px; }
.connect-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.action-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.action-list li { padding: 16px 18px 16px 44px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); line-height: 1.7; counter-increment: action; }
.action-list { counter-reset: action; }
.action-list li::before { content: counter(action); float: left; margin-left: -28px; color: var(--jade); font-weight: 800; }
.trend-bars { display: grid; grid-template-columns: repeat(14,minmax(0,1fr)); align-items: end; gap: 8px; min-height: 230px; padding: 24px 6px 0; border-bottom: 1px solid var(--line); }
.trend-day { display: grid; align-self: stretch; grid-template-rows: minmax(160px,1fr) 28px; gap: 8px; align-items: end; text-align: center; }
.trend-day > span { position: relative; display: block; height: max(10px,var(--height)); max-height: 100%; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg,rgba(127,168,154,.95),rgba(127,168,154,.28)); }
.trend-day i { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 10px; font-style: normal; }
.trend-day small { color: var(--faint); font-size: 9px; }
.month-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.month-stat { display: grid; gap: 9px; min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.018); }
.month-stat span { color: var(--faint); font-size: 11px; letter-spacing: .08em; }
.month-stat strong { align-self: end; font-family: "Songti SC", "STSong", serif; font-size: clamp(22px,3vw,30px); font-weight: 500; }
.week-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.week-card { position: relative; display: grid; gap: 14px; min-height: 158px; padding: 19px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(150deg,rgba(127,168,154,.09),rgba(255,255,255,.012)); }
.week-card::after { content: ""; position: absolute; right: -28px; bottom: -34px; width: 90px; height: 90px; border: 1px solid rgba(127,168,154,.16); border-radius: 50%; }
.week-card div { display: grid; gap: 4px; }
.week-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.week-card small { color: var(--faint); font-size: 10px; }
.week-card strong { font-size: 34px; font-weight: 600; color: #b7d5ca; }
.week-card em { align-self: end; color: var(--muted); font-size: 12px; font-style: normal; }
.event-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.event-picker button { min-height: 42px; padding: 0 17px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.018); }
.event-picker button[aria-pressed="true"] { border-color: rgba(127,168,154,.75); color: var(--text); background: rgba(127,168,154,.14); box-shadow: inset 0 0 0 1px rgba(127,168,154,.12); }

.site-note { margin: 22px auto 0; color: var(--faint); font-size: 12px; line-height: 1.8; text-align: center; }

@media (max-width: 760px) {
  .app-nav { min-height: 62px; padding: 10px 16px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .nav-links a:not([aria-current="page"]) { display: none; }
  .growth-shell { width: min(100% - 24px, 680px); padding: 22px 0 82px; }
  .feature-hero { grid-template-columns: 1fr; gap: 22px; padding: 28px 22px; border-radius: 22px; }
  .feature-hero-mark { right: -20px; top: 24px; width: 124px; height: 124px; opacity:.7; }
  .feature-hero-mark svg { width:58px;height:58px; }
  .hero-aside { padding: 15px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .section { padding: 22px 17px; }
  .section-head { display: grid; }
  .free-pill { width: fit-content; }
  .option-list, .dual-map, .connect-grid, .month-stats { grid-template-columns: 1fr 1fr; }
  .option { min-height: 72px; }
  .result-lead { grid-template-columns:minmax(0,1fr) 112px; gap:18px 14px; align-items:start; }
  .result-heading h2 { font-size:clamp(28px,8.2vw,38px); }
  .archetype-portrait { width:112px; }
  .archetype-portrait figcaption { font-size:11px; letter-spacing:.14em; }
  .result-summary { grid-column:1 / -1; }
  .state-score { grid-template-columns: 1fr; }
  .result-metrics { grid-template-columns: 1fr; }
  .dimension-head { align-items:flex-start; }
  .dimension-head > strong { font-size:58px; }
  .radar-wrap { min-height:0; padding:22px 0 8px; }
  .radar-wrap svg { width:min(100%,430px); }
  .dimension-list { grid-template-columns:1fr 1fr; gap:11px 18px; }
  .report-blocks { grid-template-columns:1fr; }
  .report-block { padding:21px 0; }
  .letter { padding:28px 22px; }
  .nine-grid { gap: 6px; }
  .palace { min-height: 132px; padding: 12px; }
  .palace strong { margin-top: 13px; font-size: 21px; }
  .palace p { font-size: 10px; }
  .method-ledger, .metric-strip { grid-template-columns: repeat(2,1fr); }
  .trend-bars { gap: 4px; overflow-x: auto; }
  .trend-day { min-width: 18px; }
  .trend-day i { display: none; }
  .week-cards { grid-template-columns: 1fr 1fr; }
  .week-card { min-height: 142px; }
  .history-card { grid-template-columns: 1fr; }
  .history-actions { justify-content: flex-start; }
  .hexagram-pair { grid-template-columns: 1fr; }
  .natal-summary { align-items: flex-start; }
  .pillar-ledger, .period-timeline, .selected-year-grid { grid-template-columns: 1fr 1fr; }
  .calculation-steps article { grid-template-columns: 30px minmax(0,1fr); gap: 7px 10px; }
  .calculation-steps strong, .calculation-steps p { grid-column: 2; }
}

@media (max-width: 430px) {
  .feature-tabs { display: grid; grid-template-columns: repeat(3,1fr); }
  .feature-tabs button { min-width: 0; padding: 11px 6px; font-size: 12px; }
  .year-picker { width: 100%; align-items: stretch; }
  .year-picker label { flex: 1; }
  .year-picker select { width: 100%; min-width: 0; }
  .pillar-ledger, .period-timeline, .selected-year-grid { grid-template-columns: 1fr; }
  .hexagram-card { padding: 22px; }
  .hexagram-lines { width: calc(100% - 34px); }
  .dimension-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; }
  .dimension-head > strong { align-self:start; font-size:48px; }
  .dimension-list { grid-template-columns:1fr; }
}

/* Follow the device appearance. The information hierarchy and brand accents stay identical. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --ink: #f2f0eb;
    --ink-soft: #ebe8e1;
    --panel: #faf8f3;
    --panel-raised: #ffffff;
    --text: #26231f;
    --muted: #625f59;
    --faint: #837e76;
    --line: rgba(46, 40, 34, .14);
    --line-strong: rgba(46, 40, 34, .26);
    --cinnabar: #ad5148;
    --cinnabar-soft: #9a443c;
    --gold: #8b6838;
    --jade: #3e7a65;
  }

  html { background: var(--ink); }
  body {
    color: var(--text);
    background:
      radial-gradient(ellipse 75% 42% at 50% -12%, rgba(109, 129, 157, .12), transparent 68%),
      radial-gradient(circle at 92% 26%, color-mix(in srgb, var(--accent, var(--cinnabar)) 7%, transparent), transparent 28%),
      linear-gradient(180deg, #f7f5f0 0%, #f2f0eb 68%, #efede8 100%);
  }
  body::before {
    opacity: .38;
    background-image:
      linear-gradient(rgba(52,45,38,.028) 1px, transparent 1px),
      linear-gradient(90deg, rgba(52,45,38,.028) 1px, transparent 1px);
  }
  .app-nav {
    border-bottom-color: rgba(46,40,34,.13);
    background: rgba(248,246,241,.91);
    box-shadow: 0 10px 34px rgba(62,53,45,.06);
  }
  .brand img {
    filter: brightness(0) saturate(1) invert(.17) sepia(.11) saturate(7.87) hue-rotate(157deg) brightness(.91);
  }
  .brand small { color: #827b72; }
  .nav-links a:hover, .nav-links a[aria-current="page"] { background: rgba(46,40,34,.055); }
  .feature-hero {
    border-color: rgba(46,40,34,.15);
    background: linear-gradient(145deg, rgba(255,253,249,.98), rgba(239,236,229,.94));
    box-shadow: inset 0 1px 0 #fff, 0 22px 58px rgba(62,53,45,.08);
  }
  .feature-hero-mark { color: color-mix(in srgb, var(--accent, var(--cinnabar)) 22%, transparent); }
  .hero-aside { border-left-color: var(--line); }
  .hero-aside em { color: #366d59; }
  .feature-tabs { background: rgba(247,245,240,.84); }
  .feature-tabs button.active { background: #fffdfa; box-shadow: inset 0 0 0 1px var(--line-strong), 0 6px 18px rgba(62,53,45,.06); }
  .surface { background: rgba(255,253,249,.93); box-shadow: inset 0 1px 0 #fff, 0 14px 38px rgba(62,53,45,.045); }
  .free-pill { border-color: rgba(62,122,101,.34); color: #306650; background: rgba(62,122,101,.08); }
  .secondary, .year-picker button { background: rgba(255,255,255,.54); }
  .notice { background: rgba(46,40,34,.026); }
  .quiz-progress div { background: rgba(46,40,34,.09); }
  .option,
  .history-card,
  .pillar-ledger article,
  .month-stat,
  .connect-card,
  .event-picker button { background: rgba(46,40,34,.022); }
  .option.selected { border-color: rgba(173,81,72,.6); background: rgba(173,81,72,.08); }
  .option.selected b { color: #fffaf7; background: var(--cinnabar); }
  .archetype-portrait img { border-color:rgba(139,104,56,.42); box-shadow:0 18px 45px rgba(74,57,37,.14),0 0 0 8px rgba(139,104,56,.035); }
  .dimension-list i { background:linear-gradient(90deg,var(--cinnabar) 0 var(--value),rgba(46,40,34,.09) var(--value)); }
  .letter { background:linear-gradient(145deg,rgba(139,104,56,.07),rgba(255,255,255,.46)); }
  .reflection-card textarea { color: var(--text); background: #fffdfa; }
  .map-panel,
  .palace,
  .method-ledger div,
  .period-timeline article,
  .selected-year-grid article,
  .metric,
  .week-card,
  .action-list li { background-color: rgba(255,253,249,.72); }
  .palace { background: linear-gradient(145deg,rgba(139,104,56,.035),transparent); }
  .palace[data-center="true"] { border-color: rgba(139,104,56,.5); background: rgba(139,104,56,.08); }
  .year-picker select { color: var(--text); background: #fffdfa; }
  .period-timeline article { background: linear-gradient(145deg,rgba(139,104,56,.035),transparent); }
  .period-timeline article[data-active="true"] { border-color: rgba(173,81,72,.56); background: linear-gradient(145deg,rgba(173,81,72,.09),rgba(139,104,56,.035)); }
  .score-ring { background: conic-gradient(var(--jade) calc(var(--score) * 1%), rgba(46,40,34,.09) 0); }
  .score-ring::before { background: #fffdfa; }
  .week-card { background: linear-gradient(150deg,rgba(62,122,101,.08),rgba(255,255,255,.4)); }
  .week-card strong { color: #376d59; }
  .event-picker button[aria-pressed="true"] { border-color: rgba(62,122,101,.58); background: rgba(62,122,101,.1); }
}

@media (prefers-color-scheme: light) and (max-width: 760px) {
  .hero-aside { border-left: 0; border-top-color: var(--line); }
}

@media (max-width: 760px) {
  .dual-map { grid-template-columns: 1fr; }
}
.app-nav .brand img[src*="everwiser-app-icon"] { filter: none; border-radius: 9px; }
html[lang="en"] .letter::before{content:"A letter to you"}
html[lang="es"] .letter::before{content:"Una carta para ti"}
