.calendar-page {
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  color:#322f2a;
  background:#f5f3ed;
  font-synthesis:none;
  --paper:#fffdf8;
  --line:#e5e0d6;
  --muted:#8d887c;
  --red:#a13c32;
  --green:#507363;
  --serif:"Songti SC","Noto Serif CJK SC","SimSun",serif}
.calendar-page * {
  box-sizing:border-box}
.calendar-page {
  margin:0}
.calendar-page button, .calendar-page input, .calendar-page select {
  font:inherit}
.calendar-page button, .calendar-page a, .calendar-page input, .calendar-page select {
  -webkit-tap-highlight-color:transparent}
.calendar-page button {
  cursor:pointer}
.calendar-page button:disabled {
  cursor:not-allowed;
  opacity:.35}
.calendar-page button:focus-visible, .calendar-page a:focus-visible, .calendar-page input:focus-visible, .calendar-page select:focus-visible {
  outline:2px solid var(--green);
  outline-offset:3px}
.calendar-page button {
  color:inherit}
.calendar-page button, .calendar-page select, .calendar-page input {
  border:1px solid var(--line);
  background:var(--paper)}
.calendar-page button:hover {
  background:#eee9df}
.calendar-page a {
  color:inherit;
  text-decoration:none}
.calendar-page [hidden] {
  display:none!important}
.calendar-page .page-shell {
  max-width:1440px;
  padding:0 44px;
  margin:auto}
.calendar-page .masthead {
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:122px;
  border-bottom:1px solid var(--line);
  margin-bottom:28px}
.calendar-page .seal {
  font-family:var(--serif);
  font-size:20px;
  line-height:1.05;
  border-radius:3px;
  background:var(--red);
  color:#fff8e9;
  border:3px double #f0c3a9;
  outline:1px solid var(--red);
  padding:7px 5px}
.calendar-page .header-right {
  display:flex;
  align-items:center;
  gap:30px;
  font-size:12px}
.calendar-page .text-button {
  border:0;
  background:transparent;
  padding:9px 0}
.calendar-page .text-button span {
  margin-left:8px;
  font-size:16px}
.calendar-page .settings {
  padding:20px;
  background:#edeae2;
  border:1px solid var(--line);
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:24px}
.calendar-page .settings label {
  display:grid;
  gap:7px;
  color:#6b665d;
  font-size:12px}
.calendar-page .settings .settings-help {
 max-width: 250px;
 color: #655f56;
 font-size: 12px;
 font-weight: 500;
 line-height: 1.55;
}
.calendar-page .settings select {
  padding:8px;
  min-width:125px}
.calendar-page .settings p {
  flex-basis:100%;
  font-size:11px;
  color:#6b665d;
  margin:0}
.calendar-page .notice {
  font-size:12px;
  color:var(--green);
  margin-bottom:14px;
  min-height:0}
.calendar-page .notice:empty {
  display:none}
.calendar-page .notice.error {
  color:var(--red)}
.calendar-page .workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 354px;
  gap:26px;
  align-items:start}
.calendar-page .workspace[aria-busy=true] {
  opacity:.65}
.calendar-page .calendar-column {
  min-width:0}
.calendar-page .calendar-card, .calendar-page .day-panel, .calendar-page .day-facts {
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:3px}
.calendar-page .month-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:25px 26px 19px}
.calendar-page .eyebrow {
  font-size:11px;
  color:var(--muted);
  letter-spacing:1.4px;
  margin-bottom:8px}
.calendar-page h1, .calendar-page h2, .calendar-page h3, .calendar-page p {
  margin:0}
.calendar-page h1 {
  font-family:var(--serif);
  font-size:32px;
  font-weight:500;
  letter-spacing:1px}
.calendar-page h1 small {
  font-family:inherit;
  font-size:19px;
  margin-left:10px;
  color:#79746a}
.calendar-page .month-actions {
  display:flex;
  align-items:center;
  gap:8px}
.calendar-page .icon-button {
  width:31px;
  height:31px;
  font-size:23px;
  line-height:20px;
  border:0;
  background:transparent;
  border-radius:2px}
.calendar-page .today-button {
  font-size:12px;
  height:30px;
  padding:0 15px;
  border-radius:2px}
.calendar-page .date-toolbar {
  padding:0 26px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px}
.calendar-page .date-toolbar form {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px}
.calendar-page .date-toolbar input {
  width:64px;
  border:0;
  border-bottom:1px solid var(--line);
  padding:5px 0;
  appearance:textfield}
.calendar-page .date-toolbar input::-webkit-inner-spin-button {
  appearance:none}
.calendar-page .date-toolbar select {
  border:0;
  padding:5px 4px}
.calendar-page .jump-button {
  font-size:11px;
  border:0;
  padding:6px;
  background:transparent;
  color:#79746a}
.calendar-page .month-terms {
  font-size:11px;
  color:var(--green);
  line-height:1.8;
  text-align:right}
.calendar-page .weekdays {
  display:grid;
  grid-template-columns:repeat(7,1fr);
  background:#f4f1e9;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  height:36px;
  align-items:center;
  text-align:center;
  font-size:11px;
  color:#746e62}
.calendar-page .weekend {
  color:var(--red)}
.calendar-page .calendar-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:1px;
  background:var(--line)}
.calendar-page .date-cell {
  position:relative;
  min-width:0;
  min-height:97px;
  border:0;
  background:var(--paper);
  padding:12px 10px 10px;
  text-align:left;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px}
.calendar-page .date-cell:hover {
  background:#f4f0e5}
.calendar-page .date-cell .solar-number {
  font-family:Georgia,"Times New Roman",serif;
  font-size:25px;
  line-height:1.1;
  font-variant-numeric:tabular-nums}
.calendar-page .date-cell .lunar-label {
  font-size:11px;
  color:#7f796e}
.calendar-page .date-cell .day-pillar {
  font-size:10px;
  color:#aaa295;
  letter-spacing:1px}
.calendar-page .date-cell.outside {
  background:#f9f7f1;
  color:#b4ad9f}
.calendar-page .date-cell.outside .lunar-label, .calendar-page .date-cell.outside .day-pillar {
  color:#b4ad9f}
.calendar-page .date-cell.weekend .solar-number {
  color:var(--red)}
.calendar-page .date-cell.outside.weekend .solar-number {
  color:#bba99e}
.calendar-page .date-cell .festival {
  color:var(--red);
  max-width:100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis}
.calendar-page .date-cell .term {
  color:var(--green);
  font-weight:600}
.calendar-page .date-cell.selected {
  background:#a43d32;
  color:#fff9ee;
  box-shadow:inset 0 0 0 4px #a43d32,inset 0 0 0 5px #c47e67}
.calendar-page .date-cell.selected .solar-number, .calendar-page .date-cell.selected .lunar-label, .calendar-page .date-cell.selected .day-pillar {
  color:#fff5e9}
.calendar-page .date-cell.selected .day-pillar {
  opacity:.65}
.calendar-page .today-mark {
  position:absolute;
  right:10px;
  top:12px;
  font-size:9px;
  color:var(--red);
  border:1px solid #d5b5a6;
  border-radius:2px;
  padding:1px 3px}
.calendar-page .selected .today-mark {
  color:#fff5e9;
  border-color:#cf9683}
.calendar-page .empty-cell {
  background:#f9f7f1}
.calendar-page .calendar-legend {
  display:flex;
  gap:16px;
  align-items:center;
  font-size:10px;
  color:var(--muted);
  padding:14px 20px;
  flex-wrap:wrap}
.calendar-page .legend-dot {
  display:inline-block;
  width:5px;
  height:5px;
  border-radius:50%;
  margin-right:6px;
  vertical-align:middle}
.calendar-page .legend-dot.red {
  background:var(--red)}
.calendar-page .legend-dot.green {
  background:var(--green)}
.calendar-page .legend-hint {
  margin-left:auto}
.calendar-page .legend-hint span {
  margin-left:7px}
.calendar-page .day-facts {
  margin-top:20px;
  padding:21px 25px}
.calendar-page .section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:17px}
.calendar-page .section-heading h2, .calendar-page .flying-section h2 {
  font-family:var(--serif);
  font-size:17px;
  letter-spacing:1px;
  font-weight:600}
.calendar-page .section-heading>span {
  font-size:10px;
  color:var(--muted)}
.calendar-page .pillar-row {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border-bottom:1px solid var(--line);
  padding-bottom:17px;
  margin-bottom:16px}
.calendar-page .pillar-item {
  border-right:1px solid var(--line);
  text-align:center}
.calendar-page .pillar-item:last-child {
  border:0}
.calendar-page .pillar-item span {
  font-size:10px;
  display:block;
  color:var(--muted);
  margin-bottom:7px}
.calendar-page .pillar-item strong {
  font-family:var(--serif);
  font-weight:500;
  font-size:24px;
  letter-spacing:6px;
  margin-left:6px}
.calendar-page .detail-facts {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 18px;
  font-size:11px;
  line-height:1.9}
.calendar-page .detail-facts .wide {
  grid-column:1/-1}
.calendar-page .fact-label {
  color:var(--muted);
  margin-right:12px}
.calendar-page .section-footnote {
  font-size:10px;
  color:var(--muted);
  margin-top:12px}
.calendar-page .day-cover {
  padding:22px 24px 20px;
  background:#f0eade;
  border-bottom:1px solid #e4dacc;
  position:relative;
  overflow:hidden}
.calendar-page .cover-top {
  font-size:11px;
  display:flex;
  justify-content:space-between;
  color:#84786a;
  letter-spacing:2px}
.calendar-page .cover-date {
  display:flex;
  align-items:center;
  gap:18px;
  margin:17px 0 7px}
.calendar-page .cover-date>strong {
  font-family:Georgia,"Times New Roman",serif;
  font-weight:400;
  font-size:76px;
  line-height:1;
  color:var(--red);
  letter-spacing:-3px}
.calendar-page .cover-date>div>span {
  font-size:10px;
  color:#8d8172;
  letter-spacing:.5px}
.calendar-page .cover-date h2 {
  font-family:var(--serif);
  font-size:21px;
  letter-spacing:2px;
  font-weight:500;
  margin-top:9px}
.calendar-page .cover-seal {
  margin-left:auto;
  border:1px solid #bc9882;
  color:#a17a65;
  font-family:var(--serif);
  font-size:13px;
  line-height:1.2;
  padding:4px 2px;
  transform:rotate(6deg)}
.calendar-page .selected-festivals {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin-top:13px;
  line-height:1.6}
.calendar-page .selected-festivals span {
  color:var(--red);
  font-size:10px;
  background:#e9ddcf;
  padding:2px 7px}
.calendar-page .selected-festivals:empty {
  display:none}
.calendar-page .panel-content {
  padding:19px 22px}
.calendar-page .day-status {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-bottom:21px}
.calendar-page .day-status span {
  font-size:10px;
  border:1px solid var(--line);
  padding:4px 7px;
  border-radius:2px;
  color:#82776a}
.calendar-page .day-status span:first-child {
  color:var(--green);
  border-color:#cdd7c8}
.calendar-page .activity-section {
  border-bottom:1px solid var(--line);
  padding-bottom:19px}
.calendar-page .activity-line {
  display:flex;
  gap:12px;
  margin-bottom:15px;
  align-items:flex-start}
.calendar-page .activity-line:last-child {
  margin-bottom:0}
.calendar-page .activity-symbol {
  flex-shrink:0;
  font-family:var(--serif);
  font-size:21px;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#eaf0e5;
  color:var(--green)}
.calendar-page .taboo .activity-symbol {
  background:#f4e7de;
  color:var(--red)}
.calendar-page .activity-line p {
  font-size:12px;
  line-height:2.1;
  color:#625e52;
  padding-top:2px}
.calendar-page .gods-section {
  padding:22px 0;
  border-bottom:1px solid var(--line)}
.calendar-page .god-group+.god-group {
  margin-top:19px}
.calendar-page .god-group h3 {
  font-size:11px;
  font-weight:500;
  color:#756f63;
  margin-bottom:10px}
.calendar-page .god-tags {
  display:flex;
  gap:6px;
  flex-wrap:wrap}
.calendar-page .god-tags span {
  font-size:11px;
  padding:5px 8px;
  border-radius:2px;
  line-height:1.2}
.calendar-page .god-tags.good span {
  background:#edf1e8;
  color:#57705a}
.calendar-page .god-tags.bad span {
  background:#f5eae3;
  color:#976b58}
.calendar-page .god-tags .none {
  background:transparent!important;
  color:var(--muted)!important}
.calendar-page .directions-section {
  padding-top:22px}
.calendar-page .directions {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px 8px}
.calendar-page .direction {
  display:flex;
  flex-direction:column;
  gap:7px;
  font-size:12px}
.calendar-page .direction small {
  font-size:10px;
  color:var(--muted)}
.calendar-page .flying-section {
  border-top:1px solid var(--line);
  margin-top:22px;
  padding-top:22px;
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center}
.calendar-page .flying-section p {
  font-size:9px;
  margin-top:9px;
  color:var(--muted)}
.calendar-page .flying-section>.section-heading>span {
  font-size:11px;
  display:block;
  color:#857d6f;
  margin-top:12px}
.calendar-page .flying-board {
  display:grid;
  grid-template-columns:repeat(3,28px);
  gap:2px;
  background:var(--line);
  border:1px solid var(--line);
  flex-shrink:0}
.calendar-page .flying-board span {
  background:#f7f3e9;
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  font-family:var(--serif);
  font-size:15px}
.calendar-page .flying-board span:nth-child(5) {
  color:var(--red);
  background:#ede1d2}
.calendar-page footer {
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  padding:28px 0 32px;
  font-size:10px;
  color:#9c9588;
  line-height:1.8}
.calendar-page footer p {
  flex-basis:100%;
  font-size:10px}
.calendar-page .footer-divider {
  margin:0 8px;
  color:#bdb6a8}
.calendar-page .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}

@media(min-width:1400px) {
  .calendar-page .date-cell {
  min-height:105px}
.calendar-page .workspace {
  grid-template-columns:minmax(0,1fr) 368px}
}

@media(max-width:1100px) {
  .calendar-page .page-shell {
  padding:0 24px}
.calendar-page .workspace {
  gap:18px;
  grid-template-columns:minmax(0,1fr) 315px}
.calendar-page .date-cell {
  padding:11px 7px;
  min-height:91px}
.calendar-page .date-toolbar {
  flex-wrap:wrap}
.calendar-page .month-terms {
  text-align:left}
.calendar-page .panel-content {
  padding:18px}
.calendar-page .day-cover {
  padding:20px}
.calendar-page .date-cell .day-pillar {
  font-size:9px}
.calendar-page .month-toolbar {
  padding:22px 20px 16px}
.calendar-page .date-toolbar {
  padding:0 20px 17px}
.calendar-page .cover-date {
  gap:13px}
.calendar-page .cover-date>strong {
  font-size:65px}
.calendar-page .cover-date h2 {
  font-size:19px}
}

@media(max-width:850px) {
  .calendar-page .workspace {
  grid-template-columns:1fr}
.calendar-page .day-panel {
  grid-row:2}
.calendar-page .masthead {
  height:103px;
  margin-bottom:22px}
.calendar-page .calendar-column {
  display:contents}
.calendar-page .calendar-card {
  grid-row:1}
.calendar-page .day-facts {
  grid-row:3}
.calendar-page .day-facts {
  margin-top:0}
.calendar-page .panel-content {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
  padding:24px}
.calendar-page .day-status {
  grid-column:1/-1;
  margin-bottom:0}
.calendar-page .activity-section {
  border:0;
  padding:0}
.calendar-page .gods-section {
  padding:0;
  border:0}
.calendar-page .directions-section, .calendar-page .flying-section {
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:0}
.calendar-page .cover-date>strong {
  font-size:64px}
.calendar-page .cover-date {
  margin:13px 0 0}
.calendar-page .cover-date h2 {
  font-size:23px}
.calendar-page .cover-seal {
  margin-right:3px}
.calendar-page .date-cell {
  min-height:95px}
.calendar-page .settings {
  gap:14px}
.calendar-page .header-right {
  gap:0}
}

@media(max-width:520px) {
  .calendar-page .page-shell {
  padding:0 14px}
.calendar-page .masthead {
  height:96px;
  margin-bottom:18px}
.calendar-page .seal {
  font-size:17px}
.calendar-page .text-button {
  font-size:11px}
.calendar-page .month-toolbar {
  padding:19px 16px 16px}
.calendar-page h1 {
  font-size:28px}
.calendar-page h1 small {
  font-size:17px}
.calendar-page .eyebrow {
  font-size:10px;
  letter-spacing:0}
.calendar-page .date-toolbar {
  padding:0 16px 15px;
  gap:6px}
.calendar-page .month-terms {
  font-size:10px}
.calendar-page .calendar-grid {
  gap:1px}
.calendar-page .date-cell {
  min-height:84px;
  padding:10px 5px;
  gap:6px}
.calendar-page .date-cell .solar-number {
  font-size:23px}
.calendar-page .date-cell .lunar-label {
  font-size:10px}
.calendar-page .date-cell .day-pillar {
  font-size:9px;
  letter-spacing:0}
.calendar-page .today-mark {
  right:4px;
  top:8px;
  font-size:8px;
  border:0;
  padding:0}
.calendar-page .calendar-legend {
  padding:12px;
  font-size:9px;
  gap:11px}
.calendar-page .legend-hint {
  font-size:9px}
.calendar-page .panel-content {
  display:block;
  padding:20px}
.calendar-page .day-status {
  margin-bottom:20px}
.calendar-page .activity-section {
  padding-bottom:20px;
  border-bottom:1px solid var(--line)}
.calendar-page .gods-section {
  padding:22px 0;
  border-bottom:1px solid var(--line)}
.calendar-page .directions-section {
  border:0;
  margin-bottom:22px}
.calendar-page .flying-section {
  padding-top:20px}
.calendar-page .god-tags span {
  font-size:12px}
.calendar-page .god-tags {
  gap:7px}
.calendar-page .day-facts {
  padding:19px 17px}
.calendar-page .detail-facts {
  grid-template-columns:1fr;
  gap:8px}
.calendar-page .detail-facts .wide {
  grid-column:auto}
.calendar-page .settings label {
  flex:1;
  min-width:130px}
.calendar-page .settings select {
  width:100%}
.calendar-page footer {
  font-size:9px;
  gap:5px}
.calendar-page footer p {
  font-size:9px}
.calendar-page .cover-top {
  letter-spacing:1px}
.calendar-page .weekdays {
  font-size:10px}
.calendar-page .workspace {
  gap:16px}
}

@media(prefers-reduced-motion:no-preference) {
  .calendar-page button {
  transition:background .12s ease}
.calendar-page .workspace {
  transition:opacity .12s ease}
}


/* Match the site's glass workspace, without changing global navigation or other tools. */
.calendar-page { grid-column: 1 / -1; min-width: 0; width: 100%; background: transparent; --paper: rgba(255,253,249,.94); --serif: var(--font-serif); }
.calendar-page .page-shell { max-width: none; padding: 0; }
.calendar-page .masthead { min-height: 104px; height: auto; padding: 20px 24px; margin: 0 0 22px; background: rgba(255,255,255,.68); border: 1px solid rgba(255,255,255,.8); border-radius: 20px; backdrop-filter: blur(24px); box-shadow: 0 12px 34px rgba(30,41,59,.1); gap: 16px; }
.calendar-page .calendar-heading { display: flex; align-items: center; gap: 15px; }
.calendar-page .back-link { font-size: 13px; color: #617084; margin-right: 8px; padding-right: 20px; border-right: 1px solid var(--line); white-space: nowrap; }
.calendar-page .seal { padding: 7px; font-size: 24px; }
.calendar-page .calendar-eyebrow { color: var(--red); font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; margin: 0 0 2px; }
.calendar-page .calendar-heading h1 { font-size: 25px; margin: 0; line-height: 1.4; letter-spacing: 3px; }
.calendar-page .calendar-description { font-size: 12px; color: #7d807f; margin-top: 2px; }
.calendar-page #month-title { font-family: var(--serif); font-size: 32px; font-weight: 500; line-height: 1.3; letter-spacing: 1px; }
.calendar-page #month-title small { font-size: 19px; margin-left: 10px; color: #79746a; }
.calendar-page .calendar-card, .calendar-page .day-panel, .calendar-page .day-facts { border-radius: 16px; overflow: hidden; border-color: rgba(255,255,255,.85); box-shadow: 0 10px 35px rgba(30,41,59,.07); backdrop-filter: blur(18px); }
.calendar-page .date-cell { background: rgba(255,253,249,.96); }
.calendar-page .date-cell.selected { background: #a43d32; }
.calendar-page .date-cell.outside { background: #f5f2ec; }
.calendar-page .date-cell.selected .solar-number { color: #fff5e9; }
.calendar-page .settings { border-radius: 14px; background: rgba(255,253,249,.9); }
.calendar-page footer { border: 0; margin: 0; text-align: left; background: transparent; color: #657180; font-size: 11px; padding-bottom: 8px; }
.calendar-page footer p { color: #657180; font-size: 11px; }
.calendar-page .text-button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
.calendar-page .day-cover { background: linear-gradient(135deg,#f0eade,#f5efdf); }
.calendar-page .day-panel { border-top: 3px solid #a13c32; }
.calendar-page .date-cell .lunar-label { font-size: 12px; }
.calendar-page .date-cell .day-pillar { font-size: 11px; }
.calendar-page .god-tags span { font-size: 12px; }
.calendar-page .activity-line p { font-size: 13px; }
.calendar-page .section-footnote { line-height: 1.8; font-size: 11px; }
@media(max-width:520px) {
 .calendar-page .masthead { padding: 15px; flex-wrap: wrap; border-radius: 15px; gap: 12px; }
 .calendar-page .calendar-heading { gap: 10px; }
 .calendar-page .calendar-heading h1 { font-size: 22px; }
 .calendar-page .back-link { padding-right: 10px; margin-right: 0; font-size: 12px; }
 .calendar-page .calendar-description { font-size: 11px; }
 .calendar-page .calendar-eyebrow { display: none; }
 .calendar-page .header-right { margin-left: auto; }
 .calendar-page .text-button { font-size: 11px; padding: 6px 10px; }
 .calendar-page .date-cell .lunar-label { font-size: 10px; }
 .calendar-page .date-cell .day-pillar { font-size: 10px; }
 .calendar-page .date-cell { padding-left: 5px; padding-right: 4px; }
}

/* Desktop calendar density: keep the month and daily almanac usable on a 1366×768 screen. */
@media(min-width:851px) {
 .calendar-page .masthead { min-height: 64px; padding: 10px 16px; margin-bottom: 14px; border-radius: 16px; }
 .calendar-page .calendar-heading { gap: 11px; }
 .calendar-page .back-link { padding-right: 14px; }
 .calendar-page .seal { padding: 5px; font-size: 20px; }
 .calendar-page .calendar-eyebrow { display: none; }
 .calendar-page .calendar-heading h1 { font-size: 21px; line-height: 1.2; }
 .calendar-page .calendar-description { font-size: 11px; }
 .calendar-page .header-right { gap: 14px; }
 .calendar-page .text-button { padding: 7px 10px; }

 .calendar-page .workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
 .calendar-page .month-toolbar { padding: 13px 18px 8px; }
 .calendar-page .eyebrow { margin-bottom: 3px; }
 .calendar-page #month-title { font-size: 27px; line-height: 1.2; }
 .calendar-page #month-title small { font-size: 16px; }
 .calendar-page .date-toolbar { padding: 0 18px 10px; }
 .calendar-page .weekdays { height: 29px; }
 .calendar-page .calendar-grid { grid-auto-rows: 72px; }
 .calendar-page .date-cell { height: 72px; min-height: 72px; padding: 8px 8px 7px; gap: 5px; overflow: hidden; }
 .calendar-page .date-cell .solar-number { font-size: 21px; }
 .calendar-page .date-cell .lunar-label { font-size: 10px; }
 .calendar-page .date-cell .day-pillar { font-size: 9px; }
 .calendar-page .today-mark { top: 7px; right: 7px; }
 .calendar-page .calendar-legend { padding: 9px 14px; }

 .calendar-page .day-cover { padding: 13px 16px 11px; }
 .calendar-page .cover-date { gap: 12px; margin: 8px 0 3px; }
 .calendar-page .cover-date>strong { font-size: 52px; }
 .calendar-page .cover-date h2 { margin-top: 4px; font-size: 17px; }
 .calendar-page .selected-festivals { margin-top: 7px; }
 .calendar-page .panel-content { padding: 13px 16px; }
 .calendar-page .day-status { margin-bottom: 11px; }
 .calendar-page .day-status span { padding: 3px 6px; }
 .calendar-page .activity-section { padding-bottom: 11px; }
 .calendar-page .activity-line { gap: 9px; margin-bottom: 8px; }
 .calendar-page .activity-symbol { width: 26px; height: 26px; font-size: 18px; }
 .calendar-page .activity-line p { padding-top: 1px; font-size: 11px; line-height: 1.65; }
 .calendar-page .gods-section { padding: 13px 0; }
 .calendar-page .god-group+.god-group { margin-top: 11px; }
 .calendar-page .god-group h3 { margin-bottom: 7px; }
 .calendar-page .god-tags { gap: 4px; }
 .calendar-page .god-tags span { padding: 3px 6px; font-size: 10px; }
 .calendar-page .section-heading { margin-bottom: 10px; }
 .calendar-page .directions-section { padding-top: 13px; }
 .calendar-page .directions { gap: 7px 6px; }
 .calendar-page .direction { gap: 3px; font-size: 11px; }
 .calendar-page .flying-section { margin-top: 13px; padding-top: 13px; }
 .calendar-page .flying-section p { margin-top: 5px; }
 .calendar-page .flying-section>.section-heading>span { margin-top: 7px; }
}

/* Reference-calendar hierarchy: the month is primary; the side panel explains one day. */
@media(min-width:851px) {
 .calendar-page .workspace { grid-template-columns: minmax(0, 1fr) 336px; }
 .calendar-page .calendar-card { border-color: rgba(210,205,195,.9); }
 .calendar-page .weekdays { background: rgba(244,241,233,.96); font-weight: 600; letter-spacing: .5px; }
 .calendar-page .date-cell { align-items: center; justify-content: center; text-align: center; }
 .calendar-page .date-cell .solar-number { font-size: 24px; font-weight: 600; }
 .calendar-page .date-cell .lunar-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 .calendar-page .date-cell .day-pillar { display: none; }
 .calendar-page .date-cell.outside { opacity: .55; }
 .calendar-page .date-cell.selected { box-shadow: inset 0 0 0 2px #a43d32, inset 0 0 0 3px rgba(255,249,238,.58); }
 .calendar-page .today-mark { top: 5px; right: 6px; }

 .calendar-page .day-cover { padding: 12px 18px 14px; text-align: center; }
 .calendar-page .cover-top { font-size: 10px; letter-spacing: 1.4px; }
 .calendar-page .cover-date { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 2px; margin: 7px 0 0; }
 .calendar-page .cover-date>div { display: contents; }
 .calendar-page .cover-date>div>span { order: -2; font-size: 10px; }
 .calendar-page .cover-date>strong { order: -1; font-size: 66px; line-height: .95; letter-spacing: -2px; }
 .calendar-page .cover-date h2 { margin: 4px 0 0; font-size: 18px; }
 .calendar-page .cover-seal { display: none; }
 .calendar-page .selected-festivals { justify-content: center; margin-top: 8px; }
 .calendar-page .panel-content { background: rgba(255,253,249,.72); }
 .calendar-page .day-status { justify-content: center; }
 .calendar-page .activity-line { padding: 8px 9px; margin-bottom: 6px; border-radius: 7px; background: rgba(238,243,234,.8); }
 .calendar-page .activity-line.taboo { background: rgba(247,236,230,.8); }
 .calendar-page .activity-line p { text-align: left; }
 .calendar-page .gods-section .section-heading h2,
 .calendar-page .directions-section .section-heading h2 { font-size: 15px; }
}

/* The detailed day pillar is already available below the grid. */
.calendar-page .date-cell .day-pillar { display: none; }

@media(max-width:520px) {
 .calendar-page .date-cell { min-height: 68px; height: 68px; gap: 3px; }
}

/* Avoid flat, banner-like cells on taller desktop displays. */
@media(min-width:851px) and (min-height:850px) {
 .calendar-page .calendar-grid { grid-auto-rows: 78px; }
 .calendar-page .date-cell { height: 78px; min-height: 78px; gap: 6px; padding-top: 9px; padding-bottom: 8px; }
}

@media(min-width:851px) and (min-height:1000px) {
 .calendar-page .calendar-grid { grid-auto-rows: 84px; }
 .calendar-page .date-cell { height: 84px; min-height: 84px; gap: 8px; padding-top: 11px; padding-bottom: 10px; }
}

/* Desktop reading size: almanac content is primary information, not fine print. */
@media(min-width:851px) {
 .calendar-page .weekdays { font-size: 13px; }
 .calendar-page .date-cell .solar-number { font-size: clamp(27px, 1.65vw, 34px); }
 .calendar-page .date-cell .lunar-label { font-size: clamp(12px, .72vw, 14px); line-height: 1.25; }
 .calendar-page .month-terms { font-size: 13px; }
 .calendar-page .calendar-legend { font-size: 11px; }

 .calendar-page .cover-top { font-size: 11px; }
 .calendar-page .cover-date>div>span { font-size: 11px; }
 .calendar-page .cover-date h2 { font-size: 20px; }
 .calendar-page .selected-festivals span { font-size: 11px; }
 .calendar-page .day-status span { font-size: 11px; }
 .calendar-page .activity-symbol { font-size: 20px; }
 .calendar-page .activity-line p { font-size: 14px; line-height: 1.72; }
 .calendar-page .gods-section .section-heading h2,
 .calendar-page .directions-section .section-heading h2 { font-size: 17px; }
 .calendar-page .section-heading>span { font-size: 11px; }
 .calendar-page .god-group h3 { font-size: 12px; }
 .calendar-page .god-tags span { padding: 5px 8px; font-size: 13px; line-height: 1.25; }
 .calendar-page .direction { font-size: 14px; }
 .calendar-page .direction small { font-size: 12px; }
 .calendar-page .flying-section h2 { font-size: 17px; }
 .calendar-page .flying-section p { font-size: 10px; }
 .calendar-page .flying-section>.section-heading>span { font-size: 12px; }
 .calendar-page .day-status span { padding: 5px 9px; border-color: #cfc8bc; background: rgba(255,255,255,.64); color: #514c44; font-size: 13px; font-weight: 600; }
 .calendar-page .day-status span:first-child { border-color: #9fbaa7; background: #eef4ed; color: #365f4d; }
 .calendar-page .god-group h3 { margin-bottom: 9px; color: #403c35; font-size: 14px; font-weight: 650; }
 .calendar-page .god-group h3 .legend-dot { width: 7px; height: 7px; }
 .calendar-page #god-count { color: #625d54; font-size: 12px; font-weight: 600; }
}

/* Day facts belong to the selected-day panel. */
.calendar-page .side-facts {
 margin: 16px 0 0;
 padding: 16px 0 0;
 background: transparent;
 border: 0;
 border-top: 1px solid var(--line);
 border-radius: 0;
 box-shadow: none;
 backdrop-filter: none;
 overflow: visible;
}
.calendar-page .side-facts .section-heading h2 { font-size: 17px; }
.calendar-page .side-facts .section-heading>span { font-size: 11px; }
.calendar-page .side-facts .pillar-row { padding-bottom: 14px; margin-bottom: 12px; }
.calendar-page .side-facts .pillar-item span { margin-bottom: 5px; color: #625d54; font-size: 12px; font-weight: 600; }
.calendar-page .side-facts .pillar-item strong { margin-left: 2px; font-size: 20px; letter-spacing: 2px; }
.calendar-page .side-facts .detail-facts { grid-template-columns: 1fr; gap: 9px; color: #36332e; font-size: 14px; line-height: 1.65; }
.calendar-page .side-facts .detail-facts .wide { grid-column: auto; }
.calendar-page .side-facts .fact-label { display: inline-block; min-width: 62px; margin-right: 8px; color: #6a645a; font-size: 13px; font-weight: 600; }

@media(max-width:850px) {
 .calendar-page .side-facts { grid-column: 1 / -1; grid-row: auto; margin-top: 18px; }
}

.calendar-page .settings input {
 width: 120px;
 min-height: 34px;
 padding: 7px 8px;
 border-radius: 5px;
}
.calendar-page .location-button {
 align-self: end;
 min-height: 34px;
 padding: 0 13px;
 border-radius: 6px;
 color: var(--green);
 font-size: 12px;
 font-weight: 650;
}
.calendar-page .calendar-location-trigger { align-self: end; width: auto; min-width: 210px; min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.calendar-page .sky-section {
 margin-top: 20px;
 padding: 21px 25px;
 background: var(--paper);
 border: 1px solid rgba(255,255,255,.85);
 border-radius: 16px;
 box-shadow: 0 10px 35px rgba(30,41,59,.07);
 backdrop-filter: blur(18px);
 overflow: hidden;
}
.calendar-page .sky-section .section-heading h2 { font-family: var(--serif); font-size: 21px; }
.calendar-page .sky-section .section-heading>span { color: #5f6a66; font-size: 12px; font-weight: 600; }
.calendar-page .sky-grid {
 display: grid;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 8px;
}
.calendar-page .sky-item {
 min-width: 0;
 padding: 14px 15px 13px;
 border: 1px solid #e7e1d7;
 border-radius: 9px;
 background: rgba(249,247,241,.9);
 display: grid;
 gap: 6px;
}
.calendar-page .sky-item>span { color: #6d675e; font-size: 12px; font-weight: 650; }
.calendar-page .sky-item strong { overflow: hidden; color: #292722; font-family: var(--serif); font-size: 21px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.calendar-page .sky-item small { overflow: hidden; color: #777168; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-page .sky-item.sun { border-color: #eadac0; background: rgba(250,244,229,.9); }
.calendar-page .sky-item.sun strong { color: #9a5b2f; }
.calendar-page .sky-item.moon { border-color: #d9e0df; background: rgba(239,244,242,.9); }
.calendar-page .sky-item.moon strong { color: #41675d; }
.calendar-page .sky-item.zodiac { border-color: #ded9e9; background: rgba(244,241,249,.9); }
.calendar-page .sky-item.zodiac strong { color: #5f5476; }
.calendar-page .sky-loading { grid-column: 1 / -1; padding: 28px; color: var(--muted); text-align: center; font-size: 13px; }
.calendar-page .sky-loading.error { color: var(--red); }
.calendar-page .sky-section .section-footnote { margin-top: 14px; color: #665f56; font-size: 12px; }

@media(max-width:850px) {
 .calendar-page .sky-section { grid-row: 3; margin-top: 0; }
 .calendar-page .sky-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media(max-width:520px) {
 .calendar-page .settings input { width: 100%; }
 .calendar-page .location-button { width: 100%; }
 .calendar-page .sky-section { padding: 19px 17px; }
 .calendar-page .sky-section .section-heading { align-items: flex-start; flex-direction: column; }
 .calendar-page .sky-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .calendar-page .sky-item { padding: 12px 10px; }
 .calendar-page .sky-item strong { font-size: 19px; }
}

/* Phones need the same readable type in a much shorter vertical rhythm. */
@media(max-width:520px) {
 .calendar-page .month-toolbar { padding: 12px 14px 8px; }
 .calendar-page .month-toolbar .eyebrow { margin-bottom: 3px; }
 .calendar-page #month-title { font-size: 29px; line-height: 1.15; }
 .calendar-page #month-title small { font-size: 17px; }
 .calendar-page .date-toolbar { padding: 0 14px 9px; }
 .calendar-page .weekdays { height: 30px; border-bottom: 0; }
 .calendar-page .calendar-grid { grid-auto-rows: 56px; gap: 0; padding: 3px 5px 5px; background: transparent; }
 .calendar-page .date-cell { width: 100%; min-height: 56px; height: 56px; padding: 6px 3px 5px; gap: 2px; align-items: center; justify-content: center; text-align: center; background: transparent; }
 .calendar-page .date-cell:hover { background: rgba(244,240,229,.72); }
 .calendar-page .date-cell.outside,
 .calendar-page .empty-cell { background: transparent; }
 .calendar-page .date-cell.selected { width: 100%; height: 50px; min-height: 50px; margin: 3px 0; border-radius: 10px; box-shadow: 0 6px 14px rgba(161,60,50,.28); }
 .calendar-page .date-cell .solar-number { font-size: 23px; line-height: 1; }
 .calendar-page .date-cell .lunar-label { font-size: 10px; line-height: 1.15; }
 .calendar-page .today-mark { top: 4px; right: 3px; }
 .calendar-page .calendar-legend { padding: 9px 12px; }

 .calendar-page .day-cover { padding: 13px 16px 12px; }
 .calendar-page .cover-date { margin: 9px 0 2px; }
 .calendar-page .cover-date>strong { font-size: 54px; }
 .calendar-page .cover-date h2 { font-size: 20px; margin-top: 5px; }
 .calendar-page .selected-festivals { margin-top: 7px; }
 .calendar-page .panel-content { padding: 15px 16px; }
 .calendar-page .day-status { margin-bottom: 14px; }
 .calendar-page .activity-section { padding-bottom: 14px; }
 .calendar-page .activity-line { margin-bottom: 10px; }
 .calendar-page .gods-section { padding: 16px 0; }
 .calendar-page .god-group+.god-group { margin-top: 13px; }
 .calendar-page .directions-section { margin-bottom: 16px; }
 .calendar-page .flying-section { padding-top: 15px; }
 .calendar-page .side-facts { margin-top: 13px; padding-top: 13px; }

 .calendar-page .sky-section { padding: 15px 13px; }
 .calendar-page .sky-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
 .calendar-page .sky-item { padding: 9px 7px; gap: 4px; }
 .calendar-page .sky-item>span { font-size: 11px; }
 .calendar-page .sky-item strong { font-size: 17px; }
 .calendar-page .sky-item small { font-size: 9px; }
 .calendar-page .sky-section .section-footnote { margin-top: 10px; }
}

/* Calendar dates are an open typographic field; only the selected day is a tile. */
.calendar-page .calendar-grid { gap: 0; background: transparent; }
.calendar-page .date-cell,
.calendar-page .date-cell.outside,
.calendar-page .empty-cell { background: transparent; }
.calendar-page .date-cell:hover { background: rgba(244,240,229,.72); }
.calendar-page .date-cell.selected:hover { background: #8f332a; box-shadow: 0 9px 20px rgba(118,37,30,.34); }
.calendar-page .date-cell.selected:focus-visible { outline: 3px solid rgba(164,61,50,.34); outline-offset: 3px; }

/* Keep the current-day glyph beside the numeral instead of laying it over it. */
.calendar-page .today-mark {
 left: calc(50% + 19px);
 right: auto;
 top: 8px;
 padding: 0;
 border: 0;
 background: transparent;
 font-size: 9px;
 font-weight: 750;
 line-height: 1;
}
.calendar-page .date-cell.selected .today-mark { color: #fff5e9; }

@media(min-width:521px) {
 .calendar-page .calendar-grid { padding: 5px 8px 7px; }
 .calendar-page .date-cell { align-items: center; justify-content: center; text-align: center; }
 .calendar-page .date-cell.selected { justify-self: center; width: min(calc(100% - 12px),68px); height: auto; min-height: 0; aspect-ratio: 1; margin: 2px 6px; border-radius: 3px; box-shadow: 0 8px 18px rgba(161,60,50,.24); }
}

@media(max-width:520px) {
 .calendar-page .today-mark { left: calc(50% + 15px); top: 7px; }
 .calendar-page .date-cell.selected:hover { background: #8f332a; }
}

/* Desktop is a balanced almanac desk: selected-day summary, square month, details. */
.calendar-page .summary-panel { min-width: 0; display: grid; gap: 16px; align-content: start; }
.calendar-page .summary-panel .day-cover {
 overflow: hidden;
 border: 1px solid rgba(255,255,255,.85);
 border-top: 3px solid #a13c32;
 border-radius: 16px;
 box-shadow: 0 10px 35px rgba(30,41,59,.07);
 backdrop-filter: blur(18px);
}
.calendar-page .summary-panel .sky-section { margin-top: 0; }
.calendar-page .side-panel-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.calendar-page .side-panel-heading h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.calendar-page .side-panel-heading span { color: var(--muted); font-size: 11px; }

@media(min-width:1101px) {
 .calendar-page .workspace {
  grid-template-columns: minmax(220px,250px) minmax(560px,680px) minmax(300px,330px);
  justify-content: center;
  gap: 16px;
 }
 .calendar-page .summary-panel { grid-column: 1; }
 .calendar-page .calendar-column { grid-column: 2; }
 .calendar-page .day-panel { grid-column: 3; }
 .calendar-page .calendar-grid { grid-auto-rows: auto; }
 .calendar-page .date-cell,
 .calendar-page .empty-cell { width: 100%; height: auto; min-height: 0; aspect-ratio: 1; }
 .calendar-page .date-cell { padding: 8px 5px 7px; }
 .calendar-page .date-cell.selected {
  width: calc(100% - 10px);
  height: auto;
  min-height: 0;
  margin: 5px;
  aspect-ratio: 1;
  border-radius: 12px;
 }
 .calendar-page .summary-panel .sky-section { padding: 16px 14px; }
 .calendar-page .summary-panel .sky-section .section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
 .calendar-page .summary-panel .sky-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
 .calendar-page .summary-panel .sky-item { padding: 10px 8px; gap: 4px; }
 .calendar-page .summary-panel .sky-item>span { font-size: 11px; }
 .calendar-page .summary-panel .sky-item strong { font-size: 17px; }
 .calendar-page .summary-panel .sky-item small { font-size: 9px; }
 .calendar-page .summary-panel .section-footnote { font-size: 10px; line-height: 1.65; }
}

@media(min-width:851px) and (max-width:1100px) {
 .calendar-page .workspace { grid-template-columns: minmax(0,1fr) 315px; }
 .calendar-page .calendar-column { grid-column: 1; grid-row: 1 / span 2; }
 .calendar-page .summary-panel { grid-column: 2; grid-row: 1; }
 .calendar-page .day-panel { grid-column: 2; grid-row: 2; }
 .calendar-page .summary-panel .sky-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media(max-width:850px) {
 .calendar-page .calendar-column { display: block; grid-row: 1; }
 .calendar-page .summary-panel { grid-row: 2; }
 .calendar-page .day-panel { grid-row: 3; }
 .calendar-page .summary-panel .sky-section { grid-row: auto; }
 .calendar-page .summary-panel .day-cover { border-radius: 16px; }
}

/* Primary controls and side-panel data must remain readable in the three-column desk. */
.calendar-page .settings-button {
 min-height: 42px;
 padding: 10px 16px;
 border: 1px solid #8f332a;
 border-radius: 10px;
 background: #a43d32;
 color: #fff9ee;
 box-shadow: 0 6px 16px rgba(118,37,30,.2);
 font-size: 14px;
 font-weight: 700;
 letter-spacing: .3px;
}
.calendar-page .settings-button span { margin: 0 6px 0 0; font-size: 17px; }
.calendar-page .settings-button:hover,
.calendar-page .settings-button[aria-expanded="true"] { background: #873027; color: #fff; }
.calendar-page .settings-button:focus-visible { outline: 3px solid rgba(164,61,50,.3); outline-offset: 3px; }

.calendar-page .directions-section .section-heading h2,
.calendar-page .flying-section h2 { font-size: 20px; }
.calendar-page .directions-section .section-heading>span { font-size: 12px; color: #655f55; }
.calendar-page .directions { gap: 8px; }
.calendar-page .direction {
 min-width: 0;
 gap: 4px;
 padding: 9px 7px;
 border: 1px solid #e3ddd1;
 border-radius: 8px;
 background: rgba(248,245,237,.88);
 text-align: center;
}
.calendar-page .direction small { color: #716a60; font-size: 12px; font-weight: 650; }
.calendar-page .direction span { color: #2f2c27; font-family: var(--serif); font-size: 16px; font-weight: 600; }

.calendar-page .flying-section { align-items: center; gap: 14px; }
.calendar-page .flying-section p { margin-top: 7px; color: #5f594f; font-size: 13px; font-weight: 600; line-height: 1.5; }
.calendar-page .flying-section>.section-heading>span { margin-top: 9px; color: #665f54; font-size: 14px; font-weight: 600; }
.calendar-page .flying-board {
 grid-template-columns: repeat(3,42px);
 gap: 3px;
 padding: 4px;
 border: 1px solid #cfc5b5;
 border-radius: 11px;
 background: #ddd6ca;
 box-shadow: inset 0 0 0 1px rgba(255,255,255,.65), 0 5px 14px rgba(63,48,34,.1);
}
.calendar-page .flying-board span {
 width: 42px;
 height: 42px;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 gap: 1px;
 border-radius: 6px;
 background: #faf7ef;
 color: #4e493f;
}
.calendar-page .flying-board span b { font-family: var(--serif); font-size: 21px; font-weight: 600; line-height: 1; }
.calendar-page .flying-board span small { color: #7b7468; font-size: 9px; font-weight: 650; line-height: 1; }
.calendar-page .flying-board span:nth-child(5) { background: #a43d32; color: #fff9ee; }
.calendar-page .flying-board span:nth-child(5) small { color: #f5ddd2; }

.calendar-page .summary-panel .sky-item>span { color: #5f594f; font-size: 12px; font-weight: 700; }
.calendar-page .summary-panel .sky-item strong { font-size: 19px; line-height: 1.15; }
.calendar-page .summary-panel .sky-item small { color: #6b655c; font-size: 11px; line-height: 1.35; white-space: normal; }
.calendar-page .summary-panel .section-footnote { color: #5e584f; font-size: 12px; line-height: 1.7; }

@media(max-width:520px) {
 .calendar-page .settings-button { min-height: 38px; padding: 8px 12px; font-size: 13px; }
 .calendar-page .flying-board { grid-template-columns: repeat(3,40px); }
 .calendar-page .flying-board span { width: 40px; height: 40px; }
}

/* A nine-palace chart is one continuous board, not nine detached cards. */
.calendar-page .flying-board {
 --palace-cell: 42px;
 width: calc(var(--palace-cell) * 3 + 4px);
 height: calc(var(--palace-cell) * 3 + 4px);
 grid-template-columns: repeat(3,var(--palace-cell));
 grid-template-rows: repeat(3,var(--palace-cell));
 gap: 0;
 padding: 0;
 overflow: hidden;
 border: 2px solid #9b8e7b;
 border-radius: 5px;
 background: #d2c8b8;
 box-shadow: 0 5px 14px rgba(63,48,34,.1);
}
.calendar-page .flying-board span {
 width: var(--palace-cell);
 height: var(--palace-cell);
 margin: 0;
 gap: 2px;
 border: 0;
 border-right: 1px solid #c9bead;
 border-bottom: 1px solid #c9bead;
 border-radius: 0;
 background: #faf7ef;
}
.calendar-page .flying-board span:nth-child(3n) { border-right: 0; }
.calendar-page .flying-board span:nth-child(n+7) { border-bottom: 0; }
.calendar-page .flying-board span:nth-child(5) { background: #efe2d3; color: #a43d32; }
.calendar-page .flying-board span:nth-child(5) small { color: #8d6557; }

@media(max-width:520px) {
 .calendar-page .flying-board { --palace-cell: 40px; }
}

/* Readable side panels: these are data, not captions. */
.calendar-page .summary-panel .sky-section .section-heading h2 { font-size: 23px; }
.calendar-page .summary-panel .sky-section .section-heading>span { color: #4f4a43; font-size: 13px; line-height: 1.5; }
.calendar-page .summary-panel .sky-item>span { font-size: 14px; }
.calendar-page .summary-panel .sky-item strong {
 font-family: inherit;
 font-size: 21px;
 font-variant-numeric: tabular-nums;
 letter-spacing: 0;
}
.calendar-page .summary-panel .sky-item small { font-size: 13px; }
.calendar-page .summary-panel .section-footnote { font-size: 13px; line-height: 1.75; }

.calendar-page .directions-section .section-heading h2 { font-size: 22px; }
.calendar-page .directions-section .section-heading>span { font-size: 14px; }
.calendar-page .direction small { font-size: 14px; }
.calendar-page .direction span { font-size: 19px; }

.calendar-page .flying-section h2 { font-size: 22px; }
.calendar-page .flying-section p { font-size: 15px; }
.calendar-page .flying-section>.section-heading>span { font-size: 16px; }
.calendar-page .flying-board span b { font-size: 23px; }
.calendar-page .flying-board span small { font-size: 11px; }

@media(min-width:1101px) {
 .calendar-page .summary-panel .sky-grid { grid-template-columns: 1fr; }
 .calendar-page .summary-panel .sky-item {
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 12px 13px;
 }
 .calendar-page .summary-panel .sky-item>span { grid-column: 1; grid-row: 1; }
 .calendar-page .summary-panel .sky-item strong { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
 .calendar-page .summary-panel .sky-item small { grid-column: 1; grid-row: 2; }
}

@media(max-width:520px) {
 .calendar-page .summary-panel .sky-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .calendar-page .summary-panel .sky-item>span { font-size: 13px; }
 .calendar-page .summary-panel .sky-item strong { font-size: 20px; }
 .calendar-page .summary-panel .sky-item small { font-size: 12px; }
 .calendar-page .direction small { font-size: 13px; }
 .calendar-page .direction span { font-size: 18px; }
}

/* Large-type almanac baseline for older readers. */
.calendar-page .back-link,
.calendar-page .calendar-description { font-size: 14px; }
.calendar-page .settings,
.calendar-page .settings label,
.calendar-page .settings select,
.calendar-page .settings input,
.calendar-page .settings button,
.calendar-page .settings p { font-size: 14px; line-height: 1.6; }
.calendar-page .calendar-location-trigger b,
.calendar-page .calendar-location-trigger span { font-size: 14px; }
.calendar-page .location-button { font-size: 14px; }

.calendar-page .cover-top,
.calendar-page .cover-date>div>span,
.calendar-page .selected-festivals span { font-size: 14px; }
.calendar-page .summary-panel .sky-section .section-heading>span,
.calendar-page .summary-panel .sky-item small,
.calendar-page .summary-panel .section-footnote { font-size: 14px; }

.calendar-page .eyebrow { font-size: 14px; }
.calendar-page .today-button,
.calendar-page .icon-button,
.calendar-page .date-toolbar,
.calendar-page .date-toolbar input,
.calendar-page .date-toolbar select,
.calendar-page .jump-button { font-size: 14px; }
.calendar-page .date-toolbar span { font-size: 14px; }
.calendar-page .month-terms { font-size: 14px; }
.calendar-page .weekdays { font-size: 15px; }
.calendar-page .date-cell .lunar-label { font-size: 14px; }
.calendar-page .today-mark { font-size: 11px; }
.calendar-page .calendar-legend,
.calendar-page .legend-hint { font-size: 14px; }

.calendar-page .side-panel-heading span,
.calendar-page .day-status span,
.calendar-page #god-count,
.calendar-page .section-heading>span { font-size: 14px; }
.calendar-page .activity-line p { font-size: 15px; line-height: 1.8; }
.calendar-page .god-group h3 { font-size: 15px; font-weight: 650; }
.calendar-page .god-tags span { font-size: 14px; }
.calendar-page .side-facts .section-heading h2 { font-size: 22px; }
.calendar-page .side-facts .section-heading>span,
.calendar-page .side-facts .pillar-item span,
.calendar-page .side-facts .fact-label,
.calendar-page .side-facts .detail-facts { font-size: 14px; }
.calendar-page .flying-board span { gap: 0; padding: 0; }
.calendar-page .flying-board span b { font-size: 20px; line-height: 1; }
.calendar-page footer,
.calendar-page footer p { font-size: 14px; }

@media(max-width:520px) {
 .calendar-page .calendar-description { font-size: 13px; }
 .calendar-page .date-cell .lunar-label { font-size: 13px; }
 .calendar-page .calendar-legend,
 .calendar-page .legend-hint { font-size: 13px; }
 .calendar-page .cover-top,
 .calendar-page .cover-date>div>span { font-size: 13px; }
}

/* Month navigation is one stable segmented control; local recomputation must not flash the page. */
.calendar-page .workspace[aria-busy="true"] { opacity: 1; }
.calendar-page .workspace { transition: none; }
.calendar-page .month-actions {
 gap: 0;
 overflow: hidden;
 border: 1px solid #d9d1c4;
 border-radius: 10px;
 background: rgba(255,253,249,.86);
 box-shadow: 0 2px 7px rgba(64,50,36,.06);
}
.calendar-page .month-actions .icon-button,
.calendar-page .month-actions .today-button {
 height: 40px;
 margin: 0;
 border: 0;
 border-right: 1px solid #ddd5c8;
 border-radius: 0;
 background: transparent;
 color: #34312c;
 line-height: 1;
 outline: 0;
 box-shadow: none;
}
.calendar-page .month-actions .icon-button { width: 42px; font-size: 24px; }
.calendar-page .month-actions .year-button { width: 36px; font-size: 21px; }
.calendar-page .month-actions .today-button { min-width: 66px; padding: 0 13px; font-size: 14px; font-weight: 650; }
.calendar-page .month-actions .icon-button:last-child { border-right: 0; }
.calendar-page .month-actions .icon-button:hover,
.calendar-page .month-actions .today-button:hover { background: #f0ebe1; }
.calendar-page .month-actions .icon-button:active,
.calendar-page .month-actions .today-button:active { background: #e7dfd2; }
.calendar-page .month-actions button:focus-visible { box-shadow: inset 0 0 0 2px rgba(164,61,50,.42); }
.calendar-page .month-actions button:disabled { color: #aaa397; background: #f3efe8; }

@media(max-width:520px) {
 .calendar-page .month-actions .icon-button,
 .calendar-page .month-actions .today-button { height: 38px; }
 .calendar-page .month-actions .icon-button { width: 38px; }
 .calendar-page .month-actions .year-button { width: 32px; }
 .calendar-page .month-actions .today-button { min-width: 62px; padding: 0 10px; font-size: 13px; }
}

/* Clear, upright lining numerals for the month grid. */
.calendar-page .date-cell .solar-number {
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", sans-serif;
 font-variant-numeric: lining-nums tabular-nums;
 font-feature-settings: "lnum" 1, "tnum" 1;
}
.calendar-page #month-title,
.calendar-page #month-title small {
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", sans-serif;
 font-variant-numeric: lining-nums tabular-nums;
 font-feature-settings: "lnum" 1, "tnum" 1;
}
.calendar-page .cover-date>strong {
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", sans-serif;
 font-weight: 500;
 font-variant-numeric: lining-nums tabular-nums;
 font-feature-settings: "lnum" 1, "tnum" 1;
 letter-spacing: 0;
}

/* Selecting a day must not steal horizontal room from its festival label. */
@media(min-width:521px) {
 .calendar-page .date-cell.selected {
  width: calc(100% - 2px);
  height: auto;
  min-height: 0;
  max-width: none;
  margin: 1px;
  padding-inline: 3px;
  aspect-ratio: auto;
  align-self: stretch;
 }
}

/* Portrait reading order: calendar, selected day, almanac, then sky data. */
@media(max-width:850px) {
 .calendar-page .summary-panel { display: contents; }
 .calendar-page .calendar-column { grid-row: 1; }
 .calendar-page .summary-panel .day-cover { grid-row: 2; }
 .calendar-page .day-panel { grid-row: 3; }
 .calendar-page .summary-panel .sky-section { grid-row: 4; }
}

/* Unified touch-friendly year and month pickers. */
.calendar-page .date-toolbar {
 display: grid;
 grid-template-columns: auto minmax(0,1fr);
 align-items: start;
 gap: 16px;
}
.calendar-page .date-picker-form {
 display: flex;
 align-items: center;
 gap: 8px;
}
.calendar-page .date-picker-field { position: relative; }
.calendar-page .date-picker-trigger {
 display: grid;
 grid-template-columns: 1fr auto auto;
 align-items: center;
 gap: 5px;
 width: 96px;
 height: 44px;
 padding: 0 11px;
 border: 1px solid #d9d1c4;
 border-radius: 10px;
 background: rgba(255,253,249,.88);
 box-shadow: 0 2px 7px rgba(64,50,36,.05);
 text-align: left;
}
.calendar-page .date-picker-trigger strong {
 font-size: 16px;
 font-weight: 700;
 line-height: 1;
 font-variant-numeric: tabular-nums;
}
.calendar-page .date-picker-trigger span { color: #625d54; font-size: 14px; line-height: 1; }
.calendar-page .date-picker-trigger i { color: #81796e; font-size: 13px; font-style: normal; line-height: 1; }
.calendar-page .date-picker-trigger[aria-expanded="true"] {
 border-color: #a43d32;
 box-shadow: 0 0 0 3px rgba(164,61,50,.1);
}
.calendar-page .date-picker-popover {
 position: absolute;
 z-index: 30;
 top: calc(100% + 9px);
 left: 0;
 width: min(330px, calc(100vw - 52px));
 padding: 13px;
 border: 1px solid rgba(194,182,164,.9);
 border-radius: 14px;
 background: rgba(255,253,249,.98);
 box-shadow: 0 18px 46px rgba(54,40,27,.2);
 backdrop-filter: blur(20px);
}
.calendar-page .month-picker { right: auto; left: 0; width: min(300px, calc(100vw - 52px)); }
.calendar-page .picker-input-row {
 display: grid;
 grid-template-columns: minmax(0,1fr) 64px;
 gap: 7px;
}
.calendar-page .date-picker-popover .picker-input-row input {
 width: 100%;
 height: 40px;
 padding: 0 11px;
 border: 1px solid #d9d1c4;
 border-radius: 9px;
 background: #fff;
 font-size: 16px;
 font-variant-numeric: tabular-nums;
 appearance: textfield;
}
.calendar-page .picker-input-row button,
.calendar-page .year-pager button {
 min-width: 40px;
 height: 40px;
 border: 1px solid #d9d1c4;
 border-radius: 9px;
 background: #f4f0e7;
 font-weight: 700;
}
.calendar-page .year-pager {
 display: grid;
 grid-template-columns: 40px 1fr 40px;
 align-items: center;
 gap: 8px;
 margin: 10px 0;
 text-align: center;
}
.calendar-page .year-pager span { color: #655f55; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.calendar-page .picker-options { display: grid; gap: 6px; }
.calendar-page .year-options { grid-template-columns: repeat(5,minmax(0,1fr)); }
.calendar-page .month-options { grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 12px; }
.calendar-page .picker-options button {
 min-width: 0;
 min-height: 39px;
 padding: 5px 3px;
 border: 1px solid #e2dbcf;
 border-radius: 8px;
 background: #faf7f0;
 font-size: 13px;
 font-variant-numeric: tabular-nums;
}
.calendar-page .picker-options button:hover { border-color: #c7b9a6; background: #f0e9de; }
.calendar-page .picker-options button.active {
 border-color: #a43d32;
 background: #a43d32;
 color: #fff9ee;
 font-weight: 750;
}
.calendar-page .month-events {
 display: grid;
 justify-items: end;
 gap: 3px;
 min-width: 0;
 padding-top: 1px;
 text-align: right;
 line-height: 1.5;
}
.calendar-page .month-events .month-terms { color: var(--green); font-size: 14px; }
.calendar-page .month-phases { color: #675b78; font-size: 13px; font-weight: 600; }

@media(max-width:700px) {
 .calendar-page .date-toolbar { grid-template-columns: 1fr; gap: 10px; }
 .calendar-page .date-picker-form { width: 100%; }
 .calendar-page .date-picker-field { flex: 1 1 0; }
 .calendar-page .date-picker-trigger { width: 100%; }
 .calendar-page .month-picker { right: 0; left: auto; }
 .calendar-page .month-events { justify-items: start; text-align: left; }
 .calendar-page .month-events .month-terms,
 .calendar-page .month-phases { font-size: 14px; }
}

/* Nine-palace hierarchy: heading, orientation, then the uninterrupted 3×3 board. */
.calendar-page .flying-section {
 display: grid;
 grid-template-columns: 1fr;
 align-items: initial;
 justify-items: stretch;
 gap: 10px;
}
.calendar-page .flying-section .section-heading {
 display: flex;
 align-items: baseline;
 justify-content: space-between;
 gap: 12px;
}
.calendar-page .flying-section .section-heading h2 { margin: 0; }
.calendar-page .flying-section .section-heading>span {
 display: inline;
 margin: 0;
 color: #665f54;
 font-size: 14px;
 font-weight: 600;
}
.calendar-page .flying-section .flying-orientation {
 margin: 0;
 color: #5f594f;
 font-size: 13px;
 font-weight: 600;
 text-align: center;
}
.calendar-page .flying-section .flying-board { justify-self: center; }

/* Attribution is functional reading material, so keep it clear over artwork. */
.calendar-page footer {
 margin: 18px 0 6px;
 padding: 15px 18px;
 gap: 8px 18px;
 border: 1px solid rgba(255,255,255,.84);
 border-radius: 14px;
 background: rgba(255,253,249,.9);
 box-shadow: 0 8px 24px rgba(30,41,59,.08);
 backdrop-filter: blur(22px);
 -webkit-backdrop-filter: blur(22px);
 color: #3f4852;
 font-size: 14px;
 font-weight: 550;
 line-height: 1.65;
}
.calendar-page footer p {
 margin: 0;
 color: #4b535c;
 font-size: 14px;
 line-height: 1.75;
}
.calendar-page .calendar-attribution { width: 100%; }
.calendar-page .footer-divider { color: #8b8174; }

@media(max-width:850px) {
 .calendar-page .calendar-column { display: contents; }
 .calendar-page .calendar-card { grid-row: 1; }
 .calendar-page .calendar-attribution { grid-row: 5; }
}

@media(max-width:520px) {
 .calendar-page footer { margin-top: 13px; padding: 13px 14px; font-size: 13px; }
 .calendar-page footer p { font-size: 13px; }
}

/* Calendar labels are curated to sxwnl's A/B density; keep every cell stable. */
@media(min-width:521px) {
 .calendar-page .date-cell { padding-right: 2px; padding-left: 2px; }
 .calendar-page .date-cell.selected { padding-right: 2px; padding-left: 2px; }
}

/* Settings use a real grid so labels, controls and help text keep common baselines. */
.calendar-page .settings {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 align-items: start;
 gap: 18px 20px;
 padding: 22px;
}
.calendar-page .settings label {
 display: grid;
 grid-template-rows: auto 48px auto;
 align-content: start;
 gap: 7px;
 min-width: 0;
 margin: 0;
 font-weight: 600;
}
.calendar-page .settings [hidden] { display: none !important; }
.calendar-page .settings select,
.calendar-page .settings input,
.calendar-page .settings button {
 box-sizing: border-box;
 width: 100%;
 min-width: 0;
 min-height: 48px;
 height: 48px;
 margin: 0;
}
.calendar-page .settings select,
.calendar-page .settings input { padding: 8px 12px; }
.calendar-page .settings .settings-help {
 max-width: none;
 min-height: 4.65em;
 margin: 0;
 color: #655f56;
 font-size: 13px;
 font-weight: 500;
 line-height: 1.55;
}
.calendar-page .settings .calendar-location-trigger {
 grid-column: span 2;
 align-self: end;
 width: 100%;
 min-width: 0;
}
.calendar-page .settings .location-button { align-self: end; }
.calendar-page .settings > p {
 grid-column: 1 / -1;
 margin: 0;
 padding-top: 2px;
}

@media(max-width:850px) {
 .calendar-page .settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .calendar-page .settings .calendar-location-trigger { grid-column: auto; }
 .calendar-page .settings .location-button { grid-column: 1 / -1; }
}

@media(max-width:520px) {
 .calendar-page .settings { grid-template-columns: 1fr; gap: 15px; padding: 17px; }
 .calendar-page .settings label { grid-template-rows: auto 46px auto; }
 .calendar-page .settings select,
 .calendar-page .settings input,
 .calendar-page .settings button { min-height: 46px; height: 46px; }
 .calendar-page .settings .settings-help { min-height: 0; }
 .calendar-page .settings .location-button { grid-column: auto; }
}
