:root { --bg: #fbf3e8; --card: #fffdf9; --ink: #2a1a12; --muted: #7a6254; --line: #ead9c8; --red: #b42318; --red-dark: #8f1b12; --soft: #fdeedd; --green: #176b45; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif; }
main.app-main { display: block; width: 100%; max-width: 560px; margin: 0 auto; padding: 14px 16px 28px; box-sizing: border-box; }
.hero-card { padding: 16px; margin-bottom: 12px; border: 1px solid #f0d4b8; border-radius: 18px; background: linear-gradient(135deg, #fff4e6 0%, #fffdf9 72%); box-shadow: 0 8px 24px rgba(120, 66, 24, 0.08); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hero-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; }
.today-pill { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--red-dark); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero-sub { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.panel { padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 6px 18px rgba(120, 66, 24, 0.05); }
.input-panel { padding-bottom: 14px; }
.field-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 800; }
.date-input { display: block; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #d8c3b0; border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.preset-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.preset-chip { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--red-dark); font-size: 14px; font-weight: 800; cursor: pointer; }
.preset-chip.is-active { border-color: var(--red); background: var(--red); color: #fff; }
.result-card { padding: 16px; margin-bottom: 12px; border: 1px solid #f0d4b8; border-radius: 18px; background: linear-gradient(135deg, #fff4e6 0%, #fffdf9 70%); box-shadow: 0 8px 24px rgba(120, 66, 24, 0.08); }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.result-main { min-width: 0; }
.result-kicker { margin: 0 0 5px; color: var(--muted); font-size: 13px; font-weight: 700; }
.big-age { display: flex; align-items: baseline; gap: 6px; }
.zhou-num { font-size: 44px; line-height: 1; font-weight: 900; color: var(--red); font-variant-numeric: tabular-nums; }
.age-unit { font-size: 15px; font-weight: 800; }
.xu-box { flex: 0 0 auto; min-width: 78px; padding: 10px 12px; border-radius: 14px; background: var(--soft); text-align: center; }
.xu-num { display: block; font-size: 28px; line-height: 1.05; font-weight: 900; color: #9a5b00; font-variant-numeric: tabular-nums; }
.xu-label { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.result-note { min-height: 20px; margin: 12px 0; color: #5f4a3d; font-size: 13px; line-height: 1.55; }
.copy-btn { display: block; width: 100%; min-height: 48px; border: 0; border-radius: 14px; background: var(--red); color: #fff; font-size: 16px; font-weight: 900; cursor: pointer; }
.copy-btn:active { transform: scale(0.99); }
.copy-status { min-height: 18px; margin: 8px 0 0; color: var(--green); font-size: 12px; line-height: 1.4; text-align: center; }
.year-panel { padding-bottom: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-title { margin: 0; font-size: 16px; font-weight: 900; }
.year-select { width: 132px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 700; }
.year-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.year-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.year-card.is-active { border-color: var(--red); background: #fff5ef; }
.year-card-year { font-size: 16px; font-weight: 900; color: var(--red-dark); font-variant-numeric: tabular-nums; }
.year-card-age { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.year-card-sub { color: var(--muted); font-size: 11px; line-height: 1.35; }
.micro-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.footnote { margin: 4px 0 0; padding: 10px 4px 0; border-top: 1px dashed var(--line); color: #8a7466; font-size: 11px; line-height: 1.55; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (min-width: 520px) { .preset-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } .year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
