/* app.css — 暖阳大字报 + 适度光影 */

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

/* hidden 属性必须压过组件自身的 display 声明 */
[hidden] { display: none !important; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink-1);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip; /* 不用 hidden：hidden 会让桌面端 sticky 失效 */
}

body.modal-open { overflow: hidden; }

button, input, textarea {
  font-family: inherit;
  touch-action: manipulation;
}

button { cursor: pointer; background: none; border: none; color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.noscript {
  max-width: 448px; margin: 40px auto; padding: 20px;
  background: #fff; border-radius: var(--r-card); text-align: center; color: var(--ink-2);
}

/* ---------- 品牌行 ---------- */
.brand {
  max-width: 448px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border-radius: 11px;
  box-shadow: var(--sh-chip);
}
.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--ink-1);
  margin: 0;
  line-height: 1.3;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), background var(--dur-1);
}
.btn:active { transform: scale(.96); }
.btn-primary {
  background: var(--ink-1); color: #FFF7EC;
}
.btn-primary:active { background: #000; }
.btn-outline {
  background: #fff; color: var(--ink-1);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-outline:active { background: var(--card-warm); }
.btn-ghost { background: transparent; color: var(--ink-3); font-weight: 500; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px;
  color: var(--ink-2);
  background: #fff;
  box-shadow: var(--sh-chip);
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-1);
}
.icon-btn:active { transform: scale(.92); background: var(--card-warm); }
.icon-btn.round { border-radius: 50%; box-shadow: none; background: var(--bg); }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 结论区 Hero ---------- */
#app {
  max-width: 448px;
  margin: 0 auto;
  padding: 4px 16px calc(104px + var(--safe-b));
}

.hero {
  position: relative;
  background: linear-gradient(168deg, #FFFCF6 0%, var(--bg) 60%, #FFF1DE 100%);
  border: 1px solid #F6E5CC;
  border-radius: 28px;
  padding: 18px 18px 20px;
  overflow: hidden;
  box-shadow: var(--sh-card);
}

.hero-sun {
  position: absolute;
  top: -46px; right: -46px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFC53D, #FF7A00);
  box-shadow: 0 0 54px 14px var(--shadow-sun);
  animation: sun-breathe var(--dur-sun) ease-in-out infinite;
  pointer-events: none;
}
@keyframes sun-breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 46px 10px rgba(255,130,0,.30); }
  50% { transform: scale(1.045); box-shadow: 0 0 64px 18px rgba(255,130,0,.42); }
}

.hero-meta {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap;
  z-index: 1;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 7px 13px;
  background: #fff;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600;
  color: var(--ink-1);
  box-shadow: var(--sh-chip);
  transition: transform var(--dur-1) var(--ease-out);
}
.chip:active { transform: scale(.96); }
.chip-ico { color: var(--accent); flex-shrink: 0; }

.date-nav { display: flex; align-items: center; gap: 4px; }
.date-nav .icon-btn { width: 34px; height: 34px; border-radius: 11px; box-shadow: none; background: rgba(255,255,255,.75); }
.date-text {
  font-size: 13px; font-weight: 700;
  color: var(--ink-2);
  min-width: 108px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-height: 34px;
  padding: 4px 6px;
  border-radius: 11px;
  transition: color var(--dur-1), background var(--dur-1);
}
.date-text.is-other { color: var(--accent); background: rgba(255, 255, 255, .85); box-shadow: var(--sh-chip); }
.date-text:active { transform: scale(.96); }

.hero-kicker {
  position: relative; z-index: 1;
  margin-top: 22px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent);
}

.hero-title {
  position: relative; z-index: 1;
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 10.5vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: .5px;
  color: var(--ink-1);
  text-shadow: 0 2px 20px rgba(255, 150, 30, .22);
}

.hero-sub {
  position: relative; z-index: 1;
  margin-top: 9px;
  font-size: 13.5px;
  color: var(--ink-2);
  min-height: 20px;
  font-variant-numeric: tabular-nums;
}

.cta {
  position: relative; z-index: 1;
  margin-top: 12px;
  min-height: 38px; padding: 8px 17px;
  border-radius: var(--r-pill);
  background: var(--ink-1); color: #FFF7EC;
  font-size: 13.5px; font-weight: 700;
  transition: transform var(--dur-1) var(--ease-out);
}
.cta:active { transform: scale(.96); }

.hero-total {
  position: relative; z-index: 1;
  display: flex; align-items: baseline; gap: 12px;
  margin-top: 20px;
}
.hero-total-num {
  font-family: var(--font-num);
  font-weight: 700;
  font-size: clamp(46px, 14vw, 60px);
  line-height: 1;
  color: var(--sun-2);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.hero-total-num .unit {
  font-family: var(--font-serif);
  font-size: .42em;
  margin: 0 4px 0 2px;
  font-weight: 700;
}
.hero-total-meta {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.45;
}
.tag-theory {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: #F3EAD9;
  color: var(--accent);
  font-size: 11px; font-weight: 700;
}

/* 时间轴 */
.timeline { position: relative; z-index: 1; margin-top: 18px; }
.timeline-track {
  position: relative;
  height: 16px;
  border-radius: 8px;
  background: #F2E7D6;
  overflow: visible;
}
.tl-seg {
  position: absolute; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--sun-1), var(--sun-2));
  box-shadow: 0 0 10px rgba(255, 130, 0, .55);
  border-radius: 8px;
}
.timeline-now {
  position: absolute;
  top: -4px;
  width: 3px; height: 24px;
  background: var(--now);
  border-radius: 2px;
  z-index: 2;
  transition: left .6s var(--ease-out);
}
.timeline-now::after {
  content: '';
  position: absolute; top: -5px; left: -3.5px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--now);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(224, 73, 47, .4);
}
.timeline-labels {
  display: flex; justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- 内容块 ---------- */
.block {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 17px 17px 16px;
  margin-top: 14px;
  box-shadow: var(--sh-card);
}
.block-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 700;
  letter-spacing: .3px;
}
.block-ico {
  width: 30px; height: 30px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ico-sun { background: #FFF0D9; color: #E88A00; }
.ico-warm { background: #FFE9DC; color: var(--accent); }
.ico-cool { background: #E5F4EC; color: #1F8A56; }

.block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.fold-btn {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 6px 4px 6px 12px;
  border-radius: var(--r-pill);
  color: var(--ink-3);
  font-size: 13px;
}
.fold-btn:active { background: var(--bg); }
.fold-summary {
  font-size: 12.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.fold-chevron { transition: transform var(--dur-2) var(--ease-out); }
.fold-btn[aria-expanded="true"] .fold-chevron { transform: rotate(180deg); }
.fold-body { margin-top: 14px; }
.fold-body[hidden] { display: none; }

.field { padding: 14px 0; border-top: 1px dashed var(--line); }
.field:first-child { padding-top: 0; border-top: none; }
.field:last-child { padding-bottom: 2px; }
.field-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 13.5px; font-weight: 700;
  color: var(--ink-1);
  margin-bottom: 10px;
}
.field-label .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }
.field-label output {
  font-size: 14px; color: var(--sun-2); font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.field-desc { font-size: 12px; color: var(--ink-3); margin-top: 9px; line-height: 1.55; }
.field-desc.center { text-align: center; }

/* ---------- 时段卡 ---------- */
.period-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-warm);
  border: 1px solid #F7ECDC;
  border-radius: var(--r-block);
  padding: 13px 14px;
  margin-top: 10px;
}
.period-card:first-child { margin-top: 0; }
.period-ico {
  width: 42px; height: 42px;
  border-radius: 14px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #E88A00;
  box-shadow: var(--sh-chip);
  flex-shrink: 0;
}
.period-meta { flex: 1; min-width: 0; }
.period-time {
  font-family: var(--font-num);
  font-size: 17px; font-weight: 700;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}
.period-name { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.period-right { text-align: right; flex-shrink: 0; }
.period-peak { font-size: 13px; font-weight: 800; }
.period-track {
  width: 64px; height: 6px;
  border-radius: 3px;
  background: #F2E7D6;
  overflow: hidden;
  margin-top: 6px;
  margin-left: auto;
}
.period-fill { height: 100%; border-radius: 3px; }

.empty-state {
  text-align: center;
  padding: 26px 14px;
  background: var(--card-warm);
  border-radius: var(--r-block);
  border: 1px dashed var(--line);
}
.empty-state .icon { font-size: 15px; font-weight: 700; color: var(--accent); letter-spacing: 2px; }
.empty-state .text { font-size: 13.5px; color: var(--ink-2); margin-top: 7px; line-height: 1.6; }

/* ---------- 晾晒 ---------- */
.laundry {
  display: flex; align-items: center; gap: 13px;
  background: linear-gradient(135deg, #FFF6E7, #FFEEDA);
  border-radius: var(--r-block);
  padding: 14px 15px;
}
.laundry-ico {
  width: 46px; height: 46px;
  border-radius: 15px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #E88A00;
  flex-shrink: 0;
  box-shadow: var(--sh-chip);
}
.laundry-title { font-size: 15px; font-weight: 800; }
.laundry-stars { color: var(--sun-2); letter-spacing: 2px; font-size: 15px; }
.laundry-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; line-height: 1.5; }

/* ---------- 罗盘 ---------- */
.compass-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
.compass {
  position: relative;
  width: 218px; height: 218px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFFDF9, #FBF1E1);
  box-shadow: inset 0 2px 10px rgba(31, 26, 20, .05);
  user-select: none; -webkit-user-select: none;
}
.compass-ring {
  position: absolute; inset: 11px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  pointer-events: none;
}
.compass-center {
  position: absolute; top: 50%; left: 50%;
  width: 13px; height: 13px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--ink-1);
  box-shadow: 0 0 0 4px rgba(31, 26, 20, .10);
  z-index: 3;
}
.compass-needle {
  position: absolute; top: 50%; left: 50%;
  width: 3.5px; height: 76px;
  margin-left: -1.75px; margin-top: -76px;
  transform-origin: 50% 76px;
  transition: transform .5s var(--ease-spring);
  z-index: 2;
}
.compass-needle::before {
  content: '';
  display: block;
  width: 0; height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 25px solid var(--now);
  margin-left: -7.25px;
  filter: drop-shadow(0 1px 3px rgba(224, 73, 47, .35));
}
.compass-needle::after {
  content: '';
  display: block;
  width: 3.5px; height: 48px;
  margin-left: -0.5px;
  background: linear-gradient(var(--ink-2), rgba(92, 85, 77, .15));
  border-radius: 2px;
}
.compass-dir {
  position: absolute;
  width: 44px; height: 34px;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--ink-3);
  font-size: 12.5px; font-weight: 600;
  box-shadow: var(--sh-chip);
  z-index: 4;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur-1), color var(--dur-1), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1);
}
.compass-dir:active { transform: scale(.93); }
.compass-dir[aria-pressed="true"] {
  background: var(--sun-grad);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 107, 0, .4);
}
.dir-readout {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.dir-readout strong { color: var(--sun-2); font-size: 15px; }

/* ---------- 滑杆 ---------- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  background: transparent;
  outline-offset: 4px;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: #F2E7D6;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px; height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--sun-grad);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 0, .4);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: #F2E7D6;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--sun-2);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 0, .4);
}

/* ---------- 分段控件 ---------- */
.seg {
  display: flex;
  background: var(--bg);
  border-radius: var(--r-pill);
  padding: 4px;
  gap: 2px;
}
.seg button {
  flex: 1;
  min-height: 38px;
  border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-3);
  transition: background var(--dur-1), color var(--dur-1), box-shadow var(--dur-1);
}
.seg button[aria-checked="true"] {
  background: #fff;
  color: var(--sun-2);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(31, 26, 20, .10);
}

/* ---------- 趣味提示 ---------- */
.fun-tip {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 18px;
  padding: 0 18px;
}

/* ---------- 分享悬浮 ---------- */
.share-dock {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(16px + var(--safe-b));
  display: flex; justify-content: center;
  pointer-events: none;
  z-index: 50;
}
.btn-share {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px;
  padding: 14px 34px;
  border-radius: var(--r-pill);
  background: var(--sun-grad);
  color: #fff;
  font-size: 16px; font-weight: 800;
  letter-spacing: 1px;
  box-shadow: var(--sh-float);
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1);
}
.btn-share:active { transform: scale(.95); box-shadow: 0 4px 14px rgba(255, 107, 0, .35); }

/* ---------- 弹窗 ---------- */
.overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(31, 26, 20, .38);
  z-index: 100;
  align-items: flex-end; justify-content: center;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.overlay.open { display: flex; }
.overlay-panel {
  width: 100%;
  max-width: 448px;
  max-height: 76vh;
  background: #fff;
  border-radius: 26px 26px 0 0;
  padding: 20px 18px calc(22px + var(--safe-b));
  display: flex; flex-direction: column;
  animation: panel-up var(--dur-2) var(--ease-out);
  overscroll-behavior: contain;
}
@keyframes panel-up { from { transform: translateY(40%); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

.overlay-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.overlay-head h2 { font-size: 17px; font-weight: 800; }

.search-wrap { position: relative; flex-shrink: 0; margin-bottom: 12px; }
.search-ico {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.city-search {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  font-size: 15px;
  color: var(--ink-1);
  transition: border-color var(--dur-1), background var(--dur-1);
  -webkit-appearance: none;
  appearance: none;
}
.city-search:focus { border-color: var(--sun-2); background: #fff; }
.city-search::placeholder { color: var(--ink-3); }

.city-browser { display: flex; flex: 1; min-height: 0; }
.city-browser.searching .province-nav { display: none; }
.province-nav {
  width: 104px; flex-shrink: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line-soft);
  margin-right: 8px;
  padding-right: 2px;
}
.province-item {
  display: block; width: 100%;
  text-align: left;
  padding: 11px 10px;
  font-size: 13.5px;
  color: var(--ink-3);
  border-radius: 10px;
  line-height: 1.3;
  transition: background var(--dur-1), color var(--dur-1);
}
.province-item[aria-pressed="true"] { color: var(--sun-2); font-weight: 800; background: #FFF4E4; }

.city-list {
  flex: 1; min-width: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.city-section {
  font-size: 11px; font-weight: 800;
  color: var(--ink-3);
  letter-spacing: 1px;
  padding: 8px 10px 4px;
}
.city-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%;
  text-align: left;
  min-height: 46px;
  padding: 11px 13px;
  font-size: 14.5px; font-weight: 600;
  color: var(--ink-1);
  border-radius: 12px;
  content-visibility: auto;
  contain-intrinsic-size: auto 46px;
  transition: background var(--dur-1);
}
.city-item:active { background: var(--bg); }
.city-item[aria-current="true"] { background: #FFF4E4; color: var(--sun-2); }
.city-prov { font-size: 11px; color: var(--ink-3); font-weight: 400; flex-shrink: 0; }

.copy-textarea {
  width: 100%;
  height: 210px;
  padding: 13px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-1);
  resize: none;
  outline-offset: 2px;
}

/* ---------- 轻引导 ---------- */
.onb {
  position: fixed; inset: 0;
  background: rgba(31, 26, 20, .45);
  z-index: 120;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0 16px calc(28px + var(--safe-b));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.onb[hidden] { display: none; }
.onb-card {
  width: 100%; max-width: 416px;
  background: #fff;
  border-radius: 22px;
  padding: 20px 20px 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
  animation: panel-up var(--dur-2) var(--ease-out);
}
.onb-count { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--accent); }
.onb-card h2 { font-size: 19px; font-weight: 800; margin-top: 6px; }
.onb-desc { font-size: 13.5px; color: var(--ink-2); margin-top: 7px; line-height: 1.6; }
.onb-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px;
}

.pulse-target { animation: pulse-ring 1.4s ease-out infinite; }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, .55); }
  70% { box-shadow: 0 0 0 14px rgba(255, 107, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(31, 26, 20, .9);
  color: #FFF7EC;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600;
  z-index: 200;
  max-width: 82vw;
  text-align: center;
  line-height: 1.5;
  pointer-events: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: toast-in var(--dur-2) var(--ease-spring);
}
.toast[hidden] { display: none; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.88); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- 轨迹画布 ---------- */
#sunpath-canvas {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 6px auto 0;
  height: auto;
  aspect-ratio: 1;
}

/* ---------- 轻引导脉冲目标 ---------- */
#loc-chip.pulse-target, #btn-share.pulse-target, .compass.pulse-target {
  position: relative; z-index: 130;
}

/* ---------- 响应式 ---------- */
@media (max-width: 359px) {
  .hero-title { font-size: 31px; }
  .date-text { min-width: 92px; font-size: 12px; }
  .compass { width: 200px; height: 200px; }
  .btn-share { padding: 13px 26px; font-size: 15px; }
}

/* ---------- 桌面端 ---------- */
@media (min-width: 960px) {
  .brand {
    max-width: 1120px;
    padding: 26px 24px 14px;
  }
  .brand-name { font-size: 17px; }

  #app {
    max-width: 1120px;
    padding: 4px 24px 96px;
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    column-gap: 18px;
    row-gap: 14px;
    align-items: start;
  }
  /* 左栏：结论区 sticky 常驻，右栏滚动明细 */
  .hero {
    grid-column: 1;
    grid-row: 1 / span 5;
    position: sticky;
    top: 14px;
    align-self: start;
  }
  #app > .block {
    grid-column: 2;
    margin-top: 0;
    margin-bottom: 0;
  }
  .fun-tip {
    grid-column: 2;
    margin-top: 4px;
    text-align: left;
    padding-left: 4px;
  }
  .hero-title { font-size: clamp(38px, 3vw, 46px); }
  .hero-total-num { font-size: clamp(52px, 4.4vw, 66px); }

  /* 桌面弹窗不再贴底居中一条，改为底部居中且更宽 */
  .overlay-panel {
    max-width: 560px;
    border-radius: 26px;
    margin-bottom: 24px;
    max-height: 80vh;
    box-shadow: 0 24px 64px rgba(31, 26, 20, .28);
  }
  .onb-card { max-width: 480px; }

  /* 桌面浮起的分享按钮稍靠上，避免压住底栏 */
  .share-dock { bottom: 28px; }
}

/* 指针设备的悬停反馈（触屏无 hover 不受影响） */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #3A342C; }
  .btn-outline:hover { background: var(--card-warm); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
  .btn-ghost:hover { background: var(--bg); color: var(--ink-1); }
  .btn-share:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 14px 34px rgba(255, 107, 0, .45);
  }
  .btn-share:active { transform: translateY(0) scale(.97); }
  .cta:hover { background: #3A342C; }
  .icon-btn:hover { background: var(--card-warm); color: var(--ink-1); }
  .chip:hover { box-shadow: 0 3px 12px rgba(31, 26, 20, .12); }
  .date-text:hover { color: var(--accent); }
  .compass-dir:hover:not([aria-pressed="true"]) { background: var(--card-warm); color: var(--ink-1); }
  .seg button:hover:not([aria-pressed="true"]) { color: var(--ink-1); background: rgba(255, 255, 255, .6); }
  .fold-btn:hover { background: var(--bg); color: var(--ink-1); }
  .city-item:hover { background: var(--bg); }
  .province-item:hover { color: var(--ink-1); background: var(--bg); }
  .period-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(31, 26, 20, .09);
  }
}

.period-card { transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-sun { animation: none; }
}
