﻿*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    background: #fafafa;
    overflow: hidden;
    --scene-base-scale: 1;
    --scene-chrome-offset: 10rem;
    --page-chrome-offset: 10rem;
}

.app-top-chrome {
    flex-shrink: 0;
    z-index: 100;
    padding: clamp(10px, 2vw, 20px) clamp(10px, 2vw, 20px) 10px;
    background: #fafafa;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.app-top-chrome .app-mode-nav {
    margin-bottom: 0;
}

.app-main-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px clamp(10px, 2vw, 20px) clamp(10px, 2vw, 20px);
    -webkit-overflow-scrolling: touch;
}

body.app-mode-show {
    --scene-chrome-offset: 12rem;
    --page-chrome-offset: 12rem;
    --scene-fit-bottom-gap: 0.75rem;
}

body.app-mode-plan {
    --scene-chrome-offset: 12rem;
    --page-chrome-offset: 12rem;
    --scene-fit-bottom-gap: 0.75rem;
}

.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 4px;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.page-header h1 {
    margin: 0;
    font-size: 1.4em;
    min-width: 0;
}

.app-version {
    flex-shrink: 0;
    font-size: 0.85em;
    font-weight: normal;
    color: #888;
    white-space: nowrap;
}

.panel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 10px;
    margin-bottom: 10px;
}

.panel-header h2 {
    margin: 0;
    padding: 0;
    font-size: 1.05em;
    font-weight: 600;
    line-height: 1.25;
    color: #222;
    min-width: 0;
}

.panel-header__tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 0;
}

.btn,
.play-btn,
.help-btn,
.add-action-btn {
    margin: 0;
    padding: 5px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #f5f5f5;
    font-size: 0.88em;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    color: #444;
}

.btn:hover,
.play-btn:hover,
.help-btn:hover,
.add-action-btn:hover {
    background: #eee;
}

.btn:disabled,
.play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.help-dialog {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0;
    width: min(85vw, calc(100vw - 32px));
    max-width: min(85vw, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.help-dialog::backdrop {
    background: rgba(0, 0, 0, 0.35);
}

.help-dialog-inner {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    min-height: 0;
}

.help-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.help-dialog-header h2 {
    margin: 0;
    font-size: 1.15em;
}

.help-dialog-close {
    padding: 4px 12px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fff;
    font-size: 0.9em;
    cursor: pointer;
}

.help-dialog-close:hover {
    background: #f0f0f0;
}

.help-dialog-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 18px 20px;
    overflow-y: auto;
    font-size: 0.92em;
    line-height: 1.45;
    color: #333;
}

.help-dialog-body h3 {
    margin: 1.1em 0 0.4em;
    font-size: 1em;
    color: #222;
}

.help-dialog-body h3:first-child {
    margin-top: 0;
}

.help-dialog-body h4 {
    margin: 0.75em 0 0.35em;
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
}

.help-dialog-body ol {
    margin: 0 0 0.75em;
    padding-left: 1.35em;
}

.help-dialog-body p {
    margin: 0 0 0.6em;
}

.help-dialog-body ul {
    margin: 0 0 0.75em;
    padding-left: 1.25em;
}

.help-dialog-body li {
    margin-bottom: 0.35em;
}

.subtitle,
.mode-subtitle {
    color: #666;
    margin: 0 0 10px;
    font-size: 0.95em;
}

.app-mode-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0 0 12px;
    padding: 4px;
    background: #eee;
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.app-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.app-mode-nav-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.app-mode-nav-show-controls {
    display: flex;
    align-items: center;
}

body:not(.app-mode-plan) .app-mode-nav-plan-controls {
    display: none;
}

body:not(.app-mode-show) .app-mode-nav-show-controls {
    display: none;
}

.next-action-overlay {
    position: fixed;
    top: max(30px, env(safe-area-inset-top, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    z-index: 1200;
    padding: 10px 14px 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #bbb;
    border-radius: 8px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.14);
    min-width: 132px;
    max-width: min(280px, calc(100vw - 24px));
    pointer-events: auto;
    backdrop-filter: blur(4px);
}

.next-action-overlay.is-dragging {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
    user-select: none;
}

.next-action-overlay.is-hidden {
    display: none;
}

.next-action-overlay-label {
    font-size: 0.72em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin-bottom: 4px;
    cursor: grab;
    padding: 2px 0;
    margin: -2px 0 2px;
    touch-action: none;
}

.next-action-overlay.is-dragging .next-action-overlay-label {
    cursor: grabbing;
}

.next-action-overlay-countdown {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.05;
    color: #111;
}

.next-action-overlay-time {
    font-size: 0.95em;
    color: #333;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.next-action-overlay-name {
    font-size: 0.82em;
    color: #555;
    margin-top: 3px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.next-action-overlay.is-soon .next-action-overlay-countdown {
    color: #b71c1c;
}

.next-action-overlay.is-idle .next-action-overlay-countdown {
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
}

.next-action-overlay-trim {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: space-between;
    gap: 3px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.next-action-trim-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 4px 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f7f7f7;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: #333;
    cursor: pointer;
    touch-action: manipulation;
}

.next-action-trim-btn:hover {
    background: #eee;
}

.next-action-trim-btn:active {
    background: #e4e4e4;
}

.next-action-trim-reset {
    flex: 1.15 1 0;
}

.next-action-overlay.is-trim-shifted .next-action-trim-reset {
    border-color: #8ab;
    background: #eef4fa;
}

.scene-size-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

body:not(.app-mode-plan):not(.app-mode-show) .scene-size-overlay {
    display: none;
}

.scene-size-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.scene-size-btn {
    min-width: 2.4em;
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 0.95em;
    line-height: 1.2;
    cursor: pointer;
    color: #333;
    white-space: nowrap;
}

.scene-size-btn:hover {
    background: #f5f5f5;
}

.scene-size-btn.is-active {
    border-color: #2a7a2a;
    background: #e8f5e9;
    color: #1a5c1a;
    font-weight: 600;
}

@keyframes export-dirty-pulse {
    0%,
    100% {
        background: #e8f0fe;
        border-color: #7aa7e8;
        color: inherit;
    }

    50% {
        background: #ffd6d6;
        border-color: #e88;
        color: #900;
    }
}

.export-all-btn.is-export-dirty {
    animation: export-dirty-pulse 1.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .export-all-btn.is-export-dirty {
        animation: none;
        background: #ffd6d6;
        border-color: #e88;
        color: #900;
    }
}

.app-mode-nav-plan-controls .toolbar-panel {
    padding: 2px 6px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.app-mode-nav-plan-controls .layers-panel {
    width: auto;
    gap: 10px;
}

.app-mode-nav-plan-controls .layer-toggles {
    font-size: 0.86em;
    gap: 6px 12px;
}

.app-mode-nav-plan-controls .layers-config-btn {
    padding: 5px 10px;
    font-size: 0.88em;
}

.app-mode-tab {
    padding: 8px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font: inherit;
    font-size: 0.95em;
    font-weight: 600;
    color: #555;
    cursor: pointer;
}

.app-mode-tab:hover {
    background: rgba(255, 255, 255, 0.65);
    color: #333;
}

.app-mode-tab.is-active {
    background: #fff;
    border-color: #ccc;
    color: #1a5c1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.app-mode-view {
    display: none;
}

.app-mode-view.is-active {
    display: block;
}

.manage-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2vw, 16px);
    width: 100%;
    max-width: none;
}

.manage-card.manage-play-meta {
    width: 100%;
}

.manage-play-row .play-select {
    flex: 1 1 240px;
    max-width: min(100%, 480px);
}

.play-meta-form {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.play-meta-form:disabled {
    opacity: 0.55;
}

.play-meta-form:disabled .play-meta-field input,
.play-meta-form:disabled .play-meta-row input,
.play-meta-form:disabled .play-meta-interval input,
.play-meta-form:disabled .play-meta-field textarea {
    cursor: not-allowed;
}

.play-meta-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.play-meta-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 12px;
}

.play-meta-label {
    flex: 0 0 11.5rem;
    font-size: 0.88em;
    font-weight: bold;
    color: #333;
}

.play-meta-row input[type="time"],
.play-meta-row input[type="date"] {
    font: inherit;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    width: auto;
    max-width: 16em;
}

.play-meta-row input[type="text"] {
    font: inherit;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    flex: 1 1 16em;
    max-width: 32em;
}

.play-meta-interval {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.play-meta-interval input[type="time"] {
    font: inherit;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    width: auto;
    max-width: 9em;
}

.play-meta-interval-sep {
    color: #666;
    font-weight: bold;
}

.play-meta-intermission-duration {
    font-size: 0.92em;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

.play-meta-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88em;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.play-meta-field textarea {
    font: inherit;
    font-weight: normal;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    width: 100%;
    max-width: 100%;
    resize: vertical;
    min-height: 4.5em;
    line-height: 1.4;
}

.play-meta-field-full {
    margin-bottom: 12px;
}

.play-meta-field-full:last-of-type {
    margin-bottom: 0;
}

.play-meta-field-full textarea {
    max-width: none;
}

.manage-card {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.manage-card.manage-play-meta > h2 {
    margin: 0 0 12px;
    font-size: 1.05em;
    color: #222;
}

.manage-card-hint {
    margin: 0 0 12px;
    font-size: 0.88em;
    color: #555;
    line-height: 1.4;
}

.manage-play-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 10px;
}

.manage-play-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.manage-current-play {
    margin: 0 0 8px;
    font-size: 0.92em;
    color: #444;
    line-height: 1.45;
}

.manage-current-play strong {
    color: #111;
}

.manage-data-source {
    color: #666;
    font-size: 0.95em;
}

.show-start-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 6px;
}

.show-start-row label {
    font-weight: bold;
    font-size: 0.95em;
}

.show-start-row input[type="time"] {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
    font-size: 1.05em;
}

.show-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(360px, 1fr);
    gap: clamp(12px, 2vw, 16px);
    align-items: stretch;
}

body.app-mode-show #view-show {
    display: block;
}

@media (min-width: 1601px) {
    body.app-mode-show .show-layout {
        container-type: inline-size;
        align-items: start;
    }

    body.app-mode-show .sidebar-show {
        align-self: start;
        max-height: var(--scene-fit-height-rem, var(--scene-fit-rem, calc(100vh - var(--scene-chrome-offset))));
    }

    body.app-mode-show .actions-panel {
        flex: none;
        max-height: var(--scene-fit-height-rem, var(--scene-fit-rem, calc(100vh - var(--scene-chrome-offset))));
    }

    body.app-mode-plan .plan-layout {
        container-type: inline-size;
        align-items: start;
    }

    body.app-mode-plan .sidebar-planning {
        align-self: start;
        height: var(--scene-fit-height-rem, var(--scene-fit-rem, calc(100vh - var(--scene-chrome-offset))));
        max-height: var(--scene-fit-height-rem, var(--scene-fit-rem, calc(100vh - var(--scene-chrome-offset))));
    }

    body.app-mode-plan .sidebar-planning .turntable-panel {
        flex: 0 0 auto;
        max-height: none;
        padding: 8px 10px;
        overflow: visible;
    }

    body.app-mode-plan .sidebar-planning .turntable-panel h2 {
        margin-bottom: 6px;
        font-size: 1em;
    }

    body.app-mode-plan .sidebar-planning .turntable-panel-hint {
        margin-bottom: 8px;
        font-size: 0.8em;
        line-height: 1.3;
    }

    body.app-mode-plan .sidebar-planning .turntable-angle-range {
        margin-top: 8px;
    }

    body.app-mode-plan .sidebar-planning .assignments-panel {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
    }
}

body.app-mode-show .show-scene-slot {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

body.app-mode-show .show-scene-slot .scene-column {
    flex: 0 1 auto;
    min-height: 0;
    max-height: none;
}

body.app-mode-show .show-scene-slot .scene-viewport {
    flex: 0 1 auto;
    min-height: 0;
    max-height: none;
    align-self: start;
}

body.app-mode-show .sidebar-show {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

body.app-mode-show .actions-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.app-mode-show .panel-header.actions-panel-header {
    flex-shrink: 0;
}

body.app-mode-show .actions-panel {
    container-type: inline-size;
    container-name: actions-panel;
}

body.app-mode-show .actions-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: auto;
}

body.app-mode-show #actions-list {
    display: table-row-group;
    overflow: visible;
}

body.app-mode-show .intersection {
    cursor: default;
    pointer-events: none;
}

body.app-mode-plan.config-mode .assignments-panel {
    display: none !important;
}

body.app-mode-manage .scene-column,
body.app-mode-manage .plan-layout {
    display: none !important;
}

body.app-mode-card .scene-column,
body.app-mode-card .plan-layout {
    display: none !important;
}

.play-meta-row-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    width: 100%;
}

@media (max-width: 720px) {
    .play-meta-row-pair {
        grid-template-columns: 1fr;
    }
}

.play-mini-card-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 12px;
}

.play-mini-card-toolbar-hint {
    font-size: 0.9em;
    color: #666;
}

.play-mini-card-wrap {
    display: flex;
    justify-content: center;
    padding: 8px 0 24px;
}

.play-mini-card-sheet {
    box-sizing: border-box;
    width: 105mm;
    min-height: 148mm;
    max-width: 100%;
    padding: 5mm;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-size: 9pt;
    line-height: 1.35;
    color: #111;
}

.play-mini-card-header {
    margin-bottom: 3mm;
}

.play-mini-card-title {
    margin: 0;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.25;
}

.play-mini-card-ul-double {
    border-bottom: 0.35mm double #111;
    padding-bottom: 0.8mm;
}

.play-mini-card-ul-double-block {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.play-mini-card-ul-single {
    display: inline-block;
    border-bottom: 0.2mm solid #111;
    padding-bottom: 0.4mm;
}

.play-mini-card-top {
    --play-mini-card-dt: 21mm;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4mm 5mm;
    margin-bottom: 4mm;
    align-items: start;
}

.play-mini-card-col {
    min-width: 0;
}

.play-mini-card-top .play-mini-card-dl-row {
    grid-template-columns: var(--play-mini-card-dt) minmax(0, 1fr);
    column-gap: 2mm;
}

.play-mini-card-section-title {
    margin: 0 0 2mm;
    font-size: 10pt;
    font-weight: 700;
    line-height: 1.2;
}

.play-mini-card-col-gear .play-mini-card-section-title {
    margin-bottom: 1.5mm;
}

.play-mini-card-subtitle {
    margin: 0 0 1.5mm;
    font-size: 9pt;
    font-weight: 600;
}

.play-mini-card-dl {
    margin: 0;
}

.play-mini-card-dl-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1mm 3mm;
    margin-bottom: 1.5mm;
    align-items: baseline;
}

.play-mini-card-dl-row dt {
    margin: 0;
    font-weight: 600;
}

.play-mini-card-dl-row dd {
    margin: 0;
    min-width: 0;
    word-break: break-word;
}

.play-mini-card-block {
    margin-top: 3mm;
    padding-top: 2mm;
    border-top: 1px solid #ccc;
}

.play-mini-card-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 3mm;
}

.play-mini-card-action-list {
    margin: 0;
    padding-left: 1.2em;
}

.play-mini-card-action-list li {
    margin-bottom: 0.5mm;
}

.play-mini-card-notes {
    margin: 0;
    white-space: pre-wrap;
}

.play-mini-card-empty,
.play-mini-card-placeholder {
    margin: 0;
    color: #666;
}

.page-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 10px;
    padding: 6px 0 4px;
    border-top: 1px solid #ccc;
    font-size: 0.78em;
    color: #999;
}

.page-footer-left {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.page-footer-brand {
    font-weight: 600;
    color: #666;
}

.page-footer-right {
    margin-left: auto;
    text-align: right;
}

.top-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(10px, 2vw, 12px);
    margin: 0 0 12px;
    align-items: stretch;
}

.toolbar-panel {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9em;
    min-width: 0;
}

.layers-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.layers-panel .layer-toggles {
    flex: 1 1 auto;
    min-width: 0;
}

.layers-config-btn {
    flex: 0 0 auto;
    margin-left: auto;
    white-space: nowrap;
}

.play-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.play-toolbar-label {
    font-weight: bold;
    color: #444;
}

.play-select {
    flex: 1 1 160px;
    min-width: 0;
    max-width: 280px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
}

.play-datetime {
    flex: 0 1 120px;
    min-width: 0;
    max-width: 140px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
}

.play-datetime:disabled {
    background: #f5f5f5;
    color: #888;
}

.play-btn-primary,
.btn--primary {
    background: #e8f0fe;
    border-color: #7aa7e8;
    font-weight: bold;
}

.play-btn-primary:hover,
.btn--primary:hover {
    background: #dce8fc;
}

.play-btn-danger,
.btn--danger {
    border-color: #c88;
    color: #900;
}

.play-btn-danger:hover:not(:disabled),
.btn--danger:hover:not(:disabled) {
    background: #fee;
}

.config-panel {
    display: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9em;
}

.config-panel.is-visible {
    display: flex;
}

.config-panel h2 {
    margin: 0;
    font-size: 1.05em;
    flex: 0 0 auto;
}

.config-panel-hint {
    margin: 0;
    color: #555;
    font-size: 0.85em;
    line-height: 1.35;
    flex: 1 1 200px;
    min-width: 0;
}

.config-cat-select {
    flex: 0 1 100px;
    min-width: 72px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
}

.scene-column {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vw, 12px);
    min-width: 0;
}

.scene-print-header {
    display: none;
}

.print-play-info {
    display: none;
}

body.config-mode .assignments-panel {
    display: none !important;
}

body.config-mode .intersection {
    fill: #45e055;
    stroke: #1a8a28;
    stroke-width: 0.35;
    opacity: 1;
}

body.config-mode .intersection:hover {
    fill: #5ef56a;
    stroke: #127020;
}

body.config-mode .intersection.config-idle {
    fill: rgb(177, 177, 177);
    stroke: #888;
}

body.config-mode .intersection.config-blocked {
    fill: #c62828;
    stroke: #8b0000;
    stroke-width: 0.4;
}

body.config-mode .intersection.config-blocked:hover {
    fill: #e53935;
    stroke: #6d0000;
}

body.config-mode .intersection.marked {
    fill: #45e055;
    stroke: #1a8a28;
}

body.config-mode .cat-number-label {
    visibility: hidden;
}

.config-block-x {
    stroke: #111;
    stroke-linecap: round;
    pointer-events: none;
    opacity: 0;
}

body.config-mode .config-block-x.is-visible {
    opacity: 1;
}

.layer-toggles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.88em;
}

.layer-toggles label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
}

.layer-toggles input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.layer-toggles-sep {
    width: 1px;
    align-self: stretch;
    min-height: 1.2em;
    background: #ddd;
    margin: 0 2px;
}

.layers-panel .play-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.plan-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(360px, 1fr);
    gap: clamp(10px, 2vw, 16px);
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

.scene-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x;
    width: 100%;
    min-width: 0;
    align-self: start;
}

.scene-wrap {
    position: relative;
    width: min(100%, var(--scene-fit-width-rem, var(--scene-fit-rem, calc(100vh - var(--scene-chrome-offset)))));
    max-width: 100%;
    background: #fff;
    padding-bottom: 4px;
    box-sizing: border-box;
    _border: 1px solid #ccc;
    _box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

body.scene-display-fit .scene-wrap {
    aspect-ratio: 1;
    height: auto;
}

body.scene-display-fill-width .scene-wrap {
    width: 100%;
    height: var(--scene-fit-height-rem, auto);
    aspect-ratio: auto;
}

body.scene-display-fill-square .scene-wrap {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
}

.sidebar-panels {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2vw, 16px);
    min-height: 0;
    min-width: 0;
    align-self: stretch;
}

.sidebar-planning .turntable-panel {
    flex: 0 1 33%;
    max-height: 33%;
}

.sidebar-planning .assignments-panel {
    flex: 1 1 67%;
    min-height: 0;
}

.assignments-panel,
.actions-panel,
.turntable-panel {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}

.assignments-panel.is-hidden,
.actions-panel.is-hidden,
.turntable-panel.is-hidden {
    display: none;
}

.sidebar-panels.is-empty {
    display: none;
}

@media (min-width: 1025px) {
    .plan-layout.sidebar-collapsed {
        grid-template-columns: 1fr;
    }
}

.assignments-panel h2,
.turntable-panel h2 {
    margin: 0 0 10px;
    font-size: 1.05em;
}

.actions-panel h2 {
    margin: 0;
    font-size: 1.05em;
}

.actions-time-display-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.actions-time-display-toggle input {
    margin: 0;
    cursor: pointer;
}

.actions-time-display-toggle input:disabled {
    cursor: not-allowed;
}

.actions-panel-header-tools .actions-filter-multi {
    margin-left: 2px;
}

.panel-header__tools .btn,
.panel-header__tools .add-action-btn {
    flex-shrink: 0;
}

.actions-filter-multi {
    position: relative;
    flex-shrink: 0;
}

.actions-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fff;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    line-height: 1.2;
    max-width: min(100%, 220px);
}

.actions-filter-trigger:hover {
    background: #f5f5f5;
}

.actions-filter-trigger.is-filter-active {
    border-color: #6a8fc7;
    background: #f4f7fc;
}

.actions-filter-trigger.is-filter-empty {
    border-color: #c88;
    background: #fff5f5;
}

.actions-filter-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

.actions-filter-trigger-text {
    font-weight: 600;
}

.actions-filter-summary {
    font-weight: normal;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 9rem;
}

.actions-filter-caret {
    font-size: 0.65em;
    color: #666;
    margin-left: 2px;
}

.actions-filter-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 200;
    min-width: 10.5rem;
    padding: 6px 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.actions-filter-menu[hidden] {
    display: none;
}

.actions-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 0.88rem;
    cursor: pointer;
    user-select: none;
    color: #222;
}

.actions-filter-option:hover {
    background: #f0f4fa;
}

.actions-filter-option input {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.action-row-turntable {
    border-left: 3px solid #6a5acd;
}

#turntable-rotatable.turntable-action-active {
    filter: drop-shadow(0 0 6px rgba(106, 90, 205, 0.55));
}

#turntable-rotatable.turntable-action-highlight {
    filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.75));
}

.turntable-panel-hint {
    margin: 0 0 12px;
    font-size: 0.85em;
    color: #555;
    line-height: 1.35;
}

.assignments-panel-hint {
    margin: 0 0 10px;
    font-size: 0.85em;
    color: #555;
    line-height: 1.35;
}

.assignments-sort-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.assignments-sort-btn {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 0.85em;
    cursor: pointer;
    color: #333;
}

.assignments-sort-btn:hover {
    background: #f5f5f5;
}

.assignments-sort-btn.is-active {
    border-color: #2a7a2a;
    background: #e8f5e9;
    color: #1a5c1a;
    font-weight: 600;
}

.turntable-angle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.turntable-angle-row label {
    font-weight: bold;
    color: #444;
    font-size: 0.9em;
}

.turntable-angle-input {
    width: 4.5em;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
    font-variant-numeric: tabular-nums;
}

.turntable-angle-input:disabled,
.turntable-angle-range:disabled {
    background: #f5f5f5;
    color: #888;
}

.turntable-angle-unit {
    font-size: 0.95em;
    color: #444;
}

.turntable-angle-step {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1.15em;
    line-height: 1;
}

.turntable-angle-step:hover:not(:disabled) {
    background: #eee;
}

.turntable-angle-step:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.turntable-angle-range {
    width: 100%;
    margin-top: 12px;
    accent-color: #0066cc;
}

.actions-column-header {
    display: none;
}

/* Řádky akcí jsou <tr> — display řídí režim tabulky (container queries), ne flex sloupec */
.action-row:last-child td {
    border-bottom: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.app-mode-show .actions-data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    border-spacing: 0;
}

body.app-mode-show .actions-data-table col.actions-col-num {
    width: 2.5em;
}

body.app-mode-show .actions-data-table col.actions-col-type {
    width: 2em;
}

body.app-mode-show .actions-data-table col.actions-col-time {
    width: 6.25rem;
}

body.app-mode-show .actions-data-table col.actions-col-name {
    width: 14%;
}

body.app-mode-show .actions-data-table col.actions-col-note {
    width: 28%;
}

body.app-mode-show .actions-data-table col.actions-col-cats {
    width: 12%;
}

body.app-mode-show .actions-data-table col.actions-col-control {
    width: 18%;
}

.action-num-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 0;
}

.action-num-cell .action-num {
    line-height: 1.2;
}

.action-num-cell .action-delete {
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    font-size: 1rem;
}

body.app-mode-show .action-td-num {
    vertical-align: middle;
    text-align: center;
}

/* Úzký panel akcí (sidebar i pod scénou): stejné karty + popisky polí */
@container actions-panel (max-width: 639px) {
    .actions-table-wrap {
        overflow-x: hidden;
    }

    .actions-data-table thead {
        display: none;
    }

    body.app-mode-show .actions-data-table,
    body.app-mode-show .actions-data-table tbody#actions-list {
        display: block;
        width: 100%;
    }

    .actions-panel .action-row {
        display: flex !important;
        flex-flow: row wrap;
        align-items: center;
        align-content: flex-start;
        gap: 6px 8px;
        padding: 12px 0 !important;
        min-height: 0 !important;
        min-width: 0;
        border-bottom: 1px solid #ddd;
    }

    .actions-panel .action-row > td {
        display: contents;
    }

    .actions-panel .action-num,
    .actions-panel .action-type-readonly {
        display: inline-flex;
        flex: 0 0 auto;
        width: auto;
        align-self: center;
        background: transparent !important;
        padding: 0;
        min-height: 0;
        white-space: nowrap;
    }

    .actions-panel .action-field {
        display: inline-flex;
        flex-flow: row nowrap;
        align-items: center;
        gap: 4px;
        flex: 0 1 auto;
        width: auto;
        max-width: 100%;
    }

    .actions-panel .action-field-label {
        flex: 0 0 auto;
        white-space: nowrap;
        font-size: 0.78rem;
        font-weight: 600;
        color: #555;
        line-height: 1.2;
        text-align: left;
    }

    .actions-panel .action-field > .action-name-input,
    .actions-panel .action-field > .action-cats-input,
    .actions-panel .action-field > .action-control-input,
    .actions-panel .action-field > .action-cell-readonly:not(.action-note-input) {
        flex: 0 1 auto;
        width: 15ch;
        max-width: 15ch;
        min-width: 0;
    }

    .actions-panel .action-field > .action-time-wrap {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .actions-panel .action-field-note {
        order: 50;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .actions-panel .action-field-note .action-field-label {
        width: auto;
        text-align: left;
    }

    .actions-panel textarea.action-note-input {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
        resize: vertical;
    }

    .actions-panel .action-num-cell {
        flex: 0 0 auto;
        align-self: flex-start;
    }

    body.app-mode-show .action-field-time {
        display: inline-flex;
        flex-flow: row nowrap;
        align-items: center;
        justify-content: flex-start;
        width: auto;
        max-width: 100%;
    }

    body.app-mode-show .action-field-time .action-time-wrap {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
    }

    .actions-panel .action-row input,
    .actions-panel .action-row select,
    .actions-panel .action-row textarea,
    .actions-panel .action-cell-readonly {
        min-height: 36px;
        height: auto !important;
        border: 1px solid #ccc !important;
        border-radius: 4px;
        background: #fff !important;
    }

    .actions-panel .action-row textarea.action-note-input {
        min-height: 4.5em;
        padding: 6px 8px;
        line-height: 1.35;
        font: inherit;
    }

    .actions-panel .action-time-wrap {
        border: 1px solid #ccc;
        border-radius: 4px;
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .actions-panel .action-field-time .action-time-step {
        width: 20px;
        min-width: 20px;
        min-height: 36px;
        font-size: 0.85rem;
    }

    .actions-panel .action-field-time input.action-time {
        flex: 0 0 auto;
        width: 5.65em;
        max-width: 5.65em;
        min-width: 0;
        border: none !important;
        padding: 0 1px;
        font-size: 0.78rem;
    }

    .actions-panel .action-num-cell .action-delete {
        border-radius: 4px;
        border: 1px solid #ccc !important;
        background: #f5f5f5 !important;
    }
}

/* Široký panel: HTML tabulka — sloupce sdílené přes colgroup */
@container actions-panel (min-width: 640px) {
    .actions-data-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        border-spacing: 0;
    }

    .actions-data-table col.actions-col-num {
        width: 2.25em;
    }

    .actions-data-table col.actions-col-type {
        width: 2em;
    }

    .actions-data-table col.actions-col-time {
        width: 7.25rem;
    }

    .actions-data-table col.actions-col-name {
        width: 14%;
    }

    .actions-data-table col.actions-col-note {
        width: 28%;
    }

    .actions-data-table col.actions-col-cats {
        width: 12%;
    }

    .actions-data-table col.actions-col-control {
        width: 18%;
    }

    body.app-mode-show .actions-data-table tbody#actions-list {
        display: table-row-group;
    }

    .actions-panel tr.action-row {
        display: table-row;
    }

    .actions-panel .action-row > td {
        display: table-cell;
        overflow: hidden;
        max-width: 0;
    }

    .actions-data-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 6px 5px;
        border-bottom: 2px solid #bbb;
        border-right: 1px solid #ddd;
        background: #f0f0f0;
        font-size: 0.72rem;
        font-weight: 600;
        color: #444;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        text-align: left;
        vertical-align: bottom;
    }

    .actions-panel .action-row td {
        vertical-align: middle;
        padding: 0;
        border-bottom: 1px solid #ddd;
        border-right: 1px solid #e8e8e8;
    }

    .actions-panel .action-field {
        display: flex;
        flex-direction: column;
        justify-content: stretch;
        min-width: 0;
        min-height: 100%;
    }

    .actions-panel .action-field-label {
        display: none;
    }

    .actions-panel .action-field {
        width: 100%;
        max-width: 100%;
    }

    .actions-panel .action-field > .action-name-input,
    .actions-panel .action-field > .action-note-input,
    .actions-panel .action-field > .action-cats-input,
    .actions-panel .action-field > .action-control-input,
    .actions-panel .action-field > .action-time-wrap,
    .actions-panel .action-field > .action-cell-readonly {
        flex: 1 1 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 34px;
        box-sizing: border-box;
    }

    .actions-panel .action-field-time {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }

    .actions-panel .action-field-time .action-time-wrap {
        display: grid;
        grid-template-columns: 20px 5.65em 20px;
        width: max-content;
        max-width: 100%;
        gap: 0;
        align-items: stretch;
    }

    .actions-panel .action-field-time .action-time-step {
        width: 100%;
        min-width: 0;
        font-size: 0.85rem;
    }

    .actions-panel .action-field-time input.action-time,
    .actions-panel .action-field-time .action-cell-readonly.action-time {
        width: 100%;
        max-width: none;
        min-width: 0;
        padding: 0 1px;
        font-size: 0.78rem;
        font-variant-numeric: tabular-nums;
        text-align: center;
        box-sizing: border-box;
    }

    .actions-panel .action-name-input,
    .actions-panel .action-cats-input,
    .actions-panel .action-control-input {
        max-width: 100%;
        font-variant-numeric: normal;
    }

    .actions-panel .action-cell-readonly {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .actions-panel .action-field-note .action-note-input {
        width: 100%;
        max-width: 100%;
        resize: vertical;
    }

    body.app-mode-show .action-field-time {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
    }

    body.app-mode-show .action-field-time .action-time-wrap {
        width: max-content;
        max-width: 100%;
    }
}

body.app-mode-show .action-row {
    padding: 0;
    margin: 0;
    border-radius: 0;
    min-height: 34px;
}

body.app-mode-show .action-row td {
    min-width: 0;
    max-width: 0;
    overflow: hidden;
}

body.app-mode-show .action-num,
body.app-mode-show .action-type-readonly {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    background: #fafafa;
    color: #333;
}

body.app-mode-show .action-row input,
body.app-mode-show .action-row select,
body.app-mode-show .action-row textarea,
body.app-mode-show .action-cell-readonly {
    width: 100%;
    height: 100%;
    min-height: 34px;
    box-sizing: border-box;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 0.88rem;
    padding: 4px 6px;
}

body.app-mode-show .action-row textarea.action-note-input {
    min-height: 3.6em;
    resize: vertical;
    line-height: 1.35;
}

body.app-mode-show .action-row input:focus,
body.app-mode-show .action-row select:focus,
body.app-mode-show .action-row textarea:focus {
    outline: 2px solid #6a8fc7;
    outline-offset: -2px;
    background: #fffef5;
    z-index: 1;
}

body.app-mode-show .action-field-time .action-time-wrap {
    display: grid;
    grid-template-columns: 20px 5.65em 20px;
    gap: 0;
    align-items: stretch;
    min-width: 0;
}

body.app-mode-show .action-time-step {
    width: 20px;
    min-width: 20px;
    height: auto;
    border: none;
    border-right: 1px solid #e8e8e8;
    border-radius: 0;
    background: #f5f5f5;
    font-size: 0.85rem;
}

body.app-mode-show .action-time-wrap .action-time-step {
    width: 100%;
    min-width: 0;
}

body.app-mode-show .action-time-step-placeholder {
    visibility: hidden;
    pointer-events: none;
}

body.app-mode-show .action-time-wrap input.action-time,
body.app-mode-show .action-time-wrap .action-cell-readonly.action-time {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0 1px;
    border-right: none;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

body.app-mode-show .action-row.action-due {
    background: #ffd6d6;
    margin: 0;
    padding: 0;
}

body.app-mode-show .action-row.action-due td {
    background: #ffd6d6;
}

body.app-mode-show .action-row.action-selected {
    box-shadow: inset 0 0 0 2px #2a7a2a;
    border-radius: 0;
}

body.app-mode-show .action-row.intermission-row,
body.app-mode-show .action-row.schedule-row {
    background: #eef2f8;
    margin: 0;
    padding: 0;
}

body.app-mode-show .action-row.intermission-row td,
body.app-mode-show .action-row.schedule-row td {
    background: #eef2f8;
}

body.app-mode-show .action-row-turntable .action-type-readonly {
    background: #f0eef8;
    font-weight: 700;
}

body.app-mode-show .action-row-table .action-type-readonly {
    background: #eef6f0;
    font-weight: 700;
}

body.app-mode-show .action-time-label {
    display: none;
}

body.app-mode-show .action-time-sep {
    padding: 0 2px;
    align-self: center;
    font-size: 0.85em;
    color: #666;
}

.action-row.action-due {
    background: #ffd6d6;
    border-radius: 5px;
    padding: 8px;
    margin: 0 -4px;
    border-bottom-color: #e88;
}

.action-row.action-due .action-num {
    color: #900;
}

.action-row.action-selected {
    box-shadow: inset 0 0 0 2px #2a7a2a;
    border-radius: 5px;
}

.action-row.intermission-row,
.action-row.schedule-row {
    background: #f3f6fb;
    border-radius: 5px;
    padding: 8px;
    margin: 0 -4px;
    border-bottom-color: #d8e0ec;
}

.action-row.intermission-row .action-num,
.action-row.schedule-row .action-num {
    color: #456;
}

.action-row.intermission-row .intermission-readonly {
    font: inherit;
    font-size: 0.88em;
    color: #222;
    padding: 5px 7px;
    border: 1px solid #d0d8e4;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
}

.action-row.intermission-row .intermission-name {
    font-weight: 600;
}

.action-row.intermission-row .intermission-wall-clock {
    font-size: 0.88em;
    color: #555;
}

.action-row.intermission-row .intermission-empty {
    color: #aaa;
}

.action-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.action-num {
    font-weight: bold;
    font-size: 0.95em;
    color: #333;
}

.action-row-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action-row input,
.action-row textarea {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.88em;
    padding: 5px 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.action-row textarea.action-note-input {
    resize: vertical;
    min-height: 3.6em;
    line-height: 1.35;
    font: inherit;
}

.action-row input.action-time {
    flex: 0 0 auto;
    width: 5.65em;
    max-width: 5.65em;
    min-width: 0;
    font-variant-numeric: tabular-nums;
    font-size: 0.78rem;
    padding: 0 1px;
}

.action-row .action-cell-readonly.action-time {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.action-time-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
    justify-content: flex-start;
}

.action-time-step {
    flex-shrink: 0;
    width: 20px;
    height: 26px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-time-step:hover {
    background: #eee;
}

.action-time-step-placeholder {
    visibility: hidden;
    pointer-events: none;
}

.action-time-label {
    font-size: 0.78em;
    color: #666;
    margin-top: -2px;
}

.action-delete {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: #999;
    color: #666;
    font-size: 1.1rem;
    font-weight: bold;
}

.action-delete:hover {
    color: #c00;
    border-color: #c00;
    background: #fff5f5;
}

.assignments-table-wrap {
    overflow-x: auto;
    margin-top: 4px;
}

.assignments-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92em;
    line-height: 1.35;
}

.assignments-table th.assignment-th {
    text-align: left;
    font-weight: 600;
    font-size: 0.88em;
    color: #555;
    padding: 5px 6px 4px;
    border-bottom: 2px solid #ccc;
    white-space: nowrap;
}

.assignments-table th.assignment-th.is-sort-col {
    color: #1a5c1a;
}

.assignments-table th.assignment-th-sortable {
    cursor: pointer;
    user-select: none;
}

.assignments-table th.assignment-th-sortable:hover {
    color: #1a5c1a;
    background: rgba(42, 122, 42, 0.06);
}

.assignments-table th.assignment-th-sortable:focus-visible {
    outline: 2px solid #2a7a2a;
    outline-offset: -2px;
}

.assignment-sort-arrow {
    font-size: 0.85em;
    opacity: 0.85;
}

.assignments-table td.assignment-td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.assignments-table tr.assignment-item:last-child td {
    border-bottom: none;
}

.assignment-td-r,
.assignment-td-sl {
    font-variant-numeric: tabular-nums;
    color: #444;
    white-space: nowrap;
}

.assignment-td-cat {
    min-width: 8em;
}

.assignment-cat-input {
    width: 100%;
    min-width: 7em;
    box-sizing: border-box;
    font: inherit;
    font-weight: 600;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.assignment-td-pipe {
    min-width: 6.5em;
}

.assignment-td-hanger {
    width: 40%;
}

.assignments-empty {
    color: #888;
    font-style: italic;
    margin: 0;
}

svg#scene {
    display: block;
    width: 100%;
    height: 100%;
}

.grid-line {
    stroke: #5e6266;
    stroke-width: 0.35;
}

.grid-line.group-gap {
    stroke: #888;
    stroke-width: 0.25;
}

.grid-line.row-marked {
    stroke: #000;
    stroke-width: 3;
}

.axis-line {
    stroke: #5e6266;
    stroke-width: 0.35;
    stroke-dasharray: 1.2 0.8;
}

.canvas-border {
    fill: none;
    stroke: #000;
    stroke-width: 1;
}

.scene-circle {
    fill: rgba(0, 102, 204, 0.1);
    stroke: #0066cc;
    stroke-width: 0.5;
    pointer-events: none;
}

.trapdoor {
    fill: none;
    stroke: rgba(23, 103, 223, 0.621);
    stroke-width: 2.2;
    pointer-events: none;
}

.service-opening-fill {
    fill: rgba(0, 102, 204, 0.1);
    stroke: none;
    pointer-events: none;
}

.service-opening-edge {
    fill: none;
    stroke: rgba(23, 103, 223, 0.621);
    stroke-width: 2.2;
    pointer-events: none;
}

#layer-turntable {
    opacity: 0.5;
}

#layer-turntable .scene-circle {
    fill: rgba(0, 102, 204, 0.05);
    stroke: rgba(0, 102, 204, 0.4);
    stroke-width: 0.35;
}

#layer-turntable .trapdoor,
#layer-turntable .service-opening-edge {
    stroke: rgba(23, 103, 223, 0.35);
    stroke-width: 1.2;
}

#layer-turntable .service-opening-fill {
    fill: rgba(0, 102, 204, 0.05);
}

.portal {
    fill: url(#portal-hatch);
    stroke: #000;
    stroke-width: 1;
    pointer-events: none;
}

.curtain {
    fill: none;
    stroke: #8b2346;
    stroke-width: 1.1;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.rope-pipe {
    fill: none;
    stroke: #eaeaea;
    stroke-width: 6;
    stroke-linecap: butt;
    pointer-events: none;
}

.rope-pipe-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 20;
    stroke-linecap: butt;
    pointer-events: stroke;
    cursor: help;
}

.rope-pipe.rope-pipe-marked {
    stroke: #111;
    stroke-width: 7;
}

.rope-pipe-label {
    pointer-events: none;
    user-select: none;
}

.rope-pipe-hit:hover + .rope-pipe {
    stroke: #000;
    stroke-width: 7;
}

.axis-label {
    fill: #444;
    user-select: none;
}

.axis-label.sl {
    fill: #336;
    font-weight: bold;
}

.axis-label.sl.col-marked {
    fill: #000;
}

.axis-label.row-label {
    font-weight: normal;
}

.axis-label.row-label.row-marked {
    font-weight: bold;
    fill: #000;
}

.intersection {
    fill: rgb(177, 177, 177);
    stroke: #b00;
    stroke-width: 0.25;
    cursor: pointer;
    opacity: 0.85;
}

.intersection:hover {
    fill: #ff4444;
    stroke: #900;
    stroke-width: 0.35;
    opacity: 1;
}

.intersection.marked {
    fill: #900;
    stroke: #1a8a28;
    stroke-width: 0.35;
    opacity: 1;
}

.intersection.marked:hover {
    fill: #45e055;
    stroke: #127020;
}

.intersection.marked.action-alert,
.intersection.marked.action-highlight {
    animation: cat-action-alert-blink 0.75s ease-in-out infinite;
}

@keyframes cat-action-alert-blink {
    0%,
    100% {
        fill: #900;
        stroke: #1a8a28;
    }

    50% {
        fill: #ffcc00;
        stroke: #cc6600;
    }
}

@media (prefers-reduced-motion: reduce) {
    .intersection.marked.action-alert,
    .intersection.marked.action-highlight {
        animation: none;
        fill: #ffcc00;
        stroke: #cc6600;
    }
}

.cat-number-label {
    font-size: 28px;
    fill: #fff;
    font-weight: bold;
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    paint-order: stroke;
    stroke: #145214;
    stroke-width: 0.4;
}

.cat-alt-text-bg {
    fill: #fff;
    stroke: #bbb;
    stroke-width: 0.6;
    pointer-events: none;
}

.cat-alt-text {
    font-size: 28px;
    fill: #222;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

body.config-mode .cat-alt-label {
    visibility: hidden !important;
}

.cat-hanger-underline {
    fill: none;
    stroke: #1a5c1a;
    stroke-width: 1.1;
    stroke-linecap: butt;
    pointer-events: none;
    opacity: 1;
}

.cat-hanger-leader {
    fill: none;
    stroke: #1a5c1a;
    stroke-width: 1.1;
    stroke-linejoin: miter;
    stroke-linecap: butt;
    pointer-events: none;
    opacity: 1;
}

.cat-hanger-text-bg {
    fill: #fff;
    fill-opacity: 0.5;
    opacity: 1;
    pointer-events: none;
}

.cat-hanger-text {
    font-size: 28px;
    fill: #1a4020;
    fill-opacity: 1;
    font-weight: bold;
    pointer-events: none;
    opacity: 1;
}

#layer-hanger-labels {
    opacity: 1;
}

/* Zjednodušený plán: jen neaktivní sloupce mřížky slabě viditelné (tisk + Představení). */
.scene-plan-active-only #layer-grid .grid-line.row-line:not(.row-marked) {
    display: none !important;
}

.scene-plan-active-only #layer-grid .grid-line.col-line:not(.col-marked) {
    stroke: #adb2b8;
    stroke-width: 0.32;
    opacity: 1;
}

.scene-plan-active-only #layer-grid .grid-line.row-line.row-marked {
    stroke: #000;
    stroke-width: 3;
    opacity: 1;
}

.scene-plan-active-only #layer-grid .grid-line.col-line.col-marked {
    stroke: #000;
    stroke-width: 0.35;
    opacity: 1;
}

.scene-plan-active-only #layer-grid .axis-label.row-label:not(.row-marked) {
    display: none !important;
}

.scene-plan-active-only #layer-grid .axis-label.sl:not(.col-marked) {
    display: none !important;
}

.scene-plan-active-only #layer-pipes .rope-pipe-hit {
    display: none !important;
}

.scene-plan-active-only #layer-pipes .rope-pipe-group:not(:has(.rope-pipe-marked)) {
    display: none !important;
}

.scene-plan-active-only .intersection:not(.marked),
.scene-plan-active-only .intersection-group:not(:has(.marked)) {
    display: none !important;
    visibility: hidden !important;
}

.scene-plan-active-only #layer-turntable {
    opacity: 0.5;
}

.scene-plan-active-only #layer-turntable .scene-circle {
    fill: rgba(0, 102, 204, 0.05);
    stroke: rgba(0, 102, 204, 0.4);
    stroke-width: 0.35;
}

.scene-plan-active-only #layer-turntable .trapdoor,
.scene-plan-active-only #layer-turntable .service-opening-edge {
    stroke: rgba(23, 103, 223, 0.35);
    stroke-width: 1.2;
}

.scene-plan-active-only #layer-turntable .service-opening-fill {
    fill: rgba(0, 102, 204, 0.05);
}

body.config-mode .cat-hanger-label {
    visibility: hidden;
}

.assignment-hanger-input,
.assignment-pipe-select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 3px 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
    font-size: inherit;
}

.assignment-pipe-select {
    background: #fff;
    padding-right: 4px;
}

.assignment-hanger-input:focus,
.assignment-pipe-select:focus {
    outline: none;
    border-color: #2a7a2a;
    box-shadow: 0 0 0 2px rgba(42, 122, 42, 0.15);
}

#tooltip {
    position: fixed;
    display: none;
    pointer-events: none;
    background: rgba(30, 30, 30, 0.92);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (max-width: 1600px) {
    .plan-layout {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .show-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-panels {
        display: grid;
        grid-template-columns: 1fr;
        gap: clamp(10px, 2vw, 16px);
    }

    .assignments-panel,
    .actions-panel,
    .turntable-panel {
        flex: none;
        max-height: min(24vh, 600px);
        width: 100%;
    }

    .sidebar-planning .turntable-panel {
        flex: 0 1 auto;
        max-height: min(8vh, 200px);
    }

    .sidebar-planning .assignments-panel {
        flex: 1 1 auto;
        max-height: none;
    }

    body.app-mode-show .actions-panel {
        max-height: none;
        min-height: 0;
    }

    body.app-mode-show .show-scene-slot .scene-column,
    body.app-mode-show .show-scene-slot .scene-viewport {
        max-height: none;
        min-height: 0;
    }

    .actions-panel {
        max-height: none;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .app-top-chrome {
        position: sticky;
        top: 0;
        z-index: 200;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        padding-left: max(clamp(10px, 2vw, 20px), env(safe-area-inset-left, 0px));
        padding-right: max(clamp(10px, 2vw, 20px), env(safe-area-inset-right, 0px));
        background: #fafafa;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .app-main-scroll {
        flex: none;
        min-height: auto;
        overflow: visible;
    }

    .top-panels {
        grid-template-columns: 1fr;
    }

    .sidebar-panels {
        grid-template-columns: 1fr;
    }

    .scene-wrap {
        width: min(100%, var(--scene-fit-rem, calc(100vh - 12rem)));
    }

    .assignments-panel,
    .actions-panel,
    .turntable-panel {
        max-height: none;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.2em;
    }

    .subtitle {
        font-size: 0.88em;
        margin-bottom: 8px;
    }

    .play-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .play-select,
    .play-datetime {
        max-width: none;
        width: 100%;
    }

    .play-btn {
        flex: 1 1 auto;
    }

    .scene-wrap {
        width: min(calc(100vw - 24px), var(--scene-fit-rem, calc(100vh - 12rem)));
    }

    #tooltip {
        font-size: 12px;
        max-width: calc(100vw - 24px);
        white-space: normal;
    }
}

@media (max-width: 400px) {
    .layer-toggles label {
        flex: 1 1 100%;
    }
}

@media print {
    /* Str. 1 + 3: na výšku; str. 2 plán: na šířku */
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    @page landscape-page {
        size: A4 landscape;
        margin: 0;
    }

    @page mini-card {
        size: 105mm 148mm;
        margin: 4mm;
    }

    body {
        display: block;
        height: auto;
        padding: 0;
        background: #fff;
        overflow: visible;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .app-top-chrome {
        box-shadow: none;
        padding: 0;
    }

    .app-main-scroll {
        overflow: visible;
        padding: 0;
        min-height: auto;
    }

    .subtitle,
    .mode-subtitle,
    .app-mode-nav,
    #view-manage,
    .plan-toolbar,
    .plan-scene-toolbar,
    .scene-size-overlay,
    .app-mode-nav-plan-controls,
    .app-mode-nav-show-controls,
    #view-show .show-scene-slot,
    .top-panels,
    .config-panel,
    .turntable-panel,
    .page-footer,
    #tooltip,
    .next-action-overlay,
    .help-dialog,
    .help-btn,
    .page-header-right,
    .add-action-btn,
    .assignments-sort-bar,
    .assignments-panel-hint,
    .actions-panel-header-tools,
    .action-delete,
    .action-time-step,
    .action-time-label,
    .actions-time-display-toggle,
    .actions-filter-multi,
    input[type="file"] {
        display: none !important;
    }

    .page-header {
        display: none !important;
    }

    body.app-mode-manage .plan-layout,
    body.app-mode-manage .scene-column {
        display: flex !important;
    }

    body.print-layout .app-mode-view {
        display: none !important;
    }

    body.print-layout #view-plan,
    body.print-layout #view-show {
        display: block !important;
    }

    body.print-mini-card .app-top-chrome,
    body.print-mini-card .mode-subtitle,
    body.print-mini-card .play-mini-card-toolbar {
        display: none !important;
    }

    body.print-mini-card .app-mode-view {
        display: none !important;
    }

    body.print-mini-card #view-card {
        display: block !important;
    }

    body.print-mini-card .play-mini-card-wrap {
        padding: 0;
        display: block;
    }

    body.print-mini-card .play-mini-card-sheet {
        width: auto;
        min-height: auto;
        max-width: none;
        border: none;
        box-shadow: none;
        padding: 0;
        page: mini-card;
    }

    #view-plan,
    #view-show {
        display: block !important;
    }

    #view-plan[hidden],
    #view-show[hidden] {
        display: block !important;
    }

    #view-show .show-layout {
        display: block !important;
    }

    /* ——— Stránka 1: informace o hře ——— */
    .print-play-info {
        display: block !important;
        break-after: page;
        page-break-after: always;
        padding: 0;
        margin: 0 0 0;
    }

    .print-play-info-title {
        margin: 0 0 6mm;
        font-size: 18pt;
        line-height: 1.2;
    }

    .print-play-info-meta {
        margin: 0 0 8mm;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 2mm 8mm;
        font-size: 11pt;
    }

    .print-play-info-row {
        display: contents;
    }

    .print-play-info-meta dt {
        margin: 0;
        font-weight: 600;
        color: #333;
    }

    .print-play-info-meta dd {
        margin: 0;
        color: #000;
    }

    .print-play-info-sections {
        display: flex;
        flex-direction: column;
        gap: 7mm;
    }

    .print-play-info-section h2 {
        margin: 0 0 2mm;
        font-size: 12pt;
        font-weight: 600;
    }

    .print-play-info-text {
        margin: 0;
        font-size: 10.5pt;
        line-height: 1.45;
        white-space: normal;
    }

    .print-play-info-empty {
        color: #666;
        font-style: italic;
    }

    /* ——— Stránka 2: plán ——— */
    .plan-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .sidebar-panels {
        display: contents;
    }

    .sidebar-panels.is-empty {
        display: contents;
    }

    .scene-column {
        order: 1;
        display: flex;
        flex-direction: column;
        page: landscape-page;
        width: 297mm;
        height: 210mm;
        min-height: 210mm;
        margin: 0;
        padding: 0;
        gap: 0;
        break-after: page;
        page-break-after: always;
    }

    .scene-print-header {
        display: block;
        flex-shrink: 0;
        padding: 4mm 8mm 2mm;
    }

    .scene-print-header h1 {
        margin: 0;
        font-size: 14pt;
    }

    .scene-viewport {
        flex: 1 1 auto;
        min-height: 0;
        overflow: visible;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .scene-wrap {
        width: 192mm !important;
        height: 192mm !important;
        max-width: none;
        max-height: none;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
        box-sizing: border-box;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    svg#scene {
        width: 100%;
        height: 100%;
        display: block;
    }

    .cat-hanger-text-bg {
        fill: #fff;
        fill-opacity: 1;
        stroke: #bbb;
        stroke-width: 0.6;
    }

    .cat-hanger-text {
        fill: #222;
        fill-opacity: 1;
    }

    .cat-hanger-underline,
    .cat-hanger-leader {
        stroke: #1a5c1a;
        opacity: 1;
    }

    /* ——— Stránka 3: umístění + akce ——— */
    .assignments-panel {
        order: 2;
        break-after: avoid;
        page-break-after: avoid;
    }

    #view-show .sidebar-show .actions-panel {
        margin-top: 12mm;
        padding-top: 8mm;
        border-top: 1px solid #bbb;
        break-before: avoid;
        page-break-before: avoid;
    }

    .assignments-panel.is-hidden,
    .actions-panel.is-hidden,
    body.config-mode .assignments-panel,
    body.config-mode .actions-panel {
        display: block !important;
    }

    .assignments-panel,
    .actions-panel,
    .turntable-panel {
        flex: none;
        max-height: none;
        overflow: visible;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
    }

    .assignments-panel h2,
    .panel-header h2 {
        font-size: 14pt;
        margin: 0 0 4mm;
    }

    .actions-panel {
        font-size: 10pt !important;
    }

    .panel-header.actions-panel-header {
        margin-bottom: 4mm;
    }

    .actions-table-wrap {
        overflow: visible;
    }

    .actions-data-table {
        display: table !important;
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
    }

    .actions-data-table col.actions-col-num {
        width: 2em;
    }

    .actions-data-table col.actions-col-type {
        width: 2em;
    }

    .actions-data-table col.actions-col-time {
        width: 10%;
    }

    .actions-data-table col.actions-col-name {
        width: 14%;
    }

    .actions-data-table col.actions-col-note {
        width: 30%;
    }

    .actions-data-table col.actions-col-cats {
        width: 13%;
    }

    .actions-data-table col.actions-col-control {
        width: 28%;
    }

    .actions-data-table thead {
        display: table-header-group !important;
    }

    .actions-data-table thead th {
        text-align: left !important;
        vertical-align: bottom;
        padding: 0 1.5mm 2.5mm;
        border-bottom: 2px solid #999;
        font-weight: 600;
        font-size: 9pt;
        color: #444;
    }

    .actions-data-table tbody#actions-list {
        display: table-row-group !important;
    }

    .actions-panel .action-row {
        display: table-row !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .actions-panel .action-row > td {
        display: table-cell !important;
        vertical-align: top;
        padding: 2mm 1.5mm;
        border-bottom: 1px solid #ddd;
    }

    .actions-panel .action-field-label {
        display: none !important;
    }

    .actions-panel .action-field {
        display: block !important;
    }

    .actions-panel .action-num,
    .actions-panel .action-type-readonly {
        font-size: 10pt;
    }

    .action-row input,
    .action-row textarea {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 1px 0;
        font-size: 10pt;
        color: #000;
        appearance: none;
        -webkit-appearance: none;
        resize: none !important;
    }

    .actions-panel .action-print-text {
        display: block;
        width: 100%;
        box-sizing: border-box;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
        word-break: break-word;
        font-size: 10pt;
        line-height: 1.35;
        color: #000;
        padding: 1px 0;
    }

    .action-row input.action-time {
        width: 100%;
    }

    .action-row.action-due {
        background: transparent !important;
        margin: 0;
        padding: 0;
    }

    .assignments-table {
        font-size: 10pt;
    }

    .assignments-table-wrap {
        columns: 1;
    }

    .assignments-table th.assignment-th {
        border-bottom: 1px solid #999;
        padding-bottom: 2mm;
    }

    .assignments-table th.assignment-th-sortable {
        cursor: default;
    }

    .assignment-sort-arrow {
        display: none;
    }

    .assignments-table td.assignment-td {
        border-bottom: 1px solid #eee;
    }

    .assignments-table tr.assignment-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .assignments-empty {
        font-style: italic;
        color: #666;
    }

    .assignment-cat-input,
    .assignment-hanger-input,
    .assignment-pipe-select {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0;
        appearance: none;
        -webkit-appearance: none;
    }
}
