/*
  RO Classic Plus — Dark theme overrides (Bootstrap 3 + FluxCP).
  Keep this file small and override-only so FluxCP updates are safer.
*/

:root {
  color-scheme: dark;

  /* roskills.com palette (ported) */
  --bg-cream: #1a1f28;
  --bg-surface-raised: #252b36;
  --bg-panel: #2d3544;
  --bg-panel-deep: #252d3a;
  --bg-node: #363e4e;
  --bg-node-strong: #2e3542;
  --border-panel: rgba(120, 165, 220, 0.22);
  --border-node: rgba(140, 170, 210, 0.28);
  --text: #f4f6fa;
  --text-muted: #b4bdd0;
  --accent: #8ec5ff;
  --accent-dim: #6a9fd4;
  --danger: #f08088;
  --shadow: rgba(0, 0, 0, 0.42);
  --inset-highlight: rgba(255, 255, 255, 0.06);

  /* Map palette into FluxCP theme tokens */
  --rcp-bg0: var(--bg-cream);
  --rcp-bg1: var(--bg-cream);
  --rcp-panel: rgba(45, 53, 68, 0.78);
  --rcp-panelSolid: var(--bg-panel);
  --rcp-border: var(--border-panel);
  --rcp-text: var(--text);
  --rcp-textMuted: var(--text-muted);
  --rcp-accent: var(--accent);
  --rcp-accent2: var(--accent-dim);
  --rcp-danger: var(--danger);
  --rcp-success: #4af0b8;
  --rcp-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);

  /* Fonts (roskills.com) */
  --font-ui: Galmuri11, "Source Sans 3", system-ui, sans-serif;
}

@font-face {
  font-family: Galmuri11;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Galmuri11.woff2") format("woff2");
}

@font-face {
  font-family: Galmuri11;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Galmuri11-Bold.woff2") format("woff2");
}

html, body { height: 100%; }

body {
  color: var(--rcp-text);
  background: var(--bg-cream);
  font-family: var(--font-ui);
}

/* Flat background like roskills.com */
body::before { content: none; }

/* Topbar */
.rcp-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(37, 43, 54, 0.78);
  border-bottom: 1px solid var(--border-panel);
  backdrop-filter: blur(14px);
}
.rcp-topbar .container {
  padding-left: 0;
  padding-right: 0;
}
.rcp-topbar-inner--align {
  padding-left: 15px;
  padding-right: 15px;
}
.rcp-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.rcp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.rcp-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 50% 85%, rgba(120, 165, 220, 0.18), transparent 62%),
    linear-gradient(165deg, #323a4a 0%, var(--bg-panel) 40%, var(--bg-panel-deep) 100%);
  box-shadow:
    inset 0 1px 0 var(--inset-highlight),
    0 4px 20px var(--shadow),
    0 0 18px rgba(100, 150, 220, 0.07);
  border: 1px solid var(--border-panel);
}
.rcp-brand-text {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.3px;
  font-size: 20px;
  text-shadow: 0 0 18px rgba(142, 197, 255, 0.18);
}
.rcp-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.rcp-navlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(220, 235, 255, 0.76);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(140, 170, 210, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.12)),
    rgba(0, 0, 0, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}
.rcp-navlink:visited {
  color: rgba(220, 235, 255, 0.76);
}
.rcp-navlink:hover {
  border-color: rgba(165, 205, 245, 0.52);
  color: rgba(245, 250, 255, 0.92);
  transform: translateY(-1px);
}
.rcp-navlink--active {
  border-color: rgba(220, 240, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(160, 205, 255, 0.24), rgba(30, 55, 95, 0.22)),
    rgba(35, 55, 85, 0.35);
  color: rgba(255, 255, 255, 1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(180, 220, 255, 0.22);
}
.rcp-navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(140, 170, 210, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.12)),
    rgba(0, 0, 0, 0.10);
  color: rgba(220, 235, 255, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}
.rcp-navbtn:hover {
  color: rgba(255,255,255,0.98);
  border-color: rgba(165, 205, 245, 0.62);
  transform: translateY(-1px);
  text-decoration: none;
}
.rcp-navbtn--active { 
  border-color: rgba(220, 240, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(160, 205, 255, 0.24), rgba(30, 55, 95, 0.22)),
    rgba(35, 55, 85, 0.35);
  color: rgba(255, 255, 255, 1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(180, 220, 255, 0.22);
}
.rcp-navbtn:visited {
  color: rgba(255, 255, 255, 1);
}

/* Page head */
.rcp-pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 18px;
}
.rcp-pagehead-title h2 {
  margin: 0 0 6px 0;
  font-size: 22px;
  letter-spacing: -0.3px;
}
.rcp-pagehead-title p {
  margin: 0;
  color: var(--rcp-textMuted);
}
.rcp-pagehead-actions { display: flex; gap: 10px; }

/* Cards */
.rcp-card {
  background: var(--rcp-panel);
  border: 1px solid var(--rcp-border);
  border-radius: 16px;
  box-shadow: var(--rcp-shadow);
}
.rcp-heroimg {
  margin: 12px 0 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-panel);
}
.rcp-heroimg img {
  display: block;
  width: 100%;
  height: auto;
}
.rcp-card-pad { padding: 16px; }
.rcp-card-space { margin: 14px 0 18px; }
.rcp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.rcp-card-header .rcp-card-title {
  display: flex;
  align-items: stretch;
  gap: 18px;
  flex-wrap: wrap;
}
.rcp-char-bars {
  margin-left: 0;
  display: grid;
  gap: 10px;
  align-self: center;
  min-width: 0;
  margin-top: 10px;
}
.rcp-char-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.rcp-char-online { display: inline-flex; align-items: center; }

/* Header layout: title left, meta right */
.rcp-card-header .rcp-card-title { flex: 1 1 auto; min-width: 260px; }
.rcp-card-header .rcp-char-meta { flex: 0 0 auto; }
.rcp-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  position: relative;
  padding-right: 96px; /* reserve space for value */
}
.rcp-bar-k {
  font-size: 11px;
  color: rgba(241,246,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.rcp-bar-v {
  color: rgba(241,246,255,0.86);
  font-size: 12px;
  position: absolute;
  right: 0;
  top: 0;
  white-space: nowrap;
}
.rcp-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.rcp-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: rgba(142, 197, 255, 0.70);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.rcp-bar-fill--hp {
  background: linear-gradient(90deg, rgba(240,128,136,0.95), rgba(240,128,136,0.55));
}
.rcp-bar-fill--sp {
  background: linear-gradient(90deg, rgba(142,197,255,0.95), rgba(142,197,255,0.55));
}

@media (max-width: 980px) {
  .rcp-card-header { flex-wrap: wrap; }
  .rcp-char-meta { width: 100%; justify-content: flex-start; }
}
.rcp-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241,246,255,0.55);
}
.rcp-card-title h3 {
  margin: 2px 0 0;
  font-size: 18px;
  border: 0 !important;
  box-shadow: none !important;
}
.rcp-char-titleblock {
  display: inline-grid;
  width: max-content;
  max-width: 100%;
}
.rcp-char-titleblock .rcp-char-bars {
  width: min(260px, 100%);
  min-width: 0;
  max-width: 100%;
}
.rcp-char-titleblock .rcp-bar-track {
  width: 100%;
}
.rcp-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(160,190,255,0.16);
  color: rgba(241,246,255,0.86);
}
.rcp-char-levels {
  font-size: inherit;
  letter-spacing: 0.02em;
}
.rcp-char-level-k {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(241,246,255,0.60);
}
.rcp-char-level-v {
  font-size: inherit;
  color: rgba(241,246,255,0.86);
}

/* Server status grid */
.rcp-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.rcp-status-item {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(160,190,255,0.12);
  background: rgba(255,255,255,0.03);
}
.rcp-status-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}
.rcp-status-name {
  font-weight: 700;
  color: rgba(241,246,255,0.92);
}
.rcp-status-online { text-align: right; }
.rcp-status-number { font-size: 18px; font-weight: 800; }
.rcp-status-label { color: rgba(241,246,255,0.55); font-size: 12px; margin-left: 6px; }
.rcp-status-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.rcp-service {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}
.rcp-service-label { font-size: 11px; color: rgba(241,246,255,0.60); text-transform: uppercase; letter-spacing: 0.10em; }
.rcp-service-pill { font-size: 12px; }
.rcp-status-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.rcp-muted { color: rgba(241,246,255,0.60); }
.rcp-strong { color: rgba(241,246,255,0.92); font-weight: 700; }

/* Rates grid */
.rcp-rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 6px;
}
.rcp-rate {
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(160,190,255,0.12);
  background: rgba(255,255,255,0.03);
}
.rcp-rate-label {
  font-size: 11px;
  color: rgba(241,246,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 6px;
}
.rcp-rate-value {
  font-size: 18px;
  font-weight: 800;
  color: rgba(241,246,255,0.92);
}

/* Key/value grid (account overview) */
.rcp-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.rcp-kv-grid--char {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1200px) {
  .rcp-kv-grid--char { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .rcp-kv-grid--char { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .rcp-kv-grid--char { grid-template-columns: 1fr; }
}
.rcp-kv {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--border-panel);
  background: rgba(255,255,255,0.03);
}
.rcp-kv-k {
  font-size: 11px;
  color: rgba(241,246,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 6px;
}
.rcp-kv-v { font-weight: 700; }

/* Pills */
.rcp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(140, 170, 210, 0.26);
  color: rgba(241,246,255,0.88);
  font-size: 12px;
}
.rcp-pill-ok {
  background: rgba(74, 240, 184, 0.14);
  border-color: rgba(74, 240, 184, 0.42);
  color: rgba(184, 255, 232, 0.95);
}
.rcp-pill-warn {
  background: rgba(240, 128, 136, 0.14);
  border-color: rgba(240, 128, 136, 0.40);
  color: rgba(255, 230, 232, 0.95);
}
.rcp-pill-bad {
  background: rgba(240, 128, 136, 0.18);
  border-color: rgba(240, 128, 136, 0.55);
  color: rgba(255, 230, 232, 0.98);
}

/* Tables */
.rcp-table {
  margin: 0;
  background: transparent;
}
.rcp-table > thead > tr > th {
  background: rgba(255,255,255,0.03);
}
.rcp-table-actions {
  white-space: nowrap;
  text-align: right;
}
.rcp-subnote {
  margin-top: 10px;
  color: var(--text-muted);
}

/* Forms (roskills-like) */
.rcp-form {
  margin-top: 12px;
}
.rcp-form-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 12px;
  align-items: center;
  margin-top: 10px;
}
.rcp-label {
  font-size: 11px;
  color: rgba(241,246,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin: 0;
}
.rcp-help {
  grid-column: 2 / -1;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 6px;
}
.rcp-callout {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-panel);
  background:
    radial-gradient(ellipse at 50% 85%, rgba(120, 165, 220, 0.10), transparent 62%),
    linear-gradient(165deg, #323a4a 0%, var(--bg-panel) 40%, var(--bg-panel-deep) 100%);
  box-shadow:
    inset 0 1px 0 var(--inset-highlight),
    0 4px 20px var(--shadow);
}
.rcp-callout-strong { font-weight: 800; margin-bottom: 4px; }
.rcp-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* Database list search — single-row bar */
.rcp-db-search-form {
  display: block !important;
  margin-top: 12px;
}
.rcp-db-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  padding: 14px 16px;
  background: var(--bg-node-strong, #252b36);
  border: 1px solid var(--border-panel);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow), inset 0 1px 0 var(--inset-highlight);
}
.rcp-db-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
}
.rcp-db-field--xs { flex: 0 1 100px; min-width: 88px; }
.rcp-db-field--sm { flex: 0 1 120px; min-width: 100px; }
.rcp-db-field--md { flex: 0 1 160px; min-width: 130px; }
.rcp-db-field--grow { flex: 1 1 180px; min-width: 140px; }
.rcp-db-field--actions {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}
.rcp-db-field__label {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rcp-db-control {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-node, rgba(140, 170, 210, 0.28));
  background: var(--bg-node, #363e4e) !important;
  color: var(--text, #f4f6fa) !important;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.rcp-db-control:focus-visible {
  outline: 2px solid var(--accent, #8ec5ff);
  outline-offset: 2px;
}
.rcp-db-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(140, 170, 210, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.10)),
    rgba(0, 0, 0, 0.10);
  color: rgba(220, 235, 255, 0.86);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}
.rcp-db-btn:hover {
  border-color: rgba(165, 205, 245, 0.52);
  color: rgba(245, 250, 255, 0.96);
}
.rcp-db-btn:focus-visible {
  outline: 2px solid var(--accent, #8ec5ff);
  outline-offset: 2px;
}
.rcp-db-btn--primary {
  border-color: rgba(120, 180, 255, 0.45);
  background:
    linear-gradient(180deg, rgba(142, 197, 255, 0.22), rgba(80, 130, 200, 0.12)),
    rgba(0, 0, 0, 0.12);
  color: rgba(230, 242, 255, 0.96);
}
.rcp-db-bar--wide {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.rcp-db-bar--wide .rcp-db-field {
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .rcp-db-bar--wide {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .rcp-db-bar--wide .rcp-db-field {
    flex-shrink: 1;
  }
  .rcp-db-field--actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}
.rcp-inline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.rcp-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
  color: rgba(241,246,255,0.86);
}
.rcp-radio input[type="radio"] { margin: 0; }

/* Gender slider toggle */
.rcp-gender-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.rcp-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.rcp-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  border-radius: 12px;
  padding: 2px;
  min-width: 220px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(140, 170, 210, 0.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.rcp-toggle-seg {
  position: relative;
  z-index: 2;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(241,246,255,0.70);
  margin: 0;
}
.rcp-toggle-thumb {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.10)),
    rgba(0, 0, 0, 0.10);
  border: 1px solid rgba(140, 170, 210, 0.26);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
#register_gender_m:checked ~ .rcp-toggle .rcp-toggle-thumb {
  background:
    linear-gradient(180deg, rgba(142, 197, 255, 0.55), rgba(0, 0, 0, 0.10)),
    rgba(0, 0, 0, 0.10);
  border-color: rgba(142, 197, 255, 0.55);
}
#register_gender_f:checked ~ .rcp-toggle .rcp-toggle-thumb {
  transform: translateX(100%);
  background:
    linear-gradient(180deg, rgba(240, 128, 136, 0.48), rgba(0, 0, 0, 0.10)),
    rgba(0, 0, 0, 0.10);
  border-color: rgba(240, 128, 136, 0.50);
}
#register_gender_m:checked ~ .rcp-toggle .rcp-toggle-seg--left,
#register_gender_f:checked ~ .rcp-toggle .rcp-toggle-seg--right {
  color: rgba(241,246,255,0.92);
}
.rcp-toggle:hover {
  border-color: rgba(160, 195, 240, 0.42);
}

/* Birthdate (dateField) layout */
.rcp-datefield {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rcp-datefield select {
  min-width: 120px;
}
.rcp-datefield select.form-control,
.rcp-datefield select {
  padding: 9px 10px;
  border-radius: 10px;
}

/* Character view */
.rcp-charview-hero {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
.rcp-charview-hero--noart {
  grid-template-columns: 1fr;
}
.rcp-charview-hero--noart .rcp-charview-meta {
  grid-column: 1 / -1;
}
.rcp-charview-art {
  border-radius: 14px;
  border: 1px solid var(--border-panel);
  background:
    radial-gradient(ellipse at 50% 85%, rgba(120, 165, 220, 0.10), transparent 62%),
    linear-gradient(165deg, #323a4a 0%, var(--bg-panel) 40%, var(--bg-panel-deep) 100%);
  box-shadow: inset 0 1px 0 var(--inset-highlight);
  padding: 10px;
  text-align: center;
}
.rcp-charview-art img { max-width: 100%; height: auto; image-rendering: pixelated; }
.rcp-statline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
}
.rcp-statline-k {
  font-size: 11px;
  color: rgba(241,246,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.rcp-statline-v { font-weight: 800; }

/* Character view: stats block spacing */
.rcp-charstats { margin-top: 12px; }
.rcp-charstats--header {
  margin-top: 0;
  align-self: stretch;
  min-width: 260px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rcp-charstats--header .rcp-callout-strong { margin-bottom: 8px; }
.rcp-charstats--header .rcp-statline { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 980px) {
  .rcp-charstats--header { width: 100%; }
  .rcp-charstats--header .rcp-statline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Item view */
.rcp-item-hero {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
.rcp-item-art {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
.rcp-item-art img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  border-radius: 10px;
  border: 1px solid var(--border-panel);
}

/* Monster view: 2x preview sprite in standard 160px column */
.rcp-mob-hero {
  grid-template-columns: 160px 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 8px;
}
.rcp-mob-art {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 160px;
  max-width: 160px;
  overflow: visible;
}
.rcp-mob-hero .rcp-mob-art img.rcp-mob-preview {
  display: block;
  max-width: none !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  zoom: 2;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
@supports not (zoom: 1) {
  .rcp-mob-hero .rcp-mob-art img.rcp-mob-preview {
    zoom: unset;
    transform: scale(2);
    transform-origin: top center;
  }
}

/* Monster view: grouped panels (compact but not a flat list) */
.rcp-mob-meta {
  min-width: 0;
}
.rcp-mob-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.rcp-mob-panel {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-panel);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.rcp-mob-panel--wide {
  grid-column: 1 / -1;
}
.rcp-mob-panel-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(241,246,255,0.58);
}
.rcp-kv-grid--mob {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 0;
}
.rcp-kv--mob {
  padding: 8px 10px;
  border-radius: 10px;
}
.rcp-kv--mob .rcp-kv-k {
  margin-bottom: 4px;
}
.rcp-kv--span2 {
  grid-column: 1 / -1;
}
.rcp-statline--mob {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(160,190,255,0.12);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 8px;
}
.rcp-jobpills--compact {
  gap: 5px;
  margin-top: 0;
  flex: 1 1 auto;
}
.rcp-jobpill--compact {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 6px;
}
.rcp-card--tight {
  margin-top: 10px;
}
.rcp-card--tight.rcp-card-space {
  margin: 10px 0 12px;
}
.rcp-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: rgba(241,246,255,0.92);
  letter-spacing: 0.04em;
}
.rcp-subnote--tight {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 12px;
}
@media (max-width: 900px) {
  .rcp-mob-panels { grid-template-columns: 1fr; }
}

/* Item cell (tables / lists) */
.rcp-itemcell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.rcp-itemcell-icon {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
  flex: 0 0 auto;
}
.rcp-mobcell-icon {
  width: 32px;
  height: 32px;
  max-height: 32px;
  width: auto;
  image-rendering: pixelated;
  flex: 0 0 auto;
}
.rcp-itemcell--mob .rcp-mobcell-slot {
  flex: 0 0 56px;
  width: 56px;
  min-width: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}
.rcp-itemcell-main { display: flex; flex-direction: column; line-height: 1.15; }
.rcp-itemcell-name { font-weight: 800; }
.rcp-itemcell-sub { font-size: 12px; margin-top: 2px; }

/* Item view: equippable jobs bar */
.rcp-eqjobs {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(160,190,255,0.14);
}
.rcp-jobpills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.rcp-jobpill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(160,190,255,0.18);
  background: rgba(0,0,0,0.14);
  color: rgba(241,246,255,0.88);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .rcp-form-row {
    grid-template-columns: 1fr;
  }
  .rcp-help { grid-column: 1 / -1; }
  .rcp-form-actions { justify-content: stretch; flex-wrap: wrap; }
  .rcp-charview-hero,
  .rcp-item-hero,
  .rcp-mob-hero {
    grid-template-columns: 1fr;
  }
  .rcp-mob-hero .rcp-mob-art img.rcp-mob-preview {
    zoom: 1.75;
  }
  @supports not (zoom: 1) {
    .rcp-mob-hero .rcp-mob-art img.rcp-mob-preview {
      zoom: unset;
      transform: scale(1.75);
      transform-origin: top center;
    }
  }
}

/* Character rows (compact, single-line) */
.rcp-char-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rcp-char-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-panel);
  background:
    linear-gradient(165deg, rgba(50, 58, 74, 0.65) 0%, rgba(45, 53, 68, 0.55) 55%, rgba(37, 45, 58, 0.55) 100%);
  box-shadow: inset 0 1px 0 var(--inset-highlight);
}
.rcp-char-cell--name {
  flex: 1 1 360px;
  min-width: 240px;
}
.rcp-char-name a,
.rcp-char-name {
  font-weight: 800;
  color: rgba(241, 246, 255, 0.92);
  text-decoration: none;
}
.rcp-char-name a:hover { text-decoration: underline; }
.rcp-char-sub {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rcp-char-cell--stat {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.06);
}
.rcp-char-cell--zeny {
  min-width: 160px;
  justify-content: space-between;
}
.rcp-stat-inline-k {
  font-size: 11px;
  color: rgba(241,246,255,0.60);
  text-transform: uppercase;
  letter-spacing: 0.10em;
}
.rcp-stat-inline-v {
  font-size: 14px;
  font-weight: 800;
  color: rgba(241,246,255,0.92);
}
.rcp-char-cell--status { flex: 0 0 auto; }
.rcp-char-cell--actions {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .rcp-char-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .rcp-char-cell--actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

/* Bootstrap container spacing */
.container {
  padding-top: 20px;
}

/* Hide legacy navbar if it appears anywhere */
.navbar { display: none; }

/* Links */
a { color: var(--rcp-accent); }
a:hover { color: #9ad7ff; }

/* Panels / boxes */
.panel, .well {
  background: var(--rcp-panel);
  border: 1px solid var(--rcp-border);
  box-shadow: var(--rcp-shadow);
}
.panel-heading {
  background: rgba(255,255,255,0.04) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  color: rgba(241,246,255,0.9) !important;
}

/* Tables */
table, .table {
  color: rgba(241,246,255,0.86);
}
.table > thead > tr > th {
  border-bottom: 1px solid rgba(160,190,255,0.18);
  color: rgba(241,246,255,0.9);
  background: rgba(0,0,0,0.16);
}
.table > thead > tr > th a {
  color: rgba(241,246,255,0.9);
  text-decoration: none;
}
.table > thead > tr > th a:hover {
  color: rgba(255,255,255,0.98);
  text-decoration: underline;
}
.table > tbody > tr > td {
  border-top: 1px solid rgba(160,190,255,0.10);
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255,255,255,0.03);
}
.table-hover > tbody > tr:hover {
  background-color: rgba(108, 193, 255, 0.06);
}

/* Forms */
input[type=text], input[type=password], input[type=file], textarea, select,
.form-control {
  background: var(--bg-panel-deep);
  border: 1px solid rgba(140, 170, 210, 0.26);
  color: var(--text);
}
.form-control::placeholder,
input[type=text]::placeholder,
input[type=password]::placeholder,
textarea::placeholder {
  color: rgba(241,246,255,0.45);
}
select option,
select optgroup {
  background: var(--bg-panel-deep);
  color: var(--text);
}
.form-control:focus {
  border-color: rgba(142, 197, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(142, 197, 255, 0.12);
}
label, .control-label { color: rgba(241,246,255,0.82); }
.help-block { color: var(--rcp-textMuted); }

/* RCP form labels/controls: override any bootstrap defaults */
.rcp-form .rcp-label,
.rcp-form label {
  color: rgba(241,246,255,0.82) !important;
}
.rcp-form input[type=text],
.rcp-form input[type=password],
.rcp-form textarea,
.rcp-form select {
  background: var(--bg-panel-deep) !important;
  color: var(--text) !important;
  border-color: rgba(140, 170, 210, 0.26) !important;
}

/* Buttons */
.btn-default {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.10)),
    rgba(0, 0, 0, 0.10);
  border-color: rgba(140, 170, 210, 0.26);
  color: rgba(230, 240, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32);
}
.btn-default:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.14)),
    rgba(0, 0, 0, 0.14);
  color: rgba(241, 246, 255, 0.92);
  border-color: rgba(160, 195, 240, 0.42);
  text-decoration: none;
}
.btn-default:focus,
.btn-default:active,
.btn-default.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.18)),
    rgba(0,  0,  0,  0.18);
  color: rgba(241, 246, 255, 0.95);
  border-color: rgba(160, 195, 240, 0.48);
}
.btn-default:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32),
    0 0 0 2px var(--bg-cream),
    0 0 0 4px rgba(142, 197, 255, 0.45);
}
.btn-primary {
  background:
    linear-gradient(180deg, rgba(142, 197, 255, 0.28), rgba(0, 0, 0, 0.10)),
    rgba(0, 0, 0, 0.10);
  border-color: rgba(142, 197, 255, 0.45);
  color: rgba(241, 246, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32),
    0 0 18px rgba(100, 150, 220, 0.07);
}
.btn-primary:hover {
  background:
    linear-gradient(180deg, rgba(142, 197, 255, 0.34), rgba(0, 0, 0, 0.14)),
    rgba(0, 0, 0, 0.14);
  border-color: rgba(142, 197, 255, 0.62);
  color: #fff;
  text-decoration: none;
}
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background:
    linear-gradient(180deg, rgba(142, 197, 255, 0.22), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.18);
  border-color: rgba(142, 197, 255, 0.70);
  color: #fff;
}

/* Square-ish button language (roskills-like) */
.btn,
.btn-default,
.btn-primary {
  border-radius: 8px;
}

/* Make small action buttons match roskills style */
.btn.btn-xs {
  border-radius: 8px;
  padding: 4px 8px;
  line-height: 1.2;
}

/* FluxCP message banners */
.message {
  background: rgba(108,193,255,0.14);
  border: 1px solid rgba(108,193,255,0.25);
  color: rgba(241,246,255,0.92);
}
.notice {
  background: rgba(167,139,250,0.12);
  border: 1px solid rgba(167,139,250,0.24);
  color: rgba(241,246,255,0.90);
}
.error {
  background: rgba(255,92,124,0.12);
  border: 1px solid rgba(255,92,124,0.28);
  color: rgba(241,246,255,0.92);
}

/* Footer */
footer.footer {
  background: rgba(8, 10, 16, 0.60);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(241,246,255,0.60);
}

/* Small polish */
h1, h2, h3, h4 { color: rgba(241,246,255,0.92) !important; }
.page-header { border-bottom: 1px solid rgba(255,255,255,0.08); }


/* ==========================================================================
   Server Info wiki — two-column reference layout (sticky sidebar + sections).
   Built from the existing rcp-* vocabulary; only the layout shell is new.
   ========================================================================== */

.rcp-wiki {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin: 14px 0 18px;
}

/* Sidebar */
.rcp-wiki-nav {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 14px;
  border-radius: 16px;
  background: var(--rcp-panel);
  border: 1px solid var(--rcp-border);
  box-shadow: var(--rcp-shadow);
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 197, 255, 0.34) transparent;
}
.rcp-wiki-nav::-webkit-scrollbar { width: 8px; }
.rcp-wiki-nav::-webkit-scrollbar-track { background: transparent; }
.rcp-wiki-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(142, 197, 255, 0.28);
}
.rcp-wiki-navgroup + .rcp-wiki-navgroup { margin-top: 14px; }
.rcp-wiki-navtitle {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(241, 246, 255, 0.44);
  margin: 0 0 6px 8px;
}
.rcp-wiki-navlink {
  display: block;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: rgba(220, 235, 255, 0.76);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
}
.rcp-wiki-navlink:visited { color: rgba(220, 235, 255, 0.76); }
.rcp-wiki-navlink:hover,
.rcp-wiki-navlink:focus {
  text-decoration: none;
  color: var(--rcp-text);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(140, 170, 210, 0.20);
}
.rcp-wiki-navlink.is-active {
  color: var(--accent);
  background: rgba(142, 197, 255, 0.12);
  border-color: rgba(142, 197, 255, 0.34);
}

/* Content column */
.rcp-wiki-main { min-width: 0; }
.rcp-wiki-section { scroll-margin-top: 88px; }

/*
 * Paged mode: each sidebar entry is its own page rather than a stop on one
 * long scroll.
 *
 * The `is-paged` class is added by js/server-wiki.js rather than being baked
 * in here, so that if the script fails to load the page degrades to the full
 * document with every section readable, instead of showing only the first one
 * with no way to reach the rest.
 */
.rcp-wiki.is-paged .rcp-wiki-section { display: none; }
.rcp-wiki.is-paged .rcp-wiki-section.is-current { display: block; }
.rcp-wiki-section h3 {
  margin: 2px 0 0;
  font-size: 18px;
  border: 0 !important;
  box-shadow: none !important;
}
.rcp-wiki-lede {
  margin: 10px 0 0;
  color: var(--rcp-textMuted);
  line-height: 1.6;
}
.rcp-wiki-main h4 {
  margin: 16px 0 6px;
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* Feature entries */
.rcp-feature-list { display: grid; gap: 10px; margin-top: 12px; }
.rcp-feature {
  border-radius: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(160, 190, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}
.rcp-feature-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.rcp-feature-name {
  font-weight: 800;
  color: rgba(241, 246, 255, 0.94);
}
.rcp-feature-where {
  font-size: 11px;
  color: rgba(241, 246, 255, 0.52);
  letter-spacing: 0.04em;
}
.rcp-feature p { margin: 0; color: var(--rcp-textMuted); line-height: 1.55; }
.rcp-feature p + p { margin-top: 7px; }
.rcp-feature ul {
  margin: 7px 0 0;
  padding-left: 18px;
  color: var(--rcp-textMuted);
  line-height: 1.55;
}
.rcp-feature li + li { margin-top: 3px; }

/* Reference tables */
.rcp-wiki-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(160, 190, 255, 0.14);
  border-radius: 14px;
  overflow: hidden;
}
.rcp-wiki-table th,
.rcp-wiki-table td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(160, 190, 255, 0.10);
  line-height: 1.5;
}
.rcp-wiki-table thead th {
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(241, 246, 255, 0.58);
  font-weight: 700;
}
.rcp-wiki-table tbody tr:last-child th,
.rcp-wiki-table tbody tr:last-child td { border-bottom: 0; }
.rcp-wiki-table tbody th {
  font-weight: 700;
  color: rgba(241, 246, 255, 0.90);
  white-space: nowrap;
}
.rcp-wiki-table td { color: var(--rcp-textMuted); }
.rcp-wiki-table code {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(160, 190, 255, 0.14);
  border-radius: 6px;
  padding: 1px 6px;
  color: rgba(200, 225, 255, 0.92);
  font-size: 12px;
}
.rcp-wiki-tablewrap { overflow-x: auto; }

/* Ordered "new here" steps */
.rcp-steps {
  counter-reset: rcp-step;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rcp-steps li {
  counter-increment: rcp-step;
  position: relative;
  padding: 11px 13px 11px 46px;
  border-radius: 14px;
  border: 1px solid rgba(160, 190, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--rcp-textMuted);
  line-height: 1.55;
}
.rcp-steps li::before {
  content: counter(rcp-step);
  position: absolute;
  left: 12px;
  top: 11px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(142, 197, 255, 0.14);
  border: 1px solid rgba(142, 197, 255, 0.34);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.rcp-steps strong { color: rgba(241, 246, 255, 0.92); }

/* Inline command chips */
.rcp-cmds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.rcp-cmd {
  color: var(--rcp-accent);
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .rcp-wiki { grid-template-columns: 1fr; }
  .rcp-wiki-nav {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .rcp-wiki-navgroup { display: contents; }
  .rcp-wiki-navtitle { display: none; }
  .rcp-wiki-navgroup + .rcp-wiki-navgroup { margin-top: 0; }
}

/* Wiki screenshots — captured from the live UI components (see 5_Legacy). */
.rcp-shot {
  margin: 14px 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-panel);
  background: #12141a;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  /* A new stacking context: relying on overflow:hidden alone to clip a child
     against the rounded border leaves stair-stepped pixels in the corners. */
  isolation: isolate;
}
.rcp-shot img {
  display: block;
  width: 100%;
  height: auto;
  /* Rounded to match the frame from the inside, so the corners are clipped by
     the image's own geometry rather than by the parent's overflow. 13px = the
     frame's 14px radius less its 1px border. */
  border-radius: 13px 13px 0 0;
}
/* No caption beneath, so the image carries all four corners. */
.rcp-shot img:last-child {
  border-radius: 13px;
}
.rcp-shot figcaption {
  padding: 9px 13px;
  border-top: 1px solid rgba(160, 190, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(241, 246, 255, 0.55);
  font-size: 11px;
  line-height: 1.5;
}

/* Clickable coordinates — copy an in-game /navi command. */
.rcp-navi {
  font: inherit;
  color: inherit;
  cursor: pointer;
  position: relative;
}
.rcp-navi:focus-visible {
  outline: 2px solid rgba(142, 197, 255, 0.65);
  outline-offset: 2px;
}

/* Inline in prose and table cells: matches the surrounding <code> chips. */
.rcp-navi--code {
  padding: 1px 7px;
  border: 1px solid rgba(160, 190, 255, 0.14);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(200, 225, 255, 0.92);
  font-size: 12px;
  white-space: nowrap;
}
.rcp-navi--code:hover {
  border-color: rgba(142, 197, 255, 0.5);
  background: rgba(142, 197, 255, 0.1);
  color: var(--accent);
}

/* Pill and caption variants keep their own look; only add the affordance. */
.rcp-navi.rcp-meta-pill:hover {
  border-color: rgba(142, 197, 255, 0.5);
  color: var(--accent);
}
.rcp-navi.rcp-feature-where {
  border: 0;
  background: none;
  padding: 0;
  text-decoration: underline dotted rgba(160, 190, 255, 0.4);
  text-underline-offset: 3px;
}
.rcp-navi.rcp-feature-where:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

/* Confirmation, swapped in briefly after a successful copy. */
.rcp-navi.is-copied,
.rcp-navi--code.is-copied:hover {
  border-color: rgba(74, 240, 184, 0.55);
  background: rgba(74, 240, 184, 0.12);
  color: #4af0b8;
}
.rcp-navi.rcp-feature-where.is-copied {
  background: none;
  text-decoration-color: #4af0b8;
}
.rcp-navi.is-copied::after {
  content: 'copied';
  margin-left: 7px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Feature entry with an accompanying image beside its text. */
.rcp-feature--media {
  display: grid;
  /* 159px is the screenshots' native width: scaling pixel art is what makes it
     mushy, so they are rendered 1:1 rather than fitted to an arbitrary column. */
  grid-template-columns: 159px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
/* Image after the text instead of before it. */
.rcp-feature--media-right {
  grid-template-columns: minmax(0, 1fr) 159px;
}
.rcp-feature-media {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(160, 190, 255, 0.16);
  background: #12141a;
  /* RO sprites are small and pixel-art; keep them crisp when scaled. */
  image-rendering: pixelated;
}
.rcp-feature-body { min-width: 0; }

@media (max-width: 620px) {
  .rcp-feature--media,
  .rcp-feature--media-right { grid-template-columns: 1fr; }
  .rcp-feature-media { max-width: 159px; }
}

/* ------------------------------------------------------------------ */
/* Class balance page                                                  */
/* ------------------------------------------------------------------ */
.rcp-bal-note {
  margin: 10px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(160, 190, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--rcp-textMuted);
  font-size: 13px;
}
.rcp-bal-subtitle {
  color: var(--rcp-textMuted);
  font-size: 12px;
}

.rcp-bal-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.rcp-bal-skill {
  border: 1px solid rgba(160, 190, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.rcp-bal-skillhead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(160, 190, 255, 0.10);
}
.rcp-bal-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(160, 190, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  /* Native 24x24 client art - keep the pixels crisp rather than smoothed. */
  image-rendering: pixelated;
}
.rcp-bal-skillname {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--rcp-text);
}

.rcp-bal-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.rcp-bal-col { padding: 12px 14px; }
.rcp-bal-col--official { border-right: 1px solid rgba(160, 190, 255, 0.10); }
.rcp-bal-col--changed { background: rgba(142, 197, 255, 0.05); }

.rcp-bal-collabel {
  display: block;
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(241, 246, 255, 0.50);
}
.rcp-bal-col--changed .rcp-bal-collabel { color: var(--rcp-accent); }

.rcp-bal-col ul {
  margin: 0;
  padding-left: 16px;
  color: var(--rcp-textMuted);
  line-height: 1.55;
  font-size: 13px;
}
.rcp-bal-col li + li { margin-top: 4px; }
.rcp-bal-col--changed ul { color: var(--rcp-text); }
.rcp-bal-col strong { color: var(--rcp-text); font-weight: 700; }
.rcp-bal-col--changed strong { color: var(--rcp-accent); }
.rcp-bal-col code {
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid rgba(160, 190, 255, 0.18);
  background: rgba(0, 0, 0, 0.28);
  font-size: 12px;
  color: var(--rcp-text);
}

@media (max-width: 720px) {
  .rcp-bal-compare { grid-template-columns: 1fr; }
  .rcp-bal-col--official {
    border-right: 0;
    border-bottom: 1px solid rgba(160, 190, 255, 0.10);
  }
}

/* Enumerated item list (Extended Classes equipment access). */
.rcp-bal-items {
  margin: 8px 0 0;
  padding: 8px 10px 8px 26px;
  list-style: disc;
  border-radius: 10px;
  border: 1px solid rgba(160, 190, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: var(--rcp-text);
  font-size: 13px;
  line-height: 1.5;
}
.rcp-bal-items li + li { margin-top: 2px; }

/* ---- Database sub-tabs (Items / Monsters) ---- */

.rcp-db-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.rcp-db-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(220, 235, 255, 0.76);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 10px;
  border: 1px solid rgba(140, 170, 210, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.12)),
    rgba(0, 0, 0, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.22s ease;
}

.rcp-db-tab:hover {
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(180, 210, 250, 0.5);
}

.rcp-db-tab--active {
  border-color: rgba(220, 240, 255, 0.82);
  background:
    linear-gradient(180deg, rgba(160, 205, 255, 0.24), rgba(30, 55, 95, 0.22)),
    rgba(35, 55, 85, 0.35);
  color: rgba(255, 255, 255, 1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

/* ---- Pagination (overrides stock flux.css .pages) ---- */

.pages {
  margin-top: 14px;
  padding-top: 12px;
  color: rgba(220, 235, 255, 0.62);
  text-align: center;
  border-top: 1px solid rgba(140, 170, 210, 0.18);
}

.pages .page-prev,
.pages .page-next,
.pages .page-num {
  color: rgba(220, 235, 255, 0.72);
  text-decoration: none;
}

.pages a.page-num:hover,
.pages a.page-prev:hover,
.pages a.page-next:hover {
  color: rgba(255, 255, 255, 0.95);
}

.pages .current-page {
  color: rgba(255, 255, 255, 1);
  font-weight: 800;
}

/* ---- Player command list: pill + description per row ---- */

.rcp-cmdlist {
  display: flex;
  flex-direction: column;
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
}

.rcp-cmdrow {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: baseline;
  column-gap: 16px;
  padding: 9px 12px;
}

.rcp-cmdrow:nth-child(odd) {
  background: rgba(0, 0, 0, 0.22);
}

.rcp-cmdrow:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.rcp-cmddesc {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(224, 238, 255, 0.85);
}

@media (max-width: 640px) {
  .rcp-cmdrow {
    grid-template-columns: 1fr;
    row-gap: 3px;
  }
}

/* ------------------------------------------------------------------ */
/* Prestige banner (home page)                                        */
/* ------------------------------------------------------------------ */
.rcp-prestige-banner {
  display: flex;
  align-items: stretch;
  gap: 18px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(90% 120% at 100% 50%, rgba(226, 179, 84, 0.12) 0%, transparent 60%),
    var(--rcp-panel);
}

/* Ornate transcendence linework - halos, wing sweeps and sparks - behind
 * the whole right side, fading to nothing toward the text. Lives on a
 * pseudo-element: FluxCP's tidy pass strips empty markup elements. */
.rcp-prestige-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 640px;
  max-width: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 640 236%27%3E%3Cg stroke=%27%23e2b354%27 fill=%27none%27 stroke-width=%271.2%27 vector-effect=%27non-scaling-stroke%27%3E%3Ccircle cx=%27516%27 cy=%27116%27 r=%2792%27 opacity=%27.5%27/%3E%3Ccircle cx=%27516%27 cy=%27116%27 r=%2774%27 opacity=%27.35%27 stroke-dasharray=%273 7%27/%3E%3Ccircle cx=%27516%27 cy=%27116%27 r=%27106%27 opacity=%27.2%27 stroke-dasharray=%271 9%27/%3E%3Ccircle cx=%27325%27 cy=%27118%27 r=%2770%27 opacity=%27.42%27/%3E%3Ccircle cx=%27325%27 cy=%27118%27 r=%2756%27 opacity=%27.3%27 stroke-dasharray=%273 7%27/%3E%3Ccircle cx=%27129%27 cy=%27122%27 r=%2752%27 opacity=%27.36%27/%3E%3Ccircle cx=%27129%27 cy=%27122%27 r=%2740%27 opacity=%27.26%27 stroke-dasharray=%273 7%27/%3E%3Cpath d=%27M-10,214 Q260,160 650,30%27 opacity=%27.3%27/%3E%3Cpath d=%27M-10,230 Q290,185 650,62%27 opacity=%27.22%27/%3E%3Cpath d=%27M-10,196 Q230,130 640,8%27 opacity=%27.16%27/%3E%3Cpath d=%27M190,176 q14,-22 8,-40%27 opacity=%27.25%27/%3E%3Cpath d=%27M280,160 q14,-22 8,-40%27 opacity=%27.25%27/%3E%3Cpath d=%27M380,138 q14,-22 8,-40%27 opacity=%27.22%27/%3E%3Cpath d=%27M470,112 q14,-22 8,-40%27 opacity=%27.2%27/%3E%3Cpath d=%27M516,8 l0,16 M478,16 l6,15 M554,16 l-6,15 M446,36 l10,11 M586,36 l-10,11%27 opacity=%27.35%27/%3E%3C/g%3E%3Cg fill=%27%23e2b354%27%3E%3Cpath d=%27M600,64 l5,7 -5,7 -5,-7 z%27 opacity=%27.5%27/%3E%3Cpath d=%27M410,40 l4,6 -4,6 -4,-6 z%27 opacity=%27.4%27/%3E%3Cpath d=%27M620,170 l4,6 -4,6 -4,-6 z%27 opacity=%27.35%27/%3E%3Cpath d=%27M225,52 l3,5 -3,5 -3,-5 z%27 opacity=%27.3%27/%3E%3Cpath d=%27M90,60 l3,5 -3,5 -3,-5 z%27 opacity=%27.28%27/%3E%3C/g%3E%3C/svg%3E") right center / 640px 236px no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 40%);
}
.rcp-pb-text { position: relative; z-index: 1; }
.rcp-pb-visual { z-index: 1; }
.rcp-pb-text {
  flex: 1;
  padding: 26px 8px 26px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}
.rcp-pb-text h2 {
  margin: 0;
  font-size: 30px;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #f6d489 0%, #e2b354 55%, #b0842e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 24px rgba(226, 179, 84, 0.25);
}
.rcp-pb-text p {
  margin: 0;
  max-width: 46ch;
  line-height: 1.65;
}
.rcp-pb-cta {
  align-self: flex-start;
  margin-top: 6px;
  padding: 9px 18px;
  border: 1px solid rgba(226, 179, 84, 0.55);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(226, 179, 84, 0.22) 0%, rgba(226, 179, 84, 0.1) 100%);
  color: #f6d489;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
.rcp-pb-cta:hover {
  background: linear-gradient(180deg, rgba(226, 179, 84, 0.38) 0%, rgba(226, 179, 84, 0.18) 100%);
  box-shadow: 0 0 16px rgba(226, 179, 84, 0.35);
  color: #ffe9b8;
  text-decoration: none;
}

/* Right side: priest -> high priest -> onward, arrows layered BEHIND.
 * The sprites are pre-scaled 2x with nearest-neighbour baked into the PNG
 * itself (no browser smoothing possible); they render at natural size. */
.rcp-pb-visual {
  position: relative;
  width: 560px;
  min-height: 236px;
  flex-shrink: 0;
  overflow: hidden;
}
.rcp-pb-sprite {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}
.rcp-pb-sprite-1 { left: 16px; }
.rcp-pb-sprite-2 { left: 206px; }
.rcp-pb-sprite-3 { left: 396px; }

/* Gold glowing chevron arrows, drawn as pseudo-elements BEHIND the
 * sprites. They must not be markup: FluxCP's tidy pass strips empty
 * inline elements from the page output. */
.rcp-pb-visual::before,
.rcp-pb-visual::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 108px;
  transform: translateY(-52%);
  z-index: 1;
  background: linear-gradient(90deg, rgba(226, 179, 84, 0.04) 0%, rgba(233, 192, 108, 0.75) 62%, #ffe9b8 100%);
  clip-path: polygon(0 30%, 54% 30%, 54% 4%, 100% 50%, 54% 96%, 54% 70%, 0 70%);
  filter:
    drop-shadow(0 0 6px rgba(246, 212, 137, 0.9))
    drop-shadow(0 0 16px rgba(226, 179, 84, 0.65))
    drop-shadow(0 0 34px rgba(226, 179, 84, 0.4));
  animation: rcp-pb-pulse 2.4s ease-in-out infinite;
}
.rcp-pb-visual::before {
  left: 78px;
  width: 130px;
}
.rcp-pb-visual::after {
  left: 270px;
  width: 130px;
  animation-delay: 0.8s;
}

/* Trailing arrow running off the panel edge - the journey continues.
 * Anchored to the banner itself (the visual's two pseudo-elements are
 * spent on the in-between arrows); sits above the linework backdrop and
 * below the sprites. */
.rcp-prestige-banner::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  width: 150px;
  height: 108px;
  transform: translateY(-52%);
  z-index: 0;
  opacity: 0.85;
  background: linear-gradient(90deg, rgba(226, 179, 84, 0.04) 0%, rgba(233, 192, 108, 0.75) 62%, #ffe9b8 100%);
  clip-path: polygon(0 30%, 54% 30%, 54% 4%, 100% 50%, 54% 96%, 54% 70%, 0 70%);
  filter:
    drop-shadow(0 0 6px rgba(246, 212, 137, 0.9))
    drop-shadow(0 0 16px rgba(226, 179, 84, 0.65))
    drop-shadow(0 0 34px rgba(226, 179, 84, 0.4));
  animation: rcp-pb-pulse 2.4s ease-in-out infinite;
  animation-delay: 1.6s;
  -webkit-mask-image: linear-gradient(90deg, #000 50%, transparent 96%);
  mask-image: linear-gradient(90deg, #000 50%, transparent 96%);
}
@keyframes rcp-pb-pulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 5px rgba(246, 212, 137, 0.7))
      drop-shadow(0 0 14px rgba(226, 179, 84, 0.5))
      drop-shadow(0 0 28px rgba(226, 179, 84, 0.3));
  }
  50% {
    filter:
      drop-shadow(0 0 8px rgba(246, 212, 137, 1))
      drop-shadow(0 0 22px rgba(226, 179, 84, 0.8))
      drop-shadow(0 0 44px rgba(226, 179, 84, 0.5));
  }
}

@media (max-width: 760px) {
  .rcp-prestige-banner { flex-direction: column; }
  .rcp-pb-text { padding: 22px 22px 0; }
  .rcp-pb-visual { width: 100%; }
}
