/* ==========================================================================
   Tourism Cambodia — design system
   ========================================================================== */

:root {
  /* Palette */
  --jade-900: #06322F;
  --jade-800: #0B4F4A;
  --jade-700: #0E6259;
  --jade-100: #DCEAE6;
  --jade-50:  #EFF6F4;

  --gold-700: #9A6F1E;
  --gold-600: #B8862C;
  --gold-500: #C8973F;
  --gold-100: #F6EBD4;

  --sand:   #FAF6EE;
  --paper:  #FFFFFF;
  --ink:    #16211F;
  --muted:  #5C6B67;
  --faint:  #8B9995;
  --line:   #E7E0D3;
  --line-2: #F1ECE1;

  --ok:     #17795E;
  --ok-bg:  #E4F4EE;
  --warn:   #A35A12;
  --warn-bg:#FBEEDE;
  --hot:    #B03A2E;
  --hot-bg: #FBE9E6;

  /* Type */
  --ff-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ff-serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;

  /* Space & shape */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(6,50,47,.06), 0 2px 8px rgba(6,50,47,.05);
  --shadow-2: 0 2px 6px rgba(6,50,47,.07), 0 12px 32px rgba(6,50,47,.09);
  --shadow-3: 0 24px 60px rgba(6,50,47,.16);
  --wrap: 1240px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--jade-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--ff-serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: 3.5rem 0; }
.section-tight { padding: 2.25rem 0; }
.grid { display: grid; gap: 1.25rem; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0 } .mb-0 { margin-bottom: 0 }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(250,246,238,.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header.on-dark { background: transparent; border-bottom-color: transparent; }
.site-header.on-dark .brand,
.site-header.on-dark .brand span { color: #fff; }
.site-header.on-dark .brand small { color: var(--gold-500); }
.site-header.on-dark .nav a { color: #E4F0ED; }
.site-header.on-dark .nav a:hover { background: rgba(255,255,255,.14); color: #fff; }
.site-header.on-dark .nav a[aria-current="page"] { background: rgba(255,255,255,.18); color: #fff; }
.site-header.on-dark .nav-toggle { border-color: rgba(255,255,255,.35); }
.site-header.on-dark .nav-toggle path { stroke: #fff; }
@media (max-width: 900px) {
  .site-header.on-dark .nav { background: var(--jade-900); }
  .site-header.on-dark .nav a { color: #E4F0ED; }
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--ff-serif); font-weight: 600; font-size: 1.18rem; color: var(--jade-800); text-decoration: none; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-family: var(--ff-sans); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-600); font-weight: 600; margin-top: -3px; }
.nav { display: flex; gap: .35rem; margin-left: auto; align-items: center; }
.nav a {
  padding: .5rem .8rem; border-radius: 999px; font-size: .92rem; font-weight: 500;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.nav a:hover { background: var(--jade-50); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--jade-800); color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .45rem .6rem; cursor: pointer; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem; box-shadow: var(--shadow-2); display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 1rem; border-radius: var(--r-sm); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--jade-800); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: var(--jade-700); color: #fff; }
.btn-gold { background: var(--gold-500); color: #26190a; }
.btn-gold:hover { background: var(--gold-600); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--jade-700); color: var(--jade-800); }
.btn-quiet { background: transparent; color: var(--jade-800); border-color: transparent; padding-inline: .5rem; }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Forms ---------- */
label.fld { display: flex; flex-direction: column; gap: .3rem; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input[type="text"], input[type="date"], input[type="search"], input[type="number"], select {
  font: inherit; font-size: .95rem; padding: .6rem .75rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: 100%;
  font-weight: 500;
}
input:hover, select:hover { border-color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--jade-700); box-shadow: 0 0 0 3px var(--jade-100); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C6B67' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2rem; }

/* ---------- Search panel ---------- */
.searchbar {
  background: var(--paper); border-radius: var(--r-lg); padding: 1rem;
  box-shadow: var(--shadow-2); border: 1px solid var(--line-2);
  display: grid; gap: .75rem;
  grid-template-columns: 1.6fr 1fr 1fr .9fr auto;
  align-items: end;
}
.searchbar .go { padding-block: .75rem; }
@media (max-width: 980px) { .searchbar { grid-template-columns: 1fr 1fr; } .searchbar .go { grid-column: 1 / -1; } }
@media (max-width: 560px) { .searchbar { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, var(--jade-900) 0%, var(--jade-800) 45%, #0d5b52 100%);
  padding: 0 0 4.5rem;
  margin-top: -68px; padding-top: 68px;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px;
  background: linear-gradient(to bottom, transparent, var(--sand));
  opacity: .0;
}
.hero-art { position: absolute; inset: 0; opacity: .16; pointer-events: none; }
.hero-art svg { width: 100%; height: 100%; }
.hero-inner { position: relative; padding-top: 4rem; }
.hero h1 { color: #fff; max-width: 16ch; margin-bottom: .5rem; }
.hero .lede { font-size: 1.12rem; color: #CFE3DE; max-width: 56ch; margin-bottom: 2rem; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-500); margin-bottom: 1rem; line-height: 2; }
.khmer { font-family: "Noto Sans Khmer", "Khmer OS", "Leelawadee UI", sans-serif; letter-spacing: 0; text-transform: none; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--gold-500); }
.hero-stats { display: flex; gap: 2.25rem; flex-wrap: wrap; margin-top: 1.75rem; color: #BFD8D2; font-size: .88rem; }
.hero-stats b { display: block; font-family: var(--ff-serif); font-size: 1.55rem; color: #fff; font-weight: 600; line-height: 1.1; }

/* ---------- Cards ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-1);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--line); }
.card-pad { padding: 1.1rem; }

.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--jade-50); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.045); }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(150deg, var(--jade-800), var(--jade-700)); color: rgba(255,255,255,.5); font-family: var(--ff-serif); font-size: .9rem; text-align: center; padding: 1rem; }

/* Destination card */
.dest-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.dest-card { display: block; color: inherit; text-decoration: none; position: relative; }
.dest-card:hover { text-decoration: none; }
.dest-card .thumb { aspect-ratio: 3 / 2; }
.dest-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,50,47,.82) 0%, rgba(6,50,47,.15) 50%, transparent 100%); }
.dest-card .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem; color: #fff; z-index: 2; }
.dest-card .cap h3 { color: #fff; margin: 0; font-size: 1.28rem; }
.dest-card .cap .sub { font-size: .82rem; color: #CFE3DE; }
.dest-card .meta { padding: .8rem 1rem; display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--muted); }

/* Hotel card */
.hotel-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.hotel-card { display: flex; flex-direction: column; height: 100%; }
.hotel-card .thumb { aspect-ratio: 16 / 10; }
.hotel-card .body { padding: .95rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.hotel-card h3 { font-size: 1.02rem; margin: 0; line-height: 1.3; font-family: var(--ff-sans); font-weight: 650; letter-spacing: 0; }
.hotel-card h3 a { color: var(--ink); }
.hotel-card .addr { font-size: .8rem; color: var(--faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hotel-card .actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; padding-top: .3rem; }

/* Badges & chips */
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem;
  border-radius: 999px; font-size: .73rem; font-weight: 600; background: var(--jade-50);
  color: var(--jade-800); border: 1px solid var(--jade-100); white-space: nowrap;
}
.chip-gold { background: var(--gold-100); color: var(--gold-700); border-color: #EEDCB6; }
.chip-ok { background: var(--ok-bg); color: var(--ok); border-color: #C9E9DE; }
.chip-warn { background: var(--warn-bg); color: var(--warn); border-color: #F2DCBE; }
.chip-plain { background: var(--sand); color: var(--muted); border-color: var(--line); }

.rating { display: inline-flex; align-items: center; gap: .4rem; }
.rating .score {
  background: var(--jade-800); color: #fff; font-weight: 700; font-size: .82rem;
  padding: .22rem .48rem; border-radius: 6px 6px 6px 2px; min-width: 34px; text-align: center;
}
.rating .score.mid { background: var(--gold-600); }
.rating .score.low { background: #7A8683; }
.rating .word { font-size: .8rem; font-weight: 650; }
.rating .cnt { font-size: .75rem; color: var(--faint); }
.stars { color: var(--gold-500); font-size: .8rem; letter-spacing: 1px; }

.price { text-align: right; }
.price .amt { font-family: var(--ff-serif); font-size: 1.4rem; font-weight: 600; color: var(--ink); line-height: 1; }
.price .per { font-size: .72rem; color: var(--faint); }
.price .tot { font-size: .76rem; color: var(--muted); }
.price .none { font-size: .78rem; color: var(--faint); font-style: italic; }

/* ---------- Filters ---------- */
.layout-split { display: grid; grid-template-columns: 282px 1fr; gap: 1.75rem; align-items: start; }
@media (max-width: 980px) { .layout-split { grid-template-columns: 1fr; } }
.filters { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.1rem; box-shadow: var(--shadow-1); position: sticky; top: 84px; }
@media (max-width: 980px) { .filters { position: static; display: none; } .filters.open { display: block; } }
.filter-group { padding: .85rem 0; border-top: 1px solid var(--line-2); }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group > h4 { font-family: var(--ff-sans); font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; font-weight: 700; }
.opts { display: flex; flex-wrap: wrap; gap: .4rem; }
.opt { cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: inline-block; padding: .35rem .7rem; border-radius: 999px; font-size: .82rem;
  border: 1px solid var(--line); background: var(--paper); color: var(--muted); font-weight: 500;
}
.opt input:checked + span { background: var(--jade-800); border-color: var(--jade-800); color: #fff; font-weight: 600; }
.opt input:focus-visible + span { outline: 3px solid var(--gold-500); outline-offset: 2px; }

/* ---------- Map ---------- */
#map, .map-box { height: 460px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--jade-50); z-index: 1; }
.map-sm { height: 280px; }
.leaflet-container { font: inherit !important; }
.map-pin {
  background: var(--jade-800); color: #fff; border-radius: 999px; padding: 3px 8px;
  font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow-1);
  border: 2px solid #fff;
}
.map-pin.gold { background: var(--gold-600); }

/* ---------- Notices ---------- */
.notice { border-radius: var(--r-md); padding: .9rem 1.1rem; font-size: .9rem; border: 1px solid; display: flex; gap: .7rem; align-items: flex-start; }
.notice-info { background: var(--jade-50); border-color: var(--jade-100); color: #0a3d38; }
.notice-warn { background: var(--warn-bg); border-color: #F2DCBE; color: #6d3c0c; }
.notice b { font-weight: 700; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Skeletons / states ---------- */
.skel { background: linear-gradient(90deg, #EFEAE0 25%, #F7F3EA 37%, #EFEAE0 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: var(--r-sm); }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }
.skel-card { height: 330px; border-radius: var(--r-md); }
.empty { text-align: center; padding: 3.5rem 1rem; color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-md); }
.empty h3 { color: var(--ink); }

/* ---------- Prose (guides) ---------- */
.prose { font-size: 1.04rem; color: #22302D; }
.prose h2 { margin-top: 2.4rem; padding-top: .4rem; }
.prose h3 { margin-top: 1.8rem; font-family: var(--ff-sans); font-weight: 700; font-size: 1.08rem; letter-spacing: 0; }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.15rem; border-left: 3px solid var(--gold-500); color: var(--muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: .93rem; background: var(--paper); border-radius: var(--r-sm); overflow: hidden; box-shadow: var(--shadow-1); }
.prose th, .prose td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line-2); }
.prose th { background: var(--jade-50); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--jade-800); }
.prose tr:last-child td { border-bottom: 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.toc { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.1rem 1.25rem; font-size: .92rem; }
.toc h4 { font-family: var(--ff-sans); font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 .5rem; }
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc li { margin-bottom: .3rem; }

/* ---------- Page header band ---------- */
.pagehead { background: linear-gradient(150deg, var(--jade-900), var(--jade-800) 70%); color: #fff; padding: 2.6rem 0 2.2rem; margin-top: -68px; padding-top: calc(68px + 2.6rem); position: relative; overflow: hidden; }
.pagehead h1 { color: #fff; margin-bottom: .35rem; }
.pagehead .lede { color: #C6DED8; max-width: 62ch; margin: 0; }
.pagehead .hero-art { opacity: .12; }
.crumbs { font-size: .82rem; color: #9FC2BB; margin-bottom: .9rem; position: relative; }
.crumbs a { color: #CFE3DE; }
.crumbs span { opacity: .5; margin: 0 .4rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--jade-900); color: #A9C6C0; padding: 3rem 0 2rem; margin-top: 4rem; font-size: .9rem; }
.site-footer h4 { color: #fff; font-family: var(--ff-sans); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer a { color: #CFE3DE; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.2rem; padding-top: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #7FA39C; }

/* ---------- Hotel detail ---------- */
.detail-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.25rem; }
@media (max-width: 860px) { .detail-hero { grid-template-columns: 1fr; } }
.detail-hero .shot { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/10; background: var(--jade-50); position: relative; border: 1px solid var(--line-2); }
.detail-hero .shot img { width: 100%; height: 100%; object-fit: cover; }
.booking-box { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.25rem; box-shadow: var(--shadow-2); }
.supplier-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--line-2); }
.supplier-row:first-of-type { border-top: 0; }
.supplier-name { display: flex; align-items: center; gap: .55rem; font-weight: 650; font-size: .95rem; }
.supplier-name img { width: 24px; height: 24px; border-radius: 5px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .1rem; background: var(--line-2); border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); }
.fact { background: var(--paper); padding: .85rem 1rem; }
.fact dt { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-bottom: .15rem; }
.fact dd { margin: 0; font-weight: 650; font-size: 1rem; }

/* ---------- Weather strip ---------- */
.wx { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; }
.wx-day { flex: 0 0 auto; min-width: 74px; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: .55rem .5rem; text-align: center; }
.wx-day .d { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; }
.wx-day .i { font-size: 1.2rem; line-height: 1.4; }
.wx-day .t { font-size: .82rem; font-weight: 650; }
.wx-day .t small { color: var(--faint); font-weight: 500; }

/* ---------- Misc ---------- */
.divider-label { display: flex; align-items: center; gap: 1rem; color: var(--faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.tag-list { display: flex; gap: .4rem; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.count-note { font-size: .86rem; color: var(--muted); }
.disclosure { font-size: .78rem; color: var(--faint); line-height: 1.5; }

/* ==========================================================================
   Homepage v2 — universal search, timeline, themes, ranks, FAQ
   ========================================================================== */

/* ---------- Universal search ---------- */
.unisearch {
  background: var(--paper); border-radius: var(--r-lg); padding: 1rem;
  box-shadow: var(--shadow-3); border: 1px solid var(--line-2);
  display: grid; gap: .75rem; align-items: end;
  grid-template-columns: 2.2fr 1fr 1fr .9fr auto;
}
@media (max-width: 1040px) { .unisearch { grid-template-columns: 1fr 1fr; } .unisearch .go { grid-column: 1 / -1; } .uni-field { grid-column: 1 / -1; } }
@media (max-width: 560px) { .unisearch { grid-template-columns: 1fr; } }

.uni-field { position: relative; }
.uni-field input[type="search"] {
  padding-left: 2.3rem; font-size: 1rem; height: 46px;
  -webkit-appearance: none; appearance: none;
}
.uni-field input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.uni-field .mag {
  position: absolute; left: .75rem; top: calc(50% + 8px); transform: translateY(-50%);
  pointer-events: none; color: var(--faint);
}
.ac-list {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-3); max-height: 340px; overflow-y: auto; padding: .35rem;
}
.ac-item {
  display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left;
  padding: .55rem .7rem; border: 0; background: none; border-radius: var(--r-sm);
  cursor: pointer; font-size: .93rem; color: var(--ink);
}
.ac-item:hover, .ac-item.on { background: var(--jade-50); }
.ac-item .ic { font-size: 1rem; width: 1.4rem; text-align: center; flex: none; }
.ac-item .tx { flex: 1; min-width: 0; }
.ac-item .tx b { display: block; font-weight: 600; }
.ac-item .tx small { color: var(--faint); font-size: .78rem; }
.ac-group { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 700; padding: .6rem .7rem .25rem; }

.quick-links { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: 1rem; }
.quick-links a {
  font-size: .82rem; padding: .3rem .7rem; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #DCEAE6; text-decoration: none;
  border: 1px solid rgba(255,255,255,.18);
}
.quick-links a:hover { background: rgba(255,255,255,.22); color: #fff; text-decoration: none; }

/* ---------- Section headings ---------- */
.section-head { max-width: 62ch; margin-bottom: 1.75rem; }
.section-head h2 { margin-bottom: .5rem; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Ranked stays ---------- */
.rank-list { display: grid; gap: 1rem; }
.rank-card {
  display: grid; grid-template-columns: 62px 200px 1fr auto; gap: 1.1rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 1rem; box-shadow: var(--shadow-1); transition: box-shadow .18s ease, transform .18s ease;
}
.rank-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
@media (max-width: 860px) { .rank-card { grid-template-columns: 48px 1fr; } .rank-card .rk-img { display: none; } .rank-card .rk-act { grid-column: 1 / -1; } }
.rk-num {
  font-family: var(--ff-serif); font-size: 2rem; font-weight: 600; color: var(--gold-500);
  text-align: center; line-height: 1;
}
.rk-num small { display: block; font-family: var(--ff-sans); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; margin-top: .2rem; }
.rk-img { aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; background: var(--jade-50); position: relative; }
.rk-img img { width: 100%; height: 100%; object-fit: cover; }
.rk-body h3 { font-family: var(--ff-sans); font-size: 1.05rem; margin: 0 0 .3rem; font-weight: 650; }
.rk-body h3 a { color: var(--ink); }
.rk-act { text-align: right; display: grid; gap: .4rem; min-width: 150px; }

/* ---------- Theme cards (things to do) ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.theme-card { background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 1.35rem; box-shadow: var(--shadow-1); }
.theme-card .ic { font-size: 1.8rem; line-height: 1; margin-bottom: .6rem; }
.theme-card h3 { font-family: var(--ff-sans); font-size: 1.06rem; margin: 0 0 .45rem; font-weight: 650; }
.theme-card p { font-size: .92rem; color: var(--muted); margin: 0 0 .7rem; }
.theme-card .where { font-size: .82rem; color: var(--jade-700); font-weight: 600; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: .4rem; bottom: .4rem; width: 2px; background: linear-gradient(to bottom, var(--gold-500), var(--jade-100)); }
.tl-item { position: relative; padding-bottom: 1.6rem; }
.tl-item::before { content: ""; position: absolute; left: -1.6rem; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 3px solid var(--gold-500); }
.tl-item:last-child { padding-bottom: 0; }
.tl-year { font-family: var(--ff-serif); font-size: 1.02rem; font-weight: 600; color: var(--jade-800); }
.tl-item h4 { font-family: var(--ff-sans); font-size: .98rem; margin: .1rem 0 .3rem; font-weight: 650; }
.tl-item p { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .6rem; }
.faq details {
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 0 1.1rem; box-shadow: var(--shadow-1); overflow: hidden;
}
.faq details[open] { border-color: var(--jade-100); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative;
  font-weight: 650; font-size: 1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.35rem; color: var(--gold-600); font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq .ans { padding: 0 0 1.1rem; color: var(--muted); font-size: .95rem; }
.faq .ans p:last-child { margin-bottom: 0; }
.faq .ans a { font-weight: 600; }

/* ---------- Stat table ---------- */
.stat-table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--paper); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-1); }
.stat-table th { text-align: left; padding: .65rem .9rem; background: var(--jade-50); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--jade-800); font-weight: 700; }
.stat-table td { padding: .6rem .9rem; border-top: 1px solid var(--line-2); }
.stat-table td:last-child, .stat-table th:last-child { text-align: right; }
.stat-table tbody tr:hover { background: var(--sand); }
.bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--gold-500); vertical-align: middle; margin-right: .5rem; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2rem; } }
.split-rev { grid-template-columns: 1fr 1.15fr; }

.band { background: var(--paper); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.band-dark { background: linear-gradient(160deg, var(--jade-900), var(--jade-800)); color: #CFE3DE; }
.band-dark h2, .band-dark h3, .band-dark h4 { color: #fff; }
.band-dark .tl-item::before { background: var(--jade-900); }
.band-dark .tl-year { color: var(--gold-500); }
.band-dark .tl-item p { color: #A9C6C0; }
.band-dark .timeline::before { background: linear-gradient(to bottom, var(--gold-500), rgba(255,255,255,.15)); }

/* ---------- Call-to-action hint above booking buttons ---------- */
.cta-hint {
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  color: var(--jade-700); text-transform: uppercase;
  margin-top: .5rem; margin-bottom: -.1rem;
}
.cta-hint svg { width: 15px; height: 15px; flex: none; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: .75; }
  50%      { transform: translateY(3px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .cta-hint svg { animation: none; } }

.cta-hint-lg {
  font-size: .82rem; margin: 0 0 .6rem; justify-content: flex-start;
  color: var(--gold-700);
}
.cta-hint-lg svg { width: 17px; height: 17px; }

/* ---------- Sidebar overflow fix ----------------------------------------
   Grid and flex children default to min-width:auto, so a native date input
   (which has a wide intrinsic size from the picker UI) pushes past its
   column instead of shrinking. Force them to shrink.
   ---------------------------------------------------------------------- */
.filters { min-width: 0; }
.filters .grid { min-width: 0; }
label.fld { min-width: 0; }
label.fld > input,
label.fld > select { min-width: 0; max-width: 100%; }
input[type="date"] { min-width: 0; }

/* Native date controls are chunky — trim them inside the narrow sidebar. */
.filters input[type="date"] {
  font-size: .86rem; padding-inline: .5rem;
}
.filters input[type="date"]::-webkit-calendar-picker-indicator {
  margin-inline-start: 0; padding-inline: 0;
}
.filters select { font-size: .9rem; }

/* A little more breathing room for the whole column. */
@media (min-width: 981px) {
  .layout-split { grid-template-columns: 300px 1fr; }
}

/* ---------- Numbered checklist ---------- */
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 2.5rem; }
.check-item {
  display: grid; grid-template-columns: 2rem 1fr; gap: .75rem;
  padding: .85rem 0; border-top: 1px solid var(--line-2); align-items: start;
}
.check-item .n {
  font-family: var(--ff-serif); font-size: 1rem; font-weight: 600;
  color: var(--gold-600); line-height: 1.5; text-align: right;
}
.check-item h4 { font-family: var(--ff-sans); font-size: .97rem; margin: 0 0 .15rem; font-weight: 650; }
.check-item p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.check-item .pl { font-size: .78rem; color: var(--jade-700); font-weight: 600; }
.check-group { margin-top: 2rem; }
.check-group > h3 {
  font-family: var(--ff-sans); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .25rem; font-weight: 700;
}

/* ---------- Big stat band ---------- */
.statband { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .1rem;
  background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; }
.statband .s { background: var(--paper); padding: 1.25rem 1rem; text-align: center; }
.statband .s b { display: block; font-family: var(--ff-serif); font-size: 1.85rem; font-weight: 600;
  color: var(--jade-800); line-height: 1.05; }
.statband .s span { display: block; font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.statband .s .delta { font-size: .74rem; font-weight: 700; margin-top: .3rem; }
.delta-up { color: var(--ok); } .delta-down { color: var(--hot); }
.band-dark .statband { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.14); }
.band-dark .statband .s { background: var(--jade-900); }
.band-dark .statband .s b { color: #fff; }
.band-dark .statband .s span { color: #A9C6C0; }
