/* Shared components for the screens added after the six Figma frames.
   Same tokens and type scale as the designed screens: Inter, Indian Red #8E0124,
   white ground, soft #e0bfbc borders, 18px-radius red CTA, 10px red eyebrow. */

.kit { padding: 0 20px 32px; }
.place-photo-note { margin-top: 8px; font-size: 11px; line-height: 17px; color: var(--grey); }
.route-save { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: transparent; }
.route-save::before { content: ""; position: absolute; inset: 4.5px; border-radius: 10px; background: rgba(255,255,255,0.2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none; }
.route-save__heart { position: relative; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45)); transition: transform 150ms ease; }
.route-save__heart path { fill: rgba(0,0,0,0.22); stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; transition: fill 150ms ease; }
.route-save.is-on .route-save__heart path { fill: var(--red); stroke: none; }
.route-save:active .route-save__heart { transform: scale(0.9); }
.route-save:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .route-save__heart, .route-save__heart path { transition: none; } }
.place-photo-unavailable { display: flex; align-items: center; justify-content: center; height: 100%; padding: 12px; color: var(--muted); background: #f3f1ec; font-size: 12px; text-align: center; }
.kit--nav { padding-bottom: 112px; }           /* clears the bottom nav */
.kit--cta { padding-bottom: 120px; }           /* clears a pinned CTA */
.kit__spacer { height: 115.354px; }            /* status bar + 80px top bar */
.kit__spacer--tabs { height: 157.354px; }      /* + 42px tab row */
.kit--flush { padding-left: 0; padding-right: 0; }

/* inline icon from the sprite app.js injects */
.i { display: inline-block; width: 24px; height: 24px; flex-shrink: 0; fill: currentColor; vertical-align: middle; }
.i--16 { width: 16px; height: 16px; }
.i--18 { width: 18px; height: 18px; }
.i--20 { width: 20px; height: 20px; }
.i--28 { width: 28px; height: 28px; }

/* ---------- type ---------- */
.eyebrow {
  font-weight: 700;
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8b2e34;
}
.h1 { font-weight: 700; font-size: 30px; line-height: 36px; color: var(--ink); }
.h2 { font-weight: 700; font-size: 24px; line-height: 30px; color: var(--ink); }
.h3 { font-weight: 600; font-size: 20px; line-height: 28px; color: var(--dark); }
.h4 { font-weight: 600; font-size: 16px; line-height: 24px; color: var(--dark); }
.body { font-size: 16px; line-height: 28px; color: var(--grey); }
.small { font-size: 14px; line-height: 20px; color: var(--grey); }
.tiny { font-size: 12px; line-height: 16px; color: var(--grey); }
.red { color: var(--red); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
}
.meta i { display: block; width: 4px; height: 4px; border-radius: 9999px; background: #d1d5db; }

.section { margin-top: 32px; }
.section:first-child { margin-top: 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section__head .h3, .section__head .h4 { margin: 0; }
.link { font-weight: 600; font-size: 14px; line-height: 20px; color: var(--red-deep); }
.link:hover { text-decoration: underline; }

/* ---------- surfaces ---------- */
.card {
  display: block;
  padding: 16px;
  border: 1px solid #e0bfbc;
  border-radius: 8px;
  background: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.05));
}
.card--soft { border-color: rgba(224, 191, 188, 0.45); }
.card--cream { background: #fbf9f8; border-color: rgba(224, 191, 188, 0.45); }
.card--tap { transition: transform 150ms, border-color 150ms; }
.card--tap:hover { border-color: #c99b97; }
.card--tap:active { transform: scale(0.99); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack--16 { gap: 16px; }
.stack--24 { gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }

.hero-band { background: #f5f3f1; }   /* the Passport hero ground */

/* ---------- buttons ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 0;
  border-radius: 18px;
  background: var(--red);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0.7px;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  transition: background-color 150ms, transform 150ms, opacity 150ms;
}
.cta:hover { background: #7a011f; }
.cta:active { transform: scale(0.99); }
.cta:focus-visible, .ghost:focus-visible, .chip:focus-visible, .switch:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.cta[disabled] { opacity: 0.45; pointer-events: none; }
.cta .i { fill: #fff; }
.ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 0;
  border: 1px solid #e0bfbc;
  border-radius: 18px;
  background: #fff;
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
  color: var(--red);
  transition: background-color 150ms;
}
.ghost:hover { background: #fbf6f5; }
.text-btn { font-weight: 600; font-size: 14px; line-height: 20px; color: var(--grey); padding: 8px 0; }
.text-btn:hover { color: var(--dark); }

/* pinned CTA area above the home indicator */
.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 34px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 22%);
}
.phone:has(> .dock) { --toast-bottom: 112px; }

/* ---------- chips & segmented tabs ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #e4e2e2;
  border-radius: 9999px;
  background: #fff;
  font-weight: 500;
  font-size: 13px;
  line-height: 18px;
  color: var(--grey);
  white-space: nowrap;
  transition: background-color 150ms, color 150ms, border-color 150ms;
}
.chip:hover { border-color: #d0caca; color: var(--dark); }
.chip.is-active { background: var(--red); border-color: var(--red); color: #fff; }

.tabs {
  display: flex;
  justify-content: center;
  padding: 0 20px;
  border-bottom: 1px solid #e4e2e2;
  background: #fff;
}
.tab {
  flex: 0 0 87.5px;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  color: var(--grey);
  text-align: center;
  transition: color 150ms;
}
.tab:hover { color: var(--dark); }
.tab.is-active { border-bottom-color: var(--red); font-weight: 600; color: var(--red); }
.tab:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }

/* ---------- list rows ---------- */
.list { display: flex; flex-direction: column; border-top: 1px solid #efeded; }
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 12px 0;
  border-bottom: 1px solid #efeded;
  text-align: left;
}
.list-row:hover .list-row__title { color: var(--red); }
.list-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fbf9f8;
  color: var(--red);
}
.list-row__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row__title { font-weight: 500; font-size: 15px; line-height: 20px; color: var(--dark); transition: color 150ms; }
.list-row__sub { font-size: 13px; line-height: 18px; color: var(--grey); }
.list-row__end { flex-shrink: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--grey); }
.list-row__end .i { color: #767676; }

/* ---------- switch ---------- */
.switch {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 9999px;
  background: #d9d6d6;
  transition: background-color 180ms;
}
.switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 180ms;
}
.switch.is-on { background: var(--red); }
.switch.is-on::after { transform: translateX(18px); }

/* ---------- checkbox (stop selection) ---------- */
.check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: 2px solid #c9c4c4;
  border-radius: 8px;
  background: #fff;
  color: transparent;
  transition: background-color 150ms, border-color 150ms;
}
.is-on > .check, .check.is-on { background: var(--red); border-color: var(--red); color: #fff; }
.check .i { width: 16px; height: 16px; }

/* ---------- stop number ring (Map / Stop detail) ---------- */
.ring {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 2px solid var(--red);
  border-radius: 50%;
  background: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  color: var(--red);
}
.ring--done { background: var(--red); color: #fff; }
.ring--muted { border-color: #c9c4c4; color: #767676; }
.ring--sq { border-radius: 10px; background: #fbf9f8; }

/* ---------- media ---------- */
.thumb {
  position: relative;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background: #efeded;
}
.thumb img, .cover img { width: 100%; height: 100%; object-fit: cover; }
.cover { position: relative; overflow: hidden; border-radius: 16px; background: #efeded; }

/* a map crop used when a stop has no photograph */
.mapcrop { background: #eef0ec url("../assets/map/map-base.png") no-repeat; background-size: 520px auto; }

/* red enamel stamps: each PNG holds one stamp in its top-left 76 × 66% */
.stamp {
  display: block;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: no-repeat 0 0 / 131.5% 150.5%;
  border-radius: 50%;
}
.stamp--wounded-knee { background-image: url("../assets/passport/stamp-wounded-knee.png"); }
.stamp--chatku { background-image: url("../assets/passport/stamp-cratke-arts.png"); }
.stamp--oglala { background-image: url("../assets/passport/stamp-oglala-college.png"); }
.stamp--badlands { background-image: url("../assets/passport/stamp-badlands.png"); }
.stamp--medal { background-image: url("../assets/finish/medal-headdress.png"); }
.slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 1px dashed #e0bfbc;
  border-radius: 12px;
  background: #efeded;
}

/* line-art badges cut from the 3 × 4 stamp sheet */
.sheet {
  display: block;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  background: url("../assets/finish/badge-road-legacy.png") no-repeat;
  background-size: 300% 400%;
}
.sheet--locked { filter: grayscale(1); opacity: 0.28; }
.sheet[data-cell="0"] { background-position: 0% 0%; }
.sheet[data-cell="1"] { background-position: 50% 0%; }
.sheet[data-cell="2"] { background-position: 100% 0%; }
.sheet[data-cell="3"] { background-position: 0% 33.333%; }
.sheet[data-cell="4"] { background-position: 50% 33.333%; }
.sheet[data-cell="5"] { background-position: 100% 33.333%; }
.sheet[data-cell="6"] { background-position: 0% 66.667%; }
.sheet[data-cell="7"] { background-position: 50% 66.667%; }
.sheet[data-cell="8"] { background-position: 100% 66.667%; }
.sheet[data-cell="9"] { background-position: 0% 100%; }
.sheet[data-cell="10"] { background-position: 50% 100%; }
.sheet[data-cell="11"] { background-position: 100% 100%; }

/* ---------- progress ---------- */
.bar { height: 8px; border-radius: 9999px; background: #e4e2e2; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--red); }
.bar--thin { height: 4px; }

/* ---------- stat trio ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 8px;
  border: 1px solid rgba(224, 191, 188, 0.3);
  border-radius: 4px;
  background: #fff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.05));
  text-align: center;
}
.stat-tile .i { color: var(--red); margin-bottom: 4px; }
.stat-tile__value { font-weight: 600; font-size: 18px; line-height: 24px; color: var(--dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-tile__label { font-weight: 500; font-size: 12px; line-height: 16px; color: var(--grey); white-space: nowrap; }

/* ---------- bottom sheet / drawer ---------- */
.scrim {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(16, 16, 16, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 41;
  width: 316px;
  display: flex;
  flex-direction: column;
  padding: 64px 20px 32px;
  background: #fff;
  border-radius: 0 24px 24px 0;
  transform: translateX(-105%);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow-y: auto;
  scrollbar-width: none;
}
.drawer.is-open { transform: none; }
.drawer__me { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; margin-bottom: 8px; border-bottom: 1px solid #efeded; }
.drawer .list { border-top: 0; }
.drawer .list-row { border-bottom: 0; min-height: 48px; padding: 8px 0; }
.drawer__foot { margin-top: auto; padding-top: 24px; }

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.avatar--lg { width: 72px; height: 72px; font-size: 26px; box-shadow: 0 0 0 4px #fff, 0 0 0 5px #e0bfbc; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #fbf0f1;
  font-weight: 600;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.4px;
  color: var(--red);
  white-space: nowrap;
}
.pill--ok { background: #eef6ef; color: #2f6b3a; }
.pill--dark { background: rgba(16, 16, 16, 0.72); color: #fff; }
.dot-ok { width: 8px; height: 8px; border-radius: 50%; background: #3a8a48; }

.badge-red {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--red);
  font-weight: 700;
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.6px;
  color: #fff;
  text-transform: uppercase;
}

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; color: var(--grey); }
