:root {
  --bg: #0b0b0b;
  --bg-2: #141414;
  --panel: #111111;
  --card: #161616;
  --line: rgba(225, 6, 0, 0.22);
  --line-soft: rgba(212, 175, 55, 0.14);
  --text: #f6f3ea;
  --muted: #b7aa96;
  --red: #e10600;
  --red-2: #ff2d1a;
  --red-deep: #8a0500;
  --gold: #d4af37;
  --ok: #6ee7a8;
  --sidebar: 270px;
  --radius: 16px;
  --font: Segoe UI, Tahoma, sans-serif;
  --display: Georgia, Times New Roman, serif;
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  overflow-x: hidden;
}

button, input, select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button { cursor: pointer; }
img { display: block; max-width: 100%; }

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(225, 29, 46, 0.22), transparent 55%),
    radial-gradient(700px 420px at 0% 90%, rgba(120, 20, 30, 0.25), transparent 50%),
    linear-gradient(180deg, #0c0709, #09060a 40%, #10070b);
}

.topbar, .layout, .modal-root, .mail-root {
  position: relative;
  z-index: 1;
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 6, 10, 0.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  filter: drop-shadow(0 8px 18px rgba(225, 29, 46, 0.45));
  width: 42px;
  height: 42px;
  display: block;
}
.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.brand-text em {
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-2);
  font-weight: 700;
}

.top-meta {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(26, 14, 20, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.pill.live { color: #ffd4d8; }
.pill.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-2);
  box-shadow: 0 0 0 4px rgba(255, 77, 90, 0.2);
  animation: pulse 1.6s ease infinite;
}
.top-meta a.pill {
  text-decoration: none;
  color: #ffd4d8;
}
.top-meta a.pill:hover {
  border-color: rgba(255, 77, 90, 0.45);
}
.price-pill {
  color: var(--gold) !important;
  border-color: rgba(240, 195, 106, 0.35) !important;
}

@keyframes pulse {
  50% { opacity: 0.45; transform: scale(0.9); }
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: calc(100vh - 74px);
}

.sidebar {
  padding: 1.35rem 1rem 2rem;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 11, 16, 0.95), rgba(12, 7, 10, 0.4));
}

.nav-label {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8a6d74;
  font-weight: 700;
  padding: 0 0.65rem 0.8rem;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.85rem 0.8rem;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-item:hover {
  background: rgba(225, 29, 46, 0.08);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(225, 29, 46, 0.18), rgba(225, 29, 46, 0.05));
  border-color: rgba(225, 29, 46, 0.35);
}

.nav-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #220e14;
  border: 1px solid var(--line);
  color: var(--red-2);
  flex-shrink: 0;
}

.nav-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-item small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.1rem;
}

.side-card {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(225, 29, 46, 0.12), transparent 50%),
    #14090d;
}

.side-card h4 {
  font-family: var(--display);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.side-card > p {
  color: var(--muted);
  font-size: 0.8rem;
}

.meter {
  margin-top: 0.85rem;
  height: 8px;
  border-radius: 999px;
  background: #2a1218;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red-deep), var(--red-2));
  border-radius: inherit;
  transition: width 0.35s ease;
}

.meter-note {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: #ffc9ce;
  font-weight: 600;
}

/* Main */
.main {
  padding: 1.5rem 1.6rem 3rem;
}

button[hidden],
.nav-item[hidden],
.panel[hidden] {
  display: none !important;
}
.panel { display: none; }
.panel.active { display: block; animation: fade 0.25s ease; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.page-head {
  margin-bottom: 1.35rem;
  max-width: 720px;
}

.eyebrow {
  color: var(--red-2);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.page-head h1,
.discord-copy h1,
.modal-body h2,
.mail-body h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.page-head h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.lede {
  margin-top: 0.55rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* Raid cards */
.raid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}

.raid-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  min-height: 420px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.raid-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 77, 90, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.raid-art {
  position: relative;
  height: 170px;
  background:
    linear-gradient(180deg, transparent 20%, rgba(12, 5, 8, 0.92) 100%),
    var(--art) center/cover no-repeat;
}

.raid-art .difficulty {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(10, 4, 6, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.difficulty.mythic { color: #d2a8ff; border-color: rgba(180, 120, 255, 0.35); }
.difficulty.heroic { color: #7dd3fc; border-color: rgba(125, 211, 252, 0.35); }
.difficulty.normal { color: #86efac; border-color: rgba(134, 239, 172, 0.3); }

.slots-chip {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(225, 29, 46, 0.85);
  box-shadow: 0 6px 16px rgba(225, 29, 46, 0.35);
}

.slots-chip.full {
  background: rgba(60, 40, 45, 0.9);
  color: #c9b0b4;
}

.raid-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.raid-body h3 {
  font-family: var(--display);
  font-size: 1.15rem;
}

.raid-time {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.raid-time span {
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  background: #241016;
  border: 1px solid var(--line-soft);
}

.raid-desc {
  color: #cbb4b9;
  font-size: 0.86rem;
  line-height: 1.45;
}

.slot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.slot {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 1px dashed rgba(255, 77, 90, 0.35);
  background: rgba(225, 29, 46, 0.06);
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffb4ba;
  letter-spacing: 0.04em;
}

.slot.taken {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(160deg, rgba(80, 30, 40, 0.8), rgba(30, 14, 18, 0.9));
  color: #9a8388;
  position: relative;
  overflow: hidden;
}

.slot.taken::after {
  content: "TAKEN";
  font-size: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  width: 100%;
  margin-top: auto;
  background: linear-gradient(180deg, #ff2d1a, #9d0500);
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 6, 0, 0.35);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #ffd0d4;
  padding-inline: 1.2rem;
}

/* Availability */
.avail-table {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.avail-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(26, 14, 20, 0.85);
}

.avail-thumb {
  width: 72px;
  height: 56px;
  border-radius: 12px;
  background: var(--art) center/cover no-repeat;
  border: 1px solid var(--line-soft);
}

.avail-row h3 {
  font-size: 0.98rem;
  font-family: var(--display);
}

.avail-row p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.avail-count {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gold);
  white-space: nowrap;
}

.avail-count.zero { color: #9a8388; }

/* Schedule */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid rgba(225, 29, 46, 0.35);
  margin-left: 0.6rem;
  padding-left: 1.25rem;
}

.time-item {
  position: relative;
  padding: 0 0 1.25rem;
}

.time-item::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red-2);
  box-shadow: 0 0 0 4px rgba(225, 29, 46, 0.2);
}

.time-card {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(225, 29, 46, 0.08), transparent 40%),
    rgba(22, 11, 16, 0.95);
}

.time-card .clock {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--gold);
}

.time-card .clock small {
  display: block;
  font-family: var(--font);
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.2rem;
  letter-spacing: 0.04em;
}

.time-card h3 {
  font-family: var(--display);
  font-size: 1.05rem;
}

.time-card p {
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 0.25rem;
}

/* Discord */
.discord-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.25rem;
  min-height: 360px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #14090d;
}

.discord-art {
  background:
    linear-gradient(120deg, rgba(225, 29, 46, 0.35), rgba(9, 6, 10, 0.55)),
    url("https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=1200&q=80") center/cover;
  min-height: 260px;
}

.discord-copy {
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.discord-copy .btn { align-self: flex-start; margin-top: 0.8rem; }

/* Modal */
.modal-root,
.mail-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-root[hidden],
.mail-root[hidden] { display: none; }

.modal-backdrop,
.mail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 4, 0.72);
  backdrop-filter: blur(6px);
}

.modal {
  position: relative;
  width: min(480px, 100%);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #14090d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: fade 0.2s ease;
}

.modal-banner {
  height: 120px;
  background:
    linear-gradient(180deg, transparent, rgba(14, 6, 9, 0.95)),
    var(--art) center/cover no-repeat;
}

.modal-x {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  font-size: 1.3rem;
  line-height: 1;
  z-index: 2;
}

.modal-body { padding: 1.15rem 1.25rem 1.4rem; }
.modal-body h2 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.modal-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

#reserve-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#reserve-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c9a8ae;
}

#reserve-form input,
#reserve-form select {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #0e070a;
  border: 1px solid var(--line);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  font-size: 0.95rem;
  outline: none;
}

#reserve-form input:focus,
#reserve-form select:focus {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.15);
}

/* Mail preview */
.mail {
  position: relative;
  width: min(560px, 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 77, 90, 0.28);
  background: #12090c;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: fade 0.22s ease;
}

.mail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: #180b10;
}

.mail-from {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.mail-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(180deg, #ff4d5a, #a10f1c);
}

.mail-from strong { display: block; font-size: 0.92rem; }
.mail-from small { color: var(--muted); font-size: 0.75rem; }

.mail-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(240, 195, 106, 0.3);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
}

.mail-body { padding: 1.25rem 1.2rem 0.5rem; }
.mail-body h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: #ffe4e7;
}

.mail-body p {
  color: #d7c0c5;
  line-height: 1.55;
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
}

.mail-ticket {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 77, 90, 0.4);
  background: rgba(225, 29, 46, 0.08);
  font-size: 0.88rem;
  line-height: 1.6;
}

.mail-ticket strong {
  color: #fff;
  font-family: var(--display);
}

.mail-foot {
  font-size: 0.78rem !important;
  color: #8f747a !important;
}

.mail-actions {
  padding: 0.85rem 1.2rem 1.2rem;
}

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
  }
  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .side-card { display: none; }
  .discord-hero { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .side-nav { grid-template-columns: 1fr; }
  .avail-row { grid-template-columns: 56px 1fr; }
  .avail-count { grid-column: 2; }
  .time-card { grid-template-columns: 1fr; }
  .brand-text em { display: none; }
}

/* Local fallback art when no image is set */
.raid-art, .avail-thumb, .modal-banner, .discord-art {
  background-color: #2a0c12 !important;
}
.discord-art {
  background-image: linear-gradient(120deg, rgba(225,29,46,.55), rgba(9,6,10,.7)), linear-gradient(160deg,#3a0a12,#12060a 60%,#4a1218) !important;
}

.layout { display: grid !important; grid-template-columns: 270px minmax(0, 1fr) !important; min-height: calc(100vh - 74px); }
.discord-art { background-image: linear-gradient(120deg, rgba(225,29,46,.55), rgba(9,6,10,.75)), linear-gradient(160deg,#3a0a12,#12060a) !important; }
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr !important; }
}

/* Locked raids after under-level check */
.raid-card.locked {
  filter: grayscale(1) brightness(0.55);
  opacity: 0.72;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}
.raid-card.locked .btn-primary {
  background: #3a2a2e;
  box-shadow: none;
  color: #9a8388;
}
.avail-row.locked,
.time-item.locked {
  filter: grayscale(1) brightness(0.6);
  opacity: 0.7;
}

.level-gate {
  position: relative;
  width: min(420px, 100%);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 77, 90, 0.35);
  background: #14090d;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  padding: 1.6rem 1.4rem 1.35rem;
  text-align: center;
  animation: fade 0.2s ease;
}
.level-gate .gate-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.9rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: linear-gradient(180deg, rgba(255,77,90,0.25), rgba(120,20,30,0.35));
  border: 1px solid rgba(255, 77, 90, 0.35);
}
.level-gate h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
  color: #ffe4e7;
}
.level-gate p {
  color: #d7c0c5;
  line-height: 1.5;
  font-size: 0.95rem;
  margin-bottom: 1.15rem;
}


/* Team page */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.team-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #1c0f15, #12080c);
  display: flex;
  flex-direction: column;
  min-height: 360px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.team-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 77, 90, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.team-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.team-ceo .team-photo {
  background: linear-gradient(145deg, #3a0d14 0%, #c01222 45%, #24060a 100%);
}
.team-pres .team-photo {
  background: linear-gradient(150deg, #2a1010 0%, #8b1a24 40%, #e11d2e 70%, #140608 100%);
}
.team-monkey .team-photo {
  background: linear-gradient(160deg, #3a1208 0%, #ff4d3a 35%, #ffb347 55%, #7a1a10 100%);
}
.team-initial {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 4, 6, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 1;
}
.team-monkey .hair-flare {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 120, 60, 0.55), transparent 68%);
  filter: blur(2px);
}
.team-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.team-role {
  color: var(--red-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.team-body h3 {
  font-family: var(--display);
  font-size: 1.35rem;
}
.team-body p:last-child {
  color: #cbb4b9;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.25rem;
}
@media (max-width: 960px) {
  .team-grid { grid-template-columns: 1fr; }
}


/* Top upload bar */
.upload-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
  min-width: 220px;
}
.upload-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 77, 90, 0.45);
  background: rgba(225, 29, 46, 0.08);
  color: #ffd0d4;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.upload-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-bar select {
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: #12080c;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}
.upload-go {
  width: auto !important;
  margin-top: 0 !important;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
}
.upload-status {
  font-size: 0.75rem;
  color: #cbb4b9;
  min-height: 1em;
}
.upload-status.ok { color: #6ee7a8; }
.upload-status.err { color: #ff8a8a; }
.team-photo.has-img {
  display: block;
  background: #0a0507 !important;
  background-image: none !important;
}
.team-photo.has-img .team-initial,
.team-photo.has-img .hair-flare {
  display: none !important;
}
.team-photo img,
.team-photo img.team-pic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}
@media (max-width: 1100px) {
  .upload-bar { order: 3; width: 100%; justify-content: flex-start; }
  .topbar { flex-wrap: wrap; }
}

.apply-now-btn {
  width: auto !important;
  margin-top: 0 !important;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  white-space: nowrap;
}
.apply-form {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.apply-section {
  padding: 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(26, 14, 20, 0.85);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.apply-section h3 {
  font-family: var(--display);
  font-size: 1.1rem;
  margin-bottom: 0.15rem;
}
.apply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.apply-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #c9a8ae;
}
.apply-form input,
.apply-form textarea {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #0e070a;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
}
.apply-form input:focus,
.apply-form textarea:focus {
  border-color: rgba(255, 77, 90, 0.55);
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.15);
}
.apply-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}
.apply-submit {
  width: auto !important;
  margin-top: 0 !important;
  min-width: 200px;
}
.apply-status {
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.2em;
}
.apply-status.ok { color: var(--ok); }
.apply-status.err { color: #ff8a8a; }
.empty-live {
  padding: 1.5rem 0.25rem 0.5rem;
  max-width: 520px;
}
.empty-live h2 {
  font-family: var(--display);
  font-size: 1.4rem;
  margin: 0.35rem 0 0.45rem;
}
@media (max-width: 700px) {
  .apply-grid { grid-template-columns: 1fr; }
}
