/* The Brilliant Room v4
   Landing: editorial claro (crema, serif, institucional).
   Juego: boardroom nocturno (carbón, dorado viejo, blanco hueso, rojo oscuro). */
:root {
  --bg: #0c0e12;
  --panel: #13161d;
  --panel-2: #181c25;
  --line: #262b36;
  --text: #ece9df;
  --muted: #9aa0ab;
  --brass: #c9a447;
  --brass-dim: #8f7530;
  --oxblood: #7a2230;
  --good: #6fbf8f;
  --bad: #cf6553;
  --partial: #c9a447;
  --cream: #f6f1e6;
  --cream-2: #efe8d8;
  --ink: #191611;
  --ink-soft: #4e4a40;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.55; min-height: 100vh; }
#app { width: 100%; }
.screen { display: none; }
.screen.active { display: block; animation: fade 0.4s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hidden { display: none !important; }
.wrap { max-width: 760px; margin: 0 auto; padding: 26px 22px 72px; }
.wrap-l { max-width: 1000px; margin: 0 auto; padding: 0 26px; }

/* ============ LANDING ============ */
.lp { background: var(--cream); color: var(--ink); }
.lp-mast {
  border-top: 5px solid var(--oxblood);
  border-bottom: 1px solid #d8cfba;
  padding: 18px 26px;
  background: var(--cream);
}
.lp-wordmark { letter-spacing: 0.34em; font-weight: 700; font-size: 13px; color: var(--oxblood); }
.lp-hero { padding: 72px 26px 84px; text-align: center; }
.epigraph {
  font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink-soft);
  max-width: 560px; margin: 0 auto 46px;
}
.epigraph-by { display: block; font-style: normal; font-size: 12.5px; letter-spacing: 0.06em; margin-top: 8px; color: #8a8375; }
.lp-h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 1.06; letter-spacing: -0.01em;
}
.lp-tag { font-family: var(--serif); font-style: italic; color: var(--oxblood); margin: 22px 0 30px; font-size: clamp(15px, 1.8vw, 19px); }
.lp-lede { max-width: 640px; margin: 0 auto; font-size: clamp(15px, 1.9vw, 17.5px); color: #2c2820; line-height: 1.65; }
.lp-lede strong { color: var(--ink); }
.btn-cta {
  display: inline-block; margin-top: 38px;
  padding: 17px 46px; font-size: 16px; font-weight: 700; letter-spacing: 0.05em;
  background: var(--ink); color: var(--cream); border: none; border-radius: 4px; cursor: pointer;
  transition: all 0.18s ease; font-family: var(--sans);
}
.btn-cta:hover { background: var(--oxblood); transform: translateY(-1px); }
.lp-note { margin-top: 16px; font-size: 13px; color: #8a8375; letter-spacing: 0.04em; }

.lp-dark { background: linear-gradient(180deg, #0c0e12, #11141b); color: var(--text); padding: 70px 0 76px; text-align: center; }
.lp-art { width: min(560px, 88%); height: auto; margin: 0 auto 34px; display: block; }
.lp-dark-h { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 3.6vw, 38px); line-height: 1.25; }
.lp-dark-p { max-width: 620px; margin: 20px auto 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.lp-dark-p strong { color: var(--brass); }
.mirror-chips { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 22px; line-height: 1.7; }
.mirror-chips em { color: var(--brass); font-family: var(--serif); font-size: 15px; }

.lp-quote { padding: 74px 26px; text-align: center; }
.lp-quote-t { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 3vw, 30px); color: var(--ink); max-width: 680px; margin: 0 auto; line-height: 1.4; }
.lp-final { background: var(--cream-2); border-top: 1px solid #d8cfba; padding: 64px 0 70px; text-align: center; }
.lp-final-line { font-family: var(--serif); font-size: clamp(19px, 2.6vw, 26px); color: var(--ink); letter-spacing: 0.02em; }
.fineprint-l { color: #8a8375; font-size: 12px; margin-top: 26px; max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.55; }

/* ============ JUEGO (oscuro) ============ */
.brand, .brand-small { letter-spacing: 0.32em; color: var(--brass); font-size: 12px; font-weight: 600; }
.brand { text-align: center; margin: 28px 0 36px; }
.brand-small { font-size: 10px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.progress { color: var(--muted); font-size: 12px; letter-spacing: 0.1em; }
.capital-chip { color: var(--brass); font-weight: 700; margin-right: 10px; }

.fineprint { color: #5c6470; font-size: 11.5px; margin-top: 22px; text-align: center; line-height: 1.5; }

.btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  display: block; width: 100%;
  padding: 15px 18px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  border-radius: 6px; cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--sans);
  margin-top: 18px;
}
.btn-primary { background: var(--brass); color: #14120a; border: 1px solid var(--brass); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn-primary:disabled { background: var(--panel-2); color: #566; border-color: var(--line); cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--brass); border: 1px solid var(--brass-dim); }
.btn-ghost { background: none; border: none; color: var(--muted); font-weight: 400; text-decoration: underline; }
.btn-danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.btn-danger:hover { background: rgba(207, 101, 83, 0.08); }

/* Cartas secuenciales — efecto de aparición escalonada */
.rstep { display: none; }
.rstep.active { display: block; }
.rstep.active > * { animation: rise 0.55s ease both; }
.rstep.active > *:nth-child(1) { animation-delay: 0.05s; }
.rstep.active > *:nth-child(2) { animation-delay: 0.22s; }
.rstep.active > *:nth-child(3) { animation-delay: 0.4s; }
.rstep.active > *:nth-child(4) { animation-delay: 0.55s; }
.rstep.leaving > * { animation: sink 0.22s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes sink { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* Revelación de ronda */
.reveal { text-align: center; padding: 90px 0 60px; }
.reveal-k { letter-spacing: 0.5em; color: var(--muted); font-size: 12px; }
.reveal-num { font-family: var(--serif); font-size: 110px; font-weight: 400; color: var(--brass); line-height: 1.1; margin: 10px 0; }
.reveal-title { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--text); }

/* Interstitial: la sala delibera */
.interstitial {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; text-align: center;
  animation: fade 0.3s ease;
}
.int-label { letter-spacing: 0.45em; color: var(--brass); font-size: 12px; font-weight: 700; }
.int-line { width: min(320px, 70%); height: 2px; background: var(--panel-2); margin: 22px 0 40px; overflow: hidden; border-radius: 2px; }
.int-line-fill { height: 100%; width: 40%; background: var(--brass); animation: sweep 1.1s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(320%); } }
.int-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(17px, 2.6vw, 22px); color: var(--text);
  max-width: 620px; line-height: 1.5;
}
.int-author { color: var(--muted); font-size: 13px; margin-top: 16px; letter-spacing: 0.08em; }

/* Timer */
.timer-box { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.timer-track { flex: 1; height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.timer-bar { height: 100%; width: 100%; background: var(--brass); border-radius: 999px; transition: width 0.1s linear; }
.timer-bar.danger { background: var(--bad); }
.timer-num { font-family: var(--serif); font-size: 17px; color: var(--brass); min-width: 42px; text-align: right; }
.timer-note { color: var(--bad); font-size: 13px; font-style: italic; margin-top: 12px; }

/* El fallo de la sala + Power Table */
.rank-box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin: 18px 0; }
.rk-row { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.rk-row:last-child { border-bottom: none; }
.rk-row.yours { background: rgba(201, 164, 71, 0.07); margin: 0 -18px; padding-left: 18px; padding-right: 18px; border-left: 3px solid var(--brass); }
.rk-num { font-family: var(--serif); font-size: 20px; color: var(--muted); min-width: 20px; }
.rk-row:first-child .rk-num { color: var(--brass); }
.rk-name { font-size: 14px; font-weight: 600; }
.rk-style { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.rk-you { color: var(--brass); font-size: 10px; letter-spacing: 0.14em; margin-left: 8px; border: 1px solid var(--brass-dim); border-radius: 3px; padding: 1px 6px; vertical-align: middle; }
.rk-read { color: var(--muted); font-size: 13px; font-style: italic; margin-top: 2px; }
.pt-row { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pt-row:last-child { border-bottom: none; }
.pt-row.yours { color: var(--brass); font-weight: 700; }
.pt-rank { font-family: var(--serif); min-width: 18px; color: var(--muted); }
.pt-row.yours .pt-rank { color: var(--brass); }
.pt-name { flex: 1; }
.pt-pts { font-family: var(--serif); }

.q-title { font-family: var(--serif); font-size: 26px; font-weight: 500; margin: 8px 0 6px; }
.q-sub { color: var(--muted); font-size: 13.5px; font-style: italic; margin-bottom: 16px; }
.you-line { margin-top: 14px; color: var(--text); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 12px; }
.lbl {
  display: block;
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brass); font-weight: 700; margin-bottom: 6px;
}
.lbl-bad { color: var(--bad); }

.scenario-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-left: 3px solid var(--brass);
  border-radius: 8px;
  padding: 26px 24px;
  margin-bottom: 8px;
}
.scenario-card h2 { font-family: var(--serif); font-size: 30px; font-weight: 500; margin-bottom: 14px; }
.sc-context { color: var(--text); font-size: 15px; margin-bottom: 4px; line-height: 1.65; }
.sc-stakes { font-size: 13.5px; color: var(--muted); margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.sc-stakes .lbl { display: inline; margin-right: 6px; }
.sc-decision { font-size: 14px; color: var(--brass); font-style: italic; font-family: var(--serif); }
.worse-card { border-left-color: var(--bad); }
.worse-text { margin-top: 12px; color: var(--text); font-size: 14px; font-style: italic; border-top: 1px dashed var(--bad); padding-top: 12px; }

/* Decisiones */
.candidates { display: grid; gap: 10px; }
.cand {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 17px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cand:hover { border-color: var(--brass-dim); }
.cand.selected { border-color: var(--brass); background: var(--panel-2); box-shadow: 0 0 0 1px var(--brass); }
.decision { display: flex; gap: 14px; align-items: flex-start; }
.d-letter {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--brass-dim); color: var(--brass);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 15px; margin-top: 2px;
}
.decision.selected .d-letter { background: var(--brass); color: #14120a; border-color: var(--brass); }
.d-text { font-size: 14.5px; color: var(--text); line-height: 1.55; }

/* Razones */
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reason {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 13px; cursor: pointer; transition: border-color 0.15s ease;
}
.reason:hover { border-color: var(--brass-dim); }
.reason.selected { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); background: var(--panel-2); }
.reason-label { font-size: 13.5px; font-weight: 600; }
.reason-gloss { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }

/* Apuesta */
.confidence { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.conf {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px 6px; text-align: center; cursor: pointer; transition: border-color 0.15s ease;
}
.conf:hover { border-color: var(--brass-dim); }
.conf.selected { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); background: var(--panel-2); }
.conf-label { font-size: 13px; font-weight: 700; }
.conf-amount { font-family: var(--serif); font-size: 18px; color: var(--brass); margin-top: 3px; }
.conf-gloss-line { min-height: 34px; color: var(--muted); font-size: 12.5px; margin-top: 10px; font-style: italic; }

/* Veredicto */
.verdict-result {
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 700;
  padding: 9px 0; text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.verdict-result.correct { color: var(--good); }
.verdict-result.partial { color: var(--partial); }
.verdict-result.wrong { color: var(--bad); }
.verdict-title { font-family: var(--serif); font-size: 32px; font-weight: 500; margin-bottom: 10px; }
.capital-line { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.cap-up { color: var(--good); }
.cap-down { color: var(--bad); }
.verdict-block { margin-bottom: 18px; }
.winner-play { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--brass); margin-bottom: 10px; }
.why-wins { font-size: 14.5px; line-height: 1.6; }
.verdict-cols { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 18px 0; }
@media (min-width: 560px) { .verdict-cols { grid-template-columns: 1fr 1fr; } }
.vcol { background: var(--panel); border-radius: 8px; padding: 15px 17px; font-size: 13.5px; border: 1px solid var(--line); }
.vcol.good { border-left: 3px solid var(--good); }
.vcol.bad { border-left: 3px solid var(--bad); }
.vcol ul { list-style: none; }
.vcol li { margin-bottom: 8px; padding-left: 14px; position: relative; }
.vcol li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.modifiers { display: grid; gap: 8px; margin: 18px 0; }
.modifiers p { font-size: 13px; color: var(--muted); font-style: italic; border-left: 2px solid var(--line); padding-left: 12px; }
.metrics-box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 15px 17px; }
.metric-deltas { display: flex; flex-wrap: wrap; gap: 8px; }
.mdelta { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.mdelta.up { color: var(--good); border-color: rgba(111, 191, 143, 0.4); }
.mdelta.down { color: var(--bad); border-color: rgba(207, 101, 83, 0.4); }
.one-liner {
  font-family: var(--serif); font-style: italic; font-size: 18px;
  color: var(--brass); text-align: center;
  margin: 26px 12px; line-height: 1.45;
}

/* Mirror */
.mirror-pre { text-align: center; color: var(--muted); font-size: 13px; font-style: italic; }
.mirror-h { text-align: center; font-size: 13px; letter-spacing: 0.5em; color: var(--muted); margin: 10px 0 26px; font-weight: 400; }
.m-archetype { text-align: center; color: var(--brass); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.m-variant { font-family: var(--serif); text-align: center; font-size: clamp(32px, 7vw, 48px); font-weight: 500; margin: 8px 0 20px; }
.m-diagnosis { font-size: 16px; margin-bottom: 8px; line-height: 1.65; }
.m-anchor { font-family: var(--serif); font-style: italic; font-size: 14.5px; color: var(--brass); border-left: 2px solid var(--brass-dim); padding-left: 14px; margin: 14px 0 6px; line-height: 1.6; }
.m-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 18px 0 12px; }
.stat { text-align: center; }
.stat:first-child { border-right: 1px solid var(--line); }
.stat-num { font-family: var(--serif); font-size: 36px; color: var(--brass); display: block; line-height: 1; }
.stat-lbl { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.m-plays { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 18px; display: grid; gap: 10px; }
.m-plays p span:last-child { font-family: var(--serif); font-size: 15px; }
.m-plays .lbl { white-space: nowrap; }
.epigraph-dark { text-align: center; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 14px; margin: 8px 0 6px; }
.epigraph-dark .epigraph-by { display: inline; margin-left: 6px; font-size: 12px; }
.share-row { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .share-row { grid-template-columns: 1fr 1fr; } }
