.kb-deckplan-section {
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid #cbdce4 !important;
    border-radius: 20px !important;
    background: #f3f8fa !important;
    box-shadow: 0 20px 48px rgba(20, 52, 70, 0.12) !important;
}

.kb-deckplan-intro {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    padding: 24px 28px;
    background: linear-gradient(128deg, #13384a 0%, #0b6171 58%, #087f8f 100%);
    color: #fff;
}

.kb-deckplan-intro-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.kb-deckplan-intro-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kb-deckplan-intro-copy {
    min-width: 0;
}

.kb-deckplan-intro h2 {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(1.45rem, 2vw, 1.9rem) !important;
    font-weight: 760 !important;
    letter-spacing: -0.02em;
    line-height: 1.16 !important;
    text-transform: none !important;
    text-wrap: balance;
}

.kb-deckplan-module {
    position: relative;
    height: 320px;
    min-height: 0;
    margin-top: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: linear-gradient(145deg, #eef4f8 0%, #f9fbfc 55%, #e8f0f5 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.kb-deckplan-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    outline: none;
}

.kb-deckplan-viewport:focus-visible {
    box-shadow: inset 0 0 0 3px #007c91;
}

.kb-deckplan-viewport.is-dragging {
    cursor: grabbing;
}

.kb-deckplan-content {
    position: absolute;
    transform-origin: center center;
    will-change: transform;
}

.kb-deckplan-content canvas {
    display: block;
    background: #fff;
    box-shadow: 0 10px 30px rgba(25, 48, 64, 0.18);
}

.kb-deckplan-cabin-layer {
    position: absolute;
    z-index: 1;
    inset: 0;
}

.kb-deckplan-cabin-hit {
    position: absolute;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    touch-action: none;
}

.kb-deckplan-cabin-hit:hover,
.kb-deckplan-cabin-hit:focus-visible {
    outline: 2px solid #007c91;
    outline-offset: 1px;
    background: rgba(0, 124, 145, 0.18);
}

.kb-deckplan-cabin-hit.has-review:hover,
.kb-deckplan-cabin-hit.has-review:focus-visible {
    outline-color: #b86a00;
    background: rgba(255, 176, 0, 0.25);
}

.kb-deckplan-cabin-hit.has-review {
    z-index: 2;
}

.kb-deckplan-marker {
    position: absolute;
    z-index: 2;
    min-width: 20px;
    min-height: 14px;
    border: 3px solid #d52a2a;
    border-radius: 5px;
    background: rgba(255, 244, 91, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 3px 12px rgba(0, 0, 0, 0.32);
    pointer-events: none;
}

.kb-deckplan-cabin-feedback {
    position: absolute;
    z-index: 5;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: min(300px, calc(100% - 86px));
    padding: 9px 12px;
    border: 1px solid rgba(30, 55, 75, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #17384c;
    box-shadow: 0 5px 18px rgba(18, 41, 58, 0.17);
    font-size: 0.88rem;
    line-height: 1.35;
    pointer-events: none;
}

.kb-deckplan-cabin-feedback[hidden] {
    display: none;
}

.kb-deckplan-cabin-feedback a {
    color: #006b7d;
    font-weight: 700;
    pointer-events: auto;
}

.kb-deckplan-controls {
    position: absolute;
    z-index: 4;
    top: 50%;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transform: translateY(-50%);
}

.kb-deckplan-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(30, 55, 75, 0.18);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #17384c;
    font: 700 1.3rem/1 sans-serif;
    box-shadow: 0 4px 14px rgba(18, 41, 58, 0.15);
    cursor: pointer;
}

.kb-deckplan-controls button:hover,
.kb-deckplan-controls button:focus-visible {
    background: #fff;
    color: #007c91;
}

.kb-deckplan-status {
    position: absolute;
    z-index: 3;
    left: 12px;
    bottom: 10px;
    max-width: calc(100% - 82px);
    margin: 0;
    padding: 7px 11px;
    border-radius: 10px;
    background: rgba(16, 41, 58, 0.82);
    color: #fff;
    font-size: 0.86rem;
}

.kb-deckplan-module.is-ready .kb-deckplan-status {
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.kb-deckplan-module.is-compact {
    height: 300px;
}

.kb-deckplan-module:fullscreen {
    width: 100vw;
    height: 100vh !important;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
}

.kb-deckplan-module.is-pseudo-fullscreen {
    position: fixed;
    z-index: 999999;
    inset: 0;
    width: 100vw;
    height: 100dvh !important;
    margin: 0;
    border: 0;
    border-radius: 0;
}

body.kb-deckplan-body-locked {
    overflow: hidden !important;
}

.kb-deck-neighbours {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.kb-deck-neighbours a {
    display: inline-flex;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: #edf6f7;
    color: #075b69;
    font-weight: 700;
    text-decoration: none;
}

.kb-cabin-deck-context {
    border-left: 4px solid #07889b;
}

.kb-cabin-deck-link {
    display: inline-flex;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #087c8d;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}

.kb-cabin-deck-link:hover,
.kb-cabin-deck-link:focus-visible {
    background: #075d6a;
}

@media (max-width: 700px) {
    .kb-deckplan-section {
        border-radius: 16px !important;
    }

    .kb-deckplan-intro {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 14px;
        padding: 18px;
    }

    .kb-deckplan-intro-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
    }

    .kb-deckplan-intro-icon svg {
        width: 28px;
        height: 28px;
    }

    .kb-deckplan-intro h2 {
        font-size: 1.38rem !important;
        line-height: 1.2 !important;
    }

    .kb-deckplan-section.is-cabin-context .kb-deckplan-intro {
        display: block;
        padding: 16px 18px;
    }

    .kb-deckplan-section.is-cabin-context .kb-deckplan-intro-icon {
        display: none;
    }

    .kb-deckplan-section.is-cabin-context .kb-deckplan-intro h2 {
        font-size: 1.24rem !important;
    }

    .kb-deckplan-module {
        height: 222px;
    }

    .kb-deckplan-module.is-compact {
        height: 222px;
    }

    .kb-deckplan-controls {
        right: 7px;
        gap: 6px;
    }

    .kb-deckplan-controls button {
        width: 42px;
        height: 42px;
    }

    .kb-deckplan-cabin-feedback {
        top: 8px;
        left: 8px;
        max-width: calc(100% - 66px);
        padding: 7px 9px;
        font-size: 0.8rem;
    }

    .kb-deck-neighbours {
        align-items: stretch;
    }

    .kb-deck-neighbours a {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}

@media (max-height: 520px) and (min-width: 700px), (orientation: landscape) and (max-width: 980px) {
    .kb-deckplan-intro {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 16px;
        padding: 15px 18px;
    }

    .kb-deckplan-intro-icon {
        width: 46px;
        height: 46px;
    }

    .kb-deckplan-intro h2 {
        font-size: 1.35rem !important;
    }

    .kb-deckplan-module {
        height: 222px;
    }
}
