.project-plans {
    padding: 18px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}

.project-plans__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.project-plans__title {
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.5px;
    color: #0f1f2d;
}

.project-plans__subtitle {
    margin: 0;
    color: #6b6b6b;
}

.plan-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.plan-tab {
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #0f1f2d;
    border-radius: 30px;
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
}

.plan-tab.is-active {
    background: #6fab40;
    color: #fff;
    border-color: #6fab40;
    box-shadow: 0 10px 24px rgba(111, 171, 64, 0.28);
}

.plan-grids {
    position: relative;
}

.plan-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.plan-grid.is-active {
    display: grid;
}

.plan-info {
    margin: 10px 0 18px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    padding: 14px 16px;
}

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

.plan-info__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #0f1f2d;
}

.plan-info__body {
    display: grid;
    gap: 6px;
}

.plan-info__summary {
    margin: 0;
    color: #5f6a77;
    font-size: 13px;
    line-height: 1.5;
}

.plan-info__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #f8f8f8;
    border-radius: 8px;
}

.plan-info__label {
    color: #6a6a6a;
    font-size: 12.5px;
    letter-spacing: 0.2px;
}

.plan-info__value {
    color: #0f1f2d;
    font-size: 14px;
    font-weight: 600;
}

.plan-info__empty {
    margin: 0;
    color: #6b6b6b;
    font-size: 13px;
}

.plan-card {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.plan-card__inner {
    border-radius: 10px;
    overflow: hidden;
    background: #f6f6f6;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card__inner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.plan-card:hover .plan-card__inner,
.plan-card:focus-visible .plan-card__inner {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.plan-grid__empty {
    grid-column: 1 / -1;
    margin: 0;
    color: #6b6b6b;
}

.plan-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plan-lightbox.is-open {
    display: flex;
    opacity: 1;
}

.plan-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

.gh-viewer-overlay {
    position: absolute;
    inset: 0;
}

.plan-lightbox__container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    box-sizing: border-box;
}

.plan-lightbox__dialog {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
    box-sizing: border-box;
}

.gh-viewer-modal {
    width: 100%;
    height: 100%;
    max-width: 1200px;
}

.plan-lightbox__close {
    position: absolute;
    top: max(16px, env(safe-area-inset-top, 16px));
    right: max(16px, env(safe-area-inset-right, 16px));
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    cursor: pointer;
    font-size: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.plan-lightbox__close::before,
.plan-lightbox__close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.plan-lightbox__close::before {
    transform: rotate(45deg);
}

.plan-lightbox__close::after {
    transform: rotate(-45deg);
}

.plan-lightbox__close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

.plan-lightbox__close:active {
    transform: scale(0.95);
}

.plan-lightbox__close:focus-visible {
    outline: 2px solid #6fab40;
    outline-offset: 2px;
}

.plan-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    opacity: 1;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.plan-lightbox__nav span {
    font-size: 24px;
    line-height: 1;
    font-weight: 300;
}

.plan-lightbox__nav:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.05);
}

.plan-lightbox__nav:active {
    transform: translateY(-50%) scale(0.95);
}

.plan-lightbox__nav.is-hidden {
    display: none;
}

.plan-lightbox__nav--prev {
    left: max(12px, env(safe-area-inset-left, 12px));
}

.plan-lightbox__nav--next {
    right: max(12px, env(safe-area-inset-right, 12px));
}

.plan-lightbox__viewport {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
}

.gh-viewer-body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 1 1 auto;
}

.plan-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    pointer-events: auto;
    transform-origin: center center;
    will-change: transform;
}

.gh-viewer-img {
    object-fit: contain;
}

.plan-lightbox__counter {
    position: absolute;
    bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 20px));
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    z-index: 10;
    pointer-events: none;
}

.plan-lightbox__divider {
    opacity: 0.7;
}

body.is-plan-lightbox-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

@media (max-width: 991px) {
    .plan-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 767px) {
    .project-plans__title {
        font-size: 24px;
    }

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

    .plan-lightbox__dialog {
        max-width: 100%;
    }

    .plan-lightbox__nav {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .plan-lightbox__nav span {
        font-size: 20px;
    }

    .plan-lightbox__close {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .plan-lightbox__close::before,
    .plan-lightbox__close::after {
        width: 18px;
    }
}

@media (min-width: 992px) {
    .plan-lightbox__dialog {
        border-radius: 14px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
        margin: 24px;
        max-height: calc(100vh - 48px);
    }

    .plan-lightbox__container {
        padding: 24px;
    }

    .gh-viewer-modal:hover .plan-lightbox__nav {
        opacity: 1;
    }

    .plan-lightbox__nav {
        opacity: 0;
    }
}
