main#app {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.3rem;
    background-color: var(--bg);
}

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

button {
    font: inherit;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    background: #fff;
}

button.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
}

button.secondary {
    width: 100%;
    background: #f9fafb;
}

.scenario-picker {
    display: grid;
    gap: 0.5rem;
}

.scenario-option {
    text-align: left;
}

.scenario-option.active {
    border-color: var(--accent);
    background: #eef2ff;
}

.preview-card {
    position: sticky;
    top: 4rem;
    z-index: 20;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.preview-background-toggle {
    display: flex;
    gap: 0.25rem;
}

.preview-background-toggle button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.preview-zoom-toggle button.active,
.preview-background-toggle button.active,
.preview-tabs-toggle button.active {
    background: var(--accent-light);
    color: var(--text);
    border-color: var(--accent);
}

.preview-zoom-toggle {
    display: flex;
    gap: 6px;
    margin-left: 10px;
}

.preview-zoom-toggle button {
    padding: 4px 8px;
    font-size: 12px;
}



#preview {
    position: relative;

    margin-top: 0.5rem;
    height: 30vh;
    max-height: 240px;
    min-height: 160px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

#preview.layout-mode {
    cursor: grab;
}

#preview.dragging {
    cursor: grabbing;
}

.preview.neutral {
    background: #ddd;
}

.preview.light {
    background: #f7f7f7;
}

.preview.dark {
    background: #444;
}

#previewContent {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

#previewContent svg {
    display: block;
    height: 100%;
    width: auto;
}

@media (min-width: 900px) {

    #preview.layout-preview {
        height: 40vh;
        min-height: 35vh;
        max-height: 35vh;
    }

}

@media (min-width: 2000px) {

    #preview.layout-preview {
        height: 40vh;
        min-height: 50vh;
        max-height: 50vh;
    }

}

#text-fields {
    display: grid;
    gap: 0.75rem;
}

textarea,
input,
select {
    width: 100%;
    padding: 0.6rem;
    font: inherit;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #f5f5f3;
    color: var(--text);
    box-sizing: border-box;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.field-button {
    background: #f5f5f3;
    color: var(--text);
    border: 1px solid var(--border);
}

.field-button:hover {
    background: #eeeeeb;
    border-color: var(--accent);
}

.field-button:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.picker-toggle {
    width: 100%;
    text-align: left;
}

/* deaktivierter Font-Picker */
.picker-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.font-option {
    cursor: pointer;
}

.font-option.active {
    background: #eee;
}

/*************************************************
 * Farb-Picker – Grundstruktur
 *************************************************/

.picker {
    margin-top: 0.5rem;
    display: grid;
    gap: 0.75rem;
}

/* eingeklappt */
.picker.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
}

/* ausgeklappt */
.picker:not(.collapsed) {
    max-height: 60vh;
    /* 🔑 scrollbar bei vielen Farben */
    overflow-y: auto;
    opacity: 1;
    pointer-events: auto;
}

/*************************************************
 * Aktive Farbe – immer sichtbar
 *************************************************/

#activeColorBar {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    position: sticky;
    top: 0;
    z-index: 10;

    background: #fff;
    padding: 0.5rem 0;

    border-bottom: 1px solid var(--border);
}

#activeColorSwatch {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: #fff;
    box-sizing: border-box;
}

/*************************************************
 * Farbgruppen
 *************************************************/

.color-group {
    margin-bottom: 1rem;
}

.color-group-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

/*************************************************
 * Grid für Farb-Swatches
 *************************************************/

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
}

/*************************************************
 * Farb-Swatch
 *************************************************/

.color-swatch {
    width: 100%;
    height: 44px;

    border-radius: 6px;
    cursor: pointer;

    border: 2px solid transparent;
    box-sizing: border-box;
    position: relative;
}

/* helle Farben sichtbar machen */
.color-swatch::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

/* aktive Farbe */
.color-swatch.active {
    border-color: #000;
}

/*************************************************
 * Mobile Feinschliff (optional, empfohlen)
 *************************************************/

@media (max-width: 600px) {
    .color-swatch {
        height: 48px;
    }

    .color-grid {
        gap: 0.6rem;
    }
}



.dimension-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
    line-height: 1.4;
}

.text-item {
    position: relative;
    padding-bottom: 8px;
    display: grid;
    gap: 0.4rem;
    border-bottom: 1px solid #bbb;
}

.mirror-option {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.inactive {
    opacity: 0.5;
}

.dimension-warning {
    margin-top: 4px;
    font-size: 12px;
    color: #b00020;
}

.text-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;

    background: transparent;
    border: none;
    cursor: pointer;

    font-size: 1rem;
    line-height: 1;
    color: #900;
}

.text-delete-btn:hover {
    color: #c00;
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.confirm-overlay.hidden {
    display: none;
}

.confirm-dialog {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.confirm-dialog p {
    margin-bottom: 1rem;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-secondary {
    background: #eee;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.btn-danger {
    background: #c00;
    color: #fff;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.btn-add {
    background: var(--accent-light);
    color: var(--text);
    border: 1px solid var(--accent);
}

.btn-add:hover {
    background: var(--accent);
    color: #fff;
}

.btn-delete {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.btn-delete:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

#fontReferenceHint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.quantity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.text-quantity-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.text-quantity-row label {
    flex: 1;
    /* Text nimmt Rest */
}

.text-quantity-row input {
    width: 25%;
    max-width: 120px;
    /* Optional */
}

.text-mirror-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
}

.text-mirror-row label {
    flex: 1;
}

.text-mirror-row input {
    width: 25%;
    max-width: 120px;
}

.addon-item {
    margin-bottom: 10px;
}

.addon-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.addon-row {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.addon-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.addon-name {
    font-size: 14px;
}

.addon-price {
    font-weight: 600;
    white-space: nowrap;
}

.addon-checkbox {
    transform: scale(1.2);
}

.addon-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    margin-bottom: 12px;
}

.addon-card:hover {
    border-color: #999;
}

.addon-card.selected {
    border-color: #000;
    background: #f5f5f5;
}

.addon-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.addon-content {
    display: flex;
    flex-direction: column;
}

.addon-name {
    font-weight: 600;
    font-size: 14px;
}

.addon-description {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.addon-price {
    font-weight: 600;
    white-space: nowrap;
}

.addon-checkbox {
    display: none;
}

.addon-card {
    position: relative;
}

.addon-check-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.addon-card.selected .addon-check-icon {
    opacity: 1;
    transform: scale(1);
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.price-row span:last-child {
    font-weight: 500;
}

.price-total {
    margin-top: 12px;
    font-size: 1.2rem;
}

.price-info {
    margin: 6px 0;
    font-size: 0.9rem;
    color: #555;
}

.price-discount {
    font-size: 0.85rem;
    color: #2e7d32;
    margin-bottom: 8px;
}

.price-shipping-note {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}

/* deaktivierte Maßfelder */
#widthInput:disabled,
#heightInput:disabled {
    background: #f3f3f3;
    color: #777;
    border-color: #ddd;
    cursor: default;
}

/* noch stärker ausgegraut wenn zusätzlich "inactive" */
#widthInput.inactive:disabled,
#heightInput.inactive:disabled {
    background: #f7f7f7;
    color: #999;
}

/* verhindert Focus-Style */
#widthInput:disabled:focus,
#heightInput:disabled:focus {
    outline: none;
    box-shadow: none;
}

/* Referenztext hervorheben */
.text-item.reference-text {
    border: 2px solid #4da3ff;
    background: #f2f7ff;
    border-radius: 6px;
    padding: 8px;
}

/* Hinweis im Größenfeld */
.dimension-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #2c5ea8;
    background: #f2f7ff;
    padding: 4px 8px;
    border-radius: 4px;
}



.strategy-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
}

.strategy-title {
    font-weight: 600;
}

.strategy-description {
    font-size: 0.85em;
    opacity: 0.7;
    line-height: 1.2;
}

/* Container */
.picker {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-top: 6px;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* einzelne Optionen */
.strategy-option {
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border: none;
    background: transparent;
    cursor: pointer;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Hover */
.strategy-option:hover {
    background: #f5f7fa;
}

/* Aktive Auswahl */
.strategy-option.active {
    background: #eaf2ff;
}

/* Titel */
.strategy-title {
    font-weight: 600;
    font-size: 14px;
}

/* Beschreibung */
.strategy-description {
    font-size: 12px;
    color: #666;
}

.strategy-option+.strategy-option {
    border-top: 1px solid #eee;
}

.font-style-controls {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.font-style-controls button {
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}

.font-style-controls button.active {
    background: #111;
    color: #fff;
}

.font-warning {
    margin-top: 6px;
    font-size: 12px;
    color: #b00020;
}



/*************************************************
 * Intro / Einstieg
 *************************************************/

.intro-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.intro-title {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.intro-lead {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

.intro-points {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 4px;
}

.intro-point {
    font-size: 0.9rem;
    line-height: 1.4;
}

.intro-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 6px;
}

.intro-hint a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.intro-hint a:hover {
    text-decoration: underline;
}

.scenario-intro {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.scenario-intro-details {
    display: grid;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.scenario-intro-details strong {
    color: var(--text);
    font-weight: 600;
}

/*************************************************
 * Szenario Vorschau (PNG)
 *************************************************/

.scenario-preview {
    width: 100%;
    margin-top: 10px;

    border-radius: 8px;
    overflow: hidden;

    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.scenario-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/*************************************************
 * Desktop Layout – rechte Spalte fixieren
 *************************************************/

@media (min-width: 1024px) {

    body.configurator {
        overflow: hidden;
    }

    body.configurator #app {
        position: static;

        display: grid;
        grid-template-columns: 50% 50%;

        width: 100%;
        max-width: none !important;
        margin: 0 !important;

        box-sizing: border-box;
    }

    body.configurator .config-left {
        grid-column: 1;
        grid-row: 1;

        min-height: 0;
        height: calc(100vh - 72px);

        overflow-y: auto;
        overflow-x: hidden;

        box-sizing: border-box;

        margin-left: 10px;
        margin-right: 10px;
    }

    body.configurator #fixedSummary {
        grid-column: 2;
        grid-row: 1;

        position: static;



        min-height: 0;
        height: calc(100vh - 72px);

        overflow-y: auto;
        overflow-x: hidden;

        box-sizing: border-box;

        padding: 1vw 2vw;

        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    body.configurator #fixedSummary .preview-card {
        position: static;
        top: auto;
    }

    body.configurator main,
    body.configurator #app {
        max-width: none !important;
        margin: 0 !important;
        width: 100%;
        box-sizing: border-box;
    }

}

.footer-nav a {
    margin-right: 20px;
    text-decoration: none;
}

.config-start {
    margin: 30px 0 10px;
    padding: 14px 18px;
    background: #f8f8f8;
    border-left: 4px solid #D5B36A;
    line-height: 1.4;
}

/*************************************************
 * Element-Liste
 *************************************************/

#elementList {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.element-item {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;

    background: #fff;
    cursor: pointer;
}

.element-item.active {
    border-color: var(--accent);
    background: #eef2ff;
}

.element-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.element-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.element-label {
    font-size: 0.9rem;
}

.element-delete {
    font-size: 14px;
    color: #900;
    cursor: pointer;
}

.input-warning {
    color: #ff3b30;
    font-size: 12px;
    margin-top: 4px;
}

.layout-info {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #fafafa;
}

.layout-dimensions {
    display: flex;
    gap: 16px;
    font-size: 14px;
}

.layout-warning {
    margin-top: 6px;
    color: #ff3b30;
    font-size: 13px;
}

.anchor-item.active {
    background: #007aff;
    color: white;
}

.anchor-list.hidden {
    display: none;
}

.anchor-list {
    margin-top: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px;
    background: #fff;
}

.align-row {
    display: flex;
    gap: 6px;
}

.align-btn {
    padding: 8px;
    width: 30px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
}

.align-btn.active {
    background: #007BFF;
    color: white;
}

.anchor-align-row {
    display: flex;
    gap: 6px;
}

.anchor-align-btn {
    padding: 6px;
    width: 30px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 6px;
}

.anchor-align-btn.active {
    background: #FF0000;
    color: white;
}

.panel-split {
    display: flex;
    gap: 12px;
}

/* 🔹 LINKS */
.panel-left {
    width: 120px;
    border-right: 1px solid #ddd;
    padding-right: 8px;
}

/* 🔹 ZEILENLISTE */
.line-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 🔹 RECHTS */
.panel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.line-item {
    padding: 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
}

.line-item.active {
    background: var(--active);
    color: rgb(0, 0, 0);
    border: 1px solid #004085;
}

.line-header {
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 4px;
}

.line-text-item {
    padding-left: 10px;
    cursor: pointer;
    font-size: 13px;
}

.line-text-item.active {
    color: red;
}

.line-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.line-header button {
    margin-left: 5px;
}

#lineSpacingInput:disabled {
    background: #eee;
    color: #888;
    cursor: not-allowed;
}

.style-row button {
    padding: 4px 8px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}

.style-row button.active {
    background: #111;
    color: #fff;
}

.tab-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
}

.tab-row.active {
    background: #eee;
}

.tab-input {
    width: 60px;
}

.tab-step {
    width: 32px;
    height: 32px;
}

.tab-delete {
    margin-left: auto;
    color: red;
}

.panel-elements {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* HEADER */
.elements-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
}

/* LISTE (horizontal optional) */
.elements-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
}

/* BODY */
.elements-body {
    display: flex;
    flex-direction: row;
    flex: 1;

}

/* LINKS */
.elements-left {
    width: 60px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ITEM */
.element-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eee;
}

.element-item.active {
    background: var(--active);
}

/* RECHTS */
.elements-right {
    flex: 1;
    padding: 8px;
    margin-left: 10px;
    border-left: 1px solid #ccc;
}

/* BLOCK */
.block {
    margin-bottom: 10px;
}

/* SIZE */
.size-row {
    display: flex;
    gap: 6px;
}

.size-row input {
    flex: 1;
}

/* MODE */
.mode-row button.active {
    background: #000;
    color: #fff;
}

/* Y */
.y-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.anchor-row {
    display: flex;
    gap: 6px;
}

.el-align-btn.active {
    background-color: #007BFF;
    color: white;
}

.el-anchor-align-btn.active {
    background-color: #FF0000;
    color: white;
}

.anchor-title {
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: 600;
    opacity: 0.7;
}

.anchor-item {
    cursor: pointer;
}

.anchor-item:hover {
    background: rgba(102, 102, 102, 0.5);
}

.element-menu {
    position: absolute;

    top: 42px;
    left: -180px;

    z-index: 1000;

    width: 220px;

    background: #222;
    border: 1px solid #444;
    border-radius: 12px;

    padding: 6px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.element-type-item {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;

    padding: 10px 12px;

    border: 1px solid #444;
    border-radius: 10px;

    background: #222;
    color: white;

    cursor: pointer;
}

.element-type-item .icon {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.element-type-item:hover {
    background: #333;
}

.elements-toolbar {
    position: relative;
}

.preview.edit-mode {
    background: #fafafa;
}

/* =========================
   SYMBOL PANEL
========================= */

.symbol-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.symbol-group {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.symbol-group-toggle {
    width: 100%;
    border: none;
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    padding: 0.75rem;
}

.symbol-btn {
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;

    min-height: 52px;

    font-size: 1.4rem;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.symbol-btn:hover {
    background: #f5f5f5;
}

.panel-switch {
    background-color: #ffffff;
    padding: 10px;
    border-bottom: 2px solid #666;
}

.panel-switch button.active {
    background: #d0d0d0;
    color: #222;
    border-color: #b8b8b8;
}

@font-face {
    font-family: "MaterialSymbols";

    src: url("/fonts/symbols/MaterialSymbolsRounded_Filled-Regular.ttf") format("truetype");

    font-weight: normal;
    font-style: normal;
}

.leiste {
    display: flex;
    flex-direction: row;
    align-content: space-between;
}

.leiste button {
    margin-right: 5px;
}

#layoutTextInput {
    background-color: #fafafa;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #c7c7c7;
}

.borderDown {
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

#panelText,
#panelSymbols {
    padding-top: 4px;
}

.offset-row {
    margin-right: 10px;
}

.marBottom {
    margin-bottom: 6px;
}

.numField {
    width: 80px;
    margin-right: 6px;
}

.sel {
    width: 125px;
}

.symbol-align-btn.active {
    background-color: #007BFF;
    color: white;
}

.symbol-anchor-align-btn.active {
    background-color: #FF0000;
    color: white;
}

#btnBold,
#layoutBold {
    font-weight: bold;
}

#btnItalic,
#layoutItalic {
    font-style: italic;
}

#btnBold:disabled,
#btnItalic:disabled,
#layoutBold:disabled,
#layoutItalic:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.panel-header {
    display: flex;
    align-items: center;


    position: relative;
}

.info-btn {

    margin-left: auto;

    width: 30px;
    height: 30px;

    border: none;
    border-radius: 50%;

    background: #444;
    color: white;

    font-size: 13px;
    font-weight: bold;

    cursor: pointer;
}

.info-popup {

    position: absolute;

    top: 32px;
    right: 0;

    width: 280px;

    padding: 10px 12px;

    border-radius: 10px;

    background: #222;
    color: white;

    font-size: 15px;
    line-height: 1.4;

    z-index: 10001;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.info-popupView {

    position: absolute;

    top: 85px;
    right: 10px;

    width: 280px;

    padding: 10px 12px;

    border-radius: 10px;

    background: #222;
    color: white;

    font-size: 15px;
    line-height: 1.4;

    z-index: 10001;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.scenario-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.scenario-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card);
}

.scenario-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.scenario-accordion-header {

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    padding: 0.75rem;

    background: var(--card);

    border: none;

    text-align: left;

    cursor: pointer;
}

.scenario-card.selected .scenario-accordion-header {
    background: var(--accent-light);
}

.scenario-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.accordion-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.scenario-accordion-content {

    display: none;

    padding: 0 0.75rem 0.75rem;
}

.scenario-accordion-content.open {
    display: block;
}

.scenario-preview {
    margin: 0.5rem 0;
}

.scenario-preview img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

.scenario-option {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1rem;

    border: 1px solid var(--accent);
    border-radius: var(--radius-small);

    background: var(--accent);
    color: #fff;

    font-weight: 600;
    cursor: pointer;

    transition:
        background var(--transition),
        transform var(--transition);
}

.scenario-option:hover {
    background: #c29f55;
    transform: translateY(-1px);
}

.scenario-option.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tab-fixed-value {

    font-size: 0.9rem;
    color: #666;

    margin-left: auto;
}

.tab-row:first-child {
    background: #f7f7f7;
}

.preview-placeholder {

    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 0.5rem;

    text-align: center;

    padding: 1rem;

    color: #666;

    z-index: 5;
}

.preview-placeholder-icon {
    font-size: 2rem;
}

.preview-placeholder-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

#layoutColorTools {
    margin-top: 8px;
}

.group-color-button {

    display: flex;
    align-items: center;
    gap: 8px;

    width: 80%;
}

.group-color-swatch {

    width: 18px;
    height: 18px;

    border-radius: 3px;
    border: 1px solid #999;

    flex-shrink: 0;
}

.cart-layout-preview {
    margin-bottom: 12px;
}

.cart-layout-preview img {
    max-width: 220px;
    max-height: 120px;
    display: block;
    border: 1px solid #ddd;
}

.layout-mirror-option {

    margin-top: 12px;

}

.option-button {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 16px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: #f5f5f3;

    color: var(--text);

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);

    user-select: none;
}

.option-button:hover {

    border-color: var(--accent);

    background: #eeeeeb;
}

.option-button.active {

    border-color: var(--accent);

    background: var(--accent-light);

}

.option-icon {

    font-size: 20px;

    width: 24px;

    text-align: center;

}

.option-content {

    display: flex;

    flex-direction: column;

}

.option-title {

    font-weight: 600;

}

.option-description {

    font-size: .85rem;

    color: #666;

    margin-top: 2px;

}

.cart-layout-option {

    margin-bottom: 10px;

    font-size: .9rem;

    color: #555;

    font-weight: 500;

}

.admin-nav {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px 20px;

    background: #2f3338;

}

.admin-nav a {

    color: #fff;

    text-decoration: none;

    padding: 8px 14px;

    border-radius: 6px;

    transition: .2s;

}

.admin-nav a:hover {

    background: #444;

}

.admin-nav a.active {

    background: #0d6efd;

}

.admin-nav .spacer {

    flex: 1;

}

#adminToolsCard {

    margin-top: 20px;

}

.admin-tools-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 24px;

}

.admin-section {

    display: flex;

    flex-direction: column;

    gap: 10px;

}

.admin-section-title {

    margin-bottom: 4px;

    padding-bottom: 6px;

    font-size: 14px;

    font-weight: 600;

    color: #666;

    border-bottom: 1px solid #ddd;

}

.admin-btn {

    width: 100%;

    padding: 10px 14px;

    border: 1px solid #ccc;

    border-radius: 6px;

    background: #fff;

    cursor: pointer;

    transition: .15s;

    font-size: 14px;

}

.admin-btn:hover:not(:disabled) {

    background: #f4f4f4;

}

.admin-btn.active {

    background: #0d6efd;

    color: #fff;

    border-color: #0d6efd;

}

.admin-btn:disabled {

    opacity: .45;

    cursor: default;

}

/* ===========================================
   TEMPLATE DIALOG
=========================================== */

.modal.hidden {

    display: none;

}

.modal {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, .45);

    display: flex;

    justify-content: center;

    align-items: center;

    z-index: 5000;

}

.modal-box {

    width: 520px;

    max-width: 95vw;

    background: #fff;

    border-radius: 10px;

    padding: 24px;

    box-shadow: 0 12px 30px rgba(0, 0, 0, .25);

}

.modal-box h2 {

    margin: 0 0 20px;

}

.template-form {

    display: grid;

    grid-template-columns: 140px 1fr;

    gap: 12px;

    align-items: center;

}

.template-form input[type=text],
.template-form select,
.template-form textarea {

    width: 100%;

    padding: 8px;

    box-sizing: border-box;

}

.template-form textarea {

    resize: vertical;

}

.checkbox-row {

    grid-column: 2;

    display: flex;

    gap: 10px;

    align-items: center;

}

.dialog-buttons {

    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;

}

.layout-info {
    padding: 14px 18px;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    box-shadow: var(--shadow);
}

.layout-dimensions {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.layout-size-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.layout-size-label {
    font-weight: 700;
    color: var(--text);
}

.layout-size-group span:not(.layout-size-label) {
    color: var(--muted);
}

.helpLink {
    margin-top: 5px;
    margin-right: 10px;
    margin-bottom: 5px;
    padding-bottom: 10px;
}

.red {
    color: red;
}

/* Feedback-Link unter dem Warenkorb-Button */

#cutfolioFeedbackOpen {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-small);
    background: var(--accent-light);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

#cutfolioFeedbackOpen::before {
    content: "✉";
    font-size: 15px;
    line-height: 1;
}

#cutfolioFeedbackOpen:hover {
    background: #ead8ad;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(32, 33, 36, 0.08);
    text-decoration: none;
}

#cutfolioFeedbackOpen:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

#cutfolioFeedbackOpen:active {
    transform: translateY(1px);
}

/* ========================================
   Cutfolio – Feedback-Fenster
======================================== */

/* Modal-Hintergrund */
#feedbackModal {
    background: rgba(25, 27, 30, 0.58) !important;
    backdrop-filter: blur(4px);
    padding: 20px !important;
}

/* Modal-Fenster */
#feedbackModal>div {
    max-width: 520px !important;
    margin: 6vh auto !important;
    padding: 30px !important;
    background: #fffdf8 !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

/* Überschrift */
#feedbackTitle {
    margin: 0 36px 14px 0;
    color: var(--text);
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
}

/* Einleitung */
#feedbackModal>div>p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 22px;
}

/* Schließen-Button */
#feedbackClose {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: -6px -6px 0 0;
    border-radius: 50% !important;
    color: var(--muted);
    transition: background 0.2s, color 0.2s;
}

#feedbackClose:hover {
    background: var(--accent-light) !important;
    color: var(--text);
}

/* Formular */
#feedbackForm {
    display: block;
}

/* Kategorien: Auswahlfeld links, Text rechts */
#feedbackForm label:has(input[name="feedbackCategory"]) {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 10px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

#feedbackForm label:has(input[name="feedbackCategory"]):hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

/* Runde Auswahlfelder */
#feedbackForm input[name="feedbackCategory"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    margin: 1px 0 0;
    border: 2px solid #b8b5ad;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
}

/* Ausgewählter Zustand */
#feedbackForm input[name="feedbackCategory"]:checked {
    border-color: var(--accent);
    background: var(--accent);
}

#feedbackForm input[name="feedbackCategory"]:checked::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    top: 4px;
    left: 4px;
    border-radius: 50%;
    background: #fff;
}

#feedbackForm input[name="feedbackCategory"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Nachrichtentext */
#feedbackForm label[for="feedbackComment"] {
    display: block;
    margin: 22px 0 8px !important;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

#feedbackComment {
    display: block;
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#feedbackComment:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Datenschutzhinweis */
#feedbackForm p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
    margin: 14px 0 18px;
}

#feedbackForm p a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Aktionsbuttons mit sichtbarem Abstand */
#feedbackSubmit,
#feedbackLater {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: var(--radius-small);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

#feedbackSubmit {
    margin: 0 12px 8px 0;
}

#feedbackLater {
    margin: 0 0 8px;
}

/* Fehler und Erfolg */
#feedbackError,
#feedbackSuccess {
    margin: 0 0 14px !important;
    padding: 11px 13px;
    border-radius: 8px;
    line-height: 1.5;
}

#feedbackError {
    background: #fef2f2;
}

#feedbackSuccess {
    background: #f0fdf4;
}

/* Mobile */
@media (max-width: 560px) {
    #feedbackModal {
        padding: 12px !important;
    }

    #feedbackModal>div {
        margin: 3vh auto !important;
        padding: 22px 18px !important;
        border-radius: 14px !important;
    }

    #feedbackTitle {
        font-size: 21px;
    }

    #feedbackSubmit,
    #feedbackLater {
        margin-bottom: 8px;
    }
}


/* ========================================
   Szenario 1 – Hinweis über Textfeldern
======================================== */

.scenario1-text-hint {
    margin-bottom: 8px;
    padding: 10px 12px;
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    background: var(--accent-light);
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

.scenario1-text-hint[hidden] {
    display: none;
}


/* ========================================
   Preisübersicht – fehlende Textgröße
======================================== */

.price-size-hint {
    margin: 4px 0 10px;
    color: #9a6700;
    font-size: 13px;
    line-height: 1.5;
}