@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;700&display=swap');
:root { --navy:#0a0f1e; --cyan:#00d4ff; --white:#f0f4ff; --silver:#c8d6e8; --muted:#8aa0c4; --felt:#0f5a3c; --felt-d:#0a3f2a; --gold:#f4c150; --cw:52px; --ink:#111827; --red:#c81e3a; --bad:#ff6b6b; --good:#5eead4; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.cc-body { background: var(--navy); color: var(--white); font-family: 'DM Sans', system-ui, sans-serif; overflow-x: hidden; min-height: 100vh; -webkit-text-size-adjust: 100%; }
.cc-body button, .cc-body input { font-family: inherit; }
.wrap { max-width: 920px; margin: 0 auto; padding: 8px 12px 28px; }
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.topbar .grow { flex: 1; }
.back { color: var(--cyan); text-decoration: none; font-size: .88rem; font-weight: 500; white-space: nowrap; }
.back:hover { text-decoration: underline; }
.chip-btn, .ghostbtn { background: rgba(255,255,255,.08); color: var(--white); border: 1px solid rgba(255,255,255,.18); border-radius: 9px; padding: 7px 11px; font-size: .84rem; cursor: pointer; min-height: 36px; }
.chip-btn:hover, .ghostbtn:hover { background: rgba(0,212,255,.18); }
h1 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 2rem; letter-spacing: 1px; margin: 4px 0 0; line-height: 1.05; }
h1 span { color: var(--gold); font-size: .6em; letter-spacing: .5px; }
.sub { margin: 2px 0 10px; font-size: .75rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.box { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 14px; }
.box h2 { margin: 0 0 8px; font-size: 1.1rem; }
label.f { display: block; margin: 12px 0 5px; font-size: .86rem; color: var(--silver); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { flex: 1 1 60px; background: rgba(255,255,255,.07); color: var(--white); border: 1px solid rgba(255,255,255,.18); border-radius: 9px; padding: 9px 6px; font-size: .88rem; cursor: pointer; min-height: 40px; }
.seg button.on { background: var(--cyan); color: #04202f; border-color: var(--cyan); font-weight: 700; }
.check { display: flex; align-items: flex-start; gap: 9px; margin: 8px 0; font-size: .88rem; color: var(--white); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--cyan); }
.check small { display: block; color: var(--muted); font-size: .76rem; }
input[type=text] { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: var(--white); border-radius: 9px; padding: 10px; font-size: 1rem; }
.cta, .btn { background: var(--cyan); color: #04202f; border: 0; border-radius: 10px; padding: 11px 16px; font-size: .98rem; font-weight: 700; cursor: pointer; min-height: 44px; }
.cta { width: 100%; margin-top: 16px; font-size: 1.05rem; }
.btn:disabled, .cta:disabled { opacity: .4; cursor: not-allowed; }
.btn.alt { background: var(--gold); color: #3b2a14; }
.btn.warn { background: var(--bad); color: #2a0606; }
.btn.sec { background: rgba(255,255,255,.1); color: var(--white); border: 1px solid rgba(255,255,255,.2); font-weight: 500; }
.fine { color: var(--muted); font-size: .76rem; margin: 10px 0 0; }

/* table */
.felt { position: relative; border-radius: 18px; padding: 10px 8px 14px; background: radial-gradient(ellipse at 50% 40%, #167a52 0%, var(--felt) 55%, var(--felt-d) 100%); border: 3px solid #3b2a14; box-shadow: inset 0 0 40px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.4); }
.seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.plate { background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 5px 9px; text-align: center; font-size: .74rem; line-height: 1.3; min-width: 74px; max-width: 46%; transition: box-shadow .2s, border-color .2s; }
.plate .nm { font-weight: 700; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .st { color: var(--silver); }
.plate.turn { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(244,193,80,.5), 0 0 14px rgba(244,193,80,.5); }
.plate.out { opacity: .45; }
.plate .cnt { display: inline-block; background: rgba(255,255,255,.14); border-radius: 8px; padding: 0 7px; font-weight: 700; }
.mini { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.mini i { display: block; width: 8px; height: 12px; border-radius: 2px; background: #234fb0; border: 1px solid #fff; margin-left: -4px; }
.status { text-align: center; min-height: 2.4em; font-size: .92rem; font-weight: 500; margin: 6px 0; text-shadow: 0 1px 2px #000; }
.status.you { color: var(--gold); font-weight: 700; }

/* cards */
.cc { position: relative; width: var(--cw); height: calc(var(--cw) * 1.42); background: linear-gradient(160deg, #fff 0%, #f1f5fb 100%); border-radius: 7px; border: 1px solid #9aa6b8; box-shadow: 0 2px 5px rgba(0,0,0,.4); user-select: none; -webkit-user-select: none; flex: 0 0 auto; font-weight: 700; overflow: hidden; transition: transform .12s, box-shadow .12s, opacity .15s; }
.cc.blk { color: var(--ink); } .cc.red { color: var(--red); }
.cc .r { position: absolute; left: 4px; top: 3px; font-size: calc(var(--cw) * .36); line-height: 1; }
.cc .sm { position: absolute; left: 4px; top: calc(var(--cw) * .42); font-size: calc(var(--cw) * .27); line-height: 1; }
.cc .big { position: absolute; right: 3px; bottom: 1px; font-size: calc(var(--cw) * .52); line-height: 1; opacity: .92; }
.cc.back { background: repeating-linear-gradient(45deg, #1b3f8f 0 5px, #234fb0 5px 10px); border: 2px solid #fff; }
.cc.tap { cursor: pointer; }
.cc.legal { box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 0 2px rgba(0,212,255,.95); }
.cc.dim { filter: brightness(.62); }
.cc.sel { transform: translateY(-12px); box-shadow: 0 6px 12px rgba(0,0,0,.5), 0 0 0 3px var(--gold); }
.cc.hot { box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(244,193,80,.8); }
.hand { --cw: 52px; margin-top: 10px; padding-top: 14px; }
.hrow { display: flex; justify-content: center; margin-bottom: 4px; }
.hrow + .hrow { margin-top: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 2px; min-height: 44px; }
.actions .btn { flex: 1 1 110px; max-width: 220px; }
.log { margin-top: 10px; font-size: .78rem; color: var(--silver); max-height: 6.2em; overflow-y: auto; line-height: 1.45; }
.log div { opacity: .75; } .log div:first-child { opacity: 1; color: var(--white); }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(2,6,16,.78); z-index: 50; display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 14px 10px; }
.modal[hidden] { display: none; }
.sheet { background: #12192f; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; padding: 16px; max-width: 640px; width: 100%; position: relative; }
.sheet h2 { margin: 0 24px 8px 0; font-size: 1.25rem; }
.sheet h3 { margin: 14px 0 4px; font-size: .98rem; color: var(--gold); }
.sheet p, .sheet li { font-size: .88rem; line-height: 1.5; color: var(--silver); }
.sheet ul { padding-left: 18px; margin: 4px 0; }
.sheet b { color: var(--white); }
.sheet .close { position: absolute; right: 10px; top: 10px; padding: 4px 9px; min-height: 30px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btnrow .btn { flex: 1 1 120px; }
.tblw { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; font-size: .84rem; margin: 6px 0; }
table.tbl th, table.tbl td { border-bottom: 1px solid rgba(255,255,255,.12); padding: 5px 6px; text-align: left; color: var(--silver); }
table.tbl th { color: var(--white); } table.tbl .num { text-align: right; }
#toast { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 30px); background: #000c; color: #fff; padding: 9px 16px; border-radius: 20px; font-size: .88rem; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }
@media (min-width: 700px) { .hand { --cw: 62px; } .wrap { padding: 12px 20px 36px; } }
