/* ZAEVOR: TRONUL — stilul jocului (/joc). O coloană pentru telefon; ecranele de start/final/cont acoperă tot și derulează singure. */
:root {
  --bg: #050508;
  --panel: #121017;
  --line: rgba(212, 175, 95, 0.22);
  --text: #f4efe4;
  --muted: #a49d90;
  --gold: #d4af5f;
  --gold-hi: #f5e2b0;
  --villain: #ff6b5a;
  --display: 'Unbounded', 'Arial Black', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
html, body { min-height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--body); margin: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  -webkit-tap-highlight-color: transparent; user-select: none; overflow-x: hidden;
}
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.app { position: relative; z-index: 1; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding-block: 12px 90px; min-height: 100vh; box-sizing: border-box; }
button, a.btn { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

/* Antet */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { font-family: var(--display); font-weight: 800; letter-spacing: 0.18em; font-size: 13px; color: var(--gold-hi); }
.brand small { display: block; font-size: 9px; letter-spacing: 0.4em; color: var(--gold); font-weight: 600; margin-top: 3px; }
.top-r { display: flex; gap: 8px; align-items: center; }
.tag { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; color: #120e05; background: var(--gold); padding: 5px 9px; border-radius: 999px; }
.sound { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(18,16,23,0.8); display: grid; place-items: center; }
.sound svg { width: 20px; height: 20px; fill: var(--gold-hi); }

/* Barele de putere */
.bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-hi); opacity: 0; transform: scale(0.4); transition: opacity .15s, transform .15s; box-shadow: 0 0 8px var(--gold-hi); }
.bar .dot.on { opacity: 1; transform: scale(1); }
.bar .dot.big { width: 13px; height: 13px; }
.meter { position: relative; width: 46px; height: 54px; border-radius: 13px; overflow: hidden; background: rgba(27,24,32,0.9); border: 1px solid var(--line); }
.meter i { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: linear-gradient(180deg, var(--gold-hi), #a77b2f); transition: height .45s cubic-bezier(.2,.9,.2,1); }
.meter i.low, .meter i.high { background: linear-gradient(180deg, #ffb3a8, var(--villain)); }
.meter svg { position: absolute; inset: 0; margin: auto; width: 24px; height: 24px; z-index: 1; fill: #f4efe4; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.9)); }
.bar span { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.bar.flash .meter { animation: flash .5s ease; }
@keyframes flash { 40% { box-shadow: 0 0 0 3px rgba(245,226,176,0.6), 0 0 20px rgba(245,226,176,0.5); } }
.reign { text-align: center; margin: 0; font-size: 13px; color: var(--muted); }
.reign b { font-family: var(--display); color: var(--gold-hi); font-size: 15px; }

/* Cartea: înălțimea vine din conținut, întrebarea e mereu în interiorul ei */
.stage { position: relative; display: flex; justify-content: center; }
.card {
  --c: 245,195,91; position: relative; width: 100%; max-width: 360px; border-radius: 26px; touch-action: pan-y;
  background: radial-gradient(90% 55% at 50% 25%, rgba(var(--c),0.25), transparent 70%), linear-gradient(165deg, rgba(30,26,36,0.96), rgba(12,11,16,0.97));
  border: 1px solid rgba(var(--c),0.65); box-shadow: 0 26px 60px rgba(0,0,0,0.6), 0 0 46px rgba(var(--c),0.2);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 18px 20px; box-sizing: border-box;
  transition: transform .35s cubic-bezier(.2,.9,.2,1), opacity .3s;
}
.card.dragging { transition: none; }
.role { font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; padding: 5px 11px; border-radius: 999px; background: rgba(var(--c),0.16); color: rgb(var(--c)); border: 1px solid rgba(var(--c),0.5); }
.portrait { width: min(58%, 210px); aspect-ratio: 1; margin-top: 4px; }
.portrait svg, .portrait img { width: 100%; height: 100%; display: block; }
.who { font-family: var(--display); font-weight: 800; font-size: 19px; text-align: center; margin: 2px 0 0; text-wrap: balance; }
.side { font-size: 10.5px; color: rgb(var(--c)); letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; opacity: 0.85; }
.say { margin: 12px 0 0; padding: 14px 14px; width: 100%; box-sizing: border-box; border-radius: 16px; background: rgba(0,0,0,0.35); border: 1px solid rgba(var(--c),0.25);
  font-size: 16.5px; line-height: 1.45; text-align: center; text-wrap: balance; color: #f6eedd; }
.choice { position: absolute; top: 14px; max-width: 44%; padding: 8px 12px; border-radius: 12px; font-weight: 800; font-size: 13.5px; line-height: 1.25; background: #f4efe4; color: #0b0a0d; opacity: 0; transition: opacity .1s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 2; }
.choice.left { left: 12px; transform: rotate(-4deg); }
.choice.right { right: 12px; transform: rotate(4deg); text-align: right; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act { min-height: 60px; border-radius: 16px; border: 1px solid var(--line); background: rgba(18,16,23,0.92); font-weight: 800; font-size: 14px; padding: 8px 10px; line-height: 1.2; }
.act small { display: block; font-size: 10px; color: var(--muted); letter-spacing: 0.12em; font-weight: 700; margin-bottom: 4px; }
.act:active { transform: scale(0.98); }
.hint { text-align: center; font-size: 11.5px; color: var(--muted); margin: 0; }

/* Ecranele de start și final: acoperă tot ecranul, cu fundal opac, și derulează singure */
.screen { position: fixed; inset: 0; z-index: 10; overflow-y: auto; background: rgba(5,5,8,0.97);
  padding: calc(env(safe-area-inset-top, 0px) + 20px) max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 100px) max(16px, env(safe-area-inset-left, 0px)); }
.screen[hidden] { display: none !important; }
.screen .inner { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; min-height: 100%; justify-content: center; }
.screen h1 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 9vw, 40px); line-height: 1.05; margin: 0; text-wrap: balance; }
.screen h1 em { font-style: normal; color: var(--gold-hi); }
.lead { margin: 0; font-size: 15px; line-height: 1.55; color: #ddd4c2; }
.cast { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.cast div { flex: 0 0 64px; width: 64px; height: 64px; }
.label { font-size: 11px; letter-spacing: 0.18em; font-weight: 800; color: var(--gold); margin: 4px 0 0; }
.factions { display: grid; gap: 8px; }
.fac { --c: 245,195,91; position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; text-align: left; min-height: 62px; padding: 10px 46px 10px 14px; border-radius: 16px; border: 1px solid rgba(var(--c),0.35); background: rgba(17,16,23,0.9); }
.fac svg { width: 30px; height: 30px; fill: rgb(var(--c)); filter: drop-shadow(0 0 8px rgba(var(--c),0.7)); justify-self: center; }
.fac b { display: block; font-family: var(--display); letter-spacing: 0.14em; font-size: 14px; color: rgb(var(--c)); }
.fac span { font-size: 12px; color: var(--muted); }
.fac.on { border: 2px solid rgb(var(--c)); background: rgba(var(--c),0.12); box-shadow: 0 0 6px rgba(var(--c),0.9), 0 0 22px rgba(var(--c),0.45); }
.fac.on::after { content: '✓'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--c)); color: #0b0a0d; font-weight: 900; }
.fac[data-f="noctis"] { --c: 183,156,255; } .fac[data-f="vortex"] { --c: 92,200,255; }
.go { min-height: 58px; border: none; border-radius: 18px; font-family: var(--display); font-weight: 800; font-size: 16px; color: #120e05; background: linear-gradient(100deg, #c39a4c, var(--gold-hi) 50%, var(--gold)); box-shadow: 0 12px 34px rgba(212,175,95,0.3); }
.go:disabled { opacity: 0.45; box-shadow: none; }
.btn { min-height: 52px; border-radius: 16px; border: 1px solid var(--line); background: rgba(18,16,23,0.92); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; padding: 0 12px; }
.btn.wa { border-color: rgba(37,211,102,0.55); color: #8ff0b5; }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
.end-card { border-radius: 22px; border: 1px solid var(--line); background: var(--panel); padding: 18px; display: grid; gap: 10px; }
.end-top { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; }
.end-top div:first-child { width: 76px; height: 76px; }
.end-title { font-family: var(--display); font-weight: 800; font-size: 22px; margin: 0; color: var(--gold-hi); text-wrap: balance; }
.end-why { margin: 0; font-size: 15px; line-height: 1.5; color: #e9e0cd; }
.end-who { font-size: 11px; color: var(--villain); font-weight: 800; letter-spacing: 0.12em; }
.share { white-space: pre-wrap; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; line-height: 1.6; background: #0b0a0e; border: 1px dashed var(--line); border-radius: 14px; padding: 12px; margin: 0; user-select: text; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.war { display: grid; gap: 8px; }
.war div { display: grid; grid-template-columns: 76px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.war i { display: block; height: 8px; border-radius: 99px; }
.toast { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 14px); transform: translate(-50%, -20px); opacity: 0; z-index: 30; background: #1b160c; border: 1px solid var(--gold); color: var(--gold-hi); padding: 10px 16px; border-radius: 12px; font-weight: 800; font-size: 13px; transition: .2s; pointer-events: none; max-width: 86vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Telefoane cu ecran scund: totul încape fără derulare */
@media (max-height: 720px) {
  .app { gap: 8px; padding-block: 8px 84px; }
  .meter { height: 42px; width: 42px; } .meter svg { width: 20px; height: 20px; }
  .portrait { width: min(40%, 150px); }
  .who { font-size: 17px; } .say { font-size: 15px; margin-top: 8px; padding: 10px 12px; }
  .act { min-height: 52px; } .hint { display: none; }
}
/* Butonul „?”, indiciul de pe prima carte, ecranul „Cum se joacă” */
.help { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(18,16,23,0.8); color: var(--gold-hi); font-family: var(--display); font-weight: 800; font-size: 16px; }
.coach { position: absolute; inset: 52px 0 auto; display: flex; justify-content: center; pointer-events: none; z-index: 3; }
.coach[hidden] { display: none !important; }
.coach span { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; background: rgba(5,5,8,0.88); border: 1px solid var(--gold); color: var(--gold-hi); font-weight: 800; font-size: 13px; box-shadow: 0 8px 26px rgba(0,0,0,0.6); }
.coach i { display: inline-block; font-style: normal; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }
.steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 16px; background: rgba(18,16,23,0.92); border: 1px solid var(--line); }
.steps b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(212,175,95,0.14); color: var(--gold-hi); font-family: var(--display); font-size: 18px; }
.steps p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #e9e0cd; }
.steps strong { color: var(--gold-hi); }
.demo-swipe { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; font-weight: 800; }
.demo-swipe span { padding: 6px 10px; border-radius: 10px; background: #f4efe4; color: #0b0a0d; }

/* Sfetnicul Tronului: butonul cu logo-ul tronului și fereastra de întrebări */
.adv-btn { position: fixed; z-index: 15; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); width: 64px; height: 64px; border-radius: 18px; padding: 0; border: 1px solid rgba(245,226,176,0.7); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 24px rgba(212,175,95,0.45); background: #000; }
.adv-btn img { width: 100%; height: 100%; display: block; }
.adv-btn::after { content: '?'; position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #120e05; font-weight: 900; font-size: 13px; display: grid; place-items: center; }
.adv-panel { position: fixed; z-index: 16; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); max-width: 420px; margin-left: auto; max-height: 70vh; display: flex; flex-direction: column; border-radius: 22px; border: 1px solid rgba(245,226,176,0.4); background: rgba(10,9,13,0.97); box-shadow: 0 30px 80px rgba(0,0,0,0.75); overflow: hidden; }
.adv-panel[hidden] { display: none !important; }
.adv-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--line); }
.adv-head img { width: 42px; height: 42px; border-radius: 12px; }
.adv-head div { flex: 1; min-width: 0; }
.adv-head b { display: block; font-family: var(--display); font-size: 12.5px; letter-spacing: 0.14em; color: var(--gold-hi); }
.adv-head small { color: var(--muted); font-size: 11px; }
.adv-head button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 20px; color: var(--gold-hi); }
.adv-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 0; user-select: text; }
.adv-msg { margin: 0; max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.adv-msg.bot { align-self: flex-start; background: #17140e; border: 1px solid rgba(212,175,95,0.25); }
.adv-msg.me { align-self: flex-end; background: linear-gradient(100deg, #b98d3e, var(--gold-hi)); color: #120e05; font-weight: 700; }
.adv-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; max-height: 30vh; overflow-y: auto; }
.adv-chip { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(212,175,95,0.5); background: rgba(212,175,95,0.08); font-size: 12.5px; font-weight: 700; }
.adv-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.adv-form input { flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #0d0c10; color: var(--text); padding: 0 12px; font: inherit; font-size: 16px; }
.adv-form button { width: 52px; border-radius: 12px; border: none; background: var(--gold); color: #120e05; font-weight: 900; }

/* Cardul imagine de la final */
.card-img { width: 100%; border-radius: 18px; border: 1px solid var(--line); display: block; background: #0b0a0e; aspect-ratio: 1080 / 1350; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Contul, clasamentul și rezultatul din rețea */
.acct-btn { min-height: 40px; max-width: 132px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(18,16,23,0.8); color: var(--gold-hi); font-weight: 800; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { background: none; border: none; padding: 0; color: var(--gold-hi); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; min-height: 0; }
.acct-line { margin: 0; font-size: 13.5px; line-height: 1.55; color: #ddd4c2; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(18,16,23,0.9); }
.fac-note { margin: 0; font-size: 12.5px; color: var(--gold-hi); }
.fac:disabled { opacity: 0.35; }
.invited { margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(212,175,95,0.12); border: 1px solid var(--gold); color: var(--gold-hi); font-weight: 800; font-size: 13.5px; }
.invited[hidden], .fac-note[hidden] { display: none; }
.result { margin: 0; padding: 14px; border-radius: 16px; border: 1px solid var(--gold); background: rgba(212,175,95,0.1); font-size: 14.5px; line-height: 1.5; color: #f1e7d2; }
.result b { color: var(--gold-hi); }
.top-list ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.top-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgba(18,16,23,0.9); border: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.top-list li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-list li.me { border-color: var(--gold); background: rgba(212,175,95,0.12); }
.top-list li.empty { display: block; color: var(--muted); font-size: 13px; }
.top-list .pos { font-family: var(--display); font-weight: 800; color: var(--gold); }
.top-list .d { color: var(--muted); font-weight: 700; font-size: 13px; }
.top-list .note { margin-top: 8px; }
.back { color: var(--muted); font-size: 13px; text-align: center; }
.back a { color: var(--gold-hi); }
.ver { text-align: center; font-size: 11px; color: #6f695f; margin: 0; }
/* Fereastra contului */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: rgba(18,16,23,0.92); border: 1px solid var(--line); }
.tabs button { min-height: 44px; border-radius: 12px; border: none; background: none; font-weight: 800; color: var(--muted); }
.tabs button.on { background: var(--gold); color: #120e05; }
.acct-form { display: grid; gap: 12px; }
.acct-form[hidden] { display: none; }
.acct-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: var(--gold); }
.acct-form input[type=text], .acct-form input[type=tel] { min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: #0d0c10; color: var(--text); padding: 0 14px; font: inherit; font-size: 17px; letter-spacing: normal; }
.acct-form input:focus { border-color: var(--gold); outline: none; }
.acct-form small { font-weight: 500; letter-spacing: normal; color: var(--muted); font-size: 12px; line-height: 1.45; }
.check { display: grid !important; grid-template-columns: 24px 1fr; gap: 10px !important; align-items: start; font-weight: 500 !important; letter-spacing: normal !important; color: #ddd4c2 !important; font-size: 13px !important; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--gold); }
.check a { color: var(--gold-hi); }
.hst { font-size: 12.5px; font-weight: 700; min-height: 1em; }
.hst.ok { color: #7be0a6; } .hst.bad { color: var(--villain); }
.err { margin: 0; color: #ff9a8c; font-weight: 700; font-size: 13.5px; min-height: 1em; }
.x { align-self: flex-end; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--gold-hi); font-size: 22px; }
#acct { background: #050508; } /* contul se completează pe un fundal opac, fără textul jocului în spate */
.start-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lang-btn { flex: 0 0 auto; min-width: 48px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: rgba(18,16,23,0.9); color: var(--gold-hi); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; }
