:root {
    --header-height: 82px;

    --dark: #0d151f;
    --dark-2: #131f2b;
    --dark-3: #1d2a38;

    --gold: #c8a35f;
    --gold-light: #e3c982;
    --gold-soft: #f3ead8;

    --cream: #f7f2e9;
    --cream-2: #f8f3ea;
    --white: #ffffff;

    --text: #182230;
    --muted: #667085;
    --muted-dark: #4d5a68;

    --radius-md: 22px;
    --radius-sm: 16px;
    --radius-pill: 999px;

    --shadow-card: 0 18px 48px rgba(13, 21, 31, 0.16);
    --transition-fast: 0.2s ease;

    --sidebar-left-width: 270px;
    --sidebar-right-width: 300px;
}

/* =====================================================
   ZÁKLAD
===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    color: var(--text);
    background: var(--cream);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

.app {
    display: grid;
    grid-template-rows: var(--header-height) minmax(0, 1fr);
    width: 100%;
    height: 100%;
}

/* =====================================================
   BOOTSTRAP ÚPRAVY
===================================================== */

.btn {
    --bs-btn-border-radius: var(--radius-pill);

    font-weight: 650;
    transition:
        transform var(--transition-fast),
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled:hover {
    transform: none;
}

.btn-primary {
    --bs-btn-color: var(--dark);
    --bs-btn-bg: var(--gold);
    --bs-btn-border-color: var(--gold);

    --bs-btn-hover-color: var(--dark);
    --bs-btn-hover-bg: var(--gold-light);
    --bs-btn-hover-border-color: var(--gold-light);

    --bs-btn-active-color: var(--dark);
    --bs-btn-active-bg: var(--gold-light);
    --bs-btn-active-border-color: var(--gold-light);

    --bs-btn-disabled-color: var(--dark);
    --bs-btn-disabled-bg: var(--gold);
    --bs-btn-disabled-border-color: var(--gold);
}

.btn-dark {
    --bs-btn-bg: var(--dark-2);
    --bs-btn-border-color: var(--dark-2);

    --bs-btn-hover-bg: var(--dark-3);
    --bs-btn-hover-border-color: var(--dark-3);
}

.btn-outline-secondary {
    --bs-btn-color: var(--muted-dark);
    --bs-btn-border-color: #d7dce2;

    --bs-btn-hover-color: var(--dark);
    --bs-btn-hover-bg: var(--gold-soft);
    --bs-btn-hover-border-color: var(--gold);
}

.btn-outline-danger {
    --bs-btn-border-radius: var(--radius-pill);
}

.form-control,
.form-select {
    color: var(--text);
    border-color: #d9dee5;
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(200, 163, 95, 0.18);
}

.form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

.form-range::-webkit-slider-thumb {
    background-color: var(--gold);
}

.form-range::-moz-range-thumb {
    background-color: var(--gold);
}

.modal-content {
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.modal-header {
    color: var(--white);
    background: var(--dark);
    border: 0;
}

.modal-footer {
    border-color: #edf0f3;
}

/* =====================================================
   HLAVIČKA
===================================================== */

.app-header {
    position: relative;
    z-index: 40;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);
    align-items: center;
    gap: 20px;

    width: 100%;
    height: var(--header-height);
    padding: 0 22px;

    color: var(--white);
    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(200, 163, 95, 0.15),
            transparent 33%
        ),
        linear-gradient(135deg, var(--dark), var(--dark-2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(13, 21, 31, 0.18);
}

/* Logo vlevo */

.app-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-self: start;

    min-width: 0;
    color: inherit;
    line-height: 1;
    text-decoration: none;
}

.app-brand-logo-image {
    display: block;
    width: auto;
    height: 34px;
    max-width: 220px;
    object-fit: contain;
}

/* Prostřední ovládací tlačítka */

.header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: 8px;
}

.header-actions .btn-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 40px;

    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-pill);
}

.header-actions .btn-header:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.2);
}

.header-actions .btn-header:focus-visible {
    color: var(--white);
    border-color: rgba(227, 201, 130, 0.7);
    box-shadow: 0 0 0 0.2rem rgba(200, 163, 95, 0.22);
}

.header-actions .btn-header:disabled {
    opacity: 0.35;
    transform: none;
}

.header-divider {
    flex: 0 0 auto;
    width: 1px;
    height: 28px;
    margin: 0 3px;
    background: rgba(255, 255, 255, 0.13);
}

/*
 * Spacer může zůstat v HTML, ale v Grid layoutu už není potřeba.
 */
.header-spacer {
    display: none;
}

/* Tlačítko stažení vpravo */

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    gap: 8px;

    min-height: 44px;
    padding-inline: 19px;

    box-shadow: 0 10px 28px rgba(200, 163, 95, 0.2);
}

.button-icon {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
}

/* =====================================================
   PRACOVNÍ PLOCHA
===================================================== */

.workspace {
    display: grid;
    grid-template-columns:
        var(--sidebar-left-width)
        minmax(0, 1fr)
        var(--sidebar-right-width);
    min-height: 0;
}

.sidebar {
    position: relative;
    z-index: 20;
    min-height: 0;
    overflow-y: auto;
    background: var(--white);
}

.sidebar-left {
    border-right: 1px solid #e3e7eb;
    box-shadow: 8px 0 26px rgba(13, 21, 31, 0.035);
}

.sidebar-right {
    border-left: 1px solid #e3e7eb;
    box-shadow: -8px 0 26px rgba(13, 21, 31, 0.035);
}

.sidebar-inner {
    padding: 19px 17px 28px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
}

.step-badge {
    display: grid;
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    place-items: center;

    color: var(--dark);
    background: var(--gold-soft);
    border: 1px solid rgba(200, 163, 95, 0.34);
    border-radius: 50%;

    font-size: 11px;
    font-weight: 800;
}

.sidebar-title {
    margin: 0;
    color: var(--dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.sidebar-description {
    margin: -3px 0 12px 34px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

/* =====================================================
   NÁSTROJE
===================================================== */

.tool-list {
    display: grid;
    gap: 7px;
}

.tool-button {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 44px;
    padding: 8px 11px;

    color: var(--text);
    text-align: left;
    background: var(--white);
    border: 1px solid #e1e5e9;
    border-radius: 13px;

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

.tool-button:hover {
    position: relative;
    z-index: 1;

    color: var(--dark);
    background: var(--cream-2);
    border-color: rgba(200, 163, 95, 0.65);
    transform: translateX(2px);
}

.tool-button.active {
    color: var(--dark);
    background: linear-gradient(135deg, var(--gold-soft), #fbf7ef);
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(200, 163, 95, 0.13);
}

.tool-button-icon {
    display: grid;
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    margin-right: 9px;
    place-items: center;

    color: var(--muted-dark);
    background: #f4f5f7;
    border-radius: 9px;

    transition:
        color var(--transition-fast),
        background-color var(--transition-fast);
}

.tool-button.active .tool-button-icon {
    color: var(--dark);
    background: var(--gold);
}

.tool-button-icon svg {
    width: 17px;
    height: 17px;
}

.tool-button-label {
    min-width: 0;
}

.tool-button-label strong {
    display: block;
    font-size: 13px;
    line-height: 1.2;
}

.tool-button-label small {
    display: block;
    margin-top: 2px;
    overflow: hidden;

    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.finish-wall-button {
    display: none;
    width: 100%;
    margin-top: 8px;
}

.finish-wall-button.visible {
    display: block;
}

/* =====================================================
   NÁBYTEK
===================================================== */

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

.furniture-button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;

    min-height: 86px;
    padding: 9px 5px 7px;

    color: var(--text);
    background: var(--white);
    border: 1px solid #e2e6ea;
    border-radius: 14px;

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

.furniture-button:hover {
    background: var(--cream-2);
    border-color: var(--gold);
    box-shadow: 0 10px 24px rgba(13, 21, 31, 0.08);
    transform: translateY(-2px);
}

.furniture-button.active {
    background: var(--gold-soft);
    border-color: var(--gold);
    box-shadow: 0 10px 26px rgba(200, 163, 95, 0.18);
}

.furniture-preview {
    display: grid;
    width: 49px;
    height: 49px;
    margin-bottom: 4px;
    place-items: center;
    color: var(--dark-3);
}

.furniture-preview svg {
    width: 45px;
    height: 45px;
}

.furniture-button span:last-child {
    font-size: 10px;
    font-weight: 720;
    line-height: 1.15;
    text-align: center;
}

/* =====================================================
   CANVAS
===================================================== */

.canvas-area {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.7),
            rgba(233, 228, 218, 0.58)
        ),
        var(--cream);
}

#floorCanvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: default;
}

.canvas-tool-info {
    position: absolute;
    top: 16px;
    left: 50%;
    z-index: 5;

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

    max-width: calc(100% - 34px);
    padding: 9px 15px 9px 10px;

    color: var(--muted-dark);
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid rgba(213, 218, 224, 0.9);
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 35px rgba(13, 21, 31, 0.09);

    font-size: 12px;
    pointer-events: none;
    backdrop-filter: blur(12px);
    transform: translateX(-50%);
}

.canvas-tool-icon {
    display: grid;
    flex: 0 0 auto;
    width: 29px;
    height: 29px;
    place-items: center;

    color: var(--dark);
    background: var(--gold);
    border-radius: 50%;
}

.canvas-tool-icon svg {
    width: 15px;
    height: 15px;
}

.canvas-navigation {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 5;

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

    padding: 6px;

    background: rgba(13, 21, 31, 0.92);
    border-radius: var(--radius-pill);
    box-shadow: 0 12px 32px rgba(13, 21, 31, 0.2);

    backdrop-filter: blur(10px);
}

.canvas-navigation button {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;

    color: var(--white);
    background: transparent;
    border: 0;
    border-radius: 50%;
}

.canvas-navigation button:hover {
    color: var(--dark);
    background: var(--gold);
}

.zoom-value {
    min-width: 48px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.autosave-badge {
    position: absolute;
    bottom: 19px;
    left: 18px;
    z-index: 5;

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

    padding: 8px 12px;

    color: var(--muted-dark);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(213, 218, 224, 0.9);
    border-radius: var(--radius-pill);
    box-shadow: 0 8px 25px rgba(13, 21, 31, 0.07);

    font-size: 10px;
    backdrop-filter: blur(10px);
}

.autosave-dot {
    width: 7px;
    height: 7px;
    background: #3d9d69;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(61, 157, 105, 0.12);
}

/* =====================================================
   PRAVÝ PANEL
===================================================== */

.panel-card {
    margin-bottom: 14px;
    padding: 16px;

    background: var(--white);
    border: 1px solid #e4e7eb;
    border-radius: var(--radius-sm);
}

.panel-card-highlight {
    background:
        linear-gradient(
            145deg,
            rgba(243, 234, 216, 0.76),
            rgba(255, 255, 255, 0.94)
        );
    border-color: rgba(200, 163, 95, 0.45);
}

.panel-card-title {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0 0 11px;

    color: var(--dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.panel-card-title svg {
    width: 16px;
    height: 16px;
    color: var(--gold);
}

.selection-empty {
    padding: 9px 4px 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.selection-empty-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    place-items: center;

    color: var(--gold);
    background: var(--gold-soft);
    border-radius: 14px;
}

.selection-empty-icon svg {
    width: 21px;
    height: 21px;
}

.selected-name {
    margin-bottom: 3px;
    color: var(--dark);
    font-size: 14px;
    font-weight: 800;
}

.selected-description {
    margin-bottom: 13px;
    color: var(--muted);
    font-size: 11px;
}

.selection-controls {
    display: none;
}

.selection-controls.visible {
    display: block;
}

.control-label {
    margin-bottom: 5px;
    color: var(--muted-dark);
    font-size: 11px;
    font-weight: 700;
}

.small-help {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.shortcut-list {
    display: grid;
    gap: 7px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    color: var(--muted-dark);
    font-size: 11px;
}

kbd {
    min-width: 25px;
    padding: 4px 7px;

    color: var(--white);
    background: var(--dark-3);
    border-radius: 7px;
    box-shadow: none;

    font-size: 9px;
    text-align: center;
}

/* =====================================================
   TOAST
===================================================== */

.toast-container {
    z-index: 1085;
}

.editor-toast {
    overflow: hidden;

    color: var(--white);
    background: rgba(13, 21, 31, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;
    box-shadow: var(--shadow-card);

    backdrop-filter: blur(12px);
}

.toast-gold-line {
    width: 4px;
    align-self: stretch;
    background: var(--gold);
}

/* =====================================================
   RESPONSIVITA – MENŠÍ NOTEBOOKY
===================================================== */

@media (max-width: 1150px) {
    :root {
        --sidebar-left-width: 235px;
        --sidebar-right-width: 270px;
    }

    .app-brand-logo-image {
        max-width: 180px;
    }
}

/* =====================================================
   RESPONSIVITA – TABLETY
===================================================== */

@media (max-width: 920px) {
    :root {
        --header-height: 72px;
        --sidebar-left-width: 205px;
    }

    .workspace {
        grid-template-columns:
            var(--sidebar-left-width)
            minmax(0, 1fr);
    }

    .sidebar-right {
        display: none;
    }

    .app-header {
        gap: 12px;
        padding-inline: 14px;
    }

    .app-brand-logo-image {
        height: 32px;
        max-width: 145px;
    }

    .header-actions {
        gap: 5px;
    }

    .header-actions .action-label {
        display: none;
    }

    .header-actions .btn-header {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
    }

    .download-button {
        min-width: 44px;
    }
}

/* =====================================================
   RESPONSIVITA – MOBILY
===================================================== */

@media (max-width: 650px) {
    :root {
        --sidebar-left-width: 126px;
    }

    /*
     * Na malých displejích používáme praktické rozložení.
     * Prostřední tlačítka jsou vystředěna v dostupném prostoru,
     * aby nedocházelo k překrývání loga a stažení.
     */
    .app-header {
        grid-template-columns:
            auto
            minmax(0, 1fr)
            auto;
        gap: 7px;
        padding-inline: 10px;
    }

    .app-brand-logo-image {
        height: 29px;
        max-width: 100px;
    }

    .header-actions {
        gap: 4px;
    }

    .header-actions .btn-header {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    .header-divider {
        height: 24px;
        margin-inline: 1px;
    }

    .download-button {
        min-width: 40px;
        min-height: 40px;
        padding-inline: 11px;
    }

    .download-button .action-label {
        display: none;
    }

    .sidebar-inner {
        padding: 10px 8px 20px;
    }

    .sidebar-heading {
        gap: 5px;
    }

    .step-badge,
    .sidebar-description {
        display: none;
    }

    .sidebar-title {
        font-size: 10px;
    }

    .tool-button {
        justify-content: center;
        min-height: 42px;
        padding: 5px;
    }

    .tool-button-icon {
        width: 30px;
        height: 30px;
        margin-right: 5px;
    }

    .tool-button-label strong {
        font-size: 10px;
    }

    .tool-button-label small {
        display: none;
    }

    .furniture-grid {
        grid-template-columns: 1fr;
    }

    .furniture-button {
        min-height: 65px;
        padding: 5px;
    }

    .furniture-preview {
        width: 36px;
        height: 36px;
        margin: 0;
    }

    .furniture-preview svg {
        width: 34px;
        height: 34px;
    }

    .canvas-tool-info,
    .autosave-badge {
        display: none;
    }
}

/* =====================================================
   RESPONSIVITA – VELMI MALÉ MOBILY
===================================================== */

@media (max-width: 480px) {
    .app-header {
        gap: 5px;
        padding-inline: 8px;
    }

    .app-brand-logo-image {
        height: 26px;
        max-width: 76px;
    }

    .header-actions {
        gap: 3px;
    }

    .header-actions .btn-header {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
    }

    .header-divider {
        margin-inline: 0;
    }

    .download-button {
        min-width: 38px;
        min-height: 38px;
        padding-inline: 10px;
    }

    .button-icon {
        width: 16px;
        height: 16px;
    }
}

/* =====================================================
   OMEZENÍ ANIMACÍ
===================================================== */

@media (prefers-reduced-motion: reduce) {
    .btn,
    .tool-button,
    .tool-button-icon,
    .furniture-button {
        transition: none;
    }

    .btn:hover,
    .tool-button:hover,
    .furniture-button:hover {
        transform: none;
    }
}

/* =====================================================
   MODAL VYMAZÁNÍ PŮDORYSU
===================================================== */

.clear-plan-warning {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 16px;

    color: var(--text);
    background: rgba(220, 53, 69, 0.06);
    border: 1px solid rgba(220, 53, 69, 0.18);
    border-radius: 16px;
}

.clear-plan-warning-icon {
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;

    color: #dc3545;
    background: rgba(220, 53, 69, 0.12);
    border-radius: 13px;
}

.clear-plan-warning-icon svg {
    width: 22px;
    height: 22px;
}

.clear-plan-warning strong {
    display: block;
    color: var(--dark);
    font-size: 14px;
}

.clear-plan-warning p {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

/* =====================================================
   CTA PO DOKONČENÍ PŮDORYSU
===================================================== */

.cta-modal-content {
    background: var(--white);
}

.cta-modal-header {
    position: relative;
    padding: 34px 38px 28px;
    color: var(--white);
    text-align: center;
    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(200, 163, 95, 0.28),
            transparent 38%
        ),
        linear-gradient(145deg, var(--dark), var(--dark-2));
}

.cta-modal-close {
    position: absolute;
    top: 17px;
    right: 17px;
}

.cta-modal-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    place-items: center;

    color: var(--dark);
    background: linear-gradient(145deg, var(--gold-light), var(--gold));
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(200, 163, 95, 0.24);
}

.cta-modal-icon svg {
    width: 29px;
    height: 29px;
}

.cta-modal-kicker {
    margin-bottom: 7px;
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cta-modal-title {
    margin: 0;
    color: var(--white);
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.cta-modal-description {
    max-width: 410px;
    margin: 11px auto 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.65;
}

.cta-modal-body {
    padding: 24px 28px 20px;
}

.cta-option-list {
    display: grid;
    gap: 11px;
}

.cta-option {
    display: flex;
    align-items: center;
    gap: 13px;

    min-height: 76px;
    padding: 13px 15px;

    color: var(--text);
    text-decoration: none;
    background: var(--white);
    border: 1px solid #e1e5e9;
    border-radius: 16px;

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

.cta-option:hover {
    color: var(--dark);
    background: var(--cream-2);
    border-color: var(--gold);
    box-shadow: 0 12px 30px rgba(13, 21, 31, 0.09);
    transform: translateY(-2px);
}

.cta-option-primary {
    background:
        linear-gradient(
            135deg,
            rgba(243, 234, 216, 0.9),
            rgba(255, 255, 255, 0.96)
        );
    border-color: rgba(200, 163, 95, 0.65);
}

.cta-option-icon {
    display: grid;
    flex: 0 0 auto;
    width: 43px;
    height: 43px;
    place-items: center;

    color: var(--dark);
    background: var(--gold-soft);
    border-radius: 13px;
}

.cta-option-primary .cta-option-icon {
    background: var(--gold);
}

.cta-option-icon svg {
    width: 21px;
    height: 21px;
}

.cta-option-copy {
    flex: 1;
    min-width: 0;
}

.cta-option-copy strong {
    display: block;
    margin-bottom: 3px;
    color: var(--dark);
    font-size: 14px;
    font-weight: 800;
}

.cta-option-copy small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.cta-option-arrow {
    flex: 0 0 auto;
    color: var(--gold);
    font-size: 22px;
    font-weight: 400;
    transition: transform var(--transition-fast);
}

.cta-option:hover .cta-option-arrow {
    transform: translateX(3px);
}

.cta-modal-later {
    display: block;
    margin: 14px auto 0;
    padding: 5px 12px;

    color: var(--muted);
    font-size: 12px;
    text-decoration: none;
}

.cta-modal-later:hover {
    color: var(--dark);
    transform: none;
}

.cta-modal-note {
    margin: 3px 0 0;
    color: #8b939d;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 575px) {
    .cta-modal-header {
        padding: 30px 22px 23px;
    }

    .cta-modal-body {
        padding: 19px 16px 16px;
    }

    .cta-option {
        min-height: 70px;
        padding: 11px 12px;
    }

    .cta-option-copy strong {
        font-size: 13px;
    }

    .cta-option-copy small {
        font-size: 10px;
    }
}

/* =========================================================
   LEGENDA A POZNÁMKY
========================================================= */

#noteTextInspector {
    min-height: 96px;
    resize: vertical;
    line-height: 1.45;
}

#noteControls .form-select,
#noteControls .form-control {
    border-color: rgba(13, 21, 31, 0.14);
}

#noteControls .form-control:focus,
#noteControls .form-select:focus {
    border-color: var(--gold, #c8a35f);
    box-shadow: 0 0 0 0.2rem rgba(200, 163, 95, 0.18);
}

.small-help {
    color: var(--muted, #667085);
    font-size: 12px;
    line-height: 1.45;
}

#noteModal textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.5;
}

/* =====================================================
   ÚDAJE O NEMOVITOSTI A KOMPAS
===================================================== */

.presentation-card {
    background:
        linear-gradient(
            145deg,
            rgba(243, 234, 216, 0.52),
            rgba(255, 255, 255, 0.98)
        );
    border-color: rgba(200, 163, 95, 0.32);
}

.presentation-card .row {
    --bs-gutter-x: 8px;
}

.presentation-card .form-control {
    min-width: 0;
}

#compassControls {
    padding-top: 3px;
}

#compassControls .form-range {
    margin-bottom: 2px;
}

.compass-help {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

/*
 * Vstupy v kartě mohou být užší než standardní Bootstrap prvky.
 */
.presentation-card input[type="text"] {
    width: 100%;
}

/*
 * Na menších pravých panelech ponechá Podlaží a Dispozici vedle sebe,
 * ale zabrání přetékání vstupů.
 */
.presentation-card .col-6 {
    min-width: 0;
}

/*
 * Zvýraznění aktivního kompasu v seznamu nástrojů.
 */
.tool-button[data-tool="compass"].active .tool-button-icon {
    color: var(--dark);
    background:
        linear-gradient(
            145deg,
            var(--gold-light),
            var(--gold)
        );
}

/*
 * Textové vstupy v pravém panelu.
 */
.presentation-card .form-control::placeholder {
    color: #98a2b3;
    opacity: 1;
}

@media (max-width: 920px) {
    /*
     * Pravý panel je v původním návrhu skrytý.
     * Nastavení nadpisu, lokality a kompasu je tedy dostupné
     * především na desktopu.
     */
    .presentation-card {
        border-radius: 14px;
    }
}

/* Levý panel nesmí zvětšovat šířku kvůli dlouhému textu */
.sidebar,
.sidebar-inner,
.sidebar-section,
.tool-list {
  min-width: 0;
}

/* Tlačítko zůstane uvnitř šířky panelu */
.tool-button {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  overflow: hidden;
}

/* Ikona si zachová pevnou velikost */
.tool-button-icon {
  flex: 0 0 auto;
}

/* Textová část se smí zmenšit */
.tool-button-label {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
}

/* Delší text se zalomí na další řádek */
.tool-button-label strong,
.tool-button-label small {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Případně také nadpisy sekcí */
.sidebar-heading {
  min-width: 0;
}

.sidebar-title {
  min-width: 0;
  overflow-wrap: anywhere;
}


#doorControls {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(13, 21, 31, 0.1);
}

#doorControls .btn {
    white-space: normal;
    line-height: 1.35;
}