/* ============================================================
   ClimbSync v5 — Planning rework (gym night / crag day),
   visibility live demo, and the keytag manager section.
   Loads after climbsync-v4.css; only adds, never overrides v4 pages.
   ============================================================ */

/* ---------- segmented route tags (scoped groups, unlike .vis-tag) ---------- */
.seg-tag {
  font-family: var(--font-tag);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1.5px solid var(--line);
  box-shadow: 3px 3px 0 var(--hard-ink);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s;
}
.seg-tag.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  scale: 1.05;
}
.seg-tag.sm {
  font-size: 10px;
  padding: 7px 13px;
  box-shadow: 2px 2px 0 var(--hard-ink);
}

/* ---------- crag mode: the section steps outside ---------- */
[data-theme="dark"] {
  --crag-green: rgb(118, 178, 118);
}
[data-theme="light"] {
  --crag-green: rgb(54, 118, 62);
}
#planning {
  position: relative;
}
#planning > .container {
  position: relative;
  z-index: 1;
}
#planning[data-mode="crag"] {
  --accent: var(--crag-green);
  --accent-deep: color-mix(in oklab, var(--crag-green) 72%, black);
}
#planning[data-mode="crag"] .mode-card {
  background-color: color-mix(in oklab, var(--crag-green) 5%, var(--surface));
}
#planning[data-mode="crag"] .visibility {
  background-color: color-mix(in oklab, var(--crag-green) 6%, var(--surface-deep));
}

/* painted scenery along the foot of the panel — stencil style */
.crag-scape {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 230px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}
#planning[data-mode="crag"] .crag-scape {
  opacity: 1;
}
.crag-scape .ridge {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0;
  height: 100%;
  background: color-mix(in oklab, var(--crag-green) 14%, transparent);
  clip-path: polygon(
    0 58%,
    7% 72%,
    16% 38%,
    26% 64%,
    37% 46%,
    48% 70%,
    60% 30%,
    71% 58%,
    83% 44%,
    92% 66%,
    100% 52%,
    100% 100%,
    0 100%
  );
}
.crag-scape .ridge.r2 {
  height: 62%;
  background: color-mix(in oklab, var(--crag-green) 22%, transparent);
  clip-path: polygon(
    0 70%,
    9% 48%,
    20% 76%,
    33% 56%,
    45% 80%,
    58% 52%,
    70% 78%,
    82% 60%,
    93% 82%,
    100% 68%,
    100% 100%,
    0 100%
  );
}
.crag-scape .pine {
  position: absolute;
  bottom: 0;
  width: 26px;
  height: 38px;
  background: color-mix(in oklab, var(--crag-green) 42%, transparent);
  clip-path: polygon(50% 0%, 86% 52%, 68% 52%, 100% 100%, 0% 100%, 32% 52%, 14% 52%);
}
.crag-scape .pine.p1 {
  left: 9%;
  height: 44px;
  width: 30px;
}
.crag-scape .pine.p2 {
  left: 13%;
  bottom: 6px;
  opacity: 0.75;
}
.crag-scape .pine.p3 {
  right: 14%;
  height: 34px;
  opacity: 0.85;
}

/* ---------- one reel, two zones: mode tabs grow out of the frame ----------
   Gym night and Crag day are folder tabs fused to the film strip's top-right
   corner — the frame's right edge runs straight up into the Crag day tab.
   Panels 0-2 are gym, 3-5 are crag; paging past 03 crosses the zone line. */
.strip-head {
  display: flex;
  align-items: flex-end;
}
.strip-head .strip-tabs {
  margin-bottom: 16px;
}
.strip-head .strip-tab em {
  white-space: nowrap;
}
/* squeeze label gaps before the ems wrap (zone heights must match) */
@media (max-width: 1100px) {
  .strip-head .strip-tabs {
    gap: calc(var(--half-module) * 0.8);
  }
  .strip-head .strip-tab {
    gap: 9px;
  }
}
.plan-strip[data-zone="gym"] .crag-tabs {
  display: none;
}
.plan-strip[data-zone="crag"] .gym-tabs {
  display: none;
}
.plan-strip {
  --plan-panel-bg: color-mix(in oklab, var(--bg) 92.5%, var(--steep-ink));
}
#planning[data-mode="crag"] .plan-strip {
  --plan-panel-bg: color-mix(
    in oklab,
    var(--crag-green) 4%,
    color-mix(in oklab, var(--bg) 92.5%, var(--steep-ink))
  );
}
.mode-tabs {
  margin-left: auto;
  display: flex;
  position: relative;
  z-index: 1;
  translate: 0 1px;
}
.mode-tab {
  font-family: var(--font-tag);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px 11px;
  background: none;
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--text-subtle);
  cursor: pointer;
  transition:
    color 0.2s,
    background-color 0.4s;
}
.mode-tab:hover {
  color: var(--text);
}
.mode-tab.active {
  color: var(--accent);
  border-color: var(--border-strong);
  border-bottom-color: transparent;
  background-color: var(--plan-panel-bg);
}
.mode-tab::before {
  content: "";
  display: inline-block;
  flex: none;
  background: currentColor;
}
.mode-tab[data-mode="gym"]::before {
  width: 9px;
  height: 9px;
  border-radius: 50% 50% 50% 18%;
  rotate: 45deg;
}
.mode-tab[data-mode="crag"]::before {
  width: 12px;
  height: 10px;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.modes-wrap .modes-grid {
  grid-template-columns: repeat(3, 1fr);
}
/* six panels in one reel */
.plan-strip .strip-inner {
  grid-template-columns: repeat(6, 100%);
}
.plan-strip[data-panel="1"] .strip-inner {
  transform: translateX(-100%);
}
.plan-strip[data-panel="2"] .strip-inner {
  transform: translateX(-200%);
}
.plan-strip[data-panel="3"] .strip-inner {
  transform: translateX(-300%);
}
.plan-strip[data-panel="4"] .strip-inner {
  transform: translateX(-400%);
}
.plan-strip[data-panel="5"] .strip-inner {
  transform: translateX(-500%);
}
.plan-strip[data-panel="2"] .strip-arrow.next {
  opacity: 1;
  pointer-events: auto;
}
.plan-strip[data-panel="5"] .strip-arrow.next {
  opacity: 0;
  pointer-events: none;
}
/* ---------- the old-way strip, tightened: shorter chat phone ---------- */
#pain-strip .chat-feed {
  height: 380px;
}

@media (prefers-reduced-motion: no-preference) {
  .modes-wrap[data-mode="gym"] .m-gym,
  .modes-wrap[data-mode="crag"] .m-crag {
    animation: mode-in 0.35s ease both;
  }
  @keyframes mode-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}
.modes-caption span {
  display: none;
}
.modes-wrap[data-mode="gym"] .cap-gym,
.modes-wrap[data-mode="crag"] .cap-crag {
  display: inline;
}

/* ---------- crag card: fill the car ---------- */
.car-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.car-head strong {
  font-size: 13px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.car-head > span:not(.pill-swap) {
  font-size: 11px;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.car-head .pill-swap {
  margin-left: auto;
}
.seat-row {
  display: flex;
  gap: 8px;
}
.seat {
  position: relative;
  width: 36px;
  height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 10px 10px 8px 8px;
  background: var(--surface-deep);
  display: grid;
  place-items: center;
}
.seat::before {
  /* headrest */
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  translate: -50%;
  width: 16px;
  height: 6px;
  border: 2px solid var(--border-strong);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  background: var(--surface-deep);
}
.seat .avatar {
  width: 24px;
  height: 24px;
  font-size: 8px;
  margin: 0;
}
.seat.open {
  border-style: dashed;
  background: transparent;
}
.seat.open::before {
  border-style: dashed;
  background: transparent;
}
.seat .seat-plus {
  font-size: 14px;
  color: var(--text-subtle);
  font-weight: 600;
}
/* hover beat: a friend claims the next seat */
.seat.claims {
  display: grid;
}
.seat.claims > * {
  grid-area: 1 / 1;
  transition: opacity 0.3s;
}
.seat.claims .avatar {
  opacity: 0;
}
.mode-card:hover .seat.claims .avatar {
  opacity: 1;
}
.mode-card:hover .seat.claims .seat-plus {
  opacity: 0;
}

/* ---------- crag card: the gear board ---------- */
.gear-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.gear-head strong {
  font-size: 13px;
  letter-spacing: -0.01em;
}
.gear-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gear {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-deep);
}
.gear img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.gear em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.gear .g-by {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--surface);
  background: var(--surface-deep);
}
.gear .g-by img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gear .g-by.ghost {
  display: grid;
  place-items: center;
  border: 2px dashed var(--border-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  overflow: visible;
}
.gear.need {
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
}
.gear.need img {
  opacity: 0.5;
  filter: grayscale(0.6);
}
/* hover beat: the helmet gets covered */
.gear.claims .g-by {
  display: grid;
}
.gear.claims .g-by > * {
  grid-area: 1 / 1;
}
.gear.claims .g-by .gb-av {
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 50%;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.gear.claims .g-by .gb-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mode-card:hover .gear.claims .g-by {
  border-style: solid;
  border-color: var(--surface);
}
.mode-card:hover .gear.claims .g-by .gb-av {
  opacity: 1;
}
.mode-card:hover .gear.claims .g-by .gb-q {
  opacity: 0;
}
.mode-card:hover .gear.claims {
  border-style: solid;
  border-color: var(--border);
  background: var(--surface-deep);
}
.mode-card:hover .gear.claims img {
  opacity: 1;
  filter: none;
}
.gear .gb-q {
  transition: opacity 0.3s;
}

/* ---------- crag card: set the day ---------- */
.vig-logo.crag {
  position: relative;
  background: color-mix(in oklab, var(--accent-2) 22%, var(--surface-deep));
}
.vig-logo.crag::after {
  content: "";
  position: absolute;
  inset: 22% 18% 24%;
  background: var(--accent-2);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.day-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}
.day-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.day-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
  width: 38px;
  flex: none;
}
.day-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}
.vig-pill.topo {
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
}

/* ============================================================
   VISIBILITY — the real control, the real sheet
   The "Who can see this?" capture is the constant; tabs swap its
   state, and Friends slides the actual friend-picker sheet up
   from the panel's bottom seam (the panel edge crops it, like a
   screen edge). Desktop: sheet beside the selector, overlapping
   its right edge. Phones: stacked.
   ============================================================ */
/* the sheet must meet the panel's bottom seam, so this section
   trades its bottom padding for a stretched stage + clip */
#visibility-sec {
  padding-bottom: 0;
  overflow: clip;
}
/* stage LEFT, copy RIGHT — the sections around it alternate */
.vis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
}
.vis-copy {
  grid-column: 2;
  grid-row: 1;
  padding-bottom: calc(var(--module) * 2);
}
.vis-stage {
  grid-column: 1;
  grid-row: 1;
}
.vis-copy .section-head {
  margin-bottom: 0;
}

/* one caption per state, swapped in the same grid cell — no reflow */
.vis-caps {
  display: grid;
  margin-top: 20px;
  min-height: 3.2em;
  align-items: start;
}
/* the caption is this section's lead — same type as every other section's
   .lead, it just swaps per state */
.vis-cap {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
#visibility-sec[data-vis="private"] .vis-cap[data-cap="private"],
#visibility-sec[data-vis="friends"] .vis-cap[data-cap="friends"],
#visibility-sec[data-vis="public"] .vis-cap[data-cap="public"] {
  opacity: 1;
  transform: none;
}

.vis-switch {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
/* the trust line rides along as quiet small print — plain mono text, not
   another row of button-shaped chips next to the real tabs */
.vis-copy .trust-row {
  justify-content: flex-start;
  margin-top: calc(var(--module) * 0.65);
  gap: 8px 22px;
  max-width: 44ch;
}
.vis-copy .trust-row span {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  color: var(--text-subtle);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  gap: 8px;
}

/* ---------- the stage ----------
   Constant height; it stretches to the panel's bottom edge so the
   seam itself crops the sheet. */
.vis-stage {
  position: relative;
  min-height: 700px;
  align-self: stretch;
}

/* the selector capture: three states stacked, top-anchored crossfade
   (the card header is identical in all three, so only the bottom morphs).
   Centered for private/public; friends slides it left and up out of the
   sheet's way, dimmed like content behind the app's sheet scrim. */
.vis-selector {
  position: absolute;
  top: 40px;
  left: 50%;
  width: min(100%, 470px);
  /* the private/public captures set the box; the taller friends capture
     overflows below it (top-anchored), so the note card can sit tight
     under the short states */
  aspect-ratio: 800 / 301;
  transform: translate(calc(-50% + var(--vis-dx, 0px)), var(--vis-dy, 150px));
  transition:
    transform 0.5s cubic-bezier(0.3, 0.8, 0.3, 1),
    filter 0.45s ease,
    opacity 0.45s ease;
  z-index: 1;
}
#visibility-sec[data-vis="friends"] .vis-selector {
  --vis-dy: 60px;
  --vis-dx: clamp(-120px, -8.3vw, -50px);
  filter: brightness(0.92);
  opacity: 0.96;
}
.vis-shot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.32s ease;
}
#visibility-sec[data-vis="private"] .vis-shot[data-vis-shot="private"],
#visibility-sec[data-vis="friends"] .vis-shot[data-vis-shot="friends"],
#visibility-sec[data-vis="public"] .vis-shot[data-vis-shot="public"] {
  opacity: 1;
}

/* the public state's promise: partner finding is a real roadmap
   feature, so it gets a proper plate under the selector with a
   bolted-on "coming later" tag (steel torx, sitting straight) */
.vis-note {
  position: absolute;
  top: calc(100% + 26px);
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 470px);
  background: var(--surface);
  background-image: var(--surface-grain);
  background-size: 7px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 22px 22px 18px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease 0.12s,
    visibility 0s linear 0.42s;
}
#visibility-sec[data-vis="public"] .vis-note {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease 0.12s;
}
.vis-note p {
  margin: 0;
}
.vis-note strong {
  color: var(--text);
}
.vis-note-tag {
  position: absolute;
  top: -13px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 5px 10px;
  box-shadow: 3px 3px 0 var(--hard-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.vis-note-tag::before,
.vis-note-tag::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--torx-uri) center / 100% 100% no-repeat;
  flex: none;
}

/* the friend sheet: the app's real bottom sheet, rising from the
   panel seam. Hidden = pushed below the panel edge; the panel's
   clip does the cropping. It rises at the stage's inner edge while
   the selector slides out toward the panel padding, so the overlap
   only swallows the card's Public-tab end. */
.vis-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 645px;
  width: min(76%, 320px);
  transform: translate(var(--vis-sx, 0px), 112%);
  transition: transform 0.55s cubic-bezier(0.25, 0.9, 0.3, 1);
  z-index: 2;
  pointer-events: none;
}
#visibility-sec[data-vis="friends"] .vis-sheet {
  transform: translate(var(--vis-sx, 0px), 0);
  transition-delay: 0.08s;
}
.vis-sheet img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  filter: drop-shadow(-6px -6px 14px rgba(0, 0, 0, 0.2));
}

@media (max-width: 920px) {
  .vis-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .vis-copy {
    grid-column: 1;
    grid-row: 1;
    padding-bottom: 0;
  }
  /* ONE constant stage height across all states — switching tabs must not
     reflow the box, or the bottom-anchored sheet visibly jumps. Tall enough
     that the section fills the screen (>= viewport once the copy is added);
     the card pins to the top and the friends sheet rises from the seam. */
  .vis-stage {
    grid-column: 1;
    grid-row: 2;
    min-height: max(600px, calc(100svh - 20rem));
  }
  .vis-selector {
    top: 16px;
    --vis-dy: 0px;
  }
  #visibility-sec[data-vis="friends"] .vis-selector {
    --vis-dx: 0px;
    --vis-dy: 0px;
  }
  .vis-sheet {
    height: 430px;
    width: min(80%, 320px);
    right: 50%;
    --vis-sx: 50%;
  }
  .vis-sheet img {
    filter: drop-shadow(0 -4px 10px rgba(0, 0, 0, 0.16));
  }
}
@media (prefers-reduced-motion: reduce) {
  .vis-selector,
  .vis-shot,
  .vis-sheet,
  .vis-cap,
  .vis-note {
    transition: none;
  }
}

/* ---------- the trust line: three stamped tokens ---------- */
.trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: calc(var(--module) * 0.8);
}
.trust-row span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  box-shadow: 2px 2px 0 var(--hard-ink);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.trust-row span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
}

/* ---------- the Tweaks panel ---------- */
.tweaks-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 999;
  width: 244px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 5px 6px 0 var(--hard-ink);
  padding: 14px 16px 14px;
}
.tweaks-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-tag);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.tweaks-panel header button {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.tw-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 8px 0 4px;
}
.tweaks-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 4px 0;
  cursor: pointer;
}
.tweaks-panel input {
  accent-color: var(--accent);
}

/* ============================================================
   KEYTAGS — retire the keyring
   ============================================================ */
/* wallet LEFT, copy RIGHT — alternating with the sections around it */
.keytag-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: calc(var(--module) * 1.2);
  align-items: center;
}
.kt-copy .lead {
  margin-top: 18px;
}
.keytag-grid .kt-copy {
  order: 2;
}
@media (max-width: 1140px) {
  .keytag-grid .kt-copy {
    order: 0;
  }
}
.kt-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 0;
}
.kt-chips span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
}
.kt-foot {
  margin-top: 26px;
}

/* real keytag-manager capture with an expanded tag floating off its corner */
.kt-shot {
  position: relative;
  display: flex;
  justify-content: center;
}
.kt-shot .device-phone {
  width: min(100%, 320px);
  z-index: 2;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.28));
}
/* the expanded tag pops OUT in front of the phone, barcode first.
   The phone is flex-centered in the cell, so anchor off the cell's
   midline — right/left percentages would track the cell edges. */
.kt-float {
  position: absolute;
  width: min(56%, 240px);
  left: calc(50% + 30px);
  bottom: 13%;
  rotate: 7deg;
  z-index: 3;
  filter: drop-shadow(-10px 12px 24px rgba(0, 0, 0, 0.4));
}
.kt-float img {
  width: 100%;
  height: auto;
}

.kt-wallet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: dense;
  gap: 15px;
  align-items: stretch;
  width: 100%;
  max-width: 680px;
  justify-self: center;
}
/* the open card gets the whole row — full-width desk mode, exactly the
   old polished look; the dashed add-card keeps the grid balanced */
.kt-card.active {
  grid-column: 1 / -1;
}
.kt-card.kt-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 112px;
  background: none;
  border: 1.5px dashed var(--border-strong);
  box-shadow: none;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: default;
}
.kt-card.kt-add b {
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.kt-card.kt-add:hover {
  translate: 0 0;
}
/* one pass, several doors: the stacked logos */
.kt-logos {
  display: flex;
  flex: none;
}
.kt-logos .kt-logo {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 2px var(--kt-bg);
}
.kt-logos .kt-logo + .kt-logo {
  margin-left: -15px;
}
/* compact collapsed cards — sized for a half-width column */
.kt-card:not(.active) .kt-logo {
  width: 38px;
  height: 38px;
}
.kt-card:not(.active) .kt-name strong {
  font-size: 13px;
}
.kt-name strong,
.kt-name span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kt-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hard);
  background: var(--kt-bg);
  color: var(--kt-fg);
  overflow: hidden;
  cursor: pointer;
  transition: translate 0.25s ease;
}
.kt-card:hover {
  translate: 0 -2px;
}
/* collapsed cards can be stretched taller than their content when they
   share a grid row with a taller cell (e.g. edelweiss next to the
   add-a-pass card); let the white barcode fill that space so the card's
   own background never shows as a strip below it */
.kt-card:not(.active) {
  display: flex;
  flex-direction: column;
}
.kt-card:not(.active) .kt-code {
  flex-grow: 1;
}
.kt-card.kt-blockfabrik {
  --kt-bg: #26262e;
  --kt-fg: #f3efe4;
}
.kt-card.kt-boulderbar {
  --kt-bg: #f0cd1c;
  --kt-fg: #181507;
}
.kt-card.kt-monkeys {
  --kt-bg: #2f9e98;
  --kt-fg: #08312e;
}
.kt-card.kt-edelweiss {
  --kt-bg: #df5340;
  --kt-fg: #fff4ec;
}
.kt-top {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 18px;
}
.kt-card.active .kt-top {
  padding: 20px 18px 16px;
}
.kt-logo {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.25);
}
.kt-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kt-name {
  min-width: 0;
}
.kt-name strong {
  display: block;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kt-name span {
  display: block;
  font-size: 11.5px;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kt-default {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px dashed currentColor;
  border-radius: 999px;
  padding: 3px 9px;
  opacity: 0.7;
}
/* the barcode strip — white like the real plastic window */
.kt-code {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fdfcf8;
  color: #16161a;
  padding: 10px 18px;
}
.kt-bars {
  flex: 1;
  height: 22px;
  background-image:
    repeating-linear-gradient(90deg, #16161a 0 2px, transparent 2px 5px),
    repeating-linear-gradient(90deg, #16161a 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg, #16161a 0 3px, transparent 3px 13px);
  transition: height 0.3s ease;
}
.kt-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  white-space: nowrap;
  display: none;
}
.kt-hint {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(22, 22, 26, 0.55);
  white-space: nowrap;
}
/* desk mode: barcode big and bright */
.kt-card.active .kt-code {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 18px 22px 14px;
}
.kt-card.active .kt-bars {
  height: 64px;
  flex: none;
}
.kt-card.active .kt-num {
  display: block;
  text-align: center;
}
.kt-card.active .kt-hint {
  display: none;
}

/* ============================================================
   v6 — GYM NIGHT as a matching film strip
   Same frame as crag day, indoor language: plates, not tape.
   ============================================================ */
.gym-card {
  width: 100%;
}
.gym-card .vig {
  margin-top: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.gym-card .vig-session {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gym-card .vig-session .pill-swap {
  margin-left: auto;
}
.gym-card .vig .avatar {
  width: 38px;
  height: 38px;
  font-size: 11px;
}
.gym-card .vig-avs .avatar {
  margin-left: -10px;
}
.gym-card .vig-avs .avatar:first-child {
  margin-left: 0;
}
.gym-card .vig-name {
  font-size: 14px;
}
.gym-card .vig-row {
  gap: 12px;
}
/* drop in: the open spot fills on hover */
.gs-fill {
  position: relative;
  overflow: hidden;
}
.gs-fill img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
}
.mode-card:hover .gs-fill img {
  opacity: 1;
}
/* poll rows are buttons — tap a night to move your vote */
.vig.gym-poll {
  gap: 8px;
}
.gym-poll .vig-opt {
  background: none;
  border: 1px dashed transparent;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  text-align: left;
  transition:
    border-color 0.25s,
    background-color 0.25s;
}
.gym-poll .vig-opt:hover {
  border-color: var(--border-strong);
  background: var(--surface-deep);
}
.gym-poll .vig-day {
  font-size: 11px;
}
.gym-poll .vig-opt .avatar {
  width: 32px;
  height: 32px;
  font-size: 10px;
}
.you-vote {
  border-color: var(--surface);
}

@media (max-width: 920px) {
  .keytag-grid {
    grid-template-columns: 1fr;
    gap: var(--module);
  }
  .modes-wrap .modes-grid {
    grid-template-columns: 1fr;
  }
  .mode-switch {
    flex-wrap: wrap;
  }
  .folder-tab {
    padding: 11px 16px 10px;
    font-size: 11px;
  }
}
@media (max-width: 1140px) {
  /* same medicine the presence fixtures got: below ~1140px the keytag
     column is too narrow for two cards per row */
  .keytag-grid {
    grid-template-columns: 1fr;
    gap: var(--module);
  }
  /* the wallet is the last thing in the stacked layout — give it some
     breathing room before the next section */
  .kt-wallet {
    margin-bottom: calc(var(--module) * 0.8);
  }
  .kt-logos .kt-logo {
    width: 30px;
    height: 30px;
  }
  .kt-logos .kt-logo + .kt-logo {
    margin-left: -14px;
  }
}
@media (max-width: 560px) {
  /* keep the two-column wallet on phones (top pass expanded full-width,
     add-a-pass in the last cell) instead of a long single-column list */
  .kt-wallet {
    grid-template-columns: 1fr 1fr;
  }
  /* half-width cells are tight: shrink the logos (the boulderbar stack
     otherwise eats the whole row and hides its name) and tighten the
     padding so the gym name has room */
  .kt-top {
    padding: 13px 14px;
    gap: 10px;
  }
  .kt-card:not(.active) .kt-logo {
    width: 34px;
    height: 34px;
  }
  .kt-card:not(.active) .kt-logos .kt-logo {
    width: 24px;
    height: 24px;
  }
  .kt-logos .kt-logo + .kt-logo {
    margin-left: -12px;
  }
  .kt-logos .kt-logo:nth-child(n + 4) {
    display: none;
  }
  .kt-card:not(.active) .kt-name strong {
    font-size: 12.5px;
  }
}

/* ============================================================
   CTA — a clean topout: plain type, one primary action
   ============================================================ */
.cta .display {
  text-align: center;
}
.cta .display .em {
  color: var(--accent);
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin: 30px 0 16px;
}
.cta-actions .badges {
  margin: 0;
}

/* ============================================================
   v6 — CRAG DAY becomes its own film strip
   One frame per feature: fill the car / gear board / set the day.
   No plates, no screws out here — cards are taped-up field notes.
   ============================================================ */
.crag-strip {
  margin-top: 4px;
}
.plan-strip .strip-frame {
  border-top-right-radius: 0;
  transition: background-color 0.6s ease;
}
.plan-strip .strip-track {
  border-top-right-radius: 0;
}
#planning[data-mode="crag"] .strip-frame {
  background-color: color-mix(in oklab, var(--crag-green) 4%, transparent);
}
.crag-panel {
  align-items: center;
}
.crag-copy h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.crag-copy > p {
  color: var(--text-muted);
  max-width: 42ch;
  text-wrap: pretty;
}
.crag-steps {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crag-steps li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.crag-steps li b {
  font-weight: 600;
  color: var(--accent);
  flex: none;
}
.crag-kicker {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* ---------- field cards ---------- */
.crag-demo {
  width: 100%;
  max-width: 430px;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field-card {
  position: relative;
  background: var(--surface);
  background-image: var(--surface-grain);
  background-size: 7px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 4px 5px 0 var(--hard-ink);
  padding: 20px 20px 18px;
}
.field-card::before {
  /* a strip of tape, not a bolt */
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  translate: -50%;
  rotate: -2.5deg;
  width: 92px;
  height: 22px;
  background: color-mix(in oklab, var(--crag-green) 26%, var(--surface-deep));
  opacity: 0.85;
  border: 1px solid color-mix(in oklab, var(--crag-green) 36%, var(--border));
  border-radius: 2px;
}

/* ---------- frame 01: fill the car ---------- */
.cp-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}
.cp-head > .avatar {
  width: 32px;
  height: 32px;
  flex: none;
}
.cp-title {
  min-width: 0;
}
.cp-title strong {
  display: block;
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.cp-title span {
  display: block;
  font-size: 11px;
  color: var(--text-subtle);
}
.cp-state {
  margin-left: auto;
  flex: none;
  display: grid;
  justify-items: end;
  align-items: center;
}

/* open / reserved swap — labels + cta flip display, the pill cross-fades */
.cp-card .st-in {
  display: none;
}
.cp-card[data-state="in"] .st-open {
  display: none;
}
.cp-card[data-state="in"] .st-in {
  display: inline;
}
.cp-state .st-open,
.cp-state .st-in {
  display: inline;
  grid-area: 1 / 1;
  transition: opacity 0.3s;
}
.cp-state .st-in {
  opacity: 0;
}
.cp-card[data-state="in"] .cp-state .st-open {
  display: inline;
  opacity: 0;
}
.cp-card[data-state="in"] .cp-state .st-in {
  opacity: 1;
}

.cp-map {
  position: relative;
  height: 130px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--crag-green) 8%, var(--surface-deep));
  margin-bottom: 18px;
}
.cp-road {
  position: absolute;
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.cp-road.r1 {
  left: -4%;
  right: -4%;
  top: 46%;
  height: 13px;
  rotate: -5deg;
}
.cp-road.r2 {
  top: -10%;
  bottom: -10%;
  left: 26%;
  width: 11px;
  rotate: 10deg;
  border-block: none;
  border-inline: 1px solid var(--border);
}
.cp-road.r3 {
  left: 38%;
  right: -6%;
  top: 20%;
  height: 8px;
  rotate: 14deg;
}
.cp-green {
  position: absolute;
  border-radius: 40% 60% 55% 45%;
  background: color-mix(in oklab, var(--crag-green) 22%, transparent);
}
.cp-green.g1 {
  width: 84px;
  height: 56px;
  right: 6%;
  bottom: -14%;
}
.cp-green.g2 {
  width: 50px;
  height: 40px;
  left: 3%;
  top: -10%;
}
.cp-pin {
  position: absolute;
  left: 57%;
  top: 26%;
  width: 21px;
  height: 21px;
  background: var(--accent);
  border: 2px solid var(--hard-ink);
  border-radius: 50% 50% 50% 0;
  rotate: -45deg;
  box-shadow: 2px 2px 0 color-mix(in oklab, var(--hard-ink) 40%, transparent);
}
.cp-pin::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--on-accent);
}
.cp-loc {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 5px 9px;
  box-shadow: 2px 2px 0 var(--hard-ink);
}
.cp-maptag {
  position: absolute;
  right: 10px;
  top: 8px;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.cp-seats {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 18px;
}
.cp-seat-i {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
}
.cp-seat-i em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.seat.lg {
  width: 46px;
  height: 54px;
  border-radius: 12px 12px 9px 9px;
}
.seat.lg::before {
  width: 20px;
  height: 7px;
  top: -8px;
}
.seat.lg .avatar {
  width: 30px;
  height: 30px;
  font-size: 9px;
}
button.cp-seat-i {
  cursor: pointer;
}
button.cp-seat-i .seat {
  transition:
    border-color 0.25s,
    background 0.25s;
}
button.cp-seat-i:hover .seat {
  border-color: var(--accent);
}
.cp-seat-i.you .seat {
  display: grid;
}
.cp-seat-i.you .seat > * {
  grid-area: 1 / 1;
  transition: opacity 0.3s;
}
.cp-seat-i.you .you-av {
  display: inline-flex;
  opacity: 0;
}
.cp-card[data-state="in"] .cp-seat-i.you .seat {
  border-style: solid;
  background: var(--surface-deep);
}
.cp-card[data-state="in"] .cp-seat-i.you .seat::before {
  border-style: solid;
  background: var(--surface-deep);
}
.cp-card[data-state="in"] .cp-seat-i.you .you-av {
  opacity: 1;
}
.cp-card[data-state="in"] .cp-seat-i.you .seat-plus {
  opacity: 0;
}
.cp-card[data-state="in"] .cp-seat-i.you em {
  color: var(--accent);
}

.cp-cta {
  width: 100%;
  font-family: var(--font-tag);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 3px 3px 0 var(--hard-ink);
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    translate 0.15s,
    box-shadow 0.15s;
}
.cp-cta:hover {
  translate: 0 -1px;
}
.cp-cta:active {
  translate: 0 1px;
  box-shadow: 1px 1px 0 var(--hard-ink);
}
.cp-card[data-state="in"] .cp-cta {
  background: transparent;
  color: var(--accent);
  border-style: dashed;
}
.cp-offer {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 12px 18px;
  text-align: center;
  text-wrap: balance;
}
.cp-offer b {
  color: var(--accent);
  margin-right: 4px;
}

/* ---------- frame 02: gear board (bigger than the old vignette) ---------- */
.field-card .gear-grid {
  gap: 10px;
}
.field-card .gear {
  padding: 12px 6px 9px;
  gap: 5px;
}
.field-card .gear img {
  width: 36px;
  height: 36px;
}
.field-card .gear em {
  font-size: 9px;
}
.field-card:hover .pill-swap .wait {
  opacity: 0;
}
.field-card:hover .pill-swap .late {
  opacity: 1;
}
.field-card:hover .gear.claims .g-by {
  border-style: solid;
  border-color: var(--surface);
}
.field-card:hover .gear.claims .g-by .gb-av {
  opacity: 1;
}
.field-card:hover .gear.claims .g-by .gb-q {
  opacity: 0;
}
.field-card:hover .gear.claims {
  border-style: solid;
  border-color: var(--border);
  background: var(--surface-deep);
}
.field-card:hover .gear.claims img {
  opacity: 1;
  filter: none;
}

/* ---------- frame 02: gear board — requests + packing lists ---------- */
.gb-card {
  padding: 18px 18px 16px;
}
.gb-card .gear-head {
  margin-bottom: 14px;
}
.gb-sec {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 8px;
}
.gb-reqs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.gb-req {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 7px;
  padding: 12px 10px 10px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  transition:
    border-color 0.3s,
    background-color 0.3s;
}
.gb-req img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}
.gb-req strong {
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.gb-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.gb-who {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.gb-who .avatar {
  width: 16px;
  height: 16px;
  margin: 0;
}
.gb-claim {
  width: 100%;
  margin-top: 5px;
  font-family: var(--font-tag);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 5px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 2px 2px 0 var(--hard-ink);
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    translate 0.15s;
}
.gb-claim:hover {
  translate: 0 -1px;
}
.gb-claim .q-cov {
  display: none;
}
.gb-req[data-covered="true"] {
  border-style: solid;
  border-color: var(--accent-2);
  background: color-mix(in oklab, var(--accent-2) 7%, transparent);
}
.gb-req[data-covered="true"] .gb-claim {
  background: transparent;
  border-color: var(--accent-2);
  color: var(--accent-2);
  box-shadow: none;
}
.gb-req[data-covered="true"] .q-open {
  display: none;
}
.gb-req[data-covered="true"] .q-cov {
  display: inline;
}
.vig-pill.all-set {
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
}

.gb-people {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gb-person {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-deep);
}
.gb-phead {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.gb-phead .avatar {
  width: 24px;
  height: 24px;
  font-size: 8px;
  flex: none;
}
.gb-phead strong {
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.gb-phead em {
  margin-left: auto;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.gb-chev {
  font-style: normal;
  color: var(--text-subtle);
  font-size: 11px;
  transition: rotate 0.3s;
}
.gb-person.open .gb-chev {
  rotate: 180deg;
}
.gb-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}
.gb-body > .gb-pgrid {
  overflow: hidden;
  min-height: 0;
}
.gb-person.open .gb-body {
  grid-template-rows: 1fr;
}
.gb-pgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 12px;
}
.gb-person.open .gb-pgrid {
  padding-bottom: 12px;
}
.gb-pgrid .gear {
  padding: 9px 4px 7px;
  gap: 4px;
  background: var(--surface);
}
.gb-pgrid .gear img {
  width: 32px;
  height: 32px;
}
.gb-pgrid .gear em {
  font-size: 8.5px;
}
.gb-pgrid .gear.add {
  border-style: dashed;
  border-color: var(--border-strong);
  background: transparent;
  justify-content: center;
}
.gb-pgrid .gear.add b {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-subtle);
  line-height: 1.2;
}
.gb-pgrid .gear.add em {
  color: var(--text-subtle);
}
/* both requests covered → 6 real tiles fill 2 rows; drop the add chip
   so the list doesn't grow a third row */
.gb-pgrid:has(#gb-tile-helmet.show):has(#gb-tile-stickclip.show) .gear.add {
  display: none;
}
.gear.gb-appear {
  display: none;
}
.gear.gb-appear.show {
  display: flex;
  border-color: var(--accent-2);
  animation: gb-pop 0.35s ease both;
}
@keyframes gb-pop {
  from {
    opacity: 0;
    scale: 0.85;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gear.gb-appear.show {
    animation: none;
  }
}

/* the catalog ticker — a quiet full-width flex of all 46 illustrations,
   running under the strip in crag mode */
.gb-ticker {
  position: relative;
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.gb-tape {
  display: flex;
  align-items: center;
  gap: 26px;
  width: max-content;
  opacity: 0.92;
}
.gb-tape img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .gb-tape {
    animation: gb-scroll 80s linear infinite;
  }
  .gb-tape.rev {
    animation-duration: 95s;
    animation-direction: reverse;
  }
  .gb-ticker:hover .gb-tape {
    animation-play-state: paused;
  }
}
@keyframes gb-scroll {
  to {
    translate: calc(-50% - 13px) 0;
  }
}
.gb-tlabel {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* ---------- frame 01: set the day — pin the crag, share the plan ---------- */
.day-card .vig-logo {
  width: 34px;
  height: 34px;
}
.day-card .vig-session {
  margin-bottom: 12px;
}
.crag-type-rail {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.crag-type-tape {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding-left: 20px;
}
.crag-type-tape span {
  flex: none;
  padding: 4px 8px 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-subtle);
  background: color-mix(in oklab, var(--surface-deep) 72%, transparent);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.crag-type-tape span.active {
  border-color: color-mix(in oklab, var(--accent-2) 60%, var(--border));
  color: var(--accent-2);
  background: color-mix(in oklab, var(--accent-2) 12%, var(--surface-deep));
}
@media (prefers-reduced-motion: no-preference) {
  .crag-type-tape {
    animation: gb-scroll 42s linear infinite;
  }
}
.day-map {
  margin-bottom: 4px;
}
/* the crag itself: a ridge silhouette near the pin */
.cp-crag {
  position: absolute;
  right: 14%;
  top: 10%;
  width: 110px;
  height: 44px;
  background: color-mix(in oklab, var(--text) 14%, transparent);
  clip-path: polygon(0% 100%, 14% 52%, 26% 74%, 42% 18%, 55% 60%, 70% 34%, 84% 72%, 100% 100%);
}
.day-map .cp-pin {
  left: 62%;
  top: 24%;
}
.day-map .cp-maptag {
  top: auto;
  bottom: 10px;
  right: 10px;
}
.cp-park {
  position: absolute;
  left: 16%;
  top: 52%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text);
}
/* the walk-in: dashed trail from the car park up to the pin */
.cp-trail {
  position: absolute;
  left: 21%;
  top: 56%;
  width: 42%;
  border-top: 2px dashed color-mix(in oklab, var(--text) 50%, transparent);
  rotate: -13deg;
  transform-origin: left top;
}
.day-link {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.day-link i {
  font-style: normal;
}

/* gym frame 1: the open post — a session card like the app's:
   header with time range, participants list, join/maybe actions */
.qa-when {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex: none;
}
.qa-when b {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.qa-when em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.qa-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: -6px;
}
.qa-count {
  font-size: 8.5px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 1px 7px;
  color: var(--text-muted);
}
.qa-list {
  display: flex;
  flex-direction: column;
}
.qa-r {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 2px;
}
.qa-r + .qa-r {
  border-top: 1px solid var(--border);
}
.qa-r .avatar {
  width: 30px;
  height: 30px;
  font-size: 9px;
  margin: 0;
  flex: none;
}
.qa-meta strong {
  display: block;
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.qa-meta em {
  font-style: normal;
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.qa-r.mb .avatar {
  border-style: dashed;
  opacity: 0.85;
}
/* the card reserves its joined height (JS measures it) — actions pin
   to the bottom so the reel never changes height when you join */
.qa-card .vig {
  flex: 1;
}
.qa-card .qa-actions {
  margin-top: auto;
}
/* the You rows live in their section and slide in when you act */
#qa-you-in,
#qa-you-mb {
  display: none;
  overflow: hidden;
}
.qa-card[data-state="in"] #qa-you-in,
.qa-card[data-state="maybe"] #qa-you-mb {
  display: flex;
}
@media (prefers-reduced-motion: no-preference) {
  .qa-card[data-state="in"] #qa-you-in,
  .qa-card[data-state="maybe"] #qa-you-mb {
    animation: qa-join 0.4s cubic-bezier(0.25, 0.9, 0.3, 1) both;
  }
  @keyframes qa-join {
    from {
      max-height: 0;
      opacity: 0;
      padding-top: 0;
      padding-bottom: 0;
      translate: 0 -5px;
    }
    to {
      max-height: 56px;
      opacity: 1;
    }
  }
}
/* leaving animates the same way back out (specificity beats the join rule) */
@media (prefers-reduced-motion: no-preference) {
  .qa-card[data-state="in"] #qa-you-in.leaving,
  .qa-card[data-state="maybe"] #qa-you-mb.leaving {
    animation: qa-leave 0.3s ease both;
  }
  @keyframes qa-leave {
    to {
      max-height: 0;
      opacity: 0;
      padding-top: 0;
      padding-bottom: 0;
      translate: 0 -5px;
    }
  }
}
.qa-card[data-state="in"] #qa-you-in em {
  color: var(--accent);
}
.qa-card[data-state="maybe"] #qa-you-mb em {
  color: var(--accent);
}
/* button sets swap once you're in */
.qa-actions.qa-act-in {
  display: none;
}
.qa-card[data-state="in"] .qa-actions.qa-act-none {
  display: none;
}
.qa-card[data-state="in"] .qa-actions.qa-act-in {
  display: flex;
}
.qa-card[data-state="maybe"] #qa-maybe {
  translate: 1px 1px;
  box-shadow: 0 0 0 var(--hard-ink);
}
.qa-actions {
  display: flex;
  gap: 10px;
}
.qa-btn {
  flex: 1;
  font-family: var(--font-tag);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--text);
  background: var(--text);
  color: var(--bg);
  box-shadow: 2px 2px 0 var(--hard-ink);
  cursor: pointer;
  transition:
    translate 0.15s,
    box-shadow 0.15s,
    background 0.25s,
    color 0.25s;
}
.qa-btn:hover {
  translate: 0 -1px;
}
.qa-btn.ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px dashed var(--border-strong);
}
.qa-btn.ghost:hover {
  color: var(--text);
}
/* leaving is the one slightly-red action on the site */
#qa-leave {
  color: oklch(0.66 0.15 29);
  border-color: color-mix(in oklab, oklch(0.62 0.16 29) 55%, var(--border-strong));
}
#qa-leave:hover {
  color: oklch(0.7 0.17 29);
}

/* the one slightly-red kind of action on the site: removing yourself */
.qa-btn.danger {
  color: oklch(0.66 0.15 29);
  border-color: color-mix(in oklab, oklch(0.62 0.16 29) 55%, var(--border-strong));
}
.qa-btn.danger:hover {
  color: oklch(0.7 0.17 29);
}

/* gym frame 2: the direct invite — deadline bar + your answer */
.iv-card .vig-session .vig-title {
  min-width: 0;
}
.iv-card .vig-session .vig-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.iv-card .vig-session .vig-pill {
  flex: none;
  white-space: nowrap;
}
.qa-r .vig-pill {
  margin-left: auto;
  flex: none;
}
.vig-pill.wait {
  border: 1px dashed var(--border-strong);
  color: var(--text-subtle);
}
.ivd {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ivd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.ivd-row b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.ivd-row em {
  margin-left: auto;
  font-style: normal;
  color: var(--text-muted);
}
.ivd-track {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-deep);
  border: 1px solid var(--border);
  overflow: hidden;
}
.ivd-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}
.vig-pill.out {
  border: 1px solid var(--border-strong);
  color: var(--text-subtle);
}
.iv-card[data-state="in"] #iv-yes,
.iv-card[data-state="out"] #iv-no {
  translate: 1px 1px;
  box-shadow: 0 0 0 var(--hard-ink);
}

/* gym frame 3: time polls + gym polls, live winner */
.poll-switch {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}
.poll-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.poll-q {
  font-size: 13.5px;
  letter-spacing: -0.01em;
}
.poll-q .pq-gym {
  display: none;
}
.poll-card[data-poll="gym"] .pq-time {
  display: none;
}
.poll-card[data-poll="gym"] .pq-gym {
  display: inline;
}
.poll-by {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.poll-card .gym-poll {
  display: none;
  flex-direction: column;
  gap: 0;
}
.poll-card[data-poll="time"] .p-time {
  display: flex;
}
.poll-card[data-poll="gym"] .p-gym {
  display: flex;
}
/* each option: label + voters + count on top, a vote bar beneath,
   hairline separators between options */
.vig-opt.vp {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 10px;
}
.poll-card .vig-opt.vp + .vig-opt.vp {
  border-top: 1px solid var(--border);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.vp-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.poll-card .vig-day {
  width: auto;
  min-width: 100px;
  flex: none;
}
.vig-day.gym {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}
.vig-day.gym img {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  display: block;
}
.vp-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}
.vp-you {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: 999px;
  padding: 2px 7px;
  display: none;
}
.vig-opt.yours .vp-you {
  display: inline-flex;
}
.v-count {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  flex: none;
  min-width: 12px;
  text-align: right;
}
.vig-opt.win .v-count {
  color: var(--accent);
  font-weight: 600;
}
/* the deadline readout must not look like a ballot bar: in the poll
   card it's a dotted timeline with a position dot, not a filled track */
.poll-card .ivd-track {
  height: 8px;
  border: none;
  border-radius: 0;
  background: none;
  background-image: linear-gradient(90deg, var(--border-strong) 0 4px, transparent 4px 9px);
  background-size: 9px 2px;
  background-position: 0 50%;
  background-repeat: repeat-x;
  overflow: visible;
}
.poll-card .ivd-track i {
  background: none;
  position: relative;
  height: 100%;
}
.poll-card .ivd-track i::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  translate: 0 -50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: 1.5px solid var(--surface);
}
.poll-card .vig-opt.win .vp-top::after {
  content: "leading";
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in oklab, var(--accent) 55%, transparent);
  border-radius: 999px;
  padding: 2px 7px;
  flex: none;
}
.vp-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-deep);
  border: 1px solid var(--border);
  overflow: hidden;
}
.vp-bar i {
  display: block;
  height: 100%;
  background: var(--text-subtle);
  border-radius: 999px;
  transition:
    width 0.35s ease,
    background-color 0.3s;
}
.vig-opt.win .vp-bar i {
  background: var(--accent);
}

@media (max-width: 920px) {
  .crag-demo {
    margin-inline: auto;
  }
  .strip-head {
    flex-wrap: wrap;
  }
  .mode-tab {
    padding: 10px 14px 9px;
    font-size: 11px;
  }
}
@media (max-width: 460px) {
  .cp-seats {
    gap: 8px;
  }
  .seat.lg {
    width: 40px;
    height: 48px;
  }
}

/* keep the calendar card's long titles from starving the other column */
.fixture-stack .fixture {
  min-width: 0;
}
.fixture-stack .ac-title {
  min-width: 0;
}
.fixture-stack .ac-title strong,
.fixture-stack .ac-title span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* two phone fixtures need ~650px to sit side by side — below that,
   stack them so the timeline keeps readable session names */
@media (max-width: 1140px) {
  .fixture-stack {
    grid-template-columns: minmax(0, 1fr);
  }
  .fixture-stack .fixture:nth-child(2) {
    margin-top: 0;
  }
  .fixture-stack .fixture {
    max-width: 430px;
  }
}

/* ---------- calendar/timeline toggle: one board, shared week strip ---------- */
.pv-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
/* the day buttons must look exactly like the old .day spans —
   neutralize button UA styles, restate the .day recipe (our higher
   specificity would otherwise clobber it) */
.cal-board .day-strip button.day {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 9.5px;
  line-height: inherit;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  padding: 7px 0 6px;
  border-radius: 8px;
}
.cal-board .day-strip button.day.active {
  background: var(--surface-deep);
  border-color: var(--border-strong);
}
.cal-body {
  display: grid;
  overflow: hidden;
  transition: height 0.4s cubic-bezier(0.25, 0.9, 0.3, 1);
}
.cal-pane {
  grid-area: 1 / 1;
  min-width: 0;
  align-self: start;
  transition:
    opacity 0.3s ease,
    translate 0.3s ease;
}
#cal-board[data-view="cards"] .pane-tl,
#cal-board[data-view="timeline"] .pane-cards {
  opacity: 0;
  pointer-events: none;
  translate: 0 12px;
}
.pane-tl .tl {
  margin-top: 8px;
}
.shot-caption .c-tl {
  display: none;
}
.fixture:has(#cal-board[data-view="timeline"]) .shot-caption .c-cards {
  display: none;
}
.fixture:has(#cal-board[data-view="timeline"]) .shot-caption .c-tl {
  display: inline;
}
@media (prefers-reduced-motion: reduce) {
  .cal-body,
  .cal-pane {
    transition: none;
  }
}

.pv-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pv-head {
  display: flex;
  align-items: center;
  gap: 13px;
}
.pv-ava {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  flex: none;
}
.pv-ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pv-id {
  min-width: 0;
}
.pv-id strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}
.pv-you {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
}
.pv-id > span {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* contact row — the app's call / message / instagram strip */
.pv-contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
  padding-top: 10px;
}
.pv-ic {
  background: none;
  border: none;
  padding: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.pv-ic:hover {
  color: var(--text);
}
.pv-ic svg {
  width: 18px;
  height: 18px;
  display: block;
}
.pv-ic.edit {
  margin-left: auto;
  color: var(--text-subtle);
}
.pv-grades {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pv-grade {
  background: var(--surface-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 9px;
}
.pv-grade em,
.pv-gym em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.pv-grade strong {
  display: block;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin-top: 2px;
}
.pv-grade span {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-top: 1px;
}
.pv-gym {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--surface-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
}
.pv-gym img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: block;
  flex: none;
}
.pv-gym strong {
  display: block;
  font-size: 13px;
  letter-spacing: -0.01em;
  margin-top: 1px;
}
.pv-streak {
  background: var(--surface-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px 10px;
}
.pv-s-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.pv-s-head b {
  font-size: 14px;
  font-weight: 800;
  background: var(--text);
  color: var(--bg);
  border-radius: 7px;
  padding: 4px 8px;
  line-height: 1;
}
.pv-s-head strong {
  font-size: 12.5px;
  letter-spacing: -0.01em;
}
.pv-s-head span {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pv-s-head span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
/* the streak heatmap — months above, week label left, like the app */
.pv-heat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pv-months26 {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  padding-left: 34px;
}
.pv-months26 span {
  grid-row: 1;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  white-space: nowrap;
}
.pv-maprow {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pv-maprow em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  width: 28px;
  flex: none;
}
.pv-map {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  gap: 3.5px;
  flex: 1;
}
.pv-map i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.pv-map i.l1 {
  background: color-mix(in oklab, var(--accent) 22%, var(--surface));
}
.pv-map i.l2 {
  background: color-mix(in oklab, var(--accent) 45%, var(--surface));
}
.pv-map i.l3 {
  background: color-mix(in oklab, var(--accent) 70%, var(--surface));
  border-color: transparent;
}
.pv-map i.l4 {
  background: var(--accent);
  border-color: transparent;
}

/* ============================================================
   PRESENCE — the timeline view: the day, hour by hour
   ============================================================ */
.tl-board {
  padding: 16px 16px 14px;
}
.tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.tl-head strong {
  font-size: 13px;
  letter-spacing: -0.01em;
}
.tl-head span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.tl {
  position: relative;
  height: 308px;
}
.tl-hr {
  position: absolute;
  left: 42px;
  right: 0;
  border-top: 1px solid var(--border);
}
.tl-hr em {
  position: absolute;
  top: -5px;
  right: calc(100% + 8px);
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  line-height: 1;
  white-space: nowrap;
}
.tl-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--surface-deep);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 2px 3px 0 var(--hard-ink);
  overflow: hidden;
}
.tl-card.you {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 8%, var(--surface-deep));
  z-index: 1;
}
.tlc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.tlc-head img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
  flex: none;
}
.tlc-head strong {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tlc-head em {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
}
.tlc-head > div {
  min-width: 0;
}
.tlc-avs {
  display: flex;
  align-items: center;
}
.tlc-avs .avatar {
  width: 17px;
  height: 17px;
  font-size: 5.5px;
  margin: 0 0 0 -5px;
  border-width: 1.5px;
}
.tlc-avs .avatar:first-child {
  margin-left: 0;
}
.tlc-who {
  font-style: normal;
  margin-left: 7px;
  font-size: 9.5px;
  color: var(--text-muted);
}
.tlc-who b {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   PLANNING STAGE — one device, six steps of real captures.
   The .ps-screen window geometry matches .device-phone in app-shots.css
   (measured from the frame asset's alpha channel).
   ============================================================ */
.ps-wrap {
  margin-top: calc(var(--module) * 0.3);
}
/* chip strip: phone widths only */
.ps-chips {
  display: none;
}
.ps-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: clamp(24px, 3.4vw, 56px);
  align-items: start;
}
.ps-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ps-zone {
  margin: 14px 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.ps-zone::after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--border-strong);
}
.ps-zone.crag {
  color: var(--accent-2);
}
.ps-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.ps-step .n {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 19px;
  color: transparent;
  -webkit-text-stroke: 1.1px var(--text-subtle);
}
.ps-step strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.25;
}
.ps-step .hint {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-subtle);
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.35s ease,
    margin 0.35s ease;
}
.ps-step[aria-selected="true"] {
  background: var(--surface);
  border-color: var(--border-strong);
}
.ps-step[aria-selected="true"] .n {
  -webkit-text-stroke-color: var(--accent);
}
.ps-step.crag[aria-selected="true"] .n {
  -webkit-text-stroke-color: var(--accent-2);
}
.ps-step[aria-selected="true"] .hint {
  max-height: 110px;
  margin-top: 4px;
}
.ps-stage {
  position: relative;
  min-height: 720px;
}
.ps-pager {
  position: relative;
  min-height: 720px;
}
.ps-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ps-page.on {
  opacity: 1;
  pointer-events: auto;
}
.ps-device {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: clamp(16px, 2.4vw, 36px);
  align-items: center;
  min-height: 720px;
}
/* the device: each pager step owns one screen and frame */
.ps-phone {
  position: relative;
  width: 100%;
  max-width: 340px;
  filter: drop-shadow(-12px 16px 22px rgba(0, 0, 0, 0.42));
}
.ps-phone .ps-frame {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  z-index: 2;
}
.ps-screen {
  position: absolute;
  top: 2%;
  left: 3.95%;
  width: 91.65%;
  height: 96.17%;
  border-radius: 13.1% / 5.9%;
  overflow: hidden;
  z-index: 1;
}
.ps-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
/* the pulled-out capture */
.ps-out {
  position: relative;
  min-height: 480px;
}
.ps-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-70px) scale(0.82);
  transition:
    opacity 0.4s ease,
    transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}
.ps-card.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
img.ps-crop {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.34));
}
.ps-card > img,
.ps-card > .ps-crop {
  width: min(100%, 460px);
}
.ps-card.tall > img,
.ps-card.tall > .ps-crop {
  width: min(100%, 350px);
}
/* copy block and pager controls: phone widths only */
.ps-copy-m,
.ps-arrow {
  display: none;
}

@media (max-width: 960px) {
  .ps-steps {
    display: none;
  }
  .ps-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 16px;
    scrollbar-width: none;
  }
  .ps-chips::-webkit-scrollbar {
    display: none;
  }
  .ps-chip {
    flex: none;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
  }
  .ps-chip[aria-selected="true"] {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
  }
  .ps-chip.crag[aria-selected="true"] {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: var(--on-accent);
  }
  /* the step's copy reads FIRST, then the phone: chips · copy · stage */
  .ps-wrap {
    display: flex;
    flex-direction: column;
  }
  .ps-chips {
    order: 0;
  }
  .ps-copy-m {
    order: 1;
  }
  .ps-grid {
    display: block;
    order: 2;
  }
  /* native scroll snap makes the whole composition follow the finger */
  .ps-stage {
    width: 100%;
    margin: 18px auto 0;
    min-height: 0;
  }
  /* Overflow clips each page before this filter is composited, so the shadow
     follows the visible phone/card silhouette but can paint beyond the pager. */
  .ps-pager {
    display: flex;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
    min-height: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .ps-pager::-webkit-scrollbar {
    display: none;
  }
  .ps-page {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    opacity: 1;
    pointer-events: auto;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transition: none;
  }
  .ps-device {
    display: block;
    position: relative;
    width: min(72%, 260px);
    min-height: 0;
    margin: 0 auto;
  }
  .ps-phone {
    max-width: none;
    filter: none;
  }
  .ps-out {
    position: absolute;
    inset: auto -10% 6% auto;
    width: 88%;
    min-height: 0;
    z-index: 5;
    pointer-events: none;
  }
  .ps-card {
    position: absolute;
    inset: auto 0 0 auto;
    width: 100%;
    display: block;
    opacity: 1;
    transform: rotate(2deg);
    filter: none;
  }
  .ps-card > img,
  .ps-card > .ps-crop {
    width: 100%;
    filter: none;
  }
  .ps-card.tall {
    width: 78%;
  }
  /* the phone speaks for itself on the crag step: its screen already
     shows the map + pin the companion crop would repeat */
  .ps-card[data-i="3"] {
    display: none;
  }
  .ps-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    translate: 0 -50%;
    place-items: center;
    border: 0;
    background: none;
    color: var(--text-muted);
    font-size: 29px;
    line-height: 1;
    opacity: 1;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition:
      color 0.15s ease,
      opacity 0.15s ease;
  }
  .ps-arrow.prev {
    left: -6px;
  }
  .ps-arrow.next {
    right: -6px;
  }
  .ps-arrow:hover,
  .ps-arrow:focus-visible {
    color: var(--text);
    opacity: 1;
  }
  @media (hover: hover) and (pointer: fine) {
    .ps-arrow:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
  }
  .ps-arrow:disabled {
    opacity: 0.22;
    pointer-events: none;
  }
  .ps-copy-m {
    display: block;
    text-align: center;
    padding: 4px 8px 0;
  }
  .ps-copy-m h3 {
    font-family: var(--font-display);
    font-weight: var(--display-weight);
    font-size: 20px;
    margin: 0 0 6px;
  }
  .ps-copy-m p {
    color: var(--text-muted);
    font-size: 14.5px;
    margin: 0 auto;
    max-width: 36ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-page {
    transition: none;
  }
}
