:root {
  color-scheme: light;
  --ink: #29332e;
  --muted: #7b827d;
  --green: #205c47;
  --green-dark: #184c3b;
  --gold: #b98b43;
  --paper: #f8f6ef;
  --white: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 5px 0 22px; }
.eyebrow { margin: 0 0 5px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: 2px; }
h1 { margin: 0; font: 700 29px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.4px; }
.icon-button,.round-button { border: 0; background: var(--white); box-shadow: 0 3px 15px #253a3010; cursor: pointer; }
.icon-button { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; }
.icon-button svg { width: 20px; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.round-button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--green); font-size: 27px; line-height: 1; }
.month-heading { text-align: center; }
.month-heading h2 { margin: 0; font: 700 19px Georgia, "Times New Roman", serif; text-transform: capitalize; }
.month-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.calendar-card,.detail-card { border-radius: 21px; background: var(--white); box-shadow: 0 5px 22px #253a3008; }
.calendar-card { padding: 12px 9px 13px; }
.weekdays,.days-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.weekdays { margin-bottom: 6px; }
.weekdays span { padding: 6px 0; color: var(--muted); text-align: center; font-size: 10px; font-weight: 800; }
.weekdays .sunday { color: var(--gold); }
.day-cell { min-width: 0; height: 55px; padding: 5px 0 4px; border: 1.5px solid transparent; border-radius: 13px; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.day-cell .greg { font-size: 15px; font-weight: 600; line-height: 1; }
.day-cell .lunar { color: var(--muted); font-size: 9px; line-height: 1; }
.day-cell.sunday .greg { color: var(--gold); }
.day-cell .lunar.new-month { color: var(--green); font-weight: 800; }
.day-cell.selected { background: var(--green); color: var(--white); }
.day-cell.selected .greg,.day-cell.selected .lunar,.day-cell.selected .lunar.new-month { color: var(--white); }
.day-cell.today:not(.selected) { border-color: var(--gold); }
.empty-cell { height: 55px; }
.detail-card { margin-top: 15px; padding: 17px; }
.detail-top { display: flex; align-items: flex-start; justify-content: space-between; }
.gregorian-label { margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.lunar-date-row { display: flex; align-items: baseline; gap: 10px; }
#lunar-day { color: var(--green); font: 700 50px/.95 Georgia, "Times New Roman", serif; }
.lunar-date-row div { display: flex; flex-direction: column; gap: 3px; }
.lunar-month-label { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .8px; }
.lunar-year { color: var(--ink); font-size: 13px; }
.moon-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--paper); color: var(--gold); font-size: 30px; }
.detail-divider { height: 1px; margin: 15px 0 12px; background: var(--paper); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.fact { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 10px 11px; border-radius: 11px; background: var(--paper); }
.fact span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.fact strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.note { display: flex; gap: 8px; margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.note span { color: var(--gold); }
.bottom-row { display: flex; align-items: center; justify-content: space-between; margin: 16px 2px 0; }
.bottom-row button { border: 0; padding: 5px 0; background: none; color: var(--green); font-size: 12px; font-weight: 700; cursor: pointer; }
.bottom-row span { color: var(--muted); font-size: 10px; }
.install-hint { margin: 17px 0 0; color: #929992; text-align: center; font-size: 10px; line-height: 1.5; }
.install-hint strong { color: var(--green); }
@media (max-width: 360px) { .app-shell { padding-right: 14px; padding-left: 14px; } .calendar-card { padding-right: 6px; padding-left: 6px; } .days-grid,.weekdays { gap: 2px; } .day-cell { height: 51px; } .empty-cell { height: 51px; } }
