/* ==============================================================
   Eryndor Resources — Final Dark Archive Design
   Shares the visual language of the final Lore page.
   All page-specific classes are prefixed with rf-.
   ============================================================== */

.rf-page {
  --rf-bg: #031011;
  --rf-panel: #071b1b;
  --rf-panel-deep: #020909;
  --rf-panel-soft: #0b2422;
  --rf-line: rgba(183, 136, 57, .40);
  --rf-line-soft: rgba(183, 136, 57, .17);
  --rf-gold: #b7883c;
  --rf-gold-light: #dfbf78;
  --rf-text: #d0c2a7;
  --rf-muted: #9c907c;
  --rf-link: #9dbf7a;

  min-height: 100vh;
  color: var(--rf-text);
  background:
    radial-gradient(circle at 52% 0, rgba(183,136,57,.04), transparent 24%),
    linear-gradient(90deg, #02090a, #061415 48%, #02090a);
}

.rf-hero {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-bottom: 1px solid var(--rf-line);
  background: linear-gradient(110deg, #061416, #112421 55%, #030a0b);
}

.rf-hero--image {
  background-image:
    linear-gradient(90deg, rgba(3,10,11,.96) 0%, rgba(3,10,11,.80) 29%, rgba(3,10,11,.18) 65%, rgba(3,10,11,.48) 100%),
    var(--rf-hero-image);
  background-size: cover, cover;
  background-position: center, center;
}

.rf-hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.01), transparent 48%, rgba(0,0,0,.43)),
    repeating-linear-gradient(90deg, rgba(183,136,57,.025) 0 1px, transparent 1px 130px);
  mask-image: linear-gradient(90deg, transparent, rgba(0,0,0,.42), transparent);
}

.rf-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 36px;
  padding-bottom: 40px;
}

.rf-hero__breadcrumbs {
  display: flex;
  gap: 9px;
  margin-bottom: 15px;
  color: #a79472;
  font-size: 11px;
}

.rf-hero__breadcrumbs a {
  color: #b8a47c;
}

.rf-kicker,
.rf-entry-kicker {
  margin: 0 0 10px;
  color: var(--rf-gold-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.rf-hero h1,
.rf-entry-hero h1 {
  margin: 0;
  color: #f0e3c9;
  font-weight: 400;
  text-shadow: 0 6px 24px rgba(0,0,0,.82);
}

.rf-hero h1 {
  font-size: clamp(60px, 8vw, 96px);
  line-height: .95;
}

.rf-hero__summary {
  max-width: 435px;
  margin: 14px 0 0;
  color: #c6baa3;
  font-size: 15px;
  line-height: 1.55;
}

.rf-hero blockquote {
  max-width: 410px;
  margin: 13px 0 0;
  color: #d1ac66;
  font-size: 14px;
  font-style: italic;
  line-height: 1.55;
}

.rf-hero__ornament {
  display: inline-block;
  margin-top: 7px;
  color: var(--rf-gold);
}

.rf-mobile-toggle {
  display: none;
}

.rf-layout {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr) 205px;
  gap: 22px;
  align-items: start;
  padding-top: 19px;
  padding-bottom: 70px;
}

.rf-sidebar,
.rf-right-rail,
.rf-entry-sidebar,
.rf-entry-rail {
  position: sticky;
  top: 108px;
}

.rf-sidebar {
  display: grid;
  gap: 18px;
}

.rf-sidebar__nav {
  border-right: 1px solid var(--rf-line-soft);
}

.rf-sidebar__nav h2 {
  margin: 0;
  padding: 8px 7px 16px;
  color: var(--rf-gold-light);
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.rf-sidebar__nav nav {
  display: grid;
}

.rf-sidebar__nav a {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 13px 8px;
  border-top: 1px solid var(--rf-line-soft);
  color: #b5a88e;
  font-size: 11px;
}

.rf-sidebar__nav a:last-child {
  border-bottom: 1px solid var(--rf-line-soft);
}

.rf-sidebar__nav a > span {
  color: var(--rf-gold);
  text-align: center;
}

.rf-sidebar__nav a b {
  font-weight: 400;
}

.rf-sidebar__nav a:hover,
.rf-sidebar__nav a.is-active {
  color: var(--rf-gold-light);
  background: linear-gradient(90deg, rgba(183,136,57,.15), transparent);
}

.rf-sidebar__nav a.is-active::before {
  content: "";
  position: absolute;
  inset: 4px -4px;
  border: 1px solid rgba(221,185,111,.54);
  clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%);
}

.rf-archivist-note {
  position: relative;
  padding: 18px 13px;
  border: 1px solid var(--rf-line);
  background:
    radial-gradient(circle at 50% 100%, rgba(183,136,57,.08), transparent 34%),
    rgba(3,13,14,.88);
  text-align: center;
}

.rf-archivist-note::after,
.rf-panel::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(183,136,57,.10);
  pointer-events: none;
}

.rf-archivist-note > * {
  position: relative;
  z-index: 1;
}

.rf-archivist-note__icon {
  color: var(--rf-gold-light);
  font-size: 30px;
}

.rf-archivist-note h2 {
  margin: 7px 0 10px;
  color: var(--rf-gold-light);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.rf-archivist-note p {
  margin: 0;
  color: #a4967e;
  font-size: 11px;
  line-height: 1.65;
}

.rf-archivist-note > span:last-child {
  display: block;
  margin-top: 12px;
  color: var(--rf-gold);
}

.rf-main {
  min-width: 0;
}

.rf-section {
  scroll-margin-top: 120px;
  padding: 0 0 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rf-line-soft);
}

.rf-section:last-child {
  margin-bottom: 0;
}

.rf-section-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.rf-section-heading__sigil {
  color: var(--rf-gold);
  font-size: 16px;
}

.rf-section-heading__number {
  color: #dbbf81;
  font-size: 20px;
}

.rf-section-heading h2 {
  margin: 0;
  color: #dfc68d;
  font-size: clamp(21px, 2.7vw, 29px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.rf-card-grid {
  display: grid;
  gap: 8px;
}

.rf-card-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rf-card-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rf-card-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rf-card {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border: 1px solid rgba(183,136,57,.28);
  color: var(--rf-text);
  background:
    radial-gradient(circle at 50% 0, rgba(183,136,57,.08), transparent 34%),
    linear-gradient(180deg, rgba(10,29,29,.90), rgba(3,12,13,.94));
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.rf-card::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(183,136,57,.08);
  pointer-events: none;
}

.rf-card:hover {
  transform: translateY(-3px);
  border-color: var(--rf-gold-light);
  background:
    radial-gradient(circle at 50% 0, rgba(183,136,57,.12), transparent 34%),
    linear-gradient(180deg, rgba(15,38,36,.94), rgba(4,14,15,.96));
}

.rf-card__inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 154px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 13px 10px;
  text-align: center;
}

.rf-card__icon {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  margin-bottom: 9px;
  border: 1px solid rgba(183,136,57,.44);
  border-radius: 50%;
  color: var(--rf-gold-light);
  background: radial-gradient(circle, rgba(183,136,57,.12), rgba(3,10,11,.22));
  font-size: 21px;
}

.rf-card__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rf-card__copy strong {
  color: #dfc78f;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.1;
}

.rf-card__copy small {
  margin-top: 7px;
  color: #8f8573;
  font-size: 9px;
  line-height: 1.4;
}

.rf-card__copy em {
  margin-top: 8px;
  color: var(--rf-link);
  font-size: 9px;
  font-style: normal;
}

.rf-card--compact {
  min-height: 127px;
}

.rf-card--compact .rf-card__inner {
  min-height: 127px;
  padding: 10px 7px;
}

.rf-card--compact .rf-card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 7px;
  font-size: 18px;
}

.rf-card--compact .rf-card__copy strong {
  font-size: 10px;
}

.rf-card--compact .rf-card__copy small {
  font-size: 8px;
}

.rf-card--wide {
  min-height: 77px;
  margin-top: 8px;
}

.rf-card--wide .rf-card__inner {
  display: grid;
  grid-template-columns: 54px 1fr;
  min-height: 77px;
  gap: 12px;
  padding: 11px 15px;
  text-align: left;
}

.rf-card--wide .rf-card__icon {
  margin: 0;
}

.rf-card--image {
  min-height: 196px;
}

.rf-card__image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(3,10,11,.02), rgba(3,10,11,.18) 35%, rgba(3,10,11,.96) 76%),
    var(--rf-card-image);
  background-size: cover, cover;
  background-position: center;
  transition: transform .28s ease, filter .28s ease;
}

.rf-card--image:hover .rf-card__image {
  transform: scale(1.035);
  filter: brightness(1.08);
}

.rf-card--image .rf-card__inner {
  min-height: 196px;
  justify-content: end;
  align-items: start;
  padding: 90px 12px 13px;
  text-align: left;
}

.rf-card--image .rf-card__icon {
  display: none;
}

.rf-card--restricted {
  filter: saturate(.82);
}

.rf-card__lock {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  font-size: 10px;
}

.rf-restricted-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rf-restricted-heading .rf-section-heading {
  flex: 1;
}

.rf-restricted-heading > span {
  margin-bottom: 10px;
  color: #b69453;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .10em;
}

.rf-restricted-note {
  margin: 7px 0 0;
  padding: 7px 9px;
  border: 1px solid var(--rf-line-soft);
  color: #b59a67;
  background: rgba(183,136,57,.035);
  text-align: center;
  font-size: 9px;
}

.rf-external-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.rf-external-list a {
  display: grid;
  grid-template-columns: 24px 1fr 13px;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(183,136,57,.27);
  color: #b7aa91;
  background: rgba(8,24,24,.70);
}

.rf-external-list a:hover {
  border-color: var(--rf-gold-light);
}

.rf-external-list a > span:first-child {
  color: var(--rf-gold);
  text-align: center;
}

.rf-external-list strong,
.rf-external-list small {
  display: block;
}

.rf-external-list strong {
  color: #d5bf88;
  font-size: 9px;
  font-weight: 400;
}

.rf-external-list small {
  margin-top: 2px;
  color: #7f7565;
  font-size: 7px;
}

.rf-right-rail {
  display: grid;
  gap: 12px;
}

.rf-panel {
  position: relative;
  overflow: hidden;
  padding: 11px;
  border: 1px solid var(--rf-line);
  background:
    radial-gradient(circle at 50% 0, rgba(183,136,57,.06), transparent 32%),
    linear-gradient(180deg, rgba(10,28,28,.95), rgba(3,12,13,.98));
}

.rf-panel > * {
  position: relative;
  z-index: 1;
}

.rf-panel h2 {
  margin: 0;
  padding: 4px 0 9px;
  border-bottom: 1px solid var(--rf-line-soft);
  color: #d8be84;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.rf-fact-list article,
.rf-access-list article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 1px;
  border-top: 1px solid var(--rf-line-soft);
}

.rf-fact-list article:first-child,
.rf-access-list article:first-child {
  border-top: 0;
}

.rf-fact-list article > span,
.rf-access-list article > span {
  display: grid;
  place-items: center;
  color: var(--rf-gold);
  font-size: 20px;
}

.rf-fact-list small,
.rf-access-list small {
  display: block;
  color: #a17f43;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.rf-fact-list p,
.rf-access-list p {
  margin: 3px 0 0;
  color: #b8aa90;
  font-size: 10px;
  line-height: 1.35;
}

.rf-quick-access,
.rf-explore {
  display: grid;
}

.rf-quick-access a,
.rf-explore a {
  display: grid;
  grid-template-columns: 24px 1fr 13px;
  gap: 6px;
  align-items: center;
  padding: 8px 2px;
  border-top: 1px solid var(--rf-line-soft);
  color: #b3a58c;
  font-size: 10px;
}

.rf-quick-access a:first-child,
.rf-explore a:first-child {
  border-top: 0;
}

.rf-quick-access a > span,
.rf-explore a > span {
  color: var(--rf-gold);
}

.rf-quick-access a b,
.rf-explore a b {
  font-weight: 400;
}

.rf-quick-access a i,
.rf-explore a i {
  font-style: normal;
}

.rf-compass {
  display: block;
  margin-top: 8px;
  color: rgba(183,136,57,.30);
  font-size: 52px;
  text-align: center;
}

/* Entry pages */

.rf-entry-hero {
  position: relative;
  min-height: 275px;
  overflow: hidden;
  border-bottom: 1px solid var(--rf-line);
  background-image:
    linear-gradient(90deg, rgba(3,10,11,.96), rgba(3,10,11,.69), rgba(3,10,11,.79)),
    var(--rf-entry-hero);
  background-size: cover, cover;
  background-position: center, center;
}

.rf-entry-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 42px;
  padding-bottom: 38px;
}

.rf-entry-back {
  display: inline-block;
  margin-bottom: 29px;
  color: #a99470;
  font-size: 11px;
}

.rf-entry-hero h1 {
  max-width: 850px;
  font-size: clamp(43px, 6vw, 70px);
  line-height: 1;
}

.rf-entry-hero p:not(.rf-entry-kicker) {
  max-width: 680px;
  margin: 15px 0 0;
  color: #c5b8a1;
  font-size: 16px;
  line-height: 1.55;
}

.rf-restricted-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 9px;
  border: 1px solid var(--rf-line);
  color: #d1aa61;
  background: rgba(3,10,11,.64);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .10em;
}

.rf-entry-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 210px;
  gap: 26px;
  align-items: start;
  padding-top: 31px;
  padding-bottom: 74px;
}

.rf-entry-nav > div {
  display: grid;
  margin-top: 9px;
}

.rf-entry-nav > div:first-child {
  margin-top: 0;
}

.rf-entry-nav > div > strong {
  padding: 7px 2px;
  color: #a98444;
  font-size: 8px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.rf-entry-nav a {
  padding: 7px 3px;
  color: #908573;
  font-size: 9px;
  line-height: 1.35;
}

.rf-entry-nav a:hover,
.rf-entry-nav a.is-active {
  color: var(--rf-gold-light);
}

.rf-archivist-note--entry {
  margin-top: 13px;
}

.rf-entry-content {
  min-width: 0;
  padding: 26px 30px 34px;
  border: 1px solid rgba(183,136,57,.23);
  background:
    radial-gradient(circle at 50% 0, rgba(183,136,57,.045), transparent 27%),
    rgba(6,18,19,.78);
  box-shadow: 0 14px 35px rgba(0,0,0,.30);
}

.rf-entry-content > :first-child {
  margin-top: 0;
}

.rf-entry-content h2 {
  margin: 1.9em 0 .55em;
  padding-bottom: .28em;
  border-bottom: 1px solid var(--rf-line-soft);
  color: #d9bd80;
  font-size: 28px;
  font-weight: 400;
}

.rf-entry-content h3 {
  color: #c8ad73;
  font-size: 20px;
  font-weight: 400;
}

.rf-entry-content p,
.rf-entry-content li {
  color: #b8ac99;
  font-size: 15px;
  line-height: 1.75;
}

.rf-entry-content strong {
  color: #dfc995;
}

.rf-entry-content blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--rf-gold);
  background: rgba(183,136,57,.06);
  color: #cdb47e;
  font-style: italic;
}

.rf-entry-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.rf-entry-content th,
.rf-entry-content td {
  padding: 10px 11px;
  border: 1px solid var(--rf-line-soft);
  text-align: left;
}

.rf-entry-content th {
  color: #d6bb80;
  background: rgba(183,136,57,.07);
}

.rf-entry-facts {
  margin: 0;
}

.rf-entry-facts > div {
  padding: 9px 2px;
  border-top: 1px solid var(--rf-line-soft);
}

.rf-entry-facts > div:first-child {
  border-top: 0;
}

.rf-entry-facts dt {
  color: #a98444;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.rf-entry-facts dd {
  margin: 4px 0 0;
  color: #b9ab91;
  font-size: 10px;
  line-height: 1.4;
}

.rf-related {
  display: grid;
}

.rf-related a {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  padding: 8px 2px;
  border-top: 1px solid var(--rf-line-soft);
  color: #9e9482;
  font-size: 10px;
}

.rf-related a:first-child {
  border-top: 0;
}

.rf-related a:hover {
  color: var(--rf-gold-light);
}

.rf-child-pages {
  margin-top: 38px;
}

.rf-child-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rf-child-grid a {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 7px 10px;
  padding: 13px;
  border: 1px solid rgba(183,136,57,.22);
  color: #afa18a;
  background: rgba(7,22,22,.78);
}

.rf-child-grid a > span {
  grid-row: 1 / 4;
  color: var(--rf-gold);
  font-size: 23px;
}

.rf-child-grid a strong {
  color: #d7bf88;
  font-size: 12px;
  font-weight: 400;
}

.rf-child-grid a p {
  margin: 0;
  font-size: 9px;
  line-height: 1.4;
}

.rf-child-grid a em {
  color: var(--rf-link);
  font-size: 9px;
  font-style: normal;
}

/* Combat tracker */

.rf-combat-page {
  padding-top: 32px;
  padding-bottom: 74px;
}

.rf-combat {
  border: 1px solid var(--rf-line);
  background:
    radial-gradient(circle at 50% 0, rgba(183,136,57,.06), transparent 30%),
    linear-gradient(145deg, rgba(9,25,27,.98), rgba(3,10,11,.99));
  box-shadow: 0 18px 44px rgba(0,0,0,.42);
}

.rf-combat__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid var(--rf-line-soft);
}

.rf-combat__header h2 {
  margin: 0;
  color: #dcc184;
  font-size: 30px;
  font-weight: 400;
}

.rf-combat__header p:not(.rf-kicker) {
  margin: 6px 0 0;
  color: #8f8473;
  font-size: 11px;
}

.rf-combat__round {
  display: grid;
  place-items: center;
  min-width: 84px;
  min-height: 74px;
  border: 1px solid var(--rf-line);
  background: rgba(183,136,57,.05);
}

.rf-combat__round small {
  color: #a6874d;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.rf-combat__round strong {
  color: #f0d699;
  font-size: 32px;
  font-weight: 400;
}

.rf-combat-form {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(80px, .75fr)) auto;
  gap: 8px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--rf-line-soft);
}

.rf-combat-form label,
.rf-combat-row label {
  display: grid;
  gap: 5px;
}

.rf-combat-form label > span,
.rf-combat-row label > span {
  color: #a8864a;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.rf-combat-form input,
.rf-combat-form select,
.rf-combat-row input {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(183,136,57,.27);
  color: #e1d4bd;
  background: rgba(2,8,9,.80);
  font: inherit;
}

.rf-combat-form button,
.rf-combat-controls button {
  padding: 8px 12px;
  border: 1px solid rgba(183,136,57,.45);
  color: #ead29a;
  background: rgba(183,136,57,.10);
  font: inherit;
  cursor: pointer;
}

.rf-combat-form button:hover,
.rf-combat-controls button:hover {
  border-color: var(--rf-gold-light);
  background: rgba(183,136,57,.17);
}

.rf-combat-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 19px;
  border-bottom: 1px solid var(--rf-line-soft);
}

.rf-danger-button {
  margin-left: auto;
  color: #d9a492 !important;
  border-color: rgba(157,76,55,.55) !important;
}

.rf-combat-empty {
  padding: 48px 20px;
  color: #827766;
  text-align: center;
}

.rf-combat-empty[hidden] {
  display: none;
}

.rf-combat-empty span {
  color: rgba(183,136,57,.44);
  font-size: 52px;
}

.rf-combat-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 14px 17px 19px;
  list-style: none;
  counter-reset: rf-order;
}

.rf-combat-row {
  counter-increment: rf-order;
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(130px, 1.4fr) 66px 58px 68px minmax(155px, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(183,136,57,.22);
  background: rgba(5,17,19,.82);
}

.rf-combat-row::before {
  content: counter(rf-order);
  position: absolute;
  top: -7px;
  left: -7px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(183,136,57,.38);
  color: #bea263;
  background: #061214;
  font-size: 8px;
}

.rf-combat-row.is-active {
  border-color: var(--rf-gold-light);
  background: linear-gradient(90deg, rgba(183,136,57,.15), rgba(5,17,19,.90) 30%);
  box-shadow: 0 0 22px rgba(183,136,57,.11);
}

.rf-combat-row__turn {
  color: transparent;
  text-align: center;
}

.rf-combat-row.is-active .rf-combat-row__turn {
  color: var(--rf-gold-light);
}

.rf-combat-row__identity {
  display: grid;
  gap: 3px;
}

.rf-combat-row__identity strong {
  color: #e1ca94;
  font-size: 12px;
  font-weight: 400;
}

.rf-combat-row__identity small {
  color: #7e7464;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.rf-combat-row[data-type="player"] .rf-combat-row__identity strong {
  color: #b9d2a1;
}

.rf-combat-row[data-type="enemy"] .rf-combat-row__identity strong {
  color: #d3a18f;
}

.rf-combat-row__buttons {
  display: flex;
  gap: 4px;
}

.rf-combat-row__buttons button {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid rgba(183,136,57,.25);
  color: #a89572;
  background: rgba(183,136,57,.04);
  cursor: pointer;
}

.rf-tool-help {
  margin-top: 27px;
  padding: 24px 28px;
  border: 1px solid var(--rf-line-soft);
  background: rgba(5,17,19,.72);
}

.rf-tool-help h2 {
  color: #d4b977;
  font-weight: 400;
}

.rf-tool-help p,
.rf-tool-help li {
  color: #aca18f;
  line-height: 1.7;
}

.rf-tool-warning {
  padding: 11px;
  border: 1px solid rgba(157,76,55,.45);
  color: #d5aa9b;
  background: rgba(157,76,55,.08);
}

/* Responsive */

@media (max-width: 1160px) {
  .rf-layout {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .rf-right-rail {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rf-entry-layout {
    grid-template-columns: 175px minmax(0, 1fr);
  }

  .rf-entry-rail {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .rf-card-grid--five,
  .rf-external-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rf-combat-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rf-combat-form button {
    align-self: end;
  }

  .rf-combat-row {
    grid-template-columns: 24px minmax(130px, 1.2fr) 60px 54px 64px minmax(130px, 1fr);
  }

  .rf-combat-row__buttons {
    grid-column: 2 / -1;
    justify-content: end;
  }
}

@media (max-width: 900px) {
  .rf-mobile-toggle {
    position: sticky;
    top: 88px;
    z-index: 25;
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 10px 4vw;
    border: 0;
    border-bottom: 1px solid var(--rf-line);
    color: #dbc28a;
    background: rgba(3,12,13,.97);
    font: inherit;
  }

  .rf-layout,
  .rf-entry-layout {
    grid-template-columns: 1fr;
  }

  .rf-sidebar {
    display: none;
    position: sticky;
    top: 138px;
    z-index: 20;
    padding: 12px;
    border: 1px solid var(--rf-line);
    background: #061617;
  }

  .rf-sidebar.is-open {
    display: grid;
  }

  .rf-entry-sidebar {
    display: none;
  }

  .rf-right-rail,
  .rf-entry-rail {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rf-card-grid--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rf-restricted-heading {
    display: block;
  }

  .rf-combat-row {
    grid-template-columns: 24px minmax(120px, 1fr) 58px 58px 58px;
  }

  .rf-combat-row__note {
    grid-column: 2 / -1;
  }
}

@media (max-width: 640px) {
  .rf-hero {
    min-height: 315px;
  }

  .rf-card-grid--two,
  .rf-card-grid--four,
  .rf-card-grid--five,
  .rf-external-list,
  .rf-right-rail,
  .rf-entry-rail,
  .rf-child-grid {
    grid-template-columns: 1fr;
  }

  .rf-card--wide .rf-card__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .rf-card--wide .rf-card__icon {
    margin: 0 auto;
  }

  .rf-entry-content {
    padding: 22px 18px 29px;
  }

  .rf-combat__header {
    align-items: flex-start;
  }

  .rf-combat-form {
    grid-template-columns: 1fr 1fr;
  }

  .rf-combat-form label:first-child {
    grid-column: 1 / -1;
  }

  .rf-combat-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .rf-danger-button {
    margin-left: 0;
  }

  .rf-combat-row {
    grid-template-columns: 20px minmax(100px, 1fr) 55px 55px;
  }

  .rf-combat-row__note {
    grid-column: 2 / -1;
  }

  .rf-combat-row__buttons {
    grid-column: 2 / -1;
  }
}
/* =========================================================
   Shared Combat Tracker Status
   ========================================================= */

.rf-combat-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;

  border: 1px solid rgba(184, 138, 61, 0.28);

  background:
    rgba(3, 8, 10, 0.4);
}

.rf-combat-mode {
  color: var(--gold-light, #e0bc71);

  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rf-combat-sync-status {
  color: var(--muted, #9f927c);

  font-size: 0.8rem;
}

.rf-combat-sync-status[data-status-type="success"] {
  color: #a9c79b;
}

.rf-combat-sync-status[data-status-type="loading"] {
  color: #d5bc7b;
}

.rf-combat-sync-status[data-status-type="error"] {
  color: #d58b82;
}


/* Player mode is read-only. */

.rf-combat.is-player-mode
.rf-combat-row input:disabled {
  cursor: default;

  opacity: 1;

  color: inherit;

  background:
    rgba(0, 0, 0, 0.12);

  border-color:
    rgba(184, 138, 61, 0.14);
}


/* Hide empty action containers in player view. */

.rf-combat.is-player-mode
.rf-combat-row__buttons {
  display: none;
}


/* DM mode indicator. */

.rf-combat.is-dm-mode
.rf-combat-mode::before {
  content: "◆";
  margin-right: 0.45rem;

  color: var(--gold, #b88a3d);
}

@media (max-width: 600px) {
  .rf-combat-sync-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }
}

.rf-card {
    min-height: 155px;

    border: 1px solid rgba(196, 155, 65, 0.35);

    background-size: cover;
    background-position: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.rf-card::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(3, 17, 14, 0.66),
            rgba(3, 15, 13, 0.93)
        );

    z-index: 0;
}

.rf-card:hover {
    transform: translateY(-2px);
    border-color: rgba(221, 181, 84, 0.75);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.35),
        inset 0 0 20px rgba(190, 145, 55, 0.04);
}

.rf-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}