/* DaysLeftly · light grey ground, white cards, navy, one blue accent, yellow highlight */
:root {
  --bg: #F6F7F9; --card: #FFFFFF; --soft: #FAFBFC; --line: #E3E6EB; --line-2: #EEF0F3; --field: #9CA3AF; --pill: #C4CAD4;
  --ink: #111827; --ink-2: #1F2937; --text: #374151; --muted: #4B5563; --faint: #6B7280;
  --navy: #142039; --navy-2: #2A3858; --navy-line: #33415F; --navy-text: #E4E9F2; --navy-muted: #C9D2E3;
  --accent: #2557D6; --red: #C8323C; --hl: #FFDD3C; --hl-soft: #FFF6CC; --wa: #0E7A40;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.65; }
img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-head { background: var(--card); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { display: flex; flex-direction: column; width: 32px; height: 32px; border-radius: 7px; overflow: hidden; border: 1.5px solid var(--ink); }
.logo-mark i { height: 8px; background: var(--accent); }
.logo-mark b { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.logo-name { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }

/* layout */
.page { display: flex; flex-wrap: wrap; gap: 40px; padding-block: 24px 64px; }
.main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
.side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.narrow { max-width: 680px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--faint); }

/* answer card */
.answer { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 4vw, 36px); display: flex; flex-direction: column; gap: 22px; }
.answer h1 { margin: 0; font-weight: 800; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.15; letter-spacing: -0.03em; }
.big-row { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; justify-content: space-between; }
.big { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.big strong { font-weight: 800; font-size: clamp(84px, 14vw, 132px); line-height: 0.9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.big > span { font-weight: 700; font-size: clamp(20px, 3vw, 28px); }
.big.is-date strong { font-size: clamp(44px, 7.5vw, 76px); line-height: 1; letter-spacing: -0.035em; }
.cal { flex: none; width: 116px; display: flex; flex-direction: column; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; text-align: center; background: var(--card); line-height: 1.2; }
.cal .m { background: var(--accent); color: #fff; font-weight: 700; letter-spacing: 0.08em; font-size: 14px; padding: 6px 0; }
.cal.red .m { background: var(--red); }
.cal .d { font-weight: 800; font-size: 52px; padding: 4px 0; }
.cal .w { font-size: 14px; font-weight: 600; padding-bottom: 8px; }
.lede { margin: 0; font-size: 19px; color: var(--ink-2); max-width: 640px; }
mark, .hl { background: var(--hl); color: var(--ink); padding: 1px 6px; border-radius: 4px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; background: var(--soft); }
.stat b { font-weight: 800; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat > span { font-size: 15px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { color: #fff; filter: brightness(0.92); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--field); }
.btn.ghost:hover { color: var(--ink); background: var(--soft); }
.btn.wa { background: var(--wa); }
.hint { font-size: 15px; color: var(--muted); }
.today-msg { display: none; }
.is-today .today-msg { display: block; }

/* pills, lists */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { padding: 9px 17px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--pill); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.h2 { margin: 0; font-weight: 800; font-size: 28px; letter-spacing: -0.02em; line-height: 1.25; }
.h3 { margin: 0; font-size: 18px; font-weight: 700; }
p { margin: 0; }
.prose { display: flex; flex-direction: column; gap: 14px; color: var(--ink-2); }
.prose h2 { margin: 18px 0 0; font-weight: 800; font-size: 24px; letter-spacing: -0.02em; line-height: 1.3; }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.tablebox { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 14px; color: var(--muted); font-weight: 600; padding: 13px 18px; }
td { padding: 13px 18px; border-top: 1px solid var(--line-2); }
tr.now td { background: var(--hl-soft); }
td:first-child { font-weight: 700; }
.faq { display: flex; flex-direction: column; }
.faq .q { border-top: 1px solid var(--line); padding: 18px 0; display: flex; flex-direction: column; gap: 6px; }
.faq h3 { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.35; }
.faq p { color: var(--text); }

/* side */
.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.box h2 { margin: 0; font-size: 18px; font-weight: 700; }
label { font-size: 14px; font-weight: 600; color: var(--text); }
input[type=date] { height: 48px; padding: 0 12px; font: inherit; border: 1.5px solid var(--field); border-radius: 10px; background: var(--card); color: var(--ink); width: 100%; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.rel { display: flex; flex-direction: column; gap: 8px; }
.rel a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 16px; }
.rel a:hover { border-color: var(--accent); }
.rel b { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ads */
.ad { min-height: 100px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-side { min-height: 250px; }
.ad::before { content: "Advertisement"; display: none; }

/* homepage */
.hero { background: var(--card); border-bottom: 1px solid var(--line); }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 44px; align-items: center; padding-block: 56px; }
.hero-copy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); }
.hero h1 { margin: 0; font-weight: 800; font-size: clamp(36px, 5.5vw, 52px); line-height: 1.1; letter-spacing: -0.03em; }
.hero h1 .hl { padding: 0 8px; border-radius: 6px; font-weight: 800; }
.hero .sub { font-size: 19px; color: var(--text); max-width: 520px; }
.date-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.date-form .field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; max-width: 280px; }
.date-form input { height: 52px; font-size: 17px; }
.date-form .btn { height: 52px; font-size: 17px; padding: 0 26px; }
.popular { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 15px; }
.popular span { color: var(--muted); }
.yearcard { flex: 1 1 380px; min-width: 0; background: var(--navy); color: #fff; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.yearcard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.yearcard .top span:first-child { color: var(--navy-muted); font-weight: 600; }
.yearcard .top span:last-child { color: var(--hl); font-weight: 700; }
.yearcard .left { display: flex; align-items: baseline; gap: 12px; }
.yearcard .left b { font-weight: 800; font-size: 72px; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.yearcard .left span { font-size: 18px; color: var(--navy-text); }
.weeks { display: grid; grid-template-columns: repeat(53, minmax(0, 1fr)); gap: 2px; height: 28px; }
.weeks i { border-radius: 2px; background: var(--navy-2); }
.weeks i.past { background: #6A7BA2; }
.weeks i.cur { background: var(--hl); }
.bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.bars div { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.bars small { font-size: 13px; color: var(--navy-muted); }
.bars .track { height: 6px; border-radius: 3px; background: var(--navy-line); overflow: hidden; }
.bars .track i { display: block; height: 100%; background: var(--hl); }
.home-body { display: flex; flex-direction: column; gap: 56px; padding-block: 40px 64px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cd { display: flex; gap: 16px; align-items: center; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.cd:hover { border-color: var(--accent); color: var(--ink); }
.mini-cal { flex: none; width: 54px; display: flex; flex-direction: column; border: 1.5px solid var(--ink); border-radius: 8px; overflow: hidden; text-align: center; line-height: 1.2; }
.mini-cal .m { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 0; }
.mini-cal.red .m { background: var(--red); }
.mini-cal .d { font-weight: 800; font-size: 20px; padding: 4px 0; }
.cd .txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cd .n { font-weight: 800; font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cd .n small { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.cd .name { font-size: 16px; font-weight: 500; color: var(--text); }
.two { display: flex; flex-wrap: wrap; gap: 40px; }
.two > * { flex: 1 1 420px; min-width: 0; }
.qa { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.qa a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line-2); }
.qa a:first-child { border-top: 0; }
.qa a:hover { background: var(--soft); }
.qa b { font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; text-align: right; }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tool { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); min-height: 96px; }
.tool:hover { border-color: var(--accent); color: var(--ink); }
.tool b { font-size: 17px; }
.tool span { font-size: 15px; color: var(--muted); line-height: 1.45; }

/* calendar page */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.month { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.month h2 { margin: 0 0 8px; font-size: 17px; }
.month table { font-size: 14px; }
.month th, .month td { padding: 4px 0; text-align: center; border: 0; font-weight: 500; }
.month td:first-child, .month th:first-child { color: var(--faint); font-size: 12px; font-weight: 500; }
.month td.hol { background: var(--hl-soft); border-radius: 6px; font-weight: 700; }

/* footer */
.site-foot { background: var(--navy); color: var(--navy-text); }
.site-foot .wrap { display: flex; flex-direction: column; gap: 32px; padding-block: 48px 32px; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.foot-cols div { display: flex; flex-direction: column; gap: 8px; }
.foot-cols b { font-size: 14px; color: #fff; }
.foot-cols a { color: var(--navy-text); text-decoration: none; font-size: 15px; }
.foot-cols a:hover { color: #fff; text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--navy-line); padding-top: 20px; font-size: 14px; color: var(--navy-muted); }
.foot-base a { color: var(--navy-muted); }
.foot-base nav { display: flex; flex-wrap: wrap; gap: 18px; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .cal { width: 86px; } .cal .d { font-size: 36px; } .cal .m, .cal .w { font-size: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions .btn { flex: 1 1 140px; }
  .hero .wrap { padding-block: 36px; gap: 28px; }
  .yearcard { padding: 22px; } .yearcard .left b { font-size: 56px; }
  .two { gap: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
