:root {
    --ed-bg: #0a0a0e;
    --ed-panel: #17171d;
    --ed-panel-2: #202027;
    --ed-panel-3: #2b2b34;
    --ed-line: #000000;
    --ed-line-soft: #34343f;
    --ed-ink: #d6d6e2;
    --ed-ink-bright: #f8f8fc;
    --ed-ink-dim: #8b8b9c;
    --ed-accent: #7c5cff;
    --ed-accent-2: #22d3ee;
    --ed-accent-hover: #9478ff;
    --ed-gradient: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
    --ed-canvas-bg: #060607;
    --ed-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--ed-bg);
    color: var(--ed-ink);
    margin: 0;
}

.grad-text {
    background: var(--ed-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==================== landing page ==================== */
.home {
    background: var(--ed-bg);
    color: var(--ed-ink);
    min-height: 100vh;
    overflow-x: hidden;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.home-btn-sm { padding: 8px 16px; font-size: 13.5px; }
.home-btn-primary {
    background: var(--ed-gradient);
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(124,92,255,.6);
}
.home-btn-primary:hover { filter: brightness(1.1); color: #fff; transform: translateY(-1px); }
.home-btn-ghost { background: transparent; color: var(--ed-ink); border-color: var(--ed-line-soft); }
.home-btn-ghost:hover { border-color: var(--ed-accent); color: var(--ed-ink-bright); }
.home-btn:active { transform: translateY(1px); }

/* ---- nav ---- */
.home-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 32px;
    background: rgba(10, 10, 14, .75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ed-line-soft);
}
.home-nav-logo {
    font-weight: 800;
    font-size: 18px;
    text-decoration: none;
    letter-spacing: .2px;
}
.home-nav-links { display: flex; gap: 20px; margin-right: auto; }
.home-nav-links a { color: var(--ed-ink-dim); text-decoration: none; font-size: 14px; }
.home-nav-links a:hover { color: var(--ed-ink-bright); }

/* ---- hero ---- */
.home-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 88px 32px 96px;
    background-image: radial-gradient(rgba(124,92,255,.35) 1px, transparent 1px);
    background-size: 28px 28px;
    background-position: -14px -14px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 40%, transparent 90%);
    mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 40%, transparent 90%);
}

.home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ed-ink-bright);
    font-family: var(--ed-font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .3px;
    margin-bottom: 20px;
    padding: 6px 12px;
    border: 1px solid var(--ed-line-soft);
    border-radius: 20px;
    background: var(--ed-panel);
}
.home-eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ed-gradient);
    flex: 0 0 auto;
}

.home-hero-text h1 {
    font-size: clamp(32px, 4.2vw, 48px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--ed-ink-bright);
    margin: 0 0 20px;
}

.home-hero-text p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--ed-ink-dim);
    max-width: 480px;
    margin: 0 0 32px;
}

.home-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- hero mockup ---- */
.home-hero-visual { display: flex; justify-content: center; }

.mockup-window {
    width: 100%;
    max-width: 480px;
    background: var(--ed-panel);
    border: 1px solid var(--ed-line-soft);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 70px -12px rgba(0,0,0,.7), 0 0 0 1px rgba(124,92,255,.15);
    transform: perspective(1400px) rotateY(-4deg) rotateX(1deg);
    transition: transform .4s ease;
}
.mockup-window:hover { transform: perspective(1400px) rotateY(0deg) rotateX(0deg); }

.mockup-menubar {
    display: flex;
    gap: 14px;
    padding: 9px 14px;
    background: var(--ed-panel);
    border-bottom: 1px solid var(--ed-line);
    font-size: 11px;
    color: var(--ed-ink-dim);
}

.mockup-body { display: flex; height: 240px; }

.mockup-tools {
    width: 32px;
    flex: 0 0 auto;
    background: var(--ed-panel);
    border-right: 1px solid var(--ed-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 6px;
}
.mockup-tools span {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background: var(--ed-panel-3);
}
.mockup-tools span.active { background: var(--ed-accent); }

.mockup-canvas {
    flex: 1 1 auto;
    position: relative;
    background-image:
        linear-gradient(45deg, #2b2c2f 25%, transparent 25%),
        linear-gradient(-45deg, #2b2c2f 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2b2c2f 75%),
        linear-gradient(-45deg, transparent 75%, #2b2c2f 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #232427;
    overflow: hidden;
}
.mockup-shape { position: absolute; border-radius: 8px; }
.mockup-shape-a { width: 90px; height: 90px; background: #e8604c; top: 30px; left: 30px; border-radius: 50%; }
.mockup-shape-b { width: 110px; height: 70px; background: var(--ed-accent); top: 90px; left: 90px; mix-blend-mode: screen; }
.mockup-shape-c { width: 60px; height: 60px; background: #f4c93a; bottom: 24px; right: 30px; transform: rotate(12deg); }

.mockup-layers {
    width: 96px;
    flex: 0 0 auto;
    background: var(--ed-panel);
    border-left: 1px solid var(--ed-line);
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mockup-layer-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 4px;
    font-size: 10px;
    color: var(--ed-ink-dim);
}
.mockup-layer-row.active { background: rgba(124,92,255,.22); color: var(--ed-ink-bright); }
.mockup-layer-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ed-line-soft); flex: 0 0 auto; }

/* ---- ad slots ---- */
.home-ad-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}
.ad-slot {
    max-width: 970px;
    min-height: 100px;
    margin: 0 auto;
    padding: 14px;
    background: var(--ed-panel);
    border: 1px solid var(--ed-line-soft);
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ad-slot-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--ed-ink-dim);
    margin-bottom: 8px;
}

/* ---- ad mock (visual-only placeholder, not a real ad unit) ---- */
.ad-mock {
    width: 100%;
    min-height: 90px;
    border: 1px dashed var(--ed-line-soft);
    border-radius: 6px;
    background: repeating-linear-gradient(
        45deg,
        rgba(124, 92, 255, .07) 0 10px,
        rgba(34, 211, 238, .07) 10px 20px
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}
.ad-mock-label {
    font-family: var(--ed-font-mono);
    font-size: 10.5px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--ed-ink-dim);
}
.ad-mock-size {
    font-family: var(--ed-font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--ed-ink);
}
.ad-mock-lg { min-height: 250px; }

/* ---- ad mock inside the editor's right panel ---- */
.ed-ad-slot {
    flex: 0 0 auto;
    padding: 10px;
    border-top: 1px solid var(--ed-line);
}
.ed-ad-slot .ad-mock { min-height: 200px; }

/* ---- full-width ad bars (top/bottom of the editor) ---- */
.ed-ad-bar {
    flex: 0 0 auto;
    padding: 8px 14px;
    background: var(--ed-panel);
}
.ed-ad-bar-top { border-bottom: 1px solid var(--ed-line); }
.ed-ad-bar-bottom { border-top: 1px solid var(--ed-line); }
.ad-mock-bar {
    min-height: 64px;
    max-width: 970px;
    margin: 0 auto;
}

/* ---- features ---- */
.home-features {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 32px 100px;
    text-align: center;
}
.home-features h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 800;
    letter-spacing: -.3px;
    color: var(--ed-ink-bright);
    margin: 0 0 10px;
}
.home-features-sub {
    color: var(--ed-ink-dim);
    font-size: 15px;
    margin: 0 0 44px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    text-align: left;
}

.feature-card {
    position: relative;
    background: var(--ed-panel);
    border: 1px solid var(--ed-line-soft);
    border-radius: 12px;
    padding: 24px;
    opacity: 0;
    transform: translateY(14px);
    transition: border-color .2s ease, transform .3s ease, opacity .5s ease, box-shadow .2s ease;
}
.feature-card.is-visible { opacity: 1; transform: translateY(0); }
.feature-card:hover {
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px var(--ed-accent), 0 16px 40px -16px rgba(124,92,255,.5);
}
.feature-card .icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(34,211,238,.18));
    margin-bottom: 16px;
}
.feature-card svg { width: 20px; height: 20px; color: var(--ed-accent-2); }
.feature-card h3 { font-size: 16px; font-weight: 700; color: var(--ed-ink-bright); margin: 0 0 8px; }
.feature-card p { font-size: 14px; line-height: 1.55; color: var(--ed-ink-dim); margin: 0; }

/* ---- footer ---- */
.home-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 32px;
    border-top: 1px solid var(--ed-line);
    color: var(--ed-ink-dim);
    font-size: 13.5px;
}
.home-footer a { color: var(--ed-ink-dim); text-decoration: none; }
.home-footer a:hover { color: var(--ed-accent-hover); }

@media (max-width: 900px) {
    .home-hero { grid-template-columns: 1fr; padding-top: 56px; text-align: center; }
    .home-hero-text p { margin-left: auto; margin-right: auto; }
    .home-hero-actions { justify-content: center; }
    .home-hero-visual { order: -1; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-nav-links { display: none; }
}

@media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; }
    .home-footer { flex-direction: column; gap: 8px; text-align: center; }
}

/* ---- layout ---- */
.ed {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 13px;
}

/* ---- menu bar ---- */
.ed-menubar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 8px;
    height: 34px;
    background: var(--ed-panel);
    border-bottom: 1px solid var(--ed-line);
}

.ed-logo {
    font-weight: 800;
    letter-spacing: .2px;
    margin-right: 10px;
    font-size: 13px;
}

.ed-menu-btn {
    background: transparent;
    border: none;
    color: var(--ed-ink);
    padding: 6px 10px;
    font-size: 12.5px;
    border-radius: 3px;
    cursor: pointer;
}
.ed-menu-btn:hover, .ed-menu-btn:focus, .ed-menu-btn.show { background: var(--ed-panel-3); color: var(--ed-ink-bright); }
.ed-menu-btn::after { display: none; }

.dropdown-menu-dark {
    --bs-dropdown-bg: #17171d;
    --bs-dropdown-border-color: var(--ed-line-soft);
    --bs-dropdown-link-color: var(--ed-ink);
    --bs-dropdown-link-hover-bg: var(--ed-accent);
    --bs-dropdown-link-hover-color: #fff;
    --bs-dropdown-divider-bg: var(--ed-line-soft);
    font-size: 12.5px;
    min-width: 12rem;
}
.dropdown-item { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.ed-menu-key { color: var(--ed-ink-dim); font-family: var(--ed-font-mono); font-size: 10.5px; margin-left: 12px; }
.dropdown-item:hover .ed-menu-key { color: rgba(255,255,255,.75); }

.ed-menubar-right { margin-left: auto; display: flex; gap: 2px; }

.ed-icon-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--ed-ink);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ed-icon-btn svg { width: 15px; height: 15px; }
.ed-icon-btn:hover { background: var(--ed-panel-3); color: var(--ed-ink-bright); }

/* ---- options bar (horizontal, tool-context sensitive) ---- */
.ed-optionsbar {
    flex: 0 0 auto;
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 14px;
    background: var(--ed-panel);
    border-bottom: 1px solid var(--ed-line);
    overflow-x: auto;
}

.ed-opt-group { display: none; align-items: center; gap: 8px; white-space: nowrap; }
.ed-opt-group.visible { display: flex; }
.ed-opt-group label { font-family: var(--ed-font-mono); font-size: 10.5px; color: var(--ed-ink-dim); text-transform: uppercase; letter-spacing: .3px; }
.ed-opt-group input[type="range"] { width: 110px; accent-color: var(--ed-accent); }
.ed-opt-group input[type="color"] {
    width: 30px;
    height: 26px;
    border: 1px solid var(--ed-line-soft);
    border-radius: 4px;
    background: none;
    padding: 0;
    cursor: pointer;
}
.ed-opt-group input[type="number"] {
    width: 64px;
    background: var(--ed-panel-2);
    border: 1px solid var(--ed-line-soft);
    color: var(--ed-ink);
    border-radius: 4px;
    padding: 4px 6px;
}
.ed-opt-group span { font-size: 12px; color: var(--ed-ink-dim); min-width: 26px; }
.ed-opt-hint { font-size: 12px; color: var(--ed-ink-dim); font-style: italic; }

.ed-opt-btn {
    background: var(--ed-panel-2);
    border: 1px solid var(--ed-line-soft);
    color: var(--ed-ink);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ed-opt-btn:hover { background: var(--ed-panel-3); }
.ed-opt-btn-primary { background: var(--ed-gradient); border-color: transparent; color: #fff; }
.ed-opt-btn-primary:hover { filter: brightness(1.12); }

.ed-body {
    flex: 1 1 auto;
    display: flex;
    min-height: 0;
}

/* ---- left tool strip ---- */
.ed-tools {
    width: 44px;
    flex: 0 0 auto;
    background: var(--ed-panel);
    border-right: 1px solid var(--ed-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 3px;
}

.ed-tool {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--ed-ink);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ed-tool svg { width: 17px; height: 17px; }
.ed-tool:hover { background: var(--ed-panel-3); }
.ed-tool.active { background: var(--ed-gradient); color: #fff; }

.ed-swatch-wrap { margin-top: auto; padding-top: 10px; }
.ed-swatch {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 2px solid var(--ed-line-soft);
    box-shadow: 0 0 0 1px #000;
    cursor: pointer;
}

/* ---- canvas area ---- */
.ed-canvas-area {
    flex: 1 1 auto;
    position: relative;
    background: var(--ed-canvas-bg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ed-canvas-viewport {
    overflow: auto;
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.ed-canvas-stack {
    position: relative;
    background-image:
        linear-gradient(45deg, #2b2c2f 25%, transparent 25%),
        linear-gradient(-45deg, #2b2c2f 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #2b2c2f 75%),
        linear-gradient(-45deg, transparent 75%, #2b2c2f 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #232427;
    box-shadow: 0 0 0 1px #000, 0 8px 24px rgba(0,0,0,.5);
    flex: 0 0 auto;
}

.ed-canvas-stack canvas {
    position: absolute;
    top: 0;
    left: 0;
    image-rendering: pixelated;
}

.ed-statusbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: var(--ed-panel);
    border-top: 1px solid var(--ed-line);
    font-size: 12px;
}

.ed-statusbar button {
    background: none;
    border: none;
    color: var(--ed-ink);
    min-width: 20px;
    height: 20px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 3px;
    font-size: 12px;
}
.ed-statusbar button:hover { background: var(--ed-panel-3); color: var(--ed-ink-bright); }
.ed-statusbar-sep { width: 1px; height: 16px; background: var(--ed-line-soft); margin: 0 6px; }
.ed-statusbar-docinfo { color: var(--ed-ink-dim); font-family: var(--ed-font-mono); font-size: 11px; }
#zoomVal { font-family: var(--ed-font-mono); }

.ed-brush-cursor {
    position: absolute;
    top: 0;
    left: 0;
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.6);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
    z-index: 5;
}

/* ---- right panel ---- */
.ed-panel-right {
    width: 260px;
    flex: 0 0 auto;
    background: var(--ed-panel);
    border-left: 1px solid var(--ed-line);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.ed-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ed-ink-bright);
    border-bottom: 1px solid var(--ed-line);
}

.ed-panel-head-actions { display: flex; gap: 4px; }
.ed-panel-head-actions button {
    width: 22px;
    height: 22px;
    border: none;
    background: var(--ed-panel-2);
    color: var(--ed-ink);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.ed-panel-head-actions button:hover { background: var(--ed-gradient); color: #fff; }

.ed-layer-props {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ed-line);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ed-layer-props select {
    background: var(--ed-panel-2);
    color: var(--ed-ink);
    border: 1px solid var(--ed-line-soft);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
}

.ed-opacity { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ed-ink-dim); }
.ed-opacity input { flex: 1; accent-color: var(--ed-accent); }

.ed-layer-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ed-layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
}

.ed-layer-item:hover { background: var(--ed-panel-2); }
.ed-layer-item.active { background: rgba(124,92,255,.18); border-color: var(--ed-accent); }

.ed-layer-item .thumb {
    width: 32px;
    height: 32px;
    border-radius: 3px;
    background: #444 repeating-conic-gradient(#3a3a3a 0% 25%, #444 0% 50%) 0 0/8px 8px;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--ed-line-soft);
}
.ed-layer-item .thumb img { width: 100%; height: 100%; object-fit: contain; }

.ed-layer-item .name {
    flex: 1;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ed-ink);
}
.ed-layer-item.active .name { color: var(--ed-ink-bright); }

.ed-layer-item .vis {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    background: none;
    border: none;
    color: var(--ed-ink-dim);
    cursor: pointer;
}
.ed-layer-item .vis.off { opacity: .3; }

.ed-layer-rename-input {
    flex: 1;
    font-size: 12.5px;
    background: var(--ed-panel-2);
    color: var(--ed-ink);
    border: 1px solid var(--ed-accent);
    border-radius: 4px;
    padding: 1px 4px;
    min-width: 0;
}

/* ---- canvas size modal anchor grid ---- */
.ed-anchor-grid {
    display: grid;
    grid-template-columns: repeat(3, 28px);
    grid-template-rows: repeat(3, 28px);
    gap: 3px;
    background: var(--ed-panel-2);
    padding: 8px;
    border-radius: 4px;
    width: fit-content;
}
.ed-anchor-cell {
    width: 28px;
    height: 28px;
    background: var(--ed-panel-3);
    border: 1px solid var(--ed-line-soft);
    cursor: pointer;
    border-radius: 2px;
}
.ed-anchor-cell:hover { background: var(--ed-accent-hover); }
.ed-anchor-cell.active { background: var(--ed-accent); border-color: var(--ed-accent); }

/* ==================================================================
   Photoshop-szintű szerkesztő – kiegészítő felület
   (rétegmaszk, rétegstílus, vonalzók, előzmény, színválasztó, eszközcsoportok)
   ================================================================== */

.ed-mono { font-family: var(--ed-font-mono); font-size: 11.5px; color: var(--ed-ink-bright); }

.ed-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ed-ink);
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}
.ed-check input { accent-color: var(--ed-accent); margin: 0; }

/* ---- menubar: current edit target ---- */
.ed-target-badge {
    font-family: var(--ed-font-mono);
    font-size: 10px;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 20px;
    border: 1px solid var(--ed-line-soft);
    color: var(--ed-ink-dim);
    margin-right: 8px;
    white-space: nowrap;
}
.ed-target-badge.on-mask {
    border-color: var(--ed-accent-2);
    color: #06232b;
    background: var(--ed-accent-2);
}

.ed-icon-btn:disabled { opacity: .3; cursor: default; }
.ed-icon-btn:disabled:hover { background: transparent; }

/* ---- options bar extras ---- */
.ed-optionsbar select {
    background: var(--ed-panel-2);
    border: 1px solid var(--ed-line-soft);
    color: var(--ed-ink);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 12px;
}

/* ---- left tool strip: groups + flyouts ---- */
/* The strip holds ~16 tool slots, more than fits on a short screen, so the tools scroll
   while the foreground/background colour well stays pinned at the bottom. */
.ed-tools { padding: 6px 0 0; gap: 0; overflow: visible; }

.ed-tool-scroll {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    overflow-y: auto;
    scrollbar-width: none;
}
.ed-tool-scroll::-webkit-scrollbar { width: 0; }

.ed-tool { width: 30px; height: 30px; }

.ed-tool-group { position: relative; flex: 0 0 auto; }

.ed-tool-arrow {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-bottom: 5px solid var(--ed-ink-dim);
    cursor: pointer;
}
.ed-tool-group .ed-tool.active + .ed-tool-arrow { border-bottom-color: #fff; }

/* Fixed, not absolute: the tool strip scrolls (overflow-y), which would otherwise clip the
   flyout to the 44px-wide column. Its top/left are set in JS when it opens. */
.ed-flyout {
    display: none;
    position: fixed;
    z-index: 40;
    min-width: 190px;
    padding: 4px;
    background: var(--ed-panel-2);
    border: 1px solid var(--ed-line-soft);
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .6);
}
.ed-flyout.open { display: block; }

.ed-flyout-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 6px 8px;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--ed-ink);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}
.ed-flyout-item:hover { background: var(--ed-accent); color: #fff; }
.ed-flyout-item span:nth-child(2) { flex: 1; }
.ed-flyout-item b {
    font-family: var(--ed-font-mono);
    font-size: 10.5px;
    font-weight: 500;
    color: var(--ed-ink-dim);
}
.ed-flyout-item:hover b { color: rgba(255, 255, 255, .8); }
.ed-flyout-icon { display: inline-flex; width: 17px; height: 17px; }
.ed-flyout-icon svg { width: 17px; height: 17px; }

/* ---- foreground / background colour well ---- */
.ed-color-well {
    position: relative;
    width: 40px;
    height: 46px;
    margin: 8px auto;
    flex: 0 0 auto;
    border-top: 1px solid var(--ed-line);
    padding-top: 8px;
    box-sizing: content-box;
}
.ed-swatch {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    border: 1px solid var(--ed-line-soft);
    box-shadow: 0 0 0 1px #000;
    cursor: pointer;
    padding: 0;
}
.ed-swatch.fg { left: 0; top: 0; z-index: 2; }
.ed-swatch.bg { right: 0; bottom: 0; z-index: 1; }

.ed-color-mini {
    position: absolute;
    background: none;
    border: none;
    color: var(--ed-ink-dim);
    font-size: 11px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}
.ed-color-mini:hover { color: var(--ed-ink-bright); }
.ed-color-mini.swap { right: -1px; top: -2px; }
.ed-color-mini.reset { left: -2px; bottom: -2px; }

/* `.ad-slot` is a centred flex column, and an empty <ins> in it shrinks to zero width —
   AdSense then rejects the unit with "No slot size for availableWidth=0" and no ad ever
   renders. Stretching it to the container is what gives the unit a width to measure. */
.ad-slot .adsbygoogle {
    display: block;
    width: 100%;
    align-self: stretch;
}

/* The brand name is long, so it is the part that gives way when the menu bar runs out of
   room — the menus themselves must never be pushed off screen.
   NOTE: the bar must NOT get an `overflow` of its own. Setting `overflow-x` makes the
   browser compute `overflow-y` to `auto` as well, and the 34px-tall bar then clips every
   dropdown it contains — the menus still open, they are just invisible. */
.ed-logo {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ed-menubar .dropdown,
.ed-menubar .ed-menu-btn { flex: 0 0 auto; }

/* The Layer menu (adjustment types + group/clip commands) is taller than a laptop screen,
   so the menus scroll internally rather than running off the bottom. Safe to put the
   overflow HERE — the menu is the innermost box, nothing inside it needs to escape. */
.ed-menubar .dropdown-menu {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 1100px) {
    .ed-logo { display: none; }
}
/* Below this the menus themselves need to tighten up to stay on screen. */
@media (max-width: 760px) {
    .ed-menu-btn { padding: 6px 6px; font-size: 12px; }
    .ed-target-badge { display: none; }
}

/* ---- document tabs ---- */
.ed-canvas-main {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ed-doctabs {
    flex: 0 0 auto;
    display: flex;
    align-items: stretch;
    gap: 1px;
    padding: 0 4px;
    background: #121216;
    border-bottom: 1px solid var(--ed-line);
    overflow-x: auto;
    scrollbar-width: thin;
}
/* A single document needs no tab strip — hide it so nothing is lost to chrome. */
.ed-doctabs.single { display: none; }

.ed-doctab {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    padding: 6px 8px 6px 12px;
    background: var(--ed-panel);
    border: 1px solid var(--ed-line);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: var(--ed-ink-dim);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    margin-top: 3px;
}
.ed-doctab:hover { color: var(--ed-ink); }
.ed-doctab.active {
    background: var(--ed-canvas-bg);
    color: var(--ed-ink-bright);
    box-shadow: inset 0 2px 0 var(--ed-accent);
    margin-top: 0;
    padding-top: 9px;
}
.ed-doctab .label {
    overflow: hidden;
    text-overflow: ellipsis;
}
.ed-doctab .close {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
    border-radius: 3px;
    color: var(--ed-ink-dim);
    cursor: pointer;
    font-size: 14px;
}
.ed-doctab .close:hover { background: var(--ed-panel-3); color: var(--ed-ink-bright); }

.ed-layer-item .badges .badge-smart {
    display: inline-flex;
    padding: 2px;
    color: var(--ed-accent-2);
}
.ed-layer-item .badges .badge-smart svg { width: 10px; height: 10px; }

/* ---- rulers ---- */
.ed-ruler-wrap { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.ed-ruler-wrap.hidden { display: none; }
.ed-ruler-top,
.ed-ruler-left {
    position: absolute;
    pointer-events: auto;
    cursor: crosshair;
}
.ed-ruler-top { top: 0; left: 0; width: 100%; height: 20px; }
.ed-ruler-left { top: 0; left: 0; width: 20px; height: 100%; }
.ed-ruler-corner {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--ed-panel);
    border-right: 1px solid var(--ed-line);
    border-bottom: 1px solid var(--ed-line);
    pointer-events: auto;
}

.ed-canvas-viewport { padding: 24px 24px 24px 24px; }

/* Guides/grid live in document space (inside the scaled stack) but must never eat clicks. */
.ed-canvas-stack .ed-guides { pointer-events: none; z-index: 3; }

/* ==================== right panel (Photoshop-style panel stack) ==================== */
/* The column scrolls as a whole and each panel group keeps a natural height. Letting the
   groups fight over a flex remainder squeezed the layer list to nothing once the ad bars
   had taken their share of a short window. */
.ed-panel-right {
    width: 272px;
    overflow-y: auto;
    background: var(--ed-panel);
}

.ed-pgroup {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    border-bottom: 1px solid var(--ed-line);
}

/* ---- tab bar ---- */
.ed-tabbar {
    display: flex;
    align-items: stretch;
    background: #1a1a20;
    border-bottom: 1px solid var(--ed-line);
    padding-right: 6px;
}
.ed-tab {
    background: transparent;
    border: none;
    border-right: 1px solid var(--ed-line);
    color: var(--ed-ink-dim);
    font-size: 11.5px;
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
}
.ed-tab:hover { color: var(--ed-ink); }
.ed-tab.active {
    background: var(--ed-panel);
    color: var(--ed-ink-bright);
    /* The active tab reads as the front sheet of a stack, like Photoshop's panel tabs. */
    box-shadow: inset 0 2px 0 var(--ed-accent);
}
.ed-pmenu {
    margin-left: auto;
    align-self: center;
    color: var(--ed-ink-dim);
    font-size: 12px;
    padding: 0 2px;
    cursor: default;
}

.ed-tabpanel { display: none; flex-direction: column; min-height: 0; }
.ed-tabpanel.active { display: flex; }

#panelHistory { height: 150px; }
#panelSwatches { padding-bottom: 4px; }

/* ---- layer panel header rows ---- */
.ed-lp-head {
    padding: 6px 8px 4px;
    border-bottom: 1px solid var(--ed-line);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ed-lp-row { display: flex; align-items: center; gap: 5px; }
.ed-lp-label {
    font-size: 11px;
    color: var(--ed-ink-dim);
    white-space: nowrap;
}
.ed-lp-locklabel { margin-left: auto; }

.ed-lp-blend {
    width: 100%;
    background: var(--ed-panel-2);
    color: var(--ed-ink);
    border: 1px solid var(--ed-line-soft);
    border-radius: 3px;
    padding: 3px 6px;
    font-size: 11.5px;
}

.ed-lp-num {
    width: 46px;
    background: var(--ed-panel-2);
    border: 1px solid var(--ed-line-soft);
    border-radius: 3px;
    color: var(--ed-ink-bright);
    font-family: var(--ed-font-mono);
    font-size: 11px;
    padding: 2px 4px;
    text-align: right;
}
.ed-lp-num:focus { outline: none; border-color: var(--ed-accent); }

.ed-lp-caret {
    width: 12px;
    height: 12px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}
.ed-lp-caret::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--ed-ink-dim);
}
.ed-lp-caret:hover::after { border-top-color: var(--ed-ink-bright); }
.ed-lp-caret.open::after { transform: rotate(180deg); }

/* The slider stays collapsed until the caret is clicked, exactly like Photoshop's popup. */
.ed-lp-sliderrow { display: none; padding: 0 2px 2px; }
.ed-lp-sliderrow.open { display: block; }
.ed-lp-sliderrow input { width: 100%; accent-color: var(--ed-accent); }

.ed-lp-lock {
    width: 20px;
    height: 20px;
    padding: 2px;
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--ed-ink-dim);
    cursor: pointer;
}
.ed-lp-lock svg { width: 100%; height: 100%; }
.ed-lp-lock:hover { color: var(--ed-ink-bright); background: var(--ed-panel-3); }
.ed-lp-lock.on {
    color: var(--ed-ink-bright);
    background: var(--ed-panel-3);
    border-color: var(--ed-accent);
}

/* ---- layer panel bottom icon bar ---- */
.ed-lp-bottombar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 5px 4px;
    border-top: 1px solid var(--ed-line);
    background: #1a1a20;
}
.ed-lp-bottombar button {
    width: 22px;
    height: 22px;
    padding: 3px;
    background: none;
    border: none;
    border-radius: 3px;
    color: var(--ed-ink-dim);
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ed-lp-bottombar button svg { width: 100%; height: 100%; }
.ed-lp-bottombar button b { font-size: 11px; font-style: italic; }
.ed-lp-bottombar button:hover { color: var(--ed-ink-bright); background: var(--ed-panel-3); }

/* ---- layer tree: groups, adjustment layers, clipping ---- */
.ed-layer-item .twisty {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
}
.ed-layer-item .twisty::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 2px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid var(--ed-ink-dim);
    transition: transform .12s ease;
}
.ed-layer-item .twisty.open::after { transform: rotate(90deg); transform-origin: 2px 4px; }

.ed-layer-item .thumb.kind {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ed-panel-2);
    color: var(--ed-ink-dim);
}
.ed-layer-item .thumb.kind svg { width: 18px; height: 18px; }
.ed-layer-item.type-group > .name,
.ed-layer-item.type-group .name { font-weight: 600; }
.ed-layer-item.type-adjustment .thumb.kind { color: var(--ed-accent-2); }

/* A clipped layer is drawn indented with an arrow badge, like Photoshop's ⌐ marker. */
.ed-layer-item.clipped .namewrap { padding-left: 8px; }
.ed-layer-item .badges .badge-clip { color: var(--ed-accent-2); }

.ed-lp-dropdown { display: inline-flex; }
.ed-lp-dropdown .dropdown-menu { font-size: 12px; }

/* ---- paths panel ---- */
.ed-path-list {
    list-style: none;
    margin: 0;
    padding: 4px 6px;
    overflow-y: auto;
    max-height: 240px;
    min-height: 60px;
}
.ed-path-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}
.ed-path-item:hover { background: var(--ed-panel-2); }
.ed-path-item.active { background: #3a3a46; color: var(--ed-ink-bright); }
.ed-path-item canvas {
    width: 40px;
    height: auto;
    border: 1px solid var(--ed-line-soft);
    flex: 0 0 auto;
}
.ed-path-item .name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- text editing overlay ---- */
.ed-text-input {
    position: absolute;
    z-index: 6;
    background: transparent;
    border: 1px dashed var(--ed-accent);
    outline: none;
    padding: 0;
    margin: 0;
    resize: none;
    overflow: hidden;
    white-space: pre;
    caret-color: var(--ed-accent);
}

/* ---- channels ---- */
.ed-channel-list { list-style: none; margin: 0; padding: 4px 6px; }
.ed-channel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 3px;
    font-size: 12px;
}
.ed-channel-item:hover { background: var(--ed-panel-2); }
.ed-channel-item .thumb {
    width: 36px;
    height: 26px;
    overflow: hidden;
    border: 1px solid var(--ed-line-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}
.ed-channel-item .thumb canvas { max-width: 100%; max-height: 100%; }
.ed-channel-item .vis {
    width: 18px;
    height: 18px;
    background: none;
    border: none;
    color: var(--ed-ink-dim);
    cursor: pointer;
    padding: 0;
}
.ed-channel-item .vis svg { width: 14px; height: 14px; }
.ed-channel-item .vis.off { opacity: .25; }

.ed-panel-note {
    font-size: 10.5px;
    color: var(--ed-ink-dim);
    margin: 2px 10px 10px;
    line-height: 1.45;
}

.ed-ad-slot .ad-mock { min-height: 150px; }

.ed-color-panel {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 8px 10px 10px;
}
.ed-preset-swatch {
    height: 22px;
    border-radius: 3px;
    border: 1px solid var(--ed-line-soft);
    cursor: pointer;
    padding: 0;
}
.ed-preset-swatch:hover { outline: 2px solid var(--ed-accent); outline-offset: 1px; }

.ed-layer-list {
    overflow-y: auto;
    max-height: 300px;
    min-height: 70px;
    padding: 3px;
    gap: 1px;
}

.ed-layer-item {
    gap: 6px;
    padding: 3px 5px;
    border-radius: 2px;
    border: 1px solid transparent;
}
.ed-layer-item.active {
    background: #3a3a46;
    border-color: transparent;
}

.ed-layer-item .badges .badge-lock { color: var(--ed-ink-bright); }

.ed-layer-item .thumb {
    width: 30px;
    height: 30px;
    cursor: pointer;
}
/* The active edit target (pixels vs. mask) gets a ring, mirroring Photoshop's white frame. */
.ed-layer-item .thumb.target { box-shadow: 0 0 0 2px var(--ed-accent-2); }
.ed-layer-item .thumb.mask { background: #111; }
.ed-layer-item .thumb.mask.disabled { opacity: .35; }

.ed-layer-item .namewrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ed-layer-item .badges { display: flex; gap: 3px; flex: 0 0 auto; }
.ed-layer-item .badges i {
    font-style: normal;
    font-family: var(--ed-font-mono);
    font-size: 9px;
    line-height: 1;
    padding: 3px 4px;
    border-radius: 3px;
    background: var(--ed-panel-3);
    color: var(--ed-ink-dim);
}
.ed-layer-item .badges .badge-fx { color: var(--ed-accent-2); }

.ed-layer-item .vis svg { width: 14px; height: 14px; }

.ed-panel-head-actions button { font-size: 11px; }

/* ---- history panel ---- */
.ed-history-list {
    list-style: none;
    margin: 0;
    padding: 4px 6px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.ed-history-item {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--ed-ink-dim);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ed-history-item:hover { background: var(--ed-panel-2); color: var(--ed-ink); }
.ed-history-item.current {
    background: rgba(124, 92, 255, .18);
    color: var(--ed-ink-bright);
    font-weight: 600;
}
.ed-history-item.future { opacity: .45; font-style: italic; }

/* ---- status bar ---- */
.ed-statusbar-msg {
    margin-left: auto;
    color: var(--ed-ink-dim);
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46%;
}

/* ---- modals: shared dark shell ---- */
.ed-modal {
    background: var(--ed-panel);
    color: var(--ed-ink);
    border: 1px solid var(--ed-line-soft);
    border-radius: 10px;
}
.ed-modal .modal-header,
.ed-modal .modal-footer { border-color: var(--ed-line); }
.ed-modal .modal-title { font-size: 15px; font-weight: 600; color: var(--ed-ink-bright); }
.ed-modal .form-label { font-size: 12px; color: var(--ed-ink-dim); margin-bottom: 4px; }
.ed-modal .form-control,
.ed-modal .form-select {
    background: var(--ed-panel-2);
    border-color: var(--ed-line-soft);
    color: var(--ed-ink);
    font-size: 13px;
}
.ed-modal .form-control:focus,
.ed-modal .form-select:focus {
    background: var(--ed-panel-2);
    color: var(--ed-ink-bright);
    border-color: var(--ed-accent);
    box-shadow: 0 0 0 .18rem rgba(124, 92, 255, .25);
}
.ed-modal .form-range { accent-color: var(--ed-accent); }
.ed-modal hr { border-color: var(--ed-line-soft); }
.ed-modal .btn-primary { background: var(--ed-gradient); border: none; }
.ed-modal .btn-primary:hover { filter: brightness(1.12); }
.ed-modal-hint { font-size: 11.5px; color: var(--ed-ink-dim); margin: 8px 0 0; }

.ed-presets {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.ed-preset-doc {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    background: var(--ed-panel-2);
    border: 1px solid var(--ed-line-soft);
    border-radius: 6px;
    color: var(--ed-ink);
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
}
.ed-preset-doc small { font-family: var(--ed-font-mono); font-size: 10.5px; color: var(--ed-ink-dim); }
.ed-preset-doc:hover { border-color: var(--ed-accent); }

/* ---- layer style dialog ---- */
.ed-style-body { max-height: 62vh; overflow-y: auto; }
.ed-style-block {
    border: 1px solid var(--ed-line-soft);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.ed-style-title { font-weight: 600; color: var(--ed-ink-bright); font-size: 13px; }
.ed-style-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 8px 12px;
    margin-top: 8px;
}
.ed-style-grid label { font-size: 12px; color: var(--ed-ink-dim); }
.ed-style-grid input[type="range"] { accent-color: var(--ed-accent); width: 100%; }
.ed-style-grid input[type="color"] {
    width: 42px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--ed-line-soft);
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

/* ---- colour picker ---- */
.ed-picker {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 12px;
    align-items: start;
}
#pickerSV, #pickerHue {
    border: 1px solid var(--ed-line-soft);
    border-radius: 4px;
    cursor: crosshair;
    display: block;
}
.ed-picker-fields { display: flex; flex-direction: column; gap: 4px; }
.ed-picker-preview {
    height: 42px;
    border-radius: 4px;
    border: 1px solid var(--ed-line-soft);
    box-shadow: inset 0 0 0 1px #000;
    margin-bottom: 6px;
}
.ed-picker-rgb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }

/* ---- curves & histogram ---- */
.ed-curve, .ed-histogram {
    border: 1px solid var(--ed-line-soft);
    border-radius: 6px;
    cursor: crosshair;
    max-width: 100%;
}
.ed-histogram { width: 100%; cursor: default; }

@media (max-width: 1200px) {
    .ed-panel-right { width: 232px; }
}
@media (max-width: 900px) {
    .ed-picker { grid-template-columns: 1fr; }
    .ed-style-grid { grid-template-columns: 90px 1fr; }
}
