/* ============================================================
   Guhens.net — pitch black, glass, silver script, gold filigree
   ============================================================ */

:root {
  --bg: #040404;
  --bg-soft: #0b0b0c;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.1);
  --text: #eaeaea;
  --text-dim: #9a9a9a;
  --silver: #c9c9c9;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.35);
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: radial-gradient(1200px 700px at 50% 20%, #131314 0%, #09090a 45%, var(--bg) 100%);
  color: var(--text);
  font-family: "Poppins", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- gold filigree waves (alive, gently swaying) ---------- */
.waves {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}
.waves path { will-change: transform, opacity; }
.waves path:nth-of-type(1) { transform-origin: 95% 60%; animation: sway1 16s ease-in-out infinite alternate; }
.waves path:nth-of-type(2) { transform-origin: 95% 65%; animation: sway2 21s ease-in-out infinite alternate; }
.waves path:nth-of-type(3) { transform-origin: 96% 70%; animation: sway1 26s ease-in-out infinite alternate-reverse; }
.waves path:nth-of-type(4) { transform-origin: 5% 20%; animation: sway3 19s ease-in-out infinite alternate; }
.waves path:nth-of-type(5) { transform-origin: 4% 26%; animation: sway3 24s ease-in-out infinite alternate-reverse; }
@keyframes sway1 {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.85; }
  50% { transform: translate(-9px, 7px) rotate(-1.1deg); opacity: 1; }
  100% { transform: translate(6px, -8px) rotate(0.9deg); opacity: 0.7; }
}
@keyframes sway2 {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.55; }
  50% { transform: translate(8px, 10px) rotate(1.2deg); opacity: 0.9; }
  100% { transform: translate(-7px, -6px) rotate(-0.8deg); opacity: 0.5; }
}
@keyframes sway3 {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.25; }
  50% { transform: translate(6px, -5px) rotate(1.4deg); opacity: 0.45; }
  100% { transform: translate(-5px, 6px) rotate(-1deg); opacity: 0.18; }
}

.page { position: relative; z-index: 1; }

/* ---------- logo ---------- */
.logo {
  font-family: "Lobster", cursive;
  color: #f5f5f5;
  text-align: center;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 1.1;
  letter-spacing: 1px;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.55),
    0 0 60px rgba(255, 255, 255, 0.22),
    0 3px 2px rgba(0, 0, 0, 0.9);
  position: relative;
  user-select: none;
}
.logo .star {
  font-size: 0.35em;
  position: relative;
  top: -1.2em;
  left: 0.05em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}
.logo-sm {
  font-family: "Lobster", cursive;
  font-size: 30px;
  color: #f0f0f0;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
  text-decoration: none;
}

/* ---------- auth screens ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 70px;
}

.auth-card { width: min(430px, 92vw); margin-top: 26px; }

.script-label {
  font-family: "Great Vibes", cursive;
  color: var(--silver);
  font-size: 34px;
  text-align: center;
  display: block;
  margin: 18px 0 8px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.glass-input {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  height: 56px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 0 24px rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.glass-input:focus-within {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 0 30px rgba(255, 255, 255, 0.12);
}
/* the light streak on the top edge — alive, breathing glow */
.glass-input::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  right: 34%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.85), transparent);
  border-radius: 2px;
  filter: blur(0.4px);
  animation: streakGlide 7s ease-in-out infinite alternate;
}
@keyframes streakGlide {
  0% { transform: translateX(-14%); opacity: 0.55; }
  50% { transform: translateX(6%); opacity: 1; filter: blur(0.4px) drop-shadow(0 0 6px rgba(255, 235, 180, 0.55)); }
  100% { transform: translateX(16%); opacity: 0.6; }
}
.glass-input svg { flex: 0 0 22px; opacity: 0.7; }
.glass-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  padding: 0 12px;
  font-family: inherit;
  letter-spacing: 0.4px;
}
.glass-input input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 60px #101010 inset;
}
.eye-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
}
.eye-btn:hover { opacity: 1; }

.glass-button {
  position: relative;
  width: 100%;
  margin-top: 30px;
  height: 58px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
  color: var(--text);
  font-family: "Poppins", sans-serif;
  font-size: 17px;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 0 24px rgba(255,255,255,0.05);
  transition: all 0.25s;
}
.glass-button::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: streakGlide 8s ease-in-out infinite alternate-reverse;
}
.glass-button:hover {
  border-color: var(--gold-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 0 34px rgba(212, 175, 55, 0.18);
  color: #fff;
}

.auth-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 26px;
  line-height: 1.7;
}
.auth-note a { color: var(--gold); text-decoration: none; }
.auth-note a:hover { text-shadow: 0 0 8px var(--gold-soft); }

.form-error {
  margin-top: 20px;
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  text-align: center;
}
.form-notice {
  margin-top: 20px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.07);
  color: #86efac;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  text-align: center;
}

/* ---------- dashboard ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 38px 10px;
}
.welcome {
  font-family: "Great Vibes", cursive;
  font-size: clamp(34px, 4.5vw, 52px);
  color: var(--silver);
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.18);
  flex: 1;
  text-align: center;
}
.avatar-zone { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--gold-soft);
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lobster", cursive;
  font-size: 24px;
  color: var(--gold);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.2);
}
.logout-btn {
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.logout-btn:hover { color: var(--red); border-color: rgba(248, 113, 113, 0.4); }

/* ---------- avatar button + profile banner panel ---------- */
.avatar-btn {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2.5px solid var(--gold-soft);
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.25);
  transition: box-shadow 0.25s, border-color 0.25s;
}
.avatar-btn:hover { border-color: var(--gold); box-shadow: 0 0 26px rgba(212, 175, 55, 0.4); }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lobster", cursive;
  font-size: 38px;
  color: var(--gold);
}
.avatar-fallback.big { font-size: 60px; }

.profile-panel {
  position: fixed;
  top: 130px;
  right: 26px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  background: linear-gradient(180deg, #121213, #0a0a0b);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.08);
  z-index: 50;
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.profile-panel.open { opacity: 1; transform: none; pointer-events: auto; }

.pp-banner {
  position: relative;
  height: 118px;
  border-radius: 20px 20px 0 0;
  background:
    radial-gradient(240px 90px at 80% 0%, rgba(212, 175, 55, 0.35), transparent 70%),
    linear-gradient(120deg, rgba(212, 175, 55, 0.22), rgba(20, 20, 22, 0.1) 60%),
    #101011;
  border-bottom: 1px solid var(--gold-soft);
}
.pp-avatar {
  position: absolute;
  left: 22px;
  bottom: -62px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 4px solid #0c0c0d;
  outline: 2.5px solid var(--gold-soft);
  overflow: hidden;
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.75);
}
.pp-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }

.pp-body { padding: 74px 22px 18px; }
.pp-names { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-display { font-family: "Lobster", cursive; font-size: 27px; text-shadow: 0 0 14px rgba(255,255,255,0.2); }
.pp-role {
  font-size: 10px;
  letter-spacing: 0.18em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
}
.pp-role.owner { border-color: var(--gold-soft); color: var(--gold); box-shadow: 0 0 12px rgba(212,175,55,0.15); }
.pp-role.admin { border-color: rgba(74, 222, 128, 0.4); color: var(--green); }
.pp-discord { color: var(--text-dim); font-size: 13.5px; margin-top: 2px; }
.pp-title { color: var(--silver); font-size: 13.5px; margin-top: 8px; }

.pp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.pp-stat {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pp-stat .k { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.pp-stat .v { font-size: 15.5px; color: #fff; }
.pp-stat .v.gold { color: var(--gold); }

.pp-section { margin-top: 18px; }
.pp-section h4 {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.pp-schedule { display: flex; flex-direction: column; }
.pp-event {
  display: flex;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.pp-event:last-child { border-bottom: none; }
.pp-ev-icon { font-size: 20px; line-height: 1.4; filter: drop-shadow(0 0 8px rgba(255,255,255,0.12)); }
.pp-ev-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pp-ev-title { font-size: 13.5px; color: var(--text); }
.pp-ev-sub { font-size: 11.5px; color: var(--text-dim); }
.pp-badge {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: 1px;
}
.pp-badge.gold { border: 1px solid var(--gold-soft); color: var(--gold); }
.pp-badge.warn { border: 1px solid rgba(251, 191, 36, 0.45); color: var(--amber); }
.pp-empty { color: var(--text-dim); font-size: 12.5px; line-height: 1.7; }

.pp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.pp-cards-note { color: var(--text-dim); font-size: 11.5px; letter-spacing: 0.08em; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  gap: 26px;
  justify-content: center;
  align-content: center;
  padding: 7vh 6vw 10vh;
}

.card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px 26px 26px;
  min-height: 190px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 10px 30px rgba(0,0,0,0.5);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  right: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: streakGlide 9s ease-in-out infinite alternate;
}
.card:nth-child(2n)::before { animation-duration: 11s; animation-direction: alternate-reverse; }
.card:nth-child(3n)::before { animation-duration: 13s; }
.card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 16px 44px rgba(0,0,0,0.65), 0 0 34px rgba(212,175,55,0.14);
}
.card .icon { font-size: 40px; display: block; margin-bottom: 14px; filter: drop-shadow(0 0 12px rgba(255,255,255,0.15)); }
.card h3 {
  font-family: "Lobster", cursive;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.65; }
.card .status {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.online { background: var(--green); box-shadow: 0 0 10px rgba(74, 222, 128, 0.7); }
.dot.soon { background: var(--amber); box-shadow: 0 0 10px rgba(251, 191, 36, 0.6); }
.card.soon { opacity: 0.55; }
.card.owner-card { border-color: rgba(212, 175, 55, 0.4); }
.card.owner-card:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 16px 44px rgba(0,0,0,0.65), 0 0 40px rgba(212,175,55,0.28); }

/* ---------- content pages (guhensy / admin) ---------- */
.content {
  max-width: 1060px;
  margin: 0 auto;
  padding: 30px 24px 80px;
}
.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.page-title {
  font-family: "Lobster", cursive;
  font-size: 42px;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.25);
}
.back-link { color: var(--text-dim); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--gold); }

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 24px 26px;
  margin-bottom: 26px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.panel h2 {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
}
.stat .k { color: var(--text-dim); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.stat .v { font-size: 22px; margin-top: 4px; color: #fff; }
.stat .v.gold { color: var(--gold); }

.board { width: 100%; border-collapse: collapse; }
.board td { padding: 9px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 14.5px; }
.board tr:last-child td { border-bottom: none; }
.board .rank { color: var(--text-dim); width: 46px; }
.board .val { text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.board tr.me td { background: rgba(212, 175, 55, 0.07); }
.board tr.me .name::after { content: " — you"; color: var(--gold); font-size: 12px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.admin-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); vertical-align: middle; }
.chip {
  display: inline-block;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 11px;
  padding: 3px 10px;
  margin: 2px;
  color: var(--text-dim);
}
.chip.on { border-color: rgba(74,222,128,0.45); color: var(--green); }
.mini-btn {
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.mini-btn:hover { border-color: var(--gold-soft); color: var(--gold); }
.mini-btn.danger:hover { border-color: rgba(248,113,113,0.5); color: var(--red); }
.code-reveal {
  font-family: "Consolas", monospace;
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.07);
  border: 1px dashed var(--gold-soft);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
  margin-bottom: 16px;
}
.audit-line { font-size: 12.5px; color: var(--text-dim); padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.audit-line b { color: var(--silver); font-weight: 500; }

/* ---------- players ---------- */
.player-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.player-row:last-child { border-bottom: none; }
.p-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--line-soft);
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
  overflow: hidden;
  flex: 0 0 42px;
}
.p-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.p-avatar .avatar-fallback { font-size: 19px; }
.p-avatar.xl { width: 92px; height: 92px; flex: 0 0 92px; border-color: var(--gold-soft); box-shadow: 0 0 22px rgba(212,175,55,0.2); }
.p-name { color: var(--text); text-decoration: none; font-size: 15.5px; font-weight: 500; }
.p-name:hover { color: var(--gold); }
.p-name.dim { color: var(--text-dim); }
.p-name.dim:hover { color: var(--text-dim); }
.player-row.ghost { opacity: 0.55; }

/* PS3-friend-list presence dots on avatars */
.presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid #0b0b0c;
  z-index: 2;
}
.presence.online { background: var(--green); box-shadow: 0 0 8px rgba(74, 222, 128, 0.8); }
.presence.away { background: var(--amber); box-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
.presence.off { background: #4a4a4d; }
.presence-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-dim);
  margin: 4px 0 12px;
}
.presence-legend > span { display: flex; align-items: center; gap: 6px; }
.presence-key { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.presence-key.online { background: var(--green); }
.presence-key.away { background: var(--amber); }
.presence-key.off { background: #4a4a4d; }

/* folder member manager */
.member-results { margin-top: 10px; }
.member-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.member-result:hover { border-color: var(--gold-soft); background: rgba(212, 175, 55, 0.05); }
.toggle-chip {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 11px;
  padding: 4px 12px;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  font-family: inherit;
  transition: all 0.15s;
}
.toggle-chip.on { border-color: rgba(74, 222, 128, 0.5); color: var(--green); }
.toggle-chip:hover { border-color: var(--gold-soft); }
.p-sub { color: var(--text-dim); font-size: 12px; flex: 1; }
.p-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.p-actions form { display: inline; }
.mini-btn.gold { border-color: var(--gold-soft); color: var(--gold); }
.mini-btn.gold:hover { box-shadow: 0 0 14px rgba(212, 175, 55, 0.25); }
.dim-note { color: var(--text-dim); font-size: 13px; line-height: 1.7; }
.search-form { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.glass-input.slim { height: 42px; border-radius: 12px; flex: 1; max-width: 420px; }
.glass-input.slim input { font-size: 14px; }
.player-hero { display: flex; gap: 20px; align-items: center; }
.player-hero-info { min-width: 0; }

/* ---------- media gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.media-card {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
}
.media-card img,
.media-card video {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #000;
  display: block;
}
.media-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.m-title { font-size: 13.5px; color: var(--text); }
.m-sub { font-size: 11.5px; color: var(--text-dim); }
.media-status {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
}
.media-status.pending { color: var(--amber); border-color: rgba(251, 191, 36, 0.45); }
.media-status.approved { color: var(--green); border-color: rgba(74, 222, 128, 0.45); }
.media-status.rejected { color: var(--red); border-color: rgba(248, 113, 113, 0.45); }
.media-card.rejected { opacity: 0.6; }

.upload-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.file-input { color: var(--text-dim); font-size: 13px; max-width: 280px; }
.file-input::file-selector-button {
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 12px;
  margin-right: 10px;
  cursor: pointer;
  font-family: inherit;
}
.mod-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reason-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  flex: 1;
  min-width: 120px;
  font-family: inherit;
}

/* showcase picking */
.media-card.pickable { cursor: pointer; transition: outline 0.15s, box-shadow 0.15s; outline: 2px solid transparent; }
.media-card.pickable input { position: absolute; opacity: 0; pointer-events: none; }
.media-card.pickable.picked { outline: 2px solid var(--gold); box-shadow: 0 0 22px rgba(212, 175, 55, 0.25); }

/* profile panel quick links */
.pp-links { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pp-links a {
  flex: 1;
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 8px 6px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.2s;
}
.pp-links a:hover { color: var(--gold); border-color: var(--gold-soft); }

.stack-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.stack-form .glass-input { width: 100%; }

/* ---------- media dropzone ---------- */
.dropzone {
  border: 1.5px dashed rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  background:
    radial-gradient(400px 120px at 50% 0%, rgba(212, 175, 55, 0.06), transparent),
    rgba(255, 255, 255, 0.015);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--gold);
  background:
    radial-gradient(400px 140px at 50% 0%, rgba(212, 175, 55, 0.14), transparent),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.12);
}
.dz-glyph {
  width: 46px;
  height: 34px;
  margin: 0 auto 14px;
  border: 1.5px solid var(--gold-soft);
  border-radius: 8px;
  position: relative;
}
.dz-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 2px;
  height: 20px;
  background: linear-gradient(180deg, var(--gold), transparent);
  transform: translateX(-50%);
}
.dz-glyph::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -14px;
  transform: translateX(-50%) rotate(45deg);
  width: 9px;
  height: 9px;
  border-left: 2px solid var(--gold);
  border-top: 2px solid var(--gold);
}
.dz-title { font-size: 16.5px; color: var(--text); letter-spacing: 0.3px; }
.dz-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; }

/* ---------- upload modal ---------- */
.up-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.up-modal.open { opacity: 1; pointer-events: auto; }
.up-panel {
  width: min(760px, 96vw);
  background: linear-gradient(180deg, #141415, #0a0a0b);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.85), 0 0 60px rgba(212, 175, 55, 0.07);
  padding: 24px 26px;
  transform: translateY(10px) scale(0.99);
  transition: transform 0.22s;
}
.up-modal.open .up-panel { transform: none; }
.up-stage.hidden, .hidden { display: none !important; }
.up-head {
  font-family: "Lobster", cursive;
  font-size: 24px;
  margin-bottom: 16px;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.2);
}

.player-shell {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.player-shell video, .player-shell img {
  display: block;
  width: 100%;
  max-height: 46vh;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

/* ---------- trim bar ---------- */
.trim-zone { margin-top: 16px; }
.trim-times { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.t-chip {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 4px 12px;
}
.t-chip b { color: var(--text); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.t-chip.len { border-color: var(--gold-soft); }
.t-chip.len b { color: var(--gold); }
.t-chip.len.atcap { border-color: var(--gold); box-shadow: 0 0 12px rgba(212, 175, 55, 0.3); }
.t-chip.len.atcap::after { content: " max"; color: var(--gold); font-size: 9px; }

.trim-row { display: flex; align-items: center; gap: 14px; }
.trim-play {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  border: 1px solid var(--gold-soft);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.trim-play:hover { box-shadow: 0 0 16px rgba(212, 175, 55, 0.35); }
.t-cur { font-size: 12px; color: var(--text-dim); width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

.trim-track {
  position: relative;
  flex: 1;
  height: 34px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 10%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--line-soft);
  cursor: pointer;
  touch-action: none;
}
.trim-fill {
  position: absolute;
  top: -1px;
  bottom: -1px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.34), rgba(212, 175, 55, 0.14));
  border-top: 1px solid rgba(212, 175, 55, 0.7);
  border-bottom: 1px solid rgba(212, 175, 55, 0.7);
  cursor: grab;
}
.trim-fill:active { cursor: grabbing; }
.trim-handle {
  position: absolute;
  top: -7px;
  bottom: -7px;
  width: 18px;
  margin-left: -9px;
  cursor: ew-resize;
  z-index: 2;
  touch-action: none;
}
.trim-handle span {
  position: absolute;
  inset: 0 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, #f0d488, var(--gold) 60%, #9a7d22);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.55), inset 0 1px 0 rgba(255,255,255,0.5);
}
.trim-handle span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 12px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 2px;
}
.trim-hint { margin-top: 10px; font-size: 11.5px; color: var(--text-dim); line-height: 1.6; }

.up-controls { display: flex; gap: 12px; margin-top: 18px; align-items: center; }
.up-title {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 16px;
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
}
.up-title:focus { border-color: rgba(255, 255, 255, 0.45); }
.up-title.shake { animation: shake 0.4s; border-color: var(--red); }
@keyframes shake { 0%,100%{transform:none} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }
.up-go {
  height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid var(--gold-soft);
  background: linear-gradient(180deg, rgba(212,175,55,0.18), rgba(212,175,55,0.06));
  color: var(--gold);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s;
}
.up-go:hover { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); color: #ffe9a8; }
.up-cancel {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: none;
  color: var(--text-dim);
  font-family: inherit;
  cursor: pointer;
}
.up-cancel:hover { color: var(--red); border-color: rgba(248,113,113,0.4); }

/* ---------- busy / done / error stages ---------- */
.busy-wrap { padding: 30px 10px; }
.busy-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}
.busy-label #busyPct { color: var(--gold); font-variant-numeric: tabular-nums; }
.busy-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.busy-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a6d1f, var(--gold), #f0d488);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.5);
  transition: width 0.35s ease;
}
.busy-eta {
  margin-top: 10px;
  text-align: center;
  font-size: 12.5px;
  color: var(--gold);
  letter-spacing: 0.06em;
  min-height: 16px;
  font-variant-numeric: tabular-nums;
}
.busy-hint { margin-top: 12px; font-size: 11.5px; color: var(--text-dim); text-align: center; }

.done-wrap { padding: 34px 10px; text-align: center; }
.done-check { width: 92px; height: 92px; }
.dc-circle {
  stroke: #35c26a;
  stroke-width: 3;
  stroke-dasharray: 195;
  stroke-dashoffset: 195;
  transform: rotate(-90deg);
  transform-origin: center;
  animation: dcCircle 0.7s ease forwards;
  filter: drop-shadow(0 0 10px rgba(53, 194, 106, 0.5));
}
.dc-tick {
  stroke: #4ade80;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 46;
  stroke-dashoffset: 46;
  animation: dcTick 0.45s ease 0.55s forwards;
}
@keyframes dcCircle { to { stroke-dashoffset: 0; } }
@keyframes dcTick { to { stroke-dashoffset: 0; } }
.done-text { margin-top: 16px; color: var(--text); font-size: 15px; }
.err-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--red);
  color: var(--red);
  font-size: 40px;
  line-height: 66px;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.35);
}

/* ---------- File Upload service ---------- */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.folder-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 20px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012));
  transition: all 0.22s;
}
.folder-card:hover {
  border-color: var(--gold-soft);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 24px rgba(212,175,55,0.1);
}
.folder-glyph {
  width: 44px;
  height: 32px;
  border: 1.5px solid var(--gold-soft);
  border-radius: 6px;
  position: relative;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(212,175,55,0.12), transparent);
}
.folder-glyph::before {
  content: "";
  position: absolute;
  top: -7px;
  left: -1px;
  width: 45%;
  height: 7px;
  border: 1.5px solid var(--gold-soft);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: rgba(212, 175, 55, 0.12);
}
.folder-name { font-size: 16px; font-weight: 500; }
.folder-sub { font-size: 11.5px; color: var(--text-dim); }

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.file-row:last-child { border-bottom: none; }
.file-glyph {
  flex: 0 0 34px;
  height: 40px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent);
}
.file-glyph::after {
  content: "ZIP";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--gold);
}
.file-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.file-name { font-size: 14.5px; color: var(--text); word-break: break-all; }
.file-sub { font-size: 11.5px; color: var(--text-dim); }
.file-slim input[type="file"] { color: var(--text-dim); font-size: 13px; }
a.mini-btn { text-decoration: none; display: inline-block; line-height: 1.4; }

/* ---------- lightbox + hearts ---------- */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(7px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.lb-overlay.open { opacity: 1; pointer-events: auto; }
.lb-panel {
  position: relative;
  max-width: min(1100px, 94vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #131314, #0a0a0b);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 60px rgba(212, 175, 55, 0.08);
}
.lb-media { background: #000; display: flex; align-items: center; justify-content: center; }
.lb-media img, .lb-media video { max-width: 94vw; max-height: 76vh; display: block; }
.lb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}
.lb-close:hover { color: var(--red); border-color: rgba(248, 113, 113, 0.5); }
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
}
.lb-info { display: flex; flex-direction: column; min-width: 0; }
.lb-title { font-size: 15.5px; color: var(--text); }
.lb-owner { font-size: 12px; color: var(--text-dim); }

.lb-heart {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lb-heart:hover { border-color: rgba(255, 77, 109, 0.5); }
.heart-svg { width: 24px; height: 24px; }
.heart-path {
  fill: transparent;
  stroke: #9a9a9a;
  stroke-width: 1.7;
  transition: fill 0.25s, stroke 0.25s;
}
.lb-heart.liked .heart-path {
  fill: #ff4d6d;
  stroke: #ff4d6d;
  filter: drop-shadow(0 0 8px rgba(255, 77, 109, 0.65));
}
.lb-count { color: var(--text); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.lb-heart.pop .heart-svg { animation: heartlife 0.65s cubic-bezier(0.2, 2.2, 0.4, 1); }
@keyframes heartlife {
  0% { transform: scale(0.4); }
  35% { transform: scale(1.35); }
  50% { transform: scale(0.95) rotate(-9deg); }
  65% { transform: scale(1.12) rotate(8deg); }
  80% { transform: scale(0.98) rotate(-4deg); }
  100% { transform: scale(1) rotate(0); }
}

/* card extras: uploader avatar + like badge + clickable */
[data-lb] { cursor: pointer; }
.m-owner { display: flex; align-items: center; gap: 8px; }
.m-owner .p-avatar { width: 22px; height: 22px; flex: 0 0 22px; border-width: 1.5px; }
.m-owner .p-avatar .avatar-fallback { font-size: 11px; }
.like-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.like-chip .heart-mini { width: 13px; height: 13px; }
.like-chip .heart-mini path { fill: #ff4d6d; opacity: 0.85; }

.media-layout { display: grid; grid-template-columns: 1fr 280px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .media-layout { grid-template-columns: 1fr; } }
.feed-line {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  color: var(--text-dim);
}
.feed-line:last-child { border-bottom: none; }
.feed-line .p-avatar { width: 26px; height: 26px; flex: 0 0 26px; }
.feed-line .p-avatar .avatar-fallback { font-size: 12px; }
.feed-line b { color: var(--text); font-weight: 500; }
.feed-item-link { color: var(--gold); cursor: pointer; }
.feed-item-link:hover { text-shadow: 0 0 8px var(--gold-soft); }
.feed-when { margin-left: auto; font-size: 10.5px; white-space: nowrap; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.filter-bar a {
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 14px;
  transition: all 0.2s;
}
.filter-bar a.active, .filter-bar a:hover { color: var(--gold); border-color: var(--gold-soft); }

/* ---------- events calendar ---------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-title { font-family: "Lobster", cursive; font-size: 24px; letter-spacing: 0.5px; }
.cal-title b { color: var(--gold); font-weight: 400; }
.cal-nav {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-nav:hover { border-color: var(--gold-soft); color: var(--gold); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-daynames { margin-bottom: 6px; }
.cal-daynames span {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold);
  padding: 4px 0;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1.15;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.008));
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.18s;
  padding: 4px;
}
.cal-cell:hover { border-color: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.cal-cell.empty { visibility: hidden; }
.cal-cell.today { border-color: var(--gold); box-shadow: 0 0 14px rgba(212, 175, 55, 0.25); }
.cal-cell.today .cal-num { color: var(--gold); }
.cal-num { font-size: 14px; }
.cal-pips { display: flex; gap: 3px; align-items: center; min-height: 7px; }
.cal-pip { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.cal-pip.tournament { background: var(--gold); box-shadow: 0 0 6px rgba(212, 175, 55, 0.7); }
.cal-pip.effect { background: var(--amber); box-shadow: 0 0 5px rgba(251, 191, 36, 0.5); }
.cal-more { font-size: 9px; color: var(--text-dim); font-style: normal; }

.cal-pop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cal-pop.open { opacity: 1; pointer-events: auto; }
.cal-pop-panel {
  position: relative;
  width: min(460px, 94vw);
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #141415, #0a0a0b);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.85), 0 0 40px rgba(212, 175, 55, 0.08);
}
.cal-pop-title {
  font-family: "Lobster", cursive;
  font-size: 22px;
  margin-bottom: 14px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}
.cal-ev {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cal-ev:last-child { border-bottom: none; }
.cal-ev-mark { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: 0 0 9px; }
.cal-ev-mark.tournament { background: var(--gold); box-shadow: 0 0 8px rgba(212, 175, 55, 0.7); }
.cal-ev-mark.effect { background: var(--amber); box-shadow: 0 0 7px rgba(251, 191, 36, 0.55); }
.cal-ev-main { display: flex; flex-direction: column; gap: 3px; }
.cal-ev-title { font-size: 14px; color: var(--text); }
.cal-ev-sub { font-size: 11.5px; color: var(--text-dim); }

/* ---------- profile hero v2 (spread out, title crowns the top) ---------- */
.hero-v2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px 26px 30px;
  gap: 10px;
}
.hero-title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(34px, 4.5vw, 52px);
  color: var(--gold);
  text-shadow: 0 0 22px rgba(212, 175, 55, 0.45);
  line-height: 1;
  margin-bottom: 8px;
}
.hero-avatar {
  position: relative;
  width: 176px;
  height: 176px;
  flex: 0 0 176px;
  border-radius: 50%;
  border: 3px solid var(--gold-soft);
  overflow: hidden;
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.22), 0 16px 44px rgba(0, 0, 0, 0.6);
  display: inline-block;
}
.hero-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.hero-name { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.hero-name .pp-display { font-size: 34px; }
.hero-handle { color: var(--text-dim); font-size: 14.5px; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  margin-top: 6px;
}
.hero-meta b { color: var(--silver); font-weight: 500; }
.hero-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold-soft); }

/* board avatar chips */
.board-who { display: inline-flex; align-items: center; gap: 9px; }
.p-avatar.tiny { width: 28px; height: 28px; flex: 0 0 28px; }
.p-avatar.tiny .avatar-fallback { font-size: 13px; }
.board-link { color: var(--text); text-decoration: none; }
.board-link:hover { color: var(--gold); }

/* account avatar editor */
.avatar-editor { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.avatar-editor .p-avatar.xl { width: 132px; height: 132px; flex: 0 0 132px; }
.avatar-editor-forms { display: flex; flex-direction: column; gap: 10px; }

.soon-hero { text-align: center; padding: 18vh 20px; }
.soon-hero .big { font-size: 70px; margin-bottom: 20px; }
.soon-hero h1 { font-family: "Lobster", cursive; font-size: 40px; margin-bottom: 14px; }
.soon-hero p { color: var(--text-dim); }

/* ================= profile personality: color + banner ================= */
/* Every profile surface reads --pcolor (the member's chosen color); the
   house gold is the default, so untouched profiles look exactly as before. */

.hero-v2 { --pcolor: var(--gold); position: relative; overflow: hidden; }
.hero-v2 > * { position: relative; z-index: 1; }
.hero-v2::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(560px 220px at 50% 0%, color-mix(in srgb, var(--pcolor) 22%, transparent), transparent 74%);
  pointer-events: none;
}
.hero-v2.has-banner::before {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 8, 0.2), rgba(8, 8, 10, 0.62) 55%, rgba(10, 10, 11, 0.94) 100%),
    var(--banner);
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}
.hero-v2 .hero-title { color: var(--pcolor); text-shadow: 0 0 22px color-mix(in srgb, var(--pcolor) 45%, transparent); }
.hero-v2 .hero-avatar {
  border-color: color-mix(in srgb, var(--pcolor) 55%, #141414);
  box-shadow: 0 0 40px color-mix(in srgb, var(--pcolor) 24%, transparent), 0 16px 44px rgba(0, 0, 0, 0.6);
}
.hero-v2 .hero-dot { background: var(--pcolor); }

/* dashboard: the expanding panel + topbar avatar take the color too */
.profile-panel { --pcolor: var(--gold); }
.pp-banner {
  background:
    radial-gradient(240px 90px at 80% 0%, color-mix(in srgb, var(--pcolor, var(--gold)) 35%, transparent), transparent 70%),
    linear-gradient(120deg, color-mix(in srgb, var(--pcolor, var(--gold)) 22%, transparent), rgba(20, 20, 22, 0.1) 60%),
    #101011;
  border-bottom-color: color-mix(in srgb, var(--pcolor, var(--gold)) 40%, #232324);
}
.pp-banner.has-banner {
  background-image:
    linear-gradient(180deg, rgba(8, 8, 10, 0.12), rgba(12, 12, 13, 0.5) 68%, rgba(12, 12, 13, 0.82) 100%),
    var(--banner);
  background-size: cover;
  background-position: center;
}
.profile-panel .pp-avatar { outline-color: color-mix(in srgb, var(--pcolor) 55%, #232324); }
.avatar-btn { --pcolor: var(--gold); }
.avatar-btn {
  border-color: color-mix(in srgb, var(--pcolor) 55%, #2a2a2c);
  box-shadow: 0 0 22px color-mix(in srgb, var(--pcolor) 25%, transparent);
}
.avatar-btn:hover {
  border-color: var(--pcolor);
  box-shadow: 0 0 26px color-mix(in srgb, var(--pcolor) 40%, transparent);
}

/* colored avatar rings in player lists */
.p-avatar.ringed {
  border-color: color-mix(in srgb, var(--pcolor, var(--gold)) 60%, #232324);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pcolor, var(--gold)) 22%, transparent);
}

/* ---- /account style editor: live banner preview + hover veil ---- */
.style-banner {
  --pcolor: var(--gold);
  position: relative;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pcolor) 32%, #1c1c1e);
  background:
    radial-gradient(620px 240px at 50% 0%, color-mix(in srgb, var(--pcolor) 28%, transparent), transparent 76%),
    linear-gradient(160deg, #131314, #0a0a0b);
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.style-banner:hover {
  border-color: color-mix(in srgb, var(--pcolor) 65%, #333);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 26px color-mix(in srgb, var(--pcolor) 16%, transparent);
}
.style-banner.has-banner {
  background-image:
    linear-gradient(180deg, rgba(6, 6, 8, 0.08), rgba(8, 8, 10, 0.5) 62%, rgba(10, 10, 11, 0.88) 100%),
    var(--banner);
  background-size: cover;
  background-position: center;
}
.style-banner.drag {
  border-color: var(--pcolor);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pcolor) 35%, transparent), 0 16px 40px rgba(0, 0, 0, 0.55);
}
.sb-id { position: absolute; left: 22px; bottom: 16px; display: flex; align-items: center; gap: 14px; z-index: 1; }
.sb-avatar {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-color: color-mix(in srgb, var(--pcolor) 60%, #141414);
  box-shadow: 0 0 18px color-mix(in srgb, var(--pcolor) 28%, transparent);
}
.sb-avatar .avatar-fallback.big { font-size: 34px; }
.sb-name { font-family: "Lobster", cursive; font-size: 26px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85); }
.sb-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(5, 5, 7, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.style-banner:hover .sb-veil,
.style-banner.drag .sb-veil,
.style-banner.busy .sb-veil { opacity: 1; }
.sb-cam {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--pcolor);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pcolor);
  background: rgba(10, 10, 12, 0.55);
  box-shadow: 0 0 20px color-mix(in srgb, var(--pcolor) 35%, transparent);
  transition: transform 0.3s ease;
}
.style-banner:hover .sb-cam { transform: translateY(-2px) scale(1.06); }
.sb-cam svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.style-banner.busy .sb-cam { animation: sbPulse 1.1s ease-in-out infinite; }
@keyframes sbPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 14px color-mix(in srgb, var(--pcolor) 30%, transparent); }
  50% { transform: scale(1.12); box-shadow: 0 0 30px color-mix(in srgb, var(--pcolor) 60%, transparent); }
}
.sb-cta { letter-spacing: 0.14em; font-size: 13px; text-transform: uppercase; color: var(--text); }
.sb-hint { font-size: 11.5px; color: var(--text-dim); }
.style-under {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.style-under .dim-note { margin: 0; max-width: 640px; }

/* ---- the color swatches ---- */
.color-row { display: flex; align-items: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.color-label { font-family: "Great Vibes", cursive; font-size: 26px; color: var(--gold); line-height: 1; }
.swatches { display: flex; gap: 11px; flex-wrap: wrap; align-items: center; }
.swatch {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--sw) 55%, #0a0a0b);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--sw) 88%, #fff 8%), var(--sw) 58%, color-mix(in srgb, var(--sw) 55%, #000) 100%);
  cursor: pointer;
  padding: 0;
  transition: transform 0.18s ease, box-shadow 0.25s ease;
}
.swatch:hover { transform: translateY(-2px) scale(1.1); box-shadow: 0 6px 16px color-mix(in srgb, var(--sw) 40%, transparent); }
.swatch.picked {
  box-shadow: 0 0 0 2.5px #0a0a0b, 0 0 0 4.5px var(--sw), 0 0 18px color-mix(in srgb, var(--sw) 55%, transparent);
  animation: swatchPop 0.35s ease;
}
.swatch.picked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #0b0b0c;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
}
@keyframes swatchPop {
  0% { transform: scale(0.82); }
  55% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.swatch.custom {
  --sw: #8b8b90;
  background: conic-gradient(#e0455a, #e6b34d, #3ec97e, #3fa7ff, #8b5cf6, #d557d5, #e0455a);
  border-color: #2a2a2c;
  display: inline-block;
}
.swatch.custom input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.swatch.custom .swatch-plus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0b0c;
  font-weight: 800;
  font-size: 16px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.swatch.custom.picked { background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--sw) 88%, #fff 8%), var(--sw) 58%, color-mix(in srgb, var(--sw) 55%, #000) 100%); }
.swatch.custom.picked .swatch-plus { display: none; }

/* ==================== polish pass: motion everywhere ==================== */
/* Small, deliberate movement — glass and gold stay, everything answers
   the cursor. */

.content { animation: pageIn 0.4s ease both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.mini-btn, .toggle-chip {
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.mini-btn:hover { transform: translateY(-1.5px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
.mini-btn:active, .toggle-chip:active { transform: scale(0.95); }
.mini-btn.gold:hover { box-shadow: 0 6px 18px rgba(212, 175, 55, 0.3); }
.mini-btn.danger:hover { box-shadow: 0 6px 18px rgba(224, 69, 90, 0.25); }
.mini-btn.gold::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 46%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.mini-btn.gold:hover::after { left: 135%; }
.toggle-chip:hover { transform: translateY(-1px); border-color: var(--gold-soft); }

.player-row, .file-row {
  transition: background 0.25s ease, transform 0.22s ease;
  border-radius: 12px;
}
.player-row:hover, .file-row:hover { background: rgba(255, 255, 255, 0.035); transform: translateX(4px); }

.stat { transition: transform 0.22s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.stat:hover {
  transform: translateY(-2px);
  border-color: var(--gold-soft);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 14px rgba(212, 175, 55, 0.08);
}

.card .icon { display: inline-block; transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.card:hover .icon { transform: scale(1.15) rotate(-5deg); }

.glass-input { transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.glass-input:focus-within { border-color: var(--gold-soft); box-shadow: 0 0 18px rgba(212, 175, 55, 0.14); }

.admin-table tr { transition: background 0.2s ease; }
.admin-table tr:hover td { background: rgba(255, 255, 255, 0.025); }

.media-card { overflow: hidden; }
.media-card img { transition: transform 0.45s ease; }
.media-card:hover img { transform: scale(1.06); }

.back-link { transition: color 0.25s ease, transform 0.25s ease; display: inline-block; }
.back-link:hover { color: var(--gold); transform: translateX(-3px); }

.presence.online { animation: presencePulse 2.6s ease-in-out infinite; }
@keyframes presencePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
  55% { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}

.pp-links a { transition: color 0.25s ease, transform 0.25s ease; display: inline-block; }
.pp-links a:hover { transform: translateY(-1.5px); }

/* ================== phone-style notification toasts ================== */

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  --pcolor: var(--gold);
  width: 384px;
  max-width: calc(100vw - 44px);
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(32, 32, 35, 0.94), rgba(15, 15, 17, 0.94));
  border: 1px solid color-mix(in srgb, var(--pcolor) 38%, #26262a);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 26px color-mix(in srgb, var(--pcolor) 12%, transparent);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateX(440px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.15), opacity 0.4s ease;
}
.toast.in { transform: none; opacity: 1; }
.toast.gone { transform: translateX(440px) scale(0.92); opacity: 0; }
.toast-avatar {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--pcolor) 60%, #141414);
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
}
.toast-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.toast-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lobster", cursive;
  font-size: 20px;
  color: var(--gold);
}
.toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toast-title {
  font-weight: 500;
  font-size: 14.5px;
  color: color-mix(in srgb, var(--pcolor) 75%, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast-text {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.toast-close {
  align-self: flex-start;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1;
  padding: 2px 4px;
  transition: color 0.2s;
}
.toast-close:hover { color: #fff; }

/* ============================ CHAT ============================ */

.chat-content {
  max-width: 1560px;
  height: calc(100vh - 34px);
  display: flex;
  padding-bottom: 16px;
}
.chat-shell { flex: 1; display: flex; gap: 16px; min-height: 0; }
.chat-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.chat-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 10, 12, 0.5);
}
.chat-title-wrap { min-width: 0; }
.chat-title { font-family: "Lobster", cursive; font-size: 24px; line-height: 1.1; text-shadow: 0 0 14px rgba(255, 255, 255, 0.15); }
.chat-sub { color: var(--text-dim); font-size: 12px; letter-spacing: 0.06em; }
.chat-top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chat-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, transform 0.18s, box-shadow 0.25s;
}
.chat-top-btn:hover { color: var(--gold); border-color: var(--gold-soft); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
.chat-top-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.chat-back { margin-left: 4px; }

.dm-launcher {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--gold-soft);
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.14), rgba(20, 20, 22, 0.4));
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.3s ease;
}
.dm-launcher:hover { transform: translateY(-1.5px); box-shadow: 0 0 20px rgba(212, 175, 55, 0.25); }
.dm-launcher svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dm-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d3382f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0a0a0b;
  animation: badgePop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.5);
}
@keyframes badgePop { from { transform: scale(0.4); } }

.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 20px 8px; scroll-behavior: auto; }
.chat-loading { color: var(--text-dim); text-align: center; padding: 30px 0; }

.day-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 10px;
  color: var(--text-dim);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.day-divider::before, .day-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

.msg { margin-top: 14px; animation: msgIn 0.25s ease both; }
.msg.grouped { margin-top: 2px; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.msg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.c-avatar {
  --pcolor: var(--gold);
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--pcolor) 45%, #232324);
  background: linear-gradient(160deg, #1c1c1e, #0c0c0d);
}
.c-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.c-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Lobster", cursive;
  font-size: 17px;
  color: var(--gold);
}
.msg-name { font-weight: 500; font-size: 15px; }
.msg-time { color: var(--text-dim); font-size: 11px; }
.msg-row { position: relative; padding-left: 48px; }
.msg-row:hover { background: rgba(255, 255, 255, 0.02); border-radius: 8px; }
.m-text { font-size: 15px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; padding: 1px 0; }
.m-text.jumbo { font-size: 46px; line-height: 1.2; }
.mention {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  border-radius: 5px;
  padding: 0 4px;
  font-weight: 500;
}
.mention.me { background: rgba(212, 175, 55, 0.28); color: #ffe9ad; }
.msg.pinged .msg-row {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), transparent 70%);
  border-left: 2px solid var(--gold);
  border-radius: 0 8px 8px 0;
  margin-left: -8px;
  padding-left: 54px;
}
.msg-del {
  position: absolute;
  right: 8px;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(15, 15, 17, 0.9);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1;
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.msg-row:hover .msg-del { opacity: 1; }
.msg-del:hover { color: #ff8896; border-color: rgba(224, 69, 90, 0.5); transform: scale(1.1); }
.msg-hover-time { position: absolute; left: 4px; top: 4px; font-size: 10px; color: var(--text-dim); opacity: 0; transition: opacity 0.2s; }
.msg.grouped .msg-row:hover .msg-hover-time { opacity: 0.8; }

.m-image {
  max-width: min(420px, 80%);
  max-height: 340px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
  display: block;
  margin: 4px 0;
}
.m-image:hover { transform: scale(1.015); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.m-video { max-width: min(480px, 85%); max-height: 360px; border-radius: 12px; border: 1px solid var(--line-soft); display: block; margin: 4px 0; background: #000; }
.m-sticker { width: 132px; height: 132px; display: block; margin: 4px 0; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.45)); animation: stickerIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.35) both; }
@keyframes stickerIn { from { transform: scale(0.6) rotate(-6deg); opacity: 0; } }

.voice-msg {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 4px 0;
  border-radius: 999px;
  border: 1px solid var(--gold-soft);
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.08), rgba(18, 18, 20, 0.6));
  min-width: 240px;
}
.voice-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s, box-shadow 0.25s;
  flex: 0 0 34px;
}
.voice-play:hover { transform: scale(1.08); box-shadow: 0 0 14px rgba(212, 175, 55, 0.3); }
.voice-play svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.voice-msg.playing .voice-play svg { display: none; }
.voice-msg.playing .voice-play::after { content: ""; width: 10px; height: 12px; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor; }
.voice-track { flex: 1; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); cursor: pointer; overflow: hidden; }
.voice-prog { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 999px; transition: width 0.2s linear; }
.voice-len { color: var(--text-dim); font-size: 12px; min-width: 38px; text-align: right; }

.typing-line { min-height: 20px; padding: 0 20px 4px; color: var(--text-dim); font-size: 12.5px; font-style: italic; transition: color 0.2s; }
.typing-line.err { color: #ff8896; font-style: normal; }

.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line-soft);
  background: rgba(10, 10, 12, 0.45);
}
.comp-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s, border-color 0.25s, transform 0.16s, box-shadow 0.3s;
}
.comp-btn:hover { color: var(--gold); border-color: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); }
.comp-btn:active { transform: scale(0.92); }
.comp-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.composer-input {
  position: relative;
  flex: 1;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  padding: 9px 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.composer-input:focus-within { border-color: var(--gold-soft); box-shadow: 0 0 18px rgba(212, 175, 55, 0.12); }
.composer-input textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.45;
  max-height: 148px;
}
.comp-send {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.32), rgba(160, 122, 20, 0.25));
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s, box-shadow 0.3s;
}
.comp-send:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 22px rgba(212, 175, 55, 0.35); }
.comp-send:active { transform: scale(0.92); }
.comp-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }

.voice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid rgba(224, 69, 90, 0.35);
  background: rgba(224, 69, 90, 0.07);
  color: var(--text);
  font-size: 13.5px;
}
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0455a; animation: presencePulse 1.4s infinite; }
.voice-hint { color: var(--text-dim); margin-right: auto; }

/* right roster */
.chat-side {
  width: 252px;
  flex: 0 0 252px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 16px 10px 10px;
  min-height: 0;
}
.side-head { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); padding: 0 8px 12px; }
.roster { flex: 1; overflow-y: auto; }
.roster-sec { color: var(--text-dim); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; padding: 12px 8px 6px; }
.roster-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.22s, transform 0.2s;
}
.roster-row:hover { background: rgba(255, 255, 255, 0.045); transform: translateX(3px); }
.roster-row.is-me { opacity: 0.75; cursor: default; }
.roster-row .presence { position: absolute; left: 32px; bottom: 8px; }
.roster-avatar { width: 34px; height: 34px; flex: 0 0 34px; }
.roster-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.roster-name .pp-role { font-size: 8.5px; padding: 2px 6px; }
.muted-mark { color: var(--text-dim); opacity: 0.8; }
.muted-mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* roster popover */
.roster-pop {
  position: fixed;
  z-index: 450;
  width: 250px;
  background: linear-gradient(180deg, rgba(30, 30, 33, 0.97), rgba(14, 14, 16, 0.97));
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
  padding: 10px;
  animation: popIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.92) translateY(6px); } }
.pop-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 8px; }
.pop-head span { display: flex; flex-direction: column; min-width: 0; }
.pop-head b { font-size: 15px; }
.pop-head i { color: var(--text-dim); font-size: 12px; font-style: normal; }
.pop-avatar { width: 34px; height: 34px; flex: 0 0 34px; }
.pop-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.pop-item:hover { background: rgba(255, 255, 255, 0.05); transform: translateX(2px); }
.pop-item.gold { color: var(--gold); }
.pop-item.disabled { color: var(--text-dim); cursor: default; }
.pop-item.disabled:hover { background: none; transform: none; }

/* DM rail slide-over */
.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 380;
  background: rgba(3, 3, 5, 0.55);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.dm-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 400;
  width: 340px;
  max-width: 90vw;
  background: linear-gradient(180deg, rgba(22, 22, 25, 0.98), rgba(10, 10, 12, 0.98));
  border-right: 1px solid var(--gold-soft);
  box-shadow: 30px 0 80px rgba(0, 0, 0, 0.55);
  transform: translateX(-360px);
  transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.25, 1.05);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}
.dm-rail.open { transform: none; }
.rail-head { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; }
.rail-head h3 { font-family: "Lobster", cursive; font-size: 24px; margin-right: auto; }
.chat-x {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: none;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.18s;
}
.chat-x:hover { color: #fff; border-color: var(--gold-soft); transform: rotate(90deg); }
.rail-global, .rail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 10px;
  border-radius: 14px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.22s, transform 0.2s;
}
.rail-global:hover, .rail-item:hover { background: rgba(255, 255, 255, 0.05); transform: translateX(3px); }
.rail-global { border: 1px solid var(--line-soft); margin-bottom: 12px; }
.rail-glyph {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-soft);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.07);
}
.rail-glyph svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.rail-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rail-main b { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-main span { color: var(--text-dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-avatar { width: 40px; height: 40px; flex: 0 0 40px; }
.rail-list { flex: 1; overflow-y: auto; }
.rail-unread {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d3382f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rail-item.has-unread b { color: #fff; }
.rail-empty { padding: 14px 10px; }

/* modals */
.chat-modal {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.chat-modal-card {
  width: 500px;
  max-width: 94vw;
  max-height: 84vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(30, 30, 33, 0.98), rgba(13, 13, 15, 0.98));
  border: 1px solid var(--gold-soft);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  padding: 22px;
  animation: popIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}
.chat-modal-card h3 { font-family: "Lobster", cursive; font-size: 23px; margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ng-friends { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.ng-friend {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.ng-friend:hover { background: rgba(255, 255, 255, 0.045); }
.ng-friend b { flex: 1; font-weight: 400; font-size: 14.5px; }
.ng-friend input { accent-color: var(--gold); width: 17px; height: 17px; }
.g-rename { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.g-rename .glass-input { flex: 1; }
.g-members { display: flex; flex-direction: column; gap: 3px; }
.g-member { display: flex; align-items: center; gap: 11px; padding: 7px 8px; border-radius: 12px; transition: background 0.2s; }
.g-member:hover { background: rgba(255, 255, 255, 0.03); }
.g-name { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; }
.g-chip {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--gold-soft);
  color: var(--gold);
}
.g-chip.blind { border-color: var(--line-soft); color: var(--text-dim); }
.g-actions { display: flex; gap: 6px; }
.g-act {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.g-act:hover { color: var(--gold); border-color: var(--gold-soft); transform: translateY(-1px); }
.g-act.danger:hover { color: #ff8896; border-color: rgba(224, 69, 90, 0.5); }
.g-addables { display: flex; flex-wrap: wrap; gap: 8px; }
.g-addable {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.18s, box-shadow 0.25s;
}
.g-addable:hover { border-color: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); }

/* shared media panel */
.shared-panel {
  position: absolute;
  top: 69px;
  right: 12px;
  z-index: 60;
  width: 400px;
  max-width: calc(100% - 24px);
  max-height: 60%;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(26, 26, 29, 0.98), rgba(12, 12, 14, 0.98));
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  padding: 16px;
  animation: popIn 0.25s ease both;
}
.shared-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.shared-head h3 { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.shared-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.shared-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.25s, box-shadow 0.3s;
}
.shared-cell:hover { transform: translateY(-2px); border-color: var(--gold-soft); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }
.shared-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shared-glyph { color: var(--gold); }
.shared-glyph svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.shared-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 8px 6px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.85));
  color: #ddd;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* fullscreen viewer */
.chat-viewer {
  position: fixed;
  inset: 0;
  z-index: 520;
  background: rgba(2, 2, 4, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease both;
}
.chat-viewer img, .chat-viewer video { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8); }
.viewer-x { position: absolute; top: 18px; right: 22px; width: 38px; height: 38px; font-size: 20px; }

/* pickers */
.picker {
  position: fixed;
  z-index: 460;
  width: 360px;
  max-height: 320px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(28, 28, 31, 0.98), rgba(13, 13, 15, 0.98));
  border: 1px solid var(--gold-soft);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  animation: popIn 0.22s ease both;
}
.emoji-opt {
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  font-size: 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.emoji-opt:hover { background: rgba(255, 255, 255, 0.07); transform: scale(1.22); }
.sticker-opt {
  width: 78px;
  height: 78px;
  border: 1px solid transparent;
  background: none;
  border-radius: 14px;
  cursor: pointer;
  padding: 6px;
  transition: background 0.2s, transform 0.2s, border-color 0.25s;
}
.sticker-opt img { width: 100%; height: 100%; }
.sticker-opt:hover { background: rgba(212, 175, 55, 0.07); border-color: var(--gold-soft); transform: scale(1.08) rotate(-2deg); }

/* mention autocomplete */
.mention-pop {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 10px;
  z-index: 80;
  width: 280px;
  background: linear-gradient(180deg, rgba(28, 28, 31, 0.98), rgba(13, 13, 15, 0.98));
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6);
  padding: 6px;
  animation: popIn 0.18s ease both;
}
.mention-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 10px;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.mention-opt b { font-weight: 500; font-size: 13.5px; }
.mention-opt i { color: var(--text-dim); font-size: 12px; font-style: normal; margin-left: auto; }
.mention-opt:hover, .mention-opt.sel { background: rgba(212, 175, 55, 0.1); }

@media (max-width: 980px) {
  .chat-side { display: none; }
  .toast { width: 330px; }
}

/* ==================== avatar frames (rank rings) ==================== */
/* Art standard: square image, avatar circle dead-center with a diameter
   of 62% of the art width. Overlaying at inset:-31% then wraps ANY
   avatar size on the site pixel-perfectly. */
.avatar-wrap { position: relative; display: inline-block; }
.avatar-frame {
  position: absolute;
  inset: -31%;
  width: 162%;
  height: 162%;
  pointer-events: none;
  z-index: 4;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  animation: frameIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) both;
}
@keyframes frameIn {
  from { opacity: 0; transform: scale(0.9) rotate(-3deg); }
  to { opacity: 1; transform: none; }
}
/* dashboard panel avatar: the absolute geometry moves onto the wrapper */
.pp-wrap {
  position: absolute;
  left: 22px;
  bottom: -62px;
  width: 160px;
  height: 160px;
  z-index: 2;
  display: block;
}
.pp-wrap .pp-avatar { position: relative; left: auto; bottom: auto; width: 100%; height: 100%; }
.hero-wrap { display: inline-block; }
.hero-wrap .hero-avatar { display: block; }

/* admin armory */
.frame-gallery { display: flex; flex-wrap: wrap; gap: 16px; }
.frame-card {
  position: relative;
  width: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 8px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s, transform 0.2s, box-shadow 0.3s;
}
.frame-card:hover { border-color: var(--gold-soft); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.frame-demo { position: relative; display: inline-block; width: 60px; height: 60px; }
.frame-demo-pfp {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3c3c42, #121215);
  border: 1px solid var(--line-soft);
}
.frame-name { font-size: 11.5px; color: var(--text-dim); letter-spacing: 0.05em; text-align: center; }
.frame-del {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-soft);
  background: rgba(15, 15, 17, 0.9);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.frame-del:hover { color: #ff8896; border-color: rgba(224, 69, 90, 0.5); transform: scale(1.12); }
.frame-select {
  background: #121214;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s;
}
.frame-select:hover, .frame-select:focus { border-color: var(--gold-soft); outline: none; }

/* ============================ HOSTING ============================ */

.host-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.host-intro h2 { margin-bottom: 6px; }
.host-net { color: var(--gold); white-space: nowrap; }
.host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.host-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; }
.host-empty h2 { font-family: "Lobster", cursive; font-size: 26px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 14px 0 8px; }
.host-cube { display: inline-block; width: 74px; height: 74px; color: var(--gold); opacity: 0.8; }
.host-cube svg { width: 100%; height: 100%; }

.game-card {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  padding: 18px;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.game-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55), transparent);
}
.game-card:hover { transform: translateY(-3px); border-color: var(--gold-soft); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.game-card { --accent: var(--gold); }
.game-card::before { background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 60%, transparent), transparent); }
.game-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-soft)); }
.game-card.on { border-color: color-mix(in srgb, var(--accent) 32%, var(--line-soft)); }
.game-card.on:hover { box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 22px color-mix(in srgb, var(--accent) 12%, transparent); }
.game-card .gc-glyph { color: var(--accent); }

.gc-head { display: flex; align-items: center; gap: 12px; }
.gc-glyph { width: 44px; height: 44px; flex: 0 0 44px; color: var(--gold); }
.gc-glyph.big { width: 54px; height: 54px; flex: 0 0 54px; }
.gc-glyph svg { width: 100%; height: 100%; }
.gc-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gc-title b { font-family: "Lobster", cursive; font-weight: 400; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-title span { color: var(--text-dim); font-size: 12px; }
.gc-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}
.gc-dot { width: 9px; height: 9px; border-radius: 50%; background: #555; }
.gc-status.running { color: var(--green); }
.gc-status.running .gc-dot { background: var(--green); animation: presencePulse 2.4s infinite; }
.gc-status.downloading .gc-dot, .gc-status.provisioning .gc-dot { background: var(--gold); animation: presencePulse 1.6s infinite; }
.gc-status.downloading, .gc-status.provisioning { color: var(--gold); }
.gc-status.crashed, .gc-status.error { color: #ff8896; }
.gc-status.crashed .gc-dot, .gc-status.error .gc-dot { background: #e0455a; }

.gc-body { margin-top: 14px; display: flex; flex-direction: column; gap: 9px; }
.gc-stat { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.gc-stat .k { color: var(--text-dim); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; width: 62px; }
.gc-stat .v { color: var(--text); }
.gc-membar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.gc-membar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 999px; transition: width 0.6s ease; }
.gc-off-note { color: var(--text-dim); font-size: 13px; }
.gc-address {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--gold-soft);
  background: rgba(212, 175, 55, 0.07);
  color: var(--gold);
  font-family: Consolas, monospace;
  font-size: 13.5px;
  cursor: copy;
  transition: background 0.2s, transform 0.15s, box-shadow 0.25s;
  align-self: flex-start;
}
.gc-address:hover { background: rgba(212, 175, 55, 0.14); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }
.gc-address.copied { background: rgba(74, 222, 128, 0.15); border-color: rgba(74, 222, 128, 0.5); color: var(--green); }
.gc-address svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.gc-address.alt { color: var(--text-dim); border-color: var(--line-soft); background: rgba(255, 255, 255, 0.03); }

.host-detail { width: 640px; }
.hd-head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.hd-head .gc-title b { font-size: 24px; }
.hd-head .chat-x { margin-left: 8px; }
.hd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.hd-players { color: var(--text-dim); font-size: 13px; margin-top: 10px; }
.hd-address { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hd-address .k { color: var(--text-dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.hd-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.hd-console { margin-top: 18px; }
.hd-console h4 { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.hd-log {
  background: #08080a;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px;
  height: 210px;
  overflow-y: auto;
  font-family: Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: #9aa08f;
  white-space: pre-wrap;
  word-break: break-word;
}
.hd-cmd { display: flex; gap: 10px; margin-top: 10px; }
.hd-cmd .glass-input { flex: 1; }
.mem-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.mem-label { color: var(--text-dim); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.mem-row input[type="range"] { flex: 1; accent-color: var(--gold); }
.mem-row b { min-width: 56px; text-align: right; color: var(--gold); }

/* the Steam-style game shelf */
.create-card { width: 560px; }
.game-shelf { display: flex; flex-direction: column; gap: 12px; }
.shelf-tile {
  --accent: var(--gold);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.28s ease, box-shadow 0.3s ease, background 0.25s;
  overflow: hidden;
  position: relative;
}
.shelf-tile:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line-soft));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 22px color-mix(in srgb, var(--accent) 12%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.shelf-poster {
  width: 128px;
  height: 80px;
  flex: 0 0 128px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, #1c1c1e);
  background: #0c0c0d;
}
.shelf-poster img { width: 100%; height: 100%; object-fit: cover; }
.shelf-info { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.shelf-info b { font-family: "Lobster", cursive; font-weight: 400; font-size: 20px; }
.shelf-info i { color: color-mix(in srgb, var(--accent) 70%, #fff); font-style: normal; font-size: 12px; letter-spacing: 0.05em; }
.shelf-tag { color: var(--text-dim); font-size: 12px; line-height: 1.4; margin-top: 3px; }
.shelf-go {
  align-self: center;
  white-space: nowrap;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s, transform 0.25s;
}
.shelf-tile:hover .shelf-go { opacity: 1; transform: none; }
.shelf-back {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 0 0 12px;
  transition: color 0.2s, transform 0.2s;
}
.shelf-back:hover { color: var(--gold); transform: translateX(-3px); }
.cfg-head { display: flex; align-items: center; gap: 14px; }
.cfg-poster {
  width: 96px;
  height: 60px;
  flex: 0 0 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, #1c1c1e);
}
.cfg-poster img { width: 100%; height: 100%; object-fit: cover; }
.cfg-head span:last-child { display: flex; flex-direction: column; gap: 3px; }
.cfg-head b { font-family: "Lobster", cursive; font-weight: 400; font-size: 22px; }
.cfg-head i { color: var(--text-dim); font-style: normal; font-size: 12.5px; }

/* pre-generation world options */
.cfg-opts { display: flex; flex-direction: column; gap: 11px; margin-top: 16px; }
.opt-row { display: flex; align-items: center; gap: 14px; }
.opt-row .mem-label { flex: 0 0 176px; }
.opt-row .frame-select { flex: 1; padding: 8px 10px; font-size: 13px; }
.opt-num {
  width: 108px;
  background: #121214;
  color: var(--text);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.opt-num:hover, .opt-num:focus { border-color: var(--gold-soft); outline: none; }
.opt-text { flex: 1; }
@media (max-width: 680px) {
  .opt-row { flex-wrap: wrap; }
  .opt-row .mem-label { flex: 1 1 100%; }
}

@media (max-width: 680px) {
  .create-card, .host-detail { width: auto; }
  .shelf-tile { flex-wrap: wrap; }
  .shelf-poster { width: 100%; flex: 1 1 100%; height: 92px; }
  .shelf-go { display: none; }
}

/* ==================== responsive: tablets & phones ==================== */

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .content { padding-left: 18px; padding-right: 18px; }
  .hero-title { font-size: clamp(30px, 8vw, 44px); }
  .profile-panel { width: min(420px, calc(100vw - 24px)); right: 12px; }
  .host-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .content { padding: 14px 12px 40px; }
  .page-head { flex-wrap: wrap; gap: 8px; }
  .page-title { font-size: 30px; }
  .panel { padding: 18px 14px; margin-bottom: 16px; }

  /* dashboard */
  .topbar { padding: 12px 14px; gap: 10px; }
  .welcome { display: none; }
  .avatar-btn { width: 64px; height: 64px; }
  .avatar-fallback { font-size: 26px; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .profile-panel { left: 12px; right: 12px; width: auto; }
  .pp-wrap, .pp-avatar { width: 118px; height: 118px; }
  .pp-wrap { bottom: -46px; }
  .pp-body { padding-top: 58px; }
  .pp-stats { grid-template-columns: 1fr 1fr; }

  /* profile hero */
  .hero-avatar { width: 128px; height: 128px; flex: 0 0 128px; }
  .hero-name .pp-display { font-size: 26px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }

  /* lists & tables */
  .player-row, .file-row { flex-wrap: wrap; row-gap: 8px; }
  .p-actions { width: 100%; justify-content: flex-end; display: flex; gap: 8px; flex-wrap: wrap; }
  .admin-table { display: block; overflow-x: auto; }
  .search-form { flex-wrap: wrap; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  /* account style editor */
  .style-banner { height: 150px; }
  .sb-avatar { width: 56px; height: 56px; flex: 0 0 56px; }
  .sb-name { font-size: 20px; }
  .avatar-editor { gap: 14px; }

  /* chat on a phone: the app takes the screen */
  .chat-content { height: calc(100dvh - 16px); padding: 8px 8px 10px; }
  .chat-shell { gap: 0; }
  .chat-top { padding: 10px 10px; gap: 9px; }
  .chat-title { font-size: 19px; }
  .chat-sub { display: none; }
  .chat-top-btn span { display: none; }
  .chat-top-btn { padding: 8px; }
  .chat-back { display: none; }
  .dm-launcher { width: 40px; height: 40px; }
  .chat-scroll { padding: 12px 10px 6px; }
  .msg-row { padding-left: 46px; }
  .m-text.jumbo { font-size: 36px; }
  .m-image { max-width: 92%; }
  .m-video { max-width: 94%; }
  .chat-composer { padding: 8px 8px 10px; gap: 6px; }
  .comp-btn { width: 36px; height: 36px; flex: 0 0 36px; }
  .comp-send { width: 40px; height: 40px; flex: 0 0 40px; }
  .composer-input { padding: 7px 12px; }
  .composer-input textarea { font-size: 16px; } /* stops iOS auto-zoom */
  .dm-rail { width: calc(100vw - 34px); }
  .picker { width: min(360px, calc(100vw - 20px)); }
  .shared-panel { width: calc(100vw - 40px); right: 8px; }

  /* toasts + modals */
  .toast-stack { right: 10px; bottom: 10px; left: 10px; }
  .toast { width: auto; max-width: none; }
  .chat-modal { padding: 10px; }
  .chat-modal-card { padding: 16px; }

  /* hosting */
  .host-intro { flex-direction: column; align-items: flex-start; }
  .hd-cmd { flex-wrap: wrap; }
}
