:root {
  --bg: #090c15; --bg2: #121828; --panel: #161d31; --panel2: #1d2640; --line: #2a3556;
  --text: #eaedf7; --muted: #8e98b6; --gold: #f0c04d; --gold2: #b98a1e; --red: #e5473f; --green: #3fd08f;
  --felt1: #14504d; --felt2: #0a2b2c;
  --c-white: #f3f3ee; --c-yellow: #f4c431; --c-orange: #f0782a; --c-red: #dc3a40;
  --radius: 16px;
  --head: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text); font-size: 15px; line-height: 1.4;
  background:
    radial-gradient(1200px 700px at 15% -10%, #2a1736 0%, transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, #10304a 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; }
.head { font-family: var(--head); letter-spacing: .06em; font-weight: 400; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- Buttons / Inputs ---------- */
.btn {
  border: 0; border-radius: 12px; padding: 12px 20px; font-weight: 700; letter-spacing: .02em;
  background: var(--panel2); border: 1px solid var(--line); transition: transform .08s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.gold { background: linear-gradient(180deg, #f6cf6a, #d49d2a); color: #261a00; border-color: #f6cf6a; box-shadow: 0 6px 24px rgba(240,192,77,.25); }
.btn.red { background: linear-gradient(180deg, #ef5b52, #c4342d); border-color: #ef5b52; }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
input, select {
  width: 100%; background: #0d1222; border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: 12px; font: inherit; outline: none;
}
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,192,77,.18); }
label.f { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 6px; }

/* ---------- Home ---------- */
.home { max-width: 980px; margin: 0 auto; padding: 8vh 20px 40px; text-align: center; }
.logo { font-family: var(--head); font-size: clamp(64px, 14vw, 150px); line-height: .9; letter-spacing: .08em; margin: 0;
  background: linear-gradient(180deg, #ffe49a 0%, #e0a92d 55%, #8e5f0d 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(240,192,77,.25)); }
.tag { color: var(--muted); margin: 10px 0 36px; font-size: 17px; }
.shades { font-size: 54px; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; text-align: left; }
.card-box { background: linear-gradient(180deg, var(--panel), #121828); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.card-box h3 { font-family: var(--head); font-weight: 400; font-size: 26px; letter-spacing: .06em; margin-bottom: 4px; }
.card-box p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.stack > * + * { margin-top: 12px; }
.name-row { max-width: 420px; margin: 0 auto 22px; text-align: left; }
@media (max-width: 720px) { .home-grid { grid-template-columns: 1fr; } }

/* ---------- Lobby ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 22px 18px 40px; }
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar .logo-s { font-family: var(--head); font-size: 40px; letter-spacing: .08em; color: var(--gold); line-height: 1; }
.spacer { flex: 1; }
.lobby-grid { display: grid; grid-template-columns: 360px 1fr; gap: 18px; }
@media (max-width: 880px) { .lobby-grid { grid-template-columns: 1fr; } }
.code { font-family: var(--head); font-size: 64px; letter-spacing: .25em; color: var(--gold); text-align: center; line-height: 1; padding: 8px 0 4px; }
.invite { display: flex; gap: 8px; }
.invite input { font-size: 13px; }
.plist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.pl { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #0f1527; border: 1px solid var(--line); }
.pl .nm { font-weight: 700; flex: 1; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #14110a; background: var(--c, #aaa); box-shadow: inset 0 -4px 8px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.4); flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.dot.off { background: #666; box-shadow: none; }
.badge { font-size: 11px; font-weight: 800; letter-spacing: .08em; padding: 3px 8px; border-radius: 99px; background: rgba(240,192,77,.15); color: var(--gold); border: 1px solid rgba(240,192,77,.35); text-transform: uppercase; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
@media (max-width: 640px) { .modes { grid-template-columns: 1fr; } }
.mode { text-align: left; padding: 16px; border-radius: 14px; background: #0f1527; border: 2px solid var(--line); transition: .15s; position: relative; }
.mode:not(:disabled):hover { border-color: #55638f; transform: translateY(-2px); }
.mode.sel { border-color: var(--gold); background: linear-gradient(180deg, #2a2310, #14131a); box-shadow: 0 0 0 4px rgba(240,192,77,.12), 0 14px 34px rgba(0,0,0,.4); }
.mode .ic { font-size: 28px; }
.mode .t { font-family: var(--head); font-size: 26px; letter-spacing: .06em; margin: 2px 0; }
.mode .d { color: var(--muted); font-size: 13px; }
.mode:disabled { cursor: default; }
.mode .tick { position: absolute; top: 12px; right: 14px; color: var(--gold); font-weight: 800; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--gold); padding: 0; }

/* ---------- Cards ---------- */
.card {
  --w: 62px; width: var(--w); height: calc(var(--w) * 1.42); border-radius: calc(var(--w) * .12);
  background: linear-gradient(160deg, #fffdf6, #e9e4d3); color: #1a1c26; position: relative; flex: none;
  box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08); user-select: none; transition: transform .15s, box-shadow .15s;
  font-weight: 800;
}
.card.red { color: #cf2d3a; }
.card .r { position: absolute; top: 5%; left: 9%; font-size: calc(var(--w) * .34); line-height: 1; }
.card .s { position: absolute; top: calc(var(--w) * .38); left: 9%; font-size: calc(var(--w) * .26); line-height: 1; }
.card .big { position: absolute; right: 9%; bottom: 3%; font-size: calc(var(--w) * .62); line-height: 1; opacity: .92; }
.card.joker { background: linear-gradient(160deg, #fff3c4, #e4be55); color: #7b4b00; }
.card.back {
  background: repeating-linear-gradient(45deg, #7d1f2c 0 6px, #5b1520 6px 12px);
  border: calc(var(--w) * .07) solid #f1e8d0; box-shadow: 0 6px 16px rgba(0,0,0,.45);
}
.card.back::after { content: '♠'; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.35); font-size: calc(var(--w) * .5); }
.card.empty { background: rgba(255,255,255,.04); border: 2px dashed rgba(255,255,255,.18); box-shadow: none; }
.card.empty::after { content: none; }
.card.sm { --w: 40px; } .card.xs { --w: 30px; } .card.lg { --w: 76px; } .card.xl { --w: 92px; }
.card.pick { cursor: pointer; }
.card.pick:hover { transform: translateY(-8px); }
.card.sel { transform: translateY(-14px); box-shadow: 0 0 0 3px var(--gold), 0 14px 26px rgba(0,0,0,.5); }
.card.dim { opacity: .35; }
.card.deal { animation: deal .5s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes deal { from { transform: translateY(-40px) rotate(-8deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Chips ---------- */
.chip {
  --cc: var(--c-white); --w: 54px; width: var(--w); height: var(--w); border-radius: 50%; position: relative; flex: none;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cc) 100%, #fff 25%), var(--cc) 55%, color-mix(in srgb, var(--cc) 70%, #000));
  display: grid; place-items: center; color: #20170a; font-weight: 800;
  box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 0 0 3px rgba(255,255,255,.55), inset 0 0 0 6px var(--cc), inset 0 0 0 7px rgba(0,0,0,.18);
  transition: transform .15s;
}
.chip b { font-size: calc(var(--w) * .42); line-height: 1; margin-top: -3px; }
.chip i { font-style: normal; position: absolute; bottom: calc(var(--w) * .16); font-size: calc(var(--w) * .2); line-height: 1; color: rgba(0,0,0,.55); }
.c-white { --cc: var(--c-white); } .c-yellow { --cc: var(--c-yellow); } .c-orange { --cc: var(--c-orange); } .c-red { --cc: var(--c-red); color: #fff; }
.c-red i { color: rgba(255,255,255,.75); }
.chip.dark { background: radial-gradient(circle at 35% 30%, #4a4f63, #1b1e2b 60%, #0c0e16); color: #d9dcef; box-shadow: 0 4px 10px rgba(0,0,0,.6), inset 0 0 0 3px #2e3350, inset 0 0 0 6px var(--cc), inset 0 0 0 7px rgba(0,0,0,.4); }
.chip.dark i { color: rgba(255,255,255,.5); }
.chip.fixed::after { content: '🔒'; position: absolute; right: -6px; top: -8px; font-size: 16px; filter: drop-shadow(0 2px 3px #000); }
.chip.sm { --w: 34px; } .chip.lg { --w: 66px; }
.chip.ghost { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); color: transparent; }
.chip.ghost i, .chip.ghost b { display: none; }
.chip.ghost.now { box-shadow: inset 0 0 0 2px var(--gold); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 0 0 2px var(--gold), 0 0 14px rgba(240,192,77,.5); } }

/* ---------- Game ---------- */
.hud { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20,26,44,.95), rgba(14,18,32,.85)); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.hud .brand { font-family: var(--head); font-size: 30px; letter-spacing: .1em; color: var(--gold); line-height: 1; }
.hud .heist { font-family: var(--head); font-size: 22px; letter-spacing: .08em; }
.hud .heist b { color: var(--gold); font-size: 30px; }
.tally { display: flex; gap: 6px; align-items: center; }
.tally .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-right: 4px; }
.slot { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; background: #0e1324; border: 1px solid var(--line); filter: grayscale(1) opacity(.5); transition: .3s; }
.slot.v.on { background: linear-gradient(180deg, #5a4511, #2a2008); border-color: var(--gold); filter: none; box-shadow: 0 0 14px rgba(240,192,77,.5); }
.slot.a.on { background: linear-gradient(180deg, #5a1815, #280a09); border-color: var(--red); filter: none; box-shadow: 0 0 14px rgba(229,71,63,.6); animation: blink 1s 3; }
@keyframes blink { 50% { opacity: .4; } }

.game-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; padding: 18px; max-width: 1500px; margin: 0 auto; }
@media (max-width: 1050px) { .game-cols { grid-template-columns: 1fr; } }
.seats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.seat { background: linear-gradient(180deg, var(--panel), #121828); border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: relative; transition: border-color .2s, box-shadow .2s; }
.seat.has { border-color: rgba(63,208,143,.5); }
.seat.me { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240,192,77,.15), 0 14px 30px rgba(0,0,0,.4); }
.seat .hd { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.seat .nm { font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .chips { display: flex; gap: 6px; align-items: center; }
.seat .pocket { display: flex; gap: 6px; margin-top: 10px; }
.seat .tagr { font-size: 11px; color: var(--muted); }
.seat .tick { color: var(--green); font-weight: 800; }
.seat .muscle { font-size: 16px; }

.felt { position: relative; border-radius: 28px; padding: 22px 18px 20px; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, var(--felt1), var(--felt2) 75%);
  border: 10px solid #2a1c10; box-shadow: inset 0 0 0 2px #7a5a2d, inset 0 0 60px rgba(0,0,0,.55), 0 24px 60px rgba(0,0,0,.5); margin-bottom: 14px; }
.rounds { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.rp { display: flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 99px; background: rgba(0,0,0,.3); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); border: 1px solid transparent; }
.rp .chip { --w: 20px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); } .rp .chip b, .rp .chip i { display: none; }
.rp.now { color: var(--text); border-color: var(--gold); background: rgba(0,0,0,.5); }
.rp.done { color: #bcd; }
.rp.skip { text-decoration: line-through; opacity: .4; }
.community { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.tray-lab { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #9fc9c3; margin-bottom: 10px; }
.tray { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.slotc { display: flex; flex-direction: column; align-items: center; gap: 6px; background: transparent; border: 0; padding: 4px; border-radius: 14px; }
.slotc .own { font-size: 11px; font-weight: 700; color: #cfe; min-height: 15px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slotc.free .chip { filter: drop-shadow(0 0 10px rgba(255,255,255,.2)); }
.slotc:not(.locked):hover .chip { transform: translateY(-6px) scale(1.06); }
.slotc.taken .chip { box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 0 0 3px rgba(255,255,255,.55), inset 0 0 0 6px var(--cc), 0 0 0 4px var(--own); }
.slotc.mine .chip { box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 0 0 3px rgba(255,255,255,.55), inset 0 0 0 6px var(--cc), 0 0 0 4px var(--gold), 0 0 22px rgba(240,192,77,.6); }
.slotc.locked { cursor: not-allowed; }
.status { margin-top: 16px; font-size: 14px; color: #cfe9e5; min-height: 22px; }
.bar { height: 5px; border-radius: 3px; background: rgba(0,0,0,.4); max-width: 280px; margin: 8px auto 0; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); width: 0; animation: fill 1.5s linear forwards; }
@keyframes fill { to { width: 100%; } }
.panel { background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 16px; max-width: 640px; margin: 0 auto; }
.panel h3 { font-family: var(--head); font-weight: 400; letter-spacing: .08em; font-size: 24px; color: var(--gold); margin-bottom: 6px; }
.vals { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.vals .btn { min-width: 44px; padding: 8px 10px; }
.vals .btn.sel { background: var(--gold); color: #261a00; border-color: var(--gold); }
.picks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.picks span { background: rgba(0,0,0,.35); padding: 4px 10px; border-radius: 99px; }

.myhand { display: flex; gap: 14px; margin-top: 12px; align-items: flex-end; flex-wrap: wrap; }
.myhand .cards { display: flex; gap: 10px; }
.me .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.me .chips .chip { --w: 40px; }
.me .big-note { font-size: 13px; color: var(--gold); }

aside .box { background: linear-gradient(180deg, var(--panel), #121828); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
aside h4 { margin: 0 0 10px; font-family: var(--head); font-weight: 400; letter-spacing: .1em; font-size: 20px; color: var(--gold); }
.acard { display: flex; gap: 12px; padding: 10px; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--line); background: #0f1527; }
.acard .ic { font-size: 28px; line-height: 1; }
.acard .nm { font-weight: 800; } .acard .tx { font-size: 12.5px; color: #b6bfd8; margin-top: 2px; }
.acard.ch { border-color: rgba(229,71,63,.55); background: linear-gradient(180deg, #2a1215, #130c12); }
.acard.sp { border-color: rgba(63,208,143,.55); background: linear-gradient(180deg, #0f2a22, #0b1418); }
.acard .k { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.acard.ch .k { color: #ff8b84; } .acard.sp .k { color: #6ee8b0; }
.log { max-height: 280px; overflow: auto; font-size: 13px; display: flex; flex-direction: column-reverse; }
.log div { padding: 5px 0; border-bottom: 1px dashed rgba(255,255,255,.07); color: #c5cde4; }
.note { background: rgba(240,192,77,.1); border: 1px solid rgba(240,192,77,.35); color: var(--gold); padding: 8px 10px; border-radius: 10px; font-size: 13px; margin-bottom: 6px; }
.hist { display: flex; gap: 6px; flex-wrap: wrap; }
.hist span { padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.hist .ok { background: rgba(240,192,77,.18); color: var(--gold); } .hist .no { background: rgba(229,71,63,.2); color: #ff9a93; }

/* ---------- Overlay / Showdown ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(4,6,12,.95); backdrop-filter: blur(8px); display: grid; place-items: start center; padding: 22px 12px; overflow: auto; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; } }
.sheet { width: min(900px, 100%); background: linear-gradient(180deg, #1a2240, #10162a); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 40px 100px rgba(0,0,0,.6); }
.sheet h2 { font-family: var(--head); font-weight: 400; font-size: 36px; letter-spacing: .08em; color: var(--gold); margin-bottom: 4px; }
.sd-board { display: flex; gap: 8px; justify-content: center; margin: 12px 0 18px; flex-wrap: wrap; }
.sd-row { display: grid; grid-template-columns: 56px 130px auto 1fr 40px; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #0e1427; border: 1px solid var(--line); margin-bottom: 8px; min-height: 72px; transition: .3s; }
.sd-row.hid { opacity: .35; }
.sd-row.bad { border-color: var(--red); background: linear-gradient(90deg, #3a1316, #0e1427); }
.sd-row.good { border-color: rgba(63,208,143,.5); }
.sd-row .who { font-weight: 800; }
.sd-row .hand { font-family: var(--head); font-size: 24px; letter-spacing: .06em; }
.sd-row .best { display: flex; gap: 3px; margin-top: 4px; }
.sd-row .mark { font-size: 26px; text-align: center; }
@media (max-width: 720px) { .sd-row { grid-template-columns: 44px 1fr; } .sd-row .cs, .sd-row .info { grid-column: 1 / -1; } .sd-row .mark { display: none; } }
.verdict { text-align: center; padding: 22px 10px 8px; }
.verdict .big { font-family: var(--head); font-size: clamp(44px, 9vw, 84px); letter-spacing: .1em; line-height: 1; animation: pop .6s cubic-bezier(.2,.9,.3,1.3) both; }
.verdict.win .big { background: linear-gradient(180deg, #ffe49a, #d49d2a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 24px rgba(240,192,77,.4)); }
.verdict.lose .big { color: var(--red); text-shadow: 0 0 40px rgba(229,71,63,.6); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.gres { text-align: center; font-size: 14px; margin: 6px 0; }

/* ---------- Modal ---------- */
.modal { width: min(560px, 100%); }
.modal.wide { width: min(860px, 100%); }
.cl { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.cl .acard { margin: 0; }
.x { position: absolute; right: 16px; top: 14px; }
.sheet.rel { position: relative; }
.rules h3 { margin: 18px 0 6px; font-family: var(--head); font-weight: 400; letter-spacing: .08em; font-size: 22px; color: var(--gold); }
.rules p, .rules li { color: #c9d0e6; font-size: 14px; } .rules ul, .rules ol { margin: 6px 0; padding-left: 20px; }
.rules .hr { display: flex; flex-wrap: wrap; gap: 6px; }
.rules .hr span { padding: 4px 10px; border-radius: 8px; background: #0e1427; border: 1px solid var(--line); font-size: 13px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; pointer-events: none; }
#toast div { background: #2a1215; border: 1px solid var(--red); color: #ffd7d3; padding: 10px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: fadein .2s; }
#toast div.info { background: #0f2a22; border-color: var(--green); color: #cff6e4; }
.conn { position: fixed; top: 0; left: 0; right: 0; background: var(--red); text-align: center; padding: 6px; font-weight: 700; z-index: 100; }

.seat .lockd { font-size: 15px; animation: pop .25s; }

/* ---------- Einrasten (prominent, neben den Handkarten) ---------- */
.me-row { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.me-row .seat { flex: 1 1 360px; max-width: 620px; }
.lockpanel { flex: 0 1 280px; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.lockbtn { flex: 1; min-height: 150px; border-radius: 18px; border: 3px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 12px;
  font-family: var(--head); letter-spacing: .08em; text-align: center; transition: transform .1s, box-shadow .2s, filter .2s; }
.lockbtn .li { font-size: 44px; line-height: 1; }
.lockbtn .lt { font-size: 38px; line-height: 1; }
.lockbtn .ls { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: 0; font-weight: 600; opacity: .85; }
.lockbtn.ready { background: linear-gradient(180deg, #ffd96a, #e0a223 60%, #b97d0c); color: #2a1c00; border-color: #fff0b3;
  box-shadow: 0 0 0 4px rgba(240,192,77,.25), 0 14px 38px rgba(240,192,77,.45); animation: glow 1.4s ease-in-out infinite; }
.lockbtn.ready:hover { transform: translateY(-3px) scale(1.02); filter: brightness(1.08); }
.lockbtn.ready:active { transform: scale(.98); }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgba(240,192,77,.12), 0 14px 54px rgba(240,192,77,.75); } }
.lockbtn.on { background: linear-gradient(180deg, #2fd68c, #17925e); color: #04281a; border-color: #aaf5d3; box-shadow: 0 10px 30px rgba(63,208,143,.35); }
.lockbtn.on:hover { filter: brightness(1.08); }
.lockbtn.off { background: #151b2e; color: #5f6a8c; border-color: #232c48; cursor: not-allowed; }
.lockpanel.idle { opacity: .5; }
.lp-cd { text-align: center; font-size: 13px; min-height: 20px; }
.lp-cd b { font-size: 22px; color: var(--gold); }
.cdbox { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(240,192,77,.12); border: 1px solid rgba(240,192,77,.45); color: #ffe9a8; }
.cdbox b { font-size: 24px; color: var(--gold); }

/* ---------- Showdown: Kopf + Umschalter ---------- */
.sd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #0b1020; border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 8px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--gold); color: #261a00; }
.sd-row.good { border-color: rgba(63,208,143,.65); background: linear-gradient(90deg, rgba(31,110,72,.38), #0e1427 70%); }
.sd-row.bad { border-color: var(--red); background: linear-gradient(90deg, rgba(160,36,40,.5), #0e1427 70%); }
.sd-row .mark { font-size: 28px; }

/* ---------- Hände-Cheatsheet ---------- */
#cheat-root { position: fixed; right: 12px; bottom: 12px; z-index: 60; }
.cheat { width: min(360px, calc(100vw - 24px)); max-height: min(78vh, 760px); overflow: auto; background: linear-gradient(180deg, #1c2442, #10162a); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.cheat.pinned { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(240,192,77,.2), 0 20px 60px rgba(0,0,0,.6); }
.cheat .ch-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; position: sticky; top: -10px; background: #1a2140; padding: 6px 0; z-index: 1; }
.cheat .ch-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px dashed rgba(255,255,255,.08); }
.cheat .ch-t { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.cheat .ch-t span { color: var(--muted); font-size: 11px; }
.cheat .ch-c { display: flex; gap: 3px; flex: none; }
.cheat .ch-c .card { --w: 28px; }
.cheat .ch-foot { color: var(--muted); font-size: 11px; padding-top: 8px; }
.cheat.collapsed { width: auto; }
@media (max-width: 700px) { #cheat-root { left: 12px; } }
.sd-head > div:first-child { flex: 1 1 280px; min-width: 0; }
.sd-head .seg { margin-left: auto; flex: none; }
