/* Inside the house — "A floor for everything" (design A), under the Stay Route.
   Floor list on the left drives the photo + four tiles beside it (InsideTheHouse.tsx). */
.inside-house {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cz-hair);
    scroll-margin-top: 5rem;
}
.inside-house-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem 2.5rem;
}
.inside-house-heading .guide-eyebrow { margin: 0 0 0.6rem; color: var(--cz-clay-deep); }
.inside-house-heading h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 3.4vw, 2.4rem);
    line-height: 1.1;
    color: var(--feat-ink);
}
.inside-house .inside-house-lede { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--cz-muted); }
.inside-hint-tap { display: none; }
@media (hover: none) {
    .inside-hint-hover { display: none; }
    .inside-hint-tap { display: inline; }
}

.inside-display { font-family: var(--font-display); font-weight: 400; }

/* Layout: picker | photo + 2×2 tiles */
.inside-floors-layout {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 14px;
}

/* Floor picker */
.inside-floor-picker {
    padding: 1.4rem;
    background: var(--white);
    border: 1px solid var(--feat-hair);
    border-radius: 22px;
}
.inside-floor-picker h4 { margin: 0; font-size: 1.5rem; line-height: 1.15; color: var(--feat-ink); }
.inside-floor-picker > p { margin: 0.3rem 0 1rem; font-size: 0.9rem; line-height: 1.45; color: var(--cz-muted); }
.inside-floor-list { display: flex; flex-direction: column; gap: 6px; }
.inside-floor-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    text-align: left;
    color: var(--feat-ink);
    background: #F4F4FA;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}
.inside-floor-btn:focus-visible { outline: 2px solid var(--cz-clay); outline-offset: 2px; }
.inside-floor-n { width: 1.1rem; font-family: var(--font-display); font-size: 1.5rem; line-height: 1; }
.inside-floor-text { display: flex; flex-direction: column; font-size: 0.95rem; font-weight: 600; line-height: 1.25; }
.inside-floor-text small { font-size: 0.78rem; font-weight: 400; color: var(--cz-muted); }
.inside-floor-short { display: none; }
.inside-floor-arrow { margin-left: auto; opacity: 0; transform: translateX(-4px); transition: opacity 0.25s ease, transform 0.25s ease; }
.inside-floor-btn.is-active { background: var(--feat-accent, #4B53A0); color: #fff; }
.inside-floor-btn.is-active small { color: rgba(255, 255, 255, 0.8); }
.inside-floor-btn.is-active .inside-floor-arrow { opacity: 1; transform: none; }
@media (hover: hover) {
    .inside-floor-btn:not(.is-active):hover { background: #E9E9F5; }
}

/* Panel: photo spans both rows, tiles 2×2 */
.inside-floor-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(190px, 1fr));
    gap: 12px;
}
.inside-floor-panel > * { animation: inside-swap 0.45s var(--ease-out-expo, ease-out) both; }
.inside-floor-panel > :nth-child(2) { animation-delay: 0.04s; }
.inside-floor-panel > :nth-child(3) { animation-delay: 0.08s; }
.inside-floor-panel > :nth-child(4) { animation-delay: 0.12s; }
.inside-floor-panel > :nth-child(5) { animation-delay: 0.16s; }
@keyframes inside-swap {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.inside-floor-photo {
    grid-row: span 2;
    position: relative;
    margin: 0;
    min-height: 392px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 20px;
    background: var(--feat-bg);
}
.inside-floor-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* No photo yet: a drawn card with the floor number */
.inside-floor-photo--drawn { background: linear-gradient(150deg, #4B53A0 0%, #2D3060 70%); }
.inside-floor-photo-n {
    position: absolute;
    top: 0.5rem;
    right: 1.5rem;
    font-family: var(--font-display);
    font-size: 11rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.12);
}
.inside-floor-photo figcaption {
    position: relative;
    margin: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: 14px;
    background: rgba(34, 38, 74, 0.82);
    color: var(--cz-bone);
}
.inside-floor-photo figcaption strong { font-size: 1.4rem; line-height: 1.15; }
.inside-floor-photo figcaption span { font-size: 0.85rem; color: #D6D8EA; }

.inside-tile {
    margin: 0;
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid var(--feat-hair);
    border-radius: 18px;
}
.inside-tile-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.inside-tile .guide-eyebrow { margin: 0; color: var(--cz-clay-deep); }
.inside-tile h4 { margin: 0; font-family: var(--font-main); font-size: 1rem; font-weight: 600; line-height: 1.25; color: var(--feat-ink); }
.inside-tile p { margin: 0.2rem 0 0; font-size: 0.86rem; line-height: 1.4; color: var(--cz-muted); }
.inside-emoji { font-size: 1.4rem; line-height: 1; }
.inside-num { font-family: var(--font-display); font-size: 2.6rem; line-height: 0.9; color: var(--feat-ink); }

/* Whole-house strip */
.inside-house-strip {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.inside-house-strip li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--feat-bg);
    font-size: 0.82rem;
    line-height: 1.3;
    color: var(--feat-muted, var(--cz-muted));
}
.inside-house-strip strong { display: block; font-size: 0.9rem; color: var(--feat-ink); }
.inside-strip-mark { flex: none; min-width: 2.2rem; font-family: var(--font-display); font-size: 1.7rem; color: var(--feat-accent, #4B53A0); }

/* Tablet: picker on top as a row of four, panel below */
@media (max-width: 1024px) {
    .inside-floors-layout { grid-template-columns: 1fr; }
    .inside-floor-picker > p { display: none; }
    .inside-floor-list { flex-direction: row-reverse; }
    .inside-floor-btn { flex: 1; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; text-align: center; }
    .inside-floor-name, .inside-floor-text small, .inside-floor-arrow { display: none; }
    .inside-floor-short { display: block; font-size: 0.8rem; font-weight: 600; }
    .inside-floor-n { width: auto; }
    .inside-floor-picker { padding: 1rem; }
    .inside-floor-picker h4 { font-size: 1.15rem; margin-bottom: 0.7rem; }
    .inside-house-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phone: photo on top, tiles 2×2 */
@media (max-width: 768px) {
    .inside-house { gap: 1rem; padding-top: 1.5rem; }
    .inside-house-heading h3 { font-size: 1.75rem; }
    .inside-house .inside-house-lede { font-size: 0.9rem; }
    .inside-floor-picker { padding: 0; background: none; border: 0; }
    .inside-floor-picker h4 { display: none; }
    .inside-floor-list { gap: 5px; padding: 5px; background: var(--white); border: 1px solid var(--feat-hair); border-radius: 16px; }
    .inside-floor-btn { background: none; border-radius: 12px; }
    .inside-floor-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; gap: 9px; }
    .inside-floor-photo { grid-column: span 2; grid-row: auto; min-height: 230px; }
    .inside-floor-photo figcaption strong { font-size: 1.2rem; }
    .inside-floor-photo-n { font-size: 8rem; }
    .inside-tile { min-height: 118px; padding: 0.85rem; border-radius: 16px; }
    .inside-tile h4 { font-size: 0.92rem; }
    .inside-tile p { font-size: 0.78rem; }
    .inside-num { font-size: 2.1rem; }
    .inside-house-strip { gap: 9px; }
    .inside-house-strip li { padding: 12px; gap: 9px; font-size: 0.76rem; }
    .inside-strip-mark { font-size: 1.4rem; min-width: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .inside-floor-panel > * { animation: none; }
    .inside-floor-btn, .inside-floor-arrow { transition: none; }
}

/* Phone (design B): swipe one card per floor; whole-house facts as one pill row */
.inside-swipe, .inside-hint-swipe { display: none; }
@media (max-width: 768px) {
    .inside-floors-layout, .inside-hint-hover, .inside-hint-tap { display: none !important; }
    .inside-hint-swipe { display: inline; }
    .inside-house-heading { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
    .inside-house .inside-house-lede { font-size: 0.85rem; }
    .inside-swipe { display: block; }
    .inside-swipe-track {
        display: flex;
        gap: 10px;
        margin: 0 calc(-1 * var(--cz-gutter, 1rem));
        padding: 2px var(--cz-gutter, 1rem) 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--cz-gutter, 1rem);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .inside-swipe-track::-webkit-scrollbar { display: none; }
    .inside-swipe-card {
        flex: 0 0 min(82%, 300px);
        scroll-snap-align: start;
        overflow: hidden;
        background: var(--white);
        border: 1px solid var(--feat-hair);
        border-radius: 18px;
    }
    .inside-swipe-photo { position: relative; height: 150px; background: var(--feat-bg); }
    .inside-swipe-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .inside-swipe-badge {
        position: absolute;
        top: 10px;
        left: 10px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px 4px 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.94);
        color: var(--feat-ink);
        font-size: 0.72rem;
        font-weight: 700;
    }
    .inside-swipe-badge span {
        width: 22px;
        height: 22px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: var(--feat-accent, #4B53A0);
        color: #fff;
        font-family: var(--font-display);
        font-size: 0.85rem;
        font-weight: 400;
    }
    .inside-swipe-body { padding: 0.75rem 0.85rem 0.85rem; }
    .inside-swipe-body h4 { margin: 0 0 0.45rem; font-size: 1.3rem; line-height: 1.1; color: var(--feat-ink); }
    .inside-swipe-body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
    .inside-swipe-body li { display: flex; gap: 8px; align-items: baseline; font-size: 0.8rem; line-height: 1.3; color: var(--feat-ink); }
    .inside-swipe-body strong { font-weight: 600; }
    .inside-swipe-body small { font-size: 0.74rem; color: var(--cz-muted); }
    .inside-swipe-icon { flex: none; width: 1.1rem; font-size: 0.9rem; text-align: center; }
    .inside-swipe-dots { display: flex; justify-content: center; gap: 5px; margin-top: 0.65rem; }
    .inside-swipe-dots span { width: 6px; height: 6px; border-radius: 3px; background: #C9CBE0; transition: width 0.25s ease, background 0.25s ease; }
    .inside-swipe-dots span.is-active { width: 18px; background: var(--feat-accent, #4B53A0); }

    .inside-house-strip {
        display: flex;
        gap: 6px;
        margin: 0 calc(-1 * var(--cz-gutter, 1rem));
        padding: 0 var(--cz-gutter, 1rem);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .inside-house-strip::-webkit-scrollbar { display: none; }
    .inside-house-strip li { flex: none; padding: 7px 12px; gap: 5px; border-radius: 999px; font-size: 0.76rem; white-space: nowrap; }
    .inside-house-strip li > span:last-child { display: flex; gap: 4px; }
    .inside-house-strip strong { display: inline; font-size: 0.78rem; }
    .inside-house-strip li > span:last-child { font-size: 0; }
    .inside-house-strip li > span:last-child strong { font-size: 0.78rem; }
    .inside-strip-mark { min-width: 0; font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) { .inside-swipe-dots span { transition: none; } }

/* ── Own section: full-width navy band (design A), light and dark ──
   High-specificity selectors so the generated dark-mode colours don't win. */
html body #root #inside-the-house {
    --ih-band: #2D3060;
    --ih-card: #373B72;
    --ih-ink: #FFFFFF;
    --ih-mut: #C9CBE3;
    --ih-accent: #FFB8A3;
    --ih-line: rgba(255, 255, 255, 0.08);
    position: relative;
    margin-top: clamp(3rem, 6vw, 4.5rem);
    padding: clamp(3rem, 6vw, 4.5rem) 0 !important;
    border-top: 0 !important;
    background: var(--ih-band) !important;
    box-shadow: 0 0 0 100vmax var(--ih-band) !important;
    clip-path: inset(0 -100vmax);
}
@media (prefers-color-scheme: dark) {
    html body #root #inside-the-house {
        --ih-band: #272B58;
        --ih-card: #32376A;
        --ih-ink: #ECECF7;
        --ih-mut: #B4B7D6;
        --ih-line: rgba(255, 255, 255, 0.07);
    }
}
html body #stay-guide.guest-guide-overview { padding-bottom: 0 !important; }

html body #root #inside-the-house .inside-house-heading h3,
html body #root #inside-the-house .inside-floor-picker h4,
html body #root #inside-the-house .inside-tile h4,
html body #root #inside-the-house .inside-num,
html body #root #inside-the-house .inside-swipe-body h4,
html body #root #inside-the-house .inside-swipe-body li,
html body #root #inside-the-house .inside-swipe-body strong,
html body #root #inside-the-house .inside-house-strip strong { color: var(--ih-ink) !important; }

html body #root #inside-the-house .guide-eyebrow,
html body #root #inside-the-house .inside-strip-mark { color: var(--ih-accent) !important; }

html body #root #inside-the-house .inside-house-lede,
html body #root #inside-the-house .inside-floor-picker > p,
html body #root #inside-the-house .inside-tile p,
html body #root #inside-the-house .inside-floor-text small,
html body #root #inside-the-house .inside-swipe-body small,
html body #root #inside-the-house .inside-house-strip li { color: var(--ih-mut) !important; }

html body #root #inside-the-house .inside-floor-picker,
html body #root #inside-the-house .inside-tile,
html body #root #inside-the-house .inside-swipe-card {
    background: var(--ih-card) !important;
    border-color: var(--ih-line) !important;
}
html body #root #inside-the-house .inside-floor-photo { background: var(--ih-card) !important; }
html body #root #inside-the-house .inside-swipe-photo { background: var(--ih-card) !important; }

html body #root #inside-the-house .inside-floor-btn { background: rgba(255, 255, 255, 0.06) !important; color: var(--ih-ink) !important; }
html body #root #inside-the-house .inside-floor-btn:not(.is-active) .inside-floor-n,
html body #root #inside-the-house .inside-floor-btn:not(.is-active) .inside-floor-name,
html body #root #inside-the-house .inside-floor-btn:not(.is-active) .inside-floor-short,
html body #root #inside-the-house .inside-floor-btn:not(.is-active) .inside-floor-text { color: var(--ih-ink) !important; }
html body #root #inside-the-house .inside-floor-btn.is-active,
html body #root #inside-the-house .inside-floor-btn.is-active * { background-color: transparent; color: #22264A !important; }
html body #root #inside-the-house .inside-floor-btn.is-active { background: var(--ih-accent) !important; }
html body #root #inside-the-house .inside-floor-btn.is-active small { color: #5A4A52 !important; }
html body #root #inside-the-house .inside-floor-btn:focus-visible { outline-color: var(--ih-accent); }
@media (hover: hover) {
    html body #root #inside-the-house .inside-floor-btn:not(.is-active):hover { background: rgba(255, 255, 255, 0.12) !important; }
}
html body #root #inside-the-house .inside-floor-list { border-color: var(--ih-line) !important; }

html body #root #inside-the-house .inside-house-strip li { background: rgba(255, 255, 255, 0.07) !important; }
html body #root #inside-the-house .inside-swipe-badge { background: rgba(20, 22, 43, 0.82) !important; color: #fff !important; }
html body #root #inside-the-house .inside-swipe-badge span { background: var(--ih-accent) !important; color: #22264A !important; }
html body #root #inside-the-house .inside-swipe-dots span { background: rgba(255, 255, 255, 0.25) !important; }
html body #root #inside-the-house .inside-swipe-dots span.is-active { background: var(--ih-accent) !important; }

@media (max-width: 768px) {
    html body #root #inside-the-house .inside-floor-list { background: transparent !important; }
}

/* ── Tile photo reveal: hover (desktop), focus (keyboard) or tap (touch) ──
   The listing photo wipes up from the bottom; the title stays on top in white. */
html body #root #inside-the-house .inside-tile--reveal { position: relative; overflow: hidden; cursor: pointer; isolation: isolate; }
html body #root #inside-the-house .inside-tile--reveal > :not(.inside-tile-photo) { position: relative; z-index: 2; transition: color 0.3s ease; }
.inside-tile-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(100% 0 0 0);
    transform: scale(1.12);
    transition: clip-path 0.65s cubic-bezier(0.7, 0, 0.2, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
html body #root #inside-the-house .inside-tile--reveal::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(20, 22, 43, 0.72) 0%, rgba(20, 22, 43, 0.2) 26%, rgba(20, 22, 43, 0) 36%, rgba(20, 22, 43, 0) 45%, rgba(20, 22, 43, 0.88) 100%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}
@media (hover: hover) {
    html body #root #inside-the-house .inside-tile--reveal:hover .inside-tile-photo { clip-path: inset(0 0 0 0); transform: scale(1); }
    html body #root #inside-the-house .inside-tile--reveal:hover::after { opacity: 1; }
    html body #root #inside-the-house .inside-tile--reveal:hover h4,
    html body #root #inside-the-house .inside-tile--reveal:hover .inside-num { color: #fff !important; }
    html body #root #inside-the-house .inside-tile--reveal:hover p { color: rgba(255, 255, 255, 0.86) !important; }
    html body #root #inside-the-house .inside-tile--reveal:hover .inside-emoji,
    html body #root #inside-the-house .inside-tile--reveal:hover .inside-num { opacity: 0; }
}
html body #root #inside-the-house .inside-tile--reveal:focus-visible .inside-tile-photo,
html body #root #inside-the-house .inside-tile--reveal.is-revealed .inside-tile-photo { clip-path: inset(0 0 0 0); transform: scale(1); }
html body #root #inside-the-house .inside-tile--reveal:focus-visible::after,
html body #root #inside-the-house .inside-tile--reveal.is-revealed::after { opacity: 1; }
html body #root #inside-the-house .inside-tile--reveal:focus-visible h4,
html body #root #inside-the-house .inside-tile--reveal.is-revealed h4,
html body #root #inside-the-house .inside-tile--reveal:focus-visible .inside-num,
html body #root #inside-the-house .inside-tile--reveal.is-revealed .inside-num { color: #fff !important; }
html body #root #inside-the-house .inside-tile--reveal:focus-visible p,
html body #root #inside-the-house .inside-tile--reveal.is-revealed p { color: rgba(255, 255, 255, 0.86) !important; }
html body #root #inside-the-house .inside-tile--reveal:focus-visible .inside-emoji,
html body #root #inside-the-house .inside-tile--reveal.is-revealed .inside-emoji,
html body #root #inside-the-house .inside-tile--reveal:focus-visible .inside-num,
html body #root #inside-the-house .inside-tile--reveal.is-revealed .inside-num { opacity: 0; }
html body #root #inside-the-house .inside-tile--reveal:focus-visible { outline: 2px solid var(--ih-accent); outline-offset: 3px; }
.inside-emoji, .inside-tile--reveal .inside-num { transition: opacity 0.3s ease; }
@media (prefers-reduced-motion: reduce) {
    .inside-tile-photo { transform: none; transition: opacity 0.2s ease; clip-path: none; opacity: 0; }
    html body #root #inside-the-house .inside-tile--reveal:hover .inside-tile-photo,
    html body #root #inside-the-house .inside-tile--reveal:focus-visible .inside-tile-photo,
    html body #root #inside-the-house .inside-tile--reveal.is-revealed .inside-tile-photo { opacity: 1; }
}

/* ── Whole-house overview (no floor picked) ── */
.inside-whole-mosaic { display: grid !important; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; padding: 0; justify-content: stretch; }
.inside-whole-cell { position: relative; overflow: hidden; min-height: 0; background: var(--ih-card, #373B72); }
.inside-whole-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inside-whole-cell i {
    position: absolute; top: 8px; left: 8px; z-index: 1;
    width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
    background: rgba(20, 22, 43, 0.78); color: #fff; font-style: normal;
    font-family: var(--font-display); font-size: 0.85rem;
}
.inside-whole-mosaic figcaption { position: absolute !important; left: 0; right: 0; bottom: 0; z-index: 2; }
html body #root #inside-the-house .inside-tile--whole .guide-eyebrow { color: var(--ih-mut) !important; }
html body #root #inside-the-house .inside-tile--whole .inside-num { color: var(--ih-accent) !important; font-size: 2.4rem; }
/* The four facts live in the overview panel now; phones keep the pill row */
@media (min-width: 769px) { .inside-house-strip { display: none !important; } }
/* All five panels stay mounted (photos stay ready); only the active one shows */
.inside-floor-panel[hidden] { display: none !important; }
