
    :root {
        --bg: #0c0e12;
        --surface: #15181f;
        --surface-2: #1c2029;
        --surface-hover: #232833;
        --border: #272c37;
        --border-soft: #1e222b;
        --text: #e7e9ec;
        --text-muted: #8b93a3;
        --text-faint: #5c6472;
        --accent: #5fa85f;
        --accent-hover: #72bb6d;
        --accent-soft: rgba(95, 168, 95, 0.14);
        --accent-text: #8fd48a;
        --danger: #d9534f;
        --danger-hover: #e2645f;
        --danger-soft: rgba(217, 83, 79, 0.14);
        --danger-text: #f0a6a3;
        --warning: #d99a4e;
        --warning-soft: rgba(217, 154, 78, 0.14);
        --warning-text: #f0c48c;
        --info: #5b8fd9;
        --info-soft: rgba(91, 143, 217, 0.14);
        --info-text: #a8c4f0;
        --scroll-thumb: #343b49;
        --scroll-thumb-hover: #475064;
        --chevron-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238b93a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        --chevron-img-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238fd48a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        --chevron-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23000000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    @media (prefers-color-scheme: light) {
        :root:not([data-theme="dark"]) {
            --bg: #f2f3f5;
            --surface: #ffffff;
            --surface-2: #eef0f3;
            --surface-hover: #e5e8ec;
            --border: #dde1e6;
            --border-soft: #e8eaed;
            --text: #1a1d23;
            --text-muted: #5b6270;
            --text-faint: #848c9b;
            --accent: #3f8f44;
            --accent-hover: #357a3a;
            --accent-soft: rgba(63, 143, 68, 0.12);
            --accent-text: #2b6b2f;
            --danger: #c53a35;
            --danger-hover: #ad322e;
            --danger-soft: rgba(197, 58, 53, 0.10);
            --danger-text: #a23631;
            --warning: #a8660a;
            --warning-soft: rgba(168, 102, 10, 0.10);
            --warning-text: #8f5709;
            --info: #2f66b3;
            --info-soft: rgba(47, 102, 179, 0.10);
            --info-text: #28558f;
            --scroll-thumb: #c3c9d3;
            --scroll-thumb-hover: #9ea7b6;
            --chevron-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235b6270' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
            --chevron-img-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%232b6b2f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        }
    }
    :root[data-theme="light"] {
        --bg: #f2f3f5;
        --surface: #ffffff;
        --surface-2: #eef0f3;
        --surface-hover: #e5e8ec;
        --border: #dde1e6;
        --border-soft: #e8eaed;
        --text: #1a1d23;
        --text-muted: #5b6270;
        --text-faint: #848c9b;
        --accent: #3f8f44;
        --accent-hover: #357a3a;
        --accent-soft: rgba(63, 143, 68, 0.12);
        --accent-text: #2b6b2f;
        --danger: #c53a35;
        --danger-hover: #ad322e;
        --danger-soft: rgba(197, 58, 53, 0.10);
        --danger-text: #a23631;
        --warning: #a8660a;
        --warning-soft: rgba(168, 102, 10, 0.10);
        --warning-text: #8f5709;
        --info: #2f66b3;
        --info-soft: rgba(47, 102, 179, 0.10);
        --info-text: #28558f;
        --scroll-thumb: #c3c9d3;
        --scroll-thumb-hover: #9ea7b6;
        --chevron-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%235b6270' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        --chevron-img-hover: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%232b6b2f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }
    body { background: var(--bg); color: var(--text); font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
    h1, h2, h3, .font-display { font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.01em; }
    .font-mono, code, pre, input, select, textarea { font-family: 'JetBrains Mono', ui-monospace, monospace; }
    ::selection { background: var(--accent-soft); color: var(--accent-text); }

    .surface { background: var(--surface); border: 1px solid var(--border); }
    .surface-2 { background: var(--surface-2); border: 1px solid var(--border); }
    .btn { border: 1px solid transparent; font-family: 'Space Grotesk', sans-serif; font-weight: 600; transition: background .12s ease, transform .08s ease, border-color .12s ease; }
    .btn:active { transform: translateY(1px); }
    .btn-accent { background: var(--accent); color: #0c0e12; }
    .btn-accent:hover { background: var(--accent-hover); }
    .btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
    .btn-outline:hover { background: var(--surface-hover); border-color: var(--text-faint); }
    .btn-danger { background: var(--danger); color: #fff; }
    .btn-danger:hover { background: var(--danger-hover); }
    .btn-danger-ghost { background: rgba(217,83,79,0.08); border: 1px solid rgba(217,83,79,0.35); color: var(--danger-text); }
    .btn-danger-ghost:hover { background: var(--danger-soft); }
    .btn-warning { background: var(--warning); color: #241505; }
    .btn-std { display: inline-flex; align-items: center; justify-content: center; height: 2.125rem; padding-top: 0; padding-bottom: 0; line-height: 1rem; }
    .card-actions form { display: flex; margin: 0; }
    .card-actions .btn { display: inline-flex; align-items: center; justify-content: center; }

    .pill { border-radius: 999px; font-weight: 600; }
    .pill-accent { background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(95,168,95,0.35); }
    .pill-muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
    .pill-danger { background: var(--danger-soft); color: var(--danger-text); border: 1px solid rgba(217,83,79,0.35); }

    [data-role="error"]:empty { display: none; }
    .player-list { max-height: 18rem; overflow-y: auto; margin: 0; padding: 0; list-style: none; -webkit-overflow-scrolling: touch; }
    .player-row { display: flex; align-items: center; gap: 0.65rem; padding: 0.3rem 0.4rem; border-radius: 0.5rem; min-height: 2.75rem; }
    .player-row:hover { background: var(--surface-hover); }
    .player-avatar { width: 2rem; height: 2rem; flex: none; border-radius: 0.35rem; display: flex; align-items: center; justify-content: center;
        font-weight: 700; font-size: 0.8rem; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(95,168,95,0.35); }
    .player-head { display: inline-block; flex: none; image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 2px; background: var(--surface-2); vertical-align: -0.25em; }
    .player-head.player-head-failed { display: none; }
    .player-avatar { position: relative; overflow: hidden; }
    .player-avatar .player-head { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; vertical-align: top; }
    .player-tag { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
    .player-avatar.op { background: var(--warning-soft); color: var(--warning-text); border-color: rgba(217,154,78,0.35); }
    .player-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; color: var(--text); }
    .player-remove { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; font-size: 1.25rem; line-height: 1; color: var(--text-muted);
        background: transparent; border: 1px solid transparent; cursor: pointer; }
    .player-remove:hover, .player-remove:focus-visible { background: var(--danger-soft); color: var(--danger-text); border-color: rgba(217,83,79,0.35); }
    .player-remove:disabled { opacity: 0.5; cursor: wait; }
    .switch { position: relative; width: 2.75rem; height: 1.5rem; flex: none; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
        padding: 0; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
    .switch::before { content: ''; position: absolute; inset: -10px; }
    .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--text-muted);
        transition: transform 0.15s, background 0.15s; }
    .switch[aria-checked="true"] { background: var(--accent-soft); border-color: rgba(95,168,95,0.55); }
    .switch[aria-checked="true"]::after { transform: translateX(1.2rem); background: var(--accent-text); }
    .switch:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
    .switch:disabled { opacity: 0.6; cursor: wait; }
    .pill-warning { background: var(--warning-soft); color: var(--warning-text); border: 1px solid rgba(217,154,78,0.35); }
    .pill-info { background: var(--info-soft); color: var(--info-text); border: 1px solid rgba(91,143,217,0.35); }

    .banner-success { background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(95,168,95,0.35); border-radius: 8px; }
    .banner-error { background: var(--danger-soft); color: var(--danger-text); border: 1px solid rgba(217,83,79,0.35); border-radius: 8px; }
    .banner-warning { background: var(--warning-soft); color: var(--warning-text); border: 1px solid rgba(217,154,78,0.35); border-radius: 8px; }

    .field { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
    fieldset { min-width: 0; }
    input.field, select.field, textarea.field { min-width: 0; }
    .field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

    select.field { -webkit-appearance: none; -moz-appearance: none; appearance: none; cursor: pointer;
        background-image: var(--chevron-img); background-repeat: no-repeat; background-position: right .55rem center;
        background-size: .8rem .8rem; padding-right: 1.9rem; text-overflow: ellipsis; }
    select.field:hover:not(:disabled) { background-image: var(--chevron-img-hover); }
    select.field:disabled { cursor: not-allowed; }
    .chev-icon { display: inline-block; width: .8rem; height: .8rem; flex: none; vertical-align: middle; background-color: currentColor;
        -webkit-mask: var(--chevron-mask) center / contain no-repeat; mask: var(--chevron-mask) center / contain no-repeat; }

    textarea.field { resize: vertical; max-width: 100%; }

    input[type="number"].field { -moz-appearance: textfield; }
    input[type="number"].field::-webkit-outer-spin-button,
    input[type="number"].field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

    .number-stepper { position: relative; display: flex; width: 100%; min-width: 0; }
    .number-stepper input[type="number"].field { padding-right: 1.5rem; width: 100%; }
    .number-stepper-btns { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 1.3rem;
        display: flex; flex-direction: column; border-left: 1px solid var(--border); overflow: hidden;
        border-radius: 0 5px 5px 0; }
    .number-stepper-btn { flex: 1 1 50%; display: flex; align-items: center; justify-content: center;
        background: var(--surface); color: var(--text-faint); border: none; padding: 0; cursor: pointer;
        font-size: 8px; line-height: 1; }
    .number-stepper-btn:first-child { border-bottom: 1px solid var(--border); }
    .number-stepper-btn:hover { background: var(--surface-hover); color: var(--accent-text); }
    .number-stepper-btn:active { background: var(--accent-soft); }
    .number-stepper-btn:disabled { opacity: 0.35; cursor: not-allowed; }
    .combo { position: relative; display: flex; width: 100%; min-width: 0; }
    .combo input.field { width: 100%; padding-right: 1.9rem; }
    .combo-toggle { position: absolute; top: 1px; right: 1px; bottom: 1px; width: 1.9rem; display: block;
        background-color: transparent; background-image: var(--chevron-img); background-repeat: no-repeat;
        background-position: right .55rem center; background-size: .8rem .8rem; border: none; border-radius: 0 5px 5px 0;
        cursor: pointer; font-size: 0; line-height: 0; padding: 0; }
    .combo-toggle:hover:not(:disabled) { background-image: var(--chevron-img-hover); }
    .combo-toggle:disabled { opacity: .35; cursor: not-allowed; }
    .combo-list { position: fixed; z-index: 400; overflow-y: auto; background: var(--surface);
        border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.45);
        padding: .25rem; font-size: .75rem; }
    .combo-item { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem;
        padding: .35rem .5rem; border-radius: 5px; cursor: pointer; color: var(--text); }
    .combo-item.active { background: var(--surface-hover); }
    .combo-item.selected .combo-value { color: var(--accent-text); font-weight: 600; }
    .combo-value { font-family: 'JetBrains Mono', ui-monospace, monospace; }
    .combo-label { color: var(--text-faint); font-size: .68rem; white-space: nowrap; }

    .btn:disabled, button.btn[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.35); }

    a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
        outline: 2px solid var(--accent); outline-offset: 2px;
    }

    * { scrollbar-color: var(--scroll-thumb) transparent; scrollbar-width: thin; }
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-corner { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
    ::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
    .modal-box::-webkit-scrollbar-track { margin: 12px 0; }

    .card-hover { transition: border-color .15s ease, transform .1s ease; }
    .card-hover:hover { border-color: var(--text-faint); }

    .live-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); display: inline-block; animation: live-pulse 2s ease-in-out infinite; }
    @keyframes live-pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
    @media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

    details.section > summary { cursor: pointer; list-style: none; }
    details.section > summary::-webkit-details-marker { display: none; }
    details.section > summary .chevron { transition: transform .15s ease; }
    details.section[open] > summary .chevron { transform: rotate(90deg); }

    .status-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

    html { scrollbar-gutter: stable; }
    @supports not (scrollbar-gutter: stable) { html { overflow-y: scroll; } }
    #toast-stack { position: fixed; bottom: 1rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; max-width: 22rem; }
    .toast { padding: .65rem .9rem; border-radius: 8px; font-size: .8rem; font-weight: 500; box-shadow: 0 6px 20px rgba(0,0,0,.35); animation: toast-in .18s ease; }
    #announcement-stack { display: block; max-width: 98%; margin: 0 auto; padding: 0 1rem; box-sizing: border-box; }
    @media (min-width: 96rem) { #announcement-stack { max-width: 1750px; } }
    .announce-banner { display: flex; align-items: flex-start; gap: .65rem; margin-top: 1rem; padding: .75rem;
        font-size: .875rem; line-height: 1.4; border: 1px solid; border-radius: 8px;
        max-height: 40vh; overflow-y: auto; box-sizing: border-box; }
    .announce-banner.is-preview { margin-top: 0; max-height: none; }
    .announce-info { background: var(--info-soft); color: var(--info-text); border-color: rgba(91,143,217,0.35); }
    .announce-warning { background: var(--warning-soft); color: var(--warning-text); border-color: rgba(217,154,78,0.35); }
    .announce-critical { background: var(--danger-soft); color: var(--danger-text); border-color: rgba(217,83,79,0.35); }
    .announce-icon { flex-shrink: 0; }
    .sym { display: inline-block; width: 1em; height: 1em; vertical-align: -0.14em; flex-shrink: 0; object-fit: contain; line-height: 1; }
    .sym-mask { background-color: currentColor; -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat; }
    .announce-icon:empty { display: none; }
    .announce-body { min-width: 0; flex: 1 1 auto; word-break: break-word; }
    .announce-title { font-weight: 600; margin: 0 0 .15rem; }
    .announce-title:empty { display: none; }
    .announce-text { margin: 0; white-space: pre-line; }
    .announce-close { flex-shrink: 0; background: transparent; border: none; cursor: pointer;
        font-size: 1.2rem; line-height: 1; padding: 0 .35rem; margin: -.05rem -.2rem 0 0; border-radius: 5px; opacity: .75;
        color: inherit; font-family: inherit; }
    .announce-close:hover { opacity: 1; background: rgba(128,128,128,0.22); }
    @keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
    @media (prefers-reduced-motion: reduce) {
        .toast { animation: none; }
        .btn { transition: none; }
    }

    .progress-track { width: 100%; height: .55rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
    .progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .25s ease; }
    .progress-track.is-indeterminate .progress-fill { width: 38%; transition: none; animation: progress-slide 1.15s ease-in-out infinite; }
    @keyframes progress-slide { 0% { margin-left: -38%; } 100% { margin-left: 100%; } }
    @media (prefers-reduced-motion: reduce) {
        .progress-track.is-indeterminate .progress-fill { width: 100%; opacity: .45; animation: none; }
        .progress-fill { transition: none; }
    }


    .block-pattern {
        background-image:
            linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%),
            linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%);
        background-size: 16px 16px;
        background-position: 0 0, 8px 8px;
        opacity: .5;
    }

    .avatar-circle { border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--accent); color: #0c0e12; display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }

    .server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
    .server-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: border-color .15s ease, transform .12s ease; display: flex; flex-direction: column; }
    .server-card:hover { border-color: var(--text-faint); }
    .server-card.just-appeared { animation: card-appear .5s ease; }
    @keyframes card-appear { from { opacity: 0; transform: scale(.97); background: var(--accent-soft); } to { opacity: 1; transform: scale(1); } }
    @media (prefers-reduced-motion: reduce) { .server-card.just-appeared { animation: none; } }

    .dash-section + .dash-section { margin-top: 1.75rem; }
    .dash-section-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
    .dash-section-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: .95rem; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
    .dash-section-count { font-family: 'JetBrains Mono', monospace; font-size: 10px; line-height: 1; padding: 3px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-faint); border: 1px solid var(--border-soft); flex-shrink: 0; }
    .dash-section-head .dash-section-star { width: 14px; height: 14px; fill: var(--warning); stroke: var(--warning); stroke-width: 1.8; stroke-linejoin: round; flex-shrink: 0; }
    .dash-search { max-width: 22rem; }
    .pin-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: -3px -4px -3px 0; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text-faint); cursor: pointer; flex-shrink: 0; transition: color .15s ease, background .15s ease; }
    .pin-btn:hover { color: var(--warning); background: var(--surface-2); }
    .pin-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
    .pin-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; pointer-events: none; }
    .pin-btn.is-pinned { color: var(--warning); }
    .pin-btn.is-pinned svg { fill: currentColor; }
    .pin-btn[disabled] { opacity: .6; cursor: default; }
    .server-card[data-favorite="1"] { border-color: rgba(217,154,78,0.4); }
    @media (hover: none) and (pointer: coarse) { .pin-btn { width: 36px; height: 36px; margin: -6px -6px -6px 0; } }

    .tab-bar { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 1px solid var(--border); }
    .tab-btn { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .78rem; padding: .6rem .9rem; color: var(--text-muted); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .12s ease, border-color .12s ease; }
    .adm-grid { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); column-gap: 2rem; align-items: start; }
    .adm-grid > * { grid-column: 1 / -1; }
    .adm-grid > .tab-bar { grid-column: 1; grid-row: 2; position: sticky; top: 1rem; flex-direction: column; align-items: stretch; overflow-x: visible; overflow-y: auto; max-height: calc(100vh - 2rem); border: 0; gap: 1px; }
    .adm-grid > .tab-panel { grid-column: 2; grid-row: 2; min-width: 0; }
    .adm-grid > #adm-nav { display: none; }
    .adm-grid .tab-bar .tab-btn { text-align: left; border-radius: 4px; padding: .35rem .7rem; white-space: normal; border-bottom: 0; }
    .adm-grid .tab-bar .tab-btn.active { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
    .tab-bar .grp { font-size: .7rem; color: var(--text-faint); margin: .7rem .7rem .25rem; }
    #adm-q { width: 100%; margin-bottom: .5rem; }
    #adm-res { display: flex; flex-direction: column; margin-bottom: .4rem; }
    #adm-res button { text-align: left; padding: .4rem .7rem; border-radius: 4px; font-size: .8rem; display: flex; flex-direction: column; }
    #adm-res button:hover { background: var(--surface-hover); }
    #adm-res span { color: var(--text-faint); font-size: .7rem; }
    .acc > h2 { cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin: 0 !important; }
    .acc > h2::after { content: "+"; color: var(--text-faint); }
    .acc.open > h2::after { content: "\2212"; }
    .acc.open > h2 { margin-bottom: .8rem !important; }
    .acc:not(.open) > .acc-body { display: none; }
    @media (max-width: 760px) {
        .adm-grid { display: block; }
        .adm-grid > .tab-bar { display: none; }
        .adm-grid > #adm-nav { display: block; width: 100%; margin-bottom: .75rem; }
        table.ucards { overflow: visible; }
        .ucards thead { display: none; }
        .ucards, .ucards tbody { display: block; }
        .ucards tr { display: grid !important; grid-template-columns: auto auto 1fr; gap: .55rem .6rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border) !important; }
        .ucards td { display: block; padding: 0 !important; min-width: 0; }
        .ucards td:nth-child(1) { grid-column: 1 / -1; font-size: 1rem; }
        .ucards td:nth-child(4) { text-align: right; }
        .ucards td:nth-child(4)::before { content: attr(data-l) " "; color: var(--text-faint); font-size: .75rem; }
        .ucards td:nth-child(5), .ucards td:nth-child(6) { grid-column: 1 / -1; }
        .ucards td:nth-child(5)::before { content: attr(data-l); display: block; color: var(--text-faint); font-size: .75rem; margin-bottom: .3rem; }
        .ucards input[type=number] { width: 4.6rem !important; }
        .ucards select { width: auto !important; max-width: 100%; }
        .ucards td:nth-child(6) > div { justify-content: flex-start !important; }
    }
    .tab-panel.active:not(.grid):not(.fluid-grid) { display: flex; flex-direction: column; gap: 1.25rem; }
    .tab-panel.active.grid, .tab-panel.active.fluid-grid { gap: 1.25rem; }
    .tab-panel > * { margin-block: 0 !important; }
    .tab-panel > .grid, .grid:has(> .stat-tile), .grid:has(> .surface), .server-grid { gap: 1.25rem !important; }
    @media (max-width: 640px) {
        .tab-panel.active:not(.grid):not(.fluid-grid), .tab-panel.active.grid, .tab-panel.active.fluid-grid { gap: 1rem; }
        .tab-panel > .grid, .grid:has(> .stat-tile), .grid:has(> .surface), .server-grid { gap: 1rem !important; }
    }
    .tab-btn:hover { color: var(--text); }
    .tab-btn.active { color: var(--accent-text); border-color: var(--accent); }
    .page-wrap { width: 100%; max-width: none; margin-inline: auto; padding-inline: clamp(.75rem, 2.2vw, 2.5rem); }
    .fluid-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr)); gap: .9rem 1.5rem; align-items: start; }
    .fluid-grid > .span-all, .fluid-grid > p { grid-column: 1 / -1; }
    .fluid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.25rem; align-items: start; }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }
    .tab-panel.active.grid { display: grid; }
    .tab-panel.active.fluid-grid { display: grid; }
    .eq-card { display: flex; flex-direction: column; }
    .eq-card > .eq-form { flex: 1 1 auto; display: flex; flex-direction: column; }
    .eq-push { margin-top: auto; }
    .eq-card > .acc-body { flex: 1 1 auto; display: flex; flex-direction: column; }
    .eq-card > .acc-body > .eq-form { flex: 1 1 auto; display: flex; flex-direction: column; }


    .modal-overlay { position: fixed; inset: 0; background: rgba(5,6,8,.72); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: overlay-in .15s ease; }
    @keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
    .modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; max-width: 640px; width: 100%; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: modal-in .18s ease; }
    .modal-box-lg { max-width: 820px; }

    .confirm-overlay { position: fixed; inset: 0; background: rgba(5,6,8,.78); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: overlay-in .12s ease; }
    .confirm-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; max-width: 440px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.55); padding: 1.4rem 1.4rem 1.1rem; animation: modal-in .16s ease; }
    .confirm-box.is-danger { border-color: rgba(217,83,79,0.45); }
    .confirm-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.15rem; margin-bottom: .7rem; background: var(--info-soft); color: var(--info-text); }
    .confirm-box.is-danger .confirm-icon { background: var(--danger-soft); color: var(--danger-text); }
    .confirm-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; }
    .confirm-message { font-size: .8rem; line-height: 1.5; color: var(--text-muted); white-space: pre-line; word-break: break-word; }
    .confirm-input-wrap { margin-top: .8rem; }
    .confirm-input-wrap label { display: block; font-size: .7rem; color: var(--text-faint); margin-bottom: .3rem; }
    .confirm-input-wrap input { width: 100%; padding: .5rem .65rem; border-radius: 6px; font-size: .8rem; background: var(--bg); border: 1px solid var(--border); color: var(--text); }
    .confirm-actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.1rem; }
    .confirm-actions .btn { padding: .5rem 1rem; border-radius: 6px; font-size: .78rem; }
    .confirm-actions .btn:disabled { opacity: .45; cursor: not-allowed; }

    .seg-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; background: var(--bg); }
    .seg-toggle button { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: .68rem; padding: .3rem .7rem; color: var(--text-muted); transition: background .12s ease, color .12s ease; }
    .seg-toggle button:hover { color: var(--text); }
    .seg-toggle button.active { background: var(--accent-soft); color: var(--accent-text); }
    .motd-strip { min-height: 1.9rem; padding: .3rem .45rem; background: #080a0d; border: 1px solid var(--border);
        border-radius: 6px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .8rem; line-height: 1.25rem;
        white-space: pre-wrap; word-break: break-all; user-select: none; -webkit-user-select: none; cursor: default; }
    .motd-ch { cursor: pointer; border-radius: 2px; }
    .motd-ch:hover { background: rgba(255,255,255,.14); }
    .motd-ch.sel { background: rgba(110,160,255,.45); box-shadow: 0 0 0 1px rgba(150,190,255,.75); }
    .motd-swatches { display: inline-flex; flex-wrap: wrap; gap: 3px; }
    .motd-swatch { width: 1.15rem; height: 1.15rem; border-radius: 4px; border: 1px solid rgba(128,128,128,.6); padding: 0; cursor: pointer; transition: transform .1s ease; }
    .motd-swatch:hover:not(:disabled) { transform: scale(1.15); }
    .motd-swatch.active { outline: 2px solid var(--accent-text); outline-offset: 1px; }
    .motd-tool-btn { font-size: .68rem; font-weight: 600; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--text-muted); cursor: pointer; }
    .motd-tool-btn:hover:not(:disabled) { color: var(--text); }
    .stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .8rem .95rem; min-width: 0; }
    .stat-tile .stat-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); font-family: 'Space Grotesk', sans-serif; font-weight: 600; }
    .stat-tile .stat-value { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.35rem; line-height: 1.2; margin-top: .2rem; }
    .stat-tile .stat-sub { font-size: .68rem; color: var(--text-muted); margin-top: .15rem; min-height: 1em; }
    .stat-bar { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: .5rem; overflow: hidden; }
    .stat-bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease, background .2s ease; }
    .stat-bar > span.warn { background: var(--warning); }
    .stat-bar > span.crit { background: var(--danger); }
    @keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
    @media (prefers-reduced-motion: reduce) { .modal-overlay, .modal-box { animation: none; } }

    .preset-card { border: 2px solid var(--border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .12s ease; background: var(--surface-2); text-align: left; }
    .preset-card:hover { border-color: var(--text-faint); }
    .preset-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
    .preset-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--bg); }
    .preset-thumb-placeholder { width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; font-size: 2.25rem; background: var(--bg); }

    .connect-address { font-family: 'JetBrains Mono', monospace; font-size: 1.05rem; font-weight: 600; letter-spacing: .01em; word-break: break-all; }

    .sharing-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .15rem .55rem .15rem .15rem; font-size: .72rem; color: var(--text-muted); }

    .file-input-hidden {
        position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
        overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
    }
    .file-input-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
    .file-input-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14rem; }

    .avatar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
    .avatar-actions form { margin: 0; min-width: 0; }
    .avatar-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 2.125rem;
        padding: 0 .75rem; border-radius: 6px; font-size: 11px; text-align: center; cursor: pointer; }
    .avatar-btn:disabled { cursor: not-allowed; }
    .file-input-hidden:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
    .info-grid { display: grid; grid-template-columns: max-content 1fr; column-gap: .75rem; row-gap: .4rem;
        font-size: .875rem; align-items: baseline; }
    .info-grid dt, .info-grid dd { margin: 0; }
    .info-grid dd { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
    .pref-list { display: flex; flex-direction: column; gap: .9rem; }
    .pref-row { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
    .pref-label { font-size: .75rem; }
    .seg-toggle.seg-fixed { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; max-width: 15rem; }
    .seg-toggle.seg-fixed button { padding-left: .4rem; padding-right: .4rem; text-align: center; }

    .modal-overlay.hidden,
    .confirm-overlay.hidden,
    #actions-running.hidden,
    #connect-info-panel.hidden,
    .share-row.hidden,
    .cfg-bar.hidden, .cfg-notice.hidden, .cfg-results.hidden, .cfg-history.hidden, .cfg-editor.hidden {
        display: none !important;
    }

    @media (hover: none) and (pointer: coarse) {
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="button"]):not([type="submit"]),
        select, textarea { font-size: 16px; }
        .btn { min-height: 2.5rem; }
        a.btn { display: inline-flex; align-items: center; justify-content: center; }
        .seg-toggle button { min-height: 2.25rem; }
        .touch-target { min-height: 2.75rem; }
    }
    @supports (min-height: 100dvh) { body.min-h-screen { min-height: 100dvh; } }
    a, button, input, select, textarea, label, summary { touch-action: manipulation; }
    .combo-list { overscroll-behavior: contain; }

    .ver-row { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem; border-radius: .375rem; background: var(--surface-2); border: 1px solid var(--border); }
    .ver-row .ver-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
    .ver-actions { display: inline-flex; gap: .125rem; margin-left: auto; }
    .ver-actions form { margin: 0; }
    .ver-btn { min-width: 1.75rem; height: 1.75rem; line-height: 1; border-radius: .375rem; background: transparent; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; font-size: .75rem; }
    .ver-btn:hover:not(:disabled) { background: var(--surface); border-color: var(--border); color: var(--text); }
    .ver-btn:disabled { opacity: .3; cursor: default; }
    .ver-star { color: var(--accent); }
    .motd-locked-row { background: var(--surface-2); border: 1px dashed var(--border); }
    .motd-locked-strip { opacity: .75; cursor: not-allowed; pointer-events: none; }
    .default-icon-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
    .default-icon-cell { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .375rem; border-radius: .375rem; background: var(--surface-2); border: 1px solid var(--border); }
    .default-icon-cell form { margin: 0; }

    @layer mcp-guard {
        [data-mcp-critical] { visibility: visible !important; opacity: 1 !important; transform: none !important; translate: none !important; rotate: none !important;
            scale: none !important; filter: none !important; clip-path: none !important; mask: none !important; -webkit-mask: none !important;
            content-visibility: visible !important; pointer-events: auto !important; max-height: none !important; height: auto !important; }
        [data-mcp-critical="block"] { display: block !important; position: relative !important; inset: auto !important; }
        [data-mcp-critical="overlay"] { display: flex !important; position: fixed !important; inset: 0 !important; }
        [data-mcp-critical] form { display: block !important; }
        [data-mcp-critical] :is(form, input, button, label, select, textarea) { visibility: visible !important; opacity: 1 !important; pointer-events: auto !important; clip-path: none !important; }
    }

    .cfg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .4rem 0; }
    .cfg-editor { min-width: 0; max-width: 100%; }
    .cfg-editor .cm-editor { max-width: 100%; }
    .cfg-notice { margin: .5rem 0; padding: .5rem .7rem; border-radius: .4rem; font-size: 11px; white-space: pre-line; overflow-wrap: anywhere; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
    .cfg-notice.is-error { background: var(--danger-soft); border-color: var(--danger); color: var(--danger-text); }
    .cfg-notice.is-warn { background: var(--warning-soft); border-color: var(--warning); color: var(--warning-text); }
    .cfg-notice.is-ok { background: var(--info-soft); border-color: var(--info); color: var(--info-text); }
    .cfg-diff { margin: .4rem 0; padding: .4rem; max-height: 18rem; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 1.4; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: .3rem; white-space: pre; }
    .cfg-diff .d-add { background: var(--accent-soft); display: block; }
    .cfg-diff .d-del { background: var(--danger-soft); display: block; }
    .cfg-diff .d-hunk, .cfg-diff .d-head { color: var(--text-muted); display: block; }
    .cfg-history { margin: .5rem 0; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface); }
    .cfg-results { margin: 0 0 .6rem; padding: .5rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface-2); max-height: 16rem; overflow: auto; font-size: 11px; }
    .cfg-hit { padding: .25rem .3rem; border-radius: .25rem; cursor: pointer; overflow-wrap: anywhere; }
    .cfg-hit:hover { background: var(--surface-hover); }
    #plugin-config-root { min-width: 0; }
    @media (hover: none) and (pointer: coarse) {
        .cfg-editor .cm-scroller, .cfg-editor .cm-content { font-size: 16px; }
    }

    :root { accent-color: var(--accent); }
    .text-\[8px\], .text-\[9px\] { font-size: 10px; }
    .btn:focus-visible, .tab-btn:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    @media (pointer: coarse) { .btn { min-height: 2.25rem; } }
    @view-transition { navigation: auto; }
    ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .12s; }
    @media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

    .card-title { font-family: 'Space Grotesk', sans-serif; font-size: .875rem; line-height: 1.25rem; font-weight: 700; text-transform: uppercase;
                  letter-spacing: .05em; color: var(--text-muted); }
    .card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
    .field-label { display: block; margin-bottom: .375rem; color: var(--text-muted); }
    .hint { font-size: 11px; color: var(--text-faint); }
    .form-row { display: grid; gap: .75rem; align-items: start; }
    @media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

    .acct-wrap { max-width: 76rem; margin-inline: auto; }
    .acct-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
    @media (min-width: 1024px) { .acct-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .acct-full { grid-column: 1 / -1; } }
    @media (max-width: 640px) { .acct-grid { gap: 1rem; } }
    .acct-narrow { max-width: 36rem; }
    @media (min-width: 640px) { .pw-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pw-fields > :first-child { grid-column: 1 / -1; } }
    @media (min-width: 1024px) { .acct-full .pw-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } .acct-full .pw-fields > :first-child { grid-column: auto; }
                                 .acct-full .pw-submit { width: auto; padding-inline: 2rem; } }
    .acct-profile { display: flex; align-items: center; gap: 1rem; }

    .stat-tiles { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
    .stat-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: .5rem; padding: .55rem .7rem; min-width: 0; }
    .stat-tile .k { display: block; font-size: 11px; color: var(--text-faint); }
    .stat-tile .v { display: block; font-weight: 600; overflow-wrap: anywhere; }
    .stat-tile .v.warn { color: var(--warning-text); }

    .acc-list { border: 1px solid var(--border); border-radius: .5rem; overflow: hidden; }
    .acc-list > details + details { border-top: 1px solid var(--border); }
    .acc-list > details > summary { list-style: none; display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; cursor: pointer; }
    .acc-list > details > summary::-webkit-details-marker { display: none; }
    .acc-list > details > summary:hover { background: var(--surface-hover); }
    .acc-list > details > summary .t { flex: 1; min-width: 0; font-weight: 600; color: var(--text); }
    .acc-list > details > summary .s { color: var(--text-faint); text-align: right; }
    .acc-list > details > summary::after { content: ""; flex: none; width: .75rem; height: .75rem; background: currentColor; color: var(--text-muted);
        -webkit-mask: var(--chevron-mask) center / contain no-repeat; mask: var(--chevron-mask) center / contain no-repeat; transition: transform .15s ease; }
    .acc-list > details[open] > summary::after { transform: rotate(180deg); }
    .acc-list > details > summary.danger .t { color: var(--danger-text); }
    .acc-list > details > .acc-in { padding: .25rem .75rem .8rem; display: flex; flex-direction: column; gap: .6rem; }

    .wiz-progress { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: .9rem; }
    .wiz-progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
    .wiz-steps { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; list-style: none; padding: 0 0 .1rem; margin: 0 0 1.25rem; }
    .wiz-steps::-webkit-scrollbar { display: none; }
    .wiz-steps a, .wiz-steps span { display: flex; align-items: center; gap: .4rem; white-space: nowrap; padding: .2rem .6rem .2rem .2rem; line-height: 1; border-radius: 999px;
        font-size: 11px; font-weight: 600; color: var(--text-faint); border: 1px solid transparent; text-decoration: none; }
    .wiz-steps a:hover { background: var(--surface-hover); color: var(--text); }
    .wiz-steps .n { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 999px;
        background: var(--surface-2); border: 1px solid var(--border); font-size: 10px; }
    .wiz-steps [data-status="done"] .n, .wiz-steps [data-status="skipped"] .n { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
    .wiz-steps [aria-current="step"] { background: var(--accent-soft); color: var(--accent-text); border-color: rgba(95,168,95,0.35); }
    .wiz-steps [aria-current="step"] .n { background: var(--accent); color: #0c0e12; border-color: transparent; }
    .wiz-steps [data-status="locked"] { opacity: .55; }
    .wiz-steps .lbl { display: none; }
    .wiz-steps [aria-current="step"] .lbl { display: inline; }
    .wiz-section { padding-top: .9rem; border-top: 1px solid var(--border-soft); }
    @media (min-width: 640px) { .wiz-main { padding-top: 2rem; } .wiz-card { padding: 1.5rem; } }
