:root { color-scheme: light; --bg:#f2f4f8; --panel:#fff; --text:#222633; --muted:#697183; --line:#e5e8ef; --accent:#5966ee; --soft:#eef0ff; --danger:#ba3546; }
* { box-sizing:border-box; }
html { min-width:280px; scroll-behavior:smooth; }
body { margin:0; color:var(--text); background:radial-gradient(ellipse at 80% 0, #e8eafd 0, transparent 50%),var(--bg); font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans SC","PingFang SC",sans-serif; font-size:14px; line-height:1.6; }
button,input,select { font:inherit; }
button,select { cursor:pointer; }
button { color:inherit; }
button { transition:background .18s,box-shadow .18s,transform .18s; }
button:active { transform:translateY(1px); }
:focus-visible { outline:3px solid #9ca6ff; outline-offset:3px; }
.page-shell { max-width:1140px; padding:0 32px; margin:auto; }
.topbar { min-height:94px; display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:11px; font-size:14px; font-weight:700; letter-spacing:-.02em; }
.brand-mark { width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background:linear-gradient(145deg,#4557db,#7f8cff); color:white; font-size:19px; box-shadow:0 6px 18px #5966ee24; }
.brand-sub { display:block; color:var(--muted); font-size:11px; font-weight:400; letter-spacing:0; }
.language-control { display:flex; align-items:center; gap:8px; background:#ffffffab; border:1px solid var(--line); padding:6px 10px; border-radius:11px; color:var(--muted); }
.language-control select { border:0; color:var(--text); background:transparent; max-width:140px; min-height:27px; }
.language-status { margin:0; color:var(--danger); }
.language-status:not(:empty) { padding:10px 0; }
.hero { padding:46px 0 32px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.eyebrow { display:flex; align-items:center; gap:8px; font-size:10px; color:var(--accent); font-weight:750; letter-spacing:.14em; }
.dot { width:6px; height:6px; border-radius:50%; background:var(--accent); }
h1 { margin:10px 0; font-size:clamp(30px,4vw,43px); letter-spacing:-.045em; line-height:1.2; font-weight:760; }
.intro { margin:0; font-size:15px; color:var(--muted); max-width:640px; }
.birth-jump { display:inline-flex; gap:8px; align-items:center; color:var(--accent); text-decoration:none; font-size:12px; font-weight:600; margin-top:16px; }
.birth-jump:hover { text-decoration:underline; }
.calendar-art { position:relative; width:92px; height:98px; border:1px solid #d8dcf5; background:#ffffffa8; border-radius:17px; transform:rotate(8deg); box-shadow:0 10px 30px #5966ee12; margin-right:15px; flex-shrink:0; }
.calendar-top { height:28px; background:#e3e6ff; border-radius:16px 16px 0 0; display:flex; justify-content:space-around; }
.calendar-top i { width:5px; height:16px; background:#98a0ec; margin-top:-7px; border-radius:4px; }
.calendar-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding:10px 14px; align-items:center; justify-items:center; }
.calendar-grid span { width:5px; height:5px; background:#d1d6eb; border-radius:50%; }
.calendar-grid b { font-size:11px; line-height:17px; height:17px; width:17px; text-align:center; background:var(--accent); color:white; border-radius:5px; }
.calendar-arrow { position:absolute; right:-18px; bottom:5px; width:34px; height:34px; background:#daf2e8; color:#337663; border:4px solid var(--bg); border-radius:50%; display:grid; place-items:center; font-size:17px; }
.count-settings { display:grid; grid-template-columns:1fr 1.3fr; align-items:center; gap:14px 28px; padding:22px 25px 16px; background:#ffffffa1; border:1px solid #ffffff; border-radius:20px; box-shadow:0 4px 20px #23304a03; }
h2,p { overflow-wrap:anywhere; }
.count-heading h2 { font-size:15px; margin:0 0 3px; font-weight:700; }
.count-heading p,.card-heading p { margin:0; color:var(--muted); font-size:12px; }
.count-choices { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0; margin:0; border:0; min-width:0; }
.count-choice { display:flex; gap:8px; align-items:center; padding:10px 12px; background:#fff; border:1px solid var(--line); border-radius:12px; cursor:pointer; }
.count-choice:has(:checked) { border-color:#7c86ed; background:#f4f5ff; box-shadow:0 0 0 1px #7c86ed15; }
.count-choice input { accent-color:var(--accent); margin:0; flex-shrink:0; width:16px; height:16px; }
.count-choice strong { display:block; font-size:12px; font-weight:650; }
.count-choice small { display:block; color:var(--muted); font-size:10px; }
.count-example { grid-column:1/-1; margin:0; border-top:1px solid var(--line); padding-top:12px; color:var(--muted); font-size:12px; }
.calculators { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; margin-top:24px; }
.calculator { background:var(--panel); padding:27px 25px 24px; border:1px solid #e9ecf3; border-radius:22px; box-shadow:0 8px 26px #1c263c07; display:flex; flex-direction:column; min-width:0; }
.card-heading { display:flex; align-items:center; gap:12px; margin-bottom:25px; }
.card-heading h2 { margin:0 0 3px; font-size:19px; line-height:1.3; letter-spacing:-.025em; }
.tool-icon { display:grid; place-items:center; height:41px; width:41px; border-radius:13px; background:var(--soft); color:var(--accent); font-size:23px; flex-shrink:0; }
.tool-icon.mint { color:#35806d; background:#eaf6f1; }
form { display:flex; flex-direction:column; flex:1; }
.date-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.field { min-width:0; }
.label-row { display:flex; align-items:center; justify-content:space-between; gap:5px; min-height:28px; margin-bottom:7px; }
.label-row label { font-size:12px; font-weight:650; }
.text-button { border:0; background:transparent; color:var(--accent); font-size:12px; font-weight:600; padding:3px 0; }
.text-button:hover { text-decoration:underline; }
.field input { width:100%; min-width:0; height:47px; border:1px solid #dce1ec; border-radius:11px; background:#fbfcfe; color:var(--text); padding:10px 11px; font-size:14px; font-variant-numeric:tabular-nums; }
input[type=date] { appearance:none; -webkit-appearance:none; }
input::-webkit-date-and-time-value { text-align:left; }
input[aria-invalid=true] { border-color:var(--danger); background:#fff9fa; }
.field-error { font-size:11px; line-height:1.5; color:var(--danger); margin:5px 0 0; }
.field-error:empty { display:none; }
.input-hint { font-size:10px; color:var(--muted); margin:10px 0 0; }
.form-actions { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:auto; padding-top:21px; padding-bottom:22px; }
.primary-button,.secondary-button { border-radius:10px; font-size:12px; font-weight:650; padding:10px 14px; min-height:39px; }
.primary-button { background:var(--accent); border:1px solid var(--accent); color:#fff; box-shadow:0 4px 12px #5966ee1c; }
.primary-button:hover { background:#4855df; }
.secondary-button { background:#fff; border:1px solid var(--line); color:var(--muted); }
.secondary-button:hover { background:#f5f6fc; }
.presets { display:flex; gap:5px; flex-wrap:wrap; }
.presets button { border:1px solid var(--line); background:#fafbfe; color:var(--muted); padding:5px 7px; min-height:32px; border-radius:7px; font-size:11px; }
.presets button:hover { color:var(--accent); background:var(--soft); }
.result { padding:19px 20px 17px; border-radius:14px; min-height:185px; }
.difference-result { background:linear-gradient(120deg,#eff0ff,#f5f6ff); color:#414ba1; }
.addition-result { background:linear-gradient(120deg,#edf7f3,#f4f9f6); color:#356757; }
.result-label { font-size:9px; font-weight:750; letter-spacing:.14em; opacity:.8; }
.day-result { display:flex; align-items:baseline; gap:9px; margin:2px 0 4px; }
.day-result output { font-size:45px; font-weight:730; letter-spacing:-.04em; line-height:1.4; overflow-wrap:anywhere; min-width:0; }
.day-result span { font-size:13px; }
.date-result { display:block; font-size:clamp(24px,3vw,32px); font-weight:720; letter-spacing:-.04em; margin-top:9px; line-height:1.35; font-variant-numeric:tabular-nums; }
.weekday { font-size:12px; min-height:20px; margin:1px 0 6px; }
.result-detail { margin:4px 0 8px; font-size:12px; }
.result-rule { border-top:1px solid currentColor; border-color:#5966ee1a; margin:9px 0 0; padding-top:9px; font-size:10px; opacity:.85; }
.addition-result .result-rule { border-color:#35806d1a; }
.result.invalid { color:var(--muted); background:#f5f6f9; }
.below-tools { display:flex; align-items:center; justify-content:space-between; gap:15px; font-size:11px; color:var(--muted); padding:12px 3px 0; }
.below-tools p { margin:0; }
.birth-section { margin-top:32px; padding:27px 25px 23px; background:var(--panel); border:1px solid #e9ecf3; border-radius:22px; box-shadow:0 8px 26px #1c263c07; }
.birth-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.birth-heading .card-heading { margin:0; }
.tool-icon.rose { background:#fbecf3; color:#ad6387; }
.birth-rule-badge { color:#975571; background:#fbf0f5; border:1px solid #f2dfe8; border-radius:999px; font-size:11px; padding:5px 11px; flex-shrink:0; }
.birth-rule { font-size:12px; color:var(--muted); margin:16px 0 22px; }
.birth-overview { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:28px; }
#birthForm { display:block; min-width:0; }
.birth-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:14px; }
.birth-save-status { margin:12px 0 0; font-size:11px; color:#5663b4; }
.birth-storage-notice { margin:8px 0 0; font-size:11px; color:var(--danger); }
.birth-storage-notice:empty { display:none; }
.birth-cookie-hint { margin:7px 0 0; font-size:10px; color:var(--muted); line-height:1.7; }
.birth-summary { background:linear-gradient(120deg,#f9eef5,#f6f1fd); color:#875375; border-radius:15px; padding:23px; display:flex; flex-direction:column; justify-content:center; min-height:190px; }
.birth-summary output { display:block; font-size:clamp(22px,2.4vw,29px); font-weight:720; line-height:1.4; letter-spacing:-.025em; margin:12px 0 10px; overflow-wrap:anywhere; }
.birth-summary p { margin:0; font-size:11px; }
.birth-summary.invalid { color:var(--muted); background:#f6f7fb; }
.birth-summary.invalid output { font-size:19px; font-weight:600; }
.birth-milestones { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:24px; }
.birth-milestone { border:1px solid var(--line); border-radius:13px; padding:17px 15px 14px; min-width:0; background:#fcfcff; }
.birth-milestone h3 { font-size:12px; font-weight:650; margin:0 0 10px; color:var(--muted); overflow-wrap:anywhere; }
.birth-milestone time { display:block; font-size:20px; font-weight:700; letter-spacing:-.03em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.birth-weekday { color:var(--muted); font-size:11px; min-height:18px; margin-top:3px; }
.birth-milestone p { border-top:1px solid var(--line); padding-top:10px; margin:10px 0 0; font-size:11px; color:var(--accent); }
.birth-milestone.is-past p { color:var(--muted); }
.birth-milestone.is-today { border-color:#b5a0dc; background:#f7f1ff; }
.birth-explainer { margin:17px 0 0; font-size:11px; line-height:1.8; color:var(--muted); }
@media(max-width:900px) { .birth-milestones { grid-template-columns:repeat(2,minmax(0,1fr)); } .birth-overview { gap:18px; } }
@media(max-width:700px) { .birth-section { padding:22px 19px 19px; margin-top:25px; } .birth-heading { display:block; } .birth-rule-badge { display:inline-block; margin-top:14px; } .birth-overview { grid-template-columns:1fr; gap:20px; } .birth-summary { min-height:155px; padding:20px; } .birth-summary output { font-size:25px; } }
@media(max-width:480px) { .birth-milestones { grid-template-columns:1fr; } .birth-milestone { padding:16px; } }
.guide { margin:36px 0 25px; }
.guide-heading { display:flex; align-items:baseline; justify-content:space-between; gap:15px; border-bottom:1px solid var(--line); padding-bottom:12px; }
.guide-heading h2 { font-size:15px; margin:0; }
.guide-heading > span { font-size:11px; color:var(--muted); }
.guide-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 32px; }
details { border-bottom:1px solid var(--line); padding:15px 0; }
summary { font-size:12px; font-weight:650; cursor:pointer; padding-right:8px; }
details p { font-size:12px; color:var(--muted); margin:10px 0 0; line-height:1.8; }
footer { display:flex; align-items:center; justify-content:space-between; gap:20px; color:var(--muted); font-size:10px; padding:15px 0 28px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.skip-link { position:absolute; top:-100px; left:12px; padding:12px; background:white; z-index:2; border-radius:8px; color:var(--accent); }
.skip-link:focus { top:10px; }
@media(max-width:900px) { .count-settings { grid-template-columns:1fr; } .calculators { gap:16px; } .calculator { padding:23px 18px 18px; } .date-pair { gap:10px; } .card-heading h2 { font-size:17px; } }
@media(max-width:700px) { .page-shell { padding:0 19px; } .topbar { min-height:80px; } .brand { font-size:12px; } .brand-mark { height:33px; width:33px; border-radius:10px; } .brand-sub { font-size:10px; } .language-control { padding:5px 7px; gap:4px; } .language-control select { font-size:12px; max-width:100px; } .hero { padding:30px 0 25px; gap:14px; } .intro { font-size:13px; } .eyebrow { font-size:8px; letter-spacing:.07em; } .calendar-art { display:none; } .count-settings { padding:18px 16px 14px; gap:14px; } .count-choice { padding:10px 8px; gap:6px; } .count-choice strong { font-size:11px; } .count-choice small { font-size:9px; } .count-example { font-size:11px; } .calculators { grid-template-columns:1fr; margin-top:18px; gap:18px; } .calculator { padding:22px 19px 19px; } .card-heading { margin-bottom:20px; } .card-heading h2 { font-size:19px; } .result { min-height:175px; } .day-result output { font-size:41px; } .date-result { font-size:30px; } .field input { font-size:16px; padding:10px; } .guide { margin-top:28px; } .guide-heading { display:block; } .guide-heading > span { display:block; margin-top:3px; } .guide-grid { grid-template-columns:1fr; } .below-tools { align-items:flex-start; } footer { align-items:flex-start; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } button { transition:none; } }
