:root {
    --s3g-brand-primary: #322183;
    --s3g-brand-secondary: #6758d9;
    --s3g-brand-accent: #b1262f;
    --s3g-brand-surface: #ffffff;
    --s3g-brand-background: #f5f7fb;
    --s3g-ink: #182033;
    --s3g-muted: #657086;
    --s3g-border: #dfe3ef;
    --s3g-soft-border: #ebedf5;
    --s3g-focus: #246bda;
    --s3g-danger: #b42335;
    --s3g-success: #147a4b;
    --s3g-radius: 18px;
    --s3g-shadow: 0 18px 55px rgba(28, 24, 73, .12);
    --s3g-font: "Segoe UI", Arial, sans-serif;
}

.s3g-editor-root,
.s3g-editor-root *,
.s3g-public-settings-mount,
.s3g-public-settings-mount * {
    box-sizing: border-box;
}

.s3g-editor-root {
    font-family: var(--s3g-font);
    color: var(--s3g-ink);
    line-height: 1.45;
    text-align: left;
}

.s3g-editor-root button,
.s3g-editor-root input,
.s3g-editor-root select,
.s3g-editor-root textarea,
.s3g-public-settings-mount button,
.s3g-public-settings-mount input,
.s3g-public-settings-mount select,
.s3g-public-settings-mount textarea {
    font: inherit;
}

.s3g-studio {
    overflow: hidden;
    min-height: 720px;
    border: 1px solid var(--s3g-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--s3g-shadow);
}

.s3g-editor-toolbar {
    position: relative;
    z-index: 10;
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--s3g-border);
    background: linear-gradient(120deg, rgba(255,255,255,.98), rgba(247,248,255,.98));
    flex-wrap: wrap;
}

.s3g-toolbar-group {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-right: 10px;
    border-right: 1px solid var(--s3g-soft-border);
}

.s3g-toolbar-group:last-child {
    margin-left: auto;
    padding-right: 0;
    border-right: 0;
}

.s3g-toolbar-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--s3g-muted);
    font-size: 12px;
    font-weight: 700;
}

.s3g-toolbar-group select {
    min-width: 130px;
    height: 36px;
    margin: 0;
    padding: 0 30px 0 10px;
    border: 1px solid var(--s3g-border);
    border-radius: 10px;
    background-color: #fff;
    color: var(--s3g-ink);
    font-size: 13px;
}

.s3g-tool-button,
.s3g-export-button,
.s3g-download-button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 7px 11px;
    border: 1px solid var(--s3g-border);
    border-radius: 10px;
    background: #fff;
    color: var(--s3g-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}

.s3g-tool-button:hover,
.s3g-export-button:hover,
.s3g-download-button:hover {
    border-color: rgba(50, 33, 131, .45);
    color: var(--s3g-brand-primary);
    box-shadow: 0 6px 18px rgba(50,33,131,.10);
    transform: translateY(-1px);
}

.s3g-tool-button:focus-visible,
.s3g-export-button:focus-visible,
.s3g-download-button:focus-visible,
.s3g-studio button:focus-visible,
.s3g-studio input:focus-visible,
.s3g-studio textarea:focus-visible,
.s3g-studio select:focus-visible {
    outline: 3px solid rgba(36, 107, 218, .23);
    outline-offset: 1px;
    border-color: var(--s3g-focus);
}

.s3g-tool-button:disabled,
.s3g-export-button:disabled,
.s3g-download-button:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.s3g-toolbar-export > span {
    margin-right: 3px;
    color: var(--s3g-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.s3g-export-button {
    border-color: rgba(50,33,131,.22);
    background: rgba(50,33,131,.055);
    color: var(--s3g-brand-primary);
}

.s3g-zoom-value {
    min-width: 54px;
    color: var(--s3g-muted);
    font-size: 12px;
    font-weight: 750;
    text-align: center;
}

.s3g-editor-grid {
    display: grid;
    grid-template-columns: minmax(265px, 300px) minmax(380px, 1fr) minmax(275px, 315px);
    height: min(820px, calc(100vh - 190px));
    min-height: 650px;
}

.s3g-left-panel,
.s3g-right-panel {
    min-width: 0;
    overflow-y: auto;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #c5cad9 transparent;
}

.s3g-left-panel {
    border-right: 1px solid var(--s3g-border);
}

.s3g-right-panel {
    border-left: 1px solid var(--s3g-border);
}

.s3g-panel-tabs {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 10px;
    border-bottom: 1px solid var(--s3g-soft-border);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px);
}

.s3g-panel-tabs button {
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--s3g-muted);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.s3g-panel-tabs button:hover {
    color: var(--s3g-brand-primary);
    background: #f5f3ff;
}

.s3g-panel-tabs button.is-active {
    border-color: rgba(50,33,131,.12);
    background: linear-gradient(135deg, rgba(50,33,131,.12), rgba(103,88,217,.08));
    color: var(--s3g-brand-primary);
}

.s3g-panel-content {
    display: none;
    padding: 17px;
}

.s3g-panel-content.is-active {
    display: block;
}

.s3g-panel-content h3,
.s3g-inspector h3,
.s3g-layers-panel h3 {
    margin: 0 0 12px;
    color: var(--s3g-ink);
    font-size: 15px;
    line-height: 1.3;
}

.s3g-panel-lead,
.s3g-inspector-note,
.s3g-empty-filter {
    margin: -4px 0 14px;
    color: var(--s3g-muted);
    font-size: 12px;
    line-height: 1.55;
}

.s3g-control {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.s3g-control > span {
    color: #424b5f;
    font-size: 12px;
    font-weight: 750;
}

.s3g-control input:not([type="checkbox"]):not([type="color"]),
.s3g-control textarea,
.s3g-control select,
.s3g-template-filters input,
.s3g-template-filters select,
.s3g-panel-content > input[type="search"] {
    width: 100%;
    min-height: 39px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #d8dce8;
    border-radius: 10px;
    background: #fff;
    color: var(--s3g-ink);
    box-shadow: none;
}

.s3g-control textarea {
    min-height: 86px;
    resize: vertical;
    line-height: 1.45;
}

.s3g-control input[type="color"] {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 3px;
    border: 1px solid #d8dce8;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.s3g-control input[type="range"] {
    width: 100%;
    min-height: 30px;
    accent-color: var(--s3g-brand-primary);
}

.s3g-control output {
    align-self: flex-end;
    margin-top: -7px;
    color: var(--s3g-muted);
    font-size: 11px;
}

.s3g-control-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.s3g-switch {
    display: flex;
    flex: 1 1 0;
    align-items: flex-start;
    gap: 8px;
    margin: 5px 0 12px;
    color: #454e62;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.s3g-switch input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--s3g-brand-primary);
}

.s3g-primary-action,
.s3g-secondary-action {
    display: flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    padding: 9px 13px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.s3g-primary-action {
    border: 1px solid var(--s3g-brand-primary);
    background: linear-gradient(135deg, var(--s3g-brand-primary), var(--s3g-brand-secondary));
    color: #fff;
    box-shadow: 0 9px 22px rgba(50,33,131,.2);
}

.s3g-primary-action:hover {
    filter: brightness(1.06);
}

.s3g-secondary-action {
    border: 1px solid rgba(50,33,131,.2);
    background: #f7f5ff;
    color: var(--s3g-brand-primary);
}

.s3g-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 4px 0 10px;
}

.s3g-suggestions > span {
    width: 100%;
    color: var(--s3g-muted);
    font-size: 11px;
    font-weight: 700;
}

.s3g-suggestions button {
    padding: 5px 8px;
    border: 1px solid #dcd8f5;
    border-radius: 999px;
    background: #faf9ff;
    color: var(--s3g-brand-primary);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.s3g-template-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-bottom: 10px;
}

.s3g-template-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.s3g-template-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 1px 10px;
    min-height: 72px;
    align-items: center;
    padding: 9px;
    border: 1px solid var(--s3g-soft-border);
    border-radius: 12px;
    background: #fff;
    color: var(--s3g-ink);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.s3g-template-card:hover {
    border-color: rgba(50,33,131,.35);
    background: #fbfaff;
    transform: translateY(-1px);
}

.s3g-template-symbol {
    display: flex;
    grid-row: span 2;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(50,33,131,.12), rgba(177,38,47,.08));
    color: var(--s3g-brand-primary);
    font-size: 24px;
    font-weight: 800;
}

.s3g-template-card strong {
    align-self: end;
    font-size: 12px;
    line-height: 1.25;
}

.s3g-template-card small {
    align-self: start;
    color: var(--s3g-muted);
    font-size: 10px;
    line-height: 1.25;
}

.s3g-element-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.s3g-element-grid button {
    display: flex;
    min-height: 70px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--s3g-soft-border);
    border-radius: 11px;
    background: #fff;
    color: #40495c;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.s3g-element-grid button:hover {
    border-color: rgba(50,33,131,.32);
    background: #faf9ff;
    color: var(--s3g-brand-primary);
}

.s3g-element-symbol {
    color: var(--s3g-brand-primary);
    font-size: 25px;
    line-height: 1;
}

.s3g-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.s3g-icon-choice {
    display: flex;
    min-height: 73px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 3px;
    border: 1px solid var(--s3g-soft-border);
    border-radius: 10px;
    background: #fff;
    color: var(--s3g-brand-primary);
    cursor: pointer;
}

.s3g-icon-choice:hover {
    border-color: rgba(50,33,131,.35);
    background: #f8f6ff;
}

.s3g-icon-choice svg {
    width: 27px;
    height: 27px;
    fill: currentColor;
}

.s3g-icon-choice span {
    color: #525b6f;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
}

.s3g-editor-help {
    margin: 12px;
    padding: 10px 12px;
    border: 1px solid #e1ddf5;
    border-radius: 12px;
    background: #faf9ff;
    color: #535b70;
    font-size: 11px;
}

.s3g-editor-help summary {
    color: var(--s3g-brand-primary);
    font-weight: 800;
    cursor: pointer;
}

.s3g-workspace {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 10%, rgba(103,88,217,.08), transparent 30%),
        radial-gradient(circle at 95% 90%, rgba(177,38,47,.05), transparent 25%),
        #edf0f6;
}

.s3g-workspace-meta {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 13px;
    padding: 6px 13px;
    border-bottom: 1px solid rgba(178,184,200,.55);
    background: rgba(255,255,255,.74);
    color: var(--s3g-muted);
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.s3g-editor-status {
    margin-left: auto;
    color: var(--s3g-success);
    font-weight: 800;
}

.s3g-editor-status[data-type="error"] {
    color: var(--s3g-danger);
}

.s3g-canvas-scroller {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: auto;
    padding: 42px;
}

.s3g-canvas-zoom {
    position: relative;
    flex: 0 0 auto;
    transform-origin: 0 0;
    transition: transform .12s ease;
}

.s3g-canvas-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 3px;
    background: #fff;
    box-shadow: 0 15px 45px rgba(24,32,51,.18), 0 0 0 1px rgba(80,88,110,.14);
    user-select: none;
}

.s3g-canvas-stage svg,
.s3g-viewer-canvas svg {
    display: block;
    width: 100%;
    height: 100%;
}

.s3g-design-svg-interactive .s3g-svg-element {
    cursor: move;
}

.s3g-design-svg-interactive .s3g-svg-element:focus {
    outline: none;
}

.s3g-right-panel {
    padding-bottom: 18px;
}

.s3g-inspector-section,
.s3g-layers-panel {
    padding: 15px;
    border-bottom: 1px solid var(--s3g-soft-border);
}

.s3g-inspector-heading,
.s3g-setting-block-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.s3g-inspector-heading button {
    display: flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--s3g-border);
    border-radius: 8px;
    background: #fff;
    color: var(--s3g-muted);
    cursor: pointer;
}

.s3g-button-matrix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.s3g-button-matrix button {
    min-height: 35px;
    padding: 6px 8px;
    border: 1px solid var(--s3g-border);
    border-radius: 9px;
    background: #fff;
    color: #4a5367;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.s3g-button-matrix button:hover {
    border-color: rgba(50,33,131,.32);
    color: var(--s3g-brand-primary);
}

.s3g-button-matrix button.is-danger {
    border-color: rgba(180,35,53,.18);
    color: var(--s3g-danger);
}

.s3g-layers-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.s3g-layer-row {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) 27px 27px;
    align-items: center;
    min-height: 36px;
    padding: 2px 4px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.s3g-layer-row:hover,
.s3g-layer-row.is-selected {
    border-color: #dedaf4;
    background: #f8f6ff;
}

.s3g-layer-row.is-hidden {
    opacity: .55;
}

.s3g-layer-type {
    color: var(--s3g-brand-secondary);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.s3g-layer-row button {
    min-width: 0;
    min-height: 27px;
    padding: 2px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #5b6477;
    font-size: 11px;
    cursor: pointer;
}

.s3g-layer-row button:hover {
    background: #ece9fb;
    color: var(--s3g-brand-primary);
}

.s3g-layer-label {
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Viewer */
.s3g-viewer-shell {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--s3g-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 13px 38px rgba(28,24,73,.09);
}

.s3g-viewer-canvas {
    width: 100%;
    background: #eef0f6;
}

.s3g-viewer-downloads {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    padding: 11px;
    border-top: 1px solid var(--s3g-border);
    background: #fff;
    flex-wrap: wrap;
}

.s3g-viewer-downloads > span {
    margin-right: auto;
    color: var(--s3g-muted);
    font-size: 12px;
    font-weight: 750;
}

.s3g-download-button {
    min-height: 34px;
    color: var(--s3g-brand-primary);
}

/* Public preset settings in admin */
.s3g-public-settings-card {
    margin: 18px 0;
    overflow: hidden;
    border: 1px solid var(--s3g-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(28,24,73,.07);
    font-family: var(--s3g-font);
    color: var(--s3g-ink);
}

.s3g-public-settings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--s3g-soft-border);
    background: linear-gradient(135deg, #fbfaff, #fff);
}

.s3g-public-settings-heading h2 {
    margin: 2px 0 5px;
    font-size: 20px;
}

.s3g-public-settings-heading p {
    max-width: 850px;
    margin: 0;
    color: var(--s3g-muted);
}

.s3g-eyebrow {
    color: var(--s3g-brand-primary) !important;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.s3g-local-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid #bfdfd0;
    border-radius: 999px;
    background: #f1fbf6;
    color: #147a4b;
    font-size: 11px;
    font-weight: 800;
}

.s3g-public-settings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    padding: 16px;
    background: #f7f8fc;
}

.s3g-public-setting-block {
    padding: 15px;
    border: 1px solid var(--s3g-soft-border);
    border-radius: 14px;
    background: #fff;
}

.s3g-public-setting-block h3 {
    margin: 0 0 11px;
    font-size: 14px;
}

.s3g-public-setting-wide {
    grid-column: 1 / -1;
}

.s3g-public-template-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.s3g-public-template-groups fieldset {
    min-width: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--s3g-border);
    border-radius: 12px;
}

.s3g-public-template-groups legend {
    padding: 0 5px;
    color: var(--s3g-brand-primary);
    font-size: 12px;
    font-weight: 850;
}

.s3g-check-card {
    display: flex;
    gap: 7px;
    margin: 5px 0;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
}

.s3g-check-card:hover {
    background: #f8f7fd;
}

.s3g-check-card input {
    margin-top: 2px;
    accent-color: var(--s3g-brand-primary);
}

.s3g-check-card span {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.s3g-check-card strong {
    font-size: 11px;
}

.s3g-check-card small {
    color: var(--s3g-muted);
    font-size: 9px;
    line-height: 1.3;
}

.s3g-option-chip-grid,
.s3g-palette-chip-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.s3g-option-chip,
.s3g-palette-chip {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    padding: 8px;
    border: 1px solid var(--s3g-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.s3g-option-chip input,
.s3g-palette-chip input {
    margin: 0;
    accent-color: var(--s3g-brand-primary);
}

.s3g-option-chip span,
.s3g-palette-chip strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.s3g-palette-chip {
    display: grid;
    grid-template-columns: 18px 1fr;
}

.s3g-palette-swatches {
    display: flex;
    grid-column: 1 / -1;
    height: 15px;
    overflow: hidden;
    border-radius: 6px;
}

.s3g-palette-swatches i {
    flex: 1 1 0;
}

@media (max-width: 1250px) {
    .s3g-editor-grid { grid-template-columns: 255px minmax(360px, 1fr) 275px; }
    .s3g-toolbar-style { order: 3; }
    .s3g-public-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .s3g-public-template-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .s3g-option-chip-grid, .s3g-palette-chip-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .s3g-studio { overflow: visible; }
    .s3g-editor-grid {
        display: flex;
        height: auto;
        min-height: 0;
        flex-direction: column;
    }
    .s3g-left-panel,
    .s3g-right-panel {
        max-height: none;
        overflow: visible;
        border: 0;
    }
    .s3g-left-panel { border-bottom: 1px solid var(--s3g-border); }
    .s3g-right-panel { border-top: 1px solid var(--s3g-border); }
    .s3g-workspace { min-height: 620px; }
    .s3g-canvas-scroller { min-height: 570px; }
    .s3g-panel-content { max-height: 500px; overflow: auto; }
    .s3g-toolbar-group:last-child { margin-left: 0; }
}

@media (max-width: 720px) {
    .s3g-editor-toolbar { align-items: stretch; }
    .s3g-toolbar-group { width: 100%; padding-right: 0; border-right: 0; flex-wrap: wrap; }
    .s3g-toolbar-group label { flex: 1 1 145px; }
    .s3g-toolbar-group select { width: 100%; min-width: 0; }
    .s3g-tool-button span { display: none; }
    .s3g-workspace { min-height: 500px; }
    .s3g-canvas-scroller { min-height: 450px; padding: 24px; }
    .s3g-viewer-downloads { justify-content: flex-start; }
    .s3g-viewer-downloads > span { width: 100%; }
    .s3g-public-settings-heading { align-items: flex-start; flex-direction: column; }
    .s3g-public-settings-grid { grid-template-columns: 1fr; }
    .s3g-public-setting-wide { grid-column: auto; }
    .s3g-public-template-groups { grid-template-columns: 1fr; }
    .s3g-option-chip-grid, .s3g-palette-chip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Banques d’icônes raster ------------------------------------------------ */
.s3g-icon-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    margin: 8px 0 2px;
}

.s3g-icon-filters input,
.s3g-icon-filters select {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    border: 1px solid var(--s3g-soft-border);
    border-radius: 10px;
    background: #fff;
    color: #343c50;
    font: inherit;
}

.s3g-icon-result-count {
    min-height: 17px;
    margin: 6px 0 0;
    color: #687187;
    font-size: 10px;
    font-weight: 700;
}

.s3g-icon-choice-raster {
    min-width: 0;
    overflow: hidden;
}

.s3g-icon-choice-raster img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 5px;
}

.s3g-icon-choice-raster span {
    display: -webkit-box;
    width: 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.15;
}

.s3g-icon-choice-raster small {
    display: block;
    width: 100%;
    overflow: hidden;
    color: #7a8295;
    font-size: 8px;
    font-weight: 650;
    line-height: 1.15;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.s3g-public-icon-pack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 9px;
}

.s3g-icon-pack-choice {
    min-height: 72px;
}

@media (min-width: 1180px) {
    .s3g-icon-filters {
        grid-template-columns: minmax(0, 1fr) minmax(120px, .8fr);
    }
}
