.schedule-editor-header { align-items: flex-start; }
.schedule-editor { display: grid; gap: 1rem; }
.schedule-editor__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .55rem; }
.schedule-editor__actions--top { margin-bottom: -.25rem; }
.schedule-status { margin-right: auto; padding: .28rem .65rem; border-radius: 999px; font-size: .83rem; background: #ececec; }
.schedule-status--published { background: #dff1e4; color: #175b2f; }
.schedule-list { display: grid; gap: .65rem; margin-bottom: .7rem; }
.schedule-item { display: flex; align-items: flex-end; gap: .65rem; padding: .7rem; border: 1px solid var(--border-color, #d9d9d9); border-radius: .45rem; background: #fff; }
.schedule-item.is-dragging { opacity: .5; }
.schedule-item .form-row { margin: 0; }
.schedule-item__grow { flex: 1 1 18rem; }
.schedule-item__actions { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.schedule-drag-handle { align-self: center; color: #777; cursor: grab; user-select: none; }
.schedule-day-break { align-self: center; }
.schedule-block-item { display: block; padding: 0; overflow: hidden; }
.schedule-block-item__head { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem; background: #f6f6f6; cursor: pointer; list-style: none; }
.schedule-block-item__head::-webkit-details-marker { display: none; }
.schedule-block-item__head::before { content: '▸'; flex: 0 0 auto; font-size: .9rem; line-height: 1; }
.schedule-block-item[open] .schedule-block-item__head { border-bottom: 1px solid var(--border-color, #ddd); }
.schedule-block-item[open] .schedule-block-item__head::before { transform: rotate(90deg); }
.schedule-block-item__head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-block-item__meta { color: var(--text-muted, #666); font-size: .82rem; white-space: nowrap; }
.schedule-block-item__body { display: block; }
.schedule-block-item__grid { display: grid; grid-template-columns: repeat(4, minmax(8rem, 1fr)); gap: .7rem; padding: .75rem; }
.schedule-block-item__title { grid-column: span 3; }
.schedule-block-item__speakers { grid-column: span 2; }
.schedule-block-item__halls { grid-column: span 2; }
.schedule-block-item__options { display: flex; flex-wrap: wrap; gap: 1rem; padding: 0 .75rem .75rem; }
.schedule-hall-choices { display: flex; flex-wrap: wrap; gap: .4rem .9rem; min-height: 2.2rem; align-items: center; }
.schedule-checkbox-stack { display: grid; align-content: center; gap: .4rem; }
.schedule-time-breaks { margin-top: 1rem; padding-top: .8rem; border-top: 1px solid var(--border-color, #ddd); }
.schedule-time-breaks h4 { margin: 0 0 .25rem; }
.schedule-time-breaks__list { display: grid; gap: .55rem; margin-top: .6rem; }
.schedule-time-breaks__group { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .55rem .7rem; border: 1px solid var(--border-color, #ddd); border-radius: .4rem; background: #fafafa; }
.schedule-time-breaks__group > div { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.schedule-editor-tools, .schedule-history-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem; margin-top: 1rem; }
.schedule-history { margin-top: 1rem; }
.schedule-history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.schedule-preview-frame { width: 100%; min-height: 38rem; border: 1px solid #ccc; background: #eee; }
.schedule-version-form { display: flex; gap: .5rem; margin-bottom: .75rem; }
.schedule-version-form input { flex: 1; }
.schedule-history-list { display: grid; gap: .45rem; }
.schedule-history-entry { border: 1px solid var(--border-color, #ddd); border-radius: .4rem; overflow: hidden; background: #fff; }
.schedule-history-entry > summary { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr); align-items: center; gap: .65rem; padding: .55rem .65rem; cursor: pointer; list-style: none; background: #f7f7f7; }
.schedule-history-entry > summary::-webkit-details-marker { display: none; }
.schedule-history-entry > summary::before { content: '▸'; font-size: .85rem; }
.schedule-history-entry[open] > summary::before { transform: rotate(90deg); }
.schedule-history-entry > summary span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-history-entry__body { padding: .65rem; border-top: 1px solid var(--border-color, #ddd); }
.schedule-history-entry__body p { margin: 0 0 .55rem; }
.schedule-change-list { display: grid; gap: .3rem; margin: 0; padding-left: 1.1rem; }
.schedule-change-list .schedule-change-list { margin-top: .25rem; }
.schedule-change-list li > span { margin-left: .35rem; }
.schedule-screen-preview { background: #e8e8e8; padding: 1rem; overflow: auto; }
.schedule-screen-preview .schedule-print-section { margin: 0 auto; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.schedule-screen-preview .schedule-print-section.schedule-is-paginated { box-shadow: none; }
.schedule-screen-preview .schedule-paper-page { box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.schedule-notice--success { border-color: #4f9c62; background: #edf8f0; }
.schedule-notice--error { border-color: #b83f3f; background: #fff0f0; }
@media (max-width: 900px) {
    .schedule-block-item__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .schedule-block-item__title, .schedule-block-item__speakers, .schedule-block-item__halls { grid-column: span 2; }
    .schedule-editor-tools, .schedule-history-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .schedule-item { align-items: stretch; flex-direction: column; }
    .schedule-item__actions { margin-left: 0; }
    .schedule-block-item__head { flex-wrap: wrap; }
    .schedule-block-item__head .schedule-item__actions { margin-left: auto; }
    .schedule-block-item__grid { grid-template-columns: 1fr; }
    .schedule-block-item__title, .schedule-block-item__speakers, .schedule-block-item__halls { grid-column: auto; }
    .schedule-history-entry > summary { grid-template-columns: auto minmax(0, 1fr); }
    .schedule-history-entry > summary span { grid-column: 2; }
}
.schedule-speaker-suggestions { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.schedule-speaker-suggestions .button { padding: .22rem .45rem; font-size: .76rem; }
.schedule-block-item--pause .schedule-block-item__head { background: #e9e9e9; }
.schedule-block-item--pause[open] .schedule-block-item__head { background: #e9e9e9; }

.schedule-field-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.schedule-field-heading label {
    margin: 0;
}

.schedule-editor-mode-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    padding: .55rem .65rem;
    border: 1px solid var(--border-color, #ddd);
    border-radius: .45rem;
    background: #fafafa;
}
.schedule-editor-mode-switch .button.is-active {
    border-color: #555;
    background: #e9e9e9;
}
.schedule-unsaved-indicator {
    margin-left: auto;
    font-size: .82rem;
    color: #8a5b00;
}
.schedule-visual-editor {
    display: grid;
    gap: .65rem;
    min-width: 0;
}
.schedule-visual-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .6rem;
}
.schedule-visual-toolbar > div:first-child {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .35rem .7rem;
}
.schedule-visual-day-tabs {
    display: flex;
    gap: .35rem;
    overflow-x: auto;
    padding-bottom: .1rem;
}
.schedule-visual-day-tab {
    flex: 0 0 auto;
    padding: .45rem .7rem;
    border: 1px solid var(--border-color, #ccc);
    border-radius: .4rem .4rem 0 0;
    background: #f4f4f4;
    color: inherit;
    cursor: pointer;
    font: inherit;
}
.schedule-visual-day-tab.is-active {
    border-bottom-color: #fff;
    background: #fff;
}
.schedule-visual-stage {
    overflow: auto;
    max-height: 75vh;
    border: 1px solid var(--border-color, #ccc);
    border-radius: .35rem;
    background: #fff;
}
.schedule-visual-grid {
    position: relative;
    display: grid;
    isolation: isolate;
    user-select: none;
    touch-action: none;
    background: #fff;
}
.schedule-visual-grid::after {
    content: '';
    position: absolute;
    z-index: 1;
    pointer-events: none;
    top: 44px;
    right: 0;
    bottom: 0;
    left: 76px;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(var(--schedule-slot-height) - 1px),
        #e7e7e7 calc(var(--schedule-slot-height) - 1px),
        #e7e7e7 var(--schedule-slot-height)
    );
}
.schedule-visual-corner,
.schedule-visual-hall-head {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: .35rem .5rem;
    border-bottom: 1px solid #bbb;
    background: #f0f0f0;
    font-size: .86rem;
    text-align: center;
}
.schedule-visual-corner {
    left: 0;
    z-index: 10;
    grid-column: 1;
    grid-row: 1;
}
.schedule-visual-hall-head {
    border-left: 1px solid #ccc;
}
.schedule-visual-lane {
    z-index: 0;
    border-left: 1px solid #d0d0d0;
    background: linear-gradient(to bottom, rgba(0,0,0,.012), rgba(0,0,0,0));
}
.schedule-visual-time-label {
    position: relative;
    z-index: 3;
    align-self: start;
    padding: 0 .45rem 0 0;
    transform: translateY(-.55em);
    color: var(--text-muted, #666);
    background: #fff;
    font-size: .74rem;
    text-align: right;
    pointer-events: none;
}
.schedule-visual-block {
    position: relative;
    z-index: 4;
    min-height: 0;
    margin: 1px 2px;
    padding: .28rem .4rem;
    overflow: hidden;
    border: 1px solid #77869a;
    border-radius: .32rem;
    background: #e8eef5;
    color: #1d2a39;
    cursor: grab;
    font: inherit;
    text-align: left;
    touch-action: none;
}
.schedule-visual-block:active { cursor: grabbing; }
.schedule-visual-block strong,
.schedule-visual-block small,
.schedule-visual-block__time {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}
.schedule-visual-block strong { font-size: .82rem; }
.schedule-visual-block small { margin-top: .12rem; font-size: .7rem; }
.schedule-visual-block__time { font-size: .68rem; }
.schedule-visual-block--pause {
    border-color: #999;
    background: #e5e5e5;
    color: #333;
}
.schedule-visual-block--empty {
    border-style: dashed;
    background: #fafafa;
}
.schedule-visual-block.has-conflict {
    border-color: #b02d2d;
    box-shadow: inset 0 0 0 1px #b02d2d;
}
.schedule-visual-resize {
    position: absolute;
    z-index: 2;
    right: 0;
    left: 0;
    height: 7px;
    cursor: ns-resize;
}
.schedule-visual-resize--top { top: 0; }
.schedule-visual-resize--bottom { bottom: 0; }
.schedule-is-dragging,
.schedule-is-dragging * { cursor: grabbing !important; }
.schedule-block-dialog {
    width: min(46rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 1px solid #aaa;
    border-radius: .55rem;
}
.schedule-block-dialog::backdrop { background: rgba(0,0,0,.35); }
.schedule-block-dialog__header,
.schedule-block-dialog__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .65rem .8rem;
    background: #f3f3f3;
}
.schedule-block-dialog__header { border-bottom: 1px solid #ddd; }
.schedule-block-dialog__actions { border-top: 1px solid #ddd; }
.schedule-block-dialog__body {
    display: grid;
    gap: .7rem;
    padding: .8rem;
    overflow: auto;
}
.schedule-block-dialog__body .form-row { margin: 0; }
.schedule-block-dialog__actions .button:last-child { margin-left: auto; }

@media (max-width: 700px) {
    .schedule-unsaved-indicator { width: 100%; margin-left: 0; }
    .schedule-visual-stage { max-height: 68vh; }
    .schedule-block-dialog__body .form-grid { grid-template-columns: 1fr; }
}
