* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; background:#0f172a; color:#e2e8f0; min-height:100vh; }
#app { max-width:560px; margin:0 auto; padding:20px 16px 40px; }
header { text-align:center; margin-bottom:18px; }
header h1 { font-size:26px; color:#fff; letter-spacing:1px; }
header .sub { font-size:13px; color:#8fa7c4; margin-top:6px; }
.card { background:#1e293b; border-radius:14px; padding:20px 18px; border:1px solid #334155; }
label { display:block; font-size:13px; color:#94a3b8; margin-bottom:8px; }
input[type=text] { width:100%; padding:12px 14px; font-size:16px; color:#fff; background:#0f172a; border:1px solid #334155; border-radius:10px; outline:none; }
input[type=text]:focus { border-color:#3b82f6; }
.btn-row { display:flex; gap:10px; margin-top:14px; }
button { flex:1; padding:12px 10px; font-size:15px; border-radius:10px; cursor:pointer; border:1px solid #334155; background:#334155; color:#e2e8f0; }
button.primary { background:#3b82f6; border-color:#3b82f6; color:#fff; font-weight:600; }
button:hover { filter:brightness(1.12); }
.hint { font-size:12px; color:#64748b; margin-top:12px; text-align:center; }
#playersStrip { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.chip { background:#1e293b; border:1px solid #334155; border-radius:10px; padding:6px 10px; font-size:13px; display:flex; align-items:center; gap:6px; }
.chip .cnt { color:#fbbf24; font-weight:600; }
.chip.active { border-color:#fbbf24; box-shadow:0 0 0 1px #fbbf24; }
.chip.out { opacity:.45; }
.dot { width:12px; height:12px; border-radius:50%; }
.dot.c1{background:#e11d48;} .dot.c2{background:#38bdf8;} .dot.c3{background:#a3e635;} .dot.c4{background:#fbbf24;}
.info { text-align:center; font-size:13px; color:#8fa7c4; margin:6px 0 12px; }
.section-title { font-size:13px; color:#94a3b8; margin:8px 0; }
#table { min-height:40px; display:flex; flex-direction:column; gap:10px; background:#1e293b; border:1px solid #334155; border-radius:12px; padding:12px; margin-bottom:8px; }
.grouprow { display:flex; gap:6px; flex-wrap:wrap; }
.grouprow.selected { background:rgba(59,130,246,.15); border-radius:8px; padding:6px; }
.cardface { width:40px; height:58px; border-radius:7px; display:flex; align-items:center; justify-content:center; font-size:18px; font-weight:700; background:#f8fafc; color:#0f172a; border:1px solid #64748b; position:relative; user-select:none; }
.cardface.cR { color:#dc2626; } .cardface.cG { color:#16a34a; } .cardface.cB { color:#2563eb; } .cardface.cY { color:#ca8a04; }
.cardface.j { background:linear-gradient(135deg,#7c3aed,#c026d3); color:#fff; font-size:22px; }
.cardface.sel { box-shadow:0 0 0 3px #fbbf24; }
.cardface .smalln { position:absolute; top:2px; left:4px; font-size:10px; }
#hand { display:flex; gap:6px; flex-wrap:wrap; min-height:58px; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.actions button { min-width:90px; }
#toast { position:fixed; left:50%; bottom:30px; transform:translateX(-50%); background:rgba(15,23,42,.92); border:1px solid #334155; color:#fff; padding:10px 18px; border-radius:10px; font-size:14px; display:none; z-index:60; }
#toast.show { display:block; }
.modal { position:fixed; inset:0; background:rgba(2,6,23,.7); display:flex; align-items:center; justify-content:center; z-index:50; }
.modal-card { background:#1e293b; border:1px solid #334155; border-radius:14px; padding:26px 24px; max-width:340px; width:90%; text-align:center; }
.modal-card h2 { color:#fff; margin-bottom:10px; }
.modal-card p { color:#94a3b8; font-size:14px; margin-bottom:8px; }
#logs { max-height:90px; overflow-y:auto; font-size:12px; color:#64748b; margin:10px 0 0; }