/* ==========================================================================
   LOLCLASSICWIKI — COMPLETE PARCHMENT & STONE VIBECURB DESIGN SYSTEM
   Authentic Season 3 Archival Aesthetics with Tactile Micro-Polish Across All Pages
   ========================================================================== */

:root {
  --pv-parchment: #f4ede2;
  --pv-parchment-dark: #e8dec8;
  --pv-parchment-field: url('/assets/img/chrome/parchment-field.webp');
  --pv-parchment-charred: url('/assets/img/chrome/parchment-charred.webp');
  --pv-ink-title: #1c150b;
  --pv-ink-body: #3d3222;
  --pv-ink-muted: #6b5c47;
  --pv-gold: #c8a24e;
  --pv-gold-bright: #ffd875;
  --pv-gold-dark: #8c6e2d;
  --pv-gold-glow: rgba(200, 162, 78, 0.35);
  --pv-stone-dark: #0a0f16;
  --pv-stone-border: rgba(214, 181, 95, 0.55);
  --pv-ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --pv-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered entrance animations */
@keyframes pvFadeSlideUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pvGoldPulse {
  0%, 100% {
    box-shadow: 0 0 0 1px var(--pv-gold-bright), 0 0 8px rgba(255, 216, 117, 0.4);
  }
  50% {
    box-shadow: 0 0 0 2px var(--pv-gold-bright), 0 0 16px rgba(255, 216, 117, 0.7);
  }
}

/* --- 1. Top Bar & Left Sidebar (Chrome Preservation + Fine Tactile Polish) --- */
.site-header {
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.search-launch {
  position: relative;
  transition: border-color 0.2s var(--pv-ease-spring), box-shadow 0.2s var(--pv-ease-spring), transform 0.15s ease;
}

.search-launch:hover {
  border-color: var(--pv-gold-bright) !important;
  box-shadow: 0 0 14px var(--pv-gold-glow);
  transform: translateY(-1px);
}

.search-launch:active {
  transform: translateY(0);
}

.icon-btn {
  transition: transform 0.18s var(--pv-ease-spring), filter 0.18s ease, box-shadow 0.18s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.sb-list a {
  transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s var(--pv-ease-spring);
}

.sb-list a:hover {
  padding-left: 12px;
}

/* --- 2. Featured Builds Spotlight Hero (Parchment & Stone Integration) --- */
.spot {
  position: relative;
  overflow: hidden;
  border: 2px solid #8e6828;
  border-radius: 4px;
  background: #0a0f16;
  box-shadow: 0 0 0 1px rgba(255, 240, 195, 0.65), inset 0 1px 0 rgba(255, 238, 180, 0.4), inset 0 0 0 1px rgba(20, 12, 4, 0.7), 0 14px 36px rgba(45, 28, 10, 0.45);
  animation: pvFadeSlideUp 0.6s var(--pv-ease-spring) backwards;
}

.spot-hero {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.spot-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  background-position: center 22%;
  background-size: cover;
  background-repeat: no-repeat;
  transition: opacity 0.35s ease;
}

.spot-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pv-gold-bright);
  text-shadow: 0 1px 3px #000;
  margin-bottom: 6px;
}

.spot-eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pv-gold-bright);
  box-shadow: 0 0 6px var(--pv-gold-bright);
}

.spot-hero h2 {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  margin: 0 0 6px;
}

.spot-hero h2 a {
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.spot-hero h2 a:hover {
  color: var(--pv-gold-bright);
}

.spot-by {
  font-family: var(--serif, 'Source Serif 4', serif);
  font-size: 1rem;
  color: rgba(240, 230, 210, 0.9);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  margin: 0;
}

.spot-by b {
  color: var(--pv-gold-bright);
}

.spot-create {
  position: absolute;
  top: 24px;
  right: var(--inset, 24px);
  z-index: 3;
  transition: transform 0.15s var(--pv-ease-spring), filter 0.15s ease, box-shadow 0.15s ease;
}

.spot-create:hover {
  transform: translateY(-2px);
  filter: brightness(1.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 12px rgba(210, 60, 40, 0.5);
}

.spot-create:active {
  transform: translateY(1px);
  filter: brightness(0.95);
}

/* --- 3. Stone Ledge & Interactive Rail Selector --- */
.ledge {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 10px var(--inset, 24px);
  background: linear-gradient(180deg, rgba(22, 28, 38, 0.95) 0%, rgba(12, 16, 24, 0.98) 100%),
              url('/assets/img/chrome/wall-stone.png') center/cover;
  border-top: 1px solid var(--pv-stone-border);
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.2), inset 0 8px 18px -8px rgba(0, 0, 0, 0.9);
}

.rail {
  display: flex;
  gap: 6px;
}

.rail button {
  position: relative;
  padding: 0;
  border: 1px solid rgba(214, 181, 95, 0.35);
  border-radius: 2px;
  background: #000;
  cursor: pointer;
  line-height: 0;
  display: block;
  transition: transform 0.18s var(--pv-ease-spring), border-color 0.18s ease, box-shadow 0.18s ease;
}

.rail button img {
  width: 42px;
  height: 42px;
  display: block;
  transition: filter 0.18s ease;
}

.rail button:hover {
  transform: translateY(-2px) scale(1.05);
  border-color: var(--pv-gold-bright) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7), 0 0 10px var(--pv-gold-glow);
  z-index: 3;
}

.rail button:hover img {
  filter: brightness(1.15);
}

.rail button[aria-current="true"] {
  border-color: var(--pv-gold-bright) !important;
  animation: pvGoldPulse 2.4s infinite ease-in-out;
  transform: translateY(-1px);
}

.rail button[aria-current="true"]::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--pv-gold-bright);
}

/* Sockets for Spells & Items */
.spells,
.items,
.socket-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.spells img,
.items img,
.socket-row img,
.ability-icon,
.spell-icon {
  position: relative;
  width: 40px;
  height: 40px;
  background: #14100a;
  border: 1px solid rgba(214, 181, 95, 0.5);
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 236, 190, 0.15);
  cursor: pointer;
  transition: transform 0.15s var(--pv-ease-spring), border-color 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.spells img:hover,
.items img:hover,
.socket-row img:hover,
.ability-icon:hover,
.spell-icon:hover {
  transform: translateY(-2px) scale(1.1);
  border-color: var(--pv-gold-bright) !important;
  filter: brightness(1.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7), 0 0 10px var(--pv-gold-glow);
  z-index: 4;
}

.vote,
.btn {
  transition: transform 0.15s var(--pv-ease-spring), filter 0.15s ease, box-shadow 0.15s ease;
}

.vote:hover,
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 8px var(--pv-gold-glow);
}

.vote:active,
.btn:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.95);
}

/* --- 4. Controls & Instant Filter Bar --- */
.controls {
  position: relative;
  padding: 16px var(--inset, 24px) 18px;
  background: rgba(10, 15, 22, 0.75);
  border-top: 1px solid var(--pv-stone-border);
  border-bottom: 1px solid var(--pv-stone-border);
}

.controls input[type="search"],
.controls select,
.page-filter-input,
.page-filter-select,
.rp-filter-row input,
.rp-filter-row select,
.search-inputbar input,
input[type="search"],
input[type="text"]:not(.raw-input),
select {
  font-family: var(--sans, sans-serif);
  font-size: 0.88rem;
  background: rgba(4, 8, 13, 0.85);
  border: 1px solid rgba(214, 181, 95, 0.4);
  color: #fff;
  border-radius: 2px;
  padding: 8px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.controls input[type="search"]:focus,
.controls select:focus,
.page-filter-input:focus,
.page-filter-select:focus,
.rp-filter-row input:focus,
.rp-filter-row select:focus,
.search-inputbar input:focus,
input[type="search"]:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--pv-gold-bright) !important;
  box-shadow: 0 0 12px var(--pv-gold-glow) !important;
  outline: none;
}

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

.chips .chip {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(18, 24, 34, 0.9);
  border: 1px solid rgba(214, 181, 95, 0.35);
  color: var(--ink-2, #d5c8b2);
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s var(--pv-ease-spring), border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.chips .chip:hover {
  transform: translateY(-1px);
  border-color: var(--pv-gold-bright);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.chips .chip[aria-pressed="true"] {
  background: var(--pv-gold);
  border-color: var(--pv-gold-bright);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 8px var(--pv-gold-glow);
}

.sort button {
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* --- 5. Universal Parchment Folio & Typography --- */
.wrap,
.section,
.leaf,
.main-content {
  animation: pvFadeSlideUp 0.5s var(--pv-ease-spring) backwards;
}

/* --- Dark Illustrated Hero Mastheads (Tier List, Champions, Items, etc.) --- */
main > header.section,
main .wrap > header.section,
.hero,
.champ-hero {
  border-radius: 3px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(214, 181, 95, 0.3) !important;
}

main > header.section > h1,
main .wrap > header.section > h1,
.hero h1,
.champ-hero h1 {
  font-family: var(--font-display, 'Cinzel', serif) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 0, 0, 0.6) !important;
  letter-spacing: -0.015em !important;
}

main > header.section .eyebrow,
main .wrap > header.section .eyebrow,
.hero .eyebrow,
.champ-hero .eyebrow {
  color: var(--pv-gold-bright, #ffd875) !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9) !important;
}

main > header.section .lead,
main .wrap > header.section .lead,
.hero .lead,
.champ-hero .lead {
  color: #f0e6d2 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
  font-size: 1.02rem !important;
  line-height: 1.5 !important;
}

/* --- Light Parchment Folio Headers & Typography --- */
.planner-header h1,
.leaf h1,
.sheet-title,
.pl-head h2,
.pl-section h2,
section.section:not(header) h2,
section.section:not(header) h3,
.wrap > h2,
.wrap > h3 {
  font-family: var(--font-display, 'Cinzel', serif) !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  color: #3d140b !important;
  text-shadow: none !important;
}

body.archive-page .sheet-title,
h1.sheet-title {
  margin: 2px 0 16px;
  font-family: var(--font-display, 'Cinzel', 'Source Serif 4', Georgia, serif);
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #7d2b18 !important;
  text-shadow: none !important;
}

/* Breadcrumbs and Eyebrows on Parchment */
.crumbs {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: #7a5813 !important;
}

.crumbs a {
  color: #8c5b16 !important;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.crumbs a:hover {
  color: #3d140b !important;
  text-decoration: underline;
}

.crumbs .sep {
  color: rgba(140, 91, 22, 0.45);
  margin: 0 6px;
}

.planner-header .eyebrow,
.leaf .eyebrow,
.wrap > .eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8c5b16 !important;
  margin-bottom: 4px;
}

.planner-header .lead,
.leaf .lead,
.wrap > .lead {
  font-family: var(--serif, 'Source Serif 4', serif);
  font-size: 1.02rem;
  line-height: 1.5;
  color: #3d3222 !important;
}

/* --- 6. Champions Page Polish (/champions/) --- */
.champs-grid a,
.champ-card {
  position: relative;
  border: 1px solid rgba(214, 181, 95, 0.35);
  border-radius: 3px;
  background: #0d121a;
  overflow: hidden;
  transition: transform 0.2s var(--pv-ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
}

.champs-grid a:hover,
.champ-card:hover {
  transform: translateY(-2px);
  border-color: var(--pv-gold-bright) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), 0 0 12px var(--pv-gold-glow);
  z-index: 2;
}

.champs-grid a img,
.champ-card img {
  transition: transform 0.25s var(--pv-ease-spring), filter 0.25s ease;
}

.champs-grid a:hover img,
.champ-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* --- 7. Items Page Polish (/items/) --- */
.item-card,
.items-grid a,
.item-row {
  transition: transform 0.18s var(--pv-ease-spring), border-color 0.18s ease, box-shadow 0.18s ease;
}

.item-card:hover,
.items-grid a:hover {
  transform: translateY(-2px);
  border-color: var(--pv-gold-bright) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px var(--pv-gold-glow);
}

.item-card img,
.items-grid img {
  border: 1px solid rgba(214, 181, 95, 0.45);
  border-radius: 2px;
  transition: transform 0.15s var(--pv-ease-spring), border-color 0.15s ease;
}

.item-card:hover img,
.items-grid a:hover img {
  border-color: var(--pv-gold-bright);
  transform: scale(1.05);
}

/* --- 8. Runes Page Polish (/runes/) --- */
.rp-page {
  animation: pvFadeSlideUp 0.6s var(--pv-ease-spring) backwards;
}

.rp-slot {
  transition: transform 0.15s var(--pv-ease-spring), border-color 0.15s ease, box-shadow 0.15s ease;
}

.rp-slot:hover {
  transform: scale(1.08);
  border-color: var(--pv-gold-bright) !important;
  box-shadow: 0 0 10px var(--pv-gold-glow);
  z-index: 3;
}

/* --- 9. Masteries Page Polish (/masteries/) --- */
.masteries-container {
  animation: pvFadeSlideUp 0.6s var(--pv-ease-spring) backwards;
}

.mastery-tree-card {
  border: 1px solid var(--pv-gold-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 236, 190, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mastery-cell {
  transition: transform 0.15s var(--pv-ease-spring), filter 0.15s ease;
}

.mastery-cell:hover {
  transform: translateY(-2px) scale(1.06);
  z-index: 5;
}

.mastery-icon-wrap {
  border: 1px solid rgba(214, 181, 95, 0.5);
  border-radius: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mastery-cell:hover .mastery-icon-wrap {
  border-color: var(--pv-gold-bright) !important;
  box-shadow: 0 0 12px var(--pv-gold-glow), inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* --- 10. Parchment Ledger & Manuscript Tables --- */
table,
.leaf.builds-library table,
.stats-table,
.gold-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

table tbody tr {
  transition: background-color 0.15s ease;
}

table tbody tr:hover {
  background-color: rgba(200, 162, 78, 0.08) !important;
}

table tbody tr td img {
  border: 1px solid rgba(140, 110, 45, 0.45);
  border-radius: 2px;
  transition: transform 0.15s var(--pv-ease-spring), border-color 0.15s ease;
}

table tbody tr:hover td img {
  transform: scale(1.06);
  border-color: var(--pv-gold);
}

/* --- 10.1 Gold Efficiency & Ledger Tables --- */
.ge-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-block: 12px 24px;
  border: 1px solid rgba(138, 106, 30, 0.38);
  border-radius: 3px;
  background: rgba(255, 252, 245, 0.72);
  box-shadow: inset 0 1px 3px rgba(120, 90, 40, 0.05), 0 2px 6px rgba(60, 40, 15, 0.06);
}

.ge-table {
  width: 100%;
  min-width: 580px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  margin: 0;
  table-layout: auto;
}

.ge-table th {
  text-align: left;
  padding: 11px 14px;
  background: rgba(200, 162, 78, 0.15);
  border-bottom: 2px solid rgba(122, 96, 55, 0.42);
  font-family: var(--sans, sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #5c4428;
  white-space: nowrap;
  user-select: none;
}

.ge-table th[data-num] {
  text-align: right;
}

.ge-table[data-sortable] th {
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.ge-table[data-sortable] th:hover {
  color: #7d2b18;
  background: rgba(200, 162, 78, 0.25);
}

.ge-table tbody tr {
  border-bottom: 1px solid rgba(122, 96, 55, 0.16);
  transition: background-color 0.12s ease;
}

.ge-table tbody tr:nth-child(even) {
  background: rgba(146, 116, 64, 0.035);
}

.ge-table tbody tr:hover {
  background-color: rgba(200, 162, 78, 0.12) !important;
}

.ge-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(122, 96, 55, 0.16);
  color: #2c1a0e;
  vertical-align: middle;
  white-space: nowrap;
  font-size: 0.88rem;
}

.ge-table .ge-col-num,
.ge-table td[data-sort] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ge-table .ge-col-eff {
  font-weight: 700;
  color: #2c1a0e;
}

.ge-table .ge-col-stat,
.ge-table .ge-col-name {
  font-weight: 600;
  color: #2c1a0e;
  white-space: nowrap;
}

.ge-table .ge-col-how {
  white-space: nowrap;
  color: #7a6040;
  font-size: 0.84rem;
}

.ge-table .ge-col-desc {
  white-space: normal;
  min-width: 170px;
  max-width: 300px;
  color: #7a6040;
  font-size: 0.84rem;
  line-height: 1.35;
}

/* Item link with icon */
.ge-table td.ge-col-item {
  white-space: nowrap;
}

.ge-table td a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px;
  color: #2c1a0e;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.15s ease;
}

.ge-table td a:hover {
  color: #7d2b18;
}

.ge-table td a img,
.ge-table td img.icon-frame {
  display: inline-block !important;
  width: 22px !important;
  height: 22px !important;
  border: 1px solid rgba(140, 110, 45, 0.55) !important;
  border-radius: 2px;
  flex: none;
  margin: 0 !important;
  vertical-align: middle;
}

/* Smooth anchor offsets for sticky headers */
.has-page-jump :is(h2, section, [id]) {
  scroll-margin-top: 125px;
}

/* --- 11. Rich Floating Parchment Tooltip --- */
.pv-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  max-width: 320px;
  padding: 12px 14px;
  background: var(--pv-parchment) url('/assets/img/chrome/parchment-field.webp') center/cover;
  border: 1px solid var(--pv-gold);
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.15s ease, transform 0.15s var(--pv-ease-spring);
  font-family: var(--sans, sans-serif);
}

.pv-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pv-tooltip-title {
  font-family: var(--font-display, 'Cinzel', serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pv-ink-title);
  margin-bottom: 2px;
}

.pv-tooltip-cost {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pv-gold-dark);
  margin-bottom: 6px;
}

.pv-tooltip-body {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--pv-ink-body);
  border-top: 1px solid rgba(140, 110, 45, 0.25);
  padding-top: 6px;
}

/* Purge legacy embedded hovercards across planner and site */
.item-hovercard,
.pl-slot-card {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* --- 12. Runes Page & Planner Fluid Sizing --- */
.pl-runes {
  display: block !important;
  width: 100% !important;
  grid-template-columns: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.rp-page {
  display: grid !important;
  grid-template-columns: minmax(210px, 250px) 1fr minmax(180px, 220px) !important;
  gap: 12px !important;
  align-items: stretch !important;
  margin-top: 10px !important;
  margin-bottom: 20px !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  background: #fbf7ee linear-gradient(180deg, #fdfbf7 0%, #f7eedb 100%) !important;
  border: 1px solid rgba(138, 106, 30, 0.45) !important;
  border-radius: 4px !important;
  box-shadow: inset 0 0 20px rgba(120, 90, 40, 0.08), 0 8px 24px rgba(60, 40, 15, 0.12) !important;
  color: #382415 !important;
}

@media (max-width: 1060px) {
  .rp-page {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) !important;
  }
  .rp-stats-panel {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 720px) {
  .rp-page {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
    gap: 10px !important;
  }
}

.rp-rail,
.rp-stats-panel {
  display: flex !important;
  flex-direction: column !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(163, 130, 76, 0.4) !important;
  background: rgba(255, 252, 245, 0.85) !important;
  box-shadow: inset 0 1px 3px rgba(120, 90, 40, 0.05), 0 2px 6px rgba(60, 40, 15, 0.06) !important;
  color: #382415 !important;
  border-radius: 3px !important;
  min-width: 0 !important;
}

.rp-rail-head,
.rp-stats-head {
  margin-bottom: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  padding-bottom: 8px !important;
  border-bottom: 1px solid rgba(163, 130, 76, 0.35) !important;
  position: relative !important;
}

.rp-rail-eyebrow,
.rp-stats-eyebrow {
  margin: 0 !important;
  font-family: var(--font-display, 'Cinzel', serif) !important;
  font-size: 0.94rem !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #7a2b18 !important;
  font-weight: 700 !important;
}

.rp-count-badge {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: #5c3d1e !important;
  font-variant-numeric: tabular-nums !important;
  padding: 2px 10px !important;
  background: #f2e6cb !important;
  border: 1px solid #c4a259 !important;
  border-radius: 2px !important;
  box-shadow: inset 0 1px 2px rgba(100, 70, 20, 0.1) !important;
}

.rp-filter-row {
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin-top: 6px !important;
}

.rp-filter-row input[type="search"],
.rp-filter-row .page-filter-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 7px 10px !important;
  font-size: 0.84rem !important;
  background: #ffffff !important;
  border: 1px solid #c4a259 !important;
  color: #2c1a0e !important;
  border-radius: 2px !important;
  box-shadow: inset 0 1px 2px rgba(60, 40, 15, 0.06) !important;
}

.rp-filter-select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 6px 8px !important;
  font-size: 0.82rem !important;
  background: #ffffff !important;
  border: 1px solid #c4a259 !important;
  color: #382415 !important;
  border-radius: 2px !important;
}

.rp-inv-list {
  list-style: none !important;
  margin: 8px 0 0 0 !important;
  padding: 4px !important;
  flex: 1 1 auto !important;
  min-height: 280px !important;
  max-height: 380px !important;
  overflow-y: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  border: 1px solid rgba(163, 130, 76, 0.35) !important;
  background: #f7f1e4 !important;
  box-shadow: inset 0 1px 4px rgba(100, 70, 20, 0.1) !important;
  border-radius: 2px !important;
}

.rp-inv-row {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 8px !important;
  background: #fffdf8 !important;
  border: 1px solid rgba(163, 130, 76, 0.3) !important;
  transition: all 0.12s ease !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 2px rgba(60, 40, 15, 0.04) !important;
}

.rp-inv-row:hover {
  background: #ffffff !important;
  border-color: #8c6d37 !important;
  box-shadow: 0 2px 5px rgba(60, 40, 15, 0.1) !important;
}

.rp-inv-row.is-on {
  background: #fcf4e0 !important;
  border-color: #c4a259 !important;
  box-shadow: inset 0 0 6px rgba(196, 162, 89, 0.25) !important;
}

.rp-inv-row.rp-inv-mark { border-left: 3px solid #c0392b !important; }
.rp-inv-row.rp-inv-seal { border-left: 3px solid #d48806 !important; }
.rp-inv-row.rp-inv-glyph { border-left: 3px solid #1d7bbf !important; }
.rp-inv-row.rp-inv-quint { border-left: 3px solid #722ed1 !important; }

.rp-inv-pick {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  cursor: pointer !important;
  font: inherit !important;
  color: inherit !important;
  min-width: 0 !important;
}

.rp-inv-pick img {
  flex: none !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(163, 130, 76, 0.6) !important;
  background: #faf4e8 !important;
  box-shadow: 0 1px 3px rgba(60, 40, 15, 0.2) !important;
}

.rp-inv-text {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  min-width: 0 !important;
  flex: 1 !important;
}

.rp-inv-name {
  font-family: var(--font-display, 'Cinzel', serif) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: #382415 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.rp-inv-stat {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  color: #7a521e !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.rp-inv-held {
  flex: none !important;
  font: 700 0.75rem/1 var(--font-mono, monospace) !important;
  color: #ffffff !important;
  padding: 3px 6px !important;
  background: #7d2b18 !important;
  border: 1px solid #5a1c0e !important;
  border-radius: 2px !important;
  box-shadow: 0 1px 2px rgba(60, 40, 15, 0.2) !important;
}

.rp-inv-fill {
  flex: none !important;
  padding: 4px 8px !important;
  font: 700 0.68rem/1 var(--font-mono, monospace) !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  background: #f0e6ce !important;
  border: 1px solid #b89b65 !important;
  color: #5c3d1e !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
}

.rp-inv-fill:hover {
  background: #e4d4b2 !important;
  border-color: #8c6d37 !important;
  color: #382415 !important;
  box-shadow: 0 1px 3px rgba(60, 40, 15, 0.15) !important;
}

.rp-inv-none {
  padding: 24px 12px !important;
  text-align: center !important;
  font-size: 0.84rem !important;
  color: #7a6040 !important;
  font-style: italic !important;
}

/* ---------- CENTER BOARD & TABS ---------- */
.rp-board-wrap {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: rgba(255, 252, 245, 0.85) !important;
  border: 1px solid rgba(163, 130, 76, 0.4) !important;
  padding: 12px !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 3px rgba(120, 90, 40, 0.05), 0 2px 6px rgba(60, 40, 15, 0.06) !important;
}

.rp-tabs.pl-rune-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)) !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
}

.pl-rune-tab {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 7px 6px !important;
  background: #ede2c8 !important;
  border: 1px solid #c4a259 !important;
  color: #5c3d1e !important;
  font-family: var(--font-display, 'Cinzel', serif) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.03em !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  border-radius: 2px !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
}

.pl-rune-tab:hover {
  background: #f7eed7 !important;
  border-color: #8c6d37 !important;
  color: #382415 !important;
  box-shadow: 0 1px 4px rgba(60, 40, 15, 0.12) !important;
}

.pl-rune-tab[aria-pressed="true"] {
  background: #ffffff !important;
  color: #7a2b18 !important;
  border-color: #8c6d37 !important;
  box-shadow: 0 2px 6px rgba(100, 70, 20, 0.18), inset 0 2px 0 #7a2b18 !important;
}

.pl-rune-tab .pl-counter {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.72rem !important;
  padding: 1px 5px !important;
  background: #f0e4cc !important;
  border: 1px solid #c4a259 !important;
  border-radius: 2px !important;
  color: #5c3d1e !important;
}

.pl-rune-tab .pl-counter.is-full {
  background: #e8f5e9 !important;
  border-color: #81c784 !important;
  color: #2e7d32 !important;
}

.pl-rune-canvas-wrap {
  margin-bottom: 0 !important;
  max-width: 100% !important;
  position: relative !important;
  display: block !important;
}

.pl-rune-canvas {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 658 / 441 !important;
  background: #e8d7b3 url(/assets/img/runes/ui/runesbackground.png) center/cover no-repeat !important;
  border: 2px solid #a3824c !important;
  box-shadow: inset 0 0 15px rgba(80, 50, 20, 0.25), 0 3px 10px rgba(60, 40, 15, 0.15) !important;
  border-radius: 3px !important;
}

.pl-hex {
  position: absolute !important;
  width: 7.2% !important;
  height: 10.8% !important;
  transform: translate(-50%, -50%) !important;
  background: transparent no-repeat center/contain !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.12s ease, filter 0.12s ease !important;
  z-index: 2 !important;
}

.pl-hex--mark { background-image: url(/assets/img/runes/ui/target-red.png) !important; }
.pl-hex--seal { background-image: url(/assets/img/runes/ui/target-yellow.png) !important; }
.pl-hex--glyph { background-image: url(/assets/img/runes/ui/target-blue.png) !important; }
.pl-hex--quint {
  width: 11.2% !important;
  height: 16.8% !important;
  background-image: url(/assets/img/runes/ui/target-black.png) !important;
}

.pl-hex:hover {
  filter: brightness(1.2) drop-shadow(0 0 8px rgba(180, 140, 50, 0.8)) !important;
  transform: translate(-50%, -50%) scale(1.08) !important;
  z-index: 5 !important;
}

.pl-hex.is-off { opacity: 0.72 !important; }
.pl-hex.is-filled { opacity: 1 !important; }

.pl-hex img {
  width: 78% !important;
  height: 78% !important;
  object-fit: contain !important;
  border-radius: 50% !important;
  filter: drop-shadow(0 2px 4px rgba(60, 40, 15, 0.4)) !important;
}

.pl-hex--quint img {
  width: 82% !important;
  height: 82% !important;
}

/* ---------- STATISTICS PANEL ---------- */
.rp-stats-body {
  flex: 1 1 auto !important;
  min-height: 240px !important;
  max-height: 380px !important;
  overflow-y: auto !important;
  border: 1px solid rgba(163, 130, 76, 0.35) !important;
  background: #f7f1e4 !important;
  box-shadow: inset 0 1px 4px rgba(100, 70, 20, 0.1) !important;
  padding: 10px 14px !important;
  border-radius: 2px !important;
}

.rp-stats-list {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.rp-stat {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 5px 0 !important;
  border-bottom: 1px solid rgba(163, 130, 76, 0.25) !important;
}

.rp-stat dt {
  color: #5c3d1e !important;
  font-weight: 500 !important;
  font-size: 0.82rem !important;
}

.rp-stat dd {
  margin: 0 !important;
  font-family: var(--font-mono, monospace) !important;
  font-weight: 700 !important;
  color: #7d2b18 !important;
  font-size: 0.82rem !important;
}

.rp-stats-empty {
  padding: 16px 8px !important;
  text-align: center !important;
  font-size: 0.84rem !important;
  color: #7a6040 !important;
  font-style: italic !important;
}

.rp-actions {
  margin-top: 10px !important;
  display: flex !important;
  gap: 8px !important;
}

/* --- 13. Planner Item Popover Modal Styling --- */
.pl-item-popover {
  position: absolute !important;
  z-index: 1000 !important;
  width: min(460px, calc(100% - 16px)) !important;
  padding: 12px 14px !important;
  background: radial-gradient(ellipse at top, #231b14 0%, #130f0b 90%) !important;
  border: 1px solid var(--pv-gold) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(230, 198, 116, 0.3) !important;
  border-radius: 4px !important;
  box-sizing: border-box !important;
}

.pl-item-popover[hidden] {
  display: none !important;
}

.pl-item-popover-search .pl-item-search {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #0a0705 !important;
  border: 1px solid rgba(196, 162, 89, 0.4) !important;
  color: #fdfbf7 !important;
  padding: 8px 12px !important;
  border-radius: 2px !important;
  font-family: var(--sans, sans-serif) !important;
  font-size: 0.85rem !important;
}

.pl-item-popover-search .pl-item-search:focus {
  border-color: var(--pv-gold-bright) !important;
  outline: 1px solid var(--pv-gold) !important;
}

.pl-item-popover-scroll {
  max-height: 280px !important;
  overflow-y: auto !important;
  margin: 8px 0 !important;
  padding-right: 4px !important;
}

.pl-item-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 6px !important;
}

.pl-item-cell {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 5px 8px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(196, 162, 89, 0.25) !important;
  border-radius: 2px !important;
  color: #f0e6d2 !important;
  cursor: pointer !important;
  text-align: left !important;
  transition: all 0.12s ease !important;
}

.pl-item-cell:hover,
.pl-item-cell:focus {
  background: rgba(196, 162, 89, 0.18) !important;
  border-color: var(--pv-gold-bright) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

.pl-item-cell img {
  width: 32px !important;
  height: 32px !important;
  border-radius: 2px !important;
  border: 1px solid rgba(196, 162, 89, 0.5) !important;
  flex: none !important;
}

.pl-cell-name {
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.pl-cell-gold {
  font-family: var(--font-mono, monospace) !important;
  font-size: 0.72rem !important;
  color: var(--pv-gold-bright) !important;
  font-weight: 700 !important;
  flex: none !important;
}
