/* The annual grid keeps the existing forest-and-brass identity, with compact
   tables that remain legible at phone width and useful without JavaScript. */
.pc-view-switch {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .22rem;
    border: 1px solid #d2d7ca;
    background: #f9f6eb;
}
.pc-view-switch a {
    display: inline-flex;
    min-height: 2.35rem;
    align-items: center;
    justify-content: center;
    padding: .45rem .75rem;
    color: #385348;
    font-size: .77rem;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 140ms ease, color 140ms ease;
}
.pc-view-switch a[aria-current="page"] {
    background: var(--pc-forest);
    color: var(--pc-cream);
}
.pc-view-switch a.pc-section-jump {
    margin-left: .2rem;
    border-left: 1px solid #d2d7ca;
    color: #715522;
    text-decoration: underline;
    text-underline-offset: .18em;
}
.pc-view-switch a:hover:not([aria-current="page"]) {
    background: #e9e6d8;
    color: #183c30;
}
.pc-view-switch a:focus-visible,
.pc-month a:focus-visible,
.pc-section-jump:focus-visible,
.pc-list-return:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #bd8b32;
    outline-offset: 2px;
}
#calendar-grid,
.pc-calendar-fallback,
#schedule-list {
    scroll-margin-top: 1.25rem;
}
#calendar-grid:focus,
.pc-calendar-fallback:focus,
#schedule-list:focus,
#schedule-title:focus {
    outline: 3px solid #bd8b32;
    outline-offset: 4px;
}
.pc-list-heading-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem .9rem;
}
.pc-list-heading-actions p { margin: 0; }
.pc-list-return {
    color: #315c43;
    font-size: .76rem;
    font-weight: 800;
    text-underline-offset: .2em;
}
.pc-list-return:hover { color: #8b6828; }
.pc-calendar-intro {
    margin: 0 0 1rem;
    color: #53655b;
    font-size: .82rem;
    line-height: 1.55;
}
.pc-month-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    align-items: start;
}
.pc-month {
    min-width: 0;
    padding: .72rem;
    border: 1px solid #d7dbce;
    border-top: 3px solid #b78c3e;
    background: rgba(251, 248, 239, .94);
}
.pc-month h3 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .35rem;
    margin: 0 0 .48rem;
    color: var(--pc-forest);
    font: 600 1.12rem/1.1 Georgia, "Times New Roman", serif;
}
.pc-month h3 span {
    color: #78847a;
    font: 700 .61rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .08em;
}
.pc-month table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 2px;
}
.pc-month th {
    padding: .25rem 0;
    color: #69776c;
    font-size: .625rem;
    font-weight: 850;
    text-align: center;
    text-transform: uppercase;
}
.pc-month td {
    height: 2.85rem;
    padding: 0;
    vertical-align: top;
    background: #f0eee3;
}
.pc-month td:empty { background: transparent; }
.pc-month td.is-marked { background: #e9eddf; }
.pc-month td.is-winner { background: #f3e8c9; }
.pc-month td.is-today { box-shadow: inset 0 0 0 2px #6d806e; }
.pc-day-link {
    display: flex;
    min-width: 0;
    min-height: 44px;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: .1rem;
    padding: .15rem .05rem;
    color: #42564b;
    text-decoration: none;
}
.pc-day-link:hover { background: rgba(255, 253, 246, .72); }
.pc-month td.is-winner .pc-day-link:hover { background: rgba(250, 238, 207, .8); }
.pc-day-number {
    display: block;
    min-height: 1rem;
    color: inherit;
    font: 700 .68rem/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-align: center;
}
.pc-month td.is-today .pc-day-number { font-weight: 950; }
.pc-day-keys {
    display: flex;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}
.pc-day-key {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    max-width: 100%;
    padding: .05rem .1rem;
    border: 1px solid #a8b8a7;
    background: #f8f6ed;
    color: #294d37;
    font: 800 .58rem/1.15 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: nowrap;
}
.pc-day-key.is-winner {
    border: 2px double #91691f;
    background: #fff3cf;
    color: #4d3917;
}
.pc-day-key.is-winner b {
    padding-left: .08rem;
    border-left: 1px solid currentColor;
    font-size: .48rem;
}
.pc-day-key.is-disabled {
    border-style: dashed;
    color: #69736a;
}
.pc-month-events {
    margin-top: .55rem;
    padding-top: .48rem;
    border-top: 1px solid #e1e2d7;
}
.pc-month-events h4 {
    margin: 0 0 .3rem;
    color: #66736a;
    font-size: .63rem;
    font-weight: 850;
    letter-spacing: .045em;
    text-transform: uppercase;
}
.pc-month-events h4 span {
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}
.pc-month-events ul {
    display: grid;
    gap: .22rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pc-month-events li { min-width: 0; }
.pc-month-events a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: .08rem .4rem;
    padding: .28rem .22rem;
    color: #3e5548;
    text-decoration: none;
}
.pc-month-events a:hover { background: #eeebdf; }
.pc-legend-key {
    grid-row: span 2;
    align-self: start;
    min-width: 2rem;
    padding: .12rem .2rem;
    border: 1px solid #b9a16a;
    background: #f6edda;
    color: #5b461e;
    font: 800 .62rem/1.15 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    text-align: center;
}
.pc-legend-name {
    min-width: 0;
    color: #284b37;
    font-size: .7rem;
    font-weight: 800;
    line-height: 1.25;
}
.pc-legend-name small {
    display: inline-block;
    margin-left: .35rem;
    color: #69736a;
    font-size: .61rem;
    font-weight: 650;
}
.pc-legend-range {
    grid-column: 2;
    color: #67746a;
    font-size: .63rem;
    line-height: 1.3;
}
.pc-month-events a:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #bd8b32;
    outline-offset: 1px;
}
.pc-calendar-key {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.1rem;
    margin: .85rem 0 0;
    color: #58675c;
    font-size: .7rem;
}
.pc-calendar-key span { display: inline-flex; align-items: center; gap: .38rem; }
.pc-key-swatch {
    width: .72rem;
    height: .72rem;
    border: 1px solid #8d9c8e;
    background: #e9eddf;
}
.pc-key-swatch.winner { border-color: #b18a43; background: #f3e8c9; }
.pc-key-swatch.today { border: 2px solid #6d806e; background: transparent; }
.pc-selection {
    scroll-margin-top: 1.25rem;
    margin: 1.4rem 0 1.6rem;
    padding: clamp(.9rem, 2vw, 1.25rem);
    border: 1px solid #d4c08f;
    border-left: 4px solid #a77a2b;
    background: #f9f3e3;
}
.pc-selection:focus { outline: 3px solid #bd8b32; outline-offset: 3px; }
.pc-selection-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    gap: .55rem 1rem;
    margin-bottom: .8rem;
}
.pc-selection h3 {
    margin: 0;
    color: var(--pc-forest);
    font: 600 1.35rem/1.2 Georgia, "Times New Roman", serif;
}
.pc-selection-date { margin: .25rem 0 0; color: #627067; font-size: .76rem; }
.pc-selection-hint { margin: 0; color: #6e6650; font-size: .68rem; }
.pc-selection-actions { display: grid; justify-items: end; gap: .3rem; }
.pc-selection-back {
    color: #315c43;
    font-size: .72rem;
    font-weight: 800;
    text-underline-offset: .2em;
}
.pc-selection-back:hover { color: #8b6828; }
.pc-selection-events { display: grid; gap: .55rem; }
.pc-selection-event {
    padding: .75rem;
    border: 1px solid #e0d6bb;
    background: rgba(255, 253, 246, .7);
}
.pc-selection-event-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .4rem .7rem;
    margin-bottom: .35rem;
}
.pc-selection-event strong {
    color: #234535;
    font: 700 1rem/1.3 Georgia, "Times New Roman", serif;
}
.pc-selection-event p { margin: .35rem 0 0; color: #56665b; font-size: .75rem; line-height: 1.5; }
.pc-selection-empty { margin: 0; color: #59685d; font-size: .83rem; line-height: 1.55; }
.pc-selection-terms {
    margin-top: .75rem;
    padding-top: .65rem;
    border-top: 1px solid #e1d8c1;
    color: #59665a;
    font-size: .7rem;
    line-height: 1.55;
}
.pc-selection-terms p { margin: .15rem 0; }
.pc-calendar-fallback {
    padding: 1rem;
    border: 1px solid #cbd7c9;
    background: #f8f8ef;
    color: #44594c;
    font-size: .84rem;
    line-height: 1.55;
}

@media (max-width: 1000px) {
    .pc-month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .pc-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
    .pc-month { padding: .55rem; }
    .pc-month th { font-size: .625rem; }
}
@media (max-width: 520px) {
    .pc-month-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
    .pc-month { padding: .72rem; }
    .pc-month td { height: 3rem; }
    .pc-month th { font-size: .65rem; }
    .pc-day-number { font-size: .75rem; }
    .pc-day-key { font-size: .62rem; }
    .pc-selection-actions { justify-items: start; }
    .pc-view-switch { align-self: start; }
    .pc-list-heading-actions { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .pc-view-switch a { transition: none; }
}
