:root {
  --orange: #FF4D15;
  --orange-dark: #D93C0A;
  --orange-light: #FDEAE3;
  --orange-tint: rgba(255,77,21,0.08);
  --orange-tint-border: rgba(255,77,21,0.16);
  --ink: #1C1917;
  --gray-700: #57534E;
  --gray-500: #A8A29E;
  --gray-400: #78716C;
  --gray-200: #E7E5E4;
  --gray-100: #F5F5F4;
  --white: #FFFFFF;
  --green: #1FA463;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(28,25,23,0.07);
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--white);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: -0.01em;
}

button, input { font-family: inherit; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  padding-bottom: 78px;
  background: var(--white);
}

.screen { display: none; animation: fadeIn .25s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.container { padding: 0 20px; }

/* Topbar */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}
.topbar h1 { font-size: 17px; margin: 0; flex: 1; font-weight: 800; letter-spacing: -0.02em; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm); border: none;
  background: var(--gray-100); color: var(--ink); display: flex;
  align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.icon-btn:active { background: var(--gray-200); }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 20px; border-radius: var(--radius-md); border: none;
  background: var(--orange); color: #fff; font-size: 15.5px; font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer; box-shadow: 0 10px 20px -6px rgba(255,77,21,0.45);
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { background: var(--gray-200); color: var(--gray-500); box-shadow: none; cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--orange); border: 1.5px solid var(--gray-200); box-shadow: none; }
.btn.dark { background: var(--ink); box-shadow: none; }
.btn.ghost { background: var(--gray-100); color: var(--ink); box-shadow: none; }
.btn.sm { padding: 11px 16px; font-size: 13.5px; }
.btn.green { background: #1FA463; box-shadow: 0 10px 20px -6px rgba(31,164,99,0.4); }

/* Logo lockup */
.logo-lockup { display: flex; align-items: center; gap: 8px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px; flex-shrink: 0; letter-spacing: 0;
}
.logo-mark.on-dark { background: #fff; color: var(--orange); }
.logo-word { font-size: 17px; font-weight: 900; letter-spacing: -0.02em; color: var(--ink); }
.logo-word.on-dark { color: #fff; }
.logo-guide-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: var(--orange-tint); color: var(--orange);
  border: 1px solid var(--orange-tint-border);
}
.logo-guide-tag.on-dark { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.24); }

/* Hero / welcome */
.hero-screen {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(20,16,14,0.25), rgba(20,16,14,0.7)),
    radial-gradient(circle at 25% 15%, #FF8A57, transparent 55%),
    linear-gradient(160deg, #FF4D15 0%, #C93408 55%, #1C1917 130%);
  color: #fff; padding: 24px 24px 32px;
}
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.hero-mid { margin: auto 0; padding: 40px 0; }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,77,21,0.35); }
.hero-eyebrow span { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.75); }
.hero-mid h1 { font-size: 34px; line-height: 1.08; margin: 0 0 14px; font-weight: 900; letter-spacing: -0.02em; }
.hero-mid p { font-size: 15px; line-height: 1.55; opacity: 0.75; margin: 0; max-width: 320px; }
.hero-bottom .btn { background: #fff; color: var(--ink); box-shadow: 0 12px 24px -6px rgba(0,0,0,0.35); }
.hero-bottom .btn svg { color: var(--orange); }

/* Language grid */
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 26px; }
.lang-card {
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-md);
  padding: 18px 10px; text-align: center; font-weight: 800; font-size: 15px;
  cursor: pointer; transition: all .15s ease;
}
.lang-card .flag { font-size: 28px; display: block; margin-bottom: 8px; }
.lang-card.selected { border-color: var(--orange); background: var(--orange-tint); color: var(--orange-dark); }

/* Home hero photo */
.home-hero { position: relative; height: 176px; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 18px; background: var(--gray-200); }
.home-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,25,23,0.05) 0%, rgba(28,25,23,0.1) 45%, rgba(28,25,23,0.72) 100%); }
.home-hero__badge { position: absolute; top: 14px; left: 14px; }
.home-hero__caption { position: absolute; bottom: 14px; left: 14px; display: flex; align-items: center; gap: 8px; color: #fff; }
.home-hero__caption .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,77,21,0.35); }
.home-hero__caption span:last-child { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }

/* Section titles */
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--gray-400); font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 6px; }
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.section-title { font-size: 21px; font-weight: 900; margin: 0 0 14px; letter-spacing: -0.02em; }

/* Benefits */
.benefits-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 4px 20px 6px; margin: 0 -20px; scrollbar-width: none; }
.benefits-scroll::-webkit-scrollbar { display: none; }
.benefit-card {
  flex: 0 0 138px; background: var(--orange-tint); border: 1px solid var(--orange-tint-border);
  border-radius: var(--radius-md); padding: 14px 14px 15px; text-align: left; color: var(--orange-dark);
}
.benefit-card .ic { display: flex; margin-bottom: 22px; color: var(--orange); }
.benefit-card .t { font-size: 12.5px; font-weight: 800; line-height: 1.3; color: var(--ink); }

/* Category chips */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 20px 10px; margin: 0 -20px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 9px 16px; border-radius: var(--radius-sm); background: var(--gray-100);
  font-size: 13.5px; font-weight: 700; color: var(--gray-700); cursor: pointer; white-space: nowrap;
  border: 1.5px solid transparent;
}
.chip.active { background: var(--orange-tint); color: var(--orange-dark); border-color: var(--orange-tint-border); }

/* Route cards */
.route-card {
  border-radius: var(--radius-lg); overflow: hidden; background: var(--white);
  box-shadow: var(--shadow); margin-bottom: 18px; cursor: pointer; border: 1px solid var(--gray-200);
}
.route-card__cover {
  height: 132px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FF7A45, var(--orange) 60%, #B92E06); position: relative; overflow: hidden;
}
.route-card__cover svg { width: 40px; height: 40px; color: rgba(255,255,255,0.95); position: relative; z-index: 1; }
.route-card__cover .bg-ic { position: absolute; width: 120px; height: 120px; color: rgba(255,255,255,0.14); top: -20px; right: -20px; }
.route-card__badge {
  position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.95);
  color: var(--orange-dark); font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: var(--radius-sm);
}
.route-card__body { padding: 16px 18px 18px; }
.route-card__title { font-size: 17px; font-weight: 900; margin: 0 0 6px; letter-spacing: -0.01em; }
.route-card__desc { font-size: 13.5px; color: var(--gray-700); line-height: 1.45; margin: 0 0 12px; }
.route-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.meta-pill { display: flex; align-items: center; gap: 4px; background: var(--gray-100); font-size: 12px; font-weight: 700; color: var(--gray-700); padding: 5px 9px; border-radius: var(--radius-sm); }
.meta-pill svg { width: 13px; height: 13px; }

/* Route detail */
.route-hero { height: 220px; display: flex; align-items: flex-end; padding: 20px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #FF7A45, var(--orange) 55%, #A32805); }
.route-hero__ic { position: absolute; width: 170px; height: 170px; color: rgba(255,255,255,0.12); top: -30px; right: -30px; }
.route-hero-inner { position: relative; color: #fff; }
.route-hero-inner h1 { font-size: 25px; margin: 0 0 6px; font-weight: 900; letter-spacing: -0.02em; }
.route-hero-inner p { margin: 0; font-size: 13.5px; opacity: 0.85; max-width: 300px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.info-item { background: var(--gray-100); border-radius: var(--radius-sm); padding: 12px 14px; }
.info-item .lbl { font-size: 10.5px; color: var(--gray-500); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.info-item .val { font-size: 14.5px; font-weight: 800; }

.note-block { display: flex; gap: 10px; background: var(--orange-tint); border: 1px solid var(--orange-tint-border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0; }
.note-block .ic { color: var(--orange); flex-shrink: 0; margin-top: 1px; }
.note-block p { margin: 0; font-size: 13px; color: var(--gray-700); line-height: 1.45; }

/* map timeline (custom, no iframe) */
.map-visual { background: var(--gray-100); border-radius: var(--radius-md); padding: 14px 16px 4px; margin: 6px 0 14px; }
.map-timeline__item { display: flex; align-items: center; gap: 12px; padding: 6px 0; cursor: pointer; }
.map-timeline__dot { width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12.5px; flex-shrink: 0; }
.map-timeline__label { font-size: 13.5px; font-weight: 700; flex: 1; }
.map-timeline__go { color: var(--gray-500); display: flex; }
.map-timeline__line { width: 1.5px; height: 12px; background: var(--gray-200); margin-left: 14px; }

/* Safety */
.safety-list { list-style: none; padding: 0; margin: 0 0 18px; }
.safety-list li { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--gray-200); font-size: 14px; color: var(--ink); align-items: flex-start; font-weight: 500; }
.safety-list li .ic { color: var(--orange); flex-shrink: 0; margin-top: 1px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; background: var(--gray-100); border-radius: var(--radius-md); padding: 14px 16px; margin: 16px 0; }
.check-row input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--orange); flex-shrink: 0; }
.check-row label { font-size: 13.5px; font-weight: 700; line-height: 1.4; }

/* Progress */
.progress-wrap { padding: 12px 20px 6px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 800; color: var(--gray-700); margin-bottom: 6px; }
.progress-track { height: 8px; background: var(--gray-200); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--orange); border-radius: 999px; transition: width .3s ease; }

/* Rating badge (real Google Maps rating + review count) */
.rating-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; color: var(--ink); }
.rating-badge .star-fill { width: 14px; height: 14px; color: var(--orange); fill: var(--orange); stroke: var(--orange); }
.rating-count { font-weight: 600; color: var(--gray-500); }

/* Stop card */
.stop-num { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--orange); color: #fff; font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.stop-photo { height: 170px; border-radius: var(--radius-lg); background: linear-gradient(150deg, #FF8A57, var(--orange) 60%, #A32805); display: flex; align-items: center; justify-content: center; font-size: 60px; margin-bottom: 14px; position: relative; overflow: hidden; }
.stop-title { font-size: 22px; font-weight: 900; margin: 0 0 8px; letter-spacing: -0.02em; }
.stop-desc { font-size: 14px; color: var(--gray-700); line-height: 1.55; margin: 0 0 14px; }
.stop-why { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--orange-dark); font-weight: 800; margin: 0 0 14px; }
.stop-why svg { flex-shrink: 0; }
.stop-detail-grid { display: flex; flex-direction: column; gap: 0; margin-bottom: 16px; }
.stop-detail-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--gray-200); font-size: 13.5px; }
.stop-detail-row span:first-child { color: var(--gray-500); font-weight: 600; }
.stop-detail-row span:last-child { font-weight: 800; text-align: right; }
.stop-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.stop-actions-row { display: flex; gap: 10px; }
.stop-actions-row .btn { flex: 1; }
.partner-offer { background: var(--orange-tint); border: 1px solid var(--orange-tint-border); border-radius: var(--radius-md); padding: 14px 16px; margin: 14px 0; }
.partner-offer .t { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; color: var(--orange-dark); margin-bottom: 6px; }
.partner-offer .code { display: inline-block; background: #fff; border: 1.5px dashed var(--orange); border-radius: var(--radius-sm); padding: 4px 10px; font-weight: 800; font-size: 13px; letter-spacing: 1px; margin-top: 6px; }
.partner-offer .code--soon { background: var(--gray-100); border: 1.5px dashed var(--gray-500); color: var(--gray-500); cursor: default; }

/* Dev notice banner */
.dev-notice { display: flex; align-items: flex-start; gap: 10px; background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 18px; color: var(--gray-700); font-size: 13px; font-weight: 600; line-height: 1.45; }
.dev-notice svg { color: var(--gray-500); flex-shrink: 0; margin-top: 1px; }

/* Route complete */
.complete-wrap { text-align: center; padding: 30px 10px 10px; }
.complete-wrap .big-ic { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: var(--orange-tint); color: var(--orange); display: flex; align-items: center; justify-content: center; }
.complete-wrap .big-ic svg { width: 32px; height: 32px; }
.complete-wrap h2 { font-size: 23px; margin: 0 0 8px; font-weight: 900; letter-spacing: -0.02em; }
.complete-wrap p { font-size: 14px; color: var(--gray-700); margin: 0 0 22px; }
.complete-actions { display: flex; flex-direction: column; gap: 10px; }

/* Partners */
.partner-card {
  border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow);
  border: 1px solid var(--gray-200); padding: 16px 18px; margin-bottom: 16px;
}
.partner-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.partner-card__logo { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--orange-tint); color: var(--orange); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.partner-card__name { font-weight: 900; font-size: 15.5px; letter-spacing: -0.01em; }
.partner-card__cat { font-size: 11.5px; color: var(--gray-500); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.partner-card__desc { font-size: 13.5px; color: var(--gray-700); line-height: 1.5; margin: 0 0 12px; }
.partner-card__meta { display: flex; gap: 14px; font-size: 12.5px; color: var(--gray-500); margin-bottom: 12px; flex-wrap: wrap; font-weight: 600; }
.partner-card__meta span { display: flex; align-items: center; gap: 4px; }
.partner-card__meta svg { width: 13px; height: 13px; }
.partner-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.partner-card__actions .btn { flex: 1; min-width: 100px; }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px;
  display: flex; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border-top: 1px solid var(--gray-200);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 30;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; color: var(--gray-500); font-size: 10.5px; font-weight: 800; cursor: pointer; border-radius: 12px;
}
.nav-item svg { width: 22px; height: 22px; }
.nav-item.active { color: var(--orange); }

/* Support FAB */
.fab-support {
  position: fixed; right: 16px; bottom: 88px; z-index: 40;
  width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; border: none;
  box-shadow: 0 10px 22px -4px rgba(28,25,23,0.4); cursor: pointer;
}
.fab-support svg { width: 24px; height: 24px; }
.fab-support.hidden { display: none; }

/* Sheet (modal) */
.sheet-overlay {
  position: fixed; inset: 0; background: rgba(20,16,14,0.5); z-index: 50; display: none;
  align-items: flex-end; justify-content: center;
}
.sheet-overlay.open { display: flex; }
.sheet {
  width: 100%; max-width: 480px; background: #fff; border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 40px; height: 4px; background: var(--gray-200); border-radius: 999px; margin: 8px auto 16px; }
.sheet h2 { font-size: 19px; margin: 0 0 16px; font-weight: 900; letter-spacing: -0.02em; }
.sheet-action {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--gray-200);
  cursor: pointer; font-size: 15px; font-weight: 700;
}
.sheet-action .ic { color: var(--orange); width: 26px; display: flex; justify-content: center; flex-shrink: 0; }
.sheet-action:last-child { border-bottom: none; }

/* misc */
.spacer-md { height: 16px; }
.spacer-lg { height: 28px; }
.empty-note { text-align: center; color: var(--gray-500); font-size: 13.5px; padding: 30px 10px; }
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; z-index: 60; opacity: 0;
  pointer-events: none; transition: opacity .2s ease;
}
.toast.show { opacity: 1; }
