.channel-offline-screen-editor {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.channel-offline-screen-editor label:not(:first-child) {
    margin-top: 8px;
}

.channel-animation-message-layout {
    display: grid;
    grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.channel-animation-font-field,
.channel-animation-message-fields {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.channel-animation-message-fields label:not(:first-child) {
    margin-top: 8px;
}

.channel-animation-font-field input[type="color"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    padding: 4px;
    cursor: pointer;
}

.channel-background-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.channel-background-upload-row .channel-remove-artwork {
    flex: 0 0 auto;
    max-width: 45%;
    margin: 0;
}

.channel-background-upload-row input[type="file"] {
    flex: 1 1 0;
    min-width: 0;
}

.channel-offline-screen-preview-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.channel-offline-screen-preview-controls button[data-preview-screen] {
    padding: 7px 12px;
    color: #d8e9ee;
    background: #15242b;
    border: 1px solid #547281;
    border-radius: 5px;
    cursor: pointer;
}

.channel-offline-screen-preview-controls button[data-preview-screen][aria-pressed="true"] {
    color: #07161d;
    background: #8bdfee;
    border-color: #8bdfee;
}

.channel-offline-screen-editor .channel-save-button {
    justify-self: start;
    margin-top: 8px;
}

.channel-animate-button {
    justify-self: start;
}

.channel-edit-settings-card {
    padding: 12px;
}

.channel-edit-help-layout .channel-customization-form {
    box-sizing: border-box;
    padding: 14px;
}

.channel-edit-form-fields,
.channel-edit-background,
.channel-edit-details {
    display: grid;
    align-content: start;
    gap: 9px;
    min-width: 0;
}

.channel-edit-form-fields {
    gap: 18px;
}

.channel-edit-background,
.channel-edit-details {
    padding: 0;
    border: 0;
}

.channel-edit-background h2,
.channel-edit-details h2 {
    margin: 0 0 2px;
    color: var(--gw-section-title-card-color);
    font-size: 1rem;
}

.channel-edit-background .channel-remove-artwork {
    justify-self: start;
    margin: 0;
}

.channel-edit-details textarea {
    min-height: 120px;
}

.channel-edit-help-card {
    box-sizing: border-box;
    width: 100%;
    text-align: left;
}

.channel-edit-help-content[hidden] {
    display: none;
}

.channel-edit-help-items {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.channel-edit-help-card .channel-edit-help-items p {
    margin: 0;
    padding: 9px 11px;
    color: var(--gw-section-title-card-text);
    border: 1px solid var(--gw-tier-3-card-border);
    border-radius: 7px;
    line-height: 1.5;
}

.channel-animation-form {
    max-width: 920px;
}

.channel-animation-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.channel-animation-actions .channel-save-button {
    margin-top: 0;
}

.channel-viewing-layout.is-offline-viewing .channel-viewing-main,
.channel-page.channel-dashboard-page .channel-viewing-layout.is-offline-viewing .channel-viewing-main {
    grid-template-rows: minmax(0, 1fr);
}

.channel-offline-player .channel-viewer-identity {
    position: absolute;
    z-index: 3;
    inset: 12px auto auto 12px;
    width: max-content;
    max-width: calc(100% - 24px);
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.channel-offline-player .channel-viewer-identity .channel-identity {
    max-width: 100%;
    background: transparent;
}

.channel-offline-player .channel-viewer-identity :is(h1, p, .channel-stream-status) {
    text-shadow: 0 2px 8px rgba(0, 0, 0, .95);
}

.channel-offline-player .channel-offline-screen-message {
    padding-top: 32px;
}

@media (max-width: 600px) {
    .channel-offline-player .channel-viewer-identity {
        inset: 8px auto auto 8px;
        max-width: calc(100% - 16px);
    }

    .channel-offline-player .channel-offline-screen-message {
        padding-top: 80px;
    }
}

.channel-offline-screen-preview {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 64 / 27;
    min-height: 190px;
    padding: 24px 16px 16px;
    overflow: hidden;
    border: 1px solid rgba(120, 213, 235, .5);
    border-radius: 8px;
    background-color: #05070a;
    background-position: center;
    background-size: cover;
}

.channel-offline-screen-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 14, .38);
}

.channel-offline-screen-preview > span,
.channel-offline-screen-message > span {
    position: relative;
    display: block;
    max-width: 90%;
    color: var(--channel-screen-color, #fff);
    font-size: clamp(1.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .06em;
    text-align: center;
    text-shadow: 0 3px 18px #000, 0 0 24px rgba(61, 211, 240, .65);
    font-family: var(--channel-screen-font, var(--gw-site-font));
    overflow-wrap: anywhere;
    animation: channel-screen-fade 7s ease-in-out infinite;
}

[data-font="arial"] { --channel-screen-font: Arial, Helvetica, sans-serif; }
[data-font="georgia"] { --channel-screen-font: Georgia, "Times New Roman", serif; }
[data-font="impact"] { --channel-screen-font: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; }
[data-font="trebuchet"] { --channel-screen-font: "Trebuchet MS", Arial, sans-serif; }
[data-font="courier"] { --channel-screen-font: "Courier New", Courier, monospace; }

.channel-offline-screen-preview > span {
    font-size: clamp(1.25rem, 3vw, 2.8rem);
}

.channel-offline-screen-message {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(2, 8, 14, .38);
}

.channel-offline-screen-preview[data-motion="slide"] > span,
.channel-offline-screen-message[data-motion="slide"] > span { animation-name: channel-screen-slide; }
.channel-offline-screen-preview[data-motion="glitch"] > span,
.channel-offline-screen-message[data-motion="glitch"] > span { animation-name: channel-screen-glitch; }

@keyframes channel-screen-fade {
    0%, 8%, 90%, 100% { opacity: 0; }
    18%, 80% { opacity: 1; }
}

@keyframes channel-screen-slide {
    0%, 8% { opacity: 0; transform: translateY(28px); }
    20%, 80% { opacity: 1; transform: translateY(0); }
    90%, 100% { opacity: 0; transform: translateY(-18px); }
}

@keyframes channel-screen-glitch {
    0%, 8%, 90%, 100% { opacity: 0; transform: none; }
    12%, 15%, 19%, 80% { opacity: 1; transform: none; }
    13%, 17% { opacity: .7; transform: translateX(-5px); }
    14%, 18% { opacity: 1; transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
    .channel-offline-screen-preview > span,
    .channel-offline-screen-message > span {
        animation: none;
    }
}

@media (max-width: 700px) {
    .channel-animation-message-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}
