/* Trading Spaces — Airbnb-style demo (mobile-first, no build) */

:root {
  --bg: hsl(340 47% 96%);
  --fg: hsl(258 24% 15%);
  --primary: hsl(320 76% 80%);
  --primary-soft: hsl(320 76% 92%);
  --pink: hsl(320 70% 56%);
  --border: hsl(258 18% 24% / .16);
  --muted: hsl(258 12% 44%);
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .08);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, .12);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
svg { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: .2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.no-scroll { overflow: hidden; }
:focus-visible { outline: 2.5px solid var(--fg); outline-offset: 2px; }
::selection { background: var(--primary-soft); }

.container { width: 100%; margin: 0 auto; padding-inline: 24px; max-width: 1720px; }
@media (min-width: 1128px) { .container { padding-inline: 40px; } }
@media (min-width: 1440px) { .container { padding-inline: 80px; } }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; padding-top: 8px; padding-bottom: 0; min-width: 0; }
.topbar.plain .topbar-inner { padding-block: 10px; }
.brand { font-family: 'Instrument Serif', Georgia, serif; font-size: 22px; text-decoration: none; display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); display: inline-block; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 4px; min-width: 0; }
.host-link { font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 10px; border-radius: 999px; white-space: nowrap; transition: background .2s; }
.host-link:hover { background: hsl(258 24% 15% / .05); }
.profile-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; background: #fff; text-decoration: none; transition: box-shadow .2s var(--ease); }
.topbar.plain .profile-btn { margin-left: auto; }
.profile-btn:hover { box-shadow: var(--shadow-sm); }
.profile-btn svg { width: 18px; height: 18px; }

/* ---------- Tabs: All / Event venues / Offices / Draft contracts ---------- */
.tabs { order: 3; flex: 1 1 100%; min-width: 0; display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 9px; background: none; border: 0; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: none; white-space: nowrap; transition: color .2s; }
.tab svg { display: none; }
.tab { font-size: 14px; padding: 7px 11px 10px; }
.tab::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: 2px; height: 2.5px; border-radius: 2px; background: transparent; transition: background .2s; }
.tab:hover { color: var(--fg); }
.tab.active { color: var(--fg); }
.tab.active::after { background: var(--fg); }

/* ---------- Search pill ---------- */
.search-slot { order: 2; flex: 1 1 100%; min-width: 0; padding: 4px 0 8px; }
@media (max-width: 743.98px) { .home-top .host-link { display: none; } }
.home-top .guide-bar { order: 4; margin: 0 auto 8px; padding: 4px 14px; }
.search-mini { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 44px; padding: 10px 18px; background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 600; cursor: pointer; transition: box-shadow .2s var(--ease); }
.search-mini:hover { box-shadow: var(--shadow-md); }
.search-mini svg { width: 15px; height: 15px; flex: none; color: var(--pink); }
.search-mini span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-big { display: none; }
@media (min-width: 744px) {
  .search-mini { display: none; }
  .search-big { display: flex; align-items: center; width: min(680px, 100%); min-height: 44px; margin-inline: auto; background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 3px 12px rgba(0, 0, 0, .07); transition: box-shadow .2s var(--ease); }
  .search-big:hover { box-shadow: 0 5px 16px rgba(0, 0, 0, .12); }
  .ssg { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 20px; background: none; border: 0; border-radius: 999px; cursor: pointer; text-align: left; transition: background .2s; }
  .ssg:hover { background: hsl(258 24% 15% / .05); }
  .ssg-l { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
  .ssg-v { max-width: 100%; font-size: 13.5px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ssg-v.placeholder { color: var(--muted); }
  .ssg-div { width: 1px; height: 24px; background: var(--border); flex: none; }
  .ss-btn { flex: none; width: 36px; height: 36px; margin: 4px 4px 4px 2px; border-radius: 50%; border: 0; background: var(--pink); color: #fff; display: grid; place-items: center; cursor: pointer; transition: filter .2s, transform .2s var(--ease); }
  .ss-btn:hover { filter: brightness(1.06); }
  .ss-btn:active { transform: scale(.96); }
  .ss-btn svg { width: 15px; height: 15px; }
}
@media (min-width: 950px) {
  /* Real-Airbnb desktop header: logo left, pill center, links right; tabs below. */
  .home-top .topbar-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'brand search links' 'tabs tabs tabs' 'guide guide guide'; align-items: center; column-gap: 16px; padding-top: 8px; }
  .home-top .brand { grid-area: brand; justify-self: start; }
  .home-top .search-slot { grid-area: search; justify-self: center; width: min(680px, 100%); padding: 0; }
  .home-top .top-right { grid-area: links; justify-self: end; margin-left: 0; }
  .home-top .tabs { order: 0; grid-area: tabs; justify-self: center; max-width: 100%; min-width: 0; }
  .home-top .guide-bar { grid-area: guide; justify-self: center; margin: 0 0 6px; }
  .host-link { font-size: 14px; }
}

/* ---------- Home grid ---------- */
.home-main { padding-top: 20px; padding-bottom: 48px; }
.result-count { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 28px 20px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 950px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { position: relative; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card:has(:focus-visible) { outline: 2.5px solid var(--fg); outline-offset: 2px; }
.card-media { position: relative; aspect-ratio: 20 / 19; background: var(--primary-soft); }
.slides { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: block; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; box-shadow: var(--shadow-sm); }
.heart { position: absolute; top: 8px; right: 8px; z-index: 2; background: transparent; border: 0; padding: 6px; cursor: pointer; transition: transform .2s var(--ease); }
.heart:hover { transform: scale(1.12); }
.heart svg { width: 24px; height: 24px; fill: hsl(258 24% 15% / .45); stroke: #fff; stroke-width: 1.8; transition: fill .2s; }
.heart.on svg { fill: var(--pink); stroke: var(--pink); }
.c-arrow { position: absolute; top: calc(50% - 16px); z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 0; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-sm); opacity: 0; transition: opacity .2s, transform .2s var(--ease), box-shadow .2s; }
.c-prev { left: 12px; }
.c-next { right: 12px; }
.c-arrow svg { width: 14px; height: 14px; }
.c-arrow:hover { transform: scale(1.06); box-shadow: var(--shadow-md); }
.c-arrow.hide { visibility: hidden; }
.c-arrow:focus-visible { opacity: 1; }
@media (hover: hover) { .card-media:hover .c-arrow { opacity: 1; } }
@media (hover: none) { .c-arrow { display: none; } }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; z-index: 1; pointer-events: none; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .55; transition: opacity .2s, transform .2s; }
.dot.on { opacity: 1; transform: scale(1.15); }
.card-body { display: block; padding: 12px 14px 16px; text-decoration: none; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.card-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; flex: none; }
.card-rating svg { width: 13px; height: 13px; }
.card-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.card-price { margin-top: 8px; font-size: 15px; }
.card-price b { font-weight: 700; }
.card-price span { color: var(--muted); }

/* Branded photo placeholder */
.ph { background: linear-gradient(135deg, var(--primary-soft), hsl(340 47% 91%)); position: relative; }
.ph::after { content: 'Trading Spaces'; position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Instrument Serif', Georgia, serif; font-size: 18px; color: hsl(320 45% 45%); letter-spacing: .3px; }
.thumb.ph::after { font-size: 10px; }
.gph.ph::after { font-size: 22px; }

/* ---------- Empty states ---------- */
.empty { grid-column: 1 / -1; text-align: center; padding: 64px 24px; display: grid; gap: 12px; justify-items: center; background: #fff; border-radius: var(--radius); border: 1px dashed hsl(258 18% 24% / .28); width: 100%; }
.empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: hsl(320 45% 40%); display: grid; place-items: center; }
.empty-icon svg { width: 26px; height: 26px; }
.empty h2 { font-size: 24px; }
.empty p { color: var(--muted); max-width: 440px; }

/* ---------- Sheets & backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: 58; background: hsl(258 24% 10% / .45); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); max-height: 88vh; max-height: 88dvh; overflow: auto; transform: translateY(105%); visibility: hidden; transition: transform .3s var(--ease), opacity .25s var(--ease), visibility 0s .3s; }
.sheet.open { transform: none; visibility: visible; transition: transform .3s var(--ease), opacity .25s var(--ease); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 1; }
.sheet-head h2 { font-size: 16px; font-weight: 700; margin-inline: auto; transform: translateX(-20px); }
.sheet-body { padding: 20px 24px; display: grid; gap: 20px; }
.sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); position: sticky; bottom: 0; background: #fff; }
@media (min-width: 744px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, calc(100vw - 48px)); max-height: min(85vh, 720px); border-radius: var(--radius); transform: translate(-50%, -50%) scale(.96); opacity: 0; }
  .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ---------- Fields & buttons ---------- */
.field { display: grid; gap: 6px; }
.field-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.field select, .field input:not([type=range]) { width: 100%; padding: 12px 14px; border: 1px solid hsl(258 18% 24% / .35); border-radius: 12px; font: inherit; font-size: 16px; background: #fff; color: inherit; transition: border-color .2s, box-shadow .2s; }
.field select:focus, .field input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--pink); height: 24px; margin: 0; }
.range-row output { font-size: 14px; font-weight: 700; white-space: nowrap; min-width: 100px; text-align: right; }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: var(--fg); border: 0; border-radius: 12px; padding: 14px 22px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; transition: filter .2s, box-shadow .2s var(--ease), transform .2s var(--ease); }
.btn-primary:hover { filter: brightness(.97); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: scale(.98); }
.btn-primary.block { width: 100%; }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1.5px solid var(--fg); border-radius: 12px; padding: 12px 20px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .2s, box-shadow .2s; }
.btn-outline:hover { background: hsl(258 24% 15% / .04); }
.btn-link { background: none; border: 0; padding: 8px 6px; font-size: 15px; font-weight: 600; text-decoration: underline; cursor: pointer; border-radius: 8px; }
.btn-link:hover { background: hsl(258 24% 15% / .05); }
.icon-btn { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; text-decoration: none; transition: background .2s; }
.icon-btn:hover { background: hsl(258 24% 15% / .06); }
.icon-btn svg { width: 18px; height: 18px; }
.txt-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; transition: background .2s; }
.txt-btn:hover { background: hsl(258 24% 15% / .05); }
.txt-btn svg { width: 16px; height: 16px; }
.save-btn svg { fill: transparent; stroke: currentColor; stroke-width: 1.8; transition: fill .2s; }
.save-btn.on svg { fill: var(--pink); stroke: var(--pink); }
.text-link { text-decoration: underline; font-weight: 600; }

/* ---------- Listing ---------- */
.listing-page { padding-top: 12px; padding-bottom: 110px; }
@media (min-width: 744px) { .listing-page { padding-bottom: 60px; } }
.lheader { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.lheader .icon-btn { margin-left: -10px; }
.lactions { display: flex; gap: 4px; }
.listing-page h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.15; margin-top: 4px; }
.rating-line { margin: 8px 0 16px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.rating-line svg { width: 14px; height: 14px; }
.gwrap { position: relative; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -24px; }
.gallery::-webkit-scrollbar { display: none; }
.gph { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 4 / 3; background: var(--primary-soft); overflow: hidden; }
.gph img { width: 100%; height: 100%; object-fit: cover; }
.g-counter { position: absolute; right: 36px; bottom: 12px; background: hsl(258 24% 10% / .7); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
@media (min-width: 744px) {
  .gallery { display: grid; gap: 8px; margin-inline: 0; border-radius: var(--radius); overflow: hidden; height: clamp(320px, 42vw, 540px); }
  .gallery .gph { aspect-ratio: auto; height: 100%; min-height: 0; min-width: 0; }
  .gallery.g1 { grid-template-columns: 1fr; height: clamp(300px, 40vw, 480px); }
  .gallery.g2 { grid-template-columns: 2fr 1fr; }
  .gallery.g3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
  .gallery.g3 .gph:first-child { grid-row: 1 / span 2; }
  .g-counter { display: none; }
}
.listing-cols { display: block; padding-top: 20px; }
@media (min-width: 744px) { .listing-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; } }
@media (min-width: 1128px) { .listing-cols { grid-template-columns: minmax(0, 1fr) 400px; gap: 72px; } }
.host-row { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; }
.host-row p { font-weight: 700; }
.host-row .muted { font-weight: 400; font-size: 14px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary-soft); color: hsl(320 45% 40%); display: grid; place-items: center; font-family: 'Instrument Serif', Georgia, serif; font-size: 20px; flex: none; }
.lsec { padding: 24px 0; border-top: 1px solid var(--border); }
.lsec.host-row { border-top: 0; padding-top: 0; }
.sec-title { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.desc { color: hsl(258 15% 26%); }
.desc p + p { margin-top: 10px; }
.desc.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.show-more { margin-top: 10px; margin-left: -6px; }
.amen-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 560px) { .amen-grid { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.amen-grid li { display: flex; align-items: center; gap: 14px; padding: 9px 0; font-size: 15px; }
.amen-grid svg { width: 22px; height: 22px; flex: none; }
.drow { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.drow:last-child { border-bottom: 0; }
.drow-k { color: var(--muted); flex: none; }
.drow-v { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.rules-list li { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; font-size: 15px; }
.rules-list svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.footnote { color: var(--muted); font-size: 13px; padding-top: 16px; }

/* Booking card: bottom sheet on mobile, sticky column on desktop */
.book-card { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); padding: 20px 24px calc(24px + env(safe-area-inset-bottom)); max-height: 88vh; max-height: 88dvh; overflow: auto; transform: translateY(105%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
.book-card.open { transform: none; visibility: visible; transition: transform .3s var(--ease); }
.book-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.book-head .price-line { margin-bottom: 0; }
.price-line { font-size: 15px; margin-bottom: 16px; }
.price-line b { font-size: 20px; font-weight: 700; }
.bform { display: grid; gap: 12px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bform .btn-primary { margin-top: 4px; }
.no-charge { text-align: center; color: var(--muted); font-size: 13px; margin-top: 6px; }
.breakdown { margin-top: 12px; }
.brow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.brow span:first-child { color: hsl(258 15% 26%); }
.brow.total { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; font-weight: 700; }
.brow.total span:first-child { color: inherit; }
.contract-link { display: block; text-align: center; margin-top: 14px; font-size: 14px; }
@media (min-width: 744px) {
  .book-card { position: sticky; top: 24px; left: auto; right: auto; bottom: auto; z-index: 1; transform: none; visibility: visible; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-md); padding: 24px; max-height: none; overflow: visible; transition: none; }
  .book-close { display: none; }
}
.bookbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; border-top: 1px solid var(--border); padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); }
.bookbar .price-line { margin-bottom: 0; }
@media (min-width: 744px) { .bookbar { display: none; } }

/* ---------- Checkout ---------- */
.co-page { padding-top: 16px; padding-bottom: 64px; max-width: 1160px; }
.co-head { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.co-head .icon-btn { margin-left: -10px; }
.co-head h1 { font-size: clamp(26px, 5vw, 32px); }
.co-grid { display: grid; gap: 24px; }
@media (min-width: 950px) { .co-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: start; } .co-side { position: sticky; top: 24px; } }
@media (max-width: 949.98px) { .co-side { order: -1; } }
.co-sec { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.co-main .co-sec:last-child { margin-bottom: 0; }
.summary-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: center; }
.thumb { width: 96px; height: 80px; border-radius: 12px; overflow: hidden; flex: none; background: var(--primary-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.trip-info { min-width: 0; }
.trip-title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rating-inline { display: flex; align-items: center; gap: 4px; }
.rating-inline svg { width: 12px; height: 12px; }
.trow { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; }
.trow-k { font-weight: 700; }
.trow-v { color: var(--muted); font-size: 14px; margin-top: 2px; }
.trow > a { font-size: 14px; font-weight: 600; text-decoration: underline; flex: none; }
.payrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pay-cards { display: flex; gap: 6px; color: hsl(258 10% 62%); }
.pay-cards svg { width: 30px; height: 22px; }
.co-form { display: grid; gap: 14px; }

/* ---------- Confirmation & not-found ---------- */
.confirm-wrap { max-width: 640px; margin: 0 auto; padding: 32px 0 64px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.confirm-check { width: 68px; height: 68px; border-radius: 50%; background: hsl(150 55% 90%); color: hsl(150 55% 30%); display: grid; place-items: center; }
.confirm-check svg { width: 34px; height: 34px; }
.confirm-wrap h1 { font-size: clamp(28px, 6vw, 36px); }
.ref-code { font-size: 30px; font-weight: 800; letter-spacing: 3px; }
.prop-card { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; gap: 14px; align-items: center; text-decoration: none; text-align: left; transition: box-shadow .2s var(--ease); }
.prop-card:hover { box-shadow: var(--shadow-md); }
.detail-card { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: left; }
.actions-col { display: grid; gap: 10px; width: 100%; }

/* ---------- Trips ---------- */
.trips-page { padding-top: 20px; padding-bottom: 64px; }
.trips-page h1 { font-size: clamp(26px, 5vw, 32px); margin-bottom: 20px; }
.trips-list { display: grid; gap: 14px; max-width: 820px; }
.trip-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 14px; transition: box-shadow .2s var(--ease); }
.trip-item:hover { box-shadow: var(--shadow-md); }
.trip-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; text-decoration: none; }
.trip-item .btn-outline { padding: 9px 14px; font-size: 14px; flex: none; }

/* ---------- Footer, toast ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 32px; padding: 28px 0 36px; color: var(--fg); font-size: 13px; }
.foot-cols { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 560px) { .foot-cols { grid-template-columns: repeat(3, minmax(0, 240px)); gap: 24px 48px; } }
.foot-col h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; margin: 0 0 10px; }
.foot-col ul { display: grid; gap: 8px; justify-items: start; }
.foot-col a { text-decoration: none; font-weight: 500; color: hsl(258 20% 28%); }
.foot-col a:hover { text-decoration: underline; color: var(--fg); }
.foot-base { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-base p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 100; transform: translate(-50%, 10px); background: var(--fg); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; max-width: calc(100vw - 48px); transition: opacity .25s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Home rows (Airbnb-style shelves) ---------- */
.home-main, #home-body { min-width: 0; }
.cat-title { font-size: clamp(22px, 3vw, 28px); margin-bottom: 4px; }
.hrow { min-width: 0; padding-bottom: 30px; }
.hrow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; min-width: 0; }
.hrow-h { min-width: 0; font-size: 17px; }
.hrow-title { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; min-width: 0; background: none; border: 0; padding: 4px 0; cursor: pointer; font: inherit; font-weight: 800; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 8px; }
.hrow-title svg { width: 13px; height: 13px; flex: none; transition: transform .2s var(--ease); }
.hrow-title:hover svg { transform: translateX(3px); }
.hrow-nav { display: none; }
@media (min-width: 744px) {
  .hrow-nav { display: flex; gap: 8px; opacity: 0; transition: opacity .2s; }
  .hrow:hover .hrow-nav, .hrow:focus-within .hrow-nav { opacity: 1; }
}
.hnav { width: 30px; height: 30px; border-radius: 50%; border: 0; background: hsl(258 15% 93%); display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--ease), background .2s; }
.hnav:hover:not(:disabled) { background: hsl(258 15% 89%); transform: scale(1.05); }
.hnav:disabled { opacity: .35; cursor: default; }
.hnav svg { width: 12px; height: 12px; }
.hscroll { display: flex; gap: 13px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; min-width: 0; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }
.hscroll::-webkit-scrollbar { display: none; }
@media (min-width: 1128px) { .hscroll { margin-inline: -40px; padding-inline: 40px; scroll-padding-inline: 40px; } }
@media (min-width: 1440px) { .hscroll { margin-inline: -80px; padding-inline: 80px; scroll-padding-inline: 80px; } }
.rcard { flex: 0 0 168px; min-width: 0; scroll-snap-align: start; }
@media (min-width: 744px) { .rcard { flex-basis: 200px; } }
.rcard-media { position: relative; aspect-ratio: 20 / 19; border-radius: 16px; overflow: hidden; background: var(--primary-soft); }
.rcard-media.ph::after { font-size: 12px; }
.rcard-img { position: absolute; inset: 0; display: block; }
.rcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.rcard:hover .rcard-img img { transform: scale(1.04); }
.rcard-media .heart { top: 7px; right: 7px; padding: 5px; }
.rcard-media .heart svg { width: 21px; height: 21px; }
.rbadge { position: absolute; top: 10px; left: 10px; z-index: 2; background: hsl(0 0% 100% / .96); border-radius: 999px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; box-shadow: var(--shadow-sm); }
.rcard-body { display: block; padding-top: 8px; text-decoration: none; }
.rcard-title { font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard-sub { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard-meta { font-size: 13px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard-meta b { font-weight: 600; color: var(--fg); }

/* ---------- Guide ---------- */
.guide-bar { display: flex; justify-content: center; align-items: center; gap: 6px; width: fit-content; max-width: 100%; margin: 6px auto 0; padding: 5px 15px; border-radius: 999px; background: var(--primary-soft); border: 1px solid hsl(320 60% 82%); color: hsl(320 45% 32%); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, box-shadow .2s var(--ease); }
.guide-bar:hover { background: var(--primary); color: var(--fg); box-shadow: var(--shadow-sm); }
.guide-bar .g-spark { color: var(--pink); }
.guide-bar b { text-decoration: underline; text-underline-offset: 2px; }

.guide-page { padding-top: 16px; padding-bottom: 64px; max-width: 1060px; }
.g-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.g-back { margin-left: -10px; }
.g-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.g-pill { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.g-pill:hover { border-color: var(--pink); box-shadow: var(--shadow-sm); }
.g-dots { display: flex; gap: 7px; justify-content: center; margin: 16px 0 4px; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; background: hsl(258 18% 24% / .16); transition: background .2s, transform .2s var(--ease); }
.g-dot.done { background: var(--primary); }
.g-dot.on { background: var(--pink); transform: scale(1.25); }
.g-q { text-align: center; font-size: clamp(26px, 5vw, 36px); margin: 10px 0 24px; }
.g-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 744px) { .g-tiles { grid-template-columns: repeat(4, 1fr); } }
.g-tile { position: relative; border: 0; padding: 0; background: #fff; border-radius: var(--radius); overflow: hidden; cursor: pointer; text-align: left; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.g-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.g-tile-img { aspect-ratio: 4 / 3; background: var(--primary-soft); overflow: hidden; }
.g-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.g-tile:hover .g-tile-img img { transform: scale(1.04); }
.g-tile-label { display: block; padding: 10px 12px 12px; font-weight: 700; font-size: 14px; line-height: 1.3; }
.g-opts { display: grid; gap: 12px; max-width: 560px; margin: 0 auto; }
.g-opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px 18px; font-size: 17px; font-weight: 700; cursor: pointer; text-align: left; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.g-opt:hover { border-color: var(--pink); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.g-opt-sub { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.g-opt-thumb { width: 82px; height: 62px; border-radius: 10px; overflow: hidden; flex: none; background: var(--primary-soft); }
.g-opt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.g-opt-thumb.ph::after { font-size: 9px; }
.g-two { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 640px; margin: 0 auto; }
@media (min-width: 560px) { .g-two { grid-template-columns: 1fr 1fr; } }
.g-big { display: grid; justify-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 34px 20px; font-size: 18px; font-weight: 700; cursor: pointer; text-align: center; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.g-big:hover { border-color: var(--pink); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.g-big svg { width: 34px; height: 34px; color: var(--pink); }
.g-result-head { margin: 4px 0 18px; text-align: center; }
.g-result-head .g-q { margin-bottom: 6px; }
.g-result-head .result-count { margin-bottom: 0; }
.hood-h { font-size: 22px; margin: 28px 0 12px; }
.hood-h:first-of-type { margin-top: 8px; }

/* ---------- Scroll tour pill (listing header) ---------- */
.tour-pill { display: inline-flex; align-items: center; gap: 6px; align-self: center; padding: 7px 13px; border-radius: 999px; background: var(--primary-soft); border: 1px solid hsl(320 60% 82%); color: hsl(320 45% 32%); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .2s, box-shadow .2s var(--ease); }
.tour-pill:hover { background: var(--primary); color: var(--fg); box-shadow: var(--shadow-sm); }

/* ---------- Optimized image pipeline ----------
   Photos ship as same-origin WebP renditions (480 / 960 / 1600) and every
   <img> now carries width and height attributes. Each box above already
   reserves its space with aspect-ratio or a fixed size; this blanket rule
   stops those intrinsic attributes ever winning and resizing a card while it
   loads, so the page holds still from first paint to loaded photo. The .ph
   tile stays the last resort if the WebP, the original JPEG and the retry all
   fail. */
.rcard-media img,
.card-media img,
.gph img,
.thumb img,
.g-tile-img img,
.g-opt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--primary-soft);
}
