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

:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C96A;
  --gold-dim:    #7A6030;
  --bg:          #0B0C0E;
  --bg-2:        #111318;
  --bg-3:        #181C23;
  --bg-4:        #1E2330;
  --border:      #252A36;
  --border-2:    #2E3545;
  --text:        #E8EAF0;
  --text-dim:    #7A8099;
  --text-faint:  #3D4459;
  --red:         #E05252;
  --green:       #4CAF7D;
  --blue:        #5B8DEF;
  --quest:       #8B7FE8;
  --quest-dim:   #4A4480;
  --quest-light: #B0A6F5;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --sidebar-w:   240px;
  --header-h:    60px;
  --radius:      8px;
  --transition:  0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 14px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ───────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }

/* ── Layout ──────────────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .wordmark {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--gold);
  line-height: 1;
}
.wordmark-bang {
  color: #fff;
}
.sidebar-logo .tagline {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section { margin-bottom: 4px; }
.nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 12px 20px 6px;
  font-weight: 500;
}
.nav-label.collapsible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.nav-label.collapsible:hover { color: var(--text-dim); }
.nav-label .chevron {
  width: 10px; height: 10px;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.nav-section.collapsed .nav-label .chevron { transform: rotate(-90deg); }
.nav-section.collapsed .nav-item { display: none; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 400;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  user-select: none;
}
.nav-item:hover { color: var(--text); background: var(--bg-3); }
.nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(201,168,76,0.07);
  font-weight: 500;
}
.nav-item .icon {
  width: 16px; height: 16px;
  opacity: 0.7;
  flex-shrink: 0;
}
.nav-item.active .icon { opacity: 1; }

/* DutDut Quest (gameplay) section gets its own accent so it reads as a
   distinct "mode" from the real-world data sections. */
.nav-label.quest { color: var(--quest-dim); }
.nav-item.quest.active {
  color: var(--quest-light);
  border-left-color: var(--quest);
  background: rgba(139,127,232,0.10);
}

.nav-badge {
  margin-left: auto;
  background: var(--gold);
  color: var(--bg);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: var(--font-mono);
}

.nav-badge-soon {
  margin-left: auto;
  background: transparent;
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 1px 6px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  font-family: var(--font-mono);
}

.sidebar-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 0;
}

.sidebar-footer-links {
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--text-faint);
}
.sidebar-footer-links a {
  color: var(--text-faint);
  text-decoration: none;
  transition: color var(--transition);
}
.sidebar-footer-links a:hover { color: var(--gold); }

/* ── Main content ────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Top bar ─────────────────────────────────────────────────────── */
.topbar {
  height: var(--header-h);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--text);
}
.topbar-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 1px;
}

/* "DutDut!" wordmark shown next to the hamburger on mobile, in place of the
   page title/subtitle (which move into the page content there). */
.topbar-brand {
  display: none;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1.5px;
  color: var(--gold);
}

/* Page title/subtitle shown above the content on mobile (hidden in the
   topbar there). */
.page-title-mobile {
  display: none;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.3px;
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-2);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.profile-quick-link {
  flex: 0 0 auto;
  padding: 5px 10px;
  font-size: 11.5px;
}
.profile-quick-link .icon { width: 13px; height: 13px; }
.btn-gold {
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.btn-gold:hover { background: var(--gold-light); }

/* ── Notification badge ──────────────────────────────────────────── */
.notif-wrap {
  position: relative;
  display: none; /* shown by JS when logged in */
}
.notif-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-2);
  line-height: 1;
  pointer-events: none;
}
.notif-dot.visible { display: flex; }

/* Nav item notification pip */
.nav-notif {
  margin-left: auto;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.nav-notif.visible { display: flex; }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--bg);
  cursor: pointer;
  border: 2px solid var(--gold-dim);
  transition: border-color var(--transition);
  overflow: hidden;
}
.avatar:hover { border-color: var(--gold); }

/* ── Account dropdown (top-right avatar) ─────────────────────────── */
.account-menu-wrap { position: relative; }
.account-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  min-width: 170px;
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.account-menu.open { display: block; }
.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
}
.account-menu-item:hover { color: var(--text); background: var(--bg-4); }
.account-menu-item .icon { width: 15px; height: 15px; opacity: 0.8; flex-shrink: 0; }
.account-menu-divider { border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Page content ────────────────────────────────────────────────── */
.page { padding: 24px; flex: 1; min-width: 0; }

/* ── Filter bar ──────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.search-wrap svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px 8px 34px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  transition: border-color var(--transition);
  outline: none;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus { border-color: var(--gold-dim); }

.filter-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px 28px 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A8099' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--gold-dim); }
.filter-select option { background: var(--bg-3); }

/* ── Searchable select (autocomplete combobox) ──────────────────────── */
.ss-wrap { position: relative; display: inline-block; }
.ss-wrap.ss-block { display: block; width: 100%; }
.ss-wrap select { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ss-input { cursor: pointer; }
.ss-wrap.ss-block .ss-input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 28px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A8099' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.ss-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.ss-wrap.open .ss-dropdown { display: block; }
.ss-option {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-option:hover, .ss-option.ss-active { background: var(--bg-4); }
.ss-option.ss-selected { color: var(--gold); }
.ss-empty { padding: 8px 12px; font-size: 12px; color: var(--text-faint); }

/* Plain text search input reusing the ss-dropdown styling (favorite pickers) */
.ss-wrap.ss-block .fav-show-search-input { background-image: none; padding-right: 12px; cursor: text; }

.result-count {
  font-size: 12px;
  color: var(--text-dim);
  margin-left: auto;
  white-space: nowrap;
}
.result-count span { color: var(--gold); font-family: var(--font-mono); font-weight: 500; }

/* ── Stats strip ─────────────────────────────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  opacity: 0.4;
}
.stat-card.highlight::before { opacity: 1; }
.stat-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text);
  line-height: 1.1;
  margin-top: 4px;
  letter-spacing: 1px;
}
.stat-card.highlight .stat-value { color: var(--gold); }
.stat-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Score table ─────────────────────────────────────────────────── */
.table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.table-header-title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--text);
}
.table-controls { display: flex; gap: 8px; }

.table-container { overflow-x: auto; }

/* ── Hype landing page ───────────────────────────────────────────── */
.hype-search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hype-search-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
}
.hype-search-link:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.hype-rank-list { display: flex; flex-direction: column; }
.hype-rank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.hype-rank-card:last-child { border-bottom: none; }
.hype-rank-num {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.hype-rank-card .corps-cell { flex: 1; min-width: 0; }
.hype-rank-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  flex-shrink: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 10px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: color var(--transition);
  font-family: var(--font-body);
}
th:hover { color: var(--text-dim); }
th.sorted { color: var(--gold); }
th .sort-icon { margin-left: 4px; opacity: 0.5; }
th.sorted .sort-icon { opacity: 1; }

td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}
td.show-title-cell {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}
tbody tr:hover { background: var(--bg-3); }
tbody tr:last-child td { border-bottom: none; }

/* Place column */
.place {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--text-dim);
  width: 52px;
}
.place-1 { color: var(--gold); }
.place-2 { color: #B0B8CC; }
.place-3 { color: #A0795A; }

/* Tighten the gap between the place column and the corps icon/name on the
   Scores table. */
#main-page td:has(.place) { padding-right: 4px; }
#main-page td:has(.corps-cell) { padding-left: 4px; }

/* Corps column */
.corps-cell { display: flex; align-items: center; gap: 10px; }
.corps-logo {
  width: 28px; height: 28px;
  border-radius: 4px;
  background: var(--bg-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--gold);
  flex-shrink: 0;
  border: 1px solid var(--border);
  overflow: hidden;
}
.corps-logo img { width: 100%; height: 100%; object-fit: contain; }
.corps-name { font-weight: 500; }
.corps-location { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

/* Score column */
.score {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}
.score-high { color: var(--gold); }
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-bar-bg {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  width: 80px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Division badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.badge-world { background: rgba(201,168,76,0.12); color: var(--gold); }
.badge-open  { background: rgba(91,141,239,0.12); color: var(--blue); }
.badge-allage{ background: rgba(76,175,125,0.12); color: var(--green); }

/* Show title */
.show-title {
  font-style: italic;
  color: var(--text-dim);
  font-size: 12.5px;
}

/* Show title in "Most Hyped Shows" sections/pages — emphasized since the
   corps name is omitted there. */
.show-title-hyped {
  font-style: normal;
  font-weight: 700;
  color: var(--text);
  font-size: 13.5px;
  display: inline-block;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Favorite button */
.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-faint);
  transition: color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
}
.fav-btn:hover { color: var(--gold); transform: scale(1.15); }
.fav-btn.active { color: var(--gold); }

/* ── Sort tabs ────────────────────────────────────────────────────── */
.sort-tab {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 6px 12px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.sort-tab:hover { border-color: var(--border-2); color: var(--text); }
.sort-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 600;
}

/* ── Hype button ──────────────────────────────────────────────────── */
.hype-btn {
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: all var(--transition);
  position: relative;
  overflow: visible;
}
.hype-btn:hover {
  border-color: var(--text-dim);
  background: var(--bg-3);
}
.hype-btn.active {
  border-color: var(--gold-dim);
  background: rgba(201,168,76,0.07);
}
.hype-btn .hype-clap {
  display: block;
  transition: transform 0.2s;
}
.hype-btn .hype-flame-svg {
  display: block;
  color: var(--text-dim);
  transition: color 0.2s, transform 0.2s;
}
.hype-btn:hover .hype-flame-svg {
  color: var(--gold);
  transform: scale(1.15);
}
.hype-btn.active .hype-flame-svg {
  color: var(--gold);
}
.hype-btn .hype-flame-emoji {
  display: block;
  font-size: 15px;
  line-height: 1;
}
.hype-btn.hype-pop .hype-clap {
  animation: hype-clap-anim 0.4s ease;
}

/* Subtle smoke puffs that drift up from the button on hype */
.hype-btn.hype-pop::before,
.hype-btn.hype-pop::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180,180,180,0.45) 0%, rgba(180,180,180,0) 75%);
  pointer-events: none;
  animation: hype-smoke 0.7s ease-out forwards;
}
.hype-btn.hype-pop::before {
  margin-left: -13px;
  animation-delay: 0.05s;
}
.hype-btn.hype-pop::after {
  margin-left: 3px;
  animation-delay: 0.12s;
}
@keyframes hype-smoke {
  0%   { opacity: 0.55; transform: translateY(0) scale(0.6); }
  100% { opacity: 0;    transform: translateY(-22px) scale(1.8); }
}

/* ── Shows table: repertoire column collapses on narrow screens,
   tap/click the row to expand it inline instead ───────────────────── */
.rep-expand-row td {
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.rep-expand-content {
  padding: 12px 20px;
  background: var(--bg-3);
  animation: expandIn 0.18s ease;
}
@media (max-width: 600px) {
  .rep-row { cursor: pointer; }
  .rep-row:hover, .rep-row-open { background: var(--bg-3); }
}
@keyframes hype-clap-anim {
  0%   { transform: scale(1)    rotate(0deg); }
  25%  { transform: scale(1.35) rotate(-12deg); }
  60%  { transform: scale(1.2)  rotate(8deg); }
  100% { transform: scale(1)    rotate(0deg); }
}
.hype-btn .hype-count {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-faint);
  line-height: 1;
}

/* ── Poke button ──────────────────────────────────────────────────── */
.poke-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: transform var(--transition);
}
.poke-btn .poke-hand {
  font-size: 15px;
  display: block;
  filter: grayscale(1) opacity(0.35);
  transition: filter 0.2s, transform 0.2s;
}
.poke-btn:hover .poke-hand {
  filter: grayscale(0.3) opacity(0.7);
  transform: scale(1.15);
}
.poke-btn.active .poke-hand {
  filter: grayscale(0) opacity(1);
}
.poke-btn.poke-pop .poke-hand {
  animation: poke-anim 0.4s ease;
}
@keyframes poke-anim {
  0%   { transform: translateX(0)    rotate(0deg); }
  30%  { transform: translateX(4px)  rotate(-15deg); }
  60%  { transform: translateX(-2px) rotate(8deg); }
  100% { transform: translateX(0)    rotate(0deg); }
}
.poke-btn .poke-count {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-faint);
  line-height: 1;
}

/* ── Pagination ───────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.page-info { font-size: 12px; color: var(--text-dim); }
.page-info span { color: var(--text); font-family: var(--font-mono); }
.page-btns { display: flex; gap: 4px; }
.page-btn {
  width: 30px; height: 30px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--border-2); color: var(--text); }
.page-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.page-btn:disabled { opacity: 0.3; cursor: default; }

/* ── Panel: row expand ────────────────────────────────────────────── */
.expand-row td {
  padding: 0;
  border-bottom: 1px solid var(--border);
}
.expand-content {
  padding: 16px 20px;
  background: var(--bg-3);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  animation: expandIn 0.18s ease;
}
@keyframes expandIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.caption-item {
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
}
.caption-name {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  font-weight: 600;
}
.caption-judge { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.caption-score {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text);
  margin-top: 6px;
}
.caption-rank { font-size: 11px; color: var(--text-dim); }

/* ── Modal ────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  width: min(480px, 92vw);
  transform: translateY(12px) scale(0.98);
  transition: transform var(--transition);
  overflow: hidden;
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--gold-dim); }
.form-input::placeholder { color: var(--text-faint); }

/* Favorite shows picker */
.fav-shows-list { display: flex; flex-direction: column; gap: 8px; }
.fav-show-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}
.fav-slot-num {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
  width: 20px;
  text-align: center;
}
.fav-slot-content { flex: 1; }
.fav-slot-name { font-size: 13px; font-weight: 500; }
.fav-slot-year { font-size: 11px; color: var(--text-dim); }
.fav-slot-clear {
  background: none; border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  transition: color var(--transition);
}
.fav-slot-clear:hover { color: var(--red); }

/* ── User cards (browse users) ───────────────────────────────────── */
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition);
}
.user-card:hover { border-color: var(--gold-dim); }
.user-card-avatar {
  width: 36px; height: 36px;
  background: var(--bg-4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--gold);
  flex-shrink: 0;
}
.user-card-info { flex: 1; min-width: 0; }
.user-card-name { font-size: 13px; font-weight: 500; }
.user-card-meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-arrow { color: var(--text-faint); flex-shrink: 0; }

/* ── Social links ────────────────────────────────────────────────── */
.social-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.social-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-dim);
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 8px;
  text-decoration: none; transition: border-color var(--transition);
}
.social-link:hover { border-color: var(--gold-dim); color: var(--gold); }

/* ── Level / XP / Dut Coins ──────────────────────────────────────── */
.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0;
  border: 2px solid var(--bg-2);
  box-shadow: 0 0 0 1px var(--gold-dim);
}
.level-badge.lg { width: 40px; height: 40px; font-size: 17px; }
.profile-avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.profile-avatar-wrap .level-badge {
  position: absolute; bottom: -4px; right: -4px;
}

/* ── Avatar Frames (Shop cosmetics) ─────────────────────────────────── */
.dut-frame { position: relative; }
.dut-frame::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  border: 3px solid transparent;
  box-sizing: border-box;
}
.dut-frame-bronze::after { border-color: #B08D57; box-shadow: 0 0 6px rgba(176,141,87,0.6); }
.dut-frame-silver::after { border-color: #C7CDD6; box-shadow: 0 0 8px rgba(199,205,214,0.7); }
.dut-frame-gold::after   { border-color: var(--gold); box-shadow: 0 0 10px rgba(201,168,76,0.85); }
.dut-frame-fire::after {
  border-color: #FF6A00;
  box-shadow: 0 0 10px rgba(255,106,0,0.8);
  animation: dut-frame-pulse 1.4s ease-in-out infinite;
}
.dut-frame-neon::after {
  border-color: #4DF0FF;
  box-shadow: 0 0 10px rgba(77,240,255,0.9), 0 0 18px rgba(77,240,255,0.5);
  animation: dut-frame-pulse 1.6s ease-in-out infinite;
}
.dut-frame-rainbow::after {
  border-color: #FF3B3B;
  box-shadow: 0 0 10px rgba(255,59,59,0.7);
  animation: dut-frame-rainbow 3s linear infinite;
}
@keyframes dut-frame-pulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}
@keyframes dut-frame-rainbow {
  to { filter: hue-rotate(360deg); }
}

/* ── Shop & Inventory ────────────────────────────────────────────── */
.shop-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.shop-tab {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 1px;
  color: var(--text-dim); background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 18px; cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.shop-tab.active { color: var(--gold); border-color: var(--gold-dim); }
.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.shop-item {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; text-align: center; display: flex; flex-direction: column; gap: 8px;
}
/* Custom icon images (from /assets/icons/, see scripts/make_icon.py).
   Sized to match the emoji text they sit alongside — scales with the
   font-size of whatever container it's in. */
.icon-img {
  width: 1em;
  height: 1em;
  object-fit: contain;
  vertical-align: -0.15em;
  display: inline-block;
}

.shop-item-icon { font-size: 32px; }
.shop-item-name { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; color: var(--text); }
.shop-item-desc { font-size: 11px; color: var(--text-dim); flex: 1; }
.shop-item-price {
  font-family: var(--font-mono); font-size: 12px; color: var(--gold); font-weight: 600;
}
.shop-item-btn {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 1px;
  background: var(--gold-dim); color: var(--bg); border: none; border-radius: var(--radius);
  padding: 8px; cursor: pointer; transition: background var(--transition);
}
.shop-item-btn:hover { background: var(--gold); }
.shop-item-btn:disabled { background: var(--bg-3); color: var(--text-faint); cursor: default; }
.shop-item-btn.equipped { background: var(--green); }
.shop-item-qty {
  position: absolute; top: 8px; right: 8px; background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 10px; font-size: 10px; font-family: var(--font-mono); color: var(--text-dim);
  padding: 1px 6px;
}
.shop-item { position: relative; }

/* ── Activities (Phase 2 gameplay system) ───────────────────────────── */
.activity-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
#practice-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.activity-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.activity-card.disabled { opacity: 0.55; }
.activity-card-icon-locked { color: var(--text-faint); filter: grayscale(1); }
.activity-card-locked .activity-card-name { color: var(--text-faint); }

/* ── Page-level level lock (Clinics / Tour) ───────────────────────────── */
.page-locked {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 48px 20px; color: var(--text-dim);
}
.page-locked-icon { font-size: 32px; }
.page-locked-title { font-family: var(--font-display); font-size: 14px; letter-spacing: 1px; color: var(--text); }
.page-locked-sub { font-size: 11px; color: var(--text-faint); }
.activity-card-head { display: flex; align-items: center; gap: 10px; }
.activity-card-icon { font-size: 28px; }
.activity-card-name { font-family: var(--font-display); font-size: 13px; letter-spacing: 1px; color: var(--text); }
.activity-card-desc { font-size: 11px; color: var(--text-dim); flex: 1; }
.activity-card-meta {
  display: flex; flex-wrap: wrap; gap: 6px; font-size: 10px; font-family: var(--font-mono);
  color: var(--text-dim);
}
.activity-card-meta span {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 10px; padding: 2px 8px;
}
.activity-btn {
  font-family: var(--font-display); font-size: 12px; letter-spacing: 1px;
  background: var(--gold-dim); color: var(--bg); border: none; border-radius: var(--radius);
  padding: 8px; cursor: pointer; transition: background var(--transition);
}
.activity-btn:hover { background: var(--gold); }
.activity-btn:disabled { background: var(--bg-3); color: var(--text-faint); cursor: default; }

.xp-bar-track {
  height: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 4px;
  transition: width 0.3s;
}
.xp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.xp-row .xp-level-label {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--text);
}
.energy-bar-track {
  height: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.energy-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  border-radius: 4px;
  transition: width 0.3s;
}
.recovery-bar-track {
  height: 8px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}
.recovery-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--green));
  border-radius: 4px;
  transition: width 1s linear;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.stat-item {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-item .stat-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.stat-item .stat-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
.stat-item .stat-boost {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
  font-size: 11px;
  margin-left: 4px;
}

/* ── Equipment slots (Head / Body / Feet / Instrument / Accessory) ──────── */
.equip-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.equip-slot {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.equip-slot.filled {
  border-color: var(--green);
}
.equip-slot-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: .5px;
  text-transform: uppercase;
}
.equip-slot-icon {
  font-size: 24px;
}
.equip-slot-name {
  font-size: 11px;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: .5px;
}
.equip-slot.empty .equip-slot-name {
  color: var(--text-faint);
}
.coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
}

/* ── Header stats (Hype / Level / Dut Coins) ───────────────────────── */
.header-stats {
  display: none;
  align-items: center;
  gap: 8px;
}
.header-stats.visible { display: flex; }
.header-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 10px;
  white-space: nowrap;
}
.header-stat-badge .level-badge {
  position: static;
  width: 20px; height: 20px;
  font-size: 10px;
  border: none;
  box-shadow: none;
}
.progress-stats-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}
.progress-stats-row > .xp-block { flex: 1 1 220px; min-width: 0; }

/* ── Hype meter (separate from XP) ───────────────────────────────────── */
.hype-block { min-width: 0; }
.hype-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 4px;
  transition: width 0.3s;
}
.hype-row-note {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ── Achievements ─────────────────────────────────────────────────── */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 12px;
}
.achievement-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: default;
}
.achievement-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}
.achievement-badge.earned .achievement-icon {
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(201,168,76,0.35);
}
.achievement-badge.locked .achievement-icon {
  filter: grayscale(1);
  opacity: 0.35;
}
.achievement-badge:hover .achievement-icon { transform: translateY(-2px); }
.achievement-name {
  font-size: 10px;
  line-height: 1.3;
  color: var(--text-dim);
}
.achievement-badge.earned .achievement-name { color: var(--text); }
.achievement-progress-label {
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 10px;
}
.toast-container {
  pointer-events: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  animation: toastIn 0.2s ease;
  min-width: 220px;
}
.toast-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── App notifications (level up / achievement / friend request) ──────────── */
.app-notif-container {
  pointer-events: none;
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 24px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}
.app-notif {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  animation: appNotifIn 0.25s ease;
  cursor: pointer;
}
.app-notif.closing {
  animation: appNotifOut 0.2s ease forwards;
}
.app-notif.notif-achievement { border-left-color: var(--gold); }
.app-notif.notif-level       { border-left-color: var(--green); }
.app-notif.notif-friend      { border-left-color: #6CA0DC; }
.app-notif-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}
.app-notif-body { flex: 1; min-width: 0; }
.app-notif-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 2px;
}
.app-notif-msg {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.app-notif-close {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1;
  padding: 2px;
}
.app-notif-close:hover { color: var(--text); }
@keyframes appNotifIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes appNotifOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(24px); }
}

/* ── System-wide announcement banner ───────────────────────────────────────── */
.announce-banner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.announce-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(135deg, rgba(201,168,76,0.14), rgba(201,168,76,0.05));
  border: 1px solid var(--gold-dim, var(--border-2));
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 0 24px 12px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.announce-icon { font-size: 16px; line-height: 1; flex-shrink: 0; margin-top: 1px; }
.announce-msg { flex: 1; min-width: 0; }
.announce-close {
  flex-shrink: 0;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1;
  padding: 2px;
}
.announce-close:hover { color: var(--text); }

/* ── Empty state ──────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}
.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty-text { font-size: 15px; margin-bottom: 6px; color: var(--text); }
.empty-sub  { font-size: 12.5px; }

/* ── Loading skeleton ─────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-3) 25%,
    var(--bg-4) 50%,
    var(--bg-3) 75%
  );
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
}
.skel-row td { padding: 12px 14px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .sidebar { transform: translateX(-100%); pointer-events: none; }
  .sidebar.open { transform: translateX(0); pointer-events: auto; }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .page { padding: 16px; }
  .hamburger { display: flex !important; }
  /* Show the "DutDut!" brand next to the hamburger, and move the page
     title/subtitle out of the topbar and into the page content. */
  .topbar-brand { display: block; }
  .topbar-title-group { display: none; }
  .page-title-mobile { display: block; padding: 14px 16px 0; }
  /* When the mobile sidebar is open, lock the page behind it so only the
     sidebar scrolls. */
  body.sidebar-open { overflow: hidden; height: 100vh; }
  body.sidebar-open .main { overflow: hidden; height: 100vh; }
  /* Settings and Sign Out links are hidden from the mobile nav. */
  .sidebar-bottom { display: none !important; }
}
@media (max-width: 600px) {
  .stats-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
  .filter-bar { gap: 8px; }
  .hide-mobile { display: none !important; }
  .header-stats { gap: 4px; }
  .header-stat-badge { padding: 4px 6px; font-size: 11px; gap: 3px; }
  /* Shows page: keep the corps logo but hide the corps name so the row
     stays compact on small screens. */
  #rep-table .corps-name { display: none; }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px;
  margin-right: 8px;
}
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}
.overlay.open { display: block; }

/* ── Gold noise texture on bg ─────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(201,168,76,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(91,141,239,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.layout { position: relative; }
