/* Shared schedule card layout. Imported metadata cannot displace its location. */
.subgroup-filter[hidden] { display: none; }
.subgroup-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; margin: 0 0 12px; }
.subgroup-filter-label { color: var(--muted); font-size: calc(11px * var(--type-scale)); }
.subgroup-filter-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.subgroup-filter-button { min-width: 38px; min-height: 38px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font: inherit; font-size: calc(12px * var(--type-scale)); }
.subgroup-filter-button[aria-pressed="true"] { background: var(--accent); color: var(--button-text); border-color: var(--accent); }
.schedule-slot { gap: 0; cursor: default; }
.schedule-slot .lesson-top { position: relative; grid-row: auto; padding-right: 50px; min-height: 40px; margin-bottom: 5px; }
.schedule-slot .lesson-number { top: 0; right: 0; }
.schedule-slot .lesson-time, .schedule-slot .lesson-end { font-size: calc(15px * var(--type-scale)); white-space: nowrap; }
.schedule-slot .lesson-status { grid-row: auto; width: fit-content; margin: 0 0 8px; }
.schedule-slot .lesson-notices .lesson-status { margin: 0; }
.lesson-entry { position: relative; min-width: 0; border-top: 1px solid var(--line); }
.lesson-entry-open { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; min-width: 0; padding: 14px 0 12px; border: 0; border-radius: 0; background: transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; box-shadow: none; }
.lesson-top-open { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; box-shadow: none; }
.lesson-top-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lesson-entry-open .lesson-subject { width: 100%; font-size: calc(17px * var(--type-scale)); line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.lesson-entry:has(.lesson-edit-button) .lesson-entry-open { padding-right: 48px; }
.lesson-entry .lesson-edit-button { position: absolute; inset: 12px 0 auto auto; min-width: 42px; min-height: 42px; padding: 10px; }
.lesson-entry .meta-teacher { color: var(--muted); font-size: calc(12px * var(--type-scale)); line-height: 1.5; overflow-wrap: anywhere; }
.lesson-entry .lesson-location { display: block; max-width: 100%; margin-top: 1px; padding: 0; border: 0; border-radius: 0; color: var(--muted); background: transparent; font-size: calc(12px * var(--type-scale)); line-height: 1.5; overflow-wrap: anywhere; }
.lesson-entry .subgroup-label { color: var(--muted); font-size: calc(11px * var(--type-scale)); font-weight: 550; }
.lesson-source-warning { color: var(--muted); font-size: calc(11px * var(--type-scale)); line-height: 1.5; }
.lesson-entry .lesson-location::before { content: none; }
.lesson-entry.cancelled .lesson-subject { text-decoration: line-through; opacity: .65; }
.lesson-entry-open:focus-visible, .subgroup-filter-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lesson-dialog-row strong { min-width: 0; overflow-wrap: anywhere; }
#live-people { white-space: pre-line; overflow-wrap: anywhere; }

/* Keep YAAR colors and hierarchy; use horizontal space for quiet metadata. */
.app-shell .schedule-slot { padding:14px 16px 14px 18px; }
.app-shell .schedule-slot .lesson-top { margin-bottom:0; }
.app-shell .schedule-slot .lesson-number { top:-14px; right:-16px; width:38px; height:28px; min-height:0; padding:4px; border:0; border-radius:0 0 0 12px; }
.app-shell .schedule-slot .lesson-entry:first-of-type { border-top:0; }
.app-shell .lesson-entry-open { gap:6px; padding:6px 0 4px; }
.app-shell .lesson-entry-open .lesson-subject { font-size:calc(18px * var(--type-scale)); line-height:1.28; }
.app-shell .lesson-metadata { display:flex; flex-wrap:wrap; align-items:baseline; gap:3px 14px; width:100%; min-width:0; }
.app-shell .lesson-entry .meta-teacher, .app-shell .lesson-entry .lesson-location { font-size:calc(12px * var(--type-scale)); margin:0; }
.app-shell .subgroup-card .lesson-entry + .lesson-entry { margin-top:8px; padding-top:6px; }
.app-shell .schedule-slot .lesson-status { display:inline-flex; align-items:center; gap:5px; margin:0; padding:4px 8px; min-height:22px; border-radius:999px; line-height:1.3; font-size:calc(10px * var(--type-scale)); color:var(--accent-deep); background:var(--accent-soft); }
.app-shell .schedule-slot .lesson-status::before { content:""; width:6px; height:6px; flex:0 0 6px; border-radius:50%; background:var(--accent); }
.app-shell .live-card[data-mode] .live-state { color:var(--accent-deep); }
.app-shell .live-card[data-mode] .live-state::before { background:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 15%,transparent); }
.app-shell .live-subject { font-size:calc(clamp(19px,5vw,24px) * var(--type-scale)); line-height:1.25; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.live-card[role="button"] { cursor:pointer; }
.live-card[role="button"]:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.live-details #live-people { display:grid; gap:8px; margin:0; }
.live-variant { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; align-items:start; }
.live-variant:not(:has(.live-variant-label)) { grid-template-columns:minmax(0,1fr); }
.live-variant-label { padding:2px 6px; border-radius:6px; font-size:calc(10px * var(--type-scale)); color:var(--accent-deep); background:var(--accent-soft); }
.live-variant-details { display:flex; flex-wrap:wrap; gap:2px 10px; min-width:0; font-size:calc(11px * var(--type-scale)); }
.live-variant-subject { width:100%; font-weight:600; }
.lesson-dialog-variant { padding:14px 0 4px; border-top:1px solid var(--line); }
.lesson-dialog-variant h3 { margin:0 0 6px; font-size:14px; color:var(--accent-deep); }
.lesson-dialog-subject { margin:0 0 8px; font-weight:650; line-height:1.4; }
/* Keep the date in place when the today label appears or disappears. */
#schedule-view #day-kicker { display:block; min-height:1.5em; line-height:1.5; }
#schedule-view #day-kicker:empty { display:block; visibility:hidden; }
/* A single lesson keeps one compact header and one quiet metadata row. */
.app-shell .single-slot { padding:12px 16px 12px 18px; }
.app-shell .single-slot .lesson-top,
.app-shell .single-slot .lesson-top-open { min-height:24px; }
.app-shell .single-slot .lesson-number { top:-12px; height:28px; }
.app-shell .single-slot .lesson-entry { border-top:0; }
.app-shell .single-slot .lesson-entry-open { padding:7px 0 0; gap:8px; }
.app-shell .single-slot .lesson-subject { font-size:calc(17px * var(--type-scale)); line-height:1.25; }
.app-shell .single-slot .lesson-metadata { align-items:center; gap:4px 12px; }
.app-shell .single-slot .meta-teacher,
.app-shell .single-slot .lesson-location { font-size:calc(11px * var(--type-scale)); line-height:1.4; }
.app-shell .single-slot .lesson-entry .lesson-edit-button { top:4px; }
