/* Qiyao product UI system. Loaded after legacy styles to provide one stable cascade. */
:root {
  color-scheme: light;
  --product-bg: #fcfbf8;
  --product-surface: #ffffff;
  --product-surface-subtle: #f5f5f1;
  --product-surface-accent: #f9f8f7;
  --product-ink: #14171a;
  --product-ink-strong: #243222;
  --product-muted: #5d6062;
  --product-soft: #5d6062;
  --product-line: #e7e7e1;
  --product-line-strong: #d2d0cd;
  --product-primary: #243222;
  --product-primary-hover: #1f3028;
  --product-primary-soft: #f5f5f1;
  --product-gold: #d7bd96;
  --product-gold-ink: #896a3e;
  --product-copper: #a9543f;
  --product-success: #26705d;
  --product-warning: #a16c22;
  --product-danger: #b34d3d;
  --product-focus: rgba(36, 50, 34, 0.18);
  --product-shadow-sm: 0 1px 2px rgba(17, 31, 25, 0.04), 0 6px 18px rgba(17, 31, 25, 0.04);
  --product-shadow-md: 0 14px 36px rgba(17, 31, 25, 0.08);
  --product-radius-sm: 6px;
  --product-radius: 8px;
  --product-content: 1200px;
  --product-reading: 68ch;
  --product-transition: 180ms ease-out;
  --bg: var(--product-bg);
  --surface: var(--product-surface);
  --surface-strong: var(--product-surface);
  --ink: var(--product-ink);
  --muted: var(--product-muted);
  --line: var(--product-line);
  --accent: var(--product-primary);
  --accent-2: var(--product-primary);
  --gold: var(--product-gold);
  --deep-green: var(--product-primary);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--product-bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--product-bg);
  color: var(--product-ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}

body::before,
body::after,
.input-panel::before,
.input-panel::after,
.chart-card::before {
  display: none !important;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

a {
  color: var(--product-primary);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--product-focus);
  outline-offset: 2px;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--product-gold-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Authentication */
body.auth-locked {
  overflow-y: auto;
  background: var(--product-bg);
}

body.auth-locked .app-shell {
  display: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--product-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body:not(.auth-locked) .auth-gate {
  display: none;
}

.auth-card {
  width: min(440px, 100%);
  max-height: none;
  display: grid;
  gap: 14px;
  padding: 32px;
  overflow: visible;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: var(--product-shadow-md);
}

.auth-card::before {
  display: none;
}

.auth-brand {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--product-primary);
  color: #fff;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-card h1 {
  margin: 0;
  color: var(--product-ink-strong);
  font-family: inherit;
  font-size: 1.75rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-card .auth-intro,
.auth-token-note {
  margin: 0;
  color: var(--product-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
}

#auth-form .auth-mode-tab {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--product-radius-sm);
  background: transparent;
  color: var(--product-muted);
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 700;
}

#auth-form .auth-mode-tab:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.64);
}

#auth-form .auth-mode-tab.is-active {
  background: var(--product-surface);
  color: var(--product-primary);
  box-shadow: var(--product-shadow-sm);
}

#auth-form.auth-card[data-auth-view="login"] [data-auth-only="register"] {
  display: none;
}

.auth-card label,
.birth-form label,
.target-city-form label,
.reality-context-panel label,
.feedback-grid label,
.admin-secret-form label {
  display: grid;
  gap: 7px;
}

label > span,
.auth-card label > span,
.form-section-heading > div > span {
  color: var(--product-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-card input,
input,
select,
textarea,
.picker-field,
button.picker-field {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--product-line-strong);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  color: var(--product-ink);
  box-shadow: none;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color var(--product-transition), box-shadow var(--product-transition), background var(--product-transition);
}

textarea {
  min-height: 100px;
  padding-block: 12px;
  resize: vertical;
  line-height: 1.65;
}

input::placeholder,
textarea::placeholder,
.picker-field span {
  color: var(--product-soft);
  font-weight: 500;
}

input:hover,
select:hover,
textarea:hover,
.picker-field:hover {
  border-color: #b8c4bd;
}

input:focus,
select:focus,
textarea:focus,
.picker-field:focus-visible {
  border-color: var(--product-primary);
  box-shadow: 0 0 0 3px var(--product-focus);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
}

.captcha-row strong {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--product-line-strong);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  color: var(--product-ink);
}

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

.auth-error {
  min-height: 1.4em;
  color: var(--product-danger);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.5;
}

/* Shared controls */
button,
.auth-card button,
.admin-home-link {
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--product-primary);
  border-radius: var(--product-radius);
  background: var(--product-primary);
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background var(--product-transition), border-color var(--product-transition), color var(--product-transition), box-shadow var(--product-transition), transform var(--product-transition);
}

button:hover,
.auth-card button:hover,
.admin-home-link:hover {
  transform: none;
  border-color: var(--product-primary-hover);
  background: var(--product-primary-hover);
  box-shadow: var(--product-shadow-sm);
}

button:active,
.auth-card button:active {
  transform: translateY(1px);
  box-shadow: none;
}

button.secondary,
.auth-card button.secondary,
.admin-home-link.secondary,
.edit-profile-button {
  border-color: var(--product-line-strong);
  background: var(--product-surface);
  color: var(--product-primary);
  box-shadow: none;
}

button.secondary:hover,
.auth-card button.secondary:hover,
.admin-home-link.secondary:hover,
.edit-profile-button:hover {
  border-color: #9dafa5;
  background: var(--product-surface-accent);
  color: var(--product-primary-hover);
}

button:disabled,
.auth-card button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.text-button,
button.text-button {
  width: auto;
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--product-primary);
  box-shadow: none;
  font-size: 0.86rem;
}

.text-button:hover,
button.text-button:hover {
  border: 0;
  background: var(--product-primary-soft);
  box-shadow: none;
}

/* Application shell and homepage */
.app-shell,
.has-result .app-shell {
  width: min(var(--product-content), 100%);
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  padding: 20px 24px 56px;
}

.account-bar {
  position: static;
  z-index: 40;
  width: auto;
  max-width: 100%;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--product-muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.account-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-bar a {
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: var(--product-radius-sm);
  color: var(--product-primary);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.account-bar button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.84rem;
}

.input-panel {
  position: relative;
  top: auto;
  align-self: auto;
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(520px, 1.28fr);
  align-items: center;
  gap: 48px;
  min-height: 650px;
  padding: 48px;
  overflow: visible;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: var(--product-shadow-sm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.profile-orb {
  display: none;
}

.brand-block {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 0;
}

.brand-block::before {
  content: "七";
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 0 8px;
  border-radius: 50%;
  background: var(--product-primary);
  color: #fff;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: none;
}

.brand-block h1 {
  max-width: 7em;
  margin: 0;
  color: var(--product-ink-strong);
  font-family: "Songti SC", "Noto Serif SC", Georgia, serif;
  font-size: 3.35rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.positioning {
  max-width: 31em;
  margin: 0;
  color: var(--product-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.principle {
  width: fit-content;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--product-gold-ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 720;
  letter-spacing: 0;
}

.birth-form {
  display: grid;
  gap: 16px;
  padding: 28px 0 28px 40px;
  border: 0;
  border-left: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.form-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}

.form-section-heading > div {
  display: grid;
  gap: 2px;
}

.form-section-heading > div > span {
  color: var(--product-ink);
  font-size: 1rem;
}

.form-section-heading small {
  color: var(--product-soft);
  font-size: 0.78rem;
}

.form-grid,
.quick-target-grid,
.reality-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.picker-field,
button.picker-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--product-ink);
  text-align: left;
}

.picker-field::after {
  content: "选择";
  flex: 0 0 auto;
  color: var(--product-soft);
  font-size: 0.75rem;
  font-weight: 650;
}

.picker-field:not(.is-placeholder) span {
  color: var(--product-ink);
  font-weight: 650;
}

.hint {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  color: var(--product-muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

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

.actions button {
  width: 100%;
  min-height: 50px;
  white-space: normal;
}

.quick-target-panel {
  display: block;
  margin: 2px 0 0;
  padding: 0;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
}

.quick-target-panel > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.quick-target-panel > summary::-webkit-details-marker {
  display: none;
}

.quick-target-panel > summary > span {
  display: grid;
  gap: 2px;
}

.quick-target-panel > summary strong {
  color: var(--product-ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 720;
  letter-spacing: 0;
}

.quick-target-panel > summary::after {
  content: "展开";
  color: var(--product-primary);
  font-size: 0.76rem;
  font-weight: 720;
}

.quick-target-panel[open] > summary::after {
  content: "收起";
}

.quick-target-panel small {
  color: var(--product-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.quick-target-content {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--product-line);
}

.quick-target-content > button {
  min-width: 98px;
  min-height: 48px;
}

body:not(.has-result) .result-panel.is-empty {
  display: none;
}

/* Result shell */
.has-result .app-shell {
  width: min(var(--product-content), 100%);
  padding-top: 72px;
}

.has-result .input-panel {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  z-index: 50;
  width: auto;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.has-result .input-panel .brand-block,
.has-result .input-panel .birth-form {
  display: none;
}

.has-result .profile-orb {
  width: 50px;
  height: 50px;
  min-height: 50px;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--product-primary);
  border-radius: 50%;
  background: var(--product-primary);
  color: #fff;
  box-shadow: var(--product-shadow-sm);
}

.profile-orb span,
.profile-orb small {
  display: block;
  color: #fff;
  line-height: 1;
}

.profile-orb span {
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 1rem;
  font-weight: 700;
}

.profile-orb small {
  font-size: 0.58rem;
  font-weight: 650;
}

.result-panel {
  width: 100%;
  min-height: 0;
  padding: 28px 32px 40px;
  overflow: visible;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: var(--product-shadow-sm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.result-panel.is-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
}

.empty-state {
  width: min(540px, 100%);
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--product-line-strong);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
  text-align: center;
}

.empty-state p {
  margin: 0;
  color: var(--product-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.result-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 4px 0 22px;
  border-bottom: 1px solid var(--product-line);
}

.result-header h2 {
  margin: 5px 0 4px;
  color: var(--product-ink-strong);
  font-family: inherit;
  font-size: 2rem;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: 0;
}

.subtitle {
  margin: 0;
  color: var(--product-muted);
  font-size: 0.9rem;
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.mode-badge {
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: var(--product-primary-soft);
  color: var(--product-primary);
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 720;
}

.edit-profile-button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 0.8rem;
}

.result-tabs {
  position: sticky;
  top: 10px;
  z-index: 30;
  width: fit-content;
  max-width: 100%;
  display: flex;
  gap: 4px;
  margin: 18px 0 28px;
  padding: 4px;
  overflow: visible;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--product-shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tab-button {
  min-width: 86px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--product-radius-sm);
  background: transparent;
  color: var(--product-muted);
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 720;
  white-space: nowrap;
}

.tab-button:hover {
  border: 0;
  background: var(--product-surface-subtle);
  color: var(--product-ink);
  box-shadow: none;
}

.tab-button.is-active {
  border: 0;
  background: var(--product-primary);
  color: #fff;
  box-shadow: none;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active:not([hidden]) {
  display: block;
}

.visual-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  align-items: stretch;
  gap: 20px;
}

.chart-card,
.summary-card {
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.chart-card {
  position: relative;
  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
  background: var(--product-surface-subtle);
}

.chart-card svg {
  position: relative;
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: none;
}

.summary-card {
  padding: 24px;
}

.summary-card h3,
.module-heading h3,
.year-hero h3 {
  margin: 3px 0 0;
  color: var(--product-ink-strong);
  font-family: inherit;
  font-size: 1.28rem;
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: 0;
}

.summary-card > p:not(.label) {
  margin: 10px 0 0;
  color: var(--product-muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.summary-pair,
.location-confirmation {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.location-confirmation {
  display: grid;
  gap: 4px;
}

.summary-pair span,
.location-confirmation span,
.year-stats span,
.health-grid span {
  color: var(--product-muted);
  font-size: 0.78rem;
  font-weight: 680;
}

.summary-pair strong,
.location-confirmation strong {
  color: var(--product-ink);
  font-size: 0.94rem;
}

.location-confirmation small {
  color: var(--product-soft);
}

.summary-energy {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
}

.energy-list {
  display: grid;
  gap: 12px;
}

.energy-row {
  display: grid;
  grid-template-columns: 88px minmax(100px, 1fr) 64px;
  gap: 12px;
  align-items: center;
}

.energy-name,
.energy-score {
  color: var(--product-ink);
  font-size: 0.86rem;
  font-weight: 720;
}

.energy-score {
  text-align: right;
}

.energy-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce4df;
  box-shadow: none;
}

.energy-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--product-primary);
  box-shadow: none;
}

.energy-row--three-axis {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(24, 54, 43, 0.09);
}

.energy-row--three-axis:last-child {
  border-bottom: 0;
}

.energy-row--three-axis .energy-name {
  display: grid;
  gap: 3px;
}

.energy-row--three-axis .energy-name strong {
  font-size: 0.9rem;
}

.energy-row--three-axis .energy-name span {
  color: var(--product-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.energy-axis-list {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.energy-axis {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
}

.energy-axis__label,
.energy-axis__value {
  color: var(--product-muted);
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1;
}

.energy-axis__value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.energy-axis__track {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce4df;
}

.energy-axis__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--product-primary);
}

.energy-axis--fluency .energy-axis__track i {
  background: #a27837;
}

.energy-axis--pressure .energy-axis__track i {
  background: #9a5945;
}

.energy-text {
  grid-column: 2 / 4;
  margin: -5px 0 2px;
  color: var(--product-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

/* Page sections */
.module {
  margin: 0;
  padding: 32px 0;
  border: 0;
  border-top: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.visual-layout + .module,
.tab-panel > .module:first-child {
  margin-top: 28px;
}

.module-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
}

.module-heading > div,
.compact-heading {
  display: grid;
  gap: 3px;
}

.module-heading p,
.module > p,
.year-hero p {
  color: var(--product-muted);
}

.module-actions,
.report-tools {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.report-tools label {
  flex: 1 1 220px;
}

.module-actions button,
.report-tools button {
  min-height: 40px;
  font-size: 0.84rem;
}

.verdict-module {
  background: transparent;
}

.verdict-summary {
  max-width: 78ch;
  margin: -4px 0 18px;
  color: var(--product-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.verdict-card-grid,
.transit-field-grid,
.key-window-list,
.event-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.verdict-card,
.transit-field-card,
.key-window-item,
.event-line-card {
  padding: 18px;
  border: 1px solid var(--product-line);
  border-left: 1px solid var(--product-line) !important;
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: none;
}

.verdict-card-top,
.event-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.verdict-card-top span,
.verdict-card-top small,
.event-line-head span {
  padding: 4px 8px;
  border: 1px solid var(--product-line);
  border-radius: 999px;
  background: var(--product-surface-subtle);
  color: var(--product-muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.verdict-card h4,
.event-line-head h4,
.transit-field-card h4,
.key-window-item h4 {
  margin: 0;
  color: var(--product-ink-strong);
  font-family: inherit;
  font-size: 1.06rem;
  font-weight: 740;
  line-height: 1.4;
}

.verdict-card dl,
.event-line-card dl {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.verdict-card dl div,
.event-line-card dl div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--product-line);
}

.verdict-card dt,
.event-line-card dt {
  color: var(--product-soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.verdict-card dd,
.event-line-card dd,
.event-line-card p,
.transit-field-card p,
.key-window-item p {
  margin: 0;
  color: var(--product-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.report,
.report-body {
  width: 100%;
  max-width: var(--product-reading);
  color: var(--product-ink);
}

.report.has-bookmarks {
  max-width: none;
}

.report {
  display: grid;
  gap: 0;
}

.report p,
.report-body p {
  margin: 0;
  color: #36403c;
  font-size: 1rem;
  line-height: 1.9;
}

.report p + p,
.report-body p + p {
  margin-top: 1em;
}

.report h4,
.report-section h4 {
  margin: 0 0 10px;
  color: var(--product-ink-strong);
  font-family: inherit;
  font-size: 1.16rem;
  font-weight: 760;
  line-height: 1.4;
  letter-spacing: 0;
}

.report-section {
  padding: 0 0 28px;
  scroll-margin-top: 92px;
}

.report-section + .report-section {
  padding-top: 28px;
  border-top: 1px solid var(--product-line);
}

.report-section h4::before {
  display: none;
}

.report-bookmark-shell {
  display: grid;
  grid-template-columns: 172px minmax(0, var(--product-reading));
  align-items: start;
  gap: 28px;
}

.report-bookmarks {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.report-bookmarks button {
  min-height: 38px;
  padding: 0 10px;
  border: 0 !important;
  border-radius: var(--product-radius-sm);
  background: transparent !important;
  color: var(--product-muted) !important;
  box-shadow: none !important;
  font-size: 0.82rem;
  font-weight: 680;
  text-align: left;
}

.report-bookmarks button:hover,
.report-bookmarks button.is-active {
  border: 0 !important;
  background: var(--product-primary-soft) !important;
  color: var(--product-primary) !important;
  box-shadow: none !important;
}

.ai-status {
  position: relative;
  margin: 0;
  padding: 14px 16px 18px;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  color: var(--product-muted);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.6;
}

.ai-status::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38%;
  height: 3px;
  background: var(--product-primary);
  animation: qiyao-progress 1.25s ease-in-out infinite alternate;
}

.report-quality-probe {
  display: none !important;
}

@keyframes qiyao-progress {
  from { transform: translateX(-70%); }
  to { transform: translateX(230%); }
}

/* Natal tools */
.target-city-module,
.transit-generator {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
}

.target-city-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.target-city-form button {
  min-height: 48px;
  white-space: nowrap;
}

.target-city-result:empty {
  display: none;
}

.target-city-result {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: none;
}

.target-city-summary,
.target-city-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.target-city-summary div,
.target-city-grid article,
.target-city-detail {
  padding: 14px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
}

.target-city-lead {
  margin: 0 0 14px;
  color: var(--product-ink-strong);
  font-size: 1.05rem;
  font-weight: 720;
  line-height: 1.65;
}

.target-city-summary span,
.target-city-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--product-soft);
  font-size: 0.75rem;
  font-weight: 680;
}

.target-city-summary strong,
.target-city-grid strong {
  display: block;
  margin-bottom: 5px;
  color: var(--product-ink);
  font-size: 1rem;
}

.target-city-summary small,
.target-city-grid small,
.target-city-grid p,
.target-city-detail li,
.target-city-limit {
  color: var(--product-muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.health-card {
  padding: 20px;
  border: 1px solid var(--product-line) !important;
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
}

.health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.health-grid div {
  padding: 14px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: none;
}

.health-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--product-ink);
  font-size: 0.94rem;
  line-height: 1.55;
}

.health-card p {
  margin: 10px 0 0;
  color: var(--product-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.health-card .health-safety {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--product-line);
  color: var(--product-copper);
  font-size: 0.82rem;
}

.collapsible-module {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
}

.collapsible-module + .collapsible-module {
  margin-top: 12px;
}

.collapsible-module summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.collapsible-module summary::after {
  content: "展开";
  color: var(--product-primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.collapsible-module[open] summary {
  border-bottom: 1px solid var(--product-line);
}

.collapsible-module[open] summary::after {
  content: "收起";
}

.collapsible-module summary span {
  display: grid;
  gap: 3px;
}

.collapsible-module summary small {
  color: var(--product-soft);
  font-size: 0.74rem;
}

.collapsible-module summary strong {
  color: var(--product-ink);
  font-size: 1rem;
}

.collapsible-module article {
  margin: 0;
  padding: 18px;
}

.placement-summary-card,
.aspect-summary-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.placement-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.placement-chip-list span {
  padding: 5px 8px;
  border: 1px solid var(--product-line);
  border-radius: 999px;
  background: var(--product-surface-subtle);
  color: var(--product-primary);
  font-size: 0.76rem;
  font-weight: 680;
}

.placement-summary-card p,
.aspect-summary-card p {
  margin: 0;
  color: var(--product-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Transit */
.transit-generate-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(150px, 200px);
  align-items: end;
  gap: 10px;
}

.reality-context-panel {
  margin-top: 18px;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.reality-context-panel > label {
  margin-top: 12px;
}

.compact-heading {
  margin-bottom: 14px;
}

.year-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  align-items: stretch;
  gap: 18px;
}

.year-hero > div:first-child {
  padding-right: 18px;
}

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

.year-stats div {
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 14px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
}

.year-stats strong {
  color: var(--product-ink);
  font-size: 0.94rem;
  line-height: 1.5;
}

.key-window-item > span {
  display: block;
  margin-bottom: 6px;
  color: var(--product-gold-ink);
  font-size: 0.75rem;
  font-weight: 720;
}

.transit-field-card.opportunity {
  background: #f1f7f4;
}

.transit-field-card.pressure {
  background: #fbf4f1;
}

/* Feedback */
.report-feedback-card {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--product-line);
  border-left: 1px solid var(--product-line) !important;
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
}

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

.feedback-wide {
  grid-column: 1 / -1;
}

.feedback-status {
  color: var(--product-primary);
  font-size: 0.86rem;
}

/* Wheel pickers */
.wheel-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  align-items: end;
  background: rgba(14, 23, 20, 0.42);
  touch-action: pan-y;
}

.wheel-picker-sheet {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 14px 14px max(16px, env(safe-area-inset-bottom));
  border: 1px solid var(--product-line);
  border-bottom: 0;
  border-radius: var(--product-radius) var(--product-radius) 0 0;
  background: var(--product-surface);
  box-shadow: 0 -18px 48px rgba(14, 23, 20, 0.16);
}

.wheel-picker-header {
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.wheel-picker-header strong {
  text-align: center;
}

.wheel-picker-header button {
  min-height: 40px;
  padding: 0 10px;
}

.wheel-picker-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}

.wheel-picker-column {
  display: grid;
  gap: 6px;
}

.wheel-picker-column > span {
  color: var(--product-soft);
  font-size: 0.75rem;
  text-align: center;
}

.wheel-select {
  height: 158px;
  min-height: 158px;
  padding: 0 6px;
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  color: var(--product-ink);
  font-size: 1.05rem;
  text-align: center;
  text-align-last: center;
}

/* Admin */
.admin-page {
  background: var(--product-bg);
}

.admin-shell {
  width: min(1240px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  gap: 16px;
  padding: 24px;
}

.admin-header,
.admin-card {
  padding: 24px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: var(--product-shadow-sm);
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.admin-header h1,
.admin-card h2 {
  margin: 4px 0 0;
  color: var(--product-ink-strong);
  font-family: inherit;
  font-weight: 750;
  letter-spacing: 0;
}

.admin-header h1 {
  font-size: 1.75rem;
}

.admin-card h2 {
  font-size: 1.16rem;
}

.admin-header p,
.admin-secret-form p {
  margin: 6px 0 0;
  color: var(--product-muted);
}

.admin-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.admin-metrics div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  box-shadow: none;
}

.admin-metrics span,
.admin-table small {
  color: var(--product-muted);
  font-size: 0.78rem;
}

.admin-metrics strong {
  color: var(--product-ink-strong);
  font-size: 1.45rem;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface);
  box-shadow: none;
}

.admin-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--product-line);
  color: var(--product-ink);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--product-surface-subtle);
  color: var(--product-muted);
  font-size: 0.78rem;
  font-weight: 720;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table pre,
.record-full-text pre {
  max-width: min(620px, 70vw);
  max-height: 300px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--product-line);
  border-radius: var(--product-radius);
  background: var(--product-surface-subtle);
  color: var(--product-muted);
  font: 0.82rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.record-readable {
  display: grid;
  gap: 8px;
  min-width: 230px;
}

.record-readable summary {
  color: var(--product-primary);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-token-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.admin-token-tools input {
  width: 74px;
  min-height: 40px;
}

.admin-token-tools button {
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

.admin-secret-form {
  max-width: 420px;
  display: grid;
  gap: 14px;
}

.admin-home-link {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
}

/* Responsive */
@media (max-width: 1080px) {
  .input-panel {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding: 36px;
  }

  .brand-block {
    max-width: 680px;
  }

  .brand-block h1 {
    max-width: none;
    font-size: 2.8rem;
  }

  .birth-form {
    padding: 28px 0 0;
    border-top: 1px solid var(--product-line);
    border-left: 0;
  }

  .admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell,
  .has-result .app-shell {
    padding-inline: 16px;
  }

  .visual-layout,
  .year-hero {
    grid-template-columns: 1fr;
  }

  .chart-card svg {
    max-width: 560px;
  }

  .year-hero > div:first-child {
    padding-right: 0;
  }

  .report-bookmark-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .report-bookmarks {
    position: sticky;
    top: 62px;
    z-index: 20;
    display: flex;
    gap: 4px;
    padding: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .report-bookmarks::-webkit-scrollbar {
    display: none;
  }

  .report-bookmarks button {
    flex: 0 0 auto;
    width: auto !important;
    min-height: 38px;
    padding-inline: 12px;
    text-align: center;
    white-space: nowrap;
  }

  .target-city-form,
  .quick-target-content {
    grid-template-columns: 1fr;
  }

  .quick-target-content > button,
  .target-city-form button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .app-shell,
  .has-result .app-shell {
    width: 100%;
    min-height: auto;
    padding: 0 0 max(28px, env(safe-area-inset-bottom));
    overflow: visible;
  }

  .account-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    width: 100%;
    justify-self: stretch;
    justify-content: flex-end;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    border-bottom: 1px solid var(--product-line);
    background: rgba(244, 246, 243, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .account-bar span {
    margin-right: auto;
  }

  .account-bar a,
  .account-bar button {
    min-height: 36px;
  }

  .input-panel {
    width: 100%;
    min-height: auto;
    gap: 24px;
    padding: 28px 16px 24px;
    overflow: visible;
    border: 0;
    border-bottom: 1px solid var(--product-line);
    border-radius: 0;
    box-shadow: none;
  }

  .brand-block {
    gap: 12px;
  }

  .brand-block::before {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    font-size: 1.1rem;
  }

  .brand-block h1 {
    max-width: 8em;
    font-size: 2.35rem;
  }

  .positioning {
    font-size: 0.94rem;
  }

  .principle {
    font-size: 0.86rem;
  }

  .birth-form {
    gap: 14px;
    padding-top: 22px;
  }

  .form-grid,
  .quick-target-grid,
  .reality-context-grid,
  .target-city-summary,
  .target-city-grid,
  .health-grid,
  .feedback-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    grid-template-columns: 1fr 1fr;
  }

  .actions button:first-child {
    grid-column: 1 / -1;
  }

  .quick-target-panel {
    padding: 0;
  }

  .has-result .app-shell {
    padding-top: 62px;
  }

  .has-result .input-panel {
    top: max(8px, env(safe-area-inset-top));
    left: 10px;
    width: auto;
    padding: 0;
    border: 0;
  }

  .has-result .profile-orb {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .has-result .input-panel {
    z-index: 80;
  }

  .has-result .account-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    min-height: 60px;
    padding-left: 66px;
  }

  .has-result .account-bar span {
    display: block;
    flex: 1 1 auto;
  }

  .has-result .account-bar a,
  .has-result .account-bar button {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
  }

  .result-panel {
    width: 100%;
    min-height: auto;
    padding: 20px 16px 32px;
    overflow: visible;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .result-header {
    display: grid;
    gap: 14px;
    padding-bottom: 18px;
  }

  .result-header h2 {
    font-size: 1.55rem;
  }

  .result-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  .mode-badge {
    width: auto;
  }

  .edit-profile-button {
    width: auto !important;
  }

  .result-tabs {
    top: 64px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 14px 0 22px;
  }

  .tab-button {
    min-width: 0;
    width: 100%;
    padding: 0 8px;
  }

  .summary-card,
  .target-city-module,
  .transit-generator {
    padding: 18px;
  }

  .module {
    padding: 26px 0;
  }

  .visual-layout + .module,
  .tab-panel > .module:first-child {
    margin-top: 22px;
  }

  .module-heading {
    align-items: start;
    flex-direction: column;
  }

  .report-tools,
  .module-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-tools button,
  .module-actions button {
    width: 100%;
  }

  .report-bookmarks {
    top: 114px;
  }

  .report p,
  .report-body p {
    font-size: 0.98rem;
    line-height: 1.85;
  }

  .verdict-card-grid,
  .transit-field-grid,
  .key-window-list,
  .event-line-grid {
    grid-template-columns: 1fr;
  }

  .energy-row {
    grid-template-columns: 72px minmax(80px, 1fr) 54px;
    gap: 9px;
  }

  .energy-row--three-axis {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .transit-generate-row {
    grid-template-columns: 1fr;
  }

  .transit-generate-row button {
    width: 100%;
  }

  .year-stats {
    grid-template-columns: 1fr;
  }

  .auth-gate {
    place-items: start center;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  }

  .auth-card {
    width: 100%;
    padding: 22px 18px;
    border-radius: var(--product-radius);
  }

  .captcha-row {
    grid-template-columns: 1fr auto;
  }

  .wheel-picker-sheet {
    width: 100%;
  }

  .admin-shell {
    width: 100%;
    padding: 10px;
  }

  .admin-header,
  .admin-card {
    padding: 16px;
  }

  .admin-header,
  .admin-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-home-link,
  .admin-card-heading button {
    width: 100%;
  }

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

  .admin-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .admin-table {
    min-width: 0;
    border-collapse: separate;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    padding: 10px 14px;
    border: 1px solid var(--product-line);
    border-radius: var(--product-radius);
    background: var(--product-surface);
  }

  .admin-table tr + tr {
    margin-top: 10px;
  }

  .admin-table td {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--product-line);
    overflow-wrap: anywhere;
  }

  .admin-table td:last-child {
    border-bottom: 0;
  }

  .admin-table td::before {
    content: attr(data-label);
    color: var(--product-soft);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .admin-table pre,
  .record-full-text pre {
    max-width: 100%;
    max-height: 240px;
  }

  .record-readable,
  .admin-token-tools {
    min-width: 0;
    width: 100%;
  }

  .admin-token-tools input {
    flex: 1 1 88px;
    min-width: 72px;
  }

  .admin-token-tools button {
    flex: 0 0 auto;
    width: auto !important;
  }
}

@media (max-width: 370px) {
  .actions {
    grid-template-columns: 1fr;
  }

  .actions button:first-child {
    grid-column: auto;
  }

  .account-bar {
    font-size: 0.78rem;
  }

  .account-bar button,
  .account-bar a {
    padding-inline: 8px;
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }
}

.report-source-badge {
  width: fit-content;
  margin: 0 0 18px;
  padding: 7px 11px;
  border: 1px solid rgba(24, 54, 43, 0.16);
  border-radius: 999px;
  background: rgba(244, 247, 243, 0.92);
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.report-source-badge.is-fallback {
  border-color: rgba(159, 83, 54, 0.28);
  background: rgba(252, 244, 238, 0.96);
  color: #8a432d;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Legacy specificity reset for the homepage rules that predate this system. */
body:not(.has-result) .account-bar {
  position: static;
  top: auto;
  right: auto;
  width: auto;
  margin: 0;
}

body:not(.has-result) .input-panel {
  position: relative;
  min-height: 0;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  padding: 48px 0;
  overflow: visible;
}

body:not(.has-result) .brand-block::before {
  display: none;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 0 8px;
  content: "七";
  border: 0;
  border-radius: 50%;
  background: var(--product-primary);
  color: var(--product-surface);
  box-shadow: none;
  font-family: ui-serif, "Songti SC", "Noto Serif SC", serif;
  line-height: 1;
  text-align: center;
}

body:not(.has-result) .brand-block h1 {
  max-width: 8em;
  font-size: 2.5rem;
  line-height: 1.3;
}

body:not(.has-result) .positioning {
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
}

body:not(.has-result) .principle {
  width: fit-content;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.92rem;
  line-height: 1.55;
}

body:not(.has-result) .birth-form {
  padding: 0 0 0 40px;
  border: 0;
  border-left: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.has-result) .actions {
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 10px;
}

body:not(.has-result) .actions button:first-child {
  grid-column: auto;
}

body:not(.has-result) .quick-target-panel {
  display: block;
  padding: 0;
}

#sample-button.text-button,
#auth-form .auth-mode-tab {
  border: 0;
  background: transparent;
  color: var(--product-primary);
  box-shadow: none;
}

#sample-button.text-button:hover {
  border: 0;
  background: var(--product-primary-soft);
  box-shadow: none;
}

#auth-form .auth-mode-tab.is-active {
  background: var(--product-surface);
  box-shadow: var(--product-shadow-sm);
}

@media (max-width: 1080px) {
  body:not(.has-result) .input-panel {
    grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
    gap: 32px;
    min-height: 0;
    padding: 40px 0;
  }

  body:not(.has-result) .brand-block h1 {
    max-width: none;
    font-size: 2rem;
  }

  body:not(.has-result) .birth-form {
    padding: 0 0 0 28px;
    border-top: 0;
    border-left: 1px solid var(--product-line);
  }

}

@media (max-width: 600px) {
  body:not(.has-result) .account-bar {
    position: sticky;
    top: 0;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }

  body:not(.has-result) .account-bar span {
    flex: 1 1 auto;
    min-width: 0;
  }

  body:not(.has-result) .account-bar a,
  body:not(.has-result) .account-bar button {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
  }

  body:not(.has-result) .input-panel {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: 0;
    padding: 26px 0 32px;
  }

  body:not(.has-result) .brand-block::before {
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
  }

  body:not(.has-result) .brand-block h1 {
    max-width: 8em;
    font-size: 1.8rem;
  }

  body:not(.has-result) .positioning {
    font-size: 0.94rem;
  }

  body:not(.has-result) .principle {
    width: auto;
    font-size: 0.86rem;
  }

  body:not(.has-result) .birth-form {
    padding: 22px 0 0;
    border-top: 1px solid var(--product-line);
    border-left: 0;
  }

  body:not(.has-result) .actions {
    grid-template-columns: 1fr 1fr;
  }

  body:not(.has-result) .actions button:first-child {
    grid-column: 1 / -1;
  }

  body:not(.has-result) .quick-target-panel {
    padding: 0;
  }
}

/* Compact product shell: one header, unframed work areas and a separate reading column. */
html {
  overflow-x: clip;
}

html body:not(.auth-locked) {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

body {
  background: var(--product-bg);
}

body .app-shell,
body:not(.has-result):not(.auth-locked) .app-shell,
body.has-result .app-shell {
  display: block;
  width: min(1160px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 32px 48px;
  overflow: visible;
}

.site-header {
  position: relative;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  border-bottom: 1px solid var(--product-line);
  background: var(--product-bg);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  color: var(--product-ink-strong);
  text-decoration: none;
}

.site-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 20px;
}

.site-brand strong {
  font-size: 17px;
  font-weight: 650;
}

body #account-bar {
  position: static;
  flex: 1 1 auto;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: 13px;
}

body #account-bar span {
  flex: 0 1 auto;
  margin: 0;
}

body #account-bar button,
body #account-bar a {
  min-height: 44px;
}

body:not(.has-result) .input-panel {
  align-items: start;
  width: min(760px, 100%);
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding: 36px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.has-result) .brand-block {
  position: static;
  max-width: none;
  padding: 0;
  gap: 12px;
}

body:not(.has-result) .brand-block h1 {
  max-width: none;
  font-size: 32px;
  line-height: 1.4;
}

body:not(.has-result) .positioning {
  max-width: 48em;
  font-size: 14px;
  line-height: 1.8;
}

body:not(.has-result) .principle {
  font-size: 12px;
  line-height: 1.8;
}

body:not(.has-result) .birth-form {
  min-width: 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--product-line);
}

body:not(.has-result) #sample-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 12px;
  white-space: nowrap;
}

.brand-block > .eyebrow,
.module-heading > .label,
.result-header > div > .eyebrow {
  display: none;
}

body .birth-form {
  gap: 18px;
}

body .form-section-heading {
  align-items: center;
  padding-bottom: 6px;
}

body .form-section-heading small {
  display: none;
}

body .form-section-heading > div > span {
  font-size: 19px;
  font-weight: 650;
}

body #birth-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body .birth-form label > span {
  color: #46534d;
  font-size: 13px;
  font-weight: 600;
}

body #birth-form input,
body #birth-form select,
body #birth-form .picker-field,
#auth-form.auth-card input {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--product-line-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  font-size: 16px;
  font-weight: 450;
}

body #birth-form .picker-field {
  gap: 6px;
  line-height: 1.3;
}

body #birth-form select {
  height: 48px;
}

body #birth-form .picker-field > span {
  overflow-wrap: normal;
  white-space: nowrap;
  font-size: 16px;
}

body .picker-field::after {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

body .birth-form .hint {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.7;
}

.birth-advanced {
  margin-top: -6px;
  font-size: 13px;
}

.birth-advanced summary {
  min-height: 36px;
  align-content: center;
  color: var(--product-muted);
  cursor: pointer;
}

.birth-advanced[open] label {
  margin-block: 8px;
}

body .quick-target-panel {
  border: 0;
  border-top: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
}

body .quick-target-panel > summary {
  min-height: 58px;
  padding: 14px 0;
}

body .quick-target-panel summary small {
  display: none;
}

body .quick-target-content {
  grid-template-columns: 1fr;
  padding: 4px 0 0;
  border: 0;
}

body .quick-target-content > button {
  justify-self: start;
  min-width: 120px;
}

body .birth-form .actions button,
#auth-form.auth-card button {
  border-radius: 6px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

body .birth-form .actions button {
  min-height: 48px;
  padding-inline: 10px;
}

body .result-panel {
  padding: 32px 0 48px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.has-result .site-header {
  position: sticky;
  top: 0;
}

.has-result .site-brand {
  visibility: hidden;
  width: 44px;
  height: 44px;
  overflow: hidden;
}

.has-result .site-brand strong { display: none; }

body.has-result .input-panel {
  top: 16px;
  left: max(16px, calc((100vw - 1096px) / 2));
  z-index: 80;
}

body.has-result .profile-orb {
  width: 44px;
  height: 44px;
  min-height: 44px;
  box-shadow: none;
}

body .result-header h2 {
  font-size: 28px;
  line-height: 1.4;
}

body .result-header .subtitle {
  margin-top: 8px;
  color: var(--product-muted);
  font-size: 14px;
}

body .result-tabs {
  top: 76px;
  width: 100%;
  min-height: 58px;
  gap: 16px;
  margin: 14px 0 28px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--product-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body .tab-button {
  min-width: 88px;
  min-height: 44px;
  border-radius: 6px;
  font-weight: 600;
}

body .tab-button.is-active {
  background: var(--product-primary-soft);
  color: var(--product-primary);
}

body .summary-card {
  padding: 12px 0 12px 28px;
  border: 0;
  border-left: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
}

body .chart-card {
  align-self: start;
  min-height: 0;
  aspect-ratio: 1;
  border: 0;
  padding: 4px;
  background: #fff;
}

body .visual-layout { align-items: start; }
body .summary-pair { display: none; }
body .summary-card > p:not(.label) { margin-block: 10px 16px; font-size: 13px; }
body .summary-energy { gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
body .energy-row--three-axis { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 12px 0; }
body .energy-axis-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body .energy-axis { grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
body .energy-axis__label { grid-column: 1; grid-row: 1; }
body .energy-axis__value { grid-column: 2; grid-row: 1; }
body .energy-axis__track { grid-column: 1 / -1; grid-row: 2; }
body .location-confirmation { margin-top: 12px; padding-top: 12px; }
body .location-confirmation small { font-size: 11px; line-height: 1.6; }
body .result-header .subtitle { font-weight: 450; font-family: inherit; }
body .app-shell button:not(.secondary):not(.picker-field):not(.tab-button):not(.profile-orb):not(.text-button):not([data-report-jump]):not([data-home-mode]),
#auth-form [data-auth-submit] {
  border: 1px solid var(--product-primary);
  border-radius: 6px;
  background: var(--product-primary);
  color: #fff;
  box-shadow: none;
}
body .app-shell button:not(.secondary):not(.picker-field):not(.tab-button):not(.profile-orb):not(.text-button):not([data-report-jump]):not([data-home-mode]):hover,
#auth-form [data-auth-submit]:hover { background: var(--product-primary-hover); }
body.has-result .input-panel .profile-orb { border: 1px solid var(--product-line); border-radius: 50%; background: var(--product-surface); box-shadow: none; }
body.has-result .profile-orb img { display: block; width: 30px; height: 30px; object-fit: contain; }
body #account-bar button { border-radius: 6px; }

body .module-heading h3 {
  font-size: 22px;
  font-weight: 650;
}

body .module {
  padding-block: 32px;
}

body .transit-generator,
body .target-city-module {
  padding: 24px 0;
  border: 0;
  border-bottom: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
}

body details.reality-context-panel {
  display: block;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--product-line);
  border-radius: 0;
  background: transparent;
}

.reality-context-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.reality-context-summary::-webkit-details-marker { display: none; }
.reality-context-summary small { color: var(--product-muted); font-weight: 400; }
.reality-context-summary::after { content: "展开"; margin-left: auto; color: var(--product-primary); font-size: 12px; }
details[open] > .reality-context-summary::after { content: "收起"; }
.reality-context-content { display: grid; gap: 18px; padding: 8px 0 24px; }

body .report-bookmark-shell {
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 40px;
}

body .report-bookmarks {
  top: 150px;
  padding: 0 12px 0 0;
  border: 0;
  border-right: 1px solid var(--product-line);
  border-radius: 0;
}

body .report-bookmarks button {
  min-height: 44px;
  font-weight: 550;
  line-height: 1.5;
}

body .report-section {
  scroll-margin-top: 156px;
}

body .report-section h4 {
  font-size: 20px;
  font-weight: 650;
}

body .report-tools,
body .module-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

body .module-actions button,
body .report-tools button {
  width: auto;
  min-height: 44px;
  font-size: 13px;
}

/* Editorial homepage: selected visual 2, 2026-10-23. */
body:not(.has-result):not(.auth-locked) { --product-bg: #fcfcfa; --product-primary: #1b4033; --product-primary-hover: #143429; --product-ink-strong: #171e1a; }
body:not(.has-result):not(.auth-locked) .app-shell { position: relative; width: min(1440px, 100%); padding: 0 32px 24px; }
body:not(.has-result) .site-header { min-height: 78px; border-bottom: 1px solid var(--product-line); background: transparent; }
body:not(.has-result) .site-header > .site-brand { display: inline-flex; }
body:not(.has-result) .site-brand-mark { width: 44px; height: 44px; }
body:not(.has-result) .site-brand strong { font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 22px; font-weight: 600; }
body:not(.has-result) #account-bar { position: static; flex: 0 0 auto; margin-left: auto; }
body:not(.has-result) .input-panel { display: grid; width: min(760px, 100%); gap: 24px; padding: 24px 0 0; }
body:not(.has-result) .brand-block { display: flex; flex-direction: column; align-items: center; gap: 0; max-width: none; padding: 0; text-align: center; }
.home-brand-logo { display: block; width: 112px; height: 112px; object-fit: contain; }
body:not(.has-result) .brand-block h1 { margin: 14px 0 0; font-size: 48px; font-weight: 600; line-height: 1.25; }
body:not(.has-result) .home-brand-caption { margin: 6px 0 0; color: var(--product-muted); font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 18px; line-height: 1.6; }
.home-mode-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; border-bottom: 1px solid var(--product-line-strong); }
body:not(.has-result) .input-panel .home-mode-tabs button { min-width: 0; min-height: 52px; margin: 0 0 -1px; padding: 8px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; box-shadow: none; color: var(--product-muted); font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 20px; font-weight: 600; }
body:not(.has-result) .input-panel .home-mode-tabs button[aria-selected='true'] { border-bottom-color: var(--product-primary); color: var(--product-primary); }
body:not(.has-result) .input-panel .home-mode-tabs button:hover { background: var(--product-surface-subtle); color: var(--product-primary); transform: none; }
.home-form-panel { min-width: 0; width: 100%; }
body:not(.has-result) .birth-form { position: relative; gap: 20px; margin: 0; padding: 0; border: 0; }
body:not(.has-result) #birth-form label { gap: 8px; }
body:not(.has-result) #birth-form label > span { font-size: 17px; font-weight: 500; }
body:not(.has-result) #birth-form input,
body:not(.has-result) #birth-form select,
body:not(.has-result) #birth-form .picker-field { min-width: 0; min-height: 52px; height: 52px; padding-inline: 18px; border-color: #cdd4cf; border-radius: 5px; }
body:not(.has-result) #birth-form input::placeholder { color: #69736d; opacity: 1; }
body:not(.has-result) #birth-form .form-grid { gap: 32px; }
body:not(.has-result) #birth-form .picker-field { justify-content: space-between; }
body:not(.has-result) #birth-form .picker-field > span { font-weight: 450; }
body:not(.has-result) #birth-form .picker-field > img { flex: 0 0 20px; width: 20px; height: 20px; }
body:not(.has-result) #birth-form .picker-field::after { display: none; }
body:not(.has-result) .form-section-heading { min-height: 0; padding: 0; }
body:not(.has-result) .form-section-heading > div { position: absolute; top: 0; left: -176px; display: grid; gap: 12px; }
body:not(.has-result) .form-section-heading > div > span { font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 18px; font-weight: 500; }
body:not(.has-result) .form-section-heading .form-section-number { width: fit-content; padding-right: 16px; border-right: 1px solid var(--product-line-strong); color: var(--product-gold-ink); font-size: 22px; }
body:not(.has-result) #sample-button { position: absolute; top: -6px; right: -176px; min-height: 44px; padding: 6px 0; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
body:not(.has-result) .home-primary-actions { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; }
body:not(.has-result) #birth-form .actions button { position: relative; min-height: 56px; padding-inline: 90px; font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 20px; font-weight: 600; }
body:not(.has-result) .actions button[type='submit'] { grid-column: 1 / -1; }
body:not(.has-result) .actions [data-button-label] { white-space: nowrap; }
.action-cost { position: absolute; right: 14px; display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; border-left: 1px solid rgba(215, 189, 150, .45); color: var(--product-gold); font: 500 12px/1.5 "Avenir Next", "PingFang SC", sans-serif; white-space: nowrap; }
.action-cost img { display: block; width: 18px; height: 18px; }
.actions .secondary > img { position: absolute; right: 14px; width: 16px; height: 16px; }
.actions button[aria-busy='true'] .action-cost, .actions button[aria-busy='true'] > img { visibility: hidden; }
body:not(.has-result) .birth-advanced { margin: 0; }
body:not(.has-result) .birth-advanced > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--product-ink); font-size: 14px; list-style: none; }
body:not(.has-result) .birth-advanced > summary::-webkit-details-marker { display: none; }
body:not(.has-result) .birth-advanced > summary::after { content: ""; flex: 1; height: 1px; margin-left: 8px; background: var(--product-line); }
.birth-advanced > summary img { flex: 0 0 16px; }
.birth-advanced[open] > summary img { transform: rotate(90deg); }
.home-action-arrow { position: absolute; right: 20px; filter: brightness(0) invert(1); }
.home-signoff { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 8px; color: var(--product-muted); font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 13px; }
.home-signoff::before, .home-signoff::after { content: ""; flex: 1; height: 1px; background: var(--product-line-strong); }
.home-signoff::before { margin-right: 16px; }
.home-signoff::after { margin-left: 16px; }
.home-signoff img { display: block; width: 24px; height: 24px; }
body.has-result .home-mode-tabs, body.has-result .home-form-panel, body.has-result .home-signoff { display: none; }
body #birth-form [hidden] { display: none !important; }
body #account-bar .account-menu { position: relative; }
body #account-bar .account-menu > summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 64px; min-height: 64px; padding: 4px; color: var(--product-muted); cursor: pointer; list-style: none; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu > summary img { display: block; width: 28px; height: 28px; }
body #account-bar .account-menu > summary span { margin: 0; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.account-menu-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 90; display: grid; gap: 4px; width: 220px; padding: 12px; border: 1px solid var(--product-line-strong); border-radius: 6px; background: var(--product-surface); }
.account-menu-panel p { margin: 0 0 8px; color: var(--product-muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
body #account-bar .account-menu-panel a, body #account-bar .account-menu-panel button { justify-content: start; width: 100%; min-height: 44px; padding: 8px 10px; text-align: left; font-size: 13px; }
body.has-result #account-bar .account-menu > summary { flex-direction: row; min-height: 44px; gap: 8px; }
body.has-result #account-bar .account-menu > summary img { width: 24px; height: 24px; }
.account-coins { display: none !important; }
body:not(.has-result) #account-bar .account-menu > summary { flex-direction: row; gap: 10px; min-height: 44px; padding: 0; color: var(--product-primary); }
body:not(.has-result) #account-bar .account-menu > summary .account-coins { display: block !important; width: 20px; height: 20px; }
body:not(.has-result) #account-bar .account-menu > summary .account-avatar { order: 3; width: 46px; height: 30px; margin-left: 12px; padding-left: 16px; border-left: 1px solid var(--product-line-strong); }
body:not(.has-result) #account-bar .account-menu > summary span { font-size: 14px; }

@media (max-width: 1199px) {
  body:not(.has-result) .form-section-heading { min-height: 32px; }
  body:not(.has-result) .form-section-heading > div { position: static; display: flex; align-items: center; gap: 12px; }
  body:not(.has-result) #sample-button { position: static; padding: 4px 0; }
}

@media (min-width: 821px) and (max-height: 900px) {
  body:not(.has-result) .input-panel { padding-top: 16px; gap: 18px; }
  .home-brand-logo { width: 80px; height: 80px; }
  body:not(.has-result) .brand-block h1 { margin-top: 8px; font-size: 36px; }
  body:not(.has-result) .home-brand-caption { font-size: 16px; }
}

body.auth-locked { background: var(--product-bg); }
body.auth-locked .auth-gate {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: max(48px, env(safe-area-inset-top)) 24px max(48px, env(safe-area-inset-bottom));
  overflow: visible;
  background: var(--product-bg);
}
#auth-form.auth-card { width: min(400px, 100%); gap: 24px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#auth-form .auth-brand { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; height: auto; margin-bottom: 12px; border-radius: 0; background: transparent; color: var(--product-primary); text-align: center; }
#auth-form .auth-brand img { display: block; width: 112px; height: 112px; object-fit: contain; }
#auth-form.auth-card .auth-brand h1 { margin: 0; color: var(--product-primary); font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 22px; font-weight: 600; line-height: 1.5; }
#auth-form .auth-mode-tabs { display: flex; gap: 24px; padding: 0; border-bottom: 1px solid var(--product-line); border-radius: 0; background: transparent; }
#auth-form.auth-card .auth-mode-tab { flex: 0 0 auto; width: auto; min-width: 52px; min-height: 44px; margin-bottom: -1px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--product-muted); font-size: 15px; font-weight: 500; box-shadow: none; }
#auth-form.auth-card .auth-mode-tab.is-active { border-bottom-color: var(--product-primary); color: var(--product-primary); font-weight: 650; }
#auth-form.auth-card .auth-mode-tab:hover { background: transparent; color: var(--product-primary); transform: none; }
#auth-form .auth-fields { display: grid; gap: 18px; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
#auth-form .auth-field { display: grid; gap: 7px; }
#auth-form .auth-fields label > span { color: var(--product-ink); font-size: 13px; font-weight: 600; }
#auth-form .auth-password-field { position: relative; }
#auth-form.auth-card .auth-password-field input { padding-right: 48px; }
#auth-form.auth-card .auth-password-toggle { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--product-muted); box-shadow: none; }
#auth-form.auth-card .auth-password-toggle:hover { background: var(--product-surface-subtle); transform: none; }
#auth-form .auth-password-toggle img { display: block; width: 20px; height: 20px; opacity: .65; }
#auth-form .captcha-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; }
#auth-form .captcha-challenge { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-left: 12px; border-left: 1px solid var(--product-line); }
#auth-form .captcha-challenge strong { display: block; min-height: 0; border: 0; background: transparent; font-size: 14px; font-weight: 600; line-height: 1.5; }
#auth-form.auth-card [data-action='refresh-captcha'] { flex: 0 0 auto; width: auto; min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: var(--product-primary); font-size: 12px; box-shadow: none; }
#auth-form.auth-card [data-action='refresh-captcha']:hover { background: var(--product-surface-subtle); transform: none; }
#auth-form .auth-token-note { text-align: center; font-size: 12px; line-height: 1.8; }
#auth-form .auth-error { margin: -8px 0; font-size: 13px; font-weight: 500; }
#auth-form input[aria-invalid='true'] { border-color: var(--product-danger); }
#auth-form [data-auth-submit] { min-height: 48px; }
#auth-form.auth-card .auth-error:empty { display: none; }

@media (max-width: 820px) {
  body .app-shell, body:not(.has-result):not(.auth-locked) .app-shell, body.has-result .app-shell { padding-inline: 24px; }
  body:not(.has-result) .input-panel { gap: 24px; padding-top: 28px; }
  body:not(.has-result) .brand-block { position: static; padding: 0; gap: 0; max-width: none; }
  body:not(.has-result) .brand-block h1 { max-width: none; font-size: 40px; }
  body:not(.has-result) .birth-form { padding: 0; border: 0; }
  body .report-bookmark-shell { grid-template-columns: 1fr; gap: 24px; }
  body .report-bookmarks { top: 134px; padding: 6px 0; border-right: 0; border-bottom: 1px solid var(--product-line); }
  body .report-bookmarks button { flex: 0 0 auto; }
  body .report-section { scroll-margin-top: 204px; }
  body .summary-card { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--product-line); }
}

@media (max-width: 600px) {
  body .app-shell, body:not(.has-result):not(.auth-locked) .app-shell, body.has-result .app-shell { padding: 0 18px 32px; }
  body:not(.has-result):not(.auth-locked) .app-shell { padding: 0 24px 28px; }
  .site-header { min-height: 64px; gap: 10px; }
  .site-brand { gap: 8px; }
  .site-brand strong { font-size: 15px; }
  .site-brand-mark { width: 32px; height: 32px; font-size: 18px; }
  body #account-bar { gap: 4px; font-size: 11px; }
  body #account-bar button, body #account-bar a { padding-inline: 8px; font-size: 12px; }
  body:not(.has-result) .site-header { min-height: 64px; }
  body:not(.has-result) .site-brand-mark { width: 30px; height: 30px; }
  body:not(.has-result) .site-brand strong { display: inline; font-size: 17px; }
  body:not(.has-result) .input-panel { padding-top: 28px; gap: 22px; }
  .home-brand-logo { width: 80px; height: 80px; }
  body:not(.has-result) .brand-block h1 { margin-top: 10px; font-size: 32px; }
  body:not(.has-result) .home-brand-caption { margin-top: 6px; font-size: 15px; }
  body:not(.has-result) .input-panel .home-mode-tabs button { min-height: 48px; font-size: 18px; }
  body:not(.has-result) .birth-form { gap: 18px; }
  body:not(.has-result) .form-section-heading > div > span { font-size: 16px; }
  body:not(.has-result) .form-section-heading .form-section-number { font-size: 18px; }
  body:not(.has-result) #sample-button { font-size: 13px; }
  body:not(.has-result) #birth-form .form-grid { gap: 14px; }
  body:not(.has-result) #birth-form label > span { font-size: 13px; }
  body:not(.has-result) #birth-form input, body:not(.has-result) #birth-form select,
  body:not(.has-result) #birth-form .picker-field { min-height: 48px; height: 48px; padding-inline: 12px; }
  body:not(.has-result) #birth-form .picker-field > img { flex-basis: 18px; width: 18px; height: 18px; }
  body:not(.has-result) #account-bar .account-menu > summary { gap: 6px; }
  body:not(.has-result) #account-bar .account-menu > summary .account-avatar { width: 34px; height: 24px; padding-left: 10px; margin-left: 4px; }
  body:not(.has-result) #account-bar .account-menu > summary span { font-size: 12px; }
  body:not(.has-result) #account-bar .account-menu > summary .account-coins { display: none !important; }
  body:not(.has-result) .positioning { font-size: 14px; line-height: 1.8; }
  body:not(.has-result) .principle { font-size: 12px; line-height: 1.8; }
  body .form-section-heading > div > span { font-size: 18px; }
  body .birth-form { gap: 16px; }
  body #birth-form .form-grid { gap: 10px; }
  body #birth-form .picker-field { padding-inline: 10px; }
  body #birth-form .picker-field > span { font-size: 16px; }
  body:not(.has-result) .home-primary-actions { grid-template-columns: minmax(0, 1fr); }
  body:not(.has-result) #birth-form .actions button { min-height: 52px; padding-inline: 82px; font-size: 18px; }
  body:not(.has-result) .actions button:first-child { grid-column: 1 / -1; }
  body.has-result .input-panel { top: 10px; left: 18px; }
  body .result-panel { padding-top: 24px; }
  body .result-header h2 { font-size: 24px; }
  body .result-header .subtitle { font-size: 12px; line-height: 1.8; }
  body .result-actions { display: flex; justify-content: space-between; }
  body .result-tabs { top: 64px; gap: 6px; display: grid; grid-template-columns: repeat(3, 1fr); }
  body .tab-button { min-width: 0; }
  body .report-bookmarks { top: 122px; }
  body .report-section { scroll-margin-top: 190px; }
  body .report p, body .report-body p { font-size: 16px; line-height: 1.95; }
  body .module-heading h3 { font-size: 20px; }
  body .module { padding-block: 26px; }
  body .report-tools { align-items: end; }
  body .report-tools label { flex: 1 1 100%; }
  body .report-tools button, body .module-actions button { flex: 1 1 auto; }
  body .transit-generate-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  body .transit-generate-row button { width: auto; padding-inline: 14px; font-size: 14px; }
  body .reality-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.auth-locked .auth-gate { place-items: start center; padding: max(40px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom)); }
  #auth-form .auth-brand img { width: 96px; height: 96px; }
  #auth-form.auth-card { padding: 0; margin: 0; }
}

@media (max-width: 360px) {
  .site-brand strong { display: none; }
  body:not(.has-result):not(.auth-locked) .app-shell { padding-inline: 18px; }
  body:not(.has-result) #birth-form .form-grid { gap: 10px; }
  body:not(.has-result) #birth-form .picker-field { padding-inline: 8px; }
  body:not(.has-result) #birth-form .picker-field > img { display: none; }
  body .transit-generate-row { grid-template-columns: 1fr; }
  body .transit-generate-row button { width: 100%; }
}

@media (max-width: 370px) {
  body:not(.has-result) .quick-target-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Result reading layout. Keep homepage and authentication styles independent. */
body.has-result {
  --result-header-height: 64px;
  --result-tabs-height: 52px;
  --result-bookmark-height: 56px;
}
body.has-result .site-header { position: sticky; top: 0; min-height: 64px; background: var(--product-bg); }
body.has-result .site-brand { visibility: visible; width: auto; height: auto; overflow: visible; }
body.has-result .site-brand strong { display: inline; font-size: 15px; }
body.has-result .site-brand-mark { width: 30px; height: 30px; }
body.has-result .input-panel { display: none; }
body.has-result #account-bar { flex: 0 0 auto; }
body.has-result .result-panel { margin: 0; padding: 32px 0 0; border: 0; background: transparent; box-shadow: none; scroll-margin-top: var(--result-header-height); }
body.has-result .result-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; margin: 0; padding: 0 0 24px; border: 0; }
body.has-result .result-header h2 { margin: 0; font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 26px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
body.has-result .result-header .subtitle { margin: 8px 0 0; font-size: 12px; line-height: 1.8; }
body.has-result .result-actions { display: block; }
body.has-result .mode-badge { display: none; }
body.has-result .edit-profile-button { gap: 6px; min-height: 44px; padding: 0 8px; border-color: transparent; background: transparent; font-size: 12px; white-space: nowrap; }
body.has-result .result-tabs { position: sticky; z-index: 60; top: var(--result-header-height); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; min-height: 52px; margin: 0; padding: 0; background: var(--product-bg); }
body.has-result .result-tabs .tab-button { width: 100%; min-width: 0; min-height: 52px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--product-muted); font-size: 15px; font-weight: 500; }
body.has-result .result-tabs .tab-button.is-active { border-bottom-color: var(--product-primary); color: var(--product-primary); font-weight: 650; }
body.has-result .tab-panel { padding-top: 28px; }
body.has-result .module { margin: 0; padding: 32px 0; border: 0; border-bottom: 1px solid var(--product-line); border-radius: 0; background: transparent; box-shadow: none; }
body.has-result .tab-panel > .module:first-child { padding-top: 0; }
body.has-result .module-heading { margin: 0 0 20px; }
body.has-result .module-heading h3 { margin: 0; font-family: "Songti SC", "Noto Serif SC", Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.5; }
body.has-result .report-heading { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
body.has-result .report-copy-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: auto; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--product-muted); font-size: 12px; font-weight: 500; }
body.has-result .report-tools { display: grid; grid-template-columns: minmax(0, 220px) auto; justify-content: start; align-items: end; gap: 12px; margin: 0 0 28px; padding: 0; border: 0; background: transparent; }
body.has-result .report-tools label { min-width: 0; }
body.has-result .report-tools label > span { font-size: 12px; font-weight: 500; }
body.has-result .report-tools select { height: 44px; min-height: 44px; padding: 0 12px; font-size: 14px; }
body.has-result .report-tools button, body.has-result .module-actions button { gap: 6px; min-height: 44px; padding: 0 12px; font-size: 12px; }
body.has-result .report-tools button, body.has-result .module-actions button, body.has-result .edit-profile-button { display: inline-flex; align-items: center; justify-content: center; }
body.has-result .module-actions { margin-bottom: 20px; }
body.has-result .module-actions button { flex: 0 0 auto; }
body.has-result .report-bookmark-shell { grid-template-columns: 160px minmax(0, 1fr); gap: 40px; }
body.has-result .report-body { max-width: 68ch; }
body.has-result .report-body p { font-size: 16px; line-height: 1.95; }
body.has-result .report-section { padding-bottom: 24px; scroll-margin-top: calc(var(--result-header-height) + var(--result-tabs-height) + 24px); }
body.has-result .report-section + .report-section { padding-top: 24px; }
body.has-result .report-section h4 { font-size: 19px; font-weight: 600; line-height: 1.6; }
body.has-result .report-bookmarks { top: calc(var(--result-header-height) + var(--result-tabs-height) + 20px); max-height: calc(100dvh - var(--result-header-height) - var(--result-tabs-height) - 40px); overflow-y: auto; padding: 0 16px 0 0; border: 0; border-right: 1px solid var(--product-line); border-radius: 0; background: var(--product-bg); }
body.has-result .report-bookmarks button { min-height: 44px; padding: 8px; font-size: 13px; font-weight: 500; }
body.has-result .report-bookmarks button.is-active { font-weight: 650; }
body.has-result .report-period { margin: -12px 0 24px; color: var(--product-muted); font-size: 12px; line-height: 1.8; }
body.has-result .report-period:empty { display: none; }
body.has-result .report-feedback-card { margin: 28px 0 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--product-line); border-radius: 0; background: transparent; }
body.has-result .report-feedback-card > summary { min-height: 44px; }
body.has-result .report-feedback-card > summary strong { font-size: 13px; }
body.has-result .report-feedback-card > summary span { font-size: 12px; }
body.has-result .collapsible-module { padding: 0; }
body.has-result .collapsible-module > summary { min-height: 64px; margin: 0; padding: 16px 0; }
body.has-result .collapsible-module > summary strong { font-family: inherit; font-size: 16px; font-weight: 550; }
body.has-result .collapsible-module > summary small { display: none; }
body.has-result .collapsible-module[open] > summary { margin-bottom: 16px; }
body.has-result .collapsible-module[open] { padding-bottom: 24px; }
body.has-result .visual-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; }
body.has-result .chart-card { width: 100%; max-width: 440px; margin: 0 auto; background: transparent; }
body.has-result .summary-card { padding: 0; border: 0; background: transparent; }
body.has-result .summary-card h3 { font-size: 18px; line-height: 1.6; }
body.has-result .location-confirmation { padding-bottom: 16px; }
body.has-result .health-card { max-width: 78ch; padding: 0; border: 0 !important; border-radius: 0; background: transparent; }
body.has-result .health-grid { gap: 20px; margin: 0 0 24px; }
body.has-result .health-grid > div { padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--product-line); border-radius: 0; background: transparent; }
body.has-result .health-grid strong { font-size: 15px; font-weight: 500; line-height: 1.9; }
body.has-result .health-card p { font-size: 15px; line-height: 1.9; }
body.has-result .health-card .health-safety { font-size: 12px; font-weight: 400; line-height: 1.8; }
body.has-result .transit-generator { max-width: none; }
body.has-result .transit-generate-row { display: grid; grid-template-columns: minmax(0, 200px) auto; justify-content: start; gap: 12px; }
body.has-result .transit-generate-row input { min-width: 0; height: 48px; font-size: 16px; }
body.has-result .transit-generate-row button { min-height: 48px; padding: 0 20px; font-size: 14px; }
body.has-result .reality-context-panel { margin-top: 16px; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.has-result .reality-context-summary { min-height: 44px; padding: 8px 0; }
body.has-result .reality-context-content { padding: 16px 0 0; }
body.has-result .generation-status { position: relative; margin: 0 0 24px; padding: 16px; overflow: hidden; border: 1px solid var(--product-line); border-radius: 6px; background: var(--product-surface-subtle); color: var(--product-muted); font-size: 14px; line-height: 1.8; }
body.has-result .generation-status[data-state='error'] { color: var(--product-danger); border-color: var(--product-line-strong); background: transparent; }
body.has-result .ai-status::after { display: none; }
body.has-result .generation-status[data-state='loading']::after { content: ""; position: absolute; bottom: 0; left: 0; height: 2px; width: 38%; background: var(--product-primary); animation: qiyao-progress 1.25s ease-in-out infinite alternate; }
@media (max-width: 820px) {
  body.has-result .app-shell { padding-inline: 24px; }
  body.has-result .report-bookmark-shell { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  body.has-result .report-bookmarks { display: flex; align-items: center; top: calc(var(--result-header-height) + var(--result-tabs-height)); z-index: 50; gap: 8px; width: 100%; max-width: 100%; height: var(--result-bookmark-height); max-height: none; overflow-x: auto; overflow-y: hidden; padding: 6px 0; border: 0; border-bottom: 1px solid var(--product-line); overscroll-behavior-x: contain; }
  body.has-result .report-bookmarks button { flex: 0 0 auto; white-space: nowrap; }
  body.has-result .report-section { scroll-margin-top: calc(var(--result-header-height) + var(--result-tabs-height) + var(--result-bookmark-height) + 20px); }
  body.has-result .visual-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
  body.has-result .result-panel { padding-top: 24px; }
  body.has-result .result-header { gap: 8px; padding-bottom: 20px; }
  body.has-result .result-header h2 { font-size: 22px; }
  body.has-result .result-header .subtitle { font-size: 11px; }
  body.has-result .edit-profile-button { padding-inline: 4px; }
  body.has-result .result-tabs { gap: 16px; }
  body.has-result .tab-panel { padding-top: 24px; }
  body.has-result .module-heading h3 { font-size: 22px; }
  body.has-result .report-tools { grid-template-columns: minmax(0, 1fr) auto; }
  body.has-result .health-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  body.has-result .transit-generate-row { grid-template-columns: minmax(0, 1fr) auto; }
  body.has-result .transit-generate-row button { width: auto; padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  body.has-result .generation-status::after { animation: none; }
}

/* Saved reports and the shared, non-sticky natal overview. */
body.has-result .chart-overview { padding: 8px 0 24px; border-bottom: 1px solid var(--product-line); }
body.has-result .chart-overview .visual-layout { align-items: start; gap: 40px; margin: 0; }
body.has-result .chart-overview .chart-card { display: block; max-width: 400px; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
body.has-result .chart-overview h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
body.has-result .chart-overview .chart-card svg { display: block; width: 100%; height: auto; aspect-ratio: 1; }
body.has-result .chart-overview [data-field='dominant'] { margin: 0 0 8px; font-size: 13px; color: var(--product-muted); }
body.has-result .chart-overview .summary-energy { margin-top: 0; }
body.has-result .chart-overview .energy-row--three-axis { padding: 8px 0; }
body.has-result .chart-location { margin-top: 16px; font-size: 12px; color: var(--product-muted); }
body.has-result .chart-location summary { width: fit-content; min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
body.has-result .chart-location .location-confirmation { margin: 0; padding: 0 0 12px; }
body.has-result .saved-report-status { margin: -12px 0 8px; font-size: 12px; color: var(--product-muted); }
body.has-result .saved-report-status:empty { display: none; }
body.has-result .report-version-options { margin: 0 0 24px; }
body.has-result .report-version-options > summary { min-height: 44px; align-content: center; font-size: 13px; color: var(--product-muted); cursor: pointer; }
body.has-result .report-version-options .report-tools { margin: 12px 0; }
body #account-bar .history-entry, body #report-history .history-heading .text-button { min-height: 44px; padding: 8px; border: 0; border-radius: 0; background: transparent; color: var(--product-primary); box-shadow: none; font-size: 13px; white-space: nowrap; }
body #account-bar .history-entry:hover, body #report-history .history-heading .text-button:hover { background: var(--product-surface-subtle); transform: none; }
body.view-history .input-panel, body.view-history #result { display: none; }
.report-history { max-width: 960px; margin: 0 auto; padding: 32px 0 64px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.history-heading h2 { margin: 0; font-size: 26px; }
.history-heading button { min-height: 44px; }
.history-status { color: var(--product-muted); font-size: 14px; line-height: 1.8; }
.history-status:empty { display: none; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--product-line); }
.history-row strong { font-size: 16px; overflow-wrap: anywhere; }
.history-row p { font-size: 13px; color: var(--product-muted); margin: 8px 0; overflow-wrap: anywhere; }
.history-row time { font-size: 12px; color: var(--product-muted); }
.history-row button, [data-history-more] { min-height: 44px; padding: 8px 16px; }
[data-history-more] { margin-top: 24px; }
.archived-report { margin: 24px 0; }
.archived-report .report-body { max-width: 70ch; }
@media (max-width: 600px) {
  body.has-result .chart-overview .visual-layout { gap: 24px; }
  body.has-result .chart-overview .chart-card { max-width: 280px; }
  body.has-result .chart-overview .summary-card { width: 100%; }
  body .history-entry { font-size: 12px; padding-inline: 4px; }
  body.has-result .site-brand strong { display: none; }
  .report-history { padding-top: 24px; }
}
