:root { --ink: #1f2933; --muted: #61707c; --surface: #fff; --page: #f4f6f8; --line: #dbe2e8; --accent: #b22641; --accent-hover: #901b32; --danger: #a21d32; --soft: #f8e8ec; --booked-bg: #e4f4e8; --booked-ink: #21643b; --sold-bg: #e9edf0; --night-bg: #f0f2f5; --radius: 14px; --space: 20px; --small: .875rem; --body: 1rem; --heading: 1.25rem; }
:root { --occupied-surface: transparent; --occupied-line: color-mix(in srgb, var(--booked-ink) 30%, transparent); --occupied-hatch: repeating-linear-gradient(45deg, transparent 0 6px, var(--occupied-line) 6px 8px); --travel-ink: #a34d08; --travel-line: color-mix(in srgb, var(--travel-ink) 42%, transparent); --travel-hatch: repeating-linear-gradient(45deg, transparent 0 6px, var(--travel-line) 6px 8px); }
* { box-sizing: border-box; }
body { height: 100dvh; overflow: hidden; margin: 0; color: var(--ink); background: var(--page); font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; font-size: var(--body); line-height: 1.55; }
main { display: flex; flex-direction: column; width: 100%; height: 100dvh; margin: 0; padding: 10px 12px 12px; overflow: hidden; }
h1 { flex: none; font-size: var(--body); margin: 0; white-space: nowrap; }
h2 { font-size: var(--heading); margin: 0 0 16px; }
p { margin: 8px 0; }
.muted, .hint { color: var(--muted); }
.hint { font-size: var(--small); }
button, input { font: inherit; }
button { border: 1px solid var(--line); border-radius: 8px; padding: 9px 13px; background: var(--surface); color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: wait; }
button.primary { color: var(--surface); background: var(--accent); border-color: var(--accent); }
button.primary:hover { background: var(--accent-hover); }
button.danger { color: var(--danger); }
button.subtle { margin-top: 8px; font-size: var(--small); }
.app-header { display: flex; flex: none; align-items: center; gap: 16px; margin-bottom: 4px; }
.header-actions { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: flex-end; gap: 6px; overflow: auto; white-space: nowrap; }
.header-actions button { flex: none; padding: 5px 8px; font-size: .75rem; }
.view-tabs { display: flex; flex: none; gap: 3px; }
.view-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.status-row { display: flex; flex: none; align-items: center; gap: 10px; min-width: 0; margin-bottom: 4px; }
.compact-status { min-width: 0; overflow: hidden; padding: 2px 4px; border-color: transparent; border-radius: 4px; color: var(--muted); background: transparent; font-size: .75rem; white-space: nowrap; text-overflow: ellipsis; text-align: left; }
#notice { flex: 1; }
.catalog-status { flex: none; max-width: 35%; }
.is-warning { color: var(--danger); background: var(--soft); }
.calendar-panel { display: flex; flex: 1; flex-direction: column; min-height: 0; }
#calendar-view { display: flex; flex: 1; flex-direction: column; min-height: 0; }
#list-view { flex: 1; min-height: 0; overflow: auto; }
.calendar-legend { display: flex; flex: none; flex-wrap: wrap; gap: 3px 12px; margin: 0 0 5px; font-size: .75rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend span::before { content: ""; width: 10px; height: 10px; border: 1px solid var(--muted); border-radius: 3px; background: var(--surface); }
.calendar-legend .legend-sold-out::before { background: var(--sold-bg); border-color: var(--line); }
.calendar-legend .legend-booked::before { background: var(--booked-bg); border-color: var(--booked-ink); }
.calendar-legend .legend-conflict::before { background: var(--soft); border-color: var(--danger); }
.calendar-legend .legend-occupied::before { background-color: var(--occupied-surface); background-image: var(--occupied-hatch); border-color: var(--occupied-line); }
.calendar-legend .legend-travel::before { background-image: var(--travel-hatch); border-color: var(--travel-line); }
.calendar-legend span:last-child::before { border-style: dashed; }
.calendar-viewport { flex: 1; width: 100%; min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); scrollbar-gutter: stable; }
.calendar-board { --calendar-column-width: 100px; position: relative; min-width: 100%; }
.calendar-head { position: sticky; top: 0; z-index: 7; display: flex; min-height: 36px; border-bottom: 1px solid var(--line); background: var(--surface); }
.calendar-venue { flex: none; width: var(--calendar-column-width); padding: 6px 8px; border-right: 1px solid var(--line); text-align: center; font-size: var(--small); font-weight: bold; white-space: normal; overflow-wrap: anywhere; }
.calendar-axis-head { position: sticky; left: 0; z-index: 8; flex: none; width: 96px; padding: 6px; background: var(--page); font-size: .75rem; text-align: center; }
.calendar-body { position: relative; }
.calendar-axis { position: sticky; left: 0; z-index: 6; width: 96px; height: 100%; background: var(--page); border-right: 1px solid var(--line); pointer-events: none; }
.calendar-tick { position: absolute; z-index: 1; left: 0; width: 100%; padding: 2px 8px; color: var(--muted); background: var(--page); font-size: .75rem; white-space: nowrap; }
.calendar-occupied-layer, .calendar-travel-layer { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.calendar-axis-occupied-layer { position: absolute; z-index: 0; inset: 0; pointer-events: none; }
.calendar-occupied, .calendar-axis-occupied { position: absolute; left: 0; right: 0; background-color: var(--occupied-surface); background-image: var(--occupied-hatch); pointer-events: none; }
.calendar-travel-band { position: absolute; overflow: hidden; padding: 0 3px; border-radius: 5px; background-image: var(--travel-hatch); box-shadow: inset 0 0 0 1px var(--travel-ink); color: var(--travel-ink); font-size: .625rem; line-height: 1.2; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
.calendar-date { color: var(--ink); font-weight: bold; }
.calendar-line { position: absolute; left: 96px; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.calendar-date-line { border-top-style: dashed; }
.calendar-night { position: absolute; left: 96px; right: 0; display: flex; align-items: center; padding-left: 10px; background: var(--night-bg); color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; pointer-events: none; }
.calendar-track { position: absolute; top: 0; width: var(--calendar-column-width); height: 100%; border-right: 1px solid var(--line); }
.calendar-event { position: absolute; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; overflow: hidden; padding: 4px 6px; border-radius: 5px; border-color: var(--muted); color: var(--ink); background: var(--surface); text-align: left; font-size: .75rem; line-height: 1.3; }
.calendar-event > * { align-self: stretch; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-event strong { display: block; }
.calendar-event-time { font-weight: bold; }
.calendar-event-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.calendar-event-end { font-size: .6875rem; }
.calendar-event.is-available { border-left: 3px solid var(--ink); }
.calendar-event.is-sold-out { background: var(--sold-bg); border-color: var(--line); color: var(--muted); }
.calendar-event.is-unknown { border-style: dashed; }
.calendar-event.is-booked { z-index: 5; background: var(--booked-bg); border-color: var(--booked-ink); color: var(--booked-ink); }
.calendar-event.is-conflict { background: var(--soft); border-color: var(--danger); color: var(--danger); }
.calendar-event:hover { z-index: 3; border-color: var(--accent); box-shadow: 0 2px 8px rgb(31 41 51 / .15); }
.calendar-event.is-booked:hover, .calendar-event.is-booked:focus-visible { z-index: 5; }
input:not([type="checkbox"]) { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 6px; background: var(--surface); color: var(--ink); }
label { display: block; margin: 12px 0; font-size: var(--small); }
.check { display: flex; gap: 9px; align-items: flex-start; }
.check input { flex: none; margin-top: 5px; accent-color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space); }
summary { cursor: pointer; font-size: var(--heading); font-weight: bold; }
details[open] > summary { margin-bottom: var(--space); }
.search-row { display: flex; gap: 10px; }
.search-row input { margin: 0; min-width: 0; flex: 1; }
.search-row button { flex-shrink: 0; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.screening { border-top: 1px solid var(--line); padding: 16px 0; }
.film-link { padding: 0; border: 0; background: none; color: var(--accent); font-weight: bold; text-align: left; }
.row-meta { font-size: var(--small); color: var(--muted); margin-top: 6px; }
.screening-head { display: flex; justify-content: space-between; gap: 10px; }
.screening-head { align-items: center; }
.screening-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.screening-booked { flex: none; }
.screening-head > button:last-child { flex-shrink: 0; }
.badge { display: inline-block; flex-shrink: 0; white-space: nowrap; background: var(--page); border-radius: 6px; padding: 3px 8px; font-size: var(--small); }
.conflict-badge { color: var(--danger); background: var(--soft); }
.status-detail { margin-top: 8px; font-size: var(--small); }
dialog { width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--surface); overflow: hidden; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: rgb(31 41 51 / .4); }
.status-dialog { width: min(680px, calc(100% - 32px)); }
.travel-table-scroll { overflow: auto; }
#travel-matrix { width: 100%; border-collapse: collapse; font-size: var(--small); }
#travel-matrix caption { margin-bottom: 10px; text-align: left; font-weight: bold; }
#travel-matrix th, #travel-matrix td { padding: 6px; border: 1px solid var(--line); text-align: center; }
#travel-matrix th { min-width: 110px; background: var(--page); }
#travel-matrix input { min-width: 64px; margin: 0; padding: 6px; text-align: center; }
#travel-matrix input:disabled { color: var(--muted); background: var(--page); }
#travel-sources a { color: var(--accent); }
#travel-sources a + a { margin-left: 12px; }
.dialog-header, .film-dialog-header { flex: none; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dialog-header, .dialog-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-header h2, .dialog-title h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.dialog-header button, .dialog-title button { flex: none; }
.dialog-content { min-height: 0; overflow: auto; padding: 20px; }
#status-detail { white-space: pre-line; }
.film-dialog-content { min-height: 0; overflow: auto; padding: 0 24px 24px; }
.film-dialog-footer { position: sticky; bottom: 0; flex: none; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.film-dialog-footer .hint { margin: 0 0 12px; }
.film-dialog-footer button { width: 100%; }
.film-error { color: var(--danger); margin: 0 0 12px; white-space: pre-line; }
.film-detail { margin: 20px 0 0; }
.film-detail h3 { margin: 0 0 8px; }
.film-detail a { color: var(--accent); }
.film-detail p { white-space: pre-line; }
.film-frame { display: block; width: 100%; height: min(68dvh, 760px); border: 1px solid var(--line); border-radius: 8px; background: var(--page); }
.film-images { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); align-items: start; gap: 12px; margin: 16px 0; }
.film-images img { display: block; width: 100%; height: auto; border-radius: 8px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 640px) { main { padding: 8px; } .app-header { gap: 8px; } h1 { font-size: var(--small); } .header-actions { justify-content: flex-start; } .status-row { gap: 4px; } .calendar-legend { gap: 3px 8px; } }
