/* SkyBee Tracker — mobile-first stylesheet
   Brand: navy #1B2D5B, yellow #FFC72C, sky #4A9DDB
   Mobile-first; desktop adapted at >= 768px and >= 1280px
*/

:root {
  --navy:       #1B2D5B;
  --navy-soft:  #2C3F70;
  --yellow:     #FFC72C;
  --yellow-dk:  #E0AE1F;
  --sky:        #4A9DDB;
  --sky-bg:     #E8F4FB;
  --sky-bg-2:   #F4FAFE;
  --white:      #FFFFFF;
  --green:      #2E9E5C;
  --green-bg:   #E2F4EA;
  --red:        #C8443A;
  --red-bg:     #FBE6E4;
  --gray:       #6B7785;
  --gray-light: #E5E9EE;
  --shadow-sm:  0 1px 3px rgba(27, 45, 91, 0.06), 0 1px 2px rgba(27, 45, 91, 0.04);
  --shadow-md:  0 4px 16px rgba(27, 45, 91, 0.08);
  --shadow-lg:  0 10px 30px rgba(27, 45, 91, 0.14);
  --radius-md:  14px;
  --radius-lg:  22px;

  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-text:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, var(--sky-bg) 0%, var(--sky-bg-2) 60%, var(--white) 100%);
  background-attachment: fixed;
  color: var(--navy);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}

button { font: inherit; cursor: pointer; }

/* ==================== HERO BANNER (top of page, full-bleed brand artwork) ==================== */
.sb-banner {
  background: linear-gradient(180deg, #DCEDFA 0%, #F4FAFE 100%);
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  overflow: hidden;
}
.sb-banner__img {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
}

/* ==================== STICKY HEADER (slim, appears after banner scrolls away) ==================== */
.sb-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-light);
  box-shadow: var(--shadow-sm);
}

.sb-header__brand { display: flex; align-items: center; gap: 10px; }
.sb-header__mascot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(27, 45, 91, 0.18);
  border: 2px solid var(--white);
}
.sb-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.sb-wm-sky { color: var(--navy); }
.sb-wm-bee { color: var(--yellow); }
.sb-tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--sky);
  margin-top: 2px;
}

.sb-pill {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--green-bg);
  color: var(--green);
  border: 0;
  font-family: var(--font-text);
}
.sb-pill--muted { background: var(--gray-light); color: var(--gray); }
.sb-pill--warn  { background: #FFF1D6;       color: #A0691B; }
.sb-pill--btn   { background: var(--gray-light); color: var(--navy); cursor: pointer; padding: 4px 10px; }
.sb-pill--ver   { background: var(--navy); color: var(--yellow); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.02em; }
.sb-header__meta { display: flex; align-items: center; gap: 6px; }

/* ==================== MAIN ==================== */
.sb-main { padding: 14px 14px 80px; max-width: 720px; margin: 0 auto; }

/* ==================== SEARCH (Google Travel inspired) ==================== */
.sb-search {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
  border: 1px solid rgba(74, 157, 219, 0.12);
}

.sb-search__chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.sb-search__chip {
  background: var(--gray-light);
  border: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
}
.sb-search__chip--active {
  background: var(--navy);
  color: var(--white);
}
.sb-search__pax {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gray-light);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin-left: auto;
}
.sb-search__pax-btn {
  background: var(--white);
  border: 1px solid var(--gray-light);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* hit area >= 44px via outer touch zone (no visible change) */
  position: relative;
}
.sb-search__pax-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
}
.sb-search__pax-lbl { font-weight: 500; color: var(--gray); }
.sb-search__class {
  border: 1px solid var(--gray-light);
  background: var(--white);
  border-radius: 999px;
  padding: 5px 26px 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%231B2D5B' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}

.sb-search__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.sb-search__row--dates { grid-template-columns: 1fr 1fr; gap: 8px; }

.sb-search__field {
  background: var(--sky-bg-2);
  border-radius: 12px;
  padding: 8px 12px;
  border: 1px solid transparent;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.sb-search__field:focus-within {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(74, 157, 219, 0.18);
}
.sb-search__lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sb-search__inp {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  padding: 2px 0 0;
  font-family: var(--font-text);
}
.sb-search__inp[type="date"] { font-size: 14px; }

.sb-search__swap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--sky);
  color: var(--sky);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  align-self: end;
  margin-bottom: 4px;
}

.sb-search__stay {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sky-bg);
  color: var(--navy);
  font-size: 12px;
  font-weight: 600;
}
.sb-search__stay strong { color: var(--yellow-dk); }

.sb-search__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.sb-search__primary {
  flex: 1;
  background: linear-gradient(135deg, var(--navy) 0%, #2C3F70 100%);
  color: var(--white);
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(27, 45, 91, 0.25);
}
.sb-search__primary:active { transform: translateY(1px); }
.sb-search__secondary {
  font-size: 12px;
  font-weight: 600;
  color: var(--sky);
  text-decoration: none;
  padding: 6px 0;
}

/* ==================== SAVED TRIPS ==================== */
.sb-saved { margin-bottom: 18px; }
.sb-saved__h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin: 4px 4px 8px;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sb-saved__clear {
  background: transparent;
  border: 0;
  color: var(--sky);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
}
.sb-saved__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sb-saved__card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.1s, box-shadow 0.15s;
}
.sb-saved__card:active { transform: scale(0.99); }
.sb-saved__card--featured {
  background: linear-gradient(135deg, #FFFAEC 0%, var(--white) 70%);
  border-color: var(--yellow);
}
.sb-saved__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sb-saved__route {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.sb-saved__pin {
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
}
.sb-saved__dates {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
}
.sb-saved__bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sb-saved__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
}
.sb-saved__meta { font-size: 11px; color: var(--gray); }

/* Tracker section divider */
.sb-tracker {
  border-top: 1px dashed var(--gray-light);
  padding-top: 18px;
}

@media (min-width: 768px) {
  .sb-saved__list { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .sb-saved__list { grid-template-columns: repeat(3, 1fr); }
}


/* ==================== HERO ==================== */
.sb-hero {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 14px;
}
.sb-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 6px;
}
.sb-hero__title strong { color: var(--yellow-dk); }
.sb-hero__sub {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.sb-dot { color: var(--sky); font-weight: 700; }

.sb-best {
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--yellow) 0%, #FFD75F 100%);
  border-radius: var(--radius-md);
  color: var(--navy);
}
.sb-best__badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.sb-best__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.sb-best__line { font-size: 13px; font-weight: 500; margin-top: 4px; }

/* ==================== FILTERS ==================== */
.sb-filters {
  position: sticky;
  top: 64px;          /* below header */
  z-index: 40;
  background: var(--sky-bg);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 14px;
  box-shadow: var(--shadow-sm);
}
.sb-filters__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sb-filters__row:last-child { margin-bottom: 0; }
.sb-filters__row--mini { gap: 6px; }
.sb-filters__lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 36px;
  flex-shrink: 0;
}

.sb-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.sb-chips::-webkit-scrollbar { display: none; }

.sb-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--white);
  border: 1.5px solid transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
  transition: all 0.15s;
}
.sb-chip--active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.sb-select {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%231B2D5B' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}

/* ==================== RESULTS ==================== */
.sb-results { display: flex; flex-direction: column; gap: 10px; }

.sb-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 1.5px solid transparent;
  transition: transform 0.1s, box-shadow 0.15s;
}
.sb-card:active { transform: scale(0.99); }
.sb-card--best {
  border-color: var(--yellow);
  background: linear-gradient(180deg, #FFFAEC 0%, var(--white) 50%);
}
.sb-card--clickable { cursor: pointer; }
.sb-card--clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.sb-card--clickable::after {
  content: '›';
  position: absolute;
  top: 14px; right: 14px;
  color: var(--gray);
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s;
}
.sb-card--clickable:hover::after { opacity: 1; }

.sb-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.sb-card__airline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sb-card__badge {
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}
.sb-card__badge--drop {
  background: var(--green-bg);
  color: var(--green);
}
.sb-card__badge--rise {
  background: var(--red-bg);
  color: var(--red);
}

.sb-card__main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}
.sb-card__price-block { display: flex; flex-direction: column; }
.sb-card__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.sb-card__price-lbl {
  font-size: 10px;
  color: var(--gray);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.sb-card__dates {
  text-align: right;
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
}
.sb-card__meta {
  text-align: right;
  font-size: 11px;
  color: var(--gray);
  font-weight: 500;
  margin-top: 2px;
}

.sb-card__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--gray-light);
  padding-top: 10px;
  font-size: 11px;
  color: var(--gray);
}
.sb-card__breakdown { font-weight: 500; }
.sb-card__change-up   { color: var(--red);   font-weight: 700; }
.sb-card__change-down { color: var(--green); font-weight: 700; }

/* ==================== EMPTY STATE ==================== */
.sb-empty {
  text-align: center;
  padding: 40px 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.sb-empty__bee { width: 130px; opacity: 0.85; }
.sb-empty__h { font-family: var(--font-display); font-weight: 700; color: var(--navy); margin: 14px 0 6px; }
.sb-empty__p { color: var(--gray); font-size: 13px; line-height: 1.6; margin: 0; }
.sb-empty__p code {
  background: var(--gray-light);
  color: var(--navy);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.sb-empty__hint { margin-top: 14px; font-size: 11px; color: var(--gray); }

/* ==================== FOOTER ==================== */
.sb-footer {
  text-align: center;
  padding: 14px 16px 22px;
  font-size: 11px;
  color: var(--gray);
}
.sb-footer .sb-dot { margin: 0 6px; }

/* ==================== MODAL (detail expand) ==================== */
[hidden] { display: none !important; }

.sb-modal {
  position: fixed;
  inset: 0;
  background: rgba(27, 45, 91, 0.55);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sb-modal__sheet {
  width: 100%;
  max-width: 720px;
  background: var(--white);
  border-radius: 22px 22px 0 0;
  padding: 22px 18px 30px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.sb-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--gray);
  padding: 4px 10px;
}

.sb-history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sb-history-table th { text-align: left; color: var(--gray); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--gray-light); }
.sb-history-table td { padding: 6px 4px; border-bottom: 1px solid #F1F4F7; }

.sb-spark {
  width: 100%;
  height: 90px;
  margin: 12px 0;
}

/* ==================== DESKTOP ADAPTATION ==================== */
@media (min-width: 768px) {
  .sb-main { max-width: 1100px; padding: 22px 22px 80px; }
  .sb-results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .sb-filters { top: 70px; }
  .sb-card__price { font-size: 36px; }
  .sb-best__price { font-size: 44px; }
}

@media (min-width: 1280px) {
  .sb-main { max-width: 1400px; }
  .sb-results { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1600px) {
  .sb-results { grid-template-columns: repeat(4, 1fr); }
}

/* ====================================================================
   ============== DRAWER + 30-VIEW LAYER (added in v1.3) ==============
   ==================================================================== */

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Hamburger button (floating, upper-left, fixed over banner) */
.sb-hamb {
  width: 44px; height: 44px;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: 12px;
  padding: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.sb-hamb:active { background: var(--sky-bg); border-color: var(--sky); }
.sb-hamb--float {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(27, 45, 91, 0.18);
}
.sb-hamb--float:hover { box-shadow: 0 4px 14px rgba(27, 45, 91, 0.24); }
@supports (padding: max(0px)) {
  .sb-hamb--float {
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
  }
}
.sb-hamb span {
  display: block;
  width: 18px; height: 2.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.sb-hamb.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.sb-hamb.open span:nth-child(2) { opacity: 0; }
.sb-hamb.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Overlay behind drawer */
.sb-overlay {
  position: fixed; inset: 0;
  background: rgba(27, 45, 91, 0.45);
  z-index: 150;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.sb-overlay.show { opacity: 1; pointer-events: auto; }

/* Drawer (slide-in from left) */
.sb-drawer {
  position: fixed; top: 0; left: 0;
  width: 320px; max-width: 86vw; height: 100vh;
  background: var(--white);
  z-index: 200;
  transform: translateX(-105%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: 6px 0 24px rgba(27, 45, 91, 0.22);
  display: flex; flex-direction: column;
}
.sb-drawer.open { transform: translateX(0); }

.sb-drawer__head {
  position: sticky; top: 0;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: var(--white);
  padding: 20px 18px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 5;
}
.sb-drawer__mascot { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--yellow); }
.sb-drawer__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px; letter-spacing: -0.01em; line-height: 1;
}
.sb-drawer__sub {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
  font-weight: 600;
}
.sb-drawer__close {
  margin-left: auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 0;
  font-size: 22px; line-height: 1;
  padding: 0;
  cursor: pointer;
}
.sb-drawer__foot {
  padding: 14px 18px 22px;
  font-size: 10.5px;
  color: var(--gray);
  border-top: 1px solid var(--gray-light);
  text-align: center;
  background: var(--sky-bg-2);
}

/* Drawer nav sections + items */
.pg-nav { flex: 1; padding: 6px 10px 18px; }
.pg-section { margin: 12px 4px 6px; }
.pg-section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  padding: 8px 6px 6px;
  display: flex; align-items: center; gap: 6px;
}
.pg-section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-light);
}

.pg-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.pg-item:hover { background: var(--sky-bg); }
.pg-item:active { background: #DBE9F4; transform: scale(0.99); }
.pg-item__icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--sky-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.pg-item__text { display: flex; flex-direction: column; min-width: 0; }
.pg-item__lbl {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--navy);
  letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-item__sub {
  font-size: 10.5px;
  color: var(--gray);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pg-item__num {
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--gray);
  background: var(--gray-light);
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.pg-item--accent .pg-item__icon { background: linear-gradient(135deg, var(--yellow) 0%, #FFD75F 100%); }
.pg-item--accent .pg-item__num  { background: var(--yellow); color: var(--navy); }

/* Home item — first row, navy accent so it reads as the primary action */
.pg-section--home { margin: 8px 4px 4px; }
.pg-item--home {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-radius: 12px;
  padding: 12px 12px;
}
.pg-item--home:hover  { background: linear-gradient(135deg, var(--navy-soft) 0%, var(--navy) 100%); }
.pg-item--home:active { transform: scale(0.99); }
.pg-item--home .pg-item__icon { background: var(--yellow); color: var(--navy); }
.pg-item--home .pg-item__lbl  { color: var(--white); font-size: 14px; }
.pg-item--home .pg-item__sub  { color: rgba(255,255,255,0.7); }
.pg-item--home .pg-item__num  { background: var(--yellow); color: var(--navy); font-size: 12px; }

@media (min-width: 768px) {
  .sb-drawer { width: 360px; }
}

/* ============== VIEW LAYER (full-screen content for views 1-30) ============== */
.sb-viewlayer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 14px 80px;
}
.sb-viewbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px 10px 64px;   /* leave room for the floating hamburger on the left */
  border-bottom: 1px solid var(--gray-light);
  margin: 0 -14px 14px;
  padding-right: 14px;
}
.sb-viewbar__back {
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
}
.sb-viewbar__back:active { background: var(--sky-bg); }
.sb-viewbar__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.02em;
}
.sb-viewbody { display: flex; flex-direction: column; gap: 14px; }

@media (min-width: 768px) {
  .sb-viewlayer { max-width: 1100px; padding: 0 22px 80px; }
}

/* ============== VIEW HEADERS ============== */
.pg-vh {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0 6px;
}
.pg-vh__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--yellow) 0%, #FFD75F 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.pg-vh__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 0 0 2px;
}
.pg-vh__sub {
  font-size: 12px;
  color: var(--gray);
  font-weight: 500;
}
.pg-vh__h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  margin: 18px 0 8px;
  letter-spacing: 0.02em;
}

/* ============== STAT GRID ============== */
.pg-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.pg-stat {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gray-light);
}
.pg-stat--good { border-left-color: var(--green); }
.pg-stat--bad  { border-left-color: var(--red); }
.pg-stat__lbl {
  font-size: 10px;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gray);
  margin-bottom: 4px;
}
.pg-stat__val {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.05;
}
.pg-stat__sub {
  font-size: 11px;
  color: var(--gray);
  font-weight: 500;
  margin-top: 4px;
}

@media (min-width: 768px) {
  .pg-stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============== GROUP LIST (date / airline / stay buckets) ============== */
.pg-grouplist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pg-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-align: left;
  font: inherit;
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s, box-shadow 0.15s;
}
.pg-group:active { transform: scale(0.99); }
.pg-group:hover { box-shadow: var(--shadow-md); }
.pg-group__l { flex: 1; min-width: 0; }
.pg-group__r { text-align: right; flex-shrink: 0; }
.pg-group__date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  letter-spacing: -0.005em;
}
.pg-group__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.pg-group__sub {
  font-size: 11px;
  color: var(--gray);
  font-weight: 500;
  margin-top: 2px;
}

/* ============== HEAT MAP (option 8) ============== */
.pg-heat-wrap {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.pg-heat {
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 10.5px;
  width: 100%;
}
.pg-heat th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  color: var(--navy);
  padding: 4px 6px;
  white-space: nowrap;
  background: var(--sky-bg);
  border-radius: 4px;
}
.pg-heat td {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
  padding: 8px 4px;
  text-align: center;
  border-radius: 4px;
  min-width: 54px;
}
.pg-heat__empty { color: var(--gray); background: #F5F7FA; font-weight: 400; }
.pg-heat-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gray);
  margin-top: 8px;
  padding: 0 8px;
}
.pg-heat-legend__bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(46,158,92,0.85), rgba(255,199,44,0.9), rgba(200,68,58,0.9));
}

/* ============== FORM (Add Trip / Calculator) ============== */
.pg-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pg-form label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pg-form label > input,
.pg-form label > select {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-light);
  background: var(--sky-bg-2);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  font-family: var(--font-text);
  text-transform: none;
}
.pg-form label > input:focus,
.pg-form label > select:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(74,157,219,0.18);
}
.pg-form__check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  text-transform: none !important;
  font-size: 13px !important;
  color: var(--navy) !important;
}
.pg-form__check input { margin: 0; }
.pg-form button[type="submit"] { margin-top: 6px; }

/* ============== TRIP COST CALCULATOR ============== */
.pg-calc-out {
  margin-top: 14px;
  border-top: 1.5px dashed var(--gray-light);
  padding-top: 12px;
}
.pg-calc-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  color: var(--navy);
}
.pg-calc-row span:first-child { color: var(--gray); }
.pg-calc-total {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 4px;
  margin-top: 8px;
  border-top: 1.5px solid var(--gray-light);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.pg-calc-pp {
  text-align: right;
  font-size: 12px;
  color: var(--sky);
  font-weight: 600;
}

/* ============== SETTINGS ROW ============== */
.pg-set-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-light);
  font-size: 13px;
  color: var(--navy);
  font-weight: 500;
}
.pg-set-row:last-child { border-bottom: 0; }
.pg-set-row > input,
.pg-set-row > select {
  padding: 6px 10px;
  border: 1.5px solid var(--gray-light);
  background: var(--white);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  width: auto;
  max-width: 140px;
}
.pg-set-row > input[type="checkbox"] { width: 22px; height: 22px; }

/* ============== WEATHER ROW ============== */
.pg-wx-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 4px 0;
}
.pg-wx-day {
  text-align: center;
  padding: 8px 2px;
  background: var(--sky-bg-2);
  border-radius: 8px;
}
.pg-wx-day__d {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray);
  letter-spacing: 0.04em;
}
.pg-wx-day__icon { font-size: 22px; line-height: 1.2; }
.pg-wx-day__hi {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
}
.pg-wx-day__lo {
  font-size: 11px;
  color: var(--gray);
  font-weight: 600;
}
.pg-wx-day__p {
  font-size: 10px;
  color: var(--sky);
  font-weight: 600;
  margin-top: 2px;
}

/* ============== TAGS / BUTTONS / FOOTNOTES ============== */
.pg-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--sky-bg);
  color: var(--sky);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 2px;
}
.pg-btn {
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  color: var(--navy);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.pg-btn:hover { background: var(--sky-bg); border-color: var(--sky); }
.pg-btn--active {
  background: var(--navy);
  color: var(--yellow);
  border-color: var(--navy);
}
.pg-btn--clear {
  color: var(--red);
  border-color: var(--red-bg);
  background: var(--red-bg);
}

.pg-foot-note {
  font-size: 11px;
  color: var(--gray);
  font-style: italic;
  line-height: 1.5;
  padding: 8px 4px;
}

/* ============== VERSION HISTORY THUMBNAIL STRIP (v1.6+) ============== */
.pg-vh-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-light);
}
.pg-vh-thumb {
  display: block;
  text-decoration: none;
  background: var(--sky-bg-2);
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.pg-vh-thumb:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--sky);
}
.pg-vh-thumb img {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
  object-position: top center;
  background: var(--white);
}
.pg-vh-thumb__cap {
  font-size: 10.5px;
  color: var(--navy);
  font-weight: 600;
  padding: 6px 8px;
  line-height: 1.35;
  background: var(--white);
  border-top: 1px solid var(--gray-light);
}
@media (min-width: 768px) {
  .pg-vh-thumbs { grid-template-columns: repeat(3, 1fr); }
}
.pg-foot-note code {
  background: var(--gray-light);
  color: var(--navy);
  font-style: normal;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10.5px;
}
