/* ============================================================
   Route Nova — design tokens
   Theme: "trainer's dex terminal" — a handheld console screen,
   not a marketing site. Deep pine/night palette, a chunky pixel
   face used sparingly for identity, JetBrains Mono for anything
   that reads like live data (HP, stats, prices).
   ============================================================ */
:root {
  --bg: #0f1a13;
  --bg-alt: #0b130e;
  --panel: #17261c;
  --panel-alt: #1e3225;
  --line: #2c4234;
  --line-bright: #3d5c46;
  --text: #eaf2e6;
  --text-dim: #9db3a2;
  --text-faint: #6d8577;
  --accent: #ffcb05;      /* pokédex/route-sign yellow */
  --danger: #e5484d;
  --danger-dim: #7a2b2d;
  --good: #4caf6d;
  --water: #4d9de0;
  --radius: 10px;
  --radius-sm: 6px;
  --font-display: "Verdana", "DejaVu Sans", "Arial Black", sans-serif;
  --font-body: system-ui, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(255,203,5,0.05), transparent 40%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0px, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 3px);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.boot-screen {
  display: flex; align-items: center; justify-content: center;
  height: 100vh; font-family: var(--font-mono); color: var(--text-faint); letter-spacing: 0.05em;
}
a { color: inherit; }
button { font-family: inherit; }
::selection { background: var(--accent); color: #101a14; }

/* ---------- layout shell ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.console-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px;
  background: linear-gradient(180deg, var(--panel-alt), var(--panel));
  border-bottom: 3px solid var(--line-bright);
  position: sticky; top: 0; z-index: 20;
}
.console-lenses { display: flex; gap: 6px; flex-shrink: 0; }
.lens { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.35); }
.lens.red { background: var(--danger); box-shadow: 0 0 10px rgba(229,72,77,0.6); }
.lens.small { width: 8px; height: 8px; background: var(--good); }
.lens.small.b { background: var(--water); }
.brand {
  font-family: var(--font-display); font-size: 14px; color: var(--accent); font-weight: 900;
  letter-spacing: 0.18em; text-decoration: none; white-space: nowrap;
}
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav-link {
  font-family: var(--font-mono); font-size: 12.5px; text-decoration: none; color: var(--text-dim);
  padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; background: none;
}
.nav-link:hover { color: var(--text); border-color: var(--line-bright); }
.nav-link.active { color: var(--bg); background: var(--accent); font-weight: 700; }
.nav-spacer { flex: 1; }
.hamburger-btn {
  display: none; background: none; border: 1px solid var(--line-bright); border-radius: var(--radius-sm);
  color: var(--text); font-size: 18px; line-height: 1; padding: 6px 10px; cursor: pointer; flex-shrink: 0;
}
.user-chip {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.money-tag { color: var(--accent); font-weight: 700; }

.page { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 20px 60px; }
.page.wide { max-width: 1180px; }

/* ---------- typography ---------- */
h1.hero-title {
  font-family: var(--font-display); font-size: 22px; line-height: 1.4; color: var(--accent);
  margin: 0 0 6px; font-weight: 900; letter-spacing: 0.14em;
}
h2.section-title {
  font-family: var(--font-display); font-size: 13px; color: var(--text); margin: 0 0 16px;
  display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: 0.14em;
}
h2.section-title::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex-shrink: 0; }
.subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; max-width: 60ch; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- panels & cards ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.panel + .panel { margin-top: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mini-card {
  background: var(--panel-alt); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; text-align: center; cursor: pointer; transition: border-color 0.15s, transform 0.1s;
}
.mini-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.mini-card .sprite-box { min-height: 240px; display: flex; align-items: center; justify-content: center; }
.mini-card .placeholder-mon {
  width: 68px; height: 68px; border-radius: 50%; border: 2px dashed var(--line-bright);
  display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 10px;
}
.mini-card .name { font-size: 12.5px; margin-top: 6px; font-weight: 600; }
.mini-card .dex-no { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.type-chip {
  display: inline-block; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; margin: 2px 2px 0 0; background: var(--line); color: var(--text-dim);
}

/* ---------- buttons & forms ---------- */
.btn {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #101a14; border: none; border-radius: var(--radius-sm);
  padding: 10px 16px; transition: filter 0.1s, transform 0.1s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.secondary { background: var(--panel-alt); color: var(--text); border: 1px solid var(--line-bright); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 11.5px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

input, textarea, select {
  font-family: var(--font-mono); font-size: 13px; color: var(--text); background: var(--bg-alt);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.field { margin-bottom: 14px; }
.form-panel { max-width: 380px; margin: 40px auto; }

/* ---------- HP / stat bars (signature element: segmented LCD gauge) ---------- */
.hp-row { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; }
.hp-gauge {
  flex: 1; height: 12px; background: var(--bg-alt); border: 1px solid var(--line-bright); border-radius: 3px;
  display: flex; gap: 1.5px; padding: 2px; overflow: hidden;
}
.hp-seg { flex: 1; background: var(--line); border-radius: 1px; }
.hp-seg.on.high { background: var(--good); }
.hp-seg.on.mid { background: var(--accent); }
.hp-seg.on.low { background: var(--danger); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-family: var(--font-mono); font-size: 11.5px; }
.stat-cell { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.stat-cell .k { color: var(--text-faint); font-size: 9.5px; text-transform: uppercase; }
.stat-cell .v { font-size: 15px; font-weight: 700; }

/* ---------- battle scene ---------- */
.battle-scene {
  background: linear-gradient(180deg, #1a3324, var(--panel)); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden;
}
.battle-row { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.combatant { flex: 1; min-width: 260px; }
.combatant .name-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.battle-log {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); padding: 12px; height: 130px;
  overflow-y: auto;
}
.move-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.move-btn {
  text-align: left; background: var(--panel-alt); border: 1px solid var(--line-bright); border-radius: var(--radius-sm);
  padding: 10px 12px; cursor: pointer; color: var(--text);
}
.move-btn:hover { border-color: var(--accent); }

/* ---------- battle roster strip (bottom of battle screen) ---------- */
.roster-strips { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.roster-strip-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.roster-strip-label { font-size: 10px; text-transform: uppercase; color: var(--text-faint); min-width: 46px; }
.roster-chip {
  display: flex; align-items: center; gap: 4px; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 8px 3px 3px; font-size: 11px; color: var(--text-dim);
}
.roster-chip.active { border-color: var(--accent); color: var(--text); }
.roster-chip.fainted { opacity: 0.4; text-decoration: line-through; }
.roster-chip img { width: 22px; height: 22px; image-rendering: pixelated; }

.move-btn .mv-meta { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); margin-top: 2px; }

/* ---------- misc ---------- */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.error-banner { background: var(--danger-dim); border: 1px solid var(--danger); color: #ffd9da; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.success-banner { background: #16362a; border: 1px solid var(--good); color: #baf0cd; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.badge-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.badge-item { width: 88px; text-align: center; }
.badge-item img { image-rendering: pixelated; }
.badge-name { font-size: 10.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.3; }

.trade-list-box {
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-alt);
  max-height: 340px; overflow-y: auto;
}
.trade-list-row { padding: 7px 10px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line); }
.trade-list-row:last-child { border-bottom: none; }
.trade-list-row:hover { background: rgba(255,255,255,0.04); }
.trade-list-row.selected { background: var(--accent); color: var(--bg); font-weight: 600; }

.text-dex-list { column-count: 4; column-gap: 24px; font-size: 13px; }
.text-dex-row { break-inside: avoid; padding: 3px 0; }

.box-list { display: flex; flex-direction: column; gap: 8px; }
.box-row {
  display: flex; align-items: center; gap: 14px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel-alt); cursor: grab; flex-wrap: wrap;
}
.box-row-sprite { flex-shrink: 0; }
.box-row-info { flex: 1; min-width: 140px; cursor: pointer; }
.box-row-slots { display: flex; align-items: center; flex-shrink: 0; }
.slot-btn {
  width: 24px; height: 24px; margin-left: 3px; border-radius: 4px; border: 1px solid var(--line-bright);
  background: var(--bg-alt); color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; cursor: pointer;
}
.slot-btn:hover { border-color: var(--accent); color: var(--text); }
.variant-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid var(--line-bright); background: transparent;
}
.variant-dot.mine { background: var(--accent); border-color: var(--accent); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.table th { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; }
.divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.tab-row { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab-btn { background: none; border: none; color: var(--text-dim); font-family: var(--font-mono); font-size: 12.5px; padding: 9px 4px; cursor: pointer; border-bottom: 2px solid transparent; margin-right: 14px; }
.tab-btn.active { color: var(--accent); border-color: var(--accent); }
.pill { display: inline-block; font-family: var(--font-mono); font-size: 10px; padding: 2px 8px; border-radius: 20px; background: var(--line); color: var(--text-dim); }
.pill.admin { background: var(--danger); color: #fff; }
.thread-row { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid var(--line); align-items: center; }
.thread-row:hover { background: rgba(255,255,255,0.02); }
.post { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; background: var(--panel-alt); }
.post-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.post-meta-author { display: flex; align-items: center; gap: 8px; }

/* ---------- avatars ---------- */
.avatar-img { border-radius: 50%; object-fit: cover; border: 1px solid var(--line-bright); flex-shrink: 0; }
.avatar-fallback {
  border-radius: 50%; background: var(--panel-alt); border: 1px solid var(--line-bright); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.profile-header-row { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }

footer.site-footer {
  text-align: center; padding: 22px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint);
  border-top: 1px solid var(--line);
}

/* Wild/Silph Co/Turf Battle encounters render as a single compact box that appears
   inline at the bottom of whatever page you're on (in normal document flow, like the
   original game's "a wild Pokémon appeared" box under the map) — never a full-width
   bar, never a dimming full-screen modal. .wild-attacker-fullscreen is just a
   non-visual wrapper so its panel child lays out the same as the plain notice bar. */
.wild-attacker-fullscreen { display: contents; }

.wild-attacker-bar,
.wild-attacker-fullscreen-panel {
  margin: 20px auto 0; background: var(--panel); border: 2px solid var(--accent); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
  max-width: min(520px, calc(100vw - 32px));
}
.wild-attacker-bar {
  padding: 14px 20px; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.wild-attacker-bar.wild-attacker-battle { flex-direction: column; align-items: stretch; }
.wild-attacker-fullscreen-panel { padding: 24px; width: min(560px, calc(100vw - 32px)); }

/* ============================================================
   Responsive / mobile
   ============================================================ */

/* Safety net: nothing should ever force horizontal scroll on the page itself. */
html, body { overflow-x: hidden; max-width: 100%; }

/* Collapsible nav drawer. Below the breakpoint, nav-links and user-chip are
   hidden by default and only shown (as a full-width stacked panel) when the
   hamburger toggles the .open class on. Above the breakpoint they behave
   exactly as before: inline flex items in the console bar. */
@media (max-width: 860px) {
  .hamburger-btn { display: inline-flex; align-items: center; justify-content: center; }

  .nav-links, .user-chip {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    order: 10;
  }
  .nav-links.open, .user-chip.open { display: flex; }
  .user-chip.open {
    padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line);
    flex-direction: row; flex-wrap: wrap; align-items: center;
  }
  .nav-link { padding: 11px 12px; } /* taller tap targets once stacked */
  .user-chip .nav-link { padding: 9px 10px; }
}

@media (max-width: 640px) {
  .page { padding: 20px 14px 48px; }
  .hero-title { font-size: 17px !important; }

  /* Cards now need real room for full-size sprite art; a single column on
     narrow phones looks better than squeezing an oversized box. */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

  /* Tables scroll within their own box instead of blowing out page width. */
  .table { font-size: 12px; }
  .table th, .table td { padding: 8px 6px; white-space: nowrap; }

  .text-dex-list { column-count: 1; }

  .form-panel { margin: 24px auto; max-width: 100%; }
}

/* ---------- Battle screen: the one screen that must work great on a phone ---------- */
@media (max-width: 640px) {
  .battle-scene { padding: 14px; }
  .battle-row { flex-direction: column; gap: 14px; margin-bottom: 12px; }
  .combatant { min-width: 0; }
  .combatant .name-row { font-size: 14px; }

  /* Bigger, thumb-friendly move buttons — full-width single column beats a
     cramped 2x2 grid on a narrow screen. */
  .move-grid { grid-template-columns: 1fr; gap: 8px; }
  .move-btn { padding: 14px 14px; min-height: 48px; }
  .move-btn .mv-meta { font-size: 11px; }

  .battle-log { height: 110px; font-size: 11.5px; }

  /* Item/flee row: full-width stacked buttons are much easier to tap accurately. */
  .battle-scene .btn-row { flex-direction: column; }
  .battle-scene .btn-row .btn { width: 100%; text-align: center; }
}


/* ---------------- Forum (vBulletin-style upgrade) ---------------- */
.forum-group-header { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px; }
.forum-last-post { text-align: right; flex-shrink: 0; max-width: 46%; min-width: 0; }
.forum-last-line { cursor: pointer; }
.forum-last-line:hover .forum-last-title { text-decoration: underline; }
.forum-last-title { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.forum-stats-footer { margin-top: 4px; }

.pill.prefix-pill { background: var(--accent); color: #101010; font-weight: 700; }
.pill.mod { background: #2f6db3; color: #fff; }

/* Two-column vB post: author card on the left, content on the right. */
.post-vb { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 0; overflow: hidden; }
.post-author-col { background: rgba(255,255,255,0.03); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.post-author-name { font-weight: 700; word-break: break-word; }
.post-author-stats { line-height: 1.7; }
.post-main { padding: 12px 14px 12px 0; min-width: 0; display: flex; flex-direction: column; }
.post-vb .post-meta { margin-bottom: 10px; }
.post-body { font-size: 14px; flex: 1; }
.post-quote { border-left: 3px solid var(--accent); background: rgba(255,255,255,0.04); padding: 8px 10px; margin: 8px 0; white-space: pre-wrap; color: var(--text-dim); font-size: 13px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post-sig { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 8px; font-style: italic; white-space: pre-wrap; }
.post-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.post-actions { display: flex; gap: 10px; }

.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-right: 4px; }
.online-dot.on { background: var(--good); }

.reaction-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.reaction-btn { font-family: var(--font-mono); font-size: 11px; padding: 3px 9px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--text-dim); cursor: pointer; }
.reaction-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.reaction-btn.mine { border-color: var(--accent); background: rgba(255, 200, 0, 0.12); color: var(--text); }
.reaction-btn:disabled { cursor: default; opacity: 0.7; }

/* Embedded [pokemon:ID] card inside a post */
.embed-mon { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,0.03); padding: 8px 14px 8px 8px; margin: 8px 8px 8px 0; cursor: pointer; vertical-align: middle; max-width: 100%; }
.embed-mon:hover { border-color: var(--accent); }
.embed-mon.missing { cursor: default; padding: 8px 12px; }
.embed-mon-sprite { width: 90px; height: 90px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.embed-mon-sprite img { max-width: 90px; max-height: 90px; }

/* Insert-Pokémon picker in composers */
.mon-picker { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 8px; max-height: 220px; overflow-y: auto; background: var(--panel-alt); }
.mon-picker-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 13px; }
.mon-picker-row:last-child { border-bottom: none; }
.mon-picker-row:hover { background: rgba(255,255,255,0.05); }

/* Embedded Pokémon detail popup */
.mon-popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mon-popup { max-width: 420px; width: 100%; max-height: 90vh; overflow-y: auto; margin: 0; }

/* Mobile: author column collapses into a horizontal strip above the post. */
@media (max-width: 700px) {
  .post-vb { grid-template-columns: 1fr; gap: 0; }
  .post-author-col { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; border-right: none; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .post-author-stats { display: flex; gap: 10px; flex-wrap: wrap; line-height: 1.4; }
  .post-main { padding: 12px; }
  /* Stack the counts/last-post info under the row instead of squeezing it. */
  .thread-row { flex-wrap: wrap; }
  .forum-last-post { text-align: left; max-width: 100%; flex-basis: 100%; padding-left: 40px; }
}

/* ---------------- BBCode editor + rendering ---------------- */
.bb-editor textarea { width: 100%; }
.bb-toolbar { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.bb-tool { font-family: var(--font-mono); font-size: 12px; min-width: 30px; padding: 4px 8px; border: 1px solid var(--line); background: var(--panel-alt); color: var(--text); border-radius: var(--radius-sm); cursor: pointer; }
.bb-tool:hover { border-color: var(--accent); }
.bb-tool.active { border-color: var(--accent); background: rgba(255,200,0,0.12); }
.bb-toolbar-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 2px; }
.bb-preview { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 10px; min-height: 60px; background: rgba(255,255,255,0.02); }
.bb-code { background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; overflow-x: auto; font-size: 12px; white-space: pre-wrap; }
.bb-img { max-width: 100%; max-height: 420px; border-radius: var(--radius-sm); display: block; margin: 6px 0; }
.bb-spoiler { display: inline-block; }
.bb-spoiler-btn { font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--text-dim); cursor: pointer; }
.bb-spoiler-body { display: block; margin-top: 4px; padding: 8px 10px; border-left: 3px solid var(--line); background: rgba(255,255,255,0.03); white-space: pre-wrap; }
.post-quote-by { font-weight: 700; font-size: 12px; margin-bottom: 4px; color: var(--text-dim); }

/* Group rank pill/colored username */
.pill.group-pill { background: transparent; border: 1px solid currentColor; }

/* Admin usergroup color swatch */
.color-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; margin-right: 4px; border: 1px solid rgba(255,255,255,0.2); }

/* Admin text-list rows with a trailing action button (promo pool, remove-pokemon) */
.admin-text-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.admin-text-row:last-child { border-bottom: none; }

/* Compact "a wild Pokémon appeared" box on the Maps page */
.map-catch-box { display: flex; align-items: center; gap: 12px; max-width: 360px; margin: 0 auto 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,0.03); text-align: left; }
.map-catch-info { flex: 1; min-width: 0; }
.map-catch-info .name { font-size: 13px; margin-bottom: 2px; }

/* Pause screen shown after the opponent's Pokémon faints, before their next one is sent out */
.opponent-pause-panel { text-align: center; margin: 12px 0; padding: 20px; }
.continue-btn { font-size: 17px; padding: 16px 48px; }

/* Clickable roster chips (switch by clicking a Pokémon in your own roster strip) */
.roster-chip.clickable { cursor: pointer; transition: border-color 0.15s, transform 0.1s; }
.roster-chip.clickable:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }

/* Prompt panel shown when the player must pick their next Pokémon (own faint) */
.switch-prompt-panel { text-align: center; margin: 12px 0; }
