:root {
  --app-width: 430px;
  --bg: #fffaf2;
  --paper: #fffdf8;
  --paper-2: #fff3e3;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --ink: #211814;
  --text: #34251d;
  --soft: #756354;
  --muted: #a18d7b;
  --line: rgba(221, 148, 94, 0.18);
  --line-strong: rgba(244, 145, 138, 0.34);
  --accent: #d97745;
  --accent-2: #f28d85;
  --violet: #a78bfa;
  --pink: #f9b4c7;
  --deep: #744a2c;
  --gold: #d8a45f;
  --green: #93bf9a;
  --clay: #d78b65;
  --blue: #84b8e8;
  --danger: #b15d4a;
  --font: "Noto Sans SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --display: "方正清刻本悦宋简体", "Chekiang Shu Ke Sung", "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  --label: "FangSong", "KaiTi", "STFangsong", "STKaiti", "Noto Serif CJK SC", "SimSun", serif;
  --seal: "KaiTi", "STKaiti", "FangSong", "SimSun", serif;
  --radius: 18px;
  --radius-sm: 13px;
  --pill: 9999px;
  --nav-reserve: 112px;
  --shadow: 0 26px 76px rgba(211, 139, 72, 0.16);
  --shadow-soft: 0 16px 42px rgba(214, 132, 82, 0.11);
  --glow: 0 12px 36px -16px rgba(244, 145, 138, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--bg);
  min-height: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  scroll-padding-bottom: 148px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 194, 111, 0.3), transparent 36%),
    radial-gradient(circle at 78% 72%, rgba(249, 180, 199, 0.24), transparent 34%),
    radial-gradient(circle at 8% 18%, rgba(132, 184, 232, 0.16), transparent 30%),
    linear-gradient(135deg, #fffaf2 0%, #fff7ed 48%, #fff1f5 100%);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.58;
  overflow-x: hidden;
  overflow-y: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.field-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.98;
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(216, 164, 95, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 145, 138, 0.034) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.24) 48%, rgba(0, 0, 0, 0.58) 100%);
  opacity: 0.42;
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(var(--app-width), 100vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 16px calc(150px + env(safe-area-inset-bottom));
  display: grid;
  gap: 16px;
  align-content: start;
  overflow: visible;
  scroll-padding-bottom: 148px;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.96), rgba(255, 250, 242, 0.68) 54%, rgba(255, 241, 245, 0.26));
  box-shadow:
    -1px 0 0 rgba(255, 255, 255, 0.64),
    1px 0 0 rgba(216, 164, 95, 0.1),
    0 34px 92px rgba(211, 139, 72, 0.14);
  backdrop-filter: blur(10px);
}

.app-shell::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.view {
  display: none;
  gap: 16px;
  padding-top: 2px;
}

.view.active {
  display: grid;
  animation: viewRise 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.view.active::after {
  content: "";
  display: block;
  min-height: 96px;
}

#home-view.active {
  padding-top: 0;
}

@keyframes viewRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 62px;
  margin: 0 -16px;
  padding: max(12px, env(safe-area-inset-top)) 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(255, 250, 242, 0.66));
  border-bottom: 1px solid rgba(216, 164, 95, 0.14);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand span {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--deep);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 210, 137, 0.38));
  font-family: var(--seal);
  font-weight: 900;
  box-shadow:
    inset 0 0 0 1px rgba(216, 164, 95, 0.22),
    0 12px 28px -16px rgba(244, 145, 138, 0.72);
}

.brand strong {
  min-width: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.app-top p {
  max-width: 148px;
  min-height: 30px;
  margin: 0;
  color: var(--deep);
  border: 1px solid rgba(221, 148, 94, 0.16);
  border-radius: var(--pill);
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(14px);
}

.today-card {
  position: relative;
  min-height: 344px;
  margin: 0 -16px;
  padding: 24px 22px 22px;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.98), rgba(255, 250, 242, 0.78) 42%, rgba(255, 241, 245, 0.2)),
    radial-gradient(circle at 84% 24%, rgba(255, 194, 111, 0.52), transparent 34%),
    radial-gradient(circle at 68% 76%, rgba(249, 180, 199, 0.34), transparent 36%),
    linear-gradient(135deg, #fffdf8, #fff1e0);
  box-shadow: 0 24px 70px rgba(211, 139, 72, 0.14);
}

.today-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 1) 0%, rgba(255, 250, 242, 0.84) 35%, rgba(255, 241, 245, 0.14) 100%);
  animation: auroraVeil 8s ease-in-out infinite alternate;
}

.today-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: 18px;
  width: 176px;
  height: 176px;
  border-radius: 46px;
  border: 1px solid rgba(244, 145, 138, 0.22);
  background:
    linear-gradient(90deg, rgba(244, 145, 138, 0.15) 1px, transparent 1px),
    linear-gradient(rgba(216, 164, 95, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.65;
  transform: rotate(-10deg);
}

@keyframes auroraVeil {
  from {
    opacity: 0.72;
    transform: translateX(-8px);
  }
  to {
    opacity: 0.96;
    transform: translateX(8px);
  }
}

.date-line,
.today-main,
.today-facts,
.almanac-line,
.update-line,
.detail-link {
  position: relative;
  z-index: 1;
}

.date-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.date-line span {
  color: rgba(52, 37, 29, 0.76);
  font-family: var(--label);
  font-size: 13px;
  font-weight: 700;
}

.date-line i {
  min-height: 29px;
  padding: 6px 11px;
  border-radius: var(--pill);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(221, 148, 94, 0.18);
  backdrop-filter: blur(12px);
  font-family: var(--label);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.today-main {
  min-height: 150px;
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.today-main p {
  margin: 0;
  color: var(--soft);
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
}

.today-main h1 {
  max-width: 252px;
  margin: 9px 0 0;
  font-family: var(--display);
  font-size: 39px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.today-main strong {
  color: transparent;
  background: linear-gradient(135deg, #d8a45f, #f28d85, #f9b4c7);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--seal);
  font-size: 80px;
  line-height: 0.9;
  font-weight: 700;
}

.good-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.good-tags span {
  min-height: 28px;
  padding: 6px 10px;
  border-radius: var(--pill);
  color: var(--deep);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(221, 148, 94, 0.18);
  backdrop-filter: blur(10px);
  font-family: var(--label);
  font-size: 12px;
  font-weight: 700;
}

.today-facts {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.today-facts article {
  min-height: 62px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(221, 148, 94, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  border-radius: var(--radius-sm);
}

.today-facts span {
  color: var(--muted);
  font-family: var(--label);
  font-size: 11px;
}

.today-facts b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.update-line {
  position: relative;
  z-index: 2;
  margin: 12px 0 0;
  color: var(--soft);
  font-size: 12px;
}

.module,
.sheet,
.report-section,
.result-meta,
.state-box,
.result-root.empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}

.module,
.sheet,
.report-section,
.result-root.empty {
  padding: 18px;
}

.module,
.sheet,
.report-section,
.state-box {
  position: relative;
  overflow: hidden;
}

.module::before,
.sheet::before,
.report-section::before,
.state-box::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
}

.module::after,
.sheet::after,
.report-section::after,
.state-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 194, 111, 0.1), transparent 32%, rgba(249, 180, 199, 0.08));
  opacity: 0.72;
}

.module > *,
.sheet > *,
.report-section > *,
.state-box > * {
  position: relative;
  z-index: 1;
}

.module-head,
.form-title,
.section-head {
  position: relative;
  margin-bottom: 16px;
  display: grid;
  gap: 7px;
}

.module-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.module-head span,
.form-title span,
.section-head span,
.side-cards span,
.text-block h4,
.consult-note,
.result-meta span {
  color: var(--muted);
  font-family: var(--label);
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: none;
}

.generation-notice {
  padding-top: 0;
  padding-bottom: 4px;
}

.generation-notice span {
  color: var(--ink);
  background: rgba(255, 247, 226, 0.82);
  border-color: rgba(199, 143, 57, 0.24);
}

.smart-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.smart-brief-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(57, 75, 88, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.smart-brief-grid span {
  color: var(--muted);
  font-size: 11px;
}

.smart-brief-grid p,
.smart-brief-grid ul {
  margin: 7px 0 0;
}

.smart-brief-grid ul {
  padding-left: 18px;
}

@media (max-width: 620px) {
  .smart-brief-grid {
    grid-template-columns: 1fr;
  }
}

.module-head h2,
.form-title h2,
.section-head h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.module-head a {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--pill);
  color: var(--deep);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 220, 156, 0.54));
  border: 1px solid rgba(221, 148, 94, 0.2);
  font-family: var(--label);
  font-size: 12px;
  font-weight: 800;
}

.mini-action {
  min-height: 31px;
  border: 1px solid rgba(221, 148, 94, 0.24);
  border-radius: var(--pill);
  padding: 5px 13px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-family: var(--label);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.hub-grid .tool-card {
  min-height: 108px;
}

.tool-card {
  position: relative;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(221, 148, 94, 0.16);
  border-radius: var(--radius);
  display: grid;
  align-content: end;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42)),
    radial-gradient(circle at 88% 20%, rgba(255, 194, 111, 0.26), transparent 30%);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 194, 111, 0.38), rgba(255, 255, 255, 0.56), rgba(249, 180, 199, 0.2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.tool-card::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -32px;
  width: 112px;
  height: 112px;
  border-radius: 36px;
  border: 1px solid rgba(244, 145, 138, 0.14);
  transform: rotate(18deg);
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 145, 138, 0.32);
  box-shadow: var(--glow);
}

.tool-card.main {
  min-height: 136px;
  color: var(--ink);
  border-color: rgba(244, 145, 138, 0.28);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 236, 0.62) 58%, rgba(249, 180, 199, 0.24)),
    radial-gradient(circle at 84% 16%, rgba(255, 194, 111, 0.32), transparent 36%),
    radial-gradient(circle at 16% 88%, rgba(132, 184, 232, 0.12), transparent 42%);
  box-shadow: 0 22px 58px -34px rgba(244, 145, 138, 0.82);
}

.tool-card i {
  position: absolute;
  right: 14px;
  top: 10px;
  color: rgba(216, 164, 95, 0.2);
  font-family: var(--display);
  font-size: 44px;
  font-style: normal;
}

.tool-card.main i {
  color: rgba(244, 145, 138, 0.28);
}

.tool-card strong {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 70px);
  color: var(--ink);
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.tool-card.main strong {
  color: var(--ink);
}

.tool-card span {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 40px);
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.tool-card.main span {
  color: var(--soft);
}

.tool-hero {
  min-height: 150px;
  border: 1px solid rgba(221, 148, 94, 0.16);
  border-radius: var(--radius);
  margin-top: 4px;
  padding: 20px 20px 18px;
  display: grid;
  align-content: end;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 242, 0.55)),
    radial-gradient(circle at 86% 18%, rgba(255, 194, 111, 0.22), transparent 35%),
    radial-gradient(circle at 8% 86%, rgba(132, 184, 232, 0.1), transparent 38%);
  box-shadow: 0 18px 44px -26px rgba(244, 145, 138, 0.56);
  backdrop-filter: blur(18px);
}

.tool-hero span {
  color: var(--accent);
  font-family: var(--label);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tool-hero h1 {
  max-width: 100%;
  margin: 5px 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.tool-hero p {
  max-width: 292px;
  margin: 8px 0 0;
  color: var(--soft);
  font-size: 13px;
}

.instant-home {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.form-preview {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(221, 148, 94, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

.mini-score {
  width: 86px;
  height: 86px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--deep);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 53%, transparent 54%),
    conic-gradient(from 160deg, rgba(216, 164, 95, 0.82), rgba(244, 145, 138, 0.64), rgba(249, 180, 199, 0.72), rgba(132, 184, 232, 0.42), rgba(216, 164, 95, 0.82));
  box-shadow: 0 14px 30px -20px rgba(244, 145, 138, 0.88);
}

.mini-score b {
  color: var(--deep);
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
}

.mini-score span {
  color: var(--muted);
  font-size: 12px;
}

.mini-list {
  display: grid;
  gap: 7px;
}

.mini-list p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.form-intro {
  margin: -6px 0 16px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.65;
}

.outfit-control {
  margin-top: 2px;
}

.outfit-control.compact {
  margin-top: -6px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.outfit-control.compact .module-head {
  margin-bottom: 8px;
}

.outfit-control.compact .form-intro {
  margin-bottom: 0;
}

.form-grid,
.home-grid,
.option-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

.home-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-family: var(--label);
  font-size: 13px;
  font-weight: 800;
}

label em {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

input,
select,
textarea,
.switch-line {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 0 0 1px rgba(221, 148, 94, 0.16);
}

input,
select,
.switch-line {
  min-height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 108px;
  padding: 13px;
  resize: vertical;
  line-height: 1.72;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 194, 111, 0.22), inset 0 0 0 1px rgba(244, 145, 138, 0.32);
  background: rgba(255, 255, 255, 0.94);
}

.switch-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.switch-line input {
  width: 16px;
  min-height: auto;
  accent-color: var(--accent);
}

.subhead {
  margin-top: 22px;
}

.wide-label,
.upload-box {
  margin-top: 11px;
}

.upload-box {
  min-height: 82px;
  padding: 15px;
  border: 1px dashed rgba(221, 148, 94, 0.3);
  border-radius: var(--radius);
  display: grid;
  align-content: center;
  color: var(--accent);
  background:
    linear-gradient(135deg, rgba(255, 194, 111, 0.16), rgba(255, 255, 255, 0.52));
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.upload-box strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.btn {
  min-height: 52px;
  border: 0;
  border-radius: var(--pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  color: #fffaf2;
  background:
    linear-gradient(135deg, #d97745 0%, #f28d85 54%, #f9b4c7 100%);
  box-shadow: 0 14px 32px -18px rgba(244, 145, 138, 0.88);
}

.btn.wide {
  width: 100%;
  margin-top: 14px;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.hint-line {
  margin: -2px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.empty-state {
  min-height: 154px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-state h2 {
  margin: 7px 0 0;
  color: var(--ink);
  font-family: var(--display);
}

.state-box {
  padding: 22px;
  color: var(--soft);
  text-align: center;
}

.state-box.loading {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.state-box.loading::after {
  content: "";
  display: block;
  width: 32px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--violet));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.state-box.error {
  color: var(--danger);
}

.result-root {
  display: grid;
  gap: 14px;
}

.result-root.empty {
  min-height: 174px;
}

.result-meta {
  padding: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.result-meta::-webkit-scrollbar {
  display: none;
}

.result-meta span {
  flex: 0 0 auto;
  min-height: 30px;
  border-radius: var(--pill);
  padding: 6px 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(221, 148, 94, 0.12);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.meta-share-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  border-radius: var(--pill);
  padding: 6px 10px;
  color: var(--accent);
  background: rgba(217, 119, 69, 0.08);
  border: 1px solid rgba(217, 119, 69, 0.2);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0;
}

.meta-share-btn:hover {
  background: rgba(217, 119, 69, 0.14);
  border-color: rgba(217, 119, 69, 0.36);
}

.meta-share-btn.copied {
  color: #4a9e6b;
  background: rgba(74, 158, 107, 0.1);
  border-color: rgba(74, 158, 107, 0.3);
}

.section-head p {
  max-width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.daily-grid,
.fortune-hero-card,
.fortune-grid,
.home-audit,
.kline-panel,
.wuxing-wrap,
.compass-panel {
  display: grid;
  gap: 12px;
}

.kline-score-top {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: 10px;
}

.kline-score-main,
.kline-score-mini article {
  border: 1px solid rgba(221, 148, 94, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 244, 230, 0.62)),
    radial-gradient(circle at 86% 20%, rgba(255, 194, 111, 0.32), transparent 48%);
  box-shadow: var(--shadow-soft);
}

.kline-score-main {
  min-height: 150px;
  padding: 18px;
  display: grid;
  align-content: center;
}

.kline-score-main span,
.kline-score-mini span,
.kline-toolbar span {
  color: var(--muted);
  font-size: 11px;
}

.kline-score-main strong {
  margin: 2px 0 4px;
  color: var(--deep);
  font-family: var(--display);
  font-size: 62px;
  line-height: 0.98;
  letter-spacing: 0.02em;
}

.kline-score-main em {
  margin-left: 4px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.kline-score-main p,
.kline-score-mini p {
  margin: 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.6;
}

.kline-score-mini {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.kline-score-mini article {
  min-height: 150px;
  padding: 13px 12px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.kline-score-mini b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
}

.kline-toolbar {
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(221, 148, 94, 0.12);
  border-radius: var(--pill);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.kline-zoom-buttons {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kline-zoom-buttons button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(221, 148, 94, 0.18);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--deep);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px -15px rgba(211, 139, 72, 0.8);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.kline-zoom-buttons b {
  min-width: 44px;
  color: var(--soft);
  font-size: 12px;
  text-align: center;
}

.kline-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 164, 95, 0.45) rgba(255, 255, 255, 0.3);
  padding-bottom: 4px;
}

.kline-scroll::-webkit-scrollbar {
  height: 8px;
}

.kline-scroll::-webkit-scrollbar-track {
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.46);
}

.kline-scroll::-webkit-scrollbar-thumb {
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--gold), var(--accent-2));
}

.kline-canvas {
  width: var(--kline-width, 1180px);
  min-width: min(100%, var(--kline-width, 1180px));
  scroll-snap-align: start;
}

.outfit-recipe,
.week-strip,
.fortune-grid,
.side-cards,
.direction-list,
.consult-grid,
.audit-lists,
.space-grid {
  display: grid;
  gap: 10px;
}

.outfit-recipe {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.outfit-brief {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(221, 148, 94, 0.16);
  border-radius: var(--radius);
  padding: 17px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 243, 224, 0.7)),
    radial-gradient(circle at 88% 8%, rgba(255, 200, 118, 0.32), transparent 42%);
  box-shadow: var(--shadow-soft);
}

.outfit-brief::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 16px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(217, 119, 69, 0.18);
  background: rgba(255, 255, 255, 0.42);
}

.outfit-brief span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.outfit-brief strong {
  display: block;
  margin: 7px 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.outfit-brief p {
  max-width: 92%;
  margin: 0;
  color: #5f4f43;
  font-size: 14px;
  line-height: 1.78;
}

.outfit-brief div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.outfit-brief em {
  border: 1px solid rgba(217, 119, 69, 0.14);
  border-radius: var(--pill);
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.54);
  color: #8f6045;
  font-size: 11px;
  font-style: normal;
}

.outfit-recipe article,
.week-strip article,
.proof-list article,
.fortune-grid article,
.fortune-brief,
.side-cards article,
.direction-list article,
.consult-grid article,
.audit-lists article,
.space-grid article,
.text-block {
  border: 1px solid rgba(221, 148, 94, 0.15);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(16px);
}

.image-reading-note {
  margin-top: 12px;
  border: 1px solid rgba(111, 167, 216, 0.22);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(234, 245, 255, 0.62), rgba(255, 255, 255, 0.54));
}

.image-reading-note span {
  color: var(--muted);
  font-size: 11px;
}

.image-reading-note p {
  margin: 6px 0 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.72;
}

.outfit-recipe article {
  display: grid;
  align-content: start;
  gap: 8px;
}

.outfit-recipe i {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 50%;
  filter: saturate(0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.outfit-recipe span,
.week-strip span,
.proof-list span,
.fortune-grid span,
.fortune-score span,
.fortune-brief span,
.home-score span,
.space-grid span,
.consult-grid span,
.direction-list span,
.side-cards span {
  color: var(--muted);
  font-size: 11px;
}

.outfit-recipe strong,
.week-strip strong,
.fortune-grid strong,
.side-cards strong,
.direction-list strong,
.consult-grid strong,
.space-grid strong {
  display: block;
  margin: 6px 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.outfit-recipe p,
.week-strip p,
.proof-list p,
.fortune-grid p,
.fortune-brief p,
.side-cards p,
.direction-list p,
.consult-grid p,
.space-grid p {
  margin: 0;
  color: #5f4f43;
  font-size: 13px;
  line-height: 1.68;
}

.proof-list {
  display: grid;
  gap: 10px;
}

.proof-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 246, 232, 0.54));
}

.proof-list span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(255, 194, 111, 0.18);
  border: 1px solid rgba(221, 148, 94, 0.18);
  font-weight: 900;
}

.week-strip p + p {
  margin-top: 7px;
}

.week-strip article {
  position: relative;
  padding-left: 54px;
}

.week-strip article i {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid rgba(221, 148, 94, 0.18);
  background: rgba(255, 255, 255, 0.62);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.week-strip article.scene-1,
.week-strip article.scene-3 {
  background: rgba(255, 255, 255, 0.62);
}

.week-strip article.scene-2 {
  background: rgba(255, 194, 111, 0.12);
}

.week-strip article.scene-4 {
  background: rgba(132, 184, 232, 0.09);
}

.week-strip b {
  color: var(--ink);
  font-family: var(--label);
  font-weight: 900;
  display: inline-block;
  min-width: 52px;
  margin: 0 8px 3px 0;
  border-radius: var(--pill);
  padding: 2px 8px;
  background: rgba(255, 194, 111, 0.18);
  box-shadow: inset 0 0 0 1px rgba(221, 148, 94, 0.1);
  text-align: center;
  font-size: 12px;
}

.fortune-hero-card {
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: stretch;
}

.fortune-score {
  min-height: 138px;
  border: 1px solid rgba(221, 148, 94, 0.18);
  border-radius: var(--radius);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: var(--deep);
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.92) 0 48%, transparent 49%),
    conic-gradient(from 150deg, rgba(255, 194, 111, 0.72), rgba(249, 180, 199, 0.58), rgba(132, 184, 232, 0.36), rgba(147, 191, 154, 0.5), rgba(255, 194, 111, 0.72));
  box-shadow: 0 18px 44px -30px rgba(244, 145, 138, 0.86);
  backdrop-filter: blur(18px);
}

.fortune-score b {
  color: var(--deep);
  font-family: var(--display);
  font-size: 56px;
  line-height: 0.95;
  font-weight: 500;
}

.fortune-brief {
  min-width: 0;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 243, 227, 0.5)),
    radial-gradient(circle at 88% 20%, rgba(255, 194, 111, 0.18), transparent 42%);
}

.fortune-brief h3 {
  margin: 6px 0 8px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  line-height: 1.22;
  letter-spacing: 0.02em;
}

.fortune-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fortune-grid article {
  min-height: 138px;
}

.home-score {
  min-height: 178px;
  border: 1px solid rgba(221, 148, 94, 0.18);
  border-radius: var(--radius);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 50% 24%, rgba(255, 194, 111, 0.36), transparent 54%),
    radial-gradient(circle at 82% 78%, rgba(249, 180, 199, 0.16), transparent 48%);
  box-shadow: 0 18px 48px -34px rgba(244, 145, 138, 0.82);
  backdrop-filter: blur(18px);
}

.home-score b {
  color: var(--deep);
  font-family: var(--display);
  font-size: 72px;
  line-height: 0.9;
  font-weight: 500;
}

.home-score p,
.home-score small {
  margin: 9px 14px 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.audit-lists h3,
.text-block h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: 0.02em;
}

ul {
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.72;
}

.space-grid {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compass {
  position: relative;
  min-height: 312px;
  border: 1px solid rgba(221, 148, 94, 0.15);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(255, 194, 111, 0.22), transparent 42%),
    radial-gradient(circle at 80% 24%, rgba(249, 180, 199, 0.18), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(132, 184, 232, 0.1));
}

.compass::before,
.compass::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(221, 148, 94, 0.14);
  border-radius: 50%;
}

.compass::after {
  inset: 82px;
}

.dir,
.compass-core {
  position: absolute;
  left: 50%;
  top: 50%;
}

.dir {
  width: 62px;
  height: 44px;
  margin: -22px 0 0 -31px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  align-content: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(221, 148, 94, 0.14);
  box-shadow: 0 8px 18px rgba(211, 139, 72, 0.08);
}

.dir b {
  color: var(--ink);
  font-family: var(--display);
  font-size: 17px;
}

.dir span {
  color: var(--muted);
  font-size: 10px;
}

.dir-东 { transform: translate(105px, 0); }
.dir-东南 { transform: translate(74px, 74px); }
.dir-南 { transform: translate(0, 105px); }
.dir-西南 { transform: translate(-74px, 74px); }
.dir-西 { transform: translate(-105px, 0); }
.dir-西北 { transform: translate(-74px, -74px); }
.dir-北 { transform: translate(0, -105px); }
.dir-东北 { transform: translate(74px, -74px); }

.compass-core {
  width: 102px;
  height: 102px;
  margin: -51px 0 0 -51px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--deep);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 220, 156, 0.4));
  border: 1px solid rgba(221, 148, 94, 0.24);
  box-shadow: 0 14px 30px rgba(244, 145, 138, 0.14);
}

.compass-core strong {
  font-family: var(--display);
  font-size: 27px;
  letter-spacing: 0.03em;
}

.compass-core span {
  font-size: 12px;
  color: var(--muted);
}

.ziwei-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.palace {
  min-height: 122px;
  border: 1px solid rgba(221, 148, 94, 0.14);
  border-radius: var(--radius);
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(16px);
}

.palace.blank {
  display: none;
}

.palace-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.palace-top span,
.palace-top i,
.palace-foot span {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.palace-top strong {
  min-width: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.palace-top b {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fffaf2;
  background: var(--accent);
  font-size: 11px;
}

.stars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.star {
  min-height: 22px;
  border-radius: var(--pill);
  padding: 3px 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 16px;
}

.star.major {
  color: var(--accent);
  background: rgba(255, 194, 111, 0.18);
  font-weight: 800;
}

.star small,
.star em {
  margin-left: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 10px;
}

.palace-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.ziwei-center-wrap {
  grid-column: 1 / -1;
  grid-row: 1;
}

.ziwei-center {
  min-height: 148px;
  border: 1px solid rgba(221, 148, 94, 0.18);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--ink);
  text-align: center;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.52)),
    radial-gradient(circle at 50% 35%, rgba(255, 194, 111, 0.36), transparent 62%),
    radial-gradient(circle at 86% 78%, rgba(249, 180, 199, 0.14), transparent 48%);
  box-shadow: 0 16px 42px -32px rgba(244, 145, 138, 0.78);
}

.ziwei-center p,
.ziwei-center h3 {
  margin: 0;
  font-family: var(--display);
}

.ziwei-center p {
  color: var(--soft);
  font-size: 15px;
}

.ziwei-center h3 {
  margin: 4px 0 10px;
  font-size: 34px;
  letter-spacing: 0.03em;
}

.ziwei-center span {
  color: var(--muted);
  font-size: 12px;
}

.kline-svg {
  width: 100%;
  min-height: 318px;
  border: 1px solid rgba(221, 148, 94, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 247, 237, 0.58)),
    radial-gradient(circle at 12% 16%, rgba(255, 194, 111, 0.18), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), var(--shadow-soft);
}

.grid-line {
  stroke: rgba(221, 148, 94, 0.14);
  stroke-width: 1;
}

.axis-label,
.year-label,
.now-label,
.gan-zhi-label,
.score-tag,
.candle text {
  fill: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
}

.axis-label {
  text-anchor: start;
  font-size: 14px;
}

.score-tag {
  fill: var(--deep);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
}

.year-label {
  fill: var(--soft);
  font-size: 16px;
}

.gan-zhi-label {
  fill: var(--muted);
  font-size: 13px;
}

.now-label {
  fill: var(--accent);
  font-size: 15px;
  font-weight: 900;
}

.score-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wick,
.candle line {
  stroke: rgba(216, 164, 95, 0.72);
  stroke-width: 3;
  stroke-linecap: round;
}

.body,
.candle rect {
  fill: var(--pink);
  rx: 3;
}

.candle.down .body,
.candle.down rect {
  fill: var(--blue);
}

.score-dot {
  fill: #fffaf2;
  stroke: var(--accent);
  stroke-width: 3;
}

.candle.current .body,
.candle.current rect {
  stroke: var(--accent);
  stroke-width: 3;
  filter: drop-shadow(0 6px 8px rgba(217, 119, 69, 0.22));
}

.wuxing-wrap {
  grid-template-columns: 1fr;
}

.wuxing-bars {
  min-height: 248px;
  border: 1px solid rgba(221, 148, 94, 0.14);
  border-radius: var(--radius);
  padding: 18px 10px 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.wuxing-item {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.wuxing-item span {
  width: 30px;
  border-radius: 14px 14px 4px 4px;
  filter: saturate(0.86);
}

.wuxing-item b,
.wuxing-item strong {
  color: var(--soft);
  font-size: 11px;
  text-align: center;
}

.spoken-grid {
  display: grid;
  gap: 10px;
}

.text-block {
  break-inside: avoid;
}

.text-block p {
  margin: 0 0 11px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.82;
}

.text-block .lead {
  color: var(--ink);
  font-weight: 800;
}

.tips {
  margin-top: 12px;
  border-top: 1px solid rgba(221, 148, 94, 0.15);
  padding-top: 11px;
}

.sub-block {
  margin-top: 14px;
  border-top: 1px solid rgba(221, 148, 94, 0.15);
  padding-top: 12px;
}

.sub-block h4 {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.industry-grid {
  display: grid;
  gap: 9px;
}

.industry-grid article {
  border: 1px solid rgba(221, 148, 94, 0.14);
  border-radius: var(--radius-sm);
  padding: 13px;
  background: rgba(255, 255, 255, 0.5);
}

.industry-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 14px;
  line-height: 1.4;
}

.industry-grid p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.7;
}

.tag-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  min-height: 30px;
  border-radius: var(--pill);
  padding: 6px 10px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(221, 148, 94, 0.12);
  font-size: 12px;
}

.anchor-block {
  position: relative;
  height: 1px;
  margin-top: -1px;
}

.consult-note {
  margin: 12px 0 0;
  text-transform: none;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 30;
  width: min(410px, calc(100vw - 24px));
  min-height: 64px;
  padding: 7px;
  border: 1px solid rgba(221, 148, 94, 0.18);
  border-radius: 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  transform: translateX(-50%);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 18px 44px rgba(211, 139, 72, 0.16);
  backdrop-filter: blur(20px);
}

.bottom-nav a {
  position: relative;
  min-width: 0;
  min-height: 48px;
  border-radius: 16px;
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 2px;
  color: rgba(80, 62, 46, 0.72);
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.bottom-nav span {
  width: 25px;
  height: 23px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 0 0 1px rgba(221, 148, 94, 0.08);
}

.bottom-nav b {
  width: 100%;
  font-size: 11px;
  line-height: 14px;
  text-align: center;
  white-space: nowrap;
}

.bottom-nav a.active {
  color: var(--accent);
  background: rgba(255, 194, 111, 0.18);
  box-shadow: inset 0 0 0 1px rgba(221, 148, 94, 0.12);
  transform: translateY(-1px);
}

.bottom-nav a.active span {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 220, 156, 0.48));
  box-shadow: inset 0 0 0 1px rgba(221, 148, 94, 0.16), 0 8px 16px -12px rgba(244, 145, 138, 0.82);
}

.bottom-nav a.active::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 18px;
  height: 2px;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--gold), var(--accent-2), var(--pink));
}

.site-footer {
  padding: 22px 12px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.site-footer a {
  display: inline-block;
  min-height: 36px;
  padding: 9px 8px;
}

@media (min-width: 900px) {
  body {
    background:
      radial-gradient(circle at 78% 0%, rgba(255, 194, 111, 0.2), transparent 34%),
      radial-gradient(circle at 6% 12%, rgba(132, 184, 232, 0.12), transparent 30%),
      linear-gradient(135deg, #fffaf2, #fff1f5);
  }

  .app-shell {
    min-height: calc(100vh - 56px);
    margin-top: 28px;
    margin-bottom: 28px;
    border-radius: 28px;
    overflow: visible;
  }

  .bottom-nav {
    width: min(410px, calc(var(--app-width) - 28px));
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .today-card,
  .app-top {
    margin-left: -16px;
    margin-right: -16px;
  }

  .today-card {
    padding-left: 22px;
    padding-right: 22px;
  }

  .today-main h1 {
    font-size: 33px;
  }

  .today-main strong {
    font-size: 72px;
  }

  .outfit-recipe {
    grid-template-columns: 1fr;
  }

  .outfit-brief p {
    max-width: 100%;
  }

  .fortune-hero-card,
  .fortune-grid,
  .instant-home {
    grid-template-columns: 1fr;
  }

  .kline-score-top {
    grid-template-columns: 1fr;
  }

  .kline-score-main {
    min-height: 132px;
  }

  .kline-score-mini {
    grid-template-columns: repeat(3, minmax(128px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .kline-score-mini::-webkit-scrollbar {
    display: none;
  }

  .kline-score-mini article {
    min-height: 116px;
  }

  .kline-toolbar {
    border-radius: var(--radius-sm);
    align-items: flex-start;
  }

  .kline-scroll {
    margin-left: -6px;
    margin-right: -6px;
    padding-left: 6px;
  }

  .mini-score {
    margin: 0 auto;
  }
}

/* Mobile reading pass: keep the report calm, reachable and thumb-friendly. */
@media (max-width: 600px) {
  html {
    scroll-padding-top: 70px;
    scroll-padding-bottom: 118px;
  }

  body {
    background: #fffaf2;
    font-size: 15px;
    overscroll-behavior-y: auto;
  }

  .field-canvas,
  .paper-grain {
    opacity: 0.26;
  }

  .app-shell {
    width: 100%;
    padding-bottom: calc(126px + env(safe-area-inset-bottom));
    gap: 12px;
    box-shadow: none;
    backdrop-filter: none;
  }

  .app-top {
    min-height: 58px;
    padding-top: max(9px, env(safe-area-inset-top));
    padding-bottom: 9px;
    background: rgba(255, 250, 242, 0.94);
    backdrop-filter: blur(16px);
  }

  .brand strong {
    font-size: 19px;
  }

  .app-top p {
    max-width: 124px;
    font-size: 11px;
  }

  .today-card {
    min-height: 300px;
    padding-top: 20px;
    padding-bottom: 18px;
    box-shadow: 0 16px 40px rgba(211, 139, 72, 0.1);
  }

  .today-main {
    min-height: 124px;
    margin-top: 19px;
  }

  .today-main h1 {
    font-size: clamp(31px, 9vw, 38px);
  }

  .today-main strong {
    font-size: 66px;
  }

  .today-facts {
    margin-top: 14px;
    gap: 7px;
  }

  .today-facts article {
    min-height: 58px;
    padding: 8px;
  }

  .module,
  .sheet,
  .report-section,
  .result-root.empty {
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(211, 139, 72, 0.08);
  }

  .module-head h2,
  .form-title h2,
  .section-head h2 {
    font-size: 22px;
  }

  .tool-hero {
    min-height: 124px;
    padding: 16px;
    border-radius: 15px;
  }

  .tool-hero h1 {
    font-size: 35px;
  }

  input,
  select,
  .switch-line {
    min-height: 50px;
  }

  textarea {
    min-height: 116px;
  }

  .btn {
    min-height: 50px;
  }

  .btn:focus-visible,
  .mini-action:focus-visible,
  .bottom-nav a:focus-visible,
  .kline-zoom-buttons button:focus-visible {
    outline: 3px solid rgba(217, 119, 69, 0.38);
    outline-offset: 2px;
  }

  .result-root {
    gap: 11px;
  }

  .result-meta {
    margin-left: -2px;
    margin-right: -2px;
  }

  .kline-svg {
    min-height: 268px;
  }

  .bottom-nav {
    width: calc(100vw - 20px);
    min-height: 60px;
    bottom: max(7px, env(safe-area-inset-bottom));
    padding: 5px;
    border-radius: 20px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 12px 30px rgba(211, 139, 72, 0.14);
  }

  .bottom-nav a {
    min-height: 48px;
    border-radius: 14px;
  }

  .bottom-nav b {
    font-size: 10px;
  }
}

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