/* =========================
   플듀 증강 체스 (2026-11-16) — 시작 화면은 px-lobby.css, 대기실·게임은 여기
   ========================= */
:root {
  --cx-ink: #1a1520; --cx-panel: #2a2331; --cx-panel2: #352c3e; --cx-line: rgba(255,255,255,.08); --cx-text: #f3ece2; --cx-muted: #a99fb5;
  --cx-gold: #f2c230; --cx-red: #e8574b; --cx-mint: #5ec8b0; --cx-blue: #6fa8ff;
  --cx-font: Galmuri11, "Malgun Gothic", system-ui, sans-serif; --cx-body: "Gowun Dodum", "Malgun Gothic", system-ui, sans-serif;
  /* 판 (원목 기본) */
  --sq-l: #f0d9b5; --sq-d: #b58863; --sq-tex-l: none; --sq-tex-d: none; --frame: #5a3a1e; --frame2: #3a2412; --coord-l: #b58863; --coord-d: #f0d9b5;
}
.cx-body { color: var(--cx-text); font-family: var(--cx-body); min-height: 100vh; }
.cx-body.cx-in-game .topbar { display: none; }
#cxApp { padding: 16px 16px 40px; box-sizing: border-box; }
.cx-body.cx-in-game #cxApp { padding: 8px 10px 16px; }
.cx-scr { display: none; } .cx-scr.active { display: block; }
.hidden, .cx-body [hidden] { display: none !important; }
.cx-muted { color: var(--cx-muted); font-size: 13px; }
.cx-err { color: #ff8d7a; text-align: center; min-height: 1.3em; font-family: var(--cx-font); font-size: 14px; margin: 10px 0 0; }

/* 테마 */
.cx-body[data-board="wood"] { --sq-l: #edd3a8; --sq-d: #a8743f; --sq-tex-l: repeating-linear-gradient(97deg, rgba(120,70,20,.07) 0 2px, transparent 2px 7px), repeating-linear-gradient(83deg, rgba(255,255,255,.08) 0 1px, transparent 1px 11px); --sq-tex-d: repeating-linear-gradient(95deg, rgba(60,25,0,.18) 0 2px, transparent 2px 6px), repeating-linear-gradient(85deg, rgba(255,220,170,.08) 0 1px, transparent 1px 9px); --frame: #6b4120; --frame2: #3a2210; --coord-l: #8a5a2b; --coord-d: #f4ddb6; }
.cx-body[data-board="marble"] { --sq-l: #eceff3; --sq-d: #6f7b8c; --sq-tex-l: radial-gradient(ellipse at 20% 30%, rgba(150,160,175,.35) 0 1px, transparent 2px 40%), linear-gradient(125deg, transparent 40%, rgba(170,180,195,.35) 42%, transparent 46%); --sq-tex-d: linear-gradient(140deg, transparent 30%, rgba(255,255,255,.18) 33%, transparent 37%), linear-gradient(60deg, transparent 55%, rgba(20,30,45,.25) 58%, transparent 62%); --frame: #9aa3ae; --frame2: #4b5360; --coord-l: #6f7b8c; --coord-d: #eceff3; }
.cx-body[data-board="fantasy"] { --sq-l: #c9b8f0; --sq-d: #4a3a8c; --sq-tex-l: radial-gradient(circle at 30% 30%, rgba(255,255,255,.35), transparent 60%); --sq-tex-d: radial-gradient(circle at 70% 70%, rgba(120,255,230,.18), transparent 60%); --frame: #2f2160; --frame2: #150e33; --coord-l: #4a3a8c; --coord-d: #c9b8f0; }
.cx-body[data-board="dark"] { --sq-l: #5c6370; --sq-d: #2c313a; --sq-tex-l: linear-gradient(135deg, rgba(255,255,255,.05), transparent); --sq-tex-d: linear-gradient(135deg, rgba(255,255,255,.03), transparent); --frame: #15181d; --frame2: #0a0c0f; --coord-l: #2c313a; --coord-d: #9aa3ae; }

/* 버튼·패널 */
.cx-btn { font-family: var(--cx-font); font-weight: 700; font-size: 14px; padding: 9px 14px; background: var(--cx-panel2); color: var(--cx-text); border: 0; box-shadow: 0 0 0 2px var(--cx-ink), 0 3px 0 2px rgba(0,0,0,.45); cursor: pointer; transition: transform .08s, filter .08s; touch-action: manipulation; }
.cx-btn:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-1px); }
.cx-btn:active:not(:disabled) { transform: translateY(2px); }
.cx-btn:disabled { opacity: .45; cursor: not-allowed; }
.cx-btn:focus-visible { outline: 3px solid var(--cx-gold); outline-offset: 2px; }
.cx-btn.gold { background: var(--cx-gold); color: var(--cx-ink); }
.cx-btn.red { background: #8f2f28; }
.cx-btn.sm { font-size: 12px; padding: 6px 10px; }
.cx-btn.lg { font-size: 17px; padding: 13px 24px; }
.cx-icon { width: 38px; height: 38px; font-size: 17px; background: var(--cx-panel2); color: var(--cx-text); border: 0; box-shadow: 0 0 0 2px var(--cx-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cx-icon svg { width: 20px; height: 20px; fill: currentColor; }
.cx-panel { background: var(--cx-panel); padding: 12px 14px; box-shadow: 0 0 0 3px var(--cx-ink), 0 6px 0 3px rgba(0,0,0,.3); box-sizing: border-box; }
.cx-panel h3 { font-family: var(--cx-font); font-size: 14px; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--cx-gold); }
.cx-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cx-seg button { font-family: var(--cx-font); font-size: 13px; font-weight: 700; padding: 7px 11px; background: var(--cx-panel2); color: var(--cx-text); border: 0; box-shadow: 0 0 0 2px var(--cx-ink); cursor: pointer; }
.cx-seg button.on { background: var(--cx-gold); color: var(--cx-ink); }
.cx-seg button:disabled { cursor: default; }

/* 대기실 */
.cx-lobby { max-width: 920px; margin: 0 auto; }
.cx-lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cx-lobby-head h2 { font-family: var(--cx-font); font-size: 26px; margin: 0; }
.cx-code-card { display: flex; align-items: center; gap: 10px; background: var(--cx-panel); padding: 10px 14px; box-shadow: 0 0 0 3px var(--cx-ink); flex-wrap: wrap; }
.cx-code { font-family: var(--cx-font); font-size: 24px; font-weight: 700; letter-spacing: 4px; background: none; border: 0; cursor: pointer; color: var(--cx-gold); min-width: 120px; }
.cx-lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cx-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--cx-line); font-size: 14px; flex-wrap: wrap; }
.cx-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.cx-mode { text-align: left; padding: 10px 12px; background: var(--cx-panel2); border: 0; box-shadow: 0 0 0 2px var(--cx-ink); cursor: pointer; color: var(--cx-text); display: flex; flex-direction: column; gap: 4px; font-family: var(--cx-body); }
.cx-mode b { font-family: var(--cx-font); font-size: 15px; }
.cx-mode span { font-size: 12px; color: var(--cx-muted); }
.cx-mode.on { box-shadow: 0 0 0 3px var(--cx-gold), 0 0 0 5px var(--cx-ink); background: #3d3424; }
.cx-mode:disabled { cursor: default; }
.cx-seats { display: grid; gap: 10px; }
.cx-seat { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--cx-panel2); box-shadow: 0 0 0 2px var(--cx-ink); }
.cx-seat .ic { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.5)); }
.cx-seat .nm { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-seat .nm small { display: block; font-weight: 400; color: var(--cx-muted); font-size: 12px; }
.cx-seat.empty .nm { color: var(--cx-muted); font-weight: 400; }
.cx-kick { border: 0; background: none; color: var(--cx-muted); cursor: pointer; font-size: 16px; }
.cx-bot-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.cx-lobby-actions { display: flex; justify-content: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }

/* 게임 배치 */
.cx-game { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.cx-main { --bw: min(calc(100% - 28px), calc(100vh - 230px), 720px); display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.cx-side { display: flex; flex-direction: column; gap: 12px; }
.cx-bar { width: var(--bw); display: flex; align-items: center; gap: 10px; padding: 6px 4px; box-sizing: border-box; }
.cx-bar .av { width: 38px; height: 38px; border-radius: 6px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: #554a63; box-shadow: 0 0 0 2px var(--cx-ink); overflow: hidden; }
.cx-bar .av img { width: 100%; height: 100%; object-fit: cover; }
.cx-bar .av svg { width: 34px; height: 34px; }
.cx-bar .who { flex: 1; min-width: 0; }
.cx-bar .who b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-bar .who small { display: flex; gap: 2px; align-items: center; min-height: 18px; color: var(--cx-muted); font-size: 12px; flex-wrap: wrap; }
.cx-bar .who small svg { width: 17px; height: 17px; }
.cx-bar .tag { font-family: var(--cx-font); font-size: 11px; padding: 2px 6px; background: #8f2f28; color: #fff; }
.cx-clock { font-family: var(--cx-font); font-size: 24px; font-weight: 700; padding: 6px 12px; min-width: 92px; text-align: center; background: #15111a; color: #9a90a8; box-shadow: 0 0 0 2px var(--cx-ink); font-variant-numeric: tabular-nums; }
.cx-clock.run { background: #f3ece2; color: var(--cx-ink); }
.cx-clock.low { background: var(--cx-red); color: #fff; animation: cxBlink 1s steps(2) infinite; }
.cx-clock.none { display: none; }
@keyframes cxBlink { 50% { filter: brightness(1.25); } }
.cx-bar.turn .av { box-shadow: 0 0 0 2px var(--cx-ink), 0 0 0 4px var(--cx-gold); }

/* 판 */
.cx-board-wrap { width: var(--bw); position: relative; padding: 14px; box-sizing: content-box; background: linear-gradient(145deg, var(--frame), var(--frame2)); box-shadow: 0 0 0 3px var(--cx-ink), inset 0 0 0 2px rgba(255,255,255,.08), 0 18px 30px rgba(0,0,0,.55); border-radius: 6px; }
.cx-squares { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.cx-board { position: relative; width: 100%; aspect-ratio: 1; box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.35) inset; user-select: none; -webkit-user-select: none; touch-action: none; }
.cx-sq { position: relative; background: var(--sq-l); background-image: var(--sq-tex-l); }
.cx-sq.d { background: var(--sq-d); background-image: var(--sq-tex-d); }
.cx-sq .co { position: absolute; font-family: var(--cx-font); font-size: clamp(8px, 1.3vw, 12px); font-weight: 700; color: var(--coord-l); pointer-events: none; }
.cx-sq.d .co { color: var(--coord-d); }
.cx-sq .co.f { right: 3px; bottom: 1px; } .cx-sq .co.r { left: 3px; top: 1px; }
.cx-body.no-coord .cx-sq .co { display: none; }
.cx-sq.last::after { content: ""; position: absolute; inset: 0; background: rgba(242,194,48,.38); }
.cx-sq.sel::after { content: ""; position: absolute; inset: 0; background: rgba(94,200,176,.5); }
.cx-sq.chk::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,40,40,.95) 0, rgba(255,40,40,.5) 40%, transparent 72%); z-index: 1; }
.cx-sq.aug::after { content: ""; position: absolute; inset: 0; background: rgba(180,140,255,.38); }
.cx-sq.tgt { cursor: pointer; }
.cx-sq.tgt::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 4px rgba(242,194,48,.9); background: rgba(242,194,48,.18); }
.cx-dot { position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(20,20,20,.28); pointer-events: none; z-index: 3; }
.cx-dot.cap { width: 92%; height: 92%; background: none; box-shadow: inset 0 0 0 6px rgba(20,20,20,.28); }
.cx-dot.blk { width: 92%; height: 92%; background: none; box-shadow: inset 0 0 0 5px rgba(111,168,255,.75); border-radius: 18%; }
.cx-dot.aug { background: rgba(180,140,255,.75); }
.cx-dot.trap { background: rgba(232,87,75,.75); }
.cx-sq.hov .cx-dot { background: rgba(20,20,20,.45); }
.cx-trap { position: absolute; inset: 18%; pointer-events: none; opacity: .85; z-index: 1; }
.cx-trap svg { width: 100%; height: 100%; }
.cx-pieces { position: absolute; inset: 0; pointer-events: none; }
.cx-pc { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; transition: transform .22s cubic-bezier(.3,.7,.4,1); pointer-events: none; z-index: 4; }
.cx-pc .pc-svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 2px rgba(0,0,0,.45)); transition: transform .15s; }
.cx-pc.mine.can { cursor: grab; }
.cx-pc.drag { transition: none; z-index: 20; }
.cx-pc.drag .pc-svg { transform: scale(1.15); filter: drop-shadow(0 10px 6px rgba(0,0,0,.5)); }
.cx-pc.gone { animation: cxGone .35s ease-out forwards; z-index: 5; }
.cx-pc.born .pc-svg { animation: cxBorn .5s cubic-bezier(.2,.9,.3,1.4); }
.cx-pc.promo .pc-svg { animation: cxPromo .7s ease; }
.cx-pc.frozen .pc-svg { filter: drop-shadow(0 3px 2px rgba(0,0,0,.45)) saturate(.2) brightness(1.15) hue-rotate(170deg); }
.cx-pc .bd { position: absolute; display: flex; gap: 1px; top: 2%; right: 2%; z-index: 2; }
.cx-pc .bd i { width: clamp(11px, 1.9vw, 17px); height: clamp(11px, 1.9vw, 17px); display: inline-flex; }
.cx-pc .bd i svg { width: 100%; height: 100%; }
.cx-pc .qm { position: absolute; inset: 8%; border-radius: 50%; box-shadow: 0 0 10px 3px rgba(255,122,217,.7); pointer-events: none; }
.cx-pc .inv { position: absolute; inset: 4%; border-radius: 50%; box-shadow: 0 0 0 3px rgba(242,194,48,.9), 0 0 12px rgba(242,194,48,.7); pointer-events: none; }
@keyframes cxGone { 0% { opacity: 1; } 40% { transform: var(--tf) scale(1.15); opacity: .9; } 100% { transform: var(--tf) scale(.4) rotate(25deg); opacity: 0; } }
@keyframes cxBorn { from { transform: scale(.2) translateY(-40%); opacity: 0; } }
@keyframes cxPromo { 0% { transform: scale(1); filter: brightness(1); } 40% { transform: scale(1.35); filter: brightness(2.2) drop-shadow(0 0 10px #ffd700); } 100% { transform: scale(1); } }
.cx-fx { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.cx-burst { position: absolute; width: 12.5%; height: 12.5%; }
.cx-burst::before { content: ""; position: absolute; inset: -20%; border-radius: 50%; border: 4px solid var(--c, #c49bff); animation: cxRing .7s ease-out forwards; }
.cx-burst::after { content: ""; position: absolute; inset: 20%; border-radius: 50%; background: radial-gradient(circle, var(--c, #c49bff), transparent 70%); animation: cxGlow .8s ease-out forwards; }
@keyframes cxRing { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes cxGlow { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(2.2); } }
.cx-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #fff); animation: cxSpark .6s ease-out forwards; }
@keyframes cxSpark { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.cx-promo { position: absolute; z-index: 30; display: flex; flex-direction: column; background: #f3ece2; box-shadow: 0 0 0 3px var(--cx-ink), 0 10px 24px rgba(0,0,0,.5); width: 12.5%; }
.cx-promo button { border: 0; background: none; cursor: pointer; aspect-ratio: 1; padding: 6%; }
.cx-promo button:hover, .cx-promo button:focus-visible { background: var(--cx-gold); outline: none; }
.cx-status { font-family: var(--cx-font); font-size: 14px; min-height: 1.3em; text-align: center; }
.cx-status.mine { color: var(--cx-gold); }
.cx-target { width: var(--bw); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; background: #15111a; box-shadow: 0 0 0 2px var(--cx-gold); padding: 8px 10px; font-family: var(--cx-font); font-size: 13px; box-sizing: border-box; }
.cx-target-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-target-opts button { display: inline-flex; align-items: center; gap: 4px; font-family: var(--cx-font); font-weight: 700; padding: 4px 10px; border: 0; background: #f3ece2; cursor: pointer; box-shadow: 0 0 0 2px var(--cx-gold); }
.cx-target-opts button svg { width: 26px; height: 26px; }

/* 오른쪽 */
.cx-moves { max-height: 220px; overflow: auto; font-family: var(--cx-font); font-size: 13px; display: grid; grid-template-columns: 34px 1fr 1fr; gap: 2px 6px; }
.cx-moves span { padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-moves .no { color: var(--cx-muted); }
.cx-moves .act { color: #c9a6ff; }
.cx-moves .cur { background: rgba(242,194,48,.25); }
.cx-moves:empty::before { content: "아직 둔 수가 없어요"; color: var(--cx-muted); grid-column: 1 / -1; }
.cx-lost { display: flex; flex-direction: column; gap: 6px; }
.cx-lost-row { display: flex; align-items: center; gap: 0; min-height: 24px; flex-wrap: wrap; }
.cx-lost-row svg { width: 22px; height: 22px; margin-right: -6px; }
.cx-lost-row b { margin-left: 10px; font-family: var(--cx-font); font-size: 12px; color: var(--cx-mint); }
.cx-augs { display: flex; flex-direction: column; gap: 6px; }
.cx-augs:empty::before { content: "아직 없어요"; color: var(--cx-muted); font-size: 13px; }
.cx-aug { display: flex; gap: 8px; align-items: center; text-align: left; padding: 6px; background: var(--cx-panel2); border: 0; color: var(--cx-text); box-shadow: 0 0 0 2px var(--cx-ink); width: 100%; box-sizing: border-box; font-family: var(--cx-body); position: relative; }
.cx-aug .art { width: 44px; height: 44px; flex: none; box-shadow: 0 0 0 2px var(--rc, #666); }
.cx-aug .art svg { width: 100%; height: 100%; display: block; }
.cx-aug .tx { flex: 1; min-width: 0; }
.cx-aug .tx b { display: block; font-family: var(--cx-font); font-size: 13px; }
.cx-aug .tx small { display: block; font-size: 11.5px; color: var(--cx-muted); line-height: 1.35; }
.cx-aug .ch { font-family: var(--cx-font); font-size: 11px; background: #15111a; padding: 2px 6px; flex: none; }
.cx-aug.usable { cursor: pointer; box-shadow: 0 0 0 2px var(--cx-gold); }
.cx-aug.usable:hover { filter: brightness(1.12); }
.cx-aug.armed { box-shadow: 0 0 0 3px var(--cx-gold), 0 0 14px rgba(242,194,48,.6); }
.cx-aug.spent { opacity: .45; }
.cx-aug.hidden-card .art { background: repeating-linear-gradient(45deg, #2a2331 0 6px, #352c3e 6px 12px); }
.r-common { --rc: #8b929c; } .r-rare { --rc: #4d8fe8; } .r-epic { --rc: #a66bff; } .r-legend { --rc: #f2b02a; }
.cx-ctl { display: flex; gap: 8px; flex-wrap: wrap; }
.cx-ctl .cx-btn { flex: 1 1 auto; }
.cx-draw-offer { background: #3d3424; box-shadow: 0 0 0 2px var(--cx-gold); padding: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }

/* 모달 */
.cx-modal { position: fixed; inset: 0; z-index: 80; background: rgba(12,9,16,.75); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.cx-pick { width: min(100%, 860px); background: #211b28; box-shadow: 0 0 0 4px var(--cx-ink), 0 0 0 7px var(--cx-gold); padding: 18px; max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.cx-pick-title { font-family: var(--cx-font); font-size: 24px; font-weight: 700; color: var(--cx-gold); text-align: center; }
.cx-pick-sub { text-align: center; font-size: 14px; color: var(--cx-muted); margin-top: 4px; }
.cx-pick-bar { height: 6px; background: rgba(255,255,255,.1); margin: 12px auto 0; max-width: 420px; }
.cx-pick-bar i { display: block; height: 100%; background: var(--cx-gold); transition: width .25s linear; }
.cx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.cx-card { position: relative; text-align: left; background: #f3ece2; color: var(--cx-ink); border: 0; padding: 0 0 12px; cursor: pointer; box-shadow: 0 0 0 3px var(--rc), 0 0 0 6px var(--cx-ink), 0 8px 0 6px rgba(0,0,0,.4); display: flex; flex-direction: column; font-family: var(--cx-body); animation: cxDeal .45s cubic-bezier(.2,.9,.3,1.2) both; transition: transform .12s; overflow: hidden; }
.cx-card:nth-child(2) { animation-delay: .08s; } .cx-card:nth-child(3) { animation-delay: .16s; }
.cx-card:hover, .cx-card:focus-visible { transform: translateY(-6px); outline: none; }
.cx-card.r-epic { box-shadow: 0 0 0 3px var(--rc), 0 0 0 6px var(--cx-ink), 0 0 24px rgba(166,107,255,.55); }
.cx-card.r-legend { box-shadow: 0 0 0 3px var(--rc), 0 0 0 6px var(--cx-ink), 0 0 30px rgba(242,176,42,.7); }
.cx-card .art { aspect-ratio: 16 / 10; overflow: hidden; }
.cx-card .art svg { width: 100%; height: 100%; display: block; }
.cx-card .rar { position: absolute; top: 8px; left: 8px; font-family: var(--cx-font); font-size: 11px; padding: 2px 7px; color: #fff; background: var(--rc); }
.cx-card .nm { font-family: var(--cx-font); font-size: 17px; font-weight: 700; padding: 10px 12px 2px; }
.cx-card .kind { font-family: var(--cx-font); font-size: 11px; color: #6b5f55; padding: 0 12px; }
.cx-card dl { margin: 8px 12px 0; font-size: 13px; line-height: 1.45; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; }
.cx-card dt { color: #8d7f72; font-family: var(--cx-font); font-size: 11px; padding-top: 2px; }
.cx-card dd { margin: 0; }
@keyframes cxDeal { from { opacity: 0; transform: translateY(40px) rotate(-4deg) scale(.9); } }
.cx-pick-foot { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cx-result { position: relative; width: min(100%, 760px); background: #211b28; box-shadow: 0 0 0 4px var(--cx-ink), 0 0 0 8px var(--cx-gold); padding: 20px; max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.cx-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cx-result-title { font-family: var(--cx-font); font-size: 30px; font-weight: 700; text-align: center; color: var(--cx-gold); }
.cx-result-sub { text-align: center; color: var(--cx-muted); margin-top: 4px; }
.cx-res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.cx-res-card { background: var(--cx-panel2); padding: 10px 12px; box-shadow: 0 0 0 2px var(--cx-ink); }
.cx-res-card.win { box-shadow: 0 0 0 2px var(--cx-gold); }
.cx-res-card h4 { margin: 0 0 6px; font-family: var(--cx-font); display: flex; align-items: center; gap: 6px; }
.cx-res-card h4 svg { width: 26px; height: 26px; }
.cx-res-card .row { font-size: 13px; color: var(--cx-muted); margin-top: 4px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cx-res-card .row svg { width: 20px; height: 20px; }
.cx-replay { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.cx-mini { width: 220px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); box-shadow: 0 0 0 3px var(--cx-ink); position: relative; }
.cx-mini > i { background: var(--sq-l); } .cx-mini > i.d { background: var(--sq-d); }
.cx-mini .mp { position: absolute; width: 12.5%; height: 12.5%; }
.cx-mini .mp svg { width: 100%; height: 100%; }
.cx-replay-ctl { display: flex; flex-direction: column; gap: 8px; align-items: center; min-width: 200px; }
.cx-replay-ctl input { width: 100%; }
.cx-result-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.cx-dialog { background: #211b28; padding: 18px; box-shadow: 0 0 0 4px var(--cx-ink); width: min(100%, 520px); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.cx-dialog.wide { width: min(100%, 880px); }
.cx-dialog h3 { font-family: var(--cx-font); margin: 0 0 12px; color: var(--cx-gold); }
.cx-dialog-btns { display: flex; justify-content: center; margin-top: 14px; gap: 10px; }
.cx-set-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--cx-line); flex-wrap: wrap; }
.cx-themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cx-themes button { border: 0; cursor: pointer; padding: 0 0 6px; background: var(--cx-panel2); color: var(--cx-text); font-family: var(--cx-font); font-size: 12px; box-shadow: 0 0 0 2px var(--cx-ink); }
.cx-themes button.on { box-shadow: 0 0 0 3px var(--cx-gold); }
.cx-themes button i { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 1; margin-bottom: 4px; }
.cx-themes button i b:nth-child(1), .cx-themes button i b:nth-child(4) { background: var(--tl); } .cx-themes button i b:nth-child(2), .cx-themes button i b:nth-child(3) { background: var(--td); }
.cx-help-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.cx-help-tabs button { font-family: var(--cx-font); padding: 6px 12px; border: 0; background: var(--cx-panel2); color: var(--cx-text); box-shadow: 0 0 0 2px var(--cx-ink); cursor: pointer; }
.cx-help-tabs button.on { background: var(--cx-gold); color: var(--cx-ink); }
.cx-help-body { font-size: 14px; line-height: 1.65; }
.cx-help-body h4 { font-family: var(--cx-font); margin: 14px 0 6px; color: var(--cx-gold); }
.cx-help-body ul { padding-left: 18px; margin: 0; }
.cx-dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.cx-toasts { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 440px); }
.cx-toast { background: #15111a; color: var(--cx-text); font-family: var(--cx-font); font-size: 14px; padding: 9px 14px; box-shadow: 0 0 0 2px var(--cx-gold); transition: opacity .3s, transform .3s; text-align: center; }
.cx-toast.out { opacity: 0; transform: translateY(-8px); }
.cx-banner { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 90; pointer-events: none; font-family: var(--cx-font); text-align: center; background: #15111a; padding: 14px 30px; box-shadow: 0 0 0 3px var(--cx-gold), 0 10px 30px rgba(0,0,0,.5); max-width: calc(100vw - 48px); box-sizing: border-box; }
.cx-banner b { display: block; font-size: clamp(22px, 6vw, 32px); color: var(--cx-gold); }
.cx-banner span { font-size: 14px; }
.cx-banner.show { animation: cxBanner 1.5s ease forwards; }
@keyframes cxBanner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* 반응형 */
@media (max-width: 1040px) {
  .cx-game { grid-template-columns: minmax(0, 1fr); }
  .cx-side { display: grid; grid-template-columns: 1fr 1fr; }
  .cx-main { --bw: min(calc(100vw - 52px), calc(100vh - 220px), 720px); }
}
@media (max-width: 700px) {
  #cxApp, .cx-body.cx-in-game #cxApp { padding: 6px 6px 24px; }
  .cx-lobby-grid { grid-template-columns: 1fr; }
  .cx-side { grid-template-columns: 1fr; }
  .cx-main { --bw: calc(100vw - 28px); }
  .cx-board-wrap { padding: 8px; }
  .cx-clock { font-size: 19px; min-width: 74px; padding: 4px 8px; }
  .cx-bar .av { width: 32px; height: 32px; }
  .cx-cards { grid-template-columns: 1fr; gap: 10px; }
  .cx-card { flex-direction: row; flex-wrap: wrap; padding-bottom: 8px; }
  .cx-card .art { width: 96px; aspect-ratio: 1; }
  .cx-card .nm { flex: 1; align-self: center; }
  .cx-card .kind { flex-basis: 100%; }
  .cx-card dl { flex-basis: 100%; }
  .cx-res-grid { grid-template-columns: 1fr; }
  .cx-modes { grid-template-columns: 1fr; }
  .cx-themes { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .cx-pc, .cx-card, .cx-pc .pc-svg { transition: none !important; animation: none !important; } }
