/* Macháček naruby — aplikace pro hráče (telefon) */
body.pl { min-height: 100vh; min-height: 100dvh; }
.pl-wrap { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* Přihlášení */
.pl-login { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 32px 22px 40px; }
.pl-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.pl-brand img { width: 96px; height: auto; }
.pl-brand .t1 { font-size: 52px; line-height: 1.05; }
.pl-brand .t2 { font-size: 64px; line-height: 1; color: var(--paper); }
.pl-brand .sub { font-size: 15px; color: var(--muted); }
.pl-form { display: flex; flex-direction: column; gap: 14px; }
.pl-code { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-family: var(--display); font-size: 34px; }
.pl-hint { font-size: 14px; color: var(--muted); text-align: center; margin: 0; }

/* Hlavička */
.pl-head {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(20,20,20,.94); border-bottom: 1px solid var(--ink-3); backdrop-filter: blur(6px);
}
.pl-head img { width: 38px; height: auto; }
.pl-who { flex: 1; min-width: 0; }
.pl-who .display { font-size: 20px; display: block; }
.pl-who small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-score { text-align: right; }
.pl-score b { font-family: var(--display); font-size: 26px; font-weight: 400; display: block; line-height: 1; }
.pl-score span { font-size: 12px; color: var(--muted); }

/* Obsah */
.pl-main { flex: 1; padding: 18px 16px 110px; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 14px; padding: 18px; }
.card h2 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.15; }
.card p { margin: 0 0 10px; line-height: 1.45; }
.card p:last-child { margin-bottom: 0; }
.banner { border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 15px; line-height: 1.4; }
.banner.ghost { background: #2b2440; color: #d8ccff; }
.banner.out { background: #3a1d20; color: #ffc4c4; }

.idle { text-align: center; padding: 28px 18px; }
.idle img { width: 150px; margin: 0 auto 8px; display: block; }
.idle .display { font-size: 34px; margin: 6px 0; }

/* Otázka */
.q-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.q-text { font-size: 24px; font-weight: 800; line-height: 1.3; margin: 0; }
.q-img { border-radius: 12px; width: 100%; max-height: 260px; object-fit: cover; background: var(--ink-3); }
.timer { height: 10px; border-radius: 99px; background: var(--ink-3); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--paper); border-radius: 99px; transition: width .2s linear; }
.timer.low i { background: var(--red-2); }
.timer-row { display: flex; align-items: center; gap: 10px; }
.timer-row .timer { flex: 1; }
.timer-row b { font-family: var(--display); font-weight: 400; font-size: 22px; min-width: 40px; text-align: right; }

.answers { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ans {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px;
  border: 0; border-radius: 12px; font-size: 19px; font-weight: 800; text-align: left; cursor: pointer;
}
.ans svg { width: 22px; height: 22px; flex: none; }
.ans .l { font-family: var(--display); font-weight: 400; font-size: 22px; width: 22px; flex: none; }
.ans:active { transform: scale(.98); }
.ans.dim { opacity: .35; }
.ans.pick { outline: 4px solid var(--paper); outline-offset: 2px; }

.sent { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 12px; }
.sent .big { font-family: var(--display); font-size: 40px; line-height: 1; }
.badge-ans { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 800; font-size: 18px; }
.badge-ans svg { width: 18px; height: 18px; }
.result-ok { color: #9fe3bf; }
.result-bad { color: var(--red-2); }

.est-row { display: flex; gap: 10px; }
.est-row select.input { font-family: var(--body); font-size: 17px; text-align: left; letter-spacing: 0; }
.est-row input.input { font-size: 26px; font-family: var(--display); text-align: center; letter-spacing: .04em; }

/* Hlasování */
.vote-list { display: flex; flex-direction: column; gap: 8px; }
.vote-btn {
  display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 56px;
  padding: 12px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--ink-2);
  font-size: 18px; font-weight: 800; cursor: pointer; text-align: left;
}
.vote-btn.on { border-color: var(--red-2); background: #3a1d20; }
.vote-btn .mark { font-size: 13px; font-weight: 800; color: var(--red-2); }

/* Skóre */
.score-big { display: flex; align-items: baseline; gap: 12px; }
.score-big b { font-family: var(--display); font-weight: 400; font-size: 64px; line-height: 1; }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.split div { background: var(--ink-3); border-radius: 10px; padding: 10px; text-align: center; }
.split b { display: block; font-family: var(--display); font-weight: 400; font-size: 24px; }
.split span { font-size: 12px; color: var(--muted); }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--ink-2); }
.rank-list li.me { background: var(--paper); color: var(--ink); }
.rank-list .n { font-family: var(--display); font-size: 20px; width: 28px; }
.rank-list .nm { flex: 1; font-weight: 700; }
.rank-list .pt { font-family: var(--display); font-size: 20px; }

/* Mise a stopy */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: 12px; padding: 14px; }
.item .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.item h3 { margin: 0; font-size: 17px; }
.item p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.item .pts { font-family: var(--display); font-size: 22px; }
.clue { border-left: 0; background: #2a1416; border-color: #4a2026; }
.clue .n { font-family: var(--display); color: var(--red-2); font-size: 16px; letter-spacing: .04em; }
.clue p { color: var(--paper); font-size: 17px; margin-top: 4px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* Role */
.role-hidden { text-align: center; padding: 30px 18px; }
.role-hidden .display { font-size: 32px; }
.role-card { border-radius: 16px; padding: 24px 18px; text-align: center; }
.role-card.verni { background: var(--paper); color: var(--ink); }
.role-card.zradce { background: var(--red); color: #fff; }
.role-card .k { font-weight: 800; letter-spacing: .2em; font-size: 13px; }
.role-card .r { font-family: var(--display); font-size: 58px; line-height: 1.1; margin: 6px 0; }
.role-card p { margin: 6px 0 0; line-height: 1.4; font-size: 15px; }
.secret h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 10px; }
.task { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: var(--ink-3); }
.task p { margin: 0; line-height: 1.4; color: var(--paper); }
.task .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mycode { font-size: 14px; color: var(--muted); text-align: center; }
.mycode b { font-family: var(--display); letter-spacing: .2em; color: var(--paper); font-weight: 400; font-size: 18px; }

/* Odhalení role po přihlášení */
.reveal {
  position: fixed; inset: 0; z-index: 50; background: rgba(10,10,10,.97); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center;
}
.reveal .pre { font-family: var(--display); font-size: 30px; color: var(--muted); animation: fadein .6s ease both; }
.reveal .role-card { width: 100%; max-width: 380px; animation: flip .9s .9s cubic-bezier(.2,.7,.2,1) both; }
.reveal .btn { animation: fadein .4s 1.9s both; }
@keyframes flip { from { transform: rotateY(90deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Spodní lišta */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: rgba(20,20,20,.97); border-top: 1px solid var(--ink-3);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabs-in { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; max-width: 520px; }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 10px;
  border: 0; background: transparent; color: var(--muted-2); font-size: 12px; font-weight: 700; cursor: pointer; min-height: 60px;
}
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--paper); }
.tab .dot { position: absolute; top: 7px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--red-2); }
