/* PALEO Profiles — standalone wiki aesthetic (dark-first) */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Outfit:wght@450;500;600;700&display=swap");

:root {
  --bg-deep: #07090e;
  --bg: #0c1017;
  --bg-elev: #121822;
  --bg-hover: #1a2230;
  --ink: #e8edf5;
  --ink-soft: #98a3b8;
  --line: rgba(255, 255, 255, 0.08);
  --focus: #7cc4ff;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  /* Default accent (overridden per theme) */
  --accent: #e8b84a;
  --accent-dim: rgba(232, 184, 74, 0.14);
  --accent-glow: rgba(232, 184, 74, 0.35);
  --danger: #e85d5d;
  --danger-dim: rgba(232, 93, 93, 0.14);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

.theme-kto {
  --accent: #e8b84a;
  --accent-2: #f0ca6c;
  --accent-dim: rgba(232, 184, 74, 0.14);
  --accent-glow: rgba(232, 184, 74, 0.4);
}

.theme-base {
  --accent: #e85d5d;
  --accent-2: #ff7a7a;
  --accent-dim: rgba(232, 93, 93, 0.14);
  --accent-glow: rgba(232, 93, 93, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-optical-sizing: auto;
  background: var(--bg-deep);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-dim), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(80, 120, 255, 0.06), transparent);
}

a {
  color: var(--accent-2, var(--accent));
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ink);
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  background: var(--bg-elev);
  color: var(--ink);
  border: 2px solid var(--focus);
  border-radius: 10px;
  font-weight: 700;
}

.skip-link:focus {
  top: 10px;
}

/* Nav */
.profiles-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 14, 0.82);
  backdrop-filter: blur(12px);
}

.profiles-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profiles-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.profiles-brand span.accent {
  color: var(--accent);
}

.profiles-brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.profiles-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profiles-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: transparent;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.profiles-links a:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.profiles-links a.home-link {
  border-color: rgba(124, 196, 255, 0.35);
  color: #9ccfff;
}

/* Sticky in-profile section nav (under site header) */
.profile-subnav {
  position: sticky;
  top: 53px;
  z-index: 95;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
}

.profile-subnav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.profile-subnav-tab {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.profile-subnav-tab:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
}

h2 {
  font-size: 1.35rem;
  margin-top: 36px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

h3 {
  font-size: 1.05rem;
  color: var(--accent);
  margin-top: 22px;
}

p,
li {
  color: var(--ink-soft);
  max-width: 72ch;
}

.lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 65ch;
}

.muted {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* Dashboard cards */
.dashboard-hero {
  margin-bottom: 32px;
}

.dashboard-hero h1 {
  margin-bottom: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.creature-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.creature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--accent-glow);
}

.creature-card-image {
  aspect-ratio: 16 / 10;
  background: var(--bg);
  background-size: cover;
  background-position: center;
  position: relative;
}

.creature-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 9, 14, 0.92) 100%);
}

.creature-card-body {
  padding: 16px 18px 18px;
  position: relative;
}

.creature-card-tag {
  position: absolute;
  top: -12px;
 right: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0c10;
}

.creature-card.theme-base .creature-card-tag {
  background: var(--danger);
  color: #fff;
}

.creature-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 4px;
}

.creature-card-sub {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.creature-card-badge {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124, 196, 255, 0.35);
  background: rgba(124, 196, 255, 0.12);
  color: #9ccfff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Profile hero */
.profile-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 32px;
}

@media (max-width: 880px) {
  .profile-hero {
    grid-template-columns: 1fr;
  }
}

.profile-hero-visual {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  min-height: 280px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.profile-hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent 50%);
  pointer-events: none;
}

.profile-hero-text .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.stat-chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.star-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 14px;
}

.star-item {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.star-item strong {
  color: var(--ink);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.stars {
  color: var(--accent);
  letter-spacing: 1px;
}

/* Panels & tables */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0 24px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 10px;
  border: 1px solid var(--line);
}

table.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.profile-table th,
table.profile-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

table.profile-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.25);
}

table.profile-table tr:last-child td {
  border-bottom: none;
}

table.profile-table td.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.profile-table th.th-stat-icon {
  text-align: center;
  vertical-align: bottom;
  min-width: 3.25rem;
}

table.profile-table th.th-stat-icon i {
  display: block;
  margin: 0 auto 2px;
  font-size: 0.95rem;
  color: var(--accent);
  opacity: 0.92;
}

table.profile-table th.th-stat-icon .th-stat-lbl {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  line-height: 1.15;
}

table.profile-table th.th-abil-icon {
  width: 40px;
}

table.profile-table th.th-desc {
  min-width: 160px;
}

/* Tabs */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tab-btn:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.tab-btn[aria-selected="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.tab-panel[hidden] {
  display: none !important;
}

pre.curve-dump {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  padding: 16px;
  margin: 0;
  background: #05070b;
  color: #b8c5d9;
  overflow-x: auto;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Skins */
.skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.skin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg);
}

.skin-card h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}

.skin-notes label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 6px;
  margin-top: 10px;
}

.skin-notes textarea {
  width: 100%;
  min-height: 64px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: vertical;
}

.skin-notes button {
  margin-top: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
}

.skin-notes button:hover {
  background: rgba(232, 184, 74, 0.25);
}

/* Loadout */
.loadout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.loadout-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.loadout-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.loadout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.loadout-actions button {
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
}

.loadout-actions button.primary {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.loadout-actions button:hover {
  border-color: var(--accent);
}

.loadout-status {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.sources-list {
  font-size: 0.88rem;
  padding-left: 1.2em;
}

.sources-list li {
  margin-bottom: 8px;
}

.icon-inline {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 4px;
}

#profile-root.loading {
  opacity: 0.5;
  pointer-events: none;
}

.error-banner {
  background: var(--danger-dim);
  border: 1px solid var(--danger);
  color: #ffb4b4;
  padding: 14px 16px;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* Dashboard “how to use” expander */
details.profiles-howto {
  margin-bottom: 22px;
}

details.profiles-howto summary {
  cursor: pointer;
  font-family: var(--font-display);
  color: var(--ink);
  padding: 4px 0;
}

details.profiles-howto summary::-webkit-details-marker {
  color: var(--accent);
}

.profiles-howto-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profiles-howto-body p {
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.profiles-howto-body code {
  font-size: 0.86em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
}

/* —— Profile overhaul (Deinosuchus v2) —— */
.profile-toc {
  position: sticky;
  top: 56px;
  z-index: 50;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(12, 16, 23, 0.92);
  backdrop-filter: blur(10px);
}

.toc-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0 0 10px;
}

.profile-toc ul {
  margin: 0;
  padding-left: 1.2em;
  columns: 2 200px;
  gap: 12px;
  font-size: 0.88rem;
}

.profile-toc a {
  text-decoration: none;
  color: var(--ink-soft);
}

.profile-toc a:hover {
  color: var(--accent);
}

.profile-top {
  margin-bottom: 28px;
}

.profile-hero-banner {
  width: 100%;
  min-height: min(52vh, 520px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  box-shadow: var(--shadow);
}

.hero-caption-banner {
  text-align: center;
  margin: 6px 0 20px;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

.profile-hero-below .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.profile-hero-split {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.25fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 920px) {
  .profile-hero-split {
    grid-template-columns: 1fr;
  }
}

.profile-hero-main .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
}

.profile-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.profile-intro {
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 14px;
}

.hero-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 22px;
  margin-bottom: 16px;
}

.meta-block {
  min-width: 120px;
}

.meta-block.meta-curve .qf-val {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.92rem;
}

.meta-copy {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-mod-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.copy-mod-btn:hover {
  background: rgba(232, 184, 74, 0.28);
}

.copy-flash {
  font-size: 0.78rem;
  color: var(--ink-soft);
  min-height: 1.2em;
}

.font-mono {
  font-family: ui-monospace, "Cascadia Code", monospace;
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.qf-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.qf-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.qf-val {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.35;
}

.group-slot-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  background: linear-gradient(135deg, var(--accent-dim), rgba(0, 0, 0, 0.2));
  box-shadow: 0 0 24px var(--accent-glow);
}

.gsl {
  grid-column: 1;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  align-self: end;
}

.gsn {
  grid-column: 2;
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1;
  color: var(--ink);
}

.gsd {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.mod-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mod-pill {
  font-size: 0.8rem;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.mod-pill strong {
  color: var(--accent);
  margin-right: 6px;
}

.mod-pill.note {
  flex: 1 1 220px;
  border-style: dashed;
}

.profile-section {
  margin-bottom: 36px;
  scroll-margin-top: 118px;
}

.profile-section h2 {
  margin-top: 0;
}

.vital-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.vital-card {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.vk {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.vv {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.slot-layout-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.slot-layout-cell {
  flex: 1 1 90px;
  min-width: 80px;
  text-align: center;
  padding: 12px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.sl-name {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.sl-count {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.sl-zero {
  color: var(--ink-soft);
  opacity: 0.45;
}

.sl-has {
  color: var(--accent);
}

.curve-link-banner {
  padding: 14px 16px;
  margin: 12px 0 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(124, 196, 255, 0.35);
  background: rgba(30, 58, 90, 0.35);
}

.curve-official-link {
  font-weight: 700;
  color: #9ccfff !important;
  text-decoration: none;
}

.curve-official-link:hover {
  color: #fff !important;
}

.abilities-table .abil-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: contain;
  background: var(--bg-deep);
}

.abil-detail {
  font-size: 0.82rem;
  max-width: 220px;
}

.curve-key-list {
  font-size: 0.72rem;
  margin: 8px 0 0;
  padding: 8px 10px;
  background: var(--bg-deep);
  border-radius: 8px;
  max-height: 160px;
  overflow: auto;
}

.skin-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.skin-showcase-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid;
  background: var(--bg-elev);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.skin-showcase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.skin-showcase-card.rarity-common {
  border-color: rgba(255, 255, 255, 0.75);
}

.skin-showcase-card.rarity-uncommon {
  border-color: #4ade80;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.25);
}

.skin-showcase-card.rarity-rare {
  border-color: #60a5fa;
  box-shadow: 0 0 16px rgba(96, 165, 250, 0.28);
}

.skin-showcase-card.rarity-legendary {
  border-color: #c084fc;
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.35);
}

.skin-showcase-thumb {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

.skin-rarity-tag {
  display: inline-block;
  margin: 8px 10px 0;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
}

.skin-showcase-name {
  margin: 6px 12px 4px;
  font-size: 1rem;
}

.skin-showcase-marks {
  margin: 0 12px 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.gallery-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.gallery-game-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.gallery-game-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.gallery-game-item figcaption {
  padding: 10px 12px;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.subspecies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.subspecies-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg-elev);
}

.subspecies-img {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}

.subspecies-card h3 {
  margin: 12px 14px 8px;
  font-size: 1rem;
}

.subspecies-card p {
  margin: 0 14px 14px;
  font-size: 0.88rem;
}

.paleo-fig {
  margin: 12px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.paleo-fig img {
  width: 100%;
  display: block;
  max-height: 280px;
  object-fit: cover;
}

.profile-details {
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 4px 14px 14px;
}

.profile-details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 12px 4px;
  color: var(--ink);
}

.profile-details-body {
  padding-top: 4px;
}

.loadout-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
  align-items: flex-end;
}

.loadout-slot-tile {
  width: 88px;
  min-height: 100px;
  padding: 8px;
  border-radius: 12px;
  border: 2px dashed var(--line);
  background: var(--bg-deep);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--font-body);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.loadout-slot-tile:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.loadout-slot-tile img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.loadout-slot-empty {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--ink-soft);
}

.loadout-slot-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.25;
  color: var(--ink-soft);
}

.picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  padding: 20px;
}

.picker-modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.picker-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.picker-tile {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.picker-tile:hover,
.picker-tile-active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.picker-tile img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.picker-tile-label {
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.2;
}

.picker-clear {
  grid-column: 1 / -1;
  border-style: dashed;
}

.picker-close {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}

.loadout-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.preset-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
  min-width: 180px;
}

.preset-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
}

.gender-toggle {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.gender-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 600;
}

.gender-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.skin-lab-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 8px;
}

.skin-lab-select {
  flex: 1 1 220px;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.skin-lab-preview {
  flex: 2 1 280px;
  min-height: 140px;
  border-radius: var(--radius);
  border: 3px solid var(--line);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.skin-lab-preview.rarity-legendary {
  border-color: rgba(180, 120, 255, 0.75);
}

.skin-lab-preview.rarity-rare {
  border-color: rgba(96, 165, 250, 0.75);
}

.skin-lab-preview.rarity-uncommon {
  border-color: rgba(52, 211, 153, 0.65);
}

.skin-lab-preview.rarity-common {
  border-color: rgba(148, 163, 184, 0.5);
}

.skin-lab-preview-rarity {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--ink);
}

.skin-lab-preview-name {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.skin-lab-sub {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.skin-lab-host {
  display: grid;
  gap: 16px;
}

.skin-lab-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--bg);
}

.skin-lab-card h4 {
  margin: 0 0 10px;
}

.region-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.region-name {
  flex: 0 0 120px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.region-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
}

.swatch-on {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.swatch-0 { background: #64748b; }
.swatch-1 { background: #94a3b8; }
.swatch-2 { background: #cbd5e1; }
.swatch-3 { background: #fca5a5; }
.swatch-4 { background: #86efac; }
.swatch-5 { background: #93c5fd; }

.curve-paste-panel details {
  margin-bottom: 10px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
