/* ── Crews / Groups ───────────────────────────────────── */
/* Accent RGB channel variable — allows rgba(var(--accent-rgb), alpha) */
:root { --accent-rgb: 124,156,255; }

.crew-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.crew-modal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; width: 94vw; max-width: 460px; max-height: 85vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.crew-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.crew-header .crew-back-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 4px;
}
.crew-header .crew-back-btn:hover { color: var(--text); }
.crew-header .crew-title {
  flex: 1; margin: 0; font-size: 18px; font-weight: 600;
}
.crew-header .crew-create-btn {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: 10px; padding: 6px 14px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.crew-header .crew-create-btn:hover { filter: brightness(1.1); }
.crew-header .crew-close-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 4px;
}
.crew-header .crew-close-btn:hover { color: var(--text); }

/* Crew list */
.crew-list-view { flex: 1; overflow-y: auto; padding: 8px 0; }
.crew-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.crew-card:hover { background: rgba(var(--accent-rgb),.05); }
.crew-card-emoji {
  font-size: 28px; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(var(--accent-rgb),.1); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.crew-card-info { flex: 1; min-width: 0; }
.crew-card-name { font-size: 15px; font-weight: 600; }
.crew-card-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* Empty state */
.crew-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.crew-empty-emoji { font-size: 40px; margin-bottom: 8px; }
.crew-empty-icon { margin-bottom: 12px; opacity: .9; }
.crew-start-btn {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: 10px; padding: 10px 24px; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.crew-start-btn:hover { filter: brightness(1.1); }

/* Detail view */
.crew-detail-view {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
}
/* When chat panel is active, prevent parent scroll so chat fills available height */
.crew-detail-view:has(.cd-panel[data-panel="chat"].active) {
  overflow-y: hidden;
}
.crew-detail-header {
  padding: 20px 16px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.crew-detail-emoji { font-size: 40px; margin-bottom: 8px; }
.crew-detail-header h3 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.crew-detail-header p { font-size: 13px; color: var(--muted); margin: 0; }

/* Members */
.crew-members { padding: 12px 16px; }
.crew-members h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 0 0 10px;
}
.crew-member-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
  border-radius: 8px;
  transition: background .15s, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.crew-member-row:hover {
  background: rgba(255,255,255,.04);
  transform: translateX(4px);
}
.crew-member-name { font-size: 14px; font-weight: 500; flex: 1; }
.crew-admin-badge {
  font-size: 10px; color: var(--accent); font-weight: 600;
}

/* Invite section */
.crew-invite-section {
  padding: 12px 16px; border-top: 1px solid var(--border);
}
.crew-invite-section h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 0 0 8px;
}
.crew-invite-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
}
.crew-invite-btn {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: 8px; padding: 5px 12px; font-size: 11px;
  font-weight: 700; cursor: pointer; font-family: inherit;
  margin-left: auto;
}
.crew-invite-btn:hover { filter: brightness(1.1); }

/* Crew chat */
.crew-chat {
  flex: 1; display: flex; flex-direction: column;
  border-top: 1px solid var(--border);
}
.crew-chat-msgs {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 120px;
}
.crew-chat-input {
  display: flex; gap: 8px; padding: 10px 14px;
  border-top: 1px solid var(--border);
}
.crew-chat-input input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text); padding: 10px 16px;
  font-size: 14px; outline: none; font-family: inherit;
}
.crew-chat-input input:focus { border-color: var(--accent); }
.crew-chat-input button {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: 50%; width: 38px; height: 38px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.crew-chat-input button:hover { filter: brightness(1.1); }

/* Create form */
.crew-create-view {
  flex: 1; overflow-y: auto;
}
.crew-form {
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.crew-label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.crew-form .crew-input {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); padding: 10px 14px;
  font-size: 14px; outline: none; font-family: inherit;
}
.crew-form .crew-input:focus { border-color: var(--accent); }
.crew-emoji-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.crew-emoji-opt {
  width: 40px; height: 40px; border-radius: 10px;
  border: 2px solid var(--border); background: none;
  font-size: 20px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: border-color .15s, background .15s;
}
.crew-emoji-opt.selected {
  border-color: var(--accent); background: rgba(var(--accent-rgb),.1);
}
/* Gradient picker swatches */
.crew-gradient-picker {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.crew-gradient-swatch {
  width: 40px; height: 28px; border-radius: 8px;
  border: 2px solid var(--border); cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.crew-gradient-swatch:hover { transform: scale(1.1); }
.crew-gradient-swatch.selected {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb),.3);
}
.crew-save-btn {
  flex: 1; background: var(--accent); color: var(--bg); border: none;
  border-radius: 10px; padding: 12px; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}
.crew-save-btn:hover { filter: brightness(1.1); }
.crew-cancel-btn {
  flex: 1; background: var(--border); color: var(--muted); border: none;
  border-radius: 10px; padding: 12px; font-size: 14px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}

/* ═══════════════════════════════════════════════════════════
   Full-Page Crews View
   ═══════════════════════════════════════════════════════════ */

.crews-page {
  padding: 72px 20px 100px;
  max-width: 900px;
  margin: 0 auto;
  background: transparent;
  min-height: 100dvh;
}
/* Invite landing page goes full-bleed */
.crews-page:has(.crew-invite-landing) {
  max-width: 100%;
  padding: 0;
}
/* Detail page becomes full-screen utility app */
.crews-page.crew-fullscreen {
  max-width: 100%;
  padding: 0;
  padding-top: calc(60px + env(safe-area-inset-top, 0px));
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
}
.crews-page-loading { padding: 60px 0; }

/* ── Crews Planet+Orbit Loader ── */
.crews-planet-loader {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; width: 100%;
}
.crews-planet-spinner {
  position: relative;
  width: 64px; height: 64px;
}
/* Planet in center */
.crews-planet-spinner::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ec4899, #a855f7);
  box-shadow: 0 0 12px rgba(168,139,250,.5);
}
/* Orbit ring */
.crews-planet-spinner::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(168,139,250,.3);
}
/* Orbiting dot */
.crews-orbit-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 56px; height: 56px;
  transform: translate(-50%, -50%);
  animation: crewsOrbit 1.8s linear infinite;
}
.crews-orbit-dot::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 7px; height: 7px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(135deg, #7c9cff, #22d3ee);
  box-shadow: 0 0 8px rgba(124,156,255,.7);
}
@keyframes crewsOrbit { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ── Back button (shared — hidden on detail page, topbar replaces it) ── */
.crews-detail-page > .crews-page-back { display: none; }
.crews-page-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px 8px 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
  margin-bottom: 20px;
}
.crews-page-back:hover {
  border-color: var(--accent); background: var(--accent-dim); color: var(--accent);
}

/* ── Splash / Onboarding ─────────────────────────────── */
.crews-splash {
  position: relative;
  text-align: center;
  padding: 20px 0 40px;
  overflow: hidden;
}
.crews-splash-glow {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.10) 0%, rgba(139,92,246,.04) 50%, transparent 80%);
  pointer-events: none;
  filter: blur(20px);
}
.crews-splash-content {
  position: relative; z-index: 1;
}
.crews-splash-emoji {
  font-size: 64px; margin-bottom: 16px;
  animation: crewsBounce 2s ease-in-out infinite;
}
@keyframes crewsBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.crews-splash-title {
  font-size: 32px; font-weight: 800; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #7c9cff 50%, #a78bfa 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.crews-splash-sub {
  font-size: 16px; color: var(--muted); margin-bottom: 36px;
  max-width: 360px; margin-left: auto; margin-right: auto;
}
.crews-splash-features {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 380px; margin: 0 auto 36px;
  text-align: left;
}
.crews-splash-feat {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .2s, background .2s, transform .2s;
}
.crews-splash-feat:hover {
  border-color: rgba(139,92,246,.3);
  background: rgba(139,92,246,.06);
  transform: translateY(-2px);
}
.crews-feat-icon { font-size: 24px; flex-shrink: 0; margin-top: 2px; }
.crews-splash-feat strong {
  font-size: 14px; font-weight: 700; display: block; margin-bottom: 2px;
}
.crews-splash-feat p {
  font-size: 13px; color: var(--muted); margin: 0; line-height: 1.4;
}
.crews-splash-cta {
  padding: 14px 40px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: var(--bg); border: none; border-radius: 14px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  transition: filter .2s, transform .2s;
  box-shadow: 0 4px 24px rgba(139,92,246,.25);
}
.crews-splash-cta:hover { filter: brightness(1.1); transform: translateY(-1px); }
.crews-splash-hint {
  font-size: 13px; color: var(--muted); margin-top: 12px;
}

/* ── Crews Pitch / Splash — upgraded for guests ─────── */
.cp-hero {
  text-align: center;
  margin-bottom: 32px;
}
.cp-hero-emoji {
  font-size: 56px;
  margin-bottom: 14px;
}

/* Animated solar system icon */
.cp-orbit-icon {
  position: relative; width: 80px; height: 80px; margin: 0 auto 16px;
}
.cp-orbit-icon .cp-orbit-ring {
  position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.cp-orbit-icon .cp-orbit-ring--1 { width: 40px; height: 40px; }
.cp-orbit-icon .cp-orbit-ring--2 { width: 60px; height: 60px; }
.cp-orbit-icon .cp-orbit-ring--3 { width: 80px; height: 80px; }
.cp-orbit-icon .cp-orbit-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 10px; height: 10px; background: #fff; border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,.4);
}
.cp-orbit-icon .cp-orbit-user {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.7);
}
.cp-orbit-user--1 { animation: cpOrbit1 4s linear infinite; }
.cp-orbit-user--2 { animation: cpOrbit2 6s linear infinite; }
.cp-orbit-user--3 { animation: cpOrbit3 8s linear infinite; }
.cp-orbit-user--4 { animation: cpOrbit4 5s linear infinite; }
@keyframes cpOrbit1 {
  from { transform: rotate(0deg) translateX(20px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(20px) rotate(-360deg); }
}
@keyframes cpOrbit2 {
  from { transform: rotate(90deg) translateX(30px) rotate(-90deg); }
  to   { transform: rotate(450deg) translateX(30px) rotate(-450deg); }
}
@keyframes cpOrbit3 {
  from { transform: rotate(200deg) translateX(40px) rotate(-200deg); }
  to   { transform: rotate(560deg) translateX(40px) rotate(-560deg); }
}
@keyframes cpOrbit4 {
  from { transform: rotate(45deg) translateX(30px) rotate(-45deg); }
  to   { transform: rotate(405deg) translateX(30px) rotate(-405deg); }
}

/* Crew search box on splash */
.cp-search-wrap {
  position: relative; max-width: 340px; margin: 0 auto;
}
.cp-search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,.35); pointer-events: none;
}
.cp-search-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 16px 12px 40px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  color: #fff; font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
}
.cp-search-input::placeholder { color: rgba(255,255,255,.35); }
.cp-search-input:focus {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
}
.cp-search-results {
  margin-top: 8px; text-align: left;
}
.cp-hero-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 10px;
  color: #fff;
}
.cp-hero-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Feature Buttons — Interactive Grid with RGB Glow ─────── */
.cp-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto 36px;
}
.cp-btn {
  position: relative;
  cursor: pointer;
  border-radius: 18px;
  overflow: visible;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.cp-btn:hover { transform: scale(1.05) translateY(-4px); }
.cp-btn:active { transform: scale(.98); }

/* RGB glow layer */
.cp-btn-glow {
  position: absolute;
  inset: -14px;
  border-radius: calc(18px + 14px);
  background:
    radial-gradient(ellipse 100px 80px at 20% 30%, rgba(255,179,71,.3), transparent 70%),
    radial-gradient(ellipse 80px 100px at 80% 70%, rgba(255,107,157,.25), transparent 70%),
    radial-gradient(ellipse 70px 90px at 50% 20%, rgba(196,113,237,.2), transparent 70%),
    radial-gradient(ellipse 90px 70px at 70% 40%, rgba(124,156,255,.2), transparent 70%);
  filter: blur(18px);
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
  z-index: -1;
  animation: cpGlowDrift 6s ease-in-out infinite alternate;
}
.cp-btn:hover .cp-btn-glow { opacity: .55; }

@keyframes cpGlowDrift {
  0%   { background-position: 0% 0%, 100% 100%, 50% 0%, 80% 50%; }
  100% { background-position: 60% 80%, 30% 20%, 80% 60%, 20% 70%; }
}

/* Inner card body */
.cp-btn-inner {
  position: relative;
  background: rgba(10, 14, 24, .88);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  padding: 20px 16px 18px;
  text-align: center;
  overflow: hidden;
  transition: border-color .4s ease, box-shadow .4s ease;
}
.cp-btn:hover .cp-btn-inner {
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05);
}

/* Holographic border on hover */
.cp-btn-inner::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: calc(18px + 1.5px);
  padding: 1.5px;
  background:
    radial-gradient(ellipse 60% 80% at 20% 30%, rgba(255,179,71,.45), transparent 65%),
    radial-gradient(ellipse 55% 70% at 80% 60%, rgba(255,107,157,.35), transparent 65%),
    radial-gradient(ellipse 50% 65% at 50% 80%, rgba(196,113,237,.3), transparent 65%);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
  animation: cpHoloBorder 6s ease-in-out infinite alternate;
}
.cp-btn:hover .cp-btn-inner::after { opacity: .5; }

@keyframes cpHoloBorder {
  0%   { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* Icon */
.cp-btn-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 10px;
  color: var(--text, #f0f2f8);
  opacity: .8;
  transition: opacity .3s;
}
.cp-btn:hover .cp-btn-icon { opacity: 1; }
.cp-btn-icon svg { width: 100%; height: 100%; }

.cp-btn-inner strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #f0f2f8);
  margin-bottom: 4px;
}
.cp-btn-inner p {
  font-size: 12px;
  color: var(--muted, #7b8ba5);
  margin: 0;
  line-height: 1.4;
}

/* ── Mini Preview Animations ──────────────────────────────── */
.cp-btn-preview {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height .4s cubic-bezier(.2,.8,.2,1), opacity .35s ease, margin .4s ease;
  margin-bottom: 0;
}
.cp-btn:hover .cp-btn-preview {
  height: 56px;
  opacity: 1;
  margin-bottom: 10px;
}

/* Squad — bouncing avatars */
.cp-prev-squad {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 6px;
}
.cp-prev-av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--av-color);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  opacity: 0;
  transform: scale(0) translateY(10px);
  transition: none;
}
.cp-btn:hover .cp-prev-av {
  animation: cpAvPop .45s cubic-bezier(.2,.8,.2,1) var(--av-delay) forwards;
}
.cp-prev-av--plus {
  font-size: 11px;
  color: var(--muted, #7b8ba5);
  border: 1.5px dashed rgba(255,255,255,.15);
  background: transparent;
}
@keyframes cpAvPop {
  0%   { opacity: 0; transform: scale(0) translateY(10px); }
  60%  { opacity: 1; transform: scale(1.15) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Chat — sliding messages */
.cp-prev-chat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 8px;
}
.cp-prev-msg {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  max-width: 75%;
  opacity: 0;
  white-space: nowrap;
}
.cp-prev-msg--l {
  background: rgba(124,156,255,.2);
  color: #a5bfff;
  align-self: flex-start;
  transform: translateX(-20px);
}
.cp-prev-msg--r {
  background: rgba(255,107,157,.15);
  color: #ffb0c8;
  align-self: flex-end;
  transform: translateX(20px);
}
.cp-btn:hover .cp-prev-msg {
  animation: cpMsgSlide .35s cubic-bezier(.2,.8,.2,1) var(--msg-delay) forwards;
}
@keyframes cpMsgSlide {
  0%   { opacity: 0; transform: translateX(var(--msg-dir, -20px)); }
  100% { opacity: 1; transform: translateX(0); }
}
.cp-prev-msg--r { --msg-dir: 20px; }
.cp-prev-msg--l { --msg-dir: -20px; }

/* Mission — growing progress bars */
.cp-prev-mission {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 10px;
}
.cp-prev-bar {
  height: 14px;
  border-radius: 7px;
  background: rgba(255,255,255,.06);
  overflow: hidden;
  position: relative;
}
.cp-prev-bar span {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  z-index: 1;
  opacity: 0;
}
.cp-prev-bar::after {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0;
  border-radius: 7px;
  background: var(--bar-color);
  opacity: .5;
  transition: none;
}
.cp-btn:hover .cp-prev-bar::after {
  animation: cpBarGrow .6s cubic-bezier(.2,.8,.2,1) var(--bar-delay) forwards;
}
.cp-btn:hover .cp-prev-bar span {
  animation: cpBarLabel .3s ease .5s forwards;
}
@keyframes cpBarGrow {
  0%   { width: 0; opacity: .3; }
  100% { width: var(--bar-w); opacity: .5; }
}
@keyframes cpBarLabel {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

/* Schedule — day dots */
.cp-prev-sched {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}
.cp-prev-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
}
.cp-btn:hover .cp-prev-day {
  animation: cpDayPop .35s cubic-bezier(.2,.8,.2,1) var(--day-delay) forwards;
}
@keyframes cpDayPop {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.cp-prev-day-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted, #7b8ba5);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.cp-prev-day-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
}
.cp-prev-day-dot--green { background: rgba(74,222,128,.6); box-shadow: 0 0 8px rgba(74,222,128,.3); }
.cp-prev-day-dot--amber { background: rgba(245,192,110,.6); box-shadow: 0 0 8px rgba(245,192,110,.3); }
.cp-prev-day-dot--red   { background: rgba(248,113,113,.5); box-shadow: 0 0 8px rgba(248,113,113,.25); }

/* CTA area */
.cp-cta-area {
  text-align: center;
}
.cp-cta-btn {
  padding: 14px 40px;
  background: linear-gradient(135deg, #ff6b9d, #c471ed);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .2s, transform .2s;
  box-shadow: 0 4px 24px rgba(255,107,157,.25);
}
.cp-cta-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}
.cp-cta-hint {
  font-size: 13px;
  color: var(--muted, #7b8ba5);
  margin-top: 12px;
}

@media (max-width: 480px) {
  .crews-splash { padding: 20px 16px 40px; }
  .cp-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 100%;
    padding: 0 4px;
  }
  .cp-btn-inner { padding: 16px 12px 14px; }
  .cp-btn-icon { width: 30px; height: 30px; }
  .cp-btn-inner strong { font-size: 13px; }
  .cp-btn-inner p { font-size: 11px; }
  .cp-btn:hover .cp-btn-preview { height: 48px; }
  .cp-hero-title { font-size: 26px; }
  .cp-hero-sub { max-width: 100%; }
  .cp-cta-btn { padding: 14px 28px; width: 100%; box-sizing: border-box; }
}

/* ── Crew List Page ──────────────────────────────────── */
.crews-list-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.crews-list-header h1 {
  font-size: 24px; font-weight: 800; margin: 0;
}
.crews-new-btn {
  padding: 8px 18px;
  background: var(--accent); color: var(--bg); border: none;
  border-radius: 10px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: filter .15s;
}
.crews-new-btn:hover { filter: brightness(1.1); }

.crews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.crews-grid-card {
  position: relative;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px;
  cursor: pointer; transition: all .2s ease;
}
.crews-grid-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
}

/* Kebab menu button — top-right, visible on hover */
.crews-grid-kebab {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer;
  opacity: 0; transition: opacity .15s, background .15s;
  z-index: 2;
}
.crews-grid-card:hover .crews-grid-kebab { opacity: 1; }
.crews-grid-kebab:hover { background: rgba(var(--accent-rgb),.12); color: var(--text); }

/* Kebab dropdown menu */
.crews-grid-kebab-menu {
  position: absolute; top: 36px; right: 0;
  min-width: 180px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  padding: 4px 0; z-index: 100;
  animation: kebab-fade .12s ease;
}
@keyframes kebab-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.crews-grid-kebab-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px; border: none;
  background: none; color: var(--text); font-size: 13px;
  font-family: inherit; cursor: pointer; text-align: left;
}
.crews-grid-kebab-menu button:hover { background: rgba(var(--accent-rgb),.08); }
.crews-grid-kebab-menu button svg { flex-shrink: 0; color: var(--muted); }
.crews-grid-kebab-menu button.danger { color: #f87171; }
.crews-grid-kebab-menu button.danger svg { color: #f87171; }
.crews-grid-kebab-sep { height: 1px; background: var(--border); margin: 4px 0; }

.crews-grid-card-top {
  display: flex; gap: 14px; align-items: center; margin-bottom: 10px;
}
.crews-grid-emoji {
  font-size: 32px; width: 52px; height: 52px; border-radius: 14px;
  background: rgba(139,92,246,.1); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.crews-grid-name { font-size: 16px; font-weight: 700; }
.crews-grid-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Headline row — latest activity */
.crews-grid-headline {
  font-size: 12px; color: var(--text); line-height: 1.4;
  padding: 8px 10px; margin-bottom: 10px;
  background: rgba(var(--accent-rgb),.04); border-radius: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crews-grid-hl-author { font-weight: 700; color: var(--accent); margin-right: 4px; }
.crews-grid-hl-empty { color: var(--muted); font-style: italic; }

/* Bottom row — avatars + overflow */
.crews-grid-bottom {
  display: flex; align-items: center; gap: 6px;
}
.crews-grid-members { display: flex; }
.crews-grid-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--muted);
  overflow: hidden; margin-left: -6px;
}
.crews-grid-av:first-child { margin-left: 0; }
.crews-grid-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.crews-grid-more {
  font-size: 11px; font-weight: 600; color: var(--muted);
  margin-left: 4px;
}

/* ── Create Page ─────────────────────────────────────── */
/* ── Crew Create Page — Redesigned ─────────────────────── */
.cc-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 16px 80px;
}
.cc-back {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; color: var(--muted);
  font-size: 14px; font-weight: 500; cursor: pointer;
  padding: 8px 4px; margin-bottom: 12px;
  font-family: inherit;
  transition: color .2s;
}
.cc-back:hover { color: var(--text); }

.cc-card {
  background: rgba(15, 15, 30, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Hero section with gradient bg */
.cc-hero {
  position: relative;
  text-align: center;
  padding: 36px 24px 28px;
  background: linear-gradient(135deg, rgba(139,92,246,.15) 0%, rgba(236,72,153,.12) 50%, rgba(59,130,246,.1) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.cc-hero-glow {
  position: absolute;
  top: -40px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(139,92,246,.25) 0%, transparent 70%);
  pointer-events: none;
}
.cc-emoji-preview {
  font-size: 56px;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.3));
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
  position: relative;
  z-index: 1;
}
.cc-title {
  font-size: 24px; font-weight: 800; margin: 8px 0 4px;
  background: linear-gradient(135deg, #ffb347, #ff6b9d, #c471ed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative; z-index: 1;
}
.cc-subtitle {
  font-size: 14px; color: var(--muted); margin: 0;
  position: relative; z-index: 1;
}

/* Form body */
.cc-body {
  padding: 20px 24px 28px;
}
.cc-label {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--muted);
  margin-bottom: 6px; margin-top: 16px;
}
.cc-label:first-child { margin-top: 0; }
.cc-req { color: #ff6b9d; }
.cc-optional {
  font-size: 11px; font-weight: 400; color: var(--muted);
  opacity: .6; margin-left: 4px;
}

.cc-input, .cc-select {
  width: 100%;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.cc-input:focus, .cc-select:focus {
  border-color: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(255,107,157,.12);
}
.cc-input::placeholder { color: var(--muted); }
.cc-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%237b8ba5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

/* Emoji grid */
.cc-emoji-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.cc-emoji-opt {
  width: 44px; height: 44px; border-radius: 12px;
  border: 2px solid var(--border);
  background: rgba(255,255,255,.02);
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s, transform .15s;
}
.cc-emoji-opt:hover {
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
  transform: scale(1.08);
}
.cc-emoji-opt.selected {
  border-color: #ff6b9d;
  background: rgba(255,107,157,.1);
  box-shadow: 0 0 12px rgba(255,107,157,.2);
}
.cc-emoji-custom {
  margin-top: 8px;
}
.cc-emoji-input {
  background: var(--surface, rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 20px;
  padding: 8px 14px;
  width: 100%;
  font-family: inherit;
  text-align: center;
  transition: border-color .2s;
}
.cc-emoji-input::placeholder {
  font-size: 13px;
  color: var(--muted);
}
.cc-emoji-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ─── Fork Screen (crew type picker) ──────────────────── */
.crew-fork-screen {
  display: flex; gap: 12px; padding: 24px 20px 28px;
  position: relative; z-index: 2;
}
.crew-fork-card {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 24px 16px; border-radius: 16px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  cursor: pointer; transition: all .2s; font-family: inherit;
  color: var(--text, #fff); text-align: center;
}
.crew-fork-card:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.crew-fork-card-icon { opacity: .9; }
.crew-fork-card-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.crew-fork-card-sub { font-size: 12px; color: var(--muted, #7b8ba5); line-height: 1.3; }

/* ─── Event search (single-event creation) ────────────── */
.crew-fork-event-search-wrap { position: relative; }
.crew-fork-event-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  max-height: 240px; overflow-y: auto;
  background: rgba(15,15,30,.97); border: 1px solid rgba(255,255,255,.1);
  border-radius: 0 0 12px 12px; display: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.crew-fork-event-option {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; width: 100%; border: none; background: none;
  color: var(--text, #fff); cursor: pointer; font-family: inherit;
  font-size: 13px; text-align: left; transition: background .15s;
}
.crew-fork-event-option:hover { background: rgba(255,255,255,.06); }
.crew-fork-event-option-title { flex: 1; font-weight: 500; }
.crew-fork-event-option-date { font-size: 11px; color: var(--muted, #7b8ba5); margin-left: 8px; white-space: nowrap; }
.crew-fork-event-no-results { padding: 12px 14px; font-size: 12px; color: var(--muted, #7b8ba5); }

.crew-fork-event-badge {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(249,115,22,.08); border: 1px solid rgba(249,115,22,.2);
  margin-bottom: 14px;
}
.crew-fork-event-badge-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--text, #fff); }
.crew-fork-event-badge-date { font-size: 11px; color: var(--muted, #7b8ba5); }
.crew-fork-event-badge-clear {
  background: none; border: none; color: var(--muted, #7b8ba5);
  font-size: 18px; cursor: pointer; padding: 0 4px; line-height: 1;
  transition: color .15s;
}
.crew-fork-event-badge-clear:hover { color: #f87171; }

/* ─── Modular Dashboard (single-event crews) ───────────── */
.crew-mod-dashboard { padding: 24px 20px; max-width: 600px; margin: 0 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.crew-mod-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 20px; }
.crew-mod-empty h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; color: var(--text, #fff); }
.crew-mod-empty p { font-size: 13px; color: var(--muted, #7b8ba5); line-height: 1.5; margin: 0 0 20px; max-width: 280px; }
.crew-mod-add-btn { padding: 12px 24px; border-radius: 12px; border: none; background: linear-gradient(135deg, #7c3aed, #f97316); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .15s; font-family: inherit; }
.crew-mod-add-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,.3); }
.crew-mod-add-btn--secondary { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); margin-top: 16px; }
.crew-mod-add-btn--secondary:hover { background: rgba(255,255,255,.1); box-shadow: none; }
.crew-mod-cards { display: flex; flex-direction: column; gap: 12px; }
.crew-mod-card { padding: 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); cursor: pointer; transition: background .15s; }
.crew-mod-card:hover { background: rgba(255,255,255,.07); }
.crew-mod-card-title { font-size: 15px; font-weight: 600; color: var(--text, #fff); text-transform: capitalize; }
.crew-mod-card-sub { font-size: 12px; color: var(--muted, #7b8ba5); margin-top: 4px; }
.crew-mod-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.crew-mod-header-icon { font-size: 20px; }
.crew-mod-header-title { flex: 1; font-size: 15px; font-weight: 600; color: var(--text, #fff); }
.crew-mod-remove { background: none; border: none; color: var(--muted, #7b8ba5); font-size: 18px; cursor: pointer; padding: 2px 6px; line-height: 1; border-radius: 6px; transition: all .15s; }
.crew-mod-remove:hover { color: #f87171; background: rgba(248,113,113,.1); }
.crew-mod-body { padding: 0; }
.crew-mod-body-placeholder { font-size: 13px; color: var(--muted, #7b8ba5); margin: 0; }

/* ─── Module Add Sheet (bottom-sheet modal) ────────────── */
.crew-mod-add-sheet { position: fixed; bottom: 0; left: 0; right: 0; max-width: 480px; margin: 0 auto; background: rgba(15,15,30,.97); border-radius: 20px 20px 0 0; border: 1px solid rgba(255,255,255,.1); border-bottom: none; padding: 20px; z-index: 1001; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); animation: crewModSheetUp .25s ease-out; max-height: 70vh; overflow-y: auto; }
@keyframes crewModSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.crew-mod-add-sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.crew-mod-add-sheet-header h3 { font-size: 17px; font-weight: 600; color: var(--text, #fff); margin: 0; }
.crew-mod-add-sheet-close { background: none; border: none; color: var(--muted, #7b8ba5); font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1; }
.crew-mod-add-sheet-list { display: flex; flex-direction: column; gap: 8px; }
.crew-mod-add-option { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.03); cursor: pointer; transition: all .15s; font-family: inherit; color: var(--text, #fff); text-align: left; width: 100%; }
.crew-mod-add-option:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.crew-mod-add-option-icon { font-size: 24px; flex-shrink: 0; }
.crew-mod-add-option-text { display: flex; flex-direction: column; gap: 2px; }
.crew-mod-add-option-label { font-size: 14px; font-weight: 600; }
.crew-mod-add-option-desc { font-size: 12px; color: var(--muted, #7b8ba5); }

/* Camp Directions Module */
.crew-mod-camp { display: flex; flex-direction: column; gap: 10px; }
.crew-mod-camp-empty { text-align: center; padding: 16px 0; }
.crew-mod-camp-empty p { font-size: 14px; color: var(--muted, #7b8ba5); margin: 0 0 12px; }
.crew-mod-camp-set-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text, #fff); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; }
.crew-mod-camp-set-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.crew-mod-camp-desc-text { font-size: 14px; color: var(--text, #fff); margin: 0; line-height: 1.5; white-space: pre-wrap; }
.crew-mod-camp-pin { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #60a5fa; text-decoration: none; transition: opacity .15s; }
.crew-mod-camp-pin:hover { opacity: .8; }
.crew-mod-camp-photo { width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-top: 4px; }
.crew-mod-camp-edit-btn { align-self: flex-start; padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--muted, #7b8ba5); font-size: 12px; cursor: pointer; transition: all .15s; font-family: inherit; }
.crew-mod-camp-edit-btn:hover { background: rgba(255,255,255,.08); color: var(--text, #fff); }
.crew-mod-camp-edit { gap: 12px; }
.crew-mod-camp-label { font-size: 12px; color: var(--muted, #7b8ba5); font-weight: 500; margin: 0; }
.crew-mod-camp-textarea { width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text, #fff); font-size: 14px; padding: 10px 12px; resize: vertical; font-family: inherit; line-height: 1.5; min-height: 60px; }
.crew-mod-camp-textarea::placeholder { color: var(--muted, #7b8ba5); }
.crew-mod-camp-textarea:focus { outline: none; border-color: rgba(167,139,250,.4); }
.crew-mod-camp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crew-mod-camp-gps-btn, .crew-mod-camp-photo-label { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text, #fff); font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit; }
.crew-mod-camp-gps-btn:hover, .crew-mod-camp-photo-label:hover { background: rgba(255,255,255,.08); }
.crew-mod-camp-gps-btn:disabled { opacity: .5; cursor: not-allowed; }
.crew-mod-camp-status { font-size: 12px; color: var(--muted, #7b8ba5); min-height: 16px; }
.crew-mod-camp-editor-btns { display: flex; gap: 8px; }
.crew-mod-camp-save-btn { padding: 8px 20px; border-radius: 10px; border: none; background: linear-gradient(135deg, #a78bfa, #f97316); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; font-family: inherit; }
.crew-mod-camp-save-btn:hover { opacity: .9; }
.crew-mod-camp-save-btn:disabled { opacity: .5; cursor: not-allowed; }
.crew-mod-camp-cancel-btn { padding: 8px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: var(--muted, #7b8ba5); font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit; }
.crew-mod-camp-cancel-btn:hover { color: var(--text, #fff); border-color: rgba(255,255,255,.2); }

/* Carpools Module */
.crew-mod-carpool-list { display: flex; flex-direction: column; gap: 10px; }
.crew-mod-carpool-empty { font-size: 14px; color: var(--muted, #7b8ba5); text-align: center; margin: 0; padding: 8px 0; }
.crew-mod-carpool-add-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--text, #fff); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; align-self: center; }
.crew-mod-carpool-add-btn:hover { background: rgba(255,255,255,.1); }
.crew-mod-carpool-add-btn--secondary { font-size: 13px; padding: 8px 16px; font-weight: 500; opacity: .7; }
.crew-mod-carpool-add-btn--secondary:hover { opacity: 1; }
.crew-mod-carpool-card { padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); display: flex; flex-direction: column; gap: 6px; }
.crew-mod-carpool-driver { display: flex; align-items: center; gap: 8px; }
.crew-mod-carpool-driver-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.crew-mod-carpool-driver-initials { width: 28px; height: 28px; border-radius: 50%; background: rgba(167,139,250,.25); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text, #fff); }
.crew-mod-carpool-driver-name { font-size: 14px; font-weight: 600; color: var(--text, #fff); }
.crew-mod-carpool-route { font-size: 13px; color: var(--muted, #7b8ba5); }
.crew-mod-carpool-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted, #7b8ba5); }
.crew-mod-carpool-riders { display: flex; gap: 4px; flex-wrap: wrap; }
.crew-mod-carpool-rider-dot { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.crew-mod-carpool-rider-dot--initials { background: rgba(249,115,22,.2); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: var(--text, #fff); }
.crew-mod-carpool-notes { font-size: 12px; color: var(--muted, #7b8ba5); margin: 0; font-style: italic; }
.crew-mod-carpool-claim { align-self: flex-start; padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(167,139,250,.3); background: rgba(167,139,250,.12); color: #c4b5fd; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; }
.crew-mod-carpool-claim:hover { background: rgba(167,139,250,.2); }
.crew-mod-carpool-claim--leave { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--muted, #7b8ba5); }
.crew-mod-carpool-claim--leave:hover { color: #f87171; border-color: rgba(248,113,113,.3); }
.crew-mod-carpool-claim--full { opacity: .4; cursor: not-allowed; }
.crew-mod-carpool-actions { display: flex; align-items: center; gap: 8px; }
.crew-mod-carpool-delete { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(248,113,113,.2); background: rgba(248,113,113,.08); color: #f87171; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; font-family: inherit; padding: 0; line-height: 1; }
.crew-mod-carpool-delete:hover { background: rgba(248,113,113,.2); border-color: rgba(248,113,113,.4); }
.crew-mod-carpool-form { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; border: 1px solid rgba(167,139,250,.15); background: rgba(167,139,250,.04); }
.crew-mod-carpool-form label { font-size: 12px; color: var(--muted, #7b8ba5); font-weight: 500; }
.crew-mod-carpool-input { width: 100%; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text, #fff); font-size: 13px; padding: 8px 10px; font-family: inherit; }
.crew-mod-carpool-input:focus { outline: none; border-color: rgba(167,139,250,.4); }
.crew-mod-carpool-form-btns { display: flex; gap: 8px; margin-top: 4px; }
.crew-mod-carpool-post-btn { padding: 8px 18px; border-radius: 10px; border: none; background: linear-gradient(135deg, #a78bfa, #f97316); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; font-family: inherit; }
.crew-mod-carpool-post-btn:hover { opacity: .9; }
.crew-mod-carpool-cancel-btn { padding: 8px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: transparent; color: var(--muted, #7b8ba5); font-size: 13px; cursor: pointer; transition: all .15s; font-family: inherit; }
.crew-mod-carpool-cancel-btn:hover { color: var(--text, #fff); }
.crew-mod-carpool-form-status { font-size: 12px; color: var(--muted, #7b8ba5); min-height: 14px; }

/* Shared Supplies Module */
.crew-mod-supply-list { display: flex; flex-direction: column; gap: 6px; }
.crew-mod-supply-empty { font-size: 14px; color: var(--muted, #7b8ba5); text-align: center; margin: 0; padding: 8px 0; }
.crew-mod-supply-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); flex-wrap: wrap; }
.crew-mod-supply-name { font-size: 14px; color: var(--text, #fff); font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-mod-supply-claimed { font-size: 12px; color: #4ade80; font-weight: 500; }
.crew-mod-supply-unclaimed { font-size: 12px; color: var(--muted, #7b8ba5); font-style: italic; }
.crew-mod-supply-btn { padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(167,139,250,.3); background: rgba(167,139,250,.1); color: #c4b5fd; font-size: 11px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; white-space: nowrap; }
.crew-mod-supply-btn:hover { background: rgba(167,139,250,.2); }
.crew-mod-supply-btn--unclaim { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--muted, #7b8ba5); }
.crew-mod-supply-btn--unclaim:hover { color: #f87171; border-color: rgba(248,113,113,.3); }
.crew-mod-supply-delete { width: 20px; height: 20px; border-radius: 50%; border: none; background: transparent; color: var(--muted, #7b8ba5); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0; }
.crew-mod-supply-delete:hover { color: #f87171; background: rgba(248,113,113,.1); }
.crew-mod-supply-add { display: flex; gap: 6px; margin-top: 4px; }
.crew-mod-supply-input { flex: 1; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text, #fff); font-size: 13px; padding: 8px 10px; font-family: inherit; }
.crew-mod-supply-input::placeholder { color: var(--muted, #7b8ba5); }
.crew-mod-supply-input:focus { outline: none; border-color: rgba(167,139,250,.4); }
.crew-mod-supply-add-btn { padding: 8px 14px; border-radius: 8px; border: none; background: linear-gradient(135deg, #a78bfa, #f97316); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .15s; font-family: inherit; }
.crew-mod-supply-add-btn:hover { opacity: .9; }

/* Actions */
.cc-actions {
  display: flex; gap: 10px; margin-top: 24px;
}
.cc-btn-primary {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  background: linear-gradient(135deg, #ff6b9d, #c471ed);
  color: #fff; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  transition: filter .2s, transform .2s;
  box-shadow: 0 4px 20px rgba(255,107,157,.25);
}
.cc-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(255,107,157,.35);
}
.cc-btn-ghost {
  flex: 0 0 auto;
  padding: 13px 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: border-color .2s, color .2s;
}
.cc-btn-ghost:hover { border-color: var(--text); color: var(--text); }

/* Legacy compat — keep old class names working for overlay create */
.crew-create-hero { text-align: center; margin-bottom: 24px; }
.crew-create-emoji-preview {
  font-size: 64px; margin-bottom: 8px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.3));
}
.crews-create-form {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 440px;
}

@media (max-width: 600px) {
  .cc-page { padding: 12px 12px 80px; }
  .cc-card { border-radius: 14px; }
  .cc-hero { padding: 28px 18px 22px; }
  .cc-body { padding: 16px 18px 24px; }
  .cc-emoji-preview { font-size: 48px; }
  .cc-title { font-size: 20px; }
}

/* ══════════════════════════════════════════════════════════
   CREW DETAIL PAGE — Redesigned with hero, polls, board
   ══════════════════════════════════════════════════════════ */

/* ── Compact header bar (replaces giant hero) ─────────── */
/* ═══ LINKED EVENT BANNER ═══ */
.crew-event-banner {
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.crew-event-banner-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s ease;
  margin: 8px 0;
}
.crew-event-banner-inner:hover { background: var(--surface-hover, rgba(255,255,255,.08)); }
.crew-event-banner-img {
  width: 48px; height: 48px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.crew-event-banner-placeholder {
  width: 48px; height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}
.crew-event-banner-info {
  flex: 1; min-width: 0;
}
.crew-event-banner-title {
  font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}
.crew-event-banner-meta {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.crew-event-banner-arrow {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform .15s ease;
}
.crew-event-banner-inner:hover .crew-event-banner-arrow {
  transform: translateX(2px);
  color: var(--text);
}

.crew-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: static; /* was sticky — topbar is redundant with switcher on mobile */
  min-height: 40px;
}
.crew-topbar-back {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer; flex-shrink: 0;
  transition: all .15s;
}
.crew-topbar-back:hover { color: var(--text); border-color: var(--accent); }
.crew-topbar-emoji { font-size: 22px; flex-shrink: 0; }
.crew-topbar-info { flex: 1; min-width: 0; }
.crew-topbar-name {
  font-size: 16px; font-weight: 800; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crew-topbar-tagline {
  font-size: 11px; color: rgba(255,255,255,.6); font-weight: 400;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: -1px;
}
.crew-topbar-meta {
  font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.crew-topbar-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
/* Request to Join button for non-members */
.crew-request-join-btn {
  padding: 8px 16px; border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff; font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all .2s ease; flex-shrink: 0;
  margin-right: 8px;
}
.crew-request-join-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, .3);
}
.crew-request-join-btn.pending,
.crew-request-join-btn:disabled {
  background: rgba(124, 58, 237, .2);
  color: #a78bfa; cursor: default;
  transform: none; box-shadow: none;
}

.crew-topbar-actions {
  display: flex; gap: 6px; flex-shrink: 0;
}
.crew-topbar-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); cursor: pointer;
  transition: all .15s;
}
.crew-topbar-btn:hover { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb),.08); }
.crew-topbar-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(var(--accent-rgb),.12); }

/* PROMINENT Invite button — labeled, gradient background, hard to miss.
   This is the primary social action on the crew page. */
.crew-topbar-btn.crew-topbar-invite {
  width: auto;
  padding: 0 12px;
  gap: 6px;
  color: #fff;
  background: linear-gradient(135deg, #ff6b9d, #c471ed);
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 2px 10px rgba(196,113,237,.25);
  font-weight: 600;
}
.crew-topbar-btn.crew-topbar-invite:hover {
  color: #fff;
  background: linear-gradient(135deg, #ff5a91, #b864e0);
  border-color: rgba(255,255,255,.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196,113,237,.35);
}
.crew-topbar-btn.crew-topbar-invite svg {
  width: 14px; height: 14px;
}
.crew-topbar-invite-label {
  font-size: 12px; line-height: 1;
  letter-spacing: .02em;
}
/* Gradient accent stripe under topbar */
.crew-topbar::after {
  content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--crew-gradient, linear-gradient(90deg, #4a1a6b, #7c3aed, #ff6b9d));
  opacity: .5;
}

/* ── Crew members strip (compact, below tabs) ──────────── */
.crew-members-strip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 20px;
  background: rgba(17, 24, 39, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; overflow-y: visible; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative; z-index: 8; /* was sticky — reduce viewport chrome */
  min-height: 32px;
}
.crew-members-strip::-webkit-scrollbar { display: none; }
.crew-member-chip {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.crew-member-chip-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--muted);
  overflow: hidden; transition: border-color .15s;
}
.crew-member-chip:hover .crew-member-chip-av { border-color: var(--accent); }
.crew-member-chip.is-admin .crew-member-chip-av { border-color: rgba(139,92,246,.5); }
.crew-member-chip-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.crew-member-chip-name {
  font-size: 12px; font-weight: 600; color: var(--text-dim); white-space: nowrap;
}
.crew-members-count {
  font-size: 11px; color: var(--muted); font-weight: 600;
  margin-left: auto; flex-shrink: 0; white-space: nowrap;
}

/* Legacy hero (hidden — replaced by topbar) */
.crew-hero {
  display: none;
  position: relative; text-align: left;
  padding: 60px 32px 32px; margin: -72px -20px 28px;
  overflow: hidden;
  min-height: 220px;
  display: none; align-items: flex-end;
}
.crew-hero-glow {
  position: absolute; inset: 0;
  background: var(--crew-gradient, linear-gradient(135deg, #4a1a6b 0%, #2d1b69 25%, #1a1040 60%, #0b0d10 100%));
  pointer-events: none;
}
.crew-hero-glow::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,13,16,.85) 0%, rgba(11,13,16,.3) 40%, transparent 70%);
}
.crew-hero-content { position: relative; z-index: 1; width: 100%; }
.crew-hero-emoji {
  font-size: 36px; margin-bottom: 8px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}
.crew-hero-title {
  font-size: clamp(36px, 6vw, 56px); font-weight: 900; margin: 0 0 6px;
  letter-spacing: -.03em; line-height: 1.05;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.crew-hero-tagline {
  font-size: 16px; color: rgba(255,255,255,.65); margin: 0 0 8px;
  font-style: italic; text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.crew-hero-event {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--accent);
  background: rgba(var(--accent-rgb),.15); padding: 4px 12px;
  border-radius: 8px; margin-bottom: 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* Hero member avatars — prominent horizontal strip */
.crew-hero-avatars {
  display: flex; justify-content: center; gap: 16px;
  margin: 20px 0 18px; flex-wrap: wrap;
}
.crew-hero-av {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.crew-hero-av-img {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface, var(--panel-2, #1e2738));
  border: 3px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--muted);
  overflow: hidden; transition: all .2s;
}
.crew-hero-av:hover .crew-hero-av-img {
  border-color: var(--accent); transform: scale(1.08);
  box-shadow: 0 0 16px rgba(139,92,246,.3);
}
.crew-hero-av.is-admin .crew-hero-av-img {
  border-color: rgba(139,92,246,.5);
}
.crew-hero-av-img img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.crew-hero-av-name {
  font-size: 11px; font-weight: 600; color: var(--muted);
}

/* Hero action buttons */
.crew-hero-actions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.crew-share-btn, .crew-edit-btn, .crew-invite-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text); font-family: inherit;
  transition: all .15s;
}
.crew-share-btn:hover, .crew-edit-btn:hover, .crew-invite-toggle:hover {
  border-color: var(--accent); background: rgba(var(--accent-rgb),.08);
  color: var(--accent);
}

/* Invite dropdown (positioned for topbar) */
.crew-invite-dropdown {
  position: absolute; top: 100%; right: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px;
  max-height: 360px; overflow-y: auto;
  width: 280px; z-index: 50;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.crews-invite-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 0;
}

/* ── Invite Link Generation UI ──────────────────────── */
.crew-invite-helper-text {
  font-size: 12px; color: rgba(255,255,255,.45); padding: 0 2px 6px;
  line-height: 1.4;
}
.crew-create-invite-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(139,92,246,.1); color: #a78bfa;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .2s ease;
}
.crew-create-invite-btn:hover {
  background: rgba(139,92,246,.2); border-color: rgba(139,92,246,.3);
}
.crew-invite-link-config {
  margin-top: 8px; padding: 10px 12px;
  background: rgba(255,255,255,.03); border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
}
.crew-invite-config-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.crew-invite-config-row label {
  font-size: 12px; color: var(--muted); font-weight: 500;
}
.crew-invite-config-row select {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; color: #fff; font-size: 12px; padding: 5px 8px;
  cursor: pointer; outline: none;
}
.crew-invite-config-row select option {
  background: #1a1a2e; color: #fff;
}
.crew-invite-generate-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 10px 14px; margin-top: 4px;
  border-radius: 10px; border: 1px solid rgba(124,156,255,.3);
  background: linear-gradient(135deg, rgba(124,156,255,.15), rgba(167,139,250,.15));
  color: #7c9cff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s ease;
}
.crew-invite-generate-btn:hover {
  background: linear-gradient(135deg, rgba(124,156,255,.25), rgba(167,139,250,.25));
  border-color: rgba(124,156,255,.5);
}
.crew-invite-generate-btn:disabled {
  opacity: .5; cursor: not-allowed;
}
.crew-active-invite-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
}
.crew-active-invite-info {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
}
.crew-active-invite-uses {
  font-size: 12px; font-weight: 600; color: #a78bfa;
}
.crew-active-invite-expires {
  font-size: 10px; color: var(--muted);
}
.crew-active-invite-copy,
.crew-active-invite-revoke {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 6px; padding: 5px; cursor: pointer; color: var(--muted);
  transition: all .15s ease; display: flex; align-items: center; justify-content: center;
}
.crew-active-invite-copy:hover { color: #7c9cff; border-color: rgba(124,156,255,.3); }
.crew-active-invite-revoke:hover { color: #f87171; border-color: rgba(248,113,113,.3); }

/* ── Middle grid: Polls + Chat ──────────────────────── */
.crew-mid-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 28px;
}
.crew-mid-col {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px;
  display: flex; flex-direction: column;
}
.crew-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.crew-section-head h3 {
  font-size: 14px; font-weight: 700; margin: 0;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
}
.crew-section-add {
  background: none; border: 1px dashed var(--border);
  color: var(--muted); padding: 4px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.crew-section-add:hover { border-color: var(--accent); color: var(--accent); }

/* Polls */
.cc-legacy-polls-empty {
  font-size: 13px; color: var(--muted); text-align: center;
  padding: 20px 0;
}
.cc-legacy-poll-card {
  background: rgba(0,0,0,.15); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.cc-legacy-poll-q { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.cc-legacy-poll-by { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.cc-legacy-poll-opts { display: flex; flex-direction: column; gap: 6px; }
.cc-legacy-poll-opt {
  position: relative; display: flex; align-items: center;
  padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(0,0,0,.2);
  cursor: pointer; overflow: hidden; font-family: inherit;
  color: var(--text); font-size: 13px; font-weight: 600;
  transition: border-color .15s;
}
.cc-legacy-poll-opt:hover { border-color: rgba(var(--accent-rgb),.4); }
.cc-legacy-poll-opt.voted { border-color: var(--accent); }
.cc-legacy-poll-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 100%;
  background: rgba(var(--accent-rgb),.12); border-radius: 10px;
  transform-origin: left;
  transition: transform .4s ease;
  will-change: transform;
}
.cc-legacy-poll-opt-text { position: relative; z-index: 1; flex: 1; }
.cc-legacy-poll-opt-count { position: relative; z-index: 1; font-size: 12px; color: var(--muted); margin-left: 8px; }

/* Poll create form */
.crew-poll-create {
  background: rgba(0,0,0,.15); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.crew-poll-q-input, .crew-poll-options input {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 8px 12px;
  font-size: 13px; outline: none; font-family: inherit;
  width: 100%; margin-bottom: 8px;
}
.crew-poll-q-input:focus, .crew-poll-options input:focus { border-color: var(--accent); }
.crew-poll-actions { display: flex; gap: 8px; }
.crew-poll-add-opt {
  background: none; border: 1px dashed var(--border);
  color: var(--muted); padding: 6px 12px; border-radius: 8px;
  font-size: 12px; cursor: pointer; font-family: inherit;
}
.crew-poll-submit {
  background: var(--accent); color: var(--bg); border: none;
  padding: 6px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  margin-left: auto;
}

/* Chat column */
.crew-chat-col {
  min-height: 360px;
}
.crew-chat-msgs {
  flex: 1; overflow-y: auto; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 240px; max-height: 400px;
  margin-bottom: 14px;
}
.crew-chat-input-wrap {
  display: flex; gap: 8px; border-top: 1px solid var(--border); padding-top: 14px;
}
.crew-chat-input-wrap input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text); padding: 10px 16px;
  font-size: 14px; outline: none; font-family: inherit;
}
.crew-chat-input-wrap input:focus { border-color: var(--accent); }
.crew-chat-input-wrap button {
  background: var(--accent); color: var(--bg); border: none;
  border-radius: 50%; width: 38px; height: 38px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.crew-chat-input-wrap button:hover { filter: brightness(1.1); }

/* ── Board / Scrapbook ──────────────────────────────── */
.crew-board { margin-bottom: 40px; }
.crew-board-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 10px;
}
.crew-board-header h3 {
  font-size: 18px; font-weight: 800; margin: 0;
}
.crew-board-addbar {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.crew-board-add-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 10px;
  border: 1px dashed var(--border); background: none;
  color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
}
.crew-board-add-btn:hover {
  border-style: solid; border-color: var(--accent);
  color: var(--accent); background: rgba(var(--accent-rgb),.06);
  transform: translateY(-2px);
}
.crew-board-add-btn:active {
  transform: scale(.93);
  transition-duration: .06s;
}

/* Board bezel — contained canvas with rounded corners */
.crew-board-bezel {
  background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,.1) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  min-height: 400px;
  overflow: hidden;
  position: relative;
}
.crew-board-canvas {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* Board empty state */
.crew-board-empty {
  text-align: center; padding: 60px 20px;
  color: var(--muted); grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.crew-board-empty p { margin: 4px 0; font-size: 14px; }

/* Floating Add Event button — branded gradient with RGB glow (matches splash page) */
.crew-fab-add {
  position: fixed; bottom: 80px; right: 24px; z-index: 45;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #f97316 0%, #ec4899 50%, #a855f7 100%);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 2px rgba(255,255,255,.12),
    0 4px 16px rgba(249,115,22,.35),
    0 0 24px rgba(168,85,247,.25);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease;
  animation: fabGlow 4s ease-in-out infinite alternate;
}
.crew-fab-add::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(255,179,71,.3), transparent 60%),
    radial-gradient(ellipse at 70% 60%, rgba(255,107,157,.25), transparent 60%),
    radial-gradient(ellipse at 50% 30%, rgba(196,113,237,.2), transparent 60%);
  filter: blur(10px);
  opacity: .6;
  pointer-events: none;
  z-index: -1;
  animation: fabGlowDrift 6s ease-in-out infinite alternate;
}
.crew-fab-add:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.2),
    0 6px 24px rgba(249,115,22,.5),
    0 0 32px rgba(168,85,247,.4),
    0 0 48px rgba(236,72,153,.2);
}
.crew-fab-add:active { transform: scale(.95); }
@keyframes fabGlow {
  0% {
    box-shadow:
      0 0 0 2px rgba(255,255,255,.12),
      0 4px 16px rgba(249,115,22,.35),
      0 0 24px rgba(168,85,247,.25);
  }
  100% {
    box-shadow:
      0 0 0 2px rgba(255,255,255,.15),
      0 6px 20px rgba(236,72,153,.4),
      0 0 28px rgba(249,115,22,.3);
  }
}
@keyframes fabGlowDrift {
  0%   { opacity: .5; transform: scale(1); }
  100% { opacity: .7; transform: scale(1.1); }
}

/* ── Post cards ─────────────────────────────────────── */
.crew-post-card {
  border: 1px solid var(--border);
  border-radius: 14px; padding: 14px;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1),
              box-shadow .25s cubic-bezier(.16, 1, .3, 1),
              border-color .2s;
}
.crew-post-card:hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  border-color: rgba(255,255,255,.1);
}
.crew-post-card:active {
  transform: scale(.97);
  transition-duration: .08s;
}
.crew-post-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; font-size: 11px;
}
.crew-post-type {
  font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em;
}
.crew-post-author { font-weight: 600; color: var(--text); }
.crew-post-time { color: var(--muted); margin-left: auto; }
.crew-post-del {
  background: none; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.crew-post-del:hover { color: #ff5a5f; }

.crew-post-text {
  font-size: 14px; line-height: 1.5; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.crew-post-link {
  display: block; font-size: 13px; color: var(--accent);
  text-decoration: none; word-break: break-all;
  margin-bottom: 6px;
}
.crew-post-link:hover { text-decoration: underline; }

/* Pinned event on board */
.crew-post-event-img {
  width: 100%; height: 120px; border-radius: 10px;
  background-size: cover; background-position: center;
  background-color: var(--surface);
  margin-bottom: 8px;
}
.crew-post-event-title { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.crew-post-event-meta { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.crew-post-event-votes {
  display: flex; gap: 6px; margin-top: 8px;
}
.crew-ev-vote {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 4px; border-radius: 8px;
  border: 1px solid var(--border); background: rgba(0,0,0,.25);
  color: var(--text); font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.crew-ev-vote .dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.crew-ev-vote.g .dot { background: #2ecc71; }
.crew-ev-vote.y .dot { background: #f1c40f; }
.crew-ev-vote.r .dot { background: #ff5a5f; }
.crew-ev-vote.g.active { border-color: #2ecc71; background: rgba(46,204,113,.12); }
.crew-ev-vote.y.active { border-color: #f1c40f; background: rgba(241,196,15,.12); }
.crew-ev-vote.r.active { border-color: #ff5a5f; background: rgba(255,90,95,.12); }
.crew-ev-vote:hover { background: rgba(255,255,255,.06); }

/* Comment threads on posts */
.crew-post-thread { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 6px; }
.crew-post-thread-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--muted);
  font-size: 11px; font-weight: 600; cursor: pointer;
  padding: 4px 0; font-family: inherit;
}
.crew-post-thread-toggle:hover { color: var(--accent); }
.crew-post-comments { margin-top: 6px; }
.crew-comment {
  display: flex; gap: 6px; align-items: baseline;
  padding: 4px 0; font-size: 12px;
}
.crew-comment-author { font-weight: 700; color: var(--text); flex-shrink: 0; }
.crew-comment-text { color: #cfd5e2; flex: 1; }
.crew-comment-time { font-size: 10px; color: var(--muted); flex-shrink: 0; }
.crew-comment-input-wrap { margin-top: 6px; }
.crew-comment-input {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 6px 10px;
  font-size: 12px; outline: none; font-family: inherit;
}
.crew-comment-input:focus { border-color: var(--accent); }

/* Pin event modal */
.crew-pin-search {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); padding: 10px 14px 10px 36px;
  font-size: 14px; outline: none; font-family: inherit;
  width: 100%; box-sizing: border-box;
  transition: border-color .15s;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}
.crew-pin-search:focus { border-color: var(--accent); }
.crew-pin-search::placeholder { color: var(--muted); }
.crew-pin-event-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.crew-pin-event-row:hover { background: rgba(var(--accent-rgb),.08); }
.crew-pin-thumb {
  width: 52px; height: 36px; border-radius: 6px;
  background-size: cover; background-position: center;
  background-color: var(--surface2); flex-shrink: 0;
}

/* ── Mobile responsive ───────────────────────────────── */
@media (max-width: 700px) {
  .crews-page { padding: 14px 12px 100px; }
  .crews-splash-title { font-size: 26px; }
  .crews-grid { grid-template-columns: 1fr; }
  .crew-mid-grid { grid-template-columns: 1fr; }
  .crew-topbar { padding: 8px 12px; gap: 8px; }
  .crew-topbar-name { font-size: 14px; }
  .crew-members-strip { padding: 6px 12px; gap: 8px; }
  .crew-member-chip-name { display: none; }
  .crew-board-canvas {
    grid-template-columns: 1fr;
  }
  .crew-board-addbar { flex-wrap: wrap; }
}
.crew-cancel-btn:hover { filter: brightness(1.1); }

/* ═══════════════════════════════════════════════════════════
   CREW DETAIL TABS (Dashboard / Chat / Board)
   ═══════════════════════════════════════════════════════════ */
.cd-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  padding: 0 20px; padding-right: 100px; background: var(--bg);
  position: sticky; top: 97px; z-index: 11;
  /* sticky creates containing block for absolute-positioned .crew-members-badge child */
}
.cd-tab {
  padding: 8px 12px; font-size: 11px; font-weight: 600;
  color: var(--muted); position: relative;
  transition: color .2s cubic-bezier(.45, 0, .15, 1), transform .2s cubic-bezier(.34, 1.56, .64, 1);
  background: none; border: none; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
  letter-spacing: .02em;
}
.cd-tab-icon {
  width: 15px; height: 15px; flex-shrink: 0;
  stroke: currentColor;
}
.cd-tab:hover { color: var(--text-primary); transform: translateY(-1px); }
.cd-tab:active { transform: scale(.94); transition-duration: .06s; }
.cd-tab.active { color: var(--text-primary); }
.cd-tab.active .cd-tab-icon { stroke: var(--accent); }
.cd-tab.active::after {
  content: ''; position: absolute; bottom: -1px; left: 8px; right: 8px;
  height: 2px; background: var(--accent); border-radius: 2px 2px 0 0;
  animation: cd-tabSlide .25s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes cd-tabSlide {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}
.cd-tab .cd-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 50%;
  background: #ff6b9d; font-size: 9px; font-weight: 700; color: white;
  margin-left: 6px; vertical-align: middle;
}
.cd-panel { display: none; }
.cd-panel.active { display: block; padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
.cd-panel[data-panel="chat"].active {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  height: calc(100dvh - 120px);
  background: var(--bg);
}

/* Board panel fills remaining space in crew-detail-view via flex.
   The parent (.crew-detail-view) is a flex column with overflow-y: auto,
   so we use flex:1 + min-height:0 to fill the remaining viewport. */
.cd-panel[data-panel="board"].active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: calc(100vh - 100px);
  height: calc(100dvh - 100px);
  padding-bottom: 0;
  overflow: hidden;
}
/* Single-event crews show the dashboard bento grid directly in Board —
   it needs to scroll since the grid can be taller than the viewport */
.cd-panel[data-panel="board"].active:has(> .cd-dash) {
  overflow-y: auto;
  overflow-x: hidden;
}
@media (max-width: 600px) {
  .cd-panel[data-panel="board"].active {
    height: calc(100dvh - 140px);
  }
}

/* ═══════════════════════════════════════════════════════════
   DASHBOARD — Mission Control
   ═══════════════════════════════════════════════════════════ */
.cd-dash { padding: 20px 24px; max-width: 1100px; margin: 0 auto; }
.cd-dash-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; }

/* ── Bento Grid Layout ── */
.cd-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

/* ── Bento Card ── */
.cd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;
}
.cd-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.cd-card .cd-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.cd-span-2 { grid-column: span 2; }
.cd-span-1 { grid-column: span 1; }

/* Staggered entrance animation — only plays on FIRST mount of the
   dashboard, not on every re-render. Re-renders are common (every
   vote, every supply add) and replaying the animation makes the
   page feel like it's reloading. JS adds .cd-mounted to the dash
   container after first render so subsequent cards skip the entrance. */
.cd-card {
  opacity: 0;
  animation: cd-cardIn .5s ease forwards;
}
.cd-card:nth-child(1) { animation-delay: .05s; }
.cd-card:nth-child(2) { animation-delay: .12s; }
.cd-card:nth-child(3) { animation-delay: .19s; }
.cd-card:nth-child(4) { animation-delay: .26s; }
.cd-card:nth-child(5) { animation-delay: .33s; }
.cd-card:nth-child(6) { animation-delay: .40s; }
.cd-card:nth-child(7) { animation-delay: .47s; }
.cd-card:nth-child(8) { animation-delay: .54s; }
.cd-card:nth-child(9) { animation-delay: .61s; }
.cd-card:nth-child(10) { animation-delay: .68s; }

/* After first mount: cards appear instantly on re-render. */
.cd-mounted .cd-card {
  opacity: 1;
  animation: none;
}

@keyframes cd-cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cd-seatPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Card type label */
.cd-card-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Hero countdown card */
.cd-countdown-num {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), #c471ed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cd-countdown-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 4px;
}

/* Stats row inside hero */
.cd-stats-row {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.cd-stat-item {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.cd-stat-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Progress / readiness bar */
.cd-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}
.cd-progress-fill {
  height: 100%;
  border-radius: 3px;
}
.cd-readiness-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

/* Status pill */
.cd-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  background: rgba(74,222,128,.12);
  color: #4ade80;
}
/* LIVE event — anthemic pink-amber, gently pulsing dot */
.cd-status-pill.cd-status-live {
  background: linear-gradient(135deg, rgba(255,107,157,.22), rgba(255,179,71,.18));
  color: #ff6b9d;
  border: 1px solid rgba(255,107,157,.35);
  animation: cd-status-live-pulse 2s ease-in-out infinite;
}
@keyframes cd-status-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,157,0); }
  50%      { box-shadow: 0 0 0 6px rgba(255,107,157,.15); }
}
/* TODAY — anticipation, amber/pink without the pulse */
.cd-status-pill.cd-status-today {
  background: linear-gradient(135deg, rgba(255,179,71,.22), rgba(255,107,157,.18));
  color: #ffb347;
  border: 1px solid rgba(255,179,71,.35);
}
/* PAST — muted, no shouting */
.cd-status-pill.cd-status-past {
  background: rgba(123,139,165,.12);
  color: #7b8ba5;
  border: 1px solid rgba(123,139,165,.25);
}

/* Hero countdown variants per lifecycle */
.cd-hero-live .cd-countdown-num {
  background: linear-gradient(135deg, #ff6b9d, #ffb347);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 44px;        /* "LIVE" is wider than "12" — shrink so it fits */
  letter-spacing: -.02em;
}
.cd-hero-today .cd-countdown-num {
  background: linear-gradient(135deg, #ffb347, #ff6b9d);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cd-hero-past .cd-countdown-num {
  background: linear-gradient(135deg, #7b8ba5, #5a6678);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 36px;
}

/* Tags */
.cd-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  margin-right: 5px;
  margin-top: 4px;
}

/* ── Find a Time status card ── */
.cd-ft-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.cd-ft-card .cd-stripe { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.cd-ft-card:hover {
  transform: translateY(-3px) scale(1.008);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.cd-ft-voting { border-color: rgba(var(--accent-rgb),.2); }
.cd-ft-locked { border-color: rgba(74,222,128,.2); }
.cd-ft-icon { font-size: 28px; flex-shrink: 0; }
.cd-ft-info { flex: 1; min-width: 0; }
.cd-ft-title { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-ft-detail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cd-ft-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 100px; flex-shrink: 0;
}
.cd-ft-badge-voting { background: rgba(var(--accent-rgb),.15); color: var(--accent); }
.cd-ft-badge-locked { background: rgba(74,222,128,.15); color: #4ade80; }

/* ── Transport ── */
.cd-vehicle {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.cd-vehicle:last-of-type { border-bottom: none; }
.cd-vehicle-icon { font-size: 18px; flex-shrink: 0; }
.cd-vehicle-info { flex: 1; min-width: 0; }
.cd-vehicle-name { font-size: 13px; font-weight: 600; }
.cd-vehicle-detail { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* Seat visualization (circle dots) */
.cd-seat-row {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  align-items: center;
}
.cd-seat {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
}
.cd-seat-filled { background: rgba(74,222,128,.3); border: 1.5px solid #4ade80; }
.cd-seat-open { border: 1.5px dashed rgba(255,255,255,.2); background: transparent; }
.cd-seats-summary { font-size: 12px; color: var(--muted); margin-top: 6px; }

.cd-claim-btn {
  font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: 100px;
  background: var(--accent); color: var(--bg); border: none; cursor: pointer;
  font-family: inherit; transition: filter .15s;
}
.cd-claim-btn:hover { filter: brightness(1.1); }
.cd-claim-btn:disabled { opacity: .5; cursor: default; }

/* ── Supplies / Checklist ── */
.cd-checklist { list-style: none; padding: 0; margin: 0; }
.cd-checklist li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.cd-checklist li:last-child { border-bottom: none; }
.cd-check-icon {
  width: 18px; height: 18px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; cursor: pointer;
  transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
  background: none; color: inherit; padding: 0; border: none;
}
.cd-check-icon:hover { transform: scale(1.15); }
.cd-check-icon:active { transform: scale(.85); transition-duration: .06s; }
.cd-check-done {
  background: rgba(74,222,128,.15); color: #4ade80;
}
.cd-check-empty {
  border: 1.5px solid rgba(255,255,255,.15); background: transparent;
}
.cd-claim-owner {
  margin-left: auto;
  font-size: 11px; color: var(--muted); font-weight: 500;
}
.cd-unclaimed { color: #ffb347; font-style: italic; }
.cd-mention {
  color: var(--accent); font-weight: 600;
  background: rgba(var(--accent-rgb),.15); padding: 1px 6px; border-radius: 4px;
  font-size: 11px; margin-left: auto;
}
.cd-pill-btn {
  display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  border: none; background: rgba(255,255,255,.05);
  color: var(--accent); margin-top: 10px;
  font-family: inherit;
}
.cd-pill-btn:hover { background: rgba(var(--accent-rgb),.15); }

/* ── Accommodation ── */
.cd-lodge {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.cd-lodge:last-of-type { border-bottom: none; }
.cd-lodge-icon { font-size: 18px; flex-shrink: 0; }
.cd-lodge-info { flex: 1; }
.cd-lodge-name { font-size: 13px; font-weight: 600; }
.cd-lodge-detail { font-size: 11px; color: var(--muted); margin-top: 1px; }
.cd-dots { display: flex; gap: 3px; flex-shrink: 0; align-items: center; }
.cd-dot { width: 8px; height: 8px; border-radius: 50%; }
.cd-dot.filled { background: var(--accent); }
.cd-dot.empty { border: 1.5px solid var(--muted); }

/* ── Schedule ── */
.cd-sched-tabs {
  display: flex; gap: 0; margin-bottom: 10px;
}
.cd-sched-tab {
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  color: var(--muted); cursor: pointer;
  position: relative; background: none; border: none;
  font-family: inherit; transition: color .2s;
}
.cd-sched-tab:hover { color: var(--text-primary); }
.cd-sched-tab.active { color: var(--text-primary); }
.cd-sched-tab.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 14px; right: 14px;
  height: 2px; border-radius: 1px;
  background: var(--accent);
}
.cd-sched-item {
  display: flex; gap: 10px; padding: 6px 0;
  font-size: 13px; align-items: baseline;
}
.cd-sched-time {
  color: var(--muted); font-size: 11px; font-weight: 600;
  white-space: nowrap; min-width: 56px;
}
.cd-sched-event { color: var(--text-primary); }
.cd-sched-panel { display: none; }
.cd-sched-panel.active { display: block; }

/* ── Food / Meals ── */
.cd-day-tabs {
  display: flex; gap: 8px;
  margin-bottom: 12px;
}
.cd-day-tab {
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  color: var(--muted); background: none; border: 1px solid var(--border);
  border-radius: 100px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.cd-day-tab:hover { color: var(--text-primary); border-color: rgba(255,255,255,.2); }
.cd-day-tab:nth-child(1).active { background: rgba(255,179,71,.15); color: #ffb347; border-color: rgba(255,179,71,.3); }
.cd-day-tab:nth-child(2).active { background: rgba(255,107,157,.15); color: #ff6b9d; border-color: rgba(255,107,157,.3); }
.cd-day-tab:nth-child(3).active { background: rgba(196,113,237,.15); color: #c471ed; border-color: rgba(196,113,237,.3); }
.cd-day-panel { display: none; }
.cd-day-panel.active { display: block; }
.cd-meal {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cd-meal:last-of-type { border-bottom: none; }
.cd-meal-item { flex: 1; }
.cd-meal-item.done { text-decoration: line-through; color: var(--muted); }
.cd-meal-who {
  font-size: 11px; color: var(--accent); font-weight: 600;
  background: rgba(var(--accent-rgb),.12); padding: 1px 6px; border-radius: 4px;
}
.cd-meal-claim {
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 100px;
  background: rgba(255,179,71,.15); color: #ffb347; border: none; cursor: pointer;
  font-family: inherit; transition: filter .15s;
}
.cd-meal-claim:hover { filter: brightness(1.1); }

/* ── Add button & modal ── */
.cd-add-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  color: var(--accent); background: none; border: none;
  cursor: pointer; font-family: inherit;
  transition: color .2s; margin-top: 10px; padding: 0;
}
.cd-add-btn:hover { color: #9bb5ff; }
.cd-add-modal {
  margin-top: 10px; padding: 12px;
  background: rgba(255,255,255,.03); border-radius: 8px;
  border: 1px solid var(--border);
}
.cd-add-modal input, .cd-add-modal select {
  width: 100%; padding: 8px 12px; margin-bottom: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary);
  font-size: 13px; outline: none;
}
.cd-add-modal input:focus, .cd-add-modal select:focus { border-color: var(--accent); }
.cd-add-row { display: flex; gap: 8px; }
.cd-add-row input { flex: 1; }
.cd-add-row select { flex: 1; }
.cd-add-row input[type="number"] { flex: 0 0 110px; }
.cd-add-submit {
  padding: 8px 16px; border-radius: 10px;
  background: rgba(196,113,237,.08);
  border: 1px solid rgba(196,113,237,.28);
  color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit;
  transition: background .15s, border-color .15s, transform .15s cubic-bezier(.34, 1.56, .64, 1);
}
.cd-add-submit:hover {
  background: rgba(196,113,237,.18);
  border-color: rgba(196,113,237,.5);
  transform: translateY(-1px);
}

/* ── Prominent Add Event button bar ── */
.cd-add-event-bar {
  display: flex; justify-content: center;
  padding: 12px 16px 4px;
}
.cd-add-event-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 28px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff; border: none; border-radius: 100px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 16px rgba(var(--accent-rgb),.3);
  transition: all .2s ease;
}
.cd-add-event-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(var(--accent-rgb),.4);
  filter: brightness(1.1);
}
.cd-add-event-btn:active {
  transform: scale(.97);
  transition-duration: .06s;
}

/* ── Pitch an Event card ── */
.cd-pitch-card {
  background: transparent;
  border: 2px dashed rgba(255,255,255,.1);
  border-radius: 14px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 30px 18px;
  cursor: pointer; transition: all .3s;
  text-align: center;
  opacity: 0;
  animation: cd-cardIn .5s ease forwards;
  animation-delay: .68s;
}
.cd-pitch-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(var(--accent-rgb),.08);
  transform: translateY(-3px) scale(1.008);
}
.cd-pitch-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--accent);
  margin-bottom: 12px; transition: background .3s;
}
.cd-pitch-card:hover .cd-pitch-icon { background: rgba(var(--accent-rgb),.12); }
.cd-pitch-title {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 4px;
}
.cd-pitch-sub {
  font-size: 12px; color: var(--muted);
}

/* ── Section Headers (multi-event layout) ── */
.cd-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  margin-top: 8px;
}
.cd-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cd-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-section-divider {
  height: 1px;
  background: var(--border);
  margin: 28px 0 20px;
}

/* ── Status Pills ── */
.cd-status-proposed {
  background: rgba(255,179,71,.12);
  color: var(--vita-v);
}
.cd-status-went {
  background: rgba(196,113,237,.12);
  color: var(--vita-t);
}

/* ── Proposed Event Cards ── */
.cd-proposed-by {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.cd-proposed-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.cd-interest-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cd-interest-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  border: 1.5px solid;
  font-family: inherit;
  background: transparent;
}
.cd-interest-down {
  border-color: var(--green);
  color: var(--green);
  background: rgba(74,222,128,.06);
}
.cd-interest-down:hover { background: rgba(74,222,128,.15); }
.cd-interest-maybe {
  border-color: #fbbf24;
  color: #fbbf24;
  background: rgba(251,191,36,.06);
}
.cd-interest-maybe:hover { background: rgba(251,191,36,.15); }
.cd-interest-pass {
  border-color: rgba(255,255,255,.12);
  color: var(--muted);
}
.cd-interest-pass:hover { background: rgba(255,255,255,.06); }
.cd-vote-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.cd-vote-dot.g { background: var(--green, #4ade80); }
.cd-vote-dot.y { background: #fbbf24; }
.cd-voted-count {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 2px;
}
.cd-respondent-info {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.cd-needs-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  font-style: italic;
}

/* ── Past Event / Memory Cards ── */
.cd-photo-strip {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.cd-photo-thumb {
  flex: 1;
  height: 48px;
  border-radius: 8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .cd-bento { grid-template-columns: repeat(2, 1fr); }
  .cd-span-2 { grid-column: span 2; }
}
@media (max-width: 600px) {
  .cd-bento { grid-template-columns: 1fr; }
  .cd-span-2 { grid-column: span 1; }
  .cd-tabs { padding: 0 12px; }
  .cd-tab { padding: 7px 8px; font-size: 10px; gap: 4px; }
  .cd-tab-icon { width: 13px; height: 13px; }
  .cd-dash { padding: 12px; }
  .cd-countdown-num { font-size: 40px; }
}

/* ── Dashboard back button ── */
.cd-dash-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 16px;
  transition: all .15s;
}
.cd-dash-back:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
}

/* ── Empty states ── */
.cd-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  text-align: center;
}

/* ─── "Blueprint" treatment for empty bento cards ──────────────
   When a card has nothing filled in yet, quiet it down so the
   Board reads as a blueprint of what could be added — not a
   set of loud empty boxes shouting at the user. */
.cd-card:has(.cd-empty-state) {
  border-style: dashed;
  border-color: rgba(255,255,255,.08);
  background: rgba(15,15,30,.25);
}
.cd-card:has(.cd-empty-state) .cd-stripe {
  opacity: .35;
  height: 2px;
}
.cd-card:has(.cd-empty-state) .cd-card-type {
  opacity: .55;
}
.cd-card:has(.cd-empty-state) .cd-empty-icon {
  opacity: .35;
}
.cd-card:has(.cd-empty-state) .cd-empty-text {
  color: #7b8ba5;
  font-size: 12px;
  opacity: .75;
}
/* Make the +Add affordance the primary visual when empty,
   so the user knows exactly how to populate the slot. */
.cd-card:has(.cd-empty-state) .cd-add-btn {
  opacity: 1;
  border-style: solid;
  border-color: rgba(196,113,237,.25);
  color: #c8cdd8;
  background: rgba(196,113,237,.04);
  transition: background .15s, border-color .15s, color .15s, transform .15s cubic-bezier(.34, 1.56, .64, 1);
}
.cd-card:has(.cd-empty-state) .cd-add-btn:hover {
  background: rgba(196,113,237,.12);
  border-color: rgba(196,113,237,.45);
  color: #fff;
  transform: translateY(-1px);
}

/* ─── "+ Add module" placeholder card ──────────────────────
   Sits at the end of the bento for single-event crews,
   inviting the user to add optional modules (Camp, Food, etc).
   Visually echoes the blueprint treatment so it feels native. */
.cd-card.cd-add-module {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px;
  background: rgba(15,15,30,.2);
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 16px;
  color: #c8cdd8;
  cursor: pointer; font-family: inherit; text-align: left;
  transition: background .15s, border-color .15s, transform .15s cubic-bezier(.34, 1.56, .64, 1);
  /* Override .cd-card hover effects so the dashed look stays clean */
  box-shadow: none;
}
.cd-card.cd-add-module:hover {
  background: rgba(196,113,237,.06);
  border-color: rgba(196,113,237,.4);
  transform: translateY(-1px) scale(1);  /* no scale, just lift */
  box-shadow: none;
}
.cd-add-module-icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,179,71,.16), rgba(255,107,157,.14));
  color: #ffb347;
  flex-shrink: 0;
}
.cd-add-module-icon svg { width: 18px; height: 18px; }
.cd-add-module-text {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.cd-add-module-title {
  font-size: 13px; font-weight: 700; color: #fff;
}
.cd-add-module-sub {
  font-size: 11px; color: #7b8ba5;
}
.cd-empty-state.cd-empty-sm {
  padding: 10px 8px;
}
.cd-empty-icon {
  font-size: 28px;
  opacity: 0.7;
}
.cd-empty-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════
   CHANNELS — Crew Chat
   ═══════════════════════════════════════════════════════════ */
.cc-layout {
  display: grid; grid-template-columns: 240px 1fr 260px;
  flex: 1; min-height: 0; height: 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

/* Channel sidebar */
.cc-sidebar {
  border-right: 1px solid var(--border); padding: 16px 0;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(124,156,255,.06) 0%, rgba(0,0,0,.14) 100%);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.cc-sidebar-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
  padding: 4px 14px 8px; margin: 0;
}
.cc-channel {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px; font-size: 13px; cursor: pointer;
  color: var(--muted); transition: color .15s, background .15s, transform .2s cubic-bezier(.34, 1.56, .64, 1);
  border: none; background: none; width: 100%;
  font-family: inherit; text-align: left;
}
.cc-channel:hover { color: var(--text-primary); background: rgba(255,255,255,.04); transform: translateX(3px); }
.cc-channel:active { transform: scale(.96); transition-duration: .06s; }
.cc-channel.active {
  color: var(--accent); background: rgba(var(--accent-rgb),.12);
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}
.cc-channel-icon { font-size: 15px; flex-shrink: 0; width: 20px; text-align: center; }
.cc-channel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-channel-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 50%;
  background: #ff6b9d; font-size: 10px; font-weight: 700; color: white;
  display: flex; align-items: center; justify-content: center;
  animation: cc-badgePulse 2s ease-in-out infinite;
}
@keyframes cc-badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Delete button on custom channels */
.cc-channel-del {
  font-size: 16px; line-height: 1; color: var(--muted);
  opacity: 0; transition: opacity .15s, color .15s;
  padding: 0 2px; cursor: pointer; flex-shrink: 0;
}
.cc-channel:hover .cc-channel-del { opacity: .6; }
.cc-channel-del:hover { opacity: 1 !important; color: #f87171; }

/* "+ New Channel" button */
.cc-add-channel {
  border-top: 1px solid var(--border) !important;
  margin-top: 4px; padding-top: 10px !important;
  color: var(--muted) !important; opacity: .7;
  transition: opacity .15s;
}
.cc-add-channel:hover { opacity: 1; }
/* Template items in sidebar */
.cc-template-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px;
  margin: 4px 8px 4px 0;
  border: none; border-left: 3px solid rgba(124,156,255,.7);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(135deg, rgba(124,156,255,.15) 0%, rgba(196,113,237,.08) 100%);
  color: #ffffffee; font-family: inherit; font-size: 13px; font-weight: 600;
  text-align: left; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.06);
  transition: all .2s cubic-bezier(.34, 1.56, .64, 1);
}
.cc-template-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(124,156,255,.28) 0%, rgba(196,113,237,.16) 100%);
  border-left-color: var(--accent);
  transform: translateX(4px) scale(1.03);
  box-shadow: 0 4px 12px rgba(124,156,255,.25), inset 0 1px 0 rgba(255,255,255,.1);
}
.cc-template-btn:active {
  transform: scale(.95); transition-duration: .06s;
}
.cc-template-btn.active {
  color: var(--accent); font-weight: 700;
  border-left-color: var(--accent);
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.22) 0%, rgba(196,113,237,.1) 100%);
  box-shadow: 0 2px 10px rgba(var(--accent-rgb),.2);
}
.cc-template-icon {
  font-size: 16px; flex-shrink: 0; width: 22px; text-align: center;
  filter: drop-shadow(0 0 3px rgba(124,156,255,.4));
}
.cc-template-label {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .3px;
}

/* Template checklist view */
.cc-tmpl-wrap {
  padding: 20px;
  max-width: 560px;
}
.cc-tmpl-progress {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.cc-tmpl-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent, #7c9cff), #a78bfa);
  border-radius: 3px;
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}
.cc-tmpl-progress-label {
  font-size: 11px;
  color: var(--muted, #6b7a99);
  margin-bottom: 20px;
  font-weight: 600;
}
.cc-tmpl-section {
  margin-bottom: 18px;
}
.cc-tmpl-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #e7ebf3);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border, #1e2533);
}
.cc-tmpl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  font-size: 13px;
  color: var(--text, #e7ebf3);
}
.cc-tmpl-item:hover {
  background: rgba(255,255,255,.04);
}
.cc-tmpl-item.checked .cc-tmpl-text {
  text-decoration: line-through;
  opacity: .45;
}
.cc-tmpl-check {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.cc-tmpl-text {
  flex: 1;
  line-height: 1.4;
}

.cc-add-channel .cc-channel-icon {
  font-size: 14px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb),.15); color: var(--accent);
}

/* Inline add-channel form */
.cc-add-form {
  padding: 10px 14px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.cc-add-emoji-row {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.cc-add-emoji-opt {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid transparent;
  background: none; font-size: 15px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all .15s;
}
.cc-add-emoji-opt:hover { background: rgba(255,255,255,.06); }
.cc-add-emoji-opt.selected {
  border-color: var(--accent); background: rgba(var(--accent-rgb),.12);
}
.cc-add-input {
  padding: 7px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px;
  font-family: inherit; outline: none;
  transition: border-color .15s;
}
.cc-add-input:focus { border-color: var(--accent); }
.cc-add-input::placeholder { color: var(--muted); }
.cc-add-actions {
  display: flex; gap: 6px;
}
.cc-add-save {
  flex: 1; padding: 7px; border-radius: 8px; border: none;
  background: var(--accent); color: var(--bg);
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: filter .15s;
}
.cc-add-save:hover { filter: brightness(1.15); }
.cc-add-save:disabled { opacity: .5; cursor: not-allowed; }
.cc-add-cancel {
  padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: none;
  color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.cc-add-cancel:hover { border-color: var(--text); color: var(--text); }

/* Message area */
.cc-messages {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(30,30,40,.5) 0%, rgba(15,15,25,.7) 100%);
}
.cc-msg-header {
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cc-msg-header-icon { font-size: 18px; }
.cc-msg-header-name { font-size: 15px; font-weight: 700; }
.cc-msg-header-desc { font-size: 11px; color: var(--muted); margin-left: auto; }

.cc-msg-scroll {
  flex: 1; overflow-y: auto; padding: 16px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.cc-msg {
  padding: 6px 4px; display: flex; gap: 10px; align-items: flex-start;
  animation: cc-msgIn .3s cubic-bezier(.16, 1, .3, 1) both;
  border-radius: 6px; transition: background .15s;
}
.cc-msg:hover { background: rgba(255,255,255,.02); }
@keyframes cc-msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cc-msg-av {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--surface); display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 600;
  overflow: hidden;
}
.cc-msg-av img { width: 100%; height: 100%; object-fit: cover; }
.cc-msg-body { flex: 1; min-width: 0; }
.cc-msg-author {
  font-size: 13px; font-weight: 700; margin-bottom: 2px;
  display: flex; align-items: baseline; gap: 8px;
}
.cc-msg-author .cc-msg-time {
  font-weight: 400; color: var(--muted); font-size: 10px; margin-left: 6px;
}
.cc-msg-text { font-size: 13px; line-height: 1.55; word-break: break-word; }
.cc-msg-text .cc-at {
  color: var(--accent); font-weight: 600;
  background: rgba(var(--accent-rgb),.15); padding: 1px 4px; border-radius: 3px;
}

/* Pin indicator on message */
.cc-msg-pin {
  font-size: 10px; color: #ffb347; margin-left: 6px;
  cursor: pointer; opacity: 0; transition: opacity .15s;
}
.cc-msg:hover .cc-msg-pin { opacity: 1; }
.cc-msg-pin.pinned { opacity: 1; }

/* Compose bar — old standalone styles kept for send button */
.cc-compose-send {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--bg); border: none;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  transition: filter .15s, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.cc-compose-send:hover { filter: brightness(1.15); transform: scale(1.08); }
.cc-compose-send:active { transform: scale(.88); transition-duration: .06s; }
.cc-compose-send svg { width: 14px; height: 14px; }

/* Pinned sidebar */
.cc-pinned {
  border-left: 1px solid var(--border); padding: 16px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(196,113,237,.05) 0%, rgba(0,0,0,.1) 100%);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.cc-pinned-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin: 0 0 10px;
}
.cc-pinned-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  font-size: 12px; line-height: 1.5;
  cursor: pointer; transition: border-color .15s;
}
.cc-pinned-card:hover { border-color: rgba(255,255,255,.15); }
.cc-pinned-card-author {
  font-size: 10px; font-weight: 600; color: var(--muted); margin-bottom: 3px;
}
.cc-pinned-card-text { word-break: break-word; }
.cc-pinned-empty {
  font-size: 12px; color: var(--muted); text-align: center;
  padding: 20px 8px;
}

/* ── Crew header in sidebar ── */
.cc-crew-header {
  padding: 12px 16px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.cc-crew-name {
  font-size: 15px; font-weight: 800;
  display: flex; align-items: center; gap: 6px;
}
.cc-crew-event {
  font-size: 11px; color: var(--muted); margin-top: 3px;
}

/* ── DM avatars in sidebar ── */
.cc-dm-avatar {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #7c9cff, #c471ed);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; overflow: hidden;
}
.cc-dm-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Compose bar overhaul — action buttons ── */
.cc-compose {
  padding: 12px 20px; border-top: 1px solid var(--border); position: relative;
  background: linear-gradient(0deg, rgba(124,156,255,.04) 0%, transparent 100%);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cc-compose-inner {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  transition: border-color .2s;
}
.cc-compose-inner:focus-within { border-color: var(--accent); }
.cc-compose-inner .cc-compose-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 13px; font-family: inherit;
  padding: 0; box-shadow: none; resize: none;
}
.cc-compose-inner .cc-compose-input::placeholder { color: var(--muted); }
.cc-compose-actions {
  display: flex; gap: 4px; align-items: center;
}
.cc-compose-act {
  width: 28px; height: 28px; border-radius: 6px; border: none; background: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.cc-compose-act:hover { background: rgba(255,255,255,.06); color: var(--text-primary); }

/* ── Rich embeds in messages ── */
.cc-embed {
  margin-top: 8px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
}
.cc-embed-vehicle { border-left-color: #22d3ee; }
.cc-embed-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.cc-embed-body { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ── Task embeds ── */
.cc-task-embed {
  margin-top: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.cc-task-check {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid rgba(255,255,255,.15);
  flex-shrink: 0; cursor: pointer;
  transition: all .15s;
}
.cc-task-check.done {
  background: #4ade80; border-color: #4ade80;
}
.cc-task-text { font-size: 12px; font-weight: 600; flex: 1; }
.cc-task-text.cc-task-done { text-decoration: line-through; color: var(--muted); }
.cc-task-assignee { font-size: 10px; color: var(--muted); }

/* ── Poll embeds with gradient bars ── */
.cc-poll-embed {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.cc-poll-q { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.cc-poll-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; cursor: pointer;
}
.cc-poll-bar-track {
  flex: 1; height: 28px; border-radius: 6px;
  background: rgba(255,255,255,.04);
  position: relative; overflow: hidden;
}
.cc-poll-bar-fill {
  position: absolute; inset: 0;
  border-radius: 6px;
  transform-origin: left;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}
.cc-poll-bar-label {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 600; z-index: 1;
  white-space: nowrap;
}
.cc-poll-pct {
  font-size: 12px; font-weight: 700; width: 36px; text-align: right;
  color: var(--muted);
}
.cc-poll-opt.voted .cc-poll-pct { color: var(--accent); }
.cc-poll-meta {
  font-size: 10px; color: var(--muted); margin-top: 6px;
}

/* ── Inline poll creator ── */
.cc-inline-creator {
  padding: 10px 0 8px;
  display: flex; flex-direction: column; gap: 8px;
  width: 100%;
}
.cc-ic-question {
  padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 13px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.cc-ic-question:focus { border-color: var(--accent); }
.cc-ic-question::placeholder { color: var(--muted); }
.cc-ic-options {
  display: flex; flex-direction: column; gap: 6px;
}
.cc-ic-opt {
  padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 12px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.cc-ic-opt:focus { border-color: var(--accent); }
.cc-ic-opt::placeholder { color: var(--muted); }
.cc-ic-actions {
  display: flex; align-items: center; gap: 6px;
  padding-top: 4px;
}
.cc-ic-add-opt {
  padding: 5px 10px; border-radius: 6px; border: 1px dashed var(--border);
  background: none; color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.cc-ic-add-opt:hover { border-color: var(--accent); color: var(--accent); }
.cc-ic-cancel {
  padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border);
  background: none; color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.cc-ic-cancel:hover { color: var(--text); border-color: rgba(255,255,255,.15); }
.cc-ic-submit {
  padding: 5px 14px; border-radius: 6px; border: none;
  background: var(--accent); color: var(--bg); font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: filter .15s;
}
.cc-ic-submit:hover { filter: brightness(1.15); }

/* ── Emoji picker popup ── */
.cc-emoji-picker {
  position: absolute; bottom: 100%; right: 0;
  margin-bottom: 6px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  z-index: 20;
}
.cc-ep-btn {
  width: 34px; height: 34px; border: none; background: none;
  border-radius: 6px; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.cc-ep-btn:hover { background: rgba(255,255,255,.08); }

/* ── Pinned cards — enhanced ── */
.cc-pinned-card-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: #ffb347; margin-bottom: 4px;
}

/* ── Ride summary — "Who's Riding Where" cards ── */
.cc-ride-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px;
  cursor: pointer; transition: border-color .15s;
}
.cc-ride-card:hover { border-color: rgba(255,255,255,.15); }
.cc-ride-card-title {
  font-size: 12px; font-weight: 600; margin-bottom: 4px;
}
.cc-ride-card-detail {
  font-size: 10px; color: var(--muted); margin-bottom: 6px;
}
.cc-ride-card-tags {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.cc-ride-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 100px;
  font-size: 11px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.08);
}
.cc-ride-open { color: #4ade80; }

@media (max-width: 768px) {
  .cc-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: calc(100dvh - 140px - 60px - env(safe-area-inset-bottom, 0px));
  }
  .cc-sidebar {
    border-right: none; border-bottom: 1px solid var(--border);
    display: flex; gap: 0; padding: 0; overflow-x: auto;
    -webkit-overflow-scrolling: touch; position: relative;
  }
  .cc-crew-header { display: none; }
  .cc-sidebar-title { display: none; }
  .cc-dm-item { display: none; }
  .cc-template-btn { display: none; }
  .cc-channel {
    white-space: nowrap; padding: 10px 12px; font-size: 12px;
    border-bottom: 2px solid transparent;
  }
  .cc-channel.active {
    border-bottom-color: var(--accent); background: none;
    color: var(--accent); font-weight: 700;
    border-left: none; padding-left: 12px;
  }
  .cc-channel-del { display: none; } /* hide delete on mobile tab bar */
  .cc-add-channel {
    border-top: none !important; margin-top: 0 !important; padding-top: 10px !important;
    border-left: 1px solid var(--border);
  }
  .cc-add-form {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 5;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: row; flex-wrap: wrap; padding: 8px 12px; gap: 6px;
  }
  .cc-add-emoji-row { flex: 1 1 100%; }
  .cc-add-input { flex: 1; min-width: 0; }
  .cc-add-actions { flex-shrink: 0; }
  .cc-pinned { display: none; }
  .cc-msg-scroll { padding: 10px 12px; }
  .cc-compose { padding: 8px 12px; }
  .cc-compose-inner { padding: 6px 10px; }
  .cc-compose-act { width: 24px; height: 24px; font-size: 12px; }
  .cc-msg-header-desc { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   Crew Switcher Bar — tab-like crew navigation
   ═══════════════════════════════════════════════════════════ */
.crew-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  position: sticky;
  top: 56px;
  z-index: 12;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* Desktop pills row */
.cs-pills-desktop {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
  scrollbar-width: none;
}
.cs-pills-desktop::-webkit-scrollbar { display: none; }

.cs-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all .15s ease;
  flex-shrink: 0;
}
.cs-pill:hover {
  background: rgba(255,255,255,.06);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.cs-pill:active {
  transform: scale(.95);
  transition-duration: .08s;
}
.cs-pill.active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb),.3);
}
.cs-pill-emoji {
  font-size: 14px;
  line-height: 1;
}
.cs-pill-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Manage + New buttons */
.cs-manage, .cs-new {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  transition: all .15s;
}
.cs-manage:hover, .cs-new:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.cs-manage:active, .cs-new:active {
  transform: scale(.92);
  transition-duration: .06s;
}

/* Mobile hamburger — hidden on desktop */
.cs-hamburger {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex: 1;
  transition: all .15s;
}
.cs-hamburger:hover {
  border-color: var(--accent);
}
.cs-hamburger.open svg {
  transform: rotate(180deg);
}
.cs-hamburger svg {
  margin-left: auto;
  transition: transform .2s ease;
}
.cs-ham-emoji {
  font-size: 16px;
}

/* Dropdown (mobile) */
.cs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 12px;
  right: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  overflow: hidden;
  z-index: 200;
  animation: csDropIn .2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes csDropIn {
  from { opacity: 0; transform: translateY(-8px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cs-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background .1s;
}
.cs-dropdown-item:hover {
  background: rgba(255,255,255,.06);
}
.cs-dropdown-item.active {
  color: var(--accent);
  font-weight: 700;
}
.cs-dropdown-item svg {
  margin-left: auto;
}
.cs-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.cs-dropdown-manage, .cs-dropdown-new {
  color: var(--muted) !important;
  font-size: 13px !important;
}
.cs-dropdown-manage:hover, .cs-dropdown-new:hover {
  color: var(--accent) !important;
}

/* ─── Mobile: swap pills for hamburger ─── */
@media (max-width: 760px) {
  .cs-pills-desktop { display: none; }
  .cs-manage { display: none; }
  .cs-hamburger { display: flex; }
  .crew-switcher { padding: 8px 12px; }
}

/* ─── Desktop: topbar is the primary header row ─── */
/* ── Unified single-bar header ────────────────────────── */
.crews-detail-page .crew-topbar--unified {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 0 16px;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  gap: 10px;
  display: flex;
  align-items: center;
}
.crews-detail-page .crew-topbar--unified::after { display: none; }
.crews-detail-page .crew-topbar--unified .crew-topbar-emoji { display: inline; font-size: 18px; flex-shrink: 0; }
.crews-detail-page .crew-topbar--unified .crew-topbar-info { flex: 0 1 auto; min-width: 0; }
.crews-detail-page .crew-topbar--unified .crew-topbar-name {
  font-size: 14px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.crews-detail-page .crew-topbar--unified .crew-topbar-meta { display: none; }

/* Tabs sit in the center of the unified bar */
.crew-topbar-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  position: relative;
  border-bottom: none !important;
  padding: 0 !important;
  background: none !important;
}
.crew-topbar-tabs .cd-tab {
  padding: 12px 10px;
  font-size: 11px;
  border-bottom: none;
}
.crew-topbar-tabs .cd-tab.active::after {
  bottom: -1px; /* align underline to topbar's border-bottom */
}

/* Right cluster: members badge + action buttons */
.crew-topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.crew-topbar-right .crew-members-badge {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
}
.crew-topbar-right .crew-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Members badge — inline in unified topbar */
.crew-members-badge {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  transition: border-color .15s, background .15s;
}
.crew-members-badge:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb),.06);
}
.crew-mb-avatars {
  display: flex;
  align-items: center;
}
.crew-mb-av {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--bg);
  margin-left: -6px;
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,.08);
}
.crew-mb-av:first-child { margin-left: 0; }
img.crew-mb-av { display: inline-block; }
.crew-mb-count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  margin-left: 4px;
}
/* Flyout dropdown */
.crew-mb-flyout {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 50;
}
.crew-mb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background .12s;
}
.crew-mb-item:hover { background: rgba(255,255,255,.06); }
.crew-mb-item-av {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--muted);
  background: rgba(255,255,255,.08);
  flex-shrink: 0;
}
img.crew-mb-item-av { display: inline-block; }
.crew-mb-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-mb-admin-badge {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  color: var(--accent); letter-spacing: .5px;
}

@media (max-width: 760px) {
  .crews-detail-page .crew-topbar--unified {
    padding: 0 10px;
    gap: 6px;
  }
  .crews-detail-page .crew-topbar--unified .crew-topbar-name {
    max-width: 100px;
    font-size: 13px;
  }
  /* Hide inline tabs on mobile — mobile dock handles navigation */
  .crew-topbar-tabs { display: none !important; }
  /* Tighten right cluster on mobile */
  .crew-topbar-right { gap: 4px; }
  .crew-topbar-right .crew-topbar-actions { gap: 2px; }
}

/* ══════════════════════════════════════════════════════════════
   Galaxy — 3D orbital view (iframe)
   ══════════════════════════════════════════════════════════════ */

.cd-galaxy {
  width: 100%;
  height: 100%;
  min-height: 500px;
  position: relative;
}
.cd-galaxy-container {
  width: 100%;
  height: 100%;
  min-height: 500px;
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.cd-galaxy-iframe {
  width: 100%;
  height: 100%;
  min-height: 500px;
  border: none;
  opacity: 0;
  transition: opacity .4s ease;
}
.cd-galaxy-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  z-index: 2;
}
.cd-galaxy-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cdGalaxySpin .8s linear infinite;
}
@keyframes cdGalaxySpin {
  to { transform: rotate(360deg); }
}

/* Sets panel — solid background. Intentionally NO overflow-y:auto here:
   - The panel never had a height constraint so the overflow rule did nothing
     useful, but it DID create a scrolling-context that broke `position: sticky`
     on stage-column headers (sticky climbs to the nearest scrolling ancestor).
   - Page scroll lives on .crews-page.crew-fullscreen, which is what we want
     sticky elements to anchor to. */
.cd-panel[data-panel="sets"].active {
  padding-bottom: 0;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

/* Galaxy panel needs no bottom padding — iframe fills the space */
.cd-panel[data-panel="galaxy"].active {
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
}
@media (max-width: 600px) {
  .cd-panel[data-panel="galaxy"].active {
    height: calc(100vh - 120px);
  }
  .cd-galaxy, .cd-galaxy-container, .cd-galaxy-iframe {
    min-height: 400px;
  }
}

/* ══════════════════════════════════════════════════════════════
   Find a Time — When2Meet-style availability scheduler
   ══════════════════════════════════════════════════════════════ */

.cd-findtime {
  padding: 16px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Empty state ── */
.cd-findtime .ft-empty {
  text-align: center;
  padding: 48px 20px;
}
.cd-findtime .ft-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.cd-findtime .ft-empty h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.cd-findtime .ft-empty p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}
.cd-findtime .ft-create-btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .15s, transform .15s;
}
.cd-findtime .ft-create-btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.cd-findtime .ft-create-btn-big {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; font-size: 15px; border-radius: 14px;
  background: linear-gradient(135deg, #4ade80, #22d3ee);
  color: #0b1120; box-shadow: 0 4px 20px rgba(74,222,128,.25);
}
.cd-findtime .ft-create-btn-big:hover { box-shadow: 0 6px 28px rgba(74,222,128,.4); }
.ft-empty-visual { display: flex; flex-direction: column; align-items: center; }
.ft-ex-wrapper {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 16px; max-width: 360px; width: 100%;
}
.ft-ex-header-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ft-ex-grid { display: flex; flex-direction: column; gap: 2px; }
.ft-ex-row { display: flex; gap: 2px; }
.ft-ex-row-header .ft-ex-hcell { font-size: 11px; color: var(--muted); font-weight: 600; text-align: center; }
.ft-ex-time { width: 36px; flex-shrink: 0; font-size: 10px; color: var(--muted); display: flex; align-items: center; }
.ft-ex-hcell, .ft-ex-cell { flex: 1; height: 28px; border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 2px; }
.ft-ex-cell { border: 1px solid rgba(255,255,255,.06); }
.ft-ex-bar { width: 4px; height: 16px; border-radius: 2px; opacity: .8; }
.ft-ex-legend { display: flex; gap: 12px; margin-top: 10px; justify-content: center; }
.ft-ex-legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.ft-ex-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.ft-ex-best {
  display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 12px;
  background: rgba(74,222,128,.08); border: 1px solid rgba(74,222,128,.2);
  border-radius: 8px; font-size: 12px; color: rgba(255,255,255,.8);
}

/* ── Create form ── */
.cd-findtime .ft-create-form {
  max-width: 380px;
  margin: 0 auto;
  padding: 20px 0;
}
.cd-findtime .ft-create-form h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  text-align: center;
}
.cd-findtime .ft-form-group {
  margin-bottom: 14px;
}
.cd-findtime .ft-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 6px;
}
.cd-findtime .ft-form-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface, #111827);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
}
.cd-findtime .ft-form-group input::placeholder {
  color: var(--muted, #7b8ba5);
}
.cd-findtime .ft-form-group input[type="date"] {
  color-scheme: dark;
}
.cd-findtime .ft-form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.12);
}
.cd-findtime .ft-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.cd-findtime .ft-form-cancel {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cd-findtime .ft-form-cancel:hover {
  background: rgba(255,255,255,.1);
  color: var(--text);
}
.cd-findtime .ft-form-submit {
  flex: 1;
  padding: 10px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.cd-findtime .ft-form-submit:hover {
  filter: brightness(1.1);
}

/* ── Poll header ── */
.cd-findtime .ft-poll-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.cd-findtime .ft-poll-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cd-findtime .ft-poll-emoji {
  font-size: 28px;
}
.cd-findtime .ft-poll-title {
  font-size: 16px;
  font-weight: 700;
}
.cd-findtime .ft-poll-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.cd-findtime .ft-new-poll-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted);
  transition: background .15s;
}
.cd-findtime .ft-new-poll-btn:hover {
  background: rgba(255,255,255,.12);
  color: var(--text);
}

/* ── Grid ── */
.cd-findtime .ft-grid-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}
.cd-findtime .ft-grid-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}
.cd-findtime .ft-grid-time-spacer {
  width: 48px;
  flex-shrink: 0;
}
.cd-findtime .ft-grid-header-cell {
  flex: 1;
  text-align: center;
  padding: 8px 2px;
  min-width: 0;
}
.cd-findtime .ft-day-name {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cd-findtime .ft-day-date {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}
.cd-findtime .ft-grid-body {
  max-height: 400px;
  overflow-y: auto;
}
.cd-findtime .ft-grid-row {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.cd-findtime .ft-grid-row:last-child {
  border-bottom: none;
}
.cd-findtime .ft-grid-time {
  width: 48px;
  flex-shrink: 0;
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 0 4px;
}
.cd-findtime .ft-grid-cell {
  flex: 1;
  min-height: 32px;
  border-right: 1px solid rgba(255,255,255,.04);
  position: relative;
  cursor: pointer;
  transition: background .1s;
  display: flex;
  align-items: stretch;
}
.cd-findtime .ft-grid-cell:last-child {
  border-right: none;
}
.cd-findtime .ft-grid-cell:hover {
  background: rgba(var(--accent-rgb),.08);
}
.cd-findtime .ft-grid-cell.ft-mine {
  background: rgba(255,107,157,.15);
}
.cd-findtime .ft-grid-cell.ft-mine:hover {
  background: rgba(255,107,157,.22);
}

/* ── Cell bars ── */
.cd-findtime .ft-cell-bars {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0;
  padding: 1px;
  min-height: 0;
}
.cd-findtime .ft-cell-bar {
  flex: 1;
  min-height: 2px;
  border-radius: 1px;
}

/* ── Rainbow glow for all-free cells ── */
.cd-findtime .ft-grid-cell.ft-all-free {
  animation: ft-rainbow-glow 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
.cd-findtime .ft-grid-cell.ft-all-free::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 4px;
  background: linear-gradient(135deg,
    rgba(167,139,250,.3),
    rgba(34,211,238,.3),
    rgba(74,222,128,.3),
    rgba(250,204,21,.3),
    rgba(255,107,157,.3)
  );
  background-size: 300% 300%;
  animation: ft-rainbow-shift 3s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}
@keyframes ft-rainbow-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(167,139,250,.3); }
  25% { box-shadow: 0 0 6px rgba(34,211,238,.3); }
  50% { box-shadow: 0 0 6px rgba(74,222,128,.3); }
  75% { box-shadow: 0 0 6px rgba(255,107,157,.3); }
}
@keyframes ft-rainbow-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Tooltip ── */
.cd-findtime .ft-tooltip {
  position: absolute;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  transform: translateX(-50%);
}

/* ── Legend ── */
.cd-findtime .ft-legend {
  margin-top: 14px;
  padding: 10px 0;
}
.cd-findtime .ft-legend-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  overflow-x: auto;
}
.cd-findtime .ft-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(255,255,255,.04);
  border-radius: 20px;
  font-size: 12px;
  white-space: nowrap;
}
.cd-findtime .ft-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cd-findtime .ft-legend-name {
  font-weight: 500;
}
.cd-findtime .ft-legend-check {
  color: #4ade80;
  font-size: 11px;
}
.cd-findtime .ft-legend-pending {
  opacity: .5;
}
.cd-findtime .ft-legend-status {
  font-size: 11px;
}

/* ── Email Opt-in Checkbox ── */
.cd-findtime .ft-email-optin {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  user-select: none;
  -webkit-user-select: none;
}
.cd-findtime .ft-email-optin:hover {
  border-color: rgba(255,179,71,.25);
  background: rgba(255,179,71,.04);
}
.cd-findtime .ft-email-optin input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.cd-findtime .ft-email-optin-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  position: relative;
}
.cd-findtime .ft-email-optin-check::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--vita-v), var(--vita-i));
  transform: scale(0);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}
.cd-findtime .ft-email-optin input:checked ~ .ft-email-optin-check {
  border-color: rgba(255,179,71,.5);
  background: rgba(255,179,71,.08);
}
.cd-findtime .ft-email-optin input:checked ~ .ft-email-optin-check::after {
  transform: scale(1);
}
.cd-findtime .ft-email-optin-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s;
}
.cd-findtime .ft-email-optin input:checked ~ .ft-email-optin-text {
  color: var(--text);
}

/* ── Best Times ── */
.cd-findtime .ft-best-times {
  margin-top: 16px;
  padding: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cd-findtime .ft-best-times h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
}
.cd-findtime .ft-best-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cd-findtime .ft-best-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background .15s, border-color .15s, transform .15s;
}
.cd-findtime .ft-best-slot:hover {
  background: rgba(var(--accent-rgb),.1);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.cd-findtime .ft-best-slot.ft-best-all {
  border-color: rgba(74,222,128,.4);
  background: rgba(74,222,128,.08);
}
.cd-findtime .ft-best-slot.ft-best-all:hover {
  background: rgba(74,222,128,.15);
  border-color: #4ade80;
}
.cd-findtime .ft-best-day {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.cd-findtime .ft-best-hour {
  font-size: 13px;
  font-weight: 600;
}
.cd-findtime .ft-best-pct {
  font-size: 10px;
  color: var(--muted);
}
.cd-findtime .ft-best-star {
  font-size: 12px;
}
.cd-findtime .ft-no-best {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}

/* ── Lock-in modal ── */
.cd-findtime .ft-lock-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ft-fade-in .2s ease;
}
.cd-findtime .ft-lock-modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 340px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.cd-findtime .ft-lock-emoji {
  font-size: 40px;
  margin-bottom: 12px;
}
.cd-findtime .ft-lock-modal h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}
.cd-findtime .ft-lock-detail {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--accent);
}
.cd-findtime .ft-lock-time {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0;
}
.cd-findtime .ft-lock-location {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 8px;
}
.cd-findtime .ft-lock-warning {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 16px;
  line-height: 1.4;
}
.cd-findtime .ft-lock-actions {
  display: flex;
  gap: 10px;
}
.cd-findtime .ft-lock-cancel {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cd-findtime .ft-lock-cancel:hover {
  background: rgba(255,255,255,.1);
  color: var(--text);
}
.cd-findtime .ft-lock-confirm {
  flex: 1;
  padding: 10px;
  background: linear-gradient(135deg, #4ade80, #22d3ee);
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .15s;
}
.cd-findtime .ft-lock-confirm:hover {
  filter: brightness(1.1);
}

/* ── Locked-in celebration ── */
.cd-findtime .ft-locked {
  position: relative;
  text-align: center;
  padding: 48px 20px;
  overflow: hidden;
}
.cd-findtime .ft-locked-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cd-findtime .ft-locked-content {
  position: relative;
  z-index: 2;
  animation: ft-locked-pop .5s cubic-bezier(.34,1.56,.64,1);
}
.cd-findtime .ft-locked-emoji {
  font-size: 56px;
  margin-bottom: 12px;
}
.cd-findtime .ft-locked-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  background: linear-gradient(135deg, #a78bfa, #22d3ee, #4ade80, #facc15, #ff6b9d);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ft-rainbow-shift 3s ease-in-out infinite;
}
.cd-findtime .ft-locked-event {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}
.cd-findtime .ft-locked-time {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 4px;
}
.cd-findtime .ft-locked-location,
.cd-findtime .ft-locked-duration {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}
.cd-findtime .ft-locked-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 18px;
  background: rgba(74,222,128,.1);
  border: 1px solid rgba(74,222,128,.3);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #4ade80;
}

/* Sparkle particles */
.cd-findtime .ft-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.9), transparent);
  animation: ft-sparkle-float ease-in-out infinite;
  pointer-events: none;
}
@keyframes ft-sparkle-float {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px) scale(1.2);
  }
}
@keyframes ft-locked-pop {
  0% { opacity: 0; transform: scale(0.8) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes ft-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* ── Find a Time mobile responsive ── */
@media (max-width: 480px) {
  .cd-findtime { padding: 10px; }
  .cd-findtime .ft-grid-time-spacer { width: 36px; }
  .cd-findtime .ft-grid-time { width: 36px; font-size: 9px; padding: 0 2px; }
  .cd-findtime .ft-grid-cell { min-height: 36px; }
  .cd-findtime .ft-grid-header-cell { padding: 6px 1px; }
  .cd-findtime .ft-day-name { font-size: 10px; }
  .cd-findtime .ft-day-date { font-size: 9px; }
  .cd-findtime .ft-grid-body { max-height: 350px; }
  .cd-findtime .ft-poll-header { flex-direction: column; gap: 8px; }
  .cd-findtime .ft-best-slots { gap: 6px; }
  .cd-findtime .ft-best-slot { padding: 6px 10px; }
  .cd-findtime .ft-legend-section { gap: 6px; }
  .cd-findtime .ft-legend-item { padding: 3px 8px; font-size: 11px; }
  .cd-findtime .ft-locked-title { font-size: 22px; }
  .cd-findtime .ft-locked-emoji { font-size: 44px; }
  .cd-findtime .ft-locked { padding: 32px 16px; }
  .cd-findtime .ft-create-form { padding: 14px; }
  .cd-findtime .ft-lock-modal { padding: 22px 18px; max-width: 300px; }
}

@media (max-width: 360px) {
  .cd-findtime { padding: 6px; }
  .cd-findtime .ft-grid-time-spacer { width: 30px; }
  .cd-findtime .ft-grid-time { width: 30px; font-size: 8px; }
  .cd-findtime .ft-grid-cell { min-height: 32px; }
  .cd-findtime .ft-day-name { font-size: 9px; }
  .cd-findtime .ft-day-date { display: none; }
}

/* ══════════════════════════════════════════════════════════
   Crew Settings Panel
   ══════════════════════════════════════════════════════════ */
.cs-settings-overlay {
  opacity: 0;
  transition: opacity .25s ease;
}
.cs-settings-overlay.visible { opacity: 1; }
.cs-settings-overlay.exiting { opacity: 0; }

.cs-settings-modal {
  max-width: 460px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 20px;
  background: var(--surface, #111827);
  border: 1px solid var(--border, #1f2937);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: csSlideUp .3s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes csSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cs-settings-overlay.exiting .cs-settings-modal {
  animation: csSlideDown .2s ease forwards;
}
@keyframes csSlideDown {
  to { opacity: 0; transform: translateY(15px) scale(.97); }
}

.cs-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border, #1f2937);
}
.cs-settings-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  background: linear-gradient(135deg, #ffb347, #ff6b9d, #c471ed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cs-settings-close {
  background: rgba(255,255,255,.06);
  border: none;
  border-radius: 10px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted, #7b8ba5);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cs-settings-close:hover { background: rgba(255,255,255,.1); color: var(--text, #f0f2f8); }

.cs-settings-body {
  padding: 8px 0;
}

/* Sections */
.cs-section {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border, #1f2937);
}
.cs-section:last-child { border-bottom: none; }

.cs-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #7b8ba5);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
}

/* Field groups */
.cs-field-group {
  margin-bottom: 12px;
}
.cs-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #7b8ba5);
  margin-bottom: 5px;
}
.cs-input {
  width: 100%;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border, #1f2937);
  border-radius: 10px;
  color: var(--text, #f0f2f8);
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom on focus */
  font-family: inherit;
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.cs-input:focus {
  border-color: #ff6b9d;
  box-shadow: 0 0 0 3px rgba(255,107,157,.12);
}

/* Emoji grid */
.cs-emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cs-emoji-opt {
  width: 38px; height: 38px;
  font-size: 18px;
  background: rgba(255,255,255,.03);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
  display: flex; align-items: center; justify-content: center;
}
.cs-emoji-opt:hover { background: rgba(255,255,255,.06); transform: scale(1.1); }
.cs-emoji-opt.selected { border-color: #ff6b9d; background: rgba(255,107,157,.1); }

/* Custom emoji upload */
.cs-emoji-upload { position: relative; color: rgba(255,255,255,.4); }
.cs-emoji-upload:hover { color: rgba(255,255,255,.7); }
.cs-custom-emoji-preview { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
.cs-emoji-uploading {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.2);
  border-top-color: #ff6b9d; border-radius: 50%;
  animation: cs-spin .6s linear infinite;
}
@keyframes cs-spin { to { transform: rotate(360deg); } }

/* Crew URL / slug */
.cs-slug-row {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,.04); border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.cs-slug-prefix {
  padding: 8px 2px 8px 12px; font-size: 13px;
  color: rgba(255,255,255,.4); white-space: nowrap;
  user-select: none;
}
.cs-slug-input {
  border: none !important; background: transparent !important;
  border-radius: 0 !important; padding-left: 0 !important;
  flex: 1; min-width: 0;
}
.cs-slug-preview {
  margin-top: 6px; font-size: 12px; color: rgba(255,255,255,.35);
  font-family: monospace;
}

/* Custom icon inline */
.crew-custom-icon { display: inline-block; border-radius: 4px; }

/* Gradient swatches */
.cs-gradient-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cs-gradient-swatch {
  width: 40px; height: 28px;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.cs-gradient-swatch:hover { transform: scale(1.1); }
.cs-gradient-swatch.selected { border-color: #ff6b9d; box-shadow: 0 0 8px rgba(255,107,157,.3); }

/* Save button */
.cs-save-btn {
  width: 100%;
  padding: 11px;
  margin-top: 6px;
  background: linear-gradient(135deg, #ff6b9d, #c471ed);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter .2s, transform .15s;
}
.cs-save-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cs-save-btn:disabled { opacity: .6; cursor: wait; }

/* ── Members list ─────────────────────────── */
.cs-members-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background .15s;
}
.cs-member-row:hover { background: rgba(255,255,255,.03); }
.cs-member-row.is-me { background: rgba(255,107,157,.04); }

.cs-member-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.cs-member-av img { width: 100%; height: 100%; object-fit: cover; }

.cs-member-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cs-member-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #f0f2f8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-you {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted, #7b8ba5);
}

/* Role badges */
.cs-role-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 2px 7px;
  border-radius: 6px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.cs-role-owner {
  background: rgba(255,179,71,.15);
  color: #ffb347;
}
.cs-role-admin {
  background: rgba(196,113,237,.15);
  color: #c471ed;
}
.cs-role-mod {
  background: rgba(56,189,248,.15);
  color: #38bdf8;
}
.cs-role-member {
  background: rgba(255,255,255,.05);
  color: var(--muted, #7b8ba5);
}

/* Member actions */
.cs-member-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.cs-action-btn {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.cs-promote { background: rgba(196,113,237,.1); color: #c471ed; }
.cs-promote:hover { background: rgba(196,113,237,.2); transform: scale(1.1); }
.cs-demote { background: rgba(255,179,71,.1); color: #ffb347; }
.cs-demote:hover { background: rgba(255,179,71,.2); transform: scale(1.1); }
.cs-remove { background: rgba(248,113,113,.08); color: #f87171; }
.cs-remove:hover { background: rgba(248,113,113,.18); transform: scale(1.1); }

/* ── Danger Zone ─────────────────────────── */
.cs-danger-zone {
  border-bottom: none;
  margin-top: 4px;
  border-top: 1px solid rgba(248,113,113,.15);
  background: rgba(248,113,113,.02);
  border-radius: 0 0 20px 20px;
}
.cs-danger-label { color: #f87171 !important; }
.cs-danger-note {
  font-size: 13px;
  color: var(--muted, #7b8ba5);
  line-height: 1.5;
  margin: 0;
}

.cs-leave-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(248,113,113,.06);
  border: 1px solid rgba(248,113,113,.2);
  border-radius: 10px;
  color: #f87171;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.cs-leave-btn:hover {
  background: rgba(248,113,113,.12);
  border-color: rgba(248,113,113,.35);
  transform: translateY(-1px);
}
.cs-delete-btn {
  border-color: rgba(220,38,38,.4);
  color: #fca5a5;
}
.cs-delete-btn:hover {
  background: rgba(220,38,38,.15);
  border-color: rgba(220,38,38,.5);
}

/* ── Leave Crew Confirmation ─────────────── */
.cs-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .2s ease;
}
.cs-confirm-overlay.visible { opacity: 1; }

.cs-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cs-confirm-card {
  position: relative;
  background: var(--surface, #111827);
  border: 1px solid var(--border, #1f2937);
  border-radius: 18px;
  padding: 28px 24px 22px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  animation: csSlideUp .25s cubic-bezier(.2,.8,.2,1) forwards;
}
.cs-confirm-icon {
  font-size: 36px;
  margin-bottom: 10px;
}
.cs-confirm-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text, #f0f2f8);
}
.cs-confirm-desc {
  font-size: 13px;
  color: var(--muted, #7b8ba5);
  line-height: 1.5;
  margin: 0 0 20px;
}
.cs-confirm-actions {
  display: flex;
  gap: 10px;
}
.cs-confirm-cancel {
  flex: 1;
  padding: 11px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border, #1f2937);
  border-radius: 10px;
  color: var(--text, #f0f2f8);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s;
}
.cs-confirm-cancel:hover { background: rgba(255,255,255,.1); }
.cs-confirm-danger {
  flex: 1;
  padding: 11px;
  background: #f87171;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter .2s, transform .15s;
}
.cs-confirm-danger:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cs-confirm-danger:disabled { opacity: .6; cursor: wait; }

/* Mobile settings */
@media (max-width: 600px) {
  .cs-settings-overlay { padding: 0; align-items: flex-end; }
  .cs-settings-modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90dvh;
  }
  .cs-settings-header { padding: 16px 20px 14px; }
  .cs-section { padding: 14px 20px; }
  .cs-action-btn { width: 36px; height: 36px; }
  .cs-member-actions { gap: 8px; }
  .cs-confirm-overlay { padding: 16px; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE LAYOUT FIXES (<=768px)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── FIX 1: Excessive top spacing ── */
  .crews-page {
    padding-top: 14px;
  }
  .crews-page.crew-fullscreen {
    padding-top: 0;
  }

  /* ── FIX 2: Compact action buttons on mobile ── */
  .crews-detail-page .crew-topbar-back {
    width: 28px; height: 28px; border-radius: 6px;
  }
  .crews-detail-page .crew-topbar-btn {
    width: 28px; height: 28px; border-radius: 6px;
  }
  /* Invite button stays labeled on mobile too — keep auto-width + padding.
     This is the discoverability fix Luca asked for: a visible "Invite" pill
     is hard to miss vs. a tiny share-arrow icon. */
  .crews-detail-page .crew-topbar-btn.crew-topbar-invite {
    width: auto;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
  }
  .crews-detail-page .crew-topbar-actions {
    gap: 4px;
  }

  /* Adjust tabs sticky position — switcher at 56px + ~41px height = 97px */
  .crews-detail-page .cd-tabs {
    top: 97px;
  }
  .crews-detail-page .crew-members-strip {
    position: relative; /* not sticky — saves viewport chrome on mobile */
  }

  /* ── FIX 3: Board heading clipped behind sticky members strip ── */
  .crew-board {
    padding-top: 8px;
  }
  .crew-board-header {
    position: relative;
    z-index: 1;
  }
  [data-panel="board"] {
    padding-top: 8px;
  }

  /* ── FIX 4: Find a Time form — ensure proper sizing on mobile ── */
  .cd-findtime .ft-form-group input[maxlength="4"] {
    width: 64px;
    text-align: center;
    font-size: 24px;
    padding: 8px;
  }

  /* ── FIX 5: "Your Event" card broken colored squares ──
     The cd-section-dot elements render as tiny colored squares
     above the dashboard cards. Hide them on mobile and show
     the section label as a simple text divider instead. */
  .cd-section-dot {
    display: none;
  }
  .cd-section-header {
    margin-top: 4px;
    margin-bottom: 10px;
  }
  .cd-section-label {
    font-size: 10px;
    letter-spacing: 1.2px;
    color: var(--muted);
    opacity: .7;
  }
  /* Also hide the stripe at top of hero card on mobile —
     the thin gradient bar can look broken at full width */
  .cd-card .cd-stripe {
    height: 2px;
    opacity: .6;
  }

  /* ── FIX 6: Chat channel tabs overflow ──
     Add a right fade indicator to hint scrollability.
     On mobile <=768px the sidebar renders as horizontal tab bar. */
  .cc-sidebar {
    position: relative;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .cc-sidebar::-webkit-scrollbar { display: none; }

  /* Fade gradient on right edge of horizontal channel tabs */
  .cc-sidebar::after {
    content: '';
    position: sticky;
    right: 0;
    top: 0;
    flex-shrink: 0;
    width: 36px;
    height: 100%;
    background: linear-gradient(to left, var(--bg, #0b1120) 0%, transparent 100%);
    pointer-events: none;
    margin-left: -36px;
  }
  /* Ensure last channel tab isn't clipped */
  .cc-channel:last-of-type {
    padding-right: 36px;
  }
}

/* ── FIX 4 (all sizes): Emoji input special sizing ── */
.cd-findtime .ft-form-group input[maxlength="4"] {
  width: 64px;
  text-align: center;
  font-size: 24px;
  padding: 8px;
}

/* ══════════════════════════════════════════════���════════════
   SCRAPBOOK — FigJam-style infinite canvas
   ══════════════════════════════════════════��════════════════ */

.scrapbook-root {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Toggle bar — hidden; Add Event is handled by the FAB ── */
.sb-toggle-bar {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  position: relative;
  z-index: 10;
  background: var(--bg, #0b1120);
  border-bottom: 1px solid var(--border, #1e2533);
}
/* Floating iOS-style Past toggle — bottom-right corner */
.sb-past-switch {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 14px;
  background: rgba(11,17,32,.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border, #1e2533);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.sb-past-switch-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #6b7a99);
  user-select: none;
}
/* iOS toggle track */
.sb-ios-toggle {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255,255,255,.12);
  position: relative;
  cursor: pointer;
  transition: background .25s cubic-bezier(.34,1.56,.64,1);
  outline: none;
}
.sb-ios-toggle.on {
  background: var(--accent, #7c9cff);
}
/* iOS toggle knob */
.sb-ios-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.sb-ios-toggle.on .sb-ios-toggle-knob {
  transform: translateX(18px);
}
.sb-add-event-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px dashed var(--accent, #7c9cff);
  background: rgba(var(--accent-rgb),.06);
  color: var(--accent, #7c9cff);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.sb-add-event-btn:hover {
  background: rgba(var(--accent-rgb),.15);
  border-style: solid;
}

/* ── Stage (Desktop canvas) ── */
.sb-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  min-height: 500px;
  background-color: var(--bg, #0b1120);
}
.sb-stage.sb-panning { cursor: grabbing; }

/* Dot grid background — lives inside sb-world so it scales with pan/zoom automatically */
.sb-grid {
  position: absolute;
  inset: -10000px;
  pointer-events: none;
  background-color: var(--bg, #0b1120);
  background-image:
    radial-gradient(circle, rgba(255,255,255,.28) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 200px 200px, 40px 40px;
  background-position: 0 0, 0 0;
  will-change: transform;
}

.sb-world {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  width: 0; height: 0;
  will-change: transform;
}

/* ── Zoom controls — stacked above Past toggle ── */
.sb-zoom-bar {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}
.sb-zoom-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border, #1e2533);
  background: rgba(11,17,32,.8);
  backdrop-filter: blur(12px);
  color: var(--text, #e7ebf3);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.sb-zoom-btn:hover {
  background: rgba(var(--accent-rgb),.15);
  border-color: var(--accent, #7c9cff);
}
/* Home / reset button — stand out from +/- */
.sb-zoom-btn[title="Reset"] {
  font-size: 16px;
  color: var(--accent, #7c9cff);
  border-color: rgba(var(--accent-rgb),.35);
}

/* ══════════════��════════════════════════════════════════
   SCRAPBOOK CARDS — Desktop (absolute positioned on canvas)
   ═══════════════════════════════════════════════════════ */

.sb-card {
  position: absolute;
  width: 290px;
  overflow: visible;
  user-select: none;
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, filter .55s cubic-bezier(.2,.7,.2,1), opacity .5s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}

/* RGB pastel halo bloom */
@property --sb-halo-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.sb-card::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: calc(14px + 18px);
  background: conic-gradient(from var(--sb-halo-angle),
    #ffb6d5, #ffd3a1, #fff6a8, #a8f0e2, #c9b1ff, #e0a8ff, #ffb6d5);
  filter: blur(22px);
  opacity: 0;
  transition: opacity .45s ease;
  z-index: 0;
  pointer-events: none;
  animation: sbHaloSpin 4s linear infinite;
}
.sb-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(14px + 2px);
  padding: 2px;
  background: conic-gradient(from var(--sb-halo-angle),
    #ffb6d5, #ffd3a1, #fff6a8, #a8f0e2, #c9b1ff, #e0a8ff, #ffb6d5);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .35s ease;
  z-index: 2;
  pointer-events: none;
  animation: sbHaloSpin 4s linear infinite;
}
.sb-card:hover::before { opacity: .34; }
.sb-card:hover::after  { opacity: .36; }
.sb-card:hover { box-shadow: 0 20px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04); }

@keyframes sbHaloSpin {
  to { --sb-halo-angle: 360deg; }
}
/* Firefox fallback */
@supports not (background: conic-gradient(from var(--sb-halo-angle), red, blue)) {
  @keyframes sbHaloSpin {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
  }
}

/* Focus mode */
.sb-stage.sb-focus-mode .sb-card:not(.sb-focused) {
  filter: blur(7px) saturate(.8);
  opacity: .28;
  transform: scale(.985) !important;
  pointer-events: none;
}
.sb-stage.sb-focus-mode .sb-card.sb-focused { z-index: 30; }
.sb-stage.sb-focus-mode .sb-grid { filter: brightness(.55); transition: filter .55s ease; }

/* ── Card inner content ── */
.sb-card-inner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel, #13161c);
  border: 1px solid var(--border, #1e2533);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  z-index: 1;
}

.sb-grip {
  padding: 8px 12px;
  background: linear-gradient(180deg, #1a1f28, #141821);
  border-bottom: 1px solid var(--border, #1e2533);
  cursor: grab;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted, #6b7a99);
}
.sb-grip:active { cursor: grabbing; }
.sb-type {
  color: #cfd7ea;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sb-proposed-by {
  font-size: 10px;
}

.sb-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #0f1218 center/cover no-repeat;
  border-bottom: 1px solid var(--border, #1e2533);
}

.sb-body { padding: 12px 14px; }
.sb-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; line-height: 1.2; color: var(--text, #e7ebf3); }
.sb-meta { font-size: 11px; color: var(--muted, #6b7a99); margin-bottom: 8px; line-height: 1.4; }
.sb-pitch {
  font-size: 13px;
  color: #cfd5e2;
  margin: 0 0 10px;
  line-height: 1.35;
}

/* ── Vote buttons ── */
.sb-votes { display: flex; gap: 6px; margin-bottom: 8px; }
.sb-vbtn {
  flex: 1;
  border: 1px solid var(--border, #1e2533);
  background: #0f1218;
  color: var(--text, #e7ebf3);
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: inherit;
  transition: background .15s, border-color .15s;
}
.sb-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.sb-vbtn-g .sb-dot { background: #2ecc71; }
.sb-vbtn-y .sb-dot { background: #f1c40f; }
.sb-vbtn-r .sb-dot { background: #ff5a5f; }
.sb-vbtn-g.active { border-color: #2ecc71; background: rgba(46,204,113,.12); }
.sb-vbtn-y.active { border-color: #f1c40f; background: rgba(241,196,15,.12); }
.sb-vbtn-r.active { border-color: #ff5a5f; background: rgba(255,90,95,.12); }
.sb-vbtn:hover { background: rgba(255,255,255,.05); }

/* ── Vote chips ── */
.sb-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sb-chip {
  font-size: 10px; font-weight: 800;
  padding: 3px 6px; border-radius: 999px;
  border: 1px solid var(--border, #1e2533);
  background: #0f1218;
  letter-spacing: .04em;
}
.sb-chip-g { border-color: #2ecc71; color: #2ecc71; }
.sb-chip-y { border-color: #f1c40f; color: #f1c40f; }

/* Plan It button on scrapbook cards */
.sb-plan-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 10px; padding: 10px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(135deg, rgba(74,222,128,.15), rgba(34,211,238,.15));
  border: 1px solid rgba(74,222,128,.3);
  color: #4ade80; cursor: pointer;
  transition: all .2s cubic-bezier(.16, 1, .3, 1);
  font-family: inherit;
}
.sb-plan-btn:hover {
  background: linear-gradient(135deg, rgba(74,222,128,.25), rgba(34,211,238,.25));
  border-color: rgba(74,222,128,.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(74,222,128,.15);
}
.sb-chip-r { border-color: #ff5a5f; color: #ff5a5f; }
.sb-chip-photo {
  padding: 0; width: 22px; height: 22px; overflow: hidden;
}
.sb-chip-photo img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  display: block;
}

/* ── Emoji reactions row ── */
.sb-reactions-row {
  padding: 8px 12px;
  border-top: 1px solid var(--border, #1e2533);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  background: #0f1218;
}
.sb-reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border, #1e2533);
  background: transparent;
  color: var(--text, #e7ebf3);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.sb-reaction:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.05); }
.sb-reaction.active { border-color: var(--accent, #7c9cff); background: rgba(var(--accent-rgb),.1); }
.sb-reaction-count { font-size: 11px; font-weight: 700; }
.sb-add-reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  background: transparent;
  border: 1px dashed var(--border, #1e2533);
  color: var(--muted, #6b7a99);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.sb-add-reaction:hover { border-color: var(--accent, #7c9cff); color: var(--accent, #7c9cff); }

/* ── Comments section ── */
.sb-comments-section {
  border-top: 1px solid var(--border, #1e2533);
  background: #0c0f14;
}
.sb-comments-toggle {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--muted, #6b7a99);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-family: inherit;
  transition: color .15s, background .15s;
}
.sb-comments-toggle:hover { color: var(--text, #e7ebf3); background: rgba(255,255,255,.02); }
.sb-arrow { transition: transform .2s ease; font-size: 9px; margin-left: auto; }
.sb-comments-toggle.open .sb-arrow { transform: rotate(180deg); }
.sb-comments-body {
  display: none;
  padding: 10px 14px 12px;
}
.sb-comments-toggle.open + .sb-comments-body { display: block; }

.sb-comment-input {
  background: #12161f;
  border: 1px solid var(--border, #1e2533);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--text, #e7ebf3);
  font-size: 12px;
  width: 100%;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
}
.sb-comment-input::placeholder { color: var(--muted, #6b7a99); }
.sb-comment-input:focus { border-color: var(--accent, #7c9cff); outline: none; }

.sb-comments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.sb-comment {
  background: #12161f;
  border: 1px solid var(--border, #1e2533);
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12px;
  position: relative;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.sb-comment-author {
  font-size: 10px;
  color: #cfd7ea;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.sb-comment-text {
  color: #dde3f0;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}
.sb-comment-del {
  position: absolute;
  top: 2px; right: 5px;
  background: transparent;
  border: none;
  color: var(--muted, #6b7a99);
  font-size: 14px;
  cursor: pointer;
  padding: 1px 4px;
}
.sb-comment-del:hover { color: #ff5a5f; }

/* ── Emoji picker popup ── */
.sb-emoji-picker {
  background: rgba(19,22,28,.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border, #1e2533);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 240px;
  box-shadow: 0 12px 36px rgba(0,0,0,.6);
}
.sb-emoji-opt {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  transition: background .12s, transform .12s;
}
.sb-emoji-opt:hover {
  background: rgba(var(--accent-rgb),.15);
  transform: scale(1.15);
}

/* ═══════════════════════════════════════════════════════
   SCRAPBOOK MOBILE — Instagram vertical stack
   ══════════════════════════════════════════════���════════ */

.sb-mobile-feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}

.sb-mobile-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel, #13161c);
  border: 1px solid var(--border, #1e2533);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.sb-mobile-card .sb-grip { cursor: default; }
.sb-mobile-card .sb-card-inner {
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.sb-empty-mobile {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted, #6b7a99);
}

/* ── Mobile responsive adjustments ── */
@media (max-width: 767px) {
  .sb-toggle-bar { padding: 8px 12px; }
  .sb-add-event-btn { padding: 6px 10px; font-size: 11px; }
  .sb-zoom-bar { display: none; }
}

/* ═══════════════════════════════════════════════════════
   BREADCRUMB NAVIGATION
   ═══════════════════════════════════════════════════════ */

.cd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted, #6b7a99);
  background: var(--bg, #0b1120);
  border-bottom: 1px solid var(--border, #1e2533);
}
.cd-bc-item {
  background: none;
  border: none;
  color: var(--accent, #7c9cff);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: background .15s;
  font-family: inherit;
}
.cd-bc-item:hover {
  background: rgba(var(--accent-rgb),.1);
}
.cd-bc-sep {
  color: var(--muted, #6b7a99);
  font-size: 14px;
  font-weight: 300;
}
.cd-bc-current {
  color: var(--text, #e7ebf3);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════
   MOBILE FLOATING DOCK (above main app dock)
   ═══════════════════════════════════════════════════════ */

.cd-mobile-dock {
  display: none; /* hidden on desktop */
}

@media (max-width: 767px) {
  /* Hide desktop tabs on mobile */
  .cd-tabs-desktop { display: none !important; }

  /* Show mobile floating dock — anchored to bottom of viewport just above
     the main app nav. z-index 110 sits above .crews-page.crew-fullscreen
     (z-index 100). bottom offset clears the 56-60px main app nav plus the
     iOS home indicator. */
  .cd-mobile-dock {
    display: flex;
    position: fixed;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 110;
    background: rgba(11,17,32,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    padding: 6px 8px;
    gap: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
  }

  .cd-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--muted, #6b7a99);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
  }
  .cd-dock-btn svg {
    transition: stroke .2s;
  }
  .cd-dock-btn.active {
    color: var(--accent, #7c9cff);
    background: rgba(var(--accent-rgb),.12);
  }
  .cd-dock-btn.active svg {
    stroke: var(--accent, #7c9cff);
  }
  .cd-dock-btn:not(.active):hover {
    color: var(--text, #e7ebf3);
  }

  /* Breadcrumb goes more compact on mobile */
  .cd-breadcrumb {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Board panel height is handled by its own flex/height rules — no extra padding needed */
}

/* ═══════════════════════════════════════════════════════════
   Focus-visible — keyboard accessibility for all interactive elements
   ═══════════════════════════════════════════════════════════ */
.crew-overlay button:focus-visible,
.crew-overlay [role="button"]:focus-visible,
.crew-overlay a:focus-visible,
.crew-overlay input:focus-visible,
.crew-overlay select:focus-visible,
.crew-overlay textarea:focus-visible,
.crews-page button:focus-visible,
.crews-page [role="button"]:focus-visible,
.crews-page a:focus-visible,
.crews-page input:focus-visible,
.crews-page select:focus-visible,
.crews-page textarea:focus-visible {
  outline: 2px solid var(--accent, #7c9cff);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Suppress native outline so only focus-visible applies */
.crew-overlay button:focus:not(:focus-visible),
.crew-overlay [role="button"]:focus:not(:focus-visible),
.crews-page button:focus:not(:focus-visible),
.crews-page [role="button"]:focus:not(:focus-visible) {
  outline: none;
}

/* ── Add Event Modal (cd-ae-*) ──────────────────────── */
.cd-add-event-modal {
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--panel, #0f1420);
  border: 1px solid var(--border, #1e2533);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,.6);
}

/* Search box — styled like Paste Link input */
.cd-ae-search-wrap {
  position: relative;
  margin-bottom: 10px;
}
.cd-ae-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.cd-ae-search-input {
  width: 100%;
  padding: 11px 14px 11px 36px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.cd-ae-search-input::placeholder { color: var(--muted); opacity: .7; }
.cd-ae-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,156,255,.15);
}

/* Action buttons row */
.cd-ae-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.cd-ae-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.cd-ae-action-btn:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--accent);
  color: var(--text);
}

/* Paste link inline row */
.cd-ae-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
}
.cd-ae-link-row svg { flex-shrink: 0; color: var(--muted); }
.cd-ae-link-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 0;
}
.cd-ae-link-input::placeholder { color: var(--muted); opacity: .6; }
.cd-ae-link-import {
  flex-shrink: 0;
  padding: 5px 12px;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity .15s;
}
.cd-ae-link-import:hover { opacity: .85; }

/* Event result items */
.cd-pitch-event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.cd-ae-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.cd-ae-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
}
.cd-ae-thumb-empty span {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}
.cd-ae-item-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cd-ae-item-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.cd-ae-type-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  background: rgba(255,255,255,.08);
  color: var(--muted);
}
.cd-ae-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Mode tabs (Search / Create Custom) ── */
.cd-ae-mode-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  flex-shrink: 0;
}
.cd-ae-mode-tab {
  flex: 1;
  padding: 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: color .15s, border-color .15s;
}
.cd-ae-mode-tab:hover { color: var(--text); }
.cd-ae-mode-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Create form fields ── */
.cd-ae-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cd-ae-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: -6px;
}
.cd-ae-req { color: var(--accent); }
.cd-ae-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.cd-ae-input:focus {
  border-color: var(--accent);
}
.cd-ae-input::placeholder { color: var(--muted); opacity: .6; }

/* Date/time color fix for dark themes */
.cd-ae-input[type="date"],
.cd-ae-input[type="time"] {
  color-scheme: dark;
}

.cd-ae-row {
  display: flex;
  gap: 12px;
}
.cd-ae-field { flex: 1; display: flex; flex-direction: column; gap: 6px; }

/* Type pills */
.cd-ae-type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}
.cd-ae-pill {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all .15s;
}
.cd-ae-pill:hover { border-color: var(--accent); color: var(--text); }
.cd-ae-pill.active {
  background: rgba(var(--accent-rgb),.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* Submit button */
.cd-ae-submit {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  margin-top: 4px;
}
.cd-ae-submit:hover:not(:disabled) { opacity: .9; transform: scale(.99); }
.cd-ae-submit:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Description toggle + wrap */
.cd-ae-desc-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 8px 0 4px;
  font-family: inherit;
  transition: color .15s;
}
.cd-ae-desc-toggle:hover { color: var(--text); }
.cd-ae-desc-wrap {
  margin-top: 6px;
}
.cd-ae-desc-wrap textarea {
  resize: none;
  min-height: 72px;
}

/* ── Copy-to-clipboard toast ────────────────────────── */
.cp-copy-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 20, 30, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(74, 222, 128, 0.3);
  border-radius: 12px;
  padding: 10px 18px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 12px rgba(74, 222, 128, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}
.cp-copy-toast-in {
  animation: cpToastIn .35s cubic-bezier(.2,.8,.2,1) forwards;
}
.cp-copy-toast-out {
  animation: cpToastOut .3s ease forwards;
}
@keyframes cpToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.92); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes cpToastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(0.95); }
}

/* Top-right variant for invite link copy toast */
.cp-copy-toast.cp-copy-toast-topright {
  bottom: auto;
  left: auto;
  top: 20px;
  right: 20px;
  transform: translateX(20px) translateY(-10px);
}
.cp-copy-toast-topright.cp-copy-toast-in {
  animation: cpToastInTopRight .35s cubic-bezier(.2,.8,.2,1) forwards;
}
.cp-copy-toast-topright.cp-copy-toast-out {
  animation: cpToastOutTopRight .3s ease forwards;
}
@keyframes cpToastInTopRight {
  from { opacity: 0; transform: translateX(20px) translateY(-10px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
}
@keyframes cpToastOutTopRight {
  from { opacity: 1; transform: translateX(0) translateY(0) scale(1); }
  to   { opacity: 0; transform: translateX(20px) translateY(-10px) scale(0.95); }
}

/* ═══════════════════════════════════════════════════════════
   Crew Discovery & Access Control
   ═══════════════════════════════════════════════════════════ */

/* ─── Visibility Toggle (Admin Settings) ─── */
.cs-visibility-pills {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.cs-vis-pill {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.6);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
}
.cs-vis-pill:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
}
.cs-vis-pill.selected {
  background: linear-gradient(135deg, rgba(124,156,255,.2), rgba(167,139,250,.2));
  border-color: rgba(124,156,255,.5);
  color: #fff;
}
.cs-vis-pill-icon {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
}
.cs-vis-pill-label {
  display: block;
  font-size: 11px;
  opacity: .7;
}

/* ─── Pending Requests (Admin Settings) ─── */
.cs-requests-section {
  margin-top: 4px;
}
.cs-requests-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f472b6, #fb923c);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 8px;
}
.cs-request-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cs-request-row:last-child { border-bottom: none; }
.cs-request-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: rgba(255,255,255,.7);
}
.cs-request-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cs-request-info {
  flex: 1;
  min-width: 0;
}
.cs-request-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}
.cs-request-time {
  font-size: 11px;
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}
.cs-request-msg {
  font-size: 11px;
  color: rgba(255,255,255,.5);
  font-style: italic;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-request-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.cs-request-approve, .cs-request-deny {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s ease;
}
.cs-request-approve {
  background: rgba(74,222,128,.15);
  color: #4ade80;
}
.cs-request-approve:hover {
  background: rgba(74,222,128,.3);
  transform: scale(1.1);
}
.cs-request-deny {
  background: rgba(244,114,182,.1);
  color: #f472b6;
}
.cs-request-deny:hover {
  background: rgba(244,114,182,.25);
  transform: scale(1.1);
}

/* ─── Ban List (Admin Settings) ─── */
.cs-ban-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cs-ban-row:last-child { border-bottom: none; }
.cs-ban-name {
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.cs-unban-btn {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.7);
  cursor: pointer;
  transition: all .15s ease;
}
.cs-unban-btn:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* ─── Discover Crews Section ─── */
.crews-discover-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.crews-discover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.crews-discover-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.crews-discover-search {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
}
.crews-discover-search:focus {
  border-color: rgba(124,156,255,.4);
  background: rgba(255,255,255,.06);
}
.crews-discover-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.crews-discover-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .4;
}
.crews-discover-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crews-discover-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
  transition: all .2s ease;
}
.crews-discover-card:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.15);
}
.crews-discover-emoji {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  flex-shrink: 0;
}
.crews-discover-info {
  flex: 1;
  min-width: 0;
}
.crews-discover-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.crews-discover-tagline {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crews-discover-meta {
  font-size: 11px;
  color: rgba(255,255,255,.35);
  margin-top: 3px;
}
.crews-discover-join-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  flex-shrink: 0;
}
.crews-discover-join-btn.join-open {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #fff;
}
.crews-discover-join-btn.join-open:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(74,222,128,.3);
}
.crews-discover-join-btn.join-request {
  background: linear-gradient(135deg, rgba(124,156,255,.2), rgba(167,139,250,.2));
  color: #a78bfa;
  border: 1px solid rgba(167,139,250,.3);
}
.crews-discover-join-btn.join-request:hover {
  background: linear-gradient(135deg, rgba(124,156,255,.3), rgba(167,139,250,.3));
}
.crews-discover-join-btn.join-pending {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.4);
  cursor: default;
  border: 1px solid rgba(255,255,255,.1);
}
.crews-discover-empty {
  text-align: center;
  padding: 28px 16px;
  color: rgba(255,255,255,.4);
  font-size: 13px;
}

/* ─── Crew Profile View (non-member landing) ─── */
.crew-profile-landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  min-height: 60vh;
}
.crew-profile-emoji {
  font-size: 56px;
  margin-bottom: 16px;
}
.crew-profile-name {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.crew-profile-tagline {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  margin-bottom: 4px;
}
.crew-profile-members {
  font-size: 13px;
  color: rgba(255,255,255,.35);
  margin-bottom: 28px;
}
.crew-profile-action {
  padding: 14px 32px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.crew-profile-action.cpa-join {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #fff;
}
.crew-profile-action.cpa-join:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(74,222,128,.3);
}
.crew-profile-action.cpa-request {
  background: linear-gradient(135deg, #7c9cff, #a78bfa);
  color: #fff;
}
.crew-profile-action.cpa-request:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(167,139,250,.3);
}
.crew-profile-action.cpa-pending {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  cursor: default;
}
.crew-profile-action.cpa-banned {
  background: rgba(244,114,182,.1);
  color: #f472b6;
  cursor: default;
}
.crew-profile-action.cpa-invite-only {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.4);
  cursor: default;
}
.crew-profile-message {
  margin-top: 12px;
  width: 100%;
  max-width: 280px;
}
.crew-profile-message input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  color: #fff;
  font-size: 13px;
  outline: none;
}
.crew-profile-message input:focus {
  border-color: rgba(167,139,250,.4);
}

/* ─── Settings gear badge (pending requests) ─── */
.crews-settings-badge {
  position: relative;
}
.crews-settings-badge::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f472b6;
  border: 2px solid rgba(20,20,30,1);
}

/* ─── Remove & Ban confirm ─── */
.cs-remove-options {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.cs-remove-opt {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.cs-remove-opt.remove-only {
  background: rgba(251,146,60,.15);
  color: #fb923c;
}
.cs-remove-opt.remove-only:hover {
  background: rgba(251,146,60,.25);
}
.cs-remove-opt.remove-ban {
  background: rgba(244,114,182,.15);
  color: #f472b6;
}
.cs-remove-opt.remove-ban:hover {
  background: rgba(244,114,182,.25);
}

/* ═══════════════════════════════════════════════════════════
   Join Confirmation Modal
   ═══════════════════════════════════════════════════════════ */
.join-confirm-overlay {
  position: fixed; inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s ease;
  padding: 20px;
}
.join-confirm-overlay.active { opacity: 1; }
.join-confirm-card {
  background: rgba(30,30,50,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 40px 32px 32px;
  text-align: center;
  max-width: 380px; width: 100%;
  transform: scale(.92); transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.join-confirm-overlay.active .join-confirm-card { transform: scale(1); }
.join-confirm-emoji {
  font-size: 48px; margin-bottom: 16px;
}
.join-confirm-title {
  font-size: 22px; font-weight: 700; color: #fff;
  margin-bottom: 8px;
}
.join-confirm-msg {
  font-size: 14px; color: rgba(255,255,255,.7);
  line-height: 1.5; margin-bottom: 28px;
}
.join-confirm-btn {
  display: inline-block;
  padding: 12px 36px;
  border-radius: 12px; border: none;
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.join-confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(124,156,255,.4);
}
.join-confirm-btn:active { transform: scale(.97); }
.join-confirm-btn-go {
  background: linear-gradient(135deg, #7c9cff, #a78bfa);
  color: #fff;
}
.join-confirm-btn-ok {
  background: rgba(255,255,255,.12);
  color: #fff; border: 1px solid rgba(255,255,255,.2);
}

/* ═══════════════════════════════════════════════════════════
   Pending Crew Card in List
   ═══════════════════════════════════════════════════════════ */
.crew-card-pending {
  opacity: .65; position: relative;
  border: 1px dashed rgba(255,255,255,.2) !important;
  pointer-events: auto; cursor: default;
}
.crew-card-pending .crew-pending-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.6);
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  border-radius: 8px; text-transform: uppercase; letter-spacing: .5px;
}
.crew-card-pending .crew-pending-cancel {
  display: inline-block; margin-top: 8px;
  font-size: 12px; color: rgba(255,255,255,.4);
  cursor: pointer; text-decoration: underline;
  text-underline-offset: 2px;
}
.crew-card-pending .crew-pending-cancel:hover {
  color: rgba(248,113,113,.8);
}

/* ═══════════════════════════════════════════════════════════
   Admin Join Requests Section
   ═══════════════════════════════════════════════════════════ */
.crew-join-requests {
  margin: 16px 0; padding: 16px;
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}
.crew-jr-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: #fff;
  margin-bottom: 12px;
}
.crew-jr-badge {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  min-width: 20px; text-align: center;
}
.crew-jr-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.crew-jr-item:last-child { border-bottom: none; }
.crew-jr-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(124,156,255,.2); color: #7c9cff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  overflow: hidden; flex-shrink: 0;
}
.crew-jr-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}
.crew-jr-info { flex: 1; min-width: 0; }
.crew-jr-name {
  font-size: 14px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crew-jr-time { font-size: 11px; color: rgba(255,255,255,.4); }
.crew-jr-actions { display: flex; gap: 6px; flex-shrink: 0; }
.crew-jr-accept, .crew-jr-deny {
  padding: 5px 14px; border-radius: 8px; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: transform .12s, opacity .12s;
}
.crew-jr-accept {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #0a2612;
}
.crew-jr-deny {
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.1);
}
.crew-jr-accept:hover { transform: scale(1.04); }
.crew-jr-deny:hover { opacity: .8; }

/* ═══════════════════════════════════════════════════════════
   CREW GATED VIEW — non-member / logged-out
   ═══════════════════════════════════════════════════════════ */
.crew-gated-view {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 24px 80px; min-height: 50vh;
}
.crew-gated-icon { font-size: 48px; margin-bottom: 12px; }
.crew-gated-title {
  font-size: 22px; font-weight: 700; color: #fff; margin: 0 0 6px;
}
.crew-gated-tagline {
  font-size: 13px; color: rgba(255,255,255,.5); margin: 0 0 4px;
}
.crew-gated-meta {
  font-size: 12px; color: rgba(255,255,255,.4); margin: 0 0 28px;
}
.crew-gated-status { max-width: 340px; }
.crew-gated-status-icon { margin-bottom: 12px; }
.crew-gated-status-text {
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,.85); margin: 0 0 8px;
}
.crew-gated-status-sub {
  font-size: 13px; color: rgba(255,255,255,.45); margin: 0 0 20px; line-height: 1.5;
}
.crew-gated-cancel-btn {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.6); padding: 10px 24px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.crew-gated-cancel-btn:hover {
  background: rgba(239,68,68,.15); border-color: rgba(239,68,68,.3);
  color: #f87171;
}
.crew-gated-join-btn {
  background: linear-gradient(135deg, #7c3aed, #a78bfa); border: none;
  color: #fff; padding: 12px 28px; border-radius: 12px;
  font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.crew-gated-join-btn:hover { transform: scale(1.04); filter: brightness(1.1); }

/* Logged-out auth section */
.crew-gated-auth {
  max-width: 340px; width: 100%;
}
.crew-gated-prompt {
  font-size: 15px; color: rgba(255,255,255,.7); margin: 0 0 20px; line-height: 1.5;
}
.crew-gated-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px; border-radius: 12px;
  background: #fff; color: #333; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all .2s;
}
.crew-gated-google:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.crew-gated-divider {
  display: flex; align-items: center; gap: 12px; margin: 16px 0;
  color: rgba(255,255,255,.3); font-size: 12px;
}
.crew-gated-divider span:first-child,
.crew-gated-divider span:last-child {
  flex: 1; height: 1px; background: rgba(255,255,255,.1);
}
.crew-gated-email-row,
.crew-gated-password-row,
.crew-gated-name-row {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.crew-gated-name-row { flex-wrap: wrap; }
.crew-gated-email-input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: #fff; font-size: 14px; outline: none; transition: border-color .2s;
}
.crew-gated-email-input:focus { border-color: rgba(124,58,237,.5); }
.crew-gated-email-input::placeholder { color: rgba(255,255,255,.3); }
.crew-gated-email-go {
  padding: 10px 16px; border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa); border: none;
  color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: all .2s;
}
.crew-gated-email-go:hover { filter: brightness(1.15); }
.crew-gated-error {
  font-size: 12px; color: #f87171; margin-top: 8px; min-height: 16px;
}

/* Discover Crews — pending hover-to-cancel */
.crews-discover-join-btn.join-pending {
  position: relative; cursor: default;
}
.crews-discover-join-btn.join-pending .pending-label {
  transition: opacity .15s;
}
.crews-discover-join-btn.join-pending .cancel-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s; pointer-events: none;
  background: rgba(239,68,68,.15); border-radius: inherit; color: #f87171; font-weight: 600;
}
.crews-discover-join-btn.join-pending:hover {
  cursor: pointer; border-color: rgba(239,68,68,.3);
}
.crews-discover-join-btn.join-pending:hover .pending-label { opacity: 0; }
.crews-discover-join-btn.join-pending:hover .cancel-label { opacity: 1; pointer-events: auto; }
