/* 홀덤 — 3D 장면 위에 얹는 화면. 색·글자는 family-ui 토큰, 폰 우선(390px). */
html, body { margin: 0; height: 100%; overflow: hidden; background: #14110f; overscroll-behavior: none; touch-action: manipulation; }
body { font-family: var(--font); color: #fff; -webkit-tap-highlight-color: transparent; user-select: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
button { font-family: inherit; }

/* 위쪽 줄 */
.top { position: fixed; left: 0; right: 0; top: 0; z-index: 5; display: flex; gap: 8px; align-items: center; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-left)) 8px; pointer-events: none; }
.top > * { pointer-events: auto; }
.grow { flex: 1; }
.pill { min-height: 44px; min-width: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 22px; background: rgba(20, 17, 15, .72); backdrop-filter: blur(8px); color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .12s var(--ease-out, ease-out); }
.pill:active { transform: scale(var(--press-scale, .96)); }
.pill.back { font-size: 20px; padding: 0; width: 44px; }
.coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe27a, #d79a14); box-shadow: inset 0 0 0 2px #fff3; }
.checkin { background: var(--primary); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .checkin { animation: none; } }

.conn { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 6; background: var(--warning, #ffb134); color: #1b1305; padding: 8px 14px; border-radius: 16px; font-size: 14px; font-weight: 600; }
.info { position: fixed; left: 12px; right: 12px; top: 60px; z-index: 3; text-align: center; font-size: 14px; color: #fffc; text-shadow: 0 1px 3px #000a; pointer-events: none; }

/* 결과 */
.banner { position: fixed; left: 12px; right: 12px; top: 104px; z-index: 6; margin: 0 auto; max-width: 420px; padding: 14px 16px; border-radius: 18px; background: rgba(20, 17, 15, .86); backdrop-filter: blur(8px); text-align: center; line-height: 1.45; animation: pop .35s var(--ease-back, ease-out); }
.banner b { color: #ffd45a; }
.banner .l { font-size: 16px; font-weight: 700; } .banner .s { font-size: 13px; color: #fffa; }
@keyframes pop { from { transform: translateY(-8px) scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .banner { animation: none; } }

/* 진행 기록 */
.log { position: fixed; left: 12px; bottom: calc(168px + env(safe-area-inset-bottom)); z-index: 3; margin: 0; padding: 0; list-style: none; max-width: 56vw; font-size: 12.5px; line-height: 1.35; color: #fffd; text-shadow: 0 1px 3px #000c; pointer-events: none; }
.log li { opacity: .9; margin-top: 2px; } .log li:nth-last-child(n+4) { display: none; }

/* 내 카드 */
.mine { position: fixed; right: 12px; bottom: calc(172px + env(safe-area-inset-bottom)); z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none; }
.mine-cards { display: flex; gap: 6px; } .mine-cards img { width: 62px; height: 87px; border-radius: 7px; box-shadow: 0 6px 16px #0008; }
.mine-hand { padding: 4px 10px; border-radius: 12px; background: rgba(20, 17, 15, .78); font-size: 13px; font-weight: 600; } .mine-hand:empty { display: none; }

/* 자리 이름표 */
.seat { position: absolute; transform: translate(-50%, -50%); min-width: 70px; max-width: 96px; padding: 5px 8px 6px; border-radius: 14px; background: rgba(20, 17, 15, .78); text-align: center; font-size: 12px; line-height: 1.25; box-shadow: 0 2px 8px #0006; transition: opacity .2s; }
.seat .nm { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .st { color: #ffd45a; font-weight: 700; font-variant-numeric: tabular-nums; }
.seat .act { margin-top: 2px; font-size: 11px; color: #8fd0ff; min-height: 14px; }
.seat .tags { position: absolute; top: -9px; right: -6px; display: flex; gap: 3px; }
.seat .tag { background: #fff; color: #14110f; border-radius: 9px; padding: 0 6px; font-size: 10px; font-weight: 800; line-height: 17px; }
.seat.me { box-shadow: 0 0 0 2px var(--primary), 0 2px 8px #0006; }
.seat.turn { box-shadow: 0 0 0 2px #ffd45a, 0 0 18px #ffd45a88; }
.seat.folded { opacity: .5; } .seat.out { opacity: .55; }
.seat.vip .nm::before { content: "★ "; color: #ffd45a; }
.seat .bar { height: 3px; border-radius: 2px; background: #fff3; margin-top: 4px; overflow: hidden; display: none; } .seat.turn .bar { display: block; }
.seat .bar i { display: block; height: 100%; width: 100%; background: #ffd45a; transform-origin: left; }
.seat-empty { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; border: 2px dashed #fff8; background: rgba(20, 17, 15, .5); color: #fff; font-size: 22px; font-weight: 700; pointer-events: auto; padding: 0; }
.seat-empty:active { transform: translate(-50%, -50%) scale(.94); }
.bet { position: absolute; transform: translate(-50%, -50%); font-size: 12px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000; font-variant-numeric: tabular-nums; }
.potlabel { position: absolute; transform: translate(-50%, -50%); padding: 3px 10px; border-radius: 12px; background: rgba(20, 17, 15, .78); font-size: 13px; font-weight: 800; color: #ffd45a; font-variant-numeric: tabular-nums; }
.boardinfo { position: absolute; transform: translate(-50%, -50%); font-size: 11px; color: #fff9; }

/* 아래 행동 줄 */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 10px max(12px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(20, 17, 15, .94) 62%, transparent); }
.bar .row { display: grid; gap: 8px; max-width: 520px; margin: 0 auto; }
.bar .row.four { grid-template-columns: 1fr 1.25fr 1.15fr 1fr; }
.bar .row.two { grid-template-columns: 1fr 1fr; }
.bar .note { text-align: center; font-size: 14px; color: #fffc; min-height: 22px; margin-bottom: 8px; }
.act-btn { min-height: 56px; border: 0; border-radius: 16px; padding: 6px 4px; background: #3a3633; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.15; transition: transform .12s var(--ease-out, ease-out), opacity .2s; }
.act-btn small { display: block; font-size: 12px; font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; }
.act-btn:active:not(:disabled) { transform: scale(var(--press-scale, .96)); }
.act-btn:disabled { opacity: .35; }
.act-btn.fold { background: #5b2a2e; } .act-btn.call { background: var(--primary); } .act-btn.raise { background: #2f7d4f; } .act-btn.allin { background: #8a3fb0; }
.linkbtn { display: block; margin: 8px auto 0; min-height: 44px; padding: 0 16px; background: none; border: 0; color: #fffd; font-size: 14px; text-decoration: underline; }

/* 시트 */
dialog.f-sheet { width: 100%; max-width: 520px; margin: auto auto 0; border-radius: 20px 20px 0 0; }
.sheet-in { max-height: 82vh; overflow: auto; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.avatars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 var(--gutter, 20px) 12px; }
.avatars button { position: relative; border: 2px solid transparent; border-radius: 14px; background: var(--grey100); padding: 6px 4px 8px; color: var(--text); font-size: 12px; font-weight: 600; min-height: 44px; }
.avatars button[aria-checked="true"] { border-color: var(--primary); background: var(--primary-weak, var(--blue50)); }
.avatars img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; display: block; border-radius: 10px; background: var(--grey200); }
.range { width: 100%; height: 44px; accent-color: var(--primary); } .range-val { text-align: center; font-size: 15px; color: var(--text-sub); } .range-val b { font-size: 24px; color: var(--text-strong); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--gutter, 20px) 12px; }
.presets button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 22px; background: var(--grey200); color: var(--text); font-size: 15px; font-weight: 600; }
.amount { font-size: 22px !important; font-weight: 700; text-align: center; }
.rules { list-style: none; margin: 0; padding: 0 var(--gutter, 20px) 8px; display: grid; gap: 8px; }
.rules li { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--grey100); }
.rules .rn { font-weight: 700; color: var(--text-strong); font-size: 15px; } .rules .rs { grid-column: 1; font-size: 12.5px; color: var(--text-sub); }
.rules .cs { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 2px; } .rules .cs img { width: 28px; height: 39px; border-radius: 3px; }
.rules li.mine-hand-hit { outline: 2px solid var(--primary); }
.menu-group { padding: 4px var(--gutter, 20px) 12px; display: grid; gap: 8px; } .menu-group h4 { margin: 8px 0 0; font-size: 13px; color: var(--text-sub); font-weight: 600; }
.menu-btn { min-height: 48px; border: 0; border-radius: 14px; background: var(--grey100); color: var(--text-strong); font-size: 16px; font-weight: 600; padding: 0 14px; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.menu-btn:active { transform: scale(.98); } .menu-btn small { color: var(--text-sub); font-weight: 500; }
.credit { position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 0px); z-index: 1; text-align: center; font-size: 10px; color: #fff4; pointer-events: none; }
@media (min-width: 720px) { .seat { font-size: 13px; min-width: 84px; } .mine-cards img { width: 76px; height: 106px; } .log { max-width: 30vw; } }
.f-toasts { bottom: auto !important; top: 112px; }
