/* 618SPACE — modern space theme. Shared by every page. */
:root {
  --bg-0: #050816;
  --bg-1: #0a1030;
  --bg-2: #0f1a4a;
  --card: rgba(16, 26, 64, 0.72);
  --card-2: rgba(22, 34, 80, 0.6);
  --border: rgba(120, 160, 255, 0.18);
  --border-strong: rgba(120, 160, 255, 0.35);
  --text: #e8ecff;
  --text-dim: #9aa6d6;
  --text-faint: #6b76a8;
  --accent: #7c8cff;
  --accent-2: #b06cff;
  --accent-glow: rgba(124, 140, 255, 0.35);
  --good: #5fe3a1;
  --warn: #ffb86b;
  --bad: #ff6b8a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 140, 255, 0.10) inset;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Consolas", "Courier New", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(124, 140, 255, 0.18), transparent 60%),
    radial-gradient(900px 700px at 90% 10%, rgba(176, 108, 255, 0.14), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(95, 227, 161, 0.08), transparent 60%),
    var(--bg-0);
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: hidden;
}

/* starfield */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1px 1px at 28% 72%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 44% 30%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1px 1px at 62% 84%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 56%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 18% 90%, rgba(255,255,255,0.3), transparent 60%),
    radial-gradient(1px 1px at 52% 50%, rgba(255,255,255,0.4), transparent 60%);
  opacity: 0.9;
}

body > * { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #a9b4ff; text-decoration: underline; }

/* nav */
.nav {
  background: rgba(8, 12, 36, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: center;
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 4px;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}
.nav a { color: var(--text-dim); padding: 6px 11px; border-radius: 999px; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(124, 140, 255, 0.16); color: var(--text); text-decoration: none; }
.nav .sep { display: none; }
.nav::before {
  content: "618SPACE";
  font-weight: 800;
  letter-spacing: .12em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-right: 10px;
  font-size: 15px;
}
.nav a[hidden], .nav .sep[hidden] { display: none; }

/* layout */
.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.card { position: relative; overflow: hidden; }
.card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: .9;
}
.card .head {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 0 0 10px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card .head .more { font-weight: 400; font-size: 12px; color: var(--accent); }

.btn {
  border: 1px solid var(--border-strong);
  background: rgba(124, 140, 255, 0.12);
  color: var(--text);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, transform .05s;
  font-family: inherit;
}
.btn:hover { background: rgba(124, 140, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: rgba(255, 107, 138, 0.15); border-color: rgba(255,107,138,0.4); color: var(--bad); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input, textarea, select {
  background: rgba(5, 8, 22, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { resize: vertical; }

.empty { color: var(--text-dim); padding: 14px 4px; font-style: italic; }
.muted { color: var(--text-dim); font-size: 12px; }
.small { font-size: 12px; }

/* toasts */
#toast-host { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--card-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  max-width: 320px;
  font-size: 13px;
  animation: toastIn .18s ease;
}
.toast.good { border-color: rgba(95,227,161,0.5); }
.toast.bad { border-color: rgba(255,107,138,0.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* quiet mode */
body.quiet .ad, body.quiet .promo, body.quiet .sponsored { display: none !important; }

/* forms */
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* status feed items */
.status-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.status-item:last-child { border-bottom: none; }
.status-item .spic, .status-item img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--bg-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--text-faint); }
.status-item .sbody { min-width: 0; flex: 1; }
.status-item .sname { font-weight: 600; color: var(--text); }
.status-item .stime { color: var(--text-faint); font-size: 11px; margin-left: 6px; }
.status-item .stext { margin: 4px 0; overflow-wrap: anywhere; }
.vote-btn { background: rgba(124,140,255,0.1); border: 1px solid var(--border); border-radius: 999px; font-size: 11px; padding: 2px 10px; margin-right: 4px; cursor: pointer; color: var(--text); }
.vote-btn.vote-on { background: rgba(124,140,255,0.25); font-weight: 600; }
.vote-note { color: var(--text-faint); font-size: 11px; }

/* badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: rgba(124,140,255,0.15); border: 1px solid var(--border); color: var(--text-dim); }
.badge.good { background: rgba(95,227,161,0.15); color: var(--good); border-color: rgba(95,227,161,0.4); }

/* tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border-radius: 9px; background: rgba(124,140,255,0.08); border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; font-size: 13px; }
.tab.active { background: rgba(124,140,255,0.22); color: var(--text); border-color: var(--border-strong); }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }

/* game: slot grid */
.slot-grid { display: grid; gap: 6px; justify-content: center; }
.slot-col { display: flex; flex-direction: column; gap: 6px; }
.slot-cell { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; font-size: 26px; background: rgba(5,8,22,0.6); border: 1px solid var(--border); border-radius: 10px; }
.slot-row { display: flex; gap: 6px; }

/* poker hand */
.card-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.playing-card { width: 52px; height: 74px; background: #fff; color: #111; border-radius: 8px; display: flex; flex-direction: column; justify-content: space-between; padding: 4px 6px; font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,0.4); cursor: pointer; user-select: none; }
.playing-card.held { outline: 3px solid var(--accent); transform: translateY(-6px); }
.playing-card.red { color: #c0392b; }
.playing-card .rank { font-size: 16px; }
.playing-card .suit { font-size: 18px; align-self: flex-end; }

/* holdem table */
.table { position: relative; background: radial-gradient(ellipse at center, #0d3b2e 0%, #052018 70%); border: 4px solid #1a5a44; border-radius: 50%; padding: 30px; min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 720px; }
.seat { background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 8px 10px; font-size: 12px; }
.seat.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.seat.folded { opacity: .45; }
.community-row { display: flex; gap: 6px; }

/* quiet mode toggle */
.quiet-toggle { cursor: pointer; }

/* responsive */
/* Legacy page reskin (keeps old markup working on the new theme) */
.section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(12px); padding: 14px 16px; margin-bottom: 16px; }
.head { font-weight: 700; font-size: 14px; padding: 4px 0 10px; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.head.blue, .head.orange { background: transparent !important; color: var(--text); }
.head .more { font-weight: 400; font-size: 12px; color: var(--accent); }
.people { display: flex; gap: 14px; flex-wrap: wrap; padding: 6px 0; }
.person { text-align: center; width: 120px; }
.person a { color: var(--accent); font-weight: 500; }
.person .pic, .person img { width: 120px; height: 120px; border: 2px solid var(--border-strong); background: var(--bg-2); color: var(--text-faint); display: flex; align-items: center; justify-content: center; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px rgba(124,140,255,0.08), 0 8px 20px -6px var(--accent-glow); transition: transform .15s, box-shadow .15s; }
.person:hover .pic, .person:hover img { transform: translateY(-3px); box-shadow: 0 0 0 4px rgba(124,140,255,0.18), 0 12px 26px -6px var(--accent-glow); }
.login { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.login h2 { color: var(--text); }
.login label span { color: var(--text-dim); }
.login input, .login select { background: rgba(5,8,22,0.6); border: 1px solid var(--border); color: var(--text); }
.btn { background: rgba(124,140,255,0.12); border: 1px solid var(--border-strong); color: var(--text); border-radius: 999px; }
.btn.signup { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.status-form input { background: rgba(5,8,22,0.6); border: 1px solid var(--border); color: var(--text); }
.status-item { border-bottom: 1px solid var(--border); }
.status-item .spic { background: var(--bg-2); color: var(--text-faint); border-radius: 10px; }
.empty { color: var(--text-dim); }
.ad { color: var(--text-faint); }
.wh-box { background: rgba(5,8,22,0.4); border: 1px solid var(--border); border-radius: 10px; }
.wh-head { background: rgba(124,140,255,0.12); color: var(--text); }
.wh-row { border-bottom: 1px solid var(--border); color: var(--text); }
.wh-teaser { color: var(--text-dim); }
.monly { }

/* Mobile responsiveness */
@media (max-width: 760px) {
  .wrap { padding: 10px 8px 40px; }
  .nav { font-size: 12px; padding: 8px; gap: 4px 6px; }
  .nav a { padding: 3px 6px; }
  .card { padding: 12px 12px; }
  .grid2 { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  th, td { padding: 6px 8px; }
  .slot-cell { width: 44px; height: 44px; font-size: 20px; }
  canvas { max-width: 100% !important; height: auto !important; }
  .playing-card { width: 44px; height: 62px; }
  #farm-grid, #visit-grid { grid-template-columns: repeat(3, 1fr) !important; max-width: 100% !important; }
  .row { flex-wrap: wrap; }
  input, textarea, select { max-width: 100%; }
  .status-form { flex-direction: column; }
  .tabs { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .tab { font-size: 12px; padding: 5px 10px; }
}
@media (max-width: 480px) {
  .seats { grid-template-columns: 1fr; }
  .community-row { flex-wrap: wrap; justify-content: center; }
}

/* index layout responsive */
@media (max-width: 760px) {
  .main, .side { width: 100% !important; max-width: 100% !important; }
  .wrap { flex-direction: column !important; }
  .people { justify-content: center; }
  .person { width: 90px; }
  .person .pic, .person img { width: 90px; height: 80px; }
}

@media (max-width: 760px) {
  table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Profile page (MySpace-style) reskin */
body.ms { background: var(--bg-0); color: var(--text); }
.msnav { background: linear-gradient(180deg, rgba(10,16,48,0.95), rgba(5,8,22,0.95)); border-bottom: 1px solid var(--border); }
.msnav a { color: var(--text); }
.msnav a:hover { background: rgba(124,140,255,0.2); }
.name { color: var(--text); }
.quote { color: var(--text-dim); }
.photo { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-faint); }
.box { background: var(--card); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); }
.box .bar { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.box h4 { color: var(--accent); }
.details th { background: rgba(124,140,255,0.12); color: var(--text-dim); }
.details td { border-bottom: 1px solid var(--border); color: var(--text); }
.top8 li { background: rgba(124,140,255,0.08); }
.contacting button { background: rgba(124,140,255,0.12); border: 1px solid var(--border-strong); color: var(--text); border-radius: 8px; }

/* Nav dropdown */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown > a { color: var(--text); padding: 4px 8px; border-radius: 8px; }
.nav-dropdown > a:hover { background: rgba(124,140,255,0.15); text-decoration: none; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 120px;
  z-index: 60;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.nav-dropdown-menu a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); }
.nav-dropdown-menu a:hover { background: rgba(124,140,255,0.15); text-decoration: none; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: block; }

/* Farm championship leaderboard */
.farm-leaderboard {
  border: 2px solid #f5c542;
  box-shadow: 0 0 18px rgba(245,197,66,0.45), 0 0 40px rgba(245,197,66,0.18), var(--shadow);
  background: linear-gradient(180deg, rgba(40,30,8,0.55), var(--card));
}
.farm-leaderboard .head { color: #f5c542; border-bottom: 1px solid rgba(245,197,66,0.3); }
.farm-lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-bottom: 1px solid rgba(245,197,66,0.15);
}
.farm-lb-row:last-child { border-bottom: none; }
.farm-lb-rank { font-weight: 800; font-size: 18px; width: 34px; text-align: center; }
.farm-lb-rank.gold { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.7); }
.farm-lb-rank.silver { color: #c0c0c0; }
.farm-lb-rank.bronze { color: #cd7f32; }
.farm-lb-name { flex: 1; font-weight: 600; }
.farm-lb-stats { font-size: 12px; color: var(--text-dim); text-align: right; }
.farm-lb-stats strong { color: #f5c542; }

/* Avatar: profile photo or a colored first-letter circle */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.avatar-letter { color: #fff; font-weight: 700; letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.avatar-img { border: 1px solid var(--border); }

/* Legacy photo slots now use the shared avatar */
.person .pic.avatar, .nopic.avatar, .spic.avatar, .status-item .avatar { border-radius: 50%; overflow: hidden; }
.person .pic.avatar-letter, .nopic.avatar-letter, .spic.avatar-letter, .status-item .avatar-letter { color: #fff; background: transparent; font-weight: 700; }
.status-item .spic.avatar { width: 40px; height: 40px; }

/* Feed + members page theming */
th { background: rgba(124,140,255,0.12); color: var(--text-dim); }
td { color: var(--text); }
.pic, .nopic, .spic { border: 1px solid var(--border) !important; background: var(--bg-2) !important; color: var(--text-faint); }
.avatar-img { border: 1px solid var(--border); }
.status-item .spic { background: var(--bg-2) !important; }
.intro { color: var(--text-dim); }
.status-login { color: var(--text-dim); }
.status-form { gap: 8px; }
.status-form input, .status-form select { background: rgba(5,8,22,0.6); border: 1px solid var(--border); color: var(--text); border-radius: 9px; }
.vote-btn { background: rgba(124,140,255,0.12); border: 1px solid var(--border); color: var(--text); }
.vote-btn.vote-on { background: rgba(124,140,255,0.3); }
.vote-note { color: var(--text-faint); }
.stars { color: #f5c542 !important; }
.stars-row { justify-content: center; }
.rank.stars { color: #f5c542; }

/* Profile custom CSS editor */
.mswrap textarea, .mswrap input[type=text], .mswrap input[type=url], .mswrap select {
  background: rgba(5,8,22,0.6) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 9px;
  padding: 8px 10px;
}
.mswrap textarea { font-family: var(--mono); }

/* Leaderboard panels (games page) */
.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .lb-grid { grid-template-columns: 1fr; } }
.lb-panel { background: rgba(5,8,22,0.35); border: 1px solid rgba(245,197,66,0.22); border-radius: var(--radius-sm); padding: 10px 12px; }
.lb-panel .head { border-bottom: 1px solid rgba(245,197,66,0.25); margin-bottom: 4px; padding-bottom: 6px; font-size: 13px; color: #f5c542; }
.lb-panel table { margin-top: 4px; font-size: 12px; }
.lb-panel th, .lb-panel td { padding: 4px 8px; }
.lb-panel .empty { padding: 6px 0; font-size: 12px; }
/* compact leaderboard rows */
.lb-panel .farm-lb-row { padding: 4px 2px; gap: 8px; }
.lb-panel .farm-lb-rank { font-size: 15px; width: 26px; }
.lb-panel .farm-lb-name { font-size: 13px; }
.lb-panel .farm-lb-stats { font-size: 11px; }

/* ------------------------------------------------------------------ */
/* Local Feed                                                          */
/* ------------------------------------------------------------------ */
.feed-wrap { max-width: 760px; }
.feed-wrap .status-form { display: flex; gap: 8px; padding: 12px 0 4px; }
.feed-wrap .status-form input,
.feed-wrap .status-form select {
  border: 1px solid var(--border); background: rgba(5,8,22,0.6); color: var(--text);
  padding: 8px 10px; font-size: 13px; border-radius: 9px; font-family: inherit;
}
.feed-wrap .status-form input { flex: 1; }
.feed-wrap .status-form select { flex: 0 0 auto; }
.feed-wrap .status-form input:focus,
.feed-wrap .status-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); outline: none; }
.feed-wrap .status-login { padding: 8px 0 0; font-size: 12px; color: var(--text-dim); }
.feed-wrap .statuses { padding: 6px 0 0; }
.feed-wrap .intro { padding: 10px 0 0; color: var(--text-dim); font-size: 12px; margin: 0; }
.feed-wrap .status-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.feed-wrap .status-item:last-child { border-bottom: none; }
.feed-wrap .status-item .sbody { min-width: 0; overflow-wrap: anywhere; flex: 1; }
.feed-wrap .status-item .sname { font-weight: 600; color: var(--text); }
.feed-wrap .status-item .stime { color: var(--text-faint); font-size: 11px; margin-left: 6px; }
.feed-wrap .status-item .stext { margin: 4px 0; color: var(--text); }
.feed-wrap .status-item .sactions button { font-size: 11px; padding: 3px 10px; margin-right: 4px; cursor: pointer; }
.feed-wrap .vote-btn { background: rgba(124,140,255,0.12); border: 1px solid var(--border); color: var(--text); border-radius: 999px; font-size: 11px; padding: 3px 10px; margin-right: 4px; cursor: pointer; }
.feed-wrap .vote-btn.vote-on { background: rgba(124,140,255,0.3); font-weight: 600; }
.feed-wrap .vote-note { color: var(--text-faint); font-size: 11px; }
.feed-wrap .badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: rgba(124,140,255,0.15); border: 1px solid var(--border); color: var(--text-dim); }

/* ------------------------------------------------------------------ */
/* Local Pricing                                                       */
/* ------------------------------------------------------------------ */
.price-wrap { max-width: 820px; }
.price-wrap .intro { padding: 10px 0 0; color: var(--text-dim); font-size: 12px; margin: 0; }
.price-wrap .price-add-btn {
  margin: 10px 0 0; border: 1px solid var(--border-strong); background: rgba(124,140,255,0.12);
  color: var(--text); padding: 6px 12px; font-size: 12px; cursor: pointer; border-radius: 9px; font-family: inherit;
}
.price-wrap .price-add-btn:hover { background: rgba(124,140,255,0.22); }
.price-wrap .price-form { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 0 4px; }
.price-wrap .price-form select,
.price-wrap .price-form input {
  border: 1px solid var(--border); background: rgba(5,8,22,0.6); color: var(--text);
  padding: 7px 10px; font-size: 13px; border-radius: 9px; font-family: inherit;
}
.price-wrap .price-form #price-store { flex: 1 1 150px; min-width: 150px; }
.price-wrap .price-form #price-item-text { flex: 0 0 120px; }
.price-wrap .price-form #price-amount { flex: 0 0 80px; }
.price-wrap .prices-wrap { display: flex; gap: 10px; padding: 10px 0 0; flex-wrap: wrap; }
.price-wrap .pcard {
  flex: 1 1 320px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  min-width: 260px; align-self: flex-start; background: rgba(5,8,22,0.4); overflow: hidden;
}
.price-wrap .pcard-head { background: rgba(124,140,255,0.16); font-weight: 700; font-size: 12px; padding: 7px 10px; color: var(--text); }
.price-wrap .prices-list { padding: 6px 10px 10px; }
.price-wrap .pgroup { margin: 8px 0; }
.price-wrap .pgroup-name { font-weight: 700; font-size: 12px; border-bottom: 1px solid var(--border); padding-bottom: 4px; color: var(--text-dim); }
.price-wrap .prow { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; flex-wrap: wrap; }
.price-wrap .prow .pstore { font-weight: 600; color: var(--text); }
.price-wrap .prow .pprice { color: var(--text-dim); }
.price-wrap .prow.cheapest .pprice { color: var(--good); font-weight: 700; font-size: 13px; }
.price-wrap .ptag { background: rgba(95,227,161,0.18); color: var(--good); font-size: 9px; padding: 2px 6px; font-weight: 700; border-radius: 999px; }
.price-wrap .pby { color: var(--text-faint); font-size: 10px; }
.price-wrap .prow .pdel { background: none; border: none; color: var(--bad); font-size: 10px; margin-left: auto; cursor: pointer; }
.price-wrap .pmore { color: var(--text-faint); font-size: 10px; padding: 2px 0 0; }

/* ------------------------------------------------------------------ */
/* Members                                                             */
/* ------------------------------------------------------------------ */
.members-wrap { max-width: 760px; }
.members-wrap table {
  width: 100%; border-collapse: collapse;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.members-wrap th, .members-wrap td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: middle; }
.members-wrap th { background: rgba(124,140,255,0.12); color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.members-wrap td { color: var(--text); }
.members-wrap tbody tr:hover { background: rgba(124,140,255,0.07); }
.members-wrap tbody tr:last-child td { border-bottom: none; }
.members-wrap .pic { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; display: block; }
.members-wrap .nopic { width: 56px; height: 56px; border-radius: 50%; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-faint); }
.members-wrap .rank { font-weight: 700; text-align: center; color: #f5c542; }
.members-wrap .head { margin-bottom: 12px; }
@media (max-width: 760px) { .members-wrap table { display: block; overflow-x: auto; } }

/* ------------------------------------------------------------------ */
/* Profile page overrides for the old style.css rules                  */
/* ------------------------------------------------------------------ */
.mswrap .box .form button,
.mswrap .form button {
  background: rgba(124,140,255,0.16) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 9px !important;
  font-weight: 600 !important;
}
.mswrap .box .form button:hover,
.mswrap .form button:hover { background: rgba(124,140,255,0.28) !important; }
.mswrap .details th { background: rgba(124,140,255,0.12) !important; color: var(--text-dim) !important; }
.mswrap .details td { background: transparent !important; color: var(--text); border-bottom: 1px solid var(--border) !important; }
.mswrap .emoji-bar button:hover { background: rgba(124,140,255,0.25) !important; border-color: var(--accent) !important; }

/* New-post alert on the Feed link */
.nav-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bad);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: 2px;
  box-shadow: 0 0 8px rgba(255,107,138,0.6);
  animation: navPulse 2s ease-in-out infinite;
}
.nav-badge[hidden] { display: none; }
@keyframes navPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255,107,138,0.5); }
  50% { box-shadow: 0 0 14px rgba(255,107,138,0.9); }
}

.price-wrap .paddr { flex: 1 0 100%; color: var(--text-faint); font-size: 11px; padding-left: 2px; }
.price-wrap .prow.cheapest .pstore { color: var(--good); }

/* ================================================================== */
/* 618SPACE — Layout v2                                                */
/* Glassy cards, gradient + neon edges, app-bar nav, phone-first.      */
/* Loaded after the original theme, so these rules refine it.          */
/* ================================================================== */

:root {
  --v2-indigo: #6f8cff;
  --v2-violet: #a855f7;
  --v2-cyan: #22d3ee;
  --v2-pink: #f472b6;
  --v2-lime: #5fe3a1;
  --v2-line: rgba(132, 162, 255, 0.16);
  --v2-line-2: rgba(150, 180, 255, 0.34);
  --v2-card: rgba(12, 18, 42, 0.74);
  --v2-card-2: rgba(17, 25, 55, 0.92);
  --v2-glow: rgba(111, 140, 255, 0.55);
  --v2-bg:
    radial-gradient(1100px 780px at 10% -8%, rgba(111, 140, 255, 0.24), transparent 62%),
    radial-gradient(900px 700px at 94% 2%, rgba(168, 85, 247, 0.20), transparent 62%),
    radial-gradient(760px 620px at 78% 88%, rgba(34, 211, 238, 0.11), transparent 62%),
    radial-gradient(560px 520px at 6% 96%, rgba(244, 114, 182, 0.09), transparent 62%),
    var(--bg-0);
  --v2-radius: 20px;
  --v2-radius-sm: 14px;
  --v2-maxw: 1120px;
  --v2-pad: clamp(16px, 4vw, 28px);
}

* { -webkit-tap-highlight-color: transparent; }

/* Components below set display, which would otherwise defeat the hidden attribute. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-size: 14.5px;
  background: var(--v2-bg);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* faint technical grid, faded toward the bottom */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(130, 160, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 160, 255, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 0%, transparent 78%);
}

a { color: #9db4ff; }
a:hover { color: #c7d3ff; }

:focus-visible {
  outline: 2px solid var(--v2-cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- top bar ---------------- */
.nav {
  padding: 10px 18px;
  gap: 2px;
  background: linear-gradient(180deg, rgba(8, 12, 32, 0.86), rgba(6, 9, 24, 0.74));
  border-bottom: 1px solid var(--v2-line);
  box-shadow: 0 18px 44px -30px #000, 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.nav::before {
  content: "618SPACE";
  font-size: 15.5px;
  letter-spacing: 0.16em;
  background: linear-gradient(92deg, #8fa6ff, #c084fc 48%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(124, 140, 255, 0.55));
}
.nav a {
  font-size: 12.5px;
  color: #a9b6e0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.nav a:hover {
  background: rgba(111, 140, 255, 0.15);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 22px -10px var(--v2-glow);
}
.nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.38), rgba(168, 85, 247, 0.26));
  border-color: rgba(160, 185, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(190, 205, 255, 0.10) inset,
    0 0 26px -8px rgba(111, 140, 255, 0.95);
}
.nav .quiet-toggle, .nav label.small { font-size: 11.5px; }

/* mobile app bar + drawer (progressive; built by space.js) */
.nav-shell { display: contents; }
.nav-bar { display: none; }
.nav-scrim { display: none; }

.nav-bar .brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fff;
  text-decoration: none;
}
.nav-bar .brand b {
  display: inline-block;
  font-weight: 800;
  background-image: linear-gradient(92deg, #8fa6ff, #c084fc 55%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(124, 140, 255, 0.65));
}
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--v2-line);
  background: rgba(111, 140, 255, 0.10);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #cfd8ff;
  box-shadow: 0 0 8px rgba(111, 140, 255, 0.8);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-shell.open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-shell.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-shell.open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------------- page shell ---------------- */
.wrap {
  width: 100%;
  max-width: var(--v2-maxw);
  margin: 0 auto;
  padding: clamp(20px, 3.4vw, 34px) var(--v2-pad) 80px;
}
.feed-wrap { max-width: 800px; }
.price-wrap { max-width: 1040px; }
.members-wrap { max-width: 980px; }

.card {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--v2-radius);
  padding: 18px 20px 20px;
  margin-bottom: 18px;
  background:
    linear-gradient(180deg, rgba(24, 34, 70, 0.88), rgba(9, 14, 34, 0.90)) padding-box,
    linear-gradient(135deg, rgba(111, 140, 255, 0.50), rgba(168, 85, 247, 0.20) 42%, rgba(34, 211, 238, 0.38)) border-box;
  box-shadow:
    0 26px 60px -34px #000,
    0 0 60px -34px rgba(111, 140, 255, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(178, 198, 255, 0.75), transparent);
  box-shadow: 0 0 12px 1px rgba(111, 140, 255, 0.55);
}
.card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  top: -160px;
  right: -110px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.20), transparent 68%);
}
.card > * { position: relative; z-index: 1; }

.card > .head {
  gap: 10px;
  justify-content: flex-start;
  padding-bottom: 12px;
  margin-bottom: 14px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #d5ddff;
}
.card > .head::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v2-cyan), var(--v2-violet));
  box-shadow: 0 0 12px 1px rgba(34, 211, 238, 0.75);
}
.card > .head .more { margin-left: auto; }

.section {
  border-radius: var(--v2-radius);
  border: 1px solid var(--v2-line);
  box-shadow: 0 24px 56px -34px #000, 0 0 50px -32px var(--v2-glow);
}
.section > .head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 2px 0 12px;
  border-bottom: 1px solid var(--v2-line);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d5ddff;
}
.section > .head::before {
  content: "";
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--v2-cyan), var(--v2-violet));
  box-shadow: 0 0 12px 1px rgba(34, 211, 238, 0.75);
}
.section > .head .more { margin-left: auto; text-transform: none; letter-spacing: 0.02em; }
.section .intro { padding: 0 0 10px; margin: 0; color: var(--text-dim); font-size: 12.5px; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--v2-line-2);
  background: rgba(111, 140, 255, 0.12);
  color: #eef2ff;
  text-decoration: none;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.06s ease, border-color 0.16s ease;
}
.btn:hover {
  background: rgba(111, 140, 255, 0.22);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 26px -10px rgba(111, 140, 255, 0.95);
  border-color: rgba(170, 195, 255, 0.5);
}
.btn:active { transform: translateY(1px); }
.btn.primary, .btn.signup, .btn.cta {
  background: linear-gradient(135deg, #5f7dff, #a855f7 52%, #ec4899);
  border-color: transparent;
  color: #fff;
  box-shadow:
    0 10px 30px -14px rgba(139, 92, 246, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.10) inset;
}
.btn.primary:hover, .btn.signup:hover, .btn.cta:hover {
  filter: brightness(1.08);
  box-shadow:
    0 12px 36px -12px rgba(168, 85, 247, 1),
    0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(255, 107, 138, 0.14); border-color: rgba(255, 107, 138, 0.45); color: #ff9db2; }

/* ---------------- inputs ---------------- */
input, textarea, select {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--v2-line);
  background: rgba(4, 7, 20, 0.66);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
input:hover, textarea:hover, select:hover { border-color: rgba(150, 180, 255, 0.30); }
input:focus, textarea:focus, select:focus {
  border-color: rgba(140, 170, 255, 0.85);
  background: rgba(4, 7, 20, 0.85);
  box-shadow: 0 0 0 3px rgba(111, 140, 255, 0.28), 0 0 24px -8px rgba(111, 140, 255, 0.9);
  outline: none;
}

/* ---------------- home: hero + two columns ---------------- */
.home-wrap { max-width: 1160px; padding-top: clamp(20px, 3vw, 30px); }

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin: 0 0 22px;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 24px;
  border: 1px solid rgba(132, 162, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(24, 32, 74, 0.92), rgba(8, 12, 30, 0.90) 62%);
  box-shadow:
    0 30px 80px -40px #000,
    0 0 90px -50px rgba(111, 140, 255, 1),
    0 1px 0 rgba(255, 255, 255, 0.07) inset;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(620px 320px at 82% 10%, rgba(168, 85, 247, 0.22), transparent 65%),
    radial-gradient(460px 300px at 12% 100%, rgba(34, 211, 238, 0.14), transparent 65%);
}
.hero .eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8fd8ea;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(27px, 4.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: #fff;
}
.hero h1 .grad {
  background: linear-gradient(92deg, #8fa6ff, #c084fc 48%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(124, 140, 255, 0.35));
}
.hero .lede {
  margin: 0;
  max-width: 62ch;
  color: #a9b6d9;
  font-size: 14.5px;
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.55;
  animation: v2drift 14s ease-in-out infinite alternate;
}
.hero-orb.o1 { width: 210px; height: 210px; right: 6%; top: -70px; background: rgba(168, 85, 247, 0.55); }
.hero-orb.o2 { width: 170px; height: 170px; right: 26%; bottom: -90px; background: rgba(34, 211, 238, 0.38); animation-delay: -6s; }
@keyframes v2drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-22px, 16px, 0) scale(1.08); }
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
}
.home-grid .main { min-width: 0; }
.home-grid .side { position: sticky; top: 88px; min-width: 0; }

/* people tiles */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(102px, 1fr));
  gap: 18px 12px;
  justify-items: center;
  padding: 4px 0 2px;
}
.people > .empty { grid-column: 1 / -1; padding: 14px 0; }
.person {
  width: auto;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.person a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  color: #b9c6ee;
}
.person .pic, .person img, .person .avatar {
  width: 88px !important;
  height: 88px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(160, 185, 255, 0.55) !important;
  background: var(--bg-2) !important;
  object-fit: cover;
  box-shadow:
    0 0 0 5px rgba(111, 140, 255, 0.10),
    0 0 30px -8px rgba(111, 140, 255, 0.85),
    0 10px 24px -12px #000;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.person:hover .avatar, .person:hover img, .person:hover .pic {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 5px rgba(168, 85, 247, 0.16),
    0 0 38px -6px rgba(168, 85, 247, 0.85),
    0 14px 30px -12px #000;
}

/* what's happening */
.wh-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
}
.wh-box {
  border-radius: var(--v2-radius-sm);
  border: 1px solid var(--v2-line);
  background: rgba(6, 10, 26, 0.55);
  overflow: hidden;
  box-shadow: 0 0 30px -22px var(--v2-glow) inset;
}
.wh-head {
  padding: 11px 13px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #d7dfff;
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.18), rgba(168, 85, 247, 0.10));
  border-bottom: 1px solid var(--v2-line);
}
.wh-list { padding: 4px 13px 10px; }
.wh-row { padding: 8px 0; font-size: 12px; line-height: 1.45; }
.wh-row strong { color: #fff; }
.wh-teaser { padding: 10px 0; font-size: 12px; line-height: 1.5; }

/* auth card in the rail */
.login {
  padding: 20px;
  border-radius: var(--v2-radius);
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(22, 31, 66, 0.94), rgba(9, 14, 34, 0.94)) padding-box,
    linear-gradient(135deg, rgba(111, 140, 255, 0.55), rgba(168, 85, 247, 0.22) 50%, rgba(34, 211, 238, 0.42)) border-box;
  box-shadow:
    0 26px 60px -34px #000,
    0 0 70px -34px rgba(111, 140, 255, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.login h2 {
  margin: 0 0 6px;
  text-align: left;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: #fff;
}
.login label {
  display: block;
  margin: 12px 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93a0c8;
}
.login label span {
  display: block;
  width: auto;
  margin-bottom: 6px;
  text-align: left;
  color: #93a0c8;
}
.login input, .login select {
  width: 100%;
  padding: 11px 12px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
}
.login .buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.login .btn { width: 100%; }
.login .forgot { margin: 10px 0 0; text-align: left; }
.login .note { margin-top: 10px; color: var(--text-dim); }
.welcome { padding: 4px 0 0; }
#auth-status { text-align: left; }
#welcome-box h2 { margin-bottom: 2px; }

/* ---------------- feed ---------------- */
.feed-wrap .status-form {
  padding: 12px 0 6px;
  gap: 10px;
}
.feed-wrap .status-form input, .feed-wrap .status-form select { min-height: 44px; }
.feed-wrap .status-item {
  padding: 14px 0;
  gap: 12px;
}
.feed-wrap .status-item .avatar { width: 44px; height: 44px; }
.feed-wrap .status-item .stext { line-height: 1.55; }
.feed-wrap .tabs {
  gap: 8px;
  padding: 4px 0 10px;
  margin-bottom: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.feed-wrap .tabs::-webkit-scrollbar { display: none; }
.feed-wrap .tab {
  border-radius: 999px;
  padding: 7px 14px;
  white-space: nowrap;
  background: rgba(111, 140, 255, 0.09);
}
.feed-wrap .tab.active {
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.42), rgba(168, 85, 247, 0.28));
  border-color: rgba(160, 185, 255, 0.35);
  box-shadow: 0 0 22px -8px rgba(111, 140, 255, 0.9);
}

/* ---------------- prices ---------------- */
.price-wrap .prices-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 14px;
}
.price-wrap .pcard {
  flex: initial;
  min-width: 0;
  width: auto;
  align-self: stretch;
  border-radius: var(--v2-radius-sm);
  background: linear-gradient(180deg, rgba(16, 24, 54, 0.72), rgba(6, 10, 26, 0.72));
  box-shadow: 0 0 40px -28px var(--v2-glow) inset;
}
.price-wrap .pcard:nth-last-child(1):nth-child(odd) { grid-column: 1 / -1; }
.price-wrap .pcard-head {
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.20), rgba(168, 85, 247, 0.10));
  border-bottom: 1px solid var(--v2-line);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 11px;
}
.price-wrap .pgroup-name { color: #c3cdf0; letter-spacing: 0.02em; }
.price-wrap .prow { padding: 5px 0; }
.price-wrap .prow.cheapest .pprice { text-shadow: 0 0 18px rgba(95, 227, 161, 0.55); }
.price-wrap .prow.cheapest .pstore { color: #d9ffe9; }
.price-wrap .price-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px 0 2px;
}
.price-wrap .price-form .btn { min-height: 42px; }
.price-wrap .prices-wrap .empty { padding: 10px 2px; }

/* ---------------- members ---------------- */
.members-wrap {
  padding-top: clamp(20px, 3vw, 32px);
}
.members-wrap > .head {
  margin: 0 0 16px;
  padding: 0 2px 14px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d5ddff;
  border-bottom: 1px solid var(--v2-line);
}
.members-wrap table {
  border-radius: var(--v2-radius);
  border: 1px solid var(--v2-line);
  background: rgba(9, 14, 34, 0.72);
  box-shadow: 0 26px 60px -36px #000, 0 0 60px -36px var(--v2-glow);
}
.members-wrap th {
  background: rgba(111, 140, 255, 0.12);
  color: #aeb9dd;
}
.members-wrap tbody tr:hover { background: rgba(111, 140, 255, 0.08); }
.members-wrap .avatar { box-shadow: 0 0 0 3px rgba(111, 140, 255, 0.14), 0 0 20px -8px var(--v2-glow); }

/* ---------------- messages ---------------- */
.grid2 { gap: 18px; }
@media (min-width: 861px) {
  .grid2 { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
}
#chat-log {
  background: rgba(4, 7, 20, 0.5) !important;
  border: 1px solid var(--v2-line) !important;
  border-radius: 14px !important;
}

/* ---------------- games ---------------- */
.lb-panel {
  border-radius: var(--v2-radius-sm);
  background: rgba(6, 10, 26, 0.55);
  padding: 12px 14px 13px;
}
.lb-panel .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 9px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #f2c65a;
  border-bottom: 1px solid rgba(245, 197, 66, 0.22);
}
.slot-grid { gap: 8px; }
.slot-cell {
  border-radius: 12px;
  box-shadow: 0 0 24px -16px var(--v2-glow) inset, 0 8px 20px -16px #000;
}
.seat {
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.30);
  border-color: rgba(160, 185, 255, 0.16);
}

/* ---------------- profile (MySpace layout) ---------------- */
.mswrap {
  max-width: 1180px;
  gap: 20px;
  padding: 24px var(--v2-pad) 72px;
  min-height: auto;
}
.mswrap .left { width: 300px; }
.mswrap > .right {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 0;
}
.box {
  border-radius: var(--v2-radius-sm);
  border: 1px solid var(--v2-line);
  background: rgba(12, 18, 42, 0.72);
  box-shadow: 0 20px 46px -34px #000, 0 0 40px -32px var(--v2-glow) inset;
}
.box .bar {
  background: linear-gradient(135deg, #5f7dff, #a855f7 60%, #ec4899);
  border-radius: calc(var(--v2-radius-sm) - 1px) calc(var(--v2-radius-sm) - 1px) 0 0;
  color: #fff;
  letter-spacing: 0.02em;
}
.box h4 { color: #b7a5ff; }
.name { color: #fff; letter-spacing: -0.02em; }
.photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--v2-line-2);
  background:
    radial-gradient(circle at 50% 32%, rgba(111, 140, 255, 0.28), transparent 68%),
    rgba(4, 7, 20, 0.6);
  box-shadow: 0 0 0 5px rgba(111, 140, 255, 0.08), 0 0 40px -14px var(--v2-glow);
  overflow: hidden;
}
.photo > * { flex: 0 0 auto; border-radius: 14px; }
.photo > img { max-width: 100%; height: auto; object-fit: cover; }
.mswrap .edit-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  margin: 2px 0 12px;
  padding: 8px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #eaf0ff;
  background: rgba(111, 140, 255, 0.16);
  border: 1px solid var(--v2-line-2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.mswrap .edit-profile:hover {
  background: rgba(111, 140, 255, 0.28);
  box-shadow: 0 0 26px -10px var(--v2-glow);
}
.right .top3 { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 14px; }
.right .friend img, .right .fbox {
  border-radius: 14px;
  border: 1px solid rgba(160, 185, 255, 0.35);
  box-shadow: 0 0 24px -12px var(--v2-glow);
}
.friendchip {
  background: rgba(111, 140, 255, 0.10);
  border-color: var(--v2-line-2);
  color: #c3cdf5;
  border-radius: 999px;
}
.details th { background: rgba(111, 140, 255, 0.12) !important; }

/* ---------------- reels / live pages ---------------- */
.swipe {
  border-radius: var(--v2-radius-sm);
  border-color: var(--v2-line) !important;
  box-shadow: 0 30px 70px -40px #000, 0 0 60px -36px rgba(34, 211, 238, 0.5);
  height: min(58vh, 560px);
  scrollbar-width: none;
}
.swipe::-webkit-scrollbar { display: none; }
.slide video { border-radius: var(--v2-radius-sm); }
.rectime { color: #ff8aa6; text-shadow: 0 0 20px rgba(255, 107, 138, 0.6); }
.chip { background: rgba(111, 140, 255, 0.85); box-shadow: 0 0 18px -6px rgba(111, 140, 255, 0.9); }
.sbtn {
  background: rgba(10, 16, 38, 0.9);
  border: 1px solid var(--v2-line-2);
  color: #dfe6ff;
  border-radius: 999px;
}
.sbtn.sbad { background: #b3123a; border-color: #ff5c84; color: #fff; }

body.immersive { background: #04060f; }
body.immersive .nav { position: static; }
body.immersive .nav-shell { position: static; }
body.immersive .tabs {
  background: linear-gradient(180deg, rgba(10, 16, 40, 0.95), rgba(6, 9, 24, 0.95));
  border-bottom: 1px solid var(--v2-line);
}
body.immersive .tabs a { color: #a9b6e0; }
body.immersive .tabs a.on {
  color: #fff;
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.34), rgba(168, 85, 247, 0.24));
  box-shadow: 0 0 26px -10px rgba(111, 140, 255, 0.9) inset;
}

/* ---------------- reset / account ---------------- */
.box[style], .grid2 > .card { min-width: 0; }
.reset-box, body > .box {
  max-width: 430px;
  margin: 36px auto;
  padding: 22px;
}

/* ---------------- tables ---------------- */
table { border-collapse: separate; border-spacing: 0; }
th {
  background: rgba(111, 140, 255, 0.10);
  color: #aeb9dd;
  font-size: 10.5px;
  letter-spacing: 0.07em;
}
th, td { border-bottom: 1px solid var(--v2-line); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(111, 140, 255, 0.05); }

/* ---------------- account / reset / edit profile ---------------- */
.nav label.small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
input[type="checkbox"], input[type="radio"] { accent-color: #7c8cff; width: 15px; height: 15px; padding: 0; }
input[type="range"] { accent-color: #7c8cff; height: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
input[type="color"] { padding: 3px; height: 38px; }

main.profile {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 34px) var(--v2-pad) 70px;
}
main.profile > .card { padding: 24px 26px 26px; }
main.profile h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #fff;
}
main.profile .muted { color: #9aa7cc; font-size: 12.5px; line-height: 1.5; }
main.profile .form label {
  display: block;
  margin: 14px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93a0c8;
}
main.profile .form label input {
  width: 100%;
  margin-top: 6px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
}
main.profile .form .row { margin-top: 18px; }
main.profile .form button {
  min-height: 42px;
  padding: 10px 22px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #5f7dff, #a855f7 55%, #ec4899);
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 30px -16px rgba(139, 92, 246, 0.95);
}
main.profile .form button:hover { filter: brightness(1.08); }

body > .box {
  max-width: 440px;
  margin: 44px auto 70px;
  padding: 26px 24px 22px;
  border-radius: var(--v2-radius);
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(22, 31, 66, 0.94), rgba(9, 14, 34, 0.94)) padding-box,
    linear-gradient(135deg, rgba(111, 140, 255, 0.55), rgba(168, 85, 247, 0.22) 50%, rgba(34, 211, 238, 0.42)) border-box;
  box-shadow: 0 26px 60px -34px #000, 0 0 70px -34px rgba(111, 140, 255, 0.9);
}
body > .box h2 {
  margin: 0 0 14px;
  text-align: left;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: #fff;
}
body > .box label {
  display: block;
  margin: 14px 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93a0c8;
}
body > .box input { width: 100%; }
body > .box button[type="submit"] {
  width: 100%;
  min-height: 44px;
  margin-top: 20px;
  padding: 11px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #5f7dff, #a855f7 55%, #ec4899);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 12px 30px -14px rgba(139, 92, 246, 0.95);
}
body > .box button[type="submit"]:hover { filter: brightness(1.08); }
body > .box .status { margin-top: 12px; }

body.editpage { background: var(--v2-bg); }
body.editpage .edit-wrap {
  max-width: 940px;
  margin: 26px auto 70px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--v2-radius);
  border: 1px solid var(--v2-line);
  background: linear-gradient(180deg, rgba(18, 26, 58, 0.84), rgba(8, 12, 30, 0.9));
  box-shadow: 0 26px 60px -34px #000, 0 0 60px -36px var(--v2-glow);
}
body.editpage .edit-wrap > h2 {
  font-size: 24px;
  letter-spacing: -0.02em;
  color: #fff;
}
body.editpage .section-title {
  color: #d5ddff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--v2-line);
}
body.editpage .help {
  width: 210px;
  background: rgba(111, 140, 255, 0.07);
  border-color: var(--v2-line);
  border-radius: var(--v2-radius-sm);
  color: #9aa7cc;
  line-height: 1.5;
}
body.editpage .field input, body.editpage .field textarea, body.editpage .field select {
  border-color: var(--v2-line);
  background: rgba(4, 7, 20, 0.62);
}
body.editpage .tab-btn {
  border-radius: 10px;
  border-color: var(--v2-line);
  color: #a9b6e0;
}
body.editpage .tab-btn.active {
  background: linear-gradient(135deg, rgba(111, 140, 255, 0.38), rgba(168, 85, 247, 0.28));
  border-color: rgba(160, 185, 255, 0.34);
  color: #fff;
  box-shadow: 0 0 22px -8px rgba(111, 140, 255, 0.9);
}
body.editpage .tabs { border-bottom-color: var(--v2-line); }

/* ---------------- phone ---------------- */
@media (max-width: 860px) {
  body { font-size: 15px; }

  .nav-shell {
    display: block;
    position: sticky;
    top: 0;
    z-index: 90;
    padding-top: env(safe-area-inset-top);
    background: linear-gradient(180deg, rgba(6, 9, 24, 0.96), rgba(6, 9, 24, 0.86));
    border-bottom: 1px solid var(--v2-line);
    box-shadow: 0 14px 40px -26px #000;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }
  .nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 56px;
    padding: 0 14px;
  }
  .nav-shell > .nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: calc(56px + env(safe-area-inset-top));
    z-index: 95;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    max-height: calc(100dvh - 56px - env(safe-area-inset-top));
    overflow-y: auto;
    padding: 10px 12px calc(18px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #0a0f24, #060915);
    border-bottom: 1px solid var(--v2-line-2);
    box-shadow: 0 30px 80px -20px #000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  .nav-shell > .nav::before { display: none; }
  .nav-shell > .nav .sep { display: none; }
  .nav-shell > .nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 14px;
  }
  .nav-shell > .nav a.active { border-color: rgba(160, 185, 255, 0.30); }
  .nav-shell > .nav label.small {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    margin-top: 6px;
    border-top: 1px solid var(--v2-line);
    font-size: 13px;
  }
  .nav-shell.open > .nav { display: flex; animation: navDrop 0.18s ease; }
  @keyframes navDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2, 4, 12, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .nav-shell.open .nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .wrap, .home-wrap, .price-wrap, .members-wrap {
    max-width: none;
    padding: 16px 14px 56px;
  }
  .home-wrap { padding-top: 14px; }
  .feed-wrap { padding-top: 14px; }

  .card { padding: 15px 15px 17px; border-radius: 17px; margin-bottom: 14px; }
  .card > .head { font-size: 11px; letter-spacing: 0.11em; padding-bottom: 10px; margin-bottom: 12px; }
  .lb-panel { padding: 10px 12px 11px; }
  .lb-panel .head { font-size: 10.5px; padding-bottom: 8px; margin-bottom: 8px; }

  .hero { padding: 24px 20px; border-radius: 20px; margin-bottom: 16px; }
  .hero h1 { font-size: clamp(25px, 7.4vw, 34px); }
  .hero .lede { font-size: 14px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-orb { opacity: 0.42; }

  .home-grid { grid-template-columns: 1fr; gap: 16px; }
  .home-grid .side { position: static; order: -1; }

  .people { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 16px 8px; }
  .person .pic, .person img, .person .avatar { width: 78px !important; height: 78px !important; }
  .person a { font-size: 12px; }

  .wh-wrap { grid-template-columns: 1fr; gap: 10px; }
  .wh-row { padding: 9px 0; font-size: 12.5px; }

  .login { padding: 16px; border-radius: 17px; }
  .login .buttons { gap: 8px; }
  .login .btn { min-height: 44px; }

  .btn { min-height: 44px; padding: 10px 16px; }
  input, textarea, select { font-size: 16px; padding: 12px; }

  .grid2, .lb-grid { grid-template-columns: 1fr; }
  .price-wrap .prices-wrap { grid-template-columns: 1fr; }
  .price-wrap .pcard:nth-last-child(1):nth-child(odd) { grid-column: auto; }
  .price-wrap .price-form { grid-template-columns: 1fr; }
  .price-wrap .price-form input, .price-wrap .price-form select, .price-wrap .price-form .btn { width: 100%; }

  .mswrap { flex-direction: column; padding: 14px 12px 56px; gap: 14px; }
  .mswrap .left { width: 100%; }
  .mswrap > .right { width: 100%; max-width: 100%; }
  .mswrap .photo { width: 100% !important; height: auto !important; aspect-ratio: auto; padding: 14px; }
  .mswrap .photo > .avatar, .mswrap .photo > img {
    width: 64vw !important;
    max-width: 280px !important;
    height: 64vw !important;
    max-height: 280px !important;
    font-size: 24vw !important;
  }
  .mswrap .edit-profile { min-height: 44px; }
  .mswrap .name { font-size: 24px; margin: 2px 0 10px; }
  .right .top3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

  .members-wrap table { display: table; min-width: 640px; }
  .members-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Phones: turn the members table into stacked cards instead of a side-scroll. */
  .members-wrap { overflow-x: visible; }
  .members-wrap table, .members-wrap tbody, .members-wrap tr, .members-wrap td { display: block; }
  .members-wrap table {
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
  .members-wrap thead { display: none; }
  .members-wrap tbody tr {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-areas:
      "pic first stars"
      "pic last farm";
    gap: 2px 12px;
    align-items: center;
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: var(--v2-radius-sm);
    border: 1px solid var(--v2-line);
    background: rgba(9, 14, 34, 0.72);
    box-shadow: 0 0 40px -32px var(--v2-glow);
  }
  .members-wrap tbody tr:hover { background: rgba(16, 24, 54, 0.82); }
  .members-wrap tbody td { border: 0; padding: 0; }
  .members-wrap td:nth-child(1) { grid-area: pic; align-self: center; }
  .members-wrap td:nth-child(2) { grid-area: first; align-self: end; font-weight: 700; color: #fff; font-size: 14px; }
  .members-wrap td:nth-child(3) { grid-area: last; align-self: start; font-size: 12px; color: #9aa7cc; }
  .members-wrap td:nth-child(4) { grid-area: stars; align-self: end; text-align: right; }
  .members-wrap td:nth-child(5) { grid-area: farm; align-self: start; text-align: right; font-size: 12.5px; }
  .members-wrap .avatar { width: 54px !important; height: 54px !important; }

  .swipe { height: calc(100dvh - 250px); min-height: 400px; }

  body > .box { margin: 18px 14px; max-width: none; }

  #chat-log { height: 52vh !important; }

  .card > .head .more { font-size: 10px; }

  main.profile { padding: 16px 12px 56px; }
  main.profile > .card { padding: 18px 16px 20px; }

  body.editpage .edit-wrap { margin: 14px 12px 56px; padding: 16px 14px 22px; }
  body.editpage .row { flex-direction: column; align-items: stretch; gap: 8px; }
  body.editpage .help { width: 100%; }
  body.editpage .field { width: 100%; }
  body.editpage .actions { flex-wrap: wrap; }
  body.editpage .edit-nav a { min-height: 42px; display: inline-flex; align-items: center; }
  .card > .head { flex-wrap: wrap; }
  .card > .head .more { margin-left: auto; text-align: right; }

  body > .box { margin: 18px 14px 48px; max-width: none; padding: 20px 16px 18px; }

  th, td { padding: 9px 10px; }
}

@media (max-width: 430px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .person .pic, .person img, .person .avatar { width: 72px !important; height: 72px !important; }
  .login .buttons { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
