/* =========================
   플듀 증강 윷놀이 (2026-11-15)
   시작 화면은 px-lobby.css(진단소 픽셀 스타일), 대기실·게임은 한지·먹 느낌 + 픽셀 글꼴 제목
   ========================= */
:root {
  --yu-ink: #231a2b; --yu-paper: #f6ecd6; --yu-paper2: #eadbb8; --yu-line: #6b4a2b; --yu-wood: #8a5a32; --yu-wood2: #5d3a1e;
  --yu-gold: #f2c230; --yu-red: #d9473b; --yu-mint: #5ec8b0; --yu-muted: #8d7f72; --yu-cream: #fff7e8;
  --yu-font: Galmuri11, "Malgun Gothic", system-ui, sans-serif; --yu-body: "Gowun Dodum", "Malgun Gothic", system-ui, sans-serif;
  --t0: #e04b4b; --t1: #3d7fe0; --t2: #2fae58; --t3: #e8a417; --t4: #9a5fe0; --t5: #ef7a2e;
}
.yu-body { color: var(--yu-cream); font-family: var(--yu-body); min-height: 100vh; }
.yu-body.yu-in-game .topbar { display: none; }
#yuApp { padding: 16px 16px 40px; box-sizing: border-box; }
.yu-body.yu-in-game #yuApp { padding: 8px 10px 16px; }
.yu-scr { display: none; }
.yu-scr.active { display: block; }
.hidden, .yu-body [hidden] { display: none !important; }
.yu-muted { color: var(--yu-muted); font-size: 13px; font-weight: 400; }
.yu-err { color: #ff8d7a; text-align: center; min-height: 1.3em; font-family: var(--yu-font); font-size: 14px; margin: 10px 0 0; }
.yu-solo-opts .px-row { gap: 12px; }

/* ---------- 버튼 ---------- */
.yu-btn { font-family: var(--yu-font); font-weight: 700; font-size: 15px; padding: 10px 16px; background: var(--yu-cream); color: var(--yu-ink); border: 0; box-shadow: 0 0 0 3px var(--yu-ink), 0 4px 0 3px rgba(0,0,0,.35); cursor: pointer; transition: transform .08s, filter .08s; touch-action: manipulation; }
.yu-btn:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); }
.yu-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 3px var(--yu-ink), 0 1px 0 3px rgba(0,0,0,.35); }
.yu-btn:disabled { opacity: .5; cursor: not-allowed; }
.yu-btn:focus-visible { outline: 3px solid var(--yu-gold); outline-offset: 3px; }
.yu-btn.gold { background: var(--yu-gold); }
.yu-btn.sm { font-size: 13px; padding: 6px 10px; }
.yu-btn.lg { font-size: 18px; padding: 14px 26px; }
.yu-icon { width: 40px; height: 40px; font-size: 19px; background: var(--yu-cream); border: 0; box-shadow: 0 0 0 3px var(--yu-ink); cursor: pointer; }
.yu-icon:focus-visible { outline: 3px solid var(--yu-gold); }
.yu-seg { display: inline-flex; gap: 6px; }
.yu-seg button { font-family: var(--yu-font); font-size: 13px; font-weight: 700; padding: 6px 12px; background: #fff; color: var(--yu-ink); border: 0; box-shadow: 0 0 0 2px var(--yu-ink); cursor: pointer; }
.yu-seg button.on { background: var(--yu-gold); }
.yu-seg button:disabled { cursor: default; opacity: .75; }

/* ---------- 패널 ---------- */
.yu-panel { background: var(--yu-paper); color: var(--yu-ink); padding: 14px 16px; box-shadow: 0 0 0 3px var(--yu-ink), 0 6px 0 3px rgba(0,0,0,.3); box-sizing: border-box; }
.yu-panel h3 { font-family: var(--yu-font); font-size: 16px; margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }

/* ---------- 대기실 ---------- */
.yu-lobby { max-width: 980px; margin: 0 auto; }
.yu-lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.yu-lobby-head h2 { font-family: var(--yu-font); font-size: 26px; margin: 0; color: var(--yu-cream); text-shadow: 0 3px 0 var(--yu-ink); }
.yu-code-card { display: flex; align-items: center; gap: 10px; background: var(--yu-paper); color: var(--yu-ink); padding: 10px 14px; box-shadow: 0 0 0 3px var(--yu-ink); flex-wrap: wrap; }
.yu-code-label { font-family: var(--yu-font); font-size: 12px; color: var(--yu-muted); }
.yu-code { font-family: var(--yu-font); font-size: 24px; font-weight: 700; letter-spacing: 4px; background: none; border: 0; cursor: pointer; color: var(--yu-ink); min-width: 120px; }
.yu-code-btns { display: flex; gap: 8px; }
.yu-lobby-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.yu-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.yu-mode { text-align: left; padding: 10px 12px; background: #fff; border: 0; box-shadow: 0 0 0 2px var(--yu-ink); cursor: pointer; font-family: var(--yu-body); color: var(--yu-ink); display: flex; flex-direction: column; gap: 4px; }
.yu-mode b { font-family: var(--yu-font); font-size: 15px; }
.yu-mode span { font-size: 12px; color: var(--yu-muted); }
.yu-mode.on { background: #fff4c7; box-shadow: 0 0 0 3px var(--yu-gold), 0 0 0 5px var(--yu-ink); }
.yu-mode:disabled { cursor: default; }
.yu-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px dashed rgba(35,26,43,.18); font-size: 14px; }
.yu-opt select { font-family: var(--yu-font); font-size: 14px; padding: 5px 8px; border: 0; box-shadow: 0 0 0 2px var(--yu-ink); background: #fff; color: var(--yu-ink); }
.yu-classic-room .yu-aug-only { display: none; }
.yu-roster { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.yu-roster li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; background: #fff; box-shadow: 0 0 0 2px rgba(35,26,43,.15); }
.yu-roster li.dc { opacity: .55; }
.yu-roster li.empty { background: transparent; box-shadow: 0 0 0 2px dashed rgba(35,26,43,.15); outline: 2px dashed rgba(35,26,43,.2); outline-offset: -2px; box-shadow: none; }
.yu-roster .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.yu-roster .nm em { font-style: normal; color: var(--yu-muted); font-weight: 400; }
.yu-roster .nm small { font-size: 11px; color: var(--yu-muted); font-weight: 400; }
.yu-crown { font-family: var(--yu-font); font-size: 12px; color: #a46a00; }
.yu-kick { border: 0; background: none; font-size: 15px; cursor: pointer; color: var(--yu-muted); padding: 2px 6px; }
.yu-team-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yu-team-col h4 { margin: 0 0 6px; font-family: var(--yu-font); font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.yu-team-col.t0 h4 { color: var(--t0); } .yu-team-col.t1 h4 { color: var(--t1); }
.yu-team-col .yu-roster li { font-size: 13px; padding: 6px; gap: 6px; }
.yu-move-team { font-size: 12px; padding: 2px 6px; border: 0; background: var(--yu-paper2); cursor: pointer; font-family: var(--yu-font); }
.yu-bot-row { display: flex; gap: 8px; flex-wrap: wrap; }
.yu-spec-note { margin: 8px 0 0; }
.yu-lobby-actions { display: flex; justify-content: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.yu-av { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid; box-sizing: border-box; }
.yu-av-txt { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px; border: 2px solid var(--yu-ink); }
.yu-av-empty { background: rgba(35,26,43,.08); border: 2px dashed rgba(35,26,43,.25); }

/* ---------- 게임 ---------- */
.yu-game { max-width: 1440px; margin: 0 auto; }
.yu-hud { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.yu-hud-l, .yu-hud-r { display: flex; align-items: center; gap: 8px; flex: none; }
.yu-chip { font-family: var(--yu-font); font-size: 13px; padding: 6px 10px; background: var(--yu-ink); color: var(--yu-cream); box-shadow: 0 0 0 2px rgba(255,247,232,.25); }
.yu-chip.mode { color: var(--yu-gold); }
.yu-chip.spec { color: var(--yu-mint); }
.yu-turnbox { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--yu-font); }
.yu-turnbox b { font-size: 17px; }
.yu-turnbox small { display: block; font-size: 12px; color: var(--yu-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yu-turnbox.mine b { color: var(--yu-gold); }
.yu-timer { position: relative; width: 40px; height: 40px; }
.yu-timer svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.yu-timer circle { fill: none; stroke-width: 4; }
.yu-timer .bg { stroke: rgba(255,255,255,.15); }
.yu-timer .fg { stroke: var(--yu-gold); stroke-dasharray: 97.4; transition: stroke-dashoffset .25s linear; }
.yu-timer.low .fg { stroke: var(--yu-red); }
.yu-timer span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--yu-font); font-size: 13px; font-weight: 700; }
.yu-cols { display: grid; grid-template-columns: 250px minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.yu-center { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.yu-status { font-family: var(--yu-font); font-size: 15px; text-align: center; min-height: 1.4em; padding: 4px 12px; }
.yu-status.mine { color: var(--yu-gold); }
.yu-help-line { font-size: 12px; color: var(--yu-muted); min-height: 1.2em; text-align: center; }

/* 참가자 */
.yu-left { display: flex; flex-direction: column; gap: 10px; }
.yu-team-h { font-family: var(--yu-font); font-size: 13px; margin: 2px 0 -4px; display: flex; justify-content: space-between; color: var(--yu-cream); }
.yu-pl { background: var(--yu-paper); color: var(--yu-ink); padding: 9px 10px; box-shadow: 0 0 0 3px var(--yu-ink); position: relative; transition: transform .2s, box-shadow .2s; border-left: 8px solid var(--tc, #999); }
.yu-pl.cur { box-shadow: 0 0 0 3px var(--yu-gold), 0 0 0 6px var(--yu-ink), 0 0 18px rgba(242,194,48,.5); transform: translateX(4px); }
.yu-pl.dc { opacity: .6; }
.yu-pl-top { display: flex; align-items: center; gap: 8px; }
.yu-pl-nm { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yu-pl-nm em { font-style: normal; color: var(--yu-muted); font-weight: 400; font-size: 12px; }
.yu-pl-tag { font-family: var(--yu-font); font-size: 11px; padding: 2px 5px; background: var(--yu-ink); color: var(--yu-cream); }
.yu-pl-tag.dc { background: #9b3b30; }
.yu-pl-tag.pick { background: #6e4bc2; }
.yu-pl-pcs { display: flex; gap: 4px; margin-top: 7px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--yu-muted); }
.yu-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tc); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 1.5px var(--yu-ink); display: inline-block; }
.yu-dot.home { opacity: .35; }
.yu-dot.done { background: var(--yu-gold); position: relative; }
.yu-dot.done::after { content: "✓"; position: absolute; inset: 0; font-size: 10px; line-height: 14px; text-align: center; color: var(--yu-ink); font-weight: 700; }
.yu-pl-augs { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.yu-pl-augs span { font-size: 15px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: #fff; box-shadow: 0 0 0 1.5px rgba(35,26,43,.25); cursor: help; position: relative; }
.yu-pl-augs span.armed { box-shadow: 0 0 0 2px var(--yu-gold); background: #fff4c7; }
.yu-pl-augs span.used0 { opacity: .35; }
.yu-pl-augs span.recent { animation: yuPop .9s ease 2; box-shadow: 0 0 0 2px var(--yu-red); }
.yu-pl-last { font-size: 11px; color: var(--yu-muted); margin-top: 4px; min-height: 1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes yuPop { 50% { transform: scale(1.3); } }

/* ---------- 윷판 ---------- */
.yu-board-wrap { width: min(100%, 640px, calc(100vh - 330px)); min-width: 280px; }
.yu-board { position: relative; width: 100%; aspect-ratio: 1; background: radial-gradient(circle at 35% 30%, #fbf3df, #ecdcb5 70%, #e1cd9e); box-shadow: 0 0 0 4px var(--yu-ink), 0 0 0 12px var(--yu-wood), 0 0 0 15px var(--yu-ink), 0 16px 0 15px rgba(0,0,0,.35); margin: 16px 0 26px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.yu-board::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(107,74,43,.08) 1px, transparent 1px); background-size: 9px 9px; pointer-events: none; }
.yu-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.yu-lines line { stroke: var(--yu-line); stroke-width: .55; stroke-linecap: round; }
.yu-lines line.diag { stroke-dasharray: 1.6 1.2; stroke-width: .45; }
.yu-lines .route { stroke: var(--yu-gold); stroke-width: 1.6; stroke-dasharray: none; opacity: .95; filter: drop-shadow(0 0 1px #000); }
.yu-lines .route.ghost { stroke: #fff; opacity: .55; stroke-dasharray: 1.4 1; }
.yu-nodes, .yu-marks, .yu-pieces, .yu-fx { position: absolute; inset: 0; pointer-events: none; }
.yu-node { position: absolute; width: 5.6%; height: 5.6%; transform: translate(-50%, -50%); border-radius: 50%; background: #fffaf0; box-shadow: 0 0 0 2px var(--yu-line), inset 0 -2px 0 rgba(107,74,43,.18); }
.yu-node.big { width: 9.4%; height: 9.4%; box-shadow: 0 0 0 2.5px var(--yu-line), 0 0 0 5px #fffaf0, 0 0 0 6.5px var(--yu-line); }
.yu-node.start { background: #ffe9a8; }
.yu-node.start::after { content: "출발"; position: absolute; top: 112%; left: 50%; transform: translateX(-50%); font-family: var(--yu-font); font-size: clamp(9px, 1.6vw, 12px); color: var(--yu-wood2); white-space: nowrap; }
.yu-node.room { background: #ffe9d2; }
.yu-node.pickable { pointer-events: auto; cursor: pointer; background: #fff4c7; box-shadow: 0 0 0 3px var(--yu-gold), 0 0 0 5px var(--yu-ink); }
.yu-mark { position: absolute; width: 8%; height: 8%; transform: translate(-50%, -50%); border-radius: 50%; pointer-events: auto; cursor: pointer; background: rgba(242,194,48,.35); box-shadow: 0 0 0 3px var(--yu-gold), 0 0 14px rgba(242,194,48,.9); animation: yuMark 1s ease-in-out infinite; display: flex; align-items: center; justify-content: center; border: 0; padding: 0; z-index: 3; }
.yu-mark b { position: absolute; top: -78%; white-space: nowrap; font-family: var(--yu-font); font-size: clamp(10px, 1.7vw, 13px); background: var(--yu-ink); color: var(--yu-gold); padding: 2px 6px; pointer-events: none; }
.yu-mark.cap { background: rgba(217,71,59,.4); box-shadow: 0 0 0 3px var(--yu-red), 0 0 14px rgba(217,71,59,.9); }
.yu-mark.cap b { color: #ffb4a8; }
.yu-mark.done { background: rgba(94,200,176,.4); box-shadow: 0 0 0 3px var(--yu-mint), 0 0 14px rgba(94,200,176,.9); }
.yu-mark:focus-visible { outline: 3px solid #fff; }
.yu-mark.ghost { pointer-events: none; animation: none; opacity: .6; background: rgba(255,255,255,.25); box-shadow: 0 0 0 2px #fff; }
@keyframes yuMark { 50% { transform: translate(-50%, -50%) scale(1.12); } }

/* 말 (2.5D 토큰) */
.yu-pc { position: absolute; width: 7.2%; height: 7.2%; transform: translate(-50%, -62%); transition: left .22s ease, top .22s ease, transform .2s; z-index: 2; pointer-events: auto; cursor: default; border: 0; padding: 0; background: none; }
.yu-pc .tok { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--tc) 55%, #fff), var(--tc) 55%, color-mix(in srgb, var(--tc) 70%, #000)); box-shadow: 0 0 0 2px var(--yu-ink), 0 4px 0 0 color-mix(in srgb, var(--tc) 55%, #000), 0 4px 0 2px var(--yu-ink), 0 9px 6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.yu-pc .tok::before { content: ""; width: 56%; height: 56%; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); box-sizing: border-box; position: absolute; }
.yu-pc .lb { position: relative; font-family: var(--yu-font); font-weight: 700; color: #fff; font-size: clamp(9px, 1.7vw, 14px); text-shadow: 0 1px 0 rgba(0,0,0,.5); }
.yu-pc .stk { position: absolute; right: -22%; top: -26%; background: var(--yu-ink); color: var(--yu-gold); font-family: var(--yu-font); font-size: clamp(9px, 1.5vw, 12px); padding: 1px 4px; border-radius: 8px; z-index: 2; }
.yu-pc .st { position: absolute; left: -24%; top: -28%; font-size: clamp(10px, 1.8vw, 14px); z-index: 2; filter: drop-shadow(0 1px 0 #000); }
.yu-pc.clone .tok { opacity: .72; background: repeating-linear-gradient(45deg, var(--tc) 0 4px, color-mix(in srgb, var(--tc) 60%, #fff) 4px 8px); }
.yu-pc.movable { cursor: pointer; animation: yuBob .9s ease-in-out infinite; }
.yu-pc.movable .tok { box-shadow: 0 0 0 2px var(--yu-ink), 0 0 0 5px var(--yu-gold), 0 4px 0 2px var(--yu-ink), 0 9px 8px rgba(0,0,0,.35); }
.yu-pc.sel { transform: translate(-50%, -78%) scale(1.15); z-index: 4; animation: none; }
.yu-pc.tgt { cursor: pointer; }
.yu-pc.tgt .tok { box-shadow: 0 0 0 2px var(--yu-ink), 0 0 0 5px #ff6b6b, 0 4px 0 2px var(--yu-ink); }
.yu-pc.hov { transform: translate(-50%, -76%) scale(1.1); z-index: 4; }
.yu-pc.hop { transition: left .16s cubic-bezier(.3,.7,.4,1), top .16s cubic-bezier(.3,.7,.4,1); }
.yu-pc.jump .tok { animation: yuJump .18s ease-out; }
.yu-pc:focus-visible { outline: 3px solid #fff; border-radius: 50%; }
@keyframes yuBob { 50% { transform: translate(-50%, -72%); } }
@keyframes yuJump { 50% { transform: translateY(-30%); } }
.yu-fx-ring { position: absolute; width: 14%; height: 14%; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid var(--c, #fff); animation: yuRing .7s ease-out forwards; }
.yu-fx-txt { position: absolute; transform: translate(-50%, -100%); font-family: var(--yu-font); font-weight: 700; font-size: clamp(13px, 2.4vw, 20px); color: #fff; text-shadow: 0 2px 0 var(--yu-ink), 2px 0 0 var(--yu-ink), -2px 0 0 var(--yu-ink), 0 -2px 0 var(--yu-ink); animation: yuFloat 1.3s ease-out forwards; white-space: nowrap; z-index: 6; }
@keyframes yuRing { from { transform: translate(-50%, -50%) scale(.3); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }
@keyframes yuFloat { from { opacity: 0; transform: translate(-50%, -60%); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -190%); } }

/* ---------- 던지기 ---------- */
.yu-controls { display: flex; gap: 12px; align-items: stretch; width: min(100%, 640px); }
.yu-mat { position: relative; flex: 0 0 210px; height: 110px; background: linear-gradient(#3a2a1c, #2a1e14); box-shadow: 0 0 0 3px var(--yu-ink), inset 0 0 0 3px rgba(255,255,255,.06); perspective: 600px; overflow: hidden; }
.yu-mat::before { content: ""; position: absolute; inset: 8px; border: 2px dashed rgba(255,247,232,.12); }
.yu-sticks { position: absolute; inset: 0; transform-style: preserve-3d; }
.yu-stick { position: absolute; left: 50%; top: 50%; width: 22px; height: 82px; margin: -41px 0 0 -11px; transform-style: preserve-3d; transition: transform .1s; }
.yu-stick .f, .yu-stick .b { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; box-shadow: 0 0 0 2px var(--yu-ink); }
.yu-stick .f { background: linear-gradient(90deg, #f5e3b8, #fff2cf 50%, #e8cf98); }  /* 배 (평평한 면) */
.yu-stick .b { background: linear-gradient(90deg, #6b4220, #a06a38 45%, #5a3518); transform: rotateY(180deg); }  /* 등 (둥근 면) */
.yu-stick .f::before { content: ""; position: absolute; left: 50%; top: 14%; bottom: 14%; width: 2px; margin-left: -1px; background: repeating-linear-gradient(transparent 0 6px, rgba(107,74,43,.5) 6px 9px); }
.yu-stick.mark .f::after { content: "✕"; position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 13px; color: var(--yu-red); font-weight: 700; }
.yu-stick .b::after { content: ""; position: absolute; left: 30%; right: 30%; top: 10%; bottom: 10%; border-radius: 8px; background: rgba(255,255,255,.08); }
.yu-res-big { position: absolute; right: 8px; bottom: 6px; font-family: var(--yu-font); font-size: 26px; font-weight: 700; color: var(--yu-gold); text-shadow: 0 3px 0 var(--yu-ink); opacity: 0; transition: opacity .2s, transform .2s; transform: scale(.6); pointer-events: none; }
.yu-res-big.on { opacity: 1; transform: scale(1); }
.yu-res-big.r4, .yu-res-big.r5 { color: #ff8a3d; font-size: 32px; }
.yu-res-big.rb { color: #9ec9ff; }
.yu-ctl-r { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.yu-pending { display: flex; gap: 6px; flex-wrap: wrap; min-height: 36px; align-items: center; }
.yu-pending:empty::before { content: "던진 결과가 여기에 쌓여요"; font-size: 12px; color: var(--yu-muted); }
.yu-res { font-family: var(--yu-font); font-weight: 700; font-size: 16px; padding: 6px 12px; background: var(--yu-cream); color: var(--yu-ink); border: 0; box-shadow: 0 0 0 2px var(--yu-ink); cursor: pointer; min-width: 46px; }
.yu-res.on { background: var(--yu-gold); box-shadow: 0 0 0 3px var(--yu-ink), 0 0 10px rgba(242,194,48,.7); transform: translateY(-2px); }
.yu-res.r4, .yu-res.r5 { color: #c2410c; }
.yu-res.rb { color: #2563eb; }
.yu-res.steal::after { content: " 🦹"; font-size: 12px; }
.yu-res:disabled { cursor: default; }
.yu-res.tgt { box-shadow: 0 0 0 3px #ff6b6b; }
.yu-ctl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.yu-btn.throw { font-size: 18px; padding: 12px 22px; }
.yu-btn.throw.pulse { animation: yuPulse 1.2s ease-in-out infinite; }
@keyframes yuPulse { 50% { box-shadow: 0 0 0 3px var(--yu-ink), 0 0 0 7px rgba(242,194,48,.45), 0 4px 0 3px rgba(0,0,0,.35); } }
.yu-target { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; background: var(--yu-ink); padding: 8px 12px; box-shadow: 0 0 0 2px var(--yu-gold); font-family: var(--yu-font); font-size: 14px; width: min(100%, 640px); box-sizing: border-box; }
.yu-target-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.yu-target-opts button { font-family: var(--yu-font); font-weight: 700; padding: 6px 10px; border: 0; background: var(--yu-cream); cursor: pointer; box-shadow: 0 0 0 2px var(--yu-gold); }

/* ---------- 오른쪽 ---------- */
.yu-right { display: flex; flex-direction: column; gap: 12px; }
.yu-my-augs { display: flex; flex-direction: column; gap: 6px; }
.yu-my-augs:empty::before { content: "아직 고른 증강이 없어요"; font-size: 13px; color: var(--yu-muted); }
.yu-aug { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 7px 8px; background: #fff; border: 0; box-shadow: 0 0 0 2px rgba(35,26,43,.18); font-family: var(--yu-body); color: var(--yu-ink); width: 100%; box-sizing: border-box; }
.yu-aug .ic { font-size: 22px; line-height: 1; flex: none; width: 28px; text-align: center; }
.yu-aug .tx { flex: 1; min-width: 0; }
.yu-aug .tx b { display: block; font-family: var(--yu-font); font-size: 13px; }
.yu-aug .tx small { display: block; font-size: 11.5px; color: #6b5f55; line-height: 1.35; }
.yu-aug .ch { font-family: var(--yu-font); font-size: 11px; background: var(--yu-ink); color: var(--yu-cream); padding: 2px 5px; flex: none; }
.yu-aug.usable { cursor: pointer; box-shadow: 0 0 0 2px var(--yu-gold); background: #fffbea; }
.yu-aug.usable:hover { filter: brightness(1.03); transform: translateY(-1px); }
.yu-aug.armed { background: #fff0b3; box-shadow: 0 0 0 3px var(--yu-gold), 0 0 12px rgba(242,194,48,.6); }
.yu-aug.spent { opacity: .45; }
.yu-aug.r-rare { border-left: 5px solid #3d7fe0; } .yu-aug.r-epic { border-left: 5px solid #9a5fe0; } .yu-aug.r-legend { border-left: 5px solid #e8a417; } .yu-aug.r-common { border-left: 5px solid #9aa0a6; }
.yu-log { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.yu-log li { padding: 3px 4px; border-bottom: 1px dashed rgba(35,26,43,.12); line-height: 1.4; }
.yu-log li .who { font-weight: 700; color: var(--tc, inherit); }
.yu-log li.cap { background: #ffe9e4; } .yu-log li.aug { background: #f3ecff; } .yu-log li.fin { background: #e4f7ee; }

/* ---------- 모달 ---------- */
.yu-modal { position: fixed; inset: 0; z-index: 80; background: rgba(20,14,26,.72); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.yu-modal[hidden] { display: none; }
.yu-pick { width: min(100%, 860px); background: var(--yu-night, #2b2236); box-shadow: 0 0 0 4px var(--yu-ink), 0 0 0 7px var(--yu-gold); padding: 18px; color: var(--yu-cream); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.yu-pick-head { text-align: center; }
.yu-pick-title { font-family: var(--yu-font); font-size: 24px; font-weight: 700; color: var(--yu-gold); }
.yu-pick-sub { font-size: 14px; margin-top: 4px; color: #d9cfc0; }
.yu-pick-bar { height: 6px; background: rgba(255,255,255,.12); margin: 12px auto 0; max-width: 420px; }
.yu-pick-bar i { display: block; height: 100%; background: var(--yu-gold); width: 100%; transition: width .25s linear; }
.yu-pick-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.yu-card { position: relative; text-align: left; background: var(--yu-paper); color: var(--yu-ink); border: 0; padding: 16px 14px 14px; cursor: pointer; box-shadow: 0 0 0 3px var(--yu-ink), 0 6px 0 3px rgba(0,0,0,.4); display: flex; flex-direction: column; gap: 8px; font-family: var(--yu-body); animation: yuDeal .45s cubic-bezier(.2,.9,.3,1.2) both; transition: transform .12s; }
.yu-card:nth-child(2) { animation-delay: .08s; } .yu-card:nth-child(3) { animation-delay: .16s; }
.yu-card:hover, .yu-card:focus-visible { transform: translateY(-6px); outline: none; }
.yu-card .rar { font-family: var(--yu-font); font-size: 11px; padding: 2px 7px; align-self: flex-start; color: #fff; background: #8b8f94; }
.yu-card.r-rare .rar { background: #3d7fe0; } .yu-card.r-epic .rar { background: #9a5fe0; } .yu-card.r-legend .rar { background: linear-gradient(90deg, #e8a417, #ef7a2e); }
.yu-card.r-rare { box-shadow: 0 0 0 3px #3d7fe0, 0 0 0 6px var(--yu-ink), 0 6px 0 6px rgba(0,0,0,.4); }
.yu-card.r-epic { box-shadow: 0 0 0 3px #9a5fe0, 0 0 0 6px var(--yu-ink), 0 0 22px rgba(154,95,224,.6); }
.yu-card.r-legend { box-shadow: 0 0 0 3px #f2c230, 0 0 0 6px var(--yu-ink), 0 0 28px rgba(242,194,48,.75); background: linear-gradient(160deg, #fff8dc, var(--yu-paper)); }
.yu-card .ic { font-size: 40px; line-height: 1; }
.yu-card .nm { font-family: var(--yu-font); font-size: 17px; font-weight: 700; }
.yu-card dl { margin: 0; font-size: 13px; line-height: 1.45; display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; }
.yu-card dt { color: var(--yu-muted); font-family: var(--yu-font); font-size: 11px; padding-top: 2px; }
.yu-card dd { margin: 0; }
.yu-card .kind { font-family: var(--yu-font); font-size: 11px; color: #6b5f55; }
@keyframes yuDeal { from { opacity: 0; transform: translateY(40px) rotate(-4deg) scale(.9); } }
.yu-pick-foot { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.yu-pick-wait { text-align: center; padding: 22px 0; font-family: var(--yu-font); }
.yu-result { position: relative; width: min(100%, 780px); background: var(--yu-paper); color: var(--yu-ink); box-shadow: 0 0 0 4px var(--yu-ink), 0 0 0 8px var(--yu-gold); padding: 20px; max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.yu-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.yu-result-title { font-family: var(--yu-font); font-size: 28px; font-weight: 700; text-align: center; }
.yu-podium { display: flex; gap: 10px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.yu-pod { text-align: center; padding: 10px 14px; background: #fff; box-shadow: 0 0 0 3px var(--yu-ink); min-width: 120px; border-top: 8px solid var(--tc); }
.yu-pod.win { background: #fff4c7; transform: translateY(-6px); box-shadow: 0 0 0 3px var(--yu-ink), 0 0 0 6px var(--yu-gold); }
.yu-pod .rk { font-family: var(--yu-font); font-size: 22px; }
.yu-pod .nm { font-weight: 700; font-size: 14px; }
.yu-pod small { display: block; color: var(--yu-muted); font-size: 12px; }
.yu-res-table-wrap { overflow-x: auto; }
.yu-res-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yu-res-table th, .yu-res-table td { padding: 6px 8px; border-bottom: 1px dashed rgba(35,26,43,.2); text-align: center; white-space: nowrap; }
.yu-res-table th { font-family: var(--yu-font); font-size: 12px; color: var(--yu-muted); }
.yu-res-table td.nm { text-align: left; font-weight: 700; }
.yu-res-table .mvp { font-size: 12px; }
.yu-result-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.yu-dialog { background: var(--yu-paper); color: var(--yu-ink); padding: 18px; box-shadow: 0 0 0 4px var(--yu-ink); width: min(100%, 520px); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.yu-dialog.wide { width: min(100%, 860px); }
.yu-dialog h3 { font-family: var(--yu-font); margin: 0 0 12px; }
.yu-dialog-btns { display: flex; justify-content: center; margin-top: 14px; }
.yu-help-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.yu-help-tabs button { font-family: var(--yu-font); padding: 6px 12px; border: 0; background: #fff; box-shadow: 0 0 0 2px var(--yu-ink); cursor: pointer; }
.yu-help-tabs button.on { background: var(--yu-gold); }
.yu-help-body { font-size: 14px; line-height: 1.65; }
.yu-help-body h4 { font-family: var(--yu-font); margin: 14px 0 6px; }
.yu-help-body ul { padding-left: 18px; margin: 0; }
.yu-dex { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.yu-dex .yu-aug { cursor: default; }
.yu-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); }
.yu-toast { background: var(--yu-ink); color: var(--yu-cream); font-family: var(--yu-font); font-size: 14px; padding: 9px 14px; box-shadow: 0 0 0 2px var(--yu-gold); transition: opacity .3s, transform .3s; text-align: center; }
.yu-toast.warn { box-shadow: 0 0 0 2px var(--yu-red); }
.yu-toast.out { opacity: 0; transform: translateY(-8px); }
.yu-banner { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 90; pointer-events: none; font-family: var(--yu-font); text-align: center; background: var(--yu-ink); color: var(--yu-cream); padding: 14px 30px; box-shadow: 0 0 0 3px var(--yu-gold), 0 10px 30px rgba(0,0,0,.5); }
.yu-banner b { display: block; font-size: clamp(22px, 7vw, 30px); color: var(--yu-gold); }
.yu-banner span { font-size: 14px; }
.yu-banner.show { animation: yuBanner 1.6s ease forwards; }
.yu-banner.big b { font-size: clamp(26px, 8vw, 46px); }
.yu-banner { max-width: calc(100vw - 48px); box-sizing: border-box; }
.yu-banner.cap { box-shadow: 0 0 0 3px var(--yu-red), 0 10px 30px rgba(0,0,0,.5); }
.yu-banner.cap b { color: #ff8d7a; }
@keyframes yuBanner { 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: 1180px) {
  .yu-cols { grid-template-columns: 220px minmax(0, 1fr); }
  .yu-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .yu-lobby-grid { grid-template-columns: 1fr; }
  .yu-cols { grid-template-columns: minmax(0, 1fr); }
  .yu-left { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .yu-left .yu-team-h { grid-column: 1 / -1; }
  .yu-center { order: 1; }
  .yu-right { order: 3; grid-template-columns: 1fr; }
  .yu-board-wrap { width: min(100%, 560px); min-width: 0; }
  .yu-board { margin: 12px 0 22px; }
  .yu-pick-cards { grid-template-columns: 1fr; gap: 10px; }
  .yu-card { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .yu-card .ic { font-size: 30px; }
  .yu-card dl { flex-basis: 100%; }
  .yu-hud-l .yu-chip.mode { display: none; }
}
@media (max-width: 560px) {
  #yuApp { padding: 10px 10px 30px; }
  .yu-modes { grid-template-columns: 1fr; }
  .yu-controls { flex-direction: column; }
  .yu-mat { flex: none; height: 96px; width: 100%; }
  .yu-turnbox small { display: none; }
  .yu-turnbox b { font-size: 14px; }
  .yu-pl { padding: 7px 8px; border-left-width: 6px; }
  .yu-pl-nm { font-size: 13px; }
  .yu-pl-augs span { width: 21px; height: 21px; font-size: 13px; }
  .yu-icon { width: 36px; height: 36px; font-size: 17px; }
  .yu-team-cols { grid-template-columns: 1fr; }
  .yu-code-card { width: 100%; box-sizing: border-box; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .yu-pc, .yu-pc.movable, .yu-mark, .yu-card, .yu-btn.throw.pulse { animation: none !important; transition: none !important; }
}
