
    :root {
      --bg: #000000;
      --bg2: #0a0a0a;
      --card: #141414;
      --card2: #1c1c1c;
      --orange: #ff5c00;
      --orange2: #ff8a1a;
      --pink: #ff5c00;
      --cyan: #ff8a1a;
      --violet: #ff5c00;
      --lime: #ffc14d;
      --gold: #ffb020;
      --text: #fff7f0;
      --muted: #c8b8aa;
      --dim: #8a8178;
      --line: rgba(255,255,255,.1);
      --danger: #ff4d6d;
      --ok: #5dffb0;
      --safe-t: env(safe-area-inset-top, 0px);
      --safe-b: env(safe-area-inset-bottom, 0px);
      --kb: 0px;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
    html, body { height: 100%; background: #000000; color: var(--text);
      font-family: "SF Pro Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
      -webkit-font-smoothing: antialiased; }
    body { display: flex; justify-content: center; align-items: center; min-height: 100dvh; }
    #app {
      width: 100%; max-width: 390px; height: 100dvh; max-height: 844px;
      background: var(--bg); position: relative; overflow: hidden;
      box-shadow: 0 0 80px rgba(255,92,0,.22), 0 0 0 1px rgba(255,255,255,.06);
      display: flex; flex-direction: column;
    }
    @media (max-width: 500px) { #app { max-height: none; height: 100dvh; box-shadow: none; } }
    button, input, textarea { font: inherit; color: inherit; }
    button { border: 0; background: none; cursor: pointer; }
    input, textarea { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; outline: none; width: 100%; }
    input:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,92,0,.25); }
    textarea { resize: none; min-height: 84px; }
    .beads { display: flex; align-items: center; justify-content: center; gap: 0; }
    .bead { width: 14px; height: 14px; border-radius: 50%; margin: 0 -1px; box-shadow: 0 0 8px currentColor, inset 0 2px 3px rgba(255,255,255,.45), inset 0 -2px 3px rgba(0,0,0,.25); }
    .bead.sm { width: 9px; height: 9px; }
    .bead.lg { width: 18px; height: 18px; }
    .wordmark { font-weight: 800; letter-spacing: .28em; text-transform: uppercase; }
    .wordmark.grad {
      background: linear-gradient(90deg, #ff8a1a, #ff5c00 55%, #ffc14d);
      -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    }
    .screen { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
    .scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
    .pad { padding: 16px 18px calc(20px + var(--safe-b)); }
    .top-pad { padding-top: calc(14px + var(--safe-t)); }
    .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      width: 100%; height: 52px; border-radius: 999px; font-weight: 700; font-size: 16px; letter-spacing: .02em; }
    .btn.primary { background: linear-gradient(90deg, #ff8a1a, #ff5c00); color: #fff;
      box-shadow: 0 8px 28px rgba(255,92,0,.4); }
    .btn.primary:active { transform: scale(.98); }
    .btn.ghost { background: rgba(255,255,255,.06); border: 1px solid var(--line); }
    .btn.danger { background: rgba(255,77,109,.15); color: var(--danger); }
    .btn:disabled { opacity: .4; pointer-events: none; }
    .btn.sm { height: 40px; font-size: 14px; width: auto; padding: 0 16px; }
    .chips { display: flex; flex-wrap: wrap; gap: 8px; }
    .chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
      background: rgba(255,255,255,.04); font-size: 13px; font-weight: 600; color: var(--text); }
    .chip.on { border-color: transparent; background: linear-gradient(90deg, #ff8a1a, #ff5c00); color: #000; }
    .chip.soft { background: rgba(255,92,0,.12); border-color: rgba(255,92,0,.3); color: var(--orange2); font-size: 11px; padding: 4px 9px; }
    .header { display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: calc(10px + var(--safe-t)) 14px 10px; min-height: calc(52px + var(--safe-t)); flex-wrap: nowrap; position: relative; z-index: 20; }
    .header .left, .header .right { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
    .header .right { flex-shrink: 0; }
    .icon-btn { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.06);
      display: grid; place-items: center; font-size: 16px; border: 1px solid var(--line); flex-shrink: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
    .icon-btn.more-btn { font-size: 22px; letter-spacing: 0; position: relative; z-index: 2; }
    .pill { font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
      background: rgba(255,92,0,.16); color: #ffb07a; border: 1px solid rgba(255,92,0,.35); }
    .tabbar { display: flex; border-top: 1px solid var(--line); background: rgba(0,0,0,.94);
      backdrop-filter: blur(16px); padding: 6px 6px calc(8px + var(--safe-b)); flex-shrink: 0; }
    .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
      color: var(--dim); font-size: 10px; font-weight: 600; padding: 6px 2px; position: relative; }
    .tab .ic { font-size: 18px; line-height: 1; }
    .tab.on { color: var(--text); }
    .tab.on .ic { text-shadow: 0 0 12px var(--orange); }
    .badge { position: absolute; top: 2px; right: calc(50% - 18px); min-width: 16px; height: 16px; padding: 0 4px;
      border-radius: 999px; background: var(--orange); color: #000; font-size: 9px; font-weight: 800;
      display: grid; place-items: center; }
  

    .splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
      text-align: center; padding: 24px 24px calc(28px + var(--safe-b)); position: relative; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    @media (min-height: 900px) {
      .splash { justify-content: center; }
    }
    .splash::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
      background: radial-gradient(circle, rgba(255,61,154,.35), transparent 65%); top: -80px; left: -80px; filter: blur(10px); }
    .splash::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%;
      background: radial-gradient(circle, rgba(46,240,255,.22), transparent 65%); bottom: -40px; right: -80px; }
    .splash .inner { position: relative; z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center; }
    .splash h1 { font-size: 52px; letter-spacing: .22em; margin: 18px 0 8px; }
    .splash p { color: var(--muted); font-size: 16px; max-width: 280px; line-height: 1.45; }
    .demo-tag { margin-top: 14px; font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
    .step-dots { display: flex; gap: 6px; justify-content: center; padding: 8px 0 4px; }
    .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.2); }
    .dot.on { background: var(--orange); box-shadow: 0 0 8px var(--orange); width: 16px; border-radius: 99px; }
    .h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
    .sub { color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 8px; }
    .label { font-size: 12px; font-weight: 700; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
    .photo { position: relative; height: 430px; border-radius: 22px; overflow: hidden;
      display: flex; align-items: center; justify-content: center; isolation: isolate; }
    .photo .emoji { font-size: 104px; position: relative; z-index: 1; filter: drop-shadow(0 10px 24px rgba(0,0,0,.45)); }
    .photo .grain { position: absolute; inset: 0; opacity: .22; mix-blend-mode: overlay;
      background-image: radial-gradient(rgba(255,255,255,.18) 0.6px, transparent 0.8px); background-size: 4px 4px; }
    .photo .caption { position: absolute; left: 14px; bottom: 14px; z-index: 1; font-size: 12px; font-weight: 600;
      color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); max-width: 70%; }
    .photo .who { position: absolute; left: 16px; top: 16px; z-index: 1; }
    .photo .who .nm { font-size: 26px; font-weight: 800; letter-spacing: -.03em; text-shadow: 0 2px 16px rgba(0,0,0,.55); }
    .heart-fab { position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 52px; height: 52px; border-radius: 50%;
      background: rgba(8,1,15,.55); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(10px);
      display: grid; place-items: center; font-size: 22px; box-shadow: 0 8px 20px rgba(0,0,0,.3); }
    .heart-fab:active { transform: scale(.94); }
    .heart-fab.loved { background: var(--orange); border-color: var(--orange); color: #000; }
    .prompt { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px 20px 64px; }
    .prompt .q { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
    .prompt .a { font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }
    .meta-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
    .stack { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 20px; }
    .float-actions { display: flex; justify-content: center; gap: 16px; padding: 10px 16px 8px; }
    .disco-actions { flex-shrink: 0; gap: 28px; padding: 12px 16px 14px; background: linear-gradient(180deg, rgba(0,0,0,0), #000 42%); }
    .disco-actions .round { width: 72px; height: 72px; font-size: 28px; }
    .prompt { padding: 20px; }

    .round { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 22px;
      border: 1px solid var(--line); background: var(--card2); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
    .round.pass { color: #ff8aa0; }
    .round.rewind { color: var(--gold); }
    .sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.62); z-index: 40; display: flex; align-items: flex-end; }
    .sheet { width: 100%; background: #111111; border-top: 1px solid var(--line); border-radius: 24px 24px 0 0;
      padding: 12px 18px calc(18px + var(--safe-b)); max-height: 88%; overflow-y: auto; }
    .grab { width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); margin: 0 auto 14px; }
    .overlay { position: absolute; inset: 0; z-index: 50; background: rgba(6,0,10,.88);
      display: flex; flex-direction: column; overflow-y: auto; }
    .match-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
      text-align: center; padding: 24px 24px calc(24px + var(--safe-b)); }
    .match-wrap h2 { font-size: 36px; font-weight: 800; margin: 16px 0 8px;
      background: linear-gradient(90deg, #ff8a1a, #ff5c00, #ffc14d);
      -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
    .avatars { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .av { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 40px;
      border: 3px solid rgba(255,255,255,.2); background-size: cover; background-position: center;
      background-repeat: no-repeat; overflow: hidden; flex-shrink: 0; color: #fff;
      image-orientation: from-image; }
    .card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
    .row { display: flex; align-items: center; gap: 12px; }
    .row .grow { flex: 1; min-width: 0; }
    .muted { color: var(--muted); font-size: 13px; }
    .tiny { color: var(--dim); font-size: 11px; }
    .lock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .lock-card { position: relative; height: 180px; border-radius: 16px; overflow: hidden;
      display: flex; align-items: flex-end; padding: 12px; }
    .lock-card.blurred { filter: blur(14px) saturate(1.2); transform: scale(1.08); }
    .event { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-align: left; width: 100%; color: inherit; }
    .event .event-main { display: flex; gap: 12px; text-align: left; width: 100%; color: inherit; background: transparent; padding: 0; }
    .event .thumb { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0; overflow: hidden; }
    .event .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .event-tix { text-align: center; text-decoration: none; }
    .event-updated { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
    .event-cats { margin-bottom: 12px; }
    .event-facts { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
    .event-addr { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; line-height: 1.35; }
    .event-addr.tba, .event-tix-line.tba { color: var(--muted); text-decoration: none; }
    .event-tix-line { font-size: 13px; color: var(--text); }
    .event-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .event-actions .btn { flex: 1; min-width: 120px; text-align: center; text-decoration: none; }
    .event-detail-row { margin: 10px 0; }
    .event-detail-row .label { margin-bottom: 2px; }

    .toggle { width: 46px; height: 28px; border-radius: 999px; background: #2a2a2a; position: relative; border: 0; flex-shrink: 0; }
    .toggle.on { background: linear-gradient(90deg, #ff8a1a, #ff5c00); }
    .toggle i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .18s; }
    .toggle.on i { left: 21px; }
    .chat-log { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; }
    .bubble { max-width: 78%; padding: 10px 13px; border-radius: 18px; font-size: 15px; line-height: 1.4; }
    .bubble.them { background: var(--card2); align-self: flex-start; border-bottom-left-radius: 6px; }
    .bubble.me { background: linear-gradient(180deg, #ff8a1a, #ff5c00); align-self: flex-end; border-bottom-right-radius: 6px; }
    .chat-bar { display: flex; gap: 8px; padding: 8px 12px calc(8px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg2); }
    .chat-bar input { flex: 1; border-radius: 999px; }
    .plan { flex: 1; min-width: 140px; text-align: left; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
    .plan.on { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(255,92,0,.4); }
    .price { font-size: 22px; font-weight: 800; }
    .seg { display: flex; background: rgba(255,255,255,.05); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
    .seg button { flex: 1; min-width: 80px; height: 34px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--muted); }
    .seg button.on { background: #fff; color: #000000; }
    .feat { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
    .nearby { width: 100%; text-align: left; }
    .agegate { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
    .example { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
    .empty { text-align: center; padding: 40px 20px; color: var(--muted); }
    .vip { font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 2px 7px; border-radius: 999px;
      background: linear-gradient(90deg, #ffc14d, #ff5c00); color: #1a0a00; }
    .notice { background: rgba(255,92,0,.08); border: 1px solid rgba(255,92,0,.22); color: #ffd4b0;
      border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.45; }
    .notice.warn { background: rgba(255,213,106,.1); border-color: rgba(255,213,106,.25); color: #ffe7a8; }
    .notice.ok { background: rgba(93,255,176,.08); border-color: rgba(93,255,176,.25); color: #b9ffdb; }
  
    .auth-card { width: 100%; max-width: 360px; }
    .err { color: var(--danger); font-size: 13px; margin-top: 8px; }
    .photo-upload { position: relative; }
    .photo-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
    .photo.file { background-size: cover; background-position: center; }
    body.standalone #app { max-height: none; height: 100dvh; box-shadow: none; }
    button, [role=button], .chip, .toggle, .tab { touch-action: manipulation; cursor: pointer; }

    .ios-tip { margin: 8px 16px 12px; padding: 12px 14px; border-radius: 16px;
      background: rgba(255,92,0,.1); border: 1px solid rgba(255,92,0,.28); color: var(--text); }
    .ios-tip strong { display: block; font-size: 14px; margin-bottom: 4px; }
    .ios-tip p { font-size: 13px; color: var(--muted); line-height: 1.4; }
    .ios-tip .row { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .claim-card h2 { margin-bottom: 8px; }


    /* Social home feed */
    .feed-tabs { display: flex; gap: 4px; padding: 0 14px 8px; }
    .feed-tabs button { flex: 1; height: 34px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
    .feed-tabs button.on { color: #000; background: linear-gradient(90deg, #ff8a1a, #ff5c00); border-color: transparent; }
    .stories { display: flex; gap: 12px; overflow-x: auto; padding: 4px 14px 14px; -webkit-overflow-scrolling: touch; }
    .stories::-webkit-scrollbar { display: none; }
    .story { flex: 0 0 auto; width: 72px; text-align: center; color: inherit; }
    .story .ring { width: 62px; height: 62px; margin: 0 auto 6px; border-radius: 50%; padding: 2px;
      background: linear-gradient(135deg, #ff8a1a, #ff5c00, #ffc14d); }
    .story .av { width: 100%; height: 100%; border-radius: 50%; background: #111 center/cover no-repeat;
      display: grid; place-items: center; font-size: 24px; border: 2px solid #000; }
    .story .nm { font-size: 10px; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .post { background: var(--bg); border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 8px; }
    .post-hd { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
    .post-hd .av { width: 36px; height: 36px; border-radius: 50%; background: #111 center/cover no-repeat; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
    .post-hd .who { flex: 1; min-width: 0; text-align: left; background: none; color: inherit; }
    .post-hd .who .nm { font-weight: 800; font-size: 14px; }
    .post-hd .who .un { color: var(--dim); font-size: 11px; }
    .post-photo { position: relative; width: 100%; aspect-ratio: 1; background: #0a0a0a center/cover no-repeat; overflow: hidden; }
    .post-photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
    .post-photo .burst { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; color: #fff;
      text-shadow: 0 8px 24px rgba(0,0,0,.45); animation: burst .7s ease-out forwards; pointer-events: none; }
    @keyframes burst { 0% { transform: scale(.4); opacity: 0; } 30% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1.3); opacity: 0; } }
    .post-actions { display: flex; align-items: center; gap: 4px; padding: 6px 8px 0; }
    .post-actions button { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; color: var(--text); }
    .post-actions button.loved { color: var(--orange); text-shadow: 0 0 10px rgba(255,92,0,.6); }
    .post-actions .spacer { flex: 1; }
    .post-body { padding: 0 14px; }
    .post-body .likes { font-weight: 800; font-size: 13px; margin: 2px 0 6px; }
    .post-body .cap { font-size: 14px; line-height: 1.4; white-space: pre-line; }
    .post-body .cap strong { margin-right: 6px; }
    .post-body .event-tag { display: inline-flex; margin-top: 6px; }
    .post-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; margin-top: 12px; }
    .post-grid button { aspect-ratio: 1; background: #111 center/cover no-repeat; position: relative; }
    .post-grid .txt { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; font-size: 11px; text-align: center; color: var(--muted); background: #141414; }
    .fab-post { position: absolute; right: 16px; bottom: calc(70px + var(--safe-b)); z-index: 25;
      width: 56px; height: 56px; border-radius: 50%; font-size: 28px; font-weight: 700; color: #fff;
      background: linear-gradient(135deg, #ff8a1a, #ff5c00); box-shadow: 0 10px 28px rgba(255,92,0,.45); }
    .composer-preview { width: 100%; aspect-ratio: 1; border-radius: 16px; background: #111 center/cover no-repeat; margin: 10px 0; }
    .counts { display: flex; gap: 18px; margin: 12px 0; }
    .counts button, .counts span { text-align: left; color: inherit; }
    .counts strong { display: block; font-size: 18px; }
    .tab { font-size: 9px; }
    .tab .ic { font-size: 16px; }

    .av.sm { width: 52px; height: 52px; font-size: 22px; border-width: 2px; }
    .av.md { width: 64px; height: 64px; font-size: 26px; }
    .av.lg, .prof-av { width: 112px; height: 112px; font-size: 48px; border-color: rgba(255,92,0,.65); }
    .av.chat { width: 36px; height: 36px; font-size: 16px; border-width: 2px; }
    .prof-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
    .prof-hero .nm { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
    .prof-avatar-wrap { position: relative; display: block; width: 112px; height: 112px; flex-shrink: 0; cursor: pointer; }
    .prof-avatar-wrap input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
    .cam-badge { position: absolute; right: 0; bottom: 0; width: 32px; height: 32px; border-radius: 50%;
      background: linear-gradient(135deg, #ff8a1a, #ff5c00); color: #fff; font-size: 15px;
      display: grid; place-items: center; border: 2px solid #000; box-shadow: 0 4px 12px rgba(255,92,0,.45); pointer-events: none; }
    .photo-editor { margin: 12px 0 8px; }
    .photo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .photo-slot { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden;
      background: #141414 center/cover no-repeat; border: 1px solid var(--line); }
    .photo-slot.main { border-color: var(--orange); box-shadow: 0 0 0 1px rgba(255,92,0,.5); }
    .photo-slot.add { display: grid; place-items: center; color: var(--muted); font-size: 28px; font-weight: 700;
      border: 1px dashed rgba(255,255,255,.22); background: #101010; cursor: pointer; }
    .photo-slot.add input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
    .photo-slot .main-tag { position: absolute; left: 6px; top: 6px; z-index: 1; font-size: 10px; font-weight: 800;
      letter-spacing: .06em; text-transform: uppercase; background: linear-gradient(90deg,#ff8a1a,#ff5c00);
      color: #fff; padding: 3px 7px; border-radius: 999px; }
    .photo-slot .slot-x { position: absolute; top: 6px; right: 6px; z-index: 2; width: 24px; height: 24px;
      border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: 14px; display: grid; place-items: center; }
    .photo-slot .slot-tools { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex;
      gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.72)); flex-wrap: wrap; }
    .photo-slot .slot-tools button { height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255,255,255,.14);
      font-size: 10px; font-weight: 700; color: #fff; }
    .photo-hint { color: var(--dim); font-size: 11px; margin-top: 8px; line-height: 1.4; }
    .upload-busy { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 13px; }
    .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2);
      border-top-color: var(--orange); animation: kandi-spin .7s linear infinite; flex-shrink: 0; }
    @keyframes kandi-spin { to { transform: rotate(360deg); } }
    .nudge { display: flex; align-items: flex-start; gap: 10px; margin: 10px 14px 6px; padding: 12px 12px 12px 14px;
      background: linear-gradient(180deg, rgba(255,92,0,.16), rgba(255,92,0,.06)); border: 1px solid rgba(255,92,0,.35);
      border-radius: 16px; }
    .nudge .grow { flex: 1; min-width: 0; }
    .nudge strong { display: block; font-size: 14px; }
    .nudge p { color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.4; }
    .chat-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .chat-head .nm { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .profile-top { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }

    /* ---- usability + accessibility pass ---- */
    html { -webkit-text-size-adjust: 100%; }
    button, a, label, [data-act] { touch-action: manipulation; cursor: pointer; }
    input, textarea, select { font-size: 16px; } /* prevents iOS zoom-on-focus */
    :focus-visible { outline: 2px solid var(--orange2); outline-offset: 2px; }
    .icon-btn { width: 44px; height: 44px; font-size: 18px; }
    .chip { min-height: 38px; display: inline-flex; align-items: center; }
    .chip.soft { min-height: 0; }
    .btn.sm { min-height: 44px; }
    .tab { min-height: 48px; }
    .round.like { width: 64px; height: 64px; font-size: 28px; color: #000; border-color: transparent;
      background: linear-gradient(90deg, #ff8a1a, #ff5c00); box-shadow: 0 8px 28px rgba(255,92,0,.45); }
    .tiny { color: #a39a91; } /* was #8a8178: too low contrast on black */
    a { color: var(--orange2); }
    [data-act].busy { opacity: .65; pointer-events: none; position: relative; }
    .btn[data-act].busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%;
      border: 2px solid currentColor; border-right-color: transparent; animation: kspin .7s linear infinite; }
    .spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px;
      border: 2px solid var(--orange2); border-right-color: transparent; animation: kspin .7s linear infinite; }
    @keyframes kspin { to { transform: rotate(360deg); } }
    body.net-busy::before { content: ""; position: fixed; z-index: 200; top: 0; left: 0; right: 0; height: 3px;
      top: env(safe-area-inset-top, 0px);
      background: linear-gradient(90deg, transparent, #ff5c00, #ffc14d, transparent); background-size: 200% 100%;
      animation: kbar 1s linear infinite; }
    @keyframes kbar { from { background-position: 200% 0; } to { background-position: -200% 0; } }
    .toast { position: fixed; z-index: 300; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
      bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-width: min(92vw, 360px); width: max-content;
      background: #1c1c1c; color: var(--text); border: 1px solid rgba(255,92,0,.5); border-radius: 14px;
      padding: 12px 16px; font-size: 14px; line-height: 1.35; box-shadow: 0 10px 30px rgba(0,0,0,.6);
      transition: opacity .2s, transform .2s; text-align: center; }
    .toast.show { opacity: 1; transform: translate(-50%, 0); }
    .toast.err { border-color: var(--danger); }
    .toast.warn { border-color: var(--gold); }
    .sheet { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
    .chat-bar input { min-width: 0; }
    .overlay { background: var(--bg); }
    .overlay .match-wrap { background: radial-gradient(circle at 50% 30%, rgba(255,92,0,.18), transparent 60%); }
    a.btn { text-decoration: none; color: inherit; }
    a.btn.primary { color: #fff; }
    .photo.file, .photo-slot, .post-photo, .post-grid button, .composer-preview {
      image-orientation: from-image;
    }
    .file-sr {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      clip-path: inset(50%);
      white-space: nowrap;
      border: 0;
      opacity: 0.01;
    }
    .err.upload-err {
      margin-top: 10px;
      padding: 12px 14px;
      border-radius: 14px;
      background: rgba(255,77,109,.16);
      border: 1px solid rgba(255,77,109,.45);
      color: #ffd0d8;
      font-weight: 600;
      line-height: 1.4;
    }
    /* multi-photo posts + composer */
    .post-carousel-wrap { position: relative; }
    .post-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .post-carousel::-webkit-scrollbar { display: none; }
    .post-carousel .slide { flex: 0 0 100%; scroll-snap-align: center; }
    .post-carousel-wrap .burst { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; color: #fff; pointer-events: none; }
    .carousel-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 700;
      padding: 4px 9px; border-radius: 999px; pointer-events: none; }
    .post-grid .multi { position: absolute; top: 4px; right: 4px; font-size: 10px; background: rgba(0,0,0,.6); padding: 2px 5px; border-radius: 6px; }
    .big-pick { position: relative; display: block; margin-top: 12px; text-align: center; padding: 26px 16px; border: 1px dashed rgba(255,92,0,.55); }
    .composer-strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
    .composer-thumb { position: relative; flex: 0 0 92px; height: 92px; border-radius: 12px; background: #111 center/cover no-repeat; }
    .composer-thumb .slot-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%;
      background: rgba(0,0,0,.7); color: #fff; font-size: 18px; line-height: 1; }
    .pick-more { position: relative; flex: 0 0 92px; height: 92px; border-radius: 12px; border: 1px dashed rgba(255,92,0,.55);
      display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--orange2); }
    .big-pick input[type=file], .pick-more input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

    .av.xs { width: 28px; height: 28px; font-size: 13px; border-width: 2px; }
    .av-stack { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 8px; }
    .av-stack .av { margin-left: -8px; border: 2px solid var(--card, #111); box-sizing: content-box; }
    .av-stack .av:first-child { margin-left: 0; }
    .av-more { display: inline-grid; place-items: center; min-width: 28px; height: 28px; margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
    .going-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .rsvp-box { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
    .rsvp-item { display: flex; align-items: center; gap: 12px; min-height: 44px; }
    .rsvp-label { font-weight: 700; }
    .meet-note-box { margin: 0 0 14px; padding: 12px; border-radius: 16px; background: rgba(255,92,0,.08); border: 1px solid rgba(255,92,0,.25); }
    .meet-chip { display: inline-block; margin-top: 6px; padding: 4px 8px; border-radius: 999px; background: rgba(255,92,0,.92); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .01em; }
    .same-show-bar { padding: 8px 14px 0; }
    .same-show-picks { padding: 8px 14px 4px; }
    .goer { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 10px; }
    .goer-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; background: transparent; color: inherit; padding: 0; min-height: 44px; }
    .goer-actions { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
    .meet-banner, .meet-plan { margin: 0 16px 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,92,0,.12); border: 1px solid rgba(255,92,0,.3); font-weight: 700; font-size: 13px; line-height: 1.35; }
    .meet-plan { font-weight: 600; background: rgba(255,92,0,.08); }
    .meet-mini { margin-top: 2px; color: var(--orange, #ff8a1a); }
    .upcoming-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
    .upcoming-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: var(--card, #161616); color: inherit; border: 1px solid var(--line, #2a2a2a); border-radius: 14px; padding: 10px 12px; min-height: 44px; }
    .toggle { min-width: 46px; }

    /* ---- Tab bar pinned at all times (iOS WKWebView / older Safari without dvh) ---- */
    :root { --tabbar-h: 64px; }
    html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
    body { position: fixed; inset: 0; width: 100%; }
    #app { height: 100vh; height: 100dvh; }
    @media (max-width: 430px) { #app { position: fixed; inset: 0; height: auto; max-height: none; } }
    .screen.has-tabs { padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
    .screen.has-tabs .tabbar { position: fixed; z-index: 45; bottom: 0; left: 50%; transform: translateX(-50%);
      width: 100%; max-width: 390px; min-height: calc(var(--tabbar-h) + var(--safe-b)); }
    @media (max-width: 430px) { .screen.has-tabs .tabbar { max-width: none; } }
    /* Bottom sheets sit above the content but leave the tab bar visible and tappable. */
    .screen.has-tabs .sheet-bg { bottom: calc(var(--tabbar-h) + var(--safe-b)); }
    .screen.has-tabs .sheet { padding-bottom: 18px; max-height: 92%; }
    .screen.has-tabs .fab-post { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); }
    .toast { bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom, 0px)); }
    /* tap target sizes */
    .post-hd .who, .post-hd > button { min-height: 44px; }
    .slot-x { min-width: 32px; min-height: 32px; }
    .slot-tools button { min-width: 34px; min-height: 34px; }
    p.tiny a, .event-detail-row a { display: inline-block; padding: 8px 2px; }


    /* Reserved space for a story ring on profile avatars (drawn by another worker). */
    .avatar-ring {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      border-radius: 50%;
      padding: 5px;
      border: 3px solid transparent;
      box-sizing: border-box;
    }
    .avatar-ring-lg { width: 128px; height: 128px; }
    .avatar-ring-lg .av, .avatar-ring-lg .prof-av { width: 112px; height: 112px; }
    .avatar-ring-sm { width: 58px; height: 58px; padding: 3px; border-width: 2px; }
    .prof-crew:empty { display: none; }
    .prof-crew { margin: 12px 0; }
    .prof-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .edit-preview-actions { display: flex; gap: 8px; margin-top: 22px; }
    .edit-preview-actions .btn { flex: 1; }
    .edit-preview-note { margin: 0 0 12px; color: var(--muted); }
    .prof-bio { margin: 10px 0 8px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; }
    .prof-chips { margin: 8px 0 10px; }
    .prof-facts { display: grid; gap: 10px; margin: 8px 0 14px; }
    .prof-fact .label { margin: 0 0 2px; }
    .prof-fact-val { font-size: 15px; line-height: 1.4; }
    .photo-strip { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0 12px; padding-bottom: 4px; }
    .photo-strip-item { flex: 0 0 96px; width: 96px; height: 128px; border-radius: 12px; background: #141414 center/cover no-repeat; display: grid; place-items: center; font-size: 28px; }
    .posts-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 8px; }
    .posts-heading .label { font-size: 15px; }
    .post-view-toggle { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
    .post-view-toggle button { width: 44px; height: 40px; border-radius: 0; font-size: 16px; color: var(--muted); background: #111; }
    .post-view-toggle button.on { color: #fff; background: rgba(255,92,0,.2); box-shadow: inset 0 0 0 1px rgba(255,92,0,.55); }
    .profile-feed { margin: 0 -14px; }
    .profile-feed .post { border-top: 1px solid var(--line); }
    .post-grid .grid-tile { aspect-ratio: 1; background: #111 center/cover no-repeat; position: relative; width: 100%; border: 0; color: inherit; }
    .grid-play { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%;
      background: rgba(0,0,0,.62); color: #fff; font-size: 9px; display: grid; place-items: center; }
    .post-video-wrap { position: relative; background: #000; }
    .post-video-wrap video { width: 100%; max-height: 70vh; display: block; background: #000; }
    .post-photos { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
    .post-photos .post-photo { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1; }
    .post-photo.post-text { display: grid; place-items: center; padding: 24px; aspect-ratio: auto; min-height: 160px; }
    .post-text-inner { font-size: 20px; font-weight: 700; line-height: 1.4; padding: 12px; text-align: center; white-space: pre-line; }
    .height-row { gap: 8px; align-items: center; }
    .height-row select, .height-row input { flex: 1; min-width: 0; }
    .composer-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
    .composer-preview-wrap { margin: 12px 0; }
    .composer-thumbs { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 8px; }
    .composer-thumb { position: relative; flex: 0 0 96px; width: 96px; height: 96px; border-radius: 12px; background: #111 center/cover no-repeat; }
    .composer-video { width: 100%; border-radius: 16px; background: #000; max-height: 50vh; display: block; margin-bottom: 8px; }
    .prof-tunes { margin: 18px 0 8px; }
    .tune-card { margin: 10px 0 14px; }
    .tune-frame { width: 100%; border: 0; border-radius: 14px; background: #111; display: block; }
    .tune-open { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; }
    .tunes-jump { margin: 4px 0 10px; }
    button.event-tag { cursor: pointer; }
    /* ---- Instagram-style Stories ---- */
    .story-bar { display: flex; gap: 12px; overflow-x: auto; padding: 8px 14px 12px; -webkit-overflow-scrolling: touch; }
    .story-bar::-webkit-scrollbar { display: none; }
    .story-ring-wrap { flex: 0 0 auto; width: 76px; position: relative; }
    .story-ring { width: 76px; text-align: center; color: inherit; background: none; padding: 0; position: relative; }
    .story-ring .ring { width: 68px; height: 68px; margin: 0 auto 6px; border-radius: 50%; padding: 3px; background: rgba(255,255,255,.18); }
    .story-ring.unseen .ring { background: linear-gradient(135deg, #ff8a1a, #ff5c00, #ffc14d); }
    .story-ring .av { width: 100%; height: 100%; border-radius: 50%; background: #111 center/cover no-repeat;
      display: grid; place-items: center; font-size: 24px; border: 2px solid #000; }
    .story-ring .nm { font-size: 11px; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .story-ring .demo-tag { font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--orange2); }
    .story-ring-wrap .plus { position: absolute; right: 2px; top: 48px; width: 22px; height: 22px; border-radius: 50%;
      background: linear-gradient(90deg, #ff8a1a, #ff5c00); color: #000; font-size: 16px; font-weight: 800; line-height: 20px;
      border: 2px solid #000; z-index: 2; }
    .av-story-ring { display: inline-flex; padding: 3px; border-radius: 50%; background: linear-gradient(135deg, #ff8a1a, #ff5c00, #ffc14d); }
    .av-story-ring .av { border-color: #000; }
    .av-story-ring.seen { background: rgba(255,255,255,.22); }

    .screen.has-tabs.story-open { padding-bottom: 0; }
    .screen.has-tabs.story-open .tabbar,
    .screen.has-tabs.story-open .fab-post { display: none !important; }

    .story-viewer { position: absolute; inset: 0; z-index: 80; background: #000; color: #fff;
      display: flex; flex-direction: column; touch-action: none; overflow: hidden; }
    .story-progs { display: flex; gap: 4px; padding: calc(8px + var(--safe-t)) 10px 8px; z-index: 3; }
    .story-prog { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.28); overflow: hidden; }
    .story-prog i { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; }
    .story-prog.done i { width: 100%; }
    .story-prog.now i { animation: storyFill linear forwards; }
    .story-viewer.paused .story-prog.now i { animation-play-state: paused; }
    @keyframes storyFill { from { width: 0; } to { width: 100%; } }

    .story-chrome { position: absolute; left: 0; right: 0; top: calc(18px + var(--safe-t)); z-index: 3;
      display: flex; align-items: center; gap: 8px; padding: 0 10px; }
    .story-chrome .who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; text-align: left; color: inherit; background: none; }
    .story-chrome .av { width: 32px; height: 32px; font-size: 14px; border-width: 0; }
    .story-chrome .nm { font-weight: 800; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
    .story-chrome .meta { font-size: 11px; color: rgba(255,255,255,.8); }
    .story-chrome .icon-btn { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.2); width: 40px; height: 40px; }

    .story-stage { flex: 1; position: relative; min-height: 0; background: #000; }
    .story-stage img, .story-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
    .story-text { position: absolute; left: 16px; right: 16px; bottom: 28%; text-align: center; font-size: 22px; font-weight: 800;
      line-height: 1.25; text-shadow: 0 2px 12px rgba(0,0,0,.8); pointer-events: none; }
    .story-event { position: absolute; left: 14px; top: calc(64px + var(--safe-t)); z-index: 2;
      background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.2); color: #fff; padding: 6px 12px;
      border-radius: 999px; font-size: 12px; font-weight: 700; }
    .story-hit { position: absolute; top: 0; bottom: 0; width: 34%; z-index: 2; background: none; }
    .story-hit.left { left: 0; }
    .story-hit.right { right: 0; width: 66%; }

    .story-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
      padding: 10px 12px calc(14px + var(--safe-b)); display: flex; align-items: center; gap: 8px; }
    .story-foot input { flex: 1; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.28); }
    .story-foot .btn { width: auto; }

    .story-preview { position: relative; width: 100%; aspect-ratio: 9/16; max-height: 46vh; border-radius: 16px; overflow: hidden;
      background: #0a0a0a center/cover no-repeat; margin-top: 10px; }
    .story-preview img, .story-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
    .story-preview .story-text { bottom: 18%; font-size: 18px; }

    .story-viewers { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; max-height: 55%;
      background: #111; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
      padding: 12px 16px calc(16px + var(--safe-b)); overflow-y: auto; }

    .avatar-ring.av-story-ring { border-color: transparent; background: linear-gradient(135deg, #ff8a1a, #ff5c00, #ffc14d); cursor: pointer; }
    .avatar-ring.av-story-ring.seen { background: rgba(255,255,255,.22); }
    /* ---- Rave Groups / Crews ---- */
    .crew-panel { margin: 8px 0 4px; padding: 12px 0 4px; }
    .crew-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
    .crew-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px;
      border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: inherit;
      min-height: 40px; font-weight: 700; font-size: 13px; max-width: 100%; }
    .crew-chip.add { border-style: dashed; border-color: rgba(255,92,0,.55); color: var(--orange2); }
    .crew-chip.bare { padding: 0; border: 0; background: none; min-height: 0; }
    .crew-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 140px; }
    .crew-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
      background: #1a1a1a center/cover no-repeat; flex-shrink: 0; font-size: 16px; }
    .crew-av.lg { width: 44px; height: 44px; font-size: 22px; }
    .crew-av.emoji { background: rgba(255,92,0,.16); }
    .crew-badge { display: inline-flex; align-items: center; gap: 4px; margin: 6px 6px 0 0;
      padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255,92,0,.4);
      background: rgba(255,92,0,.16); color: #ffd4b0; font-size: 11px; font-weight: 700; min-height: 24px; }
    .photo .who .crew-badges { margin-top: 6px; }
    .photo .who .crew-badge { background: rgba(0,0,0,.55); border-color: rgba(255,255,255,.25); color: #fff;
      text-shadow: 0 1px 4px rgba(0,0,0,.6); }
    .crew-badges { display: flex; flex-wrap: wrap; }
    .crew-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
    .crew-list-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
      padding: 10px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: inherit; min-height: 64px; }
    .crew-list-item .nm { display: block; font-weight: 800; }
    .crew-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
    .crew-hero .nm { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
    .crew-hero-av { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
      background: rgba(255,92,0,.16) center/cover no-repeat; font-size: 36px; flex-shrink: 0; border: 1px solid var(--line); }
    .left-btn { display: flex; align-items: center; text-align: left; background: none; color: inherit; border: 0; padding: 0; min-height: 44px; }
    .crew-chat { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
      padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); -webkit-overflow-scrolling: touch; }
    .crew-msg { padding: 8px 10px; border-radius: 14px; background: var(--card2); align-self: flex-start; max-width: 90%; }
    .crew-msg.me { background: rgba(255,92,0,.18); align-self: flex-end; }
    /* ---- Raver badges (Bass / Banger / Bopper) ---- */
    .raver-badge {
      display: inline-flex; align-items: center; gap: 5px;
      margin: 0 0 0 6px; padding: 2px 7px 2px 6px;
      border-radius: 999px; vertical-align: middle;
      border: 1px solid rgba(255,92,0,.55);
      background: rgba(255,92,0,.14);
      color: #ffd4b0; font-size: 10px; font-weight: 800;
      letter-spacing: .08em; text-transform: uppercase;
      line-height: 1.3; cursor: pointer;
      box-shadow: 0 0 12px rgba(255,92,0,.28);
    }
    .raver-badge .rb-ic { display: inline-block; width: 10px; height: 10px; flex: 0 0 auto; }
    .raver-badge.bass { border-color: rgba(255,193,77,.7); background: rgba(255,92,0,.22); box-shadow: 0 0 16px rgba(255,92,0,.45); }
    .raver-badge.bass .rb-ic {
      width: 12px; height: 10px;
      background:
        linear-gradient(#ffc14d,#ff5c00) 0 3px / 3px 7px no-repeat,
        linear-gradient(#fff3d0,#ff5c00) 4.5px 0 / 3px 10px no-repeat,
        linear-gradient(#ffc14d,#ff5c00) 9px 2px / 3px 8px no-repeat;
      filter: drop-shadow(0 0 4px #ff5c00);
    }
    .raver-badge.banger .rb-ic {
      width: 8px; height: 8px; margin: 0 1px;
      background: linear-gradient(135deg,#ffc14d,#ff5c00);
      transform: rotate(45deg); border-radius: 1px;
      box-shadow: 0 0 8px #ff5c00, 0 0 2px #ffc14d;
    }
    .raver-badge.bopper .rb-ic {
      width: 8px; height: 8px; border-radius: 50%;
      background: linear-gradient(135deg,#ff8a1a,#ff5c00);
      box-shadow: 0 0 8px #ff5c00;
    }
    .story { width: 78px; }
    .story .nm { display: flex; flex-direction: column; align-items: center; gap: 3px; white-space: normal; }
    .story .raver-badge { margin: 0; padding: 2px 5px; }
    .story .raver-badge .rb-nm { display: none; }
    .chat-head .nm { display: flex; align-items: center; gap: 6px; }
    .chat-head .raver-badge { flex-shrink: 0; }
    .badge-explain {
      display: block; width: 100%; text-align: left; color: inherit;
      background: rgba(255,255,255,.04); border: 1px solid var(--line);
      border-radius: 16px; padding: 12px 14px; margin-top: 10px;
    }
    .badge-explain.on { border-color: rgba(255,92,0,.55); background: rgba(255,92,0,.1); box-shadow: 0 0 18px rgba(255,92,0,.18); }
    .photo .who .raver-badge { margin-top: 4px; }

    /* ---- Genre badges ---- */
    .genre-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
    .genre-row.compact { margin-top: 2px; gap: 3px; }
    .genre-badge {
      display: inline-flex; align-items: center; gap: 4px;
      margin: 0; padding: 2px 7px 2px 5px;
      border-radius: 999px; vertical-align: middle;
      border: 1px solid rgba(255,92,0,.55);
      background: rgba(255,92,0,.14);
      color: #ffd4b0; font-size: 10px; font-weight: 800;
      letter-spacing: .04em; text-transform: uppercase;
      line-height: 1.3; cursor: pointer;
      box-shadow: 0 0 10px rgba(255,92,0,.28);
    }
    .genre-badge.compact { padding: 1px 6px 1px 4px; font-size: 9px; }
    .genre-badge .gb-ic { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
    .genre-badge .gb-ic.diamond { border-radius: 1px; transform: rotate(45deg); width: 7px; height: 7px; }
    .genre-badge .gb-ic.bars {
      border-radius: 0; width: 10px; height: 8px; background:
        linear-gradient(currentColor, currentColor) 0 3px / 2px 5px no-repeat,
        linear-gradient(currentColor, currentColor) 4px 0 / 2px 8px no-repeat,
        linear-gradient(currentColor, currentColor) 8px 2px / 2px 6px no-repeat;
      box-shadow: none; filter: drop-shadow(0 0 3px currentColor);
    }
    .genre-badge .gb-ic.ring {
      background: transparent; border: 2px solid currentColor; box-shadow: 0 0 6px currentColor;
    }
    .genre-badge .gb-ic.spark {
      border-radius: 0; width: 8px; height: 8px;
      background: currentColor;
      clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
      box-shadow: 0 0 6px currentColor;
    }
    .genre-badge .gb-ic.slash {
      border-radius: 1px; width: 8px; height: 3px; transform: rotate(-35deg);
    }
    .genre-badge .gb-nm { white-space: nowrap; }
    .genre-badge.g-dubstep, .chip.genre-pick.g-dubstep { --g: #b44aff; border-color: rgba(180,74,255,.7); color: #b44aff; background: rgba(180,74,255,.14); box-shadow: 0 0 10px rgba(180,74,255,.28); }
    .genre-badge.g-riddim, .chip.genre-pick.g-riddim { --g: #ff3d9a; border-color: rgba(255,61,154,.7); color: #ff3d9a; background: rgba(255,61,154,.14); box-shadow: 0 0 10px rgba(255,61,154,.28); }
    .genre-badge.g-bass-music, .chip.genre-pick.g-bass-music { --g: #ff5c00; border-color: rgba(255,92,0,.7); color: #ff5c00; background: rgba(255,92,0,.14); box-shadow: 0 0 10px rgba(255,92,0,.28); }
    .genre-badge.g-house, .chip.genre-pick.g-house { --g: #2ef0ff; border-color: rgba(46,240,255,.7); color: #2ef0ff; background: rgba(46,240,255,.14); box-shadow: 0 0 10px rgba(46,240,255,.28); }
    .genre-badge.g-tech-house, .chip.genre-pick.g-tech-house { --g: #1ad4c8; border-color: rgba(26,212,200,.7); color: #1ad4c8; background: rgba(26,212,200,.14); box-shadow: 0 0 10px rgba(26,212,200,.28); }
    .genre-badge.g-deep-house, .chip.genre-pick.g-deep-house { --g: #4d7cff; border-color: rgba(77,124,255,.7); color: #4d7cff; background: rgba(77,124,255,.14); box-shadow: 0 0 10px rgba(77,124,255,.28); }
    .genre-badge.g-techno, .chip.genre-pick.g-techno { --g: #e8e8e8; border-color: rgba(232,232,232,.7); color: #e8e8e8; background: rgba(232,232,232,.14); box-shadow: 0 0 10px rgba(232,232,232,.28); }
    .genre-badge.g-trance, .chip.genre-pick.g-trance { --g: #7ad0ff; border-color: rgba(122,208,255,.7); color: #7ad0ff; background: rgba(122,208,255,.14); box-shadow: 0 0 10px rgba(122,208,255,.28); }
    .genre-badge.g-dnb, .chip.genre-pick.g-dnb { --g: #b6ff3f; border-color: rgba(182,255,63,.7); color: #b6ff3f; background: rgba(182,255,63,.14); box-shadow: 0 0 10px rgba(182,255,63,.28); }
    .genre-badge.g-hardstyle, .chip.genre-pick.g-hardstyle { --g: #ff3b3b; border-color: rgba(255,59,59,.7); color: #ff3b3b; background: rgba(255,59,59,.14); box-shadow: 0 0 10px rgba(255,59,59,.28); }
    .genre-badge.g-trap, .chip.genre-pick.g-trap { --g: #ffc14d; border-color: rgba(255,193,77,.7); color: #ffc14d; background: rgba(255,193,77,.14); box-shadow: 0 0 10px rgba(255,193,77,.28); }
    .genre-badge.g-future-bass, .chip.genre-pick.g-future-bass { --g: #ff7ad9; border-color: rgba(255,122,217,.7); color: #ff7ad9; background: rgba(255,122,217,.14); box-shadow: 0 0 10px rgba(255,122,217,.28); }
    .genre-badge.g-melodic-bass, .chip.genre-pick.g-melodic-bass { --g: #ff8aa8; border-color: rgba(255,138,168,.7); color: #ff8aa8; background: rgba(255,138,168,.14); box-shadow: 0 0 10px rgba(255,138,168,.28); }
    .genre-badge.g-big-room, .chip.genre-pick.g-big-room { --g: #ffe14d; border-color: rgba(255,225,77,.7); color: #ffe14d; background: rgba(255,225,77,.14); box-shadow: 0 0 10px rgba(255,225,77,.28); }
    .genre-badge.g-progressive-house, .chip.genre-pick.g-progressive-house { --g: #3dffd0; border-color: rgba(61,255,208,.7); color: #3dffd0; background: rgba(61,255,208,.14); box-shadow: 0 0 10px rgba(61,255,208,.28); }
    .genre-badge.g-psytrance, .chip.genre-pick.g-psytrance { --g: #c8ff3f; border-color: rgba(200,255,63,.7); color: #c8ff3f; background: rgba(200,255,63,.14); box-shadow: 0 0 10px rgba(200,255,63,.28); }
    .genre-badge.g-jungle, .chip.genre-pick.g-jungle { --g: #6dff6a; border-color: rgba(109,255,106,.7); color: #6dff6a; background: rgba(109,255,106,.14); box-shadow: 0 0 10px rgba(109,255,106,.28); }
    .genre-badge.g-ukg, .chip.genre-pick.g-ukg { --g: #ffd56a; border-color: rgba(255,213,106,.7); color: #ffd56a; background: rgba(255,213,106,.14); box-shadow: 0 0 10px rgba(255,213,106,.28); }
    .genre-badge.g-hardcore, .chip.genre-pick.g-hardcore { --g: #ff4d6d; border-color: rgba(255,77,109,.7); color: #ff4d6d; background: rgba(255,77,109,.14); box-shadow: 0 0 10px rgba(255,77,109,.28); }
    .genre-badge.g-lofi, .chip.genre-pick.g-lofi { --g: #e0b08a; border-color: rgba(224,176,138,.7); color: #e0b08a; background: rgba(224,176,138,.14); box-shadow: 0 0 10px rgba(224,176,138,.28); }
    .genre-badge.g-disco-funk, .chip.genre-pick.g-disco-funk { --g: #ff7a4a; border-color: rgba(255,122,74,.7); color: #ff7a4a; background: rgba(255,122,74,.14); box-shadow: 0 0 10px rgba(255,122,74,.28); }
    .genre-badge.g-experimental, .chip.genre-pick.g-experimental { --g: #d0b0ff; border-color: rgba(208,176,255,.7); color: #d0b0ff; background: rgba(208,176,255,.14); box-shadow: 0 0 10px rgba(208,176,255,.28); }
    .genre-badge.g-afro-house, .chip.genre-pick.g-afro-house { --g: #ffb020; border-color: rgba(255,176,32,.7); color: #ffb020; background: rgba(255,176,32,.14); box-shadow: 0 0 10px rgba(255,176,32,.28); }
    .genre-badge.g-breaks, .chip.genre-pick.g-breaks { --g: #7affc8; border-color: rgba(122,255,200,.7); color: #7affc8; background: rgba(122,255,200,.14); box-shadow: 0 0 10px rgba(122,255,200,.28); }
    .genre-badge.g-midtempo, .chip.genre-pick.g-midtempo { --g: #6aa8ff; border-color: rgba(106,168,255,.7); color: #6aa8ff; background: rgba(106,168,255,.14); box-shadow: 0 0 10px rgba(106,168,255,.28); }
    .genre-badge.g-color-bass, .chip.genre-pick.g-color-bass { --g: #ff5cff; border-color: rgba(255,92,255,.7); color: #ff5cff; background: rgba(255,92,255,.14); box-shadow: 0 0 10px rgba(255,92,255,.28); }
    .genre-badge.g-edm, .chip.genre-pick.g-edm { --g: #ff8a1a; border-color: rgba(255,138,26,.7); color: #ff8a1a; background: rgba(255,138,26,.14); box-shadow: 0 0 10px rgba(255,138,26,.28); }
    .genre-badge.g-hip-hop, .chip.genre-pick.g-hip-hop { --g: #d4924a; border-color: rgba(212,146,74,.7); color: #d4924a; background: rgba(212,146,74,.14); box-shadow: 0 0 10px rgba(212,146,74,.28); }
    .chip.genre-pick { border-width: 1px; }
    .chip.genre-pick.on { background: var(--g, linear-gradient(90deg, #ff8a1a, #ff5c00)); color: #000; border-color: transparent; box-shadow: 0 0 14px color-mix(in srgb, var(--g, #ff5c00) 50%, transparent); }
    .meet-chip.genre-share { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
    .who-block { flex: 1; min-width: 0; }
    .post-hd .who-block .who { display: block; width: 100%; }
    .chat-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
    .chat-head-btn { display: flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; text-align: left; color: inherit; background: none; padding: 0; }
    .photo .who .genre-row { margin-top: 6px; }
    .story .genre-row { justify-content: center; margin-top: 2px; }
    .story .genre-badge .gb-nm { display: none; }
    .goer .genre-row, .nearby .genre-row { margin-top: 3px; }

    /* ---- Hinge/Instagram UX pass ---- */
    .icon-btn.bell { position: relative; }
    .icon-btn .badge { top: -4px; right: -4px; }
    .badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 6px; }
    .notif { display: flex; width: 100%; text-align: left; gap: 12px; padding: 12px 10px; border-radius: 14px; margin-bottom: 4px; align-items: center; min-height: 56px; }
    .notif.unread { background: rgba(255,92,0,.10); }
    .notif .dot-new { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
    .unread-pill { font-size: 10px; font-weight: 800; background: var(--orange); color: #000; padding: 2px 7px; border-radius: 999px; vertical-align: 2px; }
    .unread-text { color: var(--text); font-weight: 700; }
    .chat-head { display: flex; align-items: center; gap: 10px; min-height: 44px; }
    .av-btn { padding: 0; border-radius: 50%; flex-shrink: 0; }
    .name-btn { padding: 0; min-height: 0; }
    .set-group { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 18px; }
    .set-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 14px 16px; min-height: 52px;
      border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
    .set-row:last-child { border-bottom: 0; }
    .set-row.static { cursor: default; }
    .set-row.danger-row { color: var(--danger); }
    .skeleton .sk { display: block; background: linear-gradient(90deg, #141414, #222, #141414); background-size: 200% 100%; animation: kbar 1.2s linear infinite; border-radius: 8px; }
    .skeleton .sk-av { width: 36px; height: 36px; border-radius: 50%; }
    .skeleton .sk-line { height: 12px; width: 40%; }
    .skeleton .sk-photo { width: 100%; aspect-ratio: 1; border-radius: 0; }
    #kandi-ptr { position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 56px); transform: translate(-50%, 0);
      width: 36px; height: 36px; border-radius: 50%; background: #1c1c1c; border: 1px solid var(--line); display: grid; place-items: center;
      opacity: 0; pointer-events: none; transition: opacity .15s; }
    #kandi-ptr.on { opacity: 1 !important; transform: translate(-50%, 40px) !important; }
    .story > .av { width: 62px; height: 62px; margin: 0 auto 6px; font-size: 28px; }
    .set-row > .grow { flex: 1 1 auto; min-width: 0; }

    /* The badge explainer can open from inside chats and profiles, so it must sit above overlays. */
    .sheet-bg:has(.badge-sheet) { z-index: 70; }

    /* ---- Chat media, voice, music, disappearing ---- */
    .chat-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
    .chat-head .nm { font-weight: 800; }
    .icon-btn.ghost-btn.on, .icon-btn.ghost-btn[aria-pressed="true"] { color: #ff8a1a; background: rgba(255,92,0,.16); }
    .bubble.sys { align-self: center; max-width: 90%; background: transparent; color: var(--muted); font-size: 12px; text-align: center; padding: 6px 10px; border-radius: 0; }
    .bubble.voice, .bubble.photo, .bubble.video, .bubble.music { padding: 8px; }
    .bubble.photo, .bubble.video { max-width: 78%; }
    .bubble-cap { padding: 4px 6px 2px; }
    .bubble-meta { font-size: 11px; opacity: .8; margin-top: 4px; text-align: right; padding: 0 4px; }
    .bubble.them .bubble-meta { text-align: left; }
    .voice-row { display: flex; align-items: center; gap: 8px; min-width: 180px; }
    .voice-play { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.22); color: inherit; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
    .bubble.them .voice-play { background: rgba(255,255,255,.1); }
    .voice-wave { display: flex; align-items: center; gap: 2px; height: 28px; flex: 1; }
    .voice-wave i { display: block; width: 3px; border-radius: 2px; background: currentColor; opacity: .85; min-height: 4px; }
    .voice-dur { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 32px; }
    .chat-photo { display: block; width: 100%; max-width: 240px; max-height: 320px; object-fit: cover; border-radius: 14px; background: #111; }
    .chat-video { display: block; width: 100%; max-width: 240px; max-height: 320px; border-radius: 14px; background: #000; }
    .chat-music { width: min(280px, 78vw); border-radius: 14px; overflow: hidden; background: #111; }
    .chat-music iframe { width: 100%; border: 0; display: block; background: #111; }
    .chat-bar { align-items: center; }
    .chat-bar .icon-btn { width: 40px; height: 40px; flex-shrink: 0; }
    .chat-bar.recording { justify-content: space-between; }
    .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3b00; box-shadow: 0 0 0 6px rgba(255,59,0,.18); animation: recpulse 1s ease-in-out infinite; }
    @keyframes recpulse { 50% { opacity: .4; } }
    .rec-time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 40px; }
    .rec-hint { font-size: 12px; color: var(--muted); }
    .chat-bar.recording.cancel { background: #3a1010; }
    .chat-bar.recording.cancel .rec-hint { color: #ff8a8a; }
    .attach-menu { position: absolute; left: 10px; bottom: calc(58px + var(--safe-b)); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px; display: flex; flex-direction: column; min-width: 180px; z-index: 6; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
    .attach-menu button { text-align: left; padding: 12px 14px; border-radius: 12px; background: transparent; color: inherit; border: 0; font-weight: 700; }
    .attach-menu button:active { background: rgba(255,255,255,.06); }
    .chat-composer-wrap { position: relative; }
    .chat-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .media-lite { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.94); display: flex; flex-direction: column; }
    .media-lite img, .media-lite video { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
    .media-lite .header { background: transparent; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
    .mic-btn { touch-action: none; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
    .mic-btn.hot { background: #ff5c00; color: #fff; }

    .agree-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; text-align: left; color: var(--muted); font-size: 13px; line-height: 1.4; }
    .agree-row input { margin-top: 2px; flex: 0 0 auto; accent-color: #ff5c00; width: 18px; height: 18px; }
    .agree-row a { color: #ff8a1a; }
    [data-bg]:not([data-bg-on]) { background-color: #1a1a1a; background-size: cover; background-position: center; }
    img[loading="lazy"] { content-visibility: auto; }
.video-prep { margin-top: 8px; font-size: 13px; color: #ff8a1a; font-weight: 600; }
.chat-video-status { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 90; background: rgba(20,20,20,.95); border: 1px solid #ff5c00; border-radius: 14px; padding: 10px 14px; margin: 0; max-width: 90vw; }
.video-prep.err { color: #ff5c5c; }

/* ---- QA pass (Nov 2026) ---- */
/* Chat/crew logs are flex columns inside a scroller: never let a photo or video bubble get squashed. */
.chat-log > *, .crew-chat > * { flex-shrink: 0; }
/* Chat photo bubbles share the .photo class name with Discover cards (430px tall); undo that here. */
.bubble.photo { height: auto; display: block; overflow: visible; isolation: auto; }
.chat-media-btn { display: block; padding: 0; line-height: 0; }
/* Reserve the photo's box before it loads so lazy images don't collapse and the chat doesn't jump. */
.chat-photo { width: min(240px, 62vw); height: auto; aspect-ratio: 3 / 4; }

/* Chat overlay: one scroller (the log), composer pinned at the bottom, keyboard inset via --kb. */
.overlay.chat-overlay { overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.overlay.chat-overlay > *:not(.chat-log) { flex-shrink: 0; }
.overlay.chat-overlay .chat-log { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.chat-composer-wrap { flex-shrink: 0; padding-bottom: var(--kb, 0px); }
.overlay.chat-overlay .chat-bar { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
.chat-bar input { font-size: 16px; }
.overlay.chat-overlay input:focus, .overlay.chat-overlay textarea:focus { box-shadow: none; }
.chat-video { aspect-ratio: 3 / 4; height: auto; }
/* Hide the blurred tab bar while a chat is open so keyboard resize doesn't composite it. */
body.chat-open .tabbar { visibility: hidden; pointer-events: none; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.sheet-open .tabbar,
body.sheet-open .fab-post { display: none !important; }
body.sheet-open .screen.has-tabs { padding-bottom: 0; }
body.sheet-open .screen.has-tabs .sheet-bg { bottom: 0; }
body.sheet-open .sheet { padding-bottom: calc(18px + var(--safe-b)); }

/* Long words, links, and emoji runs wrap instead of running off the screen. */
.bubble, .bubble-cap, .prompt .a, .prof-bio, .caption, .cap, .post-text-inner, .crew-msg, .wrap-text,
.card .muted, .overlay .sub, .notif .grow, .story-text { overflow-wrap: anywhere; word-break: normal; }
.left-btn.stack { flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; }
.crew-report { color: var(--muted); text-decoration: underline; padding: 0; }
.ios-tip p b { font-weight: 700; color: var(--text, #fff); }
/* iPad / desktop: the app column runs full height so the tab bar stays attached to it. */
@media (min-width: 501px) {
  #app { max-height: none; height: 100vh; height: 100dvh; }
}
/* Phones fill the whole screen edge to edge in every orientation: no centered box, no letterboxing.
   (max-width: 430px) covers portrait iPhones; landscape iPhones are wide but short and touch-driven. */
@media (max-width: 500px), (pointer: coarse) and (max-height: 500px) {
  #app { position: fixed; inset: 0; width: 100%; max-width: none; height: auto; max-height: none; box-shadow: none; }
  .screen.has-tabs .tabbar { max-width: none; }
  /* Landscape notch sits on the left/right edge. */
  .header { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
  .tabbar { padding-left: max(6px, env(safe-area-inset-left, 0px)); padding-right: max(6px, env(safe-area-inset-right, 0px)); }
  .pad { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .chat-bar { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
}
html { height: 100%; height: -webkit-fill-available; }


    .founder-badge { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: #000; background: var(--orange); box-shadow: 0 0 10px rgba(255,92,0,.55); vertical-align: 2px; }
    .upgrade-screen .upgrade-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 4px; }
    .upgrade-screen .plan { min-width: 0; }
    .founding-spots { margin-top: 10px; font-weight: 700; }
    .founding-spots .num { color: var(--orange2); font-size: 22px; font-weight: 800; letter-spacing: -.02em; text-shadow: 0 0 12px rgba(255,92,0,.45); }
    .founding-card { border-color: rgba(255,92,0,.45); box-shadow: 0 0 0 1px rgba(255,92,0,.2); }
    @media (max-width: 380px) { .upgrade-screen .upgrade-plans { grid-template-columns: 1fr; } }
/* Instagram / Facebook buttons on a profile */
.social-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.social-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 11px 6px 9px; border-radius: 999px;
  background: rgba(255,92,0,.12); border: 1px solid rgba(255,92,0,.45); color: #ffb07a; font-size: 12px; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 12px rgba(255,92,0,.18); min-height: 32px; }
.social-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.social-btn:active { background: rgba(255,92,0,.25); }

/* Favorite song (Apple Music preview) */
.prof-song { margin: 14px 0 6px; }
.disco-song { margin: 0; }
.song-card { position: relative; display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,92,0,.14), rgba(20,20,20,.95) 55%); border: 1px solid rgba(255,92,0,.35);
  box-shadow: 0 0 18px rgba(255,92,0,.12); overflow: hidden; }
.song-card.playing { border-color: var(--orange); box-shadow: 0 0 22px rgba(255,92,0,.35); }
.song-art { position: relative; flex: 0 0 auto; width: 96px; height: 96px; border-radius: 12px; background: #1c1c1c center/cover no-repeat;
  box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.song-card.compact .song-art { width: 76px; height: 76px; }
.song-meta { flex: 1 1 auto; min-width: 0; }
.song-meta .label { margin-bottom: 4px; color: var(--orange2); }
.song-title { font-weight: 800; font-size: 16px; line-height: 1.25; color: #fff7f0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.song-artist { font-size: 13px; color: #c8b8aa; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-am { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--orange2); text-decoration: none; }
.song-am:active { opacity: .7; }
.song-progress { height: 3px; margin-top: 8px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.song-progress i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--orange2), var(--orange)); box-shadow: 0 0 8px var(--orange); }
.song-play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 0; padding: 0;
  background: rgba(0,0,0,.62); box-shadow: 0 0 0 2px var(--orange), 0 0 16px rgba(255,92,0,.6); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
.song-play.sm { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
.song-play:active { transform: scale(.94); }
.song-play .ic-play { width: 0; height: 0; margin-left: 3px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.song-play.sm .ic-play { border-width: 6px 0 6px 10px; margin-left: 2px; }
.song-play .ic-pause { display: none; width: 12px; height: 14px; border-left: 4px solid #fff; border-right: 4px solid #fff; box-sizing: border-box; }
.song-play.sm .ic-pause { width: 10px; height: 11px; border-width: 0 3px; }
.playing .song-play { background: var(--orange); box-shadow: 0 0 0 2px var(--orange2), 0 0 20px rgba(255,92,0,.8); }
.playing .song-play .ic-play { display: none; }
.playing .song-play .ic-pause { display: block; }
.song-results { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.song-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: #141414; border: 1px solid #2a1a0d; }
.song-row.playing { border-color: var(--orange); }
.song-thumb { position: relative; flex: 0 0 auto; width: 56px; height: 56px; border-radius: 10px; background: #1c1c1c center/cover no-repeat; }
.song-row-meta { min-width: 0; }
.song-row .song-title { font-size: 14px; -webkit-line-clamp: 1; }
.song-row .song-artist { font-size: 12px; }
.song-row .song-progress { margin-top: 5px; height: 2px; }
.song-card.loading .song-play::after, .song-row.loading .song-play::after { content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--orange2); animation: songspin .8s linear infinite; }
@keyframes songspin { to { transform: rotate(360deg); } }

/* Share-my-profile link */
.share-card { text-align: center; padding: 6px 2px 2px; }
.share-av { display: flex; justify-content: center; margin-top: 8px; }
.share-av .av { width: 112px; height: 112px; box-shadow: 0 0 0 3px var(--orange), 0 0 26px rgba(255,92,0,.45); }
.share-url { padding: 12px 14px; border-radius: 14px; background: #111; border: 1px solid rgba(255,92,0,.35); color: #ffb07a;
  font: 600 13px/1.4 ui-monospace, Menlo, monospace; word-break: break-all; }

.social-links.compact { gap: 10px; margin: 10px 0 4px; }
.social-btn.icon-only { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.social-btn.sp { color: #1db954; }
.artist-tiles { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
.artist-tile { width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; color: inherit; text-decoration: none; }
.artist-av { width: 56px; height: 56px; border-radius: 50%; background: #1c1c1c center/cover no-repeat; display: grid; place-items: center; border: 1px solid var(--line); }
.artist-av.letter { font-weight: 700; font-size: 18px; color: var(--orange2); }
.artist-nm { font-size: 10px; text-align: center; line-height: 1.2; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.artist-x { position: absolute; top: -4px; right: -2px; width: 22px; height: 22px; border-radius: 50%; background: #111; border: 1px solid var(--line); font-size: 14px; line-height: 1; }
.artist-results { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.artist-result { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.artist-result.on { opacity: .55; }
.disco-artists { padding: 4px 16px 8px; }

/* ---- Safety buddy check-in ---- */
.safety-dock {
  position: fixed; z-index: 44; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 390px;
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  background: #111; border-top: 1px solid rgba(255,92,0,.45);
  box-shadow: 0 -10px 28px rgba(255,92,0,.18);
  padding: 10px 14px calc(10px + env(safe-area-inset-left, 0px));
  display: flex; align-items: center; gap: 8px;
}
@media (max-width: 430px) { .safety-dock { max-width: none; } }
.safety-dock.due, .safety-dock.grace { background: #1a0c00; }
.safety-dock.missed, .safety-dock.overdue { background: #2a0800; border-top-color: #ff5c00; }
.safety-dock .grow { min-width: 0; }
.safety-dock .nm { font-weight: 700; font-size: 13px; color: #fff; }
.safety-dock .tiny { color: #ffb07a; margin-top: 1px; }
body.safety-dock-on .screen.has-tabs { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 72px); }
body.safety-dock-on .toast { bottom: calc(var(--tabbar-h) + 92px + env(safe-area-inset-bottom, 0px)); }
.safety-disclaimer { font-size: 12px; line-height: 1.45; color: var(--muted, #b9b9b9); margin: 12px 0 0; }
.safety-disclaimer a { color: var(--accent, #ff5c00); font-weight: 700; text-decoration: underline; }
.safety-card { background: var(--card, #161616); border: 1px solid rgba(255,92,0,.35); border-radius: 16px; padding: 14px; margin: 0 0 14px; }
.safety-card .nm { font-weight: 700; }
.safety-buddy { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 0; background: none; border: 0; color: inherit; }
.safety-buddy .grow { min-width: 0; }
.safety-buddy .src { font-size: 11px; color: var(--muted, #b9b9b9); }
.safety-check { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line, #333); flex: 0 0 auto; display: grid; place-items: center; }
.safety-buddy.on .safety-check { background: var(--accent, #ff5c00); border-color: var(--accent, #ff5c00); color: #000; font-weight: 800; font-size: 13px; }
.safety-help { width: 100%; margin-top: 10px; }
.btn.danger.safety-help, .btn.safety-help { background: #3a0a0a; color: #ffb4b4; border: 1px solid #ff5c5c; }
.btn.danger.safety-help:active { background: #520e0e; }
.safety-phase { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent, #ff5c00); }

/* Set-time matching */
.lineup-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.lineup-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px; border-radius: 16px; background: #111; border: 1px solid rgba(255,92,0,.28); }
.lineup-card .grow { min-width: 0; }
.lineup-artist { font-weight: 700; font-size: 15px; letter-spacing: .01em; }
.lineup-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.lineup-star { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,92,0,.4); background: #0a0a0a; color: rgba(255,255,255,.35); font-size: 20px; line-height: 1; }
.lineup-star.on { background: rgba(255,92,0,.18); border-color: var(--orange2, #ff5c00); color: #ff9a4a; }
.lineup-star:disabled { opacity: .4; }
.suggest-set { margin: 4px 0 16px; padding: 12px; border-radius: 16px; border: 1px dashed rgba(255,92,0,.35); background: #0d0d0d; }
.suggest-set .row { margin-top: 8px; gap: 8px; }
.admin-lineup-card { margin-bottom: 10px; padding: 12px; border-radius: 16px; background: #111; border: 1px solid var(--line); }
