/* ============================================================
   KENOTAF — the Kenotaf Rooms call
   ============================================================ */

:root {
  --bg: #070708;
  --bg-soft: #0d0d10;
  --ink: #d8d4cc;
  --ink-dim: #8f8b83;
  --gold: #d4af37;
  --gold-bright: #f2e08a;
  --gold-dim: #8a6d1f;
  --line: rgba(212, 175, 55, 0.16);
  --font-display: "Cinzel", serif;
  --font-body: "Cormorant Garamond", serif;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #0a0a0a; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Ember canvas ---------- */

#embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

main { position: relative; z-index: 2; }

/* ---------- Loading veil ---------- */

#veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.1s ease, visibility 1.1s ease;
}
#veil.lifted { opacity: 0; visibility: hidden; }

.veil-inner { text-align: center; }

.veil-sigil {
  animation: veilPulse 2.2s ease-in-out infinite;
}
@keyframes veilPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.97); }
  50% { opacity: 1; transform: scale(1.03); }
}

.veil-words {
  margin-top: 1rem;
  font-style: italic;
  color: var(--ink-dim);
  letter-spacing: 0.12em;
  animation: veilFade 2.2s ease-in-out infinite;
}
@keyframes veilFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}

/* ---------- Top bar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(to bottom, rgba(7,7,8,0.92), rgba(7,7,8,0));
  backdrop-filter: blur(2px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.35em;
  font-size: 0.95rem;
}

.brand-sigil { filter: drop-shadow(0 0 6px rgba(212,175,55,0.5)); }

.topnav {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.topnav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.topnav a:hover { color: var(--gold-bright); }

.topnav .nav-cta {
  border: 1px solid var(--line);
  padding: 0.45rem 1.1rem;
  color: var(--gold);
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.topnav .nav-cta:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

/* ---------- Chapter nav dots ---------- */

.chapter-nav {
  position: fixed;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.chapter-nav a {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--ink-dim);
  background: transparent;
  position: relative;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.chapter-nav a.active,
.chapter-nav a:hover {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.chapter-nav a::after {
  content: attr(data-label);
  position: absolute;
  right: 1.6rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.chapter-nav a:hover::after,
.chapter-nav a.active::after { opacity: 1; }

/* ---------- Chapters (sections) ---------- */

.chapter {
  min-height: 100vh;
  padding: 7rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.chapter + .chapter::before {
  content: "◆";
  position: absolute;
  top: 2.6rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-dim);
  font-size: 0.7rem;
  opacity: 0.7;
}

.chapter-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2.6rem;
}

.numeral {
  font-family: var(--font-display);
  color: var(--gold-dim);
  letter-spacing: 0.3em;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.chapter-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.chapter-head h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 1px;
  margin: 0.9rem auto 0;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.chapter-sub {
  margin-top: 1rem;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 1.05rem;
}

/* ---------- I. Invitation ---------- */

#invitation { gap: 0.4rem; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 11vw, 7.5rem);
  letter-spacing: 0.18em;
  line-height: 1;
  display: flex;
}

.wordmark .stroke {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--gold);
  animation: letterFlicker 4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.4s);
}

.wordmark .stroke:nth-child(1) { --i: 0; }
.wordmark .stroke:nth-child(2) { --i: 1; }
.wordmark .stroke:nth-child(3) { --i: 2; }
.wordmark .stroke:nth-child(4) { --i: 3; }
.wordmark .stroke:nth-child(5) { --i: 4; }
.wordmark .stroke:nth-child(6) { --i: 5; }
.wordmark .stroke:nth-child(7) { --i: 6; }

@keyframes letterFlicker {
  0%, 100% { -webkit-text-stroke-color: var(--gold); opacity: 1; }
  92% { -webkit-text-stroke-color: var(--gold); opacity: 1; }
  94% { -webkit-text-stroke-color: rgba(242, 224, 138, 0.9); opacity: 0.55; }
  96% { -webkit-text-stroke-color: var(--gold); opacity: 1; }
}

.motto {
  color: var(--ink-dim);
  font-style: italic;
  letter-spacing: 0.14em;
  margin-top: 0.6rem;
}

.sigil-hero {
  position: relative;
  margin: 2.2rem 0 1rem;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pyramid {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.35));
  animation: pyramidBreathe 6s ease-in-out infinite;
}

@keyframes pyramidBreathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 12px rgba(212,175,55,0.3)); }
  50% { transform: scale(1.03); filter: drop-shadow(0 0 26px rgba(212,175,55,0.55)); }
}

.rune.ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}
.rune.ring::before,
.rune.ring::after {
  content: "✦";
  position: absolute;
  color: var(--gold-dim);
  font-size: 0.7rem;
}
.rune.ring::before { top: -0.45rem; left: 50%; transform: translateX(-50%); }
.rune.ring::after { bottom: -0.45rem; left: 50%; transform: translateX(-50%); }

.rune.ring.inner {
  inset: 16px;
  animation: spin 28s linear infinite reverse;
  border-color: rgba(212, 175, 55, 0.1);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.beam {
  position: absolute;
  bottom: 50%;
  left: 50%;
  width: 2px;
  height: 130px;
  background: linear-gradient(to top, rgba(212,175,55,0.7), transparent);
  transform: translateX(-50%);
  opacity: 0;
  animation: beam 7s ease-in-out infinite;
  z-index: 2;
}

@keyframes beam {
  0%, 100% { opacity: 0; transform: translateX(-50%) scaleY(0.6); }
  50% { opacity: 0.8; transform: translateX(-50%) scaleY(1); }
}

/* Recruitment */

.recruit { margin-top: 1.6rem; display: flex; flex-direction: column; align-items: center; }

.recruit-count {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.recruit-count span { color: var(--gold-bright); }

.join {
  margin-top: 1.4rem;
  display: flex;
  gap: 0;
}

.join input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-right: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 1.1rem;
  width: min(320px, 60vw);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.join input::placeholder { color: rgba(143, 139, 131, 0.6); font-style: italic; }

.join input:focus { border-color: var(--gold); background: rgba(212, 175, 55, 0.05); }

.join button,
button {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: filter 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.join button:hover,
button:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.join button:active,
button:active { transform: translateY(1px); }

.recruit-note {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: var(--ink-dim);
  font-style: italic;
}

/* ---------- II. Creed ---------- */

.creed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  width: min(1060px, 100%);
}

.creed-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(212,175,55,0.04), rgba(255,255,255,0.01));
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.creed-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(212, 175, 55, 0.08);
}

.card-sigil {
  width: 44px;
  height: 44px;
  color: var(--gold);
  opacity: 0.85;
}

.creed-line {
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink);
}

.creed-note {
  font-size: 0.95rem;
  color: var(--ink-dim);
}

/* ---------- III. Ladder ---------- */

.ladder {
  width: min(880px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.rung {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.4rem;
  align-items: baseline;
  text-align: left;
  border: 1px solid transparent;
  border-left: 1px solid var(--line);
  padding: 1.2rem 1.6rem;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.rung:hover {
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(212,175,55,0.06), transparent 60%);
  transform: translateX(6px);
}

.rung-step {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: 0.2em;
}

.rung h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.rung p { color: var(--ink-dim); max-width: 60ch; }

/* ---------- IV. Key / countdown ---------- */

.key-panel {
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.05), transparent 70%);
  padding: 3rem 2.5rem;
  width: min(760px, 100%);
}

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.6rem);
  flex-wrap: wrap;
}

.unit { display: flex; flex-direction: column; align-items: center; }

.unit span {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(212, 175, 55, 0.4);
}

.unit label {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.key-verse {
  margin-top: 1.8rem;
  font-style: italic;
  color: var(--ink);
  font-size: 1.1rem;
}

.countdown-caption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
}

/* ---------- V. Altar ---------- */

.altar-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(560px, 100%);
}

.altar-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s ease;
}

.altar-form textarea:focus { border-color: var(--gold); }
.altar-form textarea::placeholder { color: rgba(143, 139, 131, 0.6); font-style: italic; }

.altar-form button { align-self: center; }

.whisper-count {
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.whisper-wall {
  list-style: none;
  width: min(760px, 100%);
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.whisper-wall li {
  border-left: 2px solid var(--gold-dim);
  padding: 0.5rem 1.1rem;
  text-align: left;
  font-style: italic;
  color: var(--ink);
  background: linear-gradient(90deg, rgba(212,175,55,0.05), transparent);
  animation: whisperIn 0.7s ease both;
}

@keyframes whisperIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.altar-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
  font-style: italic;
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-dim);
}

.footer-sigil { color: var(--gold); opacity: 0.8; }

.footer p { font-size: 0.95rem; }

.footer-fine { font-size: 0.8rem !important; opacity: 0.75; }

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 5, 0.82);
  backdrop-filter: blur(3px);
}

.modal-panel {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 3rem 2.6rem;
  max-width: 420px;
  width: calc(100% - 3rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.12), 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.5s ease both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-panel h3 {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: var(--gold-bright);
}

.modal-panel p { color: var(--ink-dim); font-style: italic; }

.modal-btn { margin-top: 0.5rem; }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .creed-grid { grid-template-columns: 1fr; width: min(560px, 100%); }
}

@media (max-width: 720px) {
  .topnav a:not(.nav-cta) { display: none; }
  .chapter-nav { display: none; }
  .chapter { padding: 6rem 1.2rem 3.5rem; }
  .join { flex-direction: column; width: 100%; align-items: stretch; }
  .join input { width: 100%; border-right: 1px solid var(--line); }
  .rung { grid-template-columns: 1fr; gap: 0.4rem; }
  .key-panel { padding: 2.2rem 1.4rem; }
}

/* ============================================================
   Dashboard (home.html) — the initiate's chamber
   ============================================================ */

.hidden { display: none !important; }

.modal-note { font-size: 0.95rem; }
.modal-note a.modal-link {
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
  padding-bottom: 1px;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.modal-note a.modal-link:hover { color: #fff3c4; border-color: var(--gold-bright); }

.dashboard-topbar { background: rgba(7, 7, 8, 0.85); border-bottom: 1px solid var(--line); }

.dashboard-main {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 7rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Gate */

.gate { text-align: center; max-width: 560px; gap: 0.8rem; }

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.gate-text { color: var(--ink-dim); font-style: italic; margin-top: 0.8rem; }

.gate-cta {
  display: inline-block;
  margin-top: 1.6rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.8rem 1.6rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.gate-cta:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }

.gate-hint { margin-top: 1.4rem; font-size: 0.9rem; color: var(--ink-dim); }

.linklike {
  background: none;
  border: none;
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: italic;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.linklike:hover { color: var(--gold-bright); }

/* Chamber head */

.chamber { width: min(980px, 100%); gap: 0.3rem; padding-top: 6rem; }

.chamber-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 2.4rem;
}

.chamber-sigil { filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.35)); }

.chamber-greeting {
  margin-top: 1.2rem;
  font-style: italic;
  color: var(--ink-dim);
}

.chamber-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.25);
}

.chamber-since { margin-top: 0.4rem; font-size: 0.9rem; color: var(--ink-dim); letter-spacing: 0.08em; }

/* Tiles */

.ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  width: 100%;
}

.tile {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.04), rgba(255, 255, 255, 0.01));
  padding: 1.8rem 1.6rem;
  text-align: center;
  transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.tile:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.08);
  transform: translateY(-3px);
}

.tile-label {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.8rem;
}

.tile-big {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
}

.unit-word {
  font-size: 0.9rem;
  color: var(--ink-dim);
  letter-spacing: 0.2em;
  text-transform: lowercase;
}

.tile-sub { margin-top: 0.5rem; font-style: italic; color: var(--ink-dim); font-size: 0.9rem; }

.rank-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-bright);
}

.rank-step { margin-top: 0.4rem; color: var(--ink-dim); font-size: 0.9rem; }

.rank-next {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--gold);
  opacity: 0.85;
}

.rank-flash { animation: rankPulse 1.1s ease-in-out 3; }
@keyframes rankPulse {
  0%, 100% { text-shadow: 0 0 18px rgba(212, 175, 55, 0.3); }
  50% { text-shadow: 0 0 42px rgba(242, 224, 138, 0.95); color: #fff3c4; }
}

.tile-flash { border-color: rgba(242, 224, 138, 0.6) !important; }

/* Offering panel */

.offering-panel {
  width: 100%;
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  padding: 1.8rem 2rem;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.05), transparent 70%);
  text-align: center;
}

.offering-title {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--ink);
}

.offering-sub { margin-top: 0.4rem; font-style: italic; color: var(--ink-dim); font-size: 0.9rem; }

.offering-row {
  margin-top: 1.3rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.offering-row input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.offering-row input:focus { border-color: var(--gold); }

.offering-row input[type="number"] { width: 130px; }
.offering-row input[type="text"] { width: 220px; }

.chip {
  background: none !important;
  border: 1px solid var(--line) !important;
  color: var(--gold) !important;
  font-family: var(--font-display) !important;
  font-size: 0.66rem !important;
  letter-spacing: 0.18em;
  padding: 0.5rem 0.9rem !important;
  box-shadow: none !important;
}

.chip:hover { border-color: var(--gold) !important; background: rgba(212, 175, 55, 0.08) !important; }

.offering-chips {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.offering-feedback {
  margin-top: 1rem;
  min-height: 1.4em;
  font-style: italic;
  color: var(--gold-bright);
  font-size: 0.95rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.offering-feedback.glow { opacity: 1; }

/* Ledger */

.ledger-panel {
  width: 100%;
  margin-top: 1.4rem;
  border: 1px solid var(--line);
  padding: 1.6rem 2rem;
}

.ledger-title {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 1rem;
}

.ledger-list { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }

.ledger-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-left: 2px solid var(--gold-dim);
  padding: 0.45rem 1rem;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.05), transparent);
  animation: whisperIn 0.6s ease both;
}

.ledger-line { font-style: italic; }

.ledger-meta { font-size: 0.8rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }

.ledger-empty { color: var(--ink-dim); font-style: italic; font-size: 0.95rem; }

/* Danger zone */

.danger-zone {
  margin-top: 2.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.linklike.danger { color: #b0533a; }
.linklike.danger:hover { color: #d97b5f; }

.danger-note { font-size: 0.8rem; color: var(--ink-dim); font-style: italic; }

@media (max-width: 860px) {
  .ledger-grid { grid-template-columns: 1fr; }
  .chamber { padding-top: 5rem; }
  .offering-panel, .ledger-panel { padding: 1.4rem 1.2rem; }
}

/* ---------- Solana vault panels ---------- */

.sol-join { margin-top: 0.7rem; }

.sol-join input,
.offering-row input[type="text"].sol-input {
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.join button.secondary,
#sol-submit {
  background: none;
  border: 1px solid var(--line);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.8rem 1.6rem;
}

.join button.secondary:hover,
#sol-submit:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: none;
}

.join .secondary {
  border-left: 1px solid var(--line);
}

.gate-sol {
  margin-top: 2rem;
  border: 1px solid var(--line);
  padding: 1.4rem 1.6rem;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.05), transparent 70%);
}

.gate-sol-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
}

.gate-sol-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gate-sol-row input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  width: min(340px, 70vw);
  outline: none;
  transition: border-color 0.3s ease;
}

.gate-sol-row input:focus { border-color: var(--gold); }

.gate-sol-error {
  margin-top: 0.8rem;
  min-height: 1.3em;
  font-style: italic;
  font-size: 0.9rem;
  color: #d97b5f;
}

.tile-tokens .tile-big { color: #b8f5c0; text-shadow: 0 0 18px rgba(120, 220, 140, 0.25); }
.tile-tokens .unit-word { color: #7fbf8a; }
.tile-tokens .sol-bound { color: var(--gold); opacity: 0.8; font-style: normal; font-size: 0.78rem; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

.sol-panel { margin-top: 1.4rem; }

#unbind-btn {
  background: none !important;
  border: 1px solid var(--line) !important;
  color: var(--ink-dim) !important;
}

#unbind-btn:hover {
  border-color: #b0533a !important;
  color: #d97b5f !important;
  box-shadow: none !important;
}

.chip-like {
  font-family: var(--font-display) !important;
  font-size: 0.66rem !important;
  letter-spacing: 0.22em;
  padding: 0.7rem 1.1rem !important;
}

/* ---------- $KENOTAF graf ---------- */

.graf-panel {
  width: 100%;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.05), rgba(255, 255, 255, 0.01));
  padding: 1.4rem 1.6rem 1.1rem;
  margin-bottom: 2.4rem;
}

.graf-panel-mini {
  /* compact ticker: ~25% of full width, centered */
  width: min(340px, 92vw);
  margin-left: auto;
  margin-right: auto;
  padding: 0.9rem 1rem 0.7rem;
}

.graf-panel-mini .graf-head { gap: 0.8rem; }
.graf-panel-mini .graf-stats { display: none; }
.graf-panel-mini .graf-mint { font-size: 0.68rem; }
.graf-panel-mini .graf-price-big { font-size: 1.3rem; }
.graf-panel-mini #graf-canvas { height: 60px; }
.graf-panel-mini .graf-unlisted-text { font-size: 0.8rem; }
.graf-panel-mini .graf-unlisted-title { font-size: 0.78rem; letter-spacing: 0.14em; }
.graf-panel-mini .graf-tf { padding: 0.25rem 0.55rem !important; font-size: 0.56rem !important; }

.graf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.graf-id { display: flex; align-items: center; gap: 0.8rem; }

.graf-name {
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  color: var(--gold-bright);
  font-size: 1.05rem;
}

.graf-mint {
  font-size: 0.8rem;
  color: var(--ink-dim);
  letter-spacing: 0.06em;
}

.graf-mint span { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }

.graf-price { text-align: right; }

.graf-price-big {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.3);
}

.graf-price-big.flash-up { animation: priceUp 0.9s ease; }
.graf-price-big.flash-down { animation: priceDown 0.9s ease; }

@keyframes priceUp {
  0% { color: #7ad588; text-shadow: 0 0 26px rgba(122, 220, 140, 0.8); }
  100% { color: var(--gold-bright); text-shadow: 0 0 18px rgba(212, 175, 55, 0.3); }
}

@keyframes priceDown {
  0% { color: #d97b5f; text-shadow: 0 0 26px rgba(217, 123, 95, 0.8); }
  100% { color: var(--gold-bright); text-shadow: 0 0 18px rgba(212, 175, 55, 0.3); }
}

.graf-change { font-size: 0.9rem; color: var(--ink-dim); }
.graf-change.up { color: #7ad588; }
.graf-change.down { color: #d97b5f; }

.graf-stats { display: flex; gap: 1.6rem; }

.graf-stats p { display: flex; flex-direction: column; align-items: center; }

.graf-stats span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.graf-stats label {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 0.2rem;
}

.graf-canvas-wrap { position: relative; margin-top: 1rem; }

#graf-canvas { width: 100%; display: block; }

.graf-unlisted {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(7, 7, 8, 0.55);
  padding: 1rem;
}

.graf-unlisted[hidden] { display: none; }

.graf-unlisted-title {
  font-family: var(--font-display);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 1rem;
}

.graf-unlisted-text {
  margin-top: 0.5rem;
  max-width: 46ch;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.95rem;
}

.graf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.graf-tfs { display: flex; gap: 0.5rem; }

.graf-tf { padding: 0.35rem 0.8rem !important; }

.graf-tf.active {
  border-color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.12) !important;
  color: var(--gold-bright) !important;
}

.graf-live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

.graf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-dim);
}

.graf-dot[data-tone="live"] { background: #7ad588; box-shadow: 0 0 8px rgba(122, 220, 140, 0.7); animation: dotPulse 2s ease-in-out infinite; }
.graf-dot[data-tone="err"] { background: #d97b5f; }
.graf-dot[data-tone="dim"] { background: var(--ink-dim); }

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
