:root {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --bg-3: #161616;
  --gold: #f2f2f2;
  --gold-dim: #8a8a8a;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --line: #2a2a2a;
  --danger: #bdbdbd;
  --ok: #cfcfcf;
  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 2px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.45;
}
/* Soft grain — keep under content; avoid mix-blend-mode (breaks some mobile / Instagram WebViews) */
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}
body.page-auth::before { display: none; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: #ffffff; }
img, video { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11,11,11,0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  line-height: 1;
}
.brand-logo {
  height: 42px;
  width: auto;
  display: block;
}
.brand-text {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-logo {
  height: 56px;
  width: auto;
  margin: 0 auto 0.75rem;
}
.auth-logo {
  height: 88px;
  width: auto;
  margin: 0 auto 0.5rem;
}
.hero-logo {
  width: min(420px, 72vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.55));
  animation: fadeUp 0.9s ease both;
}
.nav-main { display: flex; gap: 1rem; flex: 1; justify-content: center; }
.nav-main a {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.nav-main a:hover { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 0.65rem; }
.icon-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--gold);
  color: var(--gold);
  display: grid; place-items: center;
  border-radius: 999px;
  font-size: 1.2rem;
}
.avatar-link {
  width: 36px; height: 36px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--gold);
  font-weight: 700;
}
.avatar-link img { width: 100%; height: 100%; object-fit: cover; }

.site-main { min-height: calc(100vh - 160px); }
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-links { display: flex; gap: 1.25rem; justify-content: center; margin-top: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: #ffffff; color: #000000; border-color: #ffffff; }
.btn-primary:hover { background: #e8e8e8; color: #000000; }
.btn-secondary { background: transparent; color: #ffffff; border-color: #ffffff; }
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-ok { background: transparent; color: var(--ok); border-color: var(--ok); }
.btn-sm { padding: 0.4rem 0.7rem; font-size: 0.7rem; }

.flash {
  max-width: var(--max);
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.flash-success { background: rgba(255,255,255,0.08); border-color: #ffffff; }
.flash-error { background: rgba(255,255,255,0.06); border-color: #888; color: #fff; }
.flash-info { background: rgba(255,255,255,0.06); border-color: var(--gold-dim); }

/* Landing hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.45) 40%, rgba(0,0,0,0.94) 100%),
    url('/images/BG_Image_01.jpg') center/cover no-repeat;
  filter: grayscale(1) contrast(1.12) brightness(0.92);
  transform: scale(1.02);
  animation: heroDrift 18s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.02) translate3d(0,0,0); }
  to { transform: scale(1.06) translate3d(-1.5%, -1%, 0); }
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.25rem 5rem;
}
.hero-brand {
  margin: 0;
  line-height: 0;
}
.hero-sub {
  margin: 0.75rem 0 0;
  max-width: 28rem;
  color: #ddd;
  font-size: 1.05rem;
  animation: fadeUp 1s ease 0.15s both;
}
.hero-cta { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; animation: fadeUp 1s ease 0.3s both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.section h2 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.35rem;
}
.section .lede { color: var(--muted); margin: 0 0 1.5rem; }

.stories-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  scrollbar-width: thin;
}
.story-bubble {
  flex: 0 0 auto;
  width: 84px;
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
}
.story-ring {
  width: 72px; height: 72px;
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(135deg, #ffffff, #666666);
  margin: 0 auto 0.35rem;
}
.story-ring img, .story-ring span {
  width: 100%; height: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid var(--bg);
  display: grid; place-items: center;
  background: var(--bg-3);
  color: var(--gold);
  font-weight: 700;
}

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tab {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tab.active, .tab:hover { border-color: var(--gold); color: var(--gold); }

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}
.media-card {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-3);
  overflow: hidden;
}
button.media-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.media-card img, .media-card video {
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
  transition: transform 0.35s ease;
}
.media-card:hover img, .media-card:hover video { transform: scale(1.04); }
.media-card video {
  pointer-events: none;
}
.media-meta {
  position: absolute; inset: auto 0 0 0;
  padding: 0.55rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  font-size: 0.72rem;
  display: flex; justify-content: space-between;
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.media-card:hover .media-meta { opacity: 1; }

.feed-list {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  padding: 1.25rem;
}
.feed-post {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.feed-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.85rem 1rem;
}
.feed-head .who { font-weight: 700; }
.feed-head .when { color: var(--muted); font-size: 0.8rem; }
.feed-media img, .feed-media video { width: 100%; max-height: 720px; object-fit: contain; background: #000; }
.feed-actions { display: flex; gap: 1rem; padding: 0.75rem 1rem 0.25rem; }
.feed-actions button {
  background: none; border: 0; color: var(--text); cursor: pointer;
  font-size: 1.25rem; padding: 0;
}
.feed-actions button.liked { color: var(--gold); }
.feed-caption { padding: 0.25rem 1rem 1rem; color: #ddd; }
.feed-caption strong { color: #fff; margin-right: 0.35rem; }

.panel {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
.panel-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
}
.admin-nav {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.admin-nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  color: var(--muted);
  border-radius: 4px;
  font-size: 0.85rem;
}
.admin-nav a.active, .admin-nav a:hover {
  background: var(--bg-3);
  color: var(--gold);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stat {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
}
.stat .n {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
}
.stat .l { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.35rem; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.6rem;
}

label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 0.35rem; letter-spacing: 0.04em; }
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.7rem 0.8rem;
  font: inherit;
  margin-bottom: 0.85rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.check-row { display: flex; gap: 1rem; align-items: center; margin: 0.5rem 0 1rem; color: var(--muted); }
.check-row label { margin: 0; display: flex; gap: 0.4rem; align-items: center; }
.check-row input { width: auto; margin: 0; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
table.data th { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge-active { color: var(--ok); border-color: var(--ok); }
.badge-pending { color: var(--gold); border-color: var(--gold); }
.badge-blocked { color: var(--danger); border-color: var(--danger); }
.badge-admin, .badge-member { color: var(--gold); border-color: var(--gold); }
.badge-prospect { color: var(--muted); border-color: var(--line); }
.people-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.person-card {
  text-align: center;
  color: inherit;
  padding: 1.1rem 0.85rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.person-card .profile-avatar {
  margin: 0 auto 0.55rem;
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
}
.person-card .person-meta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  min-height: 1.2em;
}
.person-card .badge { margin-top: 0.45rem; }

.pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}
.pending-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.pending-item .thumb { aspect-ratio: 1; background: #000; }
.pending-item .thumb img, .pending-item .thumb video { width: 100%; height: 100%; object-fit: cover; }
.pending-item .meta { padding: 0.65rem; font-size: 0.8rem; }
.pending-item .actions { display: flex; gap: 0.4rem; padding: 0 0.65rem 0.65rem; }

.login-shell, .invite-shell {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
}
.link-copy-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 0.75rem;
}
.link-copy-row input[type="text"] {
  flex: 1 1 220px;
  margin: 0;
  font-size: 0.85rem;
}
.welcome-card .welcome-check {
  margin: 0.25rem 0 0;
  font-size: 2.75rem;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}
.welcome-card .welcome-lede {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  color: #ddd;
}
.welcome-username {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.04em;
}
.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.5rem;
}
.welcome-actions .btn { width: 100%; }
.login-card h1 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 2.4rem;
  margin: 0.5rem 0;
}

/* Login modal */
body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  animation: fadeUp 0.2s ease both;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  text-align: center;
  animation: fadeUp 0.28s ease both;
}
.modal-close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { color: var(--text); }
.login-modal .auth-logo { height: 128px; margin-bottom: 0.35rem; }
.login-modal h2 {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 2rem;
  margin: 0.35rem 0 0.25rem;
}
.login-modal-lede { margin: 0 0 1rem; font-size: 0.9rem; }
.login-modal-form { text-align: left; margin-top: 0.5rem; }
.login-modal-error { text-align: left; margin: 0 0 0.75rem; }
.login-as { margin: 0 0 0.85rem; font-size: 0.9rem; }
.login-as strong { color: var(--text); }
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; word-break: break-all; }

.profile-head {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.profile-avatar-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.soundtrack-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.72);
  color: #f2f2f2;
  cursor: pointer;
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 3;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.soundtrack-icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.soundtrack-icon-btn svg {
  display: block;
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  overflow: hidden;
  background: var(--bg-3);
  display: grid; place-items: center;
  font-size: 2rem;
  color: var(--gold);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-stats { display: flex; gap: 1.25rem; margin: 0.75rem 0; }
.profile-stats strong { display: block; font-size: 1.1rem; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.hidden { display: none !important; }

.dropzone {
  border: 1px dashed var(--gold-dim);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone.dragover {
  border-color: var(--gold);
  background: rgba(255,255,255,0.12);
}
.dropzone-inner {
  padding: 2.5rem 1.25rem;
  text-align: center;
  display: grid;
  gap: 0.35rem;
}
.upload-progress { padding: 0 1rem 1rem; display: grid; gap: 0.35rem; }
.progress-row {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  background: var(--bg);
}
.progress-row.ok { color: var(--ok); }
.progress-row.err { color: var(--danger); }

.batch-list { display: grid; gap: 0.5rem; }
.batch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: var(--bg);
}
.batch-row:hover { border-color: var(--gold); }

.batch-editor { display: grid; gap: 0.85rem; margin: 1.25rem 0; }
.batch-item {
  display: grid;
  grid-template-columns: 28px 120px 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.batch-item.dragging { opacity: 0.5; }
.batch-handle {
  cursor: grab;
  color: var(--muted);
  padding-top: 0.5rem;
  user-select: none;
}
.batch-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.batch-thumb img, .batch-thumb video {
  width: 100%; height: 100%; object-fit: cover;
}
.batch-thumb .badge {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  background: rgba(0,0,0,0.7);
}
.batch-fields label { margin-top: 0.25rem; }
.batch-fields input, .batch-fields textarea { margin-bottom: 0.45rem; }
.batch-actions {
  display: grid;
  gap: 0.5rem;
  justify-items: end;
}
.batch-index { color: var(--gold); font-weight: 700; }
.schedule-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .batch-item {
    grid-template-columns: 24px 88px 1fr;
  }
  .batch-actions {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.profile-avatar-lg { width: 120px; height: 120px; font-size: 2.4rem; }
.profile-tagline { color: #ddd; margin: 0.5rem 0 0; }
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.5rem;
}
.profile-block h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.4rem;
}
.profile-prose { margin: 0; color: #ddd; white-space: pre-wrap; }
.ride-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #ddd;
}
.ride-list li { margin: 0.35rem 0; }
.profile-edit-photo {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.feed-dropzone {
  display: grid;
  gap: 0.4rem;
  justify-items: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.feed-dropzone.dragover,
.feed-dropzone.dragover.empty {
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.feed-drop-hint {
  font-size: 0.78rem;
  text-align: center;
  margin: 0.5rem 0 0;
}
.feed-list { position: relative; }
.feed-dropzone-overlay {
  display: none;
  position: absolute;
  inset: 3rem 0 0 0;
  z-index: 5;
  place-content: center;
  background: rgba(11,11,11,0.88);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  min-height: 220px;
}
.feed-dropzone-overlay.visible {
  display: grid;
}

/* Private media bin */
.bin-drop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  place-content: center;
  text-align: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.82);
  border: 2px dashed #fff;
  /* Must receive the drop — pointer-events:none lets Safari open files as tabs */
  pointer-events: none;
}
.bin-drop-overlay.visible {
  display: grid;
  pointer-events: auto;
}
.bin-drop-overlay strong {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 2rem;
  color: #fff;
}
body.bin-dragging .site-main { outline: 2px dashed rgba(255,255,255,0.35); outline-offset: -8px; }

/* Collection soundtrack */
body.has-collection-music .site-main {
  padding-bottom: 5.5rem;
}
body.collection-music-open.has-collection-music .site-main {
  padding-bottom: 16rem;
}
body.collection-music-playlist-open.has-collection-music .site-main {
  padding-bottom: 26rem;
}
.soundtrack-modal {
  max-width: 480px;
}
.soundtrack-modal h2 {
  margin-top: 0;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.collection-post-modal {
  width: min(720px, 100%);
  max-width: min(720px, 100%);
  max-height: min(92vh, 960px);
  overflow: auto;
  text-align: left;
  padding: 1.25rem 1.1rem 1.35rem;
}
.collection-post-media {
  margin: 0 0 0.85rem;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.collection-post-media img,
.collection-post-media video {
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.collection-post-title {
  font-weight: 700;
  margin: 0.15rem 0;
}
.collection-post-login-hint {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}
.collection-post-thread .bin-comments h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.collection-music-inline {
  margin: 0.35rem 0 0;
}
.collection-music {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* Above .site-header (40) and outside .site-main stacking */
  z-index: 90;
  background: rgba(0, 0, 0, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.collection-music-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
}
.collection-music-meta {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.collection-music-meta strong {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-music-meta .muted {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-music-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.collection-music-frame {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 0.85rem;
}
.collection-music-frame iframe,
.collection-music-frame #collection-yt-player,
.collection-music-frame iframe#collection-music-iframe {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 180px;
  border: 0;
  border-radius: 6px;
  background: #000;
  display: block;
}
/* Spotify playlist / album embeds are designed taller */
.collection-music.is-playlist .collection-music-frame iframe {
  max-width: 100%;
  width: min(100%, 480px);
  aspect-ratio: auto;
  height: 352px;
  min-height: 352px;
}
.collection-music[data-provider="spotify"]:not(.is-playlist) .collection-music-frame iframe {
  aspect-ratio: auto;
  height: 152px;
  min-height: 152px;
}
.collection-music.is-playing .collection-music-meta strong {
  color: #fff;
}
.bin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.bin-grid .media-meta { opacity: 1; }
.bin-gallery-section { max-width: none; padding-left: 1rem; padding-right: 1rem; }
.bin-gallery-section .bin-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
@media (min-width: 900px) {
  .bin-gallery-section .bin-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
.media-card.bin-return-flash {
  outline: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.25);
}
.media-badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  background: rgba(0,0,0,0.65);
  color: var(--gold);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
}
.bin-thread { max-width: 720px; margin: 0 auto; }
.bin-toolbar {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
}
.emoji-react { display: grid; gap: 0.55rem; }
.emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.emoji-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}
.emoji-btn:hover, .emoji-btn.active {
  border-color: var(--gold);
  background: rgba(255,255,255,0.12);
}
.emoji-more-btn {
  font-weight: 700;
  color: var(--gold);
  min-width: 2.2rem;
  justify-content: center;
}
.emoji-more-panel {
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.emoji-more-panel[hidden] { display: none !important; }
.emoji-count { font-size: 0.75rem; color: var(--muted); min-width: 0.6rem; }
.bin-publish, .bin-comments {
  padding: 1rem;
  border-top: 1px solid var(--line);
}
.bin-comments h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.5rem;
}
.comment-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.comment-item {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
}
.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
}
.comment-body { color: #ddd; white-space: pre-wrap; }
.comment-form, .inline-form { display: grid; gap: 0.5rem; }
.text-btn {
  background: none;
  border: 0;
  color: var(--gold);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  padding: 0;
}

.media-edit-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--bg-3);
}
.media-edit-status { font-size: 0.8rem; }
.meta-panel {
  padding: 1rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.meta-panel[hidden] { display: none !important; }
.meta-panel h4 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 1.35rem;
}
.meta-list { margin: 0; }
.meta-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.meta-row dt { color: var(--muted); margin: 0; }
.meta-row dd { margin: 0; color: #ddd; word-break: break-word; }
@media (max-width: 560px) {
  .meta-row { grid-template-columns: 1fr; gap: 0.15rem; }
}
.crop-stage {
  position: relative;
  user-select: none;
  background: #000;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}
.crop-stage img {
  max-width: 100%;
  max-height: 720px;
  width: auto;
  height: auto;
  display: block;
}
.crop-stage.cropping { cursor: crosshair; }
.crop-box {
  position: absolute;
  border: 2px solid var(--gold);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.45);
  pointer-events: none;
}
.seed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.4rem;
  max-height: 420px;
  overflow: auto;
  margin: 0.75rem 0 1rem;
}
.seed-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-3);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
}
.seed-item img, .seed-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.seed-item input {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  width: auto;
  margin: 0;
  z-index: 2;
}
.seed-item.selected { outline: 2px solid var(--gold); }

.create-avatar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.avatar-menu-wrap {
  position: relative;
  display: inline-block;
}
.avatar-hit {
  border: 2px solid var(--gold);
  cursor: pointer;
  padding: 0;
  background: var(--bg-3);
  color: var(--gold);
}
.avatar-hit:hover { box-shadow: 0 0 0 3px rgba(255,255,255,0.25); }
.avatar-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  min-width: 170px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}
.avatar-menu[hidden] { display: none !important; }
.avatar-menu a,
.avatar-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
.avatar-menu a:hover,
.avatar-menu button:hover {
  background: var(--bg-3);
  color: var(--gold);
}

/* Full-screen avatar picker (media-bin look) */
.avatar-pick-screen {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.25rem 1rem 3rem;
}
.avatar-pick-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  max-width: none;
}
.avatar-pick-bar h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 2rem;
}
.avatar-pick-fullgrid {
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.45rem;
}
@media (min-width: 900px) {
  .avatar-pick-fullgrid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
.avatar-pick-card {
  margin: 0;
  padding: 0;
  border: 0;
  display: block;
}
.avatar-pick-fullbtn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.avatar-pick-fullbtn img,
.avatar-pick-fullgrid .media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.page-avatar-pick .site-main {
  max-width: none;
  padding: 0;
}
body.page-avatar-pick .panel,
body.page-avatar-pick .section {
  max-width: none;
}

/* Circular avatar cropper */
.avatar-crop-card {
  width: min(440px, 100%);
  text-align: left;
}
.avatar-crop-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-align: center;
}
.avatar-crop-card > .muted { text-align: center; }
.avatar-crop-stage {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: #0a0a0a;
  touch-action: none;
  cursor: grab;
  box-shadow: inset 0 0 0 2px var(--gold);
}
.avatar-crop-stage.is-dragging { cursor: grabbing; }
.avatar-crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.avatar-crop-ring {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: 999px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.45);
}
.avatar-zoom-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.avatar-zoom-label input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}
.avatar-crop-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.avatar-crop-status {
  min-height: 1.2em;
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  text-align: center;
}
button.profile-avatar.avatar-hit {
  font: inherit;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-main { display: none; }
  .brand-text { display: none; }
  .panel-grid { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; gap: 0.25rem; overflow-x: auto; }
  .admin-nav a { white-space: nowrap; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .media-grid { gap: 0.2rem; }
  .media-meta { opacity: 1; }
}
