/* Android/Chrome 'font boosting' vergroot eigenmachtig teksten op pagina's
   die het als desktop beoordeelt — dat verminkte de mobiele weergave
   (opgeblazen teller/disclaimer/topbar). Expliciet uitschakelen: */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ═══════════════════════════════════════════════════════════════
   Ballonpilaar Designer - Volledig herschreven CSS
   Mobile-first, modern, clean
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow: hidden; }
body {
    font-family: 'Poppins', sans-serif;
    background: #f0f2f5;
    color: #374151;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

/* ── Topbar ───────────────────────────────────────────────────── */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 200;
    gap: 8px;
    width: 100%;
    overflow: hidden;
}
.topbar-left  { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.topbar-center { display: flex; align-items: center; justify-content: center; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.topbar-logo img { height: 52px; display: block; border-radius: 4px; }

.topbar-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 700; color: #1e3a5f;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-width: 0; flex: 1;
}
.design-name-badge {
    background: #eff6ff; color: #3b82f6;
    font-size: .7rem; font-weight: 600;
    padding: 2px 8px; border-radius: 10px;
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.topbar-link {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 6px;
    font-size: .8rem; font-weight: 600; text-decoration: none;
    color: #4b5563; transition: background .15s;
}
.topbar-link:hover { background: #f3f4f6; color: #1e3a5f; }
.topbar-link-admin  { color: #ef4444; }
.topbar-link-logout { color: #6b7280; }

.language-selector { display: none; }
.language-button {
    padding: 4px 9px; border: 1px solid #e2e8f0; border-radius: 5px;
    background: #fff; font-size: .75rem; font-weight: 600; cursor: pointer;
    color: #6b7280; transition: all .15s; font-family: inherit;
}
.language-button.active { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }

.topbar-mobile-toggle {
    display: none; background: none; border: none;
    font-size: 1.3rem; cursor: pointer; padding: 4px 8px;
}

/* ── Designer Layout ──────────────────────────────────────────── */
.designer-layout {
    position: relative;
    width: 100%;
    height: calc(100vh - 72px);
    overflow: hidden;
}

/* ── Canvas ───────────────────────────────────────────────────── */
.canvas-area {
    position: absolute;
    inset: 0;
    background: #e5e7eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.balloon-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    transform-origin: center center;
    cursor: crosshair;
}
.background-image {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%; max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 0;
}
.balloon-svg { z-index: 1; }

.tool-disclaimer {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    box-sizing: border-box;
    white-space: normal;
    text-align: center;
    font-size: 11px;
    line-height: 1.35;
    color: #64748b;
    background: rgba(255, 255, 255, 0.82);
    padding: 5px 12px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 5;
}
.tool-disclaimer strong { color: #475569; font-weight: 600; }
@media (max-width: 768px) {
    .tool-disclaimer { font-size: 10px; bottom: 6px; padding: 4px 10px; }
}

.undo-btn {
    position: absolute; top: 12px; right: 12px; z-index: 10;
    background: rgba(255,255,255,.9); border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 7px 10px; cursor: pointer;
    display: flex; align-items: center; gap: 5px;
    font-size: .78rem; font-weight: 600; color: #374151;
    box-shadow: 0 1px 4px rgba(0,0,0,.1); transition: all .15s;
}
.undo-btn:hover { background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.undo-btn:disabled { opacity: .4; cursor: default; }

.panel-toggle-btn {
    position: absolute; top: 50%; right: 0;
    transform: translateY(-50%);
    background: #fff; border: 1px solid #e2e8f0;
    border-right: none; border-radius: 8px 0 0 8px;
    padding: 12px 8px; cursor: pointer;
    box-shadow: -2px 0 8px rgba(0,0,0,.08);
    z-index: 99; transition: all .2s;
    display: flex; align-items: center;
}
.panel-toggle-btn:hover { background: #f3f4f6; }
.controls-panel.collapsed ~ * .panel-toggle-btn,
.panel-toggle-btn.panel-open { right: 380px; }

/* ── Controls Panel - slide-in van rechts ─────────────────────── */
.controls-panel {
    position: fixed;
    top: 72px;
    right: 0;
    width: 380px;
    height: calc(100vh - 72px);
    background: #fff;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
    box-shadow: -4px 0 20px rgba(0,0,0,.1);
    transform: translateX(0);
    transition: transform .3s ease;
}
.controls-panel.collapsed {
    transform: translateX(100%);
}

/* ── Counter Bar ──────────────────────────────────────────────── */
/* ── Verticaal counter-paneel links ── */
.counter-bar {
    background: rgba(30,58,95,.94);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 14px 14px 12px;
    position: absolute;
    top: 12px; left: 12px;
    border-radius: 14px;
    z-index: 10;
    width: 180px;
    max-height: calc(100% - 90px);
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
}
.counter-bar-title {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
    color: rgba(255,255,255,.55); font-weight: 600;
    margin-bottom: 10px; flex-shrink: 0;
}
.counter-bar-inner {
    display: flex; flex-direction: column; gap: 6px;
    font-size: .8rem;
    overflow-y: auto; scrollbar-width: thin;
    flex: 1;
}
.counter-bar-inner::-webkit-scrollbar { width: 5px; }
.counter-bar-inner::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 3px; }
.counter-icon { font-size: 1rem; flex-shrink: 0; }
#balloon-counter-body { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.counter-color-dot {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.10); border-radius: 8px;
    padding: 6px 9px; font-size: .8rem; width: 100%;
    box-sizing: border-box;
}
.counter-color-dot span.swatch { width: 16px; height: 16px; border-radius: 50%; display: inline-block; flex-shrink: 0; border: 1px solid rgba(255,255,255,.3); }
.counter-color-dot .cc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counter-color-dot .cc-count { font-weight: 700; flex-shrink: 0; }
.counter-total {
    font-weight: 700; font-size: .85rem;
    border-top: 1px solid rgba(255,255,255,.18);
    padding-top: 8px; margin-top: 8px; width: 100%;
    flex-shrink: 0;
}
.counter-subtotal {
    font-weight: 600; font-size: .8rem;
    color: rgba(255,255,255,.85);
    margin-top: 4px; width: 100%; flex-shrink: 0;
}
/* Layer-controls los bovenin het canvas (niet meer in de counter) */
.layer-controls {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
    z-index: 10;
    display: flex; align-items: center; gap: 6px;
    background: rgba(30,58,95,.94); backdrop-filter: blur(8px);
    color: #fff; padding: 7px 12px; border-radius: 20px;
    font-size: .8rem; box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.layer-btn {
    width: 26px; height: 26px; border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.1); color: #fff; border-radius: 5px;
    cursor: pointer; font-size: 1.1rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.layer-btn:hover { background: rgba(255,255,255,.25); }

/* ── Tabs ─────────────────────────────────────────────────────── */
.tabs-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.tabs-header {
    display: flex; border-bottom: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.tabs-header::-webkit-scrollbar { display: none; }
.tab-button {
    flex: 1; padding: 10px 2px; border: none; background: none;
    font-family: inherit; font-size: .7rem; font-weight: 600;
    color: #6b7280; cursor: pointer; white-space: nowrap;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all .15s; text-align: center;
    overflow: hidden; text-overflow: ellipsis;
}
.tab-button.active { color: #3b82f6; border-bottom-color: #3b82f6; }
.tab-button:hover:not(.active) { color: #374151; background: #f9fafb; }

.tab-content { display: none; flex: 1; overflow-y: auto; padding: 0; }
.tab-content.active { display: block; }

/* ── Control Panels (accordion) ───────────────────────────────── */
.control-panel { border-bottom: 1px solid #f1f5f9; }
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 14px; cursor: pointer; font-size: .82rem;
    font-weight: 700; color: #374151; user-select: none;
    transition: background .15s;
}
.panel-header:hover { background: #f9fafb; }
.panel-toggle { font-size: .7rem; color: #9ca3af; transition: transform .2s; }
.control-panel.active .panel-toggle { transform: rotate(180deg); }
.panel-content { display: none; padding: 12px 14px; }
.control-panel.active .panel-content { display: block; }

/* ── Color Grid ───────────────────────────────────────────────── */
.category-selector { margin-bottom: 10px; }
.category-dropdown {
    width: 100%; padding: 7px 10px;
    border: 1px solid #e5e7eb; border-radius: 7px;
    font-family: inherit; font-size: .82rem; background: #fff;
    cursor: pointer;
}
.color-grid {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 10px;
}
.color-button {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    width: 46px; border: none; background: none; cursor: pointer;
    padding: 2px; border-radius: 8px; transition: background .15s;
    flex-shrink: 0;
}
.color-button:hover { background: #f3f4f6; }
.color-button.selected .color-dot { outline: 3px solid #1e3a5f; outline-offset: 2px; }
.color-dot {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid rgba(0,0,0,.1); flex-shrink: 0;
    transition: transform .15s, box-shadow .15s;
}
.color-button:hover .color-dot { transform: scale(1.1); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.color-label {
    font-size: .6rem; color: #4b5563; text-align: center;
    line-height: 1.2; max-width: 44px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; font-family: 'Poppins', sans-serif;
}

.selected-color-preview {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px; background: #f8fafc;
    border-radius: 7px; font-size: .78rem; color: #4b5563;
}
.selected-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #e2e8f0; flex-shrink: 0; }
.color-name-label { font-weight: 600; color: #1e3a5f; }

/* ── Palette (patroon kleuren) ────────────────────────────────── */
.color-selection { display: flex; flex-direction: column; gap: 8px; }
.selected-colors { display: flex; flex-wrap: wrap; gap: 6px; min-height: 36px; }
.palette-color {
    width: 36px; height: 36px; border-radius: 50%;
    border: 2px solid rgba(0,0,0,.1); cursor: pointer;
    position: relative; transition: transform .15s;
    flex-shrink: 0;
}
.palette-color:hover { transform: scale(1.1); }
.palette-color .remove-color {
    position: absolute; top: -4px; right: -4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: #ef4444; color: #fff; border: none;
    font-size: .65rem; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .15s;
}
.palette-color:hover .remove-color { opacity: 1; }

.add-to-palette {
    padding: 7px 12px; background: #eff6ff; color: #3b82f6;
    border: 1px dashed #3b82f6; border-radius: 7px;
    font-family: inherit; font-size: .8rem; font-weight: 600;
    cursor: pointer; transition: all .15s; width: 100%;
}
.add-to-palette:hover { background: #3b82f6; color: #fff; }

/* ── Mode buttons ─────────────────────────────────────────────── */
.button-group { display: flex; gap: 5px; }
.mode-button {
    flex: 1; padding: 7px 6px; border: 1px solid #e5e7eb;
    border-radius: 6px; background: #fff; font-family: inherit;
    font-size: .75rem; font-weight: 600; cursor: pointer;
    color: #6b7280; transition: all .15s;
}
.mode-button.active { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }
.mode-button:hover:not(.active) { background: #f3f4f6; }

/* ── Maat-knoppen (schacht, romeinse pilaar) ──────────────────── */
.size-button {
    flex: 1; padding: 7px 6px; border: 1px solid #e5e7eb;
    border-radius: 6px; background: #fff; font-family: inherit;
    font-size: .75rem; font-weight: 600; cursor: pointer;
    color: #6b7280; transition: all .15s;
}
.size-button.active { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.size-button:hover:not(.active) { background: #f3f4f6; }
.size-tool-hint { font-size: .72rem; color: #6b7280; margin: 0 0 8px; line-height: 1.4; }

/* ── Pattern grid ─────────────────────────────────────────────── */
.pattern-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.pattern-button {
    padding: 10px 8px; border: 1px solid #e5e7eb; border-radius: 7px;
    background: #fff; font-family: inherit; font-size: .78rem;
    font-weight: 600; cursor: pointer; color: #374151;
    display: flex; align-items: center; gap: 6px;
    transition: all .15s;
}
.pattern-button:hover { background: #eff6ff; border-color: #3b82f6; color: #3b82f6; }
.pattern-icon { font-size: 1rem; }

.reset-btn {
    padding: 9px; border: 1px solid #fca5a5; border-radius: 7px;
    background: #fff; color: #ef4444; font-family: inherit;
    font-size: .82rem; font-weight: 600; cursor: pointer;
    transition: all .15s;
}
.reset-btn:hover { background: #fee2e2; }

/* ── Sliders ──────────────────────────────────────────────────── */
.slider-group { margin-bottom: 14px; }
.slider-group label { display: block; font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: 6px; }
.slider-row { display: flex; align-items: center; gap: 10px; }
.slider-row input[type=range] { flex: 1; }
.slider-row span { font-size: .78rem; color: #6b7280; min-width: 36px; text-align: right; }

/* ── Toggle switch ────────────────────────────────────────────── */
.toggle-container { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .85rem; font-weight: 600; }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
/* §124 — bij het topballon-schuifje staat nu één vaste zin in plaats van
   twee korte standen. Die zin is langer: hij mag over twee regels lopen en
   mag het schuifje zelf niet platdrukken. */
.toggle-container { flex-wrap: wrap; }
.toggle-container #topBalloonMode { flex: 1 1 140px; min-width: 0; font-weight: 500; line-height: 1.3; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: #d1d5db;
    border-radius: 24px; transition: .3s; cursor: pointer;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
    transition: .3s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
input:checked + .toggle-slider { background: #3b82f6; }
input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── Popup trigger buttons ────────────────────────────────────── */
.popup-trigger-btn {
    padding: 9px 12px; border: none; border-radius: 6px;
    cursor: pointer; font-family: inherit; font-size: .82rem;
    font-weight: 600; text-align: left; transition: opacity .15s;
    width: 100%;
}
.popup-trigger-btn:hover { opacity: .85; }
.popup-trigger-blue  { background: #3b82f6; color: #fff; }
.popup-trigger-purple { background: #8b5cf6; color: #fff; }

/* ── Action grid ──────────────────────────────────────────────── */
.action-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
    margin-bottom: 12px;
}
.action-button {
    display: flex; align-items: center; justify-content: center;
    gap: 5px; padding: 9px 10px; border: none; border-radius: 7px;
    font-family: inherit; font-size: .78rem; font-weight: 600;
    cursor: pointer; transition: all .15s; text-decoration: none;
    white-space: nowrap;
}
.action-button.primary { background: #3b82f6; color: #fff; }
.action-button.primary:hover { background: #2563eb; }
.action-button.secondary { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.action-button.secondary:hover { background: #e5e7eb; }

/* ── Export options ───────────────────────────────────────────── */
.export-options { margin-top: 8px; }
.checkbox-container { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .8rem; }
.checkbox-container input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: #3b82f6; }

/* ── Floating menu ────────────────────────────────────────────── */
.floating-menu-container { position: fixed; bottom: 24px; right: 24px; z-index: 500; }
.floating-action-button {
    width: 52px; height: 52px; border-radius: 50%;
    background: #3b82f6; color: #fff; border: none;
    box-shadow: 0 4px 14px rgba(59,130,246,.5);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.floating-action-button:hover { background: #2563eb; transform: scale(1.08); }

.floating-menu {
    position: absolute; bottom: 62px; right: 0;
    display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
    opacity: 0; pointer-events: none; transform: translateY(10px);
    transition: all .2s;
}
.floating-menu.active { opacity: 1; pointer-events: all; transform: translateY(0); }

.floating-menu-item {
    position: relative; width: 44px; height: 44px; border-radius: 50%;
    background: #fff; border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #374151; transition: all .15s;
}
.floating-menu-item:hover { background: #f3f4f6; transform: scale(1.05); }
.tooltip-text {
    position: absolute; right: 52px; background: #1e3a5f; color: #fff;
    font-size: .72rem; white-space: nowrap; padding: 4px 8px;
    border-radius: 5px; pointer-events: none; font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* ── Modal ────────────────────────────────────────────────────── */
.modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
}
.modal-content {
    background: #fff; border-radius: 10px;
    padding: 24px; width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-content h2 { margin-bottom: 14px; font-size: 1rem; color: #1e3a5f; }

/* ── Printed balloons ─────────────────────────────────────────── */
.printed-balloon-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.printed-balloon-item {
    border: 2px solid #e5e7eb; border-radius: 7px; overflow: hidden;
    cursor: pointer; aspect-ratio: 1; transition: border-color .15s;
}
.printed-balloon-item:hover { border-color: #3b82f6; }
.printed-balloon-item.selected { border-color: #1e3a5f; }
.printed-balloon-item img { width: 100%; height: 100%; object-fit: contain; }

/* ── Inner highlight (glans op ballon) ────────────────────────── */
.inner-highlight { pointer-events: none; }

/* ── Inactive link ────────────────────────────────────────────── */
.inactive-link { pointer-events: none; opacity: .4; }
.active-link   { pointer-events: auto; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE - Tablet (768px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .controls-panel { width: 300px; }
    .topbar-center { display: none; }
}

@media (max-width: 768px) {
    .topbar { padding: 0 12px; height: 60px; }
    .topbar-link { display: none; }
    .topbar-link-logout { display: flex; }
    .topbar-mobile-toggle { display: flex; }
    .language-selector { display: none; }
    .topbar-logo img { height: 42px; }

    /* MOBIELE LAYOUT-FIX: deze regels gingen uit van een grid, maar
       .designer-layout had geen display:grid en .controls-panel bleef
       position:fixed — het paneel hing daardoor als overlay ÓVER de
       tekening. Hieronder wordt de grid-intentie echt waargemaakt:
       tekening boven, bedieningspaneel eronder (scrollbaar). */
    .designer-layout {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        height: calc(100dvh - 60px);
        overflow: hidden;
    }

    .canvas-area {
        position: relative;   /* was absolute (inset:0) — moet grid-item worden */
        inset: auto;
        grid-row: 1;
        min-height: 45dvh;
    }

    .controls-panel {
        position: relative;   /* was fixed (slide-in) — hoort onder de tekening */
        top: auto;
        right: auto;
        height: auto;
        transform: none !important;   /* ingeklapte desktop-stand mag het paneel hier niet verbergen */
        grid-row: 2;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        max-height: 48dvh;
        width: 100%;
        overflow-y: auto;     /* paneel-inhoud scrollbaar */
        -webkit-overflow-scrolling: touch;
    }

    /* De zijwaartse in-/uitschuifknop is zinloos als het paneel onderin staat */
    .panel-toggle-btn { display: none !important; }

    /* Teller en lagen-knop overlapten elkaar (beide linksboven op het canvas):
       lagen-knop naar rechtsboven naast de undo-knop; teller compact zodat de
       tekening zichtbaar blijft */
    .layer-controls {
        left: auto;
        right: 62px;
        top: 12px;
        transform: none;
        padding: 6px 10px;
        font-size: .74rem;
    }
    /* Teller op mobiel: standaard INGEKLAPT tot een klein knopje (alleen de
       titel); tikken klapt de volledige lijst uit/in. Desktop ongewijzigd. */
    .counter-bar {
        width: auto;
        max-width: 58vw;
        max-height: 40dvh;
        font-size: .9em;
        padding: 9px 12px;
    }
    .counter-bar-title { cursor: pointer; user-select: none; margin: 0; }
    .counter-bar-title::after { content: '  ▾'; opacity: .8; }
    .counter-bar.open .counter-bar-title::after { content: '  ▴'; }
    .counter-bar .counter-bar-inner { display: none; }
    .counter-bar.open .counter-bar-inner { display: flex; margin-top: 8px; }
    /* Disclaimer nam op mobiel te veel canvas in — daar verborgen (desktop toont hem gewoon) */
    .tool-disclaimer { display: none; }

    .tab-button { font-size: .65rem; padding: 8px 4px; }

    .floating-menu-container { bottom: 16px; right: 16px; }

    /* Mobile nav drawer */
    .mobile-nav {
        display: none;
        position: fixed; top: 60px; left: 0; right: 0;
        background: #fff; border-bottom: 1px solid #e2e8f0;
        padding: 12px 16px; z-index: 300;
        flex-direction: column; gap: 8px;
    }
    .mobile-nav.open { display: flex; }
    .mobile-nav a {
        padding: 10px 12px; border-radius: 7px; text-decoration: none;
        font-size: .85rem; font-weight: 600; color: #374151;
    }
    .mobile-nav a:hover { background: #f3f4f6; }
}

@media (max-width: 480px) {
    .action-grid { grid-template-columns: 1fr; }
    .pattern-grid { grid-template-columns: 1fr 1fr; }
    .counter-bar { width: 140px; padding: 10px; top: 8px; left: 8px; }
    .counter-bar-inner { gap: 5px; }
    .counter-color-dot { padding: 4px 7px; font-size: .72rem; }
    .counter-color-dot span.swatch { width: 13px; height: 13px; }
}
