/* The Draugr's Grimoire — dark Norse PWA prototype */
:root {
  --bg: #0a0808;
  --bg-2: #121010;
  --card: #161214;
  --card-edge: #2a2224;
  --blood: #a3121c;
  --blood-bright: #d41f2c;
  --blood-dim: #5e0a10;
  --bone: #e8e0d5;
  --ash: #9a9189;
  --ash-dim: #6b6460;
  --rune-gold: #c9a227;
  --radius: 12px;
  --tabbar-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--bone);
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -10%, rgba(163, 18, 28, 0.12), transparent),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(201, 162, 39, 0.025) 47px 48px);
}

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(10, 8, 8, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--blood-dim);
}

.brand-head {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--blood);
  box-shadow: 0 0 14px rgba(163, 18, 28, 0.55);
  flex-shrink: 0;
}

.brand-text { flex: 1; min-width: 0; }
.brand-text h1 {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--bone);
  text-shadow: 0 0 18px rgba(163, 18, 28, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tagline {
  font-size: 0.72rem;
  color: var(--ash);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rings-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--rune-gold);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--rune-gold);
  flex-shrink: 0;
}
.chip-mark { width: 22px; height: 22px; object-fit: contain; }

/* ---------- Screens ---------- */
.screen { display: none; max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; }
.screen.active { display: block; animation: fadein 0.25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }

.screen-intro { margin-bottom: 16px; }
.draugr-quote {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--bone);
  border-left: 3px solid var(--blood);
  padding-left: 12px;
  margin-bottom: 8px;
  line-height: 1.45;
}
.screen-sub { color: var(--ash); font-size: 0.88rem; line-height: 1.5; }

.section-h {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ash);
  margin: 20px 0 10px;
}

/* ---------- Episode feed ---------- */
.episode-list { display: flex; flex-direction: column; gap: 14px; }

.ep-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.ep-card.found { border-color: var(--blood-dim); }

.ep-cover-wrap { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.ep-cover-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-num {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(10, 8, 8, 0.85);
  border: 1px solid var(--blood);
  color: var(--blood-bright);
  font-weight: bold;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.06em;
}
.ep-found-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--blood-dim);
  border: 1px solid var(--blood-bright);
  color: var(--bone);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 6px;
  display: none;
}
.ep-card.found .ep-found-badge { display: block; }

.ep-body { padding: 14px; }
.ep-title { font-size: 1.02rem; line-height: 1.35; margin-bottom: 8px; color: var(--bone); }
.ep-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ep-date { font-size: 0.75rem; color: var(--ash-dim); width: 100%; }
.tag {
  font-size: 0.7rem;
  color: var(--ash);
  border: 1px solid var(--card-edge);
  border-radius: 999px;
  padding: 3px 10px;
}

.mark-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--blood), var(--blood-dim));
  border: 1px solid var(--blood-bright);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s, filter 0.2s;
}
.mark-btn:active { transform: scale(0.98); }
.mark-btn img { width: 26px; height: 26px; object-fit: contain; }
.mark-btn.claimed {
  background: var(--bg-2);
  border-color: var(--card-edge);
  color: var(--ash);
  cursor: default;
}

/* Watch-plus-hunt combo: watch button, progress chips, player modal. */
.watch-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg-2);
  border: 1px solid var(--blood);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: bold;
  letter-spacing: 0.04em;
  padding: 13px;
  border-radius: 10px;
  margin-top: 10px;
  cursor: pointer;
}
.watch-btn:active { transform: scale(0.98); }
.combo-chips { display: flex; gap: 8px; margin-top: 10px; }
.chip {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 0;
  border-radius: 999px;
  border: 1px solid var(--card-edge);
  color: var(--ash);
  background: var(--bg-2);
}
.chip.done {
  border-color: var(--blood-bright);
  color: #fff;
  background: linear-gradient(180deg, var(--blood), var(--blood-dim));
}
/* Tapped but not yet claimed: the mark glows faintly, brighter than hidden. */
.ep-cover-wrap img.hunt-mark.tapped {
  opacity: 0.85;
  filter: drop-shadow(0 0 5px rgba(255, 45, 45, 0.7)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}
.mark-btn.partial {
  background: linear-gradient(180deg, #5a1218, var(--blood-dim));
}
.video-box { max-width: 420px; }
.video-player-wrap {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 16;
  max-height: 60vh;
  margin: 0 auto;
  background: #000;
  border: 1px solid var(--blood-deep);
  border-radius: 10px;
  overflow: hidden;
}
.video-player-wrap video { width: 100%; height: 100%; display: block; }
.video-progress {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ash);
  margin: 10px 0 4px;
  min-height: 1.2em;
}

/* ---------- Lore grimoire ---------- */
.lore-book { display: flex; flex-direction: column; gap: 10px; }
.lore-chapter {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  overflow: hidden;
}
.lore-chapter summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.lore-chapter summary::-webkit-details-marker { display: none; }
.lore-chapter summary::after { content: '›'; margin-left: auto; color: var(--blood-bright); font-size: 1.4rem; transform: rotate(90deg); transition: transform 0.2s; }
.lore-chapter[open] summary::after { transform: rotate(-90deg); }
.rune {
  color: var(--blood-bright);
  font-size: 1.25rem;
  text-shadow: 0 0 10px rgba(212, 31, 44, 0.7);
  min-width: 2ch;
  text-align: center;
}
.lore-body { padding: 0 16px 16px; color: var(--ash); line-height: 1.65; font-size: 0.93rem; }
.lore-body p { margin-bottom: 10px; }
.lore-body em { color: var(--bone); }
.lore-body h4 { color: var(--bone); margin: 14px 0 8px; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; }
.lore-list { list-style: none; }
.lore-list li { padding: 6px 0 6px 14px; border-left: 2px solid var(--blood-dim); margin-bottom: 6px; }
.lore-list strong { color: var(--bone); }
.lore-note { margin-top: 10px; font-style: italic; color: var(--rune-gold); }

/* ---------- Poll ---------- */
.poll-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 18px 16px;
}
.poll-title { font-size: 1.1rem; margin-bottom: 6px; }
.poll-meta { color: var(--ash); font-size: 0.82rem; margin-bottom: 16px; }
.poll-options { display: flex; flex-direction: column; gap: 10px; }
.poll-opt {
  position: relative;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--bone);
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
}
.poll-opt .opt-name { position: relative; z-index: 2; font-weight: bold; display: block; }
.poll-opt .opt-desc { position: relative; z-index: 2; display: block; font-size: 0.8rem; color: var(--ash); margin-top: 4px; }
.poll-opt .opt-bar {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--blood-dim), rgba(163, 18, 28, 0.45));
  transition: width 0.6s ease;
  z-index: 1;
}
.poll-opt .opt-pct {
  position: absolute;
  right: 12px;
  top: 13px;
  z-index: 2;
  font-size: 0.85rem;
  color: var(--blood-bright);
  font-weight: bold;
  display: none;
}
.poll-opt.voted { border-color: var(--blood-bright); }
.poll-opt.voted .opt-pct { display: block; }
.poll-opt:disabled { cursor: default; }
.poll-foot { margin-top: 14px; font-size: 0.82rem; color: var(--ash); line-height: 1.5; }
.poll-foot strong { color: var(--rune-gold); }

/* ---------- Mark hunt ---------- */
.hunt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
}
.stat-mark { width: 30px; height: 30px; object-fit: contain; margin-bottom: 4px; }
.stat-num { font-size: 1.35rem; font-weight: bold; color: var(--bone); }
.stat-num .flame { font-size: 1rem; margin-left: 4px; }
.stat-label { font-size: 0.7rem; color: var(--ash); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.cta-btn {
  width: 100%;
  background: linear-gradient(180deg, var(--blood), var(--blood-dim));
  border: 1px solid var(--blood-bright);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  padding: 14px;
  border-radius: 10px;
  cursor: pointer;
}
.cta-btn:disabled { background: var(--bg-2); border-color: var(--card-edge); color: var(--ash); cursor: default; }
.checkin-note { text-align: center; font-size: 0.8rem; color: var(--ash); margin-top: 8px; font-style: italic; }

.marks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mark-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-edge);
  background: #000;
}
.mark-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mark-cell .cell-num {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 8, 8, 0.85);
  font-size: 0.68rem;
  padding: 3px 6px;
  color: var(--ash);
  text-align: center;
}
.mark-cell.locked img { filter: grayscale(1) brightness(0.25); }
.mark-cell.unlocked { border-color: var(--blood); box-shadow: 0 0 10px rgba(163, 18, 28, 0.35); }
.mark-cell.unlocked::after {
  content: 'ᛞᚱ';
  position: absolute;
  top: 6px; right: 8px;
  color: var(--blood-bright);
  font-size: 1rem;
  text-shadow: 0 0 8px rgba(212, 31, 44, 0.9);
}

/* ---------- Ranks ---------- */
.rank-current {
  background: linear-gradient(180deg, rgba(163, 18, 28, 0.18), var(--card));
  border: 1px solid var(--blood);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  text-align: center;
}
.rank-current .rc-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ash); }
.rank-current .rc-name { font-size: 1.5rem; margin: 6px 0; color: var(--bone); text-shadow: 0 0 16px rgba(163, 18, 28, 0.6); }
.rank-current .rc-progress { height: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.rank-current .rc-fill { height: 100%; background: linear-gradient(90deg, var(--blood-dim), var(--blood-bright)); transition: width 0.5s; }
.rank-current .rc-next { font-size: 0.8rem; color: var(--ash); margin-top: 8px; }

.rank-ladder { display: flex; flex-direction: column; gap: 10px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 14px;
  opacity: 0.55;
}
.rank-row.achieved { opacity: 1; border-color: var(--blood-dim); }
.rank-row.current-rank { opacity: 1; border-color: var(--blood-bright); box-shadow: 0 0 14px rgba(163, 18, 28, 0.3); }
.rank-icon { font-size: 1.8rem; width: 44px; text-align: center; flex-shrink: 0; }
.rank-info { flex: 1; }
.rank-name { font-size: 1.05rem; color: var(--bone); }
.rank-req { font-size: 0.78rem; color: var(--ash); }
.rank-check { color: var(--blood-bright); font-size: 1.3rem; visibility: hidden; }
.rank-row.achieved .rank-check { visibility: visible; }

/* ---------- Tab bar ---------- */
.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: rgba(12, 9, 9, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--blood-dim);
  z-index: 30;
}
.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--ash-dim);
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}
.tab-rune { font-size: 1.25rem; line-height: 1; }
.tab.active { color: var(--blood-bright); }
.tab.active .tab-rune { text-shadow: 0 0 10px rgba(212, 31, 44, 0.8); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--tabbar-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--blood-bright);
  color: var(--bone);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 50;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Desktop ---------- */
@media (min-width: 700px) {
  .episode-list { display: grid; grid-template-columns: 1fr 1fr; }
  .marks-grid { grid-template-columns: repeat(4, 1fr); }
  .brand-text h1 { font-size: 1.35rem; }
}

/* ============ New-nightmare banner ============ */
.nightmare-banner[hidden] { display: none; }
.nightmare-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(163, 18, 28, 0.28), rgba(163, 18, 28, 0.10));
  border: 1px solid var(--blood-bright);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 0 18px rgba(163, 18, 28, 0.35);
  animation: nbpulse 2.4s ease-in-out infinite;
}
@keyframes nbpulse {
  0%, 100% { box-shadow: 0 0 12px rgba(163, 18, 28, 0.25); }
  50% { box-shadow: 0 0 24px rgba(212, 31, 44, 0.55); }
}
.nb-rune { font-size: 1.6rem; color: var(--blood-bright); text-shadow: 0 0 12px rgba(212,31,44,0.9); }
.nb-body { flex: 1; min-width: 0; }
.nb-title { font-weight: bold; color: var(--bone); font-size: 0.98rem; }
.nb-sub { font-size: 0.8rem; color: var(--ash); margin-top: 2px; }
.nb-btn {
  background: var(--blood);
  border: 1px solid var(--blood-bright);
  color: #fff;
  font-family: inherit;
  font-weight: bold;
  font-size: 0.85rem;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============ Hunt card (tonight's hunt) ============ */
.hunt-card {
  background: linear-gradient(180deg, rgba(163, 18, 28, 0.16), var(--card));
  border: 1px solid var(--blood);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.hunt-card .hc-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--blood-bright);
  margin-bottom: 6px;
}
.hunt-card h3 { font-size: 1.05rem; color: var(--bone); margin-bottom: 6px; }
.hunt-card p { font-size: 0.86rem; color: var(--ash); line-height: 1.55; margin-bottom: 12px; }
.hunt-card p strong { color: var(--rune-gold); }
.hunt-card .countdown { color: var(--bone); font-size: 0.82rem; margin-top: 8px; text-align: center; }
.hunt-card.done { border-color: var(--card-edge); background: var(--card); }

/* ============ Streak calendar ============ */
.streak-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--card-edge);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: var(--ash-dim);
}
.cal-day .dow { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; }
.cal-day .dnum { font-size: 0.9rem; font-weight: bold; }
.cal-day.lit {
  border-color: var(--blood-bright);
  background: radial-gradient(circle at 50% 60%, rgba(212, 31, 44, 0.5), rgba(94, 10, 16, 0.6));
  color: #fff;
  box-shadow: 0 0 10px rgba(163, 18, 28, 0.5);
}
.cal-day.today { outline: 2px solid var(--rune-gold); outline-offset: 1px; }

.milestones { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.milestone {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--ash);
}
.milestone .m-rune { color: var(--blood-bright); font-size: 1.1rem; }
.milestone.reached { border-color: var(--blood-dim); color: var(--bone); }
.milestone.reached .m-check { color: var(--blood-bright); margin-left: auto; font-weight: bold; }
.milestone .m-bonus { color: var(--rune-gold); font-size: 0.78rem; }

/* ============ Community hunt ============ */
.community-card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 6px;
}
.community-card p { font-size: 0.86rem; color: var(--ash); line-height: 1.55; margin-bottom: 10px; }
.community-card p strong { color: var(--bone); }
.comm-bar { height: 10px; background: var(--bg-2); border-radius: 5px; overflow: hidden; margin-bottom: 8px; }
.comm-fill { height: 100%; background: linear-gradient(90deg, var(--blood-dim), var(--blood-bright)); transition: width 0.6s; }
.comm-meta { font-size: 0.78rem; color: var(--ash); text-align: center; }
.comm-meta strong { color: var(--rune-gold); }

/* ============ Leaderboard ============ */
.champ-banner {
  background: linear-gradient(180deg, rgba(201, 162, 39, 0.16), var(--card));
  border: 1px solid var(--rune-gold);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: center;
}
.champ-banner .cb-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--rune-gold);
  margin-bottom: 4px;
}
.champ-banner .cb-name { font-size: 1.15rem; color: var(--bone); font-weight: bold; }
.champ-banner .cb-sub { font-size: 0.8rem; color: var(--ash); margin-top: 4px; font-style: italic; }

.board-list { display: flex; flex-direction: column; gap: 8px; }
.board-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  padding: 12px 14px;
}
.board-row.you {
  border-color: var(--blood-bright);
  box-shadow: 0 0 14px rgba(163, 18, 28, 0.35);
  background: linear-gradient(180deg, rgba(163, 18, 28, 0.14), var(--card));
}
.board-pos { font-size: 1rem; font-weight: bold; color: var(--ash); width: 28px; text-align: center; flex-shrink: 0; }
.board-row.you .board-pos { color: var(--blood-bright); }
.board-info { flex: 1; min-width: 0; }
.board-name { font-size: 0.95rem; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-name .you-tag {
  font-size: 0.68rem;
  color: var(--blood-bright);
  border: 1px solid var(--blood-bright);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.board-sub { font-size: 0.74rem; color: var(--ash-dim); }
.board-rings { font-size: 1rem; font-weight: bold; color: var(--rune-gold); flex-shrink: 0; }
.board-move { font-size: 0.8rem; width: 34px; text-align: right; flex-shrink: 0; }
.board-move.up { color: #7dc98a; }
.board-move.down { color: var(--blood-bright); }
.board-move.same { color: var(--ash-dim); }
.board-note { font-size: 0.74rem; color: var(--ash-dim); margin-top: 12px; text-align: center; font-style: italic; }

/* ============ Lore locks ============ */
.lore-chapter.locked { opacity: 0.92; }
.lore-chapter.locked summary { cursor: not-allowed; }
.lock-teaser { padding: 0 16px 16px; color: var(--ash); font-size: 0.9rem; line-height: 1.6; font-style: italic; }
.lock-req {
  display: inline-block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--rune-gold);
  border: 1px solid var(--rune-gold);
  border-radius: 999px;
  padding: 4px 12px;
}
.lore-chapter.unlock-flash { animation: unlockglow 1.6s ease; }
@keyframes unlockglow {
  0% { box-shadow: 0 0 0 rgba(212,31,44,0); }
  30% { box-shadow: 0 0 26px rgba(212,31,44,0.7); border-color: var(--blood-bright); }
  100% { box-shadow: 0 0 0 rgba(212,31,44,0); }
}

/* ============ Whispers ============ */
.whispers-list { display: flex; flex-direction: column; gap: 10px; }
.whisper {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.whisper.unlocked { border-color: var(--blood-dim); }
.whisper .w-rank {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--blood-bright);
  margin-bottom: 6px;
}
.whisper .w-text { font-style: italic; color: var(--bone); line-height: 1.6; font-size: 0.94rem; }
.whisper.locked-whisper { opacity: 0.6; }
.whisper.locked-whisper .w-text { color: var(--ash-dim); font-style: italic; }

/* ============ Rewards ============ */
.rewards-list { display: flex; flex-direction: column; gap: 10px; }
.reward {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.reward.unlocked { border-color: var(--rune-gold); }
.reward .rw-rune { font-size: 1.5rem; color: var(--ash-dim); flex-shrink: 0; }
.reward.unlocked .rw-rune { color: var(--rune-gold); text-shadow: 0 0 10px rgba(201,162,39,0.7); }
.reward .rw-info { flex: 1; min-width: 0; }
.reward .rw-name { font-size: 0.98rem; color: var(--bone); margin-bottom: 3px; }
.reward .rw-desc { font-size: 0.8rem; color: var(--ash); line-height: 1.5; }
.reward .rw-tier { font-size: 0.74rem; color: var(--rune-gold); margin-top: 6px; letter-spacing: 0.06em; }
.reward .rw-btn {
  background: none;
  border: 1px solid var(--rune-gold);
  color: var(--rune-gold);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.reward .rw-btn:disabled { border-color: var(--card-edge); color: var(--ash-dim); cursor: default; }
.reward.claimed { border-color: var(--blood-dim); }

/* ============ Share dare ============ */
.dare-btn {
  margin-top: 10px;
  width: 100%;
  background: none;
  border: 1px dashed var(--blood-dim);
  color: var(--ash);
  font-family: inherit;
  font-size: 0.84rem;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.dare-btn:hover { border-color: var(--blood-bright); color: var(--bone); }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 3, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  background: var(--card);
  border: 1px solid var(--blood-bright);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 40px rgba(163, 18, 28, 0.5);
  animation: modalin 0.3s ease;
}
@keyframes modalin { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
.modal-rune { font-size: 2.2rem; color: var(--blood-bright); text-shadow: 0 0 16px rgba(212,31,44,0.9); margin-bottom: 10px; }
.modal-box h3 { font-size: 1.2rem; color: var(--bone); margin-bottom: 12px; letter-spacing: 0.04em; }
.modal-box p { font-style: italic; color: var(--ash); line-height: 1.65; font-size: 0.95rem; margin-bottom: 20px; }
.modal-box p strong { color: var(--bone); }

/* ============ Install banner ============ */
.install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 14, 10, 0.97);
  border-bottom: 1px solid var(--rune-gold);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--bone);
  position: sticky;
  top: 0;
  z-index: 25;
}
.install-banner[hidden] { display: none; }
.install-text { flex: 1; }
.install-btn {
  background: var(--rune-gold);
  border: none;
  color: #14100a;
  font-family: inherit;
  font-weight: bold;
  font-size: 0.8rem;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}
.install-dismiss {
  background: none;
  border: none;
  color: var(--ash);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

/* ============ First-finder badge ============ */
.ep-finder {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--rune-gold);
  margin-top: 8px;
}
.ep-finder strong { color: var(--rune-gold); }

@media (min-width: 700px) {
  .streak-cal { grid-template-columns: repeat(14, 1fr); }
}

/* ---- Follow the terror (channel links) ---- */
.follow-card {
  margin: 26px 0 8px;
  padding: 22px 18px;
  border: 1px solid #3a0d10;
  border-radius: 12px;
  background: linear-gradient(180deg, #120607 0%, #0a0304 100%);
  text-align: center;
}
.follow-rune {
  font-size: 30px;
  color: #a3121c;
  text-shadow: 0 0 14px rgba(163,18,28,.7);
  margin-bottom: 6px;
}
.follow-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}
.follow-btn {
  padding: 10px 18px;
  border: 1px solid #a3121c;
  border-radius: 8px;
  color: #f3e9dc;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .04em;
  background: rgba(163,18,28,.12);
}
.follow-btn:active { background: rgba(163,18,28,.3); }

/* ---------- Mark hunt: tap-to-find ---------- */
.ep-cover-wrap.tappable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* The hidden bind-rune on the cover. Positioned by JS (px, relative to the
   wrap); sized at 10% of cover width. Semi-blended until found. */
.ep-cover-wrap img.hunt-mark {
  position: absolute;
  width: 10%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.85));
}
/* Claimed: the mark burns bright where it hid. */
.ep-cover-wrap img.hunt-mark.revealed {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(255, 45, 45, 0.95)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}
/* Mercy hint after 3 misses on the same card: the mark shimmers faintly. */
.ep-cover-wrap img.hunt-mark.hinting { animation: markShimmer 1.6s ease-in-out infinite; }
@keyframes markShimmer {
  0%, 100% { opacity: 0.55; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.85)); }
  50% { opacity: 0.95; filter: drop-shadow(0 0 8px rgba(255, 45, 45, 0.9)); }
}
/* Wrong tap: the cover shudders. */
.ep-cover-wrap.shake { animation: coverShake 0.4s; }
@keyframes coverShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}
/* The old free-claim button is now a disabled hint. No tap on the mark, no rings. */
.mark-btn.hint {
  background: var(--bg-2);
  border: 1px dashed var(--card-edge);
  color: var(--ash);
  cursor: default;
  font-weight: normal;
  font-size: 0.85rem;
}
.mark-btn.hint:active { transform: none; }
.hunt-hint {
  font-size: 0.8rem;
  color: var(--ash);
  text-align: center;
  margin: 10px 0 4px;
  font-style: italic;
}
.daily-cover { border-radius: 8px; margin-top: 12px; }
