/* Explore Bilas Peles — styles
   Palette: lagoon (deep teal), reef (bright teal), hibiscus (coral), sand. */
:root {
  --lagoon: #0b3b36;
  --lagoon-2: #12534b;
  --reef: #1f9c85;
  --reef-soft: #dff3ee;
  --hibiscus: #e0603c;
  --hibiscus-soft: #fde9e2;
  --sand: #f7f1e6;
  --sand-2: #efe5d2;
  --ink: #17221f;
  --ink-2: #4c5b57;
  --line: #ddd5c6;
  --white: #fff;
  --ok: #1b7f5b;
  --warn: #a96a00;
  --warn-soft: #fff3d6;
  --bad: #b3361f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 59, 54, .06), 0 6px 20px rgba(11, 59, 54, .08);
  --font: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--sand);
}
img { max-width: 100%; display: block; }
a { color: var(--lagoon-2); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5rem; color: var(--lagoon); }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .75rem; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- top bar */
.topbar { background: var(--lagoon); color: var(--white); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--white); text-decoration: none; font-size: 1.1rem; }
.brand strong { font-family: var(--display); font-weight: 700; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.main-nav a { color: #d6ece7; text-decoration: none; padding: .5rem .75rem; border-radius: 8px; font-weight: 500; }
.main-nav a:hover { background: rgba(255,255,255,.08); color: var(--white); }
.main-nav a.active { background: rgba(255,255,255,.14); color: var(--white); }
.nav-account { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
.nav-toggle { display: none; margin-left: auto; background: none; color: var(--white); border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: .4rem .8rem; font: inherit; }

.nav-user { display: inline-flex !important; align-items: center; gap: .45rem; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--hibiscus); color: var(--white); display: inline-grid; place-items: center; font-weight: 600; font-size: .9rem; }
/* The hamburger is no longer needed: phones get the bottom tab bar instead. */
.nav-toggle { display: none !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; border-radius: 10px; border: 1px solid transparent;
  padding: .6rem 1.1rem; cursor: pointer; text-decoration: none; line-height: 1.2;
  background: var(--reef); color: var(--white);
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-coral { background: var(--hibiscus); }
.btn-ghost { background: transparent; color: var(--lagoon); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); }
.btn-light { background: var(--white); color: var(--lagoon); }
.btn-danger { background: transparent; color: var(--bad); border-color: #e7b9ae; }
.btn-sm { padding: .35rem .7rem; font-size: .875rem; border-radius: 8px; }
.btn-block { width: 100%; }
.linkish { background: none; border: 0; padding: 0; color: var(--lagoon-2); text-decoration: underline; font: inherit; cursor: pointer; }

/* ------------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(1200px 380px at 85% -10%, rgba(47,179,154,.35), transparent 60%),
    linear-gradient(160deg, var(--lagoon) 0%, var(--lagoon-2) 70%, #1a6c5f 100%);
  color: var(--white); padding: 3rem 0 4.5rem; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 46px;
  background: var(--sand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 46' preserveAspectRatio='none'%3E%3Cpath d='M0 26c150-26 300-26 450 0s300 26 450 0 225-20 300-6v26H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 46' preserveAspectRatio='none'%3E%3Cpath d='M0 26c150-26 300-26 450 0s300 26 450 0 225-20 300-6v26H0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
}
.hero h1 { color: var(--white); max-width: 18ch; }
.hero p.lead { color: #cfe9e3; font-size: 1.1rem; max-width: 52ch; }
.search-bar {
  margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 220px auto; gap: .5rem;
  background: var(--white); padding: .5rem; border-radius: 14px; box-shadow: var(--shadow); max-width: 760px;
}
.search-bar input, .search-bar select { border: 0; font: inherit; padding: .65rem .75rem; border-radius: 10px; background: var(--sand); color: var(--ink); min-width: 0; }
@media (max-width: 640px) { .search-bar { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 1rem; }
.chip {
  font: inherit; font-weight: 500; border: 1px solid var(--line); background: var(--white); color: var(--ink);
  padding: .45rem .9rem; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
}
.chip svg { width: 18px; height: 18px; }
.chip.active { background: var(--lagoon); color: var(--white); border-color: var(--lagoon); }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .75rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------ cards */
.grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.listing-card { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; }
.listing-card:focus-visible { box-shadow: 0 0 0 3px rgba(31,156,133,.45), var(--shadow); outline: none; }
@media (hover: hover) {
  .listing-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(11,59,54,.08), 0 12px 28px rgba(11,59,54,.14); }
}
.thumb { aspect-ratio: 16 / 10; background-size: cover; background-position: center; position: relative; display: grid; place-items: center; }
.thumb .cat-art { width: 64px; height: 64px; opacity: .9; color: var(--white); }
.thumb-hotel { background-image: linear-gradient(135deg, #0b3b36, #1f9c85); }
.thumb-guesthouse { background-image: linear-gradient(135deg, #7a3b1c, #e0603c); }
.thumb-car { background-image: linear-gradient(135deg, #263a52, #4c7aa3); }
.thumb-guide { background-image: linear-gradient(135deg, #3e4a17, #8aa13a); }
.badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600;
  padding: .2rem .55rem; border-radius: 999px; background: var(--reef-soft); color: var(--lagoon); white-space: nowrap;
}
.thumb .badge { position: absolute; top: .6rem; left: .6rem; background: rgba(255,255,255,.92); }
.thumb .badge.right { left: auto; right: .6rem; }
.card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-body h3 { margin: 0; }
.loc { color: var(--ink-2); font-size: .9rem; }
.card-foot { margin-top: auto; padding-top: .5rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.price { font-weight: 600; color: var(--lagoon); }
.price small { font-weight: 400; color: var(--ink-2); }
.stars { color: #c9851b; font-weight: 600; font-size: .9rem; }

.badge-requested { background: var(--warn-soft); color: var(--warn); }
.badge-confirmed { background: var(--reef-soft); color: var(--ok); }
.badge-fulfilled { background: #e4ecf7; color: #2b4f7c; }
.badge-declined, .badge-cancelled { background: var(--hibiscus-soft); color: var(--bad); }
.badge-paid { background: var(--reef-soft); color: var(--ok); }
.badge-unpaid { background: var(--sand-2); color: var(--ink-2); }
.badge-refunded { background: #ece4f6; color: #5b3b8a; }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-approved { background: var(--reef-soft); color: var(--ok); }
.badge-rejected, .badge-suspended { background: var(--hibiscus-soft); color: var(--bad); }

/* ------------------------------------------------------------- page bits */
.page { padding: 2rem 0 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.panel h2, .panel h3 { margin-top: 0; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-2); background: var(--white); border-radius: var(--radius); border: 1px dashed var(--line); }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.25rem; overflow-x: auto; }
.tab { font: inherit; font-weight: 600; background: none; border: 0; padding: .7rem 1rem; color: var(--ink-2); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tab.active { color: var(--lagoon); border-bottom-color: var(--hibiscus); }
.tab .count { background: var(--hibiscus); color: var(--white); border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; margin-left: .3rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1.25rem; }
.stat { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.stat .label { color: var(--ink-2); font-size: .85rem; }
.stat .value { font-family: var(--display); font-size: 1.6rem; color: var(--lagoon); font-weight: 700; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ lists */
.rows { display: flex; flex-direction: column; gap: .75rem; }
.row-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: start; }
.row-card h3 { margin: 0 0 .2rem; }
.row-meta { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--ink-2); font-size: .9rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
@media (max-width: 640px) { .row-card { grid-template-columns: 1fr; } .row-actions { justify-content: flex-start; } }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-2); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------------ forms */
.form { display: grid; gap: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .8rem; color: var(--ink-2); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; padding: .6rem .7rem; width: 100%;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .tab:focus-visible {
  outline: 3px solid rgba(31,156,133,.35); outline-offset: 1px; border-color: var(--reef);
}
textarea { min-height: 90px; resize: vertical; }
.radio-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: .45rem; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; font-weight: 500; cursor: pointer; background: var(--white); }
.radio-row input { width: auto; }
.form-error { background: var(--hibiscus-soft); color: var(--bad); padding: .6rem .8rem; border-radius: 10px; font-size: .9rem; }
.summary-box { background: var(--sand); border-radius: 10px; padding: .8rem 1rem; display: grid; gap: .25rem; }
.summary-box .line { display: flex; justify-content: space-between; gap: 1rem; }
.summary-box .total { font-weight: 700; color: var(--lagoon); border-top: 1px solid var(--line); padding-top: .35rem; margin-top: .2rem; }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(9, 30, 27, .55); }
.modal-card { position: relative; background: var(--white); border-radius: 18px; width: 100%; max-width: 760px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; overflow: clip; } /* clip keeps sticky children working */
.modal-card.narrow { max-width: 440px; }
.modal-x { position: absolute; right: .6rem; top: .5rem; z-index: 2; background: rgba(255,255,255,.9); border: 0; font-size: 1.6rem; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--lagoon); line-height: 1; }
.modal-pad { padding: 1.4rem 1.4rem 1.6rem; }
.detail-hero { aspect-ratio: 21 / 8; }
.detail-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.4rem; }
@media (max-width: 720px) { .detail-grid { grid-template-columns: 1fr; } .detail-hero { aspect-ratio: 16 / 8; } }
.facts { display: grid; gap: .4rem; font-size: .93rem; }
.facts div { display: grid; grid-template-columns: 92px 1fr; gap: .5rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.notice { background: var(--warn-soft); color: #6d4a00; border-radius: 10px; padding: .7rem .9rem; font-size: .9rem; }
.notice.info { background: var(--reef-soft); color: var(--lagoon); }
.review { border-top: 1px solid var(--line); padding: .6rem 0; }
.star-input { display: flex; gap: .2rem; }
.star-input button { background: none; border: 0; font-size: 1.8rem; color: #d9cdb6; cursor: pointer; padding: 0 .1rem; line-height: 1; }
.star-input button.on { color: #e0a32b; }

/* ---------------------------------------------------------------- voucher */
.voucher { border: 2px dashed var(--reef); border-radius: 14px; padding: 1rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: center; background: #fbfffd; }
.voucher .qr { background: var(--white); padding: 6px; border-radius: 8px; }
.voucher .qr img, .voucher .qr canvas { width: 132px; height: 132px; }
.voucher .ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .05em; color: var(--lagoon); }
@media (max-width: 480px) { .voucher { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ----------------------------------------------------------------- toasts */
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: .5rem; width: min(92vw, 420px); }
.toast { background: var(--lagoon); color: var(--white); padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--shadow); animation: up .2s ease; }
.toast.error { background: var(--bad); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------------ misc */
.loading { padding: 3rem 0; text-align: center; color: var(--ink-2); }
.footer { background: var(--lagoon); color: #cfe9e3; padding: 2rem 0; margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.5rem; }
.footer strong { color: var(--white); font-family: var(--display); }
.footer .muted { color: #9cc7bf; }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin: 1rem 0 1.5rem; }
.step { background: var(--white); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.step b { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--hibiscus); color: var(--white); margin-bottom: .4rem; }
.checkin-box { display: flex; gap: .5rem; flex-wrap: wrap; }
.checkin-box input { flex: 1; min-width: 180px; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .05em; }
.img-preview { width: 100%; max-width: 260px; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ======================================================================
   RESPONSIVE LAYOUT
   Phone  < 760px   bottom tab bar, compact cards, full-screen sheets
   Tablet 760–1023  two-column grid, compact top menu
   Laptop ≥ 1024    three-column grid, side-by-side booking panel
   Wide   ≥ 1360    four-column grid
   ====================================================================== */

/* -------- listing detail: shared structure -------- */
.detail-grid { grid-template-columns: 1fr; grid-template-areas: "info" "book" "reviews"; }
.detail-grid > div:first-child { grid-area: info; }
.book-col { grid-area: book; }
.reviews-col { grid-area: reviews; }
.reviews-col h3 { margin-top: .5rem; }
.book-panel { background: var(--sand); box-shadow: none; margin: 0; }
.book-bar { display: none; }
.tabbar { display: none; }

/* -------- phone -------- */
@media (max-width: 759px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .topbar-inner { min-height: 56px; }
  .brand { font-size: 1rem; }
  .brand img { width: 30px; height: 30px; }
  .main-nav a[data-nav] { display: none; }           /* sections live in the tab bar */
  .nav-account a.nav-user { display: inline-flex !important; padding: .2rem; }
  .nav-user-name, .nav-logout { display: none; }

  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--white); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 18px rgba(11, 59, 54, .08);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 54px; color: var(--ink-2); text-decoration: none; font-size: .72rem; font-weight: 500; border-radius: 10px;
  }
  .tabbar a[hidden] { display: none; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.active { color: var(--lagoon); background: var(--reef-soft); }
  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: 1.5rem; }

  .hero { padding: 1.6rem 0 3.2rem; }
  .hero p.lead { font-size: 1rem; }
  .search-bar { margin-top: 1rem; }

  /* category buttons: one swipeable row */
  .chips {
    flex-wrap: nowrap; overflow-x: auto; margin: 1rem -16px .75rem; padding: 2px 16px 6px;
    scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }

  /* compact horizontal cards */
  .listing-card { flex-direction: row; min-height: 132px; }
  .listing-card .thumb { aspect-ratio: auto; width: 34%; min-width: 112px; max-width: 150px; flex-shrink: 0; }
  .listing-card .thumb .cat-art { width: 40px; height: 40px; }
  .listing-card .thumb .badge { font-size: .65rem; top: .4rem; left: .4rem; padding: .15rem .45rem; }
  .listing-card .thumb .badge.right { display: none; }
  .listing-card .card-body { padding: .7rem .8rem; gap: .2rem; min-width: 0; }
  .listing-card h3 { font-size: 1rem; }
  .listing-card .loc { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .listing-card .card-body > p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .8rem; }
  .listing-card .card-foot { padding-top: .25rem; flex-wrap: wrap; gap: .2rem .6rem; }
  .listing-card .price { font-size: .9rem; }

  /* pop-ups become full-screen sheets */
  .modal { padding: 0; flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .modal-card { flex-shrink: 0; }
  .modal-card, .modal-card.narrow, .modal-card.wide { max-width: none; min-height: 100dvh; border-radius: 0; }
  .modal-card.narrow { min-height: auto; margin-top: auto; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .modal-x { position: fixed; top: calc(.5rem + env(safe-area-inset-top)); right: .6rem; box-shadow: var(--shadow); }
  .modal-pad { padding: 1.1rem 16px 1.4rem; }
  .detail-hero { aspect-ratio: 16 / 7; }
  .book-bar {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--line);
    padding: .65rem 16px calc(.65rem + env(safe-area-inset-bottom));
  }
  .voucher .qr img, .voucher .qr canvas { width: 180px; height: 180px; }

  /* pages, lists and forms */
  .page { padding: 1.25rem 0 2rem; }
  .page-head { align-items: stretch; }
  .page-head > .btn, .page-head > a.btn { width: 100%; }
  .panel { padding: 1rem; }
  .row-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .row-actions .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .stat { padding: .8rem; }
  .stat .value { font-size: 1.25rem; }
  .tabs { margin-left: -16px; margin-right: -16px; padding: 0 8px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .steps { grid-template-columns: 1fr; }

  /* tables turn into stacked cards */
  table.stack-sm thead { display: none; }
  table.stack-sm, table.stack-sm tbody, table.stack-sm tr, table.stack-sm td { display: block; width: 100%; }
  table.stack-sm tr { border: 1px solid var(--line); border-radius: 12px; padding: .4rem .75rem; margin-bottom: .7rem; background: var(--white); }
  table.stack-sm td { border: 0; padding: .35rem 0; display: grid; grid-template-columns: 38% 1fr; gap: .6rem; text-align: left; }
  table.stack-sm td.num { text-align: left; }
  table.stack-sm td::before { content: attr(data-label); color: var(--ink-2); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
  table.stack-sm td:not([data-label])::before, table.stack-sm td[data-label=""]::before { content: none; }
  table.stack-sm td:not([data-label]) { grid-template-columns: 1fr; }
  table.stack-sm td[colspan] { grid-template-columns: 1fr; }
}

/* small phones */
@media (max-width: 359px) {
  .tabbar a span { font-size: .66rem; }
  .listing-card .thumb { min-width: 92px; }
  .stats { grid-template-columns: 1fr; }
}

/* touch devices: comfortable tap targets */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .chip, .tab { min-height: 42px; }
  input, select, textarea { min-height: 44px; font-size: 16px; } /* 16px stops iOS zooming in */
  textarea { min-height: 90px; }
  .radio-row label { min-height: 44px; }
  .star-input button { font-size: 2.2rem; }
}

/* -------- tablet -------- */
@media (min-width: 560px) and (max-width: 759px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .listing-card { flex-direction: column; }
  .listing-card .thumb { width: auto; max-width: none; aspect-ratio: 16 / 9; }
  .listing-card .thumb .badge.right { display: inline-flex; }
}
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav a { padding: .45rem .6rem; }
}
@media (min-width: 760px) and (max-width: 1023px) {
  .nav-logout { display: none; }        /* log out lives on the Account page */
  .nav-user-name { display: none; }
  .main-nav { gap: 0; }
  .modal-card.wide { max-width: 720px; }
  .detail-grid { grid-template-columns: 1fr; }
  .book-col { max-width: 520px; }
}

/* -------- laptop / desktop -------- */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
  .hero { padding: 3.5rem 0 5rem; }
  .modal-card.wide { max-width: 980px; }
  .detail-grid { grid-template-columns: 1.25fr 1fr; grid-template-areas: "info book" "reviews book"; align-items: start; }
  .book-col { position: sticky; top: 1rem; }
  .modal { padding: 3vh 16px; }
}
@media (min-width: 1360px) {
  .wrap { max-width: 1320px; }
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* short landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
  .topbar { position: static; }
  .hero { padding: 1rem 0 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------- account types & business forms */
.narrow-page { max-width: 820px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 420px) { .choice-grid { grid-template-columns: 1fr; } }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; text-align: left;
  border: 2px solid var(--line); background: var(--white); border-radius: 14px; padding: 1rem;
  font: inherit; color: var(--ink); text-decoration: none; cursor: pointer;
}
.choice:hover, .choice:focus-visible { border-color: var(--reef); outline: none; }
.choice strong { font-family: var(--display); font-size: 1.15rem; color: var(--lagoon); }
.choice-icon svg { width: 28px; height: 28px; color: var(--reef); }
.form-section { border: 0; margin: 0; display: grid; gap: .9rem; }
.form-section legend { font-family: var(--display); font-weight: 700; color: var(--lagoon); font-size: 1.1rem; padding: 0; margin-bottom: .2rem; float: left; width: 100%; }
.form-section legend + * { clear: both; }
.file-field input[type=file] { padding: .5rem; background: var(--sand); border-style: dashed; }
.file-note { font-size: .85rem; }
.file-note.ok { color: var(--ok); }
.file-note.bad { color: var(--bad); }
.inline-check { display: flex; align-items: flex-start; gap: .5rem; font-weight: 500; }
.inline-check input { width: auto; min-height: 0; margin-top: .2rem; }
.badge-tourist { background: #e4ecf7; color: #2b4f7c; }
.badge-business { background: var(--hibiscus-soft); color: #9a3a1d; }
.badge-admin { background: var(--lagoon); color: var(--white); }
.doc-list { display: grid; gap: .4rem; }
.doc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .75rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--sand); font-size: .9rem; overflow-wrap: anywhere; }
.doc-label { font-weight: 600; color: var(--ink-2); }
@media (max-width: 560px) { .doc-row { grid-template-columns: 1fr; gap: .2rem; } }
.app-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.app-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: .6rem; }
.app-facts { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 1.5rem; }
@media (max-width: 759px) { .app-head .row-actions { width: 100%; } .facts div { grid-template-columns: 96px 1fr; } }
.thumb-site { background-image: linear-gradient(135deg, #0f4c5c, #3d9a6e); }
.bank-card { border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; background: var(--sand); margin-bottom: 1rem; display: grid; gap: .6rem; }
.bank-card-head { display: flex; justify-content: space-between; gap: .75rem; align-items: center; flex-wrap: wrap; }
.bank-card .btn { justify-self: start; }
