:root {
  --bg:#14161a; --card:#1f2228; --card2:#2a2e36; --line:#363b45; --text:#f3f1ec; --muted:#a3a6ad;
  --accent:#e8a23a; --accent2:#3fae6b; --bad:#e5484d; --felt:#1d5c3b; --felt2:#174a30; --radius:16px;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { margin:0; background:var(--bg); color:var(--text);
  font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
body { min-height:100dvh; padding-bottom:env(safe-area-inset-bottom); overscroll-behavior:none; }
a { color:inherit; }
button { font:inherit; color:inherit; cursor:pointer; }
h1,h2,h3 { margin:.2em 0 .4em; line-height:1.15; }
.muted { color:var(--muted); }

#top { position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between;
  padding:calc(10px + env(safe-area-inset-top)) 16px 10px; background:rgba(20,22,26,.92);
  backdrop-filter:blur(8px); border-bottom:1px solid var(--line); }
.logo { text-decoration:none; font-weight:800; font-size:20px; letter-spacing:-.01em; }
.plan { text-decoration:none; font-size:13px; font-weight:700; padding:5px 10px; border-radius:20px;
  background:var(--card2); color:var(--muted); }
.plan.on { background:var(--accent); color:#1b1408; }
main { max-width:760px; margin:0 auto; padding:14px 16px 48px; }

/* hub */
.hero { padding:12px 0 4px; }
.hero h1 { font-size:clamp(28px,7vw,40px); letter-spacing:-.02em; margin:0; }
.hero p { margin:4px 0 0; color:var(--muted); }
.search { width:100%; font:inherit; font-size:17px; padding:12px 14px; border-radius:12px; border:1px solid var(--line);
  background:var(--card); color:var(--text); margin:14px 0 8px; }
.chips { display:flex; gap:6px; overflow-x:auto; padding:2px 0 8px; scrollbar-width:none; }
.chips::-webkit-scrollbar { display:none; }
.chip { flex:none; border:1px solid var(--line); background:var(--card); border-radius:20px; padding:6px 12px; font-size:14px; }
.chip.on { background:var(--text); color:var(--bg); border-color:var(--text); }
h2.sec { font-size:13px; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); margin:22px 2px 10px; }
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.tile { position:relative; display:block; text-decoration:none; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:12px; min-height:112px; transition:transform .1s; }
.tile:active { transform:scale(.97); }
.tile .e { font-size:30px; line-height:1; }
.tile h3 { font-size:16px; margin:8px 0 2px; }
.tile p { margin:0; font-size:12px; color:var(--muted); }
.tile .badge { position:absolute; top:10px; right:10px; font-size:11px; font-weight:700; padding:2px 7px; border-radius:20px;
  background:var(--card2); color:var(--muted); }
.badge.play { background:var(--accent2); color:#06210f; }
.badge.party { background:#6d5ce8; color:#fff; }
.badge.lock { background:var(--accent); color:#1b1408; }
.tile.soon { opacity:.62; }
.feature { display:flex; gap:12px; align-items:center; background:linear-gradient(135deg,var(--felt),#0f3322);
  border-radius:var(--radius); padding:16px; margin-top:14px; text-decoration:none; }
.feature .e { font-size:44px; }
.feature b { display:block; font-size:18px; }
.feature span { color:#cfe7d8; font-size:14px; }

/* buttons & cards */
.btn { display:block; width:100%; padding:13px 16px; border-radius:12px; border:1px solid var(--line); background:var(--card2);
  font-weight:700; font-size:16px; margin:8px 0; text-align:center; text-decoration:none; transition:transform .08s; }
.btn:active { transform:scale(.97); } .btn:disabled { opacity:.4; }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#1b1408; }
.btn.green { background:var(--accent2); border-color:var(--accent2); color:#06210f; }
.btn.small { display:inline-block; width:auto; padding:8px 12px; font-size:14px; margin:4px; }
.box { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:16px; margin:12px 0; }
.row { display:flex; gap:8px; } .row > * { flex:1; }
.back { display:inline-block; color:var(--muted); text-decoration:none; font-size:14px; margin-bottom:6px; }

/* paywall */
.tiers { display:grid; gap:10px; margin-top:12px; }
.tier { display:flex; justify-content:space-between; align-items:center; background:var(--card); border:2px solid var(--line);
  border-radius:var(--radius); padding:14px 16px; cursor:pointer; }
.tier.sel { border-color:var(--accent); }
.tier b { font-size:17px; } .tier small { display:block; color:var(--muted); }
.tier .price { font-size:20px; font-weight:800; text-align:right; }
.tier .save { font-size:11px; background:var(--accent2); color:#06210f; padding:2px 6px; border-radius:10px; font-weight:700; }
ul.ticks { padding:0; list-style:none; } ul.ticks li { padding:4px 0; } ul.ticks li::before { content:"✓ "; color:var(--accent2); font-weight:800; }

/* table / felt */
.table { background:radial-gradient(ellipse at center,var(--felt),var(--felt2)); border-radius:22px; padding:12px;
  box-shadow:inset 0 0 40px rgba(0,0,0,.35); margin-top:8px; }
.opps { display:flex; gap:8px; justify-content:space-around; }
.opp { text-align:center; font-size:13px; padding:6px 8px; border-radius:12px; min-width:84px; }
.opp.turn { background:rgba(255,255,255,.14); }
.opp .backs { display:flex; justify-content:center; margin-top:4px; height:30px; }
.opp .backs i { width:20px; height:30px; border-radius:4px; background:repeating-linear-gradient(45deg,#8a2f2f,#8a2f2f 4px,#a33c3c 4px,#a33c3c 8px);
  border:1px solid #fff6; margin-left:-9px; } .opp .backs i:first-child { margin-left:0; }
.center { display:flex; align-items:center; justify-content:center; gap:18px; padding:18px 0 12px; }
.status { text-align:center; font-weight:700; min-height:24px; color:#eaf6ee; }
.suitpill { display:inline-block; padding:2px 10px; border-radius:20px; background:rgba(0,0,0,.3); margin-left:6px; }

.pcard { position:relative; width:62px; height:92px; border-radius:9px; background:#fbf8f1; color:#222; border:1px solid #0003;
  box-shadow:0 2px 6px rgba(0,0,0,.3); display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-weight:800; flex:none; user-select:none; }
.pcard .r { font-size:20px; } .pcard .s { font-size:24px; line-height:1; }
.pcard .tl { position:absolute; top:4px; left:6px; font-size:12px; }
.pcard.red { color:#c62f35; } .pcard.green { color:#2a7d3f; } .pcard.brown { color:#7b4a1e; } .pcard.gold { color:#a37812; }
.pcard.back { background:repeating-linear-gradient(45deg,#8a2f2f,#8a2f2f 6px,#a33c3c 6px,#a33c3c 12px); border:2px solid #fff; }
.pcard.back span { color:#fff; font-size:13px; }
.hand { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; padding:12px 0 4px; }
.hand .pcard { cursor:pointer; transition:transform .12s; }
.hand .pcard.ok { box-shadow:0 0 0 3px var(--accent), 0 4px 10px rgba(0,0,0,.4); transform:translateY(-6px); }
.hand .pcard.no { opacity:.55; }

/* dáma */
.board { display:grid; grid-template-columns:repeat(8,1fr); width:100%; max-width:440px; aspect-ratio:1; margin:8px auto;
  border:6px solid #5b3a1e; border-radius:8px; overflow:hidden; }
.sq { position:relative; display:flex; align-items:center; justify-content:center; }
.sq.l { background:#e9d3ae; } .sq.d { background:#9c6b3f; }
.sq.sel { background:#c9a227; } .sq.tgt::after { content:""; width:30%; height:30%; border-radius:50%; background:rgba(255,255,255,.55); }
.sq.last { box-shadow:inset 0 0 0 3px rgba(255,220,120,.7); }
.pc { width:78%; height:78%; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:clamp(12px,3.5vw,20px);
  box-shadow:inset 0 -4px 0 rgba(0,0,0,.25), 0 2px 4px rgba(0,0,0,.4); }
.pc.w { background:#f7f1e3; color:#9c6b3f; } .pc.b { background:#2b2622; color:#e8a23a; }
.pc.can { outline:3px solid var(--accent); outline-offset:1px; }

/* generál */
.dice { display:flex; justify-content:center; gap:8px; margin:14px 0 6px; }
.die { width:54px; height:54px; border-radius:12px; background:#fbf8f1; color:#222; font-size:46px; line-height:54px; text-align:center;
  border:none; box-shadow:0 3px 0 #0004; user-select:none; }
.die.held { background:var(--accent); transform:translateY(4px); box-shadow:none; }
.die.roll { animation:shake .35s; }
@keyframes shake { 30% { transform:rotate(-18deg); } 60% { transform:rotate(14deg); } }
table.score { width:100%; border-collapse:collapse; font-size:14px; margin-top:10px; }
table.score td, table.score th { padding:7px 8px; border-bottom:1px solid var(--line); text-align:right; }
table.score td:first-child, table.score th:first-child { text-align:left; }
table.score tr.pick { cursor:pointer; } table.score tr.pick td.me { color:var(--accent); font-weight:800; }
table.score tr.sum td { font-weight:800; background:var(--card2); }

#toast { position:fixed; left:50%; bottom:calc(24px + env(safe-area-inset-bottom)); transform:translate(-50%,40px); opacity:0;
  background:#fff; color:#1b1b1b; padding:10px 16px; border-radius:12px; font-weight:700; transition:.25s; z-index:50;
  pointer-events:none; max-width:90vw; text-align:center; }
#toast.on { opacity:1; transform:translate(-50%,0); }
#modal { position:fixed; inset:0; background:rgba(0,0,0,.6); display:flex; align-items:center; justify-content:center; z-index:40; padding:16px; }
#modal[hidden] { display:none; }
#modal .box { max-width:380px; width:100%; }
.warn { color:var(--accent); } .center-text { text-align:center; }
