/*
 * Small overrides on top of Bootstrap 5.3 (loaded first via the webjar).
 * Layout, forms, tables, alerts and dark mode all come from Bootstrap.
 */

/* Brand colour (green) for primary buttons, links and focus rings */
:root,
[data-bs-theme="light"] {
    --bs-primary: #0b6e4f;
    --bs-primary-rgb: 11, 110, 79;
    --bs-link-color: #0b6e4f;
    --bs-link-color-rgb: 11, 110, 79;
    --bs-link-hover-color: #08563e;
    --bs-link-hover-color-rgb: 8, 86, 62;
}

[data-bs-theme="dark"] {
    --bs-primary: #3fb68b;
    --bs-primary-rgb: 63, 182, 139;
    --bs-link-color: #5fd0a5;
    --bs-link-color-rgb: 95, 208, 165;
    --bs-link-hover-color: #86e0bd;
    --bs-link-hover-color-rgb: 134, 224, 189;
}

.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: #08563e;
    --bs-btn-hover-border-color: #08563e;
    --bs-btn-active-bg: #064832;
    --bs-btn-active-border-color: #064832;
    --bs-btn-disabled-bg: var(--bs-primary);
    --bs-btn-disabled-border-color: var(--bs-primary);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-active-bg: var(--bs-primary);
    --bs-btn-active-border-color: var(--bs-primary);
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(var(--bs-primary-rgb), .6);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}

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

/* Section headings inside the rental form */
.form-section-title {
    color: var(--bs-primary);
}

/* Rental listings: grid cards and list rows */
.listing-card {
    transition: box-shadow .15s ease, transform .15s ease;
}
.listing-card:hover,
.listing-card:focus-within {
    box-shadow: var(--bs-box-shadow) !important;
    transform: translateY(-2px);
}
.listing-card img {
    transition: transform .3s ease;
}
.listing-card:hover img {
    transform: scale(1.03);
}
/* Lets the title's stretched-link make the whole table row clickable. */
.listing-row {
    transform: rotate(0);
    cursor: pointer;
}

/* Rental detail: photo thumbnails under the carousel */
.photo-thumb img {
    opacity: .7;
    transition: opacity .15s ease;
}
.photo-thumb:hover img,
.photo-thumb:focus img {
    opacity: 1;
}

/* Sticky footer: the page fills the window and the footer sits at the bottom, even on short pages. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
body > main {
    flex: 1 0 auto;
    width: 100%; /* keeps .container full-width inside the flex column */
}
.site-footer {
    flex-shrink: 0;
}
/* The sign-in style pages have no navbar; their footer needs no extra gap. */
body.bg-body-tertiary > .site-footer {
    margin-top: 0 !important;
    background-color: var(--bs-body-bg) !important;
}

/* Rental detail: click a photo to open it full screen */
.photo-open {
    cursor: zoom-in;
}
.photo-open-hint {
    position: absolute;
    top: auto !important;
    left: auto !important;
    right: .75rem;
    bottom: .75rem;
    width: auto !important;
    height: auto !important;
    opacity: 0;
    transition: opacity .15s ease;
}
.photo-open:hover .photo-open-hint,
.photo-open:focus-visible .photo-open-hint {
    opacity: 1;
}

/* A demo account's listing (listing-detail.html): a "FAKE" banner across the photos' top-left corner. It sits above
   the slides and arrows but lets every click through. */
.demo-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 9rem;
    height: 9rem;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
}
.demo-ribbon > span {
    position: absolute;
    top: 1.9rem;
    left: -3.1rem;
    width: 13rem;
    padding: .35rem 0;
    transform: rotate(-45deg);
    background: var(--bs-danger);
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: .2em;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
@media (max-width: 575.98px) {
    .demo-ribbon { width: 7rem; height: 7rem; }
    .demo-ribbon > span { top: 1.4rem; left: -2.6rem; width: 10rem; font-size: .8rem; padding: .25rem 0; }
}

/* Full-screen photo viewer */
.photo-viewer .modal-body {
    height: calc(100vh - 3.25rem); /* window height minus the header */
    overflow: hidden;
}
.photo-viewer-stage {
    cursor: zoom-out;
}
.photo-viewer-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    user-select: none;
}
.photo-viewer .carousel-control-prev,
.photo-viewer .carousel-control-next {
    width: 8%;
    min-width: 3rem;
}

/* Rental detail: the video tile at the end of the thumbnail strip */
.video-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #fff;
    background: rgba(0, 0, 0, .45);
    transition: background-color .15s ease;
}
.video-thumb:hover .video-thumb-overlay,
.video-thumb:focus-visible .video-thumb-overlay {
    background: rgba(0, 0, 0, .25);
}
/* On the video slide, keep the carousel arrows and dots clear of the player's own controls bar. */
#listingPhotos.on-video .carousel-control-prev,
#listingPhotos.on-video .carousel-control-next {
    bottom: 3.5rem;
}
#listingPhotos.on-video .carousel-indicators {
    display: none;
}

/* Full-screen viewer: the video tour slide */
.photo-viewer-video {
    max-width: 100%;
    max-height: 100%;
    background: #000;
}
.photo-viewer .carousel.on-video .carousel-control-prev,
.photo-viewer .carousel.on-video .carousel-control-next {
    bottom: 4rem; /* leave the player's controls bar clickable */
}

/* Theme button: tick the active choice in the menu */
.theme-toggle .dropdown-item.active::after {
    content: "\2713";
    margin-left: auto;
}
.theme-toggle .dropdown-item.active {
    color: var(--bs-dropdown-link-active-color);
}

/* The round heart and compare buttons on cards: a see-through background (tune the opacity here), a little
   stronger on hover, and solid-ish when on (saved / picked to compare). Works in light and dark themes. */
:root {
    --icon-btn-bg-opacity: .55;
    --icon-btn-hover-bg-opacity: .85;
    --icon-btn-on-bg-opacity: .85;
}
.btn.favourite-btn-round,
.btn.compare-btn-round {
    --bs-btn-bg: rgba(var(--bs-body-bg-rgb), var(--icon-btn-bg-opacity));
    --bs-btn-border-color: rgba(var(--bs-body-color-rgb), .08);
    --bs-btn-hover-bg: rgba(var(--bs-body-bg-rgb), var(--icon-btn-hover-bg-opacity));
    --bs-btn-hover-border-color: rgba(var(--bs-body-color-rgb), .12);
    --bs-btn-active-bg: rgba(var(--bs-body-bg-rgb), var(--icon-btn-hover-bg-opacity));
    --bs-btn-active-border-color: rgba(var(--bs-body-color-rgb), .12);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

/* Favourites: heart buttons */
.favourite-form {
    position: relative;
    z-index: 2; /* above a card's stretched link, so the heart is clickable */
}
.favourite-btn .icon-on,
.favourite-btn.is-saved .icon-off {
    display: none;
}
.favourite-btn.is-saved .icon-on {
    display: inline-block;
}
.favourite-btn-round {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color);
}
.favourite-btn-round:hover,
.favourite-btn.is-saved {
    color: var(--bs-danger);
}
.btn-outline-danger.favourite-btn.is-saved {
    color: #fff;
    background-color: var(--bs-danger);
}
.btn.favourite-btn-round.is-saved {
    /* the background stays light (or dark) so the red heart stands out on any photo */
    --bs-btn-bg: rgba(var(--bs-body-bg-rgb), var(--icon-btn-on-bg-opacity));
    --bs-btn-hover-bg: rgba(var(--bs-body-bg-rgb), 1);
    --bs-btn-active-bg: rgba(var(--bs-body-bg-rgb), 1);
    --bs-btn-color: var(--bs-danger);
    --bs-btn-hover-color: var(--bs-danger);
    --bs-btn-active-color: var(--bs-danger);
}

/* Listing filters: the "Filters" button beside Search (fragments.html filterToggle, js/filter-toggle.js) */
.filters-hidden .filter-panel {
    display: none !important;
}
.filters-hidden .filter-panel-gap {
    margin-bottom: 0 !important; /* nothing under the search bar: no gap at the bottom of the card */
}
.filter-toggle[aria-expanded="true"] {
    color: var(--bs-btn-active-color);
    background-color: var(--bs-btn-active-bg);
    border-color: var(--bs-btn-active-border-color);
}

/* Compare: buttons on cards, list rows and listing pages (fragments.html compareButton, js/compare.js) */
.compare-btn {
    position: relative;
    z-index: 2; /* above a card's stretched link, like the heart */
}
.compare-btn-round {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: top;
    margin-left: .25rem;
    color: var(--bs-secondary-color);
}
.compare-btn-round:hover,
.compare-btn.is-comparing {
    color: var(--bs-primary);
}
.btn-outline-secondary.compare-btn.is-comparing {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn.compare-btn-round.is-comparing {
    --bs-btn-bg: rgba(var(--bs-primary-rgb), var(--icon-btn-on-bg-opacity));
    --bs-btn-hover-bg: rgba(var(--bs-primary-rgb), 1);
    --bs-btn-active-bg: rgba(var(--bs-primary-rgb), 1);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    color: #fff;
}

/* Compare: the tray of picked listings at the bottom of the page */
.compare-tray {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background-color: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
}
.compare-tray.is-collapsed {
    left: auto;
    right: 1rem;
    bottom: 1rem;
    background: transparent;
    border: 0;
    box-shadow: none !important;
}
/* Bottom padding for the tray: set by js/compare.js to the tray's height. */
.compare-tray-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "head items actions"
        ".    note  note";
    align-items: center;
    column-gap: 1rem;
    row-gap: .25rem;
}
.compare-tray-head { grid-area: head; }
.compare-tray-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.compare-tray-message { grid-area: note; }
/* One equal slot per pick (and per free place), so four long titles still fit: each is cut short with "…". */
.compare-tray-items {
    grid-area: items;
    display: grid;
    grid-template-columns: repeat(var(--compare-slots, 4), minmax(0, 1fr));
    gap: .5rem;
    min-width: 0;
}
.compare-tray-item,
.compare-tray-slot {
    min-width: 0;
    height: 2.75rem;
}
.compare-tray-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .5rem;
}
.compare-tray-slot {
    border: 1px dashed var(--bs-border-color);
}
.compare-tray-item img,
.compare-tray-nophoto {
    width: 40px;
    height: 30px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.compare-tray-title {
    flex: 1 1 auto;
    min-width: 0;
}
.compare-tray-item .btn-close {
    flex-shrink: 0;
}
.btn-close-sm {
    width: .6em;
    height: .6em;
    background-size: .6em;
}
/* Tablets: the buttons go under the picks. */
@media (max-width: 991.98px) {
    .compare-tray-inner {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "head items"
            "note actions";
    }
    .compare-tray-actions { justify-self: end; }
}
/* Phones: heading and buttons on one line, the picks below it, scrolling sideways (no free places shown). */
@media (max-width: 575.98px) {
    .compare-tray-inner {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "head  actions"
            "items items"
            "note  note";
    }
    .compare-tray-items {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(9.5rem, 70%);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: .25rem;
    }
    .compare-tray-item { scroll-snap-align: start; }
    .compare-tray-slot { display: none; }
    .compare-tray-head { min-width: 0; }
    .compare-tray-head > div {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .compare-tray-actions { gap: .25rem; }
}

/* Compare: the page (compare.html) */
.compare-table th[scope="row"],
.compare-label-col {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 9rem;
    background-color: var(--bs-tertiary-bg);
    font-weight: 500;
    color: var(--bs-secondary-color);
}
.compare-item {
    min-width: 13rem;
    vertical-align: top;
}
.compare-cols-1 .compare-item,
.compare-cols-2 .compare-item {
    width: 40%;
}
.compare-cols-3 .compare-item {
    width: 28%;
}
.compare-cols-4 .compare-item {
    width: 21%;
}
.compare-photo-control {
    width: 2.25rem;
    opacity: .85;
}
.compare-photo-control .carousel-control-prev-icon,
.compare-photo-control .carousel-control-next-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, .45);
    background-size: 60%;
}
.compare-photos .carousel:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}
.compare-item-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.compare-price-row td {
    font-size: 1.05rem;
}
.compare-table tr.compare-differs td {
    background-color: rgba(var(--bs-warning-rgb), .08);
}
.differences-only .compare-table tr.compare-same {
    display: none;
}

/* Account page */
.account-avatar {
    width: 64px;
    height: 64px;
    color: #fff;
    background-color: var(--bs-primary);
}
.account-function,
.account-stat {
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.account-function:hover,
.account-function:focus-visible {
    box-shadow: var(--bs-box-shadow) !important;
    transform: translateY(-2px);
}
.account-stat:hover,
.account-stat:focus-visible {
    background-color: var(--bs-tertiary-bg);
}

/* Company logo boxes (account page and company details page). */
.company-logo {
    width: 96px;
    height: 96px;
    padding: .25rem;
}
.company-logo-lg {
    width: 128px;
    height: 128px;
}
.company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Favourites: a guest's heart is a sign-in link that looks like the button */
.favourite-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* "Post a listing" steps: Select Category, Fill in the listing, Completed */
.post-step-number {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--bs-border-color);
    color: var(--bs-secondary-color);
    flex-shrink: 0;
}
.post-step.is-current .post-step-number {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #fff;
}
.post-step.is-done .post-step-number {
    border-color: var(--bs-success);
    color: var(--bs-success);
}
.post-step + .post-step::before {
    content: "";
    display: inline-block;
    width: 2rem;
    border-top: 2px solid var(--bs-border-color);
    margin-right: .5rem;
}
@media (max-width: 575.98px) {
    .post-step + .post-step::before { display: none; }
}

/*
 * Create account steps (fragments :: registerSteps): three equal columns, each number above its label, with a line
 * from one circle to the next. Unlike .post-steps it never wraps, so it fits the 440px sign-up card and phones.
 */
.register-steps-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.register-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    min-width: 0;
    text-align: center;
}
.register-step .post-step-number {
    position: relative;
    z-index: 1;
    border: 2px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-secondary-color);
}
.register-step.is-current .post-step-number {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #fff;
}
.register-step.is-done .post-step-number {
    border-color: var(--bs-success);
    color: var(--bs-success);
}
/* The line from the previous circle to this one: centres are one column apart; leave the circles (2rem) and a gap. */
.register-step + .register-step::before {
    content: "";
    position: absolute;
    top: 1rem;
    right: calc(50% + 1.25rem);
    width: calc(100% - 2.5rem);
    border-top: 2px solid var(--bs-border-color);
}
.register-step.is-done + .register-step::before {
    border-top-color: var(--bs-success);
}
.register-step-label {
    font-size: .875rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

/* Step 1: a category is one big clickable card */
.category-card {
    transition: border-color .15s, box-shadow .15s;
}
.category-card:hover,
.category-card:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 .25rem .75rem rgba(var(--bs-primary-rgb), .15);
}
.category-icon {
    width: 3rem;
    height: 3rem;
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

/* Header logo (price.png, transparent background) */
.navbar-logo {
    height: 36px;
    width: auto;
    display: block;
}

/* Photo picker on the listing forms (js/photo-order.js): drag to reorder, the first is the cover. */
.photo-card { cursor: grab; border-radius: .375rem; outline-offset: 2px; }
.photo-card:active { cursor: grabbing; }
.photo-card.photo-cover .img-thumbnail { border: 2px solid var(--bs-primary); }
.photo-card.photo-drop-target { outline: 2px dashed var(--bs-primary); }
.photo-tools .btn { font-size: .75rem; }

/* ===================== Main page (main.html) ===================== */
.home-section {
    padding-top: 3.5rem;
}

/* Hero: animated pixel-art Kuala Lumpur (static/js/home-hero.js) under a dark green wash, so the white text always reads. */
.home-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #06402e 0%, #0b6e4f 55%, #128a64 100%);
    margin-top: -1px;
}
.home-hero-canvas {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}
.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 30, 22, .92) 0%, rgba(4, 30, 22, .66) 45%, rgba(4, 30, 22, .12) 100%),
        linear-gradient(0deg, rgba(4, 30, 22, .55) 0%, rgba(4, 30, 22, 0) 40%);
}
.home-hero > .container {
    z-index: 1;
}
.home-hero .container {
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
}
.home-eyebrow {
    display: inline-block;
    max-width: 100%;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #86e0bd;
}
.home-hero-lead {
    color: rgba(255, 255, 255, .85);
    max-width: 36rem;
}
.home-hero-muted {
    color: rgba(255, 255, 255, .7);
}

/* Search: category tabs on top of one white bar with the words and the button. */
.home-search-wrap {
    max-width: 44rem;
}
.home-search-tabs {
    display: flex;
    gap: .25rem;
    overflow-x: auto;           /* narrow screens: the tabs scroll sideways rather than wrap */
    scrollbar-width: none;
}
.home-search-tabs::-webkit-scrollbar {
    display: none;
}
.home-search-tab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: .625rem 1.125rem;
    border-radius: .75rem .75rem 0 0;
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .12);
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, color .15s ease;
}
.home-search-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, .22);
}
.btn-check:checked + .home-search-tab,
.btn-check:checked + .home-search-tab:hover {
    color: #fff;
    background: var(--bs-blue, #0d6efd);   /* the picked tab: blue */
    font-weight: 600;
}
.btn-check:focus-visible + .home-search-tab {
    outline: 2px solid #86e0bd;
    outline-offset: -2px;
}
.home-search {
    display: flex;
    gap: .25rem;
    padding: .375rem;
    background: var(--bs-body-bg);
    border-radius: 0 1rem 1rem 1rem;   /* square top-left corner: the tabs sit on it */
}
.home-search .form-control {
    border: 0;
    background-color: transparent;
    box-shadow: none !important;
    min-height: 3rem;
}
.home-search-input {
    flex: 1 1 auto;
    min-width: 0;
}
.home-search-btn {
    border-radius: .75rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    /* Keeps its width and one line: Chinese (and Tamil) text may otherwise break between characters and wrap
       inside the button when the bar is tight; the words box gives way instead. */
    flex: 0 0 auto;
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    .home-search {
        flex-direction: column;
    }
    /* Phones: the four tabs share the width, icon above the word (still scroll sideways if a language's words
       are too long). */
    .home-search-tabs {
        gap: .125rem;
    }
    .home-search-tab {
        flex: 1 0 auto;
        flex-direction: column;
        justify-content: center;
        gap: .25rem;
        padding: .5rem .5rem;
        font-size: .8125rem;
    }
    .home-search-btn {
        min-height: 3rem;
    }
}

.home-chip {
    color: #fff;
    text-decoration: none;
    padding: .25rem .75rem;
    border-radius: 50rem;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    transition: background-color .15s ease;
}
.home-chip:hover,
.home-chip:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .25);
}

/* Category cards: photo on top, round icon sitting on the photo's edge. */
.home-cat {
    overflow: hidden;
    border-radius: 1rem;
    transition: box-shadow .2s ease, transform .2s ease;
}
.home-cat:hover,
.home-cat:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .12) !important;
}
.home-cat-photo {
    aspect-ratio: 10 / 7;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), .15), rgba(var(--bs-primary-rgb), .35));
}
.home-cat-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.home-cat:hover .home-cat-photo img {
    transform: scale(1.05);
}
.home-cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-top: -1.625rem;
    border-radius: 50%;
    color: #fff;
    background: var(--bs-primary);
    box-shadow: 0 0 0 4px var(--bs-body-bg), 0 .25rem .75rem rgba(0, 0, 0, .15);
    position: relative;
}
/* The small rent / sale links sit above the card's stretched link so they stay clickable. */
.home-cat-links {
    z-index: 2;
}
.home-pill {
    font-weight: 500;
    text-decoration: none;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .1);
    padding: .45em .9em;
}
.home-pill:hover,
.home-pill:focus-visible {
    color: #fff;
    background: var(--bs-primary);
}

/* Features */
.home-feature {
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color-translucent);
}
.home-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .12);
}

/* How it works */
.home-how {
    background: rgba(var(--bs-primary-rgb), .07);
    border: 1px solid rgba(var(--bs-primary-rgb), .15);
}
.home-step {
    padding: 1.25rem;
    border-radius: .75rem;
    background: var(--bs-body-bg);
    box-shadow: var(--bs-box-shadow-sm);
}
.home-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    background: var(--bs-primary);
}

/* Join band for guests */
.home-join {
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .15), transparent 40%),
        linear-gradient(135deg, #06402e, #0b6e4f);
}

/* Account details (signed in) */
.home-account > summary {
    cursor: pointer;
    list-style-position: inside;
}

@media (prefers-reduced-motion: reduce) {
    .home-cat,
    .home-cat-photo img {
        transition: none;
    }
    .home-cat:hover,
    .home-cat:focus-within {
        transform: none;
    }
    .home-cat:hover .home-cat-photo img {
        transform: none;
    }
}

/* ===================== Terms of Service and Privacy Policy ===================== */
.legal-page {
    max-width: 1100px;
}
.legal-toc {
    position: sticky;
    top: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(var(--bs-primary-rgb), .25);
}
.legal-toc li + li {
    margin-top: .4rem;
}
.legal-toc a {
    color: var(--bs-secondary-color);
    text-decoration: none;
}
.legal-toc a:hover,
.legal-toc a:focus-visible {
    color: var(--bs-primary);
}
.legal-body {
    max-width: 46rem;
    line-height: 1.7;
}
.legal-body section {
    scroll-margin-top: 1.5rem;
}
.legal-body section + section {
    margin-top: 2.25rem;
}
.legal-body h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .75rem;
}
.legal-body li + li {
    margin-top: .35rem;
}
.legal-dl dt {
    font-weight: 600;
    margin-top: .9rem;
}
.legal-dl dd {
    margin-bottom: 0;
    color: var(--bs-secondary-color);
}
.legal-contact address {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-style: normal;
}
.footer-legal a {
    color: var(--bs-secondary-color);
    text-decoration: none;
}
.footer-legal a:hover,
.footer-legal a:focus-visible {
    color: var(--bs-primary);
}

/* Account → Support requests: keep line breaks in messages. */
.support-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ----- Rows that scroll sideways, cards snapping into place, with "Load more" at the end (js/scroll-rows.js): the
   Favourites page and "All listings by ...". Phones show one card and a peek of the next; tablets two and a bit;
   desktops four, with the ‹ › buttons. */
.scroll-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 2px;
    padding: 2px 2px 0.75rem;   /* room for the card shadows and the scrollbar */
    scrollbar-width: thin;
}
.scroll-row:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: var(--bs-border-radius);
}
.scroll-row > .scroll-row-item {
    flex: 0 0 auto;
    width: 78%;
    scroll-snap-align: start;
}
@media (min-width: 576px) {
    .scroll-row > .scroll-row-item { width: calc((100% - 1rem) / 2.2); }
}
@media (min-width: 992px) {
    .scroll-row > .scroll-row-item { width: calc((100% - 3rem) / 4); }
}
.scroll-row > .scroll-row-more {
    flex: 0 0 auto;
    width: 10rem;
    display: flex;
    flex-direction: column;   /* the button, and under it the error message when loading failed */
    scroll-snap-align: end;
}
.scroll-row-load-more {
    width: 100%;
    flex: 1 1 auto;
    min-height: 12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-style: dashed;
}

/* Date of birth calendar (fragments :: birthDateSelects, js/birth-calendar.js): seven columns, Monday first. */
.birth-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}
.birth-calendar-weekday {
    padding: .25rem 0;
}
.birth-calendar-day {
    padding: .35rem 0;
    min-height: 2.25rem;
}
.birth-calendar-day:disabled {
    opacity: .3;
}
.birth-calendar-nav {
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
}
.birth-date.needs-day .birth-calendar {
    border-color: var(--bs-form-invalid-border-color) !important;
}

/* "Continue with Google" (fragments :: googleSignIn): always blue with white text, in light and dark themes alike. */
.btn-google,
[data-bs-theme="dark"] .btn-google {
    --bs-btn-color: #fff;
    --bs-btn-bg: #1a73e8;
    --bs-btn-border-color: #1a73e8;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #1765cc;
    --bs-btn-hover-border-color: #1765cc;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #185abc;
    --bs-btn-active-border-color: #185abc;
    --bs-btn-focus-shadow-rgb: 26, 115, 232;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #1a73e8;
    --bs-btn-disabled-border-color: #1a73e8;
    font-weight: 500;
}

/* Header: the account menu as a round icon (fragments :: nav). The person icon shows only without a profile photo,
   including once a photo that failed to load has been removed. */
.account-menu-button {
    width: 34px;
    height: 34px;
    overflow: hidden;
}
.account-menu-button .nav-avatar + .account-menu-icon {
    display: none;
}

/* Header: Favourites as a heart, with the number saved on its top-right corner (fragments :: nav). */
.favourites-link .favourites-icon svg,
.notifications-link .notifications-icon svg {
    display: block;
}
/* The bell (notifications), next to the heart: same corner number. */
.notifications-link:hover .notifications-icon svg,
.notifications-link.active .notifications-icon svg {
    color: var(--bs-primary);
}
.favourites-link:hover .favourites-icon svg,
.favourites-link.active .favourites-icon svg {
    color: var(--bs-danger);
}
.favourite-total,
.notification-total {
    position: absolute;
    top: -.45rem;
    right: -.7rem;
    min-width: 1.1rem;
    padding: .2em .4em;
    font-size: .65rem;
    line-height: 1;
    border: 2px solid var(--bs-tertiary-bg);
}

/* Notifications page (NotificationsController) */
.notification-item.unread { background: rgba(var(--bs-primary-rgb), .04); }
.notification-item .notification-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--bs-primary);
    flex-shrink: 0;
    margin-top: .45rem;
}
.notification-item:not(.unread) .notification-dot { visibility: hidden; }
.notification-preview { overflow-wrap: anywhere; }
.notification-body { white-space: pre-line; overflow-wrap: anywhere; }
/* The pop-up in the top-right corner when a notification arrives (js/notification-popup.js). */
.notification-popups { z-index: 1090; }
.notification-popup { max-width: min(360px, calc(100vw - 2rem)); }
.notification-popup-title, .notification-popup-preview { overflow-wrap: anywhere; }
.notification-popup-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* The map on a listing's page (js/listing-map.js, MapLibre): hidden until it can be drawn. */
.listing-map {
    height: 360px;
    width: 100%;
    overflow: hidden;
}

/* My ads (my-ads.html): a small per-day chart, ad clicks and views side by side on one axis. Colours checked for
   colour-blind separation and contrast on the light and dark surfaces (dataviz validator). */
.ad-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 140px;
    padding-bottom: 1.25rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--bs-border-color);
}
.ad-chart-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    min-width: 28px;
    height: 100%;
    position: relative;
}
.ad-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100%;
}
.ad-bar {
    display: block;
    width: 10px;
    min-height: 1px;
    border-radius: 4px 4px 0 0;
}
.ad-bar-clicks, .ad-key-clicks { background: #1a73e8; }
.ad-bar-views, .ad-key-views { background: #e37400; }
[data-bs-theme="dark"] .ad-bar-clicks, [data-bs-theme="dark"] .ad-key-clicks { background: #4a8ae8; }
[data-bs-theme="dark"] .ad-bar-views, [data-bs-theme="dark"] .ad-key-views { background: #d9822b; }
.ad-chart-date {
    position: absolute;
    bottom: -1.25rem;
    font-size: .7rem;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}
.ad-key {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    vertical-align: middle;
}

/* Brand sponsorships (fragments :: sponsorBanner, My sponsorships): the page's sponsors, quiet cards with their logos,
   side by side above the content (several can share a spot). */
.sponsor-rail { display: flex; flex-wrap: wrap; gap: .5rem; }
.sponsor-banner { border: 1px solid var(--bs-border-color); border-radius: .75rem; padding: .625rem .875rem;
    background: var(--bs-tertiary-bg); flex: 1 1 340px; max-width: 560px; min-width: 0; }
.sponsor-banner a:hover .fw-semibold { text-decoration: underline; }
.sponsor-banner-logo { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }   /* logos are square */
/* On the site's banners the logo is the point: bigger than in lists (My sponsorships). */
.sponsor-banner .sponsor-banner-logo { width: 140px; height: 140px; border-radius: .5rem; }
@media (max-width: 575.98px) {
    .sponsor-banner .sponsor-banner-logo { width: 112px; height: 112px; }
}

/* Wide screens: the sponsors sit outside the page, in the empty margin to the right of the content (Bootstrap's
   .container is at most 1320px wide, so from about 1700px the margin holds a 150px column), one card under another,
   each with its logo on top. The page they're on is their positioned parent; narrower screens keep the row above. */
@media (min-width: 1700px) {
    .container:has(> .sponsor-rail), .container:has(> .sponsor-banner-slot) { position: relative; }
    .sponsor-banner-slot { padding: 0 !important; }
    .sponsor-rail { position: absolute; top: 1.5rem; left: calc(100% + 1rem); width: 164px; margin: 0;
        flex-direction: column; flex-wrap: nowrap; gap: .75rem; z-index: 1; }
    .sponsor-banner { flex: 0 0 auto; max-width: none; padding: .5rem; text-align: center; }
    .sponsor-banner > a { flex-direction: column; gap: .5rem !important; }
    .sponsor-banner .sponsor-banner-logo { width: 146px; height: 146px; }
    .sponsor-banner .text-truncate { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
}
/* Wider still (the margin is about 250px from 1820px): a wider column, a bigger logo. */
@media (min-width: 1820px) {
    .sponsor-rail { width: 214px; }
    .sponsor-banner .sponsor-banner-logo { width: 196px; height: 196px; }
}

/* Wide banners (fragments :: bannerAd, banner.html): one 6:1 image across the page, rounded, with a small "Ad" label
   in its corner. The image keeps its shape at every width. */
.banner-ad { position: relative; border-radius: .75rem; overflow: hidden; }
.banner-ad-img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 1; object-fit: cover; border-radius: .75rem;
    background: var(--bs-tertiary-bg); }
.banner-ad a:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 2px; }
.banner-ad-label { position: absolute; top: .4rem; right: .5rem; font-size: .7rem; line-height: 1; padding: .2rem .4rem;
    border-radius: .3rem; background: rgba(0, 0, 0, .55); color: #fff; pointer-events: none; }
/* The empty shape on the "Buy a banner" page. */
.banner-ad-sample { aspect-ratio: 6 / 1; display: flex; align-items: center; justify-content: center;
    border: 2px dashed var(--bs-border-color); background: var(--bs-tertiary-bg); }
.banner-ad-sample-text { color: var(--bs-secondary-color); font-weight: 600; }
/* My sponsorships: a banner's preview is wide. */
.my-sponsorship .banner-ad-img { width: 300px; max-width: 100%; }

/* ===== The daily lucky draw (games.html, js/games.js) ===== */
.games-tabs .nav-link { font-weight: 600; }
/* Spinner: the wheel turns under a fixed pointer at the top. */
.spinner-stage { position: relative; width: min(360px, 86vw); aspect-ratio: 1; }
.spinner-wheel { width: 100%; height: 100%; display: block; transform-origin: 50% 50%;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .25)); will-change: transform; }
.spinner-label { fill: #fff; font-size: 17px; font-weight: 800; paint-order: stroke; stroke: rgba(0, 0, 0, .25); stroke-width: 2px; }
.spinner-rim { fill: none; stroke: #fff2c2; stroke-width: 5; }
.spinner-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 2; width: 0; height: 0;
    border-left: 16px solid transparent; border-right: 16px solid transparent; border-top: 30px solid var(--bs-body-color);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.spinner-hub { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 22%; aspect-ratio: 1;
    border-radius: 50%; display: grid; place-items: center; font-size: clamp(1.2rem, 5vw, 2rem);
    background: #fff7e0; box-shadow: 0 0 0 5px #f4a300, 0 4px 10px rgba(0, 0, 0, .3); }
/* Angpao: red packets that flip over to show what's inside. */
.angpao-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 520px; margin: 0 auto; }
.angpao { border: 0; padding: 0; background: none; aspect-ratio: 3 / 4; perspective: 800px; cursor: pointer; }
.angpao:disabled { cursor: default; }
.angpao-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .7s ease; transform-style: preserve-3d; }
.angpao.is-open .angpao-inner { transform: rotateY(180deg); }
.angpao-front, .angpao-back { position: absolute; inset: 0; border-radius: .9rem; backface-visibility: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; }
.angpao-front { background: linear-gradient(160deg, #e5383b, #a4161a); box-shadow: 0 6px 14px rgba(164, 22, 26, .35); }
.angpao-front::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 28%;
    background: rgba(0, 0, 0, .12); border-radius: .9rem .9rem 50% 50% / .9rem .9rem 30% 30%; }
.angpao-seal { width: 46%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; z-index: 1;
    background: #f4c430; color: #a4161a; font-weight: 800; font-size: clamp(1.1rem, 4.5vw, 1.8rem); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.angpao:not(:disabled):hover .angpao-front { transform: translateY(-4px); transition: transform .15s ease; }
.angpao:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 4px; border-radius: .9rem; }
.angpao-back { transform: rotateY(180deg); background: #fff7e0; border: 3px solid #e5383b; color: #a4161a; }
.angpao-amount { font-size: clamp(1.8rem, 8vw, 3rem); font-weight: 800; line-height: 1; }
.angpao-unit { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.angpao.is-other { opacity: .55; }
.angpao.is-picked .angpao-back { box-shadow: 0 0 0 4px #f4c430, 0 8px 20px rgba(244, 163, 0, .45); }
/* Slot machine: three reels in a window; each strip slides up and stops on a symbol under the pay line. */
.slot-machine { width: min(400px, 90vw); padding: 1rem; border-radius: 1.25rem;
    background: linear-gradient(180deg, #c1121f, #7a0a12); box-shadow: 0 8px 20px rgba(122, 10, 18, .35), inset 0 0 0 4px #f4c430; }
.slot-window { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.slot-reel { height: 6rem; overflow: hidden; border-radius: .75rem; background: #fffaf0;
    box-shadow: inset 0 10px 12px -8px rgba(0, 0, 0, .35), inset 0 -10px 12px -8px rgba(0, 0, 0, .35); }
.slot-strip { will-change: transform; }
.slot-symbol { height: 6rem; display: grid; place-items: center; font-size: 3.2rem; line-height: 1; user-select: none; }
.slot-line { position: absolute; left: -.4rem; right: -.4rem; top: 50%; height: 3px; transform: translateY(-50%);
    background: rgba(244, 196, 48, .85); pointer-events: none; }
.slot-paytable { max-width: 260px; }
.slot-pay-symbols { letter-spacing: .15em; }
/* The celebration (js/games.js): confetti on a canvas over the whole screen (clicks go through it), and a card. */
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2100; }
.celebrate { position: fixed; inset: 0; z-index: 2090; display: grid; place-items: center; padding: 1rem;
    background: rgba(0, 0, 0, .35); backdrop-filter: blur(2px); animation: celebrate-in .25s ease; }
.celebrate.is-leaving { animation: celebrate-out .25s ease forwards; }
.celebrate-card { min-width: min(320px, 90vw); padding: 1.75rem 2rem 1.5rem; border-radius: 1.5rem; text-align: center;
    background: var(--bs-body-bg); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); animation: celebrate-pop .55s cubic-bezier(.2, 1.4, .4, 1); }
.celebrate-emoji { font-size: 3.5rem; line-height: 1; animation: celebrate-bounce 1s ease .3s 2; }
.celebrate-title { font-size: 1.6rem; font-weight: 800; margin-top: .5rem; }
.celebrate-amount { font-size: 4.5rem; font-weight: 900; line-height: 1.05; margin-top: .25rem;
    background: linear-gradient(135deg, #e5383b, #f4a300); -webkit-background-clip: text; background-clip: text; color: transparent; }
.celebrate-plus { font-size: .6em; vertical-align: .25em; margin-right: .05em; }
.celebrate-unit { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--bs-secondary-color); margin-bottom: 1.25rem; }
.celebrate.is-jackpot .celebrate-card { box-shadow: 0 0 0 4px #f4c430, 0 0 60px rgba(244, 196, 48, .7), 0 20px 50px rgba(0, 0, 0, .35); }
.celebrate.is-jackpot .celebrate-title { color: #d4a017; letter-spacing: .04em; }
.celebrate.is-still, .celebrate.is-still .celebrate-card, .celebrate.is-still .celebrate-emoji { animation: none; }
@keyframes celebrate-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes celebrate-out { to { opacity: 0; } }
@keyframes celebrate-pop { 0% { transform: scale(.4) rotate(-6deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes celebrate-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px) rotate(-8deg); } 70% { transform: translateY(0) rotate(6deg); } }
/* Today's result: a little pop when it's just been won. */
.game-today-new { animation: game-pop .5s ease; }
@keyframes game-pop { 0% { transform: scale(.94); opacity: 0; } 70% { transform: scale(1.02); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .angpao-inner, .game-today-new { transition: none; animation: none; }
}

/* The lucky draw invitation on the main page (main.html #luckyInvite). */
.lucky-invite .modal-content {
    border: 0;
    border-radius: 1.25rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(220, 53, 69, .10), var(--bs-body-bg) 55%);
}
.lucky-invite-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: .75rem;
    display: inline-block;
    animation: lucky-invite-bob 1.6s ease-in-out infinite;
}
@keyframes lucky-invite-bob {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-6px) rotate(-8deg); }
    75% { transform: translateY(-6px) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
    .lucky-invite-icon { animation: none; }
}

/* ===== Credits help (/help/credits) ===== */
.credits-help-cost {
    min-width: 6.5rem;
    white-space: nowrap;
}
.credits-help-step {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: var(--bs-primary);
    color: #fff;
}

/* ===== Site header =====
   Its own layer above the page, so the account and other dropdowns open over sticky parts of a page (Bootstrap's
   sticky-*-top is z-index 1020, e.g. the price card on a listing page); dialogs (1055) and popups stay above it. */
.site-navbar {
    position: relative;
    z-index: 1030;
}

/* Sponsor a spot (sponsor.html): what a sponsor looks like on the page, like Buy a banner's sample */
.sponsor-sample { position: relative; display: flex; align-items: center; gap: 1rem; padding: .875rem 1rem;
    border: 2px dashed var(--bs-border-color); border-radius: .75rem; background: var(--bs-tertiary-bg); }
.sponsor-sample-logo { flex: 0 0 auto; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center;
    text-align: center; border: 2px dashed var(--bs-border-color); border-radius: .5rem; background: var(--bs-body-bg);
    color: var(--bs-secondary-color); font-size: .8rem; font-weight: 600; }

/* A taken listing in a list (fragments :: statusLabel): reserved, rented or sold. A big sticker across the middle of
   its picture, turned 45°, and the picture in grey. Clicks go through it to the card's link. */
.listing-status-label { position: absolute; top: 50%; left: 50%; z-index: 2; pointer-events: none;
    transform: translate(-50%, -50%) rotate(-45deg); padding: .35em 1.1em; border: 3px solid currentColor;
    border-radius: .4rem; font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 800; line-height: 1.1;
    letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .35); }
.listing-status-label.text-bg-warning { color: #3d2a00 !important; }
:has(> .listing-status-label) img { filter: grayscale(1); opacity: .65; }
:has(> .listing-status-label) .ratio { background-color: var(--bs-secondary-bg) !important; }

/* The listing's own page: the sticker larger, across its photos */
.listing-detail-photos > .listing-status-label { font-size: clamp(1.5rem, 4.5vw, 3rem); border-width: 4px; }
/* Compare: a narrow column, so a smaller sticker, kept inside the photo */
.compare-photos:has(> .listing-status-label) { overflow: hidden; border-radius: var(--bs-border-radius); }
.compare-photos > .listing-status-label { font-size: clamp(.85rem, 1.6vw, 1.25rem); border-width: 2px; }

/* The first sign-in's welcome (fragments :: footer, js/celebrate.js): confetti over everything, clicks go through */
.celebrate-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2000; pointer-events: none; }
#welcomeDialog .welcome-emoji { font-size: 3.5rem; line-height: 1; animation: welcome-pop .6s ease-out both; }
@keyframes welcome-pop { 0% { transform: scale(.3) rotate(-20deg); opacity: 0; } 70% { transform: scale(1.15) rotate(8deg); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { #welcomeDialog .welcome-emoji { animation: none; } }

/* ===== FAQ (/help/faq) ===== */
.faq-search {
    position: relative;
    max-width: 560px;
}
.faq-search .form-control {
    padding-left: 2.75rem;
}
.faq-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.faq-topics .nav-link {
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .925rem;
    color: var(--bs-body-color);
}
.faq-topics .nav-link:hover {
    background: var(--bs-tertiary-bg);
}
.faq-section {
    scroll-margin-top: 5rem;
}
.faq-item {
    scroll-margin-top: 5rem;
}
.faq-item + .faq-item {
    border-top: 1px solid var(--bs-border-color);
}
.faq-question {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.1rem;
    font-weight: 600;
}
.faq-question::-webkit-details-marker {
    display: none;
}
/* A chevron that turns when the answer opens. */
.faq-question::after {
    content: "";
    flex: 0 0 .6rem;
    width: .6rem;
    height: .6rem;
    border-right: 2px solid var(--bs-secondary-color);
    border-bottom: 2px solid var(--bs-secondary-color);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .2s ease;
}
.faq-item[open] > .faq-question::after {
    transform: rotate(225deg) translate(-2px, -2px);
}
.faq-question:hover {
    background: var(--bs-tertiary-bg);
}
.faq-item:first-child > .faq-question {
    border-top-left-radius: var(--bs-border-radius-lg);
    border-top-right-radius: var(--bs-border-radius-lg);
}
.faq-item:last-child:not([open]) > .faq-question {
    border-bottom-left-radius: var(--bs-border-radius-lg);
    border-bottom-right-radius: var(--bs-border-radius-lg);
}
.faq-question:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}
.faq-answer {
    padding: 0 1.1rem 1rem;
    color: var(--bs-secondary-color);
}
.faq-more-emoji {
    font-size: 2rem;
    line-height: 1;
}
@media (prefers-reduced-motion: reduce) {
    .faq-question::after {
        transition: none;
    }
}

/* ===== Main page: the Welcome gift banner (guests) ===== */
.welcome-gift {
    position: relative;
    overflow: hidden;
    color: #3d2a00;
    background:
        radial-gradient(circle at 92% 12%, rgba(255, 255, 255, .55), transparent 38%),
        radial-gradient(circle at 8% 100%, rgba(255, 170, 0, .35), transparent 45%),
        linear-gradient(120deg, #ffe08a 0%, #ffd15c 45%, #ffb938 100%);
    box-shadow: 0 .75rem 2rem rgba(214, 140, 0, .25);
}
/* Confetti dots in the corner. */
.welcome-gift::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(11, 110, 79, .35) 2px, transparent 3px),
        radial-gradient(circle, rgba(220, 53, 69, .35) 2px, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, .7) 2px, transparent 3px);
    background-size: 46px 46px, 64px 64px, 38px 38px;
    background-position: 0 0, 20px 30px, 10px 14px;
    -webkit-mask-image: linear-gradient(110deg, transparent 55%, #000 100%);
    mask-image: linear-gradient(110deg, transparent 55%, #000 100%);
    pointer-events: none;
}
.welcome-gift > * {
    position: relative;
}
.welcome-gift-prize {
    min-width: 8.5rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .55);
    border: 2px dashed rgba(61, 42, 0, .25);
}
.welcome-gift-icon {
    color: #c0392b;
    animation: welcome-gift-wiggle 3.2s ease-in-out infinite;
    transform-origin: 50% 90%;
}
.welcome-gift-amount {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    margin-top: .35rem;
}
.welcome-gift-unit {
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.welcome-gift-badge {
    background: #c0392b;
    color: #fff;
    letter-spacing: .03em;
}
.welcome-gift-text {
    max-width: 38rem;
    color: rgba(61, 42, 0, .85);
}
.welcome-gift-link {
    color: #3d2a00;
    font-weight: 600;
}
.welcome-gift-link:hover {
    color: #000;
}
@keyframes welcome-gift-wiggle {
    0%, 80%, 100% { transform: rotate(0); }
    84% { transform: rotate(-10deg); }
    88% { transform: rotate(9deg); }
    92% { transform: rotate(-6deg); }
    96% { transform: rotate(3deg); }
}
@media (prefers-reduced-motion: reduce) {
    .welcome-gift-icon {
        animation: none;
    }
}

/* ===== A listing without a photo (fragments :: noPhoto): its kind's icon in place of the picture ===== */
.no-photo {
    background:
        radial-gradient(circle at 50% 45%, rgba(var(--bs-body-color-rgb), .05), transparent 60%);
}
.no-photo .no-photo-icon {
    opacity: .55;
}
.no-photo-sm .no-photo-icon {
    opacity: .45;
}
