.atlas-calendar {
  --ac-ink: var(--ink, #233b36);
  --ac-muted: var(--muted, #57665e);
  --ac-line: var(--line, #d7d8cc);
  color: var(--ac-ink);
  min-width: 0;
  max-width: 100%;
}
.atlas-calendar * { box-sizing: border-box; }
.atlas-calendar h1, .atlas-calendar h2, .atlas-calendar p, .atlas-calendar ol { margin: 0; }
.ac-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; margin: 1rem 0 1.6rem; }
.ac-header > div:first-child { max-width: 47rem; min-width: 0; }
.ac-kicker { color: var(--red, #a44430); font-size: .875rem; font-weight: 700; letter-spacing: .11em; }
.ac-header h1 { font-family: var(--serif, Georgia, serif); font-size: clamp(2.2rem, 4.3vw, 3.7rem); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; margin: .55rem 0 .7rem; }
.ac-header h1 + p { color: var(--ac-muted); font-size: 1rem; line-height: 1.6; }
.ac-summary { display: flex; flex: 0 0 auto; flex-direction: column; gap: .18rem; padding: .85rem 1.1rem; background: #eaf0e6; border: 1px solid #cfdbca; border-radius: .85rem; }
.ac-summary strong { font-size: 1.05rem; }
.ac-summary span { color: var(--ac-muted); font-size: .875rem; }
.ac-month-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.5rem; }
.ac-month-nav button { padding: .65rem 1.05rem; min-height: 2.75rem; color: var(--ac-ink); background: var(--surface, #fffdf8); border: 1px solid var(--ac-line); border-radius: 2rem; font-size: 1rem; }
.ac-month-nav button:hover { background: #eaf0e6; border-color: #799583; }
.ac-month { margin-bottom: 1.8rem; border: 1px solid var(--ac-line); border-radius: 1rem; background: var(--surface, #fffdf8); overflow: hidden; scroll-margin-top: 1.25rem; }
.ac-month-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .6rem; padding: 1.2rem 1.35rem; border-bottom: 1px solid var(--ac-line); background: #f1f2e9; }
.ac-month-heading h2, .ac-undated h2 { font-family: var(--serif, Georgia, serif); font-size: clamp(1.65rem, 2.5vw, 2.2rem); font-weight: 500; letter-spacing: -.025em; }
.ac-month-heading p { color: var(--ac-muted); font-size: .875rem; }
.ac-weekdays, .ac-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ac-weekdays { border-bottom: 1px solid var(--ac-line); }
.ac-weekdays span { padding: .65rem .8rem; font-size: .875rem; font-weight: 650; color: var(--ac-muted); text-align: right; text-transform: capitalize; }
.ac-month-grid { list-style: none; padding: 0; }
.ac-month-grid > li { min-width: 0; border-right: 1px solid var(--ac-line); border-bottom: 1px solid var(--ac-line); }
.ac-month-grid > li:nth-child(7n) { border-right: 0; }
.ac-date, .ac-spacer { min-height: 8.5rem; }
.ac-spacer { background: #f6f5ef; }
.ac-date { display: flex; flex-direction: column; padding: .5rem; gap: .5rem; }
.ac-date-label { display: flex; justify-content: flex-end; }
.ac-date-label time { display: flex; align-items: center; justify-content: center; min-width: 1.8rem; min-height: 1.8rem; }
.ac-date-number { font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.ac-unplanned { background: #f6f5ef; color: #69766f; }
.ac-weekend.ac-planned { background: #f9f7ef; }
.ac-entries { display: flex; flex-direction: column; gap: .5rem; min-width: 0; flex: 1; }
.ac-entry { display: flex; flex-direction: column; gap: .4rem; flex: 1; min-width: 0; min-height: 7rem; padding: .7rem .65rem; border: 1px solid #c9d7ca; border-top: 3px solid #577c65; border-radius: .6rem; background: #edf3e9; color: var(--ac-ink); text-decoration: none; overflow-wrap: anywhere; }
.ac-entry.ac-region-china { background: #f7eee3; border-color: #e3cdb9; border-top-color: #b66f45; }
.ac-entry.ac-region-transit { background: #eaf0f4; border-color: #c6d4dc; border-top-color: #6c8797; }
.ac-entry:hover { box-shadow: 0 3px 10px #233b3614; outline: 1px solid #6d8978; outline-offset: -1px; }
.ac-entry-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .4rem; }
.ac-day-label { font-size: .875rem; color: var(--ac-muted); }
.ac-continuation { font-size: .875rem; color: #425d6b; }
.ac-base { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.ac-range, .ac-preview { font-size: .875rem; line-height: 1.45; color: #46584d; }
.ac-preview { margin-top: .15rem; }
.ac-open { margin-top: auto; padding-top: .4rem; font-size: .875rem; font-weight: 650; text-decoration: underline; text-underline-offset: .18em; }
.ac-mobile-weekday { display: none; }
.ac-footnote { color: var(--ac-muted); font-size: .875rem; line-height: 1.55; max-width: 53rem; padding: 0 .2rem; }
.ac-undated, .ac-empty { border: 1px solid var(--ac-line); border-radius: 1rem; background: var(--surface, #fffdf8); padding: 1.3rem; margin-bottom: 1.5rem; }
.ac-undated > p { margin-top: .5rem; color: var(--ac-muted); }
.ac-undated ul { padding-left: 1.2rem; }
.ac-undated li { margin: .65rem 0; overflow-wrap: anywhere; }
.ac-undated a { text-underline-offset: .18em; }
.ac-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.atlas-calendar a:focus-visible, .atlas-calendar button:focus-visible, .ac-month-heading h2:focus-visible { outline: 3px solid #a44430; outline-offset: 3px; }

@media (max-width: 1050px) and (min-width: 761px) {
  .ac-date { padding: .35rem; }
  .ac-entry { padding: .6rem .45rem; }
  .ac-preview { display: none; }
}
@media (max-width: 760px) {
  .ac-header { align-items: flex-start; flex-direction: column; gap: 1rem; margin-top: .7rem; }
  .ac-summary { flex: initial; width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem .8rem; }
  .ac-month-nav { margin-bottom: 1.15rem; gap: .5rem; }
  .ac-month-nav button { flex: 1 1 auto; padding: .65rem .85rem; }
  .ac-month-heading { padding: 1rem; }
  .ac-weekdays, .ac-spacer, .ac-date.ac-unplanned { display: none; }
  .ac-month-grid { display: block; }
  .ac-month-grid > li { border-right: 0; }
  .ac-month-grid > li:last-child { border-bottom: 0; }
  .ac-date { display: grid; grid-template-columns: 3.3rem minmax(0, 1fr); gap: .6rem; padding: .85rem .75rem; min-height: 0; }
  .ac-date-label { justify-content: center; align-items: flex-start; padding-top: .2rem; }
  .ac-date-label time { flex-direction: column; gap: .15rem; }
  .ac-date-number { font-family: var(--serif, Georgia, serif); font-size: 1.9rem; font-weight: 500; line-height: 1.1; }
  .ac-mobile-weekday { display: block; font-size: .875rem; text-transform: capitalize; color: var(--ac-muted); }
  .ac-entry { min-height: 0; padding: .85rem; }
  .ac-preview { display: block; }
  .ac-open { padding-top: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-calendar { scroll-behavior: auto; }
}
