* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root { --felt1:#125229; --felt2:#0a341c; --gold:#e6c34a; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 50% 30%, #1a6638, var(--felt2));
  color: #fff; overflow: hidden; user-select: none;
}
.screen { max-width: 560px; margin: 0 auto; height: 100%; display: flex; flex-direction: column; padding: 14px 16px; }
.hidden { display: none !important; }

/* Menu */
#menu { align-items: center; overflow-y: auto; }
.logo { font-size: 52px; font-weight: 900; font-family: Georgia, serif; margin-top: 12px; }
.subtitle { opacity: .7; margin-bottom: 20px; font-size: 14px; }
.block { width: 100%; margin-bottom: 18px; }
.label { font-size: 12px; font-weight: 700; text-transform: uppercase; opacity: .6; margin-bottom: 8px; }
.deck-pick { display: flex; gap: 12px; }
.deck { background: rgba(255,255,255,.05); border: 2px solid transparent; border-radius: 12px; padding: 10px; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.deck img { width: 56px; height: 84px; object-fit: cover; border-radius: 6px; }
.deck.selected { border-color: var(--gold); background: rgba(255,255,255,.15); }
.diff-pick { display: flex; flex-direction: column; gap: 8px; }
.diff { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,.05); border: none; border-radius: 10px; padding: 12px; color: #fff; cursor: pointer; text-align: left; }
.diff.selected { background: rgba(255,255,255,.15); outline: 2px solid var(--gold); }
.diff .dn { font-weight: 600; }
.diff .ds { font-size: 12px; opacity: .6; }
.dots { display: flex; gap: 3px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.2); }
.dot.on { background: var(--gold); }
.target-pick { display: flex; gap: 10px; }
.target { flex: 1; background: rgba(255,255,255,.08); border: none; border-radius: 10px; padding: 10px; color: #fff; font-weight: 600; cursor: pointer; }
.target.selected { background: var(--gold); color: #000; }
.primary { width: 100%; max-width: 360px; margin-top: 10px; padding: 14px; border: none; border-radius: 12px; background: #2faa55; color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }

/* Game */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 8px; }
.topbar .title { font-weight: 700; opacity: .9; }
.ghost { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; }
.scorebar { display: flex; justify-content: space-between; align-items: center; }
.pill { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 6px 12px; }
.pill b { font-size: 13px; } .pill span { font-size: 11px; opacity: .6; } .pill em { font-size: 22px; font-weight: 700; font-style: normal; }
.pill.active { outline: 2px solid var(--gold); }
.target-mid { font-size: 12px; opacity: .5; }

.row { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.opp-row { margin: 8px 0; min-height: 90px; }
.player-row { margin-top: 6px; min-height: 116px; }
.hand-backs { display: flex; gap: -18px; }
.hand-backs .card { margin-left: -18px; }
.pile-spacer { width: 84px; }

.card { border-radius: 7px; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); object-fit: cover; }
.card.back { background-image: repeating-linear-gradient(45deg,#7a1518 0 6px,#5c1012 6px 12px); border: 1px solid rgba(255,255,255,.3); }
.hand .card { width: 68px; height: 104px; cursor: pointer; transition: transform .15s; }
.hand .card.playable { outline: 3px solid var(--gold); }
.hand .card:active { transform: translateY(-6px); }
.opp-row .card { width: 50px; height: 76px; }

.table { flex: 1; min-height: 130px; background: rgba(0,0,0,.12); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; margin: 6px 0; padding: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-content: center; justify-content: center; }
.table .card { width: 58px; height: 88px; transition: transform .25s, outline .2s; }
.table .card.capt { outline: 3px solid var(--gold); transform: scale(1.08); }

.playzone { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.playzone .who { font-size: 12px; font-weight: 700; opacity: .75; }
.playzone .card { width: 64px; height: 98px; outline: 3px solid var(--gold); animation: pop .25s ease; }
.playzone .takes { font-size: 12px; color: var(--gold); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.status { text-align: center; font-size: 15px; min-height: 22px; opacity: .9; }

/* Captured pile with face-up scope sticking out vertically */
.pile { width: 84px; height: 92px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.pile .stack { position: relative; width: 38px; height: 56px; }
.pile .stack .card { position: absolute; width: 38px; height: 56px; }
.pile .scope { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; }
.pile .scope .card { width: 34px; height: 52px; margin-left: -18px; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.pile .scope .card:first-child { margin-left: 0; }
.pile .plabel { font-size: 9px; font-weight: 600; opacity: .65; margin-top: 2px; }
.pile .plabel.has { color: var(--gold); opacity: 1; }
.pile.empty .stack { border: 1px dashed rgba(255,255,255,.2); border-radius: 5px; }

/* Overlays */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; }
.modal { background: rgba(30,40,35,.98); border-radius: 20px; padding: 24px; max-width: 420px; width: 100%; text-align: center; }
.modal h2 { margin-bottom: 14px; }
.modal .scorerow { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.08); }
.modal .totals { display: flex; justify-content: center; gap: 26px; margin: 16px 0; }
.modal .totals .t { text-align: center; } .modal .totals .t b { font-size: 30px; }
.modal button { margin-top: 14px; padding: 12px 28px; border: none; border-radius: 10px; background: #2faa55; color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.scopa-banner { font-size: 38px; font-weight: 900; color: var(--gold); text-shadow: 0 3px 8px rgba(0,0,0,.5); }
.choice-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.choice { display: flex; gap: 6px; align-items: center; background: rgba(255,255,255,.06); border: none; border-radius: 10px; padding: 8px; cursor: pointer; }
.choice img { width: 44px; height: 66px; border-radius: 5px; }
