:root {
    color-scheme: light;
    --bg: #ffffff;
    --fg: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --nav-h: 64px;
}

body {
    margin: 0;
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Helvetica,
        Arial,
        "Apple Color Emoji",
        "Segoe UI Emoji";
    background: var(--bg);
    color: var(--fg);
    padding-top: calc(var(--nav-h) + 8px);
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px 16px;
    align-items: center;
    min-height: var(--nav-h);
    padding-top: 12px;
    padding-bottom: 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.site-nav a {
    color: var(--fg);
    text-decoration: none;
    font-size: 0.95rem;
}

.site-nav a:hover {
    text-decoration: underline;
}

.page-hero-bg {
    width: 100%;
    min-height: 25vh;
    max-height: 32vh;
    margin: 0 0 8px;
    background-color: #e5e7eb;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.property-title-heading {
    margin: 0 0 12px;
    line-height: 0;
}

.property-title-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: #f9fafb;
}

.page-status {
    margin: 0 0 12px;
    min-height: 1.25em;
}

section[id] {
    scroll-margin-top: calc(var(--nav-h) + 12px);
}

main section {
    margin-bottom: 2rem;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
}

.muted {
    color: var(--muted);
}

.footer-links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.footer-links a {
    color: var(--fg);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.booking-rules {
    white-space: pre-wrap;
    line-height: 1.55;
    margin: 0;
}

.pricing-note-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.pricing-note-card {
    margin-bottom: 1rem;
}

.map-card {
    padding: 0;
    overflow: hidden;
}

.map-embed {
    display: block;
    width: 100%;
    height: 200px;
    border: 0;
}

.map-actions {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

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

.card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.gallery-thumb {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-thumb:focus-visible {
    outline: 2px solid var(--fg);
    outline-offset: 2px;
}

.gallery-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f9fafb;
    display: block;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

.gallery-lightbox-inner {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1200px);
    max-height: 92vh;
    margin: 0 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}

.gallery-lightbox-img {
    max-width: min(90vw, 1100px);
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
    width: auto;
    min-width: 44px;
    padding: 8px 12px;
    font-size: 2rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox-prev:disabled,
.gallery-lightbox-next:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.gallery-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: auto;
    min-width: 44px;
    padding: 8px 14px;
    font-size: 1.5rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    cursor: pointer;
}

@media (max-width: 640px) {
    .gallery-lightbox-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        justify-items: center;
        gap: 12px;
    }

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        font-size: 1.5rem;
    }

    .gallery-lightbox-prev {
        order: 2;
    }

    .gallery-lightbox-img {
        order: 1;
        max-height: 70vh;
    }

    .gallery-lightbox-next {
        order: 3;
    }
}

label {
    display: block;
    margin: 10px 0 6px;
}

input,
textarea,
button {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    margin-top: 14px;
    cursor: pointer;
    background: var(--fg);
    color: #fff;
    border: 0;
}

button:active {
    opacity: 0.9;
}

.hidden {
    display: none !important;
}

.local-dev-db-sync {
    margin: 1.25rem 0 1rem;
    padding: 14px 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #f9fafb;
}

.local-dev-db-sync-title {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fg);
}

.local-dev-db-sync .small {
    font-size: 0.85rem;
    margin: 0 0 10px;
    line-height: 1.45;
}

.local-dev-db-sync-log {
    margin: 12px 0 0;
    padding: 10px;
    max-height: 220px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.75rem;
    line-height: 1.4;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.btn-dev-sync {
    width: auto;
    max-width: 100%;
    margin-top: 8px;
    padding: 10px 16px;
    background: #4338ca;
    color: #fff;
    border: 0;
}

.local-dev-db-sync-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn-dev-sync-secondary {
    display: inline-block;
    text-decoration: none;
    background: #111827;
}

.btn-dev-sync:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
