* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top, rgba(14, 165, 233, 0.08), transparent 28%),
        linear-gradient(180deg, #eef4f8 0%, #f8fafc 100%);
    color: #1f2937;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: #111827;
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    flex: 1;
}

.nav-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.main-nav a,
.nav-user {
    color: #fff;
    text-decoration: none;
    opacity: 0.92;
}

.main-nav a {
    padding: 7px 10px;
    border-radius: 8px;
}

.nav-primary a {
    background: rgba(255, 255, 255, 0.06);
}

.nav-primary a:hover,
.nav-login:hover,
.nav-logout:hover {
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.main-nav a:hover {
    opacity: 1;
}

.nav-account {
    justify-content: flex-end;
}

.nav-user {
    padding: 7px 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    color: #e5e7eb;
}

.main-nav .nav-user:hover {
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.nav-logout {
    color: #fecaca;
}

.main-nav-guest {
    justify-content: flex-end;
}

.stream-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.3;
}

.bot-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.3;
    border: 1px solid rgba(203, 213, 225, 0.35);
}

.bot-status-online {
    color: #bbf7d0;
}

.bot-status-offline {
    color: #cbd5e1;
}

.bot-log-output {
    max-height: 260px;
    padding: 10px;
    overflow: auto;
    border-radius: 8px;
    background: #0f172a;
    color: #d1fae5;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.stream-status-offline {
    color: #cbd5e1;
    border: 1px solid rgba(203, 213, 225, 0.35);
}

.stream-status-live {
    color: #fff;
    background: #dc2626;
    border: 1px solid #dc2626;
    font-weight: bold;
    text-decoration: none;
}

.role-test-banner {
    background: #fef3c7;
    border-bottom: 1px solid #f59e0b;
    color: #78350f;
}

.role-test-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
}

.role-test-inner form {
    margin-left: auto;
}

.role-test-inner .btn {
    padding: 7px 10px;
    background: #fff7ed;
    border-color: #f59e0b;
}

.main-nav .stream-status-live:hover {
    background: #b91c1c;
    text-decoration: none;
}

@media (max-width: 760px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-nav,
    .nav-account {
        width: 100%;
        justify-content: flex-start;
    }

    .role-test-inner form {
        width: 100%;
        margin-left: 0;
    }

    .nav-user {
        border-left: 0;
        padding-left: 0;
    }
}

.page-content {
    padding: 24px 0 40px;
}

.card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    margin-bottom: 20px;
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.form-stack {
    display: grid;
    gap: 16px;
}

.form-stack label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

.form-stack input,
.form-stack select,
.form-stack textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
}

.clip-filter-form {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
    align-items: end;
}

.clip-filter-form .button-row {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #1f2937;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
    max-width: 100%;
    min-height: 42px;
}

.btn:hover {
    background: #eef2f7;
}

.btn-primary {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}

.btn-primary:hover {
    background: #115e59;
}

.clip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    align-items: start;
}

.clip-card {
    width: 100%;
    background: #ffffff;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

.clip-thumb {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #9147ff, #6441a5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    font-weight: bold;
    flex-shrink: 0;
}

.clip-thumb span {
    color: #fff;
    font-weight: bold;
    font-size: 20px;
}

.clip-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clip-body {
    padding: 16px;
}

.clip-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #1f2937;
}

.clip-meta {
    font-size: 14px;
    color: #475569;
    margin-bottom: 6px;
    line-height: 1.4;
}

.workflow-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    padding: 14px;
}

.workflow-overview > div,
.workflow-link {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f8fafc;
    color: #1f2937;
    text-decoration: none;
}

.workflow-link:hover {
    background: #eef2f7;
}

.workflow-count {
    font-size: 26px;
    font-weight: bold;
    line-height: 1;
}

.workflow-section-intro,
.workflow-hint {
    margin: 0 0 14px;
    color: #475569;
    line-height: 1.45;
}

.workflow-hint {
    padding: 12px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
}

.workflow-next {
    display: grid;
    gap: 6px;
    padding: 10px;
    margin: 10px 0 12px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 14px;
    line-height: 1.35;
}

.workflow-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    background: #e2e8f0;
    color: #1f2937;
}

.workflow-badge-inbox {
    background: #dbeafe;
    color: #1d4ed8;
}

.workflow-badge-review {
    background: #fef3c7;
    color: #92400e;
}

.workflow-badge-social_queue {
    background: #dcfce7;
    color: #166534;
}

.workflow-badge-posted,
.workflow-badge-archive {
    background: #e5e7eb;
    color: #374151;
}

.clip-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.social-share-box {
    padding: 12px;
    margin-top: 12px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
}

.social-share-actions {
    gap: 8px;
    margin: 8px 0;
}

.social-share-actions .btn {
    padding: 8px 10px;
    font-size: 14px;
}

.discord-post-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.discord-post-complete {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.discord-post-complete input {
    width: 16px;
    height: 16px;
}

.emote-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 132px;
    padding: 8px;
    margin-top: 8px;
    overflow-y: auto;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #fff;
}

.emote-button {
    width: 34px;
    height: 34px;
    padding: 4px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
}

.emote-button:hover {
    background: #eef2f7;
}

.emote-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.emote-lanes {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.emote-lane {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 84px;
}

.emote-lane-left {
    left: 0;
}

.emote-lane-right {
    right: 0;
}

.floating-emote {
    position: absolute;
    bottom: -52px;
    width: 34px;
    height: 34px;
    object-fit: contain;
    animation-name: float-emote-up;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes float-emote-up {
    from {
        transform: translateY(0) rotate(0deg);
    }
    to {
        transform: translateY(-110vh) rotate(18deg);
    }
}

.clip-history {
    padding: 10px 12px;
    margin-top: 10px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #ffffff;
}

.clip-history summary {
    cursor: pointer;
    font-weight: bold;
}

.streamer-queue {
    display: grid;
    gap: 18px;
}

.streamer-card {
    display: grid;
    grid-template-columns: minmax(260px, 380px) 1fr;
    gap: 18px;
    align-items: start;
}

.streamer-media {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #111827;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.streamer-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.streamer-body h2 {
    margin: 0 0 10px;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

iframe {
    max-width: 100%;
    border: 0;
    border-radius: 8px;
}
textarea {
    resize: vertical;
}

form {
    margin: 0;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border: 1px solid #dbe2ea;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.admin-users-table {
    table-layout: fixed;
}

.admin-users-table th,
.admin-users-table td {
    overflow-wrap: anywhere;
}

.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
    width: 74px;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
    width: 58px;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4),
.admin-users-table th:nth-child(6),
.admin-users-table td:nth-child(6) {
    width: 110px;
}

.admin-permissions-cell {
    width: 260px;
    max-width: 260px;
}

.permission-form {
    display: grid;
    gap: 10px;
}

.permission-details {
    max-width: 100%;
}

.permission-details summary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font-weight: bold;
}

.permission-details summary small {
    margin: 0;
    font-weight: normal;
    white-space: normal;
    overflow-wrap: anywhere;
}

.permission-details[open] summary {
    margin-bottom: 8px;
}

.permission-list {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.permission-option {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: start;
    padding: 6px 8px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 13px;
    line-height: 1.35;
}

.permission-option input {
    margin-top: 2px;
}

.permission-option small {
    margin-top: 2px;
}

.permission-option-default {
    background: #eef2f7;
    color: #475569;
}
.clip-create-box {
    padding: 14px 16px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
}

.clip-create-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    cursor: pointer;
}

.clip-create-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.clip-create-label-spaced {
    margin-top: 10px;
}

.clip-create-help {
    display: block;
    margin-top: 12px;
    color: #475569;
    line-height: 1.45;
}

.clip-create-help-legacy {
    display: none;
}

.marker-preview-status {
    margin-top: 10px;
    min-height: 20px;
    font-weight: bold;
}

.marker-workspace {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.marker-workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.marker-workspace-header h2 {
    margin-bottom: 4px;
}

.marker-size-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.marker-player-shell {
    overflow: hidden;
    padding: 10px;
    border-radius: 8px;
    background: #0f172a;
}

.marker-player-shell #twitch-player,
.marker-player-shell #twitch-player iframe {
    display: block;
    width: 100%;
    min-height: 480px;
    border-radius: 8px;
}

.marker-control-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px);
    gap: 16px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
}

.marker-control-panel h3 {
    margin: 0 0 10px;
}

.marker-control-actions {
    margin-bottom: 0;
}

.marker-time-panel {
    display: grid;
    gap: 6px;
}

.marker-time-panel .clip-meta {
    margin: 4px 0 0;
}

.marker-save-panel {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #ffffff;
}

.marker-save-panel h3 {
    margin-top: 0;
}

.marker-bulk-discord {
    display: block;
    padding: 12px;
    margin-bottom: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    background: #f8fafc;
    max-width: 100%;
    overflow: visible;
}

.marker-bulk-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 10px;
    align-items: end;
    max-width: 100%;
    margin-bottom: 10px;
}

.marker-bulk-field {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-direction: column;
    min-width: 0;
}

.marker-bulk-delay {
    align-items: flex-start;
    flex-direction: column;
}

.marker-bulk-number {
    display: grid;
    grid-template-columns: 86px 1fr;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
}

.marker-bulk-number span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.marker-bulk-discord select,
.marker-bulk-discord input[type="number"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.marker-bulk-discord input[type="number"] {
    width: 86px;
    flex: 0 0 86px;
}

.marker-bulk-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    margin-bottom: 8px;
}

.marker-bulk-actions .btn {
    flex: 0 1 auto;
    white-space: normal;
}

.marker-bulk-discord small {
    display: block;
    margin-top: 0;
}

.vod-marker-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    overflow-y: visible;
}

.vod-marker-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
}

.vod-marker-table thead th {
    background: #edf3f7;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}

.vod-marker-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.9);
}

.vod-marker-table th,
.vod-marker-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.vod-marker-table .button-row,
.marker-action-grid {
    min-width: 0;
    align-items: flex-start;
}

.vod-marker-table .button-row form,
.marker-action-grid form,
.vod-marker-table .button-row .btn,
.marker-action-grid .btn,
.vod-marker-table select {
    max-width: 100%;
}

.vod-marker-table select {
    width: 100%;
}

.marker-clip-cell {
    min-width: 220px;
}

.marker-actions-cell {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
}

.clipflow-marker-table tbody td:nth-child(5) {
    display: none;
}

.clipflow-marker-table tbody td:nth-child(6) {
    min-width: 250px;
}

.clipflow-marker-table tbody td:nth-child(7) {
    width: 340px;
    min-width: 340px;
    max-width: 340px;
}

.marker-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.marker-action-grid form,
.marker-action-grid .btn,
.marker-action-grid .clip-meta {
    width: 100%;
    margin: 0;
    min-width: 0;
}

.marker-action-grid > * {
    min-width: 0;
    max-width: 100%;
}

.marker-action-grid form {
    display: grid;
    gap: 8px;
    align-content: start;
}

.marker-action-grid .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-wrap: balance;
    min-height: 44px;
}

.marker-action-note {
    display: grid;
    align-items: center;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.marker-action-grid select {
    width: 100%;
    min-width: 0;
}

.clipflow-marker-table .marker-action-grid {
    grid-template-columns: minmax(0, 1fr);
}

.marker-clip-cell .workflow-badge {
    margin-bottom: 8px;
}

.marker-clip-cell small {
    margin-top: 4px;
}

.vod-summary-card,
.vod-presence-card,
.marker-board {
    border-radius: 20px;
}

.vod-presence-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.vod-presence-list li {
    padding: 12px 14px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f8fafc;
}

.vod-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.vod-summary-grid > div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f8fafc;
}

.vod-summary-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.vod-summary-actions {
    margin-top: 16px;
}

.marker-flow-hint {
    border-radius: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.clipflow-shell {
    display: grid;
    gap: 22px;
}

.clipflow-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 20px;
    padding: 24px;
    border: 1px solid #cfe2eb;
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.16), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f6fbff 100%);
}

.clipflow-hero-main h1 {
    margin: 6px 0 12px;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.05;
}

.clipflow-eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dff7f5;
    color: #0f766e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.clipflow-lead {
    max-width: 60ch;
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.55;
}

.clipflow-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.clipflow-status-grid,
.clipflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.clipflow-stat-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid #dbe2ea;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
}

.clipflow-stat-card strong {
    font-size: 28px;
    line-height: 1;
}

.clipflow-stat-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.clipflow-panel {
    height: 100%;
}

.clipflow-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.clipflow-panel-head h2 {
    margin: 6px 0 0;
}

.clipflow-vod-card {
    display: grid;
    gap: 16px;
}

.clipflow-vod-title {
    font-size: 20px;
    line-height: 1.3;
}

.clipflow-mini-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.clipflow-mini-stats > div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f8fafc;
}

.clipflow-mini-stats span {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.clipflow-steps,
.clipflow-list {
    display: grid;
    gap: 12px;
}

.clipflow-step,
.clipflow-list-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    background: #f8fafc;
}

.clipflow-list-item {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.clipflow-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-weight: 700;
}

.clipflow-step strong,
.clipflow-list-item strong {
    display: block;
    margin-bottom: 4px;
}

.live-card {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: 16px;
    align-items: start;
}

.live-thumb {
    overflow: hidden;
    border-radius: 8px;
    background: #111827;
    aspect-ratio: 16 / 9;
}

.live-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-body h2 {
    margin-top: 0;
}

.marker-workspace-large {
    position: relative;
    left: 50%;
    width: min(1480px, calc(100vw - 24px));
    transform: translateX(-50%);
    padding: 18px;
    border-color: #1f2937;
    background: #0b1120;
    color: #e5e7eb;
}

.marker-workspace-max {
    width: min(1680px, calc(100vw - 16px));
}

.marker-workspace-large .clip-meta,
.marker-workspace-large small {
    color: #cbd5e1;
}

.marker-workspace-large .marker-player-shell {
    padding: 0;
    background: #000000;
}

.marker-workspace-large #twitch-player,
.marker-workspace-large #twitch-player iframe {
    min-height: min(72vh, 820px) !important;
}

.marker-workspace-max #twitch-player,
.marker-workspace-max #twitch-player iframe {
    min-height: min(86vh, 980px) !important;
}

.marker-workspace-large .marker-control-panel,
.marker-workspace-large .marker-save-panel {
    border-color: #334155;
    background: #111827;
    color: #e5e7eb;
}

.marker-duration-bar {
    width: 140px;
    max-width: 100%;
    height: 8px;
    margin-top: 8px;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 8px;
}

.marker-duration-bar span {
    display: block;
    height: 100%;
    background: #2563eb;
    border-radius: 8px;
}

.vod-filter-card {
    padding-bottom: 12px;
}

.vod-filter-row {
    gap: 8px;
    margin-bottom: 0;
}

.vod-filter-row .btn {
    padding: 8px 10px;
    font-size: 14px;
}

.vod-pagination {
    align-items: center;
}

.vod-pagination .clip-meta {
    margin-bottom: 0;
}

#twitch-player {
    width: 100%;
    min-height: 260px;
}

@media (max-width: 760px) {
    .emote-lanes {
        display: none;
    }

    .container {
        width: min(100% - 20px, 1100px);
    }

    .site-header {
        padding: 10px 0;
    }

    .header-inner {
        gap: 12px;
    }

    .logo a {
        font-size: 18px;
    }

    .main-nav {
        gap: 10px;
    }

    .nav-group {
        width: 100%;
        gap: 6px;
    }

    .main-nav a,
    .nav-user,
    .stream-status {
        font-size: 14px;
        padding: 7px 8px;
    }

    .page-content {
        padding: 16px 0 28px;
    }

    h1 {
        font-size: 26px;
        line-height: 1.2;
    }

    h2 {
        font-size: 20px;
        line-height: 1.25;
    }

    .card {
        padding: 14px;
        margin-bottom: 14px;
    }

    .button-row,
    .clip-actions {
        gap: 8px;
        margin: 10px 0 14px;
    }

    .btn {
        padding: 9px 10px;
        font-size: 14px;
    }

    .vod-filter-row .btn {
        flex: 1 1 calc(50% - 8px);
    }

    .clip-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .clip-thumb {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .clip-body {
        padding: 14px;
    }

    .clip-title {
        font-size: 17px;
        overflow-wrap: anywhere;
    }

    .clip-meta,
    small {
        overflow-wrap: anywhere;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .admin-table th,
    .admin-table td {
        padding: 8px;
    }

    .form-stack {
        gap: 12px;
    }

    .clip-filter-form,
    .streamer-card,
    .live-card,
    .clipflow-hero {
        grid-template-columns: 1fr;
    }

    .form-stack input,
    .form-stack select,
    .form-stack textarea {
        font-size: 16px;
    }

    .marker-workspace {
        padding: 12px;
    }

    .marker-workspace-large {
        left: auto;
        width: 100%;
        transform: none;
    }

    .marker-player-shell {
        padding: 6px;
    }

    .marker-control-panel {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .marker-bulk-discord {
        display: block;
    }

    .marker-bulk-fields {
        grid-template-columns: 1fr;
    }

    .marker-bulk-actions {
        justify-content: flex-start;
    }

    .marker-bulk-actions .btn {
        flex: 1 1 100%;
    }

    .marker-action-grid {
        grid-template-columns: 1fr;
    }

    .clipflow-panel-head,
    .clipflow-list-item {
        grid-template-columns: 1fr;
    }

    .marker-player-shell #twitch-player,
    .marker-player-shell #twitch-player iframe {
        min-height: 230px;
    }

    .marker-workspace-large #twitch-player,
    .marker-workspace-large #twitch-player iframe {
        min-height: 58vh !important;
    }

    .marker-workspace-max #twitch-player,
    .marker-workspace-max #twitch-player iframe {
        min-height: 68vh !important;
    }

    #twitch-player {
        min-height: 210px;
    }
}

@media (max-width: 420px) {
    .vod-filter-row .btn,
    .button-row .btn,
    .clip-actions .btn,
    .button-row form,
    .clip-actions form {
        flex: 1 1 100%;
    }

    .button-row form .btn,
    .clip-actions form .btn {
        width: 100%;
    }
}
