/* 실제 게임 화면 (가로, 844 x 390 기준으로 그린 뒤 화면 크기에 맞춰 확대/축소) */
.stage { position: fixed; inset: 0; background: #0d2217; overflow: hidden; }
.stage .frame { position: absolute; }
.rot { position: fixed; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 12px; color: #ffd76a; z-index: 50; }

/* 손패 */
.hand2 .card.playable { cursor: pointer; }
.hand2 .card.dim { opacity: .55; }
.hand2 .card.sel { transform: translateY(-16px); outline: 2px solid #ffd76a; z-index: 5; box-shadow: 0 6px 12px #000a; }
.hand2 .card.playable:not(.sel):hover { transform: translateY(-6px); }

/* 바닥 */
.fst.match { outline: 2px solid #6be3ff; border-radius: 6px; background: #6be3ff33; }
.fst.pick { outline: 3px solid #ffd76a; border-radius: 6px; cursor: pointer; animation: pulse2 1s infinite; }
.fst { position: relative; padding: 2px; }
.fst .badge { position: absolute; top: -8px; left: 0; z-index: 6; background: #c0392b; color: #fff; font-size: 9px; padding: 0 5px; border-radius: 5px; font-weight: 800; }
@keyframes pulse2 { 50% { background: #ffd76a44; } }
/* 방금 낸/뒤집은 카드, 먹은 패: 잠깐 바닥에 남겨서 누가 무엇을 먹었는지 보이게 한다 */
.fst.just { outline: 2px solid #ffd76a; border-radius: 6px; background: #ffd76a33; }
/* 방금 낸 패 표시 (바닥 안에서). 낸 패 카드는 빨간 테두리, "낸 패" 표시는 빨강 */
/* 방금 낸(또는 뒤집은) 패: 카드 위에 붙는 빨간 역삼각형(▼). 손패의 하늘색 ▼ 과 색이 다름. 바닥 패는 그대로 둔다 */
.fst .card.pl { position: relative; z-index: 2; }
.fst .card.pl::after { content: ''; position: absolute; pointer-events: none; z-index: 4; left: 50%; top: -16px; margin-left: -10px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 14px solid #ff4d4d; filter: drop-shadow(0 0 2px #000c) drop-shadow(0 0 4px #ff4d4d); }
.fst.ghost { outline: 2px dashed #8fe3a3; border-radius: 6px; background: #8fe3a322; }
.fst .gl { position: absolute; top: auto; bottom: -9px; left: 0; z-index: 6; background: #0f2c1ecc; color: #ffd76a; font-size: 9px; padding: 0 5px; border-radius: 5px; font-weight: 800; white-space: nowrap; }
.fst.ghost .gl { color: #8fe3a3; }
/* 방금 낸 패 팝업: 바닥 위에 떠서, 낸 패(빨간 테두리·"낸 패")와 원래 바닥 패(어둡게·"바닥")를 나란히 보여 준다 */
.moveov { position: absolute; left: calc(50% + 75px); top: 50%; transform: translate(-50%, -50%); z-index: 20; pointer-events: none; display: flex; gap: 14px; padding: 16px 12px 8px; background: #0b2418ee; border: 2px solid #ffd76a; border-radius: 10px; box-shadow: 0 4px 16px #000a; }
.moveov .mvgrp { position: relative; display: flex; gap: 6px; }
.moveov .mvgrp.ghost { padding-right: 14px; border-right: 1px dashed #8fe3a388; }
.moveov .mvgrp.ghost:last-child { border-right: 0; padding-right: 0; }
.moveov .gl { position: absolute; top: -14px; left: 0; background: transparent; color: #ffd76a; font-size: 10px; padding: 0; }
.moveov .mvgrp.ghost .gl { color: #8fe3a3; }
.tg { position: relative; display: inline-block; }
.tg i { position: absolute; top: -12px; left: -4px; right: -4px; text-align: center; font-style: normal; font-size: 9px; font-weight: 800; white-space: nowrap; z-index: 7; color: #fff; border-radius: 4px; padding: 0 2px; }
.tg.played i { background: #e03a2a; }
.tg.base i { background: #5c6b63; }
.moveov .card.pl { outline: 3px solid #ff5a3c; border-radius: 4px; box-shadow: 0 0 10px #ff5a3cbb; }
.moveov .card.bg { opacity: .8; filter: brightness(.82); }
.pile2.pick { outline: 3px solid #ffd76a; cursor: pointer; animation: pulse2 1s infinite; }
.pile2.empty { opacity: .25; }
.held-box { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #cfe3d6; }

/* 안내 / 행동 버튼 / 큰 글자 효과 */
.status2 { position: absolute; left: 50%; transform: translateX(-50%); top: 2px; background: #e6c15a; color: #2b2208; font-weight: 800; font-size: 12px; padding: 4px 12px; border-radius: 10px; white-space: nowrap; z-index: 8; }
.status2.wait { background: #2f4f40; color: #d9e6dd; }
.room-tag { position: absolute; left: 8px; top: 4px; font-size: 10px; color: #cfe3d6aa; z-index: 8; }
.status2.st { position: static; transform: none; display: inline-block; }
.center2 { position: absolute; left: 6px; right: 6px; top: 108px; bottom: 116px; display: flex; flex-direction: column; gap: 2px; }
.center2-row { flex: 1; display: flex; gap: 8px; min-height: 0; }
.floor-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; position: relative; }
.piles3 { display: grid; grid-template-columns: repeat(5, 38px); gap: 4px; align-content: center; padding-right: 4px; max-height: 100%; }
.piles3 .pile2 { width: 38px; height: 54px; font-size: 12px; border-width: 1px; }
/* 더미만 뒤집기: 더미 바로 아래 오른쪽 (오른손으로 누르기 쉽게) */
.piles3 { align-content: start; padding-top: 30px; } /* 위 26px 는 진행 설명(.ticker) 자리 */
/* 바닥 패가 많을 때 카드 크기 축소 (center2 높이 154px 안에 두 줄·세 줄이 들어가도록). 크기는 app.js 의 floorSize 기준 */
.floor-col { padding-top: 26px; } /* 왼쪽 위 기록·방 코드 줄(.infobar)과 겹치지 않게. 바닥 패가 쓸 수 있는 높이는 128px */
.floor2.fl-o { flex-wrap: nowrap; }
.floor2.fl-o .fst + .fst { margin-left: calc(-1 * var(--ov, 0px)); }
.floor2.fl-l .card.fl { width: 43px; height: 64px; }
.floor2.fl-l .card.fl .e { font-size: 19px; }
.floor2.fl-l .card.fl .m { font-size: 12px; }
.floor2.fl-l .card.fl .l { font-size: 9px; }
.floor2.fl-l .fst .card + .card { margin-left: -26px; }
.floor2.fl-m .card.fl { width: 38px; height: 57px; }
.floor2.fl-m .card.fl .e { font-size: 16px; }
.floor2.fl-m .card.fl .m { font-size: 11px; }
.floor2.fl-m .card.fl .l { font-size: 8px; }
.floor2.fl-m .fst .card + .card { margin-left: -23px; }
.floor2.fl-s .card.fl { width: 24px; height: 36px; }
.floor2.fl-s .card.fl .e { font-size: 10px; }
.floor2.fl-s .card.fl .m { font-size: 8px; }
.floor2.fl-s .card.fl .l { font-size: 6px; padding: 0 1px; }
.floor2.fl-s .fst .card + .card { margin-left: -14px; }
.flipbtn { position: absolute; right: 10px; bottom: 116px; z-index: 10; font-size: 13px; padding: 7px 14px; box-shadow: 0 2px 6px #0008; }
/* 큰 카드 (내 손패 / 바닥 / 더미) */
.card.hc { width: 50px; height: 75px; }
.card.hc .e { font-size: 22px; }
.card.hc .m { font-size: 13px; }
.card.hc .l { font-size: 10px; }
.card.fl { width: 50px; height: 75px; }
.card.fl .e { font-size: 22px; }
.card.fl .m { font-size: 14px; }
.card.fl .l { font-size: 10px; }
.fst .card + .card { margin-left: -30px; }
/* 하나후다 도안 그림: 카드 전체를 채우고, 월 숫자·종류 라벨은 그 위에 */
.card .e.art { position: absolute; left: 0; top: 0; width: 100%; height: 100%; font-size: 0; border-radius: 4px; overflow: hidden; }
.card .e.art svg { width: 100%; height: 100%; display: block; }
.card .m, .card .l { position: relative; z-index: 1; }
.card .m { background: #fffd; border-radius: 4px; padding: 0 3px; }
/* 선잡기: 엎어 둔 카드 10장 */
.dgrid { display: grid; grid-template-columns: repeat(5, 58px); gap: 8px 8px; justify-content: center; margin: 8px 0; }
.dc { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dn { font-size: 10px; color: #cfe3d6; white-space: nowrap; max-width: 58px; overflow: hidden; text-overflow: ellipsis; min-height: 12px; }
.dback { width: 50px; height: 75px; border-radius: 4px; border: 2px solid #f0e3c0; background: repeating-linear-gradient(45deg, #7a1f1f, #7a1f1f 5px, #8e2a2a 5px, #8e2a2a 10px); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff8; }
.dback.free { cursor: pointer; animation: dpulse 1s infinite; }
@keyframes dpulse { 50% { filter: brightness(1.45); transform: translateY(-3px); } }
.dback.taken { opacity: .45; color: #fff; }
.dc.win .card { outline: 3px solid #ffd76a; border-radius: 4px; }
.dc.win .dn { color: #ffd76a; font-weight: 800; }
.dmsg { text-align: center; font-size: 12px; margin: 4px 0 0; }
/* 하나후다 그림 카드(이미지): 카드 틀 자체가 그림에 들어 있으므로 기본 테두리·배경을 없앤다 */
.card.hf { background: transparent; border: 0; padding: 0; box-shadow: none; }
.card.hf .e.art { border-radius: 0; overflow: visible; }
.card.hf .e.art img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.card.hf .m { position: absolute; left: 3px; top: 3px; font-size: 11px; line-height: 1.1; }
.card.hf .l { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); font-size: 9px; padding: 0 3px; }
.hand2 .card.hf { padding-left: 0; }
.hand2 .card.hf .l { left: 3px; transform: none; }
/* 터치 화면에서는 마지막으로 누른 카드에 hover 가 남아 올라와 보이므로 끈다 */
@media (hover: none) {
  .hand2 .card:not(.sel):hover { transform: none !important; }
}
/* 바닥 패와 월이 같은(먹을 수 있는) 손패: 올리지 않고 제자리에서 표시만 붙인다.
   모양은 app.js 의 MATCH_MARK 값(= .hand2 의 data-mark)으로 고른다: bar(기본) | dot | ring.
   색은 --mk (바닥의 맞는 패 하늘색과 같음. 낸 패 빨강·선택 금색과 다름). 손패는 오른쪽이 다음 카드에 가려지므로 왼쪽/위쪽에 둔다 */
.hand2 { --mk: #6be3ff; }
.hand2 .card.fm { position: relative; }
.hand2 .card.fm::after { content: ''; position: absolute; pointer-events: none; z-index: 3; }
.hand2[data-mark="bar"] .card.fm::after { left: 0; right: 0; top: 0; height: 6px; border-radius: 4px 4px 0 0; background: var(--mk); box-shadow: 0 0 6px var(--mk); }
.hand2[data-mark="dot"] .card.fm::after { left: 2px; top: 38%; width: 12px; height: 12px; border-radius: 50%; background: var(--mk); border: 2px solid #0b2a33; box-shadow: 0 0 6px var(--mk); }
/* pop: 맞는 패가 있으면 나머지 손패를 어둡게 하고, 맞는 패는 아래쪽 굵은 하늘색 막대 + 점으로 강조 */
.hand2[data-mark="pop"].hasfm .card:not(.fm):not(.sel) { filter: brightness(.5) saturate(.7); }
.hand2[data-mark="pop"] .card.fm::after { left: 0; right: 0; bottom: 0; height: 9px; border-radius: 0 0 4px 4px; background: var(--mk); box-shadow: 0 0 8px 2px var(--mk); }
.hand2[data-mark="pop"] .card.fm::before { content: ''; position: absolute; z-index: 3; pointer-events: none; left: 2px; top: 34%; width: 16px; height: 16px; border-radius: 50%; background: var(--mk); border: 2px solid #0b2a33; box-shadow: 0 0 8px 2px var(--mk); }
/* tri: 카드 위쪽에 붙는 하늘색 역삼각형(▼). 가려지는 오른쪽이 아니라 카드 왼쪽 위에 둔다 */
.hand2[data-mark="tri"] .card.fm::after { left: 3px; top: -15px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 14px solid var(--mk); filter: drop-shadow(0 0 3px #000c) drop-shadow(0 0 4px var(--mk)); }
.hand2[data-mark="ring"] .card.fm::after { inset: 0; border-radius: 5px; box-shadow: inset 0 0 0 3px var(--mk), 0 0 6px var(--mk); }
/* 더미 선택 / 나가기 버튼: 더미 패 위쪽 (기록 버튼 왼쪽) */
/* 안내 줄: [기록] 방 코드·제 N판·대기실 (왼쪽)과 가운데 안내 문구를 같은 높이의 한 줄로 세로 가운데 정렬 */
.statusrow { height: 26px; display: flex; align-items: center; justify-content: center; }
/* 턴 타이머 숫자 (5·4·3·2·1) */
.cd { margin-left: 8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; background: #3b5b49; color: #cfe3d6; }
.cd.mine { background: #e6c15a; color: #2b2208; min-width: 24px; height: 24px; border-radius: 12px; font-size: 15px; box-shadow: 0 0 0 2px #0006; }
.cd.urgent { background: #d33a3a; color: #fff; }
/* 내 차례일 때 화면 가운데에 보이는 큰 카운트다운. 깜빡이지 않게 움직임·그림자·번쩍임을 모두 없애고 색만 바꾼다 (터치는 통과) */
.cdbig { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); z-index: 30; pointer-events: none; font-size: 96px; line-height: 1; font-weight: 900; color: #ffd76a; opacity: .5; -webkit-text-stroke: 2px #5a2a00; will-change: contents; }
.cdbig.warn { color: #ffb347; }
.cdbig.urgent { color: #ff6b6b; opacity: .6; }
.cd.warn { background: #e08a2e; color: #fff; }
.infobar { position: absolute; left: 6px; top: 113px; height: 26px; display: flex; align-items: center; gap: 8px; z-index: 9; }
.infobar .room-tag { position: static; display: flex; align-items: center; line-height: 1; }
.bottom .opts .optrow { display: flex; flex-direction: row; gap: 4px; }
.logchip { font-size: 10px; line-height: 14px; padding: 1px 9px; border-radius: 6px; background: #3b5b49; color: #f2efe4; }
.bottom .opts { bottom: auto; top: -131px; left: 6px; right: auto; flex-direction: column; gap: 4px; z-index: 12; }
.bottom .opts b { padding: 4px 9px; font-size: 11px; text-align: center; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.floor-col { padding-left: 162px; } /* 왼쪽 설정 영역 폭 162px (6~168) */
/* 손패: 겹쳐도 왼쪽에 월·그림·종류가 보이게 왼쪽 정렬 */
/* 왼쪽 정보(광·열·띠·피)의 위쪽 선을 손패 위 역삼각형(▼) 꼭대기에 맞춘다: 손패 위 = 128 - 4 - 75(카드) - 15(▼) = 34px, 칸 4개가 남은 90px 안에 들어가게 낮춤 */
.bottom .mycap { width: 160px; top: 10px; } /* 먹은 패 네 줄(91px)을 하단 영역 안에서 위아래 여백이 같게 가운데에 둔다 */
.bottom .mycap .mgrid.one { gap: 2px; }
.bottom .mycap .mgrid.one .mcell { height: 20px; }
.bottom .hand2 { left: 170px; }
.hand2 .card { align-items: flex-start; padding-left: 3px; }
.hand2 .card .e { font-size: 22px; }
.hand2 .card .l { font-size: 10px; padding: 1px 3px; }
/* 화면 드래그로 페이지가 끌려 움직이는 것 방지 (게임 화면에서만) */
html:has(.stage), body:has(.stage) { overflow: hidden; overscroll-behavior: none; touch-action: none; position: fixed; width: 100%; }
.logpanel, .md { touch-action: pan-y; }
/* 진행 중 상자: 자리를 차지하지 않고, 왼쪽 위(방 코드·대기실·기록 등 설정 영역) 위에 그냥 덮어서 보인다 */
.floor-col .held-box { position: absolute; left: 0; top: 0; bottom: auto; z-index: 20; background: #0f2c1eee; border: 1px solid #2f6a4b; border-radius: 6px; padding: 4px 6px; }
/* 진행 설명 한 줄: 오른쪽 더미 위쪽(중앙 영역 맨 위 빈 줄)에 두고, 길면 두 줄까지 */
.ticker { position: absolute; right: 10px; top: 110px; width: 206px; height: 26px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 10px; line-height: 12px; color: #cfe3d6cc; overflow: hidden; }
.logbtn { position: absolute; right: 8px; top: 2px; z-index: 9; font-size: 10px; padding: 2px 8px; background: #3b5b49; color: #f2efe4; }
.actionbar { position: absolute; left: 170px; right: 160px; flex-wrap: nowrap; white-space: nowrap; bottom: 84px; /* 하단 영역(높이 112px) 맨 위, 손패 바로 위 */ display: flex; align-items: center; gap: 6px; z-index: 10; }
.actionbar .cd { margin-left: 0; }
.actionbar button { font-size: 12px; padding: 5px 9px; flex: none; box-shadow: 0 2px 6px #0008; }
.banner {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 40; pointer-events: none;
  font-size: 44px; font-weight: 900; color: #ffd76a; text-shadow: 0 0 6px #000, 0 3px 0 #8a3b00, 0 0 18px #ff9a00;
  animation: bannerpop 1.6s ease-out var(--el, 0s) forwards; white-space: nowrap;
}
.banner small { display: block; text-align: center; font-size: 13px; color: #fff; text-shadow: 0 1px 3px #000; }
.banner.shk { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 30px; animation-duration: 2.2s; }
.banner.shk .shkcards { display: flex; gap: 6px; filter: drop-shadow(0 4px 10px #000a) drop-shadow(0 0 12px #ffd76a); }
.banner.shk .shkcards .card { animation: shkwob .35s ease-in-out 3; animation-delay: var(--el, 0s); }
.banner.shk small { background: #000a; padding: 2px 10px; border-radius: 10px; }
@keyframes shkwob { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
.banner.jkev { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 16px; }
.banner.jkev::before { content: ''; position: absolute; left: 50%; top: 42%; width: 230px; height: 230px; margin: -115px 0 0 -115px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, #ffd76acc 0%, #ffd76a55 40%, transparent 70%); }
.jkcard { width: 92px; height: 132px; border-radius: 9px; border: 3px solid #ffd76a; background: linear-gradient(160deg, #7a3fc4, #3d1b6e); box-shadow: 0 6px 18px #000a, 0 0 22px #ffd76a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.jkcard .jke { font-size: 52px; line-height: 1; filter: drop-shadow(0 2px 3px #0008); }
.jkcard .jkt { font-size: 15px; font-weight: 900; color: #fff; text-shadow: 0 1px 3px #000; }
.banner.jkev small { background: #000a; padding: 2px 10px; border-radius: 10px; }
.banner.jk-chukha .jkcard { background: linear-gradient(160deg, #e0457b, #8f1d4a); }
.banner.jk-bbakku .jkcard { background: linear-gradient(160deg, #2f8fd6, #1b4a8a); }
.banner.jk-evbomb .jkcard { background: linear-gradient(160deg, #e8591a, #6b1a05); }
.banner.jk-evbombPpuk .jkcard { background: linear-gradient(160deg, #c8282d, #4a0a10); }
.banner.jk-evppuk .jkcard { background: linear-gradient(160deg, #7b8794, #3a4350); }
.banner.jk-evppukEat .jkcard { background: linear-gradient(160deg, #3aa66a, #14502f); }
.banner.jk-evttadak .jkcard { background: linear-gradient(160deg, #e6a21f, #8a5200); }
.banner.jk-evjjok .jkcard { background: linear-gradient(160deg, #e86fa8, #8f2160); }
.banner.jk-evssul .jkcard { background: linear-gradient(160deg, #38b2c4, #146070); }
.banner.jk-evescape .jkcard { background: linear-gradient(160deg, #8bc34a, #3f6b12); }
.banner.jkev .jkcard .jkt { font-size: 17px; }
@keyframes bannerpop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }

/* 프레임 안의 팝업 */
.ov { position: absolute; inset: 0; background: #000a; display: flex; align-items: center; justify-content: center; z-index: 50; padding: 10px; }
.md { background: #1b4631; border: 1px solid #e6c15a; border-radius: 12px; padding: 12px 16px; max-width: 100%; max-height: 100%; overflow-y: auto; }
.md h2 { margin: 0 0 6px; font-size: 15px; }
.md p { margin: 4px 0; font-size: 12px; }
.md .hint { font-size: 11px; }
.md .rps { display: flex; gap: 10px; justify-content: center; margin: 8px 0; }
.md .rps button { font-size: 26px; padding: 8px 16px; }
.md table.sum { font-size: 11px; }
.md table.sum th, .md table.sum td { padding: 2px 5px; }
.md .divide-btns { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.md .divide-btns button { min-width: 34px; }
.logpanel { position: absolute; right: 6px; top: 100px; bottom: 134px; width: 250px; background: #0d2217ee; border: 1px solid #2f6a4b; border-radius: 8px; padding: 6px; overflow-y: auto; z-index: 45; font-size: 11px; line-height: 1.5; }
.logpanel div { border-bottom: 1px solid #16372a; }
.logpanel .hl { color: #ffd76a; font-weight: 700; }
/* 상대 패널의 작은 카드 */
.op { cursor: default; }
.op .row1 { margin-bottom: 2px; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 4px; }
.mcell { display: flex; align-items: center; height: 24px; min-width: 0; }
.ml { font-size: 9px; color: #9fc2ad; width: 22px; flex: 0 0 auto; white-space: nowrap; }
.ml b { color: #f2efe4; margin-left: 1px; font-size: 9px; }
.mgrid.one { grid-template-columns: 1fr; gap: 3px; }
.mgrid.one .mcell { height: 24px; }
.mstrip { display: flex; }
.mc.mimg { padding: 0; overflow: hidden; background: #fff; }
.mc.mimg img { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; }
.mc { width: 16px; height: 22px; border-radius: 2px; border: 1px solid #0007; font-size: 8px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: 0 1px 1px #0005; }
.mc.g-gwang { background: #d4a900; }
.mc.g-yeol { background: #3f72c4; }
.mc.g-tti { background: #a8a8a8; }
.mc.t-hong { background: #d33a3a; }
.mc.t-cheong { background: #2b6fd6; }
.mc.t-cho { background: #2e9a4a; }
.mc.g-pi { background: #7a8a5a; }
.mc.sp { outline: 1px solid #ffd76a; }
.mc.joker { background: #5b2d9b; }
.mc.joker.s2 { font-size: 7px; letter-spacing: -1px; }
.mc.joker.vt { font-size: 9px; line-height: 10px; text-align: center; letter-spacing: 0; }
.mc.joker.s3 { font-size: 5px; letter-spacing: -1px; line-height: 1; }
/* 그림 카드는 종류를 테두리 색으로 구분한다 (광 금색 / 열끗 파랑 / 띠 빨강·파랑·초록 / 피 연두) */
.mc.mimg { border-width: 2px; background: #fff; }
.mc.mimg.g-gwang { border-color: #d4a900; }
.mc.mimg.g-yeol { border-color: #3f72c4; }
.mc.mimg.g-tti { border-color: #a8a8a8; }
.mc.mimg.t-hong { border-color: #d33a3a; }
.mc.mimg.t-cheong { border-color: #2b6fd6; }
.mc.mimg.t-cho { border-color: #2e9a4a; }
.mc.mimg.g-pi { border-color: #7a8a5a; }
.mc.mimg.sp { border-color: #ffd76a; outline: none; }
/* 확대 보기: 왼쪽은 먹은 패, 오른쪽은 지금 진행 상황(최근 진행) */
.zoommd { padding-bottom: 8px; }
.zbody { display: flex; gap: 10px; align-items: flex-start; }
.zmain { flex: 1; min-width: 0; }
.zoommd .zcards .card { width: 40px; height: 60px; }
.zoommd .zcards .card .m { font-size: 10px; left: 2px; top: 2px; }
.zoommd .zcards .card .l { font-size: 8px; padding: 0 2px; bottom: 2px; }
.zoommd .zrow { margin-top: 4px; }
.zside { width: 176px; flex: 0 0 176px; background: #0d2217; border: 1px solid #2f6a4b; border-radius: 8px; padding: 6px; margin-top: 6px; max-height: 300px; overflow-y: auto; }
.zh { font-size: 11px; font-weight: 800; color: #ffd76a; margin-bottom: 4px; }
.zlive { font-size: 10px; color: #cfe3d6; margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.zlive .card { width: 34px; height: 51px; }
.zlog { font-size: 11px; line-height: 1.35; border-bottom: 1px solid #16372a; padding: 2px 0; color: #cfe3d6; }
.zlog.hl { color: #ffd76a; font-weight: 700; }
.zlog.newest { color: #fff; font-weight: 800; }
/* 상대의 현재 점수: 눈에 띄게 (내 정보 칸의 "N점"처럼) */
.osc { flex: 0 0 auto; font-size: 17px; font-weight: 900; color: #ffd76a; line-height: 1; text-shadow: 0 1px 2px #000a; padding: 0 2px; }
.osc small { font-size: 10px; font-weight: 800; margin-left: 1px; }
button.zoom { padding: 0 5px; font-size: 12px; line-height: 20px; background: #3b5b49; color: #fff; border-radius: 6px; flex: 0 0 auto; }
/* 확대 보기 */
.zrow { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; }
.zl { width: 52px; font-size: 12px; font-weight: 800; color: #ffd76a; flex: 0 0 auto; padding-top: 4px; }
.zcards { display: flex; flex-wrap: wrap; gap: 3px; flex: 1; }
.op .meta2 { font-size: 10px; color: #cfe3d6; white-space: nowrap; }
.pos { color: #8fe3a3; font-weight: 700; }
.neg { color: #ff9a9a; font-weight: 700; }

/* 가위바위보 결과 */
.md.rpsres { max-width: 640px; max-height: 360px; overflow: auto; padding: 10px 14px; }
.md.rpsres h2 { margin: 0 0 6px; font-size: 16px; }
.rpsres .rr { font-size: 12px; padding: 3px 0; border-bottom: 1px solid #ffffff22; line-height: 1.5; }
.rpsres .rn { display: inline-block; min-width: 40px; color: #ffd76a; font-weight: 800; }
.rpsres .rw { font-weight: 800; margin-left: 4px; }
.rpsres .rgs { margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.rpsres .rg { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rpsres .rg .card.fl { width: 36px; height: 54px; flex: none; }
.rpsres button { margin-top: 4px; }

/* 박 현황 (오른쪽 아래 내 정보) */
.bakgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 3px; }
.bakgrid .bk { display: flex; flex-direction: column; align-items: center; background: #0f2c1e; border-radius: 4px; padding: 1px 0; line-height: 11px; font-size: 9px; white-space: nowrap; }
.bakgrid .bk b { font-size: 10px; color: #f2efe4; }
.bakgrid .ok { color: #7be08f; font-weight: 800; }
.bakgrid .no { color: #ff8a7a; font-weight: 800; }
.bakgrid .ok2 { color: #ffd76a; font-weight: 800; }
.bakgrid .dim { color: #9fb8a8; }
/* 오른쪽 아래 내 정보: 흔들기·누적·더미 줄은 박 칸의 이름(광박 등)과 같은 10px */
.myinfo .meta2 { font-size: 10px; line-height: 13px; color: #cfe3d6; white-space: nowrap; }
.myinfo .shkrow { display: flex; gap: 8px; align-items: baseline; }
/* 내 정보 아래쪽: 흔들기·뻑·더미·누적을 값이 0이어도 항상 네 칸으로 보여 준다 */
.myinfo .infogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px; margin-top: 2px; font-size: 10px; line-height: 13px; color: #cfe3d6; white-space: nowrap; }
.myinfo .infogrid b { color: #ffd76a; }
.myinfo .infogrid b.neg { color: #ff8a7a; }
/* 박 현황: 왼쪽에 면제·씌움 이름 한 번, 오른쪽에 광박·멍박·띠박·피박 네 칸 */
.bakgrid { grid-template-columns: auto repeat(4, 1fr); gap: 1px 3px; align-items: center; justify-items: center; background: #0f2c1e; border-radius: 4px; padding: 2px 3px; }
.bakgrid b { font-size: 10px; color: #f2efe4; }
.bakgrid .rl { font-size: 9px; color: #cfe3d6; justify-self: start; }
.bakgrid span:not(.rl) { font-size: 11px; line-height: 13px; }
/* 왼쪽 아래 먹은 패: 카드(22px)가 칸 높이(20px)보다 커서 줄끼리 붙어 있었다. 카드를 조금 낮추고 줄 사이를 벌린다 (▼ 높이에 맞춘 시작 위치 34px 는 그대로) */
.bottom .mycap .mgrid.one { gap: 5px; }
.bottom .mycap .mgrid.one .mcell { height: 19px; }
.bottom .mycap .mc { height: 19px; }
/* 맞는 패 표시 'corner': 바닥에 맞는 패가 있는 손패의 왼쪽 위 모서리에 삼각형 (월 숫자 라벨은 삼각형 위에 그대로 보인다) */
.hand2[data-mark="corner"] .card.fm::after { left: 0; top: 0; width: 0; height: 0; z-index: 3; border-top: 38px solid var(--mk-border); border-right: 38px solid transparent; border-top-left-radius: 5px; filter: drop-shadow(0 0 2px #000c); } /* 노란 삼각형 38px (테두리 위, 월 숫자 아래) */

/* 하단 영역을 16px 줄이고(128 → 112px), 바닥은 크기 그대로 16px 아래로 내렸다. 늘어난 16px 는 위쪽 상대 패널이 쓴다 (먹은 패 카드를 키움) */
.bottom { height: 112px; }
.op .mcell { height: 32px; }
.op .mc { width: 20px; height: 28px; }
.op .mc.joker.s2 { font-size: 8px; }
.op .mc.joker.vt { font-size: 10px; line-height: 12px; }
/* 하단 영역이 112px 로 줄어서, 오른쪽 아래 내 정보(예전 119px)를 약 104px 로 줄인다 */
.myinfo { padding: 3px 5px; }
.myinfo .pv-av { width: 24px; height: 24px; font-size: 14px; }
.myinfo .bakgrid { gap: 0 3px; padding: 1px 3px; }
.myinfo .bakgrid span:not(.rl), .myinfo .bakgrid b { line-height: 12px; }
.myinfo .infogrid { margin-top: 1px; line-height: 12px; }

/* 개발용 가이드 선 (나중에 삭제): 중단 좌/우 구분선 1개, 하단 구분선 2개. 숫자는 디자인 좌표 x(px) */
.devguide { position: absolute; width: 0; border-left: 1px dashed #ff3df0; z-index: 70; pointer-events: none; }
.devguide span { position: absolute; top: 0; left: 2px; font-size: 8px; line-height: 9px; color: #ff3df0; background: #000a; padding: 0 2px; white-space: nowrap; }
.devtools { position: absolute; left: 330px; top: 110px; z-index: 11; }
.devtools b { font-size: 11px; padding: 4px 9px; border-radius: 5px; font-weight: 700; color: #fff; }
/* 맞는 패 표시 'corner' 보강: 삼각형만으로 구분이 어려워 테두리도 하늘색으로 굵게 (바깥 빛은 옆 카드로 번져 구분이 흐려져서 뺐다) */
.hand2 { --mk-border: #ffd76a; } /* 맞는 패 테두리 색 (삼각형은 --mk 하늘색) */
/* 테두리는 카드 그림(img·글자 칸)이 box-shadow/outline 위에 그려져서 가려진다 → 그림 위에 얹는 ::before 로 그린다. 월 숫자·이름표(.m .l)는 테두리 위에 보이게 한다 */
.hand2[data-mark="corner"] .card.fm { border-color: #7a4b00; isolation: isolate; } /* isolate: 테두리 ::before 가 뒤 카드 위로 번지지 않게(겹친 순서 유지) */
.hand2[data-mark="corner"] .card.fm::before { content: ""; position: absolute; inset: 0; border: 5px solid var(--mk-border); border-radius: 5px; box-sizing: border-box; z-index: 2; pointer-events: none; }
.hand2[data-mark="corner"] .card.fm .m, .hand2[data-mark="corner"] .card.fm .l { z-index: 4; }
/* 진행 설명(ticker): 오른쪽 더미 위에서 왼쪽 설정 영역의 방 이름 줄과 대기실 줄 사이로 옮김. opts(대기실 줄)는 그만큼 아래로 */
.ticker { left: 6px; right: auto; top: 139px; width: 162px; height: 26px; justify-content: flex-start; text-align: left; }
.bottom .opts { top: -106px; }

/* 바닥 패 두 줄 배치: 한 줄(.frow)씩 가운데 정렬, 두 줄일 때는 세로 여백(묶음 위아래 2px)을 없애 75px x 2 + 4px 간격이 높이 154px 안에 들어가게 한다 */
.floor2 { flex-wrap: nowrap; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.floor2 .frow { display: flex; flex-wrap: nowrap; gap: 5px; justify-content: center; }
.floor2 .frow.fl-o .fst + .fst { margin-left: calc(-1 * var(--ov, 0px)); }
.floor2.two .fst { padding-top: 0; padding-bottom: 0; }
.floor-col:has(.floor2.two) { padding-top: 0; }

/* 더미 영역을 하단 오른쪽 선(674)에서 시작하게: 폭 152px(674~826). 카드를 34x46 으로 줄여 4열 x 3줄(최대 12칸, 더미는 최대 9개)로 놓는다 */
.center2-row .piles3 { flex: 0 0 152px; width: 152px; box-sizing: border-box; grid-template-columns: repeat(4, 34px); gap: 4px; padding: 6px 4px 0 0; align-content: center; } /* 위 6px: 위쪽 상대 패널 끝(110)~하단 영역 시작(266) 한가운데(188)에 더미가 오도록 */
.piles3 .pile2 { width: 34px; height: 46px; font-size: 11px; }

/* 개발용: 더미 칸 사용 순서 번호 (SHOW_GUIDES 와 함께 지운다) */
.pile2 { position: relative; }
.pile2 .slotno { position: absolute; left: 2px; top: 0; font-size: 10px; line-height: 11px; font-weight: 800; color: #ffe36b; text-shadow: 0 0 2px #000, 0 0 3px #000; }
.pile2.slot { background: none; border: 1px dashed #ff3df0; box-shadow: none; }
.pile2.slot .slotno { color: #ff3df0; text-shadow: none; font-size: 12px; left: 50%; top: 50%; transform: translate(-50%, -50%); }

/* 진행 중 상자: 설정 영역(왼쪽 150px x 중단 높이)의 가로·세로 한가운데. 글자는 위, 카드는 아래 */
.floor-col .held-box { left: 75px; top: 50%; bottom: auto; transform: translate(-50%, -50%); flex-direction: column; align-items: center; text-align: center; gap: 3px; }
.held-box .held-cards { display: flex; align-items: center; gap: 4px; }

/* 방 이름 줄과 대기실 줄 사이(.ticker)에 최근 3턴 기록(한 턴 한 줄, 최대 3줄 = 39px). 대기실 줄(.opts)은 그만큼 더 아래로 */
.ticker { height: 66px; align-items: flex-start; justify-content: flex-start; overflow: hidden; }
.ticker .turnlines { display: flex; flex-direction: column; gap: 0; width: 100%; }
.ticker .tl { font-size: 10px; line-height: 13px; color: #cfe3d6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.ticker .tl b { color: #f2efe4; }
.ticker .tl.me { color: #ffe9a8; }
.ticker .tl.me b { color: #ffd76a; }
.bottom .opts { top: -61px; } /* 기록 5줄(66px) 아래: y 206~256 */
.ticker .tl i { font-style: normal; font-weight: 800; margin-left: 1px; }
.ticker .tl i.o { color: #7be08f; }
.ticker .tl i.x { color: #ff8a7a; }

/* 왼쪽 설정 버튼(대기실·기록·소리·나가기·더미)은 모두 같은 색. 켜진 상태(기록 열림, 더미 자동)도 따로 색·테두리를 두지 않는다 (글자와 화면으로 구분) */
.bottom .opts b { background: #3b5b49; color: #f2efe4; }
.devguide.h { left: 0; width: 100%; height: 0; border-left: 0; border-top: 1px dashed #ff3df0; }
.devguide.h span { top: 1px; left: 2px; }

/* 중단 상하 여백 균등: 중단은 y 110(상단 패널 끝) ~ 266(하단 영역 시작). 왼쪽 설정 영역은 방 이름 글자 윗끝 약 120 ~ 버튼 줄 끝 256 (위 10px / 아래 10px), 바닥 패는 중단 한가운데(188)에 오도록 위쪽에 6px 여백 */
.floor-col, .floor-col:has(.floor2.two) { padding-top: 6px; }
/* 흔들기·더미에서 가져온 패 그림: 배너 제목의 글자 그림자(갈색 아래 그림자 + 빛)가 카드 숫자·이름표에 상속되어 숫자가 겹쳐 보이던 것을 끈다 */
.banner.shk .shkcards, .banner.shk .shkcards * { text-shadow: none; }
.devtools { display: flex; gap: 6px; align-items: center; }
.devtools a { font-size: 11px; padding: 4px 9px; border-radius: 5px; font-weight: 700; color: #fff; background: #6a4fb0; text-decoration: none; }

/* 설정 영역 메뉴: 첫 줄은 모두에게 보이는 메뉴(기록·소리·⚙ 설정), 둘째 줄은 방장에게만 보이는 메뉴(👑 새 게임). ⚙ 설정을 누르면 위로 작은 메뉴가 열린다 */
.bottom .opts .hostrow b { border: 1px solid #e6c15a88; }
.setmenu { position: absolute; left: 6px; top: 140px; width: 162px; z-index: 30; display: flex; flex-direction: column; gap: 4px; padding: 5px; background: #0f2c1ef2; border: 1px solid #2f6a4b; border-radius: 8px; box-shadow: 0 4px 12px #000a; }
.setmenu b { font-size: 11px; padding: 6px 9px; text-align: center; white-space: nowrap; background: #3b5b49; color: #f2efe4; border-radius: 5px; font-weight: 700; }
.setmenu { top: 120px; gap: 3px; padding: 4px; }
.setmenu b { padding: 4px 9px; }
/* 첫 줄(기록 · ⚙ 설정 · 방 나가기)이 설정 영역 폭(150px)에 들어가도록 버튼 좌우 여백을 줄인다 */
.bottom .opts b { padding: 4px 6px; }
.floor-col .held-box { left: 81px; } /* 진행 중 상자: 설정 영역(폭 162px)의 가로 가운데 */
/* 뻑·폭탄뻑 표시: 묶음 위로 8px 튀어나와 첫 줄은 윗부분이 잘리고 둘째 줄은 윗줄 카드에 가려졌다 → 카드 안쪽 오른쪽 위(월 숫자가 없는 쪽)에 작게 붙인다 */
.fst .badge { top: 1px; left: auto; right: 3px; font-size: 8px; line-height: 11px; padding: 0 3px; border-radius: 4px; }

/* 바닥 패 줄은 항상 두 자리(윗줄·아랫줄)를 잡아 둔다: 아랫줄이 비어 있어도 높이를 유지해서 한 줄 ↔ 두 줄로 바뀔 때 카드가 위아래로 움직이지 않는다 */
.floor2 .frow { min-height: 75px; }

/* ⚙ 설정 메뉴는 버튼 줄(y 206) 바로 위에서 위쪽으로 자란다 (항목이 늘어도 버튼을 가리지 않는다). 테스트 도구 링크·버튼도 같은 모양 */
.setmenu { top: auto; bottom: 176px; }
.setmenu a { display: block; font-size: 11px; padding: 4px 9px; text-align: center; white-space: nowrap; background: #6a4fb0; color: #fff; border-radius: 5px; font-weight: 700; text-decoration: none; }
.setmenu b[data-act="pause"] { color: #fff; }
/* 바닥 패는 줄 안에서 왼쪽부터 채운다: 묶음이 늘어도 앞의 묶음이 가로로 움직이지 않는다 */
.floor2 { align-items: flex-start; }
.floor2 .frow { justify-content: flex-start; }

/* 정지/재개: 둘째 줄(방장 버튼 옆, 방장이 아니면 혼자). 정지 중에는 빨간색 */
.bottom .opts .pausebtn { background: #6a4fb0; color: #fff; }
.bottom .opts .pausebtn.on { background: #c0392b; }
/* 바닥 패 영역은 항상 영역 전체 폭을 쓰고 줄은 왼쪽 끝부터 채운다: 묶음이 늘어도 영역이 다시 가운데로 정렬되며 움직이지 않는다 */
.floor2.two { width: 100%; }

/* 바닥 패는 가이드 선 240~600 사이(360px)에만 놓는다: floor-col 은 x 6 에서 시작해 666 에서 끝나므로 왼쪽 여백 234px, 오른쪽 여백 66px */
.floor-col { padding-left: 234px; padding-right: 66px; }

/* 더미 영역을 600 부터(600~826, 226px)로: 한 줄 5개 x 두 줄(최대 10칸, 더미는 최대 9개), 카드는 원래 크기 38x54. 바닥 패는 240~600 이므로 둘 사이 간격 0 */
.center2-row { gap: 0; }
.floor-col { padding-right: 0; }
.center2-row .piles3 { flex: 0 0 226px; width: 226px; grid-template-columns: repeat(5, 38px); gap: 4px; padding: 2px 10px 0 10px; align-content: start; }
.piles3 .pile2 { width: 38px; height: 54px; font-size: 12px; }
/* 더미만 뒤집기 버튼: 더미 영역 맨 아래(더미 두 줄 바로 아래)에 더미 격자와 같은 폭(206px)으로 크게 */
.flipbtn { left: 610px; right: auto; width: 206px; height: 36px; bottom: 116px; padding: 0; font-size: 16px; font-weight: 800; border-radius: 8px; }

/* 10번 칸(둘째 줄 맨 오른쪽)의 더미만 뒤집기 버튼: 더미 카드와 같은 38x54, 더미는 최대 9개라 이 칸은 항상 비어 있다 */
.piles3 .flipslot, .piles3 .slot10 { grid-column: 5; grid-row: 2; }
.piles3 .flipslot { width: 38px; height: 54px; padding: 0; border: 2px solid #8a6a00; border-radius: 4px; background: #e6c15a; color: #2b2208; font-size: 10px; line-height: 13px; font-weight: 800; cursor: pointer; box-shadow: 0 2px 6px #0008; }
.piles3 .flipslot:active { background: #f2d777; }
/* 더미를 더 크게: 칸 40x70, 5열 x 2줄. 더미 영역(x 600~826, y 110~266)의 위·아래·왼쪽·오른쪽 여백이 모두 5~6px 로 비슷하다 */
.center2-row .piles3 { grid-template-columns: repeat(5, 40px); grid-template-rows: repeat(2, 70px); gap: 4px; padding: 6px 0 0 0; justify-content: center; align-content: center; }
.piles3 .pile2 { width: 40px; height: 70px; font-size: 15px; }
.piles3 .flipslot { width: 40px; height: 70px; font-size: 12px; line-height: 15px; }

/* 중단 왼쪽 설정 영역을 180 까지(폭 174px, 6~180)로 넓힘: 기록 줄이 덜 잘리고 버튼 여백도 다시 넉넉하게 */
.ticker { width: 174px; }
.setmenu { width: 174px; }
.floor-col .held-box { left: 87px; }
.bottom .opts b { padding: 4px 9px; }

/* 중단 왼쪽 설정 영역을 200 까지(폭 194px, 6~200)로 넓힘 */
.ticker { width: 194px; }
.setmenu { width: 194px; }
.floor-col .held-box { left: 97px; }

/* 선택 창(.ov, z-index 50)이 떠 있을 때도 설정 영역 버튼(특히 정지/재개)을 누를 수 있게 창 위로 올린다 */
.bottom .opts { z-index: 60; }
.pausednote { background: #6a4fb0; color: #fff; font-size: 12px; font-weight: 700; padding: 5px 8px; border-radius: 6px; margin-bottom: 8px; }

/* 폭탄 3장 고르기 */
.bpcs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 8px 0; }
.bpc { cursor: pointer; border-radius: 6px; padding: 3px; border: 2px solid transparent; }
.bpc.sel { border-color: #ffd76a; background: #ffd76a33; transform: translateY(-6px); }

/* 선택 창 안의 남은 시간 (오른쪽 위) */
.md { position: relative; }
.md .cdm { position: absolute; right: 10px; top: 8px; margin: 0; }

/* 가위바위보 결과 (쉬운 버전): 결과 먼저, 과정은 색으로 */
.md.rpsres { max-width: 700px; max-height: 360px; overflow: auto; padding: 10px 16px; }
.rpsres .rsub { margin: 0 0 6px; font-size: 13px; color: #cfe3d6; }
.rgs2 { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.rg2 { display: flex; align-items: center; gap: 8px; background: #0f2c1e; border-radius: 8px; padding: 4px 10px; font-size: 15px; }
.rg2 .rm { font-size: 20px; min-width: 34px; }
.rg2 .rwho { min-width: 92px; font-size: 16px; }
.rg2 .rtake { color: #cfe3d6; font-size: 12px; }
.rg2 .card.fl { width: 34px; height: 51px; flex: none; }
.rg2 .rlab { font-weight: 800; color: #ffd76a; }
.rproc { border-top: 1px solid #ffffff22; padding-top: 6px; }
.rptitle { font-size: 12px; color: #9fc2ad; margin-bottom: 4px; }
.rr2 { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.rn2 { min-width: 30px; font-size: 12px; color: #ffd76a; font-weight: 800; }
.hrow { display: flex; gap: 6px; }
.rhc { text-align: center; padding: 2px 8px; border-radius: 8px; border: 2px solid transparent; background: #ffffff14; min-width: 56px; }
.rhc .hn { font-size: 11px; white-space: nowrap; }
.rhc .he { font-size: 24px; line-height: 28px; }
.rhc .ht { font-size: 10px; color: #cfe3d6; }
.rhc.win { border-color: #7be08f; background: #7be08f26; }
.rhc.lose { opacity: .45; }
.rhc.tie { border-color: #ffd76a88; }
.rv { font-size: 12px; font-weight: 800; white-space: nowrap; }
.rv.win { color: #7be08f; }
.rv.tie { color: #ffd76a; }

/* 판 시작: 패 섞기·나눠 주기 연출 */
.dealov { position: absolute; inset: 0; z-index: 80; background: #164a2a; cursor: pointer; overflow: hidden; } /* 완전히 가려서, 이미 나눠진 패가 비쳐 보이지 않게 한다 */
.dealov .deck { position: absolute; left: 416px; top: 189px; width: 0; height: 0; }
.dsh, .dfly { position: absolute; display: block; width: 26px; height: 38px; margin: -19px 0 0 -13px; border-radius: 4px; border: 2px solid #f0e3c0; background: repeating-linear-gradient(45deg, #7a1f1f, #7a1f1f 5px, #8e2a2a 5px, #8e2a2a 10px); box-shadow: 0 2px 6px #000a; }
.dsh { animation: dshuf 0.55s ease-in-out 2 both; }
.dsh.dsh0 { --dir: -1; }
.dsh.dsh1 { --dir: 1; }
@keyframes dshuf { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(calc(var(--dir) * 34px), calc(var(--dir) * -6px)) rotate(calc(var(--dir) * 7deg)); } 100% { transform: translate(0, 0) rotate(0); } }
.dfly { left: 416px; top: 189px; opacity: 0; animation: dflyk 0.5s ease-in both; }
@keyframes dflyk { 0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(.55); } }
.dsh { animation-fill-mode: both; }
.dlabel { position: absolute; left: 0; right: 0; top: 250px; text-align: center; font-size: 22px; font-weight: 900; color: #ffd76a; text-shadow: 0 2px 4px #000; opacity: 0; }
.dlabel.l1 { animation: dlab1 3.2s linear both; }
.dlabel.l2 { animation: dlab2 3.2s linear both; }
@keyframes dlab1 { 0% { opacity: 1; } 28% { opacity: 1; } 31% { opacity: 0; } 100% { opacity: 0; } }
@keyframes dlab2 { 0% { opacity: 0; } 30% { opacity: 0; } 33% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
.dealov .dskip { position: absolute; right: 10px; bottom: 6px; font-size: 11px; color: #cfe3d6aa; }

/* 카드 숫자·글자 끄기(설정 > 카드 숫자 / 카드 글자): 그림이 있는 카드의 왼쪽 위 월 숫자(.m)와 아래 이름표(.l)를 따로 숨긴다. 그림이 없는 조커 카드는 글자가 곧 이름이라 그대로 둔다 */
.frame.hidenum .card.hf .m { display: none; }
.frame.hidelabel .card.hf .l { display: none; }

/* 판 시작 연출의 빈 자리 표시 */
.dseat { position: absolute; width: 170px; height: 50px; margin: -25px 0 0 -85px; border: 2px dashed #ffffff40; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #cfe3d6; font-size: 14px; font-weight: 800; }
.dseat.mine { width: 320px; height: 64px; margin: -32px 0 0 -160px; }
.dseat.floor { width: 220px; height: 90px; margin: -45px 0 0 -110px; border-color: #ffffff22; }

/* 이름 줄: 이름이 길면 이름만 "…"으로 줄이고, 옆의 표시(선·탈출·뻑·흔들기)는 항상 다 보인다 */
.pv-nm.nmrow { display: flex; align-items: baseline; overflow: visible; text-overflow: clip; }
.nmrow .nmtxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nmrow .pv-tag { flex: none; white-space: nowrap; }

/* 내 정보: 이름 아래 줄의 표시(선·탈출·뻑) */
.myinfo .tagrow { display: flex; align-items: center; gap: 3px; margin-top: 1px; min-height: 12px; }
.myinfo .tagrow .pv-tag { margin-left: 0; line-height: 12px; }

/* 중단 왼쪽 설정 영역을 240 까지(폭 234px, 6~240)로 넓힘. 기록이 길어도 덜 잘린다 */
.ticker { width: 234px; }
.setmenu { width: 234px; }
.bottom .opts b { max-width: 190px; }

/* 가위바위보 결과를 한 화면에: 왼쪽 = 누가 어떤 피를 가져갔나, 오른쪽 = 과정. 닫기는 오른쪽 위에 고정 */
.md.rpsres { width: 800px; max-width: 98%; max-height: 366px; overflow: hidden; padding: 8px 12px; display: flex; flex-direction: column; }
.md.rpsres h2 { margin: 0 0 6px; font-size: 15px; padding-right: 90px; }
.md.rpsres h2 small { font-size: 11px; color: #cfe3d6; font-weight: 400; margin-left: 8px; }
.rpsres .rclose { position: absolute; right: 10px; top: 7px; padding: 5px 12px; font-size: 13px; z-index: 2; }
.rpsres .rcols { display: flex; gap: 12px; min-height: 0; flex: 1; }
.rpsres .rgs2 { flex: 0 0 300px; margin: 0; gap: 4px; }
.rpsres .rg2 { padding: 3px 8px; gap: 6px; font-size: 13px; }
.rpsres .rg2 .rm { font-size: 17px; min-width: 28px; }
.rpsres .rg2 .rwho { min-width: 0; flex: 1; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpsres .rg2 .rtake { display: none; }
.rpsres .rg2 .card.fl { width: 24px; height: 36px; }
.rpsres .rg2 .rlab { font-size: 11px; min-width: 34px; }
.rpsres .rproc { flex: 1; min-width: 0; border-top: 0; border-left: 1px solid #ffffff22; padding: 0 0 0 10px; overflow-y: auto; }
.rpsres .rr2 { align-items: flex-start; margin: 3px 0 6px; gap: 6px; }
.rpsres .rrb { display: flex; flex-direction: column; gap: 2px; }
.rpsres .rhc { min-width: 46px; padding: 1px 4px; }
.rpsres .rhc .he { font-size: 18px; line-height: 20px; }
.rpsres .rhc .ht { display: none; }
.rpsres .rv { font-size: 11px; }

/* 턴 기록: 길면 "…"으로 줄이지 않고 다음 줄까지 쓴다(한 턴 최대 2줄). 5줄 칸을 넘치면 가장 오래된 줄부터 위로 밀려난다 */
.ticker .tl { white-space: normal; overflow: hidden; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; overflow-wrap: anywhere; }

/* 결과 창: 과정을 2열로 배치해 한 화면에 들어가게, 창은 설정 버튼 위로 */
.ov:has(.rpsres) { z-index: 70; }
.rpsres .rgs2 { flex: 0 0 236px; }
.rpsres .rproc { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; align-content: start; }
.rpsres .rptitle { grid-column: 1 / -1; }
.rpsres .rr2 { margin: 2px 0 4px; }
.rpsres .rhc { min-width: 38px; max-width: 42px; padding: 1px 2px; border-width: 2px; }
.rpsres .rhc .hn { font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.rpsres .rhc .he { font-size: 17px; line-height: 19px; }
.rpsres .hrow { gap: 3px; }
.rpsres .rv { font-size: 10px; white-space: normal; line-height: 12px; }
.rpsres .rn2 { min-width: 22px; }

/* 턴 기록을 두 열로: 이름 열 | 내용 열. 내용이 길어 두 줄이 되면 두 번째 줄은 이름 없이 내용 열에서 들여쓴 채로 이어진다 */
.ticker .tl { display: flex; align-items: flex-start; gap: 5px; -webkit-line-clamp: unset; -webkit-box-orient: unset; overflow: visible; }
.ticker .tl .tn { flex: none; width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticker .tl .tc { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; word-break: keep-all; }

/* 설정 메뉴: 항목이 늘어도 위쪽 패널과 겹치지 않게 촘촘하게. 게임 규칙 링크·닫기 */
.setmenu { gap: 2px; padding: 3px; }
.setmenu b, .setmenu a { padding: 3px 9px; font-size: 11px; line-height: 14px; }
.setmenu a.rulelink { background: #2e7d5b; }
.setmenu b.menuclose { background: #6b3b3b; }

/* 개발자 모드에서만 보이는 버튼: 주황 점선 테두리 + "개발용" 표시 (정식 공개 때는 사라진다는 뜻) */
.bottom .opts b.devonly, .setmenu b.devonly { outline: 2px dashed #ff9a3c; outline-offset: -2px; }
.devtag { font-style: normal; font-size: 9px; font-weight: 800; line-height: 12px; padding: 0 4px; margin-right: 4px; border-radius: 3px; background: #ff9a3c; color: #2b1600; vertical-align: 1px; }

/* 판 결과 창: 왼쪽 설정 영역(6~240)과 겹치지 않게 그 오른쪽 안에서 가운데 */
.ov.sumov { padding-left: 246px; }
.ov.sumov { justify-content: flex-start; padding-left: 260px; } /* 설정 영역 끝(240)에서 20px 떨어져 시작 */

/* 설정 메뉴는 결과 창 등 어두운 막(.ov, z-index 50~70) 위에 있어서 창이 떠 있어도 쓸 수 있다 */
.setmenu { z-index: 75; }
.ov.sumov { padding-left: 200px; } /* 판 결과 창은 중단 200 선에서 시작 */

/* 진행 중(막 낸 패·뒤집은 패) 상자: 중단 왼쪽 설정 영역 중 위쪽(기록 줄 자리, y 140~205)만 쓴다. 아래 설정 버튼 줄은 가리지 않는다 */
.floor-col .held-box { top: 31px; bottom: auto; transform: translate(-50%, 0); flex-direction: row; gap: 6px; padding: 3px 8px; max-height: 62px; }
.floor-col .held-box > span:first-child { font-size: 10px; }
.floor-col .held-box .card.fl { width: 30px; height: 45px; }

/* 싼 것(바닥 같은 월 4장·6장)에서 이미 고른 카드: 초록 테두리로 표시 (남은 카드 중에서 계속 고른다) */
.fst.taken { outline: 3px solid #5be37d; outline-offset: -1px; opacity: .85; }

/* 설정 메뉴: 화면 가운데에 크게, 2열로 (폰에서 누르기 쉽게). 뒤는 어둡게 */
.setmenu { position: absolute; left: 50%; top: 50%; bottom: auto; right: auto; width: 600px; max-height: 350px; overflow-y: auto; touch-action: pan-y; transform: translate(-50%, -50%); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; background: #0f2c1ef7; border: 2px solid #2f6a4b; border-radius: 14px; box-shadow: 0 0 0 2000px #0009, 0 10px 30px #000c; z-index: 75; }
.setmenu b, .setmenu a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; font-size: 17px; line-height: 20px; white-space: normal; text-align: center; border-radius: 10px; font-weight: 800; }
.setmenu b.menuclose { grid-column: 1 / -1; }
.setmenu .devtag { font-size: 11px; margin-right: 6px; }

/* 폰을 세로로 들면 게임 화면을 가리고 가로로 눕히라고 안내한다 */
.rotblock { position: fixed; inset: 0; z-index: 9000; background: #0b2415; display: flex; align-items: center; justify-content: center; text-align: center; touch-action: none; }
.rotbox { padding: 24px; }
.rotico { font-size: 72px; line-height: 1; animation: rotwiggle 1.6s ease-in-out infinite; }
.rottxt { margin-top: 14px; font-size: 24px; font-weight: 800; color: #ffd76a; }
.rotsub { margin-top: 8px; font-size: 14px; color: #cfe3d6; }
@keyframes rotwiggle { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-90deg); } }
