:root {
    --bg: #0a0d12;
    --bg-panel: #10151d;
    --bg-panel-soft: #151b25;
    --bg-field: #0d1117;
    --bg-field-strong: #080b10;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text-primary: #eef3ff;
    --text-secondary: #98a5ba;
    --text-muted: #677285;
    --accent: #51ff84;
    --accent-soft: rgba(81, 255, 132, 0.24);
    --accent-strong: rgba(81, 255, 132, 0.34);
    --accent-glow: rgba(81, 255, 132, 0.3);
    --hero-icon-color: #FFFFFF;
    --hero-icon-opacity: 0.08;
    --hero-icon-scale: 1;
    --hero-icon-hover-scale: 1.06;
    --danger: #ff6b86;
    --warning: #ffba63;
    --success: #51ff84;
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-main: 0 32px 90px rgba(0, 0, 0, 0.38);
    --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
}

[hidden] {
    display: none !important;
}

html {
    color-scheme: dark;
}

html[data-theme-mode="light"] {
    color-scheme: light;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(73, 73, 73, 0.08), transparent 26%),
        radial-gradient(circle at 85% 12%, rgba(136, 229, 255, 0.08), transparent 24%),
        linear-gradient(180deg, #090c11 0%, #0b1016 100%);
    color: var(--text-primary);
    font-family: "Space Grotesk", sans-serif;
    overflow-x: hidden;
}

html[data-theme-mode="light"] body {
    background:
        radial-gradient(circle at top left, rgba(34, 84, 132, 0.12), transparent 26%),
        radial-gradient(circle at 85% 12%, rgba(13, 148, 136, 0.12), transparent 24%),
        linear-gradient(180deg, #f4f7fb 0%, #ecf1f7 100%);
}

html[data-theme-mode="light"] {
    --bg: #eef3f8;
    --bg-panel: #ffffff;
    --bg-panel-soft: #f7fafc;
    --bg-field: #f2f6fa;
    --bg-field-strong: #e7edf4;
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(15, 23, 42, 0.16);
    --text-primary: #122033;
    --text-secondary: #506176;
    --text-muted: #71839a;
    --shadow-main: 0 24px 60px rgba(30, 41, 59, 0.12);
    --shadow-card: 0 12px 34px rgba(30, 41, 59, 0.1);
}

:root {
    --brand-company-color: #98a5ba;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    background: none;
}


.topbar {
    position: relative;
    z-index: 2200;
    isolation: isolate;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 84px;
    padding: 24px clamp(28px, 6vw, 104px);
    margin-bottom: 0;
    border: 1px solid var(--line);
    border-radius: 0;
    background: linear-gradient(180deg, rgba(17, 22, 30, 0.96), rgba(12, 16, 23, 0.94));
    box-shadow: none;
    backdrop-filter: blur(14px);
    overflow: visible;
}

.brand-lockup__row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-lockup__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-kicker {
    display: block;
    color: var(--brand-company-color, var(--text-secondary));
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.brand-title {
    font-family: "Sora", sans-serif;
    font-size: clamp(26px, 2vw, 34px);
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 1;
    white-space: nowrap;
}

.brand-title-main {
    color: #f4f7ff;
}

html[data-theme-mode="light"] .brand-title-main {
    color: var(--text-primary);
}

.brand-title-accent {
    color: var(--accent);
}

.topbar-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-popover {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    overflow: visible;
}

.profile-popover__card {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(320px, calc(100vw - 32px));
    display: grid;
    gap: 0;
    padding: 18px;
    border: 1px solid rgba(201, 214, 255, 0.14);
    border-radius: 22px;
    background-color: #121924;
    background:
        linear-gradient(180deg, rgba(24, 31, 43, 0.98), rgba(12, 16, 23, 0.98));
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.46),
        0 10px 18px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    backdrop-filter: blur(18px);
    z-index: 40;
    overflow: hidden;
}

html[data-theme-mode="light"] .profile-popover__card {
    border-color: rgba(15, 23, 42, 0.1);
    background-color: #ffffff;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 247, 251, 0.99));
    box-shadow:
        0 20px 44px rgba(30, 41, 59, 0.16),
        0 8px 16px rgba(30, 41, 59, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.72) inset;
}

.profile-popover__card::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 4px;
    background: rgba(18, 24, 33, 0.98);
    transform: rotate(45deg);
}

html[data-theme-mode="light"] .profile-popover__card::before {
    border-top-color: rgba(15, 23, 42, 0.08);
    border-left-color: rgba(15, 23, 42, 0.08);
    background: rgba(250, 251, 253, 0.98);
}

.profile-popover__header {
    display: grid;
    gap: 6px;
}

.profile-popover__eyebrow {
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.profile-popover__title {
    font-family: "Sora", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.profile-popover__helper {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.profile-popover__field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
    border: 1px solid rgba(201, 214, 255, 0.1);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

html[data-theme-mode="light"] .profile-popover__field {
    border-color: rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.015));
    box-shadow: none;
}

.profile-popover__label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-popover__value {
    width: 100%;
    color: var(--text-primary);
    font-family: "Sora", sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.2;
    word-break: break-word;
}

.profile-popover__danger {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.profile-popover__danger-btn {
    width: 100%;
    justify-content: center;
    border-color: rgba(255, 107, 134, 0.18);
    background: rgba(255, 107, 134, 0.08);
    color: var(--danger);
}

.profile-popover__danger-btn:hover {
    border-color: rgba(255, 107, 134, 0.34);
    background: rgba(255, 107, 134, 0.14);
    color: #ff9aae;
}

.profile-popover__card:focus-visible {
    outline: 2px solid rgba(81, 255, 132, 0.42);
    outline-offset: 2px;
}

.utility-bar,
.shot-list,
.site-footer__inner {
    width: min(100%, 1680px);
    margin-left: auto;
    margin-right: auto;
}

.utility-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding-inline: 52px;
    margin-top: 44px;
    margin-bottom: 28px;
}

.utility-bar__source-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.source-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.source-switch__button {
    min-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.source-switch__button:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.source-switch__button.is-active {
    background: rgba(81, 255, 132, 0.14);
    color: var(--accent);
}

.site-footer {
    margin-top: 56px;
    padding: 0 24px 42px;
}

.site-footer__inner {
    padding: 34px 52px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__copyright,
.site-footer__tagline,
.site-footer__credit,
.site-footer__meta {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.site-footer__copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #b8c3d6;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.site-footer__brand {
    color: var(--accent);
    font-weight: 800;
}

.site-footer__dot {
    color: var(--text-muted);
}

.site-footer__tagline,
.site-footer__credit {
    color: rgba(152, 165, 186, 0.68);
    font-size: 13px;
    letter-spacing: 0.08em;
}

.site-footer__tagline {
    margin-top: 12px;
}

.site-footer__credit {
    margin-top: 2px;
}

.site-footer__link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, text-shadow 0.2s ease;
}

.site-footer__link:hover {
    border-bottom-color: rgba(81, 255, 132, 0.6);
    text-shadow: 0 0 12px rgba(81, 255, 132, 0.28);
}

.site-footer__meta {
    margin-top: 14px;
    color: rgba(103, 114, 133, 0.92);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.status-badge--button {
    cursor: pointer;
    appearance: none;
    outline: none;
}

.status-badge--button:hover {
    border-color: rgba(143, 230, 255, 0.45);
    transform: translateY(-1px);
}

.status-badge--button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.sync-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sync-icon-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.sync-icon-button:hover {
    transform: translateY(-1px);
    border-color: rgba(143, 230, 255, 0.45);
    background: rgba(81, 255, 132, 0.08);
}

.sync-icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    transform: none;
}

.status-badge.sync-local {
    color: #60ff8f;
}

.status-badge.sync-firebase {
    color: #8fe6ff;
}

.status-badge.sync-fallback {
    color: #ffd07b;
}

.status-badge.sync-degraded,
.status-badge.sync-unconfigured {
    color: #ff7e90;
}

.status-badge.watchdog-waiting {
    color: #9fb5d9;
}

.status-badge.watchdog-healthy {
    color: #60ff8f;
}

.status-badge.watchdog-starting {
    color: #8fe6ff;
}

.status-badge.watchdog-offline {
    color: #ff7e90;
}

.status-badge.watchdog-degraded {
    color: #ffd07b;
}

.status-badge.watchdog-stalled {
    color: #ffce7e;
}

.status-badge.watchdog-crashed {
    color: #ff7b8a;
}

.pulse-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.btn-tool,
.btn-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-tool--primary {
    background: var(--accent-soft);
    border-color: var(--accent-strong, var(--accent-soft));
    color: var(--accent);
}

.btn-tool {
    background: rgba(255, 255, 255, 0.04);
}

.btn-tool svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.btn-clear {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
}

.btn-tool:hover,
.btn-clear:hover {
    transform: translateY(-1px);
    border-color: var(--line-strong);
}

.btn-tool:hover {
    background: rgba(81, 255, 132, 0.1);
    color: var(--accent);
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.btn-clear:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

body.app-mode-setup .utility-bar,
body.app-mode-setup .splitter-panel {
    display: none;
}

.setup-shell {
    width: min(100%, 980px);
    margin: 24px auto 0;
    padding: 0 24px;
}

.setup-card {
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, var(--accent-soft), transparent 28%),
        linear-gradient(180deg, rgba(17, 22, 30, 0.98), rgba(12, 16, 23, 0.98));
    box-shadow: var(--shadow-main);
}

html[data-theme-mode="light"] .setup-card {
    background:
        radial-gradient(circle at top right, var(--accent-soft), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 252, 0.98));
}

.setup-card__eyebrow,
.config-modal__eyebrow {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.setup-card h2 {
    margin-top: 10px;
    font-family: "Sora", sans-serif;
    font-size: clamp(30px, 4vw, 42px);
    letter-spacing: -0.05em;
}

.setup-card__intro {
    max-width: 620px;
    margin-top: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.config-modal__helper {
    margin-top: 10px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.setup-form {
    display: grid;
    gap: 20px;
    margin-top: 24px;
}

.profile-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-summary__item {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.profile-summary__label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.profile-summary__value {
    margin-top: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}

.setup-form__textarea,
.config-modal__textarea {
    width: 100%;
    min-height: 320px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--bg-field-strong);
    color: var(--text-primary);
    font-family: "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    tab-size: 4;
}

.setup-form__textarea:focus,
.config-modal__textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.setup-form__error {
    min-height: 24px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 600;
}

.setup-form__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.setup-card__meta {
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.config-modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 7, 12, 0.75);
    backdrop-filter: blur(18px) saturate(160%);
    z-index: 100;
}

.config-modal {
    width: min(880px, 100%);
    max-height: min(92vh, 920px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: linear-gradient(165deg, var(--bg-panel), #0a0e15);
    box-shadow: 
        0 40px 100px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.config-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.config-modal__copy {
    flex: 1;
    min-width: 0;
}

.config-modal__header h2 {
    margin-top: 8px;
    font-family: "Sora", sans-serif;
    font-size: 28px;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: #fff;
}

.config-modal__close-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.config-modal__close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: rotate(90deg);
}

.config-modal__close-btn svg {
    width: 20px;
    height: 20px;
}

.config-modal__field {
    position: relative;
    display: flex;
    flex-direction: column;
}

.config-modal__field .field-label {
    margin-bottom: 10px;
}

.config-modal__textarea {
    min-height: 460px;
    max-width: 100%;
    margin: 0;
    padding-top: 32px;
}

.config-modal__textarea[readonly] {
    color: var(--text-secondary);
}

.config-modal__textarea--compact {
    min-height: 124px;
    padding-top: 18px;
}

.config-modal__textarea-decorator {
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--accent);
    opacity: 0.6;
    pointer-events: none;
}

.config-modal--share {
    width: min(980px, 100%);
}

.share-panel {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.share-panel__qr-card {
    display: grid;
    gap: 14px;
}

.share-panel__qr-shell {
    min-height: 280px;
    display: grid;
    place-items: center;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top, rgba(81, 255, 132, 0.14), transparent 36%),
        rgba(255, 255, 255, 0.03);
}

.share-panel__qr-image {
    width: 100%;
    max-width: 248px;
    aspect-ratio: 1;
    border-radius: 18px;
    background: #fff;
    object-fit: contain;
}

.share-panel__qr-fallback {
    max-width: 220px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

.share-panel__status {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.share-panel__content {
    display: grid;
    gap: 18px;
}

.share-panel__details {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 16px 16px;
}

.share-panel__details summary {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.share-panel__details summary::-webkit-details-marker {
    display: none;
}

.share-panel__details[open] {
    background: rgba(255, 255, 255, 0.04);
}

.share-panel__details[open] summary {
    color: var(--text-primary);
    margin-bottom: 14px;
}

.splitter-panel {
    width: min(100%, 1380px);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 28px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
    border: 1px solid transparent;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 20, 27, 0.96), rgba(12, 16, 23, 0.96));
    transition: max-height 0.45s ease, opacity 0.3s ease, padding 0.3s ease, margin-bottom 0.3s ease, border-color 0.3s ease;
}

.splitter-panel.show {
    max-height: 1200px;
    opacity: 1;
    padding: 24px 28px 28px;
    margin-bottom: 18px;
    border-color: var(--line);
    box-shadow: var(--shadow-card);
}

.splitter-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.splitter-header h3 {
    font-family: "Sora", sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.splitter-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

.splitter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.input-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-card label,
.field-label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.input-desc {
    color: var(--text-muted);
    font-size: 12px;
    min-height: 32px;
}

.input-card input {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--bg-field);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-card input:focus {
    border-color: rgba(81, 255, 132, 0.7);
    box-shadow: 0 0 0 3px rgba(81, 255, 132, 0.12);
}

.results-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    animation: cardIn 0.28s ease backwards;
}

.m-id {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.r-range {
    font-size: 16px;
    font-weight: 700;
}

.r-time {
    color: #f5ef85;
    font-size: 12px;
}

.shot-list {
    display: grid;
    gap: 22px;
    padding: 10px;
}

.shot-shell {
    position: relative;
    padding: 38px 42px 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(17, 22, 30, 0.98), rgba(14, 18, 25, 0.98)),
        linear-gradient(135deg, rgba(81, 255, 132, 0.05), transparent 28%);
    box-shadow: var(--shadow-main);
    overflow: hidden;
}

.shot-shell.has-crashed-worker {
    border-color: rgba(255, 107, 134, 0.28);
}

.shot-shell.has-stalled-worker {
    border-color: rgba(255, 186, 99, 0.28);
}

.shot-overview {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.shot-meta {
    min-width: 0;
    flex: 1 1 auto;
}

.shot-label,
.playbar-meta .field-label,
.timeline-title {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.shot-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
    min-width: 0;
}

.shot-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent);
    font-family: "Sora", sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.shot-title.cache-mode {
    color: #8ed0ff;
}

.btn-delete-shot {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.btn-delete-shot:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 107, 134, 0.35);
    color: #ff90a2;
    background: rgba(255, 107, 134, 0.08);
}

.playbar-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: 0 0 auto;
    min-width: max-content;
    margin-left: auto;
    text-align: right;
}

.global-range {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.timeline-panel {
    margin-bottom: 24px;
}

.timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.timeline-edge {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
}

.timeline-title {
    opacity: 0.7;
}

.timeline-track {
    position: relative;
    height: 66px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(6, 10, 15, 0.96), rgba(8, 11, 16, 0.96));
    overflow: hidden;
}

.timeline-segment {
    position: absolute;
    top: 0;
    bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.timeline-segment::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.timeline-segment-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--worker-color, var(--accent));
    opacity: 0.8;
    box-shadow: 0 0 18px var(--worker-glow, rgba(81, 255, 132, 0.32));
}

.timeline-segment.is-crashed .timeline-segment-fill {
    background: var(--danger);
    box-shadow: 0 0 18px rgba(255, 107, 134, 0.4);
}

.timeline-segment.is-stalled .timeline-segment-fill {
    background: var(--warning);
    box-shadow: 0 0 18px rgba(255, 186, 99, 0.4);
}

.timeline-segment.is-finished .timeline-segment-fill {
    width: 100% !important;
}

.timeline-worker-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #f5f7ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.worker-stack {
    display: grid;
    gap: 18px;
}

.worker-item-container {
    --worker-color: var(--accent);
    --worker-lane-width: 12px;
    --worker-lane-track-width: 8px;
}

.worker-row {
    position: relative;
    display: grid;
    gap: 16px 12px;
    align-items: start;
    padding: 20px 24px 20px 14px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(20, 25, 34, 0.96), rgba(18, 23, 31, 0.96));
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.worker-lane {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: stretch;
    justify-self: center;
    align-self: stretch;
    grid-row: 1 / span 2;
    width: var(--worker-lane-width);
    min-width: var(--worker-lane-width);
    max-width: var(--worker-lane-width);
    min-height: 100%;
    overflow: hidden;
}

.worker-lane-track {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 50%;
    width: var(--worker-lane-track-width);
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(6, 9, 14, 0.94), rgba(12, 17, 24, 0.78));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.worker-row:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.1);
}

.worker-row.is-crashed {
    border-color: rgba(255, 107, 134, 0.2);
}

.worker-row.is-stalled {
    border-color: rgba(255, 186, 99, 0.2);
}

.worker-row.is-finished {
    border-color: rgba(81, 255, 132, 0.16);
}

.worker-accent {
    position: relative;
    z-index: 1;
    align-self: stretch;
    width: 4px;
    margin: 6px 0;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)),
        var(--worker-color);
    box-shadow: 0 0 18px var(--worker-glow, rgba(81, 255, 132, 0.32));
}

.worker-accent::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    background: var(--worker-color);
    opacity: 0.22;
    filter: blur(8px);
    z-index: -1;
}

.worker-row.is-crashed .worker-accent {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)),
        var(--danger);
    box-shadow: 0 0 16px rgba(255, 107, 134, 0.45);
}

.worker-row.is-crashed .worker-accent::before {
    background: var(--danger);
}

.worker-row.is-stalled .worker-accent {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)),
        var(--warning);
    box-shadow: 0 0 16px rgba(255, 186, 99, 0.45);
}

.worker-row.is-stalled .worker-accent::before {
    background: var(--warning);
}

.worker-fields {
    display: grid;
    grid-template-columns: minmax(210px, 1.55fr) repeat(3, minmax(120px, 0.9fr));
    gap: 16px;
    min-width: 0;
}

.worker-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.worker-field.field-file {
    grid-column: 1 / -1;
}

.worker-field.field-frame-summary {
    grid-column: 1 / -1;
}

.value-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-field);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.worker-name {
    font-size: 16px;
}

.worker-frame-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.frame-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.frame-stat-label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.frame-stat-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-field);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.frame-stat-current .frame-stat-value {
    border-color: var(--worker-color);
    color: var(--worker-color);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), 0 0 18px var(--worker-soft-glow, rgba(81, 255, 132, 0.18));
}

.worker-detection-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.worker-detection-pill.is-running {
    color: var(--success);
}

.worker-detection-pill.is-warning {
    color: var(--warning);
}

.worker-detection-pill.is-stalled {
    color: #ffd18c;
}

.worker-detection-pill.is-crashed {
    color: #ff98ab;
}

.worker-detection-pill.is-disabled {
    color: var(--text-muted);
}

.worker-detection-pill.is-stopped {
    color: #c7d0df;
}

.worker-detection-pill.is-error {
    color: #ffadb6;
}

.worker-row.is-crashed .frame-stat-current .frame-stat-value {
    border-color: var(--danger);
    color: #ff98ab;
    box-shadow: 0 0 18px rgba(255, 107, 134, 0.18);
}

.worker-row.is-stalled .frame-stat-current .frame-stat-value {
    border-color: var(--warning);
    color: #ffd18c;
    box-shadow: 0 0 18px rgba(255, 186, 99, 0.18);
}

.worker-row.is-finished .frame-stat-current .frame-stat-value {
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 18px rgba(81, 255, 132, 0.18);
}

.file-display {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.file-path {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #d6dfef;
    font-size: 13px;
}

.copy-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    margin-left: auto;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.copy-icon-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.copy-icon-btn:hover {
    transform: translateY(-1px);
    color: var(--accent);
    border-color: rgba(81, 255, 132, 0.35);
    background: rgba(81, 255, 132, 0.08);
}

.metric-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-height: 100%;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-field-strong);
    text-align: center;
    grid-column: 2;
    min-height: 68px;
    width: 100%;
}

.metric-top {
    color: #f4f18f;
    font-family: "Sora", sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.metric-bottom {
    color: var(--worker-color);
    font-family: "Sora", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.metric-box.is-crashed .metric-top,
.metric-box.is-crashed .metric-bottom {
    color: #ff90a2;
}

.metric-box.is-stalled .metric-top,
.metric-box.is-stalled .metric-bottom {
    color: #ffd18c;
}

.metric-box.is-finished .metric-top,
.metric-box.is-finished .metric-bottom {
    color: var(--success);
}

.worker-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.worker-item-container.expanded .worker-details {
    max-height: 520px;
    opacity: 1;
    margin-top: 12px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(10, 14, 20, 0.85);
}

.detail-card-title {
    margin-bottom: 14px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.detail-list {
    display: grid;
    gap: 10px;
}

.detail-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-line:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-line span {
    color: var(--text-muted);
    font-size: 13px;
}

.detail-line strong {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    text-align: right;
    font-size: 13px;
    font-weight: 500;
}

.empty-state {
    padding: 80px 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(17, 22, 30, 0.94), rgba(13, 18, 25, 0.94));
    text-align: center;
    box-shadow: var(--shadow-card);
}

.empty-state h2 {
    margin-bottom: 8px;
    font-family: "Sora", sans-serif;
    font-size: 26px;
}

.empty-state__message {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.empty-state__message a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.empty-state__message a:hover {
    text-decoration: underline;
}

.empty-state__link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 18px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: rgba(81, 255, 132, 0.08);
    color: var(--accent);
    font-family: "Sora", sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.empty-state__link-btn:hover {
    background: rgba(81, 255, 132, 0.16);
    transform: translateY(-1px);
}


#copyToast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 18px);
    opacity: 0;
    padding: 12px 16px;
    border: 1px solid rgba(81, 255, 132, 0.24);
    border-radius: 999px;
    background: rgba(8, 12, 16, 0.95);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: transform 0.24s ease, opacity 0.24s ease;
    z-index: 2000;
}

#copyToast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1280px) {
    .worker-fields {
        grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(92px, 0.85fr));
    }

    .worker-field.field-file {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {

    .topbar,
    .shot-shell {
        padding-left: 20px;
        padding-right: 20px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .shot-overview {
        flex-direction: column;
        align-items: flex-start;
    }

    .playbar-meta {
        align-items: flex-start;
        text-align: left;
    }

    .worker-row {
        grid-template-columns: var(--worker-lane-width) minmax(0, 1fr);
    }

    .metric-box {
        grid-column: 2;
        min-height: 96px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .topbar-actions {
        gap: 10px;
    }

    .status-badge,
    .btn-tool,
    .btn-clear {
        min-height: 42px;
        padding: 0 14px;
    }

    .sync-icon-button {
        width: 42px;
        height: 42px;
    }

    .btn-tool span {
        display: none;
    }

    .splitter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .shot-shell {
        padding-top: 26px;
        padding-bottom: 24px;
    }

    .shot-title {
        font-size: 22px;
    }

    .global-range {
        font-size: 20px;
    }

    .timeline-track {
        height: 58px;
    }

    .timeline-worker-label {
        font-size: 10px;
        padding: 0 8px;
    }

    .worker-item-container {
        --worker-lane-width: 16px;
        --worker-lane-track-width: 10px;
    }

    .worker-row {
        padding: 16px;
        gap: 14px;
    }

    .worker-fields {
        grid-template-columns: 1fr 1fr;
    }

    .worker-field.field-worker,
    .worker-field.field-file {
        grid-column: 1 / -1;
    }

    .value-display {
        min-height: 44px;
        font-size: 14px;
    }

    .worker-name {
        font-size: 15px;
    }
}

@media (max-width: 560px) {

    .topbar,
    .shot-shell,
    .splitter-panel.show {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 {
        font-size: 20px;
    }

    .status-badge {
        width: 100%;
        justify-content: center;
    }

    .utility-bar__source-group {
        justify-content: center;
        width: 100%;
    }

    .btn-tool,
    .btn-clear {
        flex: 1;
    }

    .splitter-grid {
        grid-template-columns: 1fr;
    }

    .splitter-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .shot-title-row {
        gap: 10px;
    }

    .btn-delete-shot {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .timeline-head {
        grid-template-columns: auto 1fr auto;
    }

    .timeline-title {
        font-size: 10px;
    }

    .timeline-edge {
        font-size: 14px;
    }

    .worker-fields {
        grid-template-columns: 1fr;
    }

    .worker-field {
        grid-column: auto;
    }

    .metric-box {
        grid-column: 2;
    }

    .value-display {
        padding: 0 12px;
    }

    .file-path {
        font-size: 12px;
    }
}

body.force-desktop {
    padding: 24px;
}

body.force-desktop .topbar,
body.force-desktop .shot-shell,
body.force-desktop .splitter-panel.show {
    padding-left: 28px;
    padding-right: 28px;
}

body.force-desktop .utility-bar {
    padding-inline: 38px;
}

body.force-desktop .site-footer__inner {
    padding-left: 38px;
    padding-right: 38px;
}

body.force-desktop .topbar {
    padding-left: clamp(28px, 6vw, 104px);
    padding-right: clamp(28px, 6vw, 104px);
}

body.force-desktop .btn-tool,
body.force-desktop .btn-clear {
    flex: 0 0 auto;
}

body.force-desktop .btn-tool {
    width: auto;
    min-width: 0;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
}

body.force-desktop .btn-clear {
    display: inline-flex;
}

body.force-desktop .btn-delete-shot {
    display: inline-flex;
}

body.bp-wide .topbar-actions {
    width: auto;
    justify-content: flex-end;
}

body.bp-wide .worker-row {
    grid-template-columns: var(--worker-lane-width) minmax(0, 1fr) 172px;
    align-items: center;
    gap: 16px;
    padding: 16px 20px 16px 12px;
}

body.bp-wide .worker-lane {
    grid-row: auto;
}

body.bp-wide .worker-fields {
    grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(110px, 0.7fr)) minmax(280px, 1.8fr);
    align-items: end;
}

body.bp-wide .worker-field.field-file {
    grid-column: auto;
}

body.bp-wide .metric-box {
    grid-column: auto;
    min-height: 82px;
    width: 100%;
}

body.bp-standard .topbar,
body.bp-wide .topbar,
body.force-desktop .topbar {
    flex-direction: row;
    align-items: center;
}

body.bp-standard .topbar-actions,
body.force-desktop .topbar-actions {
    width: auto;
    justify-content: flex-end;
}

body.bp-standard .shot-overview,
body.bp-wide .shot-overview,
body.force-desktop .shot-overview {
    flex-direction: row;
    align-items: flex-start;
}

body.bp-standard .playbar-meta,
body.bp-wide .playbar-meta,
body.force-desktop .playbar-meta {
    align-items: flex-end;
    text-align: right;
}

body.bp-standard .timeline-track,
body.bp-wide .timeline-track,
body.force-desktop .timeline-track {
    height: 62px;
}

body.bp-standard .btn-tool span,
body.bp-wide .btn-tool span,
body.force-desktop .btn-tool span {
    display: inline;
}

body.bp-standard .status-badge,
body.bp-wide .status-badge,
body.force-desktop .status-badge {
    width: auto;
    justify-content: flex-start;
}

body.bp-standard .splitter-grid,
body.bp-wide .splitter-grid,
body.force-desktop .splitter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


body.bp-standard .worker-lane,
body.force-desktop .worker-lane {
    grid-row: auto;
}

body.bp-standard .worker-fields,
body.force-desktop .worker-fields {
    grid-template-columns: minmax(210px, 1.55fr) repeat(3, minmax(120px, 0.9fr));
    align-items: start;
}

body.bp-standard .worker-field.field-worker,
body.force-desktop .worker-field.field-worker {
    grid-column: 1;
}

body.bp-standard .worker-field.field-frame-summary,
body.force-desktop .worker-field.field-frame-summary {
    grid-column: 2 / 5;
}

body.bp-standard .worker-field.field-file,
body.force-desktop .worker-field.field-file {
    grid-column: 1 / -1;
}

body.bp-standard .metric-box,
body.force-desktop .metric-box {
    grid-column: auto;
    min-height: 68px;
    width: 100%;
    align-self: stretch;
    justify-self: end;
}

body.bp-mobile .topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 18px;
}

body.bp-mobile .topbar-actions {
    width: auto;
    justify-content: flex-end;
}

body.bp-mobile .brand-title {
    font-size: 21px;
}

body.bp-mobile .utility-bar {
    justify-content: center;
    padding-inline: 0;
    margin-bottom: 18px;
}

body.bp-mobile .site-footer {
    margin-top: 40px;
    padding: 0 16px 28px;
}

body.bp-mobile .site-footer__inner {
    padding: 28px 0 0;
}

body.bp-mobile .site-footer__copyright {
    font-size: 13px;
    line-height: 1.7;
}

body.bp-mobile .site-footer__tagline,
body.bp-mobile .site-footer__credit {
    font-size: 11px;
    line-height: 1.75;
}

body.bp-mobile .site-footer__meta {
    font-size: 9px;
    line-height: 1.8;
}

body.bp-mobile .btn-clear {
    display: none;
}

body.bp-mobile .status-badge {
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    background: transparent;
}

body.bp-mobile .utility-bar__source-group {
    justify-content: center;
    width: 100%;
}

body.bp-mobile .sync-icon-button {
    width: 40px;
    height: 40px;
}

body.bp-mobile .btn-tool {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
}

body.bp-mobile .btn-tool span {
    display: none;
}

body.bp-mobile .profile-popover__card {
    width: min(360px, calc(100vw - 24px));
}

body.bp-mobile .profile-popover__danger-btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}

body.bp-mobile .splitter-panel.show {
    padding-left: 16px;
    padding-right: 16px;
}

body.bp-mobile .splitter-grid {
    grid-template-columns: 1fr;
}

body.bp-mobile .shot-shell {
    padding: 20px 24px 24px;
    border-radius: 24px;
}

body.bp-mobile .shot-overview {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
}

body.bp-mobile .rail-controls {
    display: none;
}

body.bp-mobile .shot-rail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
}

body.bp-mobile .shot-card {
    min-height: 0;
    scroll-snap-align: none;
}

body.bp-mobile .shot-card-grid {
    grid-template-columns: 1fr;
}

body.bp-mobile .shot-card__metrics {
    display: none;
}

body.bp-mobile .shot-card__surface {
    min-height: 300px;
}

body.bp-mobile .shot-title {
    font-size: 23px;
    max-width: 245px;
}

body.bp-mobile .btn-delete-shot {
    display: none;
}

body.bp-mobile .global-range {
    font-size: 18px;
}

body.bp-mobile .playbar-meta {
    align-items: flex-end;
    text-align: right;
}

body.bp-mobile .timeline-track {
    height: 48px;
}

body.bp-mobile .timeline-edge {
    font-size: 13px;
}

body.bp-mobile .timeline-title {
    font-size: 10px;
}

body.bp-mobile .timeline-worker-label {
    padding: 0 6px;
    font-size: 10px;
}

body.bp-mobile .worker-stack {
    gap: 22px;
}

body.bp-mobile .worker-item-container {
    --worker-lane-width: 10px;
    --worker-lane-track-width: 6px;
}

body.bp-mobile .worker-row {
    grid-template-columns: var(--worker-lane-width) minmax(0, 1fr);
    gap: 12px 10px;
    padding: 14px 14px 14px 8px;
}

body.bp-mobile .worker-lane {
    grid-row: 1 / span 2;
}

body.bp-mobile .worker-accent {
    width: 3px;
    margin: 4px 0;
}

body.bp-mobile .worker-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

body.bp-mobile .worker-field.field-worker {
    grid-column: 1 / -1;
}

body.bp-mobile .worker-field.field-file {
    display: none;
}

body.bp-mobile .field-worker .value-display {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 16px;
}

body.bp-mobile .worker-name {
    font-size: 17px;
}

body.bp-mobile .value-display {
    min-height: 30px;
    padding: 0 12px;
    font-size: 15px;
    justify-content: center;
}

body.bp-mobile .worker-field .field-label {
    font-size: 10px;
    letter-spacing: 0.12em;
}

body.bp-mobile .metric-box {
    grid-column: 2;
    flex-direction: row;
    justify-content: space-between;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
}

body.bp-mobile .metric-top,
body.bp-mobile .metric-bottom {
    font-size: 14px;
}

@media (max-width: 430px) {
    body.bp-mobile .worker-item-container {
        --worker-lane-width: 8px;
        --worker-lane-track-width: 4px;
    }

    body.bp-mobile .worker-row {
        gap: 10px 8px;
        padding: 12px 12px 12px 6px;
    }

    body.bp-mobile .worker-accent {
        width: 2px;
        margin: 3px 0;
    }

    body.bp-mobile .worker-fields {
        gap: 10px;
    }

    body.bp-mobile .value-display {
        padding: 0 10px;
        font-size: 14px;
    }

    body.bp-mobile .worker-name {
        font-size: 15px;
    }

    body.bp-mobile .worker-frame-grid {
        gap: 8px;
    }

    body.bp-mobile .frame-stat-value {
        min-height: 44px;
        padding: 0 10px;
        font-size: 14px;
    }

    body.bp-mobile .metric-box {
        min-height: 42px;
        padding: 10px 12px;
    }

}

@media (max-width: 680px), (pointer: coarse) and (max-width: 900px) {
    .topbar {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        min-height: 76px !important;
        padding: 14px 16px !important;
        margin-bottom: 0 !important;
    }

    .topbar-actions {
        width: auto !important;
        justify-content: flex-end !important;
    }

    .brand-title {
        font-size: 21px !important;
    }

    .utility-bar {
        justify-content: center !important;
        padding-inline: 0 !important;
        margin-top: 20px !important;
        margin-bottom: 18px !important;
    }

    .site-footer {
        margin-top: 40px !important;
        padding: 0 16px 28px !important;
    }

    .site-footer__inner {
        padding: 28px 0 0 !important;
    }

    .site-footer__copyright {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }

    .site-footer__tagline,
    .site-footer__credit {
        font-size: 11px !important;
        line-height: 1.75 !important;
    }

    .site-footer__meta {
        font-size: 9px !important;
        line-height: 1.8 !important;
    }

    .status-badge {
        min-height: 40px !important;
        padding: 0 12px !important;
        border: 0 !important;
        background: transparent !important;
    }

    .utility-bar__source-group {
        justify-content: center !important;
        width: 100% !important;
    }

    .sync-icon-button {
        width: 40px !important;
        height: 40px !important;
    }

    .btn-clear {
        display: none !important;
    }

    .btn-tool {
        width: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        flex: 0 0 auto !important;
    }

    .btn-tool span {
        display: none !important;
    }

    .splitter-panel.show {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .splitter-grid {
        grid-template-columns: 1fr !important;
    }

    .shot-shell {
        padding: 20px 24px 24px !important;
        border-radius: 24px !important;
    }

    .shot-overview {
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 14px !important;
        padding-bottom: 18px !important;
        margin-bottom: 18px !important;
    }

    .shot-title-row {
        gap: 10px !important;
    }

    .shot-title {
        max-width: 245px !important;
        font-size: 23px !important;
    }

    .btn-delete-shot {
        display: none !important;
    }

    .playbar-meta {
        align-items: flex-end !important;
        text-align: right !important;
    }

    .global-range {
        font-size: 18px !important;
    }

    .timeline-track {
        height: 48px !important;
    }

    .timeline-edge {
        font-size: 13px !important;
    }

    .timeline-title {
        font-size: 10px !important;
    }

    .timeline-worker-label {
        padding: 0 6px !important;
        font-size: 10px !important;
    }

    .worker-stack {
        gap: 22px !important;
    }

    .worker-row {
        grid-template-columns: var(--worker-lane-width) minmax(0, 1fr) !important;
        gap: 12px 14px !important;
        padding: 16px 18px !important;
    }

    .worker-lane {
        grid-row: 1 / span 2 !important;
    }

    .worker-accent {
        width: 5px !important;
        margin: 4px 0 !important;
    }

    .worker-fields {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .worker-field.field-worker {
        grid-column: 1 / -1 !important;
    }

    .worker-field.field-file {
        display: none !important;
    }

    .field-worker .value-display {
        min-height: auto !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 16px !important;
        justify-content: flex-start !important;
    }

    .worker-name {
        font-size: 17px !important;
    }

    .value-display {
        min-height: 30px !important;
        padding: 0 12px !important;
        font-size: 15px !important;
        justify-content: center !important;
    }

    .worker-field .field-label {
        font-size: 10px !important;
        letter-spacing: 0.12em !important;
    }

    .metric-box {
        grid-column: 2 !important;
        width: 100% !important;
        min-height: 46px !important;
        padding: 12px 14px !important;
        border-radius: 14px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
    }

    .metric-top,
    .metric-bottom {
        font-size: 14px !important;
    }
}



/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.detail-panel-open {
    overflow: hidden;
}

body.detail-panel-resizing {
    cursor: ew-resize;
    user-select: none;
}

.shot-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 6px 52px 12px;
}

.overview-hero,
.overview-panel {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(16, 22, 30, 0.96), rgba(11, 15, 22, 0.98));
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
    overflow: hidden;
}

.overview-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
    gap: 24px;
    padding: 28px 30px;
    overflow: hidden;
    isolation: isolate;
}

.overview-hero__bg {
    position: absolute;
    inset: -10% auto -18% -4%;
    width: min(38vw, 560px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hero-icon-color, #FFFFFF);
    opacity: var(--hero-icon-opacity, 0.08);
    transform: scale(var(--hero-icon-scale, 1));
    transform-origin: left center;
    pointer-events: none;
    z-index: 0;
    transition: transform 320ms ease, opacity 320ms ease;
}

.overview-hero:hover .overview-hero__bg {
    transform: scale(var(--hero-icon-hover-scale, 1.06));
}

.overview-hero__bg-svg,
.overview-hero__bg-icon {
    width: 100%;
    height: 100%;
    display: block;
}

.overview-hero__bg-svg {
    color: var(--hero-icon-color, #FFFFFF);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
    filter: drop-shadow(0 24px 80px rgba(255, 255, 255, 0.08));
}

.overview-hero__copy,
.overview-stat-strip {
    position: relative;
    z-index: 1;
}

.overview-kicker,
.overview-panel__eyebrow,
.overview-toolbar__label,
.overview-toolbar__meta-label,
.shot-detail-frame__eyebrow {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.overview-hero__copy h2 {
    max-width: 720px;
    margin-top: 8px;
    font-family: "Sora", sans-serif;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.overview-hero__copy p {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.overview-stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.overview-stat-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100%;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.overview-stat-card span,
.overview-stat-card em {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.overview-stat-card strong {
    font-family: "Sora", sans-serif;
    font-size: 38px;
    letter-spacing: -0.05em;
}

.overview-stat-card.tone-live strong {
    color: var(--success);
}

.overview-stat-card.tone-danger strong {
    color: var(--danger);
}

.overview-stat-card.tone-warning strong {
    color: var(--warning);
}

.overview-panel__toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.overview-toolbar__group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.overview-filter-row {
    --overview-filter-gap: 12px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    width: 100%;
    gap: var(--overview-filter-gap);
}

.overview-filter {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 68px;
    padding: 10px 8px 12px;
    align-content: center;
    justify-items: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(11, 15, 22, 0.92);
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 24px rgba(0, 0, 0, 0.16);
    text-align: center;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.overview-filter__label {
    max-width: 100%;
    color: rgba(238, 243, 255, 0.72);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-filter__count {
    color: var(--text-primary);
    font-family: "Sora", sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
}

.overview-filter:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.026) 100%),
        rgba(14, 19, 28, 0.96);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 28px rgba(0, 0, 0, 0.2);
}

.overview-filter.is-active {
    transform: translateY(-1px);
    border-color: rgba(81, 255, 132, 0.42);
    background:
        linear-gradient(180deg, rgba(81, 255, 132, 0.16) 0%, rgba(81, 255, 132, 0.08) 100%),
        rgba(16, 29, 22, 0.96);
    color: var(--text-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 28px rgba(81, 255, 132, 0.12);
}

.overview-filter:hover .overview-filter__label,
.overview-filter.is-active .overview-filter__label {
    color: rgba(238, 243, 255, 0.86);
}

.overview-filter.is-active .overview-filter__count {
    color: #f7fff9;
}

.overview-filter:focus-visible,
.rail-control:focus-visible,
.shot-card__surface:focus-visible,
.shot-card__delete:focus-visible,
.shot-detail-frame__close:focus-visible,
.shot-detail-frame__delete:focus-visible {
    outline: 2px solid rgba(81, 255, 132, 0.8);
    outline-offset: 3px;
}

.overview-toolbar__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}

.overview-toolbar__meta-value {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
}

.overview-stage {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.overview-panel {
    padding: 0;
}

.overview-panel__head,
.overview-panel .shot-rail,
.overview-panel .shot-card-grid,
.overview-panel .empty-state {
    margin-inline: 22px;
}

.overview-panel__head {
    margin-top: 22px;
}

.overview-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Better for multi-line titles */
    gap: 20px;
    margin-bottom: 22px;
}

.overview-panel .shot-rail,
.overview-panel .shot-card-grid,
.overview-panel .empty-state {
    margin-bottom: 22px;
}

.overview-panel__head > div:first-child {
    flex: 1;
    min-width: 0; /* Allow the title container to shrink and wrap */
}

.overview-panel__head h3 {
    margin-top: 8px;
    font-family: "Sora", sans-serif;
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.25;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.rail-controls {
    display: inline-flex;
    gap: 10px;
}

.rail-control {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rail-control:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
}

.shot-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(320px, 320px);
    gap: 18px;
    overflow-x: auto;
    padding-top: 24px;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.shot-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    padding-top: 12px;
}

.shot-card {
    --card-rotate-x: 0deg;
    --card-rotate-y: 0deg;
    --pointer-x: 50%;
    --pointer-y: 14%;
    --shot-overlay-tint-strong: rgba(255, 255, 255, 0.08);
    --shot-overlay-tint-soft: rgba(255, 255, 255, 0.03);
    --shot-overlay-tint-border: rgba(255, 255, 255, 0.06);
    --shot-overlay-tint-bottom: rgba(255, 255, 255, 0.04);
    position: relative;
    min-height: 100%;
    scroll-snap-align: start;
    isolation: isolate;
}

.shot-card.is-more-card {
    cursor: pointer;
}

.shot-card.is-more-card .shot-card__surface {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 2px dashed rgba(255, 255, 255, 0.12);
    justify-content: center;
    align-items: center;
    padding: 32px;
    text-align: center;
    min-height: 408px;
}

.shot-card.is-more-card:hover .shot-card__surface {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.24);
    border-style: solid;
}

.more-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 240px;
}

.more-content__count {
    font-family: "Sora", sans-serif;
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    text-shadow: 0 0 30px var(--shot-accent-glow);
}

.more-content__text {
    font-family: "Space Grotesk", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.more-content__icon {
    margin-top: 8px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(81, 255, 132, 0.1);
    color: var(--accent);
    transition: transform 0.3s ease;
}

.shot-card.is-more-card:hover .more-content__icon {
    transform: translateY(4px);
}

.shot-card.status-crashed {
    --shot-overlay-tint-strong: rgba(255, 107, 134, 0.14);
    --shot-overlay-tint-soft: rgba(255, 107, 134, 0.05);
    --shot-overlay-tint-border: rgba(255, 107, 134, 0.12);
    --shot-overlay-tint-bottom: rgba(255, 107, 134, 0.08);
}

.shot-card.status-stalled {
    --shot-overlay-tint-strong: rgba(255, 186, 99, 0.14);
    --shot-overlay-tint-soft: rgba(255, 186, 99, 0.05);
    --shot-overlay-tint-border: rgba(255, 186, 99, 0.12);
    --shot-overlay-tint-bottom: rgba(255, 186, 99, 0.08);
}

.shot-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 30px;
    pointer-events: none;
    opacity: 0;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04),
        0 0 30px var(--shot-accent-glow);
    transition: opacity 0.24s ease, transform 0.24s ease;
    transform: translateY(0);
    z-index: 0;
}

.shot-card__surface {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 408px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    background: linear-gradient(180deg, var(--shot-accent-glow), rgba(11, 15, 22, 0.98));
    transform-style: preserve-3d;
    transform: perspective(1800px) rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y)) translateY(0);
    box-shadow: 0 32px 58px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    text-align: left;
    cursor: pointer;
    transition: transform 0.24s cubic-bezier(0.2, 1, 0.3, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}

.shot-card__surface::before {
    content: "";
    position: absolute;
    inset: -16% 8% auto;
    height: 58%;
    border-radius: inherit;
    background: radial-gradient(circle, var(--shot-accent-glow), transparent 70%);
    opacity: 0;
    pointer-events: none;
}

.shot-card__surface::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        linear-gradient(135deg, var(--shot-overlay-tint-border), transparent 40%),
        linear-gradient(180deg, transparent 56%, var(--shot-overlay-tint-bottom));
    opacity: 0;
    pointer-events: none;
}

.shot-card:hover .shot-card__surface {
    border-color: rgba(255, 255, 255, 0.14);
    transform: perspective(1800px) rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y)) translateY(-8px);
    box-shadow: 0 36px 68px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.shot-card.is-selected .shot-card__surface {
    border-color: rgba(255, 255, 255, 0.2);
    transform: perspective(1800px) rotateX(var(--card-rotate-x)) rotateY(var(--card-rotate-y)) translateY(-8px);
    box-shadow: 0 36px 68px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 32px var(--shot-accent-glow);
}

.shot-card:hover::before {
    opacity: 0;
    transform: translateY(0);
}

.shot-card.is-selected::before {
    opacity: 1;
    transform: translateY(-8px);
}

.shot-card.is-selected .shot-card__surface {
    border-color: var(--shot-accent);
}

.shot-card__glare {
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(120deg, var(--shot-overlay-tint-strong) 0%, transparent 40%, transparent 60%, var(--shot-overlay-tint-soft) 100%);
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.shot-card__glow-bg {
    position: absolute;
    inset: -20% -20% auto -20%;
    height: 80%;
    border-radius: inherit;
    background: radial-gradient(ellipse at top, var(--shot-accent-glow), transparent 60%);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.shot-card:hover .shot-card__glow-bg {
    opacity: 0;
    transform: none;
}

.shot-card:hover .shot-card__surface::before {
    opacity: 0;
}

.shot-card.is-selected .shot-card__surface::before {
    opacity: 0.28;
}

.shot-card:hover .shot-card__surface::after {
    opacity: 0;
}

.shot-card.is-selected .shot-card__surface::after {
    opacity: 1;
}

.shot-card__delete {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(6, 9, 14, 0.82);
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.shot-card__delete:hover {
    color: #ffb0bc;
    border-color: rgba(255, 107, 134, 0.34);
    background: rgba(255, 107, 134, 0.12);
}

.shot-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.shot-card__footer,
.shot-card__timeline-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.shot-card__badges,
.shot-detail-frame__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shot-card__mode,
.shot-card__status,
.shot-detail-frame__pill {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.shot-card__mode {
    color: #a9eeff;
}

.shot-crash-badge {
    gap: 8px;
    color: var(--text-primary);
    --shot-crash-dot: #7a8496;
    --shot-crash-dot-glow: rgba(122, 132, 150, 0.35);
}

.shot-crash-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: var(--shot-crash-dot);
    box-shadow: 0 0 10px var(--shot-crash-dot-glow);
}

.shot-crash-badge.is-running {
    --shot-crash-dot: #5fe08e;
    --shot-crash-dot-glow: rgba(95, 224, 142, 0.36);
}

.shot-crash-badge.is-stalled {
    --shot-crash-dot: #f2c15f;
    --shot-crash-dot-glow: rgba(242, 193, 95, 0.34);
}

.shot-crash-badge.is-crashed {
    --shot-crash-dot: #ff6f84;
    --shot-crash-dot-glow: rgba(255, 111, 132, 0.34);
}

.shot-crash-badge.is-stopped {
    --shot-crash-dot: #8a93a4;
    --shot-crash-dot-glow: rgba(138, 147, 164, 0.3);
}

.shot-crash-badge.is-not-monitored {
    --shot-crash-dot: #4f5664;
    --shot-crash-dot-glow: rgba(79, 86, 100, 0.28);
    color: rgba(235, 240, 255, 0.78);
}

.shot-crash-badge.is-error {
    --shot-crash-dot: #8f1f2c;
    --shot-crash-dot-glow: rgba(143, 31, 44, 0.36);
    color: #ffd3d8;
}

.shot-card__progress-ring {
    position: relative;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: var(--shot-accent);
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.percentage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.shot-card__main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.shot-card__title {
    font-family: "Sora", sans-serif;
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #fff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.shot-card__title[data-overflowing="true"] {
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}

.shot-card__title-track {
    display: inline-flex;
    align-items: baseline;
    min-width: 100%;
    width: max-content;
    will-change: transform;
}

.shot-card__title-text {
    flex: 0 0 auto;
}

.shot-card__title-gap {
    flex: 0 0 36px;
}

.shot-card__title[data-overflowing="false"] .shot-card__title-gap,
.shot-card__title[data-overflowing="false"] .shot-card__title-text--clone,
.sl-title[data-overflowing="false"] .shot-card__title-gap,
.sl-title[data-overflowing="false"] .shot-card__title-text--clone {
    display: none;
}

.shot-card:hover .shot-card__title[data-overflowing="true"] .shot-card__title-track,
.shot-list-row:hover .sl-title[data-overflowing="true"] .shot-card__title-track {
    animation: shot-card-title-marquee var(--marquee-duration, 8s) linear infinite;
}

.shot-card__subtitle {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.shot-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    position: relative;
    z-index: 2;
}

.shot-card__metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 40px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background: rgba(7, 11, 17, 0.66);
}

.shot-card__metric span.metric-label,
.shot-card__timeline-label span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.shot-card__metric strong.metric-value,
.shot-card__timeline-label strong {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.shot-card__signal {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--shot-accent);
    box-shadow: 0 0 8px var(--shot-accent);
}

.shot-card.status-crashed .pulse-dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.shot-card.status-stalled .pulse-dot { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.shot-card.status-finished .pulse-dot { background: var(--success); box-shadow: 0 0 8px var(--success); }

.shot-card__timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shot-card__timeline-track {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.shot-card__micro-segment {
    position: relative;
    flex: 1;
    min-width: 14px;
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.shot-card__micro-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--worker-fill);
    background: var(--worker-color);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.14);
}

.shot-card__micro-segment.is-crashed .shot-card__micro-fill {
    background: var(--danger);
}

.shot-card__micro-segment.is-stalled .shot-card__micro-fill {
    background: var(--warning);
}

.shot-card__micro-segment.is-finished .shot-card__micro-fill {
    background: var(--success);
}

.shot-card__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--shot-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.2s ease;
}

.shot-card:hover .shot-card__cta {
    transform: translateX(2px);
}

.shot-card.status-crashed .shot-card__status,
.shot-detail-frame__pill.status-crashed {
    color: #ffbac4;
    border-color: rgba(255, 123, 138, 0.26);
    background: rgba(255, 123, 138, 0.12);
}

.shot-card.status-stalled .shot-card__status,
.shot-detail-frame__pill.status-stalled {
    color: #ffe1a4;
    border-color: rgba(255, 206, 126, 0.26);
    background: rgba(255, 206, 126, 0.12);
}

.shot-card.status-finished .shot-card__status,
.shot-detail-frame__pill.status-finished {
    color: #9fffb9;
    border-color: rgba(81, 255, 132, 0.26);
    background: rgba(81, 255, 132, 0.12);
}

.shot-card.status-rendering .shot-card__status,
.shot-detail-frame__pill.status-rendering {
    color: #cbfbd9;
    border-color: rgba(81, 255, 132, 0.22);
    background: rgba(81, 255, 132, 0.08);
}

.shot-card.is-compact .shot-card__surface {
    min-height: 360px;
}

.shot-card.is-compact .shot-card__title {
    font-size: 30px;
}

@keyframes shot-card-title-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-1 * var(--marquee-distance, 0px)));
    }
}

@media (prefers-reduced-motion: reduce) {
    .shot-card__title[data-overflowing="true"] .shot-card__title-track,
    .sl-title[data-overflowing="true"] .shot-card__title-track {
        animation: none;
    }
}

.shot-detail-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 5, 9, 0.72);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
    z-index: 2300;
}

.shot-detail-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.shot-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(960px, 100vw);
    max-width: 100vw !important; /* Prevent flying out beyond screen */
    height: 100vh;
    padding: 12px 12px 12px 12px; /* Added left padding to prevent clipping */
    transform: translateX(100%);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2400;
    display: flex;
    flex-direction: column;
}

.shot-detail-panel.is-resizing {
    transition: none;
}

.shot-detail-panel.is-open {
    transform: translateX(0);
}

.shot-detail-panel__body,
.shot-detail-frame {
    height: 100%;
    min-height: 0;
}

.shot-detail-panel__resize-handle {
    display: none !important;
    pointer-events: none !important;
}

.shot-detail-panel__resize-handle::before {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(143, 230, 255, 0.42);
    box-shadow: 0 0 18px rgba(143, 230, 255, 0.22);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.shot-detail-panel:hover .shot-detail-panel__resize-handle::before,
.shot-detail-panel.is-resizing .shot-detail-panel__resize-handle::before,
.shot-detail-panel__resize-handle:focus-visible::before {
    opacity: 1;
}

.shot-detail-panel__resize-handle--left {
    top: 28px;
    left: 0;
    width: 16px;
    height: calc(100% - 56px);
    cursor: ew-resize;
}

.shot-detail-panel__resize-handle--left::before {
    top: 18px;
    bottom: 18px;
    left: 6px;
    width: 4px;
}




.filtered-empty-state {
    padding: 58px 30px;
}

@media (max-width: 1100px) {
    .shot-list {
        padding-inline: 24px;
    }

    .overview-hero {
        grid-template-columns: 1fr;
    }

    .overview-hero__bg {
        inset: auto auto -22% -10%;
        width: min(62vw, 440px);
    }

}

@media (max-width: 820px) {
    .shot-list {
        padding-inline: 16px;
    }

    .overview-hero,
    .overview-panel {
        border-radius: 24px;
    }

    .overview-stat-strip,
    .shot-detail-frame__summary {
        --detail-summary-columns: 4;
        --detail-summary-gap: 10px;
        --detail-summary-card-min-height: 80px;
        --detail-summary-card-padding: 8px 8px 8px;
        --detail-summary-value-size: 16px;
    }

    .shot-detail-frame__summary-card {
        border-radius: 16px;
    }

    .overview-panel__toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .overview-toolbar__meta {
        align-items: flex-start;
        text-align: left;
    }

    .shot-rail {
        grid-auto-columns: minmax(86%, 1fr);
    }

    .shot-card__surface {
        min-height: 372px;
        padding: 20px;
    }

    .setup-card {
        padding: 24px;
    }
}

@media (max-width: 580px) {
    .topbar {
        padding-inline: 18px;
    }

    .setup-shell {
        padding-inline: 14px;
    }

    .config-modal-backdrop {
        padding: 12px;
    }

    .config-modal {
        padding: 18px;
    }

    .overview-hero {
        padding: 22px 18px;
    }

    .overview-hero__bg {
        left: -18%;
        bottom: -18%;
        width: min(74vw, 320px);
    }

    .overview-panel__toolbar {
        padding: 16px 14px;
        gap: 14px;
    }

    .overview-panel__head,
    .overview-panel .shot-rail,
    .overview-panel .shot-card-grid,
    .overview-panel .empty-state {
        margin-inline: 14px;
    }

    .overview-panel__head {
        margin-top: 16px;
    }
    .overview-toolbar__group,
    .overview-toolbar__meta {
        width: 100%;
    }

    .overview-toolbar__group {
        gap: 10px;
    }

    .overview-filter-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
    }

    .overview-filter {
        min-height: 62px;
        padding: 10px 8px;
        gap: 6px;
    }

    .overview-filter__label {
        font-size: 10px;
    }

    .overview-filter__count {
        font-size: 18px;
    }

    .overview-stat-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .overview-stat-card {
        align-items: center;
        gap: 6px;
        min-height: 0;
        padding: 10px 6px;
        border-radius: 16px;
        text-align: center;
    }

    .overview-stat-card span {
        font-size: 10px;
        line-height: 1.2;
    }

    .overview-stat-card strong {
        font-size: 24px;
        line-height: 1;
    }

    .overview-stat-card em {
        display: none;
    }

    .shot-card__metrics,
    .shot-card-grid {
        grid-template-columns: 1fr;
    }

    .shot-card__surface {
        min-height: 344px;
    }

    .shot-card__title {
        font-size: 30px;
    }

    .shot-detail-frame__close,
    .shot-detail-frame__delete {
        min-height: 48px; /* Increased from 40px for better tap target */
        padding: 0 18px;
    }
}

@media (max-width: 640px) {
    .config-modal-backdrop {
        align-items: center;
        justify-content: center;
        padding: 12px;
    }

    .config-modal {
        width: min(880px, 100%);
        max-height: min(92vh, 920px);
        padding: 28px 24px;
        border-radius: 24px;
        border-bottom: 1px solid var(--line-strong);
    }

    .config-modal__header {
        align-items: flex-start;
        gap: 16px;
    }

    .config-modal__header h2 {
        font-size: clamp(22px, 5vw, 28px);
    }

    .config-modal__close-btn {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .config-modal__textarea {
        min-height: clamp(360px, 52vh, 460px);
        padding: 32px 18px 18px;
        font-size: 13px;
    }

    .share-panel {
        grid-template-columns: 1fr;
    }

    .share-panel__qr-card {
        order: -1;
    }

    .profile-summary {
        grid-template-columns: 1fr;
    }

    .setup-form__actions {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .setup-form__actions .btn-tool {
        width: auto;
        min-width: 152px;
        padding: 0 18px;
        font-size: 11px;
    }

    .setup-form__actions .btn-tool span {
        white-space: nowrap;
    }

    .setup-form__actions .btn-tool svg {
        width: 14px;
        height: 14px;
    }

}

@media (max-width: 480px) {
    .config-modal-backdrop {
        padding: 10px;
    }

    .config-modal {
        gap: 24px;
        padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 24px));
        border-radius: 22px;
    }

    .config-modal__header h2 {
        font-size: clamp(20px, 5.6vw, 24px);
    }

    .config-modal__textarea {
        min-height: clamp(300px, 48vh, 420px);
        padding: 30px 16px 16px;
        font-size: 12px;
    }

    .config-modal__textarea--compact {
        min-height: 110px;
        padding-top: 16px;
    }

    .setup-form__actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .setup-form__actions .btn-tool {
        flex: 1 1 0;
        min-width: 0;
        min-height: 50px;
        padding: 0 12px;
        font-size: 10px;
        letter-spacing: 0.12em;
    }

}

.view-mode-switch {
    display: flex;
    gap: 4px;
    border-radius: 999px;
    padding: 0;
    background: rgba(0, 0, 0, 0.1);
}

.shot-list-header {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid var(--line);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-top: 16px;
    gap: 16px;
}

.shot-list-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0;
}

.machines-table-container {
    padding: 18px 24px 24px;
}

.machine-groups {
    display: grid;
    gap: 18px;
}

.machine-group {
    --machine-group-accent: var(--accent);
    --machine-group-accent-soft: rgba(81, 255, 132, 0.18);
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, var(--machine-group-accent-soft), transparent 34%),
        linear-gradient(180deg, rgba(14, 18, 25, 0.98), rgba(10, 14, 20, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.machine-group__header {
    display: grid;
    gap: 10px;
    padding: 20px 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background:
        linear-gradient(90deg, var(--machine-group-accent-soft), transparent 55%),
        linear-gradient(180deg, rgba(18, 23, 31, 0.96), rgba(14, 18, 25, 0.9));
}

.machine-group__eyebrow {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.machine-group__title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.machine-group__title-row h3 {
    color: var(--text-primary);
    font-family: "Sora", sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.machine-group__meta,
.machine-group__count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.03);
}

.machine-group__count {
    border-color: var(--machine-group-accent-soft);
    color: var(--machine-group-accent);
}

.machine-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: transparent;
}

.machine-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    table-layout: fixed;
}

.machine-table col.col-shot-name {
    width: 18%;
}

.machine-table col.col-frame-current,
.machine-table col.col-frame-start,
.machine-table col.col-frame-end {
    width: 11%;
}

.machine-table col.col-progress,
.machine-table col.col-eta {
    width: 8%;
}

.machine-table col.col-last-update {
    width: 14%;
}

.machine-table col.col-detection {
    width: 19%;
}

.machine-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(16, 21, 29, 0.98);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
}

.machine-table tbody tr {
    transition: background 0.2s ease;
}

.machine-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.machine-table tbody tr + tr td {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.machine-table td {
    padding: 14px 12px;
    color: var(--text-primary);
    font-size: 13px;
    vertical-align: middle;
    white-space: nowrap;
}

.machine-table th.is-truncate,
.machine-table td.is-truncate {
    max-width: 0;
}

.machine-table td.is-truncate span,
.machine-table td span {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.machine-table th.is-numeric,
.machine-table td.is-numeric {
    text-align: right;
}

.machine-table td.is-numeric {
    color: #d7e2f6;
    font-variant-numeric: tabular-nums;
}

.shot-list-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.shot-list-row:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.shot-list-row.is-selected {
    border-color: var(--shot-accent);
    background: rgba(255, 255, 255, 0.04);
}

.sl-cell {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sl-name { flex: 2; min-width: 150px; }
.sl-status { flex: 1; min-width: 100px; }
.sl-workers { flex: 0.5; min-width: 80px; align-items: center; }
.sl-frames { flex: 1; min-width: 120px; }
.sl-progress { flex: 1.5; min-width: 140px; }
.sl-eta { flex: 1.5; min-width: 120px; }
.sl-alert { flex: 2; min-width: 140px; flex-direction: row; align-items: center; gap: 8px; font-size: 11px; color: var(--text-secondary); text-transform: uppercase; font-weight: 700; }
.sl-action { flex: 0.5; min-width: 80px; align-items: flex-end; }

.sl-title {
    font-family: "Sora", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    max-width: 100%;
}

.sl-title[data-overflowing="true"] {
    text-overflow: clip;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}

.sl-title:not([data-overflowing="true"]) {
    text-overflow: ellipsis;
}

.sl-type {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.sl-status-text {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sl-label {
    display: none;
}

.sl-workers strong, .sl-frames strong, .sl-eta strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.sl-progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.sl-prog-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.sl-prog-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.sl-progress strong {
    font-size: 13px;
    font-weight: 700;
    min-width: 38px;
    text-align: right;
}

.btn-inspect {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.shot-list-row:hover .btn-inspect {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 900px) {
    .shot-list-header {
        display: none;
    }
    .shot-list-row {
        display: grid;
        grid-template-columns: minmax(0, 1.7fr) auto auto minmax(120px, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
    }
    .sl-cell {
        align-items: center;
        min-width: 0;
    }
    .sl-label {
        display: none;
    }
    .sl-name,
    .sl-status,
    .sl-workers,
    .sl-frames,
    .sl-eta,
    .sl-action {
        min-width: 0;
    }
    .sl-alert {
        display: none;
    }
    .sl-type {
        display: none;
    }
    .sl-status-text,
    .sl-workers strong,
    .sl-frames strong,
    .sl-eta strong,
    .sl-progress strong {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sl-title {
        font-size: 15px;
    }
    .sl-status-text {
        font-size: 11px;
    }
    .sl-workers strong,
    .sl-frames strong,
    .sl-eta strong {
        font-size: 13px;
    }
    .sl-progress {
        min-width: 0;
        gap: 8px;
    }
    .sl-progress strong {
        min-width: 34px;
        font-size: 12px;
    }
    .btn-inspect {
        padding-inline: 12px;
    }

    .machines-table-container {
        padding: 14px;
    }

    .machine-group__header {
        padding: 16px 16px 14px;
    }
}

@media (max-width: 760px) {
    .shot-list-row {
        grid-template-columns: minmax(0, 1.8fr) auto minmax(104px, 0.9fr) auto;
    }

    .sl-frames,
    .sl-action {
        display: none;
    }
}

@media (max-width: 620px) {
    .shot-list-row {
        grid-template-columns: minmax(0, 1.9fr) auto minmax(96px, 0.9fr);
        gap: 10px;
    }

    .sl-workers,
    .sl-eta {
        display: none;
    }

    .sl-progress .sl-prog-bar {
        height: 5px;
    }
}

@media (max-width: 480px) {
    .shot-list-row {
        grid-template-columns: minmax(0, 1fr) auto 92px;
        gap: 8px;
        padding: 12px 14px;
    }

    .sl-title {
        font-size: 14px;
    }

    .sl-status-text {
        font-size: 10px;
        letter-spacing: 0.08em;
    }

    .sl-progress {
        gap: 6px;
    }

    .sl-progress strong {
        min-width: 30px;
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .setup-form__actions .btn-tool {
        width: auto !important;
        min-width: 148px !important;
        min-height: 44px !important;
        padding: 0 16px !important;
        border-radius: 14px !important;
        flex: 0 0 auto !important;
    }

    .setup-form__actions .btn-tool span {
        display: inline !important;
    }
}

@media (max-width: 680px), (pointer: coarse) and (max-width: 900px) {
    .setup-form__actions .btn-tool {
        width: auto !important;
        min-width: 148px !important;
        min-height: 46px !important;
        padding: 0 16px !important;
        border-radius: 14px !important;
        flex: 0 0 auto !important;
    }

    .setup-form__actions .btn-tool span {
        display: inline !important;
    }
}

/* DoneYet shot detail panel: single fixed visual architecture across breakpoints */

/* Locked Shot Detail Panel Architecture */
.shot-detail-panel {
    width: min(960px, 100vw) !important;
    max-width: 100vw !important;
    right: 0 !important;
    left: auto !important;
}

.shot-detail-frame {
    border-radius: 32px;
    overflow: hidden;
    background: var(--bg-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.shot-detail-frame__scroll {
    flex: 1;
    overflow-x: auto !important;
    overflow-y: auto !important;
    padding: 0;
    overscroll-behavior: contain;
}

/* Internal Canvas: Forces the horizontal desktop layout */
.shot-detail-canvas {
    --shot-detail-canvas-min-width: 820px;
    --shot-detail-section-padding: 36px; /* Increased padding to prevent clipping */
    min-width: var(--shot-detail-canvas-min-width);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    background: transparent;
}

/* Header: Locked horizontal layout */
.shot-detail-frame__header {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 20px !important;
    padding: var(--shot-detail-section-padding) var(--shot-detail-section-padding) 24px !important;
}

.shot-detail-frame__close {
    align-self: center;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 48px !important;
    padding: 0 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(23, 29, 39, 0.92), rgba(18, 23, 31, 0.92)) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.shot-detail-frame__copy {
    min-width: 0;
    padding: 2px 0;
}

.shot-detail-frame__copy h2 {
    margin-top: 4px;
    font-size: 36px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shot-detail-frame__delete {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(23, 29, 39, 0.92), rgba(18, 23, 31, 0.92)) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

/* Summary Cards: Always 2 columns (2x2 for 4 cards) */
.shot-detail-frame__summary {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    padding: 0 var(--shot-detail-section-padding) 24px !important;
}

.shot-detail-frame__summary-card {
    min-height: 96px;
    padding: 18px 20px 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: linear-gradient(180deg, rgba(23, 29, 39, 0.94), rgba(18, 23, 31, 0.94)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.shot-detail-frame__summary-card span {
    font-size: 11px;
}

.shot-detail-frame__summary-card strong {
    min-height: 0;
    font-size: 22px;
}

.shot-detail-frame__divider {
    height: 1px;
    margin: 2px var(--shot-detail-section-padding) 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

/* Body Content: Locking nested components */
.shot-detail-frame__body {
    padding: 0 var(--shot-detail-section-padding) var(--shot-detail-section-padding);
}

.shot-detail-layout.shot-shell {
    padding: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Shot Overview & Playbar: Always horizontal */
.shot-detail-layout .shot-overview {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-end !important;
    gap: 32px !important;
    padding-bottom: 24px !important;
    margin-bottom: 24px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.shot-detail-layout .shot-meta {
    flex: 1;
}

.shot-detail-layout .playbar-meta {
    min-width: max-content;
    align-items: flex-end !important;
    text-align: right !important;
    margin-left: auto !important;
}

/* Timeline: Full width */
.shot-detail-layout .timeline-panel {
    margin-bottom: 24px !important;
}

.shot-detail-layout .timeline-track {
    height: 36px;
    border-radius: 20px;
}

/* Worker Details: Locked horizontal architecture */
.shot-detail-layout .worker-row {
    display: grid !important;
    grid-template-columns: var(--worker-lane-width) minmax(0, 1fr) 160px !important;
    gap: 16px 20px !important;
    align-items: stretch !important;
    padding: 24px 24px 24px 16px !important;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: linear-gradient(180deg, rgba(24, 30, 40, 0.96), rgba(18, 23, 31, 0.96)) !important;
}

.shot-detail-layout .worker-lane {
    grid-row: 1 / span 1 !important;
}

.shot-detail-layout .worker-fields {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    gap: 16px 24px !important;
    align-items: start !important;
    grid-column: 2 !important;
}

.shot-detail-layout .worker-field {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.shot-detail-layout .worker-field.field-frame-summary {
    grid-column: 1 / -1 !important;
}

.shot-detail-layout .worker-field.field-file {
    grid-column: 1 / -1 !important;
}

.shot-detail-layout .worker-frame-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
}

.shot-detail-layout .value-display {
    min-height: 52px !important;
    padding-inline: 18px !important;
    font-size: 15px !important;
}

.shot-detail-layout .metric-box {
    grid-column: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-self: stretch !important;
    margin: 0 !important;
    min-width: 0 !important;
    border-radius: 18px !important;
}

/* Responsive container overrides: Fluid scaling to preserve horizontal layout on mobile */
@media (max-width: 820px) {
    .shot-detail-panel {
        width: 100vw !important;
        padding: 0 !important;
    }

    .shot-detail-panel__resize-handle {
        display: none;
    }

    .shot-detail-frame {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .shot-detail-canvas {
        --shot-detail-canvas-min-width: 0; /* Remove rigid horizontal lock */
        --shot-detail-section-padding: 4vw; /* Fluid padding */
        min-width: 100%;
        zoom: normal; /* Disable zoom to rely on pure fluid CSS */
    }

    /* Header remains horizontal, shrink text */
    .shot-detail-frame__copy h2 {
        font-size: clamp(18px, 5vw, 36px) !important;
    }

    .shot-detail-frame__close,
    .shot-detail-frame__delete {
        padding: 0 2vw !important;
        min-height: 36px !important;
    }

    /* Summary Cards: Keep 2 columns, shrink padding and text */
    .shot-detail-frame__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 2vw !important;
        padding: 0 var(--shot-detail-section-padding) 3vw !important;
    }

    .shot-detail-frame__summary-card {
        padding: 2vw !important;
        min-height: 0 !important;
        border-radius: 12px !important;
    }

    .shot-detail-frame__summary-card span {
        font-size: clamp(8px, 1.5vw, 11px) !important;
    }

    .shot-detail-frame__summary-card strong {
        font-size: clamp(12px, 2.5vw, 22px) !important;
    }

    /* Overview and Playbar: Keep horizontal */
    .shot-detail-layout .shot-overview {
        gap: 3vw !important;
        padding-bottom: 3vw !important;
        margin-bottom: 3vw !important;
    }

    .shot-detail-layout .shot-meta h3 {
        font-size: clamp(16px, 4vw, 24px) !important;
    }

    .shot-detail-layout .playbar-meta .metric-top {
        font-size: clamp(8px, 1.5vw, 10px) !important;
    }

    .shot-detail-layout .playbar-meta .metric-bottom {
        font-size: clamp(14px, 3vw, 20px) !important;
    }

    /* Worker Details: Keep horizontal architecture (Lane | Fields | Metric) */
    .shot-detail-layout .worker-row {
        grid-template-columns: 4px minmax(0, 1fr) 20vw !important; /* Shrink lane and metric box */
        gap: 2vw !important;
        padding: 3vw !important;
        margin-bottom: 2vw !important;
    }

    .shot-detail-layout .worker-fields {
        grid-template-columns: 1fr 1fr !important; /* Keep 2 columns for start/end */
        gap: 2vw !important;
    }

    .shot-detail-layout .worker-frame-grid {
        gap: 1.5vw !important;
    }

    .shot-detail-layout .value-display {
        font-size: clamp(10px, 2.2vw, 15px) !important;
        padding-inline: 2vw !important;
        min-height: 36px !important;
    }

    .shot-detail-layout .field-label {
        font-size: clamp(8px, 1.5vw, 10px) !important;
    }
}

/* =========================================================
   DoneYet Dashboard Mobile Safety + Responsive Overrides
   QA helper: add `debug-mobile-qa` on <body> for local tests.
   ========================================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.page-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

body.detail-panel-open {
    overflow-x: hidden;
}

img,
svg,
canvas {
    max-width: 100%;
}

.page-shell,
.shot-list,
.overview-stage,
.overview-panel,
.overview-panel__toolbar,
.overview-toolbar__group,
.overview-toolbar__meta,
.overview-filter-row,
.shot-rail,
.shot-card-grid,
.shot-card,
.shot-card__surface,
.shot-shell,
.timeline-panel,
.timeline-head,
.timeline-track,
.worker-stack,
.worker-row,
.worker-fields,
.worker-field,
.value-display,
.file-display,
.machine-groups,
.machine-group,
.machine-table-wrap,
.machines-table-container,
.shot-detail-panel,
.shot-detail-panel__body,
.shot-detail-frame,
.shot-detail-frame__scroll,
.shot-detail-canvas,
.shot-detail-frame__body {
    min-width: 0;
    max-width: 100%;
}

.brand-title-main,
.overview-hero__copy h2,
.overview-filter__label,
.overview-stat-card span,
.overview-stat-card em,
.overview-toolbar__meta-value,
.shot-card__title-text,
.shot-card__subtitle,
.shot-detail-frame__copy h2,
.timeline-worker-label,
.file-path,
.sl-title,
.machine-table td span {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Temporary QA helper class for mobile regression checks (no visible UI). */
body.debug-mobile-qa * {
    min-width: 0 !important;
}

@media (max-width: 640px) {
    .topbar {
        padding: 14px 12px !important;
        gap: 10px;
    }

    .brand-title {
        font-size: clamp(20px, 6vw, 26px);
        line-height: 1.04;
        letter-spacing: -0.02em;
        white-space: normal;
    }

    .utility-bar {
        width: 100%;
        max-width: 100%;
        padding-inline: 12px !important;
        margin-top: 18px;
        margin-bottom: 16px;
        gap: 10px;
    }

    .utility-bar__source-group {
        width: 100%;
    }

    .source-switch {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .source-switch__button {
        min-width: 0;
        padding: 0 8px;
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .shot-list {
        width: 100%;
        max-width: 100%;
        gap: 16px;
        padding: 6px 10px 10px !important;
    }

    .overview-hero,
    .overview-panel {
        border-radius: 18px;
    }

    .overview-hero {
        padding: 16px 14px !important;
        gap: 12px;
        grid-template-columns: 1fr !important;
    }

    .overview-hero__copy h2 {
        max-width: 100%;
        font-size: clamp(24px, 8vw, 36px);
        line-height: 1.02;
        letter-spacing: -0.02em;
        white-space: normal;
        overflow-wrap: normal;
    }

    .overview-hero__copy p {
        margin-top: 10px;
        font-size: 12px;
        line-height: 1.55;
    }

    .overview-stat-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .overview-stat-card {
        min-height: 0;
        padding: 10px 8px;
        border-radius: 12px;
        gap: 5px;
    }

    .overview-stat-card span,
    .overview-stat-card em {
        font-size: 10px;
        line-height: 1.25;
    }

    .overview-stat-card strong {
        font-size: clamp(18px, 6vw, 24px);
        line-height: 1;
    }

    .overview-panel__toolbar {
        padding: 12px !important;
        gap: 10px;
    }

    .overview-filter-row {
        display: flex;
        grid-template-columns: none;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .overview-filter-row::-webkit-scrollbar {
        height: 6px;
    }

    .overview-filter-row::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.14);
    }

    .overview-filter {
        flex: 0 0 auto;
        width: min(120px, 32vw);
        min-width: 98px;
        min-height: 58px;
        padding: 8px 8px 10px;
        gap: 5px;
        scroll-snap-align: start;
        border-radius: 12px;
    }

    .overview-filter__label {
        font-size: 10px;
        line-height: 1.1;
    }

    .overview-filter__count {
        font-size: 14px;
    }

    .view-mode-switch.source-switch {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        padding: 4px;
        border-radius: 14px;
    }

    .view-mode-switch .source-switch__button {
        min-width: 0;
        min-height: 34px;
        padding: 0 6px;
        font-size: 9px;
        letter-spacing: 0.08em;
        border-radius: 10px;
    }

    .overview-panel__head,
    .overview-panel .shot-rail,
    .overview-panel .shot-card-grid,
    .overview-panel .empty-state {
        margin-inline: 12px !important;
    }

    .overview-panel__head {
        margin-top: 14px !important;
        margin-bottom: 14px !important;
    }

    .shot-rail {
        display: flex;
        flex-direction: column;
        gap: 12px;
        overflow: visible;
        padding-top: 10px;
        padding-bottom: 0;
        scroll-snap-type: none;
    }

    .shot-card-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-top: 8px;
    }

    .shot-card,
    .shot-card.is-more-card {
        width: 100%;
        max-width: 100%;
    }

    .shot-card__surface {
        min-height: 320px;
        padding: 16px;
        border-radius: 18px;
    }

    .shot-card::before,
    .shot-card__glare {
        border-radius: 18px;
    }

    .shot-card__title {
        font-size: clamp(24px, 8vw, 30px);
    }

    .shot-card__subtitle,
    .shot-card__metric span.metric-label,
    .shot-card__timeline-label span {
        font-size: 10px;
    }

    .shot-card__metric strong.metric-value,
    .shot-card__timeline-label strong {
        font-size: 12px;
    }

    .machine-group {
        border-radius: 16px;
    }

    .machine-group__header {
        padding: 12px;
    }

    .machines-table-container {
        padding: 10px 12px 14px;
    }

    .machine-table {
        min-width: 0;
    }

    .machine-table thead th,
    .machine-table td {
        font-size: 11px;
        padding: 10px 8px;
    }

    .shot-list-row {
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr) auto 88px;
        gap: 8px;
        padding: 12px 10px;
    }

    .sl-title {
        font-size: 13px;
    }

    .sl-status-text,
    .sl-progress strong,
    .btn-inspect {
        font-size: 10px;
    }

    .shot-detail-panel {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .shot-detail-frame {
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }

    .shot-detail-frame__scroll {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .shot-detail-canvas {
        --shot-detail-canvas-min-width: 0 !important;
        --shot-detail-section-padding: 12px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .shot-detail-frame__header {
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        gap: 8px !important;
        padding: 12px !important;
    }

    .shot-detail-frame__close {
        min-height: 38px !important;
        padding: 0 10px !important;
        border-radius: 10px !important;
        gap: 6px !important;
        font-size: 11px;
    }

    .shot-detail-frame__copy {
        min-width: 0 !important;
    }

    .shot-detail-frame__copy h2 {
        font-size: clamp(18px, 6vw, 24px) !important;
        line-height: 1.05;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .shot-detail-frame__delete {
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
        border-radius: 10px !important;
    }

    .shot-detail-frame__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 0 12px 12px !important;
    }

    .shot-detail-frame__summary-card {
        min-height: 0;
        padding: 10px !important;
        border-radius: 12px !important;
    }

    .shot-detail-frame__summary-card span {
        font-size: 10px !important;
    }

    .shot-detail-frame__summary-card strong {
        font-size: clamp(16px, 5vw, 20px) !important;
    }

    .shot-detail-frame__divider {
        margin: 0 12px 10px;
    }

    .shot-detail-frame__body {
        padding: 0 12px 12px !important;
    }

    .shot-detail-layout .shot-overview {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding-bottom: 10px !important;
        margin-bottom: 12px !important;
    }

    .shot-detail-layout .playbar-meta {
        width: 100%;
        margin-left: 0;
        align-items: flex-start !important;
        text-align: left !important;
    }

    .global-range {
        font-size: clamp(16px, 5vw, 20px);
    }

    .timeline-panel {
        width: 100%;
        max-width: 100%;
        margin-bottom: 12px !important;
    }

    .timeline-head {
        margin-bottom: 8px;
        gap: 8px;
    }

    .timeline-edge {
        font-size: 12px;
    }

    .timeline-title {
        min-width: 0;
        text-align: center;
        font-size: 9px;
        letter-spacing: 0.1em;
    }

    .timeline-track,
    .shot-detail-layout .timeline-track {
        width: 100%;
        height: 42px !important;
        border-radius: 12px;
    }

    .timeline-worker-label {
        font-size: 9px;
        padding: 0 5px;
    }

    .shot-detail-layout .worker-row {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 10px !important;
        border-radius: 14px;
    }

    .shot-detail-layout .worker-lane {
        display: none !important;
    }

    .shot-detail-layout .worker-fields {
        grid-column: 1 / -1 !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .shot-detail-layout .worker-frame-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .frame-stat-label {
        font-size: 9px;
        letter-spacing: 0.1em;
    }

    .frame-stat-value,
    .shot-detail-layout .value-display {
        min-height: 38px !important;
        padding: 0 10px !important;
        font-size: 13px !important;
    }

    .worker-name {
        font-size: 14px;
    }

    .worker-detection-pill {
        min-height: 24px;
        padding: 0 8px;
        font-size: 9px;
    }

    .file-path {
        font-size: 12px;
        white-space: normal;
    }

    .copy-icon-btn {
        width: 30px;
        height: 30px;
        border-radius: 8px;
    }

    .shot-detail-layout .metric-box {
        grid-column: 1 / -1 !important;
        min-height: 0 !important;
        padding: 10px !important;
        border-radius: 12px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
    }

    .metric-top {
        font-size: 12px;
    }

    .metric-bottom {
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .topbar {
        padding-inline: 10px !important;
    }

    .brand-kicker {
        font-size: 9px;
        letter-spacing: 0.14em;
    }

    .brand-title {
        font-size: clamp(18px, 7vw, 22px);
    }

    .overview-hero {
        padding: 14px 12px !important;
    }

    .overview-hero__copy h2 {
        font-size: clamp(22px, 8vw, 30px);
        line-height: 0.98;
        letter-spacing: -0.01em;
    }

    .overview-stat-strip {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        padding-bottom: 2px;
    }

    .overview-stat-card {
        flex: 0 0 31%;
        min-width: 92px;
        scroll-snap-align: start;
    }

    .overview-filter {
        min-width: 92px;
        width: auto;
    }

    .view-mode-switch .source-switch__button {
        min-height: 32px;
        font-size: 8px;
        letter-spacing: 0.06em;
        padding: 0 4px;
    }

    .shot-card__surface {
        min-height: 300px;
        padding: 14px;
    }

    .shot-detail-frame__header {
        gap: 6px !important;
        padding: 10px !important;
    }

    .shot-detail-frame__close {
        min-height: 34px !important;
        padding: 0 8px !important;
        font-size: 10px;
    }

    .shot-detail-frame__delete {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
    }

    .shot-detail-frame__copy h2 {
        font-size: 18px !important;
    }

    .shot-detail-frame__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .shot-detail-layout .worker-frame-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .timeline-track,
    .shot-detail-layout .timeline-track {
        height: 38px !important;
    }

    .timeline-worker-label {
        font-size: 8px;
    }
}
