body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bs-body-bg);
}

.site-footer {
    margin-top: auto;
    padding: 0.65rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
    border-top: 1px solid var(--bs-border-color);
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: inherit;
    text-underline-offset: 0.15em;
}

.site-footer a:hover {
    color: var(--bs-link-hover-color);
}

.backoffice-shell {
    min-width: 0;
}

.backoffice-sidebar {
    width: 12rem;
    flex: 0 0 12rem;
    min-height: 0;
    overflow: hidden;
    transition: width 0.15s ease, flex-basis 0.15s ease;
}

.backoffice-shell.is-collapsed .backoffice-sidebar {
    width: 3.75rem;
    flex-basis: 3.75rem;
}

.backoffice-main {
    min-width: 0;
}

.backoffice-nav {
    padding: 0 0.5rem;
}

.backoffice-nav .nav-link,
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 0;
    border-radius: var(--bs-border-radius);
    color: var(--bs-body-color);
    text-decoration: none;
    white-space: nowrap;
}

.backoffice-nav .nav-link i,
.sidebar-collapse-btn i {
    flex-shrink: 0;
    width: 1.25rem;
    font-size: 1.15rem;
    line-height: 1;
    text-align: center;
}

.backoffice-nav .nav-link:hover,
.backoffice-nav .nav-link:focus-visible,
.sidebar-collapse-btn:hover,
.sidebar-collapse-btn:focus-visible {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.backoffice-nav .nav-link.active {
    background-color: var(--bs-primary);
    color: var(--bs-white);
    font-weight: 600;
}

.backoffice-nav .nav-link.active:hover,
.backoffice-nav .nav-link.active:focus-visible {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.sidebar-collapse-btn {
    margin: 0.75rem 0.5rem 0;
    background: transparent;
    text-align: left;
}

.sidebar-expand-icon {
    display: none;
}

.backoffice-shell.is-collapsed .sidebar-label {
    display: none;
}

.backoffice-shell.is-collapsed .backoffice-nav {
    padding-inline: 0.4rem;
}

.backoffice-shell.is-collapsed .backoffice-nav .nav-link,
.backoffice-shell.is-collapsed .sidebar-collapse-btn {
    justify-content: center;
    padding-inline: 0.45rem;
}

.backoffice-shell.is-collapsed .sidebar-collapse-icon {
    display: none;
}

.backoffice-shell.is-collapsed .sidebar-expand-icon {
    display: inline-block;
}

.offcanvas .backoffice-nav {
    padding: 0;
}

.auth-card {
    max-width: 26rem;
}

.form-select {
    max-width: 100%;
}

.slide-stage-frame {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
    overflow: hidden;
    background: #111;
    border: 2px solid #2c2c2c;
    border-radius: 0.85rem;
    box-shadow: 0 0.45rem 1.2rem rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.slide-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
}

.slide-stage > img,
.slide-stage > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-stage-article {
    position: absolute;
    inset: 8%;
    z-index: 2;
    overflow: hidden;
    font-size: 0.7rem;
    pointer-events: none;
}

.slide-stage-article::after {
    display: block;
    clear: both;
    content: '';
}

.slide-stage-article .article-media {
    position: relative;
    inset: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.slide-stage-article .article-media--left {
    float: left;
    margin: 0 0.6em 0.4em 0;
}

.slide-stage-article .article-media--right {
    float: right;
    margin: 0 0 0.4em 0.6em;
}

.slide-stage-article .article-media--block {
    display: block;
    float: none;
    clear: both;
    margin: 0.5em auto;
}

.slide-stage-article .article-media--framed,
.article-editor-surface .article-media--framed {
    box-sizing: border-box;
    padding: 0.4em;
    background: #f4f1ea;
    border: 1px solid rgba(40, 36, 28, 0.35);
    box-shadow: 0 0.12em 0.45em rgba(0, 0, 0, 0.28);
}

.slide-stage-box {
    position: absolute;
    overflow: visible;
    box-sizing: border-box;
    padding: 0.35em 0.4em 0.3em;
    font-size: 0.65rem;
    line-height: 1.25;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    cursor: move;
    user-select: none;
    touch-action: none;
}

.slide-stage-box.has-border {
    border-style: solid;
}

.slide-stage-box.is-selected {
    outline: 2px solid #6ea8fe;
    outline-offset: 1px;
    z-index: 80 !important;
}

.slide-stage-box.is-dragging {
    opacity: 0.92;
}

.slide-stage-box > :not(.slide-stage-box-handle):not(.slide-stage-box-index) {
    pointer-events: none;
}

.slide-stage-box-index {
    position: absolute;
    top: -0.7rem;
    left: 0;
    z-index: 3;
    min-width: 1rem;
    padding: 0 0.28rem;
    border-radius: 0.2rem;
    background: #6ea8fe;
    color: #111;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.15;
    pointer-events: none;
}

.slide-stage-box-handle {
    position: absolute;
    z-index: 4;
    width: 0.55rem;
    height: 0.55rem;
    background: #fff;
    border: 1px solid #0d6efd;
    border-radius: 1px;
}

.slide-stage-box-handle[data-resize="nw"] { top: -0.2rem; left: -0.2rem; cursor: nwse-resize; }
.slide-stage-box-handle[data-resize="ne"] { top: -0.2rem; right: -0.2rem; cursor: nesw-resize; }
.slide-stage-box-handle[data-resize="sw"] { bottom: -0.2rem; left: -0.2rem; cursor: nesw-resize; }
.slide-stage-box-handle[data-resize="se"] { bottom: -0.2rem; right: -0.2rem; cursor: nwse-resize; }

.media-dropzone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.5rem 0.85rem;
    border: 2px dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-tertiary-bg);
}

form.is-dragover .media-dropzone {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.media-dropzone-label {
    flex: 1;
    cursor: pointer;
    color: var(--bs-secondary-color);
}

.media-thumb-cell {
    width: 7rem;
}

.media-thumb {
    display: block;
    max-width: 96px;
    max-height: 72px;
    object-fit: cover;
}

.media-thumb-video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 72px;
    color: var(--bs-secondary);
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    font-size: 1.75rem;
}

.media-thumb-trigger:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.media-choice-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.5rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}

.media-choice-empty {
    width: 100%;
}

.bg-fit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.bg-fit-option {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0;
    padding: 0.7rem 0.75rem 0.8rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    cursor: pointer;
}

.bg-fit-option:hover {
    border-color: var(--bs-primary);
}

.bg-fit-option:has(:checked) {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.bg-fit-option:has(:focus-visible) {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.bg-fit-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 4.5rem;
    background: var(--bs-tertiary-bg);
    border-radius: calc(var(--bs-border-radius) - 2px);
}

.bg-fit-frame {
    position: relative;
    width: 1.85rem;
    height: 3.2rem;
    overflow: hidden;
    border: 2px solid var(--bs-secondary-color);
    background: #1b2630;
}

.bg-fit-image {
    position: absolute;
    background: #18bc9c;
}

.bg-fit-frame--cover .bg-fit-image {
    top: 18%;
    left: -55%;
    width: 210%;
    height: 64%;
}

.bg-fit-frame--contain .bg-fit-image {
    top: 32%;
    left: 8%;
    width: 84%;
    height: 36%;
}

.bg-fit-title {
    display: block;
    font-weight: 600;
}

.bg-fit-help {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--bs-secondary-color);
}

.article-editor-toolbar,
.article-editor-media-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.article-editor-sep {
    width: 1px;
    align-self: stretch;
    min-height: 1.4rem;
    background: var(--bs-border-color);
}

.article-editor-color input {
    width: 2rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: transparent;
    cursor: pointer;
}

.article-editor-media-tools {
    min-height: 2.35rem;
}

.article-editor-media-tools.is-disabled {
    opacity: 0.45;
}

.article-editor-size {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 12rem;
}

.article-editor-surface {
    min-height: 12rem;
    padding: 0.75rem 0.9rem;
    overflow: auto;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.article-editor-surface:focus {
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.2);
}

.article-editor-surface p:last-child {
    margin-bottom: 0;
}

.article-editor-surface .article-media {
    height: auto;
    max-width: 100%;
    vertical-align: middle;
}

.article-editor-surface .article-media--left {
    float: left;
    margin: 0 0.75rem 0.5rem 0;
}

.article-editor-surface .article-media--right {
    float: right;
    margin: 0 0 0.5rem 0.75rem;
}

.article-editor-surface .article-media--block {
    display: block;
    float: none;
    clear: both;
    margin: 0.6rem auto;
}

.article-editor-surface .article-media.is-selected {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.article-editor-surface::after {
    display: block;
    clear: both;
    content: '';
}

.slide-form-section + .slide-form-section {
    margin-top: 1.35rem;
    padding-top: 1.35rem;
    border-top: 1px solid var(--bs-border-color);
}

.locale-tabs {
    margin-bottom: 0.15rem;
}

.locale-tab {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}

.locale-tab-hint {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.locale-bg-fallback {
    margin: 0.45rem 0 0;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.locale-label-grid,
.playlist-card-labels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.65rem;
}

.locale-label-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.slide-form-section-title {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.slide-form-toolbar .form-check {
    margin-bottom: 0;
}

.slide-box-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.slide-box-entry {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
}

.slide-box-entry.is-selected {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 1px var(--bs-primary);
}

.slide-box-card {
    position: relative;
    padding: 0.7rem 0.8rem 0.8rem;
}

.slide-box-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.35rem;
}

.slide-box-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin-right: auto;
}

.slide-box-swatches {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.slide-box-swatch {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.slide-box-swatch-pick {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
    cursor: pointer;
}

.slide-box-swatch.is-set .slide-box-swatch-pick {
    border-color: var(--bs-primary);
}

.slide-box-swatch-pick input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.slide-box-swatch-pick i {
    pointer-events: none;
    font-size: 0.95rem;
}

.slide-box-swatch-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    margin-left: -0.35rem;
    padding: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    line-height: 1;
    font-size: 0.7rem;
}

.slide-box-swatch.is-set .slide-box-swatch-clear {
    display: inline-flex;
}

.slide-box-metrics {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.slide-box-html {
    min-height: 3.25rem;
    font-size: 0.875rem;
}

.slide-box-opacity {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 9.5rem;
    margin-left: auto;
}

.slide-box-opacity .form-range {
    width: 5.5rem;
}

.slide-box-card .article-editor-surface {
    min-height: 5rem;
}

.slide-box-card .article-editor-toolbar {
    margin-bottom: 0.35rem;
}

.slide-box-geom,
.slide-box-style-value,
.slide-box-geom-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.field-help {
    color: var(--bs-secondary-color);
    line-height: 1;
    text-decoration: none;
}

.field-help:hover,
.field-help:focus {
    color: var(--bs-primary);
}

@media (min-width: 992px) {
    .slide-preview-sticky {
        position: sticky;
        top: 1rem;
    }
}

.media-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.75rem;
}

.media-picker-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    text-align: left;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.media-picker-card:hover,
.media-picker-card:focus-visible {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 1px var(--bs-primary);
}

.media-picker-card-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 7.5rem;
    background: var(--bs-tertiary-bg);
    overflow: hidden;
}

.media-picker-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-picker-card-video {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

.media-picker-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem 0.7rem;
}

.media-picker-card-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.8125rem;
    font-weight: 600;
    word-break: break-word;
}

.media-preview-frame {
    max-width: 100%;
    max-height: min(70vh, 36rem);
}

.navbar-brand-home,
.navbar-brand-home:hover,
.navbar-brand-home:focus,
.navbar-brand-home:focus-visible {
    color: var(--bs-navbar-brand-color);
    text-decoration: none;
}

.navbar-company-toggle {
    display: inline-flex;
    align-items: center;
    max-width: 16rem;
}

.navbar-company-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-company-menu {
    max-height: min(70vh, 24rem);
    overflow-y: auto;
}

.user-identity {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.user-avatar {
    font-size: 1.2em;
    line-height: 1;
}

.role-checks {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.role-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    padding: 0.9rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    cursor: pointer;
}

.role-check:hover,
.role-check:has(.form-check-input:checked) {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.role-check:has(.form-check-input:checked) {
    box-shadow: inset 3px 0 0 var(--bs-primary);
}

.role-check .form-check-input {
    margin-top: 0.28rem;
    flex-shrink: 0;
}

.role-check-title {
    display: block;
    font-weight: 600;
}

.role-check-help {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.icon-choice-open {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.85rem 0.35rem 0.35rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    color: inherit;
}

.icon-choice-open:hover {
    border-color: var(--bs-primary);
}

.icon-choice-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.45rem;
    background: var(--bs-tertiary-bg);
    font-size: 1.35rem;
}

.icon-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(3.4rem, 1fr));
    gap: 0.45rem;
}

.icon-choice-option {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    font-size: 1.35rem;
    color: inherit;
}

.icon-choice-option:hover,
.icon-choice-option.is-selected {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

.playlist {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    overflow-x: auto;
    padding: 0.25rem 0.15rem 0.65rem;
    min-height: 12.5rem;
}

.playlist-item {
    flex: 0 0 13.5rem;
}

.playlist-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: 100%;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
}

.playlist-item.is-dragging .playlist-card {
    opacity: 0.45;
}

.playlist-item.is-empty .playlist-card-slide-name {
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.playlist-card-drag {
    align-self: center;
    cursor: grab;
    color: var(--bs-secondary-color);
    font-size: 1.15rem;
    line-height: 1;
}

.playlist-card-slide {
    display: block;
    width: 100%;
    min-height: 3.4rem;
    padding: 0.55rem 0.65rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
    text-align: left;
    color: inherit;
}

.playlist-card-slide-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 600;
    font-size: 0.9rem;
}

.playlist-card-time {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.playlist-card-time-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.playlist-card-active .form-check {
    margin-bottom: 0;
}

.playlist-card-remove {
    align-self: flex-end;
}

.playlist-slide-input,
.playlist-seconds-input,
.playlist-sort-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.playlist-pick-item {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 0.4rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    text-align: left;
    color: inherit;
}

.playlist-pick-item:hover {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.totem-chrome-head {
    padding-bottom: 1.15rem;
    margin-bottom: 0.15rem;
}

.totem-subnav {
    border-bottom: 1px solid var(--bs-border-color);
}

.totem-subnav .nav-tabs {
    border-bottom: 0;
    gap: 0.15rem;
}

.totem-subnav .nav-link {
    margin-bottom: -1px;
    padding: 0.55rem 1rem;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
    color: var(--bs-secondary-color);
    background: transparent;
}

.totem-subnav .nav-link:hover,
.totem-subnav .nav-link:focus-visible {
    border-color: transparent;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
}

.totem-subnav .nav-link.active {
    border-color: var(--bs-border-color);
    border-bottom-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    font-weight: 650;
}

.totem-jump {
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.totem-jump:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 1px var(--bs-primary);
}

.totem-ops-card.is-inactive {
    opacity: 0.55;
}

.totem-ops-card.is-inactive .field-help {
    pointer-events: auto;
}

.playlist-card--menu {
    min-height: 16.5rem;
}

.playlist-item:has(.playlist-card--menu) {
    flex-basis: 16.5rem;
}

.playlist-card-label {
    font-weight: 600;
}

.icon-choice--compact .icon-choice-open {
    padding: 0.2rem;
    gap: 0;
}

.icon-choice--compact .icon-choice-glyph {
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.45rem;
}

.icon-choice--compact .icon-choice-clear {
    padding: 0.15rem 0.35rem;
}

.plan-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.plan-item.is-dragging .plan-card {
    opacity: 0.45;
}

.plan-item.is-empty .playlist-card-slide-name {
    color: var(--bs-secondary-color);
    font-weight: 500;
}

.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
}

.plan-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.plan-card-presentation {
    flex: 1 1 12rem;
    min-height: 2.75rem;
}

.plan-card-active .form-check {
    margin-bottom: 0;
}

.plan-roles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

@media (min-width: 768px) {
    .plan-roles {
        grid-template-columns: 1fr 1fr;
    }
}

.plan-role {
    display: block;
    margin: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-body-bg);
    cursor: pointer;
}

.plan-role:hover,
.plan-role:has(.form-check-input:checked) {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

.plan-role-main {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.plan-role-main .form-check-input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.plan-role-title {
    font-weight: 600;
}

.plan-role-help {
    display: block;
    margin-top: 0.25rem;
    padding-left: 1.7rem;
    font-size: 0.8125rem;
    color: var(--bs-secondary-color);
}

.plan-card-when {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .plan-card-when {
        grid-template-columns: repeat(4, 1fr);
    }
}

.plan-card-when .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.plan-days-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.plan-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.plan-day {
    min-width: 4.25rem;
    margin: 0;
    padding-top: 0.15rem;
}

.totem-blackout-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: var(--bs-border-radius);
    background: #1b1b1b;
    color: #f8f9fa;
}

.pairing-code {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
}

.totem-device-id code {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
}

.totem-preview-frame {
    max-width: 26rem;
}

[data-controller="duration-slider"] {
    position: relative;
}

.duration-slider {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 22rem;
}

.duration-slider-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.duration-slider-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dash-section + .dash-section {
    margin-top: 2rem;
}

.dash-section-title {
    font-size: 1.05rem;
    font-weight: 650;
    margin-bottom: 0.75rem;
}

.dash-subhead {
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    margin: 0 0 0.6rem;
}

.dash-setup,
.dash-ok {
    padding: 1rem 1.15rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}

.dash-ok {
    color: var(--bs-success-text-emphasis, var(--bs-success));
    background: var(--bs-success-bg-subtle, #e8f6ef);
}

.dash-alerts,
.dash-soon {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-alert,
.dash-now-row,
.dash-soon-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: #fff;
}

.dash-alert {
    border-left-width: 3px;
}

.dash-alert--offline,
.dash-alert--player_error {
    border-left-color: var(--bs-danger);
}

.dash-alert--pending,
.dash-alert--unpaired,
.dash-alert--empty_loop {
    border-left-color: var(--bs-warning);
}

.dash-alert--blackout {
    border-left-color: #1b1b1b;
}

.dash-alert--clock_skew {
    border-left-color: var(--bs-info);
}

.dash-alert-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dash-now {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-now-row {
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) 1fr auto;
    align-items: start;
}

.dash-now-name p,
.dash-now-play p,
.dash-soon-row {
    margin: 0;
}

.dash-kicker {
    display: inline-block;
    min-width: 3.25rem;
    margin-right: 0.4rem;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}

.dash-soon-row {
    justify-content: flex-start;
    gap: 1rem;
}

.dash-soon-row a {
    min-width: 8rem;
    font-weight: 600;
    color: inherit;
}

@media (max-width: 767.98px) {
    .dash-now-row {
        grid-template-columns: 1fr;
    }
}

.help-page {
    max-width: 42rem;
}

.help-lead {
    margin-bottom: 1.6rem;
    font-size: 1.05rem;
    line-height: 1.5;
}

.help-steps {
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
    counter-reset: help-step;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.help-steps > li {
    counter-increment: help-step;
    padding: 0.95rem 1.1rem 1rem 3rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: #fff;
    position: relative;
}

.help-steps > li::before {
    content: counter(help-step);
    position: absolute;
    left: 0.85rem;
    top: 0.95rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.5rem;
    text-align: center;
}

.help-steps h2,
.help-watch h2 {
    font-size: 1.05rem;
    font-weight: 650;
    margin: 0 0 0.45rem;
}

.help-flow {
    margin: 0 0 0.65rem;
    color: var(--bs-secondary-color);
    font-size: 0.95rem;
    line-height: 1.45;
}

.help-steps ul,
.help-watch ul {
    margin: 0;
    padding-left: 1.15rem;
}

.help-steps li + li,
.help-watch li + li {
    margin-top: 0.4rem;
}

.help-steps ul li,
.help-watch li {
    line-height: 1.45;
}

.help-watch {
    padding: 0.95rem 1.1rem;
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}

.pairing-wizard {
    max-width: 40rem;
}

.pairing-wizard-steps {
    display: flex;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.pairing-wizard-step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    color: var(--bs-secondary-color);
}

.pairing-wizard-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0.85rem;
    left: calc(50% + 1.15rem);
    right: calc(-50% + 1.15rem);
    height: 2px;
    background: var(--bs-border-color);
}

.pairing-wizard-step.is-done:not(:last-child)::after {
    background: var(--bs-primary);
}

.pairing-wizard-step-num {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 50%;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.pairing-wizard-step-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.pairing-wizard-step.is-done .pairing-wizard-step-num {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle, #d6eaf8);
    color: var(--bs-primary);
}

.pairing-wizard-step.is-current .pairing-wizard-step-num {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #fff;
}

.pairing-wizard-step.is-current .pairing-wizard-step-label {
    color: var(--bs-body-color);
    font-weight: 700;
}

.pairing-play-url {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
    font-size: 1.05rem;
    font-weight: 650;
    word-break: break-all;
}

.pairing-play-url a {
    color: inherit;
}

.resolution-check {
    padding: 1rem 1.1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}

.resolution-check.resolution-mismatch {
    border-color: var(--bs-info-border-subtle, var(--bs-info));
    background: var(--bs-info-bg-subtle, #cff4fc);
}
