/* =========================================================
   Secret Hitler — stilul: dosar secret din anii '30.
   Fundal de cerneală, hârtie veche, albastru liberal, roșu fascist. Fără emoji.
   ========================================================= */
:root {
  --bg: #15110d; --bg2: #1f1913; --panel: #251e17; --panel2: #31281f; --line: #4a3c2c;
  --paper: #efe2c4; --paper2: #e2d1aa; --ink: #2a2017;
  --txt: #f1e7d2; --muted: #b3a284;
  --lib: #3d7fc2; --lib-d: #1f4f80; --lib-l: #9cc6ef;
  --fas: #c43b2a; --fas-d: #7a1d12; --fas-l: #f0a090;
  --gold: #d9a441; --ok: #3f9b5b; --bad: #c43b2a;
  --head: 'Oswald', 'Arial Narrow', sans-serif; --type: 'Special Elite', 'Courier New', monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--txt); font: 16px/1.4 'Source Sans 3', system-ui, sans-serif; overflow-x: hidden;
  background: radial-gradient(1200px 600px at 50% -10%, #3a2a1a 0%, transparent 60%), repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, transparent 2px 4px), var(--bg); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
button:disabled { opacity: .45; cursor: default; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; letter-spacing: .02em; margin: 0 0 8px; }
h3 { font-size: 1.1rem; text-transform: uppercase; color: var(--paper2); display: flex; align-items: center; gap: 6px; }
h4 { font-size: 1rem; text-transform: uppercase; color: var(--gold); margin-top: 14px; }
p { margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.ic { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -0.2em; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-color: var(--line) transparent; scrollbar-width: thin; }

#app { max-width: 1500px; margin: 0 auto; padding: 0 12px 90px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin: 12px 0; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.row > .btn { flex: 1; }

/* butoane */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line);
  font-family: var(--head); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: .95rem; margin: 4px 0; }
.btn.big { width: 100%; padding: 15px 18px; font-size: 1.1rem; }
.btn.red { background: var(--fas); border-color: #e05a48; color: #fff; box-shadow: 0 3px 0 var(--fas-d); }
.btn.ghost { background: transparent; }
.btn.danger, .link.danger { color: var(--fas-l); }
.link { color: var(--gold); text-decoration: underline; padding: 6px 0; font-size: .95rem; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border-radius: 4px; background: var(--panel2); border: 1px solid var(--line); font-size: .9rem; white-space: nowrap; }
.chip small { font-size: .75rem; }
.inp { width: 100%; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line); background: #120e0a; color: var(--txt); font: inherit; font-size: 1.05rem; outline: none; }
.inp:focus { border-color: var(--gold); }
.lbl { font-family: var(--head); text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; color: var(--muted); margin: 6px 0 4px; }

/* acasă */
.home { max-width: 460px; margin: 0 auto; padding-top: 28px; text-align: center; }
.title-block { position: relative; padding: 18px 10px 8px; }
.logo { font-family: var(--head); font-size: clamp(3.2rem, 15vw, 5rem); line-height: .9; margin: 0; color: var(--paper); text-shadow: 0 4px 0 var(--fas-d), 0 0 40px rgba(196,59,42,.25); letter-spacing: .04em; }
.stamp { display: inline-block; font-family: var(--type); color: var(--fas); border: 3px solid var(--fas); padding: 2px 10px; transform: rotate(-6deg); font-size: 1rem; letter-spacing: .15em; margin-bottom: 10px; opacity: .9; }
.tagline { color: var(--muted); font-family: var(--type); font-size: .95rem; margin-top: 12px; }
.me-card { display: flex; flex-direction: column; align-items: center; }
.avatar-btn { position: relative; width: 150px; }
.avatar-btn .avatar-svg { width: 150px; height: auto; display: block; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.pill { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); background: var(--paper); color: var(--ink); font-family: var(--head); font-size: .8rem; text-transform: uppercase; padding: 3px 10px; border-radius: 3px; white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.or { color: var(--muted); font-size: .85rem; margin: 10px 0 6px; font-family: var(--type); }
.join-row { display: flex; gap: 8px; }
.join-row .code { text-transform: uppercase; text-align: center; letter-spacing: .3em; font-family: var(--head); font-size: 1.4rem; width: 50%; }
.join-row .btn { width: 50%; margin: 0; }
.demo-btn { background: var(--paper); color: var(--ink); border-color: var(--ink); flex-wrap: wrap; }
.demo-btn small { width: 100%; font-family: var(--type); text-transform: none; letter-spacing: 0; font-size: .8rem; opacity: .75; }
.fine { color: var(--muted); font-size: .78rem; margin-top: 16px; }

/* bara de sus */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px; padding: 8px 0; background: linear-gradient(var(--bg) 70%, transparent); }
.top .grow { flex: 1; min-width: 0; font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.code-chip b { font-family: var(--head); letter-spacing: .15em; }
.crown { color: var(--gold); display: inline-flex; }
.vbar { display: inline-flex; gap: 4px; }
.vmic { background: var(--ok); border-color: #5fc07c; }
.vmic.muted { background: var(--panel2); border-color: var(--line); color: var(--fas-l); }
.vforced { background: #3a1a14; border-color: var(--fas-d); color: var(--fas-l); }
.vwarn { background: var(--gold); color: var(--ink); }
.timer { font-family: var(--head); color: var(--gold); }
.timer.hurry { color: var(--fas-l); animation: pulse .6s infinite alternate; }
.offline { position: sticky; top: 0; z-index: 40; background: var(--fas); color: #fff; text-align: center; padding: 6px; font-weight: 700; }
@media (max-width: 520px) {
  .top .chip span, .vjoin span { display: none; }
  .top .chip { padding: 7px 8px; }
  .env span, .info-chip span { display: inline !important; }
}

/* lobby */
.bigcode { font-family: var(--head); font-size: 3.2rem; letter-spacing: .3em; color: var(--paper); line-height: 1.1; padding-left: .3em; }
.lplayers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.lp { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 6px; display: flex; flex-direction: column; align-items: center; font-size: .85rem; font-weight: 600; }
.lp .avatar-svg { width: 74px; height: 80px; }
.lp span { display: inline-flex; align-items: center; gap: 3px; text-align: center; }
.lp.off { opacity: .45; }
.roles-row { display: flex; gap: 8px; }
.rr { flex: 1; text-align: center; padding: 10px 4px; border-radius: 4px; border: 1px solid; }
.rr b { display: block; font-family: var(--head); font-size: 2rem; line-height: 1; }
.rr span { font-size: .85rem; text-transform: uppercase; font-family: var(--head); letter-spacing: .05em; }
.rr.lib { background: rgba(61,127,194,.15); border-color: var(--lib); color: var(--lib-l); }
.rr.fas { background: rgba(196,59,42,.15); border-color: var(--fas); color: var(--fas-l); }
.rr.hitler { background: rgba(122,29,18,.4); border-color: var(--fas-d); color: #fff; }
.tog { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.tog:first-of-type { border-top: 0; }
.tog > span:last-child { display: flex; flex-direction: column; }
.tog small { color: var(--muted); }
.tog input[type=checkbox] { display: none; }
.tog .sw { flex: 0 0 48px; height: 26px; border-radius: 3px; background: #120e0a; border: 1px solid var(--line); position: relative; transition: .2s; }
.tog .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 2px; background: var(--muted); transition: .2s; }
.tog input:checked + .sw { background: var(--fas); border-color: var(--fas); }
.tog input:checked + .sw::after { left: 25px; background: #fff; }
.tog.ro { cursor: default; opacity: .8; }
.voice-panel { display: flex; flex-direction: column; gap: 10px; border-color: var(--gold); }
.voice-panel small { display: block; color: var(--muted); margin-top: 2px; }
.sticky-cta { position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); z-index: 15; }
.wait { text-align: center; font-family: var(--type); color: var(--muted); padding: 14px; }
.vi { display: inline-flex; color: var(--ok); } .vi.off { color: var(--fas-l); } .vi.warn { color: var(--gold); } .vi.wait { color: var(--muted); }
.vi .ic { width: .95em; height: .95em; }

/* tabla */
.board { background: var(--paper); color: var(--ink); border-radius: 4px; padding: 10px; margin: 8px auto; max-width: 600px; box-shadow: 0 8px 24px rgba(0,0,0,.4), inset 0 0 40px rgba(120,80,30,.25); }
.track { border-radius: 3px; padding: 6px; margin-bottom: 8px; }
.track.lib { background: #c9dcec; border: 2px solid var(--lib-d); }
.track.fas { background: #ecc9bf; border: 2px solid var(--fas-d); }
.tl { font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.track.lib .tl { color: var(--lib-d); } .track.fas .tl { color: var(--fas-d); }
.tl small { font-size: .85rem; opacity: .8; }
.tl em { font-style: normal; font-family: var(--type); font-size: .72rem; text-transform: none; letter-spacing: 0; color: var(--fas-d); }
.slots { display: grid; gap: 5px; }
.track.lib .slots { grid-template-columns: repeat(5, 1fr); }
.track.fas .slots { grid-template-columns: repeat(6, 1fr); }
.slot { aspect-ratio: 0.72; border: 2px dashed rgba(0,0,0,.25); border-radius: 3px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px; }
.slot span { font-family: var(--head); font-size: clamp(.5rem, 1.7vw, .72rem); text-transform: uppercase; line-height: 1.05; opacity: .7; }
.track.fas .slot.hz { background: rgba(122,29,18,.12); }
.slot.on { border-style: solid; border-color: transparent; padding: 0; }
.board-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-family: var(--head); font-size: .85rem; text-transform: uppercase; }
.et { display: inline-flex; align-items: center; gap: 4px; }
.et b { font-weight: 500; font-family: var(--type); text-transform: none; font-size: .78rem; margin-left: 4px; color: var(--fas-d); }
.dot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--ink); display: inline-block; }
.dot.on { background: var(--fas); border-color: var(--fas-d); }
.deck { display: inline-flex; align-items: center; gap: 4px; }

/* cărțile */
.pcard { width: 92px; aspect-ratio: .7; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px;
  border: 3px solid; box-shadow: 0 4px 10px rgba(0,0,0,.35), inset 0 0 0 3px rgba(255,255,255,.18); font-family: var(--head); text-transform: uppercase; position: relative; }
.pcard.lib { background: linear-gradient(160deg, #4d8fd0, #2c5f94); border-color: #1a3f66; color: #eaf3fb; }
.pcard.fas { background: linear-gradient(160deg, #d24a37, #8e2417); border-color: #5e140b; color: #fbe9e4; }
.pcard .emb { width: 58%; }
.pcard b { font-size: .85rem; letter-spacing: .06em; }
.pcard small { font-size: .62rem; opacity: .8; letter-spacing: .2em; }
.pcard.mini { width: 100%; height: 100%; aspect-ratio: auto; padding: 2px; border-width: 2px; box-shadow: none; }
.pcard.mini b { font-size: clamp(.42rem, 1.4vw, .62rem); } .pcard.mini small { display: none; }
.pcard.huge { width: min(46vw, 210px); } .pcard.huge b { font-size: 1.5rem; } .pcard.huge small { font-size: .9rem; }
.rcard { width: 130px; aspect-ratio: .7; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; border: 3px solid;
  font-family: var(--head); text-transform: uppercase; box-shadow: 0 8px 20px rgba(0,0,0,.45); text-align: center; }
.rcard .emb { width: 64%; }
.rcard b { font-size: 1.35rem; letter-spacing: .08em; }
.rcard small { font-size: .65rem; letter-spacing: .08em; opacity: .85; }
.rcard.lib { background: linear-gradient(160deg, #4d8fd0, #23507f); border-color: #9cc6ef; color: #fff; }
.rcard.fas { background: linear-gradient(160deg, #d24a37, #7a1d12); border-color: #f0a090; color: #fff; }
.rcard.hitler { background: linear-gradient(160deg, #3a1a14, #120806); border-color: var(--fas); color: var(--fas-l); }
.rcard.party { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.rcard.party.lib .emb { color: var(--lib-d); } .rcard.party.fas .emb { color: var(--fas-d); }
.vcard { width: 74px; aspect-ratio: .72; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--head); border: 3px solid; box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.vcard b { font-size: 1.35rem; letter-spacing: .03em; } .vcard small { font-family: var(--type); font-size: .7rem; }
.vcard.ja { background: var(--paper); color: #222; border-color: #222; }
.vcard.nein { background: #1a1a1a; color: var(--paper); border-color: var(--paper2); }

/* masa */
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.seat { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 16px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; min-width: 0; transition: transform .15s, opacity .2s; }
.seat .num { position: absolute; top: 3px; left: 6px; font-family: var(--head); font-size: .75rem; color: var(--muted); }
.seat .face { position: relative; width: 82px; height: 92px; display: block; }
.seat .face .avatar-svg { width: 100%; height: 100%; }
.seat .nm { font-weight: 700; font-size: .85rem; line-height: 1.1; display: inline-flex; align-items: center; gap: 3px; flex-wrap: wrap; justify-content: center; word-break: break-word; }
.seat.me { border-color: var(--gold); }
.seat.off { opacity: .6; }
.seat.dead { filter: grayscale(1) brightness(.6); }
.seat.dead .rip { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--fas-l); }
.seat.dead .rip .ic { width: 44px; height: 44px; }
.seat.dead .rip b { font-family: var(--type); font-size: .7rem; background: var(--ink); padding: 1px 4px; }
.seat.pickable { border: 2px solid var(--gold); cursor: pointer; animation: glow 1.2s infinite alternate; }
.seat.picked { background: #4a3514; transform: scale(1.04); border-color: #fff; animation: none; }
.seat.dim { opacity: .4; }
.badge { font-style: normal; font-family: var(--head); text-transform: uppercase; font-size: .66rem; letter-spacing: .05em; padding: 2px 6px; border-radius: 2px; }
.badge.pres { background: var(--paper); color: var(--ink); }
.badge.chan { background: var(--gold); color: var(--ink); }
.limit { font-style: normal; font-size: .62rem; color: var(--muted); font-family: var(--type); }
.gone { font-style: normal; font-size: .66rem; color: var(--fas-l); }
.tag { font-style: normal; font-family: var(--head); text-transform: uppercase; font-size: .66rem; padding: 2px 6px; border-radius: 2px; letter-spacing: .04em; display: inline-block; }
.tag.lib { background: var(--lib); color: #fff; } .tag.fas { background: var(--fas); color: #fff; } .tag.hitler { background: #000; color: var(--fas-l); border: 1px solid var(--fas); }
.voted { position: absolute; right: -4px; bottom: 4px; background: var(--ok); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.voted .ic { width: 14px; height: 14px; }
.seat-vote { position: absolute; right: -10px; bottom: -6px; animation: flip .5s ease-out both; }
.seat-vote .vcard { width: 46px; } .seat-vote .vcard b { font-size: .85rem; } .seat-vote .vcard small { display: none; }
.rot { margin: 6px 0 0; text-align: center; }

/* acțiunea */
.action h3.your-turn { color: var(--gold); }
.action .note { background: var(--panel2); border-left: 3px solid var(--muted); padding: 8px 10px; margin-bottom: 10px; font-size: .9rem; }
.action .note.dead { border-color: var(--fas); color: var(--fas-l); display: flex; gap: 8px; }
.gov { display: flex; gap: 8px; margin: 8px 0; }
.gv { flex: 1; background: var(--paper); color: var(--ink); padding: 6px 10px; border-radius: 3px; }
.gv small { display: block; font-family: var(--head); text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; opacity: .7; }
.gv b { font-family: var(--head); font-size: 1.15rem; }
.vote-row { display: flex; gap: 14px; justify-content: center; margin: 10px 0 4px; }
.vbtn { border-radius: 6px; padding: 4px; border: 3px solid transparent; transition: transform .1s; }
.vbtn .vcard { width: 104px; } .vbtn .vcard b { font-size: 1.9rem; }
.vbtn.on { border-color: var(--gold); transform: translateY(-4px) rotate(-2deg); }
.vbtn:active { transform: scale(.96); }
.waiting { text-align: center; font-family: var(--type); color: var(--muted); margin: 8px 0; }
.result { font-family: var(--head); font-size: 1.8rem; text-align: center; padding: 8px; border-radius: 3px; letter-spacing: .05em; animation: pop .35s ease-out; }
.result.ok { background: var(--ok); color: #fff; } .result.bad { background: var(--fas); color: #fff; }
.counts { display: flex; justify-content: center; gap: 16px; font-family: var(--head); font-size: 1.2rem; margin: 8px 0; }
.counts .ja { color: var(--paper); } .counts .nein { color: var(--muted); }
.hand { display: flex; justify-content: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.hcard { position: relative; border-radius: 8px; transition: transform .15s; }
.hcard .pcard { width: 96px; }
.hcard.picked { transform: translateY(-8px) rotate(-3deg); }
.hcard.picked .pcard { outline: 3px solid var(--gold); outline-offset: 2px; }
.hmark { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); font-family: var(--type); background: var(--paper); color: var(--fas); border: 2px solid var(--fas); padding: 0 6px; font-size: .9rem; }
.confirm-box { display: flex; flex-direction: column; gap: 6px; background: var(--panel2); border: 1px solid var(--gold); padding: 10px; border-radius: 4px; margin: 8px 0; text-align: center; }
.warn-line { color: var(--fas-l); font-size: .88rem; border-left: 3px solid var(--fas); padding-left: 8px; }
.silence { display: flex; gap: 6px; align-items: center; color: var(--gold); font-family: var(--type); font-size: .9rem; }
.host-tools { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.host-tools summary { cursor: pointer; color: var(--muted); font-size: .85rem; display: flex; gap: 6px; align-items: center; }

/* reacții */
.reacts { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.reacts::-webkit-scrollbar { display: none; }
.reacts button { flex: 0 0 auto; padding: 6px 10px; border-radius: 3px; background: var(--paper); color: var(--ink); font-family: var(--head); text-transform: uppercase; font-size: .78rem; letter-spacing: .03em; border: 1px solid var(--ink); box-shadow: 0 2px 0 rgba(0,0,0,.4); }
.reacts button:active { transform: translateY(2px); box-shadow: none; }
.float-react { position: absolute; transform: translate(-50%, 0); animation: rise 2s ease-out forwards; font-family: var(--head); text-transform: uppercase; font-size: 1.15rem; background: var(--fas); color: #fff; padding: 2px 10px; border: 2px solid #fff; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 10px rgba(0,0,0,.5); }

/* chat și jurnal */
.chat-log { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.cm { display: flex; flex-direction: column; background: var(--panel2); padding: 6px 9px; border-radius: 3px; max-width: 92%; }
.cm.me { align-self: flex-end; background: #3a2c1c; }
.cm.ghost { background: #1c1c22; border: 1px dashed #555; color: #aab; }
.cm-h { display: flex; gap: 6px; align-items: baseline; font-size: .78rem; }
.cm-h em { font-style: normal; font-family: var(--type); color: #99a; }
.cm-h small { color: var(--muted); margin-left: auto; }
.cm-t { word-break: break-word; }
.chat-form { display: flex; gap: 6px; margin: -4px 0 12px; }
.chat-form .btn { margin: 0; padding: 0 16px; }
.chat-bubble { position: absolute; transform: translate(-50%, -100%); background: var(--paper); color: var(--ink); font-weight: 700; padding: 5px 11px; border-radius: 3px; max-width: 220px; font-size: .88rem; animation: bubble 4.2s ease-out forwards; pointer-events: none; z-index: 5; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.chat-bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 7px solid transparent; border-top-color: var(--paper); border-bottom: 0; }
.feed .fi { padding: 6px 0; border-top: 1px dashed var(--line); font-size: .9rem; }
.feed .fi:first-of-type { border-top: 0; }
.fi.big { font-family: var(--head); font-size: 1rem; color: var(--gold); text-transform: uppercase; }
.fi.good { color: #9fd8a8; } .fi.bad { color: var(--fas-l); } .fi.lib { color: var(--lib-l); } .fi.fas { color: var(--fas-l); }
.feed { max-height: 340px; overflow-y: auto; }

/* final */
.end { max-width: 760px; margin: 0 auto; }
.win-banner { text-align: center; padding: 22px 14px; border-radius: 4px; margin: 12px 0; border: 3px solid; animation: pop .4s ease-out; }
.win-banner .emb { width: 90px; }
.win-banner h1 { font-size: clamp(2rem, 9vw, 3.2rem); line-height: 1; margin: 6px 0; }
.win-banner.lib { background: linear-gradient(160deg, #2c5f94, #173a5e); border-color: var(--lib-l); color: #fff; }
.win-banner.fas { background: linear-gradient(160deg, #8e2417, #3a0d07); border-color: var(--fas-l); color: #fff; }
.win-banner .you { font-family: var(--type); margin-top: 10px; }
.end-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.end-row { display: flex; align-items: center; gap: 8px; background: var(--panel2); padding: 4px 8px; border-radius: 3px; border-left: 4px solid; }
.end-row.lib { border-color: var(--lib); } .end-row.fas { border-color: var(--fas); } .end-row.hitler { border-color: #000; background: #2a120d; }
.end-row .avatar-svg { width: 46px; height: 52px; }
.end-row .who { flex: 1; display: flex; flex-direction: column; }
.end-row .who small { color: var(--muted); font-size: .75rem; }

/* ecranele pe tot ecranul */
#overlay { display: none; }
#overlay.show { display: flex; position: fixed; inset: 0; z-index: 50; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; animation: fade .4s; }
#overlay.dark { background: radial-gradient(circle at 50% 40%, #16120e, #000 70%); }
#overlay.env-ov { background: rgba(0,0,0,.92); }
#overlay.fas-eyes { background: radial-gradient(circle at 50% 30%, #3a0d07, #0c0302 75%); }
#overlay.enacted { background: rgba(0,0,0,.78); }
#overlay.killed { background: radial-gradient(circle, #3a0d07, #000 80%); }
.ov-box { text-align: center; max-width: 520px; margin: auto; }
.ov-box.wide { max-width: 900px; }
.ov-box h2 { font-size: clamp(1.6rem, 6vw, 2.4rem); text-transform: uppercase; color: var(--paper); }
.ov-box small { font-family: var(--type); color: var(--muted); display: block; margin-bottom: 10px; }
.eyes-closed .ic, .eyes-open .ic { width: 76px; height: 76px; color: var(--muted); }
.eyes-open .ic { color: var(--fas-l); animation: pulse 1s infinite alternate; }
.night .ov-box > p { font-family: var(--type); }
.finger-big .finger { width: 90px; animation: raise 1s ease-out both; }
.night-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 16px; }
.nf { position: relative; background: rgba(0,0,0,.35); border: 1px solid #333; border-radius: 4px; padding: 6px; display: flex; flex-direction: column; align-items: center; }
.nf .avatar-svg { width: 84px; height: 94px; }
.nf b { font-size: .85rem; }
.nf i { font-style: normal; font-family: var(--head); text-transform: uppercase; font-size: .72rem; padding: 1px 6px; margin-top: 3px; }
.nf.unk { opacity: .5; } .nf.unk i { color: var(--muted); }
.nf.fas { border-color: var(--fas); background: rgba(196,59,42,.25); } .nf.fas i { background: var(--fas); color: #fff; }
.nf.hitler { border-color: #fff; background: rgba(0,0,0,.6); box-shadow: 0 0 22px rgba(196,59,42,.7); } .nf.hitler i { background: #000; color: var(--fas-l); border: 1px solid var(--fas); }
.nf-finger { position: absolute; top: -30px; right: -4px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); } .nf-finger .finger { width: 46px; animation: raise .8s ease-out both, wave 1.2s .8s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.envelope-big { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--paper); color: var(--ink); padding: 36px 30px; border-radius: 4px; border: 3px solid var(--ink); box-shadow: 0 16px 40px rgba(0,0,0,.6); animation: pop .4s; transform: rotate(-2deg); max-width: 320px; margin: auto; }
.envelope-big .ic { width: 90px; height: 90px; }
.envelope-big span { font-family: var(--head); font-size: 1.6rem; letter-spacing: .1em; }
.envelope-big small { color: #6a5a42; margin: 0; }
.reveal { animation: pop .4s; }
.cards2 { display: flex; gap: 12px; justify-content: center; margin-bottom: 12px; }
.reveal p { font-size: 1rem; }
.team { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 10px 0; }
.team small { width: 100%; margin: 0; font-family: var(--type); color: var(--muted); }
.team .tag { font-size: .85rem; padding: 4px 8px; }
.ov-face { position: relative; width: 150px; margin: 0 auto 10px; }
.ov-face .avatar-svg { width: 150px; height: 170px; filter: grayscale(.6); }
.ov-x { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--fas); animation: pop .3s .2s both; }
.ov-x .ic { width: 150px; height: 150px; }
.ov-timer { font-size: 2rem; }
.stampin { animation: stampin .5s cubic-bezier(.2,1.6,.5,1) both; margin: 0 auto 14px; }

/* crainicul */
#caption { position: fixed; left: 50%; top: 60px; transform: translate(-50%, -20px); z-index: 70; width: min(92vw, 640px); background: var(--paper); color: var(--ink); font-family: var(--type); padding: 10px 16px; border: 2px solid var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; text-align: center; }
#caption.show { opacity: 1; transform: translate(-50%, 0); }

/* ferestre */
#modal { display: none; }
#modal.open { display: block; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 60; animation: fade .2s; }
.sheet { position: fixed; z-index: 61; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 680px; max-height: 92vh; overflow-y: auto; background: var(--bg2); border-radius: 8px 8px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--line); animation: up .25s ease-out; }
.sheet h2 { display: flex; align-items: center; gap: 8px; padding-right: 40px; }
.sheet .x { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border-radius: 4px; background: var(--panel2); z-index: 3; display: flex; align-items: center; justify-content: center; }
.sheet-av { width: 160px; margin: 0 auto; } .sheet-av .avatar-svg { width: 100%; height: auto; }
.sheet.ask { max-width: 440px; }
.sheet.env { text-align: center; }
.sheet.env h2 { justify-content: center; padding: 0; }
.guide p, .guide li, .guide dd { font-size: .98rem; }
.guide b.l, .g-table .l { color: var(--lib-l); } .guide b.f, .g-table .f { color: var(--fas-l); }
.g-wins { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.gw { padding: 10px; border-radius: 4px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: .9rem; }
.gw .emb { width: 50px; }
.gw.lib { background: rgba(61,127,194,.2); border: 1px solid var(--lib); } .gw.fas { background: rgba(196,59,42,.2); border: 1px solid var(--fas); }
.g-table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .9rem; }
.g-table th, .g-table td { border: 1px solid var(--line); padding: 5px 6px; text-align: center; }
.g-table th { font-family: var(--head); font-weight: 500; background: var(--panel2); }
.g-warn { border-left: 3px solid var(--fas); padding-left: 10px; }
.g-dl dt { font-family: var(--head); text-transform: uppercase; color: var(--gold); margin-top: 10px; display: flex; gap: 6px; align-items: center; }
.g-dl dd { margin: 2px 0 0 0; }
.g-list li { margin-bottom: 6px; }
.sheet.editor { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: 92vh; }
.ed-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 0; }
.ed-preview { width: 130px; flex: 0 0 130px; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
.ed-btns { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 10px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tab { padding: 8px 12px; border-radius: 3px; font-family: var(--head); text-transform: uppercase; font-size: .82rem; white-space: nowrap; color: var(--muted); border: 1px solid transparent; }
.tab.on { background: var(--fas); color: #fff; }
.sheet.guide-m .tabs { margin: 0 -16px 10px; }
.ed-body { flex: 1; overflow-y: auto; padding: 4px 14px 14px; }
.part { margin-bottom: 10px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.opt { background: var(--panel); border: 2px solid var(--line); border-radius: 4px; padding: 4px; display: flex; flex-direction: column; align-items: center; font-size: .78rem; font-weight: 700; line-height: 1.1; }
.opt.on { border-color: var(--gold); background: #3a2c1c; }
.opt .mini { width: 100%; aspect-ratio: 1; background: radial-gradient(circle, #4a3a28, #1f1913); border-radius: 3px; margin-bottom: 4px; }
.opt span { min-height: 2.2em; display: flex; align-items: center; text-align: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-c { width: 40px; height: 40px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); }
.sw-c.on { border-color: #fff; box-shadow: 0 0 0 3px var(--gold); }
.texts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.texts .chip.on { background: var(--fas); border-color: var(--fas); }
.ed-foot { display: flex; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.ed-foot .btn { margin: 0; flex: 1; }

/* fișa Info */
.info-chip { border-color: var(--gold); color: var(--gold); }
.board[data-a="info"] { cursor: help; }
.info-now { background: var(--paper); color: var(--ink); border-radius: 4px; padding: 10px 12px; margin: 6px 0 10px; }
.info-now small { font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; color: var(--fas-d); }
.info-now p { margin: 4px 0 0; }
.info-now p small { font-family: inherit; text-transform: none; letter-spacing: 0; color: #5a4a36; }
.info-sec { display: grid; grid-template-columns: 140px 1fr; gap: 14px; align-items: start; border-top: 1px dashed var(--line); padding: 14px 0; }
.info-sec h4 { margin-top: 0; }
.info-sec p { margin: 4px 0; font-size: .95rem; }
.info-sec b.l { color: var(--lib-l); } .info-sec b.f { color: var(--fas-l); }
.info-vis { display: flex; justify-content: center; }
.info-cards { display: flex; gap: 6px; }
.info-cards .pcard { width: 62px; padding: 4px; } .info-cards .pcard b { font-size: .6rem; } .info-cards .pcard small { font-size: .5rem; }
.info-cards .rcard { width: 66px; padding: 4px; } .info-cards .rcard b { font-size: .7rem; } .info-cards .rcard small { display: none; }
.info-cards .vcard { width: 58px; } .info-cards .vcard b { font-size: 1.05rem; } .info-cards .vcard small { display: none; }
.info-cards .pback { width: 38px; }
.info-mini { display: grid; grid-template-columns: repeat(2, 40px); gap: 4px; }
.info-mini i { height: 26px; border-radius: 2px; } .info-mini i.lib { background: var(--lib); } .info-mini i.fas { background: var(--fas); }
.info-plates { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.info-icons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; color: var(--gold); }
.info-icons .ic { width: 30px; height: 30px; }
@media (max-width: 520px) { .info-sec { grid-template-columns: 1fr; gap: 6px; } }

/* notificări și efecte */
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: drop .25s; transition: opacity .4s, transform .4s; }
.toast.good { background: #1f5a33; } .toast.bad { background: var(--fas-d); }
.toast.out { opacity: 0; transform: translateY(-10px); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.confetti { position: absolute; top: -30px; animation: fall linear forwards; border-radius: 1px; }
body.shake #app { animation: shake .5s; }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translate(-50%, 40px); opacity: 0; } }
@keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes pulse { to { opacity: .45; } }
@keyframes glow { to { box-shadow: 0 0 16px rgba(217,164,65,.6); } }
@keyframes flip { from { transform: rotateY(90deg) scale(.6); opacity: 0; } }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -90px) scale(1); } }
@keyframes bubble { 0% { opacity: 0; transform: translate(-50%, -80%); } 8% { opacity: 1; transform: translate(-50%, -100%); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -130%); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes stampin { from { transform: scale(2.6) rotate(-12deg); opacity: 0; } }
@keyframes raise { from { transform: translateY(30px); opacity: 0; } }
@keyframes wave { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes shake { 20% { transform: translate(-8px, 2px); } 40% { transform: translate(7px, -3px); } 60% { transform: translate(-5px, 2px); } 80% { transform: translate(3px, -1px); } }

/* pe calculator: chat în stânga, masa în mijloc, acțiunile în dreapta */
@media (min-width: 1000px) {
  #app { padding: 0 18px 30px; }
  #app.scr-playing, #app.scr-ended { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "banner banner" "top top" "main side" "main chat"; gap: 0 18px; align-items: start; }
  #app.scr-ended { grid-template-columns: minmax(0, 1fr) 320px; grid-template-areas: "banner banner" "top top" "main chat"; }
  [data-region="banner"] { grid-area: banner; } [data-region="top"] { grid-area: top; }
  .grp-chat { grid-area: chat; display: flex; flex-direction: column; height: 380px; }
  .grp-chat [data-region="chatlog"] { flex: 1; min-height: 0; display: flex; }
  .grp-chat .panel.chat { flex: 1; display: flex; flex-direction: column; margin: 0 0 8px; min-height: 0; }
  .grp-chat .chat-log { flex: 1; max-height: none; }
  .grp-chat .chat-form { margin: 0; }
  .grp-main { grid-area: main; }
  .grp-side { grid-area: side; }
  .grp-side .panel:first-child { margin-top: 0; }
  .board { margin-top: 0; }
  .lobby .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .lobby { max-width: 1100px; margin: 0 auto; }
  .sticky-cta { max-width: 460px; margin: 0 auto; }
  .seats { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .seat .face { width: 96px; height: 106px; }
  .btn:hover, .chip:hover, .lp:hover, .seat:hover, .opt:hover { filter: brightness(1.15); }
  .sheet { top: 50%; bottom: auto; transform: translate(-50%, -50%); border-radius: 8px; max-height: 88vh; padding: 22px 24px; }
  .sheet.guide-m .tabs { margin: 0 -24px 10px; padding: 8px 24px; }
  @keyframes up { from { transform: translate(-50%, -46%); opacity: 0; } }
  .sheet.editor { max-width: 980px; height: 84vh; display: grid; grid-template-columns: 300px 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "head tabs" "head body" "head foot"; }
  .ed-head { grid-area: head; flex-direction: column; justify-content: center; padding: 24px; border-right: 1px solid var(--line); }
  .ed-preview { width: 240px; flex: 0 0 auto; }
  .ed-btns { width: 100%; flex: 0 0 auto; }
  .tabs { grid-area: tabs; } .ed-body { grid-area: body; padding: 8px 20px 20px; } .ed-foot { grid-area: foot; padding: 12px 20px; }
  .opts { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .pcard { width: 104px; } .hcard .pcard { width: 110px; } .rcard { width: 150px; }
}
/* pe telefon: masa sus, acțiunea imediat sub ea, chatul la final */
@media (max-width: 999px) {
  #app.scr-playing { display: flex; flex-direction: column; }
  #app.scr-playing .grp-main { order: 1; } #app.scr-playing .grp-side { order: 2; } #app.scr-playing .grp-chat { order: 3; }
  #app.scr-playing .grp-side [data-region="action"] { position: relative; }
  .seats { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
  .seat .face { width: 70px; height: 78px; }
  .seat .nm { font-size: .78rem; }
}
@media (max-width: 380px) { .g-wins { grid-template-columns: 1fr; } .vbtn .vcard { width: 88px; } }
@media (min-width: 1280px) {
  #app.scr-playing { grid-template-columns: 280px minmax(0, 1fr) 360px; grid-template-areas: "banner banner banner" "top top top" "chat main side"; }
  #app.scr-playing .grp-chat { position: sticky; top: 58px; height: calc(100vh - 70px); }
  #app.scr-playing .grp-side { position: sticky; top: 58px; max-height: calc(100vh - 70px); overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; } }
