.history-page { padding-bottom: max(48px, env(safe-area-inset-bottom)); }
.history-header { margin-top: 24px; margin-bottom: 28px; }
.history-header p { line-height: 1.7; }
.calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.calendar-heading h2 { font-size: 22px; font-variant-numeric: tabular-nums; }
.month-summary { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.month-controls { display: flex; align-items: center; gap: 2px; }
.month-arrow { border: 1px solid var(--line); background: #fff; }
.today-button { min-width: 48px; }
.calendar-table { width: calc(100% + 8px); margin: 0 -4px; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.calendar-table th { height: 28px; color: var(--muted); font-size: 12px; font-weight: 500; }
.calendar-table td { padding: 0; height: 57px; vertical-align: middle; }
.calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%; min-height: 57px; padding: 5px 0; border: 1px solid transparent; border-radius: 10px; color: var(--ink); background: transparent; font-size: 15px; font-weight: 550; font-variant-numeric: tabular-nums; }
.calendar-day[data-count="some"] { background: #e4eeea; color: #315a50; }
.calendar-day[data-count="many"] { background: #ccdfd6; color: #25483d; }
.calendar-day[aria-current="date"] { border-color: var(--accent); }
.calendar-day[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.calendar-day small { min-height: 15px; font-size: 10px; line-height: 1.5; font-weight: 500; }
.calendar-day:focus-visible { outline-offset: 1px; position: relative; z-index: 1; }
#calendarDays[aria-busy="true"] { opacity: .65; }
.calendar-hint { display: flex; align-items: center; gap: 7px; margin: 15px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.calendar-dot { width: 8px; height: 8px; border-radius: 50%; background: #739e8c; }
.day-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.day-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.day-heading h2 { font-size: 18px; }
.day-count { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.decision-list { list-style: none; margin: 0; padding: 0; }
.decision-entry { padding: 0 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.decision-entry:last-child { margin-bottom: 0; }
.decision-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.egg-label { color: var(--accent-dark); font-weight: 550; }
.decision-result { margin-bottom: 10px; font-size: 20px; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.candidate-details summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); cursor: pointer; list-style: none; font-size: 12px; }
.candidate-details summary::-webkit-details-marker { display: none; }
.candidate-details summary svg { width: 14px; height: 14px; transition: transform 160ms ease; }
.candidate-details[open] summary svg { transform: rotate(180deg); }
.candidate-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.candidate-list li { max-width: 100%; padding: 6px 10px; border-radius: 6px; background: #edf1ed; color: #4b625b; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.candidate-list li.chosen { background: #dcebe4; color: #254b3d; font-weight: 600; }
.history-empty { padding: 20px 10px 28px; text-align: center; }
.history-empty > svg { width: 44px; height: 44px; margin-bottom: 14px; color: #779187; stroke-width: 1.8; }
.history-empty h3 { font-size: 16px; }
.history-empty p { margin: 9px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.history-empty a { text-decoration: none; }
.history-error { margin: 12px 0; color: #9c3d2a; font-size: 13px; line-height: 1.7; }
.day-loading { padding: 12px 0 24px; color: var(--muted); font-size: 13px; }
@media (hover: hover) { .calendar-day:hover:not([aria-pressed="true"]) { background: #d8e6df; color: #254b3d; } }
@media (max-width: 359px) {
  .calendar-heading { gap: 6px; }
  .calendar-heading h2 { font-size: 19px; }
  .month-controls { gap: 0; }
  .month-arrow { min-width: 40px; padding: 8px; }
  .today-button { min-width: 40px; }
  .calendar-day { font-size: 14px; }
}
