/* ================================================================
   stationtalk.css — StationTalk voice rooms (opentalk.club/stationtalk/)
   Clubhouse-style warm cream UI, mobile-first, no framework
   ================================================================ */

/* ── Reset & tokens ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pt-bg:        #ede8dd;   /* warm cream page background */
  --pt-card:      #faf6ee;   /* card surface */
  --pt-card-2:    #f3ede0;   /* slightly darker for hover */
  --pt-border:    #e5ddd0;
  --pt-text:      #1a1a1a;
  --pt-text-2:    #555;
  --pt-muted:     #999;
  --pt-active:    #228891;   /* OpenTalk teal — joined room border */
  --pt-green:     #22c55e;   /* speaking ring / mod badge */
  --pt-fab:       #228891;   /* OpenTalk teal */
  --pt-fab-muted: #e74c3c;
  --pt-radius:    18px;
  --pt-topbar-h:  56px;
  --pt-nav-h:     60px;
  --pt-fab-size:  58px;
}

html, body {
  height: 100%;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--pt-bg);
  color: var(--pt-text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* ── Topbar ─────────────────────────────────────────────────────── */
.pt-topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--pt-topbar-h);
  background: var(--pt-bg);
  display: flex; align-items: center;
  padding: 0 16px;
  gap: 10px;
}
.pt-topbar-center {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.pt-topbar-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.pt-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.pt-logo-img {
  width: 32px; height: 32px; border-radius: 8px;
  object-fit: cover; display: block; flex-shrink: 0;
}
.pt-logo-text {
  display: none; /* shown on desktop */
  font-size: 22px; font-weight: 900;
  letter-spacing: -0.04em; color: var(--pt-text);
  line-height: 1;
}
.pt-online-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700;
  color: var(--pt-active);
  white-space: nowrap;
}
.pt-online-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--pt-green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
  animation: pt-pulse 1.8s infinite;
  flex-shrink: 0;
  display: inline-block;
}
/* Theme icon button (sun/moon — replaces iOS toggle) */
.pt-theme-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pt-card-2); border: 1.5px solid var(--pt-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--pt-text); flex-shrink: 0;
  transition: background .2s, border-color .2s, transform .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.pt-theme-btn svg { width: 17px; height: 17px; }
.pt-theme-btn:active { transform: scale(.88); }
.pt-theme-spinning { transform: rotate(180deg) scale(0.8) !important; }
.pt-user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%; object-fit: cover;
  cursor: pointer; border: none;
  background: var(--pt-border);
}
/* Primary action button — auto-inverts in dark mode */
.pt-action-btn {
  background: var(--pt-text); color: var(--pt-bg);
  border: none; border-radius: 999px;
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: opacity .15s;
}
.pt-action-btn:hover { opacity: 0.82; }
.pt-signin-btn {
  background: var(--pt-text); color: var(--pt-bg);
  border: none; border-radius: 999px;
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}

/* ── Scrollable room list ───────────────────────────────────────── */
/* Fixed container = proper scroll on both mobile and desktop. */
.st-room-list {
  position: fixed;
  top: var(--pt-topbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 12px calc(var(--pt-nav-h) + var(--pt-fab-size) + 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* ── Room card ──────────────────────────────────────────────────── */
.pt-section-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--pt-muted);
  padding: 14px 2px 6px;
}
.pt-section-label:first-child { padding-top: 6px; }
.pt-section-label--quiet { margin-top: 6px; }
.pt-section-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pt-green);
  animation: pt-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
.pt-card {
  background: var(--pt-card);
  border-radius: var(--pt-radius);
  padding: 14px;
  margin-bottom: 10px;
  border: 2px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: border-color .15s, background .12s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pt-card:active { background: var(--pt-card-2); transform: scale(.985); }
.pt-card.joined  { border-color: var(--pt-active); }
.pt-card.pt-card-quiet { opacity: 0.72; }
.pt-card.pt-card-quiet:active { opacity: 1; }
.pt-quiet-tag {
  font-size: 11.5px; color: var(--pt-muted); opacity: 0.7;
}

.pt-card-left { flex: 1; min-width: 0; }

.pt-club-row {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px;
}
.pt-club-icon {
  width: 20px; height: 20px; border-radius: 6px;
  object-fit: cover; background: var(--pt-border);
  flex-shrink: 0;
}
.pt-club-name {
  font-size: 11px; font-weight: 600; color: var(--pt-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.st-room-title {
  font-size: 15px; font-weight: 700; color: var(--pt-text);
  line-height: 1.3; margin-bottom: 4px;
  word-break: break-word;
}
.pt-card-joke {
  font-size: 11.5px; color: var(--pt-muted);
  line-height: 1.35;
  margin-bottom: 7px; opacity: 0.85;
}

.pt-live-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--pt-muted);
}
.pt-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--pt-green);
  animation: pt-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.7); }
}
.pt-live-count { color: #aaa; }
.pt-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.pt-card-tag  { font-size: 11px; color: #999; }
.st-room-title { font-size: 16px; font-weight: 800; color: var(--pt-text); line-height: 1.3; margin-bottom: 6px; word-break: break-word; }

/* ── Avatar cluster (2-D organic overlap) ───────────────────────── */
.pt-cluster {
  position: relative;
  width: 90px; height: 74px;
  flex-shrink: 0;
}
.pt-cluster .pt-thumb {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--pt-card);
  background: var(--pt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
/* 4-avatar triangular layout */
.pt-cluster .t0 { width: 42px; height: 42px; top: 0;   left: 0;   z-index: 1; }
.pt-cluster .t1 { width: 42px; height: 42px; top: 0;   left: 28px; z-index: 2; }
.pt-cluster .t2 { width: 42px; height: 42px; top: 26px; left: 8px;  z-index: 3; }
.pt-cluster .t3 { width: 46px; height: 46px; top: 22px; left: 34px; z-index: 4; } /* front */
/* 3-avatar layout */
.pt-cluster .t0.c3 { top: 4px; left: 6px; }
.pt-cluster .t1.c3 { top: 4px; left: 34px; }
.pt-cluster .t2.c3 { top: 28px; left: 20px; z-index: 3; }
/* 2-avatar layout */
.pt-cluster .t0.c2 { top: 8px; left: 4px; }
.pt-cluster .t1.c2 { top: 8px; left: 32px; }
/* 1-avatar layout */
.pt-cluster .t0.c1 { top: 12px; left: 16px; width: 46px; height: 46px; }

.pt-overflow {
  position: absolute; bottom: 0; right: 0; z-index: 5;
  background: var(--pt-border); color: var(--pt-text-2);
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
  border: 2px solid var(--pt-card);
}

/* ── Room overlay (bottom sheet) ────────────────────────────────── */
.pt-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--pt-card);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}
.pt-overlay.open { transform: translateY(0); }

.pt-overlay-handle {
  width: 40px; height: 4px;
  background: var(--pt-border); border-radius: 4px;
  margin: 12px auto 0; flex-shrink: 0;
  cursor: pointer;
}

.pt-overlay-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 0;
  flex-shrink: 0;
}
.pt-overlay-title {
  font-size: 17px; font-weight: 800;
  line-height: 1.3; flex: 1; padding-right: 12px;
}
.pt-overlay-close {
  background: var(--pt-border); border: none;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 14px; cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--pt-text-2);
}
.pt-share-btn {
  background: var(--pt-border); border: none;
  height: 30px; border-radius: 15px; padding: 0 10px; gap: 5px;
  cursor: pointer; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--pt-text-2); font-size: 12px; font-weight: 600;
  -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.pt-share-btn svg { width: 14px; height: 14px; }
.pt-share-btn:active { background: var(--pt-card-2); }

.pt-overlay-topic {
  font-size: 13px; color: var(--pt-muted);
  padding: 4px 16px 0; flex-shrink: 0;
}

/* ── Speaker stage ──────────────────────────────────────────────── */
.pt-stage {
  flex: 1; overflow-y: auto;
  padding: 16px 16px 8px;
}
.pt-stage-label {
  font-size: 11px; font-weight: 700; color: var(--pt-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.pt-speaker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 8px;
  margin-bottom: 24px;
}
.pt-speaker-tile {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.pt-speaker-wrap {
  position: relative; width: 64px; height: 64px;
}
.pt-speaker-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; background: var(--pt-border);
  border: 3px solid transparent;
  transition: border-color .1s;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff; position: relative;
  line-height: 1;
}
.pt-speaker-wrap.speaking .pt-speaker-avatar {
  border-color: var(--pt-green);
  animation: pt-speaking 1.4s ease-in-out infinite;
}
@keyframes pt-speaking {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.pt-mod-badge {
  position: absolute; bottom: 0; left: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--pt-green); color: #fff;
  font-size: 10px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--pt-card);
}
.pt-mute-badge {
  position: absolute; bottom: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #374151; color: #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--pt-card);
}
.pt-mute-badge svg { width: 11px; height: 11px; }
.pt-speaker-name {
  font-size: 11px; font-weight: 600; color: var(--pt-text);
  text-align: center;
  max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Listeners section */
.pt-listeners-section { padding: 0 0 16px; }
.pt-listener-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.pt-listener-chip {
  display: flex; align-items: center; gap: 6px;
  background: var(--pt-bg); border-radius: 999px;
  padding: 4px 10px 4px 4px; font-size: 12px; color: var(--pt-text-2);
}
.pt-listener-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  line-height: 1;
}

/* Hand queue (host view) */
.pt-hands-section { padding: 0 0 16px; }
.pt-hand-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
}
.pt-hand-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.pt-hand-name { flex: 1; font-size: 13px; font-weight: 600; }
.pt-approve-btn {
  background: var(--pt-green); color: #fff;
  border: none; border-radius: 999px;
  padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
}

/* ── Listener queue hint ─────────────────────────────────────────── */
.pt-queue-hint {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 12px; color: var(--pt-muted);
  padding: 6px 0 10px;
  font-weight: 500;
}
.pt-queue-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
  animation: pt-pulse 1.8s ease-in-out infinite;
}
.pt-hint-timer {
  color: #f59e0b; font-weight: 700; font-size: 11px;
  letter-spacing: -.2px;
}

/* Speaker → mod countdown next to Confirm Ticket label */
.pt-mod-countdown {
  font-size: 10px; font-weight: 500;
  color: var(--pt-muted); opacity: .7;
  margin-left: 5px; letter-spacing: 0;
}

/* Pull-to-refresh indicator */
.pt-ptr {
  height: 0; overflow: hidden; opacity: 0;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--pt-muted);
  transition: none;
  user-select: none; pointer-events: none;
}
.pt-ptr-icon { font-size: 17px; display: inline-block; transition: transform .25s; }
.pt-ptr-ready { color: var(--pt-active); }
.pt-ptr-ready .pt-ptr-icon { transform: rotate(180deg); }
.pt-ptr-spin .pt-ptr-icon { animation: pt-ptr-spin .7s linear infinite; }
@keyframes pt-ptr-spin { to { transform: rotate(360deg); } }

/* Listener "me" chip */
.pt-listener-chip.me {
  background: var(--pt-card-2);
  font-weight: 700;
  color: var(--pt-text);
}
.pt-listener-chip .pt-me-tag {
  font-size: 10px; color: var(--pt-muted);
  background: var(--pt-border);
  border-radius: 999px; padding: 1px 5px;
  font-weight: 600;
}

/* ── Overlay bottom bar ─────────────────────────────────────────── */
.pt-overlay-bar {
  flex-shrink: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
/* iOS audio unlock banner */
.pt-audio-unlock {
  flex-shrink: 0;
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  padding: 10px 16px;
  background: #ff6b35;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  animation: pt-pulse-unlock 1.5s ease-in-out infinite;
}
@keyframes pt-pulse-unlock {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}
/* Role badge in overlay bar */
.pt-role-badge {
  font-size: 12px; color: var(--pt-muted);
  align-self: center; flex: 1; text-align: center;
  font-weight: 600;
}
.pt-mute-btn {
  width: 58px; height: 58px;
  border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: var(--pt-green);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: pt-mic-live 2s ease-in-out infinite;
  transition: background .18s, transform .1s, box-shadow .18s, animation 0s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none; flex-shrink: 0;
}
.pt-mute-btn svg { width: 24px; height: 24px; }
.pt-mute-btn:active { transform: scale(.88); animation: none; box-shadow: none; }
.pt-mute-btn.muted {
  background: #374151;
  box-shadow: none;
  animation: none;
}
@keyframes pt-mic-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  50%       { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}
.pt-hand-btn {
  background: var(--pt-card-2); color: var(--pt-text);
  border: none; border-radius: 999px;
  padding: 14px 24px; font-size: 16px; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, transform .08s;
}
.pt-hand-btn:active { transform: scale(.96); }
.pt-hand-btn.raised { background: #fffbea; color: #b45309; }
.pt-leave-btn {
  background: var(--pt-card-2); color: var(--pt-text-2);
  border: none; border-radius: 999px;
  padding: 14px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, transform .08s;
}
.pt-leave-btn:active { transform: scale(.96); }
.pt-end-room-btn {
  background: #fee2e2; color: var(--pt-fab-muted);
  border: none; border-radius: 999px;
  padding: 14px 20px; font-size: 14px; font-weight: 600;
  cursor: pointer;
}

/* ── FAB (floating mic) ─────────────────────────────────────────── */
.pt-fab {
  position: fixed;
  bottom: calc(var(--pt-nav-h) + 10px);
  left: 50%; transform: translateX(-50%);
  width: var(--pt-fab-size); height: var(--pt-fab-size);
  border-radius: 50%; border: none;
  background: var(--pt-fab); color: #fff;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(74,144,226,.45);
  cursor: pointer; z-index: 101;
  transition: background .15s, transform .08s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  will-change: transform;
}
.pt-fab svg { width: 26px; height: 26px; }
.pt-fab.visible { display: flex; }
.pt-fab.muted   { background: var(--pt-fab-muted); }
.pt-fab:active  { transform: translateX(-50%) scale(.92); }

/* ── Bottom navigation ──────────────────────────────────────────── */
.pt-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--pt-nav-h);
  background: var(--pt-card);
  border-top: 1px solid var(--pt-border);
  display: flex; align-items: center; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}
.pt-nav-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  border-radius: 12px; color: var(--pt-muted);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color .12s, transform .08s;
}
.pt-nav-btn:active { transform: scale(.88); }
.pt-nav-btn.active { color: var(--pt-text); }
.pt-nav-btn svg { width: 24px; height: 24px; }

/* ── Create room modal ──────────────────────────────────────────── */
.pt-modal-bg {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.45);
  display: none; align-items: flex-end;
}
.pt-modal-bg.open { display: flex; }
.pt-modal {
  background: var(--pt-card); border-radius: 24px 24px 0 0;
  width: 100%; padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
}
.pt-modal-title {
  font-size: 18px; font-weight: 800; margin-bottom: 16px;
}
.pt-input {
  width: 100%; background: var(--pt-bg);
  border: 1.5px solid var(--pt-border); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; color: var(--pt-text);
  outline: none; margin-bottom: 10px;
  font-family: inherit;
}
.pt-input:focus { border-color: var(--pt-active); }
.pt-tag-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.pt-tag {
  background: var(--pt-bg); border: 1.5px solid var(--pt-border);
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pt-tag.selected { background: var(--pt-text); color: #fff; border-color: var(--pt-text); }
.pt-modal-actions {
  display: flex; gap: 10px;
}
.pt-modal-cancel {
  flex: 1; background: var(--pt-bg); border: none; border-radius: 12px;
  padding: 14px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.pt-modal-create {
  flex: 2; background: var(--pt-text); color: #fff; border: none;
  border-radius: 12px; padding: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer;
}

/* ── Auth / name-picker screen ─────────────────────────────────────────── */
.pt-auth-screen {
  position: fixed; inset: 0; z-index: 400;
  background: var(--pt-bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 28px; text-align: center;
}
.pt-auth-logo {
  width: 72px; height: 72px; border-radius: 20px; margin-bottom: 20px;
}
.pt-auth-title {
  font-size: 30px; font-weight: 900; margin-bottom: 8px; letter-spacing: -0.03em;
}
.pt-auth-sub {
  font-size: 15px; color: var(--pt-text-2); line-height: 1.55; margin-bottom: 28px;
}
.pt-name-input {
  font-size: 17px !important; text-align: center;
  letter-spacing: 0.01em; margin-bottom: 0;
}
.pt-name-input::placeholder { color: #bbb; }

/* Name chip in topbar */
.pt-name-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pt-card); border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-size: 13px; font-weight: 600; color: var(--pt-text);
  border: none; cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.pt-name-chip .pt-name-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

/* ── Empty state ────────────────────────────────────────────────── */
.pt-empty {
  text-align: center; padding: 60px 24px;
  color: var(--pt-muted); font-size: 14px; line-height: 1.6;
}
.pt-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ── Toast ──────────────────────────────────────────────────────── */
.pt-toast {
  position: fixed; bottom: calc(var(--pt-nav-h) + var(--pt-fab-size) + 12px);
  left: 50%; transform: translateX(-50%);
  background: #1a1a1a; color: #fff;
  border-radius: 999px; padding: 10px 20px;
  font-size: 13px; font-weight: 600; z-index: 500;
  opacity: 0; transition: opacity .2s;
  pointer-events: none; white-space: nowrap;
}
.pt-toast.show { opacity: 1; }

/* ── Host action badges on speakers ─────────────────────────────── */
.pt-action-badge {
  position: absolute;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--pt-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900; cursor: pointer; color: #fff;
  bottom: -2px; transition: transform .1s;
}
.pt-action-badge:hover { transform: scale(1.15); }
.pt-kick-btn { right: -2px; background: #ef4444; }
.pt-ban-btn  { left: -2px;  background: #7c3aed; }

/* Listener chip ban button (host only) */
.pt-ban-chip-btn {
  background: none; border: none;
  color: var(--pt-muted); cursor: pointer;
  font-size: 13px; padding: 0 0 0 4px; line-height: 1;
  flex-shrink: 0; opacity: 0.6;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .15s, color .15s;
}
.pt-ban-chip-btn:hover { opacity: 1; color: #7c3aed; }

/* ── Dark theme tokens ───────────────────────────────────────────── */
[data-theme="dark"] {
  --pt-bg:     #0e1116;
  --pt-card:   #161b22;
  --pt-card-2: #1d242d;
  --pt-border: #232a33;
  --pt-text:   #e6e9ef;
  --pt-text-2: #c9d1d9;
  --pt-muted:  #8b95a3;
  --pt-active: #4ab3bd;     /* brighter teal in dark mode */
  --pt-fab:    #4ab3bd;
}
[data-theme="dark"] .pt-modal { background: var(--pt-card); }
[data-theme="dark"] .pt-overlay { background: var(--pt-card); }
[data-theme="dark"] .pt-skeleton-card {
  background: linear-gradient(90deg, var(--pt-card) 0%, var(--pt-card-2) 50%, var(--pt-card) 100%);
  background-size: 936px 100%;
}
[data-theme="dark"] .pt-input,
[data-theme="dark"] .pt-textarea { background: var(--pt-card-2); color: var(--pt-text); border-color: var(--pt-border); }

/* ── Skeleton shimmer ────────────────────────────────────────────── */
@keyframes pt-shimmer {
  0%   { background-position: -468px 0; }
  100% { background-position:  468px 0; }
}
.pt-skeleton-card {
  height: 92px;
  border-radius: var(--pt-radius);
  background: linear-gradient(90deg, var(--pt-card) 0%, var(--pt-card-2) 50%, var(--pt-card) 100%);
  background-size: 936px 100%;
  animation: pt-shimmer 1.4s infinite linear;
  margin-bottom: 10px;
}

/* ── Full-screen join/create loader ──────────────────────────────── */
.pt-join-loader {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(2px);
}
.pt-join-loader.show { display: flex; }
.pt-spinner {
  width: 42px; height: 42px;
  border: 4px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pt-spin .9s linear infinite;
}
@keyframes pt-spin { to { transform: rotate(360deg); } }

/* ── Utility ────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Desktop welcome placeholder (mobile: hidden) ───────────────── */
.pt-desktop-welcome {
  display: none;
}

/* ═══════════════════════════════════════════════════════════════
   ONBOARDING TOUR  — first-visit 3-step animated tutorial
   ═══════════════════════════════════════════════════════════════ */
.pt-tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pt-tour-card {
  position: relative;
  background: var(--pt-card);
  border-radius: 28px 28px 0 0;
  width: 100%;
  max-width: 500px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 28px);
  overflow: hidden;
  animation: pt-tour-up .4s cubic-bezier(.16, 1, .3, 1);
}
@keyframes pt-tour-up {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.pt-tour-skip-btn {
  position: absolute;
  top: 16px; right: 20px;
  background: none; border: none;
  color: var(--pt-muted);
  font-size: 13px; font-weight: 700;
  cursor: pointer; padding: 6px 10px;
  font-family: inherit;
  border-radius: 8px;
  z-index: 2;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.pt-tour-skip-btn:hover { color: var(--pt-text-2); }

/* ── Art wrap (illustration area, fixed height) ── */
.pt-tour-art-wrap {
  height: 210px;
  position: relative;
  overflow: hidden;
}
.pt-tour-art {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(48px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.pt-tour-art.active  { opacity: 1; transform: translateX(0); pointer-events: auto; }
.pt-tour-art.out     { opacity: 0; transform: translateX(-48px); transition-duration: .22s; }

/* Step 1 — welcome: station with expanding rings */
.pt-tour-art[data-step="1"] {
  background: linear-gradient(160deg, rgba(34,136,145,.08) 0%, rgba(34,136,145,.02) 100%);
}
.pt-art-ring {
  position: absolute;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid var(--pt-active);
  animation: pt-ring-out 2.4s ease-out infinite;
}
.pt-art-ring.r2 { animation-delay: .6s; }
.pt-art-ring.r3 { animation-delay: 1.2s; }
@keyframes pt-ring-out {
  0%   { transform: scale(.9); opacity: .65; }
  100% { transform: scale(2.9); opacity: 0;  }
}
.pt-art-main-emoji {
  font-size: 60px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.10));
}
.pt-art-people {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}
.pt-art-person { font-size: 22px; animation: pt-float 3s ease-in-out infinite; }
.pt-art-person.p2 { animation-delay: .5s; }
.pt-art-person.p3 { animation-delay: 1s;  }
@keyframes pt-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* Step 2 — browse: floating mock station card with tap ripple */
.pt-tour-art[data-step="2"] {
  background: linear-gradient(160deg, rgba(34,197,94,.06) 0%, rgba(34,136,145,.04) 100%);
}
.pt-art-card {
  background: var(--pt-bg);
  border-radius: 18px;
  padding: 16px 20px;
  width: 270px;
  box-shadow: 0 6px 32px rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
  animation: pt-card-lift 3.5s ease-in-out infinite;
}
@keyframes pt-card-lift {
  0%, 100% { transform: translateY(0)   scale(1);    box-shadow: 0 6px 32px rgba(0,0,0,.12); }
  50%       { transform: translateY(-7px) scale(1.02); box-shadow: 0 14px 40px rgba(0,0,0,.17); }
}
.pt-art-card-h { font-weight: 900; font-size: 15px; margin-bottom: 4px; color: var(--pt-text); }
.pt-art-card-t { font-size: 12px; color: var(--pt-text-2); margin-bottom: 10px; }
.pt-art-card-m { font-size: 11px; color: var(--pt-active); font-weight: 700; }
.pt-art-card-tap {
  position: absolute;
  bottom: 14px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--pt-active);
  opacity: 0;
  animation: pt-tap 2.5s ease-in-out infinite;
}
@keyframes pt-tap {
  0%  { transform: scale(0);   opacity: .55; }
  55% { transform: scale(1.7); opacity: 0;   }
  100%{ opacity: 0; }
}

/* Step 3 — mic FAB: pulsing circle with ripple rings */
.pt-tour-art[data-step="3"] {
  background: linear-gradient(160deg, rgba(247,116,93,.07) 0%, rgba(34,136,145,.04) 100%);
}
.pt-art-fab-ring {
  position: absolute;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--pt-fab);
  opacity: 0;
  animation: pt-fab-ring 2s ease-out infinite;
}
.pt-art-fab-ring.r2 { animation-delay: .75s; }
@keyframes pt-fab-ring {
  0%   { transform: scale(1);   opacity: .38; }
  100% { transform: scale(2.8); opacity: 0;   }
}
.pt-art-fab-circle {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--pt-fab);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 24px rgba(34,136,145,.38);
  animation: pt-fab-breathe 2.2s ease-in-out infinite;
}
@keyframes pt-fab-breathe {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.09); }
}
.pt-art-fab-hint {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--pt-muted);
  letter-spacing: .02em;
  animation: pt-hint-blink 2s ease-in-out infinite;
}
@keyframes pt-hint-blink {
  0%, 100% { opacity: .4; }
  50%       { opacity: 1;  }
}

/* ── Text slides ── */
.pt-tour-body {
  padding: 8px 28px 0;
  min-height: 108px;
  position: relative;
}
.pt-tour-slide {
  position: absolute;
  inset: 0;
  padding: 8px 0;
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  pointer-events: none;
}
.pt-tour-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}
.pt-tour-slide.out { opacity: 0; transform: translateX(-32px); transition-duration: .22s; }
.pt-tour-h {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: var(--pt-text);
  margin: 0 0 8px;
  line-height: 1.2;
}
.pt-tour-p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--pt-text-2);
  margin: 0;
}

/* ── Footer: dots + CTA ── */
.pt-tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 0;
}
.pt-tour-dots { display: flex; gap: 7px; align-items: center; }
.pt-tdot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pt-border);
  transition: all .3s cubic-bezier(.16, 1, .3, 1);
  flex-shrink: 0;
}
.pt-tdot.active { background: var(--pt-active); width: 24px; border-radius: 4px; }
.pt-tour-cta {
  background: var(--pt-fab);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -.02em;
  transition: transform .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.pt-tour-cta:active { transform: scale(.93); opacity: .82; }

[data-theme="dark"] .pt-tour-card  { background: var(--pt-card);   }
[data-theme="dark"] .pt-art-card   { background: var(--pt-card-2); }

/* ── Mic nudge tooltip (floats above FAB on first speaker entry) ── */
.pt-mic-nudge {
  position: fixed;
  bottom: calc(var(--pt-nav-h) + var(--pt-fab-size) + 18px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--pt-text);
  color: var(--pt-bg);
  border-radius: 22px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  z-index: 510;
  box-shadow: 0 6px 28px rgba(0,0,0,.22);
  pointer-events: none;
  animation: pt-nudge-in .4s cubic-bezier(.16, 1, .3, 1);
}
.pt-mic-nudge-icon { display: inline-block; animation: pt-nudge-bob .8s ease-in-out infinite; }
@keyframes pt-nudge-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);    }
}
@keyframes pt-nudge-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* Desktop: center tour card */
@media (min-width: 768px) {
  .pt-tour-overlay { align-items: center; }
  .pt-tour-card    { border-radius: 28px; max-width: 460px; padding-bottom: 32px; }
}

/* ═══════════════════════════════════════════════════════════════
   DESKTOP LAYOUT  ≥ 768 px  —  Clubhouse-style two-column
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  :root {
    --pt-topbar-h:  64px;
    --pt-sidebar-w: 400px;
  }

  /* ── Topbar ── */
  .pt-topbar {
    padding: 0 36px;
    background: var(--pt-bg);
  }
  .pt-logo { gap: 10px; }
  .pt-logo-img { width: 36px; height: 36px; border-radius: 10px; }
  .pt-logo-text { display: block; font-size: 26px; }
  .st-room-list {
    position: fixed;
    top: var(--pt-topbar-h);
    left: auto;
    right: 0;
    width: var(--pt-sidebar-w);
    bottom: 0;
    padding: 16px 16px 24px;
    overflow-y: auto;
    background: var(--pt-bg);
  }

  /* ── Left panel — overlay becomes a floating card ── */
  .pt-overlay {
    position: fixed;
    top:    calc(var(--pt-topbar-h) + 20px);
    left:   20px;
    right:  calc(var(--pt-sidebar-w) + 20px);
    bottom: 20px;
    width: auto;
    border-radius: 24px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, .10);
    /* disable slide-up animation on desktop */
    transform: none !important;
    transition: opacity .18s;
    opacity: 0;
    pointer-events: none;
  }
  .pt-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  /* No swipe handle on desktop */
  .pt-overlay-handle { display: none; }

  /* ── Desktop welcome (shown when not in a room) ── */
  .pt-desktop-welcome {
    display: flex;
    position: fixed;
    top:    var(--pt-topbar-h);
    left:   0;
    right:  var(--pt-sidebar-w);
    bottom: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .pt-dw-inner { max-width: 320px; }

  /* ── FAB — float in left panel area ── */
  .pt-fab {
    left:      auto;
    right:     calc(var(--pt-sidebar-w) + 32px);
    bottom:    40px;
    transform: none;
  }

  /* ── No bottom nav on desktop ── */
  .pt-nav { display: none; }

  /* ── Toast: clear of nav ── */
  .pt-toast {
    bottom: 40px;
  }

  /* ── Modals: centered dialog ── */
  .pt-modal-bg {
    align-items: center;
    justify-content: center;
  }
  .pt-modal {
    width: 480px;
    max-width: 90vw;
    border-radius: 24px;
  }
}

/* ── Interest filter strip ────────────────────────────────────────────── */
.pt-filter-strip {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto; padding: 8px 0 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pt-filter-strip::-webkit-scrollbar { display: none; }
.pt-filter-chip {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--pt-border);
  font-size: 13px; font-weight: 600;
  color: var(--pt-text-2);
  background: var(--pt-card);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}
.pt-filter-chip:active { transform: scale(.93); }
.pt-filter-chip.active {
  background: var(--pt-active);
  color: #fff;
  border-color: var(--pt-active);
}
.pt-filter-label {
  font-size: 11px; font-weight: 700; color: var(--pt-muted);
  letter-spacing: .06em; text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Inline search bar ───────────────────────────────────────────────── */
.pt-search-wrap {
  position: relative; padding: 4px 0 8px;
}
.pt-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 12px;
  border: 1.5px solid var(--pt-border);
  background: var(--pt-card);
  color: var(--pt-text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.pt-search-input::placeholder { color: var(--pt-muted); }
.pt-search-input:focus { border-color: var(--pt-active); }
.pt-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  pointer-events: none; opacity: .5;
  display: flex; align-items: center;
}
.pt-search-icon svg { width: 16px; height: 16px; }
[data-theme="dark"] .pt-search-input { background: var(--pt-card-2); border-color: var(--pt-border); }

/* ── Station card refinements ────────────────────────────────────────── */
.pt-card-quiet {
  opacity: .6;
}
.pt-card-quiet .pt-live-tag { display: none; }
.pt-quiet-tag {
  font-size: 12px; color: var(--pt-muted);
  display: flex; align-items: center; gap: 4px;
}
.pt-station-loc {
  font-size: 11px; color: var(--pt-muted); margin-bottom: 2px;
  letter-spacing: .02em; text-transform: uppercase;
}
.pt-mod-badge-v2 {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #f59e0b;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1;
  border: 1.5px solid var(--pt-card);
}

/* ── Tappable tiles / chips (mod long-press UX) ─────────────────────────── */
.pt-tappable { cursor: pointer; }
.pt-speaker-tile.pt-tappable:active .pt-speaker-wrap { opacity: 0.65; }
.pt-listener-chip.pt-tappable:active { opacity: 0.65; }

/* ── Shared bottom-sheet backdrop ───────────────────────────────────────── */
.pt-sheet-bg {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
}
.pt-sheet-bg.hidden { display: none !important; }
.pt-sheet-handle {
  width: 36px; height: 4px; border-radius: 4px;
  background: var(--pt-border);
  margin: 10px auto 0; flex-shrink: 0;
}
@keyframes pt-sheet-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* ── Promo sheet (Clubhouse-style speaker / mod offer) ──────────────────── */
.pt-promo-sheet {
  width: 100%; max-width: 520px;
  background: var(--pt-card);
  border-radius: 28px 28px 0 0;
  padding: 0 24px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  animation: pt-sheet-up .3s cubic-bezier(.34,1.26,.64,1);
  display: flex; flex-direction: column;
}
.pt-ps-icon {
  font-size: 56px; display: block;
  margin: 24px auto 14px;
  filter: drop-shadow(0 4px 16px rgba(34,136,145,.28));
}
.pt-ps-title {
  font-size: 22px; font-weight: 900; letter-spacing: -.03em;
  color: var(--pt-text); line-height: 1.2; margin-bottom: 8px;
}
.pt-ps-sub {
  font-size: 14px; color: var(--pt-text-2);
  line-height: 1.55; margin-bottom: 22px;
}
.pt-ps-actions { display: flex; flex-direction: column; gap: 10px; }
.pt-ps-accept {
  width: 100%; padding: 17px;
  background: var(--pt-active); color: #fff;
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: opacity .12s; touch-action: manipulation;
}
.pt-ps-accept:active { opacity: .82; }
.pt-ps-decline {
  width: 100%; padding: 17px;
  background: var(--pt-bg); color: var(--pt-text-2);
  border: none; border-radius: 14px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  transition: background .12s; touch-action: manipulation;
}
.pt-ps-decline:hover { background: var(--pt-card-2); }
[data-theme="dark"] .pt-ps-decline { background: var(--pt-card-2); }
[data-theme="dark"] .pt-ps-decline:hover { background: var(--pt-border); }

/* ── Person action sheet (Clubhouse-style mod controls) ─────────────────── */
.pt-action-sheet {
  width: 100%; max-width: 520px;
  background: var(--pt-card);
  border-radius: 24px 24px 0 0;
  padding: 0 0 calc(10px + env(safe-area-inset-bottom));
  animation: pt-sheet-up .22s cubic-bezier(.32,.72,0,1);
  display: flex; flex-direction: column;
}
.pt-as-header {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--pt-border);
}
.pt-as-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
}
.pt-as-info { min-width: 0; }
.pt-as-name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 3px; }
.pt-as-role { font-size: 13px; color: var(--pt-muted); font-weight: 500; }
.pt-as-actions { padding: 8px 12px 4px; }
.pt-as-btn {
  width: 100%; background: none; border: none;
  padding: 13px 10px; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  color: var(--pt-text); text-align: left;
  display: flex; align-items: center; gap: 14px;
  transition: background .12s, transform .08s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.pt-as-btn:hover { background: var(--pt-bg); }
.pt-as-btn:active { background: var(--pt-card-2); transform: scale(.98); }
.pt-as-btn.danger { color: #ef4444; }
.pt-as-btn.danger:hover { background: #fee2e2; }
[data-theme="dark"] .pt-as-btn.danger:hover { background: rgba(239,68,68,.18); }
.pt-as-btn-icon {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--pt-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.pt-as-btn.danger .pt-as-btn-icon { background: #fee2e2; }
[data-theme="dark"] .pt-as-btn.danger .pt-as-btn-icon { background: rgba(239,68,68,.18); }
.pt-as-cancel {
  width: calc(100% - 24px); margin: 4px 12px;
  background: var(--pt-bg); border: none; border-radius: 12px;
  padding: 15px; font-size: 15px; font-weight: 700;
  cursor: pointer; color: var(--pt-text-2);
  touch-action: manipulation; transition: background .12s;
}
.pt-as-cancel:hover { background: var(--pt-card-2); }
@media (min-width: 768px) {
  .pt-promo-sheet { border-radius: 28px; margin: 0 auto 40px; }
  .pt-action-sheet { border-radius: 24px; margin: 0 auto 40px; }
  .pt-sheet-bg { align-items: center; }
}

/* ── Gender picker modal ─────────────────────────────────────────── */
.pt-onboard-modal {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.pt-onboard-modal.hidden { display: none; }
.pt-onboard-sheet {
  width: 100%; max-width: 520px;
  background: var(--pt-bg);
  border-radius: 28px 28px 0 0;
  padding: 32px 24px calc(40px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .pt-onboard-modal { align-items: center; }
  .pt-onboard-sheet { border-radius: 28px; max-width: 420px; }
}
.pt-onboard-title { font-size: 26px; font-weight: 900; margin-bottom: 6px; letter-spacing: -.03em; }
.pt-onboard-sub   { font-size: 14px; color: var(--pt-text-2); margin-bottom: 28px; line-height: 1.5; }
/* Gender option buttons */
.pt-gender-row {
  display: flex; gap: 14px;
}
.pt-gender-btn {
  flex: 1; padding: 28px 16px;
  background: var(--pt-card);
  border: 2px solid var(--pt-border);
  border-radius: 20px;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  cursor: pointer;
  transition: border-color .15s, background .12s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pt-gender-btn:hover { border-color: var(--pt-active); background: var(--pt-card-2); }
.pt-gender-btn:active { transform: scale(.96); }
.pt-gender-emoji { font-size: 42px; line-height: 1; display: block; }
.pt-gender-label {
  font-size: 16px; font-weight: 700;
  color: var(--pt-text); letter-spacing: -.01em;
}
[data-theme="dark"] .pt-onboard-sheet { background: var(--pt-card); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* NEW FEATURES — Session 4                                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ── Region filter strip (North / South / East / West / Central) ──────────── */
.pt-region-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 0 12px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;   /* tells iOS this container only scrolls horizontally */
  scrollbar-width: none;
}
.pt-region-strip::-webkit-scrollbar { display: none; }

.pt-region-btn {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--pt-border);
  background: var(--pt-card);
  color: var(--pt-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .02em;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pt-region-btn.active {
  background: var(--pt-text);
  color: var(--pt-bg);
  border-color: var(--pt-text);
}
.pt-region-btn:active { transform: scale(.93); }

[data-theme="dark"] .pt-region-btn.active {
  background: var(--pt-active);
  border-color: var(--pt-active);
  color: #fff;
}

/* ── Card subtitle: City · State ─────────────────────────────────────────── */
.pt-card-subtitle {
  font-size: 10px;
  font-weight: 800;
  color: var(--pt-muted);
  opacity: 0.72;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 3px;
}

/* ── Card speaker line: "Rahul is talking" ───────────────────────────────── */
.pt-card-speaker {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--pt-text-2);
  margin-bottom: 4px;
}
.pt-card-speaker-more {
  font-weight: 500;
  color: var(--pt-muted);
  font-size: 11px;
}

/* ── Undo-leave toast (5-second Rejoin strip) ─────────────────────────────── */
.pt-undo-toast {
  position: fixed;
  bottom: calc(var(--pt-nav-h, 60px) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--pt-text);
  color: var(--pt-bg);
  border-radius: 999px;
  padding: 10px 10px 10px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 28px rgba(0, 0, 0, .24);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.pt-undo-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.pt-undo-rejoin-btn {
  background: var(--pt-active);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.pt-undo-rejoin-btn:active { opacity: .82; }

/* Desktop — undo toast above the sidebar footer, not bottom nav */
@media (min-width: 768px) {
  .pt-region-strip {
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 10px;
  }
  .pt-undo-toast {
    bottom: 24px;
    /* Centre within the right sidebar (400 px wide) */
    left: calc(100vw - var(--pt-sidebar-w, 400px) / 2);
  }
}

