/* Claude 판 메인 화면 고침 — claude_view2.mjs(8094)가 GPT index.html 에 끼워 넣음. GPT 파일은 안 고침. 짝: lobby.js
   11-20 사용자: ① 오른쪽 위 옵션 자리에 게임 종료 단추 + 페페 나오는 종료 창
                ② 레벨·칩·승률은 그냥 위에 떠 있게
                ③ 시안 31.webp 판 (아래 가로 단추 넷 · 로고 왼쪽 위 · 배경 KING·LUNA) — html.clb-b 일 때만
   상자 모양은 아래 게임 칸(hud.css)과 같은 -7도 기울인 판 */

/* ───────── ② 위에 떠 있는 기록 줄 ─────────
   11-20 사용자가 이 줄을 골라 "이 메뉴 자체를 삭제" → 메인에서 통째로 숨김 (아래 모양 규칙은 되살릴 때를 위해 남김) */
#screen[data-name=home] .lobby-prefs { display: none !important; }
#screen[data-name=home] .lobby-prefs { top: 18px; right: 150px; }
#screen[data-name=home] .lobby-prefs > summary { display: none; }
#screen[data-name=home] .lobby-options {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 22px;
  margin: 0; min-width: 0; height: 54px; padding: 0 16px 0 10px;
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
#screen[data-name=home] .lobby-options::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: 1px solid var(--cl-line); border-radius: 12px;
  background: var(--cl-panel); box-shadow: var(--cl-rim), 0 8px 22px #0b05147a;
  transform: skewX(var(--cl-skew));
}
#screen[data-name=home] .lobby-options .u-st { display: contents; }
#screen[data-name=home] .lobby-options .u-lv { order: 1; height: 44px; padding: 0; font: italic 800 12px/1 "Arial Narrow", Arial, var(--ui); color: #d9c8dd; letter-spacing: .06em; }
#screen[data-name=home] .lobby-options .u-lv b { font: var(--cl-num); font-size: 24px; color: #fff3f8; margin-left: 2px; }
#screen[data-name=home] .lobby-options .u-chips { order: 2; height: auto; padding: 0; border: 0; background: none; box-shadow: none; gap: 8px; }
#screen[data-name=home] .lobby-options .u-chips small { font: italic 800 12px/1 "Arial Narrow", Arial, var(--ui); letter-spacing: .08em; color: #dfc9a0; }
#screen[data-name=home] .lobby-options .u-chips b { font: var(--cl-num); font-size: 26px; color: #ffcd26; text-shadow: 0 2px 0 #51321e; letter-spacing: -.02em; }
#screen[data-name=home] .lobby-options dl {
  order: 3; display: flex; gap: 20px; margin: 0; padding-left: 22px;
  border-left: 1px solid #ffffff24;
}
#screen[data-name=home] .lobby-options dl > div { display: flex; flex-direction: column; gap: 3px; }
#screen[data-name=home] .lobby-options dt { font: italic 800 11px/1 "Arial Narrow", Arial, var(--ui); letter-spacing: .08em; text-transform: uppercase; color: #bfa9c4; }
#screen[data-name=home] .lobby-options dd { margin: 0; font: var(--cl-num); font-size: 19px; color: #ffe09b; font-variant-numeric: tabular-nums; }
#screen[data-name=home] .lobby-options .u-ib,
#screen[data-name=home] .lobby-options .motion-mode {
  width: 38px; height: 38px; min-height: 0; padding: 0; display: grid; place-items: center;
  border: 1px solid #6c5c7a; border-radius: 9px; background: linear-gradient(166deg, #352d43, #241e32);
  box-shadow: inset 0 1px 0 #f2dcff2a; color: #f4e9f8;
}
#screen[data-name=home] .lobby-options .u-ib { order: 4; margin-left: 2px; }
#screen[data-name=home] .lobby-options .u-ib svg { width: 20px; height: 20px; }
#screen[data-name=home] .lobby-options .motion-mode {
  order: 5; font-size: 0; color: transparent; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4e9f8' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.9L19 9.7l-5.2 1.8L12 16.4l-1.8-4.9L5 9.7l5.2-1.8z'/%3E%3Cpath d='M18.5 15l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z'/%3E%3C/svg%3E"), linear-gradient(166deg, #352d43, #241e32);
  background-size: 20px 20px, auto; background-position: center; background-repeat: no-repeat;
}
#screen[data-name=home] .lobby-options .motion-mode[aria-pressed=false] { opacity: .5; }
#screen[data-name=home] .lobby-options .u-ib:hover,
#screen[data-name=home] .lobby-options .motion-mode:hover { border-color: #cf80a8; }

/* ───────── ① 오른쪽 위 나가기 단추 ───────── */
.clb-exit-btn {
  position: absolute; top: 18px; right: 22px; z-index: 3; isolation: isolate;
  display: flex; align-items: center; gap: 9px; height: 54px; padding: 0 20px 0 16px;
  border: 0; background: none; color: #fff2fa; cursor: pointer;
  font: italic 800 19px/1 "Arial Narrow", Arial, var(--ui); letter-spacing: .06em; text-transform: uppercase;
}
.clb-exit-btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border: 1px solid #b0628f; border-radius: 12px;
  background: linear-gradient(166deg, #4a2141f0, #2a1530f0); box-shadow: var(--cl-rim), 0 8px 22px #0b05147a;
  transform: skewX(var(--cl-skew)); transition: background .14s, border-color .14s;
}
.clb-exit-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.clb-exit-btn:hover::before, .clb-exit-btn:focus-visible::before { background: linear-gradient(168deg, #ff459a, #c3126f); border-color: #ff9ace; }
.clb-exit-btn:focus-visible { outline: none; }
.clb-exit-btn:active { transform: translateY(1px); }

/* 종료 창 — GPT leave-dialog 틀 그대로, 초상만 페페(KING + 칩 + A·K 카드) */
.mbox.leave-dialog.clb-exit .leave-portrait.clb-pepe {
  left: -168px; bottom: -28px; width: 540px; height: 467px; object-fit: contain; object-position: left bottom;
}
.mbox.leave-dialog.clb-exit .exit-copy { inset: 0 70px 0 420px; }

/* ───────── ③ B판 (라운지 그림) ───────── */
html.clb-b #screen[data-name=home] .lobby-cinema,
html.clb-b #screen[data-name=home] .mobile-lobby-wordmark { display: none; }
.clb-stage { position: absolute; inset: 0; overflow: hidden; background: #1a0c1e; container-type: size; }
.clb-drift {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: max(100cqw, calc(100cqh * 1672 / 941)); aspect-ratio: 1672 / 941;
  animation: clb-drift 28s ease-in-out infinite alternate;
}
.clb-par { position: absolute; inset: 0; will-change: transform; }
.clb-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.clb-ch { position: absolute; height: auto; transform-origin: 50% 100%; will-change: transform; }
.clb-king { animation: clb-breathe 4.8s ease-in-out infinite; }
.clb-luna { animation: clb-breathe 5.6s ease-in-out -2.1s infinite; }
.clb-glow {
  position: absolute; aspect-ratio: 1; translate: -50% -50%; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--c), .34), rgba(var(--c), .1) 55%, transparent);
  mix-blend-mode: screen; animation: clb-flicker 3.7s steps(1, end) infinite;
}
.clb-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.clb-vig {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, #12061ae6 0, #12061a80 9%, transparent 24%),
              linear-gradient(180deg, #12061a8c 0, transparent 14%),
              radial-gradient(ellipse 80% 75% at 50% 46%, transparent 62%, #0d041299 100%);
}
.clb-logo {
  position: absolute; left: 6.6%; top: 3.6%; width: 20%; height: auto; z-index: 2;
  filter: drop-shadow(0 6px 10px #0b031499); animation: clb-float 6s ease-in-out infinite;
}
@keyframes clb-drift { from { transform: scale(1.035); } to { transform: scale(1.065) translate(-.6%, .4%); } }
@keyframes clb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.012) translateY(-.4%); } }
@keyframes clb-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes clb-flicker { 0% { opacity: .85; } 9% { opacity: .7; } 13% { opacity: .92; } 37% { opacity: .78; } 52% { opacity: 1; } 61% { opacity: .8; } 78% { opacity: .9; } 88% { opacity: .74; } }
html.clb-still .clb-drift, html.clb-still .clb-ch, html.clb-still .clb-glow, html.clb-still .clb-logo { animation: none; }
html.clb-still .clb-drift { transform: scale(1.035); }

/* 아래 가로 단추 넷 — 시안 그림 단추(글자만 지운 판) + 영어 글자는 화면이 얹음 */
html.clb-b #screen[data-name=home] .lobby-actions {
  left: 3.35%; right: 2.8%; width: auto; top: 86.4%; height: 10.1%; z-index: 2;
  grid-template-rows: none; grid-template-columns: repeat(4, 1fr); gap: 1.2%;
}
html.clb-b #screen[data-name=home] .lobby-action,
html.clb-b #screen[data-name=home] .lobby-action:first-child {
  position: relative; padding: 0; border: 0; border-radius: 14px;
  background: var(--art) center / 100% 100% no-repeat; box-shadow: 0 8px 18px #0b03148c;
  font: 900 25px/1 var(--ui); letter-spacing: -.01em; color: #fbf3ea; text-shadow: 0 2px 2px #1206148c;
  transition: transform .14s, filter .14s;
}
html.clb-b #screen[data-name=home] .lobby-action:first-child { box-shadow: 0 8px 18px #0b03148c, 0 0 26px #ff1a8a55; }
html.clb-b #screen[data-name=home] .lobby-action svg { display: none; }
html.clb-b #screen[data-name=home] .lobby-action span {
  position: absolute; top: 0; bottom: 0; right: 4%; left: calc(var(--div) + 2%);
  display: flex; align-items: center; justify-content: center; padding: 0; border: 0; white-space: nowrap;
}
html.clb-b #screen[data-name=home] .lobby-action[data-go=solo] { --div: 37.6%; }
html.clb-b #screen[data-name=home] .lobby-action[data-go=online] { --div: 38.7%; }
html.clb-b #screen[data-name=home] .lobby-action[data-go=char] { --div: 34.7%; }
html.clb-b #screen[data-name=home] .lobby-action[data-go=howto] { --div: 39.2%; }
html.clb-b #screen[data-name=home] .lobby-action:hover,
html.clb-b #screen[data-name=home] .lobby-action:focus-visible { transform: translateY(-3px); filter: brightness(1.14); outline: none; }
html.clb-b #screen[data-name=home] .lobby-action:active { transform: translateY(1px); }
html.clb-b #screen[data-name=home] .lobby-legal { left: 50%; translate: -50% 0; bottom: 6px; font-size: 12px; z-index: 2; color: #cdb4c8; }

/* ───────── 원본 한 장 판 (html.clb-o — 넓은 화면 기본) ─────────
   11-20 사용자 "메인화면 퀄리티가 너무 다른데? 그냥 그대로 쓸 수 없는 거야?"
   그림 = 원본 시안 그대로(lb-orig 1672×938). 단추·로고는 그림 속에 이미 있으니 화면은 투명한 누름 칸만 얹음
   누름 칸 자리 = docs/poker/tools/lounge_orig.py 가 찍어 준 % (그림을 바꾸면 다시 잼) */
html.clb-o .clb-drift { width: 100%; height: 100%; aspect-ratio: auto; animation: none; transform: none; }
html.clb-o .clb-scene { object-fit: cover; }
html.clb-o .clb-glow { opacity: .55; }
/* 11-20 사용자 "플레이 온라인 선택하면 선택 이펙트랑 버튼이랑 모양이 어긋남" → 그림 속 단추 바깥 테두리를 픽셀로 다시 잼
   (원본 x: solo 55~435 · online 455~830 · char 851~1231 · howto 1253~1627, y 821~916, 모서리 둥글기 16px)
   모서리는 % 로 줘서 화면 크기가 바뀌어도 그림 속 모서리와 같이 줄어듦 */
/* 2차(같은 날 "아직도 안 맞음"): 그림(1672×938)이 16:9 화면보다 조금 넓어 cover 로 좌우가 2~3px 잘림 → 칸을 '화면'이 아니라 '그림이 실제로 그려진 판'에 맞춤
   (.lobby-actions = 그림과 같은 비율·같은 cover 크기, 가운데). 위아래는 1920 화면 그림에서 밝은 테두리 선 바깥을 직접 잼 (위가 2px 높았음) */
html.clb-o #screen[data-name=home] { container-type: size; }
html.clb-o #screen[data-name=home] .lobby-actions {
  display: block; inset: auto; left: 50%; top: 50%; translate: -50% -50%;
  width: max(100cqw, calc(100cqh * 1672 / 938)); height: auto; aspect-ratio: 1672 / 938;
  z-index: 2; pointer-events: none; container-type: inline-size;
}
html.clb-o #screen[data-name=home] .lobby-action,
html.clb-o #screen[data-name=home] .lobby-action:first-child {
  position: absolute; top: 87.41%; height: 9.92%; padding: 0; pointer-events: auto;
  border: 0; border-radius: 3.3% / 13.5%; background: none; box-shadow: none; color: transparent; text-shadow: none;
  transition: backdrop-filter .16s;
}
html.clb-o #screen[data-name=home] .lobby-action[data-go=solo]   { left: 3.170%;  width: 22.727%; }
html.clb-o #screen[data-name=home] .lobby-action[data-go=online] { left: 27.093%; width: 22.428%; }
html.clb-o #screen[data-name=home] .lobby-action[data-go=char]   { left: 50.778%; width: 22.727%; }
html.clb-o #screen[data-name=home] .lobby-action[data-go=howto]  { left: 74.821%; width: 22.368%; }
html.clb-o #screen[data-name=home] .lobby-action svg { display: none; }
/* 단추 글자 = 영어 (11-20 사용자 "모두 영어로 바꾸기 항상 영어로")
   그림은 단추 속 한글만 지운 lb-orig-en — 지운 칸(구분선 오른쪽 ~ 테두리 안쪽, lounge_orig.py 가 잼)에 영어를 가운데로 얹음 */
html.clb-o #screen[data-name=home] .lobby-action span {
  position: absolute; top: 11.95%; height: 73.2%; display: flex; align-items: center; justify-content: center;
  /* 글자 크기는 그림 폭을 따라감 — 가장 긴 "Hand rankings" 가 칸 안에 들어가는 크기 */
  color: #fff; font: 800 1.75cqw/1 Inter, 'Noto Sans KR', sans-serif; letter-spacing: -.01em; white-space: nowrap;
  text-shadow: 0 2px 0 #0000004d;
}
html.clb-o #screen[data-name=home] .lobby-action[data-go=solo] span   { left: 40.53%; width: 55.53%; }
html.clb-o #screen[data-name=home] .lobby-action[data-go=online] span { left: 41.6%;  width: 54.67%; }
html.clb-o #screen[data-name=home] .lobby-action[data-go=char] span   { left: 37.11%; width: 59.47%; }
html.clb-o #screen[data-name=home] .lobby-action[data-go=howto] span  { left: 41.18%; width: 55.08%; font-size: 1.58cqw; }   /* 가장 긴 글자 — 구분선과 붙지 않게 */
html.clb-o #screen[data-name=home] .lobby-action:hover,
html.clb-o #screen[data-name=home] .lobby-action:focus-visible {
  /* 새 모양(선·빛)을 덧그리지 않고 '그림 속 단추 자체'를 밝힘 — 그 뒤 그림을 backdrop-filter 로 밝게
     선·바깥 빛은 그림 속 테두리·검은 외곽선과 1~2px 어긋나 보였음(11-20 사용자 "버튼이랑 선택할 때 아웃라인이랑 안 맞음" 세 번) */
  outline: none; transform: none; filter: none; background: none; box-shadow: none;
  -webkit-backdrop-filter: brightness(1.32) saturate(1.12); backdrop-filter: brightness(1.32) saturate(1.12);
}
html.clb-o #screen[data-name=home] .lobby-action:active { -webkit-backdrop-filter: brightness(.88); backdrop-filter: brightness(.88); }
html.clb-o #screen[data-name=home] .lobby-legal { bottom: 4px; color: #a8909f; font-size: 11px; }
/* 휴대폰 가로: 판이 0.42배라 11px 이 4.6px — 단추 아래 남은 띠(판 약 24px) 안에서 가장 크게 */
html.clb-small.clb-o #screen[data-name=home] .lobby-legal { bottom: 1px; font-size: 19px; line-height: 1.15; color: #c2aab9; white-space: nowrap; }

/* 좁은 화면(휴대폰 세로): 위 줄은 두 줄로, B판 단추는 2×2 */
@media (max-width: 760px) {
  #screen[data-name=home] .lobby-prefs { top: 66px; right: 8px; left: 8px; }
  #screen[data-name=home] .lobby-options { gap: 12px; height: 46px; justify-content: space-between; }
  #screen[data-name=home] .lobby-options dl { gap: 10px; padding-left: 10px; }
  .clb-exit-btn { top: 8px; right: 10px; height: 44px; }
  /* 단추 2×2 는 아래 안내 글(두 줄) 위로 — 예전 bottom 30px 은 글이 'Characters' 단추를 덮었음 */
  html.clb-b #screen[data-name=home] .lobby-actions { top: auto; bottom: calc(58px + env(safe-area-inset-bottom)); height: 140px; grid-template-columns: 1fr 1fr; gap: 8px; left: 4%; right: 4%; }
  html.clb-b #screen[data-name=home] .lobby-action { font-size: 17px; }
  html.clb-b #screen[data-name=home] .lobby-legal { width: calc(100% - 32px); bottom: calc(10px + env(safe-area-inset-bottom)); font-size: 11.5px; line-height: 1.4; text-align: center; text-wrap: balance; }
  .clb-logo { width: 46%; left: 27%; }
}

/* ───────── 캐릭터 선택창 새 모양 (html.cls-on — lobby.js decorateChar) ─────────
   11-20 사용자 시안(Seated_Screen) "캐릭터 선택창도 이렇게 · view3d 는 없어도 돼"
   카드 배치·쪽수·선택하기 자리는 GPT 판이 이미 시안과 같아서 그대로 두고, 배경·왼쪽 앉은 그림·로고·3D 단추만 바꿈 */
html.cls-on #screen[data-name=char] .sheet-room { background: #2a1032 url('/poker/claude/seat-bg.webp') center / cover no-repeat; }
html.cls-on #screen[data-name=char] .sheet-showcase,
html.cls-on #screen[data-name=char] .sheet-shadow,
html.cls-on #screen[data-name=char] .sheet-name,
html.cls-on #screen[data-name=char] .sheet-extra .avatar-expand { display: none; }
.cls-seat {
  position: absolute; left: 0; bottom: 0; height: 100.6%; width: auto; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent 99%); mask-image: linear-gradient(90deg, #000 86%, transparent 99%);
}
.cls-seat.swap { animation: cls-in .22s ease-out; }
@keyframes cls-in { from { opacity: .35; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.cls-glow { z-index: 0; }
html.cls-on #screen[data-name=char] .sheet-header { z-index: 2; }
html.cls-on #screen[data-name=char] .sheet-logo { top: .4%; right: auto; left: 80.6%; width: 10%; height: 10.4%; z-index: 2; }
html.cls-on #screen[data-name=char] .sheet-logo img:not(.cls-logo) { display: none; }
.cls-logo { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 8px #0b031480); }
/* 카드: 시안처럼 짙은 보라 판 + 얇은 테두리, 고른 카드는 금테 */
html.cls-on #screen[data-name=char] .sheet-grid .sheet-card {
  border: 1.5px solid #5f3f6c; border-radius: 13px;
  background: radial-gradient(ellipse at 50% 40%, #3b2148, #27142f 62%, #1f1027);
  box-shadow: inset 0 1px 0 #f2d6ff1f, 0 6px 14px #0c03136b; transition: transform .14s, border-color .14s;
}
html.cls-on #screen[data-name=char] .sheet-grid .sheet-card:hover { transform: translateY(-3px); border-color: #a27ab1; }
html.cls-on #screen[data-name=char] .sheet-grid .sheet-card.on { border: 3px solid #f6c34c; box-shadow: 0 0 16px #ffbe3e55, inset 0 0 0 1px #ffe3a1; }
html.cls-on #screen[data-name=char] .sheet-card b {
  background: linear-gradient(#1f102700, #1b0d22d9 55%);
  font: italic 900 25px/1 "Arial Black", Arial, sans-serif; letter-spacing: -.01em;
}
/* 정보(이름 바꾸기 포함) 단추는 제목 옆 — 앉은 그림 위에 떠 있지 않게 */
html.cls-on #screen[data-name=char] .sheet-extra { left: auto; right: auto; bottom: auto; top: 30px; left: 31.5%; z-index: 3; }
html.cls-on #screen[data-name=char] .sheet-info > div { bottom: auto; top: 46px; }
@media (prefers-reduced-motion: reduce) { .cls-seat.swap, .cls-glow { animation: none; } }
/* 세로 휴대폰 (11-20 "폰에서도 되게"): GPT 세로 판(위 45% 큰 그림 · 아래 카드 4×3)에 맞춤
   앉은 그림이 화면 전체 높이로 커져 카드 뒤를 다 덮었음 → 위 칸 안에 가운데로. 카드 이름은 칸 폭에 맞게 줄임('CAPTA…' 잘림) */
@media (orientation: portrait) and (max-width: 760px) {
  .cls-seat {
    left: 50%; translate: -50% 0; top: 6.2%; bottom: auto; height: 38.5%;
    /* 그림 네 모서리가 바탕과 각지게 갈라져 보이지 않게 — 양옆·위만 흐리게 (아래 이름판은 그대로) */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent), linear-gradient(transparent, #000 12%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent, #000 13%, #000 87%, transparent), linear-gradient(transparent, #000 12%);
    mask-composite: intersect;
  }
  html.cls-on #screen[data-name=char] .sheet-card b { font-size: clamp(11px, 3.9vw, 19px); letter-spacing: -.03em; }
  html.cls-on #screen[data-name=char] .sheet-logo { left: auto; right: 12px; top: 3px; width: 62px; height: 40px; }
  html.cls-on #screen[data-name=char] .sheet-extra { top: auto; bottom: 56.1%; left: 8px; }
  html.cls-on #screen[data-name=char] .sheet-info > div { top: auto; bottom: 38px; }
}

/* ───────── 로딩 화면 = 사용자가 준 그림 그대로 + 아래 칩 막대·글자만 실제 진행 ─────────
   11-20 사용자 "봉 포커 로딩화면이야 이거로 교체해" → "내가 준 이미지를 그냥 그대로 쓰라고 · 밑에 로딩만 만들고"
   그림(1621×910)은 화면을 꽉 채우고(cover), 칩 띠·글자 자리는 그림 속 자리 % 그대로 (docs/poker/tools/boot_orig.py 가 잼)
   빈 칩 띠 위에 찬 칩 띠를 칩 개수만큼 잘라 겹침(lobby.js CHIP_END). GPT 의 로고 그림·흐르는 줄은 숨김(그림에 이미 있음) */
html.clb-boot #boot { overflow: hidden; background: #0b2418; container-type: size; transition: opacity .45s ease .3s; }
html.clb-boot #boot > img:not([class]) { display: none; }
html.clb-boot #boot::before, html.clb-boot #boot::after { display: none; }
html.clb-boot .clb-bt-art {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: max(100cqw, calc(100cqh * 1672 / 941)); aspect-ratio: 1672 / 941;
  container-type: inline-size;
}
/* 11-20 사용자 "자 밑에 바 없앤거 이미지야" → 2판 그림(1672×941), 자리 % 는 docs/poker/tools/boot_orig2.py 가 잼 */
/* #boot 을 붙여 GPT 의 '#boot img { width: 280px / 520px }' 보다 세게 (안 붙이면 그림이 왼쪽 위에 작게 나옴 — 11-20 사용자 "이렇게 나옴") */
html.clb-boot #boot .clb-bt-bg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
html.clb-boot #boot .clb-bt-bar { position: absolute; left: 33.224%; top: 62.168%; width: 33.493%; height: 4.357%; }
html.clb-boot #boot .clb-bt-bar img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; }
html.clb-boot .clb-bt-full { clip-path: inset(0 100% 0 0); transition: clip-path .18s ease-out; }
html.clb-boot .clb-bt-row {
  position: absolute; left: 33.343%; right: 33.523%; top: 69.819%; translate: 0 -50%;
  display: flex; justify-content: space-between; align-items: center;
  font: 700 1.53cqw/1 Inter, 'Noto Sans KR', var(--ui), sans-serif; color: #ece5d3; letter-spacing: 0;
  text-shadow: 0 1px 3px #00000080;
}
html.clb-boot .clb-bt-row b { font-weight: 700; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { html.clb-boot .clb-bt-full { transition: none; } }

/* ───────── 무료 게임 안내 카드 (로딩 화면 · 테이블에 들어가는 가림막) ─────────
   11-20 사용자 그림 "BONG POKER — Free Play" 카드 그대로 — 검은 바탕 · 옅은 테두리 · ⓘ + 굵은 제목 · 본문 */
.clb-free {
  position: absolute; left: 50%; translate: -50% 0; z-index: 2; box-sizing: border-box;
  padding: 14px 20px 15px; border: 1px solid #ffffff2b; border-radius: 14px; background: #050507e0;
  color: #cfcac2; font: 400 14.5px/1.55 Inter, 'Noto Sans KR', sans-serif; text-align: left; text-shadow: none;
}
.clb-free b { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; color: #fff; font: 700 17px/1.2 Inter, 'Noto Sans KR', sans-serif; letter-spacing: 0; }
.clb-free svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: #c9c6cf; stroke-width: 1.8; stroke-linecap: round; }
.clb-free p { margin: 0; text-wrap: pretty; }
/* 로딩 화면: 그림 크기를 따라 커지고 작아짐 — 칩 막대와 왼쪽·오른쪽 끝을 맞춤(.clb-bt-bar 와 같은 left·width) */
html.clb-boot #boot .clb-free { top: 74.5%; left: 33.224%; width: 33.493%; translate: none; padding: .85cqw 1.15cqw .9cqw; border-radius: .85cqw; font-size: clamp(13px, .9cqw, 18px); }
html.clb-boot #boot .clb-free b { font-size: clamp(15px, 1.08cqw, 21px); margin-bottom: .38cqw; }
/* 들어가는 가림막: 'Joining table' 글자 아래 */
.clb-veil .clb-free { top: calc(66% + 34px); width: min(560px, calc(100% - 32px)); }

/* ───────── 비재화 안내: 방(테이블) 안에서 늘 보임 ─────────
   11-20 사용자 "테이블 상단이나 하단에 … 문구를 상시 노출" — 테이블 화면 맨 아래 가운데, 누르기는 아래로 통과 */
.clb-notice {
  /* 한 줄로 길게 두면 오른쪽 FOLD 단추 아래를 덮어서, 내 패 칸과 행동 단추 사이 빈 곳에 두 줄로 */
  position: absolute; left: 50%; bottom: 8px; translate: -50% 0; z-index: 40; margin: 0; width: min(470px, 29%);
  padding: 5px 12px; border-radius: 6px; background: #05030acc; color: #d9d2e4;
  font: 500 12px/1.4 Inter, 'Noto Sans KR', sans-serif; text-align: center; text-wrap: balance; pointer-events: none;
}
.clb-notice[hidden] { display: none; }
/* 휴대폰 세로 (11-20 사용자 "폰에서도 되게 작업해"): 그림 전체(100cqw)로 두면 띠처럼 작아지고 안내 카드가 77px 폭으로 세로로 길어졌음
   → 그림을 220% 로 키워 가운데(로고·칩 막대)만 보이게, 위아래 이음매는 흐리게 지움. 카드는 칩 막대와 같은 폭 그대로 */
@media (max-width: 760px) and (orientation: portrait) {
  html.clb-boot .clb-bt-art { width: 220cqw; }
  /* 흐림은 바탕 그림에만 (그림 칸 전체에 주면 안내 카드 아래쪽도 같이 지워짐) */
  html.clb-boot #boot .clb-bt-bg { -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); }
  html.clb-boot .clb-bt-row { font-size: max(13px, 1.53cqw); }
  html.clb-boot #boot .clb-free { padding: 12px 14px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
  html.clb-boot #boot .clb-free b { font-size: 15px; margin-bottom: 5px; }
}
/* ───────── 휴대폰(낮은 가로 판 — html.clb-small, lobby.js smallSync) 메뉴 화면 ─────────
   1600×900 판을 화면 높이 375 에 맞추면 0.42배라 글자 13~18px 이 5~7px 이 됨 → 메뉴 화면만 판을 1.8배 작게(889×500) 잡고 1.8배 키움
   (글자는 실제 9~13px). 넘치는 내용은 위아래로 밀어 봄 */
html.clb-small #screen.on:is([data-name=solo], [data-name=online], [data-name=howto]) {
  --mz: 1.8; width: calc(1600px / var(--mz)); height: calc(900px / var(--mz)); transform: scale(var(--mz)); transform-origin: 0 0;
}
html.clb-small #screen.on .u-top { left: 22px; top: 6px; height: 50px; gap: 14px; }
html.clb-small #screen.on .u-top .u-home .lg { width: 84px; height: 46px; }
html.clb-small #screen.on .u-nav { gap: 2px; }
html.clb-small #screen.on .u-nav button { height: 44px; padding: 0 10px; }
html.clb-small #screen.on .u-st { right: 16px; top: 9px; gap: 6px; }
html.clb-small #screen.on .u-st .u-lv,
html.clb-small #screen.on .u-st .u-chips small { display: none; }
html.clb-small #screen.on .u-st .u-chips { height: 42px; padding: 0 11px; }
html.clb-small #screen.on .u-st .u-ib { width: 42px; height: 42px; }
html.clb-small #screen.on .pg {
  left: 22px; right: 22px; top: 62px; bottom: 0; padding-bottom: 18px;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
html.clb-small #screen.on .pg::-webkit-scrollbar { display: none; }
html.clb-small #screen.on .h1 { font-size: 30px; }
html.clb-small #screen.on .pg .tabs { margin-top: 10px; }
html.clb-small #screen.on .pg .tabs > button { white-space: nowrap; }
/* 혼자 하기: 방 카드 넷을 한 줄 그대로, 그림·설명을 줄여 한 화면에 가깝게 */
html.clb-small #screen.on .pg .venues { gap: 12px; margin-top: 12px; }
html.clb-small #screen.on .pg .vc { height: auto; }
html.clb-small #screen.on .vc .th { height: 120px; flex-basis: 120px; }
html.clb-small #screen.on .vc .bd { padding: 12px 14px 0; }
html.clb-small #screen.on .vc h3 { font-size: 21px; line-height: 26px; }
html.clb-small #screen.on .vc p { display: none; }
html.clb-small #screen.on .vc dl { margin: 0 0 10px; gap: 8px; }
html.clb-small #screen.on .vc dt { font-size: 12px; }
html.clb-small #screen.on .vc dd { font-size: 15px; white-space: nowrap; }
html.clb-small #screen.on .vc .go { height: 44px; padding: 0 14px; }
/* 온라인: 두 칸 그대로, 안쪽 여백만 줄임 */
html.clb-small #screen.on .pg .cols { gap: 14px; margin-top: 14px; }
html.clb-small #screen.on .pg .pane, html.clb-small #screen.on .pg .pane + .pane { padding: 18px 20px 20px; }

/* 세로 휴대폰에서 메뉴·테이블 = 판 전체를 90도 돌림 (lobby.js rotSync — 판 크기 셈도 같이 바꿈) */
html.clb-rot #fit { inset: auto; left: 0; top: 0; width: 100dvh; height: 100vw; transform-origin: 0 0; transform: rotate(90deg) translateY(-100%); }
html.clb-rot #rotate { display: none !important; }
/* 세로 휴대폰에서 판을 돌리지 않는 화면(메인·캐릭터) 위의 창 — 닉네임 창 등이 최소 폭 480px 이라 오른쪽이 잘렸음 */
@media (orientation: portrait) and (max-width: 760px) {
  html:not(.clb-rot) #modal > .mbox:not(.leave-dialog):not(.avatar-dialog) { min-width: 0; width: calc(100vw - 32px); max-width: none; box-sizing: border-box; padding: 22px 20px; }
  html:not(.clb-rot) #modal > .mbox:not(.leave-dialog):not(.avatar-dialog) h2 { font-size: 26px; }
  /* 나가기 창(그림 판 1140px)은 통째로 줄임 — 폭 360~430 화면에 들어가게 */
  html:not(.clb-rot) #modal > .mbox.leave-dialog { scale: .29; flex: none; min-width: 1140px; max-width: none; left: 12px; /* 왼쪽으로 삐져나온 페페 그림까지 합쳐 가운데로 (원래 43px 은 넓은 판 기준이라 오른쪽이 잘렸음) */ }   /* 좁은 화면에서 상자가 줄어 글이 세로로 늘어서지 않게 — 원래 크기로 그린 뒤 줄임 */
}
@media (orientation: portrait) and (min-width: 400px) and (max-width: 760px) { html:not(.clb-rot) #modal > .mbox.leave-dialog { scale: .32; } }
/* 휴대폰 가로(낮은 판 — html.clb-small): 로딩 화면도 1600×900 판 안이라 0.42배로 줄어듦 → 판 단위(px)로 키워 실제 12~14px
   카드는 넓게(판의 70%) · 짧게(3~4줄) — 아래로 넘치지 않게 */
html.clb-small.clb-boot #boot .clb-free { top: 72%; left: 15%; width: 70%; padding: 16px 28px 18px; border-radius: 20px; font-size: 28px; line-height: 1.45; }
html.clb-small.clb-boot #boot .clb-free b { font-size: 32px; margin-bottom: 6px; }
html.clb-small.clb-boot .clb-bt-row { font-size: 30px; }

/* ───────── 메뉴 화면(혼자 하기·온라인·족보) 뒤 배경 = 메인 그림을 흐리고 어둡게 ─────────
   11-20 사용자 "온라인 뒤에 깔려 있는 배경이 옛날 메인화면이네" — GPT 의 3D 캐릭터 줄(옛 메인)이 비쳐 보였음
   그림은 lb-orig 위쪽(단추 줄 뺀 것)을 흐리고 어둡게 한 lb-menu-bg.webp */
html.clb-o #screen[data-name=solo],
html.clb-o #screen[data-name=online],
html.clb-o #screen[data-name=howto] { background: #0b0612 url('/poker/claude/lb-menu-bg.webp') center / cover no-repeat; }

/* ───────── 테이블에 들어가는 동안 가림막 ─────────
   같은 날 사용자 "크리에이트 룸 누르면 게임 접속되기 전에 예전 메인화면이 나옴" — 방이 다 그려지기 전 옛 3D 캐릭터 줄이 잠깐 보였음
   lobby.js 가 GPT 의 S3.setVenue(방 그리기)를 감싸서 끝날 때까지 로딩 그림으로 덮음 */
.clb-veil { position: absolute; inset: 0; z-index: 70; background: #0b2418; overflow: hidden; transition: opacity .35s ease; }
.clb-veil img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.clb-veil span {
  position: absolute; left: 50%; top: 66%; translate: -50% 0; color: #ece5d3; font: 700 15px/1 Inter, 'Noto Sans KR', sans-serif;
  letter-spacing: .02em; text-shadow: 0 1px 3px #00000080;
}
.clb-veil span::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: clb-dots 1.2s steps(4) infinite; }
@keyframes clb-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.clb-veil.off { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .clb-veil { transition: none; } .clb-veil span::after { animation: none; content: '...'; } }

/* ── 온라인 방 글 채팅 (lobby.js chatSync) — 테이블 판(1600×900) 안 왼쪽 아래, 내 패 칸 위 ──
   평소엔 최근 글만 잠깐 떴다 흐려짐(.old), 마우스를 올리거나 쓰는 동안엔 지난 글까지 보이고 판이 생김 */
.clb-chat { position: absolute; left: 22px; bottom: 266px; /* 내 패 두 장(위 끝 약 690)·패 이름 힌트(646) 위로 — 판 900 기준 */ z-index: 35; width: 340px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px; transition: background .2s, box-shadow .2s; }
.clb-chat[hidden] { display: none; }
.clb-chat:hover, .clb-chat:focus-within { background: #07040ccc; box-shadow: 0 0 0 1px #ffffff1a; }
.clb-chat-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 210px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #ffffff30 transparent; }
.clb-chat-log li { align-self: flex-start; max-width: 100%; padding: 4px 9px; border-radius: 6px; background: #05030acc; color: #ece6f4; font: 500 14px/1.4 Inter, 'Noto Sans KR', sans-serif; overflow-wrap: anywhere; transition: opacity .6s; }
.clb-chat-log li b { margin-right: 6px; font-weight: 700; }
.clb-chat-log li b:empty { display: none; }
.clb-chat-log li.old { opacity: 0; }
.clb-chat:hover .clb-chat-log li.old, .clb-chat:focus-within .clb-chat-log li.old { opacity: .82; }
.clb-chat-in { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 6px; background: #05030acc; box-shadow: inset 0 0 0 1px #ffffff1f; opacity: .72; transition: opacity .2s, box-shadow .2s; cursor: text; }
.clb-chat:hover .clb-chat-in, .clb-chat-in:focus-within { opacity: 1; }
.clb-chat-in:focus-within { box-shadow: inset 0 0 0 1px #5EE7F099; }
.clb-chat-k { flex: none; display: grid; place-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: #ffffff1a; color: #cfc6dc; font: 700 11px/1 Inter, sans-serif; }
.clb-chat-in:focus-within .clb-chat-k { display: none; }
.clb-chat-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: #f3eef9; font: 500 14px/1 Inter, 'Noto Sans KR', sans-serif; }
.clb-chat-in input::placeholder { color: #a79fb6; }
.clb-chat.locked .clb-chat-log, .clb-chat.locked .clb-chat-in { display: none; }
/* 오링 뒤 관전 중 다시 요청 단추 (lobby.js rejoinSync) — 채팅 칸 맨 위, 투표 카드 Allow 와 같은 색 */
.clb-ask { align-self: flex-start; height: 36px; padding: 0 14px; border: 0; border-radius: 6px; background: #5EE7F0; color: #071318; font: 700 13px/1 Inter, sans-serif; letter-spacing: .02em; cursor: pointer; }
.clb-ask[hidden] { display: none; }
.clb-ask:hover:not(:disabled) { filter: brightness(1.12); }
.clb-ask:disabled { opacity: .45; cursor: default; }

/* ── 다시 들어오기 투표 카드 (lobby.js voteShow) — 테이블 판(1600×900) 위 가운데, 위 막대 아래 ──
   채팅 칸과 같은 어두운 판 · 글자 15/13 · 단추 36px · 아래 가는 줄이 남은 시간만큼 줄어듦 */
.clb-vote { position: absolute; left: 50%; top: 104px; translate: -50% 0; z-index: 45; width: 400px; overflow: hidden; padding: 14px 16px 16px; border-radius: 10px; background: #07040ce8; box-shadow: 0 0 0 1px #ffffff1f, 0 12px 32px #0008; color: #ece6f4; font-family: Inter, 'Noto Sans KR', sans-serif; }
.clb-vote + .clb-vote { top: 214px; }
.clb-vote-top { display: flex; align-items: baseline; gap: 12px; }
.clb-vote-t { flex: 1; margin: 0; font: 700 15px/1.35 Inter, 'Noto Sans KR', sans-serif; }
.clb-vote-t b { color: #5EE7F0; }
.clb-vote-sec { flex: none; color: #a79fb6; font: 500 13px/1 Inter, sans-serif; font-variant-numeric: tabular-nums; }
.clb-vote-s { margin: 4px 0 0; color: #b9b1c8; font: 500 13px/1.45 Inter, 'Noto Sans KR', sans-serif; }
.clb-vote-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.clb-vote-row button { height: 36px; padding: 0 18px; border: 0; border-radius: 6px; font: 700 13px/1 Inter, sans-serif; letter-spacing: .02em; cursor: pointer; }
.clb-vote-no { background: #ffffff14; color: #ece6f4; box-shadow: inset 0 0 0 1px #ffffff26; }
.clb-vote-yes { background: #5EE7F0; color: #071318; }
.clb-vote-row button:hover:not(:disabled) { filter: brightness(1.12); }
.clb-vote-row button:disabled { opacity: .45; cursor: default; }
.clb-vote-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #5EE7F0; transform-origin: left; animation: clb-vote-t linear forwards; }
@keyframes clb-vote-t { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* 방장: AI 빼기 (11-20 사용자 "AI를 다시 삭제할 수도") */
.seatbtn.rm { border-color: rgba(255, 120, 150, .8); color: #ff8aa6; }
.seatbtn.rm:hover { background: #ff8aa6; color: var(--ink); }
