:root {
  color-scheme: light;
  --background: #f7f8f2;
  --surface: #fdfefa;
  --ink: #293426;
  --muted: #6b7364;
  --line: #dee2d5;
  --accent: #475539;
  --accent-ink: #f8faed;
  --accent-muted: #d0d9c3;
  --accent-line: #69765d;
  --tag: #f0f2e9;
  --button-hover: #e7ebdf;
  --focus: #687d40;
  --radius: 18px;
  --motion: 180ms ease;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-synthesis: none;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
button { font: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

.app-shell {
  width: min(1120px, calc(100% - 96px));
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 108px;
  border-bottom: 1px solid var(--line);
}
.wordmark { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; letter-spacing: -.6px; }
.brand-icon { width: 31px; height: 31px; color: var(--accent); }
.brand-period { color: var(--accent); }
.today { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

main { width: 100%; padding: 69px 0 62px; }
.intro { margin-bottom: 43px; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 2px; }
h1 { margin: 0; font-size: clamp(36px, 4.5vw, 52px); font-weight: 450; letter-spacing: -2px; line-height: 1.25; text-wrap: balance; }
.intro-description { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.countdowns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.countdown-card { min-width: 0; padding: 27px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 29px; }
.card-icon { width: 26px; height: 26px; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.card-tag { padding: 5px 10px; border-radius: 6px; background: var(--tag); color: var(--muted); font-size: 11px; line-height: 1.4; }
h2 { margin: 0; font-size: 16px; font-weight: 500; line-height: 1.5; }
.countdown { margin: 17px 0 28px; }
.main-count { display: flex; align-items: baseline; gap: 10px; min-height: 101px; }
.count-value { font-size: clamp(58px, 6.8vw, 88px); font-weight: 350; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -5px; line-height: 1.15; }
.count-unit { color: var(--muted); font-size: 17px; }
.remainder { min-height: 22px; margin: 8px 0 0; font-size: 12px; line-height: 1.8; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-bottom { display: flex; flex-direction: column; gap: 7px; padding-top: 20px; border-top: 1px solid var(--line); }
.card-bottom > span { color: var(--muted); font-size: 11px; }
.card-bottom time { font-size: 12px; font-weight: 500; letter-spacing: .2px; line-height: 1.6; font-variant-numeric: tabular-nums; }

.card-tet { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card-tet .card-icon { stroke: var(--accent-ink); }
.card-tet .card-tag { background: #ffffff12; color: var(--accent-muted); }
.card-tet .count-unit, .card-tet .remainder, .card-tet .card-bottom > span { color: var(--accent-muted); }
.card-tet .card-bottom { border-color: var(--accent-line); }
.card-tet ::selection { background: var(--accent-ink); color: var(--accent); }

.unit-controls { display: flex; flex-direction: column; align-items: center; margin-top: 36px; }
.unit-controls > p:first-child { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.unit-switch { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--tag); }
.unit-switch button { min-width: 88px; min-height: 44px; padding: 8px 20px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; touch-action: manipulation; transition: background var(--motion), color var(--motion), transform var(--motion); }
.unit-switch button:hover { background: var(--button-hover); color: var(--ink); }
.unit-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.unit-switch button:active { transform: scale(.96); }
.unit-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.unit-note { margin: 12px 0 0; font-size: 11px; color: var(--muted); }
body[data-unit="hours"] .count-value { font-size: clamp(46px, 5.2vw, 66px); letter-spacing: -3px; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding: 23px 0 27px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.footer-separator { margin: 0 8px; color: var(--muted); }
.update-status { display: flex; align-items: center; gap: 8px; }
.update-status .status-dot { width: 5px; height: 5px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { text-align: center; color: var(--ink); line-height: 1.6; }

@media (min-width: 1440px) and (min-height: 900px) {
  main { padding-top: 100px; }
  .intro { margin-bottom: 52px; }
}
@media (max-width: 1000px) {
  .app-shell { width: calc(100% - 56px); }
  .countdowns { gap: 12px; }
  .countdown-card { padding: 22px 18px; }
  .count-value { letter-spacing: -4px; }
  .main-count { gap: 7px; min-height: 86px; }
}
@media (max-width: 740px) {
  .app-shell { width: calc(100% - 40px); }
  .site-header { min-height: 83px; gap: 16px; }
  .wordmark { font-size: 18px; }
  .brand-icon { width: 26px; height: 26px; }
  .today { font-size: 11px; }
  .today .status-dot { display: none; }
  main { padding: 38px 0; }
  .intro { margin-bottom: 26px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.7px; }
  h1 { font-size: 38px; letter-spacing: -1.5px; }
  .intro-description { font-size: 14px; margin-top: 10px; }
  .countdowns { grid-template-columns: 1fr; gap: 14px; }
  .countdown-card { position: relative; padding: 22px 24px; }
  .card-top { margin-bottom: 15px; }
  .card-icon { width: 24px; height: 24px; }
  .card-tag { font-size: 11px; }
  h2 { font-size: 16px; }
  .countdown { margin: 10px 0 18px; }
  .main-count { min-height: 78px; gap: 12px; }
  .count-value { font-size: 72px; }
  body[data-unit="hours"] .count-value { font-size: 62px; }
  .remainder { margin-top: 2px; }
  .card-bottom { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding-top: 15px; align-items: center; }
  .card-bottom > span { font-size: 11px; }
  .card-bottom time { font-size: 11px; }
  .unit-controls { margin-top: 28px; }
  .site-footer { font-size: 10px; padding: 20px 0; }
}
@media (max-width: 380px) {
  .app-shell { width: calc(100% - 32px); }
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 9px; padding: 18px 0; }
  h1 { font-size: 34px; }
  .countdown-card { padding: 20px; }
  .site-footer { flex-wrap: wrap; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
