/* ============================================================
   JOL — in-phone app screen recreations
   Hand-built HTML/CSS versions of real app screens, rendered
   inside the .phone-screen frames on the landing page.
   Design size is a fixed 262x568 (the default phone-screen inner
   box); the ≤420px breakpoint scales the whole screen down.
   ============================================================ */

.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 262px;
  height: 568px;
  transform-origin: top left;
  background: #1C1C1E;
  color: #fff;
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.app-screen *,
.app-screen *::before,
.app-screen *::after { box-sizing: border-box; }

.app-screen .ico {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- status bar ---------- */
.app-statusbar {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 19px 0;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 4;
}
.app-statusbar .sb-ind { display: flex; align-items: center; gap: 4px; }
.app-statusbar .sb-ind svg { display: block; }
.sb-batt {
  width: 22px; height: 11px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 3px;
  padding: 1.5px;
  position: relative;
}
.sb-batt::after {
  content: '';
  position: absolute;
  right: -3px; top: 50%;
  transform: translateY(-50%);
  width: 1.5px; height: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 0 1px 1px 0;
}
.sb-batt i { display: block; height: 100%; width: 78%; background: #fff; border-radius: 1px; }

/* ---------- white pill bottom nav ---------- */
.app-nav {
  position: absolute;
  left: 12px; right: 12px; bottom: 13px;
  height: 52px;
  background: #fff;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.5);
  z-index: 5;
}
.app-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #9CA3AF;
  flex: 1;
}
.app-nav .nav-item.active { color: #000; }
.app-nav .nav-item .ico { width: 19px; height: 19px; }
.app-nav .nav-item.active .ico { stroke-width: 2.5; }
.app-nav .nav-item span { font-size: 7.5px; font-weight: 700; letter-spacing: -0.01em; }

/* fade so content tucks under the floating nav */
.app-scroll-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 78px;
  background: linear-gradient(to top, #1C1C1E 28%, transparent);
  z-index: 4;
  pointer-events: none;
}
.app-event .app-scroll-fade { display: none; }

/* ---------- shared header (Explore / Buddies / Create) ---------- */
.app-head {
  display: flex;
  align-items: center;
  padding: 6px 14px 8px;
}
.app-head .head-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: #fff;
}
.app-head .head-logo { height: 21px; width: auto; margin-left: 4px; }
.app-head .head-spacer { flex: 1; }
.app-head .head-btn {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: #3A3A3C;
  border: 1px solid #3A3A3C;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.app-head .head-btn .ico { width: 16px; height: 16px; }

/* ============================================================
   1 + 2. EXPLORE — search + chips (shared by grid & map)
   ============================================================ */
.app-search {
  margin: 0 14px 8px;
  height: 38px;
  background: #3A3A3C;
  border: 1px solid #3A3A3C;
  border-radius: 11px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 9px;
  color: #8E8E93;
}
.app-search .ico { width: 16px; height: 16px; }
.app-search span { font-size: 12px; font-weight: 500; color: #636366; }

.app-chips {
  display: flex;
  gap: 7px;
  padding: 0 14px 10px;
  overflow: hidden;
}
.app-chips .chip {
  flex-shrink: 0;
  height: 27px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: #3A3A3C;
  border: 1px solid #3A3A3C;
  color: #fff;
}
.app-chips .chip.active {
  background: #fff;
  border-color: #fff;
  color: #1C1C1E;
}

/* ---------- explore grid ---------- */
.app-grid {
  padding: 2px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.ev-card {
  background: #2C2C2E;
  border: 1px solid #3A3A3C;
  border-radius: 14px;
  overflow: hidden;
}
.ev-card .ev-poster {
  width: 100%;
  height: 146px;
  object-fit: cover;
  display: block;
  background: #3A3A3C;
}
.ev-card .ev-meta { padding: 8px 9px 9px; }
.ev-card .ev-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}
.ev-card .ev-date {
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.ev-card .ev-loc {
  font-size: 9.5px;
  color: #636366;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-card .ev-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  color: #8E8E93;
}
.ev-card .ev-foot .ev-cat { font-size: 9px; }
.ev-card .ev-foot .ev-cnt {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 700;
}
.ev-card .ev-foot .ico { width: 10px; height: 10px; }

/* ============================================================
   2. MAP VIEW
   ============================================================ */
.app-map .map-canvas {
  position: absolute;
  top: 162px; left: 0; right: 0; bottom: 0;
  background: #15161a;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}
.app-map .map-canvas::before {
  content: '';
  position: absolute;
  inset: -20px;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 34px 34px;
}
/* roads */
.map-road {
  position: absolute;
  background: #23242a;
}
.map-road.r1 { width: 360px; height: 9px; top: 90px; left: -40px; transform: rotate(18deg); }
.map-road.r2 { width: 360px; height: 7px; top: 220px; left: -30px; transform: rotate(-12deg); }
.map-road.r3 { width: 9px; height: 420px; top: -20px; left: 150px; transform: rotate(9deg); }
.map-road.r4 { width: 6px; height: 420px; top: -20px; left: 60px; transform: rotate(-6deg); }
/* a green park + water blob for life */
.map-blob {
  position: absolute;
  border-radius: 44% 56% 60% 40% / 50% 44% 56% 50%;
}
.map-blob.park { width: 96px; height: 78px; bottom: 24px; left: -16px; background: #1d2a1f; }
.map-blob.water { width: 130px; height: 150px; top: -50px; right: -44px; background: #16222e; }

.map-circle {
  position: absolute;
  border-radius: 50%;
  border-width: 1.5px;
  border-style: solid;
}
.map-pin {
  position: absolute;
  width: 15px; height: 15px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 9px rgba(0,0,0,0.55);
}
.map-pin::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  background: #fff;
  border-radius: 50%;
  top: 5px; left: 5px;
}
.map-legend {
  position: absolute;
  left: 12px; bottom: 76px;
  background: rgba(44,44,46,0.92);
  border: 1px solid #3A3A3C;
  border-radius: 12px;
  padding: 8px 11px;
  z-index: 4;
}
.map-legend .lg-1 { font-size: 9.5px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.map-legend .lg-2 { font-size: 9.5px; color: #8E8E93; }
.map-mybtn {
  position: absolute;
  right: 12px; bottom: 76px;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: rgba(44,44,46,0.92);
  border: 1px solid #3A3A3C;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 4;
}
.map-mybtn .ico { width: 16px; height: 16px; }

/* ============================================================
   3. EVENT DETAIL
   ============================================================ */
.app-event { background: #1C1C1E; }
.app-event .ev-hero {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 322px;
  object-fit: cover;
  width: 100%;
}
.app-event .ev-hero-fade {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 110px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
  z-index: 2;
}
.app-event .ev-back {
  position: absolute;
  top: 46px; left: 16px;
  width: 34px; height: 34px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 3;
}
.app-event .ev-back .ico { width: 20px; height: 20px; }

.app-event .ev-sheet {
  position: absolute;
  top: 286px; left: 0; right: 0; bottom: 0;
  background: #1C1C1E;
  border-radius: 34px 34px 0 0;
  padding: 22px 18px 0;
  z-index: 3;
}
.ev-sheet .ev-h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 4px;
}
.ev-sheet .ev-when {
  font-size: 11.5px;
  font-weight: 500;
  color: #8E8E93;
  margin-bottom: 16px;
}
.ev-row-card {
  display: flex;
  align-items: center;
  background: #2C2C2E;
  border: 1px solid #3A3A3C;
  border-radius: 14px;
  padding: 11px;
  margin-bottom: 14px;
}
.ev-row-card .ev-tile {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-right: 12px;
}
.ev-row-card .ev-tile.round { border-radius: 999px; background: #3A3A3C; border: 1px solid #3A3A3C; }
.ev-row-card .ev-tile .ico { width: 19px; height: 19px; }
.ev-row-card .ev-rc-body { flex: 1; min-width: 0; }
.ev-row-card .ev-rc-1 { font-size: 12.5px; font-weight: 700; color: #fff; }
.ev-row-card .ev-rc-2 { font-size: 10.5px; color: #8E8E93; margin-top: 1px; }
.ev-row-card .ev-chev { color: #636366; }
.ev-row-card .ev-chev .ico { width: 17px; height: 17px; }
.ev-follow {
  background: #fff;
  color: #1C1C1E;
  font-size: 10.5px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 10px;
}

.ev-attend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ev-attend .ev-at-1 { font-size: 13px; font-weight: 700; color: #fff; }
.ev-attend .ev-at-2 { font-size: 10.5px; color: #8E8E93; margin-top: 1px; }
.ev-avatars { display: flex; }
.ev-avatars .av {
  width: 27px; height: 27px;
  border-radius: 999px;
  background: #3A3A3C;
  border: 2px solid #1C1C1E;
  margin-left: -9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8E8E93;
  font-size: 9px;
  font-weight: 700;
}
.ev-avatars .av:first-child { margin-left: 0; }
.ev-avatars .av .ico { width: 13px; height: 13px; }
.ev-avatars .av.more { background: #2C2C2E; color: #fff; }

.ev-desc { border-top: 1px solid #3A3A3C; padding-top: 14px; }
.ev-desc .ev-desc-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #8E8E93;
  margin-bottom: 8px;
}
.ev-desc .ev-desc-body {
  font-size: 11px;
  line-height: 1.55;
  color: #8E8E93;
}

.ev-actionbar {
  position: absolute;
  left: 16px; right: 16px; bottom: 18px;
  display: flex;
  gap: 9px;
  z-index: 6;
}
.ev-actionbar .ev-act {
  background: #3A3A3C;
  border: 1px solid #3A3A3C;
  border-radius: 14px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  gap: 7px;
}
.ev-actionbar .ev-act.wide { flex: 1; }
.ev-actionbar .ev-act.stack { flex-direction: column; gap: 0; line-height: 1.15; font-size: 11px; }
.ev-actionbar .ev-act.square { width: 48px; }
.ev-actionbar .ev-act .ico { width: 18px; height: 18px; }
.app-event .ev-bar-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 86px;
  background: linear-gradient(to top, #1C1C1E 46%, transparent);
  z-index: 5;
  pointer-events: none;
}

/* ============================================================
   4. BUDDIES
   ============================================================ */
.app-segment {
  display: flex;
  margin: 0 14px 14px;
  background: #2C2C2E;
  border: 1px solid #3A3A3C;
  border-radius: 14px;
  padding: 3px;
}
.app-segment .seg {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 0;
  border-radius: 10px;
  color: #8E8E93;
}
.app-segment .seg.active { background: #fff; color: #1C1C1E; }

.app-buddies { padding: 0 14px; display: flex; flex-direction: column; gap: 9px; }
.bud-row {
  display: flex;
  align-items: center;
  background: #2C2C2E;
  border: 1px solid #3A3A3C;
  border-radius: 14px;
  padding: 9px 11px;
}
.bud-row .bud-av {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: #3A3A3C;
  border: 1px solid #3A3A3C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.bud-row .bud-body { flex: 1; margin-left: 11px; min-width: 0; }
.bud-row .bud-name { font-size: 12.5px; font-weight: 700; color: #fff; }
.bud-row .bud-user { font-size: 10px; color: #8E8E93; margin-top: 1px; }
.bud-row .bud-msg {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: #3A3A3C;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.bud-row .bud-msg .ico { width: 16px; height: 16px; }

/* ============================================================
   5. CREATE EVENT
   ============================================================ */
.app-create { display: flex; flex-direction: column; }
.app-create .cr-body { padding: 2px 14px; display: flex; flex-direction: column; gap: 11px; }
.cr-poster {
  width: 100%;
  height: 150px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  border: 1px solid #3A3A3C;
}
.cr-card {
  background: #2C2C2E;
  border: 1px solid #3A3A3C;
  border-radius: 14px;
  padding: 14px;
}
.cr-card .cr-name { font-size: 14px; font-weight: 600; color: #fff; }
.cr-card .cr-placeholder { font-size: 13px; font-weight: 500; color: #8E8E93; }

.cr-time { display: flex; align-items: stretch; }
.cr-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-right: 13px;
  padding: 3px 0;
}
.cr-timeline .dot { width: 7px; height: 7px; border-radius: 999px; background: #fff; }
.cr-timeline .line { width: 1px; flex: 1; min-height: 20px; background: rgba(255,255,255,0.5); margin: 3px 0; }
.cr-time .cr-time-body { flex: 1; }
.cr-time .cr-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}
.cr-time .cr-time-row.top { border-bottom: 1px solid #3A3A3C; padding-bottom: 9px; margin-bottom: 9px; }
.cr-time .cr-tl { font-size: 12.5px; font-weight: 500; color: #8E8E93; }
.cr-time .cr-tv { font-size: 12.5px; font-weight: 700; color: #fff; }

.cr-loc { display: flex; align-items: center; gap: 9px; color: #8E8E93; }
.cr-loc .ico { width: 17px; height: 17px; }
.cr-loc span { font-size: 13px; font-weight: 500; color: #fff; }

.cr-field-label { font-size: 13px; font-weight: 700; color: #fff; margin: 2px 0 -2px 2px; }
.cr-typechips { display: flex; gap: 8px; overflow: hidden; }
.cr-typechips .tc {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  padding: 8px 15px;
  border-radius: 999px;
  background: #2C2C2E;
  border: 1px solid #3A3A3C;
  color: #8E8E93;
}
.cr-typechips .tc.active { background: #fff; border-color: #fff; color: #1C1C1E; }

/* ============================================================
   responsive — scale the fixed 262x568 screen to the smaller
   phone frame used below 420px (phone-screen ≈ 228x498)
   ============================================================ */
@media (max-width: 420px) {
  /* small phone frame's inner box is ≈228x498; scale the fixed
     262x568 design to fill its height (tiny horizontal overhang
     is clipped by .phone-screen overflow:hidden). */
  .app-screen { transform: scale(0.8768); }
}
