:root {
    --paper: #fffaf2;
    --surface: #ffffff;
    --ink: #18202b;
    --muted: #6d7480;
    --line: #eadfce;
    --navy: #17324d;
    --red: #c2412d;
    --orange: #f29d38;
    --teal: #1f7a76;
    --shadow: 0 18px 45px rgba(24, 32, 43, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(242, 157, 56, 0.08), transparent 360px),
        var(--paper);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 5vw, 48px);
    background: rgba(255, 250, 242, 0.88);
    border-bottom: 1px solid rgba(234, 223, 206, 0.8);
    backdrop-filter: blur(16px);
}

.brand,
.top-nav,
.action-row,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand {
    font-weight: 800;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: var(--red);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--navy);
    letter-spacing: 0;
}

.top-nav a {
    padding: 10px 12px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

.top-nav .nav-pill {
    color: white;
    background: var(--navy);
    border-radius: 999px;
}

.page-shell {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 24px clamp(16px, 4vw, 32px) 96px;
}

.app-home-page {
    background:
        linear-gradient(180deg, #f8fbff 0, #fffaf2 520px, #fffaf2 100%),
        var(--paper);
}

.app-home-page .page-shell {
    width: min(760px, 100%);
    padding: 0 0 116px;
}

.app-home {
    padding: 0 18px 28px;
}

.app-hero {
    position: relative;
    min-height: 690px;
    margin: 0 -18px;
    padding: 44px 28px 150px;
    overflow: hidden;
    color: var(--navy);
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0, rgba(248, 251, 255, 0.7) 30%, rgba(255, 205, 144, 0.28) 58%, rgba(15, 29, 45, 0.82) 100%),
        linear-gradient(145deg, #eef6ff 0, #fff8ec 46%, #d46a39 100%);
    border-radius: 0 0 34px 34px;
    box-shadow: inset 0 -90px 80px rgba(24, 32, 43, 0.12);
}

.app-hero::before,
.app-hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.app-hero::before {
    right: -80px;
    bottom: 132px;
    left: -80px;
    height: 220px;
    background:
        linear-gradient(160deg, transparent 0 38%, rgba(255, 255, 255, 0.7) 38.5% 39%, transparent 39.5%),
        linear-gradient(180deg, rgba(74, 82, 64, 0), rgba(74, 82, 64, 0.34)),
        linear-gradient(150deg, transparent 0 23%, #29303b 23.5% 36%, #1c222b 36.5% 50%, transparent 50.5%);
    transform: skewY(-4deg);
}

.app-hero::after {
    right: 30px;
    bottom: 174px;
    width: 116px;
    height: 184px;
    border: 6px solid rgba(24, 32, 43, 0.75);
    border-radius: 10px;
    background:
        linear-gradient(#d7c3aa 0 30%, #2c221d 30% 36%, #f0e8dc 36% 68%, #2c221d 68% 75%, #8a5a3e 75%);
    box-shadow: 18px 70px 0 -44px rgba(24, 32, 43, 0.95), 0 18px 40px rgba(24, 32, 43, 0.24);
}

.app-hero-top,
.direction-launchers,
.quick-action-grid,
.next-stop-tile,
.memory-banner {
    position: relative;
    z-index: 2;
}

.app-hero-top {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    align-items: center;
    gap: 10px;
}

.hamburger-button {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 11px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.hamburger-button span {
    display: block;
    width: 31px;
    height: 4px;
    margin: 3px 0;
    background: var(--navy);
    border-radius: 999px;
}

.passport-logo {
    display: grid;
    justify-items: center;
    color: var(--navy);
    font-weight: 900;
    text-transform: uppercase;
}

.passport-logo span {
    font-size: 17px;
    letter-spacing: 0.2em;
}

.passport-logo strong {
    display: grid;
    place-items: center;
    width: 86px;
    height: 62px;
    margin: 2px 0;
    color: var(--navy);
    border: 7px solid var(--navy);
    border-radius: 24px 24px 30px 30px;
    font-size: 42px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.35);
}

.signal-dots {
    display: flex;
    align-items: end;
    justify-content: end;
    gap: 4px;
}

.signal-dots i {
    display: block;
    width: 7px;
    background: var(--navy);
    border-radius: 999px;
}

.signal-dots i:nth-child(1) { height: 13px; }
.signal-dots i:nth-child(2) { height: 20px; }
.signal-dots i:nth-child(3) { height: 28px; }

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 510px;
    margin-top: 52px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: 54px;
    line-height: 1.12;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 380px;
    margin: 0;
    color: #36485c;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 500;
}

.direction-launchers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 42px;
}

.direction-pill {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    min-height: 92px;
    padding: 17px 22px;
    color: white;
    border-radius: 34px;
    box-shadow: 0 20px 34px rgba(24, 32, 43, 0.18);
}

.direction-pill.active {
    outline: 3px solid rgba(255, 255, 255, 0.82);
    outline-offset: -7px;
}

.direction-pill.east {
    background: linear-gradient(135deg, #052f57, #073d70);
}

.direction-pill.west {
    background: linear-gradient(135deg, #d85f31, #bf3d2c);
}

.direction-pill span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 28px;
}

.direction-pill strong,
.direction-pill small {
    grid-column: 2;
}

.direction-pill strong {
    font-size: 19px;
    text-transform: uppercase;
}

.direction-pill small {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 700;
}

.app-progress-card {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 18px;
    align-items: center;
    margin: -104px 8px 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(234, 223, 206, 0.7);
    border-radius: 26px;
    box-shadow: 0 26px 55px rgba(24, 32, 43, 0.16);
    backdrop-filter: blur(18px);
}

.app-progress-card strong {
    display: block;
    color: var(--red);
    font-size: 58px;
    line-height: 1;
}

.app-progress-card span {
    color: #263449;
    font-size: 18px;
    font-weight: 700;
}

.mini-route-map svg {
    width: 100%;
    height: auto;
}

.mini-map-bg {
    fill: rgba(23, 50, 77, 0.06);
}

.mini-map-line,
.mini-map-complete {
    fill: none;
    stroke-linecap: round;
    stroke-width: 7;
}

.mini-map-line {
    stroke: var(--navy);
}

.mini-map-complete {
    stroke: var(--red);
}

.mini-map-start {
    fill: var(--red);
}

.mini-map-end {
    fill: var(--navy);
}

.mini-route-map div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: -10px;
}

.mini-route-map div span {
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0 4px 30px;
}

.quick-action-grid a {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 132px;
    padding: 14px 10px;
    text-align: center;
    color: var(--navy);
    background: #fff;
    border: 1px solid rgba(234, 223, 206, 0.74);
    border-radius: 18px;
    box-shadow: 0 18px 36px rgba(24, 32, 43, 0.1);
}

.quick-action-grid span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: white;
    background: var(--navy);
    border-radius: 16px;
    font-size: 23px;
    font-weight: 900;
}

.quick-action-grid strong {
    font-size: 15px;
    line-height: 1.18;
    text-transform: uppercase;
}

.next-stop-feature {
    margin-bottom: 22px;
}

.next-stop-feature .card-heading-row h2 {
    margin: 0;
    color: var(--navy);
    font-size: 19px;
    text-transform: uppercase;
}

.next-stop-feature .card-heading-row a {
    color: var(--red);
    font-weight: 900;
    text-transform: uppercase;
}

.next-stop-tile {
    display: grid;
    grid-template-columns: 150px 1fr 58px;
    gap: 18px;
    align-items: center;
    min-height: 148px;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(234, 223, 206, 0.72);
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(24, 32, 43, 0.1);
}

.stop-thumb {
    width: 100%;
    aspect-ratio: 1.45;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0) 0 46%, rgba(24, 32, 43, 0.34) 47%),
        linear-gradient(135deg, #30706a 0 42%, #d7a65a 42% 58%, #7f3d2d 58%);
    box-shadow: inset 0 0 0 1px rgba(24, 32, 43, 0.12);
}

.next-stop-copy strong {
    display: block;
    color: var(--navy);
    font-size: 24px;
    line-height: 1.12;
}

.next-stop-copy small {
    display: block;
    margin-top: 12px;
    color: #4c5967;
    font-size: 16px;
    line-height: 1.3;
}

.next-stop-copy em {
    display: inline-flex;
    margin-top: 10px;
    color: var(--red);
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
}

.weather-pill {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    width: fit-content;
    margin-top: 11px;
    padding: 7px 11px;
    color: var(--navy);
    background: #fff4df;
    border: 1px solid rgba(196, 79, 45, 0.18);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.weather-pill::before {
    content: "";
    width: 9px;
    height: 9px;
    background: var(--red);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(196, 79, 45, 0.12);
}

.weather-pill strong {
    display: inline;
    font-size: inherit;
    line-height: inherit;
}

.weather-pill.muted {
    color: #6d7781;
    background: #f4f1ea;
    border-color: rgba(24, 32, 43, 0.08);
}

.weather-pill.muted::before {
    background: #aeb5bd;
    box-shadow: 0 0 0 4px rgba(174, 181, 189, 0.14);
}

.drive-pill {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    width: fit-content;
    margin-top: 8px;
    padding: 7px 11px;
    color: var(--navy);
    background: #eef5fb;
    border: 1px solid rgba(10, 42, 74, 0.11);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.drive-pill::before {
    content: "";
    width: 18px;
    height: 8px;
    background: linear-gradient(90deg, var(--navy) 0 33%, transparent 33% 50%, var(--navy) 50% 83%, transparent 83%);
    border-top: 2px solid var(--navy);
    border-bottom: 2px solid var(--navy);
    border-radius: 999px;
}

.drive-pill strong {
    display: inline;
    font-size: inherit;
    line-height: inherit;
}

.drive-pill.muted {
    color: #6d7781;
    background: #f4f1ea;
}

.drive-pill.muted::before {
    border-color: #aeb5bd;
    background: linear-gradient(90deg, #aeb5bd 0 33%, transparent 33% 50%, #aeb5bd 50% 83%, transparent 83%);
}

.round-arrow {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: white;
    background: var(--navy);
    border-radius: 50%;
    font-size: 40px;
    line-height: 1;
}

.memory-banner {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 24px;
    align-items: center;
    min-height: 190px;
    margin-bottom: 26px;
    padding: 28px;
    color: white;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(9, 25, 42, 0.97), rgba(23, 50, 77, 0.9)),
        linear-gradient(135deg, #12324f, #0d1724);
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(24, 32, 43, 0.16);
}

.passport-book {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    color: #f5ca76;
    background: #0a1f35;
    border: 2px solid rgba(245, 202, 118, 0.5);
    border-radius: 18px;
    box-shadow: 18px 20px 36px rgba(0, 0, 0, 0.25);
    font-size: 44px;
    font-weight: 900;
}

.memory-banner h2,
.memory-banner p {
    margin: 0;
}

.memory-banner h2 {
    font-size: 28px;
    line-height: 1.25;
}

.memory-banner p {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 19px;
    line-height: 1.35;
}

.legacy-summary {
    display: none;
}

.route-map-page {
    background: #f8f3ea;
}

.route-map-page .page-shell {
    width: min(760px, 100%);
    padding: 0 0 112px;
}

.route-map-screen {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 252, 246, 0.96) 0, rgba(255, 252, 246, 0.68) 250px, rgba(248, 243, 234, 0) 420px),
        #f8f3ea;
}

.route-map-hero {
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    padding: 42px 28px 0;
    pointer-events: none;
}

.route-map-hero a,
.route-map-hero button {
    pointer-events: auto;
}

.map-top {
    margin-bottom: 28px;
}

.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 18px;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(234, 223, 206, 0.78);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(24, 32, 43, 0.12);
    font-weight: 900;
    text-transform: uppercase;
}

.filter-button::before {
    content: "";
    width: 17px;
    height: 17px;
    margin-right: 8px;
    border: 3px solid currentColor;
    border-top-width: 5px;
    border-radius: 7px 7px 3px 3px;
    clip-path: polygon(0 0, 100% 0, 64% 54%, 64% 100%, 36% 100%, 36% 54%);
}

.map-title-row {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 22px;
    align-items: start;
}

.map-title-row h1 {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: 54px;
    line-height: 1;
}

.map-title-row p {
    max-width: 330px;
    margin: 0;
    color: #233246;
    font-size: 22px;
    line-height: 1.36;
}

.map-progress-card {
    position: relative;
    display: grid;
    min-height: 142px;
    padding: 18px 58px 18px 20px;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(234, 223, 206, 0.72);
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(24, 32, 43, 0.14);
    backdrop-filter: blur(18px);
}

.map-progress-card span {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.map-progress-card strong {
    color: var(--red);
    font-size: 48px;
    line-height: 1;
}

.map-progress-card small {
    font-size: 18px;
    font-weight: 700;
}

.map-progress-card em {
    position: absolute;
    right: 20px;
    top: 50%;
    font-size: 42px;
    font-style: normal;
    transform: translateY(-50%);
}

.usa-map-panel {
    position: relative;
    min-height: 860px;
    padding-top: 190px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 58%, rgba(45, 105, 132, 0.16), transparent 24%),
        radial-gradient(circle at 86% 84%, rgba(45, 105, 132, 0.2), transparent 30%),
        linear-gradient(180deg, #f5f0e5, #e6dcc8);
}

.usa-map-panel::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0.56;
    background:
        linear-gradient(30deg, transparent 0 48%, rgba(117, 125, 112, 0.22) 48.3% 48.7%, transparent 49%),
        linear-gradient(112deg, transparent 0 58%, rgba(117, 125, 112, 0.16) 58.2% 58.6%, transparent 59%),
        radial-gradient(circle at 70% 24%, rgba(96, 152, 190, 0.36), transparent 8%),
        radial-gradient(circle at 8% 74%, rgba(96, 152, 190, 0.34), transparent 13%);
}

.usa-route-svg {
    position: relative;
    z-index: 1;
    width: 120%;
    max-width: none;
    height: auto;
    margin: 134px -10% 0;
    display: block;
    filter: saturate(0.92);
}

.usa-land {
    fill: rgba(255, 249, 235, 0.58);
    stroke: rgba(85, 90, 78, 0.3);
    stroke-width: 2;
}

.state-lines {
    fill: none;
    stroke: rgba(83, 88, 78, 0.34);
    stroke-width: 1.4;
}

.map-labels text {
    fill: rgba(15, 29, 45, 0.86);
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}

.big-map-line-base,
.big-map-line-complete {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#routeShadow);
}

.big-map-line-base {
    stroke: #d55630;
    stroke-width: 12;
}

.big-map-line-complete {
    stroke: var(--navy);
    stroke-width: 13;
}

.big-map-stop {
    stroke: white;
    stroke-width: 4;
    transition: r 0.16s ease, transform 0.16s ease;
}

.big-map-stop.not-visited {
    fill: #d55630;
}

.big-map-stop.visited {
    fill: var(--navy);
}

.big-map-stop.current,
.big-map-stop.featured {
    stroke: #fff5df;
    stroke-width: 6;
}

.big-map-stop.current {
    fill: var(--red);
}

.big-map-stop:hover {
    r: 13;
}

.endpoint path {
    fill: #0b2b4c;
    stroke: white;
    stroke-width: 5;
}

.endpoint.end path {
    fill: #1a1d22;
}

.endpoint circle {
    fill: white;
}

.endpoint text {
    fill: white;
    stroke: #0b2b4c;
    stroke-width: 8;
    paint-order: stroke;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}

.map-floating-controls {
    position: absolute;
    right: 28px;
    bottom: 220px;
    z-index: 4;
    display: grid;
    gap: 14px;
}

.map-floating-controls button {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(24, 32, 43, 0.14);
    font-size: 32px;
    font-weight: 800;
}

.map-legend.floating {
    position: absolute;
    left: 28px;
    bottom: 226px;
    z-index: 4;
    display: flex;
    gap: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(234, 223, 206, 0.78);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(24, 32, 43, 0.12);
    backdrop-filter: blur(14px);
}

.legend-dot.locked {
    background: #8e949a;
}

.nearby-sheet {
    position: relative;
    z-index: 5;
    margin: -176px 0 0;
    padding: 18px 28px 28px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -16px 40px rgba(24, 32, 43, 0.12);
    backdrop-filter: blur(18px);
}

.sheet-handle {
    display: block;
    width: 76px;
    height: 7px;
    margin: 0 auto 22px;
    background: #aeb4bd;
    border-radius: 999px;
}

.sheet-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.sheet-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 28px;
}

.sheet-heading button {
    min-height: 44px;
    padding: 0;
    color: var(--navy);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
}

.map-stop-cards {
    display: grid;
    gap: 12px;
}

.map-stop-card {
    display: grid;
    grid-template-columns: 180px 32px 1fr 54px;
    gap: 14px;
    align-items: center;
    min-height: 130px;
    padding: 14px;
    color: var(--navy);
    background: #fff;
    border: 1px solid rgba(234, 223, 206, 0.72);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(24, 32, 43, 0.1);
}

.map-card-image {
    width: 100%;
    aspect-ratio: 1.65;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0) 0 45%, rgba(24, 32, 43, 0.32) 46%),
        linear-gradient(135deg, #28726b 0 38%, #f3d58f 38% 57%, #894333 57%);
}

.stop-number {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: white;
    background: var(--red);
    border-radius: 50%;
    font-weight: 900;
}

.map-card-copy strong,
.map-card-copy small,
.map-card-copy em {
    display: block;
}

.map-card-copy strong {
    font-size: 21px;
    line-height: 1.15;
}

.map-card-copy small {
    margin-top: 8px;
    color: #3f4b5b;
    font-size: 16px;
}

.map-card-copy em {
    margin-top: 8px;
    color: var(--red);
    font-style: normal;
    font-weight: 800;
}

.full-stop-list {
    padding: 22px 18px 0;
}

.achievements-page {
    background:
        linear-gradient(180deg, #f8fbff 0, #fffaf2 520px, #fffaf2 100%),
        var(--paper);
}

.achievements-page .page-shell {
    width: min(760px, 100%);
    padding: 0 0 116px;
}

.achievements-screen {
    padding: 0 18px 34px;
}

.achievements-hero {
    position: relative;
    min-height: 520px;
    margin: 0 -18px;
    padding: 42px 28px 170px;
    overflow: hidden;
    color: var(--navy);
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0, rgba(248, 251, 255, 0.72) 42%, rgba(255, 211, 159, 0.36) 66%, rgba(24, 32, 43, 0.56) 100%),
        linear-gradient(145deg, #eff7ff 0, #fff7ea 48%, #cc6a38 100%);
    border-radius: 0 0 32px 32px;
}

.achievements-hero::before {
    position: absolute;
    right: -80px;
    bottom: 0;
    left: -80px;
    height: 180px;
    content: "";
    background:
        linear-gradient(150deg, transparent 0 25%, #28303a 25.5% 39%, #1e2530 39.5% 52%, transparent 52.5%),
        linear-gradient(180deg, rgba(76, 82, 66, 0), rgba(76, 82, 66, 0.44));
    transform: skewY(-4deg);
}

.achievements-top,
.achievements-copy,
.motel-sign {
    position: relative;
    z-index: 2;
}

.help-button {
    display: grid;
    place-items: center;
    justify-self: end;
    width: 48px;
    height: 48px;
    color: white;
    background: var(--navy);
    border-radius: 50%;
    box-shadow: 0 12px 24px rgba(24, 32, 43, 0.18);
    font-size: 27px;
    font-weight: 900;
}

.achievements-copy {
    max-width: 560px;
    margin-top: 42px;
}

.achievements-copy h1 {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 52px;
    line-height: 1;
}

.achievements-copy p {
    max-width: 500px;
    margin: 0;
    color: #233246;
    font-size: 21px;
    line-height: 1.45;
}

.motel-sign {
    position: absolute;
    right: 52px;
    bottom: 112px;
    display: grid;
    gap: 8px;
    justify-items: center;
    transform: rotate(1deg);
}

.motel-sign strong {
    display: grid;
    place-items: center;
    width: 118px;
    height: 112px;
    color: #fff8e9;
    background: linear-gradient(160deg, #10314e, #c3452f 42%, #f3b55b);
    border: 5px solid #10314e;
    border-radius: 30px 30px 24px 24px;
    box-shadow: 0 14px 26px rgba(24, 32, 43, 0.2);
    font-size: 30px;
    line-height: 0.92;
    text-align: center;
    text-transform: uppercase;
}

.motel-sign span {
    padding: 8px 13px;
    color: #fff8e9;
    background: #a33a29;
    border: 4px solid #7b2b20;
    border-radius: 4px;
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
}

.achievement-progress-card {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 170px 1fr 44px;
    gap: 22px;
    align-items: center;
    margin: -126px 0 16px;
    padding: 22px 24px;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(234, 223, 206, 0.78);
    border-radius: 24px;
    box-shadow: 0 22px 48px rgba(24, 32, 43, 0.16);
    backdrop-filter: blur(18px);
}

.achievement-progress-card h2 {
    margin: 0 0 4px;
    font-size: 42px;
    line-height: 1;
}

.achievement-progress-card h2 span,
.achievement-progress-card p {
    color: var(--red);
}

.achievement-progress-card > div > strong {
    display: block;
    margin-bottom: 16px;
    font-size: 18px;
}

.achievement-progress-card p {
    margin: 10px 0 0;
    font-weight: 800;
}

.achievement-progress-card > a {
    color: var(--navy);
    font-size: 48px;
    line-height: 1;
}

.achievement-emblem {
    display: grid;
    place-items: center;
    align-content: center;
    width: 132px;
    height: 132px;
    color: #fff3df;
    background:
        linear-gradient(180deg, #123b5c, #0b263f),
        #123b5c;
    border: 5px solid #d47a35;
    border-radius: 36px 36px 28px 28px;
    box-shadow: inset 0 0 0 4px #071c30, 0 12px 22px rgba(24, 32, 43, 0.12);
    text-align: center;
    text-transform: uppercase;
}

.achievement-emblem span {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.achievement-emblem strong {
    font-size: 46px;
    line-height: 0.95;
}

.achievement-emblem em {
    min-width: 118px;
    margin-top: 4px;
    padding: 5px 8px;
    color: #fff8e9;
    background: var(--red);
    border-radius: 6px;
    font-size: 14px;
    font-style: normal;
    font-weight: 900;
    line-height: 1.05;
}

.achievement-emblem.small {
    width: 126px;
    height: 126px;
    margin: 0 auto 14px;
}

.achievement-emblem.small strong {
    font-size: 35px;
}

.achievement-emblem.mini {
    width: 82px;
    height: 82px;
    border-width: 3px;
    border-radius: 22px;
}

.achievement-emblem.mini strong {
    font-size: 26px;
}

.achievement-emblem.mini em {
    min-width: 72px;
    font-size: 9px;
}

.achievement-emblem.locked {
    filter: grayscale(1);
    opacity: 0.42;
}

.achievement-meter {
    overflow: hidden;
    width: 100%;
    height: 9px;
    background: #dfe1e3;
    border-radius: 999px;
}

.achievement-meter span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--red), #dd7441);
    border-radius: inherit;
}

.achievement-tabs {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0 0 28px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(234, 223, 206, 0.76);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(24, 32, 43, 0.12);
}

.achievement-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 62px;
    color: var(--navy);
    border-radius: 16px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.achievement-tabs a + a {
    border-left: 1px solid var(--line);
}

.achievement-tabs a.active {
    color: var(--red);
    background: #fff;
    box-shadow: 0 12px 24px rgba(194, 65, 45, 0.12);
}

.achievement-tabs span {
    font-size: 26px;
}

.achievement-section {
    margin-bottom: 28px;
}

.achievement-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.achievement-section h2,
.achievement-section-heading h2 {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 24px;
}

.achievement-section-heading h2 {
    margin: 0;
}

.achievement-section-heading a {
    color: var(--red);
    font-size: 17px;
    font-weight: 800;
}

.earned-achievement-grid,
.locked-achievement-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.earned-achievement-card,
.locked-achievement-card,
.empty-achievements {
    min-height: 250px;
    padding: 16px 14px;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(234, 223, 206, 0.78);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(24, 32, 43, 0.09);
}

.earned-achievement-card h3,
.locked-achievement-card h3 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: 15px;
}

.earned-achievement-card p {
    margin: 0;
    color: #344256;
    font-size: 14px;
    line-height: 1.45;
}

.earned-achievement-card time {
    display: block;
    margin-top: 12px;
    color: var(--red);
    font-size: 14px;
    font-weight: 800;
}

.empty-achievements {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 160px;
}

.empty-achievements strong,
.empty-achievements span {
    display: block;
}

.empty-achievements span {
    margin-top: 6px;
    color: var(--muted);
}

.progress-achievement-list {
    display: grid;
    gap: 12px;
}

.progress-achievement-card {
    display: grid;
    grid-template-columns: 92px 1fr 88px;
    gap: 18px;
    align-items: center;
    min-height: 122px;
    padding: 16px 18px;
    color: var(--navy);
    background: #fff;
    border: 1px solid rgba(234, 223, 206, 0.78);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(24, 32, 43, 0.1);
}

.progress-achievement-card h3,
.progress-achievement-card p {
    margin: 0;
}

.progress-achievement-card h3 {
    margin-bottom: 6px;
    font-size: 20px;
}

.progress-achievement-card p {
    margin-bottom: 14px;
    color: #344256;
    line-height: 1.4;
}

.progress-achievement-card > span {
    color: var(--red);
    font-size: 18px;
    font-weight: 900;
    text-align: right;
}

.locked-achievement-card {
    position: relative;
    min-height: 210px;
}

.locked-achievement-card > span {
    position: absolute;
    left: 50%;
    top: 94px;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: rgba(24, 32, 43, 0.78);
    border-radius: 50%;
    font-size: 0;
    transform: translateX(-50%);
}

.locked-achievement-card > span::before {
    content: "";
    width: 16px;
    height: 14px;
    border: 3px solid white;
    border-radius: 3px;
    box-shadow: 0 -9px 0 -4px rgba(24, 32, 43, 0.78), 0 -9px 0 -1px white;
}

.vault-page {
    background:
        linear-gradient(180deg, #f8fbff 0, #fffaf2 520px, #fffaf2 100%),
        var(--paper);
}

.vault-page .page-shell {
    width: min(760px, 100%);
    padding: 0 0 116px;
}

.vault-screen {
    padding: 0 18px 34px;
}

.vault-hero {
    position: relative;
    min-height: 470px;
    margin: 0 -18px;
    padding: 42px 28px 154px;
    overflow: hidden;
    color: var(--navy);
    background:
        linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0, rgba(248, 251, 255, 0.7) 39%, rgba(255, 211, 159, 0.3) 64%, rgba(24, 32, 43, 0.58) 100%),
        linear-gradient(145deg, #f0f7ff 0, #fff4e4 46%, #d46a39 100%);
    border-radius: 0 0 32px 32px;
}

.vault-hero::before {
    position: absolute;
    inset: auto -80px 0;
    height: 174px;
    content: "";
    background:
        linear-gradient(150deg, transparent 0 25%, #29313b 25.5% 39%, #1e2530 39.5% 52%, transparent 52.5%),
        linear-gradient(180deg, rgba(76, 82, 66, 0), rgba(76, 82, 66, 0.42));
    transform: skewY(-4deg);
}

.vault-top,
.vault-copy {
    position: relative;
    z-index: 2;
}

.vault-copy {
    max-width: 540px;
    margin-top: 42px;
}

.vault-copy h1 {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 56px;
    line-height: 1;
}

.vault-copy p {
    margin: 0;
    color: #405064;
    font-size: 23px;
    line-height: 1.35;
}

.vault-progress-card {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 170px 1fr 44px;
    gap: 22px;
    align-items: center;
    margin: -112px 0 14px;
    padding: 22px 24px;
    color: var(--navy);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(234, 223, 206, 0.78);
    border-radius: 24px;
    box-shadow: 0 22px 48px rgba(24, 32, 43, 0.16);
    backdrop-filter: blur(18px);
}

.vault-progress-card h2 {
    margin: 0 0 4px;
    font-size: 42px;
    line-height: 1;
}

.vault-progress-card h2 span,
.vault-progress-card p {
    color: var(--red);
}

.vault-progress-card > div > strong {
    display: block;
    margin-bottom: 16px;
    font-size: 18px;
}

.vault-progress-card p {
    margin: 10px 0 0;
    font-weight: 800;
}

.vault-progress-card > a {
    color: var(--navy);
    font-size: 48px;
    line-height: 1;
}

.vault-filter-tabs {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 0 0 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(234, 223, 206, 0.78);
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(24, 32, 43, 0.12);
}

.vault-filter-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    color: var(--navy);
    background: #fff;
    border: 1px solid rgba(234, 223, 206, 0.86);
    border-radius: 17px;
    box-shadow: 0 8px 18px rgba(24, 32, 43, 0.06);
    font-size: 16px;
    font-weight: 900;
}

.vault-filter-tabs a.active {
    color: white;
    background: linear-gradient(135deg, #d85f31, var(--red));
    border-color: transparent;
}

.vault-filter-tabs span {
    font-size: 21px;
}

.vault-state-filter {
    max-width: 340px;
    margin: 0 0 18px;
}

.vault-memory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.memory-card,
.keep-collecting-card {
    overflow: hidden;
    min-height: 316px;
    background: #fff;
    border: 1px solid rgba(234, 223, 206, 0.82);
    border-radius: 18px;
    box-shadow: 0 14px 32px rgba(24, 32, 43, 0.1);
}

.memory-photo {
    position: relative;
    display: block;
}

.memory-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f3eadb;
}

.memory-photo span {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: var(--navy);
    border: 4px solid white;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(24, 32, 43, 0.22);
    font-size: 22px;
    font-weight: 900;
}

.memory-card div {
    padding: 15px 14px 16px;
}

.memory-card h2 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: 18px;
    line-height: 1.16;
}

.memory-card p {
    margin: 0 0 8px;
    color: #526073;
    font-size: 14px;
    line-height: 1.35;
}

.memory-card time,
.memory-card em {
    display: block;
    color: var(--red);
    font-size: 14px;
    font-style: normal;
    font-weight: 800;
}

.memory-card em {
    margin-top: 6px;
}

.keep-collecting-card {
    display: grid;
    align-content: center;
    padding: 24px;
    color: var(--navy);
    background:
        radial-gradient(circle at 78% 14%, rgba(24, 32, 43, 0.08), transparent 30%),
        #fff8ec;
}

.keep-collecting-card span {
    color: var(--red);
    font-size: 44px;
}

.keep-collecting-card h2,
.keep-collecting-card p {
    margin: 0;
}

.keep-collecting-card h2 {
    margin-top: 14px;
    font-size: 24px;
}

.keep-collecting-card p {
    margin-top: 10px;
    color: #526073;
    font-size: 18px;
    line-height: 1.38;
}

.vault-empty {
    grid-column: 1 / -1;
}

.vault-reel-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    min-height: 178px;
    padding: 26px;
    overflow: hidden;
    color: var(--navy);
    background:
        linear-gradient(90deg, rgba(255, 252, 246, 0.98), rgba(255, 244, 226, 0.72)),
        linear-gradient(145deg, #fff6e8, #d47b43);
    border: 1px solid rgba(224, 190, 146, 0.8);
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(24, 32, 43, 0.12);
}

.vault-reel-card > div {
    display: flex;
    align-items: center;
    gap: 18px;
}

.vault-reel-card span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: var(--red);
    border: 3px solid var(--red);
    border-radius: 14px;
    font-size: 27px;
}

.vault-reel-card h2,
.vault-reel-card p {
    margin: 0;
}

.vault-reel-card h2 {
    font-size: 28px;
}

.vault-reel-card p {
    margin-top: 8px;
    color: #405064;
    font-size: 18px;
}

.vault-reel-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 24px;
    color: var(--red);
    background: rgba(255, 255, 255, 0.68);
    border: 2px solid var(--red);
    border-radius: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.landing {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    align-items: center;
    min-height: calc(100vh - 124px);
    gap: 34px;
}

.landing h1,
.page-intro h1,
.dashboard-hero h1,
.stop-hero h1,
.auth-card h1 {
    margin: 0;
    font-size: clamp(42px, 8vw, 84px);
    line-height: 0.96;
    letter-spacing: 0;
}

.landing p,
.page-intro p,
.dashboard-hero p,
.stop-hero p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 18px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary {
    color: white;
    background: var(--red);
    box-shadow: 0 12px 26px rgba(194, 65, 45, 0.22);
}

.btn-secondary {
    color: var(--navy);
    background: #f2eadc;
}

.full-width {
    width: 100%;
}

.phone-preview {
    min-height: 520px;
    border-radius: 36px;
    padding: 18px;
    background:
        linear-gradient(160deg, rgba(23, 50, 77, 0.98), rgba(31, 122, 118, 0.78)),
        url("/assets/images/road-texture.jpg");
    box-shadow: var(--shadow);
}

.preview-card {
    margin-top: 240px;
    padding: 22px;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 24px;
    backdrop-filter: blur(12px);
}

.preview-card p,
.preview-card h2 {
    margin: 0 0 10px;
}

.mini-progress,
.progress-track {
    overflow: hidden;
    height: 12px;
    background: rgba(23, 50, 77, 0.12);
    border-radius: 999px;
}

.mini-progress span,
.progress-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--red));
    border-radius: inherit;
}

.feature-strip,
.stat-grid,
.two-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-strip div,
.card,
.stat-card,
.auth-card,
.dashboard-hero,
.stop-hero,
.page-intro,
.empty-state {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(234, 223, 206, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-strip div,
.stat-card,
.card,
.auth-card,
.dashboard-hero,
.stop-hero,
.page-intro,
.empty-state {
    padding: clamp(18px, 4vw, 28px);
}

.feature-strip strong,
.feature-strip span,
.stat-card span,
.stat-card strong {
    display: block;
}

.feature-strip span,
.stat-card span,
.muted,
.form-link {
    color: var(--muted);
}

.dashboard-hero,
.stop-hero,
.page-intro {
    margin-bottom: 18px;
}

.dashboard-hero {
    position: relative;
    display: grid;
    gap: 18px;
    overflow: hidden;
}

.public-hero {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
    padding: clamp(24px, 6vw, 46px);
    color: white;
    background: linear-gradient(135deg, var(--navy), var(--teal));
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.public-hero .eyebrow,
.public-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.public-hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.98;
}

.public-hero .progress-track {
    background: rgba(255, 255, 255, 0.18);
}

.public-stats,
.share-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.public-stats span {
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.public-stats strong {
    margin-right: 5px;
}

.share-strip {
    justify-content: space-between;
    margin: 18px 0;
    padding: 18px;
    background: #fff7e8;
    border: 1px solid #f2d7a6;
    border-radius: var(--radius);
}

.share-strip strong {
    display: block;
    color: var(--navy);
    overflow-wrap: anywhere;
}

.route-badge,
.state-chip,
.distance-pill,
.must-see-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    padding: 6px 10px;
    color: var(--navy);
    background: #f5e6ce;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.weather-card {
    display: grid;
    gap: 5px;
    margin: 14px 0 16px;
    padding: 14px;
    color: var(--navy);
    background: linear-gradient(135deg, #fff7e8, #ffffff);
    border: 1px solid rgba(196, 79, 45, 0.14);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(24, 32, 43, 0.08);
}

.weather-card .eyebrow {
    margin: 0;
}

.weather-card strong {
    color: var(--navy);
    font-size: 20px;
    line-height: 1.2;
}

.weather-card span {
    color: #55616f;
    font-weight: 700;
}

.weather-card.muted-weather {
    background: #f7f4ee;
    border-color: rgba(24, 32, 43, 0.08);
    box-shadow: none;
}

.stop-weather-card {
    max-width: 430px;
    margin-top: 18px;
}

.drive-card {
    display: grid;
    gap: 5px;
    margin: 14px 0 16px;
    padding: 14px;
    color: var(--navy);
    background: linear-gradient(135deg, #eef5fb, #ffffff);
    border: 1px solid rgba(10, 42, 74, 0.1);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(24, 32, 43, 0.08);
}

.drive-card .eyebrow {
    margin: 0;
}

.drive-card strong {
    color: var(--navy);
    font-size: 20px;
    line-height: 1.2;
}

.drive-card span {
    color: #55616f;
    font-weight: 700;
}

.drive-card.muted-drive {
    background: #f7f4ee;
    border-color: rgba(24, 32, 43, 0.08);
    box-shadow: none;
}

.inline-favorite-form {
    display: inline-flex;
}

.favorite-toggle {
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    color: var(--navy);
    background: #f2eadc;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 10px 22px rgba(24, 32, 43, 0.12);
    font: inherit;
    font-size: 25px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.favorite-toggle.active {
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.favorite-list-row {
    grid-template-columns: 100px 1fr 110px;
}

.favorite-row-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.favorite-row-actions form {
    display: inline-flex;
}

.must-see-chip {
    color: white;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.hero-chip {
    margin-bottom: 12px;
}

.inline-featured {
    display: inline-flex;
    margin-left: 6px;
    padding: 3px 7px;
    color: white;
    background: var(--red);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    vertical-align: middle;
}

.featured-callout {
    padding: 12px 14px;
    color: #7a3b00;
    background: #fff0d0;
    border: 1px solid #ffd38a;
    border-radius: 14px;
}

.stat-grid {
    margin: 18px 0;
}

.route-map-card {
    overflow: hidden;
    margin: 18px 0;
    padding: clamp(18px, 4vw, 28px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(234, 223, 206, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-heading.compact {
    align-items: start;
    margin: 0 0 14px;
}

.section-heading.compact span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    color: var(--navy);
    background: #f5e6ce;
    border-radius: 999px;
    font-weight: 900;
}

.route-map-wrap {
    overflow-x: auto;
    padding-bottom: 4px;
}

.route-map-svg {
    width: 100%;
    min-width: 720px;
    height: auto;
    display: block;
}

.map-land {
    fill: #f7efdf;
    stroke: #eadfce;
    stroke-width: 2;
}

.map-line-base,
.map-line-complete {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.map-line-base {
    stroke: #d8c8b2;
    stroke-width: 7;
}

.map-line-complete {
    stroke: var(--teal);
    stroke-width: 8;
}

.map-stop {
    fill: #fffdf8;
    stroke: var(--navy);
    stroke-width: 2.4;
    transition: r 0.18s ease, fill 0.18s ease;
}

.map-stop.completed {
    fill: var(--teal);
    stroke: white;
}

.map-stop.next {
    fill: var(--orange);
    stroke: var(--red);
    stroke-width: 3;
}

.map-stop.featured {
    fill: var(--red);
    stroke: var(--orange);
    stroke-width: 3;
}

.map-stop.featured.completed {
    fill: var(--teal);
    stroke: var(--orange);
}

.map-stop:hover {
    r: 8;
}

.map-current-marker circle:first-child {
    fill: rgba(194, 65, 45, 0.18);
    stroke: var(--red);
    stroke-width: 2;
}

.map-current-marker circle:last-child {
    fill: var(--red);
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.legend-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fffdf8;
    border: 2px solid var(--navy);
}

.legend-dot.completed {
    background: var(--teal);
    border-color: var(--teal);
}

.legend-dot.next {
    background: var(--orange);
    border-color: var(--red);
}

.legend-dot.featured {
    background: var(--red);
    border-color: var(--orange);
}

.legend-dot.current {
    background: var(--red);
    border-color: var(--red);
}

.stat-card strong {
    margin-top: 8px;
    font-size: 32px;
}

.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
}

.card h2 {
    margin: 0 0 10px;
    font-size: 26px;
}

.card p {
    color: var(--muted);
    line-height: 1.55;
}

.nearest-stop h2 {
    margin: 14px 0 8px;
}

.deviation-banner {
    display: grid;
    gap: 4px;
    margin: 14px 0;
    padding: 12px 14px;
    color: #7a3b00;
    background: #fff0d0;
    border: 1px solid #ffd38a;
    border-radius: 14px;
    line-height: 1.45;
}

.deviation-banner strong,
.deviation-banner span {
    display: block;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 30px 0 14px;
}

.section-heading h2 {
    margin: 0;
}

.section-heading a,
.vault-card a,
.form-link a {
    color: var(--red);
    font-weight: 800;
}

.route-list {
    display: grid;
    gap: 10px;
}

.route-list.grouped h2 {
    margin: 24px 0 4px;
    font-size: 18px;
}

.route-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.route-row span,
.route-row em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.route-row.done em {
    color: var(--teal);
    font-weight: 800;
}

.route-row.next {
    border-color: rgba(194, 65, 45, 0.5);
    box-shadow: 0 12px 24px rgba(194, 65, 45, 0.08);
}

.route-row.featured {
    background: linear-gradient(90deg, rgba(255, 247, 232, 0.96), #ffffff);
    border-color: #f2d7a6;
}

.auth-card {
    max-width: 560px;
    margin: 38px auto;
}

.stacked-form {
    display: grid;
    gap: 16px;
}

label,
legend {
    color: var(--ink);
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    padding: 12px 14px;
    color: var(--ink);
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
}

textarea {
    resize: vertical;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0;
    border: 0;
}

.choice-grid legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.choice-grid label {
    display: flex;
    gap: 10px;
    min-height: 78px;
    padding: 14px;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.choice-grid input {
    width: auto;
    min-height: auto;
    margin: 4px 0 0;
}

.choice-grid small {
    color: var(--muted);
    font-weight: 600;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.toggle-row input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.share-box {
    display: grid;
    gap: 6px;
    padding: 14px;
    background: #fff7e8;
    border: 1px solid #f2d7a6;
    border-radius: 14px;
}

.share-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.share-box a {
    color: var(--red);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.notice {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 14px;
    line-height: 1.5;
}

.completion-card {
    position: relative;
    overflow: hidden;
    margin: 18px 0;
    padding: clamp(24px, 6vw, 42px);
    color: white;
    background:
        linear-gradient(135deg, rgba(23, 50, 77, 0.96), rgba(31, 122, 118, 0.9)),
        radial-gradient(circle at top right, rgba(242, 157, 56, 0.36), transparent 32%);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.completion-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -70px;
    width: 220px;
    height: 220px;
    border: 18px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.completion-card .eyebrow {
    color: #ffd79c;
}

.completion-card h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: clamp(36px, 8vw, 70px);
    line-height: 0.98;
}

.completion-card p,
.completion-card .action-row {
    position: relative;
    z-index: 1;
}

.completion-card p {
    max-width: 660px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.6;
}

.completion-card .btn-secondary {
    color: white;
    background: rgba(255, 255, 255, 0.16);
}

.route-complete-card {
    isolation: isolate;
}

.celebration-burst {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.celebration-burst i {
    position: absolute;
    top: 18%;
    left: 50%;
    width: 10px;
    height: 26px;
    background: #ffd79c;
    border-radius: 999px;
    animation: burstFly 1300ms ease-out both;
}

.celebration-burst i:nth-child(2) { background: #f29d38; transform: rotate(45deg); animation-delay: 80ms; }
.celebration-burst i:nth-child(3) { background: #fff; transform: rotate(90deg); animation-delay: 130ms; }
.celebration-burst i:nth-child(4) { background: #1f7a76; transform: rotate(135deg); animation-delay: 180ms; }
.celebration-burst i:nth-child(5) { background: #c2412d; transform: rotate(180deg); animation-delay: 230ms; }
.celebration-burst i:nth-child(6) { background: #ffd79c; transform: rotate(225deg); animation-delay: 280ms; }
.celebration-burst i:nth-child(7) { background: #fff; transform: rotate(270deg); animation-delay: 330ms; }
.celebration-burst i:nth-child(8) { background: #f29d38; transform: rotate(315deg); animation-delay: 380ms; }

.route-celebration-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, rgba(242, 157, 56, 0.28), transparent 34%),
        rgba(10, 26, 43, 0.76);
    backdrop-filter: blur(12px);
    animation: overlayIn 260ms ease-out both;
}

.route-celebration-overlay.is-hidden {
    display: none;
}

.route-celebration-sky {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.route-celebration-sky span {
    position: absolute;
    top: -40px;
    width: 12px;
    height: 28px;
    border-radius: 999px;
    background: #ffd79c;
    animation: confettiDrop 2400ms linear infinite;
}

.route-celebration-sky span:nth-child(1) { left: 12%; background: #ffd79c; animation-delay: 0ms; }
.route-celebration-sky span:nth-child(2) { left: 28%; background: #f29d38; animation-delay: 300ms; }
.route-celebration-sky span:nth-child(3) { left: 45%; background: #ffffff; animation-delay: 120ms; }
.route-celebration-sky span:nth-child(4) { left: 63%; background: #1f7a76; animation-delay: 520ms; }
.route-celebration-sky span:nth-child(5) { left: 78%; background: #c2412d; animation-delay: 220ms; }
.route-celebration-sky span:nth-child(6) { left: 90%; background: #ffd79c; animation-delay: 680ms; }

.route-celebration-panel {
    position: relative;
    width: min(560px, 100%);
    padding: clamp(24px, 7vw, 42px);
    overflow: hidden;
    color: var(--navy);
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 232, 0.96)),
        var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.32);
    animation: celebrationPop 560ms cubic-bezier(.18, .86, .28, 1.2) both;
}

.route-celebration-panel > button {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--navy);
    background: #f2eadc;
    border: 0;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.route-shield-celebration {
    display: grid;
    place-items: center;
    width: 110px;
    height: 92px;
    margin: 0 auto 16px;
    color: white;
    background: linear-gradient(160deg, var(--navy), var(--red));
    border: 6px solid #fff1d8;
    border-radius: 28px 28px 34px 34px;
    box-shadow: 0 12px 26px rgba(194, 65, 45, 0.28);
    font-size: 48px;
    font-weight: 900;
}

.route-celebration-panel h2 {
    margin: 0 0 12px;
    font-size: clamp(42px, 9vw, 72px);
    line-height: 0.95;
}

.route-celebration-panel p:not(.eyebrow) {
    max-width: 430px;
    margin: 0 auto 22px;
    color: #405064;
    font-size: 18px;
    line-height: 1.5;
}

.celebration-road {
    position: relative;
    height: 82px;
    margin: 12px auto 24px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg, #1b2430, #313b48);
}

.celebration-road::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 200%;
    height: 6px;
    content: "";
    background: repeating-linear-gradient(90deg, #ffd79c 0 42px, transparent 42px 78px);
    transform: translateY(-50%);
    animation: roadLine 1400ms linear infinite;
}

.celebration-road span {
    position: absolute;
    right: 26px;
    bottom: 16px;
    width: 22px;
    height: 22px;
    background: var(--orange);
    border-radius: 50%;
    box-shadow: -12px 0 0 var(--red), -24px 0 0 var(--teal);
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes celebrationPop {
    from { opacity: 0; transform: translateY(18px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confettiDrop {
    from { transform: translateY(-80px) rotate(0deg); opacity: 1; }
    to { transform: translateY(calc(100vh + 120px)) rotate(540deg); opacity: 0.8; }
}

@keyframes burstFly {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
    20% { opacity: 1; }
    to { opacity: 0; transform: translate(calc(-50% + var(--burst-x, 120px)), calc(-50% + var(--burst-y, -120px))) scale(1); }
}

.celebration-burst i:nth-child(1) { --burst-x: 0px; --burst-y: -150px; }
.celebration-burst i:nth-child(2) { --burst-x: 120px; --burst-y: -116px; }
.celebration-burst i:nth-child(3) { --burst-x: 170px; --burst-y: 0px; }
.celebration-burst i:nth-child(4) { --burst-x: 115px; --burst-y: 115px; }
.celebration-burst i:nth-child(5) { --burst-x: 0px; --burst-y: 150px; }
.celebration-burst i:nth-child(6) { --burst-x: -115px; --burst-y: 115px; }
.celebration-burst i:nth-child(7) { --burst-x: -170px; --burst-y: 0px; }
.celebration-burst i:nth-child(8) { --burst-x: -120px; --burst-y: -116px; }

@keyframes roadLine {
    from { transform: translate(-78px, -50%); }
    to { transform: translate(0, -50%); }
}

@media (prefers-reduced-motion: reduce) {
    .route-celebration-overlay,
    .route-celebration-panel,
    .route-celebration-sky span,
    .celebration-road::before,
    .celebration-burst i {
        animation: none;
    }
}

.notice.success {
    color: #145147;
    background: #dff5ed;
    border: 1px solid #b9e7da;
}

.notice.warning {
    color: #7a3b00;
    background: #fff0d0;
    border: 1px solid #ffd38a;
}

.notice.warning a {
    color: #8c2f1f;
    font-weight: 900;
}

.notice.error {
    color: #7a2015;
    background: #ffe3dd;
    border: 1px solid #ffc7bc;
}

.proof-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 16px;
}

.stop-photo-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 16px;
}

.stop-photo-gallery a {
    position: relative;
    overflow: hidden;
    color: white;
    border-radius: 16px;
    background: #f4eadb;
}

.stop-photo-gallery .proof-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: none;
    border-radius: 0;
}

.stop-photo-gallery span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    padding: 8px 10px;
    background: rgba(10, 26, 43, 0.72);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.add-photo-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.vault-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vault-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(24, 32, 43, 0.08);
}

.vault-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #f4eadb;
}

.vault-card div {
    padding: 14px;
}

.vault-card h2 {
    margin: 10px 0 6px;
    font-size: 18px;
}

.vault-card p,
.vault-card span {
    color: var(--muted);
    line-height: 1.45;
}

.journal-layout {
    align-items: start;
}

.card-heading-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.card-heading-row h2 {
    margin: 0 0 10px;
}

.card-heading-row a {
    color: var(--red);
    font-weight: 900;
}

.journal-list,
.mini-journal-list {
    display: grid;
    gap: 12px;
}

.journal-card,
.mini-journal-list article {
    padding: 16px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(24, 32, 43, 0.06);
}

.journal-card > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.journal-card span,
.journal-card em,
.mini-journal-list span {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
}

.journal-card a {
    color: var(--red);
    font-size: 13px;
    font-weight: 900;
}

.journal-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.journal-card p,
.mini-journal-list p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.mini-journal-list strong {
    display: block;
    margin: 4px 0 6px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pills a {
    padding: 10px 12px;
    color: var(--navy);
    background: #f2eadc;
    border-radius: 999px;
    font-weight: 900;
}

.filter-pills a.active {
    color: white;
    background: var(--navy);
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.admin-tabs a,
.admin-link {
    color: white;
    background: var(--navy);
    border-radius: 999px;
    font-weight: 900;
}

.admin-tabs a {
    padding: 10px 13px;
}

.admin-link {
    display: inline-flex;
    padding: 8px 10px;
    font-size: 13px;
}

.admin-table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(24, 32, 43, 0.08);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th,
.admin-table td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table th {
    color: var(--navy);
    background: #fff7e8;
    font-size: 13px;
    text-transform: uppercase;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.wide-card {
    max-width: 760px;
}

.form-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.badge-grid.small {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 12px 0 0;
}

.badge-card {
    padding: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(24, 32, 43, 0.08);
}

.badge-card > span {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: white;
    background: var(--navy);
    border-radius: 50%;
    font-weight: 900;
}

.badge-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.badge-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.badge-card.earned {
    border-color: rgba(31, 122, 118, 0.32);
}

.badge-card.earned > span {
    background: linear-gradient(135deg, var(--teal), var(--orange));
}

.badge-card.locked {
    opacity: 0.62;
}

.badge-card.locked > span {
    background: #9aa0a8;
}

.badge-unlock-card {
    margin: 16px 0;
}

.earned-badges {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.earned-badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: white;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-weight: 800;
}

.earned-badges strong {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    color: var(--navy);
    background: #ffd79c;
    border-radius: 50%;
    font-size: 12px;
}

.filter-bar {
    margin: 0 0 18px;
    max-width: 320px;
}

.mobile-tabbar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 30;
    display: none;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    min-height: 76px;
    padding: 8px 10px 10px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(234, 223, 206, 0.8);
    border-radius: 26px;
    box-shadow: 0 18px 42px rgba(24, 32, 43, 0.18);
    backdrop-filter: blur(16px);
}

.mobile-tabbar a {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 8px 4px;
    color: #3c4756;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.mobile-tabbar a:first-child {
    color: var(--red);
}

.route-map-page .mobile-tabbar a:first-child {
    color: #3c4756;
}

.route-map-page .mobile-tabbar a[href="/pages/stops.php"] {
    color: var(--red);
}

.achievements-page .mobile-tabbar a:first-child {
    color: #3c4756;
}

.achievements-page .mobile-tabbar a[href="/pages/achievements.php"] {
    color: var(--red);
}

.vault-page .mobile-tabbar a:first-child {
    color: #3c4756;
}

.vault-page .mobile-tabbar a[href="/pages/vault.php"] {
    color: var(--red);
}

.mobile-tabbar a span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: currentColor;
    font-size: 24px;
    line-height: 1;
}

.mobile-tabbar .scan-tab {
    width: 70px;
    height: 70px;
    margin: -26px auto 0;
    padding: 0;
    color: white;
    background: linear-gradient(135deg, #de6a35, var(--red));
    border: 6px solid #fff;
    border-radius: 50%;
    box-shadow: 0 16px 30px rgba(194, 65, 45, 0.34);
    font-size: 0;
}

.mobile-tabbar .scan-tab span {
    width: 100%;
    height: 100%;
    font-size: 32px;
}

@media (max-width: 820px) {
    .top-nav {
        display: none;
    }

    .mobile-tabbar {
        display: grid;
    }

    .landing,
    .two-column,
    .feature-strip,
    .stat-grid,
    .vault-grid,
    .vault-grid.compact,
    .admin-photo-grid,
    .badge-grid,
    .badge-grid.small {
        grid-template-columns: 1fr;
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }

    .landing {
        min-height: auto;
        padding-top: 24px;
    }

    .phone-preview {
        min-height: 360px;
    }

    .preview-card {
        margin-top: 150px;
    }

    .hero-actions,
    .action-row,
    .share-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .route-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .sticky-action {
        position: sticky;
        bottom: 86px;
    }
}

@media (max-width: 760px) {
    .app-home-page .page-shell {
        padding-bottom: 108px;
    }

    .app-hero {
        min-height: 690px;
        padding: 42px 24px 144px;
    }

    .app-hero::after {
        right: 22px;
        bottom: 180px;
        width: 104px;
        height: 168px;
    }

    .hero-copy {
        margin-top: 46px;
    }

    .hero-copy h1 {
        font-size: 46px;
    }

    .hero-copy p {
        max-width: 320px;
        font-size: 21px;
    }

    .direction-launchers {
        margin-top: 38px;
    }

    .direction-pill {
        min-height: 84px;
        padding: 15px;
        border-radius: 30px;
    }

    .direction-pill strong {
        font-size: 16px;
    }

    .direction-pill small {
        font-size: 14px;
    }

    .app-progress-card {
        grid-template-columns: 155px 1fr;
        margin-top: -96px;
        padding: 20px;
        border-radius: 24px;
    }

    .app-progress-card strong {
        font-size: 50px;
    }

    .quick-action-grid {
        gap: 12px;
    }

    .quick-action-grid a {
        min-height: 122px;
        border-radius: 17px;
    }

    .next-stop-tile {
        grid-template-columns: 128px 1fr 50px;
        gap: 14px;
    }

    .next-stop-copy strong {
        font-size: 22px;
    }

    .route-map-hero {
        padding: 40px 24px 0;
    }

    .map-title-row {
        grid-template-columns: 1fr 210px;
    }

    .map-title-row h1 {
        font-size: 48px;
    }

    .map-title-row p {
        font-size: 21px;
    }

    .usa-map-panel {
        min-height: 810px;
    }

    .usa-route-svg {
        width: 130%;
        margin: 158px -15% 0;
    }

    .map-floating-controls {
        right: 24px;
        bottom: 210px;
    }

    .map-legend.floating {
        left: 24px;
        bottom: 218px;
    }

    .map-stop-card {
        grid-template-columns: 150px 32px 1fr 50px;
    }

    .achievements-hero {
        min-height: 505px;
        padding: 40px 24px 160px;
    }

    .achievements-copy h1 {
        font-size: 48px;
    }

    .achievement-progress-card {
        grid-template-columns: 150px 1fr 34px;
        gap: 18px;
    }

    .earned-achievement-grid,
    .locked-achievement-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vault-hero {
        min-height: 455px;
        padding: 40px 24px 148px;
    }

    .vault-copy h1 {
        font-size: 50px;
    }

    .vault-progress-card {
        grid-template-columns: 150px 1fr 34px;
        gap: 18px;
    }

    .vault-memory-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vault-filter-tabs {
        gap: 10px;
    }

    .vault-filter-tabs a {
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .site-header {
        padding: 12px 14px;
    }

    .brand span:last-child {
        display: none;
    }

    .page-shell {
        padding-inline: 14px;
    }

    .app-home-page .page-shell {
        padding-inline: 0;
    }

    .app-home {
        padding-inline: 14px;
    }

    .app-hero {
        min-height: 650px;
        margin-inline: -14px;
        padding: 36px 22px 132px;
        border-radius: 0 0 28px 28px;
    }

    .app-hero-top {
        grid-template-columns: 44px 1fr 44px;
    }

    .hamburger-button {
        width: 44px;
        height: 44px;
        padding-inline: 6px;
    }

    .hamburger-button span {
        width: 28px;
    }

    .passport-logo span {
        font-size: 13px;
    }

    .passport-logo strong {
        width: 72px;
        height: 54px;
        border-width: 6px;
        font-size: 34px;
    }

    .signal-dots {
        transform: scale(0.86);
        transform-origin: right center;
    }

    .app-hero::after {
        right: 22px;
        bottom: 164px;
        width: 86px;
        height: 142px;
        border-width: 5px;
    }

    .hero-copy {
        margin-top: 36px;
    }

    .hero-copy h1 {
        font-size: 38px;
        line-height: 1.12;
    }

    .hero-copy p {
        max-width: 270px;
        font-size: 18px;
    }

    .direction-launchers {
        gap: 10px;
        margin-top: 36px;
    }

    .direction-pill {
        grid-template-columns: 42px 1fr;
        min-height: 78px;
        padding: 13px 12px;
        border-radius: 26px;
    }

    .direction-pill span {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .direction-pill strong {
        font-size: 14px;
    }

    .direction-pill small {
        font-size: 12px;
    }

    .app-progress-card {
        grid-template-columns: 1fr;
        gap: 6px;
        margin: -82px 4px 22px;
        padding: 20px;
    }

    .app-progress-card strong {
        font-size: 48px;
    }

    .quick-action-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 9px;
        margin-inline: 0;
    }

    .quick-action-grid a {
        min-height: 104px;
        padding: 12px 5px;
        border-radius: 16px;
    }

    .quick-action-grid span {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        font-size: 18px;
    }

    .quick-action-grid strong {
        font-size: 11px;
    }

    .next-stop-tile {
        grid-template-columns: 112px 1fr 42px;
        min-height: 132px;
        gap: 12px;
        padding: 13px;
        border-radius: 20px;
    }

    .next-stop-copy strong {
        font-size: 19px;
    }

    .next-stop-copy small {
        font-size: 13px;
    }

    .round-arrow {
        width: 42px;
        height: 42px;
        font-size: 30px;
    }

    .memory-banner {
        grid-template-columns: 106px 1fr;
        gap: 16px;
        min-height: 150px;
        padding: 18px;
    }

    .passport-book {
        width: 96px;
        height: 116px;
        font-size: 34px;
    }

    .memory-banner h2 {
        font-size: 22px;
    }

    .memory-banner p {
        font-size: 15px;
    }

    .mobile-tabbar {
        right: 8px;
        bottom: 8px;
        left: 8px;
    }

    .route-map-page .page-shell {
        padding-inline: 0;
    }

    .route-map-hero {
        padding: 34px 24px 0;
    }

    .map-top {
        margin-bottom: 26px;
    }

    .filter-button {
        min-height: 48px;
        padding: 0 14px;
        font-size: 0;
    }

    .filter-button::before {
        margin-right: 0;
    }

    .map-title-row {
        grid-template-columns: 1fr 160px;
        gap: 14px;
    }

    .map-title-row h1 {
        font-size: 38px;
    }

    .map-title-row p {
        font-size: 17px;
    }

    .map-progress-card {
        min-height: 126px;
        padding: 16px 36px 16px 16px;
        border-radius: 20px;
    }

    .map-progress-card span {
        font-size: 11px;
    }

    .map-progress-card strong {
        font-size: 42px;
    }

    .map-progress-card small {
        font-size: 14px;
    }

    .map-progress-card em {
        right: 14px;
        font-size: 34px;
    }

    .usa-map-panel {
        min-height: 760px;
        padding-top: 180px;
    }

    .usa-route-svg {
        width: 160%;
        margin: 132px -32% 0;
    }

    .map-labels text {
        font-size: 21px;
    }

    .map-floating-controls {
        right: 24px;
        bottom: 206px;
        gap: 10px;
    }

    .map-floating-controls button {
        width: 52px;
        height: 52px;
        border-radius: 18px;
        font-size: 26px;
    }

    .map-legend.floating {
        left: 18px;
        right: 84px;
        bottom: 210px;
        gap: 10px;
        justify-content: space-between;
        padding: 12px 14px;
        font-size: 13px;
    }

    .nearby-sheet {
        margin-top: -170px;
        padding: 16px 18px 24px;
        border-radius: 28px 28px 0 0;
    }

    .sheet-heading h2 {
        font-size: 25px;
    }

    .sheet-heading button {
        font-size: 15px;
    }

    .map-stop-card {
        grid-template-columns: 92px 28px 1fr 42px;
        gap: 9px;
        min-height: 116px;
        padding: 12px;
        border-radius: 20px;
    }

    .stop-number {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .map-card-copy strong {
        font-size: 16px;
    }

    .map-card-copy small {
        font-size: 13px;
    }

    .map-card-copy em {
        font-size: 13px;
    }

    .achievements-page .page-shell {
        padding-inline: 0;
    }

    .achievements-screen {
        padding-inline: 14px;
    }

    .achievements-hero {
        min-height: 470px;
        margin-inline: -14px;
        padding: 34px 22px 142px;
        border-radius: 0 0 28px 28px;
    }

    .achievements-copy {
        margin-top: 34px;
    }

    .achievements-copy h1 {
        font-size: 38px;
    }

    .achievements-copy p {
        max-width: 290px;
        font-size: 17px;
    }

    .help-button {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .motel-sign {
        right: 34px;
        bottom: 90px;
        transform: scale(0.74) rotate(1deg);
        transform-origin: right bottom;
    }

    .achievement-progress-card {
        grid-template-columns: 104px 1fr 24px;
        gap: 12px;
        margin-top: -104px;
        padding: 16px;
        border-radius: 22px;
    }

    .achievement-progress-card h2 {
        font-size: 32px;
    }

    .achievement-progress-card > div > strong {
        margin-bottom: 12px;
        font-size: 15px;
    }

    .achievement-progress-card > a {
        font-size: 34px;
    }

    .achievement-emblem {
        width: 92px;
        height: 92px;
        border-width: 4px;
        border-radius: 24px;
    }

    .achievement-emblem span {
        font-size: 10px;
    }

    .achievement-emblem strong {
        font-size: 31px;
    }

    .achievement-emblem em {
        min-width: 82px;
        font-size: 10px;
    }

    .achievement-emblem.small {
        width: 94px;
        height: 94px;
    }

    .achievement-tabs {
        margin-bottom: 24px;
        padding: 8px;
        border-radius: 20px;
    }

    .achievement-tabs a {
        min-height: 54px;
        gap: 5px;
        padding: 6px;
        font-size: 11px;
    }

    .achievement-tabs span {
        font-size: 20px;
    }

    .earned-achievement-grid,
    .locked-achievement-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .earned-achievement-card,
    .locked-achievement-card {
        min-height: 220px;
        padding: 13px 10px;
    }

    .earned-achievement-card h3,
    .locked-achievement-card h3 {
        font-size: 14px;
    }

    .earned-achievement-card p {
        font-size: 13px;
    }

    .progress-achievement-card {
        grid-template-columns: 76px 1fr;
        gap: 12px;
        padding: 14px;
    }

    .progress-achievement-card > span {
        grid-column: 2;
        text-align: left;
    }

    .achievement-emblem.mini {
        width: 72px;
        height: 72px;
    }

    .progress-achievement-card h3 {
        font-size: 18px;
    }

    .progress-achievement-card p {
        font-size: 14px;
    }

    .vault-page .page-shell {
        padding-inline: 0;
    }

    .vault-screen {
        padding-inline: 14px;
    }

    .vault-hero {
        min-height: 420px;
        margin-inline: -14px;
        padding: 34px 22px 130px;
        border-radius: 0 0 28px 28px;
    }

    .vault-copy {
        margin-top: 32px;
    }

    .vault-copy h1 {
        font-size: 39px;
    }

    .vault-copy p {
        max-width: 300px;
        font-size: 17px;
    }

    .vault-progress-card {
        grid-template-columns: 104px 1fr 24px;
        gap: 12px;
        margin-top: -96px;
        padding: 16px;
        border-radius: 22px;
    }

    .vault-progress-card h2 {
        font-size: 32px;
    }

    .vault-progress-card > div > strong {
        margin-bottom: 12px;
        font-size: 15px;
    }

    .vault-progress-card > a {
        font-size: 34px;
    }

    .vault-filter-tabs {
        gap: 8px;
        padding: 10px;
        border-radius: 20px;
    }

    .vault-filter-tabs a {
        min-height: 46px;
        gap: 5px;
        font-size: 12px;
    }

    .vault-filter-tabs span {
        font-size: 18px;
    }

    .vault-memory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .memory-card,
    .keep-collecting-card {
        min-height: 260px;
        border-radius: 16px;
    }

    .memory-photo span {
        width: 34px;
        height: 34px;
        border-width: 3px;
        font-size: 18px;
    }

    .memory-card div {
        padding: 12px;
    }

    .memory-card h2 {
        font-size: 15px;
    }

    .memory-card p,
    .memory-card time,
    .memory-card em {
        font-size: 12px;
    }

    .keep-collecting-card {
        padding: 18px;
    }

    .keep-collecting-card h2 {
        font-size: 19px;
    }

    .keep-collecting-card p {
        font-size: 14px;
    }

    .vault-reel-card {
        grid-template-columns: 1fr;
        min-height: 180px;
        padding: 20px;
    }

    .vault-reel-card h2 {
        font-size: 24px;
    }

    .vault-reel-card p {
        font-size: 15px;
    }

    .vault-reel-card a {
        width: fit-content;
        min-height: 48px;
    }

    .landing h1,
    .page-intro h1,
    .dashboard-hero h1,
    .stop-hero h1,
    .auth-card h1 {
        font-size: 42px;
    }
}
