/* ═══════════════════════════════════════════════════════════════════
   VELOX — interface

   The menu window keeps its original design: banner, filled tabs, the
   gradient selector band, the wide slider, 39px rows.
   The surrounding furniture — watermark, keybind picker, freecam
   selector, HUD lists, notifications — is the redesigned set.
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* Accent ramp — rewritten by applyTheme() */
    --acc:       #3c8cff;
    --acc-light: #8abaff;
    --acc-88:    rgba(60, 140, 255, 0.88);
    --acc-55:    rgba(60, 140, 255, 0.55);
    --acc-18:    rgba(60, 140, 255, 0.18);
    --acc-08:    rgba(60, 140, 255, 0.08);
    --acc-glow:  rgba(60, 140, 255, 0.55);

    --bg-1: #101014;
    --bg-2: #16161b;
    --line: rgba(255, 255, 255, 0.07);
    --line-soft: rgba(255, 255, 255, 0.045);

    --tx-hi:  #f2f3f5;
    --tx-mid: rgba(242, 243, 245, 0.62);
    --tx-lo:  rgba(242, 243, 245, 0.34);
    --tx-xlo: rgba(242, 243, 245, 0.20);

    --font: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    --r-chip: 3px;
    --r-panel: 5px;

    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.55);

    /* Motion — Menu Smoothness setting */
    --t-pill: 0.09s;
    --t-page: 0.13s;
    --ease: cubic-bezier(.22, 1, .36, 1);

    /* Background setting */
    --panel-a: 1;
    --panel-blur: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; cursor: default !important; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent !important;
    font-family: var(--font);
    color: var(--tx-hi);
    -webkit-font-smoothing: antialiased;
}

#ui-wrapper {
    position: absolute;
    top: 0; left: 0;
    width: 1920px;
    height: 1080px;
    transform-origin: top left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 140px;
}

/* Keycap chip — hint lines and bind rows */
.kc {
    display: inline-block;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    line-height: 1;
    padding: 3px 5px 4px;
    margin: 0 1px;
    color: var(--tx-mid);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: var(--r-chip);
}

/* ══ Watermark ══════════════════════════════════════════════════════
   Solid tab-styled luxury glass extension of the Velox menu */
#velox-watermark {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 9px;
    height: 28px;
    padding: 0 14px;
    background: linear-gradient(180deg, rgba(28, 28, 38, 0.98) 0%, rgba(12, 12, 16, 0.99) 100%);
    border: 1px solid var(--acc-55);
    border-radius: 6px;
    box-shadow: 0 0 14px var(--acc-08), inset 0 1px 0 var(--acc-55), 0 8px 24px rgba(0, 0, 0, 0.95);
    white-space: nowrap;
    z-index: 40;
}

.wm-name {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    color: #fff;
    text-shadow: 0 0 8px var(--acc-glow);
}

.wm-div {
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.18);
}

.wm-pill {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wm-pill-label {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.45);
}

.wm-stat {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.wm-tag {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--acc-light);
    opacity: 0.9;
}

/* ══ HUD panels — info / keybinds / spectators ══════════════════════
   Unified dark glass block matching the Velox menu */
.hud-panel {
    position: absolute;
    min-width: 175px;
    background: linear-gradient(160deg, rgba(16, 16, 22, 0.94) 0%, rgba(9, 9, 12, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.03);
    overflow: hidden;
    z-index: 30;
}

.hud-accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent 0%, var(--acc) 50%, transparent 100%);
    box-shadow: 0 0 12px var(--acc-glow);
}

.hud-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 28px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hud-head-left {
    display: flex;
    align-items: center;
    gap: 7px;
}

.hud-head-icon {
    width: 12px;
    height: 12px;
    color: var(--acc);
}

.hud-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
}

.hud-count {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 700;
    color: var(--acc);
    background: var(--acc-08);
    border: 1px solid var(--acc-18);
    padding: 1px 7px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

.hud-body {
    padding: 6px 0;
}

.hud-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    height: 24px;
    padding: 0 12px;
    transition: background 0.1s ease;
}

.hud-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.hud-row-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.hud-row-label {
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-row.is-on .hud-row-label {
    color: #fff;
    font-weight: 600;
}

.hud-row-val {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    color: var(--acc);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.hud-key {
    font-family: var(--font);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

.hud-row.is-on .hud-key {
    color: #fff;
    border-color: var(--acc-55);
    background: linear-gradient(180deg, var(--acc-55) 0%, var(--acc-18) 100%);
    box-shadow: 0 0 8px var(--acc-18);
}

.hud-sid {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;
    color: var(--acc-light);
    opacity: 0.85;
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}

.hud-empty {
    padding: 6px 12px 8px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.25);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   MENU WINDOW — original design
   ═══════════════════════════════════════════════════════════════════ */
.menu-window {
    position: relative;
    width: 380px;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(160deg, rgba(24,24,34,var(--panel-a)) 0%,
                                rgba(16,16,22,var(--panel-a))  60%,
                                rgba(10,10,15,var(--panel-a)) 100%);
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 18px var(--acc-08);
    overflow: visible;
    z-index: 10;
}

/* Banner */
.menu-header {
    position: relative;
    height: 126px;
    min-height: 126px;
    flex-shrink: 0;
    background: #040306 center/cover no-repeat;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.menu-header::before {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(4,3,6,.85));
    pointer-events: none;
}

.menu-header::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--acc), transparent);
    box-shadow: 0 0 12px var(--acc-glow);
    z-index: 6;
}

/* Tabs — filled active pill, rounded top corners */
.dynamic-top-tabs {
    position: relative;
    display: flex;
    height: 38px;
    min-height: 38px;
    flex-shrink: 0;
    padding: 4px 4px 0;
    gap: 3px;
    background: rgba(0,0,0,0.55);
    border-bottom: none;
    overflow: hidden;
    z-index: 5;
}

.dynamic-top-tabs::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--acc), transparent);
    box-shadow: 0 0 12px var(--acc-glow);
    pointer-events: none;
    z-index: 6;
}

.tab-btn {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: rgba(255,255,255,0.4);
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    transition: color .06s ease, background .06s ease;
    z-index: 2;
}

.tab-btn.active {
    color: #fff;
    background: linear-gradient(180deg, var(--acc-55) 0%, var(--acc-08) 60%, transparent 100%);
    border-color: var(--acc-55);
    box-shadow: 0 0 10px var(--acc-08), inset 0 1px 0 var(--acc-55);
}

/* Left-margin scrollbar with restored rich glow */
.custom-scrollbar-container {
    position: absolute;
    left: -19px;
    width: 11px;
    z-index: 15;
    pointer-events: none;
}

.custom-scrollbar-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,.8), rgba(2,2,4,.95));
    border-radius: 6px;
    border: 1px solid var(--acc-55);
    box-shadow: inset 0 0 8px rgba(0,0,0,.95), 0 0 12px var(--acc-18);
    transition: border 0.25s ease, box-shadow 0.25s ease;
}

.custom-scrollbar-thumb {
    position: absolute;
    left: 3px;
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--acc) 30%,
        var(--acc) 70%,
        transparent 100%);
    box-shadow: 0 0 6px var(--acc), 0 0 16px var(--acc-glow), 0 0 30px var(--acc-18);
    transition: top var(--t-pill) var(--ease), height var(--t-pill) var(--ease);
}

/* Body */
.menu-body {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden auto;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
}
.menu-body::-webkit-scrollbar { display: none; }

.items-list { position: relative; display: flex; flex-direction: column; width: 100%; }

/* Page animations - fast and clean without drifting */
@keyframes pageIn   { from { opacity: 0.85; transform: translateX(4px); } to { opacity: 1; transform: none; } }
@keyframes pageBack { from { opacity: 0.85; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@keyframes pageTab  { from { opacity: 0.85; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.items-list.anim-enter { animation: pageIn   var(--t-page) var(--ease); }
.items-list.anim-back  { animation: pageBack var(--t-page) var(--ease); }
.items-list.anim-tab   { animation: pageTab  var(--t-page) var(--ease); }

.page-title-bar {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--acc);
    opacity: .7;
    border-bottom: 1px solid var(--acc-08);
}

/* Selector band — original smooth gradient with inner depth, no outside glow, no outlines */
#floating-selector-pill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 39px;
    background: linear-gradient(90deg,
        var(--acc-88) 0%,
        var(--acc-55) 45%,
        var(--acc-18) 80%,
        transparent 100%);
    box-shadow: inset 0 0 8px var(--acc-18);
    pointer-events: none;
    z-index: 1;
    border-radius: 2px;
    border: none;
    transition: transform var(--t-pill) var(--ease);
    will-change: transform;
}

/* Rows */
.menu-item {
    display: flex;
    align-items: center;
    height: 39px;
    min-height: 39px;
    flex-shrink: 0;
    padding: 0 16px 0 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .2px;
    color: rgba(255,255,255,0.62);
    position: relative;
    z-index: 2;
    transition: color 0.04s ease;
}

.menu-item.keyboard-selected {
    color: #fff !important;
    font-weight: 600;
    letter-spacing: .35px;
}

.item-icon { display: flex; align-items: center; width: 22px; margin-right: 12px; flex-shrink: 0; }

/* Icons are always white. Never theme-tinted, never glow-blurred. */
.cat-icon { width: 18px; height: 18px; color: #fff; fill: none; stroke: #fff; opacity: .75; transition: opacity 0.06s ease; }
.menu-item.keyboard-selected .cat-icon { opacity: 1; color: #fff; }

.item-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.item-action-wrapper { display: flex; align-items: center; flex-shrink: 0; }
.item-action { display: flex; align-items: center; color: rgba(255,255,255,0.3); }
.menu-item.keyboard-selected .item-action { color: rgba(255,255,255,0.6); }
.chev { width: 12px; height: 12px; }

/* Section divider — rule on both sides */
.section-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    min-height: 32px;
    flex-shrink: 0;
    padding: 0 16px;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--acc-55), transparent);
    box-shadow: 0 0 4px var(--acc-glow);
}

.section-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--acc-light);
    opacity: .7;
    white-space: nowrap;
}

/* Toggle — sleek thin pill, perfectly concentric and symmetric */
.toggle-switch {
    position: relative;
    width: 28px;
    height: 14px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    transition: background .24s var(--ease), border-color .24s var(--ease);
}

.toggle-switch.checked {
    background: var(--acc);
    border-color: var(--acc-55);
}

.switch-slider {
    position: absolute;
    top: 1px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    transition: transform .24s cubic-bezier(.34, 1.56, .64, 1), background .24s ease;
}

.toggle-switch.checked .switch-slider {
    transform: translateX(12px);
    background: #000;
}

/* Slider — theme-adaptive thumb with subtle accent glow */
.slider-container { display: flex; align-items: center; gap: 8px; min-width: 120px; }

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 75px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255,255,255,0.18);
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 6px;
    border-radius: 3px;
    background: var(--acc);
    box-shadow: 0 0 6px var(--acc), 0 0 10px var(--acc-glow);
}

.range-slider::-moz-range-thumb {
    width: 14px;
    height: 6px;
    border-radius: 3px;
    background: var(--acc);
    border: none;
    box-shadow: 0 0 6px var(--acc), 0 0 10px var(--acc-glow);
}

.slider-value {
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    min-width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Selector */
.selector-container { display: flex; align-items: center; gap: 5px; }
.selector-arrow { font-size: 10px; color: var(--tx-lo); padding: 1px 3px; }
.selector-variant-text {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    min-width: 60px;
    text-align: center;
}

/* Colour swatch */
.color-preview-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 6px rgba(0,0,0,0.6);
}

/* Footer — matching glowing separator line */
.menu-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    min-height: 36px;
    flex-shrink: 0;
    padding: 0 16px;
    background: linear-gradient(90deg, rgba(0,0,0,0.6), rgba(5,5,8,0.98));
    border-top: none;
    border-radius: 0 0 12px 12px;
    font-size: 10px;
    letter-spacing: .5px;
}

.menu-footer::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--acc), transparent);
    box-shadow: 0 0 12px var(--acc-glow);
    z-index: 6;
}

.footer-brand {
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--acc-light);
    opacity: .55;
    text-shadow: 0 0 8px var(--acc-glow);
}

.footer-page-wrapper { display: flex; align-items: center; gap: 5px; }
.footer-page-label { color: rgba(255,255,255,0.35); }
.footer-page-indicator {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    font-variant-numeric: tabular-nums;
}

/* ══ Description bar ════════════════════════════════════════════════ */
#description-bar {
    position: absolute;
    left: 140px;
    width: 380px;
    padding: 9px 14px;
    background: linear-gradient(160deg, rgba(16, 16, 22, var(--panel-a)) 0%, rgba(9, 9, 12, var(--panel-a)) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--acc);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03);
    z-index: 12;
}

.desc-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.desc-icon {
    width: 13px;
    height: 13px;
    color: var(--acc);
    margin-top: 1.5px;
    flex-shrink: 0;
}

#description-text {
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.8);
}

/* ══ Keybind picker ═════════════════════════════════════════════════ */
#keybind-overlay {
    position: fixed;
    left: 50%;
    bottom: 14vh;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
}

#keybind-card {
    min-width: 232px;
    padding: 14px 18px 13px;
    background: rgba(16, 16, 20, .97);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 20px 56px rgba(0,0,0,.72);
    text-align: left;
}

.kb-eyebrow {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--tx-xlo);
    margin-bottom: 3px;
}

.kb-label { font-size: 13.5px; font-weight: 600; color: var(--tx-hi); margin-bottom: 11px; }
.kb-keywrap { margin-bottom: 12px; }

.kb-key {
    display: inline-block;
    min-width: 74px;
    padding: 8px 14px 9px;
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .6px;
    text-align: center;
    color: var(--tx-xlo);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 4px;
}

.kb-key.kb-key-set {
    color: var(--acc);
    border-color: var(--acc-18);
    border-bottom-color: var(--acc-55);
    background: var(--acc-08);
}

.kb-hint, .cp-hint-text {
    font-size: 9.5px;
    font-weight: 500;
    color: var(--tx-xlo);
    line-height: 1.9;
}

/* ══ Freecam mode selector ══════════════════════════════════════════ */
#freecam-overlay {
    position: fixed;
    left: 50%;
    bottom: 15vh;
    transform: translateX(-50%);
    z-index: 9998;
    pointer-events: none;
}

#freecam-modes-list { position: relative; width: 300px; }

/* Soft vignette + a thin rule under the active mode. No filled bar. */
.fc-mode-bg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, var(--acc-18) 0%, transparent 72%);
    pointer-events: none;
}

.fc-mode-bg::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 46px;
    height: 1px;
    background: var(--acc);
    box-shadow: 0 0 6px var(--acc-glow);
}

.fc-mode-row {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font);
    font-weight: 600;
    letter-spacing: .4px;
    white-space: nowrap;
    line-height: 1;
    pointer-events: none;
}

.fc-shadow {
    position: absolute;
    left: 1px; top: 1px;
    width: 100%;
    color: rgba(0,0,0,.8);
    z-index: -1;
}

/* ══ Colour picker ══════════════════════════════════════════════════
   Pinned to fixed coords inside the 1920x1080 wrapper (which is
   transform: scale()d, so `fixed` resolves against it, not the viewport).
   Lua maps the mouse into #cp-canvas using these exact numbers —
   CP_CANVAS_X/Y = left + 16, top + 48. Move this and you move those. */
.color-picker-card {
    position: fixed;
    left: 530px;
    top: 300px;
    width: 280px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    background: rgba(16, 16, 20, .97);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 20px 56px rgba(0,0,0,.72);
    z-index: 200;
}

.cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 22px;
    margin-bottom: 10px;
}

.cp-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tx-hi);
    max-width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-hex {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--acc);
}

.cp-canvas-wrap {
    position: relative;
    width: 248px;
    height: 186px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

#cp-canvas { display: block; width: 248px; height: 186px; }

.cp-cursor {
    position: absolute;
    width: 9px; height: 9px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.75);
    transform: translate(-50%, -50%);
    pointer-events: none;
    display: none;
}

.cp-bottom-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

.cp-swatch {
    width: 34px; height: 34px;
    border-radius: 3px;
    border: 1px solid var(--line);
    flex-shrink: 0;
    background: #fff;
}

/* ══ Notifications ══════════════════════════════════════════════════ */
#notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    z-index: 9999;
    pointer-events: none;
}

.notification {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 252px;
    max-width: 330px;
    padding: 10px 13px 11px;
    background: rgba(16, 16, 20, .97);
    border: 1px solid var(--line);
    border-left: 2px solid var(--n-accent, var(--acc));
    border-radius: var(--r-panel);
    box-shadow: var(--shadow);
    animation: toastIn .2s var(--ease);
    overflow: hidden;
}

.notification.slide-out { animation: toastOut .18s ease forwards; }

@keyframes toastIn  { from { opacity: 0; transform: translateX(24px); } }
@keyframes toastOut { to   { opacity: 0; transform: translateX(24px); } }

.notification-info    { --n-accent: #3c8cff; }
.notification-success { --n-accent: #35c76a; }
.notification-warning { --n-accent: #e0a12a; }
.notification-error   { --n-accent: #e4483f; }

.notification-dot {
    width: 6px; height: 6px;
    margin-top: 4px;
    border-radius: 50%;
    background: var(--n-accent);
    flex-shrink: 0;
}

.notification-body { display: flex; flex-direction: column; gap: 2px; }

.notification-title {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .9px;
    text-transform: uppercase;
    color: var(--n-accent);
}

.notification-desc {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--tx-mid);
}

.notification-progress {
    position: absolute;
    left: 0; bottom: 0;
    height: 1px;
    background: var(--n-accent);
    opacity: .5;
}
