/* Reusable UI components. Each block is independent; class names follow block / block__part / block--variant. */

/* ---------- Button ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0 1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
}

/* Buttons never move on hover or press; only their colors shift */
.btn:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.24);
}

.btn:active {
    filter: brightness(0.92);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn--primary {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 24px -12px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn--primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-soft);
}

.btn--ghost:hover {
    background: var(--surface-2);
    color: var(--text);
}

.btn--danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.btn--sm {
    min-height: 32px;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

.btn--icon {
    width: 36px;
    min-height: 36px;
    padding: 0;
}

.btn--block {
    width: 100%;
}

/* ---------- Form field ---------- */
.field {
    display: grid;
    gap: 0.4rem;
}

.field__label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-soft);
}

.field__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.input {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9375rem;
    transition: border-color var(--fast) ease, box-shadow var(--fast) ease, background-color var(--fast) ease;
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.input:hover {
    border-color: rgba(255, 255, 255, 0.24);
}

.input:focus {
    outline: none;
    background: var(--surface-2);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea.input {
    min-height: 84px;
    resize: vertical;
    line-height: 1.5;
}

select.input {
    appearance: none;
    padding-right: 2rem;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

select.input option {
    background: var(--bg-raised);
    color: var(--text);
}

/* Browsers with customizable selects get a styled dropdown list too */
@supports (appearance: base-select) {
    select.input,
    select.input::picker(select) {
        appearance: base-select;
    }

    select.input {
        display: flex;
        align-items: center;
        padding-right: 0.8rem;
        background-image: none;
    }

    select.input::picker-icon {
        content: '';
        width: 6px;
        height: 6px;
        margin-left: auto;
        border-right: 1.5px solid var(--text-muted);
        border-bottom: 1.5px solid var(--text-muted);
        transform: translateY(-2px) rotate(45deg);
        transition: transform var(--normal) var(--ease);
    }

    select.input:open::picker-icon {
        transform: translateY(1px) rotate(225deg);
    }

    select.input::picker(select) {
        margin-top: 6px;
        padding: 0.35rem;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius);
        background: var(--bg-raised);
        box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.95);
        opacity: 0;
        transform: translateY(-4px);
        transition: opacity 0.18s ease, transform 0.25s var(--ease), overlay 0.25s allow-discrete, display 0.25s allow-discrete;
    }

    select.input:open::picker(select) {
        opacity: 1;
        transform: none;
    }

    @starting-style {
        select.input:open::picker(select) {
            opacity: 0;
            transform: translateY(-4px);
        }
    }

    select.input option {
        gap: 0.5rem;
        padding: 0.5rem 0.65rem;
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--text-soft);
        font-size: 0.875rem;
    }

    select.input option:hover,
    select.input option:focus-visible {
        outline: none;
        background: var(--surface-2);
        color: var(--text);
    }

    select.input option:checked {
        color: var(--text);
        font-weight: 600;
    }

    select.input option::checkmark {
        order: 1;
        margin-left: auto;
        color: var(--accent);
    }
}

/* ---------- Toggle switch: <label class="toggle"><input type="checkbox"><span></span> Text</label> ---------- */
.toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-soft);
    cursor: pointer;
    user-select: none;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle__track {
    position: relative;
    flex-shrink: 0;
    width: 38px;
    height: 22px;
    border-radius: 22px;
    background: var(--surface-hover);
    border: 1px solid var(--line-strong);
    transition: background-color var(--fast) ease, border-color var(--fast) ease;
}

.toggle__track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-soft);
    transition: transform var(--normal) var(--ease), background-color var(--fast) ease;
}

.toggle input:checked + .toggle__track {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle input:checked + .toggle__track::after {
    transform: translateX(16px);
    background: #fff;
}

.toggle input:focus-visible + .toggle__track {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Choice grid: radio buttons styled as tiles (segmented control, effect pickers) ---------- */
.choices {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
    gap: 0.4rem;
}

.choice {
    position: relative;
}

.choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 38px;
    padding: 0 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease;
}

.choice span:hover {
    background: var(--surface-2);
    color: var(--text);
}

.choice input:checked + span {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: #fff;
}

.choice input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------- Range slider: filled track up to the thumb (--fill is kept up to date by core/range.js) ---------- */
input[type="range"] {
    --fill: 50%;
    height: 22px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent) var(--fill), rgba(255, 255, 255, 0.12) var(--fill));
}

input[type="range"]::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

input[type="range"]::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--accent);
}

input[type="range"]::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -6px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: transform var(--fast) ease, box-shadow var(--fast) ease;
    -webkit-appearance: none;
    appearance: none;
}

input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: transform var(--fast) ease, box-shadow var(--fast) ease;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.15);
}

input[type="range"]:hover::-moz-range-thumb,
input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.15);
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 8px rgba(0, 0, 0, 0.5);
}

input[type="range"]:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ---------- Range slider with value ---------- */
.range {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.range input[type="range"] {
    flex: 1;
}

.range output {
    flex: none;
    width: 3.75rem;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* ---------- Color swatch input ---------- */
.color {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color input[type="color"] {
    width: 40px;
    height: 40px;
    padding: 3px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
}

.color input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 4px;
}

.color .input {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    text-transform: lowercase;
}

/* ---------- Card ---------- */
.card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

/* Corner brackets, the Dark Ops frame detail: add class="brackets" to any positioned element */
.brackets {
    position: relative;
}

.brackets::before,
.brackets::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--accent);
    border-style: solid;
    pointer-events: none;
}

.brackets::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.brackets::after {
    right: -1px;
    bottom: -1px;
    border-width: 0 2px 2px 0;
}

/* ---------- Status dot ---------- */
.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.dot--live {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(34, 199, 122, 0.6);
    animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
    70% { box-shadow: 0 0 0 7px rgba(34, 199, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 199, 122, 0); }
}

/* ---------- Dialog (native <dialog>) ---------- */
.dialog {
    width: min(440px, calc(100% - 2rem));
    margin: auto;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    color: var(--text);
    box-shadow: var(--shadow);
}

.dialog::backdrop {
    background: var(--bg-overlay);
    backdrop-filter: blur(6px);
}

.dialog[open] {
    animation: dialog-in var(--normal) var(--ease);
}

.dialog__body {
    display: grid;
    gap: 0.75rem;
    padding: 1.5rem;
}

.dialog__title {
    font-size: 1.0625rem;
    font-weight: 700;
}

.dialog__text {
    color: var(--text-soft);
    font-size: 0.9375rem;
}

.dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--line);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
}

/* ---------- Icon picker (core/icon-picker.js) ---------- */
.icon-picker {
    width: min(620px, calc(100% - 2rem));
}

.icon-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.icon-picker__tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.icon-picker__tabs button {
    flex: 1;
    padding: 0.45rem;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-size: 0.875rem;
    font-weight: 600;
}

.icon-picker__tabs [aria-selected="true"] {
    background: var(--accent-soft);
    color: var(--accent);
}

.icon-picker__hint {
    font-size: 0.8125rem;
}

.icon-picker__upload {
    display: grid;
    justify-items: start;
    gap: 0.75rem;
    padding: 1rem 0;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
    align-content: start;
    gap: 0.4rem;
    height: 320px;
    overflow-y: auto;
}

.icon-grid__item {
    display: grid;
    place-items: center;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 1.05rem;
}

.icon-grid__item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.icon-img {
    width: 1.25em;
    height: 1.25em;
    object-fit: contain;
}

/* ---------- Site navigation (components/site_nav.php) ---------- */
/* At the top the bar is open and without a background; once the page scrolls (user-menu.js sets .is-scrolled) it
   draws together into a floating glass island in the middle, instead of a dark band across the whole width. */
.nav {
    --island: cubic-bezier(0.2, 0.9, 0.25, 1);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-inline: auto;
    padding: 0.85rem max(1.25rem, calc((100% - 1160px) / 2));
    border: 1px solid transparent;
    border-radius: 0;
    transition:
        top 0.5s var(--island),
        width 0.6s var(--island),
        padding 0.6s var(--island),
        margin 0.6s var(--island),
        border-radius 0.6s var(--island),
        background-color 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

/* The home page shows the bar as this box from the start (and keeps it); elsewhere it turns into it on scrolling */
/* Shape and place of the bar as a box: from the start on the home page (so nothing jumps there while scrolling),
   elsewhere once the page scrolls */
.nav.is-scrolled,
.home .nav {
    top: 0.65rem;
    width: min(1160px, calc(100% - 1.5rem)); /* as wide as the page content below (main) */
    margin-bottom: 0.75rem; /* the island is lower than the open bar: keep the page below where it was */
    padding: 0.55rem 0.6rem 0.55rem 1.4rem;
    border-radius: 999px; /* a full pill */
}

/* Its surface comes once the page scrolls (core/user-menu.js sets .is-scrolled); on the home page it only fades
   in and out (.home .nav below), as the box itself stays where it is */
.nav.is-scrolled {
    border-color: transparent; /* no frame: the blurred glass and a soft top highlight mark the edge */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 32px -14px rgba(0, 0, 0, 0.7);
}

/* The glass sits on its own layer: a blur on the bar itself would stop the blur of the menu inside it
   (.nav-menu__panel), as a backdrop-filter only sees what is inside an ancestor that blurs */
.nav::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-color: color-mix(in srgb, var(--bg) 35%, transparent);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav.is-scrolled::before {
    opacity: 1;
}

.home .nav {
    transition:
        border-color 0.45s ease,
        box-shadow 0.45s ease;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav__brand img {
    height: 22px;
    width: auto;
}

.nav__brand-name {
    display: block;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* "Collective Network" marked blue, like selected text (the home page sweeps the blue in, home.css) */
.nav__brand-text {
    display: block;
    padding: 0.08em 0.4em;
    border-radius: 6px;
    background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 0 / 100% 100%; /* the Register button's blue */
    color: #fff;
}

/* Phones: the log in / register buttons need the room */
@media (max-width: 480px) {
    .nav__brand-name {
        display: none;
    }
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

/* Links to the sections of the home page (site_nav $sections), left of the account; laptops and up only */
.nav__sections {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.nav__sections a {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    color: var(--text-soft);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--fast) ease, background-color var(--fast) ease;
}

.nav__sections a:hover,
.nav__sections a:focus-visible {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 960px) {
    .nav__sections {
        display: none;
    }
}

/* Signed out on wide screens: language, log in and register sit in the bar as they are */
.nav__wide {
    display: contents;
}

/* The menu behind three lines (site_nav.php): section links, and signed out language, log in and register.
   Only on smaller screens; signed out it takes over from the bar's buttons below 720px. */
.nav-menu {
    position: relative;
    display: none;
}

.nav-menu__trigger {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
    list-style: none;
    cursor: pointer;
    transition: background-color var(--fast) ease, border-color var(--fast) ease;
}

.nav-menu__trigger::-webkit-details-marker {
    display: none;
}

.nav-menu__trigger i {
    grid-area: 1 / 1;
}

.nav-menu__trigger .fa-xmark,
.nav-menu[open] .nav-menu__trigger .fa-bars {
    display: none;
}

.nav-menu[open] .nav-menu__trigger .fa-xmark {
    display: block;
}

.nav-menu[open] .nav-menu__trigger {
    border-color: rgba(255, 255, 255, 0.28);
    background: var(--surface-2);
}

.nav-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    display: grid;
    gap: 0.5rem;
    width: min(280px, calc(100vw - 1.5rem));
    padding: 0.5rem;
    /* The same surface as the account menu (.account-panel) */
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--bg-raised) 97%, transparent);
    box-shadow: var(--shadow);
    --panel-from: -6px;
    transform-origin: top right;
    animation: account-panel-in 0.14s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.nav-menu__links {
    display: grid;
}

.nav-menu__links a {
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius);
    color: var(--text-soft);
    font-size: 0.9375rem;
    font-weight: 500;
}

.nav-menu__links a:hover,
.nav-menu__links a:focus-visible {
    background: var(--surface-hover);
    color: var(--text);
}

.nav-menu__account {
    display: grid;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

.nav-menu__account:first-child {
    padding-top: 0;
    border-top: 0;
}

.nav-menu__account .site-language {
    margin: 0;
}

.nav-menu__account .btn {
    border-radius: 999px;
}

/* With section links, the menu comes as soon as they leave the bar */
@media (max-width: 960px) {
    .nav-menu--sections {
        display: block;
    }
}

/* Signed out: below 720px everything but the logo goes into the menu */
@media (max-width: 720px) {
    .nav-menu {
        display: block;
    }

    .nav__wide {
        display: none;
    }
}

/* Between 720 and 960px signed out, the bar still has its buttons: the menu shows only the section links */
@media (min-width: 721px) {
    .nav-menu__account {
        display: none;
    }
}

/* Log in / Register in the bar: a size up from the small buttons, pills like the bar */
.nav__actions .btn--sm {
    border-radius: 999px;
    min-height: 40px;
    padding: 0 1rem;
    font-size: 0.875rem;
}

/* Avatar menu (components/site_nav.php) */
.user-menu {
    position: relative;
}

.user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    height: 44px;
    padding: 0 0.85rem 0 0.3rem;
    border: 1px solid transparent; /* no box: avatar and name stand on their own, a soft pill only on hover */
    border-radius: 999px; /* a pill, like the bar it sits in */
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.user-menu__trigger::-webkit-details-marker {
    display: none;
}

.user-menu__trigger,
.sidebar-account__summary {
    position: relative;
    isolation: isolate;
}

/* Account button (home page bar, Control and Admin sidebar): a soft pill grows in under the mouse, like the home
   page's section links, and is gone the moment the mouse leaves */
.user-menu__trigger::before,
.sidebar-account__summary::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.user-menu__trigger:hover::before,
.sidebar-account__summary:hover::before {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-menu__avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a3d44, #101114); /* no picture: black-grey, not a colour */
    font-size: 0.875rem;
    font-weight: 800;
}

.user-menu__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu__name {
    max-width: 14ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__caret {
    font-size: 0.625rem;
    color: var(--text-muted);
    transition: transform var(--normal) var(--ease);
}

.user-menu[open] .user-menu__caret {
    transform: rotate(180deg);
}

/* Where the account panel hangs; how it looks is .account-panel below */
.user-menu__list {
    position: absolute;
    top: calc(100% + 6px); /* right under the account button */
    right: 0;
    z-index: 60;
    transform-origin: top right;
}

@keyframes menu-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

/* ---------- Role label next to the name in the account menus (roleBadge() in bio_helper.php): User, Staff, Owner */
.role-badge {
    --role: #a1a1aa;
    flex: none;
    padding: 0.12rem 0.5rem;
    border: 1px solid color-mix(in srgb, var(--role) 40%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--role) 14%, transparent);
    color: var(--role);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-transform: uppercase;
}

.role-badge--staff { --role: #60a5fa; }
.role-badge--owner { --role: #fbbf24; }

.user-menu .role-badge {
    padding: 0.1rem 0.45rem;
    font-size: 0.625rem;
}

/* Shared profile menu (home, Control and Admin). */
.account-panel {
    --panel-from: -6px;
    display: grid;
    width: 256px;
    max-width: calc(100vw - 1.5rem);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    /* Solid enough to need no blur: a blur here (inside the blurred bar) made every hover repaint slowly */
    background: color-mix(in srgb, var(--bg-raised) 97%, transparent);
    box-shadow: var(--shadow);
    color: var(--text);
    text-align: start;
}

/* Keep the hover target continuous from the trigger to the panel. */
.account-panel::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: var(--bridge-top, -20px);
    bottom: var(--bridge-bottom, auto);
    height: 20px; /* covers the gap to the button (16px on the home page, 12px in Control and Admin) */
}

@media (prefers-reduced-motion: no-preference) {
    /* Opens fast: most of the way in the first few frames, then it settles */
    .account-panel.is-opening {
        transform-origin: top right;
        animation: account-panel-in 0.14s cubic-bezier(0.2, 0.9, 0.3, 1);
    }
}

@keyframes account-panel-in {
    from { opacity: 0; transform: translateY(var(--panel-from)) scale(0.97); }
}

.account-panel__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 4px 4px;
    padding: 4px 0 8px 6px;
    border-bottom: 1px solid var(--line);
}

.account-panel__url {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font: 500 0.75rem var(--font-mono);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-panel__url span {
    color: var(--text-muted);
}

.account-panel__copy {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-soft);
    font-size: 0.8125rem;
}

.account-panel__copy:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.account-panel__copy.is-copied {
    color: var(--success);
}

.account-panel__rows {
    display: grid;
}

.account-panel__row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 7px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
}

/* No fade: the highlight is wherever the mouse is, right away */
.account-panel__row:hover {
    background: var(--surface-hover);
}

.account-panel__row--logout:hover {
    background: color-mix(in srgb, var(--danger) 13%, transparent);
}

.account-panel__row--logout:hover,
.account-panel__row--logout:hover .account-panel__icon {
    color: color-mix(in srgb, var(--danger) 65%, var(--text));
}

.account-panel__row:focus-visible,
.account-panel__copy:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.account-panel__icon {
    flex: none;
    width: 16px;
    color: var(--text-soft);
    font-size: 0.8125rem;
    text-align: center;
}

.account-panel__footer {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
}

/* Account card at the bottom of the sidebar */
.sidebar-account {
    position: relative;
    padding-top: 0.75rem;
}

.sidebar-account__summary {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid transparent; /* no box: a soft pill only on hover */
    border-radius: 999px; /* round, like the account button on the home page */
    background: transparent;
    cursor: pointer;
    list-style: none;
    transition: background-color var(--fast) ease, border-color var(--fast) ease;
}

.sidebar-account__summary::-webkit-details-marker {
    display: none;
}



.sidebar-account__trigger {
    position: relative;
    flex: none;
}

.sidebar-account__avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #3a3d44, #101114); /* no picture: black-grey, not a colour */
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-strong);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.sidebar-account__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Live Discord status, same colors as Discord */
.sidebar-account__status {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 12px;
    height: 12px;
    border: 2.5px solid var(--bg);
    border-radius: 50%;
    background: #80848e;
}

.sidebar-account__status[data-status="online"] { background: #23a55a; }
.sidebar-account__status[data-status="idle"] { background: #f0b232; }
.sidebar-account__status[data-status="dnd"] { background: #f23f43; }

.sidebar-account__who {
    display: grid;
    flex: 1;
    gap: 0.1rem;
    min-width: 0;
    line-height: 1.25;
}

.sidebar-account__name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.sidebar-account__name strong,
.sidebar-account__url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-account__name strong {
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.sidebar-account__url {
    color: var(--text-muted);
    font-size: 0.6875rem;
}

.sidebar-account__more {
    color: var(--text-muted);
    font-size: 0.6875rem;
    transition: transform var(--fast) ease;
}

.sidebar-account[open] .sidebar-account__more {
    transform: rotate(180deg);
}

/* Where the account panel opens (above the account card); how it looks is .account-panel in components.css */
.sidebar-account__list {
    position: absolute;
    bottom: calc(100% - 0.75rem + 6px); /* right above the account button (the card has 0.75rem of room on top) */
    left: 0;
    z-index: 50;
    transform-origin: bottom left;
    --panel-from: 6px; /* it opens upwards, out of the account card below it */
    --bridge-top: auto; /* the gap is below it */
    --bridge-bottom: -12px;
}

.sidebar-account .role-badge {
    padding: 0.05rem 0.4rem;
    font-size: 0.5625rem;
}

@media (max-width: 600px) {
    .nav__link,
    .user-menu__name,
    .user-menu .role-badge {
        display: none;
    }

    .user-menu__trigger {
        padding-right: 0.6rem;
    }
}

/* ---------- Toast ---------- */
.toasts {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9500;
    display: grid;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(10, 10, 14, 0.95);
    box-shadow: var(--shadow);
    font-size: 0.875rem;
    font-weight: 600;
    animation: dialog-in var(--normal) var(--ease);
}

.toast--success i {
    color: var(--success);
}

.toast--error {
    border-color: rgba(239, 68, 68, 0.4);
}

.toast--error i {
    color: var(--danger);
}

/* ---------- Tooltip: data-tip="Text" on any element ---------- */
[data-tip] {
    position: relative;
}

[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    z-index: 100;
    padding: 0.3rem 0.55rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: rgba(10, 10, 14, 0.96);
    color: #fff;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 4px);
    transition: opacity var(--fast) ease, transform var(--fast) ease;
}

[data-tip]:hover::after,
[data-tip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Page top bar (settings, legal pages): back button + logo ---------- */
.page-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.page-top__logo {
    height: 16px;
    width: auto;
}

/* ---------- Sky (components/sky.php): glows that drift slowly behind the home page and Control; in winter
   (.is-winter on the home page) snow and a warm glow. Calm: dimmer, for tools that should step back. ---------- */
.sky {
    position: fixed;
    inset: 0;
    z-index: -1; /* above the page's own colour (the body's, painted on the canvas), below everything on it */
    overflow: hidden;
    pointer-events: none;
}

.sky__glow {
    position: absolute;
    width: 62vmax;
    height: 62vmax;
    border-radius: 50%;
    filter: blur(90px);
    will-change: transform;
}

.sky__glow--a {
    top: -30vmax;
    left: -18vmax;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.32), transparent 65%);
    animation: sky-drift-a 34s ease-in-out infinite alternate;
}

.sky__glow--b {
    top: 10vmax;
    right: -26vmax;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 65%);
    animation: sky-drift-b 42s ease-in-out infinite alternate;
}

.sky__glow--c {
    bottom: -36vmax;
    left: 20vmax;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1), transparent 65%);
    animation: sky-drift-c 50s ease-in-out infinite alternate;
}

/* Winter: one glow turns to warm candle light, and the snow falls in front of the glows */
.is-winter .sky__glow--c {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.13), rgba(239, 68, 68, 0.05) 45%, transparent 68%);
}

.sky__snow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

@keyframes sky-drift-a {
    to { transform: translate(14vmax, 10vmax) scale(1.12); }
}

@keyframes sky-drift-b {
    to { transform: translate(-16vmax, 12vmax) scale(0.9); }
}

@keyframes sky-drift-c {
    to { transform: translate(-12vmax, -14vmax) scale(1.15); }
}
.sky--calm .sky__glow {
    opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
    .sky__glow {
        animation: none;
    }
}

/* ---------- Santa hat on the logo in winter (isWinterSeason(): only the home page's bar adds .winter-hat) ----------
   Set at a slant on the C; --hat-x / --hat-y move it with the logo's own padding. */
.winter-hat {
    --hat-x: 0px;
    --hat-y: 0px;
    position: relative;
}

.winter-hat::before {
    content: '';
    position: absolute;
    top: calc(var(--hat-y) - 12px);
    left: calc(var(--hat-x) - 9px);
    z-index: 1;
    width: 26px;
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='22' viewBox='0 0 26 22'%3E%3Cpath fill='%23e11d2e' d='M4 17C6 9 11 3 18 3c3 0 5 2 5 5-3-1-5 0-6 3l-1 6Z'/%3E%3Cpath fill='%23b5121f' d='M17 11c1-3 3-4 6-3l-1 2c-2 0-3 1-4 3Z'/%3E%3Crect x='2' y='15' width='17' height='5' rx='2.5' fill='%23f4f8ff'/%3E%3Ccircle cx='22.5' cy='8.5' r='3' fill='%23f4f8ff'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.5));
    rotate: -18deg;
    pointer-events: none;
}

/* The bar's bigger logo (22 px instead of 16 px): the hat grows with it */
.nav__brand.winter-hat::before {
    top: calc(var(--hat-y) - 16px);
    left: calc(var(--hat-x) - 12px);
    width: 35px;
    height: 30px;
}

/* ---------- The account's name in its rank colour (nameTone() in bio_helper.php): site bar, Control, admin ----------
   Doubled class: wins over each menu's own name colour. Everyone else keeps the plain white. */
.name-tone.name-tone--owner {
    color: #f6c945;
}

.name-tone.name-tone--developer {
    color: #c4c8d0;
}

.name-tone.name-tone--staff {
    color: #4a9bff;
}

/* ---------- An admin signed in as someone else (layouts/app.php, App\Libraries\Impersonation) ---------- */
.impersonation-bar {
    /* A floating pill at the bottom: the studio fills the whole screen, a bar on top would push it down */
    position: fixed;
    bottom: 1rem;
    left: 50%;
    z-index: 1500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.85rem;
    max-width: calc(100vw - 2rem);
    padding: 0.45rem 0.5rem 0.45rem 1rem;
    border-radius: 999px;
    background: #f59e0b;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    transform: translateX(-50%);
    color: #1a1200;
    font-size: 0.875rem;
    font-weight: 500;
}

.impersonation-bar strong {
    font-weight: 700;
}

.impersonation-bar form {
    display: inline;
}

.impersonation-bar .btn {
    border-color: rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
}

/* "Continue with Google" / "Connect Google" (auth/social_buttons.php, settings): white, with Google's colored G */
.btn--google {
    gap: 0.6rem;
    border-color: #dadce0;
    background: #fff;
    color: #1f1f1f;
}

.btn--google:hover {
    border-color: #c6c9cc;
    background: #f2f4f7;
    color: #1f1f1f;
}

.google-logo {
    flex: none;
}

/* ---------- Brand marks of the 18+ platforms (Config\Bio::$socialPlatforms: "brand-icon brand-icon--{key}") ----------
   Font Awesome has none of them. OnlyFans is its logo (Simple Icons, CC0) as a mask in the text color; the others,
   with no free logo, a short lettermark. Both sit in a 1em box like an <i> icon, so they work wherever icons go:
   socials, links, the studio and the 18+ creator card. */
.brand-icon {
    display: inline-grid;
    place-items: center;
    min-width: 1em;
    height: 1em;
    font-family: var(--font, sans-serif);
    font-style: normal;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    vertical-align: -0.125em;
}

.brand-icon::before {
    font-size: 0.62em;
}

.brand-icon--onlyfans {
    width: 1.15em;
    background: currentColor;
    -webkit-mask: url('../../../img/brands/onlyfans.svg') center / contain no-repeat;
    mask: url('../../../img/brands/onlyfans.svg') center / contain no-repeat;
}

.brand-icon--fansly::before { content: 'FS'; }
.brand-icon--fanvue::before { content: 'FV'; }
.brand-icon--loyalfans::before { content: 'LF'; }
.brand-icon--fancentro::before { content: 'FC'; }
.brand-icon--admireme::before { content: 'AM'; }
.brand-icon--manyvids::before { content: 'MV'; }
.brand-icon--pornhub::before { content: 'PH'; }
.brand-icon--xhamster::before { content: 'xH'; }
.brand-icon--chaturbate::before { content: 'CB'; }
.brand-icon--stripchat::before { content: 'SC'; }
.brand-icon--bongacams::before { content: 'BC'; }
.brand-icon--camsoda::before { content: 'CS'; }

/* Three letters: a little smaller, so they keep about the width of an icon */
.brand-icon--justforfans::before { content: 'JFF'; font-size: 0.5em; }
.brand-icon--clips4sale::before { content: 'C4S'; font-size: 0.5em; }
.brand-icon--iwantclips::before { content: 'iWC'; font-size: 0.5em; }
.brand-icon--myfreecams::before { content: 'MFC'; font-size: 0.5em; }

/* Coins Font Awesome has no icon for (crypto socials): their logos (Simple Icons, CC0) as masks in the text color */
.brand-icon--tether { --brand-mark: url('../../../img/brands/tether.svg'); }
.brand-icon--solana { --brand-mark: url('../../../img/brands/solana.svg'); }
.brand-icon--litecoin { --brand-mark: url('../../../img/brands/litecoin.svg'); }
.brand-icon--bnb { --brand-mark: url('../../../img/brands/bnb.svg'); }
.brand-icon--xrp { --brand-mark: url('../../../img/brands/xrp.svg'); }
.brand-icon--dogecoin { --brand-mark: url('../../../img/brands/dogecoin.svg'); }
.brand-icon--ton { --brand-mark: url('../../../img/brands/ton.svg'); }

:is(.brand-icon--tether, .brand-icon--solana, .brand-icon--litecoin, .brand-icon--bnb, .brand-icon--xrp, .brand-icon--dogecoin, .brand-icon--ton) {
    width: 1em;
    background: currentColor;
    -webkit-mask: var(--brand-mark) center / contain no-repeat;
    mask: var(--brand-mark) center / contain no-repeat;
}

.site-language {
    position: relative;
    margin: 3px 4px;
    font-size: 0.8125rem;
}

.site-language__trigger,
.site-language__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 34px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-align: start;
    cursor: pointer;
}

.site-language__trigger {
    list-style: none;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.site-language__trigger::-webkit-details-marker {
    display: none;
}

.site-language__trigger:hover,
.site-language__option:hover {
    background: var(--surface-hover);
}

.site-language__trigger:focus-visible,
.site-language__option:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.site-language__trigger i,
.site-language__option i {
    margin-inline-start: auto;
    color: var(--text-soft);
    font-size: 0.625rem;
}

.site-language[open] .site-language__trigger i {
    transform: rotate(180deg);
}

.site-language__flag {
    flex: none;
    width: 21px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
}

.site-language__options {
    margin: 4px 0 0;
    padding: 4px;
    list-style: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
}

.site-language--compact {
    margin: 0;
}

.nav .site-language__trigger {
    border-radius: 999px; /* pills in the top bar */
}

.site-language--compact .site-language__options {
    position: absolute;
    z-index: 60;
    inset-inline-end: 0;
    min-width: 9rem;
    box-shadow: var(--shadow);
}

@media (max-width: 480px) {
    .site-language--compact .site-language__name {
        display: none;
    }

    .nav__actions {
        gap: 0.35rem;
    }

    .nav__actions .btn--sm {
        padding-inline: 0.55rem;
    }
}

/* A badge so dark (e.g. Anonym's black) it would vanish on a dark page: a fine light halo keeps it visible, the
   badge itself stays its colour (badgeToneClass() in bio_helper.php) */
.is-dark-badge i,
.is-dark-badge .badge-img {
    filter: drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 5px rgba(255, 255, 255, 0.4)) !important;
}

/* ---------- Account menu, open: button and panel are one piece. The button turns into the top of a card and the
   panel hangs from it with no gap, both in the same solid colour; the panel unrolls out of the button ---------- */
.user-menu {
    min-width: 256px; /* as wide as its panel, so the two line up edge to edge */
}

.user-menu__trigger {
    width: 100%;
}

.user-menu__caret {
    margin-left: auto;
}

.user-menu[open] .user-menu__trigger {
    border-radius: 22px 22px 0 0;
    background: #141518;
}

.user-menu[open] .user-menu__trigger::before {
    opacity: 0;
    transition: none;
}

.user-menu__list {
    top: 100%;
    left: 0;
}

.user-menu__list.account-panel {
    width: auto;
    border: 0;
    border-radius: 0 0 18px 18px;
    background: #141518;
    box-shadow: 0 28px 48px -20px rgba(0, 0, 0, 0.85);
}

.user-menu__list.account-panel::before,
.sidebar-account__list.account-panel::before {
    display: none; /* nothing to bridge: the panel touches the button */
}

@media (prefers-reduced-motion: no-preference) {
    .user-menu__list.account-panel.is-opening {
        animation: account-unroll-down 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
    }

    .sidebar-account__list.account-panel.is-opening {
        animation: account-unroll-up 0.18s cubic-bezier(0.2, 0.9, 0.3, 1);
    }
}

@keyframes account-unroll-down {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0); }
}

@keyframes account-unroll-up {
    from { clip-path: inset(100% 0 0 0); }
    to { clip-path: inset(0); }
}

/* Control and Admin: the same, opening upwards out of the account button (only where the sidebar is full width) */
@media (min-width: 1361px) {
    .studio-body .sidebar-account__list {
        right: 0;
        bottom: calc(100% - 0.75rem); /* sits right on the button (the card has 0.75rem of room on top) */
        left: 0;
    }

    .studio-body .sidebar-account__list.account-panel {
        width: auto;
        border: 0;
        border-radius: 18px 18px 0 0;
        background: #141518;
        box-shadow: 0 -24px 44px -20px rgba(0, 0, 0, 0.85);
    }

    .studio-body .sidebar-account[open] .sidebar-account__summary {
        border-radius: 0 0 18px 18px;
        background: #141518;
    }

    .studio-body .sidebar-account[open] .sidebar-account__summary::before {
        opacity: 0;
        transition: none;
    }
}

@media (min-width: 861px) {
    .admin-body .sidebar-account__list {
        right: 0;
        bottom: calc(100% - 0.75rem); /* sits right on the button (the card has 0.75rem of room on top) */
        left: 0;
    }

    .admin-body .sidebar-account__list.account-panel {
        width: auto;
        border: 0;
        border-radius: 18px 18px 0 0;
        background: #141518;
        box-shadow: 0 -24px 44px -20px rgba(0, 0, 0, 0.85);
    }

    .admin-body .sidebar-account[open] .sidebar-account__summary {
        border-radius: 0 0 18px 18px;
        background: #141518;
    }

    .admin-body .sidebar-account[open] .sidebar-account__summary::before {
        opacity: 0;
        transition: none;
    }
}

/* Phones: the button is only the avatar, too small to carry the panel; it hangs below it on its own, as a card */
@media (max-width: 600px) {
    .user-menu {
        min-width: 0;
    }

    .user-menu__list {
        top: calc(100% + 6px);
        right: 0;
        left: auto;
    }

    .user-menu__list.account-panel {
        width: 256px;
        border-radius: 18px;
    }

    .user-menu[open] .user-menu__trigger {
        border-radius: 999px;
    }
}

/* ---------- Confirm dialog (core/dialog.js): a glassy card in the middle, an icon on top, the question centred and
   the two choices as pills of equal width; a risky one (danger) in red ---------- */
.dialog--confirm {
    width: min(380px, calc(100% - 2rem));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)), rgba(14, 15, 18, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 80px -20px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.dialog--confirm::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.dialog--confirm[open] {
    animation: dialog-pop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes dialog-pop {
    from { opacity: 0; transform: scale(0.94); }
}

.dialog--confirm .dialog__body {
    justify-items: center;
    gap: 0.5rem;
    padding: 1.75rem 1.75rem 1.25rem;
    text-align: center;
}

.dialog__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    color: var(--accent);
    font-size: 1.25rem;
}

.dialog--danger .dialog__icon {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
}

.dialog--confirm .dialog__title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dialog--confirm .dialog__text {
    color: var(--text-muted);
    font-size: 0.9063rem;
    line-height: 1.5;
}

.dialog--confirm .dialog__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 1.75rem 1.75rem;
    border-top: 0;
}

.dialog--confirm .dialog__actions .btn {
    min-height: 42px;
    border-radius: 999px;
}

.dialog--confirm .dialog__actions .btn--ghost {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.dialog--confirm .dialog__actions .btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dialog--danger .dialog__actions .btn--danger {
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
}

.dialog--danger .dialog__actions .btn--danger:hover {
    border-color: #dc2626;
    background: #dc2626;
}
