html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    font-family: 'JetBrains Mono', 'Segoe UI', monospace;
    display: flex;
    background: radial-gradient(circle at 50% 50%, #2a0822 0%, #0f020c 100%);
    color: #ffffff;
}

.aero-sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    flex-shrink: 0;
    box-sizing: border-box;
    background: linear-gradient(90deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.03) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 2px solid rgba(255, 96, 197, 0.3);
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    position: relative;
    z-index: 50;
    box-shadow: 5px 0 25px rgba(0,0,0,0.3);
}

.sidebar-brand h2 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(255, 96, 197, 0.8);
    margin: 0 0 10px 5px;
}

.pad-selection-stack { display: flex; flex-direction: column; gap: 6px; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.pad-toggle-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 96, 197, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pad-toggle-btn:hover, .pad-toggle-btn.active {
    background: linear-gradient(180deg, #ff92d8 0%, #FF60C5 100%);
    border-color: #ffb8e4;
    box-shadow: 0 4px 15px rgba(255, 96, 197, 0.5), inset 0 1px 2px #fff;
    color: #ffffff;
    transform: translateY(-1px);
}

.action-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 96, 197, 0.3);
    border-radius: 8px;
    color: #fff;
    padding: 7px;
    font-weight: bold;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.action-btn:hover { background: rgba(255, 96, 197, 0.3); border-color: #FF60C5; }

.section-label {
    font-size: 10px;
    font-weight: 800;
    color: #FF60C5;
    text-transform: uppercase;
    margin: 6px 0 2px 2px;
    letter-spacing: 1px;
}

.workspace-viewport-wrapper {
    flex: 1;
    height: 100vh;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    gap: 16px;
    overflow: hidden;
}

.canvas-area-container { flex: 1; display: flex; flex-direction: column; gap: 10px; height: 100%; }

.sheets-toolbar {
    width: 100%;
    height: 42px;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 100%);
    border: 2px solid rgba(255, 96, 197, 0.4);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 96, 197, 0.2), inset 0 1px 2px #fff;
    backdrop-filter: blur(12px);
    box-sizing: border-box;
    position: relative;
    z-index: 60;
}

.toolbar-label { font-weight: 800; color: #FF60C5; font-size: 12px; }
.tool-status { font-size: 12px; font-weight: bold; }
.toolbar-hint { margin-left: auto; font-size: 11px; color: #f472b6; }
.tool-settings-bar {
    width: 100%;
    min-height: 34px;
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.03) 100%);
    border: 2px solid rgba(255, 96, 197, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    padding: 4px 14px;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 96, 197, 0.15), inset 0 1px 2px #fff;
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}
.ops-wrap { position: relative; }
.ops-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    background: rgba(15, 2, 12, 0.97);
    border: 1px solid rgba(255, 96, 197, 0.6);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    min-width: 230px;
}
.ops-title {
    font-size: 10px;
    font-weight: 800;
    color: #FF60C5;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 2px 0 0 2px;
}
.ops-item { justify-content: flex-start; }
.ops-kbd { margin-left: auto; font-size: 10px; opacity: 0.75; }
.bez-modes { grid-template-columns: repeat(5, auto); }
.bez-modes .seg-btn { padding: 5px 7px; font-size: 10px; }
.toolbar-settings {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tool-opt {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #ffd2ef;
    white-space: nowrap;
}
.tool-opt input[type="number"] {
    width: 44px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 6px;
    color: #fff;
    padding: 3px 5px;
    font-size: 11px;
    font-family: inherit;
    outline: none;
}
.tool-opt input[type="range"] { width: 70px; }
.mini-seg { grid-template-columns: 1fr 1fr; }
.mini-seg .seg-btn { font-size: 10px; padding: 4px 6px; }

.canvas-frame {
    flex: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(252, 231, 243, 0.9) 100%);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.4), inset 0 1px 2px #fff;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

svg#viewport { width: 100%; height: 100%; cursor: crosshair; }

.aero-inspector {
    width: 280px;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255,255,255,0.03) 100%);
    border: 2px solid rgba(255, 96, 197, 0.3);
    border-radius: 14px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.inspector-title {
    font-size: 12px;
    font-weight: 800;
    color: #FF60C5;
    border-bottom: 1px solid rgba(255, 96, 197, 0.3);
    padding-bottom: 6px;
    text-transform: uppercase;
}

.inspector-stack { display: flex; flex-direction: column; gap: 8px; }
.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 10px;
    padding: 4px;
}
.seg-btn {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #ffd2ef;
    padding: 7px 4px;
    font-weight: 800;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.seg-btn.active {
    background: linear-gradient(180deg, #ff92d8 0%, #FF60C5 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 96, 197, 0.5), inset 0 1px 2px #fff;
}
.insp-tabs {
    display: inline-grid;
    grid-template-columns: repeat(3, 32px);
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}
.insp-tab-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #ffd2ef;
    padding: 1px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}
.insp-tab-btn svg { display: block; width: 26px; height: 26px; }
.insp-tab-btn.active {
    background: linear-gradient(180deg, #ff92d8 0%, #FF60C5 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 96, 197, 0.5), inset 0 1px 2px #fff;
}
.inspector-panel { display: flex; flex-direction: column; gap: 8px; }
#layer-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.layer-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 11px;
    color: #fff;
}
.layer-row:hover { background: rgba(255, 96, 197, 0.15); }
.layer-row.selected { background: rgba(255, 96, 197, 0.3); border-color: #FF60C5; }
.layer-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}
.layer-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-mini {
    background: transparent;
    border: 0;
    color: #ffd2ef;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
    font-family: inherit;
}
.layer-mini:hover { color: #fff; }
.layer-empty { font-size: 11px; color: #94a3b8; text-align: center; padding: 12px 0; }
.layer-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.control-group { display: flex; flex-direction: column; gap: 4px; }
.control-group label { font-size: 10px; font-weight: 700; color: #ffd2ef; }
.control-group input, .control-group select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 6px;
    color: #fff;
    padding: 5px 8px;
    font-size: 11px;
    font-family: inherit;
    outline: none;
}
/* a slider is as wide as its panel, never wider (the padding and border above must not push it past the edge) */
.control-group input[type="range"] { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; margin: 0; }
.control-group input.prop-slider { padding: 0; }

.inspector-empty-text { font-size: 11px; color: #94a3b8; text-align: center; margin-top: 40px; }
.color-swatch {
    height: 30px;
    border-radius: 6px;
    border: 1px solid rgba(255, 96, 197, 0.6);
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
#grp-stroke-color { position: relative; }
#grp-fx-color { position: relative; }
#grp-fill-color { position: relative; }
#grp-fill-color2 { position: relative; }
.color-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 2, 12, 0.97);
    border: 1px solid rgba(255, 96, 197, 0.6);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.popup-row { display: flex; flex-direction: column; gap: 4px; }
.popup-row label { font-size: 10px; font-weight: 700; color: #ffd2ef; }
.popup-row input[type="range"] { width: 100%; }
.color-popup input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: transparent;
    padding: 0;
    outline: none;
    cursor: pointer;
}
.color-popup input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 20px;
    border-radius: 5px;
    background: #fff;
    border: 2px solid #FF60C5;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
    cursor: ew-resize;
}
.color-popup input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 18px;
    border-radius: 5px;
    background: #fff;
    border: 2px solid #FF60C5;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
    cursor: ew-resize;
}
.color-popup input[type="range"]::-moz-range-track {
    height: 12px;
    border-radius: 6px;
    background: transparent;
}
.prop-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.4);
    padding: 0;
    outline: none;
    cursor: pointer;
}
.prop-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 20px;
    border-radius: 5px;
    background: #fff;
    border: 2px solid #FF60C5;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
    cursor: ew-resize;
}
.prop-slider::-moz-range-thumb {
    width: 12px;
    height: 18px;
    border-radius: 5px;
    background: #fff;
    border: 2px solid #FF60C5;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
    cursor: ew-resize;
}
.prop-slider::-moz-range-track {
    height: 12px;
    border-radius: 6px;
    background: transparent;
}
.poly-preview {
    border-radius: 6px;
    border: 1px solid rgba(255, 96, 197, 0.4);
    background: rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}
.angle-row { display: flex; gap: 6px; align-items: center; }
.angle-row .prop-slider { flex: 1; }
.mini-icon-btn {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 7px;
    color: #ffd2ef;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.mini-icon-btn:hover { background: rgba(255, 96, 197, 0.3); color: #fff; }
.popup-preview-row { display: flex; align-items: center; gap: 8px; }
.popup-preview {
    width: 32px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.5);
    background: #fff;
}
.popup-value { font-size: 10px; color: #ffd2ef; word-break: break-all; }
.popup-hex-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 6px;
    color: #fff;
    padding: 4px 6px;
    font-size: 10px;
    font-family: inherit;
    outline: none;
    width: 110px;
}
.popup-pick-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 6px;
    color: #ffd2ef;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.popup-pick-btn:hover { background: rgba(255, 96, 197, 0.3); color: #fff; }
.popup-pick-btn.armed { background: linear-gradient(180deg, #ff92d8 0%, #FF60C5 100%); color: #fff; }
.stop-track {
    position: relative;
    height: 26px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    cursor: copy;
    overflow: visible;
}
.stop-marker {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 32px;
    margin-left: -8px;
    border-radius: 5px;
    border: 2px solid #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
    cursor: ew-resize;
    padding: 0;
}
.stop-marker.selected {
    border-color: #FF60C5;
    box-shadow: 0 0 0 2px #FF60C5, 0 1px 5px rgba(0, 0, 0, 0.7);
}
.stop-actions { display: flex; gap: 8px; align-items: center; }
.stop-hint { font-size: 10px; color: #ffd2ef; }
.fill-style-seg,
.stroke-style-seg {
    display: inline-grid;
    grid-template-columns: repeat(4, 32px);
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 96, 197, 0.4);
    border-radius: 10px;
    padding: 4px;
    width: fit-content;
}
/* five fill styles (color, linear, radial, pattern, none) sit in one row */
.fill-style-seg { grid-template-columns: repeat(5, 32px); }
.fill-seg-btn,
.stroke-seg-btn {
    width: 32px;
    height: 32px;
    min-height: 0;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #ffd2ef;
    padding: 1px;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fill-seg-btn svg,
.stroke-seg-btn svg { display: block; width: 30px; height: 30px; }
.fill-seg-btn.active,
.stroke-seg-btn.active {
    background: linear-gradient(180deg, #ff92d8 0%, #FF60C5 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(255, 96, 197, 0.5), inset 0 1px 2px #fff;
}
#grp-stroke-color2 { position: relative; }
.aero-glass-tooltip {
    position: fixed;    background: linear-gradient(180deg, rgba(255, 255, 255, 0.67) 0%, rgba(250, 250, 250, 0.67) 100%);
    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    color: #48002C;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), inset 0 1px 1px #ffffff;
    backdrop-filter: blur(1px) saturate(80%);
    -webkit-backdrop-filter: blur(1px) saturate(80%);
    z-index: 3000;
    pointer-events: none;
    transform-origin: top left;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.16s cubic-bezier(0.25, 1, 0.5, 1), 
                opacity 0.12s ease-out;
    white-space: pre-line;
}

.aero-glass-tooltip.show {
    transform: scale(1);
    opacity: 1;
}
.fx-window {
    position: fixed;
    right: 312px;
    top: 64px;
    z-index: 1500;
    width: 250px;
    background: rgba(15, 2, 12, 0.97);
    border: 2px solid rgba(255, 96, 197, 0.6);
    border-radius: 12px;
    padding: 0 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-family: 'JetBrains Mono', monospace;
}
.fx-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    color: #FF60C5;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0 6px;
    cursor: grab;
    user-select: none;
}
.fx-head:active { cursor: grabbing; }
.fx-close {
    background: transparent;
    border: 0;
    color: #ffd2ef;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    padding: 2px 6px;
}
.fx-close:hover { color: #fff; }
.fx-window .popup-row label { font-size: 10px; font-weight: 700; color: #ffd2ef; }
.fx-window input[type="range"] { width: 100%; }
.fx-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#fx-preview { border-radius: 8px; border: 1px solid rgba(255, 96, 197, 0.4); background: rgba(0, 0, 0, 0.4); }
.node-handle { fill: #FF60C5; stroke: #ffffff; stroke-width: 2; cursor: pointer; }
.control-handle { fill: #38bdf8; stroke: #ffffff; stroke-width: 1.5; cursor: pointer; }
.control-line { stroke: #38bdf8; stroke-width: 1; stroke-dasharray: 3 3; }
.scale-handle { fill: #ffffff; stroke: #FF60C5; stroke-width: 2; cursor: nwse-resize; }
.xf-frame { fill: none; stroke: #FF60C5; stroke-dasharray: 5 4; pointer-events: none; opacity: 0.85; }
.xf-rotate { fill: #38bdf8; stroke: #ffffff; stroke-width: 2; cursor: grab; filter: drop-shadow(0 0 3px rgba(56, 189, 248, 0.8)); }
.xf-rotate:active { cursor: grabbing; }
#viewport { touch-action: none; }
.shape-selected { stroke: #FF60C5 !important; stroke-width: 2px !important; stroke-dasharray: 4 4; }
.preview-shape { stroke: #FF60C5; stroke-dasharray: 2 2; fill: rgba(255, 96, 197, 0.2); }
/* ========================================================
   CSS TO SVG DIALOG (pink glass, like the rest of Inkpath!)
   ======================================================== */
#c2s-back { position: fixed; inset: 0; z-index: 3000; background: rgba(15, 2, 12, 0.6); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
#c2s-back[hidden] { display: none; }
.c2s-dlg { width: min(860px, 100%); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(60, 14, 48, 0.96) 0%, rgba(26, 4, 20, 0.97) 100%); border: 2px solid rgba(255, 96, 197, 0.45); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15); }
.c2s-head { display: flex; align-items: center; justify-content: space-between; }
.c2s-head b { font-size: 18px; font-weight: 900; color: #ffb8e4; text-shadow: 0 0 12px rgba(255, 96, 197, 0.7); }
.c2s-x { border: 1px solid rgba(255, 255, 255, 0.25); background: transparent; color: #fff; width: 28px; height: 28px; border-radius: 7px; cursor: pointer; }
.c2s-sub { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.75); line-height: 1.5; }
.c2s-sub code { color: #ffb8e4; }
.c2s-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.c2s-presets .action-btn { width: auto; padding: 6px 10px; font-size: 11px; }
.c2s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.c2s-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.c2s-col label { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #ff92d8; }
#c2s-css, #c2s-text { width: 100%; box-sizing: border-box; background: rgba(0, 0, 0, 0.35); color: #fff; border: 1px solid rgba(255, 96, 197, 0.4); border-radius: 9px; padding: 9px; font: 12px/1.5 'JetBrains Mono', monospace; outline: none; }
#c2s-css { min-height: 220px; resize: vertical; }
#c2s-css:focus, #c2s-text:focus { border-color: #FF60C5; box-shadow: 0 0 0 3px rgba(255, 96, 197, 0.25); }
.c2s-stage { min-height: 120px; display: grid; place-items: center; padding: 14px; border-radius: 10px; overflow: auto; background: repeating-conic-gradient(rgba(255, 255, 255, 0.06) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px, rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.12); }
.c2s-stage svg { max-width: 100%; height: auto; overflow: visible; }
.c2s-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.c2s-foot .action-btn, .c2s-foot .pad-toggle-btn { width: auto; padding: 9px 16px; }
#c2s-msg { margin-right: auto; color: #fca5a5; font-size: 12px; }
@media (max-width: 700px) { .c2s-grid { grid-template-columns: 1fr; } }

/* the gradient toggle next to a color button (full, linear or radial): the button shows which one is on */
.pgrad-row { display: flex; gap: 6px; align-items: stretch; }
.pgrad-row .color-swatch { flex: 1; min-width: 0; }
.pgrad-btn { flex: none; width: 36px; height: 30px; padding: 0; border-radius: 6px; border: 1px solid rgba(255, 96, 197, 0.6); background: rgba(0, 0, 0, 0.4); color: #ffd2ef; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pgrad-btn:hover { background: rgba(255, 96, 197, 0.22); }
.pgrad-btn.on { border-color: #FF60C5; box-shadow: 0 0 6px rgba(255, 96, 197, 0.55); }

/* ---------- font settings ---------- */
@font-face { font-family: 'Fairfax HD'; src: url('/fonts/FairfaxHD.ttf') format('truetype'); }
@font-face { font-family: 'Unifont'; src: url('/fonts/unifont-17.0.05.otf') format('opentype'); }
@font-face { font-family: 'Iosevka'; src: url('/fonts/Iosevka-Term-Medium-01.ttf') format('truetype'); }
@font-face { font-family: 'OpenDyslexic'; src: url('/fonts/OpenDyslexic-Regular.otf') format('opentype'); }
.font-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.font-btns .action-btn { flex: 1 1 auto; min-width: 34px; padding: 4px 8px; }
.font-btns .action-btn.on { box-shadow: inset 0 0 0 2px #1d83d8, 0 0 8px rgba(29, 131, 216, 0.5); filter: brightness(1.08); }
#insp-font-custom { margin-top: 6px; }
.font-preview { padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.55); color: #1b2a3b; border: 1px solid rgba(255, 255, 255, 0.8); font-size: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
