:root {
    --background: #0f1115;
    --sidebar: #13161b;
    --surface: #181b21;
    --surface-raised: #20242c;
    --border: #303641;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --success: #35c46a;
    --danger: #ef5350;
    --sidebar-width: 250px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    width: var(--sidebar-width);
    height: 100vh;
    min-height: 0;
    align-self: start;
    flex-direction: column;
    padding: 28px 14px;
    border-right: 1px solid var(--border);
    background: var(--sidebar);
}
.main-content { width: 100%; max-width: 1250px; padding: 48px; }

.dashboard-page .app-shell.sidebar-ready { transition: grid-template-columns .2s ease; }
.dashboard-page .app-shell.sidebar-ready .sidebar { transition: width .2s ease, height .28s ease, max-height .28s ease, padding .2s ease, box-shadow .2s ease; }
.dashboard-page .app-shell:not(.sidebar-ready) :is(.brand-copy, .nav-link-label, .sidebar-button-label, .sidebar-toggle span, .navigation, .sidebar-logout) { transition: none; }
.dashboard-page:not(.channel-page-overview) .main-content { margin-right: auto; margin-left: auto; }
.dashboard-page .brand { min-width: 0; padding-right: 28px; overflow: hidden; white-space: nowrap; }
.sidebar-toggle { position: absolute; z-index: 2; top: 18px; right: 10px; display: grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.sidebar-toggle:hover, .sidebar-toggle:focus-visible { border-color: var(--accent); color: var(--text); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 38px; }
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 800;
}
.brand h1 { margin: 0; font-size: 17px; }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.dashboard-carousel-navbar-label { display: none; }
.navigation { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; gap: 7px; overflow-x: hidden; overflow-y: auto; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    white-space: nowrap;
    overflow: hidden;
    padding: 11px 12px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 14px;
}
.nav-link-icon { display: grid; width: 20px; flex: 0 0 20px; place-items: center; font-size: 15px; }
.brand-copy, .nav-link-label, .sidebar-button-label { opacity: 1; transition: opacity .14s ease, transform .18s ease; }
.dashboard-page .sidebar-logout .button { justify-content: center; gap: 10px; overflow: hidden; padding-right: 11px; padding-left: 11px; white-space: nowrap; }
.dashboard-page .app-shell.sidebar-collapsed { grid-template-columns: 72px minmax(0,1fr); }
.dashboard-page:not(.channel-page-overview) .app-shell.sidebar-collapsed .main-content { position: relative; left: -36px; width: min(1250px,calc(100vw - 144px)); max-width: none; }
.dashboard-page .app-shell.sidebar-collapsed .sidebar { width: 72px; padding-right: 14px; padding-left: 14px; }
@media (min-width: 769px) {
    .dashboard-page .app-shell.sidebar-collapsed:not(.sidebar-hover-locked) .sidebar:hover { width: var(--sidebar-width); padding-right: 14px; padding-left: 14px; box-shadow: 18px 0 38px rgba(0,0,0,.38); }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:is(:not(:hover), .sidebar-hover-locked) .brand-copy,
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:is(:not(:hover), .sidebar-hover-locked) .nav-link-label,
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:is(:not(:hover), .sidebar-hover-locked) .sidebar-button-label { width: 0; opacity: 0; transform: translateX(-8px); pointer-events: none; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:is(:not(:hover), .sidebar-hover-locked) .brand { padding-right: 0; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:is(:not(:hover), .sidebar-hover-locked) .sidebar-toggle { top: 35px; right: -14px; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:is(:not(:hover), .sidebar-hover-locked) .nav-link { gap: 0; justify-content: flex-start; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:is(:not(:hover), .sidebar-hover-locked) .sidebar-logout .button { gap: 0; justify-content: center; }
    .dashboard-page .app-shell.sidebar-collapsed:not(.sidebar-hover-locked):has(> .sidebar:hover) { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
    .dashboard-page:not(.channel-page-overview):not(.admin-channel-overview) .app-shell.sidebar-collapsed:not(.sidebar-hover-locked):has(> .sidebar:hover) .main-content { position: static; left: auto; width: 100%; max-width: 1250px; }
}
.nav-link:hover, .nav-link.active { background: var(--surface-raised); color: var(--text); }
.nav-link.disabled { opacity: .45; pointer-events: none; }

.page-header, .panel-header { display: flex; justify-content: space-between; gap: 24px; }
.page-header { align-items: flex-start; margin-bottom: 32px; }
.panel-header { align-items: center; margin-bottom: 20px; }
.page-header h2, .message-card h2 { margin: 0; font-size: 34px; }
.panel-header h3 { margin: 0; font-size: 21px; }
.eyebrow {
    margin: 0 0 7px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.page-description { max-width: 650px; margin: 10px 0 0; color: var(--muted); line-height: 1.6; }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}
.button.primary { background: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { border-color: var(--border); background: var(--surface); color: var(--text); }
.button.secondary:hover { background: var(--surface-raised); }
.button.danger { border-color: rgba(239,83,80,.5); background: rgba(239,83,80,.12); color: #ff8784; }
.button.danger:hover { background: rgba(239,83,80,.22); color: #fff; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.text-link { color: var(--accent); font-size: 14px; font-weight: 700; }

.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; margin-bottom: 24px; }
.status-card, .panel, .message-card { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.status-card { padding: 22px; }
.panel { margin-bottom: 24px; padding: 24px; }
.card-label { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.status-row { display: flex; align-items: center; gap: 9px; font-size: 19px; }
.status-indicator { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; }
.status-indicator.online { background: var(--success); box-shadow: 0 0 14px rgba(53,196,106,.6); }
.status-indicator.offline { background: var(--danger); }
.card-detail { margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.metric { font-size: 34px; font-weight: 800; }

.channel-list { display: flex; flex-direction: column; }
.channel-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); }
.channel-row:first-child { border-top: 0; }
.channel-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 50%; background: var(--surface-raised); font-weight: 800; }
.channel-details { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.channel-details span, .channel-status { color: var(--muted); font-size: 12px; }
.channel-status { padding: 6px 9px; border: 1px solid var(--border); border-radius: 999px; }

.empty-state { padding: 54px 20px; border-top: 1px solid var(--border); text-align: center; }
.empty-state h4 { margin: 0; font-size: 20px; }
.empty-state p { margin: 10px 0 22px; color: var(--muted); }
.message-card { max-width: 620px; margin: 80px auto; padding: 48px; text-align: center; }
.message-card p { color: var(--muted); line-height: 1.6; }
.message-icon { display: grid; width: 52px; height: 52px; place-items: center; margin: 0 auto 22px; border-radius: 50%; background: var(--surface-raised); font-size: 24px; font-weight: 800; }
.success-card .message-icon { color: var(--success); }
.error-card .message-icon { color: var(--danger); }

.channel-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-bottom: 24px; }
.channel-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.channel-card { padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); }
.channel-card-header { display: flex; align-items: center; gap: 13px; }
.channel-profile-image, .channel-profile-placeholder { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; }
.channel-profile-image { object-fit: cover; }
.channel-profile-placeholder { display: grid; place-items: center; background: var(--surface); font-size: 18px; font-weight: 800; }
.channel-card-identity { min-width: 0; flex: 1; }
.channel-card-identity h4 { margin: 0; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.channel-card-identity p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.channel-state { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 700; }
.channel-state.live { border-color: rgba(53,196,106,.4); background: rgba(53,196,106,.1); color: var(--success); }
.channel-metadata { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 20px 0; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.channel-metadata div { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.channel-metadata span { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.channel-metadata strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.channel-card-actions { display: flex; justify-content: flex-end; gap: 9px; }
.admin-main-content { width: min(100%, 1440px); max-width: 1440px; }
.admin-runtime-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.admin-channel-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.admin-channel-card { min-height: 150px; }
.admin-channel-card .channel-card-actions { margin-top: auto; padding-top: 18px; }
.admin-channel-header { align-items: center; }
.admin-channel-header-side { display: flex; min-width: 0; flex-direction: column; align-items: flex-end; gap: 12px; }
.admin-channel-header-side .channel-page-controls { gap: 8px; }
.admin-channel-header-side .header-actions { gap: 8px; }
.admin-header-queue-size { font-size: 9px; }
.admin-channel-dashboard-layout { margin-bottom: 24px; }
.admin-channel-dashboard-layout .admin-twitch-channel-card { cursor: default; }
.admin-overview-raid-panel { margin-top: 0; }

.channel-heading { display: flex; align-items: center; gap: 18px; }
.channel-heading-image, .channel-heading-placeholder { width: 68px; height: 68px; flex: 0 0 68px; border-radius: 50%; }
.channel-heading-image { object-fit: cover; }
.channel-heading-placeholder { display: grid; place-items: center; background: var(--surface-raised); font-size: 24px; font-weight: 800; }
.channel-heading h2 { margin: 0; }
.dashboard-channel-heading { flex-direction: column; align-items: flex-start; gap: 10px; }
.dashboard-channel-heading > .eyebrow { margin-bottom: 0; padding-left: 12px; }
.dashboard-channel-identity { display: flex; align-items: center; gap: 12px; border-radius: 9px; outline: 4px solid transparent; transition: background .15s ease, box-shadow .15s ease; }
.dashboard-channel-identity:hover, .dashboard-channel-identity:focus-visible { outline: 0; background: rgba(139,92,246,.12); box-shadow: 0 0 0 4px rgba(139,92,246,.12); }
.dashboard-channel-identity .channel-heading-image, .dashboard-channel-identity .channel-heading-placeholder { width: 50px; height: 50px; flex-basis: 50px; }
.dashboard-channel-copy { display: flex; flex-direction: column; justify-content: center; }
.dashboard-channel-copy h2 { line-height: 1.05; }
.dashboard-channel-copy .page-description { margin-top: 1px; line-height: 1.15; }
.channel-heading-name { position: relative; display: inline-block; outline: 0; }
.channel-heading-name::after { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; visibility: hidden; background: var(--surface-raised); box-shadow: 0 8px 24px rgba(0,0,0,.35); color: var(--muted); content: "Twitch ID: " attr(data-user-id); font-size: 10px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s ease, visibility 0s linear .12s; }
.channel-heading-name:hover::after, .dashboard-channel-identity:focus-visible .channel-heading-name::after { visibility: visible; opacity: 1; transition-delay: 1s,1s; }
.dashboard-header-side { display: flex; min-width: 0; align-items: center; justify-content: flex-end; }
.dashboard-header-stats { display: flex; width: 100%; min-width: 0; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.dashboard-header-stat { display: inline-flex; min-height: 30px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 10px; cursor: pointer; }
.dashboard-header-stats > .dashboard-header-stat { flex: 1 0 auto; justify-content: center; }
.dashboard-header-stats > .dashboard-ad-sticky { display: none; }
.dashboard-header-stat strong { color: var(--text); font-size: 11px; }
.dashboard-header-stat:hover, .dashboard-header-stat:focus-visible { border-color: rgba(139,92,246,.72); background: var(--surface-raised); color: var(--text); }
.dashboard-header-stat.number-hidden { border-style: dashed; opacity: .72; }
.dashboard-points-stat { display: inline-flex; max-width: 65%; min-width: 0; min-height: 30px; align-items: center; gap: 6px; margin-left: auto; padding: 5px 9px; border: 0; border-radius: 7px; background: var(--surface-raised); color: var(--text); font-size: 13px; font-weight: 800; line-height: 1.3; cursor: default; }
.dashboard-points-stat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-points-stat strong { flex: 0 0 auto; color: var(--text); font-size: inherit; }
.dashboard-ad-stat.ad-idle { border-color: rgba(34,197,94,.38); background: rgba(34,197,94,.11); }
.dashboard-ad-stat.ad-scheduled { border-color: rgba(139,92,246,.3); background: rgba(139,92,246,.1); }
.dashboard-ad-stat.ad-running { border-color: rgba(139,92,246,.48); background: rgba(139,92,246,.16); }
.dashboard-ad-stat.ad-warning { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.15); animation: dashboard-ad-warning 1s ease-in-out 5; }
@keyframes dashboard-ad-warning {
    0%, 100% { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.15); box-shadow: none; }
    50% { border-color: rgba(239,68,68,.8); background: rgba(239,68,68,.28); box-shadow: 0 0 0 2px rgba(239,68,68,.08); }
}
@media (prefers-reduced-motion: reduce) { .dashboard-ad-stat.ad-warning { animation: none; } }
.dashboard-ad-stat { cursor: default; }
.dashboard-stream-stat.state-live strong { color: var(--success); }
.dashboard-stream-stat.state-offline strong { color: var(--muted); }
.dashboard-stream-stat.state-live .status-indicator { animation: dashboard-live-pulse 1.8s ease-in-out infinite; }
@keyframes dashboard-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(53,196,106,.45), 0 0 14px rgba(53,196,106,.6); }
    50% { box-shadow: 0 0 0 6px rgba(53,196,106,0), 0 0 14px rgba(53,196,106,.6); }
}
@media (prefers-reduced-motion: reduce) { .dashboard-stream-stat.state-live .status-indicator { animation: none; } }
.dashboard-ad-stat.state-running strong { color: #c7b7ff; }
.dashboard-ad-stat.state-scheduled strong { color: #c7b7ff; }
.dashboard-ad-stat.state-unavailable strong { color: var(--danger); }
.channel-dashboard-layout .panel-header h3 { color: #c7b7ff; }
.dashboard-video-header { --metadata-label-width: 88px; display: grid; min-width: 0; grid-template-columns: minmax(0,1fr); align-items: center; gap: 4px; }
.dashboard-video-header .twitch-channel-field { min-width: 0; grid-template-columns: var(--metadata-label-width) minmax(0,1fr); column-gap: 7px; }
.dashboard-video-header .twitch-channel-field > h3 { margin: 0; line-height: 1.2; text-align: right; white-space: nowrap; }
.dashboard-video-header .twitch-channel-field strong { box-sizing: border-box; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-video-header .twitch-channel-field strong:focus { overflow-x: auto; text-overflow: clip; }
.dashboard-video-header [data-channel-field].metadata-truncated:not(:focus):not(.editing) { position: relative; padding-right: 26px; }
.dashboard-video-header [data-channel-field].metadata-truncated:not(:focus):not(.editing)::after { position: absolute; top: 50%; right: 8px; margin-left: 0; transform: translateY(-50%) scaleX(-1); }
.twitch-channel-field { display: grid; min-width: 0; grid-template-columns: 56px minmax(0,1fr); align-items: center; column-gap: 14px; }
.twitch-channel-field > span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.twitch-channel-field strong { min-width: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: 7px; outline: 0; background: transparent; overflow-wrap: anywhere; cursor: pointer; }
.twitch-channel-field strong::after { display: inline-block; margin-left: 7px; color: var(--muted); content: "✎"; font-size: 1em; line-height: 1; opacity: .72; transform: translateY(-1px) scaleX(-1); }
.twitch-channel-field strong:focus::after, .twitch-channel-field strong.editing::after { display: none; }
.twitch-channel-field [data-channel-field="title"], .twitch-channel-field [data-channel-field="game"] { color: var(--text); font-size: 17px; font-weight: 700; line-height: 1.2; }
.twitch-channel-field strong:hover { color: #ddd6fe; }
.twitch-channel-field strong[data-has-draft="true"], .twitch-channel-field strong[data-has-draft="true"]:hover { color: #f5c451; }
.twitch-channel-field strong:focus, .twitch-channel-field strong.editing { border-color: var(--accent); background: var(--background); box-shadow: 0 0 0 3px rgba(139,92,246,.12); }
.dashboard-video-header .twitch-game-field { position: relative; }
.dashboard-video-header .twitch-game-field [data-channel-field="game"]:not(:focus):not(.editing) { padding-right: var(--metadata-status-padding, 8px); }
.dashboard-video-header .twitch-game-field [data-channel-field="game"].metadata-truncated:not(:focus):not(.editing) { padding-right: max(26px, var(--metadata-status-padding, 8px)); }
.dashboard-video-header .twitch-game-field [data-channel-field="game"].metadata-truncated:not(:focus):not(.editing)::after { right: var(--metadata-status-pencil-right, 8px); }
.twitch-game-suggestions { position: absolute; z-index: 25; top: calc(100% + 4px); right: 0; left: calc(var(--metadata-label-width) + 7px); max-height: 240px; overflow-y: auto; padding: 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-raised); box-shadow: 0 12px 30px rgba(0,0,0,.38); }
.twitch-game-suggestions[hidden] { display: none; }
.twitch-game-option { display: block; width: 100%; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.twitch-game-option:hover, .twitch-game-option.active { background: rgba(139,92,246,.18); }
.channel-metadata-status { position: absolute; z-index: 1; right: 0; bottom: 6px; max-width: min(60%,240px); min-height: 14px; margin: 0; padding-left: 8px; overflow: hidden; background: var(--surface); box-shadow: -6px 0 8px var(--surface); color: var(--muted); font-size: 10px; text-align: right; text-overflow: ellipsis; white-space: nowrap; opacity: .8; pointer-events: none; transition: opacity .45s ease; }
.twitch-game-field:focus-within .channel-metadata-status { opacity: 0; }
.channel-metadata-status.is-fading { opacity: 0; }
.channel-metadata-status.success { color: var(--success); }
.channel-metadata-status.warning { color: #f5c451; }
.channel-metadata-status.error { color: var(--danger); }
.channel-status-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.channel-detail-grid {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));align-items: start; gap: 24px; }
.channel-dashboard-grid { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,3fr) minmax(0,4fr); align-items: start; gap: 24px; }
.admin-viewer-queue-column, .admin-viewer-queue-column > .panel, .admin-activity-panel, .admin-readonly-chat-panel { min-width: 0; min-height: 540px; }
.admin-viewer-queue-column > .panel, .admin-activity-panel, .admin-readonly-chat-panel { display: flex; flex-direction: column; }
.admin-activity-panel > [data-admin-activity-panel]:not([hidden]) { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.admin-channel-dashboard-layout .activity-scroll, .admin-channel-dashboard-layout #viewer-queue-content { min-height: 0; max-height: 680px; overflow-y: auto; }
.admin-readonly-chat-description { margin-top: -4px; margin-bottom: 14px; }
.admin-readonly-chat-panel .dashboard-chat-feed { min-height: 430px; max-height: 680px; }
.channel-dashboard-layout { display: grid; grid-template-columns: minmax(600px,1.35fr) minmax(260px,.65fr) minmax(340px,.8fr); grid-template-rows: max-content minmax(540px,1fr); grid-template-areas: "player queue chat" "activities activities chat"; align-items: stretch; gap: 12px; margin-bottom: 16px; }
.channel-dashboard-layout > .channel-live-layout { display: contents; }
.channel-dashboard-layout > .dashboard-channel-profile[hidden] { display: none; }
.dashboard-carousel-deck, .dashboard-carousel-slide { display: contents; }
.dashboard-carousel-controls { display: none; }
.dashboard-activity-grid { display: grid; grid-area: activities; min-width: 0; min-height: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dashboard-video-card { position: relative; display: flex; grid-area: player; min-width: 0; align-self: start; flex-direction: column; }
.dashboard-video-card > .panel-header { margin-bottom: 10px; }
.dashboard-video-frame { width: 100%; min-width: 0; overflow: hidden; }
.dashboard-video-player { display: block; width: 100%; min-width: 0; max-width: 900px; height: auto; margin-inline: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #0f1115; }
.dashboard-video-unavailable { display: grid; min-width: 0; aspect-ratio: 16 / 9; place-items: center; margin: 0; border-radius: 8px; background: #0f1115; color: var(--muted); text-align: center; }
.dashboard-chat-column { display: flex; grid-area: chat; min-width: 0; min-height: 0; flex-direction: column; }
.dashboard-chat-column > .dashboard-header-side { flex: 0 0 auto; margin-bottom: 12px; }
.dashboard-chat-column > .live-chat-panel { grid-area: chat; min-height: 0; flex: 1 1 auto; }
.dashboard-activity-grid > .dashboard-activity-panel { min-width: 0; }
.admin-channel-dashboard-layout .admin-activity-panel { grid-area: activity; }
.admin-channel-dashboard-layout { grid-template-areas: "header header chat" "stream stream chat" "queue activity chat"; }
.admin-channel-dashboard-layout > .admin-channel-header { grid-area: header; min-width: 0; margin-bottom: 0; }
.admin-channel-dashboard-layout > .channel-status-grid { grid-area: stream; min-width: 0; grid-template-columns: minmax(0,1fr); margin-bottom: 0; }
.admin-channel-dashboard-layout .admin-readonly-chat-panel { grid-area: chat; }
.viewer-queue-column { grid-area: queue; }
.channel-dashboard-layout .viewer-queue-column { gap: 12px; }
.channel-dashboard-layout .panel { margin-bottom: 0; padding: 16px; }
.dashboard-activity-panel, .viewer-queue-column > [data-viewer-queue-panel] { min-height: 420px; }
.live-chat-panel, .dashboard-activity-panel, .viewer-queue-column > [data-viewer-queue-panel] { display: flex; min-width: 0; flex-direction: column; }
.dashboard-ads-panel { display: flex; flex: 0 0 auto; flex-direction: column; gap: 10px; }
.dashboard-ads-panel > .panel-header, .channel-page-overview .dashboard-ads-panel > .panel-header { flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.dashboard-ads-panel .dashboard-ad-stat { display: flex; min-height: 30px; align-items: center; margin-left: auto; padding: 5px 9px; border: 0; border-radius: 7px; background: var(--surface-raised); font-size: 13px; line-height: 1.3; white-space: nowrap; }
.dashboard-ads-panel .dashboard-ad-stat strong { color: var(--text); font-size: inherit; font-weight: 800; }
.dashboard-ad-progress { display: none; width: 20px; height: 20px; flex: 0 0 20px; margin-right: 6px; overflow: visible; fill: none; stroke-width: 2.5; }
.dashboard-ad-stat:is(.ad-running, .ad-complete) .dashboard-ad-progress { display: block; }
.dashboard-ad-progress-track { stroke: rgba(199,183,255,.3); }
.dashboard-ad-progress-ring { stroke: #c7b7ff; stroke-dasharray: 56.55; stroke-dashoffset: 0; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.dashboard-ad-stat.ad-ring-intro .dashboard-ad-progress-ring { animation: dashboard-ad-ring-fill .75s ease-out both; transition: none; }
@keyframes dashboard-ad-ring-fill { from { stroke-dashoffset: 56.55; } to { stroke-dashoffset: 0; } }
.dashboard-ad-stat.ad-ring-countdown .dashboard-ad-progress-ring { animation: dashboard-ad-ring-countdown var(--ad-ring-duration) linear forwards; }
@keyframes dashboard-ad-ring-countdown { from { stroke-dashoffset: var(--ad-ring-from); } to { stroke-dashoffset: 56.55; } }
.dashboard-ad-progress-check { stroke: #86efac; stroke-dasharray: 24; stroke-dashoffset: 24; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-ad-stat.ad-complete .dashboard-ad-progress-track, .dashboard-ad-stat.ad-complete .dashboard-ad-progress-ring { display: none; }
.dashboard-ad-stat.ad-complete .dashboard-ad-progress-check { animation: dashboard-ad-check .55s ease-out forwards; }
@keyframes dashboard-ad-check { to { stroke-dashoffset: 0; } }
.dashboard-ads-panel .dashboard-ad-stat.ad-idle { background: rgba(34,197,94,.14); }
.dashboard-ads-panel .dashboard-ad-stat.ad-idle strong { color: #86efac; }
.dashboard-ads-panel .dashboard-ad-stat.ad-scheduled { background: rgba(139,92,246,.12); }
.dashboard-ads-panel .dashboard-ad-stat.ad-scheduled strong { color: #c7b7ff; }
.dashboard-ads-panel .dashboard-ad-stat.ad-running { background: rgba(139,92,246,.2); }
.dashboard-ads-panel .dashboard-ad-stat.ad-running strong { color: #c7b7ff; }
.dashboard-ads-panel .dashboard-ad-stat.ad-complete { background: rgba(34,197,94,.2); }
.dashboard-ads-panel .dashboard-ad-stat.ad-complete strong { color: #86efac; }
.dashboard-ads-panel .dashboard-ad-stat.ad-warning { background: rgba(239,68,68,.2); }
.dashboard-ads-panel .dashboard-ad-stat.ad-warning strong { color: #fca5a5; }
.dashboard-ads-panel .dashboard-ad-stat.state-offline strong { color: var(--muted); }
.dashboard-ads-panel .dashboard-ad-stat.state-unavailable strong { color: #fca5a5; }
@media (prefers-reduced-motion: reduce) {
    .dashboard-ad-stat.ad-ring-intro .dashboard-ad-progress-ring { animation: none; }
    .dashboard-ad-stat.ad-ring-countdown .dashboard-ad-progress-ring { animation: none; }
    .dashboard-ad-stat.ad-complete .dashboard-ad-progress-check { animation: none; stroke-dashoffset: 0; }
}
.dashboard-ad-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.dashboard-ad-actions button { min-height: 34px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.dashboard-ad-actions button:hover:not(:disabled), .dashboard-ad-actions button:focus-visible:not(:disabled) { border-color: var(--accent); background: rgba(139,92,246,.12); }
.dashboard-ad-actions button:disabled { opacity: .45; cursor: not-allowed; }
.dashboard-ad-action-status { margin: 0; color: var(--muted); font-size: 10px; }
.dashboard-ad-action-status:empty { display: none; }
.dashboard-ad-action-status.success { color: var(--success); }
.dashboard-ad-action-status.error { color: var(--danger); }
.chat-platform-states { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.live-chat-feed { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-gutter: stable; }
.live-chat-feed-shell { position: relative; display: flex; min-height: 0; flex: 1; flex-direction: column; }
.activity-feed-shell { position: relative; display: flex; min-height: 0; flex: 1; flex-direction: column; }
.live-chat-feed-shell > .live-chat-feed { width: 100%; min-height: 0; flex: 1; }
.live-chat-pinned { position: relative; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; overflow: hidden; margin-bottom: 8px; padding: 9px 11px; border: 1px solid rgba(139,92,246,.58); border-radius: 9px; background: rgba(139,92,246,.12); }
.live-chat-pinned[hidden] { display: none; }
.live-chat-pinned-copy { min-width: 0; }
.live-chat-pinned-label { display: block; margin-bottom: 2px; color: #c7b7ff; font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.live-chat-pinned-name { margin-right: 6px; font-size: 10px; }
.live-chat-pinned-text { display: inline; margin: 0; color: var(--text); font-size: 10px; overflow-wrap: anywhere; }
.live-chat-pinned-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.live-chat-pin-duration { padding: 5px 20px 5px 7px; border: 1px solid rgba(167,139,250,.78); border-radius: 6px; background: transparent; color: #fff; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; color-scheme: dark; }
.live-chat-pin-duration option { background: color-mix(in srgb, var(--background) 88%, rgb(139,92,246) 12%); color: #fff; }
.live-chat-pinned-action { padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.live-chat-pinned-action:hover { background: rgba(139,92,246,.2); color: #fff; }
.live-chat-unpin { position: relative; font-size: 13px; line-height: 1; }
.live-chat-unpin::after { position: absolute; top: 50%; left: 50%; width: 16px; height: 2px; border-radius: 999px; background: currentColor; content: ""; transform: translate(-50%, -50%) rotate(45deg); }
.live-chat-pin-progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: #ef4444; transform: scaleX(var(--pin-progress, 1)); transform-origin: left center; animation: live-chat-pin-countdown var(--pin-remaining) linear forwards; transition: transform .3s linear, opacity .2s ease; pointer-events: none; will-change: transform; }
@keyframes live-chat-pin-countdown { from { transform: scaleX(var(--pin-progress, 1)); } to { transform: scaleX(0); } }
.live-chat-feed-shell > .dashboard-chat-feed { width: calc(100% + 8px); min-height: 560px; margin-right: -8px; padding-right: 8px; }
.dashboard-command-feed { min-height: 390px; max-height: 455px; }

@media (min-width: 901px) {
    /* Match channel Overview sizing in both sidebar states; keep Raid scrollable below. */
    .dashboard-page.admin-channel-overview .app-shell .admin-main-content,
    .dashboard-page.admin-channel-overview .app-shell.sidebar-collapsed .admin-main-content { position: static; left: auto; width: 100%; max-width: none; min-width: 0; margin: 0; padding: 24px 28px; }
    .admin-channel-overview .admin-channel-dashboard-layout { min-width: 0; height: max(620px, calc(100dvh - 180px)); grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.25fr); grid-template-rows: max-content max-content minmax(0,1fr); }
    .admin-channel-overview .admin-channel-header { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
    .admin-channel-overview .channel-heading,
    .admin-channel-overview .dashboard-channel-identity,
    .admin-channel-overview .dashboard-channel-copy { min-width: 0; }
    .admin-channel-overview .admin-channel-header-side .header-actions { flex-wrap: wrap; }
    .admin-channel-overview .admin-channel-header-side .channel-page-controls { max-width: 100%; flex-wrap: wrap; }
    .admin-channel-overview .admin-channel-header .page-description { overflow-wrap: anywhere; }
    .admin-channel-overview .admin-readonly-chat-panel,
    .admin-channel-overview .admin-activity-panel { overflow: hidden; }
    .admin-channel-overview .admin-readonly-chat-panel .dashboard-chat-feed,
    .admin-channel-overview .admin-activity-panel .dashboard-command-feed,
    .admin-channel-overview .admin-channel-dashboard-layout .activity-scroll,
    .admin-channel-overview .admin-channel-dashboard-layout #viewer-queue-content { min-height: 0; max-height: none; flex: 1; overflow-y: auto; }
    .admin-channel-overview .admin-activity-panel > [data-admin-activity-panel]:not([hidden]) { display: flex; min-height: 0; flex: 1; flex-direction: column; }
    .admin-channel-overview .channel-heading-image,
    .admin-channel-overview .channel-heading-placeholder { width: 50px; height: 50px; flex-basis: 50px; }
    .admin-channel-overview .page-header h2 { font-size: 28px; overflow-wrap: anywhere; }
    .admin-channel-overview .page-description { margin-top: 5px; line-height: 1.35; }
    .admin-channel-overview .status-card { min-width: 0; padding: 16px; }
    .admin-channel-overview .admin-viewer-queue-column,
    .admin-channel-overview .admin-viewer-queue-column > .panel,
    .admin-channel-overview .admin-activity-panel,
    .admin-channel-overview .admin-readonly-chat-panel { min-height: 0; }
    .admin-channel-overview .admin-viewer-queue-column > .panel { height: 100%; }
    .admin-channel-overview .panel-header { margin-bottom: 12px; }
}
@media (min-width: 769px) {
    .channel-page-overview { height: 100dvh; overflow: hidden; }
    .channel-page-overview .app-shell { height: 100dvh; min-height: 0; overflow: hidden; }
    .channel-page-overview .sidebar { height: 100dvh; min-height: 0; overflow: visible; }
    .channel-page-overview .streamer-main-content { display: flex; height: 100dvh; min-width: 0; max-width: none; min-height: 0; flex-direction: column; overflow: hidden; padding: 16px; }
    .channel-page-overview .page-header { align-items: center; margin-bottom: 0; }
    .channel-page-overview .channel-heading-image,
    .channel-page-overview .channel-heading-placeholder { width: 50px; height: 50px; flex-basis: 50px; }
    .channel-page-overview .page-header h2 { font-size: 28px; }
    .channel-page-overview .page-description { margin-top: 5px; line-height: 1.35; }
    .channel-page-overview .channel-dashboard-layout { min-width: 0; min-height: 0; flex: 1; grid-template-columns: minmax(0,1.35fr) minmax(0,.65fr) minmax(0,.8fr); grid-template-rows: minmax(0,3fr) minmax(0,2fr); grid-template-areas: "player queue chat" "activities activities chat"; margin-bottom: 0; overflow: hidden; }
    .channel-page-overview .dashboard-video-card { align-self: stretch; min-height: 0; overflow: hidden; }
    .channel-page-overview .dashboard-video-frame { display: flex; min-height: 0; flex: 1; align-items: center; justify-content: center; container-type: size; }
    .channel-page-overview .dashboard-video-player,
    .channel-page-overview .dashboard-video-unavailable { width: min(100%, calc(100cqh * 16 / 9)); max-width: none; flex: 0 0 auto; }
    .channel-page-overview .viewer-queue-column { min-width: 0; }
    .channel-page-overview .dashboard-chat-column { overflow-y: auto; }
    .channel-page-overview .status-card { min-width: 0; padding: 16px; }
    .channel-page-overview .card-label { margin-bottom: 10px; }
    .channel-page-overview .card-detail { margin-top: 8px; }
    .channel-page-overview .live-chat-panel,
    .channel-page-overview .dashboard-activity-grid,
    .channel-page-overview .dashboard-activity-panel,
    .channel-page-overview .viewer-queue-column,
    .channel-page-overview .viewer-queue-column > [data-viewer-queue-panel] { min-height: 0; overflow: hidden; }
    .channel-page-overview .panel-header { flex: 0 0 auto; margin-bottom: 12px; }
    .channel-page-overview .dashboard-chat-column { grid-row: 1 / -1; }
    .channel-page-overview .dashboard-chat-feed { min-height: 0; }
    .channel-page-overview .dashboard-chat-composer { flex: 0 0 auto; }
    .channel-page-overview .dashboard-activity-panel > [data-activity-panel]:not([hidden]) { display: flex; min-height: 0; flex: 1; flex-direction: column; }
    .channel-page-overview .dashboard-raid-tab #dashboard-raid { min-height: 0; flex: 1; margin: 0; padding: 0; overflow-y: auto; border: 0; background: transparent; }
    .channel-page-overview .activity-scroll,
    .channel-page-overview #viewer-queue-content,
    .channel-page-overview .dashboard-command-feed { min-height: 0; max-height: none; flex: 1; overflow-y: auto; }
}
@media (max-width: 1100px) {
    .channel-page-overview .dashboard-video-frame { flex: 0 0 auto; aspect-ratio: 16 / 9; container-type: normal; }
    .channel-page-overview .dashboard-video-player,
    .channel-page-overview .dashboard-video-unavailable { width: 100%; height: 100%; aspect-ratio: auto; }
}
@media (min-width: 1101px) and (max-width: 1600px) and (min-height: 781px) {
    .channel-page-overview .dashboard-header-stats > .dashboard-header-stat { min-width: 0; flex: 1 1 0; }
    .channel-page-overview .dashboard-header-stats > .dashboard-ad-sticky { display: flex; max-width: 0; min-width: 0; min-height: 30px; flex: 0 1 0; align-items: center; justify-content: center; overflow: hidden; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; opacity: 0; transform: translateX(12px); white-space: nowrap; pointer-events: none; transition: flex-grow .28s ease, max-width .28s ease, padding .28s ease, opacity .22s ease, transform .28s ease; }
    .channel-page-overview .dashboard-header-stats > .dashboard-ad-sticky.is-visible { max-width: 100%; flex-grow: 1; padding: 4px 9px; border: 1px solid var(--border); opacity: 1; transform: translateX(0); }
    .channel-page-overview .dashboard-ad-sticky strong { font-size: 11px; font-weight: 700; }
    .channel-page-overview .dashboard-ad-sticky.ad-scheduled { background: rgba(139,92,246,.12); }
    .channel-page-overview .dashboard-ad-sticky.ad-running { background: rgba(139,92,246,.2); }
    .channel-page-overview .dashboard-ad-sticky:is(.ad-scheduled, .ad-running) strong { color: #c7b7ff; }
    .channel-page-overview .dashboard-ad-sticky.ad-warning { background: rgba(239,68,68,.2); }
    .channel-page-overview .dashboard-ad-sticky.ad-warning strong { color: #fca5a5; }
    .channel-page-overview .dashboard-ad-sticky:is(.ad-idle, .ad-complete) { background: rgba(34,197,94,.14); }
    .channel-page-overview .dashboard-ad-sticky:is(.ad-idle, .ad-complete) strong { color: #86efac; }
    .channel-page-overview .dashboard-ad-sticky:is(.ad-neutral, .state-offline) strong { color: var(--muted); }
    .channel-page-overview .dashboard-ad-sticky:not(.is-visible) { background: transparent; box-shadow: none; }
}
@media (min-width: 769px) and (max-width: 1100px) {
    .channel-page-overview, .channel-page-overview .app-shell { height: auto; min-height: 100dvh; overflow: visible; }
    .channel-page-overview .sidebar { height: auto; min-height: 100dvh; }
    .channel-page-overview .streamer-main-content { height: auto; min-height: 100dvh; overflow: visible; padding-top: 16px; }
    .channel-page-overview .channel-dashboard-layout { height: calc(200dvh - var(--dashboard-stats-height, 36px) - 52px); min-height: 0; flex: none; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); grid-template-rows: max-content minmax(0,3fr) minmax(0,2fr) calc(100dvh - var(--dashboard-stats-height, 36px) - 32px); grid-template-areas: "stats stats" "player queue" "activities activities" "chat chat"; overflow: visible; }
    .channel-page-overview .dashboard-chat-column { display: contents; }
    .channel-page-overview .dashboard-chat-column > .dashboard-header-side { position: sticky; z-index: 20; top: 16px; display: flex; grid-area: stats; min-width: 0; margin-bottom: -6px; padding-bottom: 6px; isolation: isolate; background: var(--background); }
    .channel-page-overview .dashboard-chat-column > .dashboard-header-side::before { position: absolute; z-index: -1; top: -16px; right: -16px; bottom: -6px; left: -16px; background: var(--background); content: ""; pointer-events: none; }
    .channel-page-overview .dashboard-video-frame { min-height: 0; flex: 1 1 auto; aspect-ratio: auto; container-type: size; }
    .channel-page-overview .dashboard-video-player,
    .channel-page-overview .dashboard-video-unavailable { width: min(100%, calc(100cqh * 16 / 9)); height: auto; aspect-ratio: 16 / 9; }
    .channel-page-overview .live-chat-panel { height: 100%; min-height: 0; overflow: hidden; }
    .channel-page-overview .dashboard-activity-grid { height: 100%; min-height: 0; overflow: hidden; }
    .channel-page-overview .dashboard-activity-panel,
    .channel-page-overview .viewer-queue-column { height: 100%; min-height: 0; overflow: hidden; }
    .channel-page-overview .dashboard-ads-panel { min-height: 0; flex: 0 1 auto; overflow-y: auto; }
    .channel-page-overview .viewer-queue-column > [data-viewer-queue-panel] { height: auto; min-height: 0; flex: 1 1 0; overflow-y: auto; }
    .channel-page-overview .viewer-queue-column { max-height: none; }
    .channel-page-overview #viewer-queue-content { max-height: none; flex: 1 1 auto; overflow-y: auto; }
}
@media (max-width: 600px) {
    .dashboard-video-header { --metadata-label-width: 100px; }
    .dashboard-activity-grid { grid-template-columns: minmax(0,1fr); }
}
.live-chat-message { --chat-edge-color: #9147ff; position: relative; display: flex; flex: 0 0 auto; align-items: flex-start; gap: 9px; overflow: hidden; padding: 10px; border-left: 3px solid var(--chat-edge-color); border-radius: 9px; background: var(--surface-raised); }
.live-chat-message-actions { position: absolute; z-index: 3; right: 7px; bottom: 5px; display: flex; gap: 2px; opacity: 0; pointer-events: none; transition: opacity .14s ease; }
.live-chat-message:hover .live-chat-message-actions, .live-chat-message:focus-within .live-chat-message-actions { opacity: 1; pointer-events: auto; }
.live-chat-message-action { display: grid; width: 25px; height: 25px; padding: 0; place-items: center; border: 0; border-radius: 6px; background: rgba(15,17,21,.86); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.live-chat-message-action:hover, .live-chat-message-action:focus-visible { background: rgba(139,92,246,.3); color: #fff; }
.live-chat-message-action.delete { color: #ff8784; }
@media (hover: none) { .live-chat-message-actions { opacity: 1; pointer-events: auto; } }
.live-chat-message::after { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 52px; background: linear-gradient(to left, rgb(49 201 107 / .24), transparent); content: ""; opacity: 0; pointer-events: none; }
.live-chat-message.accent-first-time::after { opacity: 1; }
.live-chat-message.accent-broadcaster { background: linear-gradient(rgb(239 68 68 / .12), rgb(239 68 68 / .12)), var(--surface-raised); }
.live-chat-message.accent-staff { background: linear-gradient(rgb(168 85 247 / .12), rgb(168 85 247 / .12)), var(--surface-raised); }
.live-chat-message.accent-moderator { background: linear-gradient(rgb(34 197 94 / .12), rgb(34 197 94 / .12)), var(--surface-raised); }
.live-chat-message.accent-vip { background: linear-gradient(rgb(236 72 153 / .12), rgb(236 72 153 / .12)), var(--surface-raised); }
.live-chat-message.accent-artist { background: linear-gradient(rgb(56 189 248 / .12), rgb(56 189 248 / .12)), var(--surface-raised); }
.live-chat-message.accent-subscriber { background: linear-gradient(rgb(234 179 8 / .12), rgb(234 179 8 / .12)), var(--surface-raised); }
.live-chat-message.is-deleted { filter: grayscale(1); opacity: .48; }
.live-chat-message.is-deleted .live-chat-name, .live-chat-message.is-deleted .live-chat-text { color: var(--muted) !important; text-decoration: line-through; }
.live-chat-message.is-bot:not(.is-deleted) .live-chat-message-content { filter: grayscale(.55); opacity: .72; }
.live-chat-message.platform-youtube { --chat-edge-color: #ff3b3b; }
.live-chat-message.is-mentioned { border: 1px solid rgba(255,255,255,.92); box-shadow: inset 3px 0 0 var(--chat-edge-color); }
.live-chat-avatar { display: none; }
.live-chat-message-content { position: relative; z-index: 1; display: flex; min-width: 0; flex: 1; flex-wrap: wrap; align-items: center; gap: 3px 6px; padding-right: 85px; }
.live-chat-message-heading { display: flex; max-width: 100%; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 11px; }
.live-chat-platform, .live-chat-badge { padding: 2px 5px; border-radius: 4px; background: #6034a5; color: #fff; font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.live-chat-platform.youtube { background: #c51f2d; }
.live-chat-badge { background: #3a4355; }
.live-chat-badge-image { width: auto; height: 16px; object-fit: contain; }
.live-chat-time { position: absolute; top: 1px; right: 0; color: var(--muted); font-size: 9px; }
.live-chat-text { max-width: 100%; flex: 0 0 auto; margin: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.live-chat-emote { width: auto; height: 1.75em; max-width: 8em; margin: -.2em .08em; vertical-align: middle; object-fit: contain; }
.kind-command .live-chat-text { color: #d8bcff; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.live-chat-empty { display: grid; min-height: 170px; flex: 1; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.live-chat-jump { --jump-fill: rgba(32,36,44,.96); position: absolute; z-index: 5; right: 50%; bottom: 10px; isolation: isolate; overflow: hidden; padding: 7px 11px; transform: translateX(50%); border: 2px solid rgba(139,92,246,.7); border-radius: 999px; background: var(--jump-fill); box-shadow: 0 7px 20px rgba(0,0,0,.35); color: #ddd6fe; font-size: 10px; font-weight: 800; white-space: nowrap; cursor: pointer; backdrop-filter: blur(8px); }
.live-chat-jump.has-unseen { animation: live-chat-jump-alert 3s ease-in-out infinite; }
.live-chat-jump:hover, .live-chat-jump:focus-visible { --jump-fill: #312653; border-color: #a78bfa; color: #fff; }
.live-chat-jump[hidden] { display: none; }
@keyframes live-chat-jump-alert {
    0% { background-color: var(--jump-fill); }
    33.333% { background-color: rgba(255,59,59,.75); }
    66.666%, 100% { background-color: var(--jump-fill); }
}
.dashboard-chat-composer { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.chat-reply-context { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border-left: 3px solid var(--accent); border-radius: 7px; background: rgba(139,92,246,.12); color: var(--muted); font-size: 10px; }
.chat-reply-context[hidden] { display: none; }
.chat-reply-context > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-reply-context strong { margin-right: 5px; color: #c7b7ff; }
.chat-reply-context span { opacity: .9; }
.chat-reply-context button { display: grid; width: 24px; height: 24px; flex: 0 0 auto; padding: 0; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.chat-reply-context button:hover, .chat-reply-context button:focus-visible { background: rgba(139,92,246,.22); color: #fff; }
.chat-message-entry { position: relative; }
.dashboard-chat-composer textarea { width: 100%; height: 66px; padding: 10px 50px 24px 12px; border: 1px solid var(--border); border-radius: 9px; outline: 0; resize: none; background: var(--background); color: var(--text); font: inherit; line-height: 1.4; }
.dashboard-chat-composer textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.14); }
.dashboard-chat-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-emote-toggle { position: absolute; z-index: 2; top: 9px; right: 9px; display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 0; border-radius: 50%; outline: 0; background: transparent; color: var(--muted); font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.chat-emote-toggle span { display: block; transform: translateY(-4px); pointer-events: none; }
.chat-emote-toggle:hover, .chat-emote-toggle:focus-visible, .chat-emote-toggle[aria-expanded="true"] { background: rgba(139,92,246,.18); color: var(--text); }
.chat-emote-toggle:disabled { cursor: not-allowed; opacity: .4; }
.chat-emote-picker, .chat-emote-suggestions { position: absolute; z-index: 20; right: 0; bottom: calc(100% + 7px); width: min(460px,100%); border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.chat-emote-suggestions { left: 0; width: 100%; }
.chat-emote-picker[hidden], .chat-emote-suggestions[hidden] { display: none; }
.chat-emote-picker { display: flex; flex-direction: column; max-height: min(70vh,540px); overflow: hidden; }
.chat-emote-picker-header { display: grid; flex-shrink: 0; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 10px; border-bottom: 1px solid var(--border); }
.chat-emote-picker-header input { min-width: 0; flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; outline: 0; background: var(--background); color: var(--text); font: inherit; }
.chat-emote-picker-header input:focus { border-color: var(--accent); }
.chat-emote-picker-header span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.chat-emote-picker-body { display: grid; grid-template-columns: minmax(0,1fr) 58px; height: min(45vh,380px); min-height: 0; }
.chat-emote-grid { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 8px; }
.chat-emote-section + .chat-emote-section { margin-top: 10px; border-top: 1px solid var(--border); }
.chat-emote-section h4 { margin: 0; padding: 8px 4px; color: var(--muted); font-size: 11px; }
.chat-emote-section-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(64px,1fr)); gap: 4px; }
.chat-emote-rail { display: flex; min-height: 0; min-width: 0; flex-direction: column; border-left: 1px solid var(--border); }
.chat-emote-channel-list { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 4px; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.chat-emote-section-button { flex-shrink: 0; width: 100%; padding: 9px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.chat-emote-section-button { display: grid; min-height: 40px; place-items: center; padding: 5px; }
.chat-emote-section-button img { display: block; width: 28px; height: 28px; object-fit: contain; border-radius: 5px; }
.chat-emote-section-button:hover, .chat-emote-section-button:focus-visible, .chat-emote-section-button[aria-pressed="true"] { border-color: var(--accent); background: rgba(139,92,246,.18); color: var(--text); }
.chat-emote-seventv { width: auto; margin: 6px; text-align: center; font-weight: 800; }
.chat-emote-option { display: flex; min-width: 0; height: 68px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 5px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.chat-emote-option:hover, .chat-emote-option:focus-visible { border-color: rgba(139,92,246,.65); background: rgba(139,92,246,.14); color: var(--text); }
.chat-emote-option img { width: auto; max-width: 42px; height: 34px; object-fit: contain; }
.chat-emote-option span { width: 100%; overflow: hidden; font-size: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.chat-emote-picker-note { flex-shrink: 0; margin: 0; padding: 8px 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: 9px; line-height: 1.35; }
.chat-emote-picker-note a { color: #c7b7ff; font-weight: 800; }
.chat-emote-picker-note.requires-reconnect { background: rgba(245,196,81,.1); color: #f5d98b; font-size: 10px; }
.chat-emote-picker-note.requires-reconnect a { display: inline-block; margin-left: 2px; color: #fff0bd; text-decoration: underline; text-underline-offset: 2px; }
.chat-emote-suggestions { display: flex; max-height: min(45vh,360px); flex-direction: column; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 5px; }
.chat-emote-suggestion { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.chat-emote-suggestion.active, .chat-emote-suggestion:hover { background: rgba(139,92,246,.18); }
.chat-emote-suggestion img { width: 28px; height: 28px; object-fit: contain; }
.chat-completion-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: rgba(139,92,246,.18); color: #d8bcff; font-size: 16px; font-weight: 900; }
.chat-emote-suggestion span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-emote-suggestion small { max-width: 120px; overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.chat-target-selector { display: flex; gap: 5px; }
.chat-target { min-height: 34px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; font-weight: 800; cursor: pointer; }
.chat-target.active { border-color: rgba(139,92,246,.65); background: rgba(139,92,246,.16); color: #d8bcff; }
.chat-target:disabled { cursor: not-allowed; opacity: .38; }
.chat-send-button { min-height: 36px; }
.chat-send-status { position: absolute; z-index: 2; right: 15px; bottom: 11px; max-width: calc(100% - 30px); min-height: 14px; margin: 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; text-align: right; text-overflow: ellipsis; white-space: nowrap; opacity: .8; pointer-events: none; transition: opacity .45s ease; }
.chat-send-status.is-fading { opacity: 0; }
.chat-send-status.success { color: var(--success); }
.chat-send-status.warning { color: #f5c451; }
.chat-send-status.error { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.activity-tabs { margin-bottom: 12px; }
.activity-subheading { margin: 0; }
.dashboard-command-feed { min-height: 350px; }
.redemption-panel-grid { display: contents; }
.channel-dashboard-side { display: flex; min-width: 0; flex-direction: column; gap: 24px; }
.viewer-queue-column > [data-viewer-queue-panel] { flex: 1; }
.activity-panel { min-width: 0; padding: 20px; }
.activity-panel .panel-header { gap: 10px; }
.activity-scroll { max-height: 430px; overflow-y: auto; scrollbar-gutter: stable; }
#viewer-queue-content { width: calc(100% + 8px); max-height: 430px; margin-right: -8px; padding-right: 8px; overflow-y: auto; scrollbar-gutter: stable; }
.activity-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.activity-list-item { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 13px 0; border-top: 1px solid var(--border); }
.activity-list-item:first-child { border-top: 0; }
.activity-main { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 4px; }
.activity-main strong { overflow-wrap: anywhere; font-size: 13px; }
.activity-main span { color: var(--muted); font-size: 11px; }
.activity-main p { margin: 5px 0 0; color: var(--text); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.activity-badge { flex: 0 0 auto; padding: 4px 7px; border: 1px solid rgba(139,92,246,.35); border-radius: 999px; background: rgba(139,92,246,.1); color: var(--accent); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.activity-badge.first { border-color: rgba(245,196,81,.4); background: rgba(245,196,81,.1); color: #f5c451; }
.activity-badge.second { border-color: rgba(126,185,255,.4); background: rgba(126,185,255,.1); color: #7eb9ff; }
.redemption-activity-item { display: block; }
.social-link-list { display: flex; flex-direction: column; }
.social-link-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 0; border-top: 1px solid var(--border); }
.social-link-row:first-child { border-top: 0; }
.social-link-row p { max-width: 420px; margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.panel-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.5; }
.raid-monitor-panel { margin-bottom: 24px; }
.raid-monitor-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.raid-monitor-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.raid-hp-track { height: 11px; margin: 16px 0 20px; }
.raid-hp-track span { background: var(--success); }
.raid-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.raid-metric-grid article { display: flex; min-width: 0; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.raid-metric-grid span { color: var(--muted); font-size: 11px; }
.raid-metric-grid strong { font-size: 18px; }

.public-command-page { min-height: 100vh; background: radial-gradient(circle at top, rgba(139,92,246,.12), transparent 38%), var(--background); }
.public-command-navigation { display: flex; width: min(1120px, calc(100% - 40px)); align-items: center; justify-content: space-between; gap: 24px; margin: 0 auto; padding: 24px 0; }
.public-command-navigation .landing-brand { flex: 0 0 auto; margin: 0; }
.public-command-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 72px; }
.public-command-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 20px; margin-bottom: 30px; }
.public-command-hero img, .public-command-avatar { width: 76px; height: 76px; border-radius: 50%; }
.public-command-hero img { object-fit: cover; }
.public-command-avatar { display: grid; place-items: center; background: var(--surface-raised); font-size: 28px; font-weight: 800; }
.public-command-hero h1 { margin: 0; font-size: 38px; }
.public-command-hero p:last-child { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.public-raid-panel { border-color: rgba(53,196,106,.35); }
.public-raid-panel .panel-header h2 { margin: 0; }
.public-raid-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.public-raid-stats article { display: flex; flex-direction: column; gap: 5px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.public-raid-stats span { color: var(--muted); font-size: 11px; }
.public-raid-stats strong { font-size: 18px; }

.public-raid-contributors { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.public-raid-contributors-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.public-raid-contributors-header h3 { margin: 0; font-size: 17px; }
.public-raid-contributors-header span { color: var(--muted); font-size: 12px; }
.public-raid-contributors ol { display: flex; flex-direction: column; margin: 14px 0 0; padding: 0; list-style: none; }
.public-raid-contributors li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid var(--border); }
.public-raid-contributors li span { display: flex; align-items: center; gap: 12px; min-width: 0; }
.public-raid-contributors li span strong { width: 32px; color: var(--accent); }
.public-raid-contributors li b { white-space: nowrap; }
.public-raid-contributors-empty { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.public-raid-contributors-more { margin-top: 12px; }
.public-raid-is-hidden { display: none; }
.public-raid-contributors-more summary { width: fit-content; padding: 10px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 800; list-style: none; }
.public-raid-contributors-more summary::-webkit-details-marker { display: none; }
.public-raid-contributors-more summary:hover { border-color: var(--accent); }
.public-raid-contributors-more[open] summary { margin-bottom: 4px; color: var(--accent); }
.public-raid-contributors-more ol { margin-top: 0; }

.public-command-groups { display: flex; flex-direction: column; gap: 14px; }
.public-command-group { margin: 0; padding: 0; overflow: hidden; }
.public-command-group-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; cursor: pointer; list-style: none; }
.public-command-group-summary::-webkit-details-marker { display: none; }
.public-command-group-copy { display: flex; min-width: 0; flex-direction: column; }
.public-command-group-copy .eyebrow { margin: 0; }
.public-command-group-title { margin-top: 3px; color: var(--text); font-size: 22px; font-weight: 800; line-height: 1.2; }
.public-command-group-description { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.public-command-chevron { color: var(--muted); font-size: 24px; line-height: 1; transition: transform .2s ease; }
.public-command-group[open] .public-command-chevron { transform: rotate(180deg); }
.public-command-list { display: flex; flex-direction: column; padding: 0 24px 10px; border-top: 1px solid var(--border); }
.public-command-row { display: grid; grid-template-columns: minmax(150px,auto) minmax(0,1fr); gap: 18px; padding: 15px 0; border-top: 1px solid var(--border); }
.public-command-row code { align-self: start; color: #c4b5fd; font-weight: 700; overflow-wrap: anywhere; }
.public-command-row p { margin: 0; font-size: 13px; line-height: 1.5; }
.public-command-row span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }

.queue-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.queue-list li { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-top: 1px solid var(--border); }
.queue-position { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--surface-raised); color: var(--muted); font-size: 12px; font-weight: 800; }
.compact-empty-state { padding: 38px 15px; border-top: 1px solid var(--border); text-align: center; }
.compact-empty-state h4 { margin: 0; }
.compact-empty-state p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }

.settings-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 13px; font-weight: 700; }
.form-group input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--border); border-radius: 9px; outline: none; background: var(--background); color: var(--text); }
.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.14); }
.form-help { color: var(--muted); font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; }

.alert { margin-bottom: 24px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; font-weight: 600; }
.success-alert { border-color: rgba(53,196,106,.35); background: rgba(53,196,106,.08); color: var(--success); }
.error-alert { border-color: rgba(239,83,80,.35); background: rgba(239,83,80,.08); color: var(--danger); }

body.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: var(--background);
    color: var(--text);
}
.login-card {
    width: 100%;
    max-width: 440px;
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.login-brand { justify-content: center; margin-bottom: 32px; }
.login-card .eyebrow, .login-card h2, .login-card .page-description { text-align: center; }
.login-card h2 { margin: 0; font-size: 30px; }
.login-card .page-description { margin: 10px auto 0; }
.login-card .settings-form { margin-top: 24px; }
.login-card .button { width: 100%; }

.sidebar-logout { margin-top: 30px; }
.sidebar-logout .button {
    width: 100%;
    border-color: rgba(239,83,80,.55);
    background: rgba(239,83,80,.16);
    color: #ff8784;
}
.sidebar-logout .button:hover { border-color: rgba(239,83,80,.85); background: rgba(239,83,80,.27); color: #fff; }
.deployment-stamp { margin: 16px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.login-deployment-stamp { position: fixed; right: 18px; bottom: 14px; margin: 0; }

.performance-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.metric-card { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.metric-compact { font-size: 25px; }
.progress-track { height: 7px; margin-top: 17px; overflow: hidden; border-radius: 999px; background: var(--surface-raised); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .35s ease; }
.live-status { display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 800; }
.live-status.connected { border-color: rgba(53,196,106,.4); background: rgba(53,196,106,.1); color: var(--success); }
.runtime-log-panel { padding: 0; overflow: hidden; }
.runtime-log-viewer { height: 70vh; overflow: auto; padding: 18px; background: #0b0d11; font-family: "Cascadia Code","Consolas",monospace; font-size: 12px; line-height: 1.55; }
.runtime-log-entry { display: grid; grid-template-columns: 90px 72px minmax(0,1fr); gap: 10px; padding: 3px 0; }
.runtime-log-time { color: #7f8a9a; }
.runtime-log-level { color: #8fb8ff; font-weight: 800; }
.runtime-log-message { min-width: 0; color: #d8dee9; white-space: pre-wrap; overflow-wrap: anywhere; }
.runtime-log-entry.level-warning .runtime-log-level { color: #f5c451; }
.runtime-log-entry.level-error .runtime-log-level, .runtime-log-entry.level-critical .runtime-log-level { color: #ff7773; }

body.landing-page {
    --landing-width: 1180px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 78% 8%, rgba(139,92,246,.18), transparent 30rem),
        radial-gradient(circle at 8% 32%, rgba(85,45,160,.12), transparent 25rem),
        var(--background);
}
.landing-navigation, .landing-hero, .landing-section, .landing-cta, .landing-support, .landing-contact, .landing-footer { width: min(var(--landing-width), calc(100% - 48px)); margin-right: auto; margin-left: auto; }
.landing-navigation { display: flex; min-height: 88px; align-items: center; justify-content: space-between; gap: 30px; }
.landing-brand { display: inline-flex; align-items: center; gap: 12px; }
.landing-brand img { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; }
.landing-brand span { display: flex; flex-direction: column; gap: 3px; }
.landing-brand strong { font-size: 17px; }
.landing-brand small { color: var(--muted); font-size: 11px; }
.landing-navigation nav { display: flex; align-items: center; gap: 28px; }
.landing-navigation nav > a:not(.button) { color: var(--muted); font-size: 13px; font-weight: 700; }
.landing-navigation nav > a:not(.button):hover { color: var(--text); }
.landing-hero { display: grid; min-height: 690px; grid-template-columns: minmax(0,1.02fr) minmax(420px,.98fr); align-items: center; gap: 70px; padding: 70px 0 100px; }
.hero-copy h1 { max-width: 720px; margin: 0; font-size: clamp(44px,5.3vw,72px); line-height: 1.02; letter-spacing: -.045em; }
.hero-description { max-width: 650px; margin: 26px 0 0; color: #b8bfcc; font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.landing-primary-action { min-height: 48px; padding: 0 22px; box-shadow: 0 12px 34px rgba(124,58,237,.28); }
.hero-note { max-width: 590px; margin: 18px 0 0; color: #788293; font-size: 12px; line-height: 1.6; }
.hero-preview { position: relative; }
.hero-preview::before { position: absolute; z-index: -1; inset: 8% -12% -8% 8%; border-radius: 50%; background: rgba(139,92,246,.16); content: ""; filter: blur(70px); }
.preview-window { overflow: hidden; border: 1px solid rgba(139,92,246,.28); border-radius: 22px; background: rgba(24,27,33,.92); box-shadow: 0 35px 90px rgba(0,0,0,.48); backdrop-filter: blur(18px); }
.preview-toolbar { display: flex; align-items: center; gap: 7px; padding: 15px 18px; border-bottom: 1px solid var(--border); background: rgba(15,17,21,.75); }
.preview-toolbar span { width: 8px; height: 8px; border-radius: 50%; background: #49505d; }
.preview-toolbar span:first-child { background: #ef5350; }
.preview-toolbar span:nth-child(2) { background: #f5c451; }
.preview-toolbar span:nth-child(3) { background: var(--success); }
.preview-toolbar p { margin: 0 0 0 9px; color: var(--muted); font-size: 11px; }
.preview-dashboard { padding: 20px; }
.preview-dashboard-header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.preview-dashboard-identity { display: flex; min-width: 0; align-items: center; gap: 9px; }
.preview-dashboard-identity img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; }
.preview-dashboard-identity div { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.preview-dashboard-identity small { color: var(--accent); font-size: 7px; font-weight: 900; letter-spacing: .13em; }
.preview-dashboard-identity strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.preview-dashboard-identity p { margin: 0; color: var(--muted); font-size: 8px; }
.preview-dashboard-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.preview-dashboard-stats > span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 6px; white-space: nowrap; }
.preview-dashboard-stats strong { color: var(--text); font-size: 7px; }
.preview-dot { width: 6px; height: 6px; border-radius: 50%; }
.preview-dot.online, .preview-dot.success { background: var(--success); }
.preview-dot.accent { background: var(--accent); }
.preview-dashboard-grid { display: grid; min-height: 300px; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr); grid-template-rows: auto minmax(0,1fr); grid-template-areas: "stream stream chat" "queue activity chat"; gap: 7px; }
.preview-dashboard-card { min-width: 0; padding: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); }
.preview-dashboard-card h3 { margin: 0; color: #c7b7ff; font-size: 9px; }
.preview-stream-card { grid-area: stream; }
.preview-stream-card > p { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 5px; margin: 9px 0 0; font-size: 7px; }
.preview-stream-card > p span { color: var(--muted); font-size: 6px; font-weight: 800; text-transform: uppercase; }
.preview-stream-card > p strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-chat-card { display: flex; grid-area: chat; flex-direction: column; gap: 6px; }
.preview-chat-card header, .preview-queue-card header { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.preview-chat-card header div { display: flex; gap: 3px; }
.preview-chat-card header span, .preview-queue-card header > span { padding: 2px 4px; border: 1px solid rgba(53,196,106,.38); border-radius: 999px; color: var(--success); font-size: 5px; font-weight: 800; }
.preview-chat-message { padding: 7px; border-left: 2px solid #9147ff; border-radius: 6px; background: rgba(15,17,21,.72); }
.preview-chat-message.youtube { border-left-color: #ff3b3b; }
.preview-chat-message strong { display: block; font-size: 6px; }
.preview-chat-message p { margin: 3px 0 0; font-size: 7px; line-height: 1.35; }
.preview-chat-compose { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: auto; padding: 6px; border: 1px solid var(--border); border-radius: 6px; background: rgba(15,17,21,.75); }
.preview-chat-compose span { overflow: hidden; color: var(--muted); font-size: 5px; text-overflow: ellipsis; white-space: nowrap; }
.preview-chat-compose strong { padding: 3px 5px; border-radius: 4px; background: var(--accent); color: #fff; font-size: 5px; }
.preview-queue-card { grid-area: queue; }
.preview-queue-card ol { display: grid; gap: 5px; margin: 9px 0 0; padding: 0; list-style: none; }
.preview-queue-card li { display: flex; align-items: center; gap: 5px; font-size: 7px; }
.preview-queue-card li span { display: grid; width: 14px; height: 14px; place-items: center; border-radius: 4px; background: rgba(139,92,246,.15); color: #c7b7ff; font-size: 6px; font-weight: 800; }
.preview-activity-card { grid-area: activity; }
.preview-activity-tabs { display: flex; gap: 6px; margin-top: 9px; padding-bottom: 5px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 5px; }
.preview-activity-tabs strong { color: #c7b7ff; }
.preview-activity-card > p { display: flex; flex-direction: column; gap: 2px; margin: 9px 0 0; font-size: 7px; }
.preview-activity-card > p span { color: var(--muted); font-size: 5px; }
.landing-section { padding: 100px 0; }
.landing-section-heading { max-width: 720px; margin-bottom: 42px; }
.landing-section-heading h2, .landing-cta h2 { margin: 0; font-size: clamp(32px,4vw,48px); line-height: 1.12; letter-spacing: -.035em; }
.landing-section-heading > p:last-child, .landing-cta div > p:last-child { max-width: 650px; margin: 17px 0 0; color: var(--muted); line-height: 1.7; }
.landing-whats-new { padding-top: 34px; }
.whats-new-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.whats-new-card { min-height: 290px; padding: 27px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg,rgba(32,36,44,.92),rgba(24,27,33,.84)); }
.whats-new-card:first-child { border-color: rgba(139,92,246,.5); background: linear-gradient(145deg,rgba(139,92,246,.17),rgba(24,27,33,.92)); }
.whats-new-version { display: inline-flex; padding: 5px 9px; border: 1px solid rgba(139,92,246,.4); border-radius: 999px; background: rgba(139,92,246,.11); color: #d3c7ff; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.whats-new-card h3 { margin: 24px 0 11px; font-size: 21px; line-height: 1.25; }
.whats-new-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.whats-new-card ul { display: grid; gap: 9px; margin: 23px 0 0; padding: 0; list-style: none; }
.whats-new-card li { display: flex; gap: 9px; color: #c2c9d5; font-size: 12px; line-height: 1.5; }
.whats-new-card li::before { color: var(--accent); content: "✦"; }
.whats-new-history-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; color: #c7b7ff; font-size: 13px; font-weight: 800; }
.whats-new-history-link:hover { color: #fff; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.landing-feature-card { min-height: 250px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg, rgba(32,36,44,.92), rgba(24,27,33,.84)); transition: transform .2s ease, border-color .2s ease; }
.landing-feature-card:hover { border-color: rgba(139,92,246,.45); transform: translateY(-3px); }
.landing-feature-card[open] { border-color: rgba(139,92,246,.45); }
.landing-feature-card summary { position: relative; display: flex; min-height: 248px; cursor: pointer; flex-direction: column; padding: 26px 58px 26px 26px; list-style: none; }
.landing-feature-card summary::-webkit-details-marker { display: none; }
.landing-feature-card summary:focus-visible { border-radius: 16px; outline: 2px solid var(--accent); outline-offset: 3px; }
.feature-number { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.feature-heading { margin-top: auto; }
.landing-feature-card h3 { margin: 55px 0 12px; font-size: 20px; }
.landing-feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.feature-toggle { position: absolute; top: 25px; right: 26px; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; }
.feature-toggle::before, .feature-toggle::after { position: absolute; top: 50%; left: 50%; width: 10px; height: 1px; background: #c7b7ff; content: ""; transform: translate(-50%,-50%); }
.feature-toggle::after { transform: translate(-50%,-50%) rotate(90deg); transition: transform .2s ease; }
.landing-feature-card[open] .feature-toggle::after { transform: translate(-50%,-50%) rotate(0); }
.feature-command-panel { padding: 0 26px 26px; border-top: 1px solid var(--border); }
.landing-feature-card .feature-command-label { margin: 22px 0 10px; color: var(--text); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.feature-command-list { display: flex; flex-wrap: wrap; gap: 7px; }
.feature-command-list code, .feature-command-note code { padding: 5px 8px; border: 1px solid rgba(139,92,246,.28); border-radius: 7px; background: rgba(139,92,246,.1); color: #d3c7ff; font-size: 11px; line-height: 1.35; }
.landing-feature-card .feature-command-note { margin-top: 15px; font-size: 12px; }
.feature-availability-note { max-width: 760px; margin: 20px 0 0; color: #788293; font-size: 12px; line-height: 1.6; }
.enrollment-notice { padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; background: rgba(139,92,246,.08); }
.enrollment-notice strong { color: #c7b7ff; }
.landing-process { border-top: 1px solid rgba(48,54,65,.75); }
.landing-step-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 30px; }
.landing-step-grid article { padding: 5px 24px 5px 0; }
.landing-step-grid span { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(139,92,246,.4); border-radius: 11px; background: rgba(139,92,246,.1); color: #c7b7ff; font-size: 13px; font-weight: 800; }
.landing-step-grid h3 { margin: 24px 0 10px; font-size: 19px; }
.landing-step-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.landing-cta { display: flex; align-items: center; justify-content: space-between; gap: 50px; margin-top: 40px; margin-bottom: 100px; padding: 50px; border: 1px solid rgba(139,92,246,.35); border-radius: 20px; background: linear-gradient(120deg, rgba(139,92,246,.14), rgba(32,36,44,.7)); }
.landing-cta div { max-width: 720px; }
.landing-cta .button { flex: 0 0 auto; }
.landing-support { display: flex; align-items: center; justify-content: space-between; gap: 50px; margin-bottom: 70px; padding: 38px 42px; border: 1px solid rgba(139,92,246,.35); border-radius: 18px; background: linear-gradient(120deg, rgba(139,92,246,.13), rgba(32,36,44,.72)); }
.landing-support > div { max-width: 760px; }
.landing-support h2 { margin: 0; font-size: clamp(27px,3vw,38px); letter-spacing: -.03em; }
.landing-support p:not(.eyebrow) { margin: 13px 0 0; color: var(--muted); line-height: 1.65; }
.landing-support small { display: block; margin-top: 13px; color: #8f98a8; font-size: 11px; }
.landing-support .button { flex: 0 0 auto; }
.landing-contact { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-bottom: 78px; padding: 34px 0; border-top: 1px solid var(--border); }
.landing-contact > div { max-width: 710px; }
.landing-contact h2 { margin: 0; font-size: clamp(25px,3vw,36px); letter-spacing: -.03em; }
.landing-contact p:last-child { margin: 13px 0 0; color: var(--muted); line-height: 1.65; }
.landing-contact p:last-child a { color: #c7b7ff; font-weight: 800; }
.landing-contact p:last-child a:hover { color: #fff; }
.landing-contact .button { flex: 0 0 auto; }
.landing-footer { display: flex; min-height: 120px; align-items: center; justify-content: space-between; gap: 30px; border-top: 1px solid var(--border); }
.landing-footer .landing-brand img { width: 38px; height: 38px; border-radius: 11px; }
.landing-footer p { max-width: 430px; margin: 0; color: #707989; font-size: 11px; text-align: right; }

@media (max-width: 768px) {
    .app-shell { display: block; padding-top: 74px; }
    .channel-page-overview .sidebar-brand-subtitle { display: none; }
    .sidebar,
    .channel-page-overview .sidebar { position: fixed; z-index: 50; top: 0; right: 0; left: 0; width: 100%; height: 100dvh; max-height: 100dvh; min-height: 0; padding: 16px 20px; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--border); box-shadow: 0 18px 38px rgba(0,0,0,.4); }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar,
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:hover { width: 100%; height: 74px; min-height: 0; padding: 16px 20px; overflow: hidden; box-shadow: none; }
    .dashboard-page .brand { min-height: 42px; margin-bottom: 20px; padding-right: 44px; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar .brand { margin-top: 0; margin-bottom: 0; padding-right: 44px; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:not(:hover) .brand-copy,
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:not(:hover) .nav-link-label,
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-button-label { width: auto; opacity: 1; transform: none; pointer-events: auto; }
    .sidebar-toggle,
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-toggle { top: 23px; right: 20px; display: grid; font-size: 19px; }
    .sidebar-toggle span { display: block; transition: transform .24s ease, opacity .18s ease; }
    .dashboard-page .app-shell:not(.sidebar-collapsed) .sidebar-toggle span { transform: rotate(90deg); }
    .navigation { width: 100%; min-height: 0; flex-direction: column; justify-content: flex-start; gap: 7px; overflow-x: hidden; overflow-y: auto; }
    .navigation .nav-link { width: 100%; flex: 0 0 auto; justify-content: flex-start; }
    .dashboard-page .sidebar .navigation,
    .dashboard-page .sidebar .sidebar-logout { visibility: visible; opacity: 1; transform: translateY(0); transition: opacity .2s ease .08s, transform .24s ease .08s, visibility 0s linear 0s; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar .navigation,
    .dashboard-page .app-shell.sidebar-collapsed .sidebar .sidebar-logout { visibility: hidden; opacity: 0; transform: translateY(-10px); pointer-events: none; transition-delay: 0s; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:not(:hover) .nav-link { gap: 11px; justify-content: flex-start; padding: 11px 12px; }
    .dashboard-page .app-shell.sidebar-collapsed .sidebar:not(:hover) .sidebar-logout .button { gap: 10px; padding-right: 11px; padding-left: 11px; }
    .sidebar-logout { margin-top: 12px; }
    .dashboard-page:not(.channel-page-overview) .main-content,
    .dashboard-page:not(.channel-page-overview) .app-shell.sidebar-collapsed .main-content { position: static; left: auto; width: 100%; max-width: none; margin-right: 0; margin-left: 0; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .sidebar,
    .dashboard-page .app-shell.sidebar-ready .sidebar,
    .sidebar-toggle span,
    .dashboard-page .sidebar .navigation,
    .dashboard-page .sidebar .sidebar-logout { transition: none; }
}

@media (max-width: 900px) {
    .channel-dashboard-layout.admin-channel-dashboard-layout { grid-template-areas: "header" "stream" "queue" "activity" "chat"; }
    .main-content { padding: 28px 20px; }
    .channel-page-overview .streamer-main-content { padding: 16px; }
    .page-header { flex-direction: column; }
    .status-grid, .channel-summary, .channel-card-grid, .channel-status-grid, .channel-detail-grid, .channel-dashboard-grid, .channel-live-layout, .redemption-panel-grid, .performance-grid, .raid-metric-grid { grid-template-columns: 1fr; }
    .admin-viewer-queue-column, .admin-viewer-queue-column > .panel, .admin-activity-panel, .admin-readonly-chat-panel { min-height: 460px; }
    .channel-dashboard-layout { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "stats" "player" "queue" "activities" "chat"; }
    .channel-page-overview .dashboard-chat-column { display: contents; }
    .channel-page-overview .dashboard-chat-column > .dashboard-header-side { grid-area: stats; padding-bottom: 6px; }
    .dashboard-activity-panel, .viewer-queue-column > [data-viewer-queue-panel] { min-height: 460px; }
    .dashboard-chat-feed { min-height: 460px; }
    .channel-heading { align-items: flex-start; }
    .dashboard-header-side { width: 100%; justify-content: flex-start; }
    .social-link-row { align-items: flex-start; flex-direction: column; }
    .social-link-row p { white-space: normal; }
    .runtime-log-entry { grid-template-columns: 72px minmax(0,1fr); }
    .runtime-log-message { grid-column: 1 / -1; padding-bottom: 5px; }
    .landing-navigation { width: min(100% - 32px,var(--landing-width)); }
    .landing-navigation nav > a:not(.button) { display: none; }
    .landing-brand small { display: none; }
    .landing-hero { width: min(100% - 32px,var(--landing-width)); min-height: 0; grid-template-columns: 1fr; gap: 55px; padding: 70px 0 80px; }
    .hero-copy h1 { font-size: clamp(41px,12vw,58px); }
    .hero-description { font-size: 16px; }
    .landing-section, .landing-cta, .landing-support, .landing-contact, .landing-footer { width: min(100% - 32px,var(--landing-width)); }
    .landing-section { padding: 78px 0; }
    .landing-feature-grid, .landing-step-grid, .whats-new-grid { grid-template-columns: 1fr; }
    .landing-feature-card { min-height: 220px; }
    .landing-feature-card summary { min-height: 218px; }
    .landing-cta { align-items: flex-start; flex-direction: column; margin-bottom: 70px; padding: 32px; }
    .landing-support { align-items: flex-start; flex-direction: column; gap: 25px; margin-bottom: 54px; padding: 30px; }
    .landing-contact { align-items: flex-start; flex-direction: column; gap: 22px; margin-bottom: 54px; }
    .landing-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 28px 0; }
    .landing-footer p { text-align: left; }
}

@media (max-width: 768px) {
    .channel-page-overview .dashboard-carousel-navbar-label { position: absolute; top: 37px; right: 58px; left: 185px; display: flex; min-width: 0; justify-content: flex-end; gap: 4px; overflow: hidden; color: var(--muted); font-size: 12px; white-space: nowrap; transform: translateY(-50%); }
    .channel-page-overview .dashboard-carousel-navbar-count { flex: 0 0 auto; }
    .channel-page-overview .dashboard-carousel-navbar-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .channel-page-overview,
    .channel-page-overview .app-shell { height: 100dvh; min-height: 0; overflow: hidden; }
    .channel-page-overview .streamer-main-content { height: calc(100dvh - 74px); min-height: 0; padding: 12px; overflow: hidden; }
    .channel-page-overview .channel-dashboard-layout.has-carousel { position: relative; display: block; width: 100%; height: 100%; min-height: 0; flex: 0 0 auto; margin: 0; overflow: hidden; }
    .channel-page-overview .channel-dashboard-layout.has-carousel > .channel-live-layout,
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-chat-column { display: contents; }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-chat-column > .dashboard-header-side { position: absolute; z-index: 5; top: 0; right: 0; left: 0; display: flex; width: 100%; margin: 0; padding: 0 26px; background: var(--background); }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-header-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-header-stats > .dashboard-header-stat,
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-header-stats > .dashboard-ad-sticky { min-width: 0; flex: 1 1 120px; justify-content: center; }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-header-stats > .dashboard-ad-sticky { display: flex; min-height: 30px; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 10px; white-space: nowrap; }
    .channel-page-overview .dashboard-ad-sticky strong { color: var(--text); font-size: 11px; font-weight: 700; }
    .channel-page-overview .dashboard-carousel-deck { display: none; }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-carousel-deck { position: absolute; top: calc(var(--dashboard-stats-height, 36px) + 8px); right: 0; bottom: 0; left: 0; display: block; overflow: hidden; touch-action: pan-y; }
    .channel-page-overview .dashboard-carousel-slide { position: absolute; top: 0; right: 26px; bottom: 0; left: 26px; display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 10px; overflow-x: hidden; overflow-y: auto; opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(calc(100% + 14px)); transition: transform .3s ease, opacity .3s ease, visibility 0s linear .3s; }
    .channel-page-overview .dashboard-carousel-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); transition: transform .3s ease, opacity .3s ease, visibility 0s; }
    .channel-page-overview .dashboard-carousel-slide.is-neighbor { opacity: .65; visibility: visible; transition: transform .3s ease, opacity .3s ease, visibility 0s; }
    .channel-page-overview .dashboard-carousel-slide.is-before { transform: translateX(calc(-100% - 14px)); }
    .channel-page-overview .dashboard-carousel-slide:focus-visible,
    .channel-page-overview .dashboard-carousel-deck:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    .channel-page-overview .dashboard-carousel-slide > .panel { width: 100%; min-width: 0; min-height: 0; max-height: none; margin: 0; }
    .channel-page-overview .dashboard-carousel-slide > .dashboard-video-card { flex: 0 0 auto; }
    .channel-page-overview .dashboard-carousel-slide > .dashboard-ads-panel { flex: 1 0 auto; }
    .channel-page-overview .dashboard-carousel-slide .dashboard-ad-actions { min-height: 120px; flex: 1 1 auto; grid-template-columns: 1fr; grid-template-rows: repeat(3, minmax(34px, 1fr)); }
    .channel-page-overview .dashboard-carousel-slide > [data-viewer-queue-panel],
    .channel-page-overview .dashboard-carousel-slide > .live-chat-panel { height: 100%; min-height: 0; flex: 1 1 auto; overflow: hidden; }
    .channel-page-overview .dashboard-carousel-slide > .dashboard-activity-panel { height: auto; min-height: 0; flex: 1 1 0; overflow: hidden; }
    .channel-page-overview .dashboard-carousel-slide > .dashboard-activity-panel > .panel-header,
    .channel-page-overview .dashboard-carousel-slide > .dashboard-activity-panel > .activity-tabs { flex: 0 0 auto; }
    .channel-page-overview .dashboard-carousel-slide > .dashboard-activity-panel > [data-activity-panel]:not([hidden]) { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; overflow: hidden; }
    .channel-page-overview .dashboard-carousel-slide .dashboard-raid-tab #dashboard-raid { min-height: 0; flex: 1 1 auto; margin: 0; padding: 0; overflow-y: auto; border: 0; background: transparent; }
    .channel-page-overview .dashboard-carousel-slide #viewer-queue-content,
    .channel-page-overview .dashboard-carousel-slide .activity-scroll,
    .channel-page-overview .dashboard-carousel-slide .dashboard-command-feed { min-height: 0; max-height: none; flex: 1; overflow-y: auto; }
    .channel-page-overview .dashboard-carousel-slide .dashboard-chat-feed { min-height: 0; flex: 1; overflow-y: auto; }
    .dashboard-carousel-controls { display: none; }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-carousel-controls { position: absolute; z-index: 8; inset: 0; display: block; pointer-events: none; }
    .dashboard-carousel-peek { position: absolute; top: calc(var(--dashboard-stats-height, 36px) + 8px); bottom: 0; width: 26px; padding: 0; border: 0; background: transparent; cursor: pointer; pointer-events: auto; }
    .dashboard-carousel-peek:hover:not(:disabled) { background: rgba(139,92,246,.08); }
    .dashboard-carousel-peek:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
    .dashboard-carousel-peek:disabled { visibility: hidden; pointer-events: none; }
    .dashboard-carousel-peek[data-dashboard-carousel-prev] { left: 0; }
    .dashboard-carousel-peek[data-dashboard-carousel-next] { right: 0; }
}

.channel-page-overview .dashboard-activity-panel .activity-scroll,
.channel-page-overview .dashboard-activity-panel .dashboard-command-feed,
.channel-page-overview .dashboard-activity-panel .dashboard-raid-tab #dashboard-raid { width: calc(100% + 8px); margin-right: -8px; padding-right: 8px; scrollbar-gutter: stable; }

@media (max-width: 600px) {
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-header-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-header-stats > :nth-child(-n+3) { grid-column: span 2; }
    .channel-page-overview .channel-dashboard-layout.has-carousel .dashboard-header-stats > :nth-child(n+4) { grid-column: span 3; }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .channel-page-overview .dashboard-carousel-slide { transition: none; }
}

@media (max-width: 520px) {
    .landing-navigation { min-height: 76px; }
    .landing-navigation .button { min-height: 38px; padding: 0 12px; font-size: 12px; }
    .landing-brand img { width: 40px; height: 40px; }
    .landing-brand strong { font-size: 15px; }
    .landing-hero { padding-top: 52px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .button { width: 100%; }
    .preview-dashboard { padding: 14px; }
    .preview-dashboard-header { align-items: flex-start; }
    .preview-dashboard-stats { max-width: 135px; }
    .preview-dashboard-grid { min-height: 265px; gap: 5px; }
    .preview-dashboard-card { padding: 7px; }
}

.danger-zone .danger-eyebrow {
    color: var(--danger);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin-bottom: 0.75rem;
}

.danger-zone h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.danger-zone .page-description {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.6;
    max-width: 600px;
}

.logs-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.log-session-list {
    display: flex;
    flex-direction: column;
}

.log-session-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.log-session-row:first-child {
    border-top: 0;
}

.log-session-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 12px;
    background: var(--surface-raised);
    font-weight: 800;
}

.log-session-details {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 5px;
}

.log-session-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.log-session-details span,
.log-session-meta span {
    color: var(--muted);
    font-size: 12px;
}

.log-session-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.log-session-meta form,
.header-actions form {
    margin: 0;
}

.log-active-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid rgba(53, 196, 106, 0.4);
    border-radius: 999px;
    background: rgba(53, 196, 106, 0.1);
    color: var(--success);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.log-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.log-title-row h2 {
    margin: 0;
}

.log-viewer-panel {
    overflow: hidden;
}

.log-viewer {
    max-height: 65vh;
    margin: 0;
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #0b0d11;
    color: #d8dee9;
    font-family: "Cascadia Code", "Consolas", monospace;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .logs-summary-grid {
        grid-template-columns: 1fr;
    }

    .log-session-row {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .log-session-meta {
        width: 100%;
        justify-content: space-between;
        padding-left: 62px;
    }
}

.queue-feedback {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.queue-feedback.success {
    border-color: rgba(53, 196, 106, .35);
    background: rgba(53, 196, 106, .08);
    color: var(--success);
}

.queue-feedback.error {
    border-color: rgba(239, 83, 80, .35);
    background: rgba(239, 83, 80, .08);
    color: var(--danger);
}

.queue-feedback-icon {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    border-radius: 50%;
    background: currentColor;
    color: var(--surface);
    font-size: 12px;
    font-weight: 800;
}

.queue-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
#viewer-queue-content > .queue-list::before { position: absolute; z-index: 1; top: var(--queue-line-top, 0px); left: 22px; width: 3px; height: var(--queue-line-height, 0px); background: var(--accent); content: ""; pointer-events: none; transition: top .25s ease, height .25s ease; }

.queue-list-item {
    position: relative;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 54px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    background: transparent;
    transition: background-color .25s ease, border-color .25s ease;
    transition-delay: var(--queue-preview-delay, 0ms);
}
.queue-list .queue-list-item, .queue-list .queue-drop-placeholder { padding-left: 8px; }
.queue-panel-header { gap: 8px; }
.queue-panel-header h3 { min-width: 0; }
.queue-panel-header [data-queue-count] { display: inline-flex; min-height: 30px; align-items: center; margin-left: auto; padding: 5px 9px; border: 0; border-radius: 7px; background: var(--surface-raised); color: var(--text); font-size: 13px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.queue-state-toggle { position: relative; min-width: 70px; height: 34px; overflow: hidden; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-raised); color: var(--muted); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; transition: border-color .32s ease, background-color .32s ease, color .32s ease; }
.queue-state-toggle:not(.live):hover, .queue-state-toggle:not(.live):focus-visible { border-color: rgba(139,92,246,.7); background: rgba(139,92,246,.18); color: #ddd6fe; }
.queue-state-toggle.live { border-color: rgba(53,196,106,.4); background: rgba(53,196,106,.1); color: var(--success); }
.queue-state-toggle span { position: relative; z-index: 2; display: block; transition: transform .22s ease, opacity .22s ease; }
.queue-state-toggle .queue-state-alternate { position: absolute; top: 50%; right: 0; left: 0; transform: translateY(130%); opacity: 0; }
.queue-state-toggle:hover .queue-state-current, .queue-state-toggle:focus-visible .queue-state-current { transform: translateY(-130%); opacity: 0; }
.queue-state-toggle:hover .queue-state-alternate, .queue-state-toggle:focus-visible .queue-state-alternate { transform: translateY(-50%); opacity: 1; }
.queue-state-toggle::after { position: absolute; z-index: 1; bottom: -5px; left: 14px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: 11px 3px currentColor, 23px -1px currentColor, 34px 4px currentColor, 43px 0 currentColor; content: ""; opacity: 0; }
.queue-state-toggle:hover::after, .queue-state-toggle:focus-visible::after { animation: queue-dust-rise .65s ease-out infinite; }
@keyframes queue-dust-rise { 0% { transform: translateY(4px) scale(.7); opacity: 0; } 25% { opacity: .55; } 100% { transform: translateY(-30px) scale(.2); opacity: 0; } }
.queue-toolbar { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; margin-bottom: 6px; }
.queue-toolbar button, .queue-toolbar a { display: inline-flex; width: 100%; min-height: 34px; align-items: center; justify-content: center; padding: 5px 7px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 800; text-align: center; cursor: pointer; }
.queue-toolbar button:hover, .queue-toolbar button:focus-visible, .queue-toolbar a:hover, .queue-toolbar a:focus-visible { border-color: var(--accent); background: rgba(139,92,246,.12); color: var(--text); }
.queue-toolbar .danger:hover, .queue-toolbar .danger:focus-visible { border-color: var(--danger); background: rgba(239,83,80,.12); }
.queue-next-control { display: flex; min-width: 0; }
.queue-toolbar .queue-next-control > button { min-width: 0; flex: 1; width: auto; gap: 4px; padding-inline: 3px; border-radius: 7px 0 0 7px; white-space: nowrap; }
.queue-next-picker { position: relative; display: grid; min-width: 26px; flex: 0 0 26px; place-items: center; border: 1px solid var(--border); border-left: 0; border-radius: 0 7px 7px 0; color: var(--muted); font-size: 14px; cursor: pointer; }
.queue-next-picker:hover:not(.is-selection-committed) { border-color: var(--accent); background: rgba(139,92,246,.12); color: var(--text); }
.queue-next-picker select { position: absolute; inset: 0; width: 100%; height: 100%; appearance: none; border: 0; outline: 0; background: transparent; color: transparent; font-size: 0; cursor: pointer; }
.queue-next-picker select:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.queue-next-picker select option { background: var(--surface-raised); color: var(--text); font-size: 12px; }
.queue-next-picker span { pointer-events: none; }
.viewer-queue-column > [data-viewer-queue-panel] { position: relative; }
.queue-action-status { position: absolute; z-index: 2; right: 16px; bottom: 2px; max-width: calc(100% - 32px); min-height: 14px; margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; opacity: .8; pointer-events: none; transition: opacity .45s ease; }
.queue-action-status.is-fading { opacity: 0; }
.queue-action-status.success { color: var(--success); }
.queue-action-status.error { color: var(--danger); }
.queue-list-item { cursor: grab; touch-action: pan-y; }
.queue-list .queue-list-item.dragging { display: none !important; }
.queue-drop-placeholder { position: relative; display: grid !important; box-sizing: border-box; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 13px; min-height: 54px; padding: 8px 0; border: 1px dashed var(--accent) !important; border-radius: 8px; background: rgba(139,92,246,.12); color: var(--muted); font-size: 12px; }
.queue-drop-placeholder .queue-position { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: rgba(139,92,246,.24); color: var(--text); font-weight: 800; }
.queue-drag-ghost { position: fixed; z-index: 1000; box-sizing: border-box; min-height: 0; padding: 12px 8px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface-raised); pointer-events: none; transform: scale(1); transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.queue-list-item.queue-drag-ghost.is-lifted { transform: scale(1.035); box-shadow: 0 16px 32px rgba(0,0,0,.38), 0 0 0 2px rgba(139,92,246,.2); }
.queue-list-item.is-moving { z-index: 3; }
.queue-drag-ghost.is-dropping { opacity: 0; transform: scale(1); transition: left .16s ease, top .16s ease, transform .16s ease, opacity .16s ease; }
.queue-drag-ghost .queue-item-actions { display: none; }
.queue-list.is-reordering .queue-item-actions { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .queue-drag-ghost, .queue-drag-ghost.is-dropping { transition: none; } }
.queue-list-item.is-next-preview { border-top-color: transparent; background: rgba(139,92,246,.16); }
.queue-list-item.is-next-preview .queue-position { position: relative; z-index: 2; background: var(--accent); color: #fff; }
.queue-drop-placeholder.is-next-preview { background: rgba(139,92,246,.16); }
.queue-drop-placeholder.is-next-preview .queue-position { position: relative; z-index: 2; background: var(--accent); color: #fff; }
.queue-list.is-exiting::before, .queue-list.is-entering::before { transition: none; }
.queue-list-item.is-removing { box-sizing: border-box; min-height: 0; overflow: hidden; pointer-events: none; animation: queue-slide-away .36s ease-in var(--queue-exit-delay, 0ms) forwards; }
.queue-list-item.is-appearing { box-sizing: border-box; min-height: 0; overflow: hidden; transform-origin: top center; animation: queue-fold-in .36s cubic-bezier(.2,.8,.2,1) var(--queue-enter-delay, 0ms) both; }
@keyframes queue-slide-away {
    0% { height: var(--queue-row-height); padding-block: 12px; opacity: 1; transform: translateX(0); }
    60% { height: var(--queue-row-height); padding-block: 12px; opacity: 0; transform: translateX(44px); }
    100% { height: 0; padding-block: 0; border-width: 0; opacity: 0; transform: translateX(44px); }
}
@keyframes queue-fold-in {
    0% { height: 0; padding-block: 0; border-width: 0; opacity: 0; transform: perspective(600px) rotateX(-80deg); }
    100% { height: var(--queue-row-height); padding-block: 12px; opacity: 1; transform: perspective(600px) rotateX(0); }
}
.queue-list.is-reordering .queue-list-item, .queue-list.is-reordering .queue-list-item .queue-position, .queue-list.is-reordering::before { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .queue-list-item, .queue-list-item .queue-position, #viewer-queue-content > .queue-list::before { transition: none !important; animation: none !important; } }
.queue-list-item .queue-position, .queue-list-item .queue-username { user-select: none; -webkit-user-select: none; }
.queue-item-actions { display: grid; grid-template-columns: repeat(3, 28px); align-items: center; justify-items: center; gap: 3px; margin-left: -13px; padding-left: 13px; opacity: 0; pointer-events: none; transition: opacity .14s ease; }
.queue-item-actions > [data-queue-item-action="top"] { grid-column: 1; }
.queue-item-actions > [data-queue-item-action="bottom"] { grid-column: 2; }
.queue-item-actions > [data-queue-item-action="remove"], .queue-item-actions > form { grid-column: 3; }
.queue-list-item:hover .queue-item-actions, .queue-list-item:focus-within .queue-item-actions { opacity: 1; pointer-events: auto; }
.queue-item-action { position: relative; display: grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 17px; cursor: pointer; }
.queue-item-action svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.queue-item-action:hover, .queue-item-action:focus-visible { background: rgba(139,92,246,.14); color: #fff; }
.queue-item-action.danger { color: #ff8784; font-size: 16px; }
.queue-grab-indicator { position: absolute; z-index: 2; top: 50%; left: calc(50% + 8px); display: flex; width: 24px; height: 24px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); opacity: 0; transform: translate(-50%, -50%); pointer-events: none; transition: opacity .14s ease; }
.queue-grab-indicator::before, .queue-grab-indicator::after { width: 16px; height: 2px; border-radius: 999px; background: currentColor; content: ""; }
.queue-list-item:hover .queue-grab-indicator, .queue-list-item:focus-within .queue-grab-indicator, .queue-drag-ghost .queue-grab-indicator { color: var(--text); opacity: 1; }
.queue-username { font-size: 13px; }
@media (hover: none) { .queue-item-actions { opacity: 1; pointer-events: auto; } .queue-grab-indicator { opacity: 1; } }
.queue-item-action.danger:hover, .queue-item-action.danger:focus-visible { background: rgba(239,83,80,.14); }

.queue-list-item:first-child {
    border-top: 0;
}

.queue-list-item .queue-position {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: var(--surface-raised);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    transition: background-color .25s ease, color .25s ease;
    transition-delay: var(--queue-preview-delay, 0ms);
}

.queue-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-list-item form {
    margin: 0;
}

.queue-remove-button {
    display: grid;
    width: 24px;
    height: 24px;
    min-height: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #ff8784;
    cursor: pointer;
    font: inherit;
    font-size: 17px;
    line-height: 1;
}

.queue-remove-button:hover {
    background: rgba(239, 83, 80, .14);
    color: #fff;
}
.queue-blacklist-panel { padding: 22px; }
.queue-blacklist-add { display: flex; flex-direction: column; gap: 8px; }
.queue-blacklist-add label { color: var(--muted); font-size: 11px; font-weight: 700; }
.queue-blacklist-add > div { display: flex; gap: 8px; }
.queue-blacklist-add input { min-width: 0; flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; outline: 0; background: var(--background); color: var(--text); }
.queue-blacklist-add input:focus { border-color: var(--accent); }
.queue-blacklist-list { margin: 20px 0 0; padding: 0; list-style: none; }
.queue-blacklist-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }

.panel-description {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.toggle-management-panel {
    grid-column: 1 / -1;
}

.toggle-feedback {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.toggle-feedback.success {
    border-color: rgba(53, 196, 106, .35);
    background: rgba(53, 196, 106, .08);
    color: var(--success);
}

.toggle-feedback.error {
    border-color: rgba(239, 83, 80, .35);
    background: rgba(239, 83, 80, .08);
    color: var(--danger);
}

.toggle-feedback-icon {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    border-radius: 50%;
    background: currentColor;
    color: var(--surface);
    font-size: 12px;
    font-weight: 800;
}

.toggle-section {
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.toggle-section:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.toggle-section + .toggle-section {
    margin-top: 28px;
}

.toggle-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.toggle-section-heading h4 {
    margin: 0;
    font-size: 17px;
}

.toggle-section-heading p {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.toggle-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
    transition: border-color .15s ease, background .15s ease;
}

.toggle-card.enabled {
    border-color: rgba(53, 196, 106, .3);
}

.toggle-card.disabled {
    background: rgba(32, 36, 44, .62);
}

.toggle-card-content {
    min-width: 0;
}

.toggle-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.toggle-card-heading h4 {
    margin: 0;
    font-size: 15px;
}

.toggle-card-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.toggle-command-summary { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.toggle-command-summary strong { color: var(--text); }

.toggle-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.toggle-status.enabled {
    border-color: rgba(53, 196, 106, .4);
    background: rgba(53, 196, 106, .1);
    color: var(--success);
}

.toggle-status.disabled {
    border-color: rgba(239, 83, 80, .35);
    background: rgba(239, 83, 80, .08);
    color: #ff8784;
}

.toggle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
}

.toggle-meta strong {
    color: var(--text);
}

.toggle-override-label {
    color: var(--accent);
}

.toggle-blocked-message {
    margin: 13px 0 0;
    padding: 9px 11px;
    border-left: 3px solid var(--danger);
    border-radius: 0 7px 7px 0;
    background: rgba(239, 83, 80, .07);
    color: #ffaaa7;
    font-size: 11px;
    line-height: 1.45;
}

.toggle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toggle-actions .button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 12px;
}

.toggle-disable-button {
    border-color: rgba(239, 83, 80, .4);
    background: rgba(239, 83, 80, .09);
    color: #ff8784;
}

.toggle-disable-button:hover {
    background: rgba(239, 83, 80, .18);
    color: #fff;
}

.profile-settings-panel + .profile-settings-panel { margin-top: 18px; }
.profile-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dashboard-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.dashboard-tab { padding: 10px 13px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.dashboard-tab:hover, .dashboard-tab.active { border-bottom-color: var(--accent); color: var(--text); }
.dashboard-tab.has-unseen:not(.active) { border-bottom-color: var(--danger); background: rgba(239,83,80,.12); color: var(--danger); }
.dashboard-activity-panel > .panel-header, .queue-panel-header { min-height: 34px; }
.dashboard-tabs.activity-tabs { flex-wrap: nowrap; gap: 5px; margin-bottom: 6px; overflow-x: auto; overflow-y: hidden; border-bottom: 0; scrollbar-color: var(--border) transparent; scrollbar-width: thin; }
.dashboard-tabs.activity-tabs .dashboard-tab { min-width: max-content; min-height: 34px; flex: 1 0 auto; padding: 5px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 11px; white-space: nowrap; }
.dashboard-tabs.activity-tabs .dashboard-tab:hover, .dashboard-tabs.activity-tabs .dashboard-tab:focus-visible, .dashboard-tabs.activity-tabs .dashboard-tab.active { border-color: var(--accent); background: rgba(139,92,246,.12); color: var(--text); }
.dashboard-tabs.activity-tabs .dashboard-tab.has-unseen:not(.active) { border-color: var(--danger); background: rgba(239,83,80,.12); color: var(--danger); }
.automod-item { align-items: flex-start; }
.automod-actions { display: flex; flex: 0 0 auto; gap: 5px; }
.automod-actions .button { min-height: 28px; padding: 5px 8px; font-size: 9px; }
.youtube-integration-card { padding: 18px 0; border-top: 1px solid var(--border); }
.youtube-integration-card:first-child { padding-top: 0; border-top: 0; }
.youtube-channel-details { margin: 18px 0; }
.widget-url-card { margin-top: 4px; }
.widget-url-field { display: block; margin-top: 16px; color: var(--muted); font-size: 12px; }
.widget-url-field strong { color: var(--text); }
.widget-url-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.widget-url-controls .profile-setting-input { resize: none; }
.widget-regenerate-form { margin-top: 20px; }
.protected-users-card { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); }
.protected-user-search { width: min(100%, 760px); margin-top: 18px; }
.protected-user-search label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.protected-user-search-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.protected-user-search-controls .profile-setting-input { margin: 0; }
.protected-user-search-message { min-height: 20px; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.protected-user-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 14px; border: 1px solid rgba(139,92,246,.4); border-radius: 10px; background: rgba(139,92,246,.08); }
.protected-user-result[hidden] { display: none; }
.protected-user-result div { display: grid; gap: 4px; }
.protected-user-result span, .protected-user-row small { color: var(--muted); font-size: 12px; }
.protected-user-list { display: grid; gap: 10px; margin-top: 16px; }
.protected-user-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--background); }
.protected-user-row > div { display: grid; gap: 4px; }
.protected-user-row strong span { color: var(--muted); font-weight: 600; }
.protected-user-empty { padding: 20px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); text-align: center; }
.profile-setting-card form { display: flex; height: 100%; flex-direction: column; }
.profile-setting-card.full-width { grid-column: 1 / -1; }
.profile-setting-input { width: 100%; margin-top: 16px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; outline: none; resize: vertical; background: var(--background); color: var(--text); font: inherit; line-height: 1.45; }
.profile-setting-input:focus { border-color: var(--accent); }
.profile-setting-actions { margin-top: auto; padding-top: 16px; }
.timer-message-editor { display: grid; gap: 14px; }
.timer-message-list { display: grid; gap: 12px; }
.timer-message-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.timer-message-row .profile-setting-input { resize: vertical; }
.timer-remove-button { min-height: 42px; }
.timer-add-button { justify-self: start; }

@media (max-width: 900px) {
    .toggle-grid, .profile-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .widget-url-controls { grid-template-columns: 1fr; }
    .widget-url-controls .button { width: 100%; }
    .timer-message-row { grid-template-columns: 1fr; }
    .timer-remove-button { justify-self: start; }
    .protected-user-search-controls { grid-template-columns: 1fr; }
    .protected-user-result, .protected-user-row { align-items: stretch; flex-direction: column; }
    .protected-user-result .button, .protected-user-row .button { width: 100%; }

    .toggle-card-heading {
        flex-direction: column;
    }

    .toggle-actions {
        flex-direction: column;
    }

    .toggle-actions .button {
        width: 100%;
    }
}

.admin-user-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.admin-password-reset {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-password-reset input {
    width: 170px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--background);
    color: var(--text);
}

.admin-password-reset input::placeholder {
    color: var(--muted);
}

.admin-password-reset input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .14);
}

.admin-password-reset input {
    width: 170px;
}

.admin-user-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.channel-user-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--background);
}

.channel-user-details div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.channel-user-details span {
    color: var(--muted);
    font-size: 12px;
}

.channel-user-details strong {
    font-size: 14px;
}

.streamer-dashboard {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 72px 48px 48px;
}

@media (max-width: 900px) {
    .streamer-dashboard {
        padding: 28px 20px;
    }
}

.chat-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chat-platform-dot { display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #687080; }
.chat-platform-dot.twitch.active { background: #9146ff; }
.chat-platform-dot.youtube.active { background: #ff0033; }
.chat-command-toggle { cursor: pointer; font: inherit; font-size: 12px; background: var(--surface); color: #ff8784; border-color: rgba(239,68,68,.5); }
.chat-command-toggle.live { color: #22c55e; border-color: rgba(34,197,94,.5); }
.live-chat-message[hidden] { display: none; }

.dashboard-chat-composer textarea,
.live-chat-feed,
.activity-scroll,
#viewer-queue-content {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.dashboard-chat-composer textarea::-webkit-scrollbar,
.live-chat-feed::-webkit-scrollbar,
.activity-scroll::-webkit-scrollbar,
#viewer-queue-content::-webkit-scrollbar {
    width: 8px;
}

.dashboard-chat-composer textarea::-webkit-scrollbar-track,
.live-chat-feed::-webkit-scrollbar-track,
.activity-scroll::-webkit-scrollbar-track,
#viewer-queue-content::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-chat-composer textarea::-webkit-scrollbar-thumb,
.live-chat-feed::-webkit-scrollbar-thumb,
.activity-scroll::-webkit-scrollbar-thumb,
#viewer-queue-content::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(139, 92, 246, .65);
    background-clip: padding-box;
}

.dashboard-chat-composer textarea::-webkit-scrollbar-thumb:hover,
.live-chat-feed::-webkit-scrollbar-thumb:hover,
.activity-scroll::-webkit-scrollbar-thumb:hover,
#viewer-queue-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    background-clip: padding-box;
}

.dashboard-chat-composer textarea::-webkit-scrollbar-button,
.live-chat-feed::-webkit-scrollbar-button,
.activity-scroll::-webkit-scrollbar-button,
#viewer-queue-content::-webkit-scrollbar-button {
    display: none;
}

.command-help-summary-grid {
    margin-bottom: 28px;
}

.command-help-list {
    display: grid;
    gap: 16px;
}

.command-help-group {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.command-help-group[open] {
    border-color: rgba(139, 92, 246, .55);
}

.command-help-group-summary {
    display: block;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
}

.command-help-group-summary::-webkit-details-marker {
    display: none;
}

.command-help-group-summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -4px;
}

.command-help-group-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.command-help-group-heading h3 {
    margin: 0;
    font-size: 21px;
}

.command-help-group-heading p:not(.eyebrow) {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.command-help-chevron {
    color: var(--accent);
    font-size: 24px;
    transition: transform .18s ease;
}

.command-help-group[open] .command-help-chevron {
    transform: rotate(180deg);
}

.command-help-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 17px;
}

.command-help-chip {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-raised);
    color: var(--text);
    font-size: 12px;
}

.command-help-chip.enabled {
    border-color: rgba(53, 196, 106, .28);
}

.command-help-chip.disabled {
    opacity: .48;
}

.command-help-details {
    border-top: 1px solid var(--border);
    padding: 0 24px;
}

.command-help-command {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(300px, 1.3fr);
    gap: 24px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.command-help-command:first-child {
    border-top: 0;
}

.command-help-command-syntax {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.command-help-command-syntax code {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.command-help-command-description p {
    margin: 0;
    line-height: 1.5;
}

.command-help-command-description span {
    display: inline-block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 760px) {
    .public-command-content { width: min(100% - 28px, 1120px); padding-top: 16px; }
    .public-command-navigation { width: min(100% - 28px, 1120px); flex-wrap: wrap; padding: 20px 0; }
    .public-command-hero { grid-template-columns: auto minmax(0,1fr); }
    .public-command-hero .button { grid-column: 1 / -1; }
    .public-command-hero h1 { font-size: 30px; }
    .public-command-groups, .public-raid-stats { grid-template-columns: 1fr; }
    .public-command-group-header, .raid-monitor-heading { align-items: flex-start; flex-direction: column; }
    .public-command-group-header > p { max-width: none; text-align: left; }
    .public-command-row { grid-template-columns: 1fr; gap: 8px; }

    .command-help-group-summary, .command-help-details {
        padding-right: 18px;
        padding-left: 18px;
    }

    .command-help-command {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .command-help-command-syntax {
        align-items: flex-start;
    }
}

.chatter-profile-page { background: radial-gradient(circle at top, rgba(139,92,246,.12), transparent 34%), var(--background); }
.chatter-profile-content { width: min(100% - 40px, 1120px); margin: 0 auto; padding: 34px 0 70px; }
.chatter-search { display: flex; align-items: center; gap: 9px; }
.chatter-search.centered { max-width: 440px; margin: 24px auto 0; }
.chatter-search input { width: min(270px, 42vw); min-height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: var(--surface); color: var(--text); }
.chatter-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,.15); }
.chatter-profile-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 22px; margin-bottom: 26px; padding: 28px; border: 1px solid var(--border); border-radius: 18px; background: rgba(24,27,33,.9); }
.chatter-profile-hero h1 { margin: 0; font-size: 38px; }
.chatter-profile-hero p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); }
.chatter-profile-avatar, .channel-profile-hero > img { display: grid; width: 76px; height: 76px; place-items: center; border-radius: 20px; background: linear-gradient(135deg, var(--accent), #ec4899); color: #fff; font-size: 28px; font-weight: 800; object-fit: cover; }
img.chatter-profile-avatar { display: block; }
.chatter-level-summary { width: min(260px, 24vw); }
.chatter-level-summary > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.chatter-level-summary > div:first-child span { color: var(--muted); font-size: 12px; }
.chatter-level-summary > div:first-child strong { font-size: 20px; }
.chatter-level-summary .chatter-level-progress { height: 9px; margin-top: 10px; }
.chatter-level-summary small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; text-align: right; }
.chatter-stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 30px; }
.chatter-stat-grid article { padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.chatter-stat-grid span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.chatter-stat-grid strong { font-size: 25px; }
.chatter-stat-grid small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.chatter-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 5px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); width: fit-content; }
.chatter-tabs button { padding: 10px 18px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-weight: 700; }
.chatter-tabs button:hover { color: var(--text); }
.chatter-tabs button.active { background: var(--accent); color: #fff; }
[data-chatter-panel][hidden] { display: none; }
.chatter-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.chatter-section-heading h2 { margin: 0; font-size: 28px; }
.chatter-section-heading > p { max-width: 510px; margin: 0; color: var(--muted); line-height: 1.5; text-align: right; }
.chatter-channel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.chatter-channel-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: border-color .18s ease, transform .18s ease; }
.chatter-channel-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.chatter-channel-card img, .chatter-channel-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: var(--surface-raised); font-weight: 800; object-fit: cover; }
.chatter-channel-card h3 { margin: 0; font-size: 16px; }
.chatter-channel-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.chatter-channel-card > span { color: var(--accent); font-size: 27px; }
.chatter-history-note { margin: 24px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.chatter-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.chatter-detail-panel { margin: 0; }
.chatter-detail-list { margin: 0; }
.chatter-detail-list div, .chatter-inventory-list div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--border); }
.chatter-detail-list div:first-child, .chatter-inventory-list div:first-child { border-top: 0; }
.chatter-detail-list dt, .chatter-inventory-list span { color: var(--muted); }
.chatter-detail-list dd { margin: 0; font-weight: 800; }
.chatter-inventory-list em { margin-left: 6px; color: var(--success); font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.chatter-inventory-list strong { font-size: 12px; }
.chatter-empty-copy { color: var(--muted); line-height: 1.6; }
.chatter-raid-history-section { margin-top: 28px; }
.chatter-raid-history { display: grid; gap: 10px; }
.chatter-raid-history article { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 17px 20px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.chatter-raid-history article > div:not(.chatter-raid-result) { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.chatter-raid-history article span { color: var(--muted); font-size: 12px; }
.chatter-raid-result { display: flex; align-items: flex-end; flex-direction: column; gap: 6px; }
.chatter-raid-result > span { padding: 4px 8px; border-radius: 999px; font-weight: 800; text-transform: uppercase; }
.chatter-raid-result > span.defeated { background: rgba(34,197,94,.14); color: var(--success); }
.chatter-raid-result > span.failed { background: rgba(239,68,68,.14); color: var(--danger); }
.chatter-raid-result > span.cleared { background: rgba(34,197,94,.14); color: var(--success); }
.chatter-raid-result > span.concluded { background: rgba(139,92,246,.14); color: var(--accent); }
.chatter-raid-result em { color: var(--accent); font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }

@media (max-width: 760px) {
    .chatter-profile-content { width: min(100% - 28px,1120px); padding-top: 18px; }
    .chatter-search { width: 100%; }
    .chatter-search input { width: 100%; }
    .chatter-profile-hero { grid-template-columns: auto minmax(0,1fr); padding: 21px; }
    .chatter-level-summary { grid-column: 1 / -1; width: 100%; }
    .chatter-profile-hero h1 { font-size: 29px; }
    .chatter-stat-grid, .chatter-channel-grid, .chatter-detail-grid { grid-template-columns: 1fr; }
    .chatter-section-heading { align-items: flex-start; flex-direction: column; }
    .chatter-section-heading > p { text-align: left; }
    .chatter-raid-history article { grid-template-columns: 1fr; gap: 12px; }
    .chatter-raid-result { align-items: flex-start; }
}


.raid-contributor-panel {
    margin-bottom: 28px;
}

.raid-contributor-header {
    align-items: flex-start;
}

.raid-contributor-header .panel-description {
    margin-top: 6px;
}

.raid-contributor-list {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.raid-contributor-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-raised);
}

.raid-contributor-rank {
    color: var(--accent);
    font-weight: 800;
}

.raid-contributor-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.raid-contributor-damage {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 560px) {
    .raid-contributor-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .raid-contributor-damage {
        grid-column: 2;
    }
}


.raid-contributor-empty {
    padding: 14px 16px;
    color: var(--muted);
    font-style: italic;
}

.public-raid-navigation { display: flex; align-items: center; gap: 12px; }
.public-raid-navigation > a:not(.button) { color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.public-raid-navigation > a:not(.button):hover { color: var(--text); }
.public-raid-guide { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.public-raid-section-content { padding: 22px 24px 24px; border-top: 1px solid var(--border); }
.public-raid-shop-category + .public-raid-shop-category { margin-top: 24px; }
.public-raid-shop-category > h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.public-raid-shop-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.public-raid-shop-grid article { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 9px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-raised); }
.public-raid-shop-grid h3, .public-raid-history-list h3 { margin: 0; }
.public-raid-shop-grid > article > strong { font-size: 18px; }
.public-raid-shop-grid p { flex: 1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.public-raid-shop-grid code { color: #c4b5fd; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.public-raid-item-type { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.public-raid-rule-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.public-raid-rule-grid article { display: flex; flex-direction: column; gap: 7px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.public-raid-rule-grid strong { font-size: 16px; }
.public-raid-rule-grid span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.public-raid-copy { display: flex; flex-direction: column; gap: 14px; }
.public-raid-copy p { margin: 0; color: var(--muted); line-height: 1.65; }
.public-raid-copy strong { color: var(--text); }
.public-crafting-guide { display: flex; flex-direction: column; gap: 18px; }
.public-crafting-recipes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.public-crafting-recipes article { display: flex; flex-direction: column; gap: 5px; padding: 15px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-raised); }
.public-crafting-recipes strong, .public-crafting-progressions strong, .public-crafting-mythical strong { color: var(--text); }
.public-crafting-recipes span, .public-crafting-progressions span, .public-crafting-mythical span { color: var(--muted); line-height: 1.55; }
.public-crafting-recipes b { color: var(--accent); font-size: 12px; }
.public-crafting-progressions { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.public-crafting-progressions article { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.public-crafting-mythical { display: flex; flex-direction: column; gap: 5px; }
.public-crafting-command { margin: 0; color: var(--muted); line-height: 1.65; }
.public-raid-history-list { display: flex; flex-direction: column; }
.public-raid-history-list article { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 22px; padding: 15px 0; border-top: 1px solid var(--border); }
.public-raid-history-list article:first-child { padding-top: 0; border-top: 0; }
.public-raid-history-list article > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.public-raid-history-list article span, .public-raid-history-list article p { margin: 0; color: var(--muted); font-size: 11px; }
.public-raid-history-leaderboard { grid-column: 1 / -1; }
.public-raid-history-leaderboard summary { width: fit-content; cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 800; }
.public-raid-history-leaderboard ol { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 24px; }
.public-raid-history-leaderboard li { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; }
.public-raid-history-leaderboard li strong { color: var(--text); }
.public-raid-idle { padding: 24px 0; border: 0; }
.public-raid-idle h2 { margin: 4px 0 0; }

@media (max-width: 800px) {
    .public-raid-shop-grid, .public-raid-rule-grid, .public-crafting-recipes { grid-template-columns: 1fr; }
    .public-crafting-progressions article { grid-template-columns: 1fr; gap: 4px; }
    .public-raid-history-list article { grid-template-columns: minmax(0,1fr) auto; }
    .public-raid-history-list article > b { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 600px) {
    .public-raid-navigation > a:not(.button) { display: none; }
    .public-raid-history-list article { grid-template-columns: 1fr; gap: 10px; }
}

.public-raid-guide-link { width: fit-content; margin-top: 18px; }


.premium-connect-notice { margin: 18px 0; padding: 16px 18px; border: 1px solid rgba(139,92,246,.4); border-radius: 12px; background: rgba(139,92,246,.08); }
.premium-connect-notice strong { display: block; }
.premium-connect-notice p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.custom-bot-link-form { width: min(100%, 760px); }
.custom-bot-actions { align-items: flex-end; }
.custom-bot-link-form label, .custom-bot-link-panel label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.patch-notes-form { display: grid; gap: 18px; max-width: 900px; }
.patch-notes-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 800; }
.patch-notes-form input, .patch-notes-form textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--background); color: var(--text); font: inherit; }
.patch-notes-form textarea { min-height: 110px; resize: vertical; }
.patch-notes-form textarea[name="body"] { min-height: 300px; }
.panel form[action="/admin/patch-notes/save"] { display: flex; width: min(100%,900px); flex-direction: column; gap: 18px; }
.panel form[action="/admin/patch-notes/save"] label { display: flex; flex-direction: column; gap: 8px; color: var(--text); font-size: 13px; font-weight: 800; }
.panel form[action="/admin/patch-notes/save"] input, .panel form[action="/admin/patch-notes/save"] textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--background); color: var(--text); font: inherit; }
.panel form[action="/admin/patch-notes/save"] textarea { min-height: 120px; resize: vertical; }
.panel form[action="/admin/patch-notes/save"] textarea[name="body"] { min-height: 340px; }
.panel form[action="/admin/patch-notes/save"] .button { align-self: flex-start; }
.custom-bot-link-controls { display: flex; align-items: stretch; gap: 10px; }
.custom-bot-link-controls .profile-setting-input { flex: 1; margin: 0; min-width: 0; }
.custom-bot-link-panel { max-width: 960px; }
.custom-bot-result-card { max-width: 620px; }

@media (max-width: 700px) {
    .custom-bot-link-controls { align-items: stretch; flex-direction: column; }
}

.channel-page-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; flex-shrink: 0; }
.channel-page-tabs { display: inline-flex; overflow: hidden; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); }
.channel-page-tab { padding: 7px 11px; border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-decoration: none; }
.channel-page-tab:hover, .channel-page-tab:focus-visible { color: var(--text); }
.channel-page-tab.active { background: var(--accent); color: #fff; }
.channel-page-tab:focus-visible { outline: 2px solid #c4b5fd; outline-offset: -2px; }
@media (max-width: 700px) {
    .channel-page-controls { align-items: flex-start; }
    .channel-page-tabs { width: 100%; }
    .channel-page-tab { flex: 1; text-align: center; }
}
/* Viewer achievement collection */
.achievement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; gap: 20px; margin: 20px 0; }
.achievement-card { --badge-color: #b4b7c2; border-top: 3px solid var(--badge-color); margin-bottom: 0; padding: 20px; }
.achievement-description { min-height: 3em; margin-bottom: 12px; }
.achievement-filters { flex-wrap: wrap; }
.achievement-filters button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.achievement-card[hidden] { display: none; }
.achievement-heading { display: flex; align-items: center; gap: 18px; }
.achievement-heading h3 { margin: 4px 0; }
.achievement-badge { color: var(--badge-color); border: 3px double currentColor; border-radius: 22%; padding: 8px; width: 72px; flex-shrink: 0; }
.achievement-badge svg { display: block; width: 100%; }
.tier-bronze { --badge-color: #d49a6a; }
.tier-silver { --badge-color: #d0d8e5; }
.tier-gold { --badge-color: #f3cd65; }
.tier-platinum { --badge-color: #9ce7ef; }
.tier-gold .achievement-badge, .tier-platinum .achievement-badge { border-width: 5px; }
.tier-platinum .achievement-badge { box-shadow: 0 0 14px #9ce7ef33; }
.tier-locked .achievement-badge { opacity: .5; border-style: dashed; }
.achievement-card progress { width: 100%; accent-color: var(--badge-color); margin-bottom: 16px; }
.achievement-tiers { list-style: none; padding: 0; margin: 10px 0 0; }
.achievement-tiers li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(40px, .7fr) minmax(0, 1fr); gap: 4px 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--border); }
.achievement-tier-requirement { display: flex; flex-direction: column; text-align: center; font-variant-numeric: tabular-nums; }
.achievement-tier-requirement small { color: var(--badge-color); font-size: .72rem; }
.achievement-tier-requirement, .achievement-tier-status { color: var(--muted); font-size: .85rem; }
.achievement-tier-status { max-width: 170px; text-align: right; overflow-wrap: anywhere; }
.achievement-card summary { cursor: pointer; }
