:root {
    color-scheme: light;
    --background: #f7f4ee;
    --surface: #ffffff;
    --surface-muted: #f1eee7;
    --text: #222426;
    --text-muted: #666d73;
    --line: #ded8cc;
    --accent: #b5313a;
    --accent-soft: #fde8e9;
    --holiday-soft: #fff0f1;
    --regional-practice: #b5313a;
    --group-practice: #d8a320;
    --saturday: #245aa5;
    --shadow: 0 18px 45px rgba(34, 36, 38, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    min-width: 320px;
    margin: 0;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background);
}

body.is-dialog-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 244, 226, 0.72)),
        url("../img/yosakoi-portrait-background.png") center 74% / cover no-repeat;
}

.site-header,
.calendar-controls,
.calendar-shell,
.calendar-help,
.schedule-list-section {
    position: relative;
    z-index: 1;
}

.site-header {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(1.1rem, 3.5vw, 2.4rem);
    line-height: 1.28;
}

.performance-countdown {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 7px;
    margin: 4px 0 0;
    color: var(--text);
    font-weight: 800;
    line-height: 1;
}

.performance-countdown span {
    font-size: 0.9rem;
}

.performance-countdown strong {
    color: var(--accent);
    font-size: clamp(2.1rem, 5vw, 4rem);
    font-weight: 950;
    line-height: 0.95;
}

.lead {
    margin-bottom: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.calendar-controls {
    display: none;
    grid-template-columns: auto minmax(80px, auto) auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 18px;
}

.calendar-control-button {
    min-width: 92px;
    padding: 9px 12px;
    border: 1px solid rgba(181, 49, 58, 0.32);
    border-radius: 3px;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 22px rgba(34, 36, 38, 0.08);
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
}

.calendar-control-button:hover,
.calendar-control-button:focus-visible {
    outline: 3px solid rgba(181, 49, 58, 0.2);
    outline-offset: 2px;
}

.calendar-control-button:disabled {
    color: var(--text-muted);
    opacity: 0.45;
    cursor: default;
}

.calendar-control-current {
    min-width: 84px;
    padding: 9px 14px;
    border-radius: 3px;
    color: #ffffff;
    background: var(--accent);
    font-weight: 900;
    text-align: center;
}

.calendar-shell {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 56px;
}

.month-card {
    position: relative;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.month-heading {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.month-title {
    grid-column: 2;
    justify-self: center;
}

.month-card.is-current-month {
    border-color: rgba(181, 49, 58, 0.42);
    box-shadow: 0 20px 50px rgba(181, 49, 58, 0.14);
}

.current-month-label {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 3px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.weekday,
.day {
    display: grid;
    place-items: center;
    min-width: 0;
    aspect-ratio: 1;
    border-radius: 3px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.weekday {
    aspect-ratio: auto;
    min-height: 28px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.weekday:first-child,
.month-grid .day:nth-child(7n + 8) {
    color: var(--accent);
}

.weekday:nth-child(7),
.month-grid .day:nth-child(7n + 14) {
    color: var(--saturday);
}

.day {
    border: 1px solid transparent;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 650;
}

.day.is-outside {
    background: transparent;
}

.day.is-holiday {
    color: var(--text);
    background: var(--holiday-soft);
}

.month-grid .day.is-today {
    border-color: var(--accent);
    color: #ffffff;
    background: var(--accent);
    box-shadow:
        0 0 0 3px var(--accent-soft),
        0 10px 18px rgba(181, 49, 58, 0.28);
    transform: scale(1.08);
    z-index: 1;
}

.month-grid .day.is-today .day-number {
    color: #ffffff;
}

button.day {
    border: 1px solid transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.day.has-event {
    position: relative;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    border-color: rgba(181, 49, 58, 0.35);
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
        var(--holiday-soft);
    box-shadow: 0 5px 12px rgba(34, 36, 38, 0.09);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease,
        filter 180ms ease;
}

.month-grid .day {
    color: var(--text);
}

.month-grid .day:nth-child(7n + 8) {
    color: var(--accent);
}

.month-grid .day:nth-child(7n + 14) {
    color: var(--saturday);
}

.day.has-event.is-regional-practice {
    border-color: rgba(181, 49, 58, 0.45);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)),
        #fff0f1;
}

.day.has-event.is-group-practice {
    border-color: rgba(196, 132, 18, 0.8);
    background:
        radial-gradient(circle at 50% 116%, rgba(255, 214, 92, 0.32), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0)),
        #fff4cb;
    box-shadow:
        0 0 0 2px rgba(255, 226, 129, 0.52),
        0 10px 22px rgba(196, 132, 18, 0.22);
    animation: calendar-group-practice-highlight 2.4s ease-in-out infinite;
}

.day.has-event.is-group-practice .day-number,
.day.has-event.is-group-practice .event-dot {
    position: relative;
    z-index: 4;
}

.day.has-event.is-performance {
    grid-template-rows: 1fr;
    border-color: #135bb8;
    border-width: 2px;
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.9) 0 10%, transparent 24%),
        linear-gradient(135deg, #1152b2 0%, #1f78e0 38%, #ffd66b 62%, #ee7b24 100%);
    box-shadow:
        0 0 0 3px rgba(255, 214, 107, 0.65),
        0 12px 24px rgba(17, 82, 178, 0.25);
}

.day.has-event.is-performance .day-number {
    display: none;
}

.month-grid .day.is-today,
.month-grid .day.is-today:nth-child(7n + 8),
.month-grid .day.is-today:nth-child(7n + 14) {
    color: #ffffff;
    background: var(--accent);
}

.month-grid .day.is-today .day-number {
    color: #ffffff;
}

.day.has-event:hover,
.day.has-event:focus-visible {
    outline: 3px solid rgba(181, 49, 58, 0.25);
    outline-offset: 2px;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.92),
        0 9px 18px rgba(181, 49, 58, 0.18);
    filter: saturate(1.08);
    transform: translateY(-2px);
}

.day-number {
    line-height: 1;
}

.day.has-event .day-number {
    align-self: center;
    justify-self: center;
    line-height: 1;
}

.event-dot {
    display: grid;
    align-self: stretch;
    justify-self: stretch;
    place-items: center;
    max-width: 100%;
    min-width: 0;
    padding: 2px;
    border-radius: 0;
    color: #ffffff;
    background: var(--regional-practice);
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.event-dot-list {
    display: grid;
    align-self: stretch;
    justify-self: stretch;
    grid-template-columns: 1fr;
    gap: 1px;
    width: 100%;
    min-width: 0;
}

.event-dot-list .event-dot {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.event-dot-list .event-dot:hover,
.event-dot-list .event-dot:focus-visible {
    outline: 2px solid rgba(181, 49, 58, 0.26);
    outline-offset: -2px;
}

.day.has-event.is-regional-practice .event-dot {
    background: var(--regional-practice);
}

.day.has-event.is-group-practice .event-dot {
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(101, 57, 0, 0.14), transparent 42%),
        linear-gradient(135deg, #a96b05 0%, #e2ad29 34%, #ffe27a 52%, #c8860e 76%, #9c5f00 100%);
    background-size: 220% 220%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        0 -1px 0 rgba(115, 70, 0, 0.18);
    animation: calendar-group-practice-label 2.4s ease-in-out infinite;
    text-shadow:
        -1px -1px 0 rgba(92, 60, 0, 0.8),
        1px -1px 0 rgba(92, 60, 0, 0.8),
        -1px 1px 0 rgba(92, 60, 0, 0.8),
        1px 1px 0 rgba(92, 60, 0, 0.8);
}

.day.has-event.is-performance .event-dot {
    grid-row: 1 / -1;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(14, 72, 166, 0.96), rgba(28, 112, 226, 0.92)),
        linear-gradient(45deg, transparent 0 34%, rgba(255, 222, 112, 0.9) 35% 47%, transparent 48% 100%);
    font-size: 0.82rem;
    letter-spacing: 0;
    text-shadow:
        -1px -1px 0 rgba(7, 42, 102, 0.9),
        1px -1px 0 rgba(7, 42, 102, 0.9),
        -1px 1px 0 rgba(7, 42, 102, 0.9),
        1px 1px 0 rgba(7, 42, 102, 0.9);
}

@keyframes calendar-group-practice-highlight {
    0%,
    100% {
        border-color: rgba(196, 132, 18, 0.8);
        box-shadow:
            0 0 0 2px rgba(255, 226, 129, 0.52),
            0 10px 22px rgba(196, 132, 18, 0.22);
        filter: saturate(1) brightness(1);
        transform: translateY(0);
    }

    50% {
        border-color: rgba(156, 95, 0, 1);
        box-shadow:
            0 0 0 4px rgba(255, 226, 129, 0.78),
            0 0 18px rgba(255, 205, 58, 0.58),
            0 15px 28px rgba(196, 132, 18, 0.34);
        filter: saturate(1.18) brightness(1.05);
        transform: translateY(-1px);
    }
}

@keyframes calendar-group-practice-label {
    0%,
    100% {
        background-position: 0% 50%;
        filter: brightness(1) saturate(1);
    }

    50% {
        background-position: 100% 50%;
        filter: brightness(1.12) saturate(1.18);
    }
}

@keyframes schedule-regional-presence {
    0%,
    100% {
        box-shadow: 0 6px 16px rgba(181, 49, 58, 0.06);
    }

    50% {
        box-shadow: 0 10px 22px rgba(181, 49, 58, 0.14);
    }
}

@keyframes schedule-regional-label {
    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.08);
    }
}

@keyframes schedule-group-presence {
    0%,
    100% {
        border-color: rgba(196, 132, 18, 0.74);
        box-shadow:
            0 0 0 2px rgba(255, 226, 129, 0.36),
            0 12px 24px rgba(196, 132, 18, 0.16);
        transform: translateY(0);
    }

    50% {
        border-color: rgba(178, 109, 0, 0.98);
        box-shadow:
            0 0 0 4px rgba(255, 226, 129, 0.6),
            0 0 20px rgba(255, 206, 65, 0.42),
            0 18px 30px rgba(196, 132, 18, 0.24);
        transform: translateY(-1px);
    }
}

@keyframes schedule-group-inner-ring {
    0%,
    100% {
        opacity: 0.62;
        transform: scale(0.99);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes schedule-group-label-glow {
    0%,
    100% {
        background-position: 0% 50%;
        filter: saturate(1) brightness(1);
        transform: translateY(0);
    }

    50% {
        background-position: 100% 50%;
        filter: saturate(1.22) brightness(1.08);
        transform: translateY(-1px);
    }
}

@keyframes schedule-performance-presence {
    0%,
    100% {
        border-color: rgba(19, 91, 184, 0.78);
        box-shadow:
            0 0 0 2px rgba(31, 120, 224, 0.2),
            0 14px 28px rgba(17, 82, 178, 0.14);
        transform: translateY(0);
    }

    50% {
        border-color: rgba(19, 91, 184, 1);
        box-shadow:
            0 0 0 4px rgba(31, 120, 224, 0.34),
            0 0 22px rgba(255, 214, 107, 0.5),
            0 18px 32px rgba(17, 82, 178, 0.22);
        transform: translateY(-1px);
    }
}

@keyframes schedule-performance-inner-ring {
    0%,
    100% {
        opacity: 0.68;
        transform: scale(0.99);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes schedule-performance-label {
    0%,
    100% {
        filter: brightness(1) saturate(1);
        transform: translateY(0);
    }

    50% {
        filter: brightness(1.12) saturate(1.16);
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .day.has-event.is-group-practice,
    .day.has-event.is-group-practice::after,
    .day.has-event.is-group-practice .event-dot,
    .schedule-item,
    .schedule-item::before,
    .schedule-item::after,
    .schedule-label {
        animation: none;
    }
}

.event-dialog {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: 2147483646;
    width: min(920px, calc(100% - 28px));
    max-height: min(860px, calc(100% - 28px));
    margin: 0;
    padding: 18px;
    overflow: hidden;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--text);
    transform: translate(-50%, -50%);
}

.event-dialog::backdrop {
    background: rgba(34, 36, 38, 0.58);
}

.event-dialog-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    max-height: min(824px, calc(100vh - 64px));
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface);
    box-shadow: 0 24px 80px rgba(34, 36, 38, 0.24);
}

.performance-dialog-panel {
    grid-template-columns: 1fr;
}

.text-event-dialog-panel {
    grid-template-columns: 1fr;
    width: min(640px, 100%);
}

.event-dialog:has(.text-event-dialog-panel) {
    width: min(676px, calc(100% - 28px));
}

.dialog-close {
    position: fixed;
    top: 6px;
    right: 6px;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border: 0;
    border-radius: 3px;
    color: var(--text);
    background: #fff;
    box-shadow: 0 6px 18px rgba(34, 36, 38, 0.16);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.event-dialog-hero {
    min-height: 100%;
    background: var(--surface-muted);
}

.performance-hero {
    display: grid;
    place-items: center;
    min-height: 300px;
    max-height: 340px;
    padding: 0;
    overflow: hidden;
}

.event-dialog-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.regional-event-hero {
    min-height: 190px;
    max-height: 240px;
    overflow: hidden;
}

.performance-hero img {
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}

.event-dialog-body {
    display: grid;
    gap: 16px;
    padding: 28px;
}

.event-kicker {
    margin: 0;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
}

.event-dialog-body h2 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.18;
}

.event-dialog-body .event-choice-title {
    max-width: none;
    font-size: 1.05rem;
    text-align: center;
    white-space: nowrap;
}

.text-event-dialog-panel .event-kicker,
.text-event-dialog-panel .event-dialog-body h2 {
    justify-self: center;
    text-align: center;
}

.event-details {
    display: grid;
    gap: 10px;
    margin: 0;
}

.event-details div {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
}

.event-details dt {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.event-details dd {
    margin: 0;
    font-weight: 650;
    line-height: 1.55;
}

.event-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 3px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    line-height: 1.55;
}

.official-notices {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(216, 163, 32, 0.34);
    background: rgba(255, 248, 223, 0.92);
    color: #5d470f;
    line-height: 1.55;
}

.official-notices h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1.3;
    text-align: center;
}

.official-notices ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding-left: 1.1em;
}

.official-notices li {
    padding-left: 0.1em;
    font-size: 0.86rem;
    font-weight: 750;
}

.regional-event-choice-list {
    display: grid;
    gap: 12px;
}

.regional-event-choice {
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(253, 232, 233, 0.64));
    box-shadow: 0 8px 20px rgba(34, 36, 38, 0.08);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.regional-event-choice:hover,
.regional-event-choice:focus-visible {
    border-color: rgba(181, 49, 58, 0.5);
    outline: 3px solid rgba(181, 49, 58, 0.16);
    outline-offset: 2px;
}

.regional-event-choice-time {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 900;
}

.regional-event-choice-title {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.3;
}

.regional-event-choice-room {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.event-map-wrap {
    width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--surface-muted);
}

.event-dialog-panel > .event-map-wrap {
    grid-column: 1 / -1;
    height: 282px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}

.event-map {
    width: 100%;
    height: 280px;
    min-height: 280px;
    background: var(--surface-muted);
    touch-action: pan-y;
}

.event-map .leaflet-control-container {
    pointer-events: auto;
}

.event-map .leaflet-control-attribution {
    font-size: 0.62rem;
}

.event-actions {
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    padding: 18px 28px 28px;
}

.event-primary-actions {
    display: flex;
    justify-content: center;
    margin: -2px 0 0;
}

.event-primary-actions .map-link {
    width: min(100%, 360px);
    text-align: center;
}

.source-link,
.map-link {
    justify-self: start;
    line-height: 1.35;
}

.source-link:hover,
.source-link:focus-visible,
.map-link:hover,
.map-link:focus-visible {
    text-decoration: underline;
}

.calendar-help {
    width: min(1120px, calc(100% - 32px));
    margin: -34px auto 26px;
    padding: 11px 14px;
    border: 1px solid rgba(181, 49, 58, 0.22);
    border-radius: 3px;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.82);
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
}

.schedule-list-section {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 56px;
}

.schedule-list-title {
    margin: 0 0 16px;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.3;
}

.schedule-list {
    display: grid;
    gap: 24px;
}

.schedule-month-group {
    display: grid;
    gap: 10px;
}

.schedule-month-title {
    margin: 0;
    padding: 0 0 2px;
    border-bottom: 2px solid rgba(181, 49, 58, 0.22);
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.3;
}

.schedule-month-items {
    display: grid;
    gap: 12px;
}

.schedule-item {
    position: relative;
    display: grid;
    gap: 10px;
    width: 100%;
    overflow: hidden;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        filter 180ms ease,
        transform 180ms ease;
}

.schedule-item::before,
.schedule-item::after {
    position: absolute;
    pointer-events: none;
    content: "";
}

.schedule-item::before {
    inset: -18% -28%;
    z-index: 0;
    opacity: 0;
    transform: translateX(-52%) skewX(-16deg);
}

.schedule-item::after {
    inset: 4px;
    z-index: 0;
    border: 1px solid transparent;
    border-radius: 2px;
}

.schedule-item > * {
    position: relative;
    z-index: 1;
}

.schedule-item:hover,
.schedule-item:focus-visible {
    outline: 3px solid rgba(181, 49, 58, 0.18);
    outline-offset: 2px;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.86),
        0 18px 34px rgba(34, 36, 38, 0.14);
    filter: saturate(1.06);
    transform: translateY(-2px);
}

.schedule-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.schedule-date {
    color: var(--text);
    font-weight: 800;
}

.schedule-label {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 3px;
    color: #ffffff;
    background: var(--regional-practice);
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.schedule-item.is-regional-practice {
    border-color: rgba(181, 49, 58, 0.38);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0)),
        #fff7f7;
    animation: schedule-regional-presence 4.4s ease-in-out infinite;
}

.schedule-item.is-regional-practice::after {
    border-color: rgba(181, 49, 58, 0.16);
}

.schedule-item.is-regional-practice .schedule-label {
    animation: schedule-regional-label 4.4s ease-in-out infinite;
}

.schedule-item.is-group-practice {
    border-color: rgba(196, 132, 18, 0.74);
    background:
        radial-gradient(circle at 94% 110%, rgba(255, 214, 92, 0.28), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0)),
        #fff8df;
    box-shadow:
        0 0 0 2px rgba(255, 226, 129, 0.36),
        0 12px 24px rgba(196, 132, 18, 0.16);
    animation: schedule-group-presence 2.7s ease-in-out infinite;
}

.schedule-item.is-group-practice::after {
    border-color: rgba(255, 238, 162, 0.78);
    box-shadow:
        inset 0 0 0 1px rgba(179, 113, 0, 0.14),
        inset 0 0 22px rgba(255, 217, 94, 0.18);
    animation: schedule-group-inner-ring 2.7s ease-in-out infinite;
}

.schedule-item.is-group-practice .schedule-label {
    background:
        linear-gradient(135deg, rgba(101, 57, 0, 0.14), transparent 42%),
        linear-gradient(135deg, #a96b05 0%, #e2ad29 34%, #ffe27a 52%, #c8860e 76%, #9c5f00 100%);
    background-size: 220% 220%;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        0 4px 12px rgba(196, 132, 18, 0.2);
    animation: schedule-group-label-glow 2.7s ease-in-out infinite;
    text-shadow:
        -1px -1px 0 rgba(92, 60, 0, 0.8),
        1px -1px 0 rgba(92, 60, 0, 0.8),
        -1px 1px 0 rgba(92, 60, 0, 0.8),
        1px 1px 0 rgba(92, 60, 0, 0.8);
}

@media (max-width: 620px) {
    .schedule-item.is-group-practice::after {
        animation: none;
    }

    .day.has-event.is-group-practice::after,
    .schedule-item.is-group-practice::after {
        display: none;
    }
}

.schedule-item.is-performance {
    border-color: rgba(19, 91, 184, 0.78);
    background:
        radial-gradient(circle at 94% 18%, rgba(255, 214, 107, 0.34), transparent 30%),
        linear-gradient(135deg, rgba(17, 82, 178, 0.12), rgba(255, 255, 255, 0.88) 46%, rgba(255, 214, 107, 0.2)),
        #ffffff;
    box-shadow:
        0 0 0 2px rgba(31, 120, 224, 0.2),
        0 14px 28px rgba(17, 82, 178, 0.14);
    animation: schedule-performance-presence 2.9s ease-in-out infinite;
}

.schedule-item.is-performance::after {
    border-color: rgba(31, 120, 224, 0.42);
    box-shadow:
        inset 0 0 0 1px rgba(255, 214, 107, 0.38),
        inset 0 0 20px rgba(31, 120, 224, 0.13);
    animation: schedule-performance-inner-ring 2.9s ease-in-out infinite;
}

.schedule-item.is-performance .schedule-label {
    background:
        linear-gradient(135deg, #0d4ea6 0%, #1f78e0 48%, #ffd66b 100%);
    box-shadow: 0 4px 12px rgba(17, 82, 178, 0.22);
    animation: schedule-performance-label 2.9s ease-in-out infinite;
    text-shadow:
        -1px -1px 0 rgba(7, 42, 102, 0.9),
        1px -1px 0 rgba(7, 42, 102, 0.9),
        -1px 1px 0 rgba(7, 42, 102, 0.9),
        1px 1px 0 rgba(7, 42, 102, 0.9);
}

.schedule-item-title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.35;
}

.schedule-item-details {
    display: grid;
    gap: 8px;
    margin: 0;
}

.schedule-item-details div {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
}

.schedule-item-details dt {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.schedule-item-details dd {
    display: grid;
    gap: 2px;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .calendar-shell {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .calendar-controls {
        display: grid;
    }

    body::before {
        background:
            linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 244, 226, 0.72)),
            url("../img/yosakoi-portrait-background-mobile.webp") center 70% / cover no-repeat;
    }

    .site-header {
        padding-top: 32px;
    }

    .calendar-controls {
        width: calc(100% - 32px);
        margin-bottom: 14px;
        gap: 8px;
    }

    .calendar-control-button {
        min-width: 0;
        padding: 9px 10px;
        font-size: 0.82rem;
    }

    .calendar-control-current {
        min-width: 64px;
        padding-inline: 10px;
    }

    .calendar-shell {
        display: flex;
        gap: 14px;
        width: 100%;
        padding: 0 16px 56px;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-padding: 16px;
        scroll-snap-type: x mandatory;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .calendar-shell::-webkit-scrollbar {
        display: none;
    }

    .month-card {
        flex: 0 0 calc(100vw - 32px);
        padding: 14px;
        scroll-snap-align: start;
    }

    .day.has-event {
        grid-template-columns: 1fr;
        writing-mode: horizontal-tb;
        text-orientation: mixed;
    }

    .event-dot {
        padding-inline: 2px;
        font-size: 0.5rem;
        white-space: nowrap;
        writing-mode: horizontal-tb;
        text-orientation: mixed;
    }

    .event-dot-list {
        gap: 1px;
    }

    .event-dialog {
        width: min(100% - 20px, 520px);
        max-height: calc(100% - 20px);
        padding: 14px;
    }

    .dialog-close {
        top: 6px;
        right: 6px;
    }

    .event-dialog-panel {
        grid-template-columns: 1fr;
    }

    .event-dialog-hero {
        min-height: 190px;
        max-height: 230px;
    }

    .regional-event-hero {
        min-height: 150px;
        max-height: 180px;
    }

    .performance-hero {
        min-height: 210px;
        max-height: 240px;
        padding: 0;
    }

    .performance-hero img {
        width: 100%;
        max-width: none;
        height: 100%;
    }

    .event-dialog-body {
        padding: 20px;
    }

    .event-dialog-body h2 {
        font-size: 1.45rem;
    }

    .event-dialog-body .event-choice-title {
        font-size: 0.98rem;
        line-height: 1.25;
    }

    .event-details div {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .calendar-help {
        width: calc(100% - 32px);
        margin-top: -34px;
        font-size: 0.9rem;
    }

    .schedule-list-section {
        width: calc(100% - 32px);
        padding-bottom: 48px;
    }

    .schedule-month-title {
        text-align: center;
    }

    .schedule-item-head {
        align-items: flex-start;
        flex-direction: column;
    }
}
