:root{
  --app-header-offset:82px;
  --app-bottom-offset:0px;
  --app-screen-padding:22px;
  --section-kicker-size:.63rem;
  --section-title-size:clamp(1.18rem,2vw,1.7rem);
  --compact-panel-padding:16px;
  --compact-radius:20px;
}

html,
body{
  overflow:auto;
}

body{
  min-height:100vh;
}

.app-shell{
  min-height:100dvh;
  height:100dvh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  isolation:isolate;
}

.stage{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  height:auto;
  overflow:hidden;
  z-index:1;
}

.screen{
  padding:var(--app-screen-padding) var(--app-screen-padding) calc(var(--app-bottom-offset) + 24px);
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  scroll-padding-top:calc(var(--app-header-offset) + 12px);
  scroll-padding-bottom:calc(var(--app-bottom-offset) + 18px);
}

.screen.active{
  z-index:1;
}

.screen:not(.active){
  visibility:hidden;
}

.screen,
.home,
.home-scroll,
.home-scroll > *,
.home-intro-copy,
.home-intro-copy > *,
.home-map-toolbar > *{
  min-width:0;
}

.topbar{
  position:sticky;
  top:0;
  z-index:45;
  min-height:var(--app-header-offset);
  height:auto;
  flex:0 0 auto;
  padding-inline:18px;
  box-shadow:0 10px 34px rgba(0,0,0,.28);
}

.brand,
.main-nav,
.user-actions{
  min-width:0;
}

.main-nav{
  overflow:auto;
  scrollbar-width:none;
}

.main-nav::-webkit-scrollbar{
  display:none;
}

.main-nav button{
  white-space:nowrap;
}

.user-actions{
  flex-shrink:0;
}

.panel,
.event-card-v5,
.home-event-card,
.shop-card-v5,
.directory-card-v5,
.product-card-v5,
.feature-card{
  box-shadow:0 18px 42px rgba(0,0,0,.22);
}

.brand small{
  letter-spacing:.08em;
  text-transform:uppercase;
}

.menu-toggle{
  min-height:44px;
  min-width:44px;
  padding:0 14px;
  font-size:1.12rem;
  flex-shrink:0;
}

#authButton{
  max-width:132px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.eyebrow{
  display:inline-block;
  margin-bottom:8px;
  color:#ff6d76;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.18em;
}

.home{
  display:block;
  overflow:auto;
  padding-bottom:calc(var(--app-bottom-offset) + 24px);
}

.home-scroll{
  max-width:1280px;
  width:100%;
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1.02fr) minmax(360px,.98fr);
  gap:16px;
  align-content:start;
  align-items:start;
}

/* Home moved to a stacked/app-like flow, so its panels must size to content. */
.home .panel,
.home-secondary-grid > .panel{
  height:auto;
  align-self:start;
}

.home-intro-panel,
.home-map-panel,
.home-events-panel,
.home-secondary-grid{
  min-height:0;
}

.home-intro-panel{
  display:grid;
  gap:16px;
}

.home-intro-copy{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-end;
}

.home-intro-panel h1{
  margin:0;
  font-size:clamp(2.4rem,4.6vw,4.65rem);
  line-height:.96;
  overflow-wrap:anywhere;
}

.home-intro-panel p,
.home-support-panel p{
  margin:0;
  max-width:52ch;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.compact-stats{
  margin-top:0;
}

.compact-stats article{
  min-width:0;
}

.home-map-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
  position:relative;
  isolation:isolate;
}

.home-panel-head{
  margin-bottom:0;
}

.live-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:0 13px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#171717;
  color:#ddd;
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.12em;
}

.live-badge::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#8b8b8b;
}

.live-badge.is-live,
#homeLiveBadge.is-live{
  color:#fff;
  background:rgba(237,17,28,.18);
  border-color:rgba(237,17,28,.34);
}

.live-badge.is-live::before,
#homeLiveBadge.is-live::before{
  background:var(--red);
  box-shadow:0 0 16px rgba(237,17,28,.7);
}

.home-map-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
}

.home-map-actions,
.support-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.home-upcoming-list,
.shop-carousel,
.home-map-actions,
.gps-shortcuts,
.support-actions{
  scrollbar-width:none;
}

.home-upcoming-list::-webkit-scrollbar,
.shop-carousel::-webkit-scrollbar,
.home-map-actions::-webkit-scrollbar,
.gps-shortcuts::-webkit-scrollbar,
.support-actions::-webkit-scrollbar{
  display:none;
}

#homeMap{
  min-height:clamp(300px,42dvh,380px);
  height:clamp(300px,42dvh,380px);
  border-radius:20px;
  background:#171717;
  overflow:hidden;
}

.home-events-panel{
  grid-column:1 / -1;
}

.home-upcoming-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.home-secondary-grid{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:minmax(320px,.9fr) minmax(0,1.1fr);
  gap:16px;
}

.home-support-panel{
  display:grid;
  gap:12px;
  align-content:start;
}

.home-support-panel small{
  color:#ff6871;
  font-weight:900;
  letter-spacing:.16em;
}

.home-support-panel h3{
  margin:0;
  font-size:1.5rem;
}

.featured-zone{
  width:auto;
}

.featured-home{
  display:grid;
  gap:10px;
}

.featured-home .feature-card{
  min-height:0;
}

.event-card-v5,
.home-event-card{
  display:grid;
  grid-template-columns:96px 1fr auto;
  gap:12px;
  min-height:96px;
  padding:10px;
  border-radius:20px;
  border:1px solid var(--line);
  background:#141414;
  overflow:hidden;
  transition:.2s;
}

.event-card-v5:hover,
.home-event-card:hover{
  transform:translateY(-2px);
  border-color:rgba(237,17,28,.38);
}

.event-card-v5.led,
.home-event-card.led{
  border-color:rgba(188,84,231,.34);
  background:radial-gradient(circle at top right,rgba(188,84,231,.14),transparent 52%),#141414;
}

.event-card-media,
.home-event-media{
  width:96px;
  height:96px;
  border-radius:16px;
  overflow:hidden;
  background:#0f0f0f;
}

.event-card-media img,
.home-event-media img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.event-card-media img.logo-fit,
.home-event-media img.logo-fit{
  object-fit:contain;
  padding:12px;
}

.event-card-copy,
.home-event-copy{
  min-width:0;
}

.event-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}

.event-card-copy h3,
.home-event-copy h3{
  margin:5px 0 4px;
  font-size:.98rem;
}

.event-card-line,
.home-event-line{
  margin:0;
  color:#c8c8cc;
  font-size:.76rem;
  line-height:1.42;
}

.event-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:6px;
  font-size:.66rem;
  font-weight:900;
  letter-spacing:.12em;
  color:#ff7d84;
}

.event-status::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--red);
  box-shadow:0 0 10px rgba(237,17,28,.55);
}

.event-card-actions{
  display:flex;
  gap:7px;
  margin-top:10px;
  flex-wrap:wrap;
}

.event-card-actions button,
.provider-actions button,
.shop-actions-v5 button,
.product-actions-v5 button{
  min-height:40px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#1a1a1a;
  color:#fff;
  padding:0 13px;
  font-size:.72rem;
  font-weight:800;
}

.event-card-actions .primary,
.provider-actions .primary,
.shop-actions-v5 .primary{
  background:var(--red);
  border-color:var(--red);
}

.card-kebab{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#171717;
  color:#fff;
  font-size:1rem;
}

.gps-panel-title{
  margin-bottom:10px;
}

.map-shell,
.route-builder-box{
  position:relative;
  isolation:isolate;
}

.gps-compact-toolbar{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}

.gps-shortcuts{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.gps-core-controls{
  margin-bottom:12px;
}

#liveMap{
  min-height:clamp(380px,62dvh,720px);
  height:clamp(380px,62dvh,720px);
}

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

.gps-activity-card{
  border:1px solid var(--line);
  border-radius:18px;
  padding:12px;
  background:#141414;
}

.gps-activity-card h3{
  margin:6px 0 4px;
  font-size:.98rem;
}

.gps-activity-card p{
  margin:0;
  font-size:.76rem;
}

.directory-grid,
.store-grid,
.product-grid-v3{
  padding-bottom:116px;
}

.directory-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.directory-card-v5{
  display:grid;
  grid-template-columns:96px 1fr;
  gap:12px;
  min-height:110px;
  padding:10px;
  border-radius:20px;
  border:1px solid var(--line);
  background:#141414;
}

.provider-photo{
  width:96px;
  height:96px;
  border-radius:16px;
  overflow:hidden;
  background:#111;
}

.provider-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.provider-copy h3{
  margin:4px 0;
  font-size:.98rem;
}

.provider-copy p{
  margin:0;
  font-size:.74rem;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.provider-meta,
.shop-meta-v5{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin:7px 0;
}

.provider-meta span,
.shop-meta-v5 span,
.product-copy-v5 small{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:0 9px;
  border-radius:999px;
  background:#1d1d1d;
  color:#d7d7da;
  font-size:.66rem;
  font-weight:800;
}

.provider-actions{
  display:flex;
  gap:7px;
  margin-top:9px;
  flex-wrap:wrap;
}

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

.shop-card-v5{
  display:grid;
  grid-template-columns:94px 1fr;
  gap:12px;
  min-height:106px;
  padding:10px;
  border-radius:20px;
  border:1px solid var(--line);
  background:#141414;
}

.shop-card-v5.led{
  border-color:rgba(188,84,231,.34);
  background:radial-gradient(circle at top right,rgba(188,84,231,.13),transparent 52%),#141414;
}

.shop-media-v5{
  width:94px;
  height:94px;
  border-radius:16px;
  overflow:hidden;
  background:#111;
}

.shop-media-v5 img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.shop-media-v5 img.logo-fit{
  object-fit:contain;
  padding:12px;
}

.shop-copy-v5 h3{
  margin:4px 0;
  font-size:.94rem;
}

.shop-copy-v5 p{
  margin:0;
  font-size:.74rem;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.shop-actions-v5{
  display:flex;
  gap:7px;
  margin-top:8px;
  flex-wrap:wrap;
}

.product-grid-v5{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.product-card-v5{
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
  background:#141414;
}

.product-card-v5.led{
  border-color:rgba(188,84,231,.34);
}

.product-media-v5{
  aspect-ratio:1 / 1;
  background:#111;
}

.product-media-v5 img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.product-media-v5 img.logo-fit{
  object-fit:contain;
  padding:14px;
}

.product-copy-v5{
  padding:11px;
  display:grid;
  gap:6px;
}

.product-copy-v5 h4{
  margin:0;
  font-size:.88rem;
}

.product-copy-v5 p{
  margin:0;
  font-size:.72rem;
  color:#cfcfd2;
}

.product-price-v5{
  font-size:1rem;
  font-weight:900;
}

.market-mobile-tools{
  display:none;
}

.mobile-filter-toggle{
  display:none;
}

.form-step{
  border:1px solid var(--line);
  border-radius:18px;
  background:#131313;
}

.form-step summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  cursor:pointer;
  list-style:none;
}

.form-step summary::-webkit-details-marker{
  display:none;
}

.form-step summary span{
  font-weight:900;
}

.form-step summary small{
  color:var(--muted);
}

.form-step-body{
  display:grid;
  gap:11px;
  padding:0 16px 16px;
}

.route-builder-map{
  height:clamp(250px,44dvh,360px);
}

.sheet-overlay{
  position:fixed;
  inset:0;
  z-index:85;
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
  background:rgba(0,0,0,.65);
  opacity:0;
  pointer-events:none;
  transition:.24s;
}

.sheet-overlay.open{
  opacity:1;
  pointer-events:auto;
}

.sheet-panel{
  width:min(420px,100vw);
  max-height:min(86vh,760px);
  border:1px solid var(--line);
  background:#0f0f10;
  color:#fff;
  overflow:auto;
  transform:translateY(100%);
  transition:.28s cubic-bezier(.2,.8,.2,1);
  box-shadow:0 22px 60px rgba(0,0,0,.45);
}

.sheet-overlay.open .sheet-panel{
  transform:none;
}

.sheet-panel.side{
  height:100%;
  max-height:100vh;
  border-radius:0;
  border-top:0;
  border-bottom:0;
  border-right:0;
  transform:translateX(100%);
}

.sheet-overlay.open .sheet-panel.side{
  transform:none;
}

.sheet-panel.bottom{
  width:min(560px,100vw);
  border-radius:26px 26px 0 0;
  border-bottom:0;
}

.sheet-head{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:16px 18px 12px;
  background:rgba(15,15,16,.96);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}

.sheet-title{
  display:grid;
  gap:4px;
}

.sheet-title small{
  color:#ff6871;
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.18em;
}

.sheet-title strong{
  font-size:1.05rem;
}

.sheet-close{
  width:42px;
  height:42px;
  border-radius:50%;
  border:1px solid var(--line);
  background:#181818;
  color:#fff;
  font-size:1.2rem;
}

.sheet-body{
  display:grid;
  gap:16px;
  padding:16px 18px 24px;
}

.sheet-group{
  display:grid;
  gap:8px;
}

.sheet-group h3{
  margin:0;
  font-size:.78rem;
  color:#9f9fa5;
  text-transform:uppercase;
  letter-spacing:.14em;
}

.sheet-link{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:48px;
  padding:0 14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#171717;
  color:#fff;
  font-weight:800;
}

.sheet-link small{
  color:#bdbdc2;
  font-weight:600;
}

.sheet-note{
  margin:0;
  color:#bdbdc2;
  font-size:.78rem;
  line-height:1.5;
}

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

.sheet-list .gps-activity-card{
  cursor:pointer;
}

.drawer-content .drawer-shortcuts{
  display:grid;
  gap:10px;
  margin:16px 0 20px;
}

.drawer{
  z-index:74;
}

.drawer-content{
  width:min(560px,100vw);
  padding:22px 22px calc(26px + env(safe-area-inset-bottom));
}

.drawer-shortcuts button{
  width:100%;
}

body.sheet-open,
body.drawer-open{
  overflow:hidden;
}

body.sheet-open .home,
body.sheet-open .stage,
body.drawer-open .home,
body.drawer-open .stage{
  touch-action:none;
}

.bottom-nav{
  left:12px;
  right:12px;
  bottom:max(10px,env(safe-area-inset-bottom));
  min-height:68px;
  height:auto;
  padding-bottom:max(5px,env(safe-area-inset-bottom));
  z-index:35;
  backdrop-filter:blur(18px);
  box-shadow:0 18px 42px rgba(0,0,0,.34);
}

.bottom-nav button{
  min-width:0;
  gap:4px;
  align-content:center;
}

.bottom-nav span{
  width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#toast{
  bottom:calc(var(--app-bottom-offset) + 18px);
}

.leaflet-container{
  z-index:0;
}

.leaflet-top,
.leaflet-bottom{
  z-index:4;
}

@media(max-width:1180px){
  .home-scroll{
    grid-template-columns:1fr;
  }

  .home-events-panel,
  .home-secondary-grid{
    grid-column:auto;
  }

  .home-secondary-grid{
    grid-template-columns:1fr;
  }

  .shop-carousel,
  .product-grid-v5{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:980px){
  :root{
    --app-screen-padding:12px;
  }

  .topbar{
    z-index:40;
    padding:10px 12px;
    gap:10px;
  }

  .brand{
    min-width:0;
    gap:10px;
  }

  .brand > div{
    min-width:0;
  }

  .brand strong{
    font-size:.98rem;
    display:block;
    max-width:clamp(100px,34vw,180px);
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .brand small{
    display:none;
  }

  .user-actions{
    gap:8px;
    margin-left:auto;
  }

  .notify-btn{
    display:none;
  }

  #authButton{
    min-height:40px;
    padding:0 13px;
    font-size:.8rem;
  }

  .menu-toggle{
    display:inline-grid;
    place-items:center;
  }

  .screen{
    padding:12px 12px calc(var(--app-bottom-offset) + 16px);
  }

  .home{
    padding-bottom:calc(var(--app-bottom-offset) + 16px);
  }

  .home-scroll{
    gap:12px;
  }

  .home-intro-panel{
    gap:12px;
  }

  .compact-stats{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .home-intro-copy{
    display:grid;
    gap:12px;
    align-items:start;
  }

  .home-intro-panel h1{
    font-size:2.38rem;
  }

  .home-map-toolbar,
  .gps-compact-toolbar{
    grid-template-columns:1fr;
  }

  .home-map-actions,
  .gps-shortcuts,
  .support-actions{
    display:flex;
    overflow:auto;
    padding-bottom:2px;
    flex-wrap:nowrap;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }

  .home-map-actions button,
  .gps-shortcuts button,
  .support-actions button{
    white-space:nowrap;
    scroll-snap-align:start;
  }

  #homeMap{
    min-height:clamp(280px,38dvh,340px);
    height:clamp(280px,38dvh,340px);
  }

  .home-upcoming-list,
  .shop-carousel{
    display:flex;
    overflow:auto;
    gap:10px;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }

  .home-event-card,
  .shop-card-v5{
    min-width:260px;
    scroll-snap-align:start;
  }

  .tracking-toolbar.gps-core-controls{
    display:none;
  }

  .map-shell{
    height:auto;
  }

  #liveMap{
    min-height:clamp(320px,54dvh,560px);
    height:clamp(320px,54dvh,560px);
  }

  .sidebar{
    display:none;
  }

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

  .mobile-filter-toggle{
    display:inline-flex;
  }

  #shopFilters{
    display:none;
  }

  #shopFilters.is-open{
    display:flex;
  }

  .product-grid-v5{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .sheet-panel.side{
    width:min(360px,92vw);
  }

  .sheet-panel.bottom{
    width:100vw;
  }

  .drawer{
    align-items:flex-end;
    justify-content:flex-end;
  }

  .drawer-content{
    width:100vw;
    max-height:min(88dvh,820px);
    height:auto;
    border-left:0;
    border-top:1px solid var(--line);
    border-radius:24px 24px 0 0;
    transform:translateY(100%);
  }

  .drawer.open .drawer-content{
    transform:none;
  }

  .drawer-content h2{
    margin-top:20px;
  }
}

@media(max-width:430px){
  .topbar{
    padding-inline:10px;
  }

  .brand img{
    height:42px;
    width:42px;
  }

  #authButton{
    padding-inline:11px;
    font-size:.76rem;
    max-width:96px;
  }

  .menu-toggle{
    padding-inline:11px;
  }

  .home-intro-panel h1{
    font-size:2.08rem;
  }

  .compact-stats{
    gap:7px;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .compact-stats article{
    padding:10px 11px;
  }

  .compact-stats article:last-child{
    grid-column:1 / -1;
  }

  #homeMap{
    min-height:260px;
    height:260px;
  }

  #liveMap{
    min-height:clamp(300px,44dvh,420px);
    height:clamp(300px,44dvh,420px);
  }

  .event-card-v5,
  .home-event-card,
  .shop-card-v5,
  .directory-card-v5{
    grid-template-columns:84px 1fr auto;
    gap:10px;
  }

  .directory-card-v5{
    grid-template-columns:84px 1fr;
  }

  .event-card-media,
  .home-event-media,
  .shop-media-v5,
  .provider-photo{
    width:84px;
    height:84px;
  }

  .product-grid-v5{
    grid-template-columns:1fr 1fr;
    gap:10px;
  }

  .sheet-body{
    padding-inline:14px;
  }

  .bottom-nav{
    left:8px;
    right:8px;
  }
}

@media(max-width:390px){
  #liveMap{
    min-height:clamp(292px,42dvh,340px);
    height:clamp(292px,42dvh,340px);
  }
}

/* Second full UX pass */
.topbar{
  align-items:center;
  gap:14px;
  padding-block:10px;
}

.user-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.top-transmit-btn,
.gps-focus-toggle,
.gps-route-info-btn{
  min-height:42px;
  min-width:42px;
  display:inline-grid;
  place-items:center;
  padding:0 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(21,21,21,.92);
  color:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,.22);
}

.top-transmit-btn{
  color:#ff7a83;
  font-size:1rem;
}

.gps-focus-toggle,
.gps-route-info-btn{
  min-height:36px;
  min-width:36px;
  padding:0 10px;
  border-radius:14px;
  font-size:.82rem;
  font-weight:800;
}

.panel{
  padding:var(--compact-panel-padding);
  border-radius:24px;
}

.panel-title,
.featured-header,
.market-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.panel-title > div,
.featured-header,
.market-head > div{
  min-width:0;
  display:grid;
  gap:4px;
}

.panel-title small,
.featured-header small,
.market-head small{
  font-size:var(--section-kicker-size);
  letter-spacing:.18em;
}

.panel-title h2,
.featured-header h2,
.market-head h2{
  margin:0;
  font-size:var(--section-title-size);
  line-height:1.02;
}

.featured-header{
  margin-bottom:8px;
}

.home-intro-panel{
  gap:12px;
}

.home-intro-panel h1{
  font-size:clamp(2rem,3.8vw,3.55rem);
}

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

.compact-stats article{
  min-height:64px;
  padding:10px 11px;
  border-radius:16px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
}

.compact-stats article b{
  font-size:1.12rem;
  line-height:1;
}

.compact-stats article span{
  font-size:.72rem;
}

.home-support-panel h3{
  font-size:1.28rem;
}

.event-card-v5,
.home-event-card{
  grid-template-columns:84px 1fr;
  gap:10px;
  min-height:84px;
  padding:9px;
  border-radius:18px;
}

.event-card-media,
.home-event-media{
  width:84px;
  height:84px;
  border-radius:14px;
}

.event-card-copy h3,
.home-event-copy h3{
  margin:4px 0 3px;
  font-size:.92rem;
}

.event-card-line,
.home-event-line{
  font-size:.72rem;
  line-height:1.35;
}

.event-card-actions{
  gap:6px;
  margin-top:8px;
}

.event-card-actions button,
.provider-actions button,
.shop-actions-v5 button,
.product-actions-v5 button{
  min-height:36px;
  padding:0 11px;
  font-size:.68rem;
}

.card-kebab{
  width:36px;
  height:36px;
  border-radius:12px;
  font-size:.92rem;
}

.gps-panel-title{
  margin-bottom:8px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:8px;
}

.gps-panel-actions{
  display:flex;
  align-items:center;
  gap:6px;
}

.gps-compact-toolbar{
  gap:8px;
  margin-bottom:8px;
}

.gps-core-controls{
  margin-bottom:8px;
}

#liveMap{
  min-height:clamp(420px,68dvh,760px);
  height:clamp(420px,68dvh,760px);
  border-radius:22px;
}

.gps-activity-card{
  border-radius:16px;
  padding:10px;
}

.gps-activity-card h3{
  margin:5px 0 3px;
  font-size:.9rem;
}

.gps-activity-card p{
  font-size:.72rem;
}

.directory-card-v5{
  grid-template-columns:74px 1fr;
  gap:10px;
  min-height:88px;
  padding:9px;
  border-radius:18px;
}

.provider-photo{
  width:74px;
  height:74px;
  border-radius:14px;
}

.provider-copy h3{
  margin:3px 0;
  font-size:.9rem;
}

.provider-copy p{
  font-size:.71rem;
}

.provider-actions{
  gap:6px;
  margin-top:7px;
}

.shop-carousel{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.shop-card-v5{
  grid-template-columns:82px 1fr;
  gap:10px;
  min-height:92px;
  padding:9px;
  border-radius:18px;
}

.shop-media-v5{
  width:82px;
  height:82px;
  border-radius:14px;
}

.shop-copy-v5 h3{
  margin:3px 0;
  font-size:.88rem;
}

.shop-copy-v5 p{
  font-size:.71rem;
}

.shop-actions-v5{
  gap:6px;
  margin-top:6px;
}

.product-grid-v5{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}

.product-card-v5{
  border-radius:18px;
}

.product-copy-v5{
  padding:10px;
  gap:5px;
}

.product-copy-v5 h4{
  font-size:.82rem;
}

.product-copy-v5 p{
  font-size:.69rem;
}

.product-price-v5{
  font-size:.9rem;
}

.market-head .market-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.market-search{
  min-width:min(240px,40vw);
}

.market-hero{
  padding:14px 16px;
  gap:14px;
  border-radius:20px;
}

.market-hero h3{
  margin:6px 0 4px;
  font-size:1.18rem;
}

.market-hero p{
  margin:0;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.market-filters{
  margin-bottom:10px;
}

.market-scroll{
  display:grid;
  gap:10px;
}

.section-caption{
  margin:2px 0 0;
  font-size:.86rem;
}

.mask-showcase-wrap{
  grid-template-columns:160px minmax(0,1fr);
  gap:10px;
  padding:10px;
  border-radius:18px;
}

.showcase-copy h3{
  margin:4px 0;
  font-size:1.08rem;
}

.showcase-copy p{
  margin:0;
  font-size:.74rem;
}

.mask-showcase{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}

.mask-sample{
  min-width:0;
  aspect-ratio:1 / 1.05;
  border-radius:14px;
}

.route-summary{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  font-size:.74rem;
  line-height:1.35;
}

.route-summary.is-actionable{
  cursor:pointer;
}

.route-summary.is-actionable::after{
  content:"↗";
  margin-left:auto;
  color:#bdbdc2;
  font-weight:800;
}

.transmission-sheet{
  display:grid;
  gap:12px;
}

.transmission-sheet p{
  margin:0;
}

.transmission-sheet label{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#171717;
  font-size:.84rem;
}

.transmission-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.transmission-actions button{
  min-height:44px;
}

.gps-sheet-card{
  display:grid;
  gap:8px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#141414;
}

.gps-sheet-card strong{
  font-size:.98rem;
}

.gps-sheet-card p{
  margin:0;
  font-size:.76rem;
}

body.gps-focus-mode .bottom-nav{
  opacity:0;
  pointer-events:none;
  transform:translateY(calc(100% + 24px));
}

.route-builder-map{
  height:clamp(360px,62dvh,680px);
}

@media(max-width:1180px){
  .mask-showcase-wrap{
    grid-template-columns:1fr;
  }
}

@media(max-width:980px){
  .topbar{
    padding:9px 12px;
    gap:8px;
  }

  #authButton{
    min-height:38px;
    padding:0 12px;
    font-size:.77rem;
  }

  .top-transmit-btn{
    min-height:38px;
    min-width:38px;
    padding:0 10px;
  }

  .hero-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .home-intro-panel h1{
    font-size:2.12rem;
  }

  .home-intro-panel p{
    -webkit-line-clamp:3;
  }

  .hero-actions .cta,
  .hero-actions .ghost{
    min-height:42px;
    width:100%;
    padding:0 12px;
    font-size:.82rem;
  }

  #homeMap{
    min-height:clamp(250px,34dvh,300px);
    height:clamp(250px,34dvh,300px);
  }

  .home-event-card,
  .shop-card-v5{
    min-width:224px;
  }

  #liveMap{
    min-height:clamp(300px,46dvh,500px);
    height:clamp(300px,46dvh,500px);
  }

  #shopFilters.is-open{
    flex-wrap:nowrap;
    overflow:auto;
    padding-bottom:2px;
  }

  body.gps-focus-mode #screen-live.active{
    padding:0;
    overflow:hidden;
  }

  body.gps-focus-mode #screen-live.active .map-shell{
    position:fixed;
    inset:var(--app-header-offset) 0 0 0;
    z-index:34;
    border-radius:0;
    border-left:0;
    border-right:0;
    border-bottom:0;
    padding:10px 10px calc(env(safe-area-inset-bottom) + 10px);
    background:#090909;
  }

  body.gps-focus-mode #screen-live.active .gps-panel-title{
    grid-template-columns:minmax(0,1fr) auto;
  }

  body.gps-focus-mode #screen-live.active .gps-compact-toolbar,
  body.gps-focus-mode #screen-live.active .gps-core-controls,
  body.gps-focus-mode #screen-live.active #routeSummary,
  body.gps-focus-mode #screen-live.active #liveEventBadge{
    display:none;
  }

  body.gps-focus-mode #screen-live.active #liveMap{
    height:calc(100dvh - var(--app-header-offset) - 20px - env(safe-area-inset-bottom));
    min-height:0;
    margin-top:8px;
    border-radius:22px;
  }
}

@media(max-width:430px){
  .home-intro-panel h1{
    font-size:1.9rem;
  }

  #homeMap{
    min-height:236px;
    height:236px;
  }

  #liveMap{
    min-height:clamp(292px,40dvh,360px);
    height:clamp(292px,40dvh,360px);
  }

  .event-card-v5,
  .home-event-card,
  .shop-card-v5,
  .directory-card-v5{
    grid-template-columns:72px 1fr;
    gap:9px;
  }

  .directory-card-v5{
    grid-template-columns:72px 1fr;
  }

  .event-card-media,
  .home-event-media,
  .shop-media-v5,
  .provider-photo{
    width:72px;
    height:72px;
  }

  .market-head .market-actions{
    width:100%;
  }

  .market-search{
    min-width:0;
  }

  .mask-showcase{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:390px){
  #liveMap{
    min-height:clamp(276px,36dvh,320px);
    height:clamp(276px,36dvh,320px);
  }

  .transmission-actions{
    grid-template-columns:1fr;
  }
}
