@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg:       #080808;
  --bg2:      #111111;
  --bg3:      #1a1a1a;
  --border:   #252525;
  --border2:  #333333;
  --text:     hsl(30, 8%, 97%);
  --text2:    hsl(30, 8%, 60%);
  --text3:    hsl(30, 8%, 38%);
  --accent:   hsl(22, 84.9%, 52%);
  --accent2:  hsl(22, 84.9%, 44%);
  --success:  #22c55e;
  --warn:     #f59e0b;
  --danger:   #ef4444;
  --radius:   8px;
  --radius-lg: 12px;
  --shadow:   0 2px 12px rgba(0,0,0,.5);
  --hdr-h:    60px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background-color: var(--bg);
  background-image: url('/img/nrt-hero-bg.svg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text); font-size: 14px; line-height: 1.5;
  min-height: 100vh;
  background-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.staff-hdr {
  display: flex; align-items: stretch;
  height: var(--hdr-h);
  background: rgba(8,8,8,0.9);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  position: sticky; top: 0; z-index: 100;
}

.staff-logo-link {
  display: flex; align-items: center;
  padding: 0 24px; flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  line-height: 0;
}
.staff-logo-img { height: 32px; width: auto; display: block; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.staff-nav {
  flex: 1;
  display: flex; align-items: stretch; justify-content: center;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.staff-nav::-webkit-scrollbar { display: none; }

.staff-nav-btn {
  display: flex; align-items: center;
  padding: 0 18px;
  border: none; border-bottom: 2px solid transparent; border-radius: 0;
  background: none; color: var(--text2); cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
  margin-bottom: -1px; white-space: nowrap;
  transition: color .12s, border-bottom-color .12s;
}
.staff-nav-btn:hover  { color: var(--text); }
.staff-nav-btn.active { color: var(--text); border-bottom-color: var(--accent); }

/* ── Header right — avatar + sign out ───────────────────────────────────── */
.staff-hdr-right {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,0.06);
}

.staff-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
  cursor: default; user-select: none;
}

.staff-sign-out {
  font-size: 12px; color: var(--text3);
  transition: color .12s; white-space: nowrap;
}
.staff-sign-out:hover { color: var(--text2); text-decoration: none; }

/* ── Player stats in header ─────────────────────────────────────────────── */
.staff-player-stats {
  display: flex; align-items: center; gap: 10px;
  margin-right: 4px;
}
.stat-level {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  background: rgba(212,101,31,.15); border: 1px solid rgba(212,101,31,.25);
  font-size: 11px; font-weight: 700; color: var(--accent);
  white-space: nowrap; letter-spacing: .02em;
}
.stat-coins, .stat-gems {
  font-size: 12px; font-weight: 600; color: var(--text2); white-space: nowrap;
}

/* ── Main ───────────────────────────────────────────────────────────────── */
.staff-main { max-width: 1160px; margin: 0 auto; padding: 28px 24px; }

/* ── Tab visibility ──────────────────────────────────────────────────────── */
#view-home, #view-team, #view-handbook, #view-links,
#view-wins, #view-benefits, #view-events, #view-games { display: none; }
body.tab-home     #view-home,
body.tab-team     #view-team,
body.tab-handbook #view-handbook,
body.tab-links    #view-links,
body.tab-wins     #view-wins,
body.tab-benefits #view-benefits,
body.tab-events   #view-events,
body.tab-games    #view-games { display: block; }

/* ── Panels ──────────────────────────────────────────────────────────────── */
.panel {
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.panel-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 13px; color: var(--text2);
}
.panel-body { padding: 20px; }

/* ── Loading card ────────────────────────────────────────────────────────── */
@keyframes load-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@keyframes spin     { to   { transform: rotate(360deg); } }

.load-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 80px 24px;
}
.load-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 28px 48px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  animation: load-in .2s ease-out;
}
.load-spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--border2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .75s linear infinite;
}
.load-label { font-size: 12px; color: var(--text3); letter-spacing: .03em; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.state-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 24px; gap: 8px; text-align: center;
}
.state-empty-msg { font-size: 14px; font-weight: 500; color: var(--text2); }
.state-empty-sub { font-size: 13px; color: var(--text3); }

/* ── Error banner ────────────────────────────────────────────────────────── */
.error-banner {
  background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25);
  border-radius: var(--radius); padding: 14px 18px;
  color: #f87171; font-size: 13px; margin-bottom: 16px;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
#staff-toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 24px; padding: 10px 20px; font-size: 13px; color: var(--text);
  box-shadow: 0 4px 24px rgba(0,0,0,.55);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 9999;
  white-space: nowrap;
}
#staff-toast.show { opacity: 1; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 20px; border: none;
  background: var(--accent); color: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: background .12s, transform .1s; letter-spacing: .01em;
}
.btn-primary:hover  { background: var(--accent2); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text2); cursor: pointer; font-size: 13px;
  font-weight: 500; font-family: inherit;
  transition: color .12s, border-color .12s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--border2); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 20px; border: none;
  background: transparent; color: var(--text3); cursor: pointer;
  font-size: 12px; font-family: inherit;
  transition: color .12s, background .12s;
}
.btn-danger:hover { color: #f87171; background: rgba(239,68,68,.08); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -46%) scale(.97);
  z-index: 200;
  width: min(540px, calc(100vw - 32px));
  background: #0f0f0f;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,.8);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  overflow: hidden;
}
.modal.open {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: none; border: none; color: var(--text3); cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.modal-close:hover { background: rgba(255,255,255,.07); color: var(--text); }
.modal-body { padding: 20px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.form-input, .form-textarea, .form-select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-family: inherit;
  font-size: 13px; padding: 10px 12px; outline: none;
  transition: border-color .15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--border2); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text3); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.form-check-label { font-size: 13px; color: var(--text2); }
.form-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Home tab layout ─────────────────────────────────────────────────────── */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 272px;
  gap: 20px;
  align-items: start;
}
.home-main { min-width: 0; }
.home-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Greeting banner */
.home-greeting {
  margin-bottom: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(212,101,31,.12) 0%, rgba(212,101,31,.04) 100%);
  border: 1px solid rgba(212,101,31,.2);
  border-radius: var(--radius-lg);
}
.home-greeting-text { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.home-greeting-date { font-size: 13px; color: var(--text2); }

/* Announcements */
.ann-section-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.ann-section-title { font-size: 13px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .06em; }

.ann-card {
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
.ann-card:hover { border-color: var(--border2); }
.ann-card-pinned {
  border-color: rgba(245,158,11,.25);
  background: rgba(245,158,11,.04);
}
.ann-card-hdr {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.ann-pin { font-size: 12px; }
.ann-author-av {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.ann-author-name { font-size: 12px; font-weight: 600; color: var(--text2); flex: 1; }
.ann-date { font-size: 11px; color: var(--text3); }
.ann-delete { margin-left: auto; }
.ann-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.ann-card-body { font-size: 13px; color: var(--text2); white-space: pre-wrap; word-break: break-word; line-height: 1.65; }

/* Sidebar widgets */
.sidebar-widget {
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sidebar-widget-hdr {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .07em;
}
.sidebar-widget-body { padding: 12px 16px; }

.sidebar-link-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: color .12s;
}
.sidebar-link-item:last-child { border-bottom: none; }
.sidebar-link-item:hover { color: var(--accent); text-decoration: none; }
.sidebar-link-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.sidebar-link-name { font-size: 12px; font-weight: 600; }

.sidebar-event-item, .sidebar-win-item {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.sidebar-event-item:last-child, .sidebar-win-item:last-child { border-bottom: none; }
.sidebar-event-date { font-size: 11px; color: var(--accent); font-weight: 600; margin-bottom: 2px; }
.sidebar-event-title { color: var(--text); font-weight: 500; }
.sidebar-win-title { color: var(--text); font-weight: 600; }
.sidebar-win-author { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ── Team tab ────────────────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.team-card {
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  transition: border-color .15s, transform .15s;
}
.team-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.team-card-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff;
  margin-bottom: 4px;
}
.team-card-name { font-size: 15px; font-weight: 700; color: var(--text); }
.team-card-role { font-size: 12px; color: var(--accent); font-weight: 600; }
.team-card-email {
  font-size: 11px; color: var(--text3); word-break: break-all;
  transition: color .12s;
}
.team-card-email:hover { color: var(--text2); }
.team-card-bio { font-size: 12px; color: var(--text2); line-height: 1.5; margin-top: 4px; }

.team-empty {
  grid-column: 1/-1;
  text-align: center; padding: 60px 24px; color: var(--text3); font-size: 13px;
}
.team-empty strong { display: block; font-size: 15px; color: var(--text2); margin-bottom: 8px; }

/* ── Handbook tab ────────────────────────────────────────────────────────── */
.handbook-intro {
  font-size: 14px; color: var(--text2); line-height: 1.7;
  margin-bottom: 24px; max-width: 720px;
}
.accordion { display: flex; flex-direction: column; gap: 8px; }
.accordion-item {
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.accordion-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: none; border: none;
  color: var(--text); font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-align: left;
  transition: background .12s;
}
.accordion-btn:hover { background: rgba(255,255,255,.03); }
.accordion-btn.open { border-bottom: 1px solid var(--border); }
.accordion-chevron {
  flex-shrink: 0; color: var(--text3);
  transition: transform .2s;
}
.accordion-btn.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  padding: 0 20px; max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.accordion-body.open { padding: 16px 20px; max-height: 600px; }
.accordion-body p { font-size: 13px; color: var(--text2); line-height: 1.7; margin-bottom: 10px; }
.accordion-body p:last-child { margin-bottom: 0; }
.accordion-body ul { font-size: 13px; color: var(--text2); line-height: 1.7; padding-left: 20px; }
.accordion-body ul li { margin-bottom: 6px; }

/* ── Quick Links tab ─────────────────────────────────────────────────────── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.link-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; border-radius: var(--radius-lg);
  background: rgba(0,0,0,.5); border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: border-color .15s, transform .15s;
}
.link-card:hover { border-color: var(--border2); transform: translateY(-2px); text-decoration: none; }
.link-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.link-card-content { min-width: 0; }
.link-card-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.link-card-desc { font-size: 12px; color: var(--text2); line-height: 1.5; }
.link-card-arrow { margin-left: auto; color: var(--text3); font-size: 14px; padding-top: 2px; }

/* ── Wins tab ────────────────────────────────────────────────────────────── */
.wins-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.wins-hdr-title { font-size: 22px; font-weight: 700; }

.win-card {
  border-radius: var(--radius-lg);
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-left-width: 3px;
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color .15s;
}
.win-card:hover { border-color: var(--border2); }
.win-card-hdr { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.win-trophy { font-size: 18px; }
.win-author-av {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
}
.win-author-name { font-size: 12px; font-weight: 600; color: var(--text2); flex: 1; }
.win-date { font-size: 11px; color: var(--text3); }
.win-delete { margin-left: auto; }
.win-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.win-card-body { font-size: 13px; color: var(--text2); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* ── Benefits tab ────────────────────────────────────────────────────────── */
.benefits-intro {
  font-size: 14px; color: var(--text2); line-height: 1.7;
  margin-bottom: 24px; max-width: 720px;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.benefit-card {
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}
.benefit-icon { font-size: 32px; margin-bottom: 12px; }
.benefit-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.benefit-desc { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* ── Events tab ──────────────────────────────────────────────────────────── */
.events-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.events-hdr-title { font-size: 22px; font-weight: 700; }

.events-list { display: flex; flex-direction: column; gap: 10px; }
.event-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 20px;
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color .15s;
}
.event-item:hover { border-color: var(--border2); }
.event-date-block {
  flex-shrink: 0; width: 52px; text-align: center;
  background: rgba(212,101,31,.12);
  border: 1px solid rgba(212,101,31,.2);
  border-radius: 8px; padding: 8px 4px;
}
.event-date-month { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.event-date-day { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.event-content { flex: 1; min-width: 0; }
.event-emoji { font-size: 16px; }
.event-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.event-desc { font-size: 12px; color: var(--text2); line-height: 1.5; }
.event-meta { font-size: 11px; color: var(--text3); margin-top: 6px; }
.event-delete { margin-left: auto; flex-shrink: 0; }

.event-past .event-date-block { opacity: 0.45; }
.event-past .event-title { color: var(--text2); }

/* ── Games tab ───────────────────────────────────────────────────────────── */
.games-hdr {
  margin-bottom: 24px;
}
.games-hdr-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.games-hdr-sub { font-size: 14px; color: var(--text2); }

.games-section-title {
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .07em;
  margin: 24px 0 14px;
}
.games-section-title:first-child { margin-top: 0; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.game-card {
  position: relative;
  background: rgba(0,0,0,.5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center; cursor: pointer;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  text-decoration: none; color: var(--text);
}
.game-card:hover { text-decoration: none; }
.game-card-available:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.game-card-soon { opacity: 0.5; cursor: default; pointer-events: none; }

/* A game that ships authoring tools: the card keeps its own grid cell, with the
   tool links stacked underneath it (siblings, so no anchor is nested in an anchor). */
.game-card-wrap { display: flex; flex-direction: column; gap: 6px; }
.game-card-wrap .game-card { flex: 1; }
.game-tools { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.game-tool-btn {
  font-size: 11px; padding: 4px 9px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: rgba(0,0,0,.5); color: var(--text2); text-decoration: none;
  transition: border-color .15s, color .15s;
}
.game-tool-btn:hover { border-color: var(--border2); color: var(--text); text-decoration: none; }

.game-card-emoji { font-size: 40px; line-height: 1; }
.game-card-name { font-size: 14px; font-weight: 700; color: var(--text); }

.game-badges { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.game-type-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600;
  background: rgba(255,255,255,.06); color: var(--text3);
  border: 1px solid var(--border);
}
.game-status-badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 600;
}
.game-status-available { background: rgba(34,197,94,.12); color: #4ade80; }
.game-status-soon      { background: rgba(107,114,128,.12); color: #9ca3af; }

/* ── Avatar picker ───────────────────────────────────────────────────────── */
.avatar-picker { display: flex; flex-direction: column; gap: 24px; }

.avatar-picker-section { }
.avatar-picker-section-title {
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 14px;
}

.avatar-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px; text-align: center;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.avatar-upload-area:hover { border-color: var(--border2); background: rgba(255,255,255,.02); }
.avatar-upload-area.has-preview { border-style: solid; border-color: var(--border2); }

.avatar-upload-label {
  display: block; cursor: pointer;
  font-size: 13px; color: var(--text2);
}
.avatar-upload-label strong { color: var(--accent); }

.avatar-upload-img-preview {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 10px;
  display: block; border: 2px solid var(--border2);
}

.avatar-upload-actions {
  display: flex; gap: 10px; margin-top: 12px; justify-content: center;
}

.avatar-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
}

.avatar-emoji-btn {
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s, transform .1s;
}
.avatar-emoji-btn:hover {
  background: rgba(212,101,31,.15); border-color: rgba(212,101,31,.4);
  transform: scale(1.12);
}
.avatar-emoji-btn.selected {
  background: rgba(212,101,31,.2); border-color: var(--accent);
}

.lb-avatar {
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0;
}

.hide-mobile { }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar { order: -1; }
}

/* ── Live rooms ─────────────────────────────────────────────────────────── */
.live-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.live-room-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.live-room-game  { font-weight: 600; font-size: 14px; }
.live-room-players { font-size: 12px; color: var(--text2); }
.live-room-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.live-room-status {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 8px; border-radius: 20px;
}
.status-waiting  { background: rgba(245,158,11,.12); color: var(--warn); border: 1px solid rgba(245,158,11,.25); }
.status-playing  { background: rgba(34,197,94,.10);  color: var(--success); border: 1px solid rgba(34,197,94,.2); }
.live-room-join  {
  font-size: 12px; padding: 4px 14px; border-radius: 6px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; transition: background .15s;
}
.live-room-join:hover { background: var(--accent2); }
.live-room-code  { font-size: 12px; color: var(--text3); font-family: monospace; letter-spacing: .1em; }

@media (max-width: 640px) {
  .staff-main { padding: 16px 12px; }
  .staff-hdr  { flex-wrap: wrap; height: auto; }
  .staff-logo-link { flex: 1; padding: 10px 16px; border-right: none; }
  .staff-logo-img  { height: 26px; }
  .staff-hdr-right { padding: 0 12px; }
  .staff-nav {
    order: 3; flex: 0 0 100%;
    justify-content: flex-start;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 0 4px;
  }
  .staff-nav-btn { padding: 0 14px; height: 44px; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .links-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
  .live-rooms-grid { grid-template-columns: 1fr; }
}

/* Request Catalog admin editor */
.rc-cat { border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 12px; }
.rc-cat-hdr, .rc-type-hdr, .rc-field { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.rc-type { border: 1px dashed var(--border); border-radius: 6px; padding: 8px; margin: 8px 0; }
.rc-in { padding: 4px 6px; border: 1px solid var(--border); border-radius: 4px; background: transparent; color: inherit; font-size: 12px; }
.rc-desc { width: 100%; }
.rc-pri { width: 56px; }
.rc-chk { font-size: 12px; white-space: nowrap; }
.rc-x { padding: 2px 8px; }
.rc-add { margin-top: 4px; }
.rc-field, .rc-type, .rc-cat { cursor: grab; }
