/* 삼국지 홀덤 — 판 화면 (공통 core.css 뒤에 읽음) */
html[data-game=holdem] { --acc:#1f5f55; --acc-hi:#3d7a70; --acc-lo:#14403a; }
#stage .hd { position:absolute; inset:0; display:flex; flex-direction:column; gap:6px; padding:6px 8px max(8px,env(safe-area-inset-bottom));
  max-width:560px; margin:0 auto; box-sizing:border-box; }
/* 상대 자리 — 6인 탁자: 장수 다섯이 위쪽에 부채꼴로 (가운데가 가장 높이) */
#stage .seat { position:relative; display:flex; flex-direction:column; align-items:center; width:19.4%; max-width:100px; transition:opacity .3s, filter .3s; cursor:pointer; }
#stage .seat .pt { position:relative; width:78%; aspect-ratio:1/1; border:2px solid var(--rc); border-radius:50%; background:#ddd5c7;
  box-shadow:0 2px 6px #0003; }
#stage .seat .pt img { width:100%; height:100%; object-fit:cover; object-position:50% 14%; display:block; border-radius:50%; }
#stage .seat .bt:not(:empty) { position:absolute; right:-1px; bottom:-1px; width:18px; height:18px; border-radius:50%; background:#fbf6ea; border:1px solid #8d6c34;
  color:#5e4a26; font:700 11px/18px sans-serif; text-align:center; z-index:2; }
#stage .seat .lordt, #modal .lordt { position:absolute; left:50%; bottom:-6px; transform:translateX(-50%); background:linear-gradient(#e9c46a,#b8862c); color:#3a2608;
  font-size:10px; font-weight:800; padding:0 5px; border-radius:2px; border:1px solid #7a5512; white-space:nowrap; letter-spacing:.05em; z-index:2; }
#modal .lordt.in { position:static; transform:none; display:inline-block; vertical-align:2px; font-size:12px; }
#stage .seat.lord .pt { border-color:#c9952e; box-shadow:0 0 0 2px #f1d58a, 0 2px 8px #0004; }
#stage .seat .nm { font-size:12px; margin-top:4px; white-space:nowrap; line-height:1.15; text-align:center; }
#stage .seat .nm b { font-size:13px; } #stage .seat .nm small { display:block; font-size:9px; letter-spacing:-.05em; }
#stage .seat .sty { font-size:10.5px; color:#7a5a20; white-space:nowrap; line-height:1.1; }
#stage .seat .ch { font-size:12px; color:var(--dim); white-space:nowrap; } #stage .seat .ch b { color:var(--ink); font-size:13px; }
#stage .seat .ch .ai, #stage .mi .ai { margin-left:3px; font-size:10px; background:#b0302a; color:#fff; padding:0 3px; border-radius:2px; }
#stage .seat .hc { display:flex; justify-content:center; gap:1px; min-height:4px; margin-top:2px; --cw:min(8.6vw,38px); }
#stage .seat .bet { min-height:18px; font-size:12px; white-space:nowrap; }
#stage .seat .bet span { display:inline-block; padding:0 6px; border-radius:9px; background:#2b2722; color:#f3e3b8; font-weight:700; }
#stage .seat .bet span::before { content:"● "; color:#e8c27a; font-size:9px; }
#stage .seat .bet i { font-style:normal; color:var(--dim); }
#stage .seat.turn .pt { box-shadow:0 0 0 3px #e2b35a, 0 0 14px #e2b35a; animation:hpulse 1s ease-in-out infinite alternate; }
@keyframes hpulse { from { box-shadow:0 0 0 2px #e2b35a, 0 0 6px #e2b35a; } to { box-shadow:0 0 0 3px #e2b35a, 0 0 18px #e2b35a; } }
#stage .seat.fold { opacity:.45; } #stage .seat.out { filter:grayscale(1); opacity:.35; }
#stage .seat.win .pt { box-shadow:0 0 0 3px #f0c24a, 0 0 22px #f0c24a; }
#stage .seat .say { position:absolute; left:50%; top:-20px; transform:translate(-50%,4px) scale(.9); opacity:0; pointer-events:none; z-index:6;
  background:#fffdf8; color:#2b2722; border:1px solid #b39a6c; border-radius:6px; padding:4px 8px; font-size:12.5px; font-weight:600; white-space:nowrap;
  box-shadow:0 3px 8px #0003; transition:opacity .2s, transform .2s; }
#stage .seat .say.on { opacity:1; transform:translate(-50%,0) scale(1); }
#stage .top h2 .bl { font-size:13px; color:var(--dim); font-weight:600; margin-left:4px; }
#modal .wstat { display:grid; grid-template-columns:auto 1fr auto; gap:4px 8px; align-items:center; font-size:13px; margin:8px 0; text-align:left; }
#modal .wstat i { height:7px; background:#0001; border-radius:4px; overflow:hidden; } #modal .wstat u { display:block; height:100%; background:var(--acc,#1f5f55); }
/* 탁자 */
#stage .felt { position:relative; flex:1 1 auto; min-height:120px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  border-radius:60px / 50px; background:radial-gradient(ellipse at 50% 40%, #2b7566, #17493f 70%, #10362f); border:3px solid #b8955a;
  box-shadow:inset 0 0 0 2px #0004, inset 0 6px 24px #0006, 0 2px 0 #fff8; padding:8px; }
#stage .felt .pot { color:#f3e3b8; font-size:14px; min-height:20px; } #stage .felt .pot b { font-size:18px; color:#ffe39a; }
#stage .felt .board { display:flex; gap:4px; --cw:min(15vw,62px); }
#stage .felt .res { color:#fff7df; font-size:14px; text-align:center; min-height:20px; line-height:1.5; }
#stage .felt .res b { color:#ffe39a; } #stage .felt .res small { color:#cfe6dc; margin-left:4px; }
/* 카드 — 실제 트럼프 모양 (♠♣ 검정 · ♥♦ 빨강) */
.pc { position:relative; width:var(--cw,48px); aspect-ratio:5/7; border-radius:calc(var(--cw,48px) * .08); background:#fffefb;
  border:1px solid #c9c2b4; box-shadow:0 1px 3px #0005; overflow:hidden; flex:none; font-family:Georgia,"Times New Roman",serif; }
.pc.red { color:#c41a24; } .pc.blk { color:#16161a; }
.pc .ix { position:absolute; left:3%; top:3%; width:22%; display:flex; flex-direction:column; align-items:center; line-height:.95; z-index:2; }
.pc .ix.b { left:auto; top:auto; right:3%; bottom:3%; transform:rotate(180deg); }
.pc .ix em { font-style:normal; font-weight:700; font-size:calc(var(--cw,48px) * .24); letter-spacing:-.1em; white-space:nowrap; }
.pc .ix i { font-style:normal; font-size:calc(var(--cw,48px) * .19); }
.pc .pips { position:absolute; inset:15% 25% 15%; }
.pc .pips i { position:absolute; transform:translate(-50%,-50%); font-style:normal; font-size:calc(var(--cw,48px) * .24); line-height:1; }
.pc .pips i.f { transform:translate(-50%,-50%) rotate(180deg); }
.pc .ace { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:calc(var(--cw,48px) * .6); line-height:1; }
.pc.blk .ace { font-size:calc(var(--cw,48px) * .68); }
.pc .fc { position:absolute; inset:10% 19%; border:1px solid #2a2622; border-radius:2px; overflow:hidden; display:flex; align-items:center; justify-content:center; background:#fbf6ea; }
.pc .fc b { font-size:calc(var(--cw,48px) * .5); font-weight:700; }
.pc .fc img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* 작은 카드(상대 자리·족보 창)는 무늬 배치 대신 큰 글자 */
#stage .seat .pc .pips, #stage .seat .pc .ix.b, #stage .seat .pc .fc, #stage .seat .pc .ace,
#modal .ranks .pc .pips, #modal .ranks .pc .ix.b, #modal .ranks .pc .fc, #modal .ranks .pc .ace { display:none; }
#stage .seat .pc .ix, #modal .ranks .pc .ix { left:0; right:0; top:10%; width:auto; }
#stage .seat .pc .ix em, #modal .ranks .pc .ix em { font-size:calc(var(--cw,48px) * .4); }
#stage .seat .pc .ix i, #modal .ranks .pc .ix i { font-size:calc(var(--cw,48px) * .38); margin-top:2px; }
.pc.back { background:#fffefb; border:1px solid #c9c2b4; }
.pc.back i { position:absolute; inset:6%; border-radius:calc(var(--cw,48px) * .05);
  background:repeating-linear-gradient(45deg,#a3262a 0 3px,#c23b3a 3px 6px); box-shadow:inset 0 0 0 2px #fffefb, inset 0 0 0 3px #a3262a; }
.pc.slot { background:#0002; border:1px dashed #ffffff40; box-shadow:none; }
.pc.dim { opacity:.45; }
.pc.hl { box-shadow:0 0 0 3px #f0c24a, 0 0 12px #f0c24a; transform:translateY(-3px); }
.pc.flip { animation:cflip .45s ease-out; }
@keyframes cflip { from { transform:rotateY(90deg) translateY(-6px); opacity:.3; } to { transform:none; opacity:1; } }
/* 내 자리 */
#stage .mine { display:flex; align-items:center; justify-content:center; gap:12px; flex:none; }
#stage .mine .mc { display:flex; gap:5px; --cw:min(19vw,82px); }
#stage .mine .mi { display:flex; flex-direction:column; gap:2px; font-size:14px; min-width:110px; }
#stage .mine .mi b { font-size:17px; } #stage .mine .mi em { font-style:normal; color:#7a5a20; font-weight:700; font-size:15px; }
#stage .mine .mi span:empty { display:none; }
#stage .mine .mi .tag { align-self:flex-start; font-size:11px; padding:0 6px; border:1px solid #b39a6c; border-radius:2px; color:#5e4a26; }
#stage .msg { flex:none; padding:7px 10px; font-size:14.5px; line-height:1.45; min-height:22px; }
#stage .msg small { font-size:12.5px; }
/* 행동 단추 */
#stage .acts { flex:none; display:flex; gap:6px; min-height:52px; }
#stage .acts > .btn { flex:1; min-height:52px; font-size:17px; font-weight:700; padding:6px 4px; }
#stage .acts .btn.wide { flex:1; }
html body #stage .acts .btn.fold { background:var(--tit); border:1px solid #b2aa9c; color:#6e2a22; }
html body #stage .acts .btn.call { background:var(--tit); border:1px solid #8a8274; color:var(--ink); }
html body #stage .acts .btn.go { background:linear-gradient(var(--acc-hi),var(--acc)); border:1px solid var(--acc-lo); color:#fff; text-shadow:0 1px 0 #0005; box-shadow:0 2px 0 var(--acc-lo); }
#stage .acts .wait { flex:1; display:flex; align-items:center; justify-content:center; color:var(--dim); font-size:14px; }
#stage .acts .rz { flex:1; display:flex; flex-direction:column; gap:6px; }
#stage .acts .rz .qk { display:flex; gap:5px; } #stage .acts .rz .qk .btn { flex:1; font-size:14px; padding:7px 2px; min-height:36px; }
#stage .acts .rz input[type=range] { width:100%; accent-color:var(--acc); height:26px; }
#stage .acts .rz .row2 { display:flex; gap:6px; } #stage .acts .rz .row2 .btn { min-height:46px; font-size:16px; font-weight:700; }
#stage .acts .rz .row2 .btn.sub { flex:0 0 30%; } #stage .acts .rz .row2 .btn.go { flex:1; }
#stage .tools { flex:none; display:flex; gap:6px; }
#stage .tools .btn { flex:1; font-size:14px; padding:6px 4px; min-height:38px; }
/* 족보 창 */
#modal .ranks { text-align:left; max-height:56vh; overflow:auto; border-top:1px solid var(--rule2); }
#modal .ranks .rr { display:flex; gap:10px; align-items:center; padding:6px 2px; border-bottom:1px solid var(--rule2); }
#modal .ranks .no { width:20px; text-align:center; color:var(--dim); font-size:13px; }
#modal .ranks b { font-size:14px; } #modal .ranks small { margin-left:6px; font-size:12px; color:var(--dim); }
#modal .ranks .mini { display:flex; gap:2px; margin-top:3px; --cw:30px; }
/* 낮은 화면(가로·작은 폰) */
@media (max-height:700px) {
      #stage .seat .pt { width:64%; } #stage .seat .sty { display:none; }
  #stage .mine .mc { --cw:min(15vw,62px); } #stage .felt .board { --cw:min(12vw,50px); }
  #stage .msg { font-size:13.5px; padding:5px 8px; }
}
@media (max-height:560px) {
  #stage .seat .pt { width:50%; } #stage .seat .hc { display:none; }
}
/* 둘러앉기 (2026-12-03 사용자 요청): 타원형 탁자 둘레에 장수, 나는 아래 가운데(아래 내 자리) */
#stage .ring { position:relative; flex:1 1 auto; min-height:300px; margin:4px 2px 0; }
#stage .ring .felt { position:absolute; left:15%; right:15%; top:17%; bottom:15%; min-height:0; border-radius:50%; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:5px; padding:6px 10%; box-sizing:border-box; }
#stage .ring .seat { position:absolute; transform:translate(-50%,-50%); width:19%; max-width:96px; display:flex; flex-direction:column; align-items:center; z-index:2; }
#stage .ring.n2 .seat { width:28%; max-width:130px; }
#stage .ring.n9 .seat, #stage .ring.n8 .seat { width:17%; max-width:88px; }
#stage .ring .seat .pt { width:62%; }
#stage .ring.n9 .seat .pt, #stage .ring.n8 .seat .pt { width:56%; }
#stage .ring .seat .nm { margin-top:2px; } #stage .ring .seat .nm small { display:none; }
/* 서 있는 장수 동작 그림 (12-03): 동그란 얼굴 대신 */
#stage .ring .seat .pt.sp, #stage .ring.n9 .seat .pt.sp, #stage .ring.n8 .seat .pt.sp { width:auto; height:60px; aspect-ratio:auto; border:0; border-radius:0; background:none; box-shadow:none; overflow:visible; display:flex; align-items:flex-end; justify-content:center; }
#stage .ring .seat .pt.sp .sprf { animation:bob 2.6s ease-in-out infinite; }
#stage .ring .seat .pt.sp .sprf.act { animation:none; }
#stage .ring .seat.turn .pt.sp { box-shadow:none; animation:none; } #stage .ring .seat.turn .pt.sp .sprf { filter:drop-shadow(0 0 4px #e2b35a) drop-shadow(0 0 2px #e2b35a); }
#stage .ring .seat.win .pt.sp { box-shadow:none; } #stage .ring .seat.win .pt.sp .sprf { filter:drop-shadow(0 0 7px #f0c24a); }
#stage .ring .seat.lord .pt.sp { box-shadow:none; }
#stage .ring .seat .pt.sp .lordt { bottom:-6px; }
#stage .ring .seat .pt.sp .bt:not(:empty) { right:-8px; bottom:0; }
@keyframes bob { 50% { transform:translateY(-2px); } }
#trepot:empty { display:none; }
#stage .ring .seat .sty { display:none; }
#stage .ring .seat .say { top:-22px; }
#stage .ring .seat.le .say { left:0; transform:translate(0,4px) scale(.9); } #stage .ring .seat.le .say.on { transform:translate(0,0) scale(1); }
#stage .ring .seat.ri .say { left:auto; right:0; transform:translate(0,4px) scale(.9); } #stage .ring .seat.ri .say.on { transform:translate(0,0) scale(1); }
@media (max-height:700px) { #stage .ring { min-height:250px; } #stage .ring .seat .pt { width:48%; } #stage .ring.n9 .seat .pt { width:44%; } #stage .ring .seat .pt.sp { height:48px; } }
/* 가로로 넓은 창(PC 팝업 등): 탁자를 넓게, 자리는 납작하게 */
@media (min-aspect-ratio:5/4) {
  #stage .hd, #stage .sd, #stage .mg { max-width:1000px !important; }
  #stage .ring { min-height:220px; }
  #stage .ring .felt { left:17%; right:17%; top:20%; bottom:18%; }
  #stage .ring .seat, #stage .ring.n9 .seat, #stage .ring.n8 .seat { width:13%; max-width:110px; }
  #stage .ring .seat .pt, #stage .ring.n9 .seat .pt { width:38px; } #stage .ring .seat .pt.sp { width:auto; height:46px; }
  #stage .ring .seat .hc, #stage .ring .seat .oc { --cw:22px !important; }
  #stage .ring .seat .nm b { font-size:12px; } #stage .ring .seat .ch { font-size:11px; }
}

/* 바둑이 (2026-12-03) — 베팅 단추 두 줄(세븐포커와 같음) · 자리의 뒷면 4장·바꾼 장수 · 내 4장(죽은 카드 흐리게) */
html[data-game=badugi] { --acc:#3a5a2a; --acc-hi:#58794a; --acc-lo:#26401b; }
#stage .acts { flex-direction:column; gap:5px; }
#stage .acts .r1, #stage .acts .r2 { display:flex; gap:5px; }
#stage .acts .r1 .btn, #stage .acts .r2 .btn { flex:1; min-height:44px; font-size:15px; font-weight:700; padding:4px 2px; }
html body #stage .acts .btn.die { background:var(--tit); border:1px solid #b2aa9c; color:#6e2a22; }
html body #stage .acts .btn.go:disabled { filter:grayscale(.8) opacity(.45); }
#stage .ring .seat .oc { display:flex; justify-content:center; --cw:min(6.2vw,26px); min-height:4px; margin-top:2px; }
#stage .ring .seat .oc .pc + .pc { margin-left:calc(var(--cw) * -.3); }
#stage .ring .seat .oc .pc.dd { opacity:.45; filter:grayscale(.6); }
#stage .ring .seat .un { display:flex; justify-content:center; --cw:min(4.8vw,20px); margin-top:1px; }
#stage .ring .seat .un .bk { display:flex; } #stage .ring .seat .un .pc + .pc { margin-left:calc(var(--cw) * -.45); }
#stage .ring .seat.swap .un .bk { animation:swap .45s ease; }
@keyframes swap { 30% { transform:translateY(-5px) rotate(-4deg); } 60% { transform:translateY(2px) rotate(3deg); } }
#stage .ring .seat .dr { display:flex; gap:2px; justify-content:center; flex-wrap:wrap; min-height:0; }
#stage .ring .seat .dr i { font-style:normal; font-size:10px; line-height:14px; padding:0 3px; border-radius:2px; background:#26401bcc; color:#fff; }
#stage .ring .seat .dr i.pat { background:#a3261d; }
#stage .ring .seat .bt:not(:empty) { width:auto; padding:0 4px; border-radius:2px; background:#a3261d; color:#fff; border:0; font-size:10px; line-height:16px; height:16px; }
#stage .ring .seat .bet i { font-style:normal; font-weight:700; color:#3a5a2a; }
#stage .mine .mc { --cw:min(18vw,10.5vh,78px); gap:6px; }
#stage .mine .mc .pc { cursor:default; transition:transform .15s, opacity .15s; }
#stage .mine .mc.choosing .pc { cursor:pointer; }
#stage .mine .mc .pc.dd:not(.x) { opacity:.6; filter:grayscale(.5); }
#stage .mine .mc .pc.dd:not(.x)::after { content:"죽은 카드"; position:absolute; left:0; right:0; bottom:0; background:#555c; color:#fff; font:700 calc(var(--cw) * .15)/1.5 sans-serif; text-align:center; }
#stage .mine .mc .pc.x { opacity:.4; transform:translateY(8px) rotate(-4deg); }
#stage .mine .mc .pc.x::after { content:"바꿈"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#b0302a; font:900 calc(var(--cw) * .28)/1 sans-serif; background:#fff9; }
#stage .mine .mc .pc.nw { animation:nw .5s ease; }
@keyframes nw { 0% { transform:translateY(-40px) rotateY(90deg); opacity:0; } 60% { transform:translateY(4px) rotateY(0); opacity:1; } }
#stage .mine .mc.choosing { padding-bottom:6px; }
#stage .mine { flex-direction:column; gap:4px; } #stage .mine .mi { flex-direction:row; flex-wrap:wrap; justify-content:center; gap:8px; min-width:0; align-items:center; }
#stage .mine .mi .mydr { display:flex; gap:3px; } #stage .mine .mi .mydr i { font-style:normal; font-size:11px; padding:0 4px; border-radius:2px; background:#26401b22; color:#26401b; }
#modal .hintc { display:flex; justify-content:center; gap:4px; --cw:46px; margin:6px 0; }
#modal .hintc .pc.x { opacity:.45; transform:translateY(5px); box-shadow:0 0 0 2px #b0302a; }
