/* ============================================================
   덕섯다 — 밝은 파랑·노랑·오리 콘셉트 (어두운 카지노 금지)
   ============================================================ */
.sd-page { max-width: 1180px; margin: 0 auto; }

/* ---------- 히어로 ---------- */
.sd-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 24px; margin-bottom: 14px; border-radius: 16px;
  background: linear-gradient(105deg, #2b8fe0 0%, #1d6bfa 70%, #3aa0e8 100%); color: #fff; }
.sd-hero h1 { margin: 0; font-size: 24px; letter-spacing: -0.5px; }
.sd-hero p { margin: 4px 0 0; font-size: 13px; font-weight: 700; opacity: .92; }
.sd-hero-right { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.sd-hero-right b { font-size: 20px; color: #ffd447; font-weight: 1000; }
.sd-hero-right small { font-size: 12px; font-weight: 700; opacity: .9; }

/* ---------- 로비 ---------- */
.sd-lobby { padding: 20px; }
.sd-lobby-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sd-lobby-head h2 { margin: 0; font-size: 17px; display: inline-block; }
.sd-conn { margin-left: 10px; font-size: 12px; font-weight: 800; color: #98a5b5; }
.sd-conn.on { color: #21824b; }
.sd-rooms { display: flex; flex-direction: column; gap: 8px; }
.sd-room { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
  border: 2px solid #dcebfa; border-radius: 13px; background: #f7fbff; cursor: pointer;
  font: inherit; text-align: left; transition: border-color .15s, transform .1s; }
.sd-room:hover:not(:disabled) { border-color: #7cc4f0; transform: translateY(-1px); }
.sd-room:disabled { opacity: .55; cursor: not-allowed; }
.sd-room-ico { font-size: 22px; }
.sd-room-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sd-room-info b { font-size: 14px; }
.sd-room-info small { font-size: 12px; color: #6a7e8f; font-weight: 700; }
.sd-room em { font-style: normal; font-size: 12px; font-weight: 900; color: #1d6bfa; }
.sd-empty { padding: 34px 10px; text-align: center; color: #8ba0b3; font-weight: 800; }
.sd-pwrow { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.sd-pwrow .gg-input { width: 180px; }
.sd-create { margin-top: 16px; padding: 16px; border: 2px dashed #bcd8f0; border-radius: 14px; background: #fbfdff; }
.sd-create h3 { margin: 0 0 12px; font-size: 15px; }
.sd-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.sd-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 800; color: var(--tx-sub); }
.sd-form-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 13px; font-weight: 800; align-items: center; }
.sd-form-checks label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.sd-form-actions { display: flex; gap: 10px; margin-top: 14px; }

/* ---------- 게임 레이아웃 ---------- */
.sd-play { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.sd-table-wrap { background: #fff; border: 1px solid #e3effb; border-radius: 18px; padding: 18px; }

/* ---------- 테이블 (밝은 파란 타원 + 노란 외곽) ---------- */
.sd-table { position: relative; height: 470px; border-radius: 50% / 42%;
  background: radial-gradient(ellipse at 50% 36%, #4fb3d9 0%, #2e94c9 55%, #2380b6 100%);
  border: 14px solid #ffd447; box-shadow: inset 0 10px 40px rgba(9, 60, 96, .25), 0 8px 26px rgba(43, 108, 212, .14); }
.sd-deco { position: absolute; font-size: 16px; opacity: .35; pointer-events: none; }
.sd-deco.d1 { left: 16%; top: 24%; } .sd-deco.d2 { right: 15%; bottom: 30%; } .sd-deco.d3 { left: 24%; bottom: 22%; }

/* ---------- 판돈 ---------- */
.sd-pot { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 22px; border-radius: 16px; background: rgba(10, 62, 96, .35); color: #fff; min-width: 190px; }
.sd-pot-round { font-size: 11px; font-weight: 900; padding: 2px 10px; border-radius: 9px; background: #ffd447; color: #6b4d00; }
.sd-pot-amount { font-size: 24px; font-weight: 1000; color: #ffd447; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.sd-pot-amount em { font-style: normal; font-size: 14px; }
.sd-chips i { font-style: normal; font-size: 18px; margin: 0 -2px; }
.sd-pot-call { font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 9px; background: rgba(255,255,255,.92); color: #1d5c8c; }
.sd-pot-carry { font-size: 11px; font-weight: 800; color: #ffe9a1; }

/* ---------- 좌석 ---------- */
.sd-seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 132px; }
.sd-seat.is-top { left: 50%; top: 6%; transform: translateX(-50%); }
.sd-seat.is-left { left: 4%; top: 34%; }
.sd-seat.is-right { right: 4%; top: 34%; }
.sd-seat.is-turn .sd-ava-frame { box-shadow: 0 0 0 4px #ffd447, 0 0 18px #ffd447aa; }
.sd-seat.is-dead { opacity: .5; filter: grayscale(.7); }
.sd-seat.is-off .sd-seat-tag b::after { content: " 〰"; color: #d05454; }
.sd-ava-frame { --sz: 52px; width: var(--sz); height: var(--sz); border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #ffffff 0%, #dcebfc 100%);
  border: 3px solid #fff; box-shadow: 0 4px 12px rgba(9, 60, 96, .3);
  display: flex; align-items: center; justify-content: center; flex: none; }
/* 공용 아바타를 «컨테이너째» 만 다듬는다 — 레이어·좌표는 그대로 (효과는 좌석 안에서만 클리핑) */
.sd-ava-frame .gg-avatar-box.sd-seat-ava { --fx-bg-scale: 0.95; --fx-head-scale: 0.95; overflow: hidden; border-radius: 50%; }
.sd-ai-duck { font-size: 26px; }
.sd-seat-tag { display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 5px 10px; border-radius: 10px; background: #124f79; color: #fff; max-width: 132px; }
.sd-seat-tag b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 118px; }
.sd-seat-tag small { font-size: 10px; color: #a9dbf2; font-weight: 800; }
.sd-seat-tag em { font-style: normal; font-size: 10px; font-weight: 900; color: #ffd447; }
.sd-seat-cards { display: flex; gap: 3px; align-items: center; position: relative; }
.sd-seat-cards .sd-card svg { width: 26px; height: 39px; }
.sd-seat-rank { font-style: normal; font-size: 10px; font-weight: 900; color: #6b4d00;
  background: #ffd447; border-radius: 7px; padding: 1px 6px; margin-left: 3px; }
.sd-turn-badge { position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 11px; font-weight: 900; color: #6b4d00;
  background: #ffd447; padding: 3px 10px; border-radius: 9px; box-shadow: 0 3px 8px rgba(0,0,0,.2); }

/* ---------- 내 패 ---------- */
.sd-mine { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sd-mine-label { font-size: 11px; font-weight: 900; color: #fff; background: #124f79; padding: 3px 12px; border-radius: 9px; }
.sd-mine-cards { display: flex; gap: 8px; }
.sd-mine-cards .sd-card svg { width: 62px; height: 93px; filter: drop-shadow(0 5px 10px rgba(0,0,0,.28)); }
.sd-mine-rank { font-size: 13px; font-weight: 1000; color: #6b4d00; background: #ffe27a;
  border: 2px solid #f5b400; padding: 2px 14px; border-radius: 11px; }
.sd-card { display: inline-flex; }
.sd-card svg { display: block; }

/* ---------- 결과 ---------- */
.sd-result { margin: 12px 0 0; padding: 14px 16px; border-radius: 14px; background: #fff9e2;
  border: 2px solid #ffd447; display: flex; flex-direction: column; gap: 8px; }
.sd-result > b { font-size: 16px; }
.sd-result.is-rematch { background: #eef6ff; border-color: #7cc4f0; }
.sd-result-hands { display: flex; flex-wrap: wrap; gap: 14px; }
.sd-result-hands > div { display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 11px; background: #fff; }
.sd-result-hands > div.is-win { box-shadow: 0 0 0 2px #f5b400; }
.sd-result-hands .sd-card svg { width: 30px; height: 45px; }
.sd-result-hands i { font-style: normal; font-size: 12px; font-weight: 900; color: #b8860b; }
.sd-result-pays { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; font-weight: 900; }
.sd-result-pays .up { color: #1c8a4c; } .sd-result-pays .down { color: #d05454; }

/* ---------- 행동 버튼 ---------- */
.sd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 14px; }
.sd-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 54px; padding: 6px 8px; border: 0; border-radius: 13px; cursor: pointer;
  font: 900 14px/1.25 inherit; color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.14); transition: transform .08s, filter .12s; }
.sd-btn small { font-size: 11px; font-weight: 800; opacity: .95; }
.sd-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.sd-btn:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.sd-btn.is-die { background: #7a8494; }
.sd-btn.is-bbing { background: #2b8fe0; }
.sd-btn.is-call { background: #1d6bfa; }
.sd-btn.is-ddadang { background: #2aa4d9; }
.sd-btn.is-half { background: #f5b400; color: #513c00; }
.sd-btn.is-allin { background: #f2695c; }
.sd-btn.is-start { background: #22a35e; }
.sd-btn.is-ready { background: #1d6bfa; }
.sd-btn.is-ready-off { background: #7a8494; }
.sd-btn.is-ai { background: #6b7fd6; }
.sd-btn.is-ghost { background: #b9c6d6; color: #384657; }
.sd-btn.is-leave { background: #fff; color: #c0453a; box-shadow: inset 0 0 0 2px #f2b0a8; }
.sd-actions-note { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 9px; font-size: 12px; font-weight: 800; color: #6a7e8f; }
.sd-server-timer b { color: #1d6bfa; }

/* ---------- 우측: 현황·채팅 ---------- */
.sd-side { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sd-side-head { display: flex; align-items: baseline; justify-content: space-between; }
.sd-side h3 { margin: 0; font-size: 14px; }
.sd-side-head small { font-size: 11px; color: #8ba0b3; font-weight: 800; }
.sd-side-list { display: flex; flex-direction: column; }
.sd-side-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 2px; border-bottom: 1px dashed #e6eef7; font-size: 13px; }
.sd-side-row b { font-weight: 900; }
.sd-side-row span { font-weight: 900; color: #1d6bfa; }
.sd-side-row.is-turn { background: #fff7d8; border-radius: 8px; padding: 8px 8px; }
.sd-side-chat { display: flex; flex-direction: column; gap: 8px; }
.sd-chat { height: 210px; overflow-y: auto; border: 1px solid #e6eef7; border-radius: 10px;
  padding: 8px 10px; font-size: 12.5px; line-height: 1.65; background: #fbfdff; }
.sd-chat-row b { color: #1d6bfa; margin-right: 4px; }
.sd-chat-sys { color: #8ba0b3; font-weight: 700; }
.sd-chat-input { display: flex; gap: 6px; }
.sd-chat-input .gg-input { flex: 1; min-width: 0; }

/* ---------- 모바일 (스펙 19: 정보→테이블→내 패→버튼→현황→채팅) ---------- */
@media (max-width: 900px) {
  .sd-play { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sd-hero { padding: 13px 16px; }
  .sd-hero h1 { font-size: 19px; }
  .sd-hero-right b { font-size: 15px; }
  .sd-table-wrap { padding: 10px; }
  .sd-table { height: 400px; border-width: 9px; }
  .sd-seat { width: 106px; }
  .sd-seat.is-left { left: 1%; top: 26%; } .sd-seat.is-right { right: 1%; top: 26%; }
  .sd-pot { top: 46%; }
  .sd-ava-frame { --sz: 42px; }
  .sd-seat-tag b { font-size: 11px; max-width: 96px; }
  .sd-mine-cards .sd-card svg { width: 52px; height: 78px; }
  .sd-pot { min-width: 150px; padding: 9px 14px; }
  .sd-pot-amount { font-size: 19px; }
  .sd-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sd-btn { min-height: 50px; font-size: 13px; }
  .sd-btn small { font-size: 10px; }
  .sd-form { grid-template-columns: 1fr 1fr; }
  .sd-chat { height: 160px; }
}
@media (max-width: 380px) {
  .sd-table { height: 330px; }
  /* 초소형 화면 — 좌석의 미니 카드는 숨긴다 (공개 패·족보는 아래 결과 카드에 그대로 나온다) */
  .sd-seat-cards { display: none; }
  .sd-seat { width: 88px; }
  .sd-seat.is-left { left: 0; top: 20%; } .sd-seat.is-right { right: 0; top: 20%; }
  .sd-ava-frame { --sz: 36px; }
  .sd-pot { top: 44%; min-width: 132px; }
  .sd-mine-cards .sd-card svg { width: 46px; height: 69px; }
  .sd-actions { gap: 5px; }
  .sd-btn { min-height: 46px; font-size: 12px; padding: 4px 4px; }
  .sd-actions-note { flex-direction: column; align-items: flex-start; gap: 2px; }
}
