/* Fate of the Fellowship rulebook redesign: pale parchment, dark ink, and sparse runes. */
html:has(body.page-fate-of-the-fellowship),
body.page-fate-of-the-fellowship {
  --fate-ink: #25190f;
  --fate-ink-soft: #4a321f;
  --fate-green: #26351f;
  --fate-green-soft: #51643c;
  --fate-paper: #efe0b7;
  --fate-paper-light: #f8efd8;
  --fate-paper-deep: #d4b56f;
  --fate-rule: #5f4124;
  --fate-gold: #c79a45;
  --fate-rust: #8e2f24;
  --fate-shadow: rgba(21, 12, 6, 0.58);
  background:
    radial-gradient(circle at 14% 18%, rgba(199, 154, 69, 0.1), transparent 20rem),
    radial-gradient(circle at 86% 8%, rgba(41, 76, 81, 0.34), transparent 24rem),
    linear-gradient(180deg, #07110e 0%, #09131a 48%, #020604 100%);
  color: var(--fate-ink);
  scrollbar-color: rgba(199, 154, 69, 0.82) rgba(7, 19, 7, 0.94);
  scrollbar-width: thin;
}

html:has(body.page-fate-of-the-fellowship)::-webkit-scrollbar,
body.page-fate-of-the-fellowship::-webkit-scrollbar {
  width: 10px;
}

html:has(body.page-fate-of-the-fellowship)::-webkit-scrollbar-track,
body.page-fate-of-the-fellowship::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(7, 17, 14, 0.98), rgba(9, 19, 26, 0.96));
  box-shadow: inset 0 0 0 1px rgba(199, 154, 69, 0.16);
}

html:has(body.page-fate-of-the-fellowship)::-webkit-scrollbar-thumb,
body.page-fate-of-the-fellowship::-webkit-scrollbar-thumb {
  border: 1px solid rgba(47, 33, 20, 0.92);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(232, 211, 153, 0.9), rgba(199, 154, 69, 0.86));
  box-shadow:
    0 0 10px rgba(199, 154, 69, 0.14),
    inset 0 0 0 1px rgba(255, 248, 224, 0.32);
}

html:has(body.page-fate-of-the-fellowship)::-webkit-scrollbar-thumb:hover,
body.page-fate-of-the-fellowship::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(248, 239, 216, 0.95), rgba(212, 181, 111, 0.92));
}

body.page-fate-of-the-fellowship .site-header,
body.page-fate-of-the-fellowship .site-footer {
  display: none;
}

body.page-fate-of-the-fellowship .fate-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: clamp(1rem, 3vw, 2.5rem) 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(248, 239, 216, 0.06), transparent 42rem),
    linear-gradient(180deg, rgba(41, 76, 81, 0.2), rgba(7, 17, 14, 0.18) 24rem, transparent 48rem);
}

body.page-fate-of-the-fellowship .fate-page .container {
  width: min(1280px, calc(100vw - 1.5rem));
  max-width: none;
}

body.page-fate-of-the-fellowship .fate-ledger {
  position: relative;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1rem, 2vw, 1.75rem) clamp(0.8rem, 2vw, 1.5rem);
  overflow: hidden;
  border: 2px solid #2f2114;
  border-radius: 3px;
  background:
    radial-gradient(circle at 16% 24%, rgba(255, 248, 224, 0.78), transparent 16rem),
    radial-gradient(circle at 85% 12%, rgba(212, 181, 111, 0.28), transparent 18rem),
    linear-gradient(180deg, rgba(248, 239, 216, 0.98), rgba(226, 204, 151, 0.94));
  box-shadow:
    0 34px 90px var(--fate-shadow),
    inset 0 0 0 8px rgba(95, 65, 36, 0.18),
    inset 0 0 0 10px rgba(255, 248, 224, 0.36);
}

body.page-fate-of-the-fellowship .fate-ledger::before,
body.page-fate-of-the-fellowship .fate-ledger::after {
  display: none;
}

body.page-fate-of-the-fellowship .fate-rulebook-hero,
body.page-fate-of-the-fellowship .fate-section {
  position: relative;
  z-index: 1;
}

body.page-fate-of-the-fellowship .fate-rulebook-hero {
  display: grid;
  justify-items: center;
  min-height: clamp(22rem, 34vw, 29rem);
  padding: clamp(2.2rem, 4vw, 3.6rem) clamp(1rem, 5vw, 4.2rem);
  border: 1px solid rgba(47, 33, 20, 0.55);
  background:
    radial-gradient(circle at 20% 22%, rgba(255, 248, 224, 0.42), transparent 18rem),
    radial-gradient(circle at 82% 18%, rgba(199, 154, 69, 0.16), transparent 18rem),
    linear-gradient(180deg, rgba(248, 239, 216, 0.76), rgba(212, 181, 111, 0.24));
  box-shadow: inset 0 0 0 6px rgba(255, 248, 224, 0.34);
}

body.page-fate-of-the-fellowship .fate-hero-plate {
  display: grid;
  justify-items: center;
  gap: clamp(0.55rem, 1vw, 0.85rem);
  max-width: 43rem;
  text-align: center;
}

body.page-fate-of-the-fellowship .fate-hero-pretitle,
body.page-fate-of-the-fellowship .fate-overview-label,
body.page-fate-of-the-fellowship .fate-result-seal,
body.page-fate-of-the-fellowship .fate-action-button,
body.page-fate-of-the-fellowship .fate-return-link,
body.page-fate-of-the-fellowship .fate-photo-dialog-close {
  font-family: "Cinzel", "Cinzel Decorative", Georgia, serif;
  letter-spacing: 0;
}

body.page-fate-of-the-fellowship .fate-hero-pretitle {
  margin: 0;
  color: var(--fate-rust);
  font-size: clamp(0.86rem, 1.4vw, 1.06rem);
  font-weight: 700;
  text-transform: uppercase;
}

body.page-fate-of-the-fellowship .fate-ledger h1 {
  max-width: 13.5ch;
  margin: 0;
  background: none;
  color: var(--fate-green);
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  font-size: clamp(2.8rem, 6.2vw, 5.55rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 248, 224, 0.7);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: var(--fate-green);
}

body.page-fate-of-the-fellowship .fate-script-band {
  width: min(28rem, 100%);
  margin: 0;
  padding: 0.32rem 0.55rem 0.38rem;
  border-top: 1px solid rgba(38, 53, 31, 0.46);
  border-bottom: 1px solid rgba(38, 53, 31, 0.46);
  color: rgba(38, 53, 31, 0.72);
  font-family: "Noto Sans Runic", "IM Fell English SC", Georgia, serif;
  font-size: clamp(1.05rem, 1.6vw, 1.42rem);
  letter-spacing: 0.08em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-spacing: 0.3rem;
}

body.page-fate-of-the-fellowship .fate-hero-tagline {
  max-width: 36rem;
  margin: 0;
  color: var(--fate-green);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.82rem, 1.25vw, 1rem);
  font-weight: 700;
  line-height: 1.45;
  text-transform: uppercase;
}

body.page-fate-of-the-fellowship .fate-hero-tagline span {
  color: var(--fate-rust);
  padding: 0 0.35rem;
}

body.page-fate-of-the-fellowship .fate-intro {
  max-width: 35rem;
  color: var(--fate-ink-soft);
  font-family: "IM Fell English", Georgia, serif;
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  font-style: italic;
  line-height: 1.45;
  -webkit-text-fill-color: var(--fate-ink-soft);
}

body.page-fate-of-the-fellowship .fate-intro p {
  margin: 0;
}

body.page-fate-of-the-fellowship .fate-return-link,
body.page-fate-of-the-fellowship .fate-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.58rem 0.9rem;
  border: 1px solid #2f2114;
  border-radius: 2px;
  background: linear-gradient(180deg, #35482a, #15220f);
  color: #fff7df;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(47, 33, 20, 0.34);
}

body.page-fate-of-the-fellowship .fate-return-link::after,
body.page-fate-of-the-fellowship .fate-action-button::after {
  content: none;
}

body.page-fate-of-the-fellowship .fate-return-link:visited,
body.page-fate-of-the-fellowship .fate-action-button:visited {
  color: #fff7df;
}

body.page-fate-of-the-fellowship .fate-return-link:hover,
body.page-fate-of-the-fellowship .fate-return-link:focus-visible,
body.page-fate-of-the-fellowship .fate-action-button:hover,
body.page-fate-of-the-fellowship .fate-action-button:focus-visible {
  background: linear-gradient(180deg, #5b6f3f, #26351f) !important;
  color: #fff7df !important;
  border-color: #2f2114;
  box-shadow: 0 4px 0 rgba(47, 33, 20, 0.38);
}

body.page-fate-of-the-fellowship .fate-ledger-header > .fate-return-link {
  position: absolute;
  top: clamp(0.9rem, 2vw, 1.3rem);
  right: clamp(0.9rem, 2vw, 1.3rem);
  z-index: 3;
}

body.page-fate-of-the-fellowship .fate-section {
  padding: clamp(1.2rem, 2.6vw, 2rem) clamp(1rem, 4.5vw, 4.4rem);
  border: 1px solid rgba(47, 33, 20, 0.42);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 248, 224, 0.28), transparent 18rem),
    linear-gradient(180deg, rgba(255, 248, 224, 0.48), rgba(212, 181, 111, 0.18));
  box-shadow: inset 0 0 0 4px rgba(255, 248, 224, 0.22);
}

body.page-fate-of-the-fellowship .fate-section-heading {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

body.page-fate-of-the-fellowship .fate-section-heading h2 {
  margin: 0;
  color: var(--fate-green);
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

body.page-fate-of-the-fellowship .fate-section-heading p {
  max-width: 66ch;
  margin: 0 auto;
  color: var(--fate-ink-soft);
  font-family: "IM Fell English", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.45;
  text-align: center;
}

body.page-fate-of-the-fellowship .fate-overview-card,
body.page-fate-of-the-fellowship .fate-record-card,
body.page-fate-of-the-fellowship .fate-quest-card,
body.page-fate-of-the-fellowship .fate-log-card {
  position: relative;
  border: 2px solid rgba(47, 33, 20, 0.68);
  border-radius: 2px;
  background:
    radial-gradient(circle at 24% 0%, rgba(255, 248, 224, 0.3), transparent 9rem),
    linear-gradient(180deg, rgba(255, 248, 224, 0.72), rgba(220, 197, 142, 0.46));
  color: var(--fate-ink);
  box-shadow:
    inset 0 0 0 3px rgba(199, 154, 69, 0.18),
    0 8px 16px rgba(74, 50, 31, 0.1);
}

body.page-fate-of-the-fellowship .fate-overview-card::before,
body.page-fate-of-the-fellowship .fate-record-card::before,
body.page-fate-of-the-fellowship .fate-quest-card::before,
body.page-fate-of-the-fellowship .fate-log-card::before {
  position: absolute;
  inset: 0.38rem;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(95, 65, 36, 0.25);
}

body.page-fate-of-the-fellowship .fate-record-card p,
body.page-fate-of-the-fellowship .fate-quest-card p,
body.page-fate-of-the-fellowship .fate-log-card p,
body.page-fate-of-the-fellowship .fate-log-topline time {
  margin: 0;
  color: #4a321f;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.42;
  -webkit-text-fill-color: #4a321f;
}

body.page-fate-of-the-fellowship .fate-overview-grid,
body.page-fate-of-the-fellowship .fate-card-list,
body.page-fate-of-the-fellowship .fate-quest-list,
body.page-fate-of-the-fellowship .fate-log-list {
  display: grid;
  gap: 0.72rem;
}

body.page-fate-of-the-fellowship .fate-stat-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 860px;
  margin-inline: auto;
}

body.page-fate-of-the-fellowship .fate-overview-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 8.2rem;
  min-width: 0;
  padding: 0.9rem 0.82rem;
  text-align: center;
}

body.page-fate-of-the-fellowship .fate-overview-label {
  color: var(--fate-ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.page-fate-of-the-fellowship .fate-overview-card strong {
  align-self: center;
  color: var(--fate-green);
  font-family: "Cinzel Decorative", "Cinzel", Georgia, serif;
  font-size: clamp(1.55rem, 2.35vw, 2.25rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

body.page-fate-of-the-fellowship .fate-overview-card p {
  margin: 0;
  color: var(--fate-ink);
  font-family: "IM Fell English", Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  -webkit-text-fill-color: var(--fate-ink);
}

body.page-fate-of-the-fellowship .fate-card-list {
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

body.page-fate-of-the-fellowship .fate-quest-list {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

body.page-fate-of-the-fellowship .fate-log-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: none;
  margin: 0 auto;
}

body.page-fate-of-the-fellowship .fate-record-card,
body.page-fate-of-the-fellowship .fate-quest-card,
body.page-fate-of-the-fellowship .fate-log-card {
  display: grid;
  align-content: start;
  gap: 0.55rem;
  padding: 1rem;
}

body.page-fate-of-the-fellowship .fate-record-card h3,
body.page-fate-of-the-fellowship .fate-quest-card h3,
body.page-fate-of-the-fellowship .fate-log-card h3 {
  margin: 0;
  color: var(--fate-green);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.15;
}

body.page-fate-of-the-fellowship .fate-record-card.is-required,
body.page-fate-of-the-fellowship .fate-quest-card.is-required {
  border-color: rgba(142, 47, 36, 0.78);
}

body.page-fate-of-the-fellowship .fate-log-card {
  min-width: 0;
}

body.page-fate-of-the-fellowship .fate-log-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

body.page-fate-of-the-fellowship .fate-result-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4rem;
  min-height: 1.8rem;
  padding: 0.24rem 0.72rem;
  border: 1px solid rgba(47, 33, 20, 0.7);
  border-radius: 4px;
  background: linear-gradient(180deg, #5b6f3f, #26351f);
  color: #fff7df;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(74, 50, 31, 0.22);
}

body.page-fate-of-the-fellowship .fate-result-seal.is-win {
  border-color: rgba(38, 53, 31, 0.84);
  background: linear-gradient(180deg, #5b6f3f, #26351f);
}

body.page-fate-of-the-fellowship .fate-result-seal.is-loss {
  border-color: rgba(93, 33, 24, 0.78);
  background: linear-gradient(180deg, #8e2f24, #4a1f18);
}

body.page-fate-of-the-fellowship .fate-empty-log {
  min-height: 8rem;
  border-style: dashed;
}

body.page-fate-of-the-fellowship .fate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

body.page-fate-of-the-fellowship .fate-action-button.is-secondary {
  background: rgba(255, 248, 224, 0.68);
  color: var(--fate-ink);
}

body.page-fate-of-the-fellowship .fate-action-button.is-secondary:hover,
body.page-fate-of-the-fellowship .fate-action-button.is-secondary:focus-visible {
  background: linear-gradient(180deg, #e8d399, #c79a45) !important;
  color: #1e130b !important;
}

body.page-fate-of-the-fellowship .fate-bottom-exit {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

body.page-fate-of-the-fellowship .fate-amp::before {
  content: "&";
}

body.page-fate-of-the-fellowship .fate-log-photo {
  margin: 0.7rem 0 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 6px solid rgba(255, 248, 224, 0.78);
  background: rgba(37, 25, 15, 0.12);
  box-shadow:
    0 10px 20px rgba(74, 50, 31, 0.22),
    inset 0 0 0 1px rgba(47, 33, 20, 0.26);
  transform: rotate(0.35deg);
}

body.page-fate-of-the-fellowship .fate-log-photo-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

body.page-fate-of-the-fellowship .fate-log-photo img {
  display: block;
  width: 100%;
  height: 100%;
  filter: sepia(0.12) contrast(1.02);
  object-fit: cover;
}

body.page-fate-of-the-fellowship .fate-log-photo-trigger:focus-visible {
  outline: 3px solid rgba(142, 47, 36, 0.82);
  outline-offset: -3px;
}

body.page-fate-of-the-fellowship .fate-photo-dialog {
  width: min(96vw, 92rem);
  max-width: 96vw;
  max-height: 96vh;
  padding: 0;
  border: 1px solid rgba(199, 154, 69, 0.48);
  border-radius: 4px;
  background: #120d08;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
}

body.page-fate-of-the-fellowship .fate-photo-dialog::backdrop {
  background: rgba(10, 6, 3, 0.84);
}

body.page-fate-of-the-fellowship .fate-photo-dialog-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 96vh;
  padding: 0.75rem;
}

body.page-fate-of-the-fellowship .fate-photo-dialog-image {
  display: block;
  width: auto;
  max-width: calc(96vw - 1.5rem);
  max-height: calc(96vh - 1.5rem);
  border-radius: 3px;
  object-fit: contain;
}

body.page-fate-of-the-fellowship .fate-photo-dialog-close {
  appearance: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(199, 154, 69, 0.78);
  border-radius: 3px;
  background: linear-gradient(180deg, #35482a, #15220f);
  background-image: linear-gradient(180deg, #35482a, #15220f);
  color: #fffaf0;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow:
    0 3px 0 rgba(47, 33, 20, 0.44),
    inset 0 0 0 1px rgba(255, 248, 224, 0.1);
  cursor: pointer;
  -webkit-text-fill-color: #fffaf0;
}

body.page-fate-of-the-fellowship .fate-photo-dialog-close:hover,
body.page-fate-of-the-fellowship .fate-photo-dialog-close:focus,
body.page-fate-of-the-fellowship .fate-photo-dialog-close:focus-visible {
  border-color: rgba(232, 211, 153, 0.92);
  background: linear-gradient(180deg, #5b6f3f, #26351f) !important;
  background-image: linear-gradient(180deg, #5b6f3f, #26351f) !important;
  color: #fffaf0;
  outline: 2px solid rgba(232, 211, 153, 0.92);
  outline-offset: 2px;
  box-shadow:
    0 3px 0 rgba(47, 33, 20, 0.48),
    0 0 0 4px rgba(7, 17, 14, 0.62);
  -webkit-text-fill-color: #fffaf0;
}

@media (max-width: 900px) {
  body.page-fate-of-the-fellowship .fate-rulebook-hero {
    grid-template-columns: 1fr;
  }

  body.page-fate-of-the-fellowship .fate-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.page-fate-of-the-fellowship .fate-page .container {
    width: min(100vw - 0.75rem, 44rem);
  }

  body.page-fate-of-the-fellowship .fate-ledger {
    padding: 0.55rem;
  }

  body.page-fate-of-the-fellowship .fate-ledger::before,
  body.page-fate-of-the-fellowship .fate-ledger::after {
    display: none;
  }

  body.page-fate-of-the-fellowship .fate-rulebook-hero {
    min-height: auto;
    padding: 4rem 0.75rem 1.5rem;
  }

  body.page-fate-of-the-fellowship .fate-ledger-header > .fate-return-link {
    top: 0.75rem;
    right: 0.75rem;
  }

  body.page-fate-of-the-fellowship .fate-section {
    padding: 1rem 0.75rem;
  }

  body.page-fate-of-the-fellowship .fate-card-list,
  body.page-fate-of-the-fellowship .fate-quest-list,
  body.page-fate-of-the-fellowship .fate-log-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body.page-fate-of-the-fellowship .fate-stat-strip {
    grid-template-columns: 1fr;
  }

  body.page-fate-of-the-fellowship .fate-script-band {
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    word-spacing: 0.12rem;
  }

}
