:root { color-scheme: light; --ink: #17243b; --muted: #758196; --purple: #5543ed; --line: #e7eaf1; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: #f4f5f8; color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; }
button { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #a89cfa; outline-offset: 4px; }
.page { max-width: 1000px; padding: 40px 24px 24px; margin: auto; }
.page-header { text-align: center; margin-bottom: 30px; }
.eyebrow { color: var(--muted); font-size: 12px; letter-spacing: 2px; font-weight: 600; }
h1 { font-size: clamp(30px, 4.5vw, 46px); line-height: 1.3; margin: 10px 0 5px; letter-spacing: -1px; }
h1 span { font-size: .86em; }
.page-header > p { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.status-pill { display: inline-block; padding: 5px 13px; border-radius: 30px; background: #e9edf5; color: #64738b; font-size: 12px; }
.update-note { display: flex; align-items: center; gap: 14px; max-width: 650px; margin: 20px auto 0; padding: 15px 18px; background: #edf6ef; border: 1px solid #d9e9dc; border-radius: 16px; text-align: left; animation: note-arrive .55s ease-out both; }
.update-mascot { display: block; flex-shrink: 0; width: 96px; height: 96px; object-fit: contain; transform-origin: bottom center; }
.update-mascot.is-cheering { animation: cow-cheer .6s ease; }
.update-copy { flex: 1; min-width: 0; }
.update-tag { color: #587c60; font-size: 10px; letter-spacing: 1px; }
.update-copy p { color: #345a3c; font-weight: 600; font-size: 13px; line-height: 1.6; margin: 2px 0; }
.update-reply { display: block; color: #718c76; font-size: 11px; min-height: 18px; }
.cow-condition { display: flex; align-items: center; gap: 9px; margin: 6px 0 3px; color: #487652; font-size: 11px; font-weight: 600; }
.cow-meter { display: block; width: 82px; height: 6px; overflow: hidden; background: #dce9df; border-radius: 6px; }
.cow-meter > span { display: block; width: 48%; height: 100%; background: #76a97f; border-radius: inherit; transition: width .6s ease, background .3s ease; }
.cow-meter[data-stage="thin"] > span { background: #d5a153; }
.cow-meter[data-stage="full"] > span { background: #d28b68; }
.cow-rules { display: block; color: #66856d; font-size: 10px; margin-bottom: 4px; }
.update-button { flex-shrink: 0; border: 1px solid #c9dfce; border-radius: 24px; background: #fff; color: #487652; font-size: 12px; padding: 8px 12px; box-shadow: 0 2px 0 #d3e4d6; }
.update-button:hover { background: #f8fff9; }
.update-button:active { transform: translateY(2px); box-shadow: none; }
.update-button:disabled { cursor: default; color: #88998b; background: #f3f7f3; box-shadow: none; transform: none; }
.cheer-effects { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 100; }
.cheer-particle { position: absolute; display: block; font-size: 23px; line-height: 1; animation: cheer-fly 1.1s cubic-bezier(.16,.7,.4,1) forwards; will-change: transform, opacity; }
@keyframes note-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cow-cheer { 0%, 100% { transform: rotate(0) scale(1); } 25% { transform: rotate(-8deg) scale(1.08); } 65% { transform: rotate(6deg) scale(1.03); } }
@keyframes cheer-fly { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--spin)) scale(.8); } }
.card { background: white; border-radius: 22px; box-shadow: 0 6px 18px #17243b07; border: 1px solid #fff; }
.settings-card, .calculator-card { padding: 26px; margin-bottom: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 21px; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; margin: 0; }
.section-heading p { font-size: 13px; margin: 4px 0 0; color: var(--muted); }
.text-link { color: var(--purple); font-size: 13px; }
.text-link:hover { text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
label { display: block; font-size: 13px; font-weight: 600; }
input, select { display: block; width: 100%; height: 46px; min-width: 0; padding: 9px 12px; margin-top: 8px; border: 1px solid #dfe5ee; border-radius: 10px; background: #f8f9fc; color: var(--ink); outline: none; font-size: 14px; }
input:focus, select:focus { border-color: #a698fa; box-shadow: 0 0 0 3px #5543ed10; }
small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 6px; }
.muted { color: var(--muted); }
.preset-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0; font-size: 12px; }
.chip { border: 1px solid var(--line); background: white; border-radius: 7px; padding: 5px 11px; font-size: 12px; color: #697489; }
.chip:hover, .chip.active { background: #f0edff; border-color: #c4bafa; color: var(--purple); }
.more-settings { border-top: 1px dashed var(--line); padding-top: 14px; }
summary { font-size: 13px; color: #56627a; }
summary .muted { margin-left: 5px; font-size: 11px; }
.extra-fields { margin-top: 16px; }
.form-actions { display: flex; gap: 15px; align-items: center; margin-top: 20px; }
.button { border: none; border-radius: 10px; font-size: 13px; font-weight: 600; padding: 11px 20px; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.primary { background: var(--purple); color: white; }
.primary:hover { background: #4735d5; }
.button:disabled { background: #e4e0f7; color: #978daf; cursor: default; }
.secondary { background: #f1edff; color: var(--purple); }
.secondary:hover { background: #e8e1ff; }
.feedback { font-size: 12px; color: var(--muted); }
.feedback.success { color: #168852; }
.feedback.error { color: #c33737; }
.dashboard { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 24px; }
.life-guide-card { display: grid; grid-template-columns: minmax(0, 1fr) 192px; align-items: center; gap: 32px; padding: 28px; margin-bottom: 24px; background: linear-gradient(115deg, #fff8ed, #f3f9f1); border-color: #e5eada; }
.life-guide-eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: #557155; }
.life-guide-eyebrow span { font-size: 21px; }
.life-guide-copy h2 { font-size: clamp(21px, 2.8vw, 28px); line-height: 1.45; color: #2d4838; }
.life-guide-intro { color: #58685e; font-size: 14px; line-height: 1.9; margin: 11px 0; }
.life-guide-code { margin: 0; padding: 12px; background: #fff; border: 1px solid #e6ebdf; border-radius: 16px; text-align: center; }
.life-guide-code img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.life-guide-code figcaption { margin-top: 9px; }
.life-guide-code strong { display: block; font-size: 12px; color: #385741; }
.life-guide-code figcaption > span { display: block; margin: 5px 0; font-size: 10px; line-height: 1.7; color: #687569; }
.life-guide-code .text-link { font-size: 11px; color: #315f45; }
.countdown-card { position: relative; overflow: hidden; text-align: center; padding: 29px 26px 22px; }
.countdown-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; }
.retirement-card::before { background: linear-gradient(90deg, #619aff, #5543ed); }
.work-card::before { background: linear-gradient(90deg, #ffad59, #fa6666); }
.countdown-card h2 { font-size: 16px; margin: 5px 0 16px; color: #56627a; }
.large-number { font-size: clamp(28px, 4vw, 46px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.35; margin: 12px 0; letter-spacing: -.7px; }
.large-number .unit { font-weight: 400; color: var(--muted); font-size: 15px; margin: 0 6px 0 2px; }
.purple { color: var(--purple); }
.orange { color: #ef9149; }
.green { color: #1cba69; }
.countdown-card > p { font-size: 12px; margin: 8px 0; }
.fine-print { font-size: 12px; color: var(--muted); line-height: 1.7; }
.fine-print strong { color: #596782; font-variant-numeric: tabular-nums; }
.retirement-card { display: flex; flex-direction: column; justify-content: center; }
.progress-label { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); margin: 16px 0 6px; }
.progress-track { height: 10px; border-radius: 10px; overflow: hidden; background: #edf0f6; }
#progress-bar { height: 100%; border-radius: inherit; background: #22c56c; transition: width 1s linear; }
.today-control { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 17px; }
.today-control select { width: auto; max-width: 70%; margin: 0; height: 31px; padding: 2px 7px; border: 0; font-size: 11px; }
.tag, .small-tag { display: inline-block; color: #8b80b9; font-size: 11px; background: #f1edfb; border-radius: 6px; padding: 4px 9px; }
.calculator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.category-field { margin-top: 16px; }
.calculator-result { padding: 22px 24px; border: 1px solid #e7e0ff; border-radius: 15px; background: linear-gradient(130deg, #f7f4ff, #fcfbff); }
.calculator-result > .muted { font-size: 12px; }
.result-date { font-size: clamp(21px, 3vw, 30px); color: var(--purple); font-weight: 800; margin: 5px 0; }
.calculator-result p { margin: 5px 0; font-size: 13px; }
.calculator-result .button { margin-top: 13px; }
.calculator-result .fine-print { font-size: 11px; }
.policy-details { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.policy-details p { font-size: 12px; color: var(--muted); }
.little-joys { margin-top: 30px; }
.little-joys .section-heading { margin-left: 2px; }
.joy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.joy-grid { align-items: start; }
.joy-card { padding: 22px; }
.joy-icon { font-size: 23px; margin-bottom: 9px; }
.medium-number { font-size: 25px; font-weight: 750; font-variant-numeric: tabular-nums; margin: 9px 0; }
.joy-card .fine-print { margin: 7px 0; font-size: 11px; }
.small-tag { background: #f3f5f9; color: #8c96a7; font-size: 10px; }
.salary-card .button { font-size: 11px; padding: 9px 12px; }
#salary-panel { margin-top: 16px; }
.salary-card label { margin-top: 12px; }
.income-label { color: var(--muted); font-size: 11px; margin: 12px 0 0; }
.salary-card .medium-number { margin: 2px 0 10px; }
.salary-card .small-tag { margin-top: 12px; }
.privacy-bar { display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line); margin-top: 26px; padding: 16px 0 0; }
.privacy-bar p { color: var(--muted); font-size: 11px; margin: 0; flex: 1; }
.privacy-bar .chip { flex-shrink: 0; }
.quote-text { font-weight: 600; font-size: 15px; line-height: 1.7; min-height: 51px; margin: 11px 0 6px; }
.quote-card .button { margin-top: 10px; font-size: 11px; padding: 8px 12px; }
footer { margin-top: 30px; display: flex; justify-content: space-between; color: #9ba5b5; font-size: 11px; gap: 12px; }
footer a:hover { color: var(--purple); }
@media (max-width: 680px) {
    .page { padding: 26px 16px 20px; }
    .page-header { margin-bottom: 24px; }
    .update-note { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 8px 10px; padding: 14px; }
    .update-mascot { width: 80px; height: 80px; align-self: start; margin-top: 8px; }
    .update-reply { min-height: 36px; }
    .update-button { grid-column: 2; justify-self: start; }
    .settings-card, .calculator-card { padding: 20px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .form-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .form-grid > label:first-child { grid-column: 1 / -1; }
    .extra-fields { grid-template-columns: 1fr; }
    .dashboard, .calculator-grid, .joy-grid { grid-template-columns: 1fr; gap: 16px; }
    .life-guide-card { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
    .life-guide-code { display: flex; align-items: center; gap: 14px; padding: 12px; text-align: left; }
    .life-guide-code img { width: 116px; flex-shrink: 0; }
    .life-guide-code figcaption { margin-top: 0; min-width: 0; }
    .life-guide-code strong { font-size: 11px; }
    .countdown-card { padding: 25px 22px; }
    .large-number { font-size: 38px; }
    .form-actions { flex-wrap: wrap; gap: 9px; }
    .form-actions .primary { flex-shrink: 0; }
    .calculator-result { padding: 20px; }
    .joy-card { padding: 20px; }
    .quote-text { min-height: 0; }
    footer { flex-direction: column; align-items: center; }
    .privacy-bar { align-items: flex-start; flex-direction: column; gap: 10px; }
}
@media (max-width: 360px) {
    .life-guide-code { flex-direction: column; gap: 8px; text-align: center; }
    .life-guide-code img { width: 160px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before { transition: none !important; animation: none !important; } }
