.guest { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; display: flex; flex-direction: column; gap: 18px; min-height: 100vh; }
.loading { color: var(--muted); }
.g-head { display: flex; flex-direction: column; gap: 4px; }
.g-head .brand { font-size: 28px; }
.g-head .ev { font-size: 15px; font-weight: 700; color: var(--muted); }

.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tabs button { min-height: 48px; border: 0; background: var(--panel); color: var(--text); font-weight: 800; font-size: 14px; }
.tabs button[aria-selected="true"] { background: var(--yellow); color: var(--ink); }
.tabs button:disabled { opacity: .35; }

.panel { display: flex; flex-direction: column; gap: 14px; }
.count { align-self: flex-end; font-size: 13px; color: var(--muted); }

.poll { background: var(--panel); padding: 16px; display: flex; flex-direction: column; gap: 10px; border-left: 0; }
.poll h2 { margin: 0; font-size: 20px; }
.poll .opt { min-height: 54px; border: 2px solid var(--line); background: var(--panel-2); text-align: left; padding: 0 14px;
  font-weight: 800; font-size: 17px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; }
.poll .opt .bar { position: absolute; inset: 0 auto 0 0; background: var(--accent); opacity: .28; }
.poll .opt span { position: relative; }
.poll .opt.mine { border-color: var(--yellow); }

.feed { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--panel); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.card .kind { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--yellow); }
.card .body { font-size: 17px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.card .from { font-size: 14px; color: var(--muted); }
.card img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.reacts { display: flex; gap: 6px; flex-wrap: wrap; }
.reacts button { min-width: 44px; min-height: 40px; background: var(--panel-2); border: 0; font-size: 18px; }
.empty { color: var(--muted); font-size: 15px; }

.photo-drop { min-height: 220px; border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; color: var(--muted); font-weight: 800; text-align: center; padding: 16px; position: relative; }
.photo-drop img { max-width: 100%; max-height: 320px; }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.rules { background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.rules h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 26px; }
.rules ul { margin: 0; padding-left: 18px; line-height: 1.6; }

.foot { margin-top: auto; text-align: center; font-size: 13px; color: var(--muted); }
.sent { background: var(--panel); padding: 18px; text-align: center; font-weight: 800; }

/* ---------- games ---------- */
.game-card { background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 14px; border-top: 6px solid var(--yellow); }
.game-card h2 { margin: 0; font-size: 22px; line-height: 1.25; }
.game-card .gk { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--yellow); }
.qtop { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; color: var(--muted); }
.qtop b { color: var(--yellow); font-size: 18px; }
.qopts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qopt { min-height: 110px; border: 0; background: var(--c); color: var(--ink); font-weight: 800; font-size: 16px; line-height: 1.2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; overflow-wrap: anywhere; }
.qopt .qk { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; }
.qopt:disabled { opacity: .35; cursor: default; }
.qopt.picked { opacity: 1; box-shadow: inset 0 0 0 5px var(--ink), 0 0 0 3px #fff; }
.verdict { font-family: var(--display); font-size: 40px; line-height: 1.1; text-align: center; padding: 18px 10px; background: var(--panel-2); }
.verdict.yes { background: var(--yellow); color: var(--ink); }
.verdict.no { background: var(--pink); color: var(--ink); }
.standing { margin: 0; text-align: center; font-weight: 800; font-size: 17px; }
.bcode { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--pink); color: var(--ink); padding: 14px; }
.bcode span { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.bcode b { font-family: var(--display); font-weight: 400; font-size: 52px; letter-spacing: 4px; line-height: 1; }
.prizes { margin: 0; padding-left: 18px; line-height: 1.6; font-weight: 700; }
.keypad { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.key { min-height: 52px; border: 0; background: var(--panel-2); color: #fff; font-family: var(--display); font-size: 26px; }
.key:nth-child(3n+1) { background: var(--pink); color: var(--ink); }
.key:nth-child(3n+2) { background: var(--yellow); color: var(--ink); }
.key:disabled { opacity: .3; }
.key.picked { opacity: 1; box-shadow: inset 0 0 0 4px var(--ink), 0 0 0 3px #fff; }
.numin { font-size: 32px; text-align: center; font-weight: 800; }
.qimg { width: 100%; max-height: 260px; object-fit: contain; background: #000; display: block; }

/* ---------- bingo, race, box on phones ---------- */
.bcard { display: grid; gap: 4px; }
.bcard.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bcard.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bcard.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bcard.cols-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.bcard .cell { min-height: 48px; border: 0; background: #fff; color: var(--ink); font-family: var(--display); font-size: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; }
.bcard.cols-9 .cell { min-height: 44px; font-size: 18px; }
.bcard.cols-3 .cell { min-height: 80px; font-size: 36px; }
.bcard .cell.blank { background: var(--panel-2); }
.bcard .cell.free { background: var(--yellow); }
.bcard .cell.dab { background: var(--pink); color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); }
.bcard.music .cell { min-height: 74px; font-family: var(--body); font-size: 11px; font-weight: 800; line-height: 1.15; text-align: center; overflow: hidden; }
.bcard.music .cell .st { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bcard.music .cell .sa { font-weight: 500; font-size: 10px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bingo-btn { background: var(--yellow); font-size: 34px; min-height: 70px; }
.runners { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.runner { min-height: 92px; border: 2px solid var(--line); background: var(--panel-2); color: var(--text); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px; }
.runner .ri { font-size: 40px; line-height: 1; }
.runner .rl { font-size: 13px; font-weight: 800; color: var(--muted); }
.runner.picked { border-color: var(--yellow); background: var(--yellow); }
.runner.picked .rl { color: var(--ink); }
.boxes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.bxb { min-height: 64px; border: 3px solid #ffb3c6; background: linear-gradient(180deg, #e0003a, #8a0024); color: #fff; font-family: var(--display); font-size: 28px; }
.bxb.mine { border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow); }
.bxb.open { background: var(--panel-2); border-color: var(--line); }
.bxb .bp { font-family: var(--body); font-size: 11px; font-weight: 800; color: var(--yellow); }
.bxb:disabled { opacity: .45; }
.deal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.deal-yes { background: #2BD47D; }
.deal-no { background: #e0003a; color: #fff; }
.tickets { display: flex; flex-direction: column; gap: 6px; }
.tk { display: flex; justify-content: space-between; align-items: center; border-left: 10px solid var(--c); background: var(--panel-2); padding: 8px 12px; font-weight: 800; }
.tk b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.tk.latest { background: var(--c); color: var(--ink); }

/* ---------- app-style layout ---------- */
.guest { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body:has(.guest) { background: radial-gradient(120% 60% at 0% 0%, rgba(255,0,153,.22), transparent 60%),
  radial-gradient(100% 50% at 100% 100%, rgba(255,238,0,.10), transparent 60%), var(--ink); background-attachment: fixed; }
.g-head { position: sticky; top: 0; z-index: 5; margin: -20px -16px 0; padding: 14px 16px 12px;
  background: rgba(11,11,14,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(11,11,14,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(255,255,255,.08);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; }
.tabbar button { min-height: 60px; border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; font-size: 12px; font-weight: 800; border-radius: 12px; }
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-selected="true"] { color: var(--ink); background: var(--yellow); }
.tabbar button:disabled { opacity: .3; }
.game-banner { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 52px; border: 0; padding: 0 16px;
  background: var(--pink); color: var(--ink); font-weight: 800; font-size: 16px; animation: bannerPulse 1.6s ease-in-out infinite alternate; }
@keyframes bannerPulse { to { box-shadow: 0 0 24px rgba(255,0,153,.6); } }
.card, .poll, .game-card, .rules { border-radius: 14px; }
.card { background: rgba(23,23,28,.9); }
.card img { border-radius: 10px; }
.reacts { gap: 4px; }
.reacts button { min-width: 44px; min-height: 36px; background: rgba(255,255,255,.05); border-radius: 999px; font-size: 17px; }
.reacts button.popped { animation: reactPop .4s cubic-bezier(.2,1.8,.4,1); background: rgba(255,0,153,.3); }
@keyframes reactPop { 40% { transform: scale(1.35); } to { transform: none; } }
.input, textarea.input { border-radius: 10px; }
.btn { border-radius: 12px; }
.qopt, .runner, .bxb, .key, .bcard .cell, .verdict, .bcode, .tk { border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .game-banner, .reacts button.popped { animation: none; } }
