:root {
  --ink: #1f1b3a;
  --sky: #e6efff;
  --paper: #ffffff;
  --muted: #5d5a78;
  --line: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --p0: #ff5a5f; /* 빨강 */
  --p1: #3d7bff; /* 파랑 */
  --p2: #1fb978; /* 초록 */
  --p3: #ffc21a; /* 노랑 */
  --wait: #ff4d4f;
  --go: #19c26b;
  --display: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --body: system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --r: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--sky);
  background-image: radial-gradient(circle at 1px 1px, rgba(31, 27, 58, 0.09) 1.5px, transparent 0);
  background-size: 22px 22px;
  color: var(--ink);
  font: 16px/1.5 var(--body);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--p1); outline-offset: 3px; }

/* ── 버튼 ── */
.btn {
  appearance: none;
  border: var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 10px 18px;
  font-family: var(--display);
  font-size: 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.06s, box-shadow 0.06s;
}
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.big { width: 100%; padding: 14px; font-size: 22px; }
.btn.small { padding: 6px 12px; font-size: 15px; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; }
.btn.ghost { background: transparent; }
.btn.link { border: 0; box-shadow: none; background: none; text-decoration: underline; font-family: var(--body); font-size: 14px; color: var(--muted); }
.btn.on { background: var(--p2); color: #fff; }

/* ── 첫 화면 ── */
.home { max-width: 420px; margin: 0 auto; padding: 48px 16px 32px; }
.home-head { text-align: center; margin-bottom: 28px; }
.logo-cards { display: flex; justify-content: center; margin-bottom: 18px; }
.mini-card {
  width: 54px; height: 74px; border: var(--line); border-radius: 10px; box-shadow: var(--shadow);
  display: grid; place-items: center; font-family: var(--display); font-size: 28px; margin: 0 -6px;
}
.mini-card.c0 { background: var(--p3); transform: rotate(-12deg); }
.mini-card.c1 { background: var(--p1); color: #fff; transform: rotate(-4deg) translateY(-6px); }
.mini-card.c2 { background: var(--p0); color: #fff; transform: rotate(4deg) translateY(-6px); }
.mini-card.c3 { background: var(--p2); color: #fff; transform: rotate(12deg); }
.logo { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1.15; margin: 0; letter-spacing: -0.5px; }
.logo-pre { display: block; width: fit-content; margin: 0 auto 6px; padding: 2px 12px; font-size: 18px; letter-spacing: 1px; background: var(--p3); border: var(--line); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-3deg); }
.tagline { margin: 6px 0 0; color: var(--muted); }

.panel { background: var(--paper); border: var(--line); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink); padding: 20px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-family: var(--display); font-size: 17px; margin-bottom: 6px; }
input {
  width: 100%; border: var(--line); border-radius: 10px; padding: 11px 12px; background: #fff; font-size: 17px;
}
input:focus { outline: none; border-color: var(--p1); }
.or { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 10px; }
.join-row { display: flex; gap: 10px; }
.join-row .btn, .chat-form .btn { flex: none; white-space: nowrap; }
.join-row input { min-width: 0; }
.join-row input { font-family: var(--display); font-size: 22px; letter-spacing: 4px; text-transform: uppercase; text-align: center; }
.invite { text-align: center; }
.invite p { margin: 0 0 14px; font-size: 18px; }
.invite b { font-family: var(--display); font-size: 26px; letter-spacing: 3px; font-weight: 400; }

/* ── 방 ── */
.room { max-width: 1040px; margin: 0 auto; padding: 12px 16px 96px; }
.room-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ticket {
  border: var(--line); border-radius: 12px; background: var(--p3); box-shadow: var(--shadow); cursor: pointer;
  padding: 6px 20px 7px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; position: relative;
}
.ticket::before, .ticket::after {
  content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--sky);
  border: var(--line); top: 50%; translate: 0 -50%;
}
.ticket::before { left: -8px; border-left-color: transparent; border-top-color: transparent; rotate: -45deg; }
.ticket::after { right: -8px; border-right-color: transparent; border-bottom-color: transparent; rotate: -45deg; }
.ticket-label { font-size: 12px; font-family: var(--display); line-height: 1; }
.ticket-code { font-family: var(--display); font-size: 30px; letter-spacing: 5px; line-height: 1.15; }
.ticket-hint { font-size: 11px; color: var(--ink); opacity: 0.75; line-height: 1.2; }

.players { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.pl {
  background: var(--paper); border: var(--line); border-radius: 12px; padding: 8px 6px 6px; text-align: center;
  position: relative; min-height: 104px; box-shadow: 3px 3px 0 var(--ink);
}
.pl.empty { background: transparent; border-style: dashed; box-shadow: none; color: var(--muted); display: grid; place-items: center; font-size: 13px; }
.pl.off { opacity: 0.5; }
.pl.me { outline: 3px solid var(--p1); outline-offset: 2px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; border: var(--line); margin: 0 auto 4px; display: grid; place-items: center;
  font-family: var(--display); font-size: 20px; color: #fff;
}
.col0 { background: var(--p0); } .col1 { background: var(--p1); } .col2 { background: var(--p2); } .col3 { background: var(--p3); color: var(--ink); }
.pl-nick { font-family: var(--display); font-size: 16px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tag { font-size: 12px; color: var(--muted); }
.pl-tag.ok { color: var(--p2); font-weight: 700; }
.pl-score { font-family: var(--display); font-size: 20px; }
.crown { position: absolute; top: -12px; left: 50%; translate: -50% 0; font-size: 18px; }
.bubble {
  position: absolute; top: -26px; right: -4px; font-size: 30px; pointer-events: none;
  animation: pop 2s ease-out forwards;
}
@keyframes pop {
  0% { transform: scale(0.3) translateY(10px); opacity: 0; }
  15% { transform: scale(1.2); opacity: 1; }
  25% { transform: scale(1); }
  80% { opacity: 1; }
  100% { transform: translateY(-24px); opacity: 0; }
}

.room-body { display: grid; gap: 14px; }
.stage { background: var(--paper); border: var(--line); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink); padding: 18px; min-height: 320px; }
.stage h2 { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 0 0 4px; }
.stage .sub { color: var(--muted); margin: 0 0 16px; }

/* 게임 고르기 */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.gcard {
  border: var(--line); border-radius: 12px; background: #fff; padding: 12px; text-align: left; cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); min-height: 92px; display: flex; flex-direction: column; gap: 4px;
}
.gcard .gicon { font-size: 26px; line-height: 1; }
.gcard .gname { font-family: var(--display); font-size: 18px; }
.gcard .gdesc { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.gcard.sel { background: var(--p3); }
.gcard:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; border-style: dashed; }
.start-row { display: grid; gap: 8px; }
.hint { font-size: 14px; color: var(--muted); text-align: center; margin: 0; }

/* 번개 탭 */
.lt { margin: -18px; border-radius: calc(var(--r) - 3px); min-height: 360px; display: grid; place-items: center; text-align: center; padding: 24px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.lt.wait { background: var(--wait); color: #fff; cursor: pointer; }
.lt.go { background: var(--go); color: #fff; cursor: pointer; }
.lt.flash { animation: flash 0.18s ease-out; }
@keyframes flash { from { filter: brightness(1.6); } to { filter: none; } }
.lt-big { font-family: var(--display); font-size: clamp(44px, 12vw, 84px); line-height: 1.05; margin: 0; }
.lt-small { font-size: 17px; margin: 10px 0 0; opacity: 0.95; }
.lt-round { font-family: var(--display); font-size: 18px; margin-bottom: 8px; opacity: 0.9; }
.lt-me { font-family: var(--display); font-size: 30px; margin-top: 12px; background: rgba(0,0,0,0.18); border-radius: 10px; padding: 4px 14px; display: inline-block; }
.rules { list-style: none; padding: 0; margin: 16px auto; text-align: left; max-width: 330px; }
.rules li { padding: 8px 0 8px 34px; position: relative; font-size: 16px; }
.rules li span { position: absolute; left: 0; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; border: 2px solid var(--ink); }
.count { font-family: var(--display); font-size: 48px; }

.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table td { padding: 8px 6px; border-bottom: 2px dashed rgba(31, 27, 58, 0.15); }
.table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.table .who { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 17px; }
.dotc { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); flex: none; }
.plus { color: var(--p2); font-weight: 700; } .minus { color: var(--p0); font-weight: 700; }

/* 결과 */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin: 18px 0 10px; }
.pod { text-align: center; width: 92px; }
.pod .avatar { width: 48px; height: 48px; }
.pod-nick { font-family: var(--display); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-block { border: var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--paper); font-family: var(--display); font-size: 26px; display: grid; place-items: center; }
.pod.r1 .pod-block { height: 96px; background: var(--p3); }
.pod.r2 .pod-block { height: 68px; }
.pod.r3 .pod-block { height: 48px; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row .btn { flex: 1; }

/* 채팅 */
.chat { background: var(--paper); border: var(--line); border-radius: var(--r); box-shadow: 4px 4px 0 var(--ink); display: flex; flex-direction: column; min-height: 260px; max-height: 420px; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 12px; font-size: 14.5px; }
.chat-log p { margin: 0 0 6px; word-break: break-word; }
.chat-log .sys { color: var(--muted); font-size: 13px; text-align: center; }
.chat-log .who { font-weight: 700; margin-right: 6px; }
.chat-log .sp-who { color: #6b6880; }
.emoji-bar { display: flex; justify-content: space-between; padding: 4px 8px; border-top: 2px solid rgba(31,27,58,0.12); }
.emoji-bar button { border: 0; background: none; font-size: 24px; padding: 4px 6px; cursor: pointer; border-radius: 8px; }
.emoji-bar button:active { transform: scale(1.25); }
.chat-form { display: flex; gap: 8px; padding: 8px; border-top: var(--line); }
.chat-form input { padding: 8px 10px; font-size: 16px; border-width: 2px; min-width: 0; }
/* 📱 게임 중(폰): 채팅은 마지막 3줄만 · 펼치기 */
.chat-size { display: none; }
@media (max-width: 899px) {
  .room.compact-chat:not(.playing) .chat { min-height: 0; }
  .room.compact-chat:not(.playing) .chat-size { display: block; align-self: flex-end; margin: 6px 8px 2px; border: 2px solid var(--ink); border-radius: 99px; background: var(--p3); font: 13px var(--display); padding: 2px 12px; cursor: pointer; }
  .room.compact-chat:not(.playing):not(.chat-big) .chat-log { flex: none; max-height: 78px; }
  .room.compact-chat:not(.playing):not(.chat-big) .emoji-bar { display: none; }
}
.chat-toggle {
  display: none; position: fixed; right: 16px; bottom: 16px; width: 58px; height: 58px; border-radius: 50%;
  border: var(--line); background: var(--p3); box-shadow: var(--shadow); font-size: 26px; cursor: pointer; z-index: 20;
}
.chat-toggle .dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--p0); border: 2px solid var(--ink); }

/* 게임 중 모바일: 채팅은 접어두기 */
@media (max-width: 899px) {
  .room.playing .chat-toggle { display: block; }
  .room.playing .chat { display: none; position: fixed; left: 12px; right: 12px; bottom: 86px; z-index: 19; max-height: 55dvh; }
  .room.playing.chat-open .chat { display: flex; }
}
@media (min-width: 900px) {
  .room-body { grid-template-columns: 1fr 320px; align-items: start; }
  .chat { position: sticky; top: 12px; max-height: calc(100dvh - 180px); min-height: 420px; }
  .players { max-width: 720px; }
}
@media (max-width: 380px) {
  .pl-nick { font-size: 14px; }
  .ticket-code { font-size: 26px; letter-spacing: 3px; }
}

/* 알림 */
.banner { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; text-align: center; padding: 8px 12px; font-size: 14px; }
.banner button { margin-left: 8px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 40; background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 15px; max-width: calc(100% - 32px); box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition: none !important; }
}

/* ── 미니게임 공통 ── */
.g-intro { text-align: center; padding: 8px 0; }
.lt-result h2, .oxr h2 { margin-bottom: 4px; }
.gcard.ro { cursor: default; box-shadow: none; border-width: 2px; }
.table tr.th td { font-size: 12.5px; color: var(--muted); padding-bottom: 2px; }
.tbar { height: 10px; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; background: #fff; margin: 14px auto; max-width: 420px; }
.tbar i { display: block; height: 100%; background: var(--p3); transform-origin: left; animation: shrink linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.cat-tag { display: inline-block; font-family: var(--body); font-size: 12px; border: 2px solid var(--ink); border-radius: 99px; padding: 0 8px; margin-left: 6px; vertical-align: 2px; background: #fff; }
.q-text { font-family: var(--display); font-size: clamp(24px, 5.5vw, 32px); line-height: 1.3; margin: 10px 0 0; text-align: center; word-break: keep-all; }
.q-small { color: var(--muted); text-align: center; margin: 4px 0 8px; word-break: keep-all; }
.s10, .oxq, .oxr, .mem, .nun { text-align: center; }

/* 10초 스톱 */
.s10-target { font-family: var(--display); font-size: 30px; margin: 18px 0 4px; }
.s10-target b { font-weight: 400; font-size: 64px; display: block; line-height: 1; }
.s10-clock { font-family: var(--display); font-size: clamp(72px, 22vw, 120px); line-height: 1.1; margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
.s10-clock.hidden { color: var(--muted); animation: pulse 1s ease-in-out infinite; }
.s10-clock.stopped { color: var(--p1); }
@keyframes pulse { 50% { opacity: 0.35; } }
.stop-btn {
  width: min(260px, 80%); aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--ink); background: var(--p0); color: #fff;
  font-family: var(--display); font-size: 48px; box-shadow: 6px 6px 0 var(--ink); cursor: pointer; margin: 8px auto 0; display: block;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.stop-btn:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.stop-btn:disabled { background: #b9b7c9; box-shadow: none; }

/* OX 퀴즈 */
.ox-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.ox-btn {
  aspect-ratio: 1 / 0.8; border: var(--line); border-radius: 18px; background: #fff; box-shadow: 5px 5px 0 var(--ink);
  font-family: var(--display); font-size: clamp(64px, 18vw, 110px); line-height: 1; cursor: pointer; touch-action: manipulation;
}
.ox-btn.o { color: var(--p1); }
.ox-btn.x { color: var(--p0); }
.ox-btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.ox-btn:disabled { opacity: 0.35; box-shadow: none; }
.ox-btn.picked { opacity: 1; background: var(--p3); }
.answer { display: inline-block; font-family: var(--display); font-size: 40px; border: var(--line); border-radius: 14px; padding: 2px 22px; margin: 4px 0 8px; color: #fff; box-shadow: var(--shadow); }
.answer.o { background: var(--p1); }
.answer.x { background: var(--p0); }
.why { margin: 4px auto 10px; max-width: 460px; word-break: keep-all; }

/* 숫자 기억하기 */
.digits { font-family: var(--display); font-size: clamp(36px, 10vw, 56px); letter-spacing: 6px; margin: 16px 0 6px; font-variant-numeric: tabular-nums; word-break: break-all; }
.digits.big { font-size: clamp(44px, 13vw, 72px); }
.digits.typed { border-bottom: 3px dashed var(--ink); display: inline-block; min-width: 60%; }
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; margin: 8px auto 0; }
.numpad button {
  border: var(--line); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--ink); font-family: var(--display);
  font-size: 26px; padding: 10px 0; cursor: pointer; touch-action: manipulation;
}
.numpad button:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.numpad button.ok { background: var(--ink); color: #fff; font-size: 20px; }
.numpad button:disabled { opacity: 0.4; box-shadow: none; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 1px; }

/* 눈치 숫자 */
.pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 340px; margin: 8px auto 0; }
.pick {
  aspect-ratio: 1; border: var(--line); border-radius: 14px; background: #fff; box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display); font-size: 40px; cursor: pointer; touch-action: manipulation;
}
.pick:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.pick:disabled { opacity: 0.35; box-shadow: none; }
.pick.picked { opacity: 1; background: var(--p3); }
.reveal-row { display: flex; justify-content: center; gap: 10px; margin: 18px 0 10px; flex-wrap: wrap; }
.rcard { width: 78px; text-align: center; }
.rnum {
  width: 70px; height: 92px; margin: 0 auto 4px; border: var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink);
  display: grid; place-items: center; font-family: var(--display); font-size: 46px; color: #fff;
  animation: flip 0.45s ease-out both;
}
.rcard:nth-child(2) .rnum { animation-delay: 0.1s; } .rcard:nth-child(3) .rnum { animation-delay: 0.2s; } .rcard:nth-child(4) .rnum { animation-delay: 0.3s; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: none; } }
.rcard.dup .rnum { opacity: 0.4; text-decoration: line-through; }
.rcard.win .rnum { outline: 4px solid var(--p3); outline-offset: 3px; }
.rname { font-family: var(--display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rnote { font-size: 13px; color: var(--muted); min-height: 1.4em; }
.rcard.win .rnote { color: var(--p2); font-weight: 700; }
.verdict { font-family: var(--display); font-size: 22px; margin: 6px 0; }
.verdict b { font-weight: 400; color: var(--p2); }

/* 결과 표 */
.table td.n, .table td.rk { white-space: nowrap; }
.result-table td.rk { font-family: var(--display); font-size: 17px; width: 44px; }
.result-table .detail { display: block; font-size: 12.5px; color: var(--muted); margin: 2px 0 0 22px; }

/* 업데이트 예정 게임 카드 */
.gcard.soon { position: relative; cursor: not-allowed; box-shadow: none; border-style: dashed; border-width: 2px; background: #f4f6fb; }
.gcard.soon .gicon, .gcard.soon .gname, .gcard.soon .gdesc { opacity: 0.45; }
.soon-tag {
  position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; background: var(--ink); color: #fff;
  border-radius: 99px; padding: 2px 8px;
}

/* 내보내기 (방장만, 대기실에서) */
.kick {
  margin-top: 4px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font-size: 11.5px;
  padding: 2px 6px; cursor: pointer; color: var(--muted); max-width: 100%; white-space: nowrap;
}
.kick:hover { color: var(--ink); }
.kick.armed { background: var(--p0); color: #fff; font-weight: 700; }

/* 방장 설정 (OX 난이도) */
.opt-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: -4px 0 16px; padding: 10px 12px; border: 2px dashed rgba(31, 27, 58, 0.25); border-radius: 12px; }
.opt-label { font-family: var(--display); font-size: 17px; }
.opt-hint { font-size: 12.5px; color: var(--muted); }
.seg { display: inline-flex; border: var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 16px; font-family: var(--display); font-size: 16px; cursor: pointer; }
.seg button + button { border-left: var(--line); }
.seg button.on { background: var(--ink); color: #fff; }
.seg button:disabled { cursor: default; opacity: 1; color: #8a8a99; }
.seg button.on:disabled { color: #fff; }
.opt-note { margin: -6px 0 14px; }
.pick.locked { position: relative; opacity: 1; background: #ececf3; color: #a6a3b8; border-style: dashed; box-shadow: none; }
.pick .lock { position: absolute; top: 4px; right: 6px; font-size: 16px; }

/* ── 카드 모드 ── */
.rules.mini { max-width: none; margin: 4px 0 14px; }
.rules.mini li { font-size: 15px; padding: 6px 0 6px 34px; }
.deck-title { font-family: var(--display); font-weight: 400; font-size: 17px; margin: 0 0 8px; }
.opt-row .seg button { white-space: nowrap; }

.cardtable { display: grid; gap: 12px; }
.ct-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ct-head h2 { margin: 0; white-space: nowrap; }
.ct-target { white-space: nowrap; flex: none; }
.ct-target { font-family: var(--display); font-size: 17px; background: var(--p3); border: var(--line); border-radius: 99px; padding: 2px 12px; box-shadow: 2px 2px 0 var(--ink); }
.ct-target b { font-size: 20px; }

.scoreboard { display: grid; gap: 8px; }
.sb-row { display: grid; grid-template-columns: minmax(70px, 110px) 1fr auto auto; align-items: center; gap: 8px 10px; padding: 6px 8px; border: 2px solid transparent; border-radius: 12px; }
.sb-row.turn { border-color: var(--ink); background: #fff7d6; box-shadow: 3px 3px 0 var(--ink); }
.sb-row.win { background: #dff7e9; border-color: var(--p2); }
.sb-row .who { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 16px; min-width: 0; }
.sb-row .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-bar { height: 14px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.sb-bar i { display: block; height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.sb-pts { font-family: var(--display); font-size: 20px; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.sb-pts small { font-size: 12px; color: var(--muted); font-family: var(--body); }
.backs { display: inline-flex; gap: 2px; min-width: 44px; justify-content: flex-end; }
.cb { width: 10px; height: 15px; border: 2px solid var(--ink); border-radius: 3px; background: repeating-linear-gradient(45deg, var(--p1) 0 3px, #fff 3px 6px); }

.ct-status { margin: 0; text-align: center; font-size: 16px; }
.ct-status.mine { font-size: 17px; background: var(--p3); border: var(--line); border-radius: 12px; padding: 8px 10px; box-shadow: 3px 3px 0 var(--ink); }
.hand-title { font-family: var(--display); font-weight: 400; font-size: 17px; margin: 4px 0 0; }
.hand-title small { color: var(--muted); font-family: var(--body); font-size: 13px; }

.hand { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.hcard {
  display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 8px 12px; cursor: pointer;
  border: var(--line); border-radius: 14px; box-shadow: var(--shadow); font-family: var(--body); color: var(--ink);
  background: #fff; transition: transform 0.12s;
}
.hcard .hc-icon { font-size: 34px; line-height: 1; }
.hcard .hc-name { font-family: var(--display); font-size: 18px; }
.hcard .hc-desc { font-size: 12px; color: rgba(31, 27, 58, 0.75); line-height: 1.3; }
.hcard:disabled { cursor: default; box-shadow: 2px 2px 0 var(--ink); opacity: 0.85; }
.hcard:not(:disabled):hover { transform: translateY(-3px); }
.hcard.sel { transform: translateY(-8px) rotate(-1.5deg); outline: 4px solid var(--ink); outline-offset: 2px; }
.hcard.g-lightning { background: #ffe27a; }
.hcard.g-stop10 { background: #a9c8ff; }
.hcard.g-ox { background: #ffb1b3; }
.hcard.g-memory { background: #9fe6c2; }
.hcard.g-nunchi { background: #d6c2ff; }

.ct-actions { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; }
.ct-actions .btn { padding: 12px 8px; font-size: 18px; }

.cardtable.round .rd-title { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0; }
.cardtable.round .sub { margin: 0; }
.rd-note { margin: 4px 0 0; text-align: center; font-size: 16px; }
.cardtable.over { text-align: center; }
.cardtable.over .ct-head { text-align: left; }
.ct-trophy { font-size: 54px; line-height: 1; }
.ct-win { margin: 0; font-family: var(--display); font-size: 26px; }
.cardtable.over .scoreboard { text-align: left; }

@media (max-width: 480px) {
  .sb-row { grid-template-columns: minmax(60px, 90px) 1fr auto; }
  .sb-row .backs { display: none; }
  .hand { grid-template-columns: repeat(2, 1fr); }
}
.cardtable .tbar { width: 100%; margin: 2px auto; }

/* ── 혼자 연습 ── */
.gbest { font-size: 12px; font-weight: 700; color: #8a5a00; }
.gbest.dim { color: var(--muted); font-weight: 400; }
.solo-box { text-align: center; margin: 14px 0 10px; padding: 18px 12px; border: var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.solo-box.new { background: #fff3c4; }
.solo-label { font-size: 13px; color: var(--muted); }
.solo-value { font-family: var(--display); font-size: 34px; line-height: 1.2; margin: 4px 0; }
.solo-flag { font-family: var(--display); font-size: 20px; color: var(--p0); }
.solo-prev { font-size: 14px; color: var(--muted); min-height: 1.2em; }

/* ── 릴레이 / 랭킹 ── */
.relay-entry { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 12px; }
.btn.relay { background: #ffe27a; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.btn.relay small { font-family: var(--body); font-size: 13px; color: var(--muted); }
.solo-room .chat, .solo-relay .chat, .solo-relay .chat-toggle, .solo-relay .ticket { display: none; }
.solo-relay .room-body { grid-template-columns: 1fr; }
.relay-head { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 20px; margin-bottom: 4px; }
.relay-total small, .solo-value small { font-size: 0.6em; color: var(--muted); }
.relay-dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0; }
.relay-dots i { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; }
.relay-dots i.done { background: var(--go); }
.relay-dots i.cur { background: var(--p3); }
.relay-next { text-align: center; }
.modal { position: fixed; inset: 0; background: rgba(31, 27, 58, 0.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal[hidden] { display: none; }
.modal-box { width: min(440px, 100%); max-height: 88vh; overflow: auto; }
.modal-box h2 { font-family: var(--display); font-weight: 400; margin: 0 0 10px; }
.rank-tabs { margin-bottom: 8px; }
.relay-submit { margin-top: 12px; }
.rank-table td.n small { color: var(--muted); }
.rank-table tr.mine td { background: #fff3c4; }
.solo-relay .pl.empty { display: none; }
.solo-relay .players { grid-template-columns: minmax(0, 160px); justify-content: center; }
.solo-relay .btn-row { flex-wrap: wrap; }
.solo-relay .btn-row .btn { white-space: nowrap; }

/* ── 새 미니게임 5종 ── */
.qz, .ord, .tap-wrap { text-align: center; }
.qz-ans { display: inline-block; font-family: var(--display); font-size: 28px; border: var(--line); border-radius: 14px; padding: 4px 20px; margin: 6px 0 10px; background: #fff; box-shadow: var(--shadow); }
.qz-ans small { font-family: var(--body); font-size: 14px; color: var(--muted); }
.choice4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.ch-btn { font-family: var(--display); font-size: 30px; padding: 16px 8px; border: var(--line); border-radius: 16px; background: #fff; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; color: var(--ink); touch-action: manipulation; }
.ch-btn:disabled { opacity: 0.45; box-shadow: none; }
.ch-btn.picked { opacity: 1; background: var(--p3); }
.mt-q { font-family: var(--display); font-size: clamp(40px, 11vw, 64px); margin: 8px 0 4px; }
.sp-word { font-family: var(--display); font-size: clamp(56px, 16vw, 92px); margin: 6px 0 0; line-height: 1.1; -webkit-text-stroke: 1px var(--ink); }
.spot-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; max-width: 420px; margin: 10px auto 0; }
.spot-cell { aspect-ratio: 1; font-size: clamp(20px, calc(70vw / var(--n)), 44px); line-height: 1; border: 2px solid var(--ink); border-radius: 10px; background: #fff; cursor: pointer; padding: 0; touch-action: manipulation; }
.spot-cell:disabled { opacity: 0.55; }
.spot-cell.picked { opacity: 1; background: var(--p3); }
.spot-ans { font-size: 40px; }
.tap-btn { width: min(260px, 72vw); aspect-ratio: 1; border-radius: 50%; border: var(--line); background: #b9b7c9; box-shadow: 6px 6px 0 var(--ink); margin: 14px auto 0; display: grid; place-content: center; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; color: var(--ink); }
.tap-btn.on { background: var(--p0); color: #fff; }
.tap-btn.hit { animation: tapHit 0.08s ease-out; }
@keyframes tapHit { from { transform: scale(0.94); } to { transform: none; } }
.tap-n { font-family: var(--display); font-size: clamp(56px, 16vw, 84px); line-height: 1; }
.tap-l { font-family: var(--display); font-size: 20px; }
.ord-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ord-next { font-family: var(--display); font-size: 22px; }
.ord-time { font-family: var(--display); font-size: 18px; color: var(--muted); min-width: 64px; text-align: right; }
.ord-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 400px; margin: 10px auto 0; }
.ord-cell { aspect-ratio: 1; font-family: var(--display); font-size: clamp(24px, 7vw, 34px); border: var(--line); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; touch-action: manipulation; color: var(--ink); }
.ord-cell.done { background: var(--go); color: #fff; box-shadow: none; opacity: 0.5; }
.ord-cell.miss { animation: shake 0.25s; background: #ffd6d6; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ── 효과음 버튼 · 연출 ── */
.bar-btns { display: flex; gap: 8px; align-items: center; }
.sfx-btn { font-size: 18px; padding: 4px 10px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 90; }
.confetti i { position: absolute; top: -16px; width: 10px; height: 14px; border-radius: 2px; animation: confettiFall linear forwards; }
@keyframes confettiFall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); opacity: 0.9; } }
.screen-flash { position: fixed; inset: 0; pointer-events: none; z-index: 80; border: 10px solid; animation: sflash 0.55s ease-out forwards; }
.screen-flash.good { border-color: var(--go); }
.screen-flash.bad { border-color: var(--wait); }
@keyframes sflash { from { opacity: 0.9; } to { opacity: 0; } }
.big-pop { position: fixed; left: 50%; top: 40%; z-index: 95; pointer-events: none; font-family: var(--display); font-size: clamp(44px, 12vw, 80px); color: var(--ink); background: var(--p3); border: var(--line); border-radius: 22px; padding: 6px 26px; box-shadow: 6px 6px 0 var(--ink); transform: translate(-50%, -50%); animation: bigPop 1.25s ease-out forwards; white-space: nowrap; }
@keyframes bigPop { 0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } 20% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 35% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .big-pop { animation-duration: 0.01s; } }

/* ── 버전 2 메뉴: 모드 버튼 · 장르 탭 · 새 소식 ── */
.modes { display: flex; flex-wrap: wrap; gap: 8px; }
.modes button { border: var(--line); border-radius: 10px; background: #fff; padding: 6px 12px; font-family: var(--display); font-size: 16px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.modes button.on { background: var(--ink); color: #fff; }
.modes button:disabled { cursor: default; box-shadow: none; color: #8a8a99; background: #f4f6fb; }
.modes button.on:disabled { background: var(--ink); color: #fff; }
.modes button.locked { border-style: dashed; border-width: 2px; box-shadow: none; background: #f4f6fb; color: rgba(31, 27, 58, 0.55); cursor: not-allowed; }
.modes button.locked small { font-family: var(--body); font-size: 11px; display: block; }
.genres { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; margin-bottom: 6px; }
.genres button { flex: none; border: 2px solid var(--ink); border-radius: 999px; background: #fff; padding: 4px 12px; font-family: var(--display); font-size: 15px; cursor: pointer; color: var(--ink); }
.genres button small { font-family: var(--body); font-size: 11px; color: var(--muted); }
.genres button.on { background: var(--p3); }
.news { margin-top: 18px; padding: 16px 18px; }
.news-head { font-family: var(--display); font-size: 19px; margin-bottom: 6px; }
.news-tag { display: inline-block; background: var(--p0); color: #fff; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 2px solid var(--ink); vertical-align: 2px; }
.news ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; }

/* ── 버전 2 문제형 7종 ── */
.ch-btn.txt { font-size: clamp(18px, 5vw, 24px); padding: 14px 6px; word-break: keep-all; }
.choice-col { display: grid; gap: 10px; margin-top: 10px; }
.ch-btn.wide { font-size: clamp(16px, 4.4vw, 20px); padding: 12px 10px; }
.cs-cat { margin: 6px 0 0; color: var(--muted); }
.cs-cat b { color: var(--ink); }
.cs-cho { font-family: var(--display); font-size: clamp(48px, 15vw, 80px); letter-spacing: 8px; margin: 2px 0 4px; line-height: 1.1; }
.cs-cho.small { font-size: clamp(30px, 9vw, 44px); letter-spacing: 6px; margin: 6px 0 2px; }
.flag-box { margin: 10px auto 0; width: min(240px, 64vw); aspect-ratio: 3 / 2; display: grid; place-items: center; }
.flag-box img { max-width: 100%; max-height: 100%; border: var(--line); border-radius: 8px; box-shadow: var(--shadow); background: #fff; }
.flag-mini { height: 28px; border: 2px solid var(--ink); border-radius: 4px; vertical-align: middle; }
.pv-front { font-family: var(--display); font-size: clamp(24px, 6.5vw, 32px); line-height: 1.35; margin: 12px 0 4px; word-break: keep-all; }
.pv-blank { color: var(--p1); letter-spacing: 2px; }
.pv-full { font-family: var(--display); font-size: 20px; margin: 4px 0; }
.ct-q { font-family: var(--display); font-size: 24px; margin: 6px 0; }
.ct-q .ct-target { font-size: 34px; vertical-align: -4px; }
.ct-field { position: relative; height: 210px; max-width: 420px; margin: 0 auto 6px; border: var(--line); border-radius: 14px; background: #fffdf3; overflow: hidden; }
.ct-field span { position: absolute; font-size: 30px; line-height: 1; }
.ct-field.gone span { display: none; }
.ct-field.gone::after { content: '❓'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 60px; }
.ar-row { font-size: clamp(40px, 12vw, 64px); margin: 18px 0 10px; letter-spacing: 4px; line-height: 1; }
.ar-row i { font-style: normal; display: inline-block; }
.ar-row i.mid { transform: scale(1.12); }
.ar-pad { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-areas: '. up .' 'left down right'; gap: 10px; max-width: 320px; margin: 0 auto; }
.ar-pad .ar-1 { grid-area: up; } .ar-pad .ar-0 { grid-area: left; } .ar-pad .ar-2 { grid-area: right; } .ar-pad .ar-3 { grid-area: down; }
.ar-pad .ch-btn { font-size: 34px; padding: 10px 0; }
.pic-box { height: 170px; display: grid; place-items: center; overflow: hidden; }
.pic { font-size: 130px; line-height: 1; display: inline-block; animation: picClear linear forwards; }
@keyframes picClear { from { filter: blur(28px) saturate(0.3); transform: scale(1.6); } to { filter: none; transform: none; } }
.pic-ans { font-size: 30px; vertical-align: -4px; }
.sc-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 8px; max-width: min(360px, 46vh); margin: 12px auto 0; }
.sc-cell { aspect-ratio: 1; border: 3px solid var(--ink); border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.sc-cell.on { outline: 4px solid var(--ink); outline-offset: 2px; transform: scale(0.92); }
.sc-cell:disabled { cursor: default; }
.sc-dot { display: inline-block; width: 22px; height: 22px; border: 2px solid var(--ink); border-radius: 6px; vertical-align: -4px; margin-right: 2px; }

/* ── 👥 팀전 ── */
.new-tag { font-family: var(--body); font-size: 10px; background: var(--p0); color: #fff; border-radius: 999px; padding: 0 5px; vertical-align: 2px; }
.modes button.on .new-tag { background: var(--p3); color: var(--ink); }
.teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; margin: 4px 0 8px; }
.tvs { font-family: var(--display); font-size: 22px; align-self: center; }
.tcol { border: var(--line); border-radius: 14px; padding: 8px; min-height: 96px; display: flex; flex-direction: column; gap: 6px; }
.tcol.r { background: #ffe9ea; } .tcol.b { background: #e6eeff; }
.tcol h4 { margin: 0 0 2px; font-family: var(--display); font-weight: 400; font-size: 17px; }
.tcol h4 small { font-family: var(--body); font-size: 11px; background: var(--p3); border-radius: 999px; padding: 1px 6px; border: 1.5px solid var(--ink); }
.tchip { display: flex; justify-content: space-between; align-items: center; gap: 6px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; padding: 5px 9px; font-size: 15px; font-family: var(--body); color: var(--ink); cursor: pointer; text-align: left; }
span.tchip { cursor: default; }
.tchip span { color: var(--muted); font-size: 13px; }
.btn-row.tight { margin-top: 4px; gap: 6px; }
.btn-row.tight .btn { flex: 0 0 auto; }
.team-order { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; margin: 0 0 6px; }
.team-order span { background: #fff3c4; border: 1.5px solid var(--ink); border-radius: 8px; padding: 1px 7px; }
.pick-no { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--display); font-size: 14px; display: grid; place-items: center; }
.gcard { position: relative; }
.tscore { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 4px 0 12px; }
.ts { border: var(--line); border-radius: 14px; padding: 6px 10px; text-align: center; box-shadow: 3px 3px 0 var(--ink); }
.ts.r { background: #ffe0e1; } .ts.b { background: #dde8ff; }
.ts small { display: block; font-size: 12px; }
.ts b { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.1; }
.ts.win { outline: 4px solid var(--p3); }
.ts-mid { font-family: var(--display); font-size: 15px; text-align: center; }
.tdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.tdot.r { background: var(--p0); } .tdot.b { background: var(--p1); }
tr.tr-r td:first-child { box-shadow: inset 4px 0 0 var(--p0); } tr.tr-b td:first-child { box-shadow: inset 4px 0 0 var(--p1); }
.team-win { text-align: center; border: var(--line); border-radius: 16px; padding: 14px; margin: 6px 0; box-shadow: var(--shadow); background: #fff3c4; }
.team-win.r { background: #ffe0e1; } .team-win.b { background: #dde8ff; }
.tw-title { font-family: var(--display); font-size: 30px; margin: 0; }
.pl-tag.team-r { color: #c62828; } .pl-tag.team-b { color: #1d4ed8; }

/* ── 버전 2 액션 게임 ── */
/* 모바일: 게임 중 길게 누르기 메뉴·더블탭 확대 막기 */
.stage.playing { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: manipulation; }

/* 두더지 */
.mole { text-align: center; }
.mole-score { font-family: var(--display); font-size: 20px; margin: 8px 0; }
.mole-score b { font-size: 30px; font-weight: 400; }
.mole-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: min(340px, 44vh); margin: 0 auto; }
.mole-hole { aspect-ratio: 1; border: var(--line); border-radius: 50%; background: radial-gradient(circle at 50% 70%, #5b4636 0 45%, #8a6d55 46%); box-shadow: 3px 3px 0 var(--ink); cursor: pointer; touch-action: none; padding: 0; overflow: hidden; display: grid; place-items: center; }
.mole-hole span { font-size: clamp(34px, 11vw, 56px); line-height: 1; transform: translateY(70%); transition: transform 0.08s; pointer-events: none; }
.mole-hole.up span { transform: translateY(0); }
.mole-hole.hit { animation: mHit 0.25s; }
.mole-hole.boom { animation: mBoom 0.35s; }
@keyframes mHit { 50% { transform: scale(0.9); } }
@keyframes mBoom { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* 타이밍 바 */
.tm { text-align: center; }
.tm-bar { position: relative; height: 54px; border: var(--line); border-radius: 12px; margin: 16px 0; overflow: visible;
  background: linear-gradient(90deg, #ffd6d6, #fff3c4 35%, #c9f2dc 50%, #fff3c4 65%, #ffd6d6); }
.tm-zone { position: absolute; left: 40%; width: 20%; top: 0; bottom: 0; background: rgba(31, 185, 120, 0.25); }
.tm-perfect { position: absolute; left: calc(50% - var(--pf) / 2); width: var(--pf); top: 0; bottom: 0; background: var(--p3); border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.tm-needle { position: absolute; top: -10px; bottom: -10px; width: 6px; margin-left: -3px; background: var(--ink); border-radius: 3px; }
.tm-needle.stop { background: var(--p0); box-shadow: 0 0 0 3px #fff; }
.tm-mark { position: absolute; top: -8px; bottom: -8px; width: 8px; margin-left: -4px; border: 2px solid var(--ink); border-radius: 4px; }
.tm-btn { width: min(300px, 80vw); padding: 26px 0; font-family: var(--display); font-size: 32px; border: var(--line); border-radius: 18px; background: var(--p2); color: #fff; box-shadow: 5px 5px 0 var(--ink); cursor: pointer; touch-action: manipulation; }
.tm-btn:disabled { background: #b9b7c9; }

/* 탑 쌓기 */
.tw { text-align: center; }
.tw-head { font-family: var(--display); font-size: 22px; }
.tw-head b { font-size: 36px; font-weight: 400; }
.tw-area { position: relative; height: min(52vh, 380px); border: var(--line); border-radius: 12px; background: linear-gradient(#cfe2ff, #f3f7ff); overflow: hidden; cursor: pointer; touch-action: none; margin: 6px 0 10px; }
.tw-blk { position: absolute; height: 10%; border: 2px solid var(--ink); border-radius: 4px; display: block; }
.tw-blk.base { border-radius: 0; }
.tw-blk.mv { left: 0; }
.tw-blk.fall { animation: twFall 0.7s ease-in forwards; }
@keyframes twFall { to { transform: translateY(400%) rotate(25deg); opacity: 0; } }

/* 짝 맞추기 */
.pr { text-align: center; }
.pr-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 19px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.pr-head .count { font-size: 30px; }
.pr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 380px; margin: 0 auto; }
.pr-card { aspect-ratio: 1; border: var(--line); border-radius: 12px; background: var(--p1); box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; cursor: pointer; touch-action: manipulation; padding: 0; }
.pr-card span { font-size: clamp(26px, 9vw, 42px); visibility: hidden; }
.pr-card.up { background: #fff; }
.pr-card.up span { visibility: visible; }
.pr-card.got { background: #c9f2dc; box-shadow: none; transform: translate(2px, 2px); }

/* 치킨 버튼 */
.ck { text-align: center; }
.ck-meter { display: flex; justify-content: center; gap: 14px; align-items: baseline; font-family: var(--display); font-size: 34px; font-variant-numeric: tabular-nums; min-height: 50px; }
.ck-meter b { font-weight: 400; font-size: 24px; color: var(--p2); }
.ck-btn { --shake: 0px; width: min(220px, 60vw, 30vh); aspect-ratio: 1; border-radius: 50%; border: var(--line); background: #ffd0d0; box-shadow: 6px 6px 0 var(--ink); margin: 8px auto; display: grid; place-content: center; gap: 4px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; font-family: var(--display); font-size: 20px; color: var(--ink); }
.ck-ico { font-size: 54px; line-height: 1; }
.ck-btn.hold { background: var(--p0); color: #fff; transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.ck-btn.hold.run { animation: ckShake 0.12s infinite; }
@keyframes ckShake { 25% { translate: var(--shake) 0; } 75% { translate: calc(var(--shake) * -1) 0; } }
.ck-who { list-style: none; padding: 0; margin: 8px auto 0; max-width: 360px; text-align: left; }
.ck-who li { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-bottom: 2px dashed rgba(31, 27, 58, 0.15); }
.ck-who .who { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 16px; }
.ck-who li.on span { color: var(--p0); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .ck-btn.hold.run { animation: none; } }

/* ── 버전 2 차례형 ── */
.tbar.off { visibility: hidden; }
.table.small td { padding: 5px 6px; font-size: 14px; }
.table.small .who { font-size: 15px; }
.table tr.now td { background: #fff6cc; }

/* 복불복 상자 */
.lb { text-align: center; }
.lb-left { display: flex; justify-content: center; align-items: center; gap: 12px; font-size: 22px; margin: 2px 0 8px; flex-wrap: wrap; }
.lb-left span { display: inline-flex; align-items: baseline; gap: 2px; }
.lb-left b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.lb-left span.zero { opacity: 0.3; }
.lb-left small { color: var(--muted); font-size: 12px; width: 100%; margin-top: -6px; }
.lb-head { font-size: 17px; min-height: 26px; margin: 8px 0; }
.lb-head.me { color: var(--p1); font-family: var(--display); font-size: 20px; }
.lb-head.bad { color: var(--wait); }
.lb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 360px; margin: 0 auto 8px; }
.lb-box { position: relative; aspect-ratio: 1; border: var(--line); border-radius: 12px; background: var(--p3); box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; font-size: clamp(26px, 8vw, 38px); padding: 0; cursor: pointer; touch-action: manipulation; }
.lb-box:disabled { cursor: default; }
button.lb-box:not(:disabled) { animation: lbWiggle 1.6s ease-in-out infinite; }
.lb-box.pick { transform: scale(0.92); }
.lb-box.open { background: #fff; box-shadow: none; transform: translate(2px, 2px); }
.lb-box.open.k-bomb { background: #ffd6d6; }
.lb-box.open.k-gold { background: #fff3c4; }
.lb-box.open.k-star { background: #e9dcff; }
.lb-box.just { animation: lbOpen 0.45s ease-out; }
.lb-box .dotc { position: absolute; right: 4px; bottom: 4px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); }
@keyframes lbWiggle { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -5deg; } 95% { rotate: 5deg; } }
@keyframes lbOpen { 0% { transform: scale(0.5); } 70% { transform: scale(1.15); } 100% { transform: translate(2px, 2px); } }

/* 악어 */
.cr { text-align: center; }
.cr-head { font-size: 18px; min-height: 28px; margin: 8px 0; }
.cr-head.me { color: var(--p1); font-family: var(--display); font-size: 21px; }
.cr-head.bad { color: var(--wait); font-family: var(--display); font-size: 22px; }
.cr-mouth { max-width: 380px; margin: 0 auto 10px; }
.cr-jaw { background: #2fae5f; border: var(--line); padding: 10px 12px; position: relative; }
.cr-jaw.top { border-radius: 40px 40px 8px 8px; padding-top: 34px; transition: transform 0.15s ease-in; }
.cr-jaw.bottom { border-radius: 8px 8px 40px 40px; margin-top: 26px; background: #27985a; }
.cr-mouth.shut .cr-jaw.top { transform: translateY(30px); }
.cr-mouth.shut { animation: crShake 0.35s 0.15s; }
.cr-eyes { position: absolute; top: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 70px; }
.cr-eyes i { width: 18px; height: 18px; background: #fff; border: 3px solid var(--ink); border-radius: 50%; box-shadow: inset -5px 0 0 var(--ink); }
.cr-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cr-jaw.top .cr-row { transform: translateY(12px); }
.cr-jaw.bottom .cr-row { transform: translateY(-12px); }
.cr-tooth { aspect-ratio: 3 / 4; background: #fff; border: 3px solid var(--ink); padding: 0; cursor: pointer; touch-action: manipulation; display: block; }
.cr-jaw.top .cr-tooth { clip-path: polygon(0 0, 100% 0, 50% 100%); border-radius: 4px; }
.cr-jaw.bottom .cr-tooth { clip-path: polygon(50% 0, 100% 100%, 0 100%); border-radius: 4px; }
button.cr-tooth:hover { background: #fff6cc; }
.cr-tooth.down { background: #b9b7c9; opacity: 0.55; }
.cr-tooth.trap { background: var(--wait); opacity: 1; }
.cr-tooth.just:not(.trap) { background: var(--p2); opacity: 1; }
.cr-score { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.cr-score > span { display: inline-flex; align-items: center; gap: 4px; }
.cr-score .who { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 16px; }
.cr-score .out { opacity: 0.45; text-decoration: line-through; }
@keyframes crShake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }
@media (prefers-reduced-motion: reduce) { button.lb-box:not(:disabled), .cr-mouth.shut { animation: none; } }

/* ── 버전 2: 릴레이 시즌 · 명예의 전당 ── */
.season-box { margin-top: 12px; border: 2px dashed rgba(31, 27, 58, 0.35); border-radius: 12px; padding: 10px 12px; background: #fffbea; }
.season-box[hidden] { display: none; }
.season-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.season-head > b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.season-head span { color: var(--muted); }
.season-head span b { color: var(--ink); }
.season-games { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.season-games span { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px 2px 3px; font-size: 13px; white-space: nowrap; }
.season-games i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; }
.season-games small { color: var(--muted); font-size: 11px; }
.season-box .hint { text-align: left; margin-top: 4px; }
.rank-sub { font-family: var(--display); font-weight: 400; font-size: 19px; margin: 14px 0 4px; }
.rank-sub:first-child { margin-top: 0; }
.rank-sub small { font-family: var(--body); font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.season-list { margin: 6px 0; font-size: 14px; }
.season-list summary { cursor: pointer; color: var(--p1); }
.rank-table .detail { display: block; font-size: 12px; color: var(--muted); }
.btn-row.tight { flex-wrap: wrap; }
.gcard.out { opacity: 0.5; border-style: dashed; box-shadow: none; }
.deck-title small { font-family: var(--body); font-size: 13px; color: var(--muted); margin-left: 4px; }

/* ── 🕵️ 라이어 게임 ── */
.lr-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lr-head > span { font-family: var(--display); font-size: 18px; }
.lr-time { margin-left: 8px; background: var(--ink); color: #fff; border-radius: 999px; padding: 1px 10px; font-size: 15px; }
.lr-card { border: var(--line); border-radius: 14px; background: #fff6cc; box-shadow: 4px 4px 0 var(--ink); padding: 12px 14px; margin: 10px 0; text-align: center; display: grid; gap: 2px; }
.lr-card small { color: var(--muted); font-size: 14px; }
.lr-card b { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 9vw, 42px); line-height: 1.2; }
.lr-card span { font-size: 14px; color: var(--muted); }
.lr-card.liar { background: #2d2547; color: #fff; }
.lr-card.liar small, .lr-card.liar span { color: #d9d4f0; }
.lr-now { font-size: 17px; margin: 10px 0 8px; }
.lr-now.me { color: var(--p1); font-family: var(--display); font-size: 20px; }
.lr-now.bad { color: var(--wait); font-family: var(--display); font-size: 21px; }
.lr-now.tie { color: var(--wait); font-family: var(--display); font-size: 19px; }
.lr-form { display: flex; gap: 8px; margin-bottom: 10px; }
.lr-form input { flex: 1; min-width: 0; font-size: 17px; }
.lr-hints { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.lr-hints li { display: flex; gap: 10px; align-items: baseline; background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 6px 10px; }
.lr-hints li .who { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); white-space: nowrap; }
.lr-hints li > span:last-child { font-size: 16px; }
.lr-hints li.auto > span:last-child { color: var(--muted); font-style: italic; }
.lr-hints li.lap { background: none; border: 0; padding: 4px 0 0; font-size: 13px; color: var(--muted); font-family: var(--display); }
.lr-vote { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 8px 0; }
.lr-vote .btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; }
.lr-vote .btn .who { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; }
.lr-vote .btn small { font-family: var(--body); font-size: 12px; opacity: 0.75; }
.lr-result { border: var(--line); border-radius: 14px; padding: 10px 14px; text-align: center; margin: 8px 0; }
.lr-result.liar { background: #2d2547; color: #fff; }
.lr-result.citizen { background: #c9f2dc; }
.lr-result p { margin: 2px 0; }
.lr-score { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 8px 0; }
.lr-score > span { display: inline-flex; align-items: center; gap: 6px; }
.lr-score .who { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); }
.liar-rules { margin-top: 10px; }

/* ── ⚔️ 신의카드 ── */
.gd-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.gd-pl { position: relative; border: var(--line); border-radius: 12px; background: #fff; padding: 8px 10px; text-align: left; box-shadow: 3px 3px 0 var(--ink); font: inherit; color: inherit; }
.gd-pl.turn { background: #fff6cc; outline: 3px solid var(--p3); }
.gd-pl.hit { background: #ffe1e1; outline: 3px solid var(--wait); }
.gd-pl.out { opacity: 0.45; box-shadow: none; filter: grayscale(1); }
.gd-pl.me .gd-who b::after { content: ' (나)'; font-weight: 400; color: var(--muted); }
.gd-pl.gd-pick { cursor: pointer; outline: 3px dashed var(--p0); animation: gdPulse 1s ease-in-out infinite; }
.gd-aim { position: absolute; right: 8px; top: 6px; font-family: var(--display); color: var(--p0); font-size: 14px; }
.gd-who { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 16px; }
.gd-who b { font-weight: 400; }
.gd-hp { position: relative; height: 18px; border: 2px solid var(--ink); border-radius: 999px; background: #eee; overflow: hidden; margin: 6px 0 4px; }
.gd-hp i { position: absolute; inset: 0 auto 0 0; background: var(--go); transition: width 0.4s; }
.gd-hp i.low { background: var(--wait); }
.gd-hp span { position: relative; display: block; text-align: center; font-size: 12px; font-weight: 700; line-height: 14px; }
.gd-stat { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.gd-pl.shake { animation: gdShake 0.4s; }
.gd-float { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font-family: var(--display); font-size: 30px; pointer-events: none; animation: gdFloat 1.1s ease-out forwards; text-shadow: 2px 2px 0 #fff; }
.gd-float.minus { color: var(--wait); }
.gd-float.plus { color: var(--go); }
.gd-hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.gd-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border: var(--line); border-radius: 12px; background: #fff; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; font: inherit; color: var(--ink); min-height: 104px; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.gd-card.k-weapon { background: #ffeaea; }
.gd-card.k-armor { background: #e6efff; }
.gd-card.k-misc { background: #e3f8ec; }
.gd-card.k-trade { background: #fff6cc; }
.gd-card.off { opacity: 0.4; filter: grayscale(0.8); box-shadow: none; }
.gd-card.sel { outline: 4px solid var(--p0); transform: translateY(-4px); }
.gd-ic { font-size: 30px; line-height: 1.1; }
.gd-nm { font-family: var(--display); font-size: 14px; line-height: 1.15; text-align: center; }
.gd-val { font-size: 13px; font-weight: 700; }
.gd-mp { font-size: 11px; color: var(--p1); font-weight: 700; }
.gd-note { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: #fff; font-size: 11px; border-radius: 999px; padding: 1px 8px; }
.gd-pray, .gd-skip { align-self: stretch; min-height: 104px; font-family: var(--display); font-size: 15px; padding: 6px 4px; line-height: 1.25; word-break: keep-all; }
.gd-log { list-style: none; padding: 8px 10px; margin: 6px 0 0; border: 2px dashed rgba(31, 27, 58, 0.25); border-radius: 12px; display: grid; gap: 3px; font-size: 13.5px; max-height: 190px; overflow: auto; }
.gd-log li { display: block; }
.gd-log li > * + * { margin-left: 6px; }
.gd-log li:first-child { font-weight: 700; }
.gd-log .gd-lw { color: var(--muted); }
.gd-log .lg-out { color: var(--wait); }
.gd-log .plus { color: var(--go); } .gd-log .minus { color: var(--wait); }
.gd-tip { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(31, 27, 58, 0.35); padding: 16px; }
.gd-tip-box { background: #fff; border: var(--line); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); padding: 16px 20px; text-align: center; max-width: 300px; display: grid; gap: 4px; }
.gd-tip-box.k-weapon { background: #ffeaea; } .gd-tip-box.k-armor { background: #e6efff; } .gd-tip-box.k-misc { background: #e3f8ec; } .gd-tip-box.k-trade { background: #fff6cc; }
.gd-tip-ic { font-size: 54px; }
.gd-tip-box b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.gd-tip-box small { color: var(--muted); }
.gd-tip-box p { margin: 6px 0; font-size: 16px; }
.team-win.draw { background: #eee; }
@keyframes gdShake { 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 4px 0; } }
@keyframes gdFloat { from { opacity: 1; transform: translate(-50%, 0) scale(1.2); } to { opacity: 0; transform: translate(-50%, -40px) scale(1); } }
@keyframes gdPulse { 50% { outline-color: var(--p3); } }
@media (prefers-reduced-motion: reduce) { .gd-pl.shake, .gd-float, .gd-pl.gd-pick { animation: none; } }
/* 탑 쌓기 퍼펙트: 가운데 큰 글자 대신 위쪽 숫자만 반짝 + 블록 금테 */
.tw-pf { display: inline-block; font-size: 15px; color: var(--muted); margin-left: 6px; }
.tw-pf.hit { color: #c48a00; animation: twPf 0.6s ease-out; }
.tw-blk.pf { box-shadow: 0 0 0 2px #ffd400, 0 0 10px #ffd400; }
@keyframes twPf { 30% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .tw-pf.hit { animation: none; } }
/* 타이밍 바 PERFECT: 가운데 큰 글자 대신 바늘 금색 + 점수 칸에 표시 */
.tm-needle.pf { background: #ffb800; box-shadow: 0 0 0 3px #fff, 0 0 12px #ffd400; }
.tm-pf { color: #c48a00; font-family: var(--display); display: inline-block; animation: twPf 0.6s ease-out; }
@media (prefers-reduced-motion: reduce) { .tm-pf { animation: none; } }
/* 라이어 정답 고르기: 보기 10개 (2줄씩) */
.lr-guess { grid-template-columns: repeat(2, 1fr); }
.lr-guess .ch-btn.txt { font-size: 17px; padding: 10px 6px; min-height: 0; }
.gd-skip small { font-family: var(--body); font-size: 12px; opacity: 0.85; }
.gd-skip:disabled { opacity: 0.5; }

/* ── 버전 3: 8명 ── */
:root { --p4: #9b5cff; /* 보라 */ --p5: #ff8a1f; /* 주황 */ --p6: #ff5fb0; /* 분홍 */ --p7: #14b8c4; /* 청록 */ }
.col4 { background: var(--p4); } .col5 { background: var(--p5); } .col6 { background: var(--p6); } .col7 { background: var(--p7); }
.players.eight .pl { min-height: 92px; padding: 6px 4px 4px; }
.players.eight .avatar { width: 36px; height: 36px; font-size: 17px; }
.players.eight .pl-score { font-size: 17px; }
@media (max-width: 520px) { .players.eight .pl-nick { font-size: 13px; } .players.eight .kick { font-size: 10px; } }
.lb-grid.big { grid-template-columns: repeat(5, 1fr); max-width: 420px; }
.lb-grid.big .lb-box { font-size: clamp(22px, 6.5vw, 32px); }
.tcount { color: var(--muted); font-weight: 400; }
.mode-max { display: block; font-size: 11px; color: var(--muted); }
.cr-mouth .cr-row { grid-template-columns: repeat(var(--teeth, 6), 1fr); }
.cr-mouth.big { max-width: 460px; }
.cr-mouth.big .cr-row { gap: 4px; }
.cr-mouth.big .cr-tooth { border-width: 2px; }

/* ── 버전 3: 방장 메뉴 · 문제 신고 ── */
.pl-acts { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 3px; }
.pl-acts .kick { margin-top: 0; }
.kick.pass.armed { background: var(--p3); color: var(--ink); }
.end-btn { color: var(--p0); border-color: var(--p0); }
.end-btn.armed { background: var(--p0); color: #fff; }
.rp { margin: 10px auto 4px; text-align: center; }
.rp-btn { background: none; border: none; color: var(--muted); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 4px 8px; }
.rp-menu { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.rp-menu[hidden] { display: none; }
.rp-note { flex: 1 1 100%; max-width: 360px; font-size: 14px; padding: 8px 10px; }
.rp-done { color: var(--p2); font-size: 14px; margin: 6px 0; }

/* ── 📖 규칙 설명서 ── */
.mn-box { width: min(640px, 100%); max-height: 90dvh; display: flex; flex-direction: column; }
#manual-body { overflow-y: auto; flex: 1; min-height: 0; margin-bottom: 10px; }
.mn-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mn-tabs button { border: var(--line); border-radius: 999px; background: #fff; padding: 5px 12px; font-size: 14px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.mn-tabs button.on { background: var(--ink); color: #fff; }
.mn-q { width: 100%; margin-bottom: 10px; }
.mn-item { border-bottom: 2px dashed #d6d3e6; padding: 8px 0 10px; text-align: left; }
.mn-item h3 { margin: 4px 0 6px; font-size: 18px; }
.mn-item h3 small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.mn-desc { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.mn-cards td { font-size: 13px; vertical-align: top; }
.mn-cards small { color: var(--muted); }
.mn-cards th { font-size: 12px; color: var(--muted); text-align: left; }
.mn-more { display: block; margin: 4px auto 0; font-size: 13px; }

/* ── 🛡️ 관리자 ── */
.admin-nick { color: var(--admin-c1, #b8860b) !important; font-weight: 700; background: linear-gradient(90deg, var(--admin-c1, #b8860b), var(--admin-c2, #ffcf33), var(--admin-c1, #b8860b)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: adminShine 2.5s linear infinite; }
[data-admin-fx=rainbow] .admin-nick { background-image: linear-gradient(90deg, #ff4d4f, #ff9f1a, #ffd31a, #19c26b, #3d7bff, #9b5cff, #ff4d4f); }
[data-admin-fx=none] .admin-nick { animation: none; background: none; -webkit-text-fill-color: var(--admin-c1, #b8860b); }
@keyframes adminShine { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .admin-nick { animation: none; } }
.admin-ico { margin-right: 2px; }
.pl.admin, .pl.nkcard { border-color: var(--admin-c1, #b8860b); box-shadow: 3px 3px 0 var(--admin-c1, #b8860b); }
.admin-field input { border-color: #b8860b; }

/* 점검: 좁은 폰(360px)에서 가로로 넘치지 않게 */
.players { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pl { min-width: 0; }
.opt-row .seg { flex-wrap: wrap; max-width: 100%; }
.opt-row .seg button { white-space: normal; }

/* ── 🚪 방 리스트 · 🔒 비밀번호 방 ── */
.pw-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; }
.pw-toggle { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pw-row input[type=text], #room-pw { flex: 1 1 160px; min-width: 0; }
.room-list-btn { width: 100%; margin-top: 8px; }
.room-list { margin-top: 8px; border: var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; max-height: 340px; overflow-y: auto; }
.rl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.rl-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 2px dashed #e1def0; }
.rl-row.off { opacity: 0.55; }
.rl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rl-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-main small { color: var(--muted); font-size: 12.5px; }
.pw-note { margin: 0 0 10px; padding: 6px 10px; background: #fff7d6; border: 2px solid #e8c84a; border-radius: 10px; font-size: 14px; }
.pw-toggle { white-space: nowrap; }
.pw-toggle input[type=checkbox] { width: 20px; height: 20px; flex: none; margin: 0; padding: 0; accent-color: var(--ink); }

/* 🏅 내 전적 · 칭호 (버전 3 · 4단계) */
.pl-title { font-size: 11px; line-height: 1.2; color: #8a5a00; background: #fff3c4; border: 1.5px solid #e8c25a; border-radius: 99px; padding: 0 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 1px auto 2px; width: fit-content; }
.pl .avatar[data-action], .pl .pl-nick[data-action] { cursor: pointer; }
.pf-box { width: min(560px, 100%); }
.pf-rep { font-family: var(--display); font-size: 18px; margin: 0 0 8px; }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-bottom: 10px; }
.pf-stats > div { border: var(--line); border-radius: 12px; padding: 6px; text-align: center; background: #fff; }
.pf-stats small { display: block; color: var(--muted); font-size: 12px; }
.pf-stats b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.pf-table td, .pf-table th { font-size: 13px; }
.pf-table .n { text-align: center; }
.pf-mini { margin: 6px 0 10px; }
.pf-mini summary { cursor: pointer; font-weight: 700; }
.pf-sub { font-family: var(--display); font-weight: 400; font-size: 18px; margin: 12px 0 6px; }
.pf-sub small { font-family: var(--body); font-size: 12px; color: var(--muted); }
.pf-cat { margin: 10px 0 4px; font-size: 13px; color: var(--muted); }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pf-title { display: grid; grid-template-columns: auto 1fr; gap: 0 6px; align-items: center; text-align: left; font: inherit; border: 2px dashed #c9c3dd; border-radius: 12px; padding: 6px 8px; background: #f6f4fb; color: var(--muted); }
.pf-title .pf-ico { grid-row: span 2; font-size: 24px; filter: grayscale(1); opacity: 0.5; }
.pf-title b { font-size: 14px; }
.pf-title .pf-desc, .pf-title small, .pf-title .pf-bar { grid-column: 2; font-size: 11px; }
.pf-title.got { border: var(--line); background: #fff; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); }
.pf-title.got .pf-ico { filter: none; opacity: 1; }
.pf-title.rep { background: #fff3c4; border-color: #b8860b; }
.pf-bar { display: block; height: 6px; border-radius: 99px; background: #e4e0f0; overflow: hidden; margin-top: 2px; }
.pf-bar i { display: block; height: 100%; background: var(--p2, #6bcB77); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { border: 2px solid var(--ink); border-radius: 99px; padding: 1px 8px; font-size: 13px; background: #fff; }
.pf-soon { color: var(--muted); }

/* 첫 화면 아래 버튼 줄 · 🚩 첫 화면 문제 신고 */
.home-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.home-links .btn { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
@media (max-width: 380px) { .home-links .btn { font-size: 14px; } }
.rpm-box { display: flex; flex-direction: column; gap: 6px; }
.rpm-label { font-weight: 700; font-size: 14px; margin-top: 4px; }
.rpm-box select, .rpm-box textarea, .rpm-box #rpm-note { width: 100%; font: inherit; padding: 8px; border: var(--line); border-radius: 10px; background: #fff; }
.rpm-box textarea { min-height: 80px; resize: vertical; }
.rpm-reason { display: flex; flex-wrap: wrap; gap: 6px; }
.rpm-reason label { display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--ink); border-radius: 99px; padding: 4px 10px; font-size: 14px; cursor: pointer; background: #fff; }
.rpm-reason input { width: auto; margin: 0; }
.rpm-reason label:has(input:checked) { background: var(--ink); color: #fff; }
.pf-box .pf-chips { margin-bottom: 12px; }

/* 🛡️ 관리자 닉 화려한 효과 (관리 페이지에서 골라요) */
/* 💡 네온사인: 색1 글자 + 색2 빛이 깜빡 */
[data-admin-fx=neon] .admin-nick { background: none; -webkit-text-fill-color: color-mix(in srgb, var(--admin-c1) 30%, #fff); color: var(--admin-c1) !important; text-shadow: 0 0 2px var(--admin-c1), 0 0 6px var(--admin-c1), 0 0 12px var(--admin-c2), 0 0 20px var(--admin-c2); animation: adminNeon 1.6s ease-in-out infinite; -webkit-text-stroke: 0.8px var(--admin-c1); }
@keyframes adminNeon { 0%, 100% { opacity: 1; } 45% { opacity: 1; } 50% { opacity: 0.55; } 55% { opacity: 1; } 60% { opacity: 0.8; } 65% { opacity: 1; } }
/* 🔥 불꽃: 아래에서 위로 일렁이는 불 */
[data-admin-fx=fire] .admin-nick { background-image: linear-gradient(0deg, #c81d00, #ff5a00 30%, #ffb300 60%, #fff3a0 85%, #ff7a00); background-size: 100% 300%; animation: adminFire 1.2s ease-in-out infinite alternate, adminFlicker 0.18s steps(2) infinite; filter: drop-shadow(0 0 3px rgba(255, 90, 0, 0.75)); }
@keyframes adminFire { from { background-position: 0 0%; } to { background-position: 0 100%; } }
@keyframes adminFlicker { 50% { filter: drop-shadow(0 -1px 5px rgba(255, 140, 0, 0.9)); } }
/* 🌌 은하수: 우주색이 흐르고 별이 반짝 */
[data-admin-fx=galaxy] .admin-nick { background-image: linear-gradient(110deg, #3a0ca3, #7209b7, #4cc9f0, #ffffff, #f72585, #3a0ca3); background-size: 300% 100%; animation: adminShine 3.5s linear infinite; filter: drop-shadow(0 0 3px rgba(114, 9, 183, 0.6)); }
[data-admin-fx=galaxy] .admin-nick::after, [data-admin-fx=sparkle] .admin-nick::after { content: '✦'; -webkit-text-fill-color: #ffe66d; color: #ffe66d; font-size: 0.75em; margin-left: 2px; display: inline-block; animation: adminTwinkle 1.4s ease-in-out infinite; }
[data-admin-fx=galaxy] .admin-nick::before, [data-admin-fx=sparkle] .admin-nick::before { content: '✧'; -webkit-text-fill-color: #9ee7ff; color: #9ee7ff; font-size: 0.65em; margin-right: 2px; display: inline-block; animation: adminTwinkle 1.4s ease-in-out 0.7s infinite; }
@keyframes adminTwinkle { 0%, 100% { opacity: 0.2; transform: scale(0.6) rotate(0deg); } 50% { opacity: 1; transform: scale(1.25) rotate(90deg); } }
/* ⭐ 별가루: 색1 → 색2 반짝임 + 양쪽에서 별이 튀어요 */
[data-admin-fx=sparkle] .admin-nick { animation: adminShine 1.8s linear infinite; filter: drop-shadow(0 0 2px var(--admin-c2)); }
[data-admin-fx=sparkle] .admin-nick::after { -webkit-text-fill-color: var(--admin-c2); color: var(--admin-c2); }
[data-admin-fx=sparkle] .admin-nick::before { -webkit-text-fill-color: var(--admin-c1); color: var(--admin-c1); }
/* 👑 오라: 글자 반짝임 + 참가자 칸 전체가 숨 쉬듯 빛나요 */
[data-admin-fx=aura] .admin-nick { filter: drop-shadow(0 0 3px var(--admin-c2)); }
[data-admin-fx=aura] .pl.admin, .pl.admin[data-admin-fx=aura], .pl.nkcard[data-admin-fx=aura] { animation: adminAura 2s ease-in-out infinite; }
@keyframes adminAura { 0%, 100% { box-shadow: 3px 3px 0 var(--admin-c1), 0 0 4px var(--admin-c2); } 50% { box-shadow: 3px 3px 0 var(--admin-c1), 0 0 18px 4px var(--admin-c2); } }
/* 화려한 효과는 참가자 칸 테두리도 살짝 빛나요 */
[data-admin-fx=neon] .pl.admin, .pl.admin[data-admin-fx=neon], .pl.nkcard[data-admin-fx=neon] { box-shadow: 3px 3px 0 var(--admin-c1), 0 0 10px var(--admin-c2); }
[data-admin-fx=fire] .pl.admin, .pl.admin[data-admin-fx=fire], .pl.nkcard[data-admin-fx=fire] { border-color: #ff5a00; box-shadow: 3px 3px 0 #c81d00, 0 0 10px rgba(255, 120, 0, 0.6); }
[data-admin-fx=galaxy] .pl.admin, .pl.admin[data-admin-fx=galaxy], .pl.nkcard[data-admin-fx=galaxy] { border-color: #7209b7; box-shadow: 3px 3px 0 #3a0ca3, 0 0 10px rgba(76, 201, 240, 0.6); }
@media (prefers-reduced-motion: reduce) { .admin-nick, .admin-nick::before, .admin-nick::after, .pl.admin, .pl.nkcard { animation: none !important; } }

/* 개선: 관리자 칸은 빛이 잘리지 않게 · 네온은 어두운 간판 위에 */
.pl.admin .pl-nick, .pl.nkcard .pl-nick { overflow: visible; padding: 2px 4px; }
[data-admin-fx=neon] .admin-nick { background: #1f1b3a; -webkit-text-fill-color: color-mix(in srgb, var(--admin-c1) 25%, #fff); color: #fff !important; padding: 0 6px 1px; border-radius: 7px; -webkit-text-stroke: 0.5px var(--admin-c1); box-shadow: 0 0 0 2px var(--admin-c1), 0 0 10px var(--admin-c2); }
.chat-log [data-admin-fx=neon] .admin-nick, [data-admin-fx=neon] .chat-log .admin-nick { padding: 0 4px; }

/* 🔥🔥 활활 불타는: 닉네임이 타오르고, 칸 위로 불꽃이 솟고, 테두리가 이글거려요 */
[data-admin-fx=blaze] .admin-nick {
  background-image: linear-gradient(0deg, #d61f00, #ff4a00 25%, #ff8a00 50%, #ffd000 75%, #fff6c2 90%, #ff5a00);
  background-size: 100% 260%; animation: adminFire 0.7s ease-in-out infinite alternate, adminBlazeGlow 0.35s steps(3) infinite;
  -webkit-text-stroke: 0.4px #a01000;
}
[data-admin-fx=blaze] .admin-nick::after { content: '🔥'; -webkit-text-fill-color: initial; font-size: 0.8em; margin-left: 2px; display: inline-block; animation: adminFlame 0.5s ease-in-out infinite alternate; }
@keyframes adminBlazeGlow {
  0% { filter: drop-shadow(0 -1px 2px #ff5a00) drop-shadow(0 -3px 6px rgba(255, 60, 0, 0.7)); }
  50% { filter: drop-shadow(0 -2px 3px #ffb000) drop-shadow(0 -5px 9px rgba(255, 30, 0, 0.8)); }
  100% { filter: drop-shadow(0 -1px 4px #ff7b00) drop-shadow(0 -4px 7px rgba(255, 90, 0, 0.75)); }
}
@keyframes adminFlame { from { transform: translateY(0) scale(0.9) rotate(-6deg); } to { transform: translateY(-2px) scale(1.1) rotate(6deg); } }
[data-admin-fx=blaze] .pl.admin, .pl.admin[data-admin-fx=blaze], .pl.nkcard[data-admin-fx=blaze] { border-color: #ff4d00; background: linear-gradient(0deg, #ffe1c2, #fff 55%); animation: adminBurn 0.6s ease-in-out infinite alternate; }
@keyframes adminBurn {
  from { box-shadow: 3px 3px 0 #8f0000, 0 -4px 10px rgba(255, 90, 0, 0.75), 0 0 16px rgba(255, 40, 0, 0.45); }
  to { box-shadow: 3px 3px 0 #8f0000, 0 -9px 18px rgba(255, 170, 0, 0.85), 0 0 24px rgba(255, 40, 0, 0.6); }
}
/* 칸 위쪽 양옆에서 솟는 불꽃 */
[data-admin-fx=blaze] .pl.admin::before, .pl.admin[data-admin-fx=blaze]::before, .pl.nkcard[data-admin-fx=blaze]::before, [data-admin-fx=blaze] .pl.admin::after, .pl.admin[data-admin-fx=blaze]::after, .pl.nkcard[data-admin-fx=blaze]::after {
  content: '🔥'; position: absolute; top: -16px; font-size: 20px; pointer-events: none; animation: adminRise 0.9s ease-in-out infinite;
}
[data-admin-fx=blaze] .pl.admin::before, .pl.admin[data-admin-fx=blaze]::before, .pl.nkcard[data-admin-fx=blaze]::before { left: 6px; }
[data-admin-fx=blaze] .pl.admin::after, .pl.admin[data-admin-fx=blaze]::after, .pl.nkcard[data-admin-fx=blaze]::after { right: 6px; animation-delay: 0.45s; font-size: 17px; }
@keyframes adminRise {
  0% { transform: translateY(4px) scale(0.8) rotate(-8deg); opacity: 0.6; }
  50% { transform: translateY(-3px) scale(1.15) rotate(6deg); opacity: 1; }
  100% { transform: translateY(4px) scale(0.85) rotate(-4deg); opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) { [data-admin-fx=blaze] .pl.admin::before, .pl.admin[data-admin-fx=blaze]::before, .pl.nkcard[data-admin-fx=blaze]::before, [data-admin-fx=blaze] .pl.admin::after, .pl.admin[data-admin-fx=blaze]::after, .pl.nkcard[data-admin-fx=blaze]::after, [data-admin-fx=blaze] .admin-nick::after { animation: none !important; } }

/* 🎲 버전 3 새 미니게임 */
.ty, .hl, .sm, .ud { text-align: center; }
.ty-target { font-family: var(--display); font-size: clamp(20px, 5.5vw, 28px); line-height: 1.5; margin: 14px 0; word-break: keep-all; }
.ty-target span.ok { color: var(--p2); }
.ty-target span.bad { color: #fff; background: var(--p0); border-radius: 4px; }
.ty-input { width: 100%; max-width: 520px; font-size: 20px; padding: 12px; border: var(--line); border-radius: 12px; margin-bottom: 8px; display: block; margin-left: auto; margin-right: auto; }
.hl-row { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 14px 0; }
.hl-card { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; height: 90px; border: var(--line); border-radius: 10px; background: #fff; box-shadow: 3px 3px 0 var(--ink); font-family: var(--display); }
.hl-card b { font-size: 30px; font-weight: 400; line-height: 1; }
.hl-card i { font-style: normal; font-size: 22px; }
.hl-card.red { color: var(--p0); }
.hl-card.big { width: 84px; height: 118px; }
.hl-card.big b { font-size: 40px; }
.hl-card.mini { width: 30px; height: 42px; border-width: 2px; box-shadow: none; }
.hl-card.mini b { font-size: 14px; } .hl-card.mini i { font-size: 11px; }
.hl-card.flip { animation: hlFlip 0.45s ease-out; }
@keyframes hlFlip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.hl-q { font-family: var(--display); font-size: 56px; color: var(--muted); }
.hl-arrow { font-size: 30px; }
.hl-trail { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 8px; }
.hl-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 460px; margin: 0 auto; }
.hl-btns [data-pick=stop] { grid-column: span 2; }
.hl-btns .picked { background: var(--ink); color: #fff; }
.sm-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 300px; margin: 14px auto; }
.sm-pad { aspect-ratio: 1; border: var(--line); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); opacity: 0.45; transition: opacity 0.08s, transform 0.08s; cursor: pointer; }
.sm-pad.sm-0 { background: #ff4d4f; } .sm-pad.sm-1 { background: #1fb978; } .sm-pad.sm-2 { background: #3d7bff; } .sm-pad.sm-3 { background: #ffc21a; }
.sm-pad.lit { opacity: 1; transform: scale(1.06); box-shadow: 0 0 18px 4px rgba(255, 255, 255, 0.9), 4px 4px 0 var(--ink); }
.sm-pad:disabled { cursor: default; }
.sm-dots { font-size: 22px; letter-spacing: 4px; min-height: 28px; }
.sm-ans { font-size: 22px; letter-spacing: 2px; word-break: break-all; }
.ud-range { font-family: var(--display); font-size: 18px; margin: 6px 0 0; }
.ud-hist { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 0; min-height: 26px; }
.ud-try { border: 2px solid var(--ink); border-radius: 99px; padding: 2px 10px; font-size: 14px; background: #fff; }
.ud-try.ud-up { background: #e6f0ff; } .ud-try.ud-down { background: #fff0e6; } .ud-try.ud-hit { background: var(--p2); color: #fff; }

/* 🎨 그림 그리고 맞히기 */
.dr-word { text-align: center; font-size: 16px; margin: 4px 0 8px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.dr-word b { font-family: var(--display); font-weight: 400; font-size: 24px; }
.dr-blank { letter-spacing: 6px; }
.dr-tag { font-size: 12px; border: 2px solid var(--ink); border-radius: 99px; padding: 0 8px; background: var(--p3); }
.dr-board { border: var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 4px 4px 0 var(--ink); max-width: 720px; margin: 0 auto; }
.dr-board.small { max-width: 360px; }
.dr-canvas { display: block; width: 100%; aspect-ratio: 4 / 3; touch-action: none; background: #fff; }
.dr-board.mine .dr-canvas { cursor: crosshair; }
.dr-tools { display: flex; flex-direction: column; gap: 8px; align-items: center; margin: 10px auto 4px; max-width: 720px; }
.dr-colors, .dr-sizes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dr-colors button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); background: var(--c); cursor: pointer; }
.dr-colors button.on { outline: 3px solid var(--p1); outline-offset: 2px; }
.dr-sizes button { width: 40px; height: 36px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; display: grid; place-items: center; cursor: pointer; font-size: 18px; padding: 0; }
.dr-sizes button i { display: block; border-radius: 50%; background: var(--ink); }
.dr-sizes button.on { background: var(--p3); }
.dr-guess { display: flex; gap: 8px; max-width: 520px; margin: 10px auto 4px; }
.dr-guess input { flex: 1; font-size: 18px; padding: 10px 12px; border: var(--line); border-radius: 12px; min-width: 0; }
.dr-pick { text-align: center; padding: 18px 0; }
.dr-pick .btn-row { justify-content: center; flex-wrap: wrap; }
.dr-result { text-align: center; margin: 6px 0 10px; }
.dr-answer { font-size: 18px; } .dr-answer b { font-family: var(--display); font-weight: 400; font-size: 32px; color: var(--p1); }
.dr-score { max-width: 420px; margin: 10px auto 0; }
.dr-score tr.drawer td { background: #fff7d6; }
[data-count].low { color: var(--p0); font-weight: 700; }

/* 🔤 끝말잇기 */
.wd-order { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.wd-order > span { border: 2px solid var(--ink); border-radius: 99px; padding: 2px 10px; font-size: 13px; background: #fff; }
.wd-order > span.now { background: var(--p3); box-shadow: 2px 2px 0 var(--ink); }
.wd-order > span.out { opacity: 0.4; text-decoration: line-through; }
.wd-chain { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin: 8px 0; }
.wd-chain i { font-style: normal; color: var(--muted); }
.wd-word { display: inline-flex; flex-direction: column; align-items: center; border: 2px solid var(--ink); border-radius: 12px; padding: 2px 10px; background: #fff; font-family: var(--display); font-size: 18px; }
.wd-word small { font-family: var(--body); font-size: 10px; color: var(--muted); }
.wd-word.last { background: #e6f0ff; font-size: 26px; box-shadow: 3px 3px 0 var(--ink); }
.wd-turn { text-align: center; margin-top: 8px; }
.wd-need { font-family: var(--display); font-size: 26px; font-weight: 400; color: var(--p1); }
.wd-count { margin-left: 6px; }
.wd-ev { text-align: center; } .wd-ev.bad { color: var(--p0); }

/* 🤖 봇 */
.bot-add { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bot-add small { font-weight: 700; color: var(--ink); }
.bot-add div { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.bot-add button { font: inherit; font-size: 11px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; padding: 1px 6px; cursor: pointer; }
.bot-add button:hover { background: var(--p3); }
.pl-title.bot { background: #e9f1ff; border-color: #8fb3ff; color: #2a4fa8; }

/* ── 신의카드 2.0 ── */
.gd-stat { flex-wrap: wrap; gap: 4px 10px; }
.gd-hp i.fog { background: repeating-linear-gradient(45deg, #bbb, #bbb 6px, #ddd 6px, #ddd 12px); }
.gd-ico-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.gd-ico { display: inline-flex; align-items: center; gap: 1px; font-size: 16px; line-height: 1; padding: 2px 4px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; cursor: help; }
.gd-ico.bad { background: #ffe1e1; }
.gd-ico.sk { background: #efe6ff; }
.gd-ico small { font-size: 10px; font-weight: 700; }
.gd-doom-row { margin: 4px 0; }
.gd-doom { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #eee; }
.gd-doom.on { background: #3a1a4a; color: #fff; animation: gdPulse 1s ease-in-out infinite; }
.gd-skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 2px; }
.gd-sk { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 4px; border: var(--line); border-radius: 12px; background: #efe6ff; box-shadow: 3px 3px 0 var(--ink); font: inherit; color: var(--ink); cursor: pointer; min-height: 74px; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gd-sk .gd-ic { font-size: 24px; }
.gd-sk b { font-family: var(--display); font-weight: 400; font-size: 13px; text-align: center; line-height: 1.1; }
.gd-sk small { font-size: 11px; color: var(--p1); font-weight: 700; }
.gd-sk.off { opacity: 0.45; box-shadow: none; filter: grayscale(0.6); }
.gd-sk.sel { outline: 4px solid var(--p0); }
.gd-sk.empty { background: #f4f4f4; border-style: dashed; box-shadow: none; opacity: 0.6; justify-content: center; cursor: default; }
.gd-ex { display: grid; gap: 6px; margin: 8px 0; padding: 10px; border: var(--line); border-radius: 14px; background: #fff; }
.gd-ex-row { display: flex; align-items: center; gap: 6px; }
.gd-ex-nm { flex: 1; font-family: var(--display); font-size: 16px; }
.gd-ex-n { min-width: 32px; text-align: center; font-size: 20px; }
.gd-ex-act { display: flex; gap: 8px; }
.mn-sub { font-family: var(--display); font-weight: 400; font-size: 18px; margin: 14px 0 4px; }

.gd-pv { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 6px 0; padding: 8px 12px; border: var(--line); border-radius: 12px; background: #fff6cc; font-size: 15px; }
.gd-pv.ok { background: #e3f8ec; }
.gd-pv.dead { background: #ffe1e1; }
.gd-pv b { font-family: var(--display); font-weight: 400; font-size: 18px; }
.gd-pv .plus { color: var(--go); } .gd-pv .minus { color: var(--wait); }
.gd-pv strong { flex-basis: 100%; color: var(--wait); }

/* ── 🖥️ PC 화면 (1100px 이상): 폰 화면은 그대로, 넓은 화면만 넓게 · 크게 ── */
@media (min-width: 1100px) {
  /* 첫 화면: 왼쪽 조작 · 오른쪽 시즌 릴레이 */
  .home { max-width: 1040px; padding: 40px 24px 40px; }
  .home-head { margin-bottom: 30px; }
  .logo { font-size: 52px; }
  .logo-pre { font-size: 21px; }
  .tagline { font-size: 18px; }
  .home .panel { padding: 28px 32px; }
  #normal-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; align-items: start; }
  #normal-entry > * { grid-column: 1; }
  #normal-entry { grid-auto-flow: dense; }
  #normal-entry > #season-box { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
  #normal-entry > .relay-entry { grid-column: 2; margin-top: 4px; }
  #normal-entry .btn.big { padding: 16px; font-size: 24px; }
  .home .news { margin-top: 20px; }
  .home .news ul { columns: 2; column-gap: 32px; }

  /* 방 안: 게임 화면을 넓고 크게 */
  .room { max-width: 1400px; padding: 16px 28px 96px; }
  .players { max-width: 860px; gap: 10px; }
  .players.eight { max-width: none; grid-template-columns: repeat(8, 1fr); }
  .room-body { grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
  .stage { padding: 28px 32px; min-height: 560px; font-size: 17px; }
  .stage h2 { font-size: 32px; }
  .stage .btn { font-size: 18px; }
  .stage .btn.big { font-size: 26px; padding: 16px; }
  .stage .hint { font-size: 15px; }
  .rules { max-width: 720px; font-size: 17px; }
  .stage .lr-now { font-size: 19px; }
  .chat { min-height: 520px; max-height: calc(100dvh - 220px); }
  /* 신의카드 */
  .gd-board { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
  .gd-pl { padding: 12px 14px; }
  .gd-who { font-size: 19px; }
  .gd-hp { height: 22px; }
  .gd-hp span { font-size: 14px; line-height: 18px; }
  .gd-stat { font-size: 15px; }
  .gd-ico { font-size: 19px; }
  .gd-hand { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; }
  .gd-card { min-height: 140px; padding: 12px 6px 10px; }
  .gd-ic { font-size: 40px; }
  .gd-nm { font-size: 17px; }
  .gd-val { font-size: 15px; }
  .gd-note { font-size: 12px; }
  .gd-pray, .gd-skip { min-height: 140px; font-size: 17px; }
  .gd-sk { min-height: 92px; }
  .gd-sk .gd-ic { font-size: 30px; }
  .gd-sk b { font-size: 15px; }
  .gd-log { font-size: 15px; max-height: 240px; }
  .gd-pv { font-size: 17px; }
  .gd-pv b { font-size: 21px; }
}
@media (min-width: 1500px) {
  .room { max-width: 1560px; }
  .room-body { grid-template-columns: minmax(0, 1fr) 400px; }
}

/* ── ⚔️ 신의카드 타격감 ── */
.gd-float.fixed { position: fixed; z-index: 60; transform: translate(-50%, -50%); animation: gdFloatFix 1.2s ease-out forwards; white-space: nowrap; }
.gd-float.t-s { font-size: 26px; }
.gd-float.t-m { font-size: 38px; }
.gd-float.t-l { font-size: 56px; text-shadow: 3px 3px 0 #fff, -2px -2px 0 #fff; }
.gd-float.big { font-size: 46px; }
.gd-float.icon { font-size: 34px; }
.gd-txt-gold { color: #c48a00; font-family: var(--display); font-size: 26px; text-shadow: 2px 2px 0 #fff; }
.gd-txt-gold.big { font-size: 32px; }
.gd-txt-blue { color: #2a63d6; font-family: var(--display); font-size: 22px; text-shadow: 2px 2px 0 #fff; }
.gd-txt-red { color: #e0263a; font-family: var(--display); font-size: 34px; text-shadow: 2px 2px 0 #fff; transform: translate(-50%, -150%) !important; }
@keyframes gdFloatFix { 0% { opacity: 0; transform: translate(-50%, -30%) scale(1.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -130%) scale(1); } }
.gd-bit { position: fixed; z-index: 59; pointer-events: none; font-size: 20px; transform: translate(-50%, -50%); }
.gd-fly { position: fixed; z-index: 61; pointer-events: none; font-size: 40px; transform: translate(-50%, -50%); filter: drop-shadow(0 0 8px var(--glow, #ff5a5f)); }
.gd-pl.fx-shake-s { animation: gdShake 0.25s; }
.gd-pl.fx-shake-m { animation: gdShake 0.4s; background: #ffe1e1; }
.gd-pl.fx-shake-l { animation: gdShakeL 0.55s; background: #ffc9c9; }
@keyframes gdShakeL { 10% { translate: -12px 4px; } 25% { translate: 12px -4px; } 40% { translate: -9px 3px; } 55% { translate: 9px -2px; } 70% { translate: -5px 1px; } 85% { translate: 4px 0; } }
.gd-pl.fx-guard { box-shadow: 0 0 0 4px #ffd400, 0 0 22px 6px rgba(255, 212, 0, 0.7); }
.gd-pl.fx-crack { box-shadow: 0 0 0 3px #7aa7ff, 0 0 14px 2px rgba(122, 167, 255, 0.6); animation: gdShake 0.25s; }
.gd-pl.fx-curse { box-shadow: 0 0 0 3px #8b4bd8, 0 0 18px 4px rgba(139, 75, 216, 0.55); }
.gd-pl.fx-guard, .gd-pl.fx-crack, .gd-pl.fx-curse { transition: box-shadow 0.2s; }
#room.gd-quake { animation: gdQuake 0.45s; }
@keyframes gdQuake { 15% { transform: translate(-6px, 3px); } 30% { transform: translate(6px, -4px); } 45% { transform: translate(-4px, 2px); } 60% { transform: translate(4px, -2px); } 80% { transform: translate(-2px, 1px); } }
body.gd-doom-fx::after { content: ''; position: fixed; inset: 0; z-index: 58; pointer-events: none; background: radial-gradient(circle, rgba(90, 0, 60, 0.15), rgba(40, 0, 30, 0.55)); animation: gdDoom 1.2s ease-out forwards; }
@keyframes gdDoom { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
body.gd-party-fx::after { content: ''; position: fixed; inset: 0; z-index: 58; pointer-events: none; background: conic-gradient(from 0deg, rgba(255,60,120,0.35), rgba(255,200,0,0.35), rgba(120,60,255,0.35), rgba(0,200,160,0.35), rgba(255,60,120,0.35)); animation: gdDoom 1.4s ease-out forwards; }
.gd-hp { position: relative; }
.gd-hp .gd-ghost { position: absolute; inset: 0 auto 0 0; background: #fff; border-right: 2px solid rgba(0,0,0,0.15); transition: width 0.8s ease-in; }
.gd-hp i { z-index: 1; }
.gd-hp span { z-index: 2; }
.gd-hp.gd-heal { animation: gdHealBar 0.8s; }
@keyframes gdHealBar { 30% { box-shadow: 0 0 0 3px #1fb978, 0 0 14px 4px rgba(31, 185, 120, 0.6); } }
@media (prefers-reduced-motion: reduce) {
  .gd-pl.fx-shake-s, .gd-pl.fx-shake-m, .gd-pl.fx-shake-l, #room.gd-quake, .gd-pl.fx-crack { animation: none; }
  body.gd-doom-fx::after, body.gd-party-fx::after { animation-duration: 0.01s; }
}

/* ── 🖥️ PC 신의카드: 스크롤 없이 한 화면에 (폰은 그대로) ── */
@media (min-width: 1100px) {
  .room:has(.gd-board) { padding-top: 10px; padding-bottom: 16px; }
  .room:has(.gd-board) .room-bar { margin-bottom: 8px; }
  .room:has(.gd-board) .ticket { padding: 3px 16px 4px; }
  .room:has(.gd-board) .ticket-code { font-size: 24px; }
  .room:has(.gd-board) .ticket-hint { display: none; }
  .room:has(.gd-board) #players { display: none; } /* 같은 정보가 아래 상태판에 있어요 */
  .room:has(.gd-board) .stage { min-height: 0; padding: 14px 20px; }
  .room:has(.gd-board) .chat { min-height: 0; max-height: calc(100dvh - 90px); height: calc(100dvh - 90px); }
  .stage .lr-head { margin-bottom: 4px; }
  .stage:has(.gd-board) h2 { font-size: 24px; }
  .gd-doom-row { margin: 0 0 4px; }
  .gd-board { margin: 4px 0; gap: 10px; }
  .gd-pl { padding: 6px 12px; }
  .gd-who { font-size: 17px; }
  .gd-hp { height: 18px; margin: 4px 0 3px; }
  .gd-hp span { font-size: 12px; line-height: 14px; }
  .gd-stat { font-size: 14px; }
  .gd-ico { font-size: 16px; }
  .stage:has(.gd-board) .lr-now { margin: 6px 0; font-size: 17px; }
  .gd-skills { margin: 4px 0 2px; gap: 8px; }
  .gd-sk { min-height: 0; flex-direction: row; justify-content: center; gap: 8px; padding: 6px 8px; }
  .gd-sk .gd-ic { font-size: 22px; }
  .gd-sk b { font-size: 15px; }
  .gd-hand { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 6px 0 8px; }
  .gd-card { min-height: 100px; padding: 8px 4px 6px; }
  .gd-ic { font-size: 32px; }
  .gd-nm { font-size: 15px; }
  .gd-val { font-size: 14px; }
  .gd-pray, .gd-skip { min-height: 100px; font-size: 16px; }
  .gd-log { max-height: 84px; font-size: 14px; margin-top: 4px; }
  .gd-pv { margin: 4px 0; padding: 6px 12px; }
}

/* ── 😈 신의카드 종말의 시간: 배경이 붉게 (방 화면에 있을 때만) ── */
body { transition: background-color 1.2s ease; }
body.gd-doomed:has(#room:not([hidden])) {
  background-color: #5a0f16;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 120, 120, 0.18) 1.5px, transparent 0), radial-gradient(ellipse at 50% 120%, rgba(255, 60, 40, 0.45), transparent 70%);
  background-size: 22px 22px, 100% 100%;
  background-attachment: fixed;
}
body.gd-doomed:has(#room:not([hidden])) .stage { box-shadow: 6px 6px 0 #1a0004, 0 0 0 3px #ff3b3b, 0 0 30px 6px rgba(255, 40, 40, 0.45); animation: gdDoomPulse 2.4s ease-in-out infinite; }
body.gd-doomed:has(#room:not([hidden])) .chat { box-shadow: 6px 6px 0 #1a0004; }
body.gd-doomed:has(#room:not([hidden])) .room-bar .btn { background: #fff; }
@keyframes gdDoomPulse { 50% { box-shadow: 6px 6px 0 #1a0004, 0 0 0 3px #ff6b6b, 0 0 42px 12px rgba(255, 40, 40, 0.6); } }
@media (prefers-reduced-motion: reduce) { body.gd-doomed:has(#room:not([hidden])) .stage { animation: none; } }

/* 👥 신의카드 팀전 */
.gd-pl.tm-r { border-left: 8px solid #ff5a5f; }
.gd-pl.tm-b { border-left: 8px solid #3d7bff; }
.gd-team { font-size: 13px; }
.gd-ally { margin-left: 6px; font-size: 11px; color: var(--go); font-family: var(--body); border: 1.5px solid var(--go); border-radius: 999px; padding: 0 6px; }
.team-win.b { background: #e6efff; }
.tw-title small { display: block; font-size: 15px; }

/* 😈 악마 등장 */
.gd-devil { position: fixed; z-index: 62; transform: translate(-50%, -60%); display: grid; justify-items: center; pointer-events: none; animation: gdDevil 1.45s ease-out forwards; }
.gd-devil-ic { line-height: 1; filter: drop-shadow(0 0 14px rgba(255, 30, 30, 0.85)); }
.gd-devil.small .gd-devil-ic { font-size: 56px; }
.gd-devil.mid .gd-devil-ic { font-size: 76px; }
.gd-devil.big .gd-devil-ic { font-size: 104px; }
.gd-devil-nm { margin-top: 2px; padding: 2px 12px; border-radius: 999px; background: #2a0006; color: #fff; font-family: var(--display); font-size: 18px; white-space: nowrap; box-shadow: 0 0 0 2px #ff3b3b; }
.gd-devil-nm b { color: #ff6b6b; font-weight: 400; }
@keyframes gdDevil { 0% { opacity: 0; transform: translate(-50%, -160%) scale(2.2); } 18% { opacity: 1; transform: translate(-50%, -60%) scale(0.9); } 26% { transform: translate(-50%, -60%) scale(1.05) rotate(-4deg); } 34% { transform: translate(-50%, -60%) scale(1) rotate(4deg); } 42% { transform: translate(-50%, -60%) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -75%); } }
@media (prefers-reduced-motion: reduce) { .gd-devil { animation-duration: 1.4s; animation-timing-function: steps(1); } }

/* 👼 천사 · 🧚 장난꾸러기 */
.gd-devil.angel .gd-devil-ic { filter: drop-shadow(0 0 16px rgba(255, 220, 80, 0.95)); }
.gd-devil.angel .gd-devil-nm { background: #fff8d6; color: #7a5a00; box-shadow: 0 0 0 2px #ffd400, 0 0 16px rgba(255, 212, 0, 0.7); }
.gd-devil.angel .gd-devil-nm b { color: #1a9a5c; }
.gd-devil.trick .gd-devil-ic { filter: drop-shadow(0 0 14px rgba(170, 90, 255, 0.9)); }
.gd-devil.trick .gd-devil-nm { background: #f1e6ff; color: #5a2a9a; box-shadow: 0 0 0 2px #a855f7; }
.gd-devil.trick .gd-devil-nm b { color: #a855f7; }
@keyframes gdAngel { 0% { opacity: 0; transform: translate(-50%, -200%) scale(0.6); } 25% { opacity: 1; transform: translate(-50%, -70%) scale(1.05); } 40% { transform: translate(-50%, -64%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -120%); } }
body.gd-angel-fx::after { content: ''; position: fixed; inset: 0; z-index: 58; pointer-events: none; background: radial-gradient(circle, rgba(255, 250, 210, 0.25), rgba(255, 200, 40, 0.55)); animation: gdDoom 1.2s ease-out forwards; }
.gd-devil.angel.big .gd-devil-ic { filter: drop-shadow(0 0 26px rgba(255, 215, 60, 1)); }

/* ⏰ 내 차례 5초 경고 · 💓 체력 낮을 때 · 💔 탈락 · 👑 우승 · 🎵 */
.stage.gd-hurry, #stage.gd-hurry { animation: gdHurry 0.5s ease-in-out infinite alternate; }
@keyframes gdHurry { from { box-shadow: 6px 6px 0 var(--ink), 0 0 0 3px #ff3b3b; } to { box-shadow: 6px 6px 0 var(--ink), 0 0 0 6px #ff3b3b, 0 0 24px 6px rgba(255, 59, 59, 0.5); } }
body.gd-lowhp::before { content: ''; position: fixed; inset: 0; z-index: 57; pointer-events: none; box-shadow: inset 0 0 90px 30px rgba(220, 20, 40, 0.55); animation: gdBeat 1.1s ease-in-out infinite; }
@keyframes gdBeat { 0%, 100% { opacity: 0.35; } 15% { opacity: 1; } 30% { opacity: 0.5; } 45% { opacity: 0.9; } }
.gd-pl.fx-out { animation: gdShatter 0.8s ease-out; filter: grayscale(1); }
@keyframes gdShatter { 0% { transform: scale(1); } 20% { transform: scale(1.06) rotate(-2deg); } 40% { transform: scale(0.96) rotate(2deg); } 100% { transform: scale(1); } }
.gd-crown { font-size: 54px; line-height: 1; animation: gdCrown 0.9s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 0 12px rgba(255, 200, 0, 0.8)); }
@keyframes gdCrown { from { transform: translateY(-120px) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.gd-bgm { margin-left: 8px; vertical-align: middle; font-size: 14px; padding: 2px 8px; }
@media (prefers-reduced-motion: reduce) { .stage.gd-hurry, #stage.gd-hurry, body.gd-lowhp::before, .gd-pl.fx-out, .gd-crown { animation: none; } }

/* ── 🎨 신의카드 도트 모드 (body.gd-px: 신의카드 화면에서만) ── */
.pxi { width: 1em; height: 1em; image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: -0.15em; display: inline-block; }
body.gd-px { --pxk: #1d2b53; }
body.gd-px #stage, body.gd-px .gd-float, body.gd-px .gd-devil, body.gd-px .gd-tip-box, body.gd-px #stage .btn { font-family: Galmuri11, 'Galmuri9', var(--display), monospace; -webkit-font-smoothing: none; }
body.gd-px #stage .lr-head h2, body.gd-px .gd-float.t-l, body.gd-px .gd-float.big { font-family: Galmuri14, Galmuri11, var(--display), monospace; }
/* 계단식 픽셀 테두리 */
body.gd-px .gd-pl, body.gd-px .gd-card, body.gd-px .gd-sk, body.gd-px #stage .btn, body.gd-px .gd-pv, body.gd-px .gd-ex, body.gd-px .gd-tip-box, body.gd-px .gd-devil-nm {
  border: 0; border-radius: 0;
  box-shadow: 0 -4px 0 0 var(--pxk), 0 4px 0 0 var(--pxk), -4px 0 0 0 var(--pxk), 4px 0 0 0 var(--pxk), 4px 8px 0 0 rgba(29, 43, 83, 0.3), 8px 4px 0 0 rgba(29, 43, 83, 0.3);
}
body.gd-px .gd-board { gap: 14px; padding: 4px; }
body.gd-px .gd-pl { margin: 4px; }
body.gd-px .gd-pl.turn { outline: 0; background: #fff8d6; box-shadow: 0 -4px 0 0 #ffa300, 0 4px 0 0 #ffa300, -4px 0 0 0 #ffa300, 4px 0 0 0 #ffa300, 0 -8px 0 0 var(--pxk), 0 8px 0 0 var(--pxk), -8px 0 0 0 var(--pxk), 8px 0 0 0 var(--pxk); }
body.gd-px .gd-pl.hit { outline: 0; background: #ffe2e8; box-shadow: 0 -4px 0 0 #ff004d, 0 4px 0 0 #ff004d, -4px 0 0 0 #ff004d, 4px 0 0 0 #ff004d, 0 -8px 0 0 var(--pxk), 0 8px 0 0 var(--pxk), -8px 0 0 0 var(--pxk), 8px 0 0 0 var(--pxk); }
body.gd-px .gd-pl.gd-pick { outline: 0; animation: gdPxBlink 0.8s steps(2) infinite; }
@keyframes gdPxBlink { 50% { box-shadow: 0 -4px 0 0 #29adff, 0 4px 0 0 #29adff, -4px 0 0 0 #29adff, 4px 0 0 0 #29adff, 0 -8px 0 0 var(--pxk), 0 8px 0 0 var(--pxk), -8px 0 0 0 var(--pxk), 8px 0 0 0 var(--pxk); } }
body.gd-px .gd-pl.fx-guard { box-shadow: 0 -4px 0 0 #ffec27, 0 4px 0 0 #ffec27, -4px 0 0 0 #ffec27, 4px 0 0 0 #ffec27, 0 -8px 0 0 var(--pxk), 0 8px 0 0 var(--pxk), -8px 0 0 0 var(--pxk), 8px 0 0 0 var(--pxk), 0 0 0 14px rgba(255, 236, 39, 0.45); }
body.gd-px .gd-pl.fx-crack { box-shadow: 0 -4px 0 0 #29adff, 0 4px 0 0 #29adff, -4px 0 0 0 #29adff, 4px 0 0 0 #29adff, 0 -8px 0 0 var(--pxk), 0 8px 0 0 var(--pxk), -8px 0 0 0 var(--pxk), 8px 0 0 0 var(--pxk); animation: gdPxShake 0.25s steps(4); }
body.gd-px .gd-pl.fx-curse { box-shadow: 0 -4px 0 0 #a75bd6, 0 4px 0 0 #a75bd6, -4px 0 0 0 #a75bd6, 4px 0 0 0 #a75bd6, 0 -8px 0 0 var(--pxk), 0 8px 0 0 var(--pxk), -8px 0 0 0 var(--pxk), 8px 0 0 0 var(--pxk); }
body.gd-px .gd-pl.fx-shake-s { animation: gdPxShake 0.25s steps(4); }
body.gd-px .gd-pl.fx-shake-m { animation: gdPxShake 0.4s steps(6); background: #ffd0d8; }
body.gd-px .gd-pl.fx-shake-l { animation: gdPxShake 0.55s steps(8); background: #ffa0b4; }
@keyframes gdPxShake { 20% { translate: -6px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 2px; } 80% { translate: 4px -2px; } }
body.gd-px #room.gd-quake { animation: gdQuake 0.45s steps(6); }
/* 체력바는 원래 모양 그대로 (도트 모드에서도) */
body.gd-px .gd-hp span { font-family: var(--body); }
/* 카드 */
body.gd-px .gd-card { margin: 4px; min-height: 110px; }
body.gd-px .gd-card.k-weapon { background: #ffe2e8; }
body.gd-px .gd-card.k-armor { background: #dcefff; }
body.gd-px .gd-card.k-misc { background: #ddf8e4; }
body.gd-px .gd-card.k-trade { background: #fff3c4; }
body.gd-px .gd-card .gd-ic { font-size: 40px; line-height: 1; margin: 2px 0; }
body.gd-px .gd-card .gd-ic .pxi { width: 40px; height: 40px; vertical-align: top; }
body.gd-px .gd-card.sel { outline: 0; transform: translateY(-6px); box-shadow: 0 -4px 0 0 #ffec27, 0 4px 0 0 #ffec27, -4px 0 0 0 #ffec27, 4px 0 0 0 #ffec27, 0 -8px 0 0 var(--pxk), 0 8px 0 0 var(--pxk), -8px 0 0 0 var(--pxk), 8px 0 0 0 var(--pxk); }
body.gd-px .gd-card:not(.off):hover { transform: translateY(-4px); }
body.gd-px .gd-card .gd-nm { font-size: 12px; }
body.gd-px .gd-card .gd-val { font-family: Galmuri9, monospace; font-size: 11px; }
body.gd-px .gd-card .gd-mp { font-family: Galmuri9, monospace; border-radius: 0; }
body.gd-px .gd-sk .gd-ic .pxi { width: 26px; height: 26px; }
body.gd-px .gd-ico .pxi { width: 20px; height: 20px; }
body.gd-px .gd-ico { border-radius: 0; }
body.gd-px .gd-skills { gap: 12px; padding: 0 4px; }
/* 기록: 어두운 게임 메시지 창 */
body.gd-px .gd-log { background: var(--pxk); color: #fff1e8; border: 0; border-radius: 0; box-shadow: 0 0 0 4px #fff1e8, 0 0 0 7px var(--pxk); margin: 12px 7px; padding: 8px 10px; font-family: Galmuri9, monospace; }
body.gd-px .gd-log .gd-lw { color: #ffec27; }
body.gd-px .gd-log .minus { color: #ff77a8; }
body.gd-px .gd-log .plus { color: #00e436; }
/* 연출 */
body.gd-px .gd-float { animation-timing-function: steps(6); text-shadow: 3px 0 0 var(--pxk), -3px 0 0 var(--pxk), 0 3px 0 var(--pxk), 0 -3px 0 var(--pxk), 3px 3px 0 var(--pxk); color: #fff; }
body.gd-px .gd-float.minus { color: #ff004d; }
body.gd-px .gd-float.plus { color: #00e436; }
body.gd-px .gd-float.gd-txt-gold { color: #ffec27; }
body.gd-px .gd-float.gd-txt-blue { color: #29adff; }
body.gd-px .gd-float.gd-txt-red { color: #ff004d; }
body.gd-px .gd-float.icon { text-shadow: none; }
body.gd-px .gd-float .pxi { width: 48px; height: 48px; }
body.gd-px .gd-fly { filter: drop-shadow(4px 4px 0 rgba(29, 43, 83, 0.4)); }
body.gd-px .gd-fly .pxi { width: 52px; height: 52px; }
body.gd-px .gd-bit .pxi { width: 28px; height: 28px; }
body.gd-px .gd-bit.sq { width: 8px; height: 8px; box-shadow: 0 0 0 2px var(--pxk); }
body.gd-px .gd-devil-ic .pxi { width: 64px; height: 64px; }
body.gd-px .gd-devil.big .gd-devil-ic .pxi { width: 88px; height: 88px; }
body.gd-px .gd-devil-nm { background: #fff1e8; color: var(--pxk); padding: 4px 8px; border-radius: 0; }
body.gd-px .gd-tip-ic .pxi { width: 72px; height: 72px; }
body.gd-px .gd-tip-box { background: #fffaf3; }
@media (prefers-reduced-motion: reduce) {
  body.gd-px .gd-pl.fx-shake-s, body.gd-px .gd-pl.fx-shake-m, body.gd-px .gd-pl.fx-shake-l, body.gd-px .gd-pl.fx-crack, body.gd-px .gd-pl.gd-pick { animation: none; }
}
body.gd-px .gd-sk.empty { box-shadow: none; outline: 3px dashed #83769c; outline-offset: -3px; background: #f4f0ea; }
body.gd-px .gd-card.off { box-shadow: 0 -4px 0 0 #83769c, 0 4px 0 0 #83769c, -4px 0 0 0 #83769c, 4px 0 0 0 #83769c; }
.gd-doom-left { font-weight: 700; color: #b0003a; white-space: nowrap; }
.gd-doom-left.on { color: #fff; background: #b0003a; padding: 1px 6px; border-radius: 6px; }
body.gd-px .gd-doom-left.on { border-radius: 0; }
/* 😈 종말 선택지가 많을 때 폰에서는 4칸씩 반듯하게 */
@media (max-width: 700px) {
  .seg.gd-doom-seg { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; }
  .seg.gd-doom-seg button { padding: 8px 4px; font-size: 15px; white-space: nowrap; box-shadow: 0 0 0 1px var(--ink); }
  .seg.gd-doom-seg button + button { border-left: 0; }
}
/* 🎰 룰렛 연출 */
.gd-roul { position: fixed; inset: 0; z-index: 62; display: grid; place-items: center; background: rgba(20, 16, 40, 0.35); pointer-events: none; animation: gdRoulIn 0.25s ease-out; }
@keyframes gdRoulIn { from { opacity: 0; } }
.gd-roul-box { position: relative; display: grid; justify-items: center; gap: 10px; }
.gd-roul-pin { font-size: 30px; line-height: 1; color: var(--ink); margin-bottom: -16px; z-index: 2; text-shadow: 0 2px 0 #fff; }
.gd-roul-wheel { position: relative; width: 190px; height: 190px; border-radius: 50%; border: 5px solid var(--ink); box-shadow: 0 6px 0 var(--ink), 0 0 0 6px #fff; transition: transform 2.4s cubic-bezier(0.12, 0.7, 0.18, 1); }
.gd-roul-nm { position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -40px; width: 80px; text-align: center; font-family: var(--display); font-size: 15px; color: #fff; text-shadow: 1px 1px 0 var(--ink), -1px -1px 0 var(--ink), 1px -1px 0 var(--ink), -1px 1px 0 var(--ink); white-space: nowrap; }
.gd-roul-hub { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; border: 4px solid var(--ink); display: grid; place-items: center; font-style: normal; font-size: 22px; }
.gd-roul-msg { font-family: var(--display); font-size: 22px; color: #fff; background: var(--ink); padding: 6px 16px; border-radius: 12px; }
.gd-roul.done .gd-roul-msg { background: #ff004d; animation: gdRoulWin 0.5s ease-out; }
@keyframes gdRoulWin { 30% { transform: scale(1.25); } }
body.gd-px .gd-roul-msg, body.gd-px .gd-roul-nm { font-family: Galmuri11, var(--display), monospace; }
body.gd-px .gd-roul-msg { border-radius: 0; box-shadow: 0 0 0 3px #fff1e8; }
.gd-log li.gd-hold { display: none; }

/* ── 📱 신의카드 모바일 배치 (700px 이하만 · PC는 그대로) ── */
.gd-m { display: contents; }
.gd-arena, .gd-mmenu, .gd-m-skbtn, .gd-mhp { display: none; }
@media (max-width: 700px) {
  .gd-m { display: flex; flex-direction: column; gap: 10px; }
  .gd-m > * { margin-top: 0; margin-bottom: 0; }
  .gd-m > .lr-head, .gd-m > .gd-doom-row { order: 0; }
  .gd-m > .lr-head { flex-wrap: nowrap; align-items: center; }
  .gd-m > .lr-head h2 { font-size: 18px; white-space: nowrap; }
  .gd-m > .lr-head > span { font-size: 13px; text-align: right; }
  .gd-m > .gd-arena { order: 1; }
  .gd-m > .lr-now, .gd-m > .hint, .gd-m > .gd-pv, .gd-m > .gd-ex { order: 2; }
  .gd-m > .gd-hand { order: 3; }
  .gd-m > .gd-powder { order: 3; }
  .gd-m > .gd-board { order: 4; }
  .gd-m > .gd-m-skbtn { order: 5; }
  .gd-m > .gd-skills { order: 5; }
  .gd-m > .gd-log { order: 6; }

  /* ① 싸움판 */
  .gd-arena { display: block; position: relative; background: #ffe2e8; border: var(--line); border-radius: 12px; padding: 10px 8px 10px; box-shadow: 3px 3px 0 var(--ink); }
  .gd-a-who { display: flex; align-items: center; justify-content: center; gap: 6px; }
  .gd-a-pill { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 6px; font-family: var(--display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gd-a-pill.atk { background: #fff3c4; }
  .gd-a-pill.def { background: #dcefff; }
  .gd-a-arrow { font-size: 18px; flex: none; }
  .gd-a-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .gd-a-col { min-height: 64px; background: rgba(255, 255, 255, 0.55); border-radius: 8px; padding: 5px; display: grid; gap: 5px; align-content: start; }
  .gd-a-card { display: grid; grid-template-columns: 34px 1fr; gap: 6px; align-items: center; background: #fff3c4; border: 2px solid var(--ink); border-radius: 6px; padding: 3px 5px; font-size: 13px; line-height: 1.2; }
  .gd-a-card.def { background: #dcefff; }
  .gd-a-card b { display: block; font-weight: 400; font-family: var(--display); font-size: 14px; }
  .gd-a-card small { font-size: 11px; }
  .gd-a-art { font-size: 28px; line-height: 1; display: grid; place-items: center; }
  .gd-a-art .pxi { width: 32px; height: 32px; }
  .gd-a-wait { margin: 0; align-self: center; text-align: center; font-size: 12px; color: var(--muted); padding: 16px 2px; }
  .gd-a-sums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .gd-a-sum { text-align: center; font-family: var(--display); font-size: 18px; padding: 4px 0; border: 2px solid var(--ink); border-radius: 8px; background: #fff3c4; }
  .gd-a-sum.def { background: #dcefff; }
  .gd-a-pv { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin-top: 6px; font-size: 13px; }
  .gd-a-pv b { font-family: var(--display); font-size: 34px; color: #e8003d; font-weight: 400; line-height: 1; }
  .gd-a-pv.ok b { color: #11a35f; }
  .gd-a-pv.dead { color: #e8003d; font-weight: 700; }
  .gd-a-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .gd-a-acts .btn { font-size: 15px; padding: 9px 4px; }
  .gd-a-last { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
  .gd-a-last b { color: #e8003d; }
  .gd-a-big { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 5; font-family: var(--display); font-size: 40px; color: #fff; background: rgba(31, 27, 58, 0.88); padding: 6px 18px; border-radius: 12px; white-space: nowrap; pointer-events: none; animation: gdABig 1.3s ease-out forwards; }
  .gd-a-big.dmg { color: #ff5a7a; }
  .gd-a-big.ok { color: #ffec27; font-size: 30px; }
  @keyframes gdABig { 0% { opacity: 0; scale: 0.6; } 15% { opacity: 1; scale: 1.1; } 25% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
  /* 방어할 때는 위 안내 · 미리보기 · 손패 아래 버튼 대신 싸움판을 써요 */
  .gd-m.mdef > .lr-now.bad, .gd-m.mdef > .gd-pv, .gd-m.mdef .gd-hand .gd-skip { display: none; }

  /* ② 손패: 6칸 타일 */
  .gd-m .gd-hand { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
  .gd-m .gd-hand .gd-card { min-height: 0; aspect-ratio: 1 / 1.25; padding: 4px 1px 0; gap: 0; justify-content: space-between; border-radius: 8px; overflow: hidden; }
  .gd-m .gd-hand .gd-card .gd-nm { display: none; }
  .gd-m .gd-hand .gd-card .gd-ic { font-size: 26px; flex: 1; display: grid; place-items: center; }
  .gd-m .gd-hand .gd-card .gd-ic .pxi { width: 32px; height: 32px; }
  .gd-m .gd-hand .gd-card .gd-val { width: 100%; text-align: center; font-size: 10px; white-space: nowrap; overflow: hidden; background: rgba(255, 255, 255, 0.7); padding: 2px 0; }
  .gd-m .gd-hand .gd-card .gd-mp { position: absolute; top: 1px; right: 1px; font-size: 8px; padding: 0 2px; }
  .gd-m .gd-hand .gd-card .gd-note { position: absolute; top: 1px; left: 1px; right: 1px; font-size: 8px; padding: 0; }
  .gd-m .gd-hand .gd-mmenu { display: flex; background: var(--ink); color: #fff; font-size: 22px; align-items: center; justify-content: center; }
  .gd-m .gd-hand .gd-mmenu small { font-size: 9px; line-height: 1.2; margin-top: 2px; }
  .gd-m .gd-hand .gd-pray { display: none; }
  .gd-m.mopen .gd-hand .gd-pray { display: block; grid-column: span 3; font-size: 14px; padding: 8px 4px; }
  .gd-m .gd-hand .gd-skip { grid-column: span 3; font-size: 14px; padding: 8px 4px; }

  /* ③ 사람 목록: 한 줄씩 */
  .gd-m .gd-board { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .gd-m .gd-pl { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 'who stat ico' 'hp hp hp'; align-items: center; column-gap: 8px; padding: 6px 10px 7px; }
  .gd-m .gd-pl .gd-who { grid-area: who; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gd-m .gd-pl .gd-stat { grid-area: stat; margin: 0; gap: 8px; }
  .gd-m .gd-pl .gd-mhp { display: inline; }
  .gd-m .gd-pl .gd-ico-row { grid-area: ico; margin: 0; flex-wrap: nowrap; }
  .gd-m .gd-pl .gd-hp { grid-area: hp; height: 7px; margin: 5px 0 0; border-width: 1px; }
  .gd-m .gd-pl .gd-hp span { display: none; }
  .gd-m .gd-pl.me { background: #e3f0ff; }
  .gd-m .gd-pl.turn { background: #fff3c4; }

  /* ⑤ 마나 스킬: 버튼을 누르면 펼쳐져요 */
  .gd-m .gd-m-skbtn { display: block; width: 100%; background: #efe6ff; font-size: 16px; }
  .gd-m .gd-skills { display: none; }
  .gd-m.skopen .gd-skills { display: grid; }
  .gd-m > .gd-log { margin-top: 2px; }
}
/* 📱 모바일 배치 다듬기 */
@media (max-width: 700px) {
  .room:has(.gd-m) #players { display: none; } /* 같은 정보가 아래 사람 목록에 있어요 */
  .gd-m > .lr-head { flex-wrap: wrap; row-gap: 2px; }
  .gd-m > .lr-head > span { width: 100%; text-align: left; font-size: 13px; }
  .gd-m > .lr-now { font-size: 15px; }
  .gd-m .gd-hand { gap: 6px; }
  .gd-m .gd-hand .gd-card { aspect-ratio: auto; height: 66px; min-height: 0; margin: 0; }
  .gd-m .gd-hand .gd-card .gd-val { font-size: 10px; line-height: 14px; }
  .gd-m .gd-hand .gd-pray, .gd-m .gd-hand .gd-skip { min-height: 0; }
  .gd-m.mopen .gd-hand .gd-pray { display: block; grid-column: span 2; font-size: 13px; padding: 6px 2px; }
  .gd-m.mopen .gd-hand .gd-pray small { font-size: 10px; }
  body.gd-px .gd-m .gd-hand .gd-card { margin: 3px; box-shadow: 0 -3px 0 0 var(--pxk), 0 3px 0 0 var(--pxk), -3px 0 0 0 var(--pxk), 3px 0 0 0 var(--pxk); }
  body.gd-px .gd-m .gd-hand .gd-card.sel { box-shadow: 0 -3px 0 0 #ffec27, 0 3px 0 0 #ffec27, -3px 0 0 0 #ffec27, 3px 0 0 0 #ffec27, 0 -6px 0 0 var(--pxk), 0 6px 0 0 var(--pxk), -6px 0 0 0 var(--pxk), 6px 0 0 0 var(--pxk); }
  body.gd-px .gd-m .gd-hand .gd-card.off { box-shadow: 0 -3px 0 0 #83769c, 0 3px 0 0 #83769c, -3px 0 0 0 #83769c, 3px 0 0 0 #83769c; }
  body.gd-px .gd-m .gd-hand .btn { margin: 3px; }
  body.gd-px .gd-m .gd-pl { margin: 3px 4px; }
  body.gd-px .gd-arena { border: 0; border-radius: 0; margin: 4px; box-shadow: 0 -4px 0 0 var(--pxk), 0 4px 0 0 var(--pxk), -4px 0 0 0 var(--pxk), 4px 0 0 0 var(--pxk); }
  body.gd-px .gd-a-pill, body.gd-px .gd-a-card, body.gd-px .gd-a-sum, body.gd-px .gd-a-col, body.gd-px .gd-a-big { border-radius: 0; }
  body.gd-px .gd-a-pill, body.gd-px .gd-a-sum, body.gd-px .gd-a-card, body.gd-px .gd-a-big { font-family: Galmuri11, var(--display), monospace; }
  body.gd-px .gd-a-card b { font-family: Galmuri11, var(--display), monospace; }
  body.gd-px .gd-a-acts .btn { margin: 3px; }
}
.gd-mo { display: none; }
@media (max-width: 700px) {
  .gd-m .gd-pc { display: none; }
  .gd-m .gd-mo { display: inline; }
  .gd-m .gd-pl .gd-aim { top: -11px; right: 12px; background: #fff; border: 2px solid currentColor; border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 18px; }
}
/* 📱 폰: 손패 타일 위 검은 글씨표(막기 N · ✔ 고름)는 숨기고 고른 카드는 ✔ 표시 · 긴 안내 글씨는 줄바꿈 */
@media (max-width: 700px) {
  .gd-m .gd-hand .gd-card .gd-note { display: none; }
  .gd-m .gd-hand .gd-card.sel::after { content: '✔'; position: absolute; top: 2px; left: 3px; font-size: 12px; line-height: 1; color: #fff; background: #11a35f; border-radius: 4px; padding: 1px 3px; }
  body.gd-px .big-pop { white-space: normal; word-break: keep-all; text-align: center; width: max-content; max-width: 92vw; font-size: clamp(22px, 6.5vw, 32px); line-height: 1.25; padding: 8px 16px; }
}
/* 👼 수호신 등장 · 공격 */
.gd-devil.guard .gd-devil-ic { filter: drop-shadow(0 0 14px rgba(255, 214, 0, 0.9)); }
.gd-devil.guard .gd-devil-ic .pxi { width: 72px; height: 72px; }
.gd-devil.guard.big .gd-devil-ic .pxi { width: 96px; height: 96px; }
.gd-devil.guard .gd-devil-nm { background: #0f3a2a; color: #fff; box-shadow: 0 0 0 2px #ffd400; }
.gd-devil.guard .gd-devil-nm b { color: #ffe066; }
@media (max-width: 700px) {
  .gd-a-big.guard { font-size: 20px; color: #ffe066; background: rgba(15, 58, 42, 0.92); padding: 8px 14px; white-space: normal; text-align: center; width: max-content; max-width: 90%; word-break: keep-all; }
}

/* 🔔 할리갈리 */
.hl-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 12px 0; }
.hl-table.n2 { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.hl-table.n4 { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.hl-seat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; background: var(--paper); border: var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: transform .15s; min-width: 0; }
.hl-seat.me { background: #fff8dc; }
.hl-seat.turn { outline: 4px solid var(--p1); outline-offset: 2px; transform: translateY(-3px); }
.hl-seat.out { opacity: .45; filter: grayscale(1); }
.hl-seat.win { background: #d9ffe9; animation: hl-win .7s ease-out; }
.hl-seat.bad { background: #ffe0e0; animation: hl-shake .4s; }
.hl-name { font-size: 14px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-cnt { font-size: 13px; color: var(--muted); }
.hl-card { position: relative; width: 78px; height: 106px; background: #fff; border: var(--line); border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.hl-card.empty { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #f2f2f7 0 8px, #e6e6ef 8px 16px); box-shadow: none; border-style: dashed; }
.hl-card.empty span { font-size: 12px; color: var(--muted); }
.hl-card.f-straw { background: #fff1f1; } .hl-card.f-banana { background: #fffbe0; }
.hl-card.f-grape { background: #f4ecff; } .hl-card.f-lime { background: #effbe4; }
.hl-fr { position: absolute; transform: translate(-50%, -50%); font-size: 20px; line-height: 1; }
.hl-fr img, .hl-fr canvas, .hl-fr .px { width: 24px; height: 24px; image-rendering: pixelated; }
.hl-card.flip { animation: hl-flip .32s ease-out; }
.hl-card.fly { animation: hl-fly .6s ease-in forwards; }
.hl-turn, .hl-ev { text-align: center; margin: 8px 0; font-size: 17px; min-height: 28px; }
.hl-ev { font-family: var(--display); font-size: 20px; }
.hl-ev.bell { color: #128a52; } .hl-ev.wrong { color: #d6333a; } .hl-ev.out { color: var(--muted); }
.hl-ctrl { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 4px; }
.hl-flip { display: flex; flex-direction: column; align-items: center; min-width: 120px; font-size: 18px; }
.hl-flip small { font-size: 12px; opacity: .8; }
.hl-bell { width: 120px; height: 120px; border-radius: 50%; border: var(--line); background: radial-gradient(circle at 35% 30%, #fff3b0, var(--p3) 55%, #d99a00); box-shadow: 0 6px 0 var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font-family: var(--display); font-size: 22px; color: var(--ink); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.hl-bell img, .hl-bell canvas, .hl-bell .px { width: 44px; height: 44px; image-rendering: pixelated; }
.hl-bell:active, .hl-bell.hit { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.hl-bell.hit { animation: hl-ring .35s; }
.hl-bell:disabled { filter: grayscale(.7); opacity: .6; cursor: default; }
.hl-crown { font-size: 54px; text-align: center; animation: hl-ring 1s infinite; }
@keyframes hl-flip { from { transform: rotateY(90deg) scale(.9); } to { transform: none; } }
@keyframes hl-fly { to { transform: scale(.4) translateY(40px); opacity: 0; } }
@keyframes hl-win { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes hl-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes hl-ring { 25% { rotate: -8deg; } 75% { rotate: 8deg; } }
@media (max-width: 700px) {
  .hl-table, .hl-table.n2, .hl-table.n4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hl-table.n3 .hl-seat:first-child, .hl-table.n5 .hl-seat:first-child { grid-column: 1 / -1; }
  .hl-card { width: 64px; height: 88px; }
  .hl-fr { font-size: 16px; } .hl-fr img, .hl-fr canvas, .hl-fr .px { width: 19px; height: 19px; }
  .hl-ctrl { position: sticky; bottom: 0; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--sky) 30%); }
  .hl-bell { width: 104px; height: 104px; }
}
@media (prefers-reduced-motion: reduce) { .hl-card.flip, .hl-card.fly, .hl-seat.win, .hl-seat.bad, .hl-bell.hit, .hl-crown { animation: none; } }
.hl-name .who, .hl-turn .who, .hl-ev .who, .gd-px .hl-seat .who { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
@media (min-width: 701px) {
  .hl-table { gap: 10px; margin: 8px 0; }
  .hl-seat { padding: 6px; gap: 4px; }
  .hl-card { width: 66px; height: 90px; }
  .hl-turn, .hl-ev { margin: 4px 0; }
  .hl-ctrl { margin-top: 4px; }
  .hl-bell { width: 96px; height: 96px; font-size: 19px; }
  .hl-bell img, .hl-bell canvas, .hl-bell .px { width: 36px; height: 36px; }
}
@media (max-width: 700px) {
  .hl-table.n5, .hl-table.n6 { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .hl-table.n5 .hl-seat:first-child { grid-column: auto; }
  .hl-table.n5 .hl-seat, .hl-table.n6 .hl-seat { padding: 6px 2px; gap: 3px; }
  .hl-table.n5 .hl-name, .hl-table.n6 .hl-name { font-size: 12px; }
  .hl-table.n5 .hl-cnt, .hl-table.n6 .hl-cnt { font-size: 11px; }
  .hl-table.n5 .hl-card, .hl-table.n6 .hl-card { width: 54px; height: 74px; }
  .hl-table.n5 .hl-fr img, .hl-table.n6 .hl-fr img { width: 16px; height: 16px; }
  .hl-table.n5 .dotc, .hl-table.n6 .dotc { width: 10px; height: 10px; }
}
.dr-answer .who { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.hl-rank td:first-child { white-space: nowrap; width: 1%; }
.hl-rank .who { white-space: nowrap; }
.hl-rank td.n { font-size: 13px; text-align: right; }
@media (max-width: 700px) { .hl-rank .who { font-size: 15px; } .hl-rank td.n { font-size: 12px; } }

/* 🎴 3장 섯다 */
body.sd-on {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 214, 140, .3), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.05) 0 2px, transparent 2px 60px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.05) 0 2px, transparent 2px 60px),
    #b9884a;
}
.sd-wrap { --felt: #2f5d46; --felt2: #24493a; --wood: #6b3f22; --wood2: #4a2914; --gold: #ffcf4a; --cream: #fbf3df; --red: #c8232c;
  display: grid; grid-template-columns: 1fr 236px; gap: 12px; margin: -6px; }
.sd-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sd-top h2 { margin: 0; font: 24px var(--display); }
.sd-top .chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #3a2414; color: #fff; font-size: 13px; }
.sd-top .chip.t:empty { display: none; }
.sd-top .chip b.me { color: var(--gold); }
.sd-jbtn, .sd-x { display: none; }
.sd-table {
  position: relative; min-height: 680px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(255,240,190,.18), transparent 65%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 3px, transparent 3px 7px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.06) 0 3px, transparent 3px 7px),
    linear-gradient(var(--felt), var(--felt2));
  border: 12px solid var(--wood);
  box-shadow: inset 0 0 0 3px var(--wood2), inset 0 0 60px rgba(0,0,0,.55), 0 8px 0 var(--wood2), 0 14px 24px rgba(0,0,0,.3);
}
.sd-table::before { content: ''; position: absolute; inset: 8px; border: 2px dashed rgba(255, 230, 170, .28); border-radius: 14px; pointer-events: none; }
.sd-seats { position: absolute; inset: 0; }
.sd-seat { position: absolute; width: 138px; transform: translate(-50%, -50%); background: rgba(20, 12, 6, .74); border: 2px solid rgba(255, 220, 150, .35); border-radius: 12px; padding: 6px 8px;
  display: grid; grid-template-columns: 30px 1fr; gap: 0 6px; align-items: center; transition: box-shadow .2s; }
.sd-seat .av { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #fff; font: 15px var(--display); color: #fff; }
.sd-seat .nm { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-seat .mn { font-size: 12px; color: var(--gold); }
.sd-seat .act { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 4px; min-height: 26px; }
.sd-seat .bk, .sd-seat .sd-open { display: flex; gap: 2px; }
.sd-seat .jb { grid-column: 1 / -1; text-align: center; font: 15px var(--display); color: #fff; margin-top: 3px; }
.sd-seat .jb.w { color: var(--gold); } .sd-seat .jb b { color: #9bf7b8; font-size: 13px; }
.sd-seat .tm { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; margin-top: 4px; }
.sd-seat .tm i { display: block; height: 100%; width: 100%; background: var(--gold); transition: width .2s linear; }
.sd-seat.turn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 207, 74, .45), 0 0 18px rgba(255, 207, 74, .5); }
.sd-seat.fold, .sd-seat.out { opacity: .45; }
.sd-seat.win { border-color: var(--gold); background: rgba(70, 50, 8, .85); animation: hl-win .7s ease-out; }
.sd-seat.acted .tag { animation: sd-pop .35s ease-out; }
.sd-wrap .tag { font: 12px var(--display); padding: 1px 7px; border-radius: 6px; background: #fff; color: var(--ink); white-space: nowrap; }
.sd-wrap .tag.call { background: #8fd6ff; } .sd-wrap .tag.ddadang { background: #ff9f43; } .sd-wrap .tag.half { background: #ff5a5f; color: #fff; } .sd-wrap .tag.die { background: #555; color: #bbb; }
.sd-wrap .sun { display: inline-block; font: 11px var(--display); background: var(--gold); color: var(--ink); border-radius: 4px; padding: 0 4px; }
.sd-pot { position: absolute; left: 50%; top: 36%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.sd-pot .coins { font-size: 34px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.4)); }
.sd-pot .sum { font: 28px var(--display); color: var(--gold); text-shadow: 2px 2px 0 #000; white-space: nowrap; }
.sd-pot .base { font-size: 12px; opacity: .85; }
.sd-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--cream); color: var(--ink); border: 3px solid var(--wood2); box-shadow: 0 0 0 3px var(--gold); border-radius: 12px; padding: 6px 16px; font: 20px var(--display); white-space: nowrap; animation: sd-pop .4s ease-out; z-index: 2; }
.sd-banner b { color: var(--red); } .sd-banner.re { background: #fff0c2; }
/* 화투 */
.sd-wrap .hw { position: relative; width: 62px; height: 92px; border-radius: 7px; background: var(--red); padding: 4px; box-shadow: 3px 3px 0 rgba(0,0,0,.45); flex: none; }
.sd-wrap .hw svg { display: block; width: 100%; height: 100%; border-radius: 4px; }
.sd-wrap .hw .mo { position: absolute; left: 6px; bottom: 4px; font: 15px var(--display); color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
.sd-wrap .hw .gw { position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--red); font: 12px/17px var(--display); text-align: center; border: 2px solid var(--red); }
.sd-wrap .hw.big { width: 80px; height: 118px; } .sd-wrap .hw.big .mo { font-size: 19px; } .sd-wrap .hw.big .gw { width: 24px; height: 24px; font-size: 14px; line-height: 21px; }
.sd-wrap .hw.sm { width: 40px; height: 60px; padding: 2px; border-radius: 5px; box-shadow: 2px 2px 0 rgba(0,0,0,.4); } .sd-wrap .hw.sm .mo { font-size: 11px; left: 3px; bottom: 1px; } .sd-wrap .hw.sm .gw { width: 14px; height: 14px; font-size: 9px; line-height: 11px; right: 2px; top: 2px; border-width: 1.5px; }
.sd-wrap .hw.xs { width: 20px; height: 30px; padding: 2px; border-radius: 3px; box-shadow: 1px 1px 0 rgba(0,0,0,.4); } .sd-wrap .hw.xs .mo { font-size: 9px; left: 2px; bottom: 0; } .sd-wrap .hw.xs .gw { display: none; }
.sd-wrap .hw.back { background: linear-gradient(135deg, #d22d36, #8f1219); border: 1.5px solid #fff; padding: 0; }
.sd-wrap .hw.dim { opacity: .35; transform: translateY(6px); }
.sd-wrap .hw.deal { animation: sd-deal .45s ease-out; }
/* 패 고르기 */
.sd-pick { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); width: min(520px, 92%); background: var(--cream); color: var(--ink); border: 4px solid var(--wood2); border-radius: 14px; padding: 12px 14px 12px; box-shadow: 0 0 0 4px var(--gold), 0 16px 40px rgba(0,0,0,.55); z-index: 3; }
.sd-pick h3 { margin: 0 0 8px; text-align: center; font: 21px var(--display); }
.sd-pick h3 small { display: block; font: 13px var(--body); color: #6b5a44; }
.sd-pick .combos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sd-pick .combo { border: 3px solid #d8c7a4; border-radius: 12px; background: #fff; padding: 10px 4px 6px; text-align: center; cursor: pointer; position: relative; font: inherit; color: var(--ink); }
.sd-pick .combo .pair { display: flex; justify-content: center; gap: 4px; }
.sd-pick .combo b { display: block; margin-top: 6px; font: 17px var(--display); }
.sd-pick .combo > span:last-child { font-size: 12px; color: #6b5a44; }
.sd-pick .combo:hover:not(:disabled) { transform: translateY(-2px); border-color: #b08a4a; }
.sd-pick .combo.best { border-color: var(--red); background: #fff4e8; }
.sd-pick .combo.best::before { content: '👑 추천'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--red); color: #fff; font: 12px var(--display); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.sd-pick .combo.sp b { color: #6d4ac2; }
.sd-pick .combo.chosen { outline: 4px solid var(--p2); }
.sd-pick .cd { text-align: center; margin: 8px 0 0; font-size: 12px; color: #6b5a44; }
/* 내 패 · 베팅 */
.sd-mybar { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 8px 12px; }
.sd-myhand { display: flex; gap: 6px; padding: 8px 10px 10px; background: rgba(20, 12, 6, .62); border-radius: 14px; border: 2px solid rgba(255,220,150,.35); }
.sd-myhand.win { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,207,74,.6); }
.sd-myhand.fold .hw { filter: grayscale(.8); opacity: .6; }
.sd-myhand.watch { padding: 14px; font-size: 14px; }
.sd-myhand .myjb { align-self: center; text-align: center; min-width: 78px; display: flex; flex-direction: column; }
.sd-myhand .myjb b { font: 22px var(--display); color: var(--gold); text-shadow: 2px 2px 0 #000; }
.sd-myhand .myjb span { font-size: 12px; opacity: .9; }
.sd-myhand .myjb .mm { margin-top: 4px; color: var(--gold); opacity: 1; }
.sd-bets { flex: 1 1 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sd-bets .bet { border: 3px solid var(--ink); border-radius: 12px; padding: 7px 2px 5px; font: 20px var(--display); color: var(--ink); box-shadow: 0 5px 0 var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; touch-action: manipulation; }
.sd-bets .bet small { font: 11px var(--body); margin-top: 3px; opacity: .85; white-space: nowrap; }
.sd-bets .bet kbd { font: 10px var(--body); background: rgba(0,0,0,.12); border-radius: 4px; padding: 0 4px; margin-top: 3px; }
.sd-bets .bet.ping { background: #e9f6ff; } .sd-bets .bet.ddadang { background: #ffd08a; } .sd-bets .bet.half { background: #ff8b8f; } .sd-bets .bet.call { background: #9be3b8; } .sd-bets .bet.die { background: #cfcfd6; }
.sd-bets .bet:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.sd-bets .bet:disabled { opacity: .38; cursor: default; }
/* 족보표 */
.sd-side { display: flex; flex-direction: column; gap: 10px; }
.sd-jokbo { color: var(--ink); border-radius: 6px; padding: 12px 10px 10px; position: relative; background: repeating-linear-gradient(0deg, transparent 0 25px, rgba(120, 90, 50, .14) 25px 26px), #f7ecd0;
  box-shadow: 0 0 0 2px #c9b48a, 5px 7px 0 rgba(60, 30, 10, .35); transform: rotate(.6deg); }
.sd-jokbo::before { content: ''; position: absolute; top: -8px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a8a, #b3151f); box-shadow: 0 2px 2px rgba(0,0,0,.4); }
.sd-jokbo h3 { margin: 0 0 4px; text-align: center; font: 22px var(--display); letter-spacing: 6px; }
.sd-jokbo ol { list-style: none; margin: 0; padding: 0; }
.sd-jokbo li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 4px; padding: 1px 3px; border-radius: 6px; font-size: 13px; }
.sd-jokbo li .no { font: 12px var(--display); color: #8b6b3d; text-align: right; }
.sd-jokbo li .nm { font-weight: 700; } .sd-jokbo li .nm small { font-weight: 400; color: #7a6548; margin-left: 4px; font-size: 11px; }
.sd-jokbo li .ex { display: flex; gap: 2px; }
.sd-jokbo li.mine { background: #ffe08a; box-shadow: inset 0 0 0 2px var(--red); }
.sd-jokbo .sp { margin-top: 6px; padding-top: 6px; border-top: 2px dashed #c9b48a; }
.sd-jokbo .sp h4 { margin: 0 0 2px; font: 14px var(--display); color: var(--red); }
.sd-jokbo .sp li { grid-template-columns: 1fr auto; }
.sd-jokbo .sp li .nm small { display: block; margin: 0; }
.sd-over .sd-crown { font-size: 54px; text-align: center; }
.sd-rank tr.win td { font-weight: 700; }
.sd-rank td.n { font-size: 13px; text-align: right; } .sd-rank td.n small { color: var(--muted); }
.sd-rank td:first-child { white-space: nowrap; width: 1%; } .sd-rank .who { white-space: nowrap; }
@keyframes sd-pop { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.sd-seat.acted .tag { animation-name: sd-tag; }
@keyframes sd-tag { 0% { transform: scale(1.6); } 100% { transform: none; } }
@keyframes sd-deal { from { transform: translateY(-120px) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sd-wrap .hw.deal, .sd-banner, .sd-seat.acted .tag, .sd-seat.win { animation: none; } }
@media (max-width: 980px) and (min-width: 701px) { .sd-wrap { grid-template-columns: 1fr; } .sd-side { display: none; } .sd-wrap.jopen .sd-side { display: flex; } .sd-jbtn { display: inline-block; margin-left: auto; } }
@media (max-width: 700px) {
  .sd-wrap { grid-template-columns: 1fr; gap: 8px; margin: -4px; }
  .sd-top h2 { font-size: 20px; } .sd-top .chip { font-size: 11px; padding: 2px 8px; }
  .sd-jbtn { display: inline-flex; margin-left: auto; font: 14px var(--display); background: #f7ecd0; color: var(--ink); border: 3px solid #4a2914; border-radius: 10px; padding: 2px 8px; box-shadow: 0 3px 0 #4a2914; }
  .sd-table { min-height: auto; padding: 8px; border-width: 8px; border-radius: 18px; display: flex; flex-direction: column; gap: 8px; }
  .sd-table::before { inset: 4px; }
  .sd-seats { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .sd-seat { position: static; transform: none; width: auto; grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 5px 3px; }
  .sd-seat .av { grid-row: auto; width: 24px; height: 24px; font-size: 12px; }
  .sd-seat .nm { font-size: 12px; max-width: 100%; } .sd-seat .mn { font-size: 11px; }
  .sd-seat .act { justify-content: center; flex-wrap: wrap; gap: 3px; min-height: 0; }
  .sd-seat .jb { font-size: 13px; }
  .sd-wrap .sd-seat .hw.xs { width: 13px; height: 19px; border-width: 1px; }
  .sd-wrap .sd-seat .hw.sm { width: 28px; height: 42px; } .sd-wrap .sd-seat .hw.sm .gw { display: none; }
  .sd-pot, .sd-banner, .sd-pick { position: static; transform: none; }
  .sd-pot { display: flex; align-items: center; justify-content: center; gap: 8px; }
  .sd-pot .coins { font-size: 24px; } .sd-pot .sum { font-size: 22px; }
  .sd-banner { align-self: center; font-size: 16px; white-space: normal; text-align: center; animation: none; }
  .sd-pick { width: 100%; padding: 10px 8px; } .sd-pick h3 { font-size: 18px; }
  .sd-pick .combos { gap: 5px; } .sd-pick .combo b { font-size: 14px; } .sd-pick .combo > span:last-child { font-size: 10px; }
  .sd-pick .combo .pair { gap: 2px; } .sd-wrap .sd-pick .hw.sm { width: 36px; height: 54px; }
  .sd-mybar { position: static; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 8px; }
  .sd-bets { flex: none; }
  .sd-myhand { justify-content: center; }
  .sd-wrap .sd-myhand .hw.big { width: 66px; height: 98px; }
  .sd-bets { gap: 4px; }
  .sd-bets .bet { font-size: 17px; padding: 7px 0 4px; border-width: 2px; box-shadow: 0 4px 0 var(--ink); }
  .sd-bets .bet small { font-size: 10px; } .sd-bets .bet kbd { display: none; }
  .sd-side { display: none; }
  .sd-wrap.jopen .sd-side { display: flex; position: fixed; inset: auto 0 0 0; z-index: 50; max-height: 82dvh; overflow: auto; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); background: rgba(30, 16, 6, .94); border-radius: 18px 18px 0 0; }
  .sd-wrap.jopen .sd-x { display: block; align-self: flex-end; font: 15px var(--display); background: #fff; color: var(--ink); border: 0; border-radius: 8px; padding: 4px 12px; }
  .sd-jokbo { transform: none; }
}
.sd-pick .combos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .sd-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 360px) { .sd-wrap .sd-pick .hw.sm { width: 30px; height: 45px; } .sd-wrap .sd-pick .hw.sm .gw { display: none; } .sd-pick .combo { padding: 8px 2px 4px; } }
@media (max-width: 360px) {
  .sd-wrap .sd-myhand .hw.big { width: 54px; height: 80px; } .sd-wrap .sd-myhand .hw.big .mo { font-size: 15px; } .sd-wrap .sd-myhand .hw.big .gw { width: 18px; height: 18px; font-size: 11px; line-height: 15px; }
  .sd-myhand { gap: 4px; padding: 6px; } .sd-myhand .myjb { min-width: 0; } .sd-myhand .myjb b { font-size: 17px; }
  .sd-bets .bet { font-size: 15px; }
}
/* 아주 좁은 폰(320px): 방 위 버튼이 화면 밖으로 안 나가게 */
@media (max-width: 360px) { .room-bar { gap: 6px; } .bar-btns { gap: 4px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; } .bar-btns .btn.small { padding-left: 7px; padding-right: 7px; } }
/* 🎴 섯다: 공개한 카드 */
.sd-wrap .hw.pub { box-shadow: 0 0 0 2px var(--gold), 3px 3px 0 rgba(0,0,0,.45); }
.sd-myhand .hw.pub::after { content: '공개'; position: absolute; left: 50%; top: -9px; transform: translateX(-50%); background: var(--gold); color: var(--ink); font: 11px var(--display); padding: 0 6px; border-radius: 999px; white-space: nowrap; }
.sd-seat .bk { align-items: center; }
.sd-pick .combos.two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 320px; margin: 0 auto; }
@media (max-width: 700px) { .sd-wrap .sd-openpick .hw.big { width: 60px; height: 88px; } }
@media (max-width: 700px) { .sd-seat .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; } }
/* 🔔 할리갈리: 마지막 기회 */
.hl-seat.chance { outline: 4px solid #ff5a5f; outline-offset: 2px; animation: hl-pulse 1s ease-in-out infinite; }
.hl-last { font: 12px var(--display); color: #fff; background: #ff5a5f; border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.hl-chance { text-align: center; margin: 6px 0; padding: 6px 10px; border-radius: 10px; background: #ffe0e0; border: 2px solid #ff5a5f; font-size: 15px; }
.hl-chance.me { background: #ff5a5f; color: #fff; font-size: 16px; animation: hl-pulse 1s ease-in-out infinite; }
.hl-chance .who { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
@keyframes hl-pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 90, 95, .35); } }
@media (prefers-reduced-motion: reduce) { .hl-seat.chance, .hl-chance.me { animation: none; } }

/* 🎯 윷놀이 */
body.yt-on {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 236, 190, .45), transparent 65%),
    repeating-linear-gradient(90deg, rgba(120, 80, 30, .16) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(0deg, rgba(255, 245, 210, .22) 0 3px, transparent 3px 7px),
    repeating-linear-gradient(0deg, rgba(120, 80, 30, .1) 0 1px, transparent 1px 28px),
    #c9a56a;
}
.yt-wrap { --hanji: #f6ead0; --wood: #b77a3c; --wood2: #7b4a1f; --paper2: #fbf3e2; --gold2: #e7a92b;
  display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 12px; margin: -6px; align-items: start; }
.yt-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.yt-top h2 { margin: 0; font: 24px var(--display); }
.yt-top .chip { padding: 3px 10px; border-radius: 999px; background: #5a3714; color: #fff; font-size: 13px; }
.yt-top .chip b.me { color: #ffd86b; }
.yt-boardcol { min-width: 0; }
.yt-board { position: relative; background: var(--hanji); border: 10px solid var(--wood); border-radius: 16px; aspect-ratio: 468 / 482;
  box-shadow: inset 0 0 0 3px var(--wood2), inset 0 0 40px rgba(150, 100, 40, .25), 0 7px 0 var(--wood2), 0 14px 22px rgba(0,0,0,.25);
  background-image: radial-gradient(rgba(150, 110, 60, .08) 1px, transparent 1.5px), radial-gradient(rgba(150, 110, 60, .06) 1px, transparent 1.5px); background-size: 7px 7px, 11px 11px; }
.yt-board svg { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-select: none; }
.yt-ln { stroke: #3b2a1a; stroke-width: 5; stroke-linecap: round; opacity: .85; }
.yt-st { fill: #fffaf0; stroke: #2a1d12; stroke-width: 2.4; }
.yt-st.big { stroke-width: 3.4; }
.yt-lbl { font: 13px var(--display); fill: #8a6a44; text-anchor: middle; }
.yt-ev { font-size: 16px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.yt-ev.trap { font-size: 18px; }
.yt-dest { fill: rgba(231, 169, 43, .3); stroke: #e7a92b; stroke-width: 3; pointer-events: none; }
.yt-dest.trap { fill: rgba(200, 50, 59, .12); stroke: #c8323b; stroke-dasharray: 4 4; pointer-events: all; cursor: pointer; }
.yt-tok { transition: transform .45s cubic-bezier(.3, .8, .4, 1); filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
.yt-tok.can { cursor: pointer; }
.yt-tok .ring { fill: none; stroke: #e7a92b; stroke-width: 4; stroke-dasharray: 6 5; animation: yt-spin 1.2s linear infinite; transform-box: fill-box; transform-origin: center; pointer-events: none; }
.yt-tok.picked .ring { stroke: #7b3fe4; }
@keyframes yt-spin { to { transform: rotate(360deg); } }
.yt-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.yt-card { background: var(--paper2); border: 3px solid var(--wood2); border-radius: 14px; padding: 10px; box-shadow: 3px 4px 0 rgba(60, 30, 10, .3); }
.yt-card h3 { margin: 0 0 6px; font: 16px var(--display); }
.yt-throwbox { text-align: center; }
.yt-mat { position: relative; height: 120px; border-radius: 12px; background: repeating-linear-gradient(45deg, #8d5f2b 0 6px, #9a6a33 6px 12px); box-shadow: inset 0 0 0 3px #5f3c17, inset 0 6px 20px rgba(0,0,0,.35); overflow: hidden; }
.yt-sticks { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 9px; }
.yt-stick { width: 19px; height: 86px; border-radius: 10px; position: relative; box-shadow: 2px 3px 0 rgba(0,0,0,.35); }
.yt-stick.up { background: linear-gradient(90deg, #f3dcab, #fff3d6 50%, #f3dcab); border: 2px solid #8a5a24; }
.yt-stick.down { background: linear-gradient(90deg, #6e4217, #a86d32 50%, #6e4217); border: 2px solid #3d2309; }
.yt-stick.up::before { content: '✕\A✕\A✕'; white-space: pre; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #8a5a24; font-size: 10px; line-height: 1.7; }
.yt-stick.back.up::after { content: '빽'; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); font: 10px var(--display); color: #c8323b; }
.yt-sticks.flying .yt-stick { animation: yt-fly 1s cubic-bezier(.3, .7, .4, 1) both; }
.yt-sticks.flying .yt-stick:nth-child(2) { animation-delay: .05s; } .yt-sticks.flying .yt-stick:nth-child(3) { animation-delay: .1s; } .yt-sticks.flying .yt-stick:nth-child(4) { animation-delay: .15s; }
@keyframes yt-fly { 0% { transform: translateY(50px) rotate(0); } 35% { transform: translateY(-130px) rotate(380deg) scale(.85); } 70% { transform: translateY(8px) rotate(700deg); } 85% { transform: translateY(-12px) rotate(712deg); } 100% { transform: none; } }
.yt-result { font: 38px var(--display); color: #c8323b; text-shadow: 3px 3px 0 #fff, 5px 5px 0 rgba(0,0,0,.18); margin: 4px 0 0; min-height: 56px; transition: opacity .2s; }
.yt-result.hide { opacity: 0; }
.yt-result small { display: block; font: 12px var(--body); color: #6d5235; text-shadow: none; }
.yt-queue { display: flex; gap: 5px; justify-content: center; margin: 4px 0 8px; flex-wrap: wrap; min-height: 6px; }
.yt-q { font: 14px var(--display); padding: 2px 10px; border-radius: 999px; background: #fff; border: 2px solid #2a1d12; color: #2a1d12; cursor: pointer; }
.yt-q.on { background: var(--gold2); }
.yt-q:disabled { cursor: default; }
.yt-throw { width: 100%; font: 21px var(--display); color: #fff; background: linear-gradient(#e0473f, #b5262e); border: 3px solid #2a1d12; border-radius: 14px; padding: 9px; box-shadow: 0 6px 0 #2a1d12; cursor: pointer; touch-action: manipulation; }
.yt-throw small { display: block; font: 11px var(--body); opacity: .9; }
.yt-throw:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 #2a1d12; }
.yt-throw:disabled { background: #b9a487; cursor: default; }
.yt-throw.go:disabled { background: linear-gradient(#e7a92b, #c98a12); color: #2a1d12; }
.yt-new { width: 100%; margin-top: 8px; }
.yt-pl { display: grid; grid-template-columns: 18px 1fr auto; gap: 2px 6px; align-items: center; padding: 5px 6px; border-radius: 10px; }
.yt-pl + .yt-pl { margin-top: 3px; }
.yt-pl.turn { background: #fff1c9; box-shadow: inset 0 0 0 2px var(--gold2); }
.yt-pl.target { cursor: pointer; box-shadow: inset 0 0 0 2px #7b3fe4; background: #f3ecff; }
.yt-pl .nm { font-weight: 700; font-size: 14px; min-width: 0; } .yt-pl .nm small { font-weight: 400; color: #8a6a44; display: block; }
.yt-pl .pcs { display: flex; gap: 3px; align-items: center; grid-column: 2 / -1; font-size: 11px; color: #6d5235; flex-wrap: wrap; }
.yt-pl .yt-pc { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #2a1d12; }
.yt-pl .pcs > div { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; width: 100%; } .yt-pl .pcs > div > small { min-width: 44px; }
.yt-pl .yt-pc { flex: none; display: inline-block; }
.yt-pl .yt-pc.yt-home { opacity: .35; } .yt-pl .yt-pc.yt-done { box-shadow: 0 0 0 2px var(--gold2); }
.yt-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2a1d12; display: inline-block; }
.yt-ai { font-size: 14px; }
/* 플레이어별 고른 증강 */
.yt-pl .yt-pa { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 2px; }
.yt-pl .yt-pa > div { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; } .yt-pl .yt-pa small { font-size: 11px; color: #8a6a44; min-width: 44px; } .yt-pl .yt-pa small.none { min-width: 0; }
.yt-chip { font-family: inherit; font-size: 11px; line-height: 1.2; padding: 2px 6px; border-radius: 99px; border: 1.5px solid #9aa0a6; background: #fff; color: #2b1a44; cursor: help; white-space: nowrap; }
.yt-chip.t-r { border-color: #2f7fe0; background: #eef5ff; } .yt-chip.t-l { border-color: #e8900f; background: #fff4e0; }
.yt-chip.used { opacity: .45; text-decoration: line-through; }
.yt-augs { background: #f3ecff; border-color: #5b2fb0; }
.yt-augl { display: flex; flex-direction: column; gap: 5px; }
.yt-aug { text-align: left; font: 14px var(--display); padding: 5px 8px; border-radius: 10px; border: 2px solid #7b3fe4; background: #fff; color: #2b1a44; cursor: pointer; }
.yt-aug.on { background: #7b3fe4; color: #fff; }
.yt-aug.passive { border-style: dashed; }
.yt-aug.used { opacity: .45; text-decoration: line-through; }
.yt-aug:disabled, .yt-aug[aria-disabled="true"] { cursor: default; }
/* 증강 설명 말풍선 */
.yt-tip { position: fixed; z-index: 60; background: #fff; color: #2b1a44; border: 2px solid #7b3fe4; border-radius: 12px; padding: 8px 12px 9px;
  box-shadow: 0 8px 22px rgba(43, 26, 68, .28); opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.yt-tip.show { opacity: 1; pointer-events: auto; transform: none; }
.yt-tip .arr { position: absolute; left: var(--ax, 24px); top: -8px; width: 12px; height: 12px; margin-left: -6px; background: inherit; border: inherit; border-width: 2px 0 0 2px; transform: rotate(45deg); }
.yt-tip.up .arr { top: auto; bottom: -8px; border-width: 0 2px 2px 0; }
.yt-tip b { font: 15px var(--display); } .yt-tip p { margin: 3px 0 0; font-size: 13px; line-height: 1.45; color: #4a3a5e; }
.yt-tip .tier { margin-left: 6px; font-size: 10px; padding: 1px 7px; border-radius: 99px; background: #6b7280; color: #fff; vertical-align: 2px; }
.yt-tip.t-r { border-color: #2f7fe0; } .yt-tip.t-r .tier { background: #2f7fe0; } .yt-tip.t-l { border-color: #e8900f; } .yt-tip.t-l .tier { background: #e8900f; }
/* 📣 차례 배너 · 내 차례 번쩍 */
.yt-turnbar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 14px; border-radius: 14px; background: #fffaf0; border: 3px solid var(--c); box-shadow: 0 3px 0 var(--c); }
.yt-turnbar .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 2px solid #1a120a; flex: none; }
.yt-turnbar b { font: 22px var(--display); color: #2b1a12; } .yt-turnbar small { color: #7a5a3a; font-size: 13px; } .yt-turnbar .tl { margin-left: auto; font-weight: 700; color: #7a5a3a; }
.yt-turnbar.me { background: var(--c); animation: yt-me 1.1s ease-in-out infinite; } .yt-turnbar.me b, .yt-turnbar.me small, .yt-turnbar.me .tl { color: #fff; text-shadow: 0 1px 0 #0006; } .yt-turnbar.me .dot { background: #fff; }
@keyframes yt-me { 50% { transform: scale(1.025); box-shadow: 0 3px 0 #0004, 0 0 22px var(--c); } }
.yt-wrap.flash { animation: yt-flash .55s ease-in-out 3; border-radius: 18px; }
@keyframes yt-flash { 50% { box-shadow: inset 0 0 0 6px #ffcc33, 0 0 40px #ffcc33; } }
@media (max-width: 520px) { .yt-turnbar b { font-size: 18px; } .yt-turnbar { padding: 6px 10px; } }
/* 꾹 누르기: 글자 선택 · 메뉴 막기 */
.yt-lph { font: 11px var(--body, inherit); color: #8a6a44; font-weight: 400; }
.yt-aug, .yt-augc, .yt-chip { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.yt-aim { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.yt-augtip { margin: 6px 0 0; } .yt-augtip a { color: #7b3fe4; }
.yt-pick { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(540px, 94%); background: #241536; color: #fff; border-radius: 18px; padding: 14px; z-index: 3;
  box-shadow: 0 0 0 4px #e2479c, 0 0 0 8px #7b3fe4, 0 18px 40px rgba(0,0,0,.5); text-align: center; }
.yt-pick h3 { margin: 0 0 2px; font: 21px var(--display); } .yt-pick p { margin: 0 0 10px; font-size: 13px; opacity: .85; }
.yt-pickc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.yt-augc { background: linear-gradient(160deg, #3b2160, #1b1030); border: 2px solid #b78cff; border-radius: 14px; padding: 12px 6px; color: #fff; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.yt-augc .i { font-size: 36px; } .yt-augc b { font: 16px var(--display); color: #ffd86b; } .yt-augc span:last-child { font-size: 12px; opacity: .9; }
.yt-augc:hover:not(:disabled), .yt-augc.sel { border-color: #ffd86b; box-shadow: 0 0 0 3px #ffd86b; transform: translateY(-3px); }
/* 증강 등급: 일반 · 희귀 · 전설 */
.yt-augc { position: relative; }
.yt-augc .tier { font: 11px var(--display); padding: 1px 8px; border-radius: 99px; background: #6b7280; color: #fff; }
.yt-augc.t-r { border-color: #4aa3ff; background: linear-gradient(160deg, #1d3a6b, #10203d); } .yt-augc.t-r .tier { background: #2f7fe0; }
.yt-augc.t-l { border-color: #ffb43a; background: linear-gradient(160deg, #6b3d0e, #2e1a05); box-shadow: 0 0 14px #ffb43a88; } .yt-augc.t-l .tier { background: linear-gradient(90deg, #ff9d2e, #ffd86b); color: #3a2200; }
.yt-aug.t-r { border-color: #2f7fe0; } .yt-aug.t-l { border-color: #e8900f; background: #fff7e6; }
.yt-aug.t-r.on { background: #2f7fe0; } .yt-aug.t-l.on { background: #e8900f; }
.yt-wantl { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-height: 46vh; overflow-y: auto; padding: 4px; }
.yt-wantl .yt-aug { font-size: 13px; }
.yt-pick a { color: #ffd86b; }
.yt-planl { min-height: 1.4em; } .yt-planl b { color: #ffd86b; margin: 0 4px; }
.yt-ranking { margin: 6px 0; }
.yt-lbl.moved { fill: #c0392b; font-weight: 700; }
.yt-dir path { fill: none; stroke: #c0392b; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: .85; pointer-events: none; }
.yt-dir { animation: yt-dir 1.6s ease-in-out infinite; } @keyframes yt-dir { 50% { opacity: .45; } }
.yt-tok.ghost { opacity: .55; } .yt-tok.ghost circle:first-child { stroke-dasharray: 4 3; }
.yt-pick.wait { padding: 18px; }
.yt-over .yt-crown { font-size: 54px; text-align: center; }
.yt-rank td:first-child { width: 1%; } .yt-rank td.n { text-align: right; font-size: 13px; } .yt-rank tr.win td { font-weight: 700; } .yt-rank small { color: var(--muted); font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .yt-sticks.flying .yt-stick, .yt-tok .ring { animation: none; } .yt-tok { transition: none; } }
@media (max-width: 980px) { .yt-wrap { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .yt-wrap { gap: 8px; margin: -4px; }
  .yt-top h2 { font-size: 20px; } .yt-top .chip { font-size: 11px; padding: 2px 8px; }
  .yt-board { border-width: 7px; }
  .yt-mat { height: 96px; } .yt-stick { height: 70px; width: 16px; }
  .yt-result { font-size: 30px; min-height: 46px; }
  .yt-throwbox { position: sticky; bottom: 4px; z-index: 4; }
  .yt-pick { position: fixed; top: 50%; z-index: 50; max-height: 92vh; overflow-y: auto; }
  .yt-augc .i { font-size: 28px; } .yt-augc b { font-size: 13px; } .yt-augc span:last-child { font-size: 10px; }
}
@media (max-width: 700px) {
  .yt-throwbox { display: grid; grid-template-columns: 42% 1fr; grid-template-areas: 'mat res' 'mat q' 'btn btn' 'new new'; gap: 2px 8px; align-items: center; padding: 8px; }
  .yt-throwbox .yt-mat { grid-area: mat; height: 84px; }
  .yt-throwbox .yt-result { grid-area: res; font-size: 26px; min-height: 0; margin: 0; }
  .yt-throwbox .yt-queue { grid-area: q; margin: 0; }
  .yt-throwbox .yt-throw { grid-area: btn; font-size: 18px; padding: 7px; margin-top: 4px; }
  .yt-throwbox .yt-new { grid-area: new; margin-top: 6px; }
  .yt-stick { height: 60px; width: 14px; } .yt-sticks { gap: 6px; }
  .yt-stick.up::before { font-size: 8px; }
}
/* 🎮 미니개인전 점수판 */
.solo-prog { margin: -4px 0 8px; color: var(--muted); font-weight: 700; }
.solo-board tr.win td { font-weight: 700; background: #fff4c2; }
.solo-board tr.me td { box-shadow: inset 0 -2px 0 var(--p1); }
.solo-board td.rk { width: 1%; white-space: nowrap; }
.solo-board td.n { text-align: right; }

/* ⚫ 오목 · 육목 */
body.om-on {
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 230, 180, .35), transparent 60%),
    repeating-linear-gradient(100deg, rgba(90, 55, 20, .12) 0 3px, transparent 3px 14px), #8a5a2b;
}
.om-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 12px; margin: -6px; align-items: start; }
.om-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.om-top h2 { margin: 0; font: 24px var(--display); }
.om-top .chip { padding: 3px 10px; border-radius: 999px; background: #3b2410; color: #fff; font-size: 13px; }
.om-boardcol { min-width: 0; }
.om-board { position: relative; aspect-ratio: 1; max-height: 78vh; margin: 0 auto; border-radius: 10px; padding: 1.2%;
  background: linear-gradient(135deg, #e9c27a, #d9a85a); box-shadow: inset 0 0 0 3px #a8742f, 0 6px 0 #6e4518, 0 12px 22px rgba(0,0,0,.3); }
.om-board svg { width: 100%; height: 100%; display: block; touch-action: manipulation; user-select: none; -webkit-user-select: none; cursor: pointer; }
.om-wood { fill: transparent; }
.om-grid line { stroke: #4a2f12; stroke-width: .045; }
.om-star circle { fill: #3a240c; }
.om-st { filter: drop-shadow(.04px .07px .03px rgba(0,0,0,.55)); }
.om-st.win { stroke: #ffd400; stroke-width: .1; animation: om-win 1s ease-in-out infinite; }
@keyframes om-win { 50% { stroke-width: .2; } }
.om-last { fill: none; stroke: #ff3b30; stroke-width: .09; pointer-events: none; }
.om-prev { fill: none; stroke: #ff3b30; stroke-width: .05; opacity: .45; pointer-events: none; }
.om-winline { stroke: #ffd400; stroke-width: .16; stroke-linecap: round; opacity: .85; pointer-events: none; }
.om-gh { opacity: .45; pointer-events: none; } .om-gh.fixed { opacity: .75; stroke: #ffd400; stroke-width: .08; animation: om-win .8s ease-in-out infinite; }
.om-again { margin-top: 10px; }
.om-confirm { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.om-turnbar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 14px; border-radius: 14px; background: #fffaf0; border: 3px solid var(--d, #333); box-shadow: 0 3px 0 var(--d, #333); }
.om-turnbar { flex-wrap: wrap; } .om-turnbar b { font: 21px var(--display); color: #2b1a12; white-space: nowrap; } .om-turnbar small { color: #7a5a3a; font-size: 13px; } .om-turnbar .tl { margin-left: auto; font-weight: 700; color: #7a5a3a; }
.om-turnbar.me { background: linear-gradient(90deg, var(--d), var(--c)); animation: yt-me 1.1s ease-in-out infinite; } .om-turnbar.me b, .om-turnbar.me small, .om-turnbar.me .tl { color: #fff; text-shadow: 0 1px 0 #0008; }
.om-turnbar.over { justify-content: center; background: #fff3c4; border-color: #e7a92b; box-shadow: 0 3px 0 #b07d10; }
.om-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, var(--a), var(--b)); box-shadow: 0 1px 2px rgba(0,0,0,.5); display: inline-block; }
.om-dot.big { width: 24px; height: 24px; }
.om-side { display: flex; flex-direction: column; gap: 10px; }
.om-card { background: #fffaf0; border: 3px solid #6e4518; border-radius: 14px; padding: 10px 12px; }
.om-card h3 { margin: 0 0 6px; font: 17px var(--display); }
.om-pl { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 10px; }
.om-pl.turn { background: #fff0c2; box-shadow: inset 0 0 0 2px #e7a92b; } .om-pl.win { background: #e7ffd9; } .om-pl.out { opacity: .5; }
.om-pl .nm { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; } .om-pl .nm small { font-weight: 400; color: #8a6a44; } .om-pl .n { font-size: 12px; color: #7a5a3a; }
.om-rule { font-size: 13px; color: #5a4128; }
.om-wrap.flash { animation: yt-flash .55s ease-in-out 3; border-radius: 18px; }
@media (max-width: 760px) {
  .om-wrap { grid-template-columns: 1fr; }
  .om-board { max-height: none; }
  .om-turnbar b { font-size: 18px; } .om-turnbar { padding: 6px 10px; }
}
/* ⚫ 오목 다시보기 */
.om-replay { margin-top: 10px; background: #fffaf0; border: 3px solid #6e4518; border-radius: 14px; padding: 8px 10px; }
.om-rp-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.om-rp-btns .btn { padding: 6px 10px; min-width: 42px; }
.om-rp-btns .btn.on { background: #3b2410; color: #fff; }
.om-rp-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.om-rp-bar input { flex: 1; accent-color: #8a5a2b; }
.om-rp-bar span { font-weight: 700; font-size: 13px; color: #5a4128; white-space: nowrap; }
.om-num { text-anchor: middle; dominant-baseline: central; font-weight: 700; fill: #1a1a1a; pointer-events: none; font-family: system-ui, sans-serif; }
.om-num.light { fill: #fff; }
/* 📜 기보 보기 창 · 내 전적 기보 목록 */
.om-kibo-modal { position: fixed; inset: 0; z-index: 70; background: rgba(20, 12, 4, .6); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 16px; }
.om-kibo { width: min(620px, 100%); background: #fffaf0; border: 3px solid #6e4518; border-radius: 16px; padding: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.om-kibo-head { display: flex; align-items: center; gap: 8px; } .om-kibo-head b { font: 20px var(--display); } .om-kibo-head small { color: #7a5a3a; flex: 1; }
.om-kibo-res { margin: 6px 0; font-weight: 700; }
.om-kibo-pl { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; font-size: 14px; } .om-kibo-pl span { display: inline-flex; align-items: center; gap: 4px; }
.om-kibo .om-board { max-height: 64vh; }
.pf-kibo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.pf-kb { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 10px; border-radius: 12px; background: #fff; border: 2px solid #e2d6c2; }
.pf-kb small { color: #7a6a58; } .pf-kb-btn { display: flex; gap: 4px; flex: none; }
.pf-kb-pl { font-size: 13px; } .pf-kb-pl i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin: 0 3px 0 6px; vertical-align: -1px; box-shadow: 0 0 0 1px #0005; }
.om-ban { stroke: #d32f2f; stroke-width: .09; stroke-linecap: round; opacity: .8; pointer-events: none; }

/* ── 👀 관전 ── */
.spec-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.75); border: 2px dashed #b9a98a; font-size: 13px; }
.spec-bar .sp-me { color: #6b3fa0; }
.spec-bar .sp-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.spec-bar .sp-list > small { color: #7a6a55; margin-right: 2px; }
.sp-chip { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: #efe6d4; }
.sp-chip.me { background: #e3d6f5; font-weight: 700; }
.sp-chip.off { opacity: .5; }
.sp-chip .bubble { top: -30px; right: -6px; font-size: 24px; }
.sp-kick { border: 0; background: none; color: #a33; cursor: pointer; font-size: 12px; padding: 0 2px; }
.sp-kick.armed { color: #fff; background: #c33; border-radius: 6px; padding: 0 5px; }
.sp-note { color: #7a6a55; }
.peek-box { margin: 6px 0; }
.peek { padding: 6px 10px; border-radius: 12px; background: #2d2340; color: #f3ecff; font-size: 13px; }
.peek summary { cursor: pointer; font-weight: 700; }
.peek .pk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; }
.peek .pk-row > b { min-width: 64px; }
.peek .pk-row small { color: #c9b8ea; }
.peek .pk-card { padding: 1px 7px; border-radius: 6px; background: rgba(255,255,255,.14); }
.peek .pk-hw { display: inline-flex; gap: 3px; }
.peek .hw { position: relative; width: 30px; height: 45px; border-radius: 4px; background: #c8232c; padding: 2px; }
.peek .hw svg { display: block; width: 100%; height: 100%; border-radius: 3px; }
.peek .hw .mo { position: absolute; left: 3px; bottom: 0; font: 10px var(--display); color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
.peek .hw .gw { display: none; }
body.spec-on [data-action="ready"] { display: none; }
body.spec-on #chat-form button { display: none; }

/* ── 🏎️ 레이싱 ───────────────────────────── */
.rc-lobby { display: grid; gap: 12px; margin: 8px 0 12px; }
.rc-prev { border: var(--line); border-radius: 16px; background: linear-gradient(#eef3ff, #dfe9ff); overflow: hidden; box-shadow: 4px 4px 0 var(--ink); }
.rc-prev-slot { height: 190px; display: grid; place-items: center; }
.rc-prev-cv { width: 100%; height: 190px; display: block; }
.rc-track { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; padding: 8px 12px; border-top: 2px solid rgba(31,27,58,.15); background: #fff; font-size: 14px; }
.rc-track span { color: var(--muted); }
.rc-hats { display: grid; gap: 6px; }
.rc-hat-list { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-hat { display: grid; justify-items: center; gap: 2px; min-width: 64px; padding: 6px 8px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.rc-hat span { font-size: 22px; line-height: 1; }
.rc-hat small { font-size: 11px; }
.rc-hat.on { background: var(--p3); box-shadow: 2px 2px 0 var(--ink); }
.rc-kinds .rc-hat-list { flex-wrap: nowrap; }
.rc-kind { min-width: 0; flex: 1 1 0; max-width: 150px; }
.rc-kind em { font-style: normal; font-size: 10px; opacity: 0.75; }
.rc-help { font-size: 13px; line-height: 1.55; background: #fff; border: 2px dashed rgba(31,27,58,.25); border-radius: 12px; padding: 8px 12px; }
.rc-help p { margin: 2px 0; }
.rc-help kbd { border: 1.5px solid var(--ink); border-radius: 5px; padding: 0 4px; font-size: 11px; background: #f4f3fa; }

body.rc-on { overflow: hidden; }
.race-ov { position: fixed; inset: 0; z-index: 60; background: #8fd3ff; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
.rc-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rc-tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rc-tag { position: absolute; left: 0; top: 0; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.88); border: 2px solid; font: 13px var(--display); white-space: nowrap; color: var(--ink); }
.rc-hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.rc-tl { position: absolute; left: max(10px, env(safe-area-inset-left)); top: max(10px, env(safe-area-inset-top)); display: grid; gap: 2px; background: rgba(29,27,46,.55); padding: 6px 10px; border-radius: 12px; }
.rc-lap { font-size: 20px; }
.rc-time { font-size: 18px; font-variant-numeric: tabular-nums; }
.rc-laps { font-family: var(--body); font-size: 11px; opacity: .9; font-variant-numeric: tabular-nums; }
.rc-pos { position: absolute; left: 50%; top: max(8px, env(safe-area-inset-top)); transform: translateX(-50%); font-size: 46px; line-height: 1; }
.rc-pos small { font-size: 20px; }
.rc-tr { position: absolute; right: max(8px, env(safe-area-inset-right)); top: max(8px, env(safe-area-inset-top)); display: flex; gap: 6px; align-items: flex-start; }
.rc-tr .rc-map { width: 120px; height: 120px; background: rgba(255,255,255,.35); border-radius: 14px; }
.rc-board { display: grid; gap: 2px; background: rgba(29,27,46,.55); border-radius: 12px; padding: 5px 7px; min-width: 112px; max-width: 150px; font-family: var(--body); font-size: 12px; text-shadow: none; }
.rc-board:empty { display: none; }
.rc-board div { display: grid; grid-template-columns: 14px 10px 1fr auto; align-items: center; gap: 5px; padding: 1px 3px; border-radius: 6px; }
.rc-board div.me { background: rgba(255,210,63,.35); }
.rc-board b { font-family: var(--display); font-size: 13px; text-align: center; }
.rc-board span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-board small { opacity: .85; font-size: 11px; }
.rc-board .rc-dot { width: 9px; height: 9px; margin: 0; border-width: 1.5px; }
.rc-center { position: absolute; left: 0; right: 0; top: max(16%, 150px); text-align: center; padding: 0 12px; }
.rc-count { display: inline-block; font-size: 96px; line-height: 1; color: #ffd23f; text-shadow: 0 5px 0 #1d1b2e, 0 0 24px rgba(0,0,0,.25); animation: rc-pop .35s ease-out; }
.rc-count.go { color: #19c26b; }
@keyframes rc-pop { from { transform: scale(1.8); opacity: .3; } to { transform: scale(1); opacity: 1; } }
.rc-msg { display: inline-grid; gap: 4px; font-size: 30px; background: rgba(29,27,46,.6); padding: 10px 18px; border-radius: 16px; }
.rc-msg small { font-size: 15px; font-family: var(--body); }
.rc-msg.small { font-size: 16px; }
.rc-msg.warn { color: #ffd23f; font-size: 24px; }
.rc-note { position: absolute; left: 0; right: 0; top: 13%; text-align: center; font-size: 26px; opacity: 0; }
.rc-note.show { animation: rc-note 2.2s ease-out; }
@keyframes rc-note { 0% { opacity: 0; transform: translateY(10px); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }
.rc-speed { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 22px; font-variant-numeric: tabular-nums; }
.rc-menu { position: absolute; right: max(8px, env(safe-area-inset-right)); top: calc(max(8px, env(safe-area-inset-top)) + 128px); display: flex; flex-direction: row; align-items: flex-start; gap: 6px; pointer-events: auto; text-shadow: none; }
.rc-menu .btn { background: rgba(255,255,255,.88); color: var(--ink); }
.rc-menu .btn.armed { background: var(--wait); color: #fff; }
.rc-pad { position: absolute; left: 0; right: 0; bottom: 0; height: 0; pointer-events: none; }
.rc-pad .rc-b { pointer-events: auto; touch-action: none; border: 3px solid rgba(29,27,46,.85); background: rgba(255,255,255,.72); color: var(--ink); font: 20px var(--display); border-radius: 18px; box-shadow: 0 4px 0 rgba(29,27,46,.6); -webkit-tap-highlight-color: transparent; }
.rc-pad .rc-b.on { background: var(--p3); transform: translateY(3px); box-shadow: 0 1px 0 rgba(29,27,46,.6); }
.rc-stick-zone { position: absolute; left: 0; bottom: 0; width: 50%; height: 62vh; pointer-events: auto; touch-action: none; }
.rc-stick { position: absolute; left: max(22px, env(safe-area-inset-left)); bottom: max(46px, calc(env(safe-area-inset-bottom) + 36px)); width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.28); border: 3px solid rgba(29,27,46,.55); box-shadow: inset 0 0 0 10px rgba(255,255,255,.18); }
.rc-stick.on { bottom: auto; background: rgba(255,255,255,.38); }
.rc-knob { position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%; background: rgba(255,255,255,.92); border: 3px solid rgba(29,27,46,.85); box-shadow: 0 4px 0 rgba(29,27,46,.5); }
.rc-stick-hint { position: absolute; font-size: 14px; color: rgba(29,27,46,.55); line-height: 1; }
.rc-stick-hint.up { left: 50%; top: 8px; transform: translateX(-50%); }
.rc-stick-hint.down { left: 50%; bottom: 8px; transform: translateX(-50%); }
.rc-stick-hint.left { top: 50%; left: 9px; transform: translateY(-50%); }
.rc-stick-hint.right { top: 50%; right: 9px; transform: translateY(-50%); }
.rc-acts { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(54px, calc(env(safe-area-inset-bottom) + 44px)); display: grid; gap: 12px; justify-items: end; }
.rc-acts .drift { width: 118px; height: 92px; background: rgba(77,171,255,.8); color: #fff; font-size: 19px; }
.rc-acts .brake { width: 100px; height: 64px; background: rgba(255,90,95,.8); color: #fff; font-size: 17px; }
.rc-acts .rc-b.on { background: var(--p3); color: var(--ink); }
.rc-result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(29,27,46,.35); padding: 16px; overflow: auto; }
.rc-res-card { width: min(460px, 100%); background: #fff; border: var(--line); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); padding: 14px 16px; color: var(--ink); }
.rc-res-card h2 { margin: 0 0 8px; text-align: center; }
.rc-res { width: 100%; border-collapse: collapse; font-size: 15px; margin-bottom: 8px; }
.rc-res th { font-size: 12px; color: var(--muted); text-align: left; padding: 4px; }
.rc-res td { padding: 6px 4px; border-top: 1.5px solid rgba(31,27,58,.12); font-variant-numeric: tabular-nums; }
.rc-res tr.me td { background: #fff6d6; }
.rc-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); margin-right: 6px; vertical-align: -1px; }
@media (max-height: 480px) {
  .rc-stick { width: 128px; height: 128px; bottom: 30px; }
  .rc-stick-zone { height: 80vh; }
  .rc-acts { bottom: 40px; }
  .rc-acts .drift { width: 104px; height: 74px; }
  .rc-acts .brake { height: 54px; }
  .rc-tr .rc-map { width: 96px; height: 96px; }
  .rc-board { font-size: 11px; min-width: 100px; }
  .rc-menu { top: calc(max(8px, env(safe-area-inset-top)) + 102px); }
  .rc-pos { font-size: 36px; }
}

/* 🏎️ 레이싱 v2: 맵 · 투표 · 효과 · 설정 */
.rc-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.rc-map { display: grid; gap: 3px; justify-items: center; text-align: center; padding: 7px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.rc-map.ro { cursor: default; opacity: .75; }
.rc-map.ro.on { opacity: 1; }
.rc-map img { width: 80px; height: 80px; border-radius: 10px; border: 1.5px solid rgba(31,27,58,.25); }
.rc-map b { font-size: 13px; }
.rc-map small { font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.rc-map.on { background: #fff6d6; box-shadow: 3px 3px 0 var(--ink); outline: 3px solid var(--p3); }
.rc-sets { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 13px; }
.rc-sets label { display: flex; align-items: center; gap: 6px; }
.rc-sets input[type=range] { width: 110px; accent-color: var(--p1); }
.rc-setpanel { position: absolute; right: max(8px, env(safe-area-inset-right)); top: calc(max(8px, env(safe-area-inset-top)) + 170px); background: rgba(255,255,255,.95); border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; z-index: 3; max-width: calc(100vw - 20px); }
.rc-setpanel .rc-sets { flex-direction: column; align-items: stretch; }
.rc-fx2d { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.race-ov::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s; box-shadow: inset 0 0 90px 30px rgba(255,140,30,.55); }
.race-ov.boost::after { opacity: 1; }
/* 투표 중: 3D는 뒤에서 미리 그려 두고 (첫 화면 멈춤 방지) 투표 화면으로 덮어요 */
.race-ov.choosing .rc-vote { background: radial-gradient(circle at 50% 35%, #3a3170, #15132a); z-index: 2; }
.race-ov.choosing .rc-hud > :not(.rc-menu), .race-ov.choosing .rc-tags, .race-ov.choosing .rc-fx2d { visibility: hidden; }
.race-ov.choosing .rc-menu { z-index: 3; }
.rc-lights { position: absolute; left: 50%; top: max(70px, 12%); transform: translateX(-50%); display: flex; gap: 10px; padding: 8px 14px; background: #1d1b2e; border-radius: 16px; border: 3px solid #000; box-shadow: 0 4px 0 rgba(0,0,0,.4); }
.rc-lights i { width: 34px; height: 34px; border-radius: 50%; background: #3a3646; border: 2px solid #000; }
.rc-lights i.red { background: radial-gradient(circle at 40% 35%, #ff9a9a, #ff2a2a 60%); box-shadow: 0 0 18px #ff3b3b; }
.rc-lights i.go { background: radial-gradient(circle at 40% 35%, #b6ffb6, #19d26b 60%); box-shadow: 0 0 22px #2bff8a; }
.rc-intro { position: absolute; left: 0; right: 0; top: 44%; display: grid; justify-items: center; gap: 4px; opacity: 0; }
.rc-intro b { font-size: 40px; background: rgba(29,27,46,.6); padding: 6px 18px; border-radius: 16px; }
.rc-intro small { font-family: var(--body); font-size: 15px; background: rgba(29,27,46,.5); padding: 3px 10px; border-radius: 10px; }
.rc-intro.show { animation: rc-intro 2.6s ease-out; }
@keyframes rc-intro { 0% { opacity: 0; transform: scale(.8); } 12% { opacity: 1; transform: scale(1.05); } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.rc-banner { position: absolute; left: 0; right: 0; top: 26%; text-align: center; font-size: 64px; opacity: 0; letter-spacing: 2px; }
.rc-banner.final { color: #ffd23f; -webkit-text-stroke: 2px #1d1b2e; text-shadow: 0 5px 0 #1d1b2e, 0 0 26px rgba(255,120,0,.8); }
.rc-banner.show { animation: rc-banner 2.4s ease-out; }
@keyframes rc-banner { 0% { opacity: 0; transform: scale(2.4) skewX(-12deg); } 15% { opacity: 1; transform: scale(1) skewX(-12deg); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px) skewX(-12deg); } }
.rc-flag { position: absolute; inset: 0; pointer-events: none; background: repeating-conic-gradient(#16151f 0 25%, #f7f7fb 0 50%) 0 0 / 60px 60px; opacity: 0; }
.rc-flag.show { animation: rc-flag 1.6s ease-out forwards; }
@keyframes rc-flag { 0% { opacity: .85; transform: translateX(-100%) skewX(-20deg); } 35% { opacity: .85; transform: translateX(0) skewX(-20deg); } 100% { opacity: 0; transform: translateX(100%) skewX(-20deg); } }
.rc-pops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.rc-pop { position: absolute; transform: translate(-50%, -50%); font: 28px var(--display); color: #fff; text-shadow: 0 3px 0 #1d1b2e, 0 0 10px #ff8a1f; animation: rc-pop2 .7s ease-out forwards; white-space: nowrap; }
@keyframes rc-pop2 { 0% { transform: translate(-50%, -50%) scale(.4) rotate(-10deg); } 30% { transform: translate(-50%, -60%) scale(1.25) rotate(4deg); } 100% { transform: translate(-50%, -110%) scale(1); opacity: 0; } }
.rc-vote { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; overflow: auto; }
.rc-vbox { width: min(760px, 100%); text-align: center; color: #fff; }
.rc-vbox h2 { font-size: 26px; margin: 0 0 8px; text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.rc-vbar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.2); overflow: hidden; margin: 0 auto 12px; max-width: 420px; }
.rc-vbar i { display: block; height: 100%; width: 100%; background: var(--p3); }
.rc-vcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rc-vcard { display: grid; gap: 4px; justify-items: center; padding: 10px 8px; border: 3px solid #1d1b2e; border-radius: 16px; background: #fff; color: var(--ink); font: inherit; box-shadow: 4px 4px 0 rgba(0,0,0,.4); transition: transform .12s; }
button.rc-vcard { cursor: pointer; }
button.rc-vcard:hover { transform: translateY(-3px); }
.rc-vcard img { width: 100%; max-width: 140px; aspect-ratio: 1; border-radius: 12px; }
.rc-vcard b { font: 17px var(--display); }
.rc-vcard small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.rc-vn { display: flex; align-items: center; gap: 3px; font: 15px var(--display); min-height: 18px; flex-wrap: wrap; justify-content: center; }
.rc-vn .rc-dot { width: 12px; height: 12px; margin: 0; }
.rc-vcard.mine { outline: 4px solid var(--p3); }
.rc-vcard.out { opacity: .35; }
.rc-vcard.hl { transform: scale(1.06); outline: 5px solid #ff5fb0; }
.rc-vcard.win { transform: scale(1.1); outline: 6px solid #19d26b; box-shadow: 0 0 40px rgba(60,255,140,.7); }
@media (max-width: 560px) { .rc-vcards { gap: 6px; } .rc-vcard { padding: 6px 4px; } .rc-vcard b { font-size: 13px; } .rc-vcard small { display: none; } .rc-intro b { font-size: 28px; } .rc-banner { font-size: 44px; } }
@media (max-height: 480px) { .rc-lights i { width: 26px; height: 26px; } .rc-vcard img { max-width: 90px; } .rc-vcard small { display: none; } .rc-vbox h2 { font-size: 20px; } }

.rc-retire { position: absolute; left: 50%; top: max(64px, calc(env(safe-area-inset-top) + 58px)); transform: translateX(-50%); display: grid; justify-items: center; background: rgba(29,27,46,.7); border: 2px solid #ffd23f; border-radius: 14px; padding: 4px 16px; line-height: 1.05; }
.rc-retire b { font-size: 40px; color: #ffd23f; }
.rc-retire small { font-family: var(--body); font-size: 12px; }
.rc-retire.hurry { border-color: #ff5a5f; animation: rc-hurry .5s ease-in-out infinite alternate; }
.rc-retire.hurry b { color: #ff5a5f; }
@keyframes rc-hurry { to { transform: translateX(-50%) scale(1.08); } }

/* 🎁 아이템전 */
.rc-slots { position: absolute; left: 50%; bottom: max(52px, calc(env(safe-area-inset-bottom) + 44px)); transform: translateX(-50%); display: flex; gap: 12px; z-index: 2; }
.rc-slot { position: relative; width: 64px; height: 64px; border: 3px solid rgba(29,27,46,.85); border-radius: 18px; background: rgba(255,255,255,.55); box-shadow: 0 4px 0 rgba(29,27,46,.6); font: 32px/1 var(--display); display: grid; place-items: center; padding: 0; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; }
.rc-slot.has { background: rgba(255,246,214,.92); }
.rc-slot:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(29,27,46,.6); }
.rc-slot kbd { position: absolute; left: 4px; top: 2px; font: 11px var(--display); color: var(--ink); background: rgba(255,255,255,.8); border-radius: 5px; padding: 0 4px; }
.rc-board.it, .rc-board div.it { }
.rc-board div.it { grid-template-columns: 14px 10px auto 1fr auto; }
.rc-board em.ic { font-style: normal; font-size: 11px; min-width: 14px; letter-spacing: -1px; }
.rc-rear { position: absolute; left: max(10px, env(safe-area-inset-left)); top: 120px; width: min(34vw, 190px); aspect-ratio: 16 / 10; border: 3px solid #ff3b3b; border-radius: 12px; box-shadow: 0 0 16px rgba(255,59,59,.8), inset 0 0 0 2px rgba(255,255,255,.35); pointer-events: none; z-index: 2; animation: rc-rear .4s ease-in-out infinite alternate; }
.rc-rear small { position: absolute; left: 4px; bottom: 3px; font: 11px var(--display); color: #fff; background: rgba(255,59,59,.85); padding: 0 6px; border-radius: 6px; }
@keyframes rc-rear { from { box-shadow: 0 0 6px rgba(255,59,59,.5); } to { box-shadow: 0 0 20px rgba(255,59,59,1); } }
.rc-warn { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 70px 24px rgba(255,40,40,.6); }
.rc-warn.on { animation: rc-warn .45s ease-in-out infinite alternate; }
@keyframes rc-warn { from { opacity: .15; } to { opacity: .9; } }
.race-ov.cloudy .rc-cv { filter: blur(7px) brightness(.85) saturate(.7); }
@media (pointer: coarse) {
  .rc-slots { left: auto; right: max(14px, env(safe-area-inset-right)); transform: none; bottom: max(232px, calc(env(safe-area-inset-bottom) + 222px)); }
  .rc-slot { width: 58px; height: 58px; font-size: 28px; }
}
@media (pointer: coarse) and (max-height: 480px) { .rc-slots { right: max(140px, calc(env(safe-area-inset-right) + 132px)); bottom: 48px; } }
@media (max-width: 520px) { .rc-rear { width: 36vw; } }
@media (prefers-reduced-motion: reduce) { .rc-rear, .rc-warn.on { animation: none; } .rc-warn.on { opacity: .5; } }

/* 🎈 풍선배틀 */
.rc-spec { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; z-index: 2; font: 18px var(--display); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.45); background: rgba(29,27,46,.6); padding: 6px 10px; border-radius: 16px; }
.rc-spec button { width: 46px; height: 40px; border: 3px solid rgba(29,27,46,.85); border-radius: 12px; background: rgba(255,255,255,.85); font: 18px var(--display); color: var(--ink); cursor: pointer; touch-action: none; }
.rc-board div.out { opacity: .5; }
.rc-board div.out span { text-decoration: line-through; }
.rc-laps span { font: 12px var(--body); }

/* 🎯 에임 연습장 */
.aim-seg { flex-wrap: wrap; }
.aim-wrap { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.aim-hud { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 1100px; justify-content: space-between; font-family: var(--display); }
.aim-kind { font-size: 18px; }
.aim-time { font-size: 34px; min-width: 70px; text-align: center; background: var(--ink); color: #fff; border-radius: 12px; padding: 0 12px; }
.aim-me { font-size: 18px; text-align: right; }
.aim-stage { position: relative; line-height: 0; border: var(--line); border-radius: 14px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); max-width: 100%; }
.aim-gl { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.aim-cv.over { position: relative; background: transparent; }
.aim-cv { display: block; max-width: 100%; touch-action: none; user-select: none; }
.aim-msg { position: absolute; left: 0; right: 0; bottom: 12%; text-align: center; color: #fff; font-family: var(--display); font-size: 20px; line-height: 1.3; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); pointer-events: none; }
.aim-msg.big { font-size: 90px; bottom: auto; top: 28%; }
.aim-board { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.aim-chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: var(--line); border-radius: 999px; padding: 2px 12px; font-family: var(--display); font-size: 15px; }
.aim-chip.me { background: #fff4c2; }
.aim-chip .dotc, .aim-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.aim-best { text-align: center; font-family: var(--display); font-size: 17px; }
.pl-nick .plat { margin-left: 4px; font-size: 13px; }
.aim-opts { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; font-size: 14px; }
.aim-opts label { display: flex; gap: 8px; align-items: center; }
.aim-opts input[type=range] { width: 180px; touch-action: pan-y; accent-color: var(--ink); }
.aim-cross-pick button { margin-left: 4px; min-width: 32px; padding: 3px 8px; border: var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; }
.aim-cross-pick button.on { background: var(--ink); color: #fff; }
/* 📦 물건 숨바꼭질 */
.hd-wrap { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.hd-stage { position: relative; line-height: 0; border: var(--line); border-radius: 14px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); max-width: 100%; user-select: none; }
.hd-gl { display: block; max-width: 100%; }
.hd-cv { position: absolute; inset: 0; max-width: 100%; touch-action: none; cursor: crosshair; }
.hd-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; line-height: 1.3; color: #fff; font-size: 14px; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); pointer-events: none; }
.hd-top b { font-size: 22px; background: rgba(0,0,0,.45); padding: 2px 12px; border-radius: 10px; }
#zb-heart { display: inline-block; margin-left: 8px; font-style: normal; font-size: 18px; vertical-align: 2px; will-change: transform; }
#zb-heart[hidden] { display: none; }
.hd-blind { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; line-height: 1.4; background: #12131c; color: #fff; text-align: center; }
.hd-blind[hidden], .hd-pick[hidden], .hd-skip[hidden] { display: none; }
.hd-blind b { font-size: 26px; }
.hd-blind span { font-size: 48px; font-weight: bold; }
.hd-blind small { opacity: .75; }
.hd-msg { position: absolute; left: 0; right: 0; top: 54%; text-align: center; line-height: 1.4; color: #fff; font-size: 16px; text-shadow: 0 1px 3px #000; pointer-events: none; }
.hd-pick { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); line-height: 1.3; background: rgba(18,19,28,.82); color: #fff; border-radius: 12px; padding: 8px 10px; width: min(96%, 560px); }
.hd-pick-head { font-size: 13px; text-align: center; margin-bottom: 6px; }
.hd-cards { display: flex; gap: 6px; }
.hd-card { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 2px solid rgba(255,255,255,.35); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.hd-card i { font-style: normal; font-size: 11px; background: #fff; color: #12131c; border-radius: 6px; padding: 0 6px; }
.hd-card small { font-size: 11px; opacity: .75; }
.hd-card.on { border-color: #ffd24d; background: rgba(255,210,77,.22); }
.hd-card.re { flex: .8; }
.hd-card:disabled { opacity: .4; cursor: default; }
.hd-skip { position: absolute; right: 12px; bottom: 12px; line-height: 1.3; }
.hd-keys { text-align: center; }
.hd-fever { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); line-height: 1.3; padding: 4px 14px; border-radius: 10px; background: rgba(255,60,40,.9); color: #fff; font-weight: bold; animation: hdPulse .8s infinite alternate; pointer-events: none; }
.hd-fever[hidden], .hd-hp[hidden], .hd-spec[hidden], .hd-joy[hidden], .hd-tbtns[hidden] { display: none; }
.hd-stage.fever { box-shadow: 0 0 0 4px #ff3b30, 3px 3px 0 var(--ink); animation: hdGlow .8s infinite alternate; }
@keyframes hdPulse { from { opacity: .75; } to { opacity: 1; } }
@keyframes hdGlow { from { box-shadow: 0 0 0 3px #ff3b30; } to { box-shadow: 0 0 0 7px #ff8a3b; } }
.hd-hp { position: absolute; left: 12px; top: 44px; width: 180px; height: 18px; line-height: 18px; border-radius: 9px; background: rgba(0,0,0,.5); overflow: hidden; pointer-events: none; }
.hd-hp i { position: absolute; left: 0; top: 0; bottom: 0; background: #3dc78a; transition: width .2s; }
.hd-hp i.low { background: #ff4d4d; }
.hd-hp span { position: relative; padding-left: 8px; font-size: 12px; color: #fff; }
.hd-hp .gn-ar { position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: #4fc3f7; transition: width .2s; }
.hd-spec { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; line-height: 1.3; background: rgba(18,19,28,.8); color: #fff; padding: 6px 10px; border-radius: 12px; }
.hd-spec button { border: 2px solid #fff; background: transparent; color: #fff; border-radius: 8px; padding: 4px 12px; font: inherit; font-size: 16px; cursor: pointer; }
.hd-sub { margin: 14px 0 6px; font-size: 16px; }
.hd-stage.touch { touch-action: none; }
.hd-joy { position: absolute; left: 18px; bottom: 18px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.5); touch-action: none; }
.hd-joy i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(255,255,255,.75); }
.hd-tbtns { position: absolute; right: 14px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; line-height: 1; }
.hd-tbtns button { width: 58px; height: 58px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: rgba(18,19,28,.55); color: #fff; font-size: 24px; touch-action: none; }
.hd-tbtns button.fire { width: 74px; height: 74px; background: rgba(224,83,63,.75); font-size: 30px; }
.hd-tbtns button[hidden] { display: none; }
.hd-tbtns button.on { background: rgba(255,210,63,.8); }
/* 🧟 좀비: 숨는 칸 · 환풍구 안내 */
.zb-act { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); line-height: 1.3; padding: 6px 14px; border-radius: 12px; background: rgba(18,19,28,.75); color: #fff; font-size: 15px; pointer-events: none; }
.zb-act[hidden] { display: none; }
.zb-act button { pointer-events: auto; border: 2px solid #fff; background: rgba(255,210,63,.85); color: #222; border-radius: 10px; padding: 6px 14px; font: inherit; font-size: 16px; }
.zb-slot { position: absolute; right: 14px; bottom: 16px; display: flex; gap: 8px; align-items: flex-end; pointer-events: none; color: #fff; }
.zb-slot[hidden], .zb-slot > [hidden] { display: none; }
.hd-stage.touch .zb-slot { right: 140px; }
.zb-sk { position: relative; min-width: 66px; padding: 6px 10px 5px; border-radius: 14px; border: 2px solid rgba(255,255,255,.75); background: rgba(18,19,28,.65); display: flex; flex-direction: column; align-items: center; gap: 2px; overflow: hidden; }
.zb-sk.ready { border-color: #7fff5a; box-shadow: 0 0 12px rgba(127,255,90,.6); }
.zb-sk .ic { font-size: 28px; line-height: 1.3; display: flex; align-items: center; gap: 4px; }
.zb-sk .ic b { font-size: 20px; }
.zb-sk .cd { position: absolute; inset: 0; background: conic-gradient(rgba(0,0,0,.72) var(--p, 0%), transparent 0); }
.zb-sk > b { position: absolute; inset: 0 0 16px 0; display: flex; align-items: center; justify-content: center; font-size: 22px; text-shadow: 0 1px 3px #000; }
.zb-sk small { position: absolute; left: 5px; top: 2px; font-size: 11px; opacity: .85; }
.zb-sk i { position: relative; margin-top: 3px; line-height: 1.2; font-size: 11px; font-style: normal; white-space: nowrap; opacity: .9; }
/* 🎨 페인트 점령전 */
.pt-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.pt-bar { position: absolute; left: 50%; top: 54px; transform: translateX(-50%); width: min(340px, 60%); height: 10px; display: flex; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.35); border: 2px solid rgba(255,255,255,.8); pointer-events: none; }
.pt-bar i { display: block; height: 100%; transition: width .3s; }
.pt-ammo.low { border-color: #ff6b6b; box-shadow: 0 0 12px rgba(255,107,107,.7); }
.pt-ammo .ic b { font-size: 20px; }
.pt-rank { position: absolute; left: 10px; top: 44px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; font-size: 13px; color: #fff; max-width: 42%; }
.pt-rank > div { display: flex; align-items: center; gap: 5px; background: rgba(18,19,28,.62); border-radius: 8px; padding: 3px 8px; line-height: 1.25; }
.pt-rank > div.me { outline: 2px solid #ffd23f; }
.pt-rank .n { font-weight: bold; opacity: .8; width: 12px; }
.pt-rank .w { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.pt-rank .w b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-rank .w small { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-rank .w u { text-decoration: none; color: #ffd23f; }
.pt-rank .p { font-weight: bold; font-size: 15px; margin-left: 6px; }
.pt-mini { position: absolute; right: 10px; top: 44px; width: 200px; height: 150px; border-radius: 10px; pointer-events: none; }
.hd-stage.touch .pt-mini { width: 104px; height: 78px; top: 38px; }
.hd-stage.touch .pt-rank { font-size: 11px; top: 40px; } .hd-stage.touch .pt-rank .p { font-size: 13px; } .hd-stage.touch .pt-rank .w small { font-size: 10px; }
.pt-wrap .hd-tbtns { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; justify-items: center; align-items: center; }
.pt-wrap .hd-tbtns button { width: 46px; height: 46px; font-size: 20px; }
.pt-wrap .hd-tbtns { gap: 6px; }
.pt-wrap .hd-tbtns button.fire { grid-column: span 2; order: 9; width: 72px; height: 72px; }
.zb-wrap .hd-tbtns { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; justify-items: center; align-items: center; }
.zb-wrap .hd-tbtns button { width: 52px; height: 52px; font-size: 22px; }
.zb-wrap .hd-tbtns button.fire { grid-column: span 2; order: 9; width: 72px; height: 72px; }
/* 🔫 총싸움 */
.gn-feed { position: absolute; right: 10px; top: 44px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; line-height: 1.3; font-size: 13px; pointer-events: none; }
.gn-feed > div:not(.gn-rank) { background: rgba(18,19,28,.6); color: #ddd; padding: 2px 8px; border-radius: 6px; }
.gn-rank { display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 5px 8px; margin-bottom: 4px; border-radius: 8px; background: rgba(18,19,28,.72); color: #fff; }
.gn-rank p { display: flex; align-items: center; gap: 6px; margin: 0; }
.gn-rank p.me { color: #ffd23f; }
.gn-rank i { width: 18px; font-style: normal; text-align: center; font-size: 12px; opacity: .9; }
.gn-rank b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.gn-rank span { font-weight: bold; }
.gn-dead { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; line-height: 1.4; padding: 14px 18px; border-radius: 14px; background: rgba(18,19,28,.82); color: #fff; text-align: center; }
.gn-dead[hidden], .gn-board[hidden] { display: none; }
.gn-dead b { font-size: 20px; } .gn-dead span { font-size: 28px; font-weight: bold; } .gn-dead small { opacity: .75; }
.gn-dead .opt-label { color: #fff; }
.gn-board { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); min-width: 300px; line-height: 1.5; padding: 10px 14px; border-radius: 12px; background: rgba(18,19,28,.85); color: #fff; font-size: 14px; }
.gn-board table { width: 100%; margin-top: 6px; border-collapse: collapse; } .gn-board td { padding: 2px 6px; } .gn-board tr.me { background: rgba(255,210,63,.2); }
.gn-tboard { position: absolute; left: 14px; top: 76px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: rgba(18,19,28,.55); font-size: 20px; line-height: 1; }
.gn-wrap .hd-tbtns { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; justify-items: center; align-items: center; }
.gn-wrap .hd-tbtns button { width: 52px; height: 52px; font-size: 22px; }
.gn-wrap .hd-tbtns button.fire { grid-column: span 2; order: 9; width: 72px; height: 72px; }
.gn-pick { display: flex; flex-direction: column; gap: 6px; align-items: center; margin: 8px 0; }

.hd-stage.touch .hd-pick { bottom: auto; top: 44px; }
/* 📱 숨바꼭질: 폰은 화면 전체 */
body.hd-full { overflow: hidden; }
body.hd-full .hd-stage.touch { position: fixed; inset: 0; z-index: 60; border: 0; border-radius: 0; box-shadow: none; max-width: none; background: #12131c; }
body.hd-full .hd-stage.touch .hd-gl, body.hd-full .hd-stage.touch .hd-cv { max-width: none; }
body.hd-full .hd-stage.touch .hd-pick { width: min(70%, 520px); }
.hd-rotate { display: none; }
body.can-lock .hd-rotate::after { content: '👆 화면을 한 번 누르면 가로로 바뀌어요'; position: absolute; left: 0; right: 0; top: calc(50% + 34px); font-size: 15px; opacity: .8; }
@media (orientation: portrait) { body.hd-full .hd-rotate { display: flex; position: fixed; inset: 0; z-index: 70; align-items: center; justify-content: center; text-align: center; padding: 24px; background: #12131c; color: #fff; font-size: 20px; line-height: 1.5; } }
.hd-maps { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.hd-map { flex: 1; min-width: 220px; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 14px; border: var(--line); border-radius: 16px; background: #fff; box-shadow: 3px 3px 0 var(--ink); font: inherit; cursor: pointer; }
.hd-map:hover:not(:disabled) { transform: translateY(-2px); }
.hd-map.on { background: #fff4c8; box-shadow: 0 0 0 4px #ffd24d, 3px 3px 0 var(--ink); }
.hd-map:disabled { cursor: default; opacity: .8; }
.hd-map-icon { font-size: 48px; line-height: 1; }
.hd-map b { font-size: 20px; }
.hd-map small { color: #666; text-align: center; }
.hd-map-n { margin-top: 4px; padding: 2px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: bold; }
/* 🧊 얼음땡 */
.fz-ice { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; line-height: 1.3; padding: 8px 16px; border-radius: 14px; background: rgba(20,60,90,.7); color: #e1f5fe; text-align: center; pointer-events: none; }
.fz-ice[hidden] { display: none; }
.fz-ice b { font-size: 26px; }
.fz-wrap .hd-tbtns, .pk-wrap .hd-tbtns { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; justify-items: center; align-items: center; }
.fz-wrap .hd-tbtns button, .pk-wrap .hd-tbtns button { width: 54px; height: 54px; font-size: 22px; }
.fz-wrap .hd-tbtns button.fire, .pk-wrap .hd-tbtns button.fire { grid-column: span 2; order: 9; width: 74px; height: 74px; }
/* 🏃‍♂️ 파쿠르 */
.pk-rank { position: absolute; right: 10px; top: 44px; display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 5px 8px; border-radius: 8px; background: rgba(18,19,28,.62); color: #fff; line-height: 1.3; font-size: 13px; pointer-events: none; }
.pk-rank:empty { display: none; }
.pk-rank p { display: flex; align-items: center; gap: 6px; margin: 0; }
.pk-rank p.me { color: #ffd23f; }
.pk-rank i { width: 16px; font-style: normal; text-align: center; opacity: .85; }
.pk-rank b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100px; }
.pk-count { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 96px; font-weight: bold; line-height: 1; color: #fff; text-shadow: 0 4px 12px rgba(0,0,0,.6); pointer-events: none; }
.pk-count[hidden] { display: none; }
.hd-stage.touch .pk-rank { top: 40px; min-width: 120px; font-size: 12px; }


/* 💣 폭탄 · ⛄ 눈싸움 · 🕵️ 스파이 */
.bm-wrap .hd-tbtns, .sb-wrap .hd-tbtns, .sp-wrap .hd-tbtns { display: grid; grid-template-columns: repeat(2, auto); gap: 8px; justify-items: center; align-items: center; }
.bm-wrap .hd-tbtns button, .sb-wrap .hd-tbtns button, .sp-wrap .hd-tbtns button { width: 54px; height: 54px; font-size: 22px; }
.bm-wrap .hd-tbtns button.fire, .sb-wrap .hd-tbtns button.fire, .sp-wrap .hd-tbtns button.fire { grid-column: span 2; order: 9; width: 74px; height: 74px; }
.sb-wrap .hd-tbtns button.on { background: #80d8ff; }
.zb-act[hidden], .sb-dead[hidden] { display: none; }
#sb-ammo { bottom: 18px; }
.sb-feed { position: absolute; right: 10px; top: 78px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; pointer-events: none; }
.sb-feed div { padding: 2px 9px; border-radius: 8px; background: rgba(18,19,28,.6); color: #fff; font-size: 13px; }
.sb-dead { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); padding: 10px 18px; border-radius: 14px; background: rgba(20,30,50,.75); color: #e3f2fd; font-size: 18px; pointer-events: none; }
.sp-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.85); }

/* 🧍 내 캐릭터 */
.pl-fig { display: block; width: 46px; height: 76px; margin: 4px auto 0; border-radius: 8px; image-rendering: auto; }
.pl-fig[data-action] { cursor: pointer; outline: 2px dashed transparent; }
.pl-fig[data-action]:hover { outline-color: var(--ink, #222); }
.look-btn { display: block; margin: 4px auto 0; padding: 2px 10px; border-radius: 10px; border: 2px solid var(--ink, #222); background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.lk-box { width: min(760px, 100%); }
.lk-main { display: flex; gap: 14px; align-items: flex-start; }
.lk-view { flex: 0 0 200px; text-align: center; }
.lk-view canvas { width: 200px; height: 300px; border-radius: 14px; border: 2px solid var(--ink, #222); touch-action: none; cursor: grab; }
.lk-side { flex: 1; min-width: 0; }
.lk-tabs, .lk-grids { margin-bottom: 10px; }
.lk-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.lk-lab { width: 62px; font-weight: bold; font-size: 14px; }
.lk-sw, .lk-pal { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.lk-sw button, .lk-pal button { width: 26px; height: 26px; border-radius: 7px; border: 2px solid rgba(0,0,0,.25); cursor: pointer; padding: 0; }
.lk-sw button.on, .lk-pal button.on { border-color: var(--ink, #222); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink, #222); }
.lk-sw input[type=color] { width: 34px; height: 28px; border: none; padding: 0; background: none; cursor: pointer; }
.lk-opts { display: flex; flex-wrap: wrap; gap: 5px; }
.lk-opts button { padding: 4px 10px; border-radius: 10px; border: 2px solid var(--ink, #222); background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.lk-opts button.on { background: #ffd23f; }
.lk-grid { display: grid; gap: 1px; width: min(240px, 100%); margin: 0 auto 8px; background: #cfd8dc; border: 2px solid var(--ink, #222); touch-action: none; user-select: none; }
.lk-grid i { background: repeating-conic-gradient(#f4f6f8 0 25%, #fff 0 50%) 0 0 / 8px 8px; cursor: crosshair; }
.lk-pal .lk-eraser { width: auto; padding: 0 6px; background: #fff; font-size: 14px; }
.lk-btns { justify-content: center; flex-wrap: wrap; }
@media (max-width: 620px) {
  .lk-main { flex-direction: column; align-items: stretch; }
  .lk-view { flex: none; }
  .lk-view canvas { width: 140px; height: 210px; }
}
.zb-slot.fz-slot { right: auto; left: 14px; }
.zb-sk.off { opacity: .45; }

/* ✨ 닉네임 꾸미기 */
.lk-nkpv { margin: 4px 0 8px; padding: 10px; text-align: center; font-size: 22px; font-weight: 700; border: 2px dashed #c9c3dd; border-radius: 12px; background: #fff; }
.lk-admin { margin-top: 12px; padding-top: 8px; border-top: 2px dashed #e1def0; }
.lk-admin h3 { margin: 0 0 6px; font-size: 16px; }
.lk-admin h3 small { font-weight: 400; color: var(--muted); font-size: 12px; }
.lk-admin #lk-apw { flex: 1 1 140px; min-width: 0; padding: 6px 8px; border: var(--line); border-radius: 10px; font: inherit; }

/* ⏭️ 방장: 바로 다음 판 */
.skip-btn { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; box-shadow: 3px 3px 0 var(--ink, #222); }
.skip-btn[hidden] { display: none; }
/* 🎭 거짓말 경매 */
.au-wrap { display: flex; flex-direction: column; gap: 12px; }
.au-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border: var(--line); border-radius: 18px; background: linear-gradient(180deg, #fff8e6, #fff); box-shadow: var(--shadow); }
.au-item .au-icon { font-size: 64px; line-height: 1.1; }
.au-item > b { font-size: 24px; }
.au-item small { color: var(--muted); font-size: 13px; text-align: center; }
.au-mine { font-size: 17px; }
.au-card { display: inline-block; min-width: 54px; padding: 3px 8px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; font-weight: bold; text-align: center; }
.au-card.plus { background: #d8f7e3; color: #0f7a3d; }
.au-card.minus { background: #ffe0e0; color: #c62828; }
.au-card.zero { background: #eceff1; color: #455a64; }
.au-card.fake { background: #2b2440; color: #ff8a8a; }
.au-card.back { background: repeating-linear-gradient(45deg, #5c6bc0, #5c6bc0 6px, #7986cb 6px, #7986cb 12px); color: #fff; }
.au-now, .au-reveal { text-align: center; }
.au-price { font-size: 20px; margin: 4px 0; }
.au-price b { font-size: 26px; }
.au-timer { height: 8px; border-radius: 4px; background: #e3e7f3; overflow: hidden; margin: 6px auto; max-width: 420px; }
.au-timer i { display: block; height: 100%; background: linear-gradient(90deg, #ff9f1c, #ffd23f); transition: width .2s linear; }
.au-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 8px 0; }
.au-btns .btn small { opacity: .75; font-size: 12px; }
.au-custom { display: inline-flex; gap: 4px; align-items: center; }
.au-custom input { width: 78px; padding: 8px; border: var(--line); border-radius: 10px; font: inherit; text-align: center; }
.au-log { font-size: 13px; color: var(--muted); }
.au-log span { white-space: nowrap; }
.au-seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.au-seat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 2px solid #c9cde0; border-radius: 14px; background: #fff; }
.au-seat.turn { border-color: #ff9f1c; box-shadow: 0 0 0 3px rgba(255,159,28,.35); }
.au-seat.high { border-color: #ffc21a; background: #fffbe6; }
.au-seat.out { opacity: .5; }
.au-seat.me { background: #eef4ff; }
.au-seat small { min-height: 16px; font-size: 12px; color: var(--muted); }
.au-coin { font-weight: bold; }
.au-sum { font-size: 18px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.au-sum b.plus { color: #0f7a3d; } .au-sum b.minus { color: #c62828; } .au-sum b.fake { color: #c62828; }
.au-val { font-size: 24px; }
.au-up { color: #0f7a3d; } .au-down { color: #c62828; }
.au-hist summary { cursor: pointer; font-weight: bold; }
.au-hist table { margin-top: 6px; font-size: 14px; }

/* 앱 받기 (첫 화면 맨 아래 작게) */
.dl-foot { text-align: center; font-size: 13px; color: var(--muted); margin: 14px 0 4px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.dl-foot[hidden] { display: none; }
.dl-foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* 📶 핑 (화면 맨 아래 가운데 · 작게 · 눌리지 않음) */
.ping { position: fixed; left: 50%; bottom: 2px; transform: translateX(-50%); z-index: 80; border: 0; cursor: pointer; font: 600 11px/1 system-ui, sans-serif; padding: 3px 7px; border-radius: 99px; background: rgba(0,0,0,.45); color: #fff; }
.ping[hidden] { display: none; }
.ping.good { color: #8dffa8; } .ping.mid { color: #ffe27a; } .ping.bad { color: #ff8a8a; }
