/* ============================================================
   Caribbean Princess Guide — components
   Mobile / thumb-first. Every interactive target >= 44px.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 15.5px;
  background: var(--hull);
  color: var(--ink);
  line-height: 1.52;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
  min-height: 100dvh;
}

/* Chart ground: depth contours + tinted light wells */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(880px 500px at 82% -6%,  rgba(46,196,182,.17), transparent 62%),
    radial-gradient(680px 400px at 4% 6%,    rgba(224,170,78,.10), transparent 60%),
    radial-gradient(900px 640px at 50% 112%, rgba(15,95,116,.28), transparent 66%),
    var(--contours);
  background-size: auto, auto, auto, 420px 300px;
}
/* Film grain — the whole app reads as printed stock */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-image: var(--grain);
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: var(--wonk-display);
  font-weight: 800; line-height: 1.08; margin: 0; letter-spacing: -.014em;
}
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
a { color: var(--turquoise); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--plate-2); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 2.5px solid var(--shallow); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--turquoise); color: var(--abyss); }

.app { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: 780px; margin: 0 auto; padding: 0 var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================
   Top bar — brass-ruled masthead
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  padding-top: var(--safe-t);
  background: var(--hull);
  background: color-mix(in srgb, var(--hull) 88%, transparent);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 1px 0 var(--hair-soft), 0 10px 26px -22px rgba(0,0,0,.9);
}
.topbar__row {
  display: flex; align-items: center; gap: 11px;
  height: 58px; max-width: 780px; margin: 0 auto; padding: 0 var(--pad);
}
.topbar__title { flex: 1; min-width: 0; }
.topbar__title small {
  display: block; font-size: .58rem; font-weight: 700; color: var(--brass);
  letter-spacing: .22em; text-transform: uppercase; margin-bottom: 1px;
}
.topbar__title span {
  display: block; font-family: var(--display); font-variation-settings: var(--wonk-ui);
  font-weight: 800; font-size: 1.06rem; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.iconbtn {
  width: var(--tap); height: var(--tap); min-width: var(--tap);
  display: grid; place-items: center;
  background: var(--plate); border: 1px solid var(--hair);
  border-radius: 13px; cursor: pointer; color: var(--ink-2);
  transition: transform .12s ease, color .18s ease, border-color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.iconbtn:active { transform: scale(.92); }
.iconbtn:hover { color: var(--shallow); border-color: var(--hair-hot); }
.iconbtn svg { width: 20px; height: 20px; }

/* Search */
.searchbar { padding: 0 var(--pad) 13px; max-width: 780px; margin: 0 auto; }
.searchbar input {
  width: 100%; height: 50px; padding: 0 16px 0 45px;
  border-radius: 13px; border: 1px solid var(--hair);
  background: var(--plate) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236fe3d4' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E") no-repeat 15px center / 18px;
  color: var(--ink); font-family: var(--body); font-size: 16px; /* 16px = no iOS zoom */
  transition: border-color .2s ease, box-shadow .2s ease;
}
.searchbar input:focus { outline: none; border-color: var(--hair-hot); box-shadow: var(--glow); }
.searchbar input::placeholder { color: var(--ink-4); }

/* ============================================================
   Tab bar — the brass console, pinned in the thumb zone
   ============================================================ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding-bottom: var(--safe-b);
  background: var(--hull-2);
  background: color-mix(in srgb, var(--hull-2) 93%, transparent);
  backdrop-filter: saturate(190%) blur(20px);
  -webkit-backdrop-filter: saturate(190%) blur(20px);
  border-top: 1px solid var(--hair);
  box-shadow: 0 -12px 30px -20px rgba(0,0,0,.95);
}
.tabbar__btn {
  height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: none; border: 0; cursor: pointer; color: var(--ink-4);
  font-size: .575rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  position: relative; -webkit-tap-highlight-color: transparent;
  transition: color .2s ease, transform .12s ease;
}
.tabbar__btn svg { width: 21px; height: 21px; transition: transform .28s cubic-bezier(.34,1.56,.64,1); }
.tabbar__btn[aria-current="page"] { color: var(--shallow); }
.tabbar__btn[aria-current="page"] svg { transform: translateY(-1.5px) scale(1.1); }
.tabbar__btn[aria-current="page"]::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 3px; border-radius: 0 0 4px 4px; background: var(--g-tropic);
  box-shadow: 0 0 12px rgba(111,227,212,.7);
}
.tabbar__btn:active { transform: scale(.93); }

/* ============================================================
   Views + orchestrated page-load reveal
   ============================================================ */
.view { display: none; padding-bottom: 30px; }
.view.is-active { display: block; }
.view.is-active > * { animation: rise .46s cubic-bezier(.22,.9,.28,1) both; }
.view.is-active > *:nth-child(1) { animation-delay: .02s; }
.view.is-active > *:nth-child(2) { animation-delay: .07s; }
.view.is-active > *:nth-child(3) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* stagger children of a rendered stack on first paint */
.stack > .item { animation: rise .4s cubic-bezier(.22,.9,.28,1) both; }
.stack > .item:nth-child(1) { animation-delay: .02s; }
.stack > .item:nth-child(2) { animation-delay: .05s; }
.stack > .item:nth-child(3) { animation-delay: .08s; }
.stack > .item:nth-child(4) { animation-delay: .11s; }
.stack > .item:nth-child(5) { animation-delay: .14s; }
.stack > .item:nth-child(n+6) { animation-delay: .17s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  body::after { display: none; }
}

/* ============================================================
   Section headers — chart-plate rules
   ============================================================ */
.sect { margin: 30px 0 13px; display: flex; align-items: baseline; gap: 12px; }
.sect h2 { font-size: 1.34rem; }
.sect::after {
  content: ''; flex: 1; height: 1px; margin-left: -2px;
  background: linear-gradient(90deg, var(--hair), transparent);
  align-self: center;
}
.sect__hint {
  font-size: .64rem; font-weight: 700; color: var(--brass);
  letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; order: 3;
}
.eyebrow {
  font-size: .62rem; font-weight: 700; letter-spacing: .26em; text-transform: uppercase;
  color: var(--brass); margin-bottom: 8px;
}
.lede { color: var(--ink-2); font-size: .93rem; margin-bottom: 14px; }

/* ============================================================
   Hero — duotoned ship plate
   ============================================================ */
.hero { position: relative; overflow: hidden; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.hero img {
  width: 100%; height: 300px; object-fit: cover;
  filter: saturate(1.15) contrast(1.08);
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(200deg, rgba(46,196,182,.24), transparent 46%),
              linear-gradient(0deg, rgba(224,170,78,.10), transparent 40%);
  mix-blend-mode: overlay;
}
.hero__scrim {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(4,20,31,.10) 0%, rgba(4,20,31,.55) 52%, rgba(7,32,47,.97) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px var(--pad) 20px;
}
.hero h1 {
  font-size: clamp(2rem, 9.5vw, 2.9rem); color: #fff;
  font-variation-settings: 'SOFT' 50, 'WONK' 1, 'opsz' 144;
  font-weight: 900; letter-spacing: -.028em; line-height: .94;
  text-shadow: 0 3px 22px rgba(0,0,0,.6);
}
.hero__sub { color: rgba(255,255,255,.9); font-size: .9rem; margin-top: 9px; font-weight: 500; max-width: 34ch; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
/* horizon rule under the hero */
.hero__rule { height: 2px; background: var(--g-sunset); opacity: .85; }

/* ============================================================
   Plates (cards)
   ============================================================ */
.card {
  position: relative; background: var(--plate);
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: 15px; box-shadow: var(--lift-1);
}
.card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 46%;
  background: var(--g-sheen); border-radius: var(--r) var(--r) 0 0; pointer-events: none;
}
.card + .card { margin-top: 11px; }
.card > * { position: relative; }

.stack { display: flex; flex-direction: column; gap: 11px; }

/* ---------- Expandable entry ---------- */
.item {
  position: relative; background: var(--plate);
  border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden;
  transition: border-color .24s ease, box-shadow .24s ease, background .24s ease;
}
.item::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--g-tropic); opacity: 0; transition: opacity .24s ease;
}
.item.is-open { border-color: var(--hair-hot); box-shadow: var(--lift-2); background: var(--plate-2); }
.item.is-open::after { opacity: 1; }

.item__head {
  width: 100%; display: flex; align-items: center; gap: 13px;
  padding: 13px 15px; min-height: 66px;
  background: none; border: 0; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.item__head:active { background: var(--plate-3); }
.item__ico {
  width: 44px; height: 44px; min-width: 44px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--plate-2); border: 1px solid var(--hair-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.item.is-open .item__ico { background: var(--plate-3); border-color: var(--hair); }
.item__txt { flex: 1; min-width: 0; }
.item__name {
  display: block; font-family: var(--display); font-variation-settings: var(--wonk-ui);
  font-weight: 700; font-size: 1.02rem; letter-spacing: -.008em;
}
.item__meta {
  display: block; margin-top: 3px;
  font-size: .755rem; color: var(--ink-3); font-weight: 500; line-height: 1.4;
}
.item__chev { width: 20px; height: 20px; color: var(--ink-4); flex-shrink: 0; transition: transform .3s cubic-bezier(.34,1.4,.64,1), color .2s; }
.item.is-open .item__chev { transform: rotate(180deg); color: var(--shallow); }

.item__body { display: none; padding: 14px 15px 16px; border-top: 1px solid var(--hair-soft); }
.item.is-open .item__body { display: block; animation: rise .3s cubic-bezier(.22,.9,.28,1) both; }
.item__body > img { border-radius: var(--r-sm); margin-bottom: 13px; border: 1px solid var(--hair-soft); }
.item__body p { font-size: .92rem; color: var(--ink-2); }

/* Key/value grid */
.kv { display: grid; grid-template-columns: 82px 1fr; gap: 8px 13px; font-size: .87rem; margin-top: 13px; }
.kv dt {
  color: var(--brass); font-weight: 700; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .13em; padding-top: 4px;
}
.kv dd { margin: 0; color: var(--ink); }

/* ============================================================
   Cabin floor plans
   ============================================================ */
.planwrap { margin: 0 0 14px; padding: 12px; background: var(--plate); border: 1px solid var(--hair-soft); border-radius: var(--r-sm); }
.planwrap svg.plan { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.planwrap figcaption { margin-top: 10px; font-size: .72rem; color: var(--ink-3); line-height: 1.45; text-align: center; }

.balcompare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.balcompare figure { margin: 0; padding: 10px 6px 11px; background: var(--plate); border: 1px solid var(--hair); border-radius: var(--r-sm); text-align: center; }
.balcompare svg { display: block; width: 100%; height: auto; }
.bc__deck { font-family: var(--display); font-variation-settings: var(--wonk-ui); font-weight: 700; font-size: .72rem; color: var(--ink); margin-bottom: 6px; }
.bc__note { font-size: .64rem; color: var(--ink-3); margin-top: 7px; line-height: 1.35; }

/* ============================================================
   Cabin locator
   ============================================================ */
.lookup { margin-bottom: 4px; }
.lookup input {
  width: 100%; height: 54px; padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--hair);
  background: var(--plate); color: var(--ink);
  font-family: var(--display); font-variation-settings: var(--wonk-ui);
  font-size: 17px; font-weight: 700; letter-spacing: .04em;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lookup input:focus { outline: none; border-color: var(--hair-hot); box-shadow: var(--glow); }
.lookup input::placeholder { font-family: var(--body); font-weight: 400; font-size: 15px; letter-spacing: 0; color: var(--ink-4); }

.cabin {
  margin-top: 11px; padding: 15px;
  background: var(--plate-2); border: 1px solid var(--hair-hot);
  border-radius: var(--r); box-shadow: var(--lift-2);
  animation: rise .3s cubic-bezier(.22,.9,.28,1) both;
}
.cabin__head { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; }
.cabin__code {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 10px;
  background: var(--g-tropic); color: var(--abyss);
  font-family: var(--display); font-variation-settings: var(--wonk-ui);
  font-weight: 800; font-size: 1.24rem; letter-spacing: .02em;
}
.cabin__where { font-size: .78rem; color: var(--ink-3); line-height: 1.35; }
.cabin__where b {
  display: block; color: var(--ink); font-size: 1rem; font-weight: 700;
  font-family: var(--display); font-variation-settings: var(--wonk-ui);
}
.cstrip { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.cabin__note { font-size: .87rem; color: var(--ink-2); margin: 10px 0 0; text-align: center; }
.cabin__miss { font-size: .87rem; color: var(--ink-2); margin-top: 12px; padding: 13px 14px; background: var(--plate); border: 1px solid var(--hair); border-radius: var(--r); }
.cabin__miss b { color: var(--shallow); }

.cabin__rules { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 9px; }
.cr {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .87rem; line-height: 1.45; color: var(--ink-2);
  padding: 11px 12px; border-radius: var(--r-sm);
  border: 1px solid var(--hair-soft); background: var(--plate);
}
.cr > span { flex: 0 0 auto; font-size: .9rem; line-height: 1.5; }
.cr strong { color: var(--ink); }
.cr--warn   { border-color: color-mix(in srgb, var(--coral) 42%, transparent); }
.cr--warn > span   { color: var(--coral); }
.cr--good   { border-color: color-mix(in srgb, var(--palm) 42%, transparent); }
.cr--good > span   { color: var(--palm); }
.cr--access { border-color: color-mix(in srgb, var(--shallow) 42%, transparent); }
.cr--access > span { color: var(--shallow); }
.cr--info > span   { color: var(--brass); }

/* ============================================================
   Pills
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 7px;
  font-size: .625rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  border: 1px solid currentColor; white-space: nowrap; line-height: 1.35;
}
.pill--free   { color: var(--free);   background: color-mix(in srgb, var(--free) 13%, transparent); }
.pill--paid   { color: var(--paid);   background: color-mix(in srgb, var(--paid) 13%, transparent); }
.pill--kids   { color: var(--kids);   background: color-mix(in srgb, var(--kids) 13%, transparent); }
.pill--adults { color: var(--adults); background: transparent; background: color-mix(in srgb, var(--adults) 15%, transparent); }
.pill--info   { color: var(--info);   background: color-mix(in srgb, var(--info) 11%, transparent); }
.pill--warn   { color: var(--warn);   background: color-mix(in srgb, var(--warn) 13%, transparent); }
.pill--deck   { color: var(--brass-dim); background: transparent; background: color-mix(in srgb, var(--brass-dim) 13%, transparent); }
.pill--solid  { color: var(--abyss); background: var(--shallow); border-color: transparent; font-weight: 800; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   Filter chips — horizontal thumb rail
   ============================================================ */
.chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 3px var(--pad) 13px; margin: 0 calc(var(--pad) * -1);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-height: 46px; padding: 0 15px;
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 11px; border: 1px solid var(--hair);
  background: var(--plate); color: var(--ink-2);
  font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  scroll-snap-align: start; -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease;
}
.chip b { font-weight: 700; opacity: .72; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] {
  background: var(--g-tropic); color: var(--abyss);
  border-color: transparent; box-shadow: 0 4px 18px -4px rgba(46,196,182,.55);
}
.chip[aria-pressed="true"] b { opacity: .62; }
.chip:active { transform: scale(.95); }

/* ============================================================
   Quick tiles
   ============================================================ */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.tile {
  position: relative; overflow: hidden; min-height: 104px; padding: 14px;
  border-radius: var(--r); border: 1px solid var(--hair); background: var(--plate);
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .16s cubic-bezier(.34,1.4,.64,1), border-color .22s ease, box-shadow .22s ease;
}
.tile::before { content: ''; position: absolute; inset: 0 0 auto; height: 60%; background: var(--g-sheen); pointer-events: none; }
.tile::after {
  content: ''; position: absolute; right: -26px; bottom: -26px; width: 82px; height: 82px;
  border-radius: 50%; background: var(--g-tropic); opacity: .1; transition: opacity .25s ease, transform .35s ease;
}
.tile:active { transform: scale(.965); }
.tile:hover { border-color: var(--hair-hot); box-shadow: var(--lift-2); }
.tile:hover::after { opacity: .2; transform: scale(1.15); }
.tile__ico { font-size: 1.55rem; line-height: 1; position: relative; }
.tile__label {
  display: block; font-family: var(--display); font-variation-settings: var(--wonk-ui);
  font-weight: 700; font-size: .98rem; position: relative;
}
.tile__sub { display: block; font-size: .72rem; color: var(--ink-3); margin-top: 2px; position: relative; }

/* ============================================================
   Stat strip — ship's log figures
   ============================================================ */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.stat {
  position: relative; background: var(--plate); border: 1px solid var(--hair);
  border-radius: var(--r-sm); padding: 13px 8px 11px; text-align: center; overflow: hidden;
}
.stat::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--g-brass); }
.stat__n {
  font-family: var(--display); font-variation-settings: 'SOFT' 30, 'WONK' 0, 'opsz' 60;
  font-weight: 800; font-size: 1.22rem; color: var(--shallow); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat__l { font-size: .58rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-top: 3px; }

/* ============================================================
   DECK MAP — the signature: a brass-framed chart plate
   ============================================================ */
.deckpicker {
  display: flex; gap: 7px; overflow-x: auto;
  padding: 3px var(--pad) 14px; margin: 0 calc(var(--pad) * -1);
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.deckpicker::-webkit-scrollbar { display: none; }
.deckbtn {
  flex: 0 0 auto; width: 62px; min-height: 60px; border-radius: 12px;
  border: 1px solid var(--hair); background: var(--plate);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; scroll-snap-align: center;
  transition: background .2s ease, border-color .2s ease, transform .14s ease;
}
.deckbtn strong {
  font-family: var(--display); font-variation-settings: 'SOFT' 30, 'WONK' 0, 'opsz' 60;
  font-size: 1.22rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.05;
}
.deckbtn span { font-size: .53rem; color: var(--ink-4); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.deckbtn:active { transform: scale(.94); }
.deckbtn[aria-pressed="true"] { background: var(--g-tropic); border-color: transparent; box-shadow: 0 5px 20px -6px rgba(46,196,182,.6); }
.deckbtn[aria-pressed="true"] strong, .deckbtn[aria-pressed="true"] span { color: var(--abyss); }

.mapwrap {
  position: relative; background: var(--plate);
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: 11px 11px 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  box-shadow: var(--lift-1), inset 0 0 60px rgba(4,20,31,.4);
}
.mapwrap::before {
  content: ''; position: absolute; inset: 5px; border: 1px solid var(--hair-soft);
  border-radius: 9px; pointer-events: none;
}
.mapwrap svg { display: block; min-width: 620px; width: 100%; height: auto; }
/* vertical plate (phones) fits the column exactly — no sideways scroll */
.mapwrap--v { overflow-x: visible; padding: 6px 4px 2px; }
.mapwrap--v svg { min-width: 0; }
.map-hint {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: .68rem; color: var(--ink-4); margin-top: 9px; text-align: center;
}
.map-hint::before, .map-hint::after { content: ''; height: 1px; flex: 1; max-width: 46px; background: var(--hair); }

.zone { cursor: pointer; }
.zone rect { transition: filter .18s ease, opacity .18s ease; }
.zone:hover rect { filter: brightness(1.18); }
.zone:active rect { filter: brightness(1.3); }

.legend {
  display: flex; flex-wrap: wrap; gap: 7px 15px; margin-top: 14px;
  font-size: .7rem; color: var(--ink-2); font-weight: 500;
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }

/* ============================================================
   Gallery
   ============================================================ */
.gallery {
  display: flex; gap: 11px; overflow-x: auto; padding: 2px var(--pad) 10px;
  margin: 0 calc(var(--pad) * -1); scroll-snap-type: x proximity;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure {
  flex: 0 0 80%; margin: 0; scroll-snap-align: center;
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--hair);
  background: var(--plate); box-shadow: var(--lift-1);
}
.gallery img { width: 100%; height: 200px; object-fit: cover; }
.gallery figcaption { padding: 10px 12px 12px; font-size: .74rem; color: var(--ink-3); }
.gallery figcaption b {
  display: block; color: var(--ink); font-family: var(--display);
  font-variation-settings: var(--wonk-ui); font-size: .86rem; font-weight: 700; margin-bottom: 2px;
}

/* ============================================================
   Callouts
   ============================================================ */
.note {
  border-radius: var(--r); padding: 13px 14px; font-size: .87rem;
  border: 1px solid var(--hair); background: var(--plate-2);
  display: flex; gap: 11px; align-items: flex-start; color: var(--ink-2);
}
.note b { font-family: var(--display); font-variation-settings: var(--wonk-ui); color: var(--ink); font-weight: 700; }
.note__ico { font-size: 1.05rem; line-height: 1.35; flex-shrink: 0; }
.note--tip   { border-color: color-mix(in srgb, var(--turquoise) 42%, transparent); background: color-mix(in srgb, var(--turquoise) 10%, var(--plate)); }
.note--warn  { border-color: color-mix(in srgb, var(--coral) 46%, transparent);     background: color-mix(in srgb, var(--coral) 10%, var(--plate)); }
.note--kids  { border-color: color-mix(in srgb, var(--kids) 42%, transparent);      background: color-mix(in srgb, var(--kids) 9%, var(--plate)); }
.note--money { border-color: color-mix(in srgb, var(--brass) 46%, transparent);     background: color-mix(in srgb, var(--brass) 10%, var(--plate)); }

/* ============================================================
   Lists
   ============================================================ */
.ticks { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: .88rem; color: var(--ink-2); }
/* block + absolute marker, NOT flex — flex would split bold runs into columns */
.ticks li { display: block; position: relative; padding-left: 21px; }
.ticks li::before {
  content: '▸'; position: absolute; left: 0; top: 0;
  color: var(--turquoise); font-weight: 800; line-height: 1.52;
}
.ticks--yes li::before { content: '✓'; color: var(--free); }
.ticks--no  li::before { content: '✕'; color: var(--warn); }
.ticks strong { color: var(--ink); }

/* ============================================================
   Tables
   ============================================================ */
.tablewrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--r); border: 1px solid var(--hair); box-shadow: var(--lift-1);
}
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .82rem; background: var(--plate); }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--hair-soft); vertical-align: top; color: var(--ink-2); }
th {
  background: var(--plate-2); font-family: var(--display); font-variation-settings: var(--wonk-ui);
  font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; color: var(--brass);
  font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
td strong, th[scope="row"] { color: var(--ink); font-weight: 700; }
th[scope="row"] { background: var(--plate-2); font-size: .7rem; letter-spacing: .08em; }

/* Below 700px a 3-column table cannot fit, and a silent horizontal
   scroll hides data. Re-flow each row into a labelled card instead. */
@media (max-width: 699px) {
  .tablewrap { border: 0; box-shadow: none; overflow: visible; border-radius: 0; }
  .tablewrap table { min-width: 0; display: block; background: none; font-size: .88rem; }
  .tablewrap thead { display: none; }
  .tablewrap tbody { display: block; }
  .tablewrap tr {
    display: block; padding: 14px 15px;
    background: var(--plate); border: 1px solid var(--hair); border-radius: var(--r);
  }
  .tablewrap tr + tr { margin-top: 10px; }
  .tablewrap td, .tablewrap th[scope="row"] {
    display: block; padding: 0; border: 0; background: none; position: static;
  }
  .tablewrap td + td {
    margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--hair-soft);
  }
  .tablewrap td[data-l]::before,
  .tablewrap th[scope="row"] {
    content: attr(data-l); display: block;
    font-family: var(--display); font-variation-settings: var(--wonk-ui);
    font-size: .6rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
    color: var(--brass); margin-bottom: 5px;
  }
  /* first cell is the row's own heading, so it needs no column label */
  .tablewrap tr > td:first-child::before { display: none; }
  .tablewrap tr > td:first-child {
    font-family: var(--display); font-variation-settings: var(--wonk-ui);
    font-size: 1.06rem; font-weight: 700; color: var(--ink); line-height: 1.2;
  }
  .tablewrap tr > td:first-child strong { font-weight: 700; }
  /* two-column spec tables: th is the label, td the value */
  .tablewrap tr > th[scope="row"] + td { margin-top: 0; padding-top: 0; border-top: 0; }
  /* ...and 17 of those as separate cards is too much air — collapse the
     spec table into one panel with divided rows instead. */
  .tablewrap--spec { border: 1px solid var(--hair); border-radius: var(--r); overflow: hidden; box-shadow: var(--lift-1); }
  .tablewrap--spec tr { border: 0; border-radius: 0; padding: 11px 15px; }
  .tablewrap--spec tr + tr { margin-top: 0; border-top: 1px solid var(--hair-soft); }
}

/* ============================================================
   Search results
   ============================================================ */
.result {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 12px 14px; min-height: 66px; text-align: left; cursor: pointer;
  background: var(--plate); border: 1px solid var(--hair); border-radius: var(--r);
  transition: border-color .2s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.result:active { transform: scale(.985); }
.result:hover { border-color: var(--hair-hot); }
.result + .result { margin-top: 9px; }
.result__where { display: block; font-size: .7rem; color: var(--brass); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; margin-top: 2px; }
mark { background: color-mix(in srgb, var(--shallow) 34%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ============================================================
   Empty / footer
   ============================================================ */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-3); font-size: .9rem; }
.empty__ico { font-size: 2.4rem; margin-bottom: 12px; opacity: .7; }

.foot { margin-top: 38px; padding: 20px 0 8px; border-top: 1px solid var(--hair-soft); font-size: .72rem; color: var(--ink-4); line-height: 1.6; }
.foot a { color: var(--ink-3); display: inline-block; padding: 6px 2px; }
.foot strong { color: var(--ink-3); }

/* ============================================================
   Bottom sheet
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(2,12,19,.68);
  opacity: 0; pointer-events: none; transition: opacity .28s ease;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  max-height: 86dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--hull-2); border-top: 1px solid var(--hair-hot);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  transform: translateY(100%); transition: transform .34s cubic-bezier(.22,.9,.28,1);
  padding: 8px var(--pad) calc(30px + var(--safe-b)); box-shadow: var(--lift-3);
}
.sheet.is-open { transform: none; }
.sheet__grab { width: 40px; height: 4px; border-radius: 99px; background: var(--hair-hot); margin: 7px auto 16px; }
.sheet h3 { font-size: 1.22rem; margin-bottom: 8px; }
.sheet__close {
  width: 100%; min-height: var(--tap); margin-top: 20px; border-radius: 12px;
  border: 1px solid var(--hair); background: var(--plate); color: var(--ink-2);
  font-weight: 700; cursor: pointer;
}

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 860px) {
  body { font-size: 16px; padding-bottom: calc(var(--tabbar-h) + 40px); }
  /* Floating dock. It must stay `fixed`: the nav sits after .app in the DOM,
     so `sticky` would drop it to the foot of the document. */
  .tabbar {
    left: 50%; right: auto; bottom: 22px; transform: translateX(-50%);
    width: min(680px, calc(100% - 48px));
    border: 1px solid var(--hair); border-radius: 18px;
    box-shadow: var(--lift-3);
    overflow: hidden;
  }
  .tabbar__btn:active { transform: none; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .gallery figure { flex-basis: 44%; }
  .gallery img { height: 230px; }
  .mapwrap svg { min-width: 0; }
  .hero img { height: 380px; }
  .kv { grid-template-columns: 100px 1fr; }
}

/* ============================================================
   Print — a genuine paper handout
   ============================================================ */
@media print {
  .tabbar, .topbar, .searchbar, .chips, .deckpicker, .sheet, .sheet-backdrop, .map-hint { display: none !important; }
  body::before, body::after { display: none !important; }
  body { background: #fff; color: #000; padding: 0; font-size: 10.5pt; }
  /* Print the section you are looking at, not all seven — printing the whole
     guide runs to hundreds of pages. Switch tabs, then print again. */
  .view { display: none; }
  .view.is-active { display: block !important; }
  .view.is-active > * { animation: none !important; opacity: 1 !important; transform: none !important; }
  .item__body { display: block !important; }
  .item { break-inside: avoid; }
  .item, .card, .note, .tablewrap { border: 1px solid #bbb !important; background: #fff !important; box-shadow: none !important; break-inside: avoid; }
  .item__chev { display: none; }
  h1, h2, h3 { color: #000; }
  .hero img { height: 200px; }
}
