/* _scaffold.css — NEUTRAL placeholder styling. TODO: design-system
 *
 * Layout-only, intentionally bland. Its sole job is to make the app shell usable
 * and mobile-app-like for review BEFORE the real design system arrives. When
 * design-system.css + tokens.css land, this file should be deleted (the markup
 * class hooks stay the same). Do NOT add brand colors/typography here.
 */

:root {
  /* Neutral fallbacks (overridden by tokens.css when provided). */
  --c-bg: #f6f7f8;
  --c-surface: #ffffff;
  --c-text: #1c2024;
  --c-muted: #6b7280;
  --c-border: #e4e7eb;
  --c-accent: #0b7d6b;
  --bar-h: 56px;
  --bottom-h: 60px;
  --maxw: 720px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.app {
  background: var(--c-bg);
  color: var(--c-text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

a { color: var(--c-accent); }

/* ---- App bar (fixed top) ---- */
.app-bar {
  position: fixed; inset: 0 0 auto 0; height: calc(var(--bar-h) + var(--safe-t, 0px));
  display: flex; align-items: center; gap: 12px;
  padding: var(--safe-t, 0px) 12px 0; background: var(--c-surface);
  border-bottom: 1px solid var(--c-border); z-index: 40;
}
.app-bar__brand { font-weight: 700; text-decoration: none; color: var(--c-text); }
.app-bar__title { flex: 1; text-align: center; font-size: 14px; color: var(--c-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-bar__menu, .app-bar__search {
  background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--c-text);
  width: 40px; height: 40px; border-radius: 8px;
}
.app-bar__menu:hover, .app-bar__search:hover { background: var(--c-bg); }

/* ---- Main scroll area (clears fixed bars) ---- */
.app__main {
  padding-top: calc(var(--bar-h) + var(--safe-t, 0px));
  padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom));
  min-height: 100vh;
}
.app__main--full { padding: 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 16px; }
.container--center { display: grid; place-items: center; min-height: 70vh; }

/* ---- Bottom nav (fixed) ---- */
.bottom-nav {
  position: fixed; inset: auto 0 0 0; height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--c-surface); border-top: 1px solid var(--c-border); z-index: 40;
}
.bottom-nav__item {
  flex: 1; display: grid; place-items: center; text-decoration: none;
  color: var(--c-muted); font-size: 12px;
}
.bottom-nav__item.is-active { color: var(--c-accent); font-weight: 600; }

/* ---- Drawer ---- */
.drawer[hidden], .search-overlay[hidden], .offline-banner[hidden], .consent[hidden] { display: none; }
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.drawer__panel {
  position: absolute; inset: 0 auto 0 0; width: min(80%, 320px);
  background: var(--c-surface); padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
}
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer__brand { font-weight: 700; }
.drawer__close { background: none; border: 0; font-size: 18px; cursor: pointer; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__link { padding: 12px 8px; text-decoration: none; color: var(--c-text); border-bottom: 1px solid var(--c-border); }
.drawer__foot { margin-top: auto; padding-top: 12px; font-size: 13px; color: var(--c-muted); }

/* ---- Search overlay ---- */
.search-overlay { position: fixed; inset: 0; z-index: 60; background: var(--c-surface); }
.search-overlay__form { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--c-border); }
.search-overlay__input { flex: 1; padding: 12px; font-size: 16px; border: 1px solid var(--c-border); border-radius: 10px; }
.search-overlay__close, .search-overlay__submit {
  padding: 10px 14px; border: 1px solid var(--c-border); background: var(--c-surface); border-radius: 10px; cursor: pointer;
}

/* ---- Banners ---- */
.offline-banner { position: fixed; top: calc(var(--bar-h) + var(--safe-t, 0px)); inset-inline: 0; z-index: 35;
  background: #fff7e6; border-bottom: 1px solid #f0d9a8; padding: 8px 12px; font-size: 14px;
  display: flex; justify-content: space-between; gap: 8px; }
.consent { position: fixed; inset: auto 12px calc(var(--bottom-h) + 12px) 12px; z-index: 50;
  max-width: var(--maxw); margin: 0 auto; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: 12px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.consent__actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.consent__manage { margin-left: auto; font-size: 13px; }

/* ---- Basic building blocks (neutral) ---- */
.hero { padding: 8px 0 16px; }
.hero__sub { color: var(--c-muted); margin-top: 4px; }
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 10px; text-decoration: none; cursor: pointer;
  border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-text); font-size: 15px; }
.btn--primary { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn--ghost { background: transparent; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; background: var(--c-bg); }
.badge--ok { background: #e6f6f1; color: #0b7d6b; }
.checklist { padding-left: 18px; }
.checklist li { margin: 4px 0; }
.note { color: var(--c-muted); font-size: 13px; }
code { background: var(--c-bg); padding: 1px 5px; border-radius: 5px; font-size: 13px; }

/* ---- Toast + bottom sheet hosts ---- */
.toast-host { position: fixed; bottom: calc(var(--bottom-h) + 16px); inset-inline: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: #1c2024; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); pointer-events: auto; }
.toast--error { background: #b3261e; }
.toast--success { background: #0b7d6b; }
.sheet-host[hidden] { display: none; }
.sheet-host { position: fixed; inset: 0; z-index: 70; }
.sheet-host__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sheet { position: absolute; inset: auto 0 0 0; background: var(--c-surface);
  border-radius: 16px 16px 0 0; padding: 16px; max-height: 85vh; overflow-y: auto; }

/* ---- Empty / dev-map helpers ---- */
.empty-state { text-align: center; max-width: 420px; }
.empty-state__actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.dev-map__group { font-family: ui-monospace, monospace; font-size: 15px; color: var(--c-accent); }
.dev-map__list { list-style: none; padding: 0; margin: 8px 0 0; }
.dev-map__row { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--c-border); font-size: 14px; }
.dev-map__method { font-size: 11px; font-weight: 700; color: var(--c-muted); width: 38px; }
.dev-map__handler { margin-left: auto; color: var(--c-muted); font-size: 12px; }
.dev-map__hint { color: var(--c-muted); font-size: 12px; }

/* ---- App-bar actions + switchers (neutral) ---- */
.app-bar__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.app-bar__btn { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--c-text);
  width: 38px; height: 38px; border-radius: 8px; text-decoration: none; display: grid; place-items: center; position: relative; }
.app-bar__btn:hover { background: var(--c-bg); }
.app-bar__badge { position: absolute; top: 2px; right: 2px; background: #b3261e; color: #fff;
  font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 999px; }
.switcher { display: inline-flex; align-items: center; }
.switcher__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.switcher__select { border: 1px solid var(--c-border); border-radius: 8px; padding: 4px 6px; font-size: 13px; background: var(--c-surface); }
.app-bar__brand { white-space: nowrap; }

/* ---- Chips / grids ---- */
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--c-bg);
  border: 1px solid var(--c-border); font-size: 13px; text-decoration: none; color: var(--c-text); }
.chip.is-active, .filter-chip.is-active { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; gap: 12px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid--tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* ---- Cards (neutral) ---- */
.place-card, .article-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; overflow: hidden; position: relative; }
.place-card__img, .article-card__img { width: 100%; height: 130px; object-fit: cover; display: block; background: var(--c-bg); }
.place-card__body, .article-card__body { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.place-card__title, .article-card__title { font-weight: 600; text-decoration: none; color: var(--c-text); }
.place-card__meta, .article-card__meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--c-muted); flex-wrap: wrap; }
.place-card__save { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.9); border: 0;
  width: 32px; height: 32px; border-radius: 999px; cursor: pointer; font-size: 16px; }
.place-card__save.is-saved { color: #b3261e; }
.chip--category { background: var(--c-bg); padding: 2px 8px; font-size: 12px; }
.region-card { display: block; position: relative; border-radius: 12px; overflow: hidden; min-height: 120px; }
.region-card__img { width: 100%; height: 140px; object-fit: cover; display: block; background: var(--c-bg); }
.region-card__overlay { position: absolute; inset: auto 0 0 0; padding: 10px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; }
.region-card__title { margin: 0; font-size: 16px; }
.article-card__kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-accent); }
.category-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; text-decoration: none; color: var(--c-text); }
.category-tile__icon { font-size: 24px; }
.category-tile__count { font-size: 12px; color: var(--c-muted); }

/* ---- Info rows / stamp / disclaimer ---- */
.info-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--c-border); font-size: 14px; }
.info-row__label { color: var(--c-muted); min-width: 110px; }
.info-row__value { flex: 1; }
.info-row__copy { background: none; border: 0; cursor: pointer; color: var(--c-muted); }
.stamp { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--c-muted);
  padding: 8px 10px; background: var(--c-bg); border-radius: 8px; margin: 8px 0; }
.stamp--partial { background: #fff7e6; }
.stamp__note { color: #8a6d00; }
.source-badge { color: var(--c-accent); text-decoration: none; font-weight: 600; }
.disclaimer-banner { display: flex; gap: 8px; padding: 12px; background: #eef2ff; border: 1px solid #d9e0ff;
  border-radius: 10px; font-size: 13px; margin: 12px 0; }
.disclaimer-banner__text { margin: 0; }

/* ---- Tabs / accordion / stepper ---- */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--c-border); overflow-x: auto; }
.tabbar__tab { padding: 10px 14px; text-decoration: none; color: var(--c-muted); white-space: nowrap; }
.tabbar__tab.is-active { color: var(--c-accent); border-bottom: 2px solid var(--c-accent); font-weight: 600; }
.accordion__item { border-bottom: 1px solid var(--c-border); }
.accordion__q { padding: 12px 0; cursor: pointer; font-weight: 600; }
.accordion__a { padding-bottom: 12px; color: var(--c-text); }
.stepper { display: flex; gap: 6px; list-style: none; padding: 0; }
.stepper__step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--c-muted); text-align: center; }
.stepper__dot { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  background: var(--c-bg); border: 1px solid var(--c-border); }
.stepper__step.is-current .stepper__dot { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.stepper__step.is-done .stepper__dot { background: #cdeee5; color: var(--c-accent); }
.stepper__count { font-size: 12px; color: var(--c-muted); text-align: center; }

/* ---- Day items / stat rows ---- */
.day-list { list-style: none; padding: 0; }
.day-item { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 10px; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: 10px; margin-bottom: 6px; }
.day-item__handle { color: var(--c-muted); cursor: grab; }
.day-item__time { font-weight: 600; margin-right: 6px; }
.day-item__title { text-decoration: none; color: var(--c-text); font-weight: 600; }
.day-item__note { display: block; color: var(--c-muted); font-size: 13px; }
.day-item__travel { grid-column: 1 / -1; color: var(--c-muted); font-size: 13px; }
.day-item__travel.is-warn { color: #b3261e; }
.stat-row { margin: 10px 0; }
.stat-row__head { display: flex; justify-content: space-between; font-size: 14px; }
.stat-row__bar { height: 8px; background: var(--c-bg); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.stat-row__fill { display: block; height: 100%; background: var(--c-accent); }
.stat-row.is-over .stat-row__fill { background: #b3261e; }

/* ---- Buttons (call/whatsapp) ---- */
.btn--call { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn--whatsapp { background: #25d366; color: #fff; border-color: #25d366; }

/* ---- Empty / error states ---- */
.empty-state, .error-state { text-align: center; padding: 24px; }
.empty-state__icon, .error-state__icon { font-size: 36px; display: block; margin-bottom: 8px; }
.error-state { background: #fff5f5; border: 1px solid #f3c2c2; border-radius: 10px; }

/* ---- Skeletons ---- */
.skeleton__block { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.skeleton__media { height: 120px; border-radius: 8px; }
.skeleton__line { height: 12px; border-radius: 6px; margin: 8px 0; }
.skeleton__line--title { width: 60%; height: 16px; }
.skeleton__line--short { width: 40%; }
.skeleton__avatar { width: 44px; height: 44px; border-radius: 999px; }
.skeleton__block--list { display: flex; gap: 10px; align-items: center; }
.skeleton__media, .skeleton__line, .skeleton__avatar {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%;
  animation: sk 1.4s ease infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---- Search overlay body + dev gallery ---- */
.search-overlay__body { padding: 16px; }
.search-overlay__section { margin-bottom: 16px; }
.search-overlay__heading { font-size: 13px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.dev-gallery { margin-top: 24px; }
.dev-gallery__h { margin: 20px 0 8px; font-family: ui-monospace, monospace; font-size: 13px; color: var(--c-accent); }
.drawer__group { margin-bottom: 12px; }
.drawer__heading { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); margin: 8px 0 4px; }
.drawer__copy { font-size: 12px; color: var(--c-muted); margin-top: 8px; }
.page-title { margin: 8px 0 16px; }

/* ── Site footer (official sources + nav) ─────────────────────────────── */
.app-footer{
  border-top:1px solid var(--c-border);
  background:var(--c-surface);
  padding:28px 16px calc(var(--bottom-h) + env(safe-area-inset-bottom) + 24px);
  margin-top:32px;
}
.app-footer__inner{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:14px;}
.app-footer__note{margin:0;font-size:13px;line-height:1.55;color:var(--c-muted);}
.app-footer__srclabel{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--c-muted);margin-bottom:6px;}
.app-footer__sources{display:flex;flex-wrap:wrap;gap:8px 16px;}
.app-footer__sources a{font-size:13px;color:var(--c-accent);text-decoration:none;}
.app-footer__sources a:hover{text-decoration:underline;}
.app-footer__links{display:flex;flex-wrap:wrap;gap:8px 18px;padding-top:12px;border-top:1px solid var(--c-border);}
.app-footer__links a{font-size:13.5px;color:var(--c-text);text-decoration:none;}
.app-footer__links a:hover{color:var(--c-accent);}
.app-footer__legal{margin:0;font-size:12px;color:var(--c-muted);}
.app-footer__legal a{color:var(--c-muted);text-decoration:none;}
.app-footer__legal a:hover{text-decoration:underline;}

/* ── Hub FAQ block ────────────────────────────────────────────────────── */
.bx-faq{margin:22px 0 8px;display:flex;flex-direction:column;gap:12px;}
.bx-faq__item{background:var(--c-surface);border:1px solid var(--c-border);border-radius:14px;padding:14px 16px;}
.bx-faq__q{margin:0 0 6px;font-size:15px;font-weight:600;color:var(--c-text);}
.bx-faq__a{margin:0;font-size:14px;line-height:1.55;color:var(--c-muted);}

/* ── Page FAQ (layout-level, index pages) ─────────────────────────────── */
.app-faq{padding:8px 16px 4px;}
.app-faq__inner{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:12px;}
.app-faq__h{font-size:18px;font-weight:600;color:var(--c-text);margin:0 0 4px;}
.app-faq__item{background:var(--c-surface);border:1px solid var(--c-border);border-radius:14px;padding:14px 16px;}
.app-faq__q{margin:0 0 6px;font-size:15px;font-weight:600;color:var(--c-text);}
.app-faq__a{margin:0;font-size:14px;line-height:1.55;color:var(--c-muted);}
