* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #03060f; overflow: hidden; touch-action: manipulation; overscroll-behavior: none;
  -webkit-text-size-adjust: 100%; -webkit-touch-callout: none; color: #fff;
  font-family: "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; user-select: none; -webkit-user-select: none; }
/* 게임용 굵은 글꼴: 버튼 · 숫자 · 제목 */
#actions .lb, #pot .r b, .title, .ttl, .net, #stamp b, .act, .room b, .btn, #banner, .seat .ch, .mode, #declBox b, .panel h2, #hint { font-family: "Black Han Sans", "Noto Sans KR", sans-serif; font-weight: 400; letter-spacing: .5px; }
button { font-family: inherit; }
#wrap { position: fixed; inset: 0; overflow: hidden; touch-action: none; }
html, body { position: fixed; inset: 0; width: 100%; }
#stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden;
  background: #0e2050 url(../assets/table/felt.webp) center / cover no-repeat; }
.hidden { display: none !important; }

/* 테이블: 남색 펠트 · 가운데 로고 · 아래 양쪽 가죽 레일 */
#table { position: absolute; left: 0; top: 0; pointer-events: none; }
#table .rail { position: absolute; bottom: 0; width: 440px; height: 320px; pointer-events: none; }
#table .rail.l { left: 0; }
#table .rail.r { right: 0; transform: scaleX(-1); }

/* 위쪽 줄 */
#topbar { position: absolute; left: 0; top: 0; width: 1280px; height: 50px; display: flex; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
#topbar > * { pointer-events: auto; }
#topbar .sp { flex: 1; pointer-events: none; }
.ttl { font-size: 32px; color: rgba(160, 185, 235, .42); margin-right: 6px; padding: 4px 2px; }
.pill { border: 1px solid rgba(232, 196, 106, .45); color: #ffe08a; border-radius: 6px; padding: 4px 12px; font-size: 16px; font-weight: 800; white-space: nowrap; cursor: pointer;
  background: rgba(5, 10, 30, .6); box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
#record { color: #fff; }
.tbtn { height: 40px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 6px; color: #e8eefc; font-size: 18px; font-weight: 800; cursor: pointer; white-space: nowrap;
  background: linear-gradient(rgba(70, 90, 130, .75), rgba(35, 48, 78, .85)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 4px rgba(0,0,0,.4); }
.tbtn { display: inline-flex; align-items: center; gap: 6px; }
.tbtn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
#infoBtn svg { width: 24px; height: 24px; }

/* 카드 신발(더미) */
#deck { position: absolute; width: 92px; height: 58px; z-index: 14; }
#deck .shoe { position: absolute; left: 4px; top: 0; width: 84px; height: 52px; border-radius: 0 0 10px 10px;
  background: linear-gradient(#2a2f3a, #0e1118); box-shadow: 0 4px 10px rgba(0,0,0,.6), inset 0 0 0 2px #4a5262; }
#deck img { position: absolute; width: 48px; height: 34px; object-fit: cover; object-position: top; border-radius: 3px; }
#deck .shoe-f { position: absolute; left: 4px; top: 30px; width: 84px; height: 22px; border-radius: 0 0 10px 10px; background: linear-gradient(#3a404c, #161a22); box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }

/* 자리: 큰 동그란 아바타 · 이름 · 보유 칩 */
.seat { position: absolute; width: 150px; height: 150px; z-index: 20; text-align: center; transition: opacity .3s; }
.avawrap { position: absolute; left: 27px; top: 0; width: 96px; height: 96px; }
.avawrap { border-radius: 16px; }
.ava { position: absolute; inset: 4px; border-radius: 12px; overflow: hidden; background: #223; box-shadow: inset 0 0 0 2px rgba(0,0,0,.4); }
.ava img { width: 100%; height: 100%; display: block; }
.ava::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(160deg, rgba(255,255,255,.28), transparent 38%); pointer-events: none; }
/* 테두리 등급 (자리 · 프로필 공통) */
.fr-basic { box-shadow: 0 0 0 3px #c8d3ea, 0 0 0 5px #5a6a8a, 0 6px 14px rgba(0,0,0,.6); }
.fr-silver { box-shadow: 0 0 0 3px #f4f6fa, 0 0 0 6px #9aa6b8, 0 0 0 7px #e9eef8, 0 6px 14px rgba(0,0,0,.6); }
.fr-gold { box-shadow: 0 0 0 3px #fff3b0, 0 0 0 6px #c9962e, 0 0 0 7px #ffe9a0, 0 0 14px rgba(255, 200, 60, .55), 0 6px 14px rgba(0,0,0,.6); }
.fr-neon { box-shadow: 0 0 0 3px #ff6ad5, 0 0 0 6px #6a1fd0, 0 0 18px #ff6ad5, 0 0 30px rgba(90, 200, 255, .6); animation: frneon 1.6s ease-in-out infinite; }
@keyframes frneon { 50% { box-shadow: 0 0 0 3px #6ad5ff, 0 0 0 6px #1f62cc, 0 0 22px #6ad5ff, 0 0 34px rgba(255, 106, 213, .6); } }
.fr-diamond { box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #7fe0ff, 0 0 0 8px #c58cff, 0 0 22px rgba(127, 224, 255, .9), 0 6px 14px rgba(0,0,0,.6); }
.fr-diamond::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.75) 45%, transparent 60%) 0 0 / 300% 100%; animation: frshine 2.2s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; padding: 6px; }
@keyframes frshine { from { background-position: 150% 0; } to { background-position: -150% 0; } }
.ring { position: absolute; inset: -3px; width: 102px; height: 102px; transform: rotate(-90deg); opacity: 0; pointer-events: none; }
.ring rect { fill: none; stroke: #ffd23a; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 350; stroke-dashoffset: 0; }
.seat.think .ring { opacity: 1; }
.seat.think .ring rect { animation: ring var(--dur, 3s) linear forwards; }
.seat.think.hurry .ring rect { stroke: #ff4a3a; }
@keyframes ring { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 350; } }
.bossb { position: absolute; left: -10px; top: 2px; font-style: normal; font-size: 13px; font-weight: 900; color: #3b2600; padding: 1px 6px; border-radius: 8px;
  background: linear-gradient(#fff3b0, #f1b82c); box-shadow: 0 2px 4px rgba(0,0,0,.5); display: none; }
.seat.boss .bossb { display: block; }
.seat .nm { position: absolute; left: 4px; right: 4px; top: 98px; height: 24px; line-height: 24px; font-size: 16px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(rgba(10, 16, 36, .92), rgba(4, 8, 22, .92)); border-radius: 12px 12px 0 0; box-shadow: inset 0 0 0 1px rgba(232, 196, 106, .55); }
.seat .ch { position: absolute; left: 4px; right: 4px; top: 121px; height: 24px; line-height: 24px; font-size: 16px; color: #ffe27a; white-space: nowrap;
  background: linear-gradient(rgba(40, 28, 6, .95), rgba(20, 14, 2, .95)); border-radius: 0 0 12px 12px; box-shadow: inset 0 0 0 1px rgba(232, 196, 106, .55); }
.seat.out .ava { filter: grayscale(.8) brightness(.6); }
.act { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); min-width: 64px; text-align: center; font-size: 18px; font-weight: 900; padding: 3px 12px; border-radius: 14px; z-index: 3;
  color: #fff; background: #444; box-shadow: 0 3px 8px rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.7); white-space: nowrap; }
.act:empty { display: none; }
.act.pop { animation: actpop .38s ease-out; }
.act.c-die { background: linear-gradient(#8a8f96, #4d5157); }
.act.c-call { background: linear-gradient(#ffd34a, #d99a0a); color: #3b2600; }
.act.c-raise { background: linear-gradient(#ff7a62, #c8281a); }
.act.c-check { background: linear-gradient(#b07aff, #6a2fd0); }
.act.c-half { background: linear-gradient(#4fd08f, #1f8f4f); }
@keyframes actpop { 0% { transform: translateX(-50%) scale(.3); } 65% { transform: translateX(-50%) scale(1.2); } 100% { transform: translateX(-50%) scale(1); } }
@keyframes pop { 0% { transform: scale(.3); } 65% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* 카드 패널 */
.cpanel { position: absolute; z-index: 12; border-radius: 6px; background: rgba(6, 14, 40, .42); box-shadow: inset 0 0 0 1px rgba(140, 170, 230, .14), inset 0 0 30px rgba(0,0,0,.25); transition: box-shadow .2s; }
.cpanel.turn { box-shadow: inset 0 0 0 2px rgba(255, 210, 58, .8), 0 0 16px rgba(255, 210, 58, .35); }
.cpanel.mine { background: rgba(6, 14, 40, .5); box-shadow: 0 0 0 3px #c9a24a, 0 0 0 4px #3b2a0a, inset 0 0 30px rgba(0,0,0,.3); }
.cpanel.mine.turn { box-shadow: 0 0 0 3px #ffd23a, 0 0 22px rgba(255, 210, 58, .6), inset 0 0 30px rgba(0,0,0,.3); }
.hn { position: absolute; transform: translateX(-50%); z-index: 45; white-space: nowrap; font-size: 15px; font-weight: 800; color: #e6ecf8; padding: 0 12px; text-shadow: 0 1px 2px #000; }
.hn:empty { display: none; }
.hn.mine { font-size: 17px; line-height: 24px; color: #fff; padding: 0 22px; border-radius: 13px; z-index: 46;
  background: linear-gradient(#1a2440, #0a1024); box-shadow: 0 0 0 2px #c9a24a, 0 3px 8px rgba(0,0,0,.6); }
.hn.rev { color: #ffe27a; font-size: 17px; }

/* 칩 (Kenney 칩 스프라이트: 옆모습은 쌓기용, 윗면은 날아가는 칩) */
.ck { position: absolute; left: 0; width: 32px; height: 20px; background: var(--s) center / contain no-repeat; }
.ck.c1 { --s: url(../assets/chips/c1s.webp); --t: url(../assets/chips/c1.webp); }
.ck.c2 { --s: url(../assets/chips/c2s.webp); --t: url(../assets/chips/c2.webp); }
.ck.c3 { --s: url(../assets/chips/c3s.webp); --t: url(../assets/chips/c3.webp); }
.ck.c4 { --s: url(../assets/chips/c4s.webp); --t: url(../assets/chips/c4.webp); }
.ck.c5 { --s: url(../assets/chips/c5s.webp); --t: url(../assets/chips/c5.webp); }
.ck.fly { width: 28px; height: 28px; background-image: var(--t); filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
.stack .ck:nth-child(even) { transform: scaleX(-1); }
.stack { position: relative; display: inline-block; width: 32px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.bet { position: absolute; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 6px; z-index: 30; white-space: nowrap; transition: opacity .25s; }
.bet b { font-size: 15px; font-weight: 900; color: #ffe27a; background: rgba(0,0,0,.6); border-radius: 10px; padding: 1px 8px; }
.bet.zero { opacity: 0; }
.fly { position: absolute; left: 0; top: 0; z-index: 75; pointer-events: none; will-change: transform; transition: transform .45s cubic-bezier(.3,.7,.3,1), opacity .2s; }

/* 가운데: 칩 더미 · POT/CALL */
#pot { position: absolute; width: 320px; height: 150px; z-index: 15; }
#pot .pile { position: absolute; left: 100px; top: 0; width: 120px; height: 70px; }
#pot .pl { position: absolute; bottom: 0; transform: scale(1.35); transform-origin: bottom center; }
#pot .pl.p0 { left: 46px; } #pot .pl.p1 { left: 8px; bottom: -6px; } #pot .pl.p2 { left: 84px; bottom: -8px; }
#pot .box { position: absolute; left: 0; right: 0; top: 82px; height: 68px; border: 2px solid #b8913a; border-radius: 3px;
  background: linear-gradient(rgba(5, 12, 34, .82), rgba(5, 12, 34, .7)); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
#pot .r { display: flex; align-items: center; justify-content: space-between; height: 33px; padding: 0 14px; }
#pot .r + .r { border-top: 1px solid rgba(184, 145, 58, .5); height: 31px; }
#pot .r span { font-size: 15px; font-weight: 800; color: #c8d3ea; letter-spacing: 1px; }
#pot .r b { font-size: 21px; font-weight: 900; color: #ffe27a; }
#pot .r + .r b { font-size: 16px; color: #e6ecf8; }
#potV.bump { display: inline-block; animation: bump .35s ease-out; }
@keyframes bump { 50% { transform: scale(1.15); } }
#street { position: absolute; left: 0; width: 1280px; text-align: center; font-size: 16px; font-weight: 800; color: #c8d3ea; z-index: 15; text-shadow: 0 1px 3px #000; }
#hint { position: absolute; width: 560px; text-align: center; z-index: 60; pointer-events: none;
  font-size: 24px; font-weight: 900; color: #fff; background: rgba(4, 10, 30, .9); border-radius: 10px; padding: 9px 0;
  box-shadow: 0 0 0 2px #e8c46a, 0 8px 20px rgba(0,0,0,.6); animation: hintpop .3s; }
@keyframes hintpop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* 족보 · 승률 패널 */
#odds { position: absolute; width: 210px; z-index: 16; border-radius: 4px; background: rgba(4, 10, 30, .72); box-shadow: inset 0 0 0 1px rgba(140, 170, 230, .2); padding: 3px 8px; font-size: 13.5px; line-height: 1.25; display: flex; flex-direction: column; overflow: hidden; }
#odds .oh { display: flex; justify-content: space-between; color: #c8d3ea; font-weight: 800; border-bottom: 1px solid rgba(140,170,230,.25); padding: 1px 2px 3px; }
#oddsRows { flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
#odds .or { display: flex; justify-content: space-between; padding: 0 4px; color: rgba(200, 211, 234, .4); font-weight: 700; border-radius: 3px; }
#odds .or.on { color: #c8d3ea; }
#odds .or b { font-weight: 800; min-width: 42px; text-align: center; background: rgba(255,255,255,.06); border-radius: 3px; }
#odds .or.cur { color: #7dff9a; background: rgba(60, 220, 110, .12); }
#odds .oe { display: flex; justify-content: space-between; border-top: 1px solid rgba(140,170,230,.25); padding: 3px 4px 0; color: #c8d3ea; font-weight: 800; }
#odds .oe b { color: #ffe27a; font-size: 16px; }

/* 카드 — 실제 트럼프 그림(이미지), 이동은 transform만 */
#cards { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.card { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; pointer-events: none; border-radius: 7% / 5%;
  box-shadow: 0 3px 6px rgba(0,0,0,.5), 0 1px 1px rgba(0,0,0,.4); transition: opacity .3s; perspective: 600px; }
.card .in { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; background: #fff; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.card .fc { visibility: hidden; }
.card.up .fc { visibility: visible; }
.card.up .bk { visibility: hidden; }

.card .in::after { content: ""; position: absolute; inset: 0; background: transparent; transition: background .25s; pointer-events: none; }
.card.hid .in::after { background: rgba(70, 40, 140, .13); }
.card.dim .in::after { background: rgba(0, 0, 0, .5); }
.card.fold { opacity: .55; }
.card.fold .in::after { background: rgba(20, 20, 30, .55); }
.card .tag { position: absolute; left: 50%; top: -.36em; transform: translateX(-50%); font-size: .22em; font-weight: 900; color: #fff; background: linear-gradient(#8a5ae0, #4a2aa0);
  padding: .02em .45em; border-radius: .4em; white-space: nowrap; z-index: 2; border: 1px solid rgba(255,255,255,.5); font-style: normal; }
.card.pick { pointer-events: auto; cursor: pointer; }
.card.pick:hover { box-shadow: 0 0 0 3px #ffe24a, 0 0 16px #ffe24a; }
.card.win { box-shadow: 0 0 0 3px #ffd23a, 0 0 16px #ffd23a, 0 0 30px rgba(255, 210, 58, .5); }
.card.gone { opacity: 0; }
#deck img { position: absolute; width: 56px; height: 78px; border-radius: 4px; box-shadow: 0 2px 4px rgba(0,0,0,.6); }

/* 아래 버튼 줄 */
#actions { position: absolute; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; z-index: 55; background: #05070c; padding-top: 3px; }
#actions .ab { position: relative; border: 0; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(#3b3f48 0%, #23262d 45%, #14161b 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 0 rgba(0,0,0,.6); }
#actions .ab:active:not(:disabled) { background: linear-gradient(#2a2d34, #101216); }
#actions .lb { font-size: 34px; font-weight: 900; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 10px var(--g, transparent); }
#actions .led { width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 38% 32%, #fff 0 8%, var(--l1) 22%, var(--l2) 70%, #000 100%); box-shadow: 0 0 0 3px #1a1c20, 0 0 0 4px #555b66, 0 0 12px var(--g, transparent); }
/* 금액은 버튼 안 라벨 아래에 (위로 튀어나와 패널을 가리지 않게) */
#actions .ab { flex-direction: row; }
#actions .ab .lb { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
#actions .ab .lb small { display: block; margin-top: 3px; font-family: "Noto Sans KR", sans-serif; font-size: 14px; font-weight: 900; letter-spacing: 0; color: #ffe27a; text-shadow: 0 1px 0 #000; }
#actions .ab:disabled .lb small { color: #5a5e66; }
#actions .ab:disabled { cursor: default; }
#actions .ab:disabled .lb { color: #5a5e66; text-shadow: none; }
#actions .ab:disabled .led { background: radial-gradient(circle at 38% 32%, #8a8f98 0 8%, #4a4e56 30%, #22252a 100%); box-shadow: 0 0 0 3px #1a1c20, 0 0 0 4px #3a3e46; }
#actions .k-die { --l1: #9aa0a8; --l2: #4a4e56; --g: rgba(200,200,210,.35); }
#actions .k-check { --l1: #c58cff; --l2: #6a1fd0; --g: rgba(170, 90, 255, .8); }
#actions .k-call { --l1: #ffe066; --l2: #d99a0a; --g: rgba(255, 200, 40, .8); }
#actions .k-bing { --l1: #66c8ff; --l2: #0a6fd0; --g: rgba(60, 170, 255, .8); }
#actions .k-dd { --l1: #ffb86a; --l2: #d0600a; --g: rgba(255, 140, 40, .8); }
#actions .k-q { --l1: #ff7a6a; --l2: #c8180a; --g: rgba(255, 70, 50, .8); }
#actions .k-half { --l1: #7dff9a; --l2: #12a03a; --g: rgba(60, 230, 110, .8); }
#actions .ab:not(:disabled)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.07), transparent 50%); pointer-events: none; }
#actions.wait .ab .lb { color: #5a5e66; text-shadow: none; }

/* 효과 */
#fx { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 85; }
#stamp { position: absolute; left: 0; text-align: center; z-index: 86; pointer-events: none; opacity: 0; white-space: nowrap; }
#stamp b { display: inline-block; font-size: 76px; font-weight: 900; letter-spacing: 2px; padding: 0 30px;
  background: linear-gradient(#fffbe0, #ffd34a 45%, #d98a0a 55%, #fff1a8); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #5a2c00) drop-shadow(0 0 18px rgba(255, 190, 40, .8)); }
#stamp small { display: block; font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px #000; margin-top: -4px; }
#stamp.show { animation: stamp 2s ease-out forwards; }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.6); } 14% { opacity: 1; transform: scale(.92); } 22% { transform: scale(1.04); } 30% { transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: scale(1.06); } }
#toast { position: absolute; left: 50%; transform: translateX(-50%); z-index: 90; font-size: 19px; font-weight: 800; background: rgba(0,0,0,.82);
  padding: 9px 22px; border-radius: 20px; white-space: nowrap; transition: opacity .25s; pointer-events: none; box-shadow: 0 0 0 1px rgba(232,196,106,.4); }
#toast.off { opacity: 0; }
#banner { position: absolute; left: 0; width: 1280px; text-align: center; z-index: 80; pointer-events: none; font-size: 54px; font-weight: 900;
  color: #ffe27a; -webkit-text-stroke: 2px #5a3600; text-shadow: 0 4px 12px #000; opacity: 0; }
#banner.show { animation: banner 1.4s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.12); } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px); } }

/* 팝업 */
#popup, #admin { position: absolute; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); }
#admin { z-index: 110; }
.panel { width: 640px; max-height: 94%; overflow: auto; padding: 22px 28px; border-radius: 24px; text-align: center;
  background: linear-gradient(180deg, #2a2236, #120e1a); box-shadow: 0 0 0 2px #c9962e, 0 0 0 5px #2a1a06, 0 18px 50px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.12); animation: pop .3s; }
.panel h2 { margin: 2px 0 12px; font-size: 30px; color: #ffe08a; }
.panel p { font-size: 20px; margin: 8px 0; line-height: 1.4; }
.panel .small { font-size: 15px; color: #c8bfd8; }
.panel .err { color: #ff8b7a; font-weight: 800; min-height: 1em; }
.title { font-size: 46px; font-weight: 900; margin: 2px 0 2px; letter-spacing: 2px;
  background: linear-gradient(#fff6c8, #f1c24c 55%, #a8740a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #3b2606); }
.title span { background: linear-gradient(#fff, #d8d8e8); -webkit-background-clip: text; background-clip: text; }
.sub { font-size: 17px; color: #d8cfe8; margin-bottom: 10px; }
.panel input { width: 100%; font-size: 24px; padding: 12px 16px; margin: 5px 0; border-radius: 14px; border: 2px solid #6b4a1a; background: #0b0910; color: #fff; text-align: center; }
.btns { display: flex; gap: 12px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.btn { position: relative; min-width: 150px; border: 0; border-radius: 16px; padding: 14px 22px; font-size: 22px; font-weight: 900; color: #fff; cursor: pointer; overflow: hidden;
  text-shadow: 0 2px 0 rgba(0,0,0,.4); background: linear-gradient(var(--b1), var(--b2)); box-shadow: 0 5px 0 var(--b3), 0 8px 14px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.5); }
.btn::before { content: ""; position: absolute; left: 6%; right: 6%; top: 3px; height: 42%; border-radius: 12px; background: linear-gradient(rgba(255,255,255,.4), rgba(255,255,255,.03)); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--b3); }
.btn.go { --b1: #ffc35a; --b2: #e0731a; --b3: #8a3c06; }
.btn.green { --b1: #5fe0a0; --b2: #1f9a5a; --b3: #0d5a32; }
.btn.gray { --b1: #9aa0a8; --b2: #5a5f66; --b3: #2e3135; }
.btn:disabled { filter: grayscale(1); opacity: .5; }
.linkbtn { border: 0; background: none; color: #c8bfd8; font-size: 16px; text-decoration: underline; cursor: pointer; }
.names { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; }
.names .chipbtn { border: 1px solid rgba(232,196,106,.4); background: rgba(255,255,255,.06); color: #fff; border-radius: 14px; padding: 7px 14px; font-size: 17px; font-weight: 700; cursor: pointer; }
.rooms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 2px; }
.room { position: relative; border: 0; border-radius: 16px; padding: 12px 6px 10px; color: #fff; cursor: pointer; text-align: center; overflow: hidden;
  background: linear-gradient(160deg, var(--r1), var(--r2)); box-shadow: 0 0 0 2px rgba(0,0,0,.4), 0 6px 12px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.3); }
.room:nth-child(1) { --r1: #3fb27a; --r2: #145a38; } .room:nth-child(2) { --r1: #4a8cf0; --r2: #173f86; }
.room:nth-child(3) { --r1: #e0563f; --r2: #7a1a0e; } .room:nth-child(4) { --r1: #8a5ae0; --r2: #2c1066; }
.room b { display: block; font-size: 22px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.room span { display: block; font-size: 16px; color: #ffe08a; font-weight: 900; margin-top: 2px; }
.room small { display: block; font-size: 13px; color: rgba(255,255,255,.75); margin-top: 2px; }
.room.sel { box-shadow: 0 0 0 3px #ffe24a, 0 0 20px rgba(255, 226, 74, .6), inset 0 1px 0 rgba(255,255,255,.3); }
.room:disabled { filter: grayscale(1) brightness(.6); cursor: default; }
.res { margin: 6px 0; text-align: left; }
.res .row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; background: rgba(255,255,255,.06); margin: 5px 0; font-size: 19px; }
.res .row.me { background: rgba(255,226,74,.16); box-shadow: inset 0 0 0 1px rgba(255,226,74,.4); }
.res .row b { flex: 1; }
.res .row .hnm { color: #9ff0c4; font-weight: 800; }
.res .row .amt { color: #ffe27a; font-weight: 900; }
.net { font-size: 32px !important; font-weight: 900; }
.net.plus { color: #ffe27a; }
.net.minus { color: #ff8b7a; }
.rankwrap { max-height: 380px; overflow: auto; }
.ranking table { width: 100%; border-collapse: collapse; font-size: 19px; }
.ranking td { padding: 7px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ranking tr.me { background: rgba(255,226,74,.15); }
.ranking .rk { width: 48px; } .ranking .nm { text-align: left; font-weight: 800; font-size: 19px; } .ranking .mn { color: #ffe27a; font-weight: 800; text-align: right; } .ranking .wl { font-size: 15px; color: #c8bfd8; }
.menu .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu .btn { width: 100%; margin: 0; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; cursor: pointer; }
.sw-row b { display: block; font-size: 20px; } .sw-row small { font-size: 14px; color: #c8bfd8; }
.sw-row input { display: none; }
.sw { flex: none; width: 64px; height: 36px; border-radius: 18px; background: #46424c; position: relative; transition: background .2s; }
.sw::after { content: ""; position: absolute; left: 4px; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: left .2s; }
.sw-row input:checked + .sw { background: #2fae6b; }
.sw-row input:checked + .sw::after { left: 32px; }
.edit { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.edit span { width: 90px; font-size: 18px; font-weight: 800; text-align: left; }
.edit input { flex: 1; margin: 0; font-size: 20px; padding: 9px; }
.edit .btn { min-width: 90px; padding: 10px 14px; font-size: 18px; }
.rules { text-align: left; font-size: 17px; line-height: 1.5; }
.rules h3 { margin: 12px 0 4px; color: #ffe08a; font-size: 20px; }
.rules ol, .rules ul { margin: 4px 0; padding-left: 24px; }

/* 결과 상자: 가운데 빈 곳에만 (양옆 상대 카드를 가리지 않게) */
.panel.result .net { font-size: 26px !important; }
.panel.result .res .row { font-size: 16px; padding: 5px 10px; }
.panel.result .btn { min-width: 0; flex: 1; padding: 11px 10px; font-size: 20px; }

/* 로비: 게임 종류 */
.modes { display: flex; gap: 10px; justify-content: center; margin: 8px 0 2px; }
.mode { min-width: 150px; border: 0; border-radius: 22px; padding: 8px 20px; font-size: 22px; color: #c8d3ea; cursor: pointer;
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 2px rgba(140,170,230,.25); }
.mode.sel { color: #3b2600; background: linear-gradient(#fff3b0, #f1b82c); box-shadow: 0 0 14px rgba(255, 200, 40, .5); }

/* 하이로우 선언 */
#declBox { position: absolute; width: 540px; z-index: 72; text-align: center; padding: 10px 12px 12px; border-radius: 10px;
  background: rgba(4, 10, 30, .92); box-shadow: 0 0 0 2px #e8c46a, 0 10px 30px rgba(0,0,0,.6); animation: hintpop .25s; }
#declBox .dt { font-size: 18px; font-weight: 900; color: #ffe08a; margin-bottom: 8px; }
#declBox .db { display: flex; gap: 10px; }
#declBox button { flex: 1; border: 0; border-radius: 10px; padding: 10px 6px; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(var(--b1), var(--b2)); box-shadow: 0 4px 0 var(--b3), inset 0 1px 0 rgba(255,255,255,.4); }
#declBox button b { font-size: 30px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
#declBox button small { font-size: 14px; font-weight: 700; opacity: .9; }
#declBox button:disabled { filter: grayscale(1) brightness(.5); cursor: default; }
#declBox .dh { --b1: #ff7a62; --b2: #c8281a; --b3: #6a0e06; }
#declBox .dl { --b1: #6ab0ff; --b2: #1f62cc; --b3: #0f3478; }
#declBox .ds { --b1: #c58cff; --b2: #6a1fd0; --b3: #3a0e7a; }
.res .side { font-style: normal; font-size: 13px; font-weight: 900; padding: 1px 7px; border-radius: 6px; color: #fff; }
.res .side.hi { background: #c8281a; } .res .side.lo { background: #1f62cc; }

/* 랭킹 순위 표시 */
.medal { display: inline-block; min-width: 30px; height: 30px; line-height: 30px; border-radius: 50%; font-weight: 900; font-size: 16px; color: #c8d3ea; text-align: center; }
.medal.m0 { color: #3b2600; background: linear-gradient(#fff3b0, #f1b82c); }
.medal.m1 { color: #222; background: linear-gradient(#ffffff, #b8c0cc); }
.medal.m2 { color: #fff; background: linear-gradient(#e8a070, #a0522d); }

/* 운영자 에디터 */
.panel.adminp { width: 760px; }
.ed-tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.ed-tab { border: 0; border-radius: 18px; padding: 8px 18px; font-size: 17px; font-weight: 800; color: #c8d3ea; background: rgba(255,255,255,.07); cursor: pointer; }
.ed-tab.sel { color: #3b2600; background: linear-gradient(#fff3b0, #f1b82c); }
.ed-body { text-align: left; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.ed-grid label { display: flex; flex-direction: column; font-size: 15px; font-weight: 700; color: #c8d3ea; gap: 3px; }
.ed-grid input, .ed-bot input, .ed-bot select { width: 100%; font-size: 18px; padding: 8px 10px; margin: 0; border-radius: 10px; border: 2px solid #4a3a1a; background: #0b0910; color: #fff; text-align: left; }
.ed-bots { display: flex; flex-direction: column; gap: 8px; }
.ed-bot { display: grid; grid-template-columns: 56px 1.4fr 1fr 1fr; gap: 8px; align-items: center; }
.ed-ava { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid #e8c46a; padding: 0; cursor: pointer; background: #223; }
.ed-ava img { width: 100%; height: 100%; display: block; }
.ed-bot input:disabled { opacity: .5; }
#peek { position: absolute; z-index: 16; width: 44px; text-align: center; pointer-events: none; }
#peek img { width: 44px; height: 62px; border-radius: 4px; box-shadow: 0 0 0 2px #ff5a6a, 0 2px 6px rgba(0,0,0,.6); }
#peek small { display: block; font-size: 11px; font-weight: 900; color: #ff8b8b; }

/* 잭팟 */
#jackpot { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 10px; border-radius: 8px; pointer-events: none;
  background: linear-gradient(#2a0a3e, #12041e); box-shadow: 0 0 0 2px #c9962e, 0 0 14px rgba(255, 190, 40, .35), inset 0 1px 0 rgba(255,255,255,.15); }
#jackpot span { font-family: "Black Han Sans", sans-serif; font-size: 15px; letter-spacing: 1px; color: #ff6ad5; text-shadow: 0 0 8px rgba(255, 90, 210, .8); }
#jackpot b { font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 21px; color: #ffe27a; min-width: 150px; text-align: right; font-variant-numeric: tabular-nums; text-shadow: 0 0 8px rgba(255, 200, 40, .6); }
.room em { display: block; font-style: normal; font-size: 12px; font-weight: 800; color: #ffd0f0; margin-top: 3px; }
#jpFx { position: absolute; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 45%, rgba(60, 10, 80, .55), rgba(0,0,0,.75)); }
#jpFx .jp-in { text-align: center; animation: jpin .6s cubic-bezier(.2,1.4,.4,1); }
@keyframes jpin { 0% { transform: scale(.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
#jpFx .jp-t { font-family: "Black Han Sans", sans-serif; font-size: 120px; line-height: 1; letter-spacing: 6px;
  background: linear-gradient(#fffbe0, #ffd34a 45%, #d98a0a 55%, #fff1a8); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 #5a2c00) drop-shadow(0 0 30px rgba(255, 190, 40, .9)); animation: jpglow 1.2s ease-in-out infinite; }
@keyframes jpglow { 50% { filter: drop-shadow(0 6px 0 #5a2c00) drop-shadow(0 0 50px rgba(255, 120, 220, .95)); } }
#jpFx .jp-a { font-family: "Black Han Sans", sans-serif; font-size: 64px; color: #fff; text-shadow: 0 4px 0 #5a2c00, 0 0 20px rgba(255, 200, 40, .8); margin-top: 6px; font-variant-numeric: tabular-nums; }
#jpFx .jp-w { display: inline-flex; align-items: center; gap: 14px; margin-top: 14px; padding: 8px 22px 8px 8px; border-radius: 40px; background: rgba(0,0,0,.6); box-shadow: 0 0 0 2px #c9962e; }
#jpFx .jp-w img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px #f3cf6a; }
#jpFx .jp-w span { display: flex; flex-direction: column; text-align: left; font-size: 18px; color: #ffe27a; font-weight: 800; }
#jpFx .jp-w b { font-size: 24px; color: #fff; }
.ed-row { display: flex; gap: 6px; }
.ed-row input { min-width: 0; }

/* 판 결과 (테이블 위) */
#tableRes { position: absolute; inset: 0; z-index: 48; pointer-events: none; }
#stage.resulting #pot, #stage.resulting #street, #stage.resulting #deck, #stage.resulting #peek, #stage.resulting #odds, #stage.resulting .hn { visibility: hidden; }
.pstrip { position: absolute; height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15;
  background: linear-gradient(rgba(4, 8, 22, .55), rgba(4, 8, 22, .9)); border-radius: 0 0 6px 6px; animation: hintpop .3s backwards; }
.pstrip b { font-size: 16px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.pstrip span { font-family: "Black Han Sans", sans-serif; font-size: 18px; color: #c8d3ea; }
.pstrip span.up { color: #ffe27a; } .pstrip span.dn { color: #6ab0ff; }
.pstrip.mine b { font-size: 18px; } .pstrip.mine span { font-size: 21px; }
.winner-lbl { position: absolute; transform: translateX(-50%); font-family: "Black Han Sans", sans-serif; font-size: 52px; line-height: 1; letter-spacing: 2px; white-space: nowrap; text-align: center;
  background: linear-gradient(100deg, #fff3b0 0%, #ffd34a 30%, #fffbe8 45%, #d98a0a 55%, #ffd34a 70%, #fff1a8 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #5a2c00) drop-shadow(0 0 12px rgba(255, 190, 40, .8)); animation: wlpop .5s cubic-bezier(.2, 1.6, .4, 1) backwards, wfshine 1.8s linear .5s infinite; }
.winner-lbl.mine { font-size: 64px; }
.winner-lbl i { display: block; font-style: normal; font-size: 16px; letter-spacing: 3px; color: #fff; -webkit-text-fill-color: #fff; }
@keyframes wlpop { from { transform: translateX(-50%) scale(2.4); opacity: 0; } }
@keyframes wfshine { from { background-position: 120% 0; } to { background-position: -130% 0; } }
.res-center { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.emblem { position: relative; width: 300px; height: 196px; animation: empop .6s cubic-bezier(.2, 1.5, .4, 1) backwards; }
@keyframes empop { from { transform: scale(.2) rotate(-8deg); opacity: 0; } }
.em-rays { position: absolute; left: 50%; top: 46%; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; will-change: transform;
  background: repeating-conic-gradient(rgba(255, 220, 120, .3) 0deg 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); mask: radial-gradient(circle, #000 25%, transparent 68%); animation: wfspin 10s linear infinite; }
@keyframes wfspin { to { transform: rotate(360deg); } }
.em-wing { position: absolute; top: 34px; width: 92px; height: 120px; border-radius: 60% 10% 60% 10%;
  background: repeating-linear-gradient(160deg, #fff1a8 0 6px, #d99a1a 6px 12px, #8a5a10 12px 14px); box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.em-wing.l { left: 22px; transform: rotate(-24deg); } .em-wing.r { right: 22px; transform: scaleX(-1) rotate(-24deg); }
.em-medal { position: absolute; left: 50%; top: 6px; width: 176px; height: 176px; margin-left: -88px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--e1), var(--e2) 70%); box-shadow: 0 0 0 6px #f3cf6a, 0 0 0 9px #8a5a10, 0 0 0 11px #ffe9a0, 0 10px 26px rgba(0,0,0,.6), inset 0 6px 18px rgba(255,255,255,.35); }
.emblem.cmid { --e1: #4a8cf0; --e2: #142a6a; } .emblem.chi { --e1: #c058f0; --e2: #4a1080; } .emblem.ctop { --e1: #ff7ad0; --e2: #8a1050; }
.em-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: .95; }
.em-txt span { font-family: "Black Han Sans", sans-serif; letter-spacing: 1px; color: #fff3b0; -webkit-text-stroke: 1px #6a3400; text-shadow: 0 3px 0 #6a3400, 0 0 10px rgba(255, 200, 60, .7); }
.em-txt.l1 span { font-size: 34px; } .em-txt.l2 span { font-size: 34px; } .em-txt.l3 span { font-size: 28px; }
.em-ribbon { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); min-width: 170px; padding: 3px 22px; text-align: center; font-family: "Black Han Sans", sans-serif; font-size: 22px; color: #3b2600;
  background: linear-gradient(#fff3b0, #f1b82c 60%, #b8862a); border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,.5), inset 0 1px 0 #fff; }
.em-plain { font-family: "Black Han Sans", sans-serif; font-size: 34px; color: #fff; margin-top: 70px; text-shadow: 0 3px 0 #000; }
.res-jp { display: flex; align-items: center; gap: 10px; padding: 4px 16px; border-radius: 8px; background: linear-gradient(#2a0a3e, #12041e); box-shadow: 0 0 0 2px #c9962e; }
.res-jp span { font-family: "Black Han Sans", sans-serif; color: #ff6ad5; font-size: 18px; } .res-jp b { font-family: "Black Han Sans", sans-serif; font-weight: 400; color: #ffe27a; font-size: 22px; }
.res-amt { font-family: "Black Han Sans", sans-serif; font-size: 50px; line-height: 1.05; color: #ffe27a; text-align: center; text-shadow: 0 4px 0 #5a2c00, 0 0 18px rgba(255, 200, 40, .7); animation: hintpop .4s .2s backwards; }
.res-amt small { display: block; font-size: 18px; color: #fff; text-shadow: 0 2px 0 #000; }
.res-desc { position: absolute; transform: translateX(-50%); white-space: nowrap; padding: 6px 26px; border-radius: 22px; font-size: 20px; font-weight: 800; color: #fff;
  background: linear-gradient(rgba(10, 14, 30, .95), rgba(4, 6, 16, .95)); box-shadow: 0 0 0 2px #c9a24a, 0 0 16px rgba(255, 200, 40, .4); animation: hintpop .35s .3s backwards; }
.res-desc i { font-style: normal; color: #c9a24a; margin: 0 10px; }
.res-list { position: absolute; width: 230px; display: flex; flex-direction: column; pointer-events: auto; border-radius: 6px; overflow: hidden;
  background: rgba(4, 10, 30, .9); box-shadow: inset 0 0 0 1px rgba(140, 170, 230, .35), 0 6px 16px rgba(0,0,0,.5); animation: hintpop .3s backwards; }
.rl-h { text-align: center; font-size: 14px; font-weight: 900; color: #c8d3ea; padding: 3px 0; border-bottom: 1px solid rgba(140,170,230,.25); }
.rl-rows { flex: 1; display: flex; flex-direction: column; justify-content: space-around; padding: 1px 0; }
.rr { display: grid; grid-template-columns: 1fr 1.1fr auto; gap: 4px; align-items: center; padding: 0 7px; font-size: 12.5px; color: #c8d3ea; }
.rr .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; }
.rr .h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr .v { font-weight: 900; text-align: right; white-space: nowrap; } .rr .v.up { color: #ffe27a; } .rr .v.dn { color: #6ab0ff; }
.rr.win { background: rgba(255, 210, 58, .14); } .rr.win .n { color: #ffe27a; } .rr.me .n::after { content: " (나)"; color: #9ff0c4; font-weight: 700; }
.rl-btns { display: flex; gap: 4px; padding: 4px; }
.rl-btns button { flex: 1; border: 0; border-radius: 6px; padding: 6px 0; font-family: "Black Han Sans", sans-serif; font-size: 17px; color: #fff; cursor: pointer;
  background: linear-gradient(#ffc35a, #e0731a); box-shadow: 0 3px 0 #8a3c06; }
.rl-btns button.g { flex: .6; background: linear-gradient(#5fe0a0, #1f9a5a); box-shadow: 0 3px 0 #0d5a32; }
.rl-btns em { font-style: normal; font-size: 13px; opacity: .85; }

/* 에디터: 패 지정 */
.rig-slots { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.rig-slot { position: relative; width: 62px; height: 104px; padding: 0; border: 2px dashed rgba(232, 196, 106, .5); border-radius: 6px; background: rgba(255,255,255,.04); cursor: pointer; color: #c8d3ea; }
.rig-slot.gap { margin-right: 12px; }
.rig-slot.sel { border: 2px solid #ffe24a; box-shadow: 0 0 12px rgba(255, 226, 74, .6); }
.rig-slot img { position: absolute; left: 3px; top: 3px; width: 52px; height: 73px; border-radius: 3px; }
.rig-slot i { position: absolute; left: 0; right: 0; top: 24px; font-style: normal; font-size: 26px; opacity: .5; }
.rig-slot small { position: absolute; left: 0; right: 0; bottom: 3px; font-size: 11px; font-weight: 800; }
.rig-pre { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 8px; }
.rig-pre button { border: 0; border-radius: 14px; padding: 6px 12px; font-size: 14px; font-weight: 800; color: #3b2600; background: linear-gradient(#fff3b0, #f1b82c); cursor: pointer; }
.rig-pre button.clr { color: #fff; background: linear-gradient(#9aa0a8, #5a5f66); }
.rig-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; margin-bottom: 4px; }
.rig-c { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 3px; }
.rig-c img { width: 100%; display: block; border-radius: 3px; }
.rig-c.used { opacity: .25; }

/* 전체 화면: 스플래시 · 메인 · 꾸미기 · 이벤트 · 보석 교환 */
.scr { position: absolute; inset: 0; z-index: 90; overflow: hidden;
  background: radial-gradient(ellipse 70% 60% at 50% 36%, rgba(80, 120, 220, .35), transparent 70%), #0a1634 url(../assets/table/felt.webp) center / cover; }
.scr::before { content: ""; position: absolute; inset: 0; background: rgba(4, 8, 24, .45); pointer-events: none; }
.scr > * { position: relative; }
.scr.hidden { display: none; }
.coin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -3px; margin-right: 5px; background: radial-gradient(circle at 35% 35%, #fff6c8, #f1c24c 45%, #a8740a); box-shadow: 0 0 0 1px #6b4a0a; }
.gem { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; filter: drop-shadow(0 0 4px rgba(94, 224, 255, .7)); }
.pf { position: relative; width: 88px; height: 88px; border-radius: 16px; overflow: visible; flex: none; }
.pf img { width: 100%; height: 100%; display: block; border-radius: 14px; }
.pf.big { width: 220px; height: 220px; border-radius: 26px; } .pf.big img { border-radius: 24px; }
.pf.mini { width: 56px; height: 56px; border-radius: 10px; } .pf.mini img { border-radius: 9px; }

/* 스플래시 */
.scr.splash { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.sp-glow { position: absolute !important; left: 50%; top: 42%; width: 1400px; height: 1400px; margin: -700px 0 0 -700px; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 214, 90, .16) 0deg 6deg, transparent 6deg 16deg); -webkit-mask: radial-gradient(circle, #000 10%, transparent 60%); mask: radial-gradient(circle, #000 10%, transparent 60%); animation: wfspin 30s linear infinite; }
.sp-cards { height: 180px; width: 600px; margin-bottom: -40px; }
.sp-cards img { position: absolute; left: 50%; bottom: 0; width: 120px; height: 168px; margin-left: -60px; border-radius: 8px; transform-origin: 50% 150%;
  box-shadow: 0 8px 20px rgba(0,0,0,.6), 0 0 0 2px rgba(255, 220, 120, .6); transform: rotate(calc((var(--i) - 2) * 12deg)); animation: spfan .8s cubic-bezier(.2, 1.3, .4, 1) backwards; animation-delay: calc(var(--i) * .08s); }
@keyframes spfan { from { transform: rotate(0) translateY(80px); opacity: 0; } }
.sp-logo { text-align: center; line-height: .9; animation: empop .8s .3s cubic-bezier(.2, 1.5, .4, 1) backwards; }
.sp-logo b { display: block; font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 150px; letter-spacing: 10px;
  background: linear-gradient(100deg, #fff3b0 0%, #ffd34a 30%, #fffbe8 45%, #d98a0a 55%, #ffd34a 70%, #fff1a8 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 0 #5a2c00) drop-shadow(0 0 30px rgba(255, 190, 40, .7)); animation: wfshine 3s linear infinite; }
.sp-logo span { display: block; font-family: "Black Han Sans", sans-serif; font-size: 40px; letter-spacing: 18px; color: #fff; margin-top: 8px; text-shadow: 0 3px 0 #000, 0 0 16px rgba(120, 170, 255, .8); }
.sp-chips { height: 40px; width: 300px; margin-top: 14px; }
.sp-chips .ck { left: calc(50% - 14px + (var(--i) - 2) * 44px); top: 0; transform: none; animation: spchip 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * .15s); }
@keyframes spchip { 50% { transform: translateY(-10px); } }
.sp-start { margin-top: 26px; min-width: 300px; border: 0; border-radius: 40px; padding: 18px 40px; font-family: "Black Han Sans", sans-serif; font-size: 36px; color: #fff; cursor: pointer;
  background: linear-gradient(#ffc35a, #e0731a); box-shadow: 0 6px 0 #8a3c06, 0 0 30px rgba(255, 170, 40, .6), inset 0 2px 0 rgba(255,255,255,.5); animation: sppulse 1.4s ease-in-out infinite; }
@keyframes sppulse { 50% { transform: scale(1.06); box-shadow: 0 6px 0 #8a3c06, 0 0 50px rgba(255, 170, 40, .9), inset 0 2px 0 rgba(255,255,255,.5); } }
.sp-foot { margin-top: 18px; font-size: 16px; color: rgba(220, 230, 255, .7); letter-spacing: 1px; }

/* 메인 */
.scr.hub { display: flex; flex-direction: column; padding: 18px 36px; gap: 16px; }
.hub-top { display: flex; align-items: center; justify-content: space-between; }
.hub-me { display: flex; align-items: center; gap: 16px; padding: 10px 24px 10px 12px; border-radius: 20px; background: rgba(4, 10, 30, .7); box-shadow: inset 0 0 0 1px rgba(232, 196, 106, .45); }
.hub-id { display: flex; flex-direction: column; gap: 3px; }
.hub-id b { font-size: 24px; } .hub-id .mn { font-family: "Black Han Sans", sans-serif; font-size: 22px; color: #ffe27a; } .hub-id .gm { font-family: "Black Han Sans", sans-serif; font-size: 20px; color: #7fe7ff; }
.hub-tb { display: flex; gap: 8px; }
.hub-tb button { height: 42px; padding: 0 16px; border: 0; border-radius: 8px; color: #e8eefc; font-size: 17px; font-weight: 800; cursor: pointer; background: linear-gradient(rgba(70, 90, 130, .8), rgba(35, 48, 78, .9)); }
.hub-modes { display: flex; gap: 22px; flex: 1; }
.mode-card { position: relative; flex: 1; border: 0; border-radius: 26px; cursor: pointer; overflow: hidden; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 22px;
  box-shadow: 0 0 0 3px rgba(255, 220, 120, .7), 0 12px 30px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.3); transition: transform .12s; }
.mode-card:active { transform: scale(.98); }
.mode-card.seven { background: radial-gradient(circle at 50% 30%, #2f6fd0, #0d2560 75%); }
.mode-card.hilo { background: radial-gradient(circle at 50% 30%, #b03a9a, #3a0d50 75%); }
.mc-cards { position: absolute !important; left: 0; right: 0; top: 18px; height: 170px; }
.mc-cards img { position: absolute; left: 50%; top: 10px; width: 96px; height: 134px; margin-left: -48px; border-radius: 7px; transform-origin: 50% 160%;
  transform: rotate(calc((var(--i) - 2) * 11deg)); box-shadow: 0 6px 14px rgba(0,0,0,.6); }
.mode-card b { font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 54px; text-shadow: 0 4px 0 rgba(0,0,0,.5), 0 0 20px rgba(255,255,255,.3); }
.mode-card span { font-size: 18px; font-weight: 800; color: rgba(255,255,255,.85); }
.mode-card em { margin-top: 8px; font-style: normal; font-family: "Black Han Sans", sans-serif; font-size: 18px; color: #ffe27a; padding: 3px 14px; border-radius: 14px; background: rgba(0,0,0,.4); }
.hub-tiles { display: flex; gap: 16px; }
.hub-tiles button { position: relative; flex: 1; display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 12px; text-align: left; padding: 14px 18px;
  border: 0; border-radius: 18px; cursor: pointer; color: #fff; background: linear-gradient(rgba(30, 44, 80, .92), rgba(10, 18, 40, .92)); box-shadow: inset 0 0 0 1px rgba(140, 170, 230, .35), 0 6px 14px rgba(0,0,0,.4); }
.hub-tiles b { font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 24px; } .hub-tiles small { grid-column: 2; font-size: 14px; color: #c8d3ea; }
.hub-tiles em { position: absolute; right: 12px; top: 10px; min-width: 26px; height: 26px; line-height: 26px; border-radius: 13px; text-align: center; font-style: normal; font-weight: 900; background: #ff3b4e; color: #fff; box-shadow: 0 0 10px rgba(255, 60, 80, .8); }
.ti { grid-row: span 2; width: 56px; height: 56px; border-radius: 14px; display: block; background-position: center; background-repeat: no-repeat; background-size: 34px; }
.t-dress { background-color: #c0428a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2l3 3-1.5 1.5L18 9v3l-2-1v11H8V11l-2 1V9l3.5-2.5L8 5z'/%3E%3C/svg%3E"); }
.t-event { background-color: #e08a1a; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M4 9h16v4H4zm1 4h14v8H5zm6-4v12h2V9zM12 9C9 9 7 7 8 5s4 0 4 4c0-4 3-6 4-4s-1 4-4 4z'/%3E%3C/svg%3E"); }
.t-gem { background-color: #1a8ab0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M6 3h12l4 6-10 12L2 9z'/%3E%3C/svg%3E"); }
.hub-stat { text-align: center; font-size: 15px; color: rgba(220, 230, 255, .7); }

/* 꾸미기 */
.scr.dress { display: flex; gap: 22px; padding: 22px 30px; }
.dr-left { width: 300px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border-radius: 22px; background: rgba(4, 10, 30, .75); box-shadow: inset 0 0 0 1px rgba(232, 196, 106, .4); }
.dr-left .btn { width: 100%; margin: 0; }
.dr-g { display: flex; gap: 8px; } .dr-g button { border: 0; border-radius: 16px; padding: 6px 18px; font-weight: 800; color: #c8d3ea; background: rgba(255,255,255,.08); cursor: pointer; }
.dr-g button.on { color: #3b2600; background: linear-gradient(#fff3b0, #f1b82c); }
.dr-money { font-family: "Black Han Sans", sans-serif; font-size: 22px; color: #ffe27a; }
.dr-need { font-size: 14px; color: #ffb4b4; font-weight: 800; }
.dr-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dr-tabs button { border: 0; border-radius: 14px; padding: 7px 14px; font-size: 15px; font-weight: 800; color: #c8d3ea; background: rgba(255,255,255,.08); cursor: pointer; }
.dr-tabs button.on { color: #3b2600; background: linear-gradient(#fff3b0, #f1b82c); }
.dr-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; align-content: start; padding: 4px; }
.dr-it { position: relative; border: 0; border-radius: 14px; padding: 8px 6px; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: rgba(4, 10, 30, .75); box-shadow: inset 0 0 0 1px rgba(140, 170, 230, .3); }
.dr-it .th { width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; }
.dr-it .th > img { width: 84px; height: 84px; border-radius: 12px; }
.dr-it .th .pf.mini { width: 64px; height: 64px; } .dr-it .th .pf.mini img { width: 100%; height: 100%; }
.dr-it b { font-size: 13px; } .dr-it small { font-size: 12px; font-weight: 800; color: #9ff0c4; }
.dr-it.lock small { color: #ffe27a; }
.dr-it.on { box-shadow: 0 0 0 3px #ffe24a, 0 0 14px rgba(255, 226, 74, .6); }
.dr-it .gtag { position: absolute; left: 6px; top: 6px; font-style: normal; font-size: 11px; font-weight: 900; padding: 0 5px; border-radius: 6px; background: rgba(0,0,0,.6); }
.sw-c { display: block; width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 4px 10px rgba(0,0,0,.5); }

/* 이벤트 · 보석 교환 */
.scr.events, .scr.gems { padding: 20px 34px; display: flex; flex-direction: column; gap: 12px; }
.ev-top { display: flex; align-items: center; gap: 18px; }
.ev-top h2 { margin: 0; font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 40px; color: #ffe08a; }
.ev-top .gm { font-family: "Black Han Sans", sans-serif; font-size: 26px; color: #7fe7ff; } .ev-top .mn { font-family: "Black Han Sans", sans-serif; font-size: 24px; color: #ffe27a; }
.ev-top .btn { margin-left: auto; min-width: 120px; }
.ev-cols { display: flex; gap: 20px; flex: 1; }
.ev-col { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; background: rgba(4, 10, 30, .75); box-shadow: inset 0 0 0 1px rgba(232, 196, 106, .35); }
.ev-col h3 { margin: 0 0 4px; font-family: "Black Han Sans", sans-serif; font-weight: 400; font-size: 26px; color: #fff; } .ev-col h3 small { font-family: "Noto Sans KR"; font-size: 13px; color: #c8d3ea; margin-left: 8px; }
.ev-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.05); }
.ev-row.ready { background: rgba(255, 210, 58, .14); box-shadow: inset 0 0 0 1px rgba(255, 210, 58, .5); } .ev-row.got { opacity: .55; }
.ev-n { flex: 1; } .ev-n b { font-size: 16px; }
.ev-bar { position: relative; height: 16px; margin-top: 4px; border-radius: 8px; background: rgba(0,0,0,.45); overflow: hidden; }
.ev-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #2fae6b, #7dff9a); border-radius: 8px; }
.ev-bar span { position: absolute; inset: 0; text-align: center; font-size: 11px; font-weight: 900; line-height: 16px; }
.ev-r { font-family: "Black Han Sans", sans-serif; font-size: 20px; color: #7fe7ff; min-width: 54px; }
.ev-row button { min-width: 84px; border: 0; border-radius: 10px; padding: 8px 0; font-family: "Black Han Sans", sans-serif; font-size: 17px; color: #fff; cursor: pointer; background: linear-gradient(#ffc35a, #e0731a); box-shadow: 0 3px 0 #8a3c06; }
.ev-row button:disabled { background: #39425a; box-shadow: none; color: #9aa6c0; cursor: default; }
.gx-grid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: center; }
.gx { height: 280px; border: 0; border-radius: 24px; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 30%, #1d4f8a, #0a1a3a 75%); box-shadow: 0 0 0 2px rgba(127, 231, 255, .55), 0 10px 24px rgba(0,0,0,.5); }
.gx:disabled { filter: grayscale(.8) brightness(.6); cursor: default; }
.gx-g { font-family: "Black Han Sans", sans-serif; font-size: 44px; color: #7fe7ff; } .gx-g .gem { width: 40px; height: 40px; vertical-align: -6px; }
.gx-ar { font-style: normal; color: #c8d3ea; }
.gx-m { font-family: "Black Han Sans", sans-serif; font-size: 28px; color: #ffe27a; }
.gx em { font-style: normal; font-size: 14px; font-weight: 900; color: #3b2600; background: linear-gradient(#fff3b0, #f1b82c); padding: 2px 10px; border-radius: 10px; }

/* 전체 화면: 안전 영역 반영 · 휴대폰에서 꽉 차게 */
.scr.hub, .scr.dress, .scr.events, .scr.gems { padding-left: calc(30px + var(--sl, 0px)); padding-right: calc(30px + var(--sr, 0px)); padding-top: calc(18px + var(--st, 0px)); padding-bottom: calc(18px + var(--sb, 0px)); }
.ev-top { min-height: 64px; }
.ev-top h2 { font-size: 46px; }
.ev-tip { font-size: 16px; color: #c8d3ea; margin-left: 10px; }
.ev-top .btn { min-width: 150px; padding: 14px 24px; font-size: 24px; }
.ev-col { padding: 16px 18px; gap: 0; }
.ev-col h3 { font-size: 30px; margin-bottom: 8px; } .ev-col h3 small { font-size: 15px; }
.ev-list { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.ev-row { flex: 1; padding: 10px 14px; gap: 16px; border-radius: 14px; }
.ev-n b { font-size: 21px; }
.ev-bar { height: 22px; border-radius: 11px; margin-top: 7px; } .ev-bar i { border-radius: 11px; } .ev-bar span { font-size: 14px; line-height: 22px; }
.ev-r { font-size: 26px; min-width: 70px; } .ev-r .gem { width: 24px; height: 24px; }
.ev-row button { min-width: 110px; padding: 12px 0; font-size: 21px; border-radius: 12px; }
.gx { height: auto; min-height: 300px; } .gx-g { font-size: 52px; } .gx-m { font-size: 32px; }

/* 일러스트 캐릭터 */
.ava img, .pf img, .ed-ava img, #jpFx .jp-w img { object-fit: cover; object-position: 50% 16%; }
.pf.big.tall { width: 224px; height: 280px; }
.pbadge { position: absolute; right: -8px; bottom: -8px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 3;
  background: radial-gradient(circle at 40% 35%, #2a3a6a, #0a1028); box-shadow: 0 0 0 2px #e8c46a, 0 3px 8px rgba(0,0,0,.6); }
.pbadge svg { width: 24px; height: 24px; }
.pf.big .pbadge { width: 52px; height: 52px; right: -12px; bottom: -12px; } .pf.big .pbadge svg { width: 36px; height: 36px; }
.pf.mini .pbadge { width: 24px; height: 24px; right: -6px; bottom: -6px; } .pf.mini .pbadge svg { width: 17px; height: 17px; }
.avawrap .pbadge { right: -6px; bottom: -6px; }
.dr-name { font-family: "Black Han Sans", sans-serif; font-size: 26px; color: #ffe27a; text-align: center; }
.dr-grid.chs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.dr-it.chcard .th { width: 132px; height: 165px; }
.dr-it.chcard .th > img.chimg { width: 132px; height: 165px; object-fit: cover; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.dr-it.chcard b { font-size: 14px; }
.dr-it.chcard.lock .chimg { filter: saturate(.85); }

.hub-me, #seat0 .avawrap { touch-action: manipulation; -webkit-user-select: none; }
#seats .seat { pointer-events: none; } #seat0 .avawrap { pointer-events: auto; }


/* Test UI copied from poker-test; editor and non-game screens untouched */
#stage { background-color: #08251d; background-image: radial-gradient(ellipse at 50% 42%, rgba(25,112,79,.45), transparent 64%), linear-gradient(145deg,#092a20,#061b16 70%,#04130f); }
#topbar { background: linear-gradient(180deg,rgba(4,20,15,.88),rgba(4,20,15,.18)); padding: 0 18px; }
#topbar .ttl { color: #f1d894; text-shadow: 0 2px 9px rgba(0,0,0,.65); }
#topbar .pill { border-color: rgba(218,188,111,.62); color: #f4dfaa; background: rgba(7,36,27,.8); border-radius: 18px; }
#topbar .tbtn { border: 1px solid rgba(225,205,154,.28); border-radius: 18px; background: linear-gradient(180deg,rgba(33,82,62,.95),rgba(12,43,32,.96)); box-shadow: inset 0 1px 0 rgba(255,255,255,.15),0 4px 10px rgba(0,0,0,.32); }
#pot .box { border-color: rgba(218,188,111,.6); background: linear-gradient(145deg,rgba(7,36,27,.95),rgba(12,55,39,.92)); }
#actions { background: rgba(3,20,15,.92); gap: 5px; padding: 5px; }
#actions .ab { border-radius: 12px; background: linear-gradient(180deg,#285c45,#143d2d); box-shadow: inset 0 1px 0 rgba(255,255,255,.18),0 3px 8px rgba(0,0,0,.32); }
#actions .ab:active:not(:disabled) { background: linear-gradient(180deg,#347654,#1d5039); }
.seat .nm { border-radius: 14px 14px 0 0; background: linear-gradient(180deg,rgba(8,38,28,.96),rgba(4,23,17,.96)); box-shadow: inset 0 0 0 1px rgba(220,195,130,.68); }
.seat .ch { border-radius: 0 0 14px 14px; background: linear-gradient(180deg,rgba(50,39,14,.97),rgba(29,23,8,.97)); box-shadow: inset 0 0 0 1px rgba(220,195,130,.68); }
.card .in { box-shadow: 0 3px 9px rgba(0,0,0,.38); }
#banner { color: #f1dfaa; -webkit-text-stroke-color: #12452f; text-shadow: 0 4px 14px rgba(0,0,0,.8); }

/* Approved bottom UI fix: show the table under the action bar's safe-area inset */
#actions { background: transparent; }

/* 터치 기기: 상단 버튼은 눈에 보이는 것보다 넓게 눌리게 (화면 맨 위 가장자리라 작게 보이면 잘 안 눌림) */
.touch #topbar .tbtn, .touch #topbar .pill { position: relative; }
.touch #topbar .tbtn::after, .touch #topbar .pill::after { content: ''; position: absolute; left: -4px; right: -4px; top: -10px; bottom: -22px; }
.touch .hub-tb button { position: relative; }
.touch .hub-tb button::after { content: ''; position: absolute; left: -4px; right: -4px; top: -14px; bottom: -18px; }
