.app-shell.is-school-events-view .admin-layout { grid-template-columns: var(--menu-width) minmax(0, 1fr); padding-right: 32px; }
.app-shell.is-school-events-view .dashboard-stack { width: 100%; min-width: 0; }
.app-shell.is-school-events-view .detail-panel { display: none; }
.school-events-panel { background: #fff; border-radius: 18px; padding: 24px; }
.school-events-panel h2 { margin: 0 0 20px; font-size: 24px; }
.school-events-toolbar { display: flex; gap: 24px; flex-wrap: wrap; }
.school-events-panel label { display: grid; gap: 8px; font-weight: 600; min-width: 0; }
.school-events-toolbar label:first-child { flex: 1; }
.school-events-panel input, .school-events-panel select, .school-events-panel textarea { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; color: inherit; border: 1px solid #ccd4df; border-radius: 8px; padding: 10px; background: #fff; }
.school-event-message { min-height: 24px; color: #385b7e; }
.school-events-columns { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.school-event-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 5px; }
.school-event-weekday { text-align: center; padding: 8px 0; }
.school-event-weekday:first-child { color: #c54d56; }
.school-event-weekday:nth-child(7) { color: #427bbb; }
.school-event-day { min-height: 65px; border: 1px solid #dce2eb; border-radius: 8px; background: #f8fafc; font: inherit; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; cursor: pointer; }
.school-event-day small { font-size: 12px; color: #336795; }
.school-event-day[aria-pressed="true"] { background: #e0eefc; border: 2px solid #4384bd; }
.school-events-panel button:disabled { cursor: default; opacity: .5; }
.school-event-editor { min-width: 0; }
.school-event-editor h3 { margin: 0 0 14px; font-size: 18px; }
.school-event-editor fieldset { border: 0; padding: 0; margin: 0 0 24px; display: grid; gap: 16px; min-width: 0; }
.school-event-save { padding: 12px 32px; border: 0; border-radius: 8px; background: #347fb5; color: white; font: inherit; font-weight: bold; cursor: pointer; justify-self: end; }
.school-event-card { border: 1px solid #dce2eb; border-radius: 8px; padding: 12px; margin-top: 10px; overflow-wrap: anywhere; }
.school-event-card p { white-space: pre-wrap; margin: 8px 0 0; }
@media (max-width: 840px) {
  .app-shell.is-school-events-view .admin-layout { grid-template-columns: minmax(0, 1fr); padding-right: 12px; }
  .school-events-panel { padding: 16px; }
  .school-events-columns { grid-template-columns: minmax(0, 1fr); }
  .school-event-day { min-height: 52px; }
}

.school-event-day.is-holiday, .school-event-day .school-event-holiday-name { color: #b83f50; }
.school-event-day.is-saturday { color: #3479b7; }
.school-event-day .school-event-holiday-name { font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.school-event-day { padding: 6px 2px; }
.school-event-holiday-warning { color: #986020; font-size: 13px; }
.school-event-list { margin-top: 24px; }
.school-event-list h3 { font-size: 18px; margin: 0 0 12px; }
.school-event-card-date { color: #536c85; font-size: 14px; margin-bottom: 8px; }

.school-events-switches { display: flex; gap: 8px; margin-bottom: 20px; }
.school-events-switches button { min-width: 100px; border: 1px solid #b9c9d8; border-radius: 8px; background: #fff; color: #385b7e; padding: 10px 24px; font: inherit; cursor: pointer; }
.school-events-switches button[aria-pressed="true"] { background: #347fb5; border-color: #347fb5; color: #fff; }
.school-events-panel [hidden] { display: none !important; }
.school-events-columns { grid-template-columns: minmax(190px, .85fr) minmax(300px, 1.2fr) minmax(240px, 1fr); gap: 20px; }
.school-event-list { margin-top: 0; min-width: 0; }
.school-events-overview { min-width: 0; }
.school-event-table-scroll { overflow: auto; max-height: 75vh; border: 1px solid #dce2eb; border-radius: 8px; }
.school-event-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.school-event-table caption { text-align: left; padding: 12px; font-weight: bold; }
.school-event-table th, .school-event-table td { padding: 10px; border-right: 1px solid #dce2eb; border-bottom: 1px solid #dce2eb; vertical-align: top; min-width: 140px; max-width: 220px; overflow-wrap: anywhere; }
.school-event-table thead th { position: sticky; top: 0; background: #edf4fa; z-index: 2; text-align: center; }
.school-event-table th:first-child { position: sticky; left: 0; min-width: 110px; width: 110px; background: #f8fafc; z-index: 1; }
.school-event-table thead th:first-child { z-index: 3; background: #edf4fa; }
.school-event-table tbody tr.is-holiday > th { color: #b83f50; background: #fff5f6; }
.school-event-table tbody tr.is-saturday > th { color: #3479b7; background: #f0f7ff; }
.school-event-table th small, .school-event-table-entry small { display: block; margin-top: 4px; font-weight: normal; }
.school-event-table-entry small { color: #536c85; margin: 0 0 4px; }
.school-event-table-entry + .school-event-table-entry { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e6ecf2; }
.school-event-detail-trigger { display: block; width: 100%; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; line-height: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.school-event-detail-trigger:focus-visible { outline: 2px solid #347fb5; outline-offset: 4px; }
.school-event-detail { box-sizing: border-box; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 1px solid #dce2eb; border-radius: 12px; background: #fff; color: #222; overflow-wrap: anywhere; }
.school-event-detail::backdrop { background: rgb(0 0 0 / 35%); }
.school-event-detail h2 { margin: 0 0 16px; font-size: 20px; }
.school-event-detail h3 { margin: 20px 0 8px; font-size: 16px; }
.school-event-detail-memo { white-space: pre-wrap; }
.school-event-detail button { display: block; margin: 24px 0 0 auto; padding: 10px 24px; border: 0; border-radius: 8px; background: #347fb5; color: #fff; font: inherit; cursor: pointer; }
@media (max-width: 1100px) {
  .school-events-columns { grid-template-columns: minmax(190px, .8fr) minmax(300px, 1.2fr); }
  .school-event-editor { grid-column: 2; }
  .school-event-list { grid-row: 1 / span 2; }
}
@media (max-width: 650px) {
  .school-events-columns { grid-template-columns: minmax(0, 1fr); }
  .school-event-editor, .school-event-list { grid-column: auto; grid-row: auto; }
}

.school-event-card, .school-event-table-entry { color: #000000; }
.school-event-card[data-category="テスト"], .school-event-table-entry[data-category="テスト"] { color: #db4b91; }
.school-event-card[data-category="イベント"], .school-event-table-entry[data-category="イベント"] { color: #329dc2; }
.school-event-card[data-category="休日"], .school-event-table-entry[data-category="休日"] { color: #7ca82c; }
.school-event-card .school-event-card-date, .school-event-table-entry small { color: inherit; }

.school-events-heading { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 12px; }
.school-events-heading h2 { margin: 0; }
.school-events-heading .school-events-month { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.school-events-month input { width: 165px; }
.school-events-switches { margin-bottom: 12px; }
.school-event-message:empty { display: none; }
.school-events-toolbar { margin-bottom: 12px; }
@media (max-width: 650px) {
  .school-events-heading { gap: 12px; }
  .school-events-heading .school-events-month { gap: 6px; }
  .school-events-month input { width: 145px; }
}

button.school-event-card { display: block; width: 100%; background: #fff; font: inherit; text-align: left; cursor: pointer; }
button.school-event-card[aria-pressed="true"] { background: #f0f7ff; border-color: #347fb5; box-shadow: 0 0 0 1px #347fb5; }
button.school-event-card:focus-visible { outline: 2px solid #347fb5; outline-offset: 2px; }
.school-event-cancel { justify-self: end; padding: 10px 16px; border: 1px solid #b9c9d8; border-radius: 8px; background: #fff; color: #385b7e; font: inherit; cursor: pointer; }
.school-event-delete { justify-self: end; padding: 10px 24px; border: 1px solid #b83f50; border-radius: 8px; background: #fff; color: #b83f50; font: inherit; cursor: pointer; }
