/* ============================================================
   DUCK HIGH & LOW — 시안 1:1 구현
   시안 원본 PC 폭 1227px → 사이트 본문 폭 1060px (배율 0.8639)
   씬(풍경) 안의 요소는 전부 % 좌표라 어떤 폭에서도 비율이 그대로 유지된다.
   ============================================================ */
.gg-hl {
  --hl-bg: #d2e4fc;
  --hl-card: #ffffff;
  --hl-blue: #1866f0;          /* 굴리기 버튼 */
  --hl-blue-2: #368aea;        /* 제목 DUCK */
  --hl-blue-dark: #0f4fc4;
  --hl-low-bg: #eaf0fc;
  --hl-low-text: #2a7eea;
  --hl-yellow: #f6a81e;
  --hl-yellow-dark: #d98c07;
  --hl-high-bg: #fcf6d8;
  --hl-text: #0b1740;
  --hl-muted: #667290;
  --hl-sub: #7e8aa2;
  --hl-border: #e4edfa;
  --hl-shadow: 0 6px 18px rgba(96, 143, 214, .13);

  width: 1060px;
  margin: 18px auto 0;
}

/* ---------- 페이지 판 ---------- */
.hl-page {
  background: var(--hl-card);
  border: 1px solid var(--hl-border);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(96, 143, 214, .14);
}

/* ---------- 상단 (로고 · 제목 · 보유 포인트) ---------- */
.hl-top { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; }
.hl-top-duck { width: 52px; height: 56px; object-fit: contain; image-rendering: pixelated; flex: none; }
.hl-title { font-size: 29px; font-weight: 900; letter-spacing: -0.5px; line-height: 1.1; margin: 0; }
.hl-title .t1 { color: var(--hl-blue-2); }
.hl-title .t2 { color: var(--hl-yellow); }
.hl-title .t3 { color: var(--hl-blue-2); }
.hl-desc { margin: 5px 0 0; font-size: 12.5px; font-weight: 700; color: var(--hl-sub); }

.hl-bgm {
  margin-left: auto;
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--hl-border); border-radius: 12px;
  background: #fbfdff;
  font-size: 17px; line-height: 1; cursor: pointer;
  box-shadow: var(--hl-shadow);
  transition: background .14s ease, filter .14s ease;
}
.hl-bgm:hover { background: #f2f8ff; }
.hl-bgm.is-off { filter: grayscale(1); opacity: .65; }

.hl-purse {
  margin-left: 10px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px;
  min-width: 275px;
  border: 1px solid var(--hl-border);
  border-radius: 18px;
  background: #fbfdff;
  box-shadow: var(--hl-shadow);
}
.hl-purse-coin { width: 30px; height: 30px; object-fit: contain; flex: none; }
.hl-purse-label { font-size: 11.5px; font-weight: 800; color: var(--hl-sub); }
.hl-purse-val { font-size: 19px; font-weight: 900; color: var(--hl-text); font-variant-numeric: tabular-nums; }
.hl-purse-val small { font-size: 12px; font-weight: 800; color: var(--hl-muted); margin-left: 2px; }
.hl-purse-btn {
  margin-left: auto; flex: none;
  height: 30px; padding: 0 12px;
  border: none; border-radius: 10px;
  background: var(--hl-blue); color: #fff;
  font-size: 12.5px; font-weight: 800; cursor: pointer;
}
.hl-purse-btn:hover { background: var(--hl-blue-dark); }

/* ---------- 2열 ---------- */
.hl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 14px; align-items: start; }

/* ============================================================
   메인 카드
   ============================================================ */
.hl-main {
  background: var(--hl-card);
  border: 1px solid var(--hl-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--hl-shadow);
}

/* ---------- 무대 : 씬 + 위에 얹히는 요소들 ---------- */
.hl-stage { position: relative; }
.hl-picks { position: absolute; inset: 0; pointer-events: none; }
.hl-picks > * { pointer-events: auto; }

/* ---------- 씬 (풍경) — 내부 좌표는 전부 % ---------- */
.hl-scene {
  position: relative;
  aspect-ratio: 888 / 479;
  background: url("../../../assets/highlow/scene.png") center / 100% 100% no-repeat;
}

/* 현재 연승 카드 : 시안 x 2.6% w 22.3% / y 4.5% h 30.1% */
.hl-streak {
  position: absolute; left: 2.6%; top: 4.5%; width: 22.3%;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 3px 10px rgba(40, 80, 150, .16);
  font-weight: 800;
}
.hl-streak-a { background: rgba(255, 255, 255, .93); padding: 9% 10% 8%; }
.hl-streak-b { background: #fff6e0; padding: 8% 10%; border-top: 1px solid #f6e6c2; }
.hl-streak-t { font-size: 11.5px; color: var(--hl-muted); }
.hl-streak-v { display: flex; align-items: center; gap: 4px; font-size: 17px; font-weight: 900; color: var(--hl-text); margin-top: 3px; }
.hl-streak-v i { font-style: normal; font-size: 16px; }
.hl-streak-bt { font-size: 11px; color: #9a7a2e; }
.hl-streak-bv { font-size: 12.5px; font-weight: 900; color: #8a6413; margin-top: 3px; }

/* 말풍선 : x 66.6% w 20.0% / y 6.5% h 19.2% */
.hl-bubble {
  position: absolute; left: 66.6%; top: 6.5%; width: 20.0%;
  background: #fff; border-radius: 14px;
  padding: 3.0% 2.4%;
  text-align: center;
  font-size: 12px; font-weight: 800; color: var(--hl-text); line-height: 1.65;
  box-shadow: 0 4px 12px rgba(40, 80, 150, .14);
}
.hl-bubble::after {
  content: ""; position: absolute; left: -9px; top: 46%;
  border: 8px solid transparent; border-right-color: #fff; border-left: none;
}

/* 주사위 눈 — 씬에 그려진 오리가 든 주사위 위에 정확히 겹친다
   시안 실측: 주사위 면 x 44.9%~59.5%, y 25.4%~51.1% */
.hl-dice {
  position: absolute; left: 44.9%; top: 25.9%; width: 14.6%; height: 26.2%;
  transform-origin: 50% 100%;
}
.hl-dice i {
  position: absolute; width: 16.3%; aspect-ratio: 1;
  border-radius: 50%; background: #17181a;
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .06s linear;
}
.hl-dice i.on { opacity: 1; }
.hl-dice i.p1 { left: 27%; top: 28%; }
.hl-dice i.p2 { left: 73%; top: 28%; }
.hl-dice i.p3 { left: 27%; top: 51%; }
.hl-dice i.p4 { left: 73%; top: 51%; }
.hl-dice i.p5 { left: 50%; top: 51%; }
.hl-dice i.p6 { left: 27%; top: 74%; }
.hl-dice i.p7 { left: 73%; top: 74%; }
.hl-stage.is-rolling .hl-dice { animation: hlShake .28s ease-in-out infinite; }
@keyframes hlShake {
  0%, 100% { transform: translate(0, 0) rotate(-2.5deg); }
  50%      { transform: translate(0, -3%) rotate(2.5deg); }
}

/* LOW / HIGH 선택 카드
   LOW  : x 2.6% w 29.4% / y 54.4% h 45.0%
   HIGH : x 69.5% w 29.5% / y 52.4% h 47.0% */
.hl-pick {
  position: absolute;
  border-radius: 16px;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 5px 14px rgba(40, 80, 150, .15);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  padding: 0;
}
.hl-pick:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(40, 80, 150, .22); }
.hl-pick.is-low  { left: 2.6%;  top: 55.5%; width: 29.4%; height: 44.5%; background: linear-gradient(180deg, #f2f8ff 0%, #e1f1fe 62%, #cfe8fd 100%); }
.hl-pick.is-high { left: 69.5%; top: 53.5%; width: 29.5%; height: 46.5%; background: linear-gradient(180deg, #fffdf3 0%, #fef5cd 100%); }
.hl-pick.is-on.is-low  { border-color: #4a97f2; box-shadow: 0 0 0 4px rgba(74, 151, 242, .28), 0 9px 20px rgba(40, 80, 150, .22); }
.hl-pick.is-on.is-high { border-color: #f3b63c; box-shadow: 0 0 0 4px rgba(243, 182, 60, .30), 0 9px 20px rgba(40, 80, 150, .22); }
.hl-pick-radio {
  position: absolute; left: 7%; top: 5.5%;
  width: 17px; height: 17px; border-radius: 50%;
  background: #fff; border: 2px solid #cfe0f5;
}
.hl-pick.is-on .hl-pick-radio { border-color: currentColor; }
.hl-pick.is-on.is-low  .hl-pick-radio { border-color: #4a97f2; box-shadow: inset 0 0 0 3px #4a97f2; }
.hl-pick.is-on.is-high .hl-pick-radio { border-color: #f3b63c; box-shadow: inset 0 0 0 3px #f3b63c; }
.hl-pick-name { position: absolute; left: 0; right: 0; top: 8%; z-index: 2; font-size: 26px; font-weight: 900; letter-spacing: 1px; text-align: center; line-height: 1; }
.hl-pick.is-low  .hl-pick-name { color: var(--hl-low-text); }
.hl-pick.is-high .hl-pick-name { color: var(--hl-yellow); }
.hl-pick-nums { position: absolute; left: 0; right: 0; top: 31%; z-index: 2; text-align: center; font-size: 15px; font-weight: 900; letter-spacing: 2px; }
.hl-pick.is-low  .hl-pick-nums { color: #6f97cf; }
.hl-pick.is-high .hl-pick-nums { color: #c9962f; }
.hl-pick-duck {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%);
  width: 76%; display: block; z-index: 1;
  mix-blend-mode: multiply;      /* 크롭에 남은 카드 배경을 자연스럽게 녹인다 */
}
.hl-pick.is-high .hl-pick-duck { width: 72%; bottom: 4%; }

/* 중앙 안내 : x 35.4% w 31.3% / y 70.5% h 17.4% */
.hl-guide {
  position: absolute; left: 35.4%; top: 71.5%; width: 31.3%;
  background: rgba(255, 255, 255, .88);
  border-radius: 14px;
  padding: 3.4% 2%;
  text-align: center; line-height: 1.7;
  font-size: 12.5px; font-weight: 800; color: var(--hl-muted);
  box-shadow: 0 3px 10px rgba(40, 80, 150, .10);
}
.hl-guide b { display: block; font-size: 14px; color: var(--hl-text); margin-top: 2px; }
.hl-guide.is-win  b { color: #1f9d55; }
.hl-guide.is-lose b { color: #d2544e; }
.hl-arrow {
  position: absolute; left: 50%; top: 91.5%; transform: translateX(-50%);
  font-size: 17px; color: #6f9ad6; font-weight: 900;
}

/* ---------- 씬 아래 : 베팅 / 굴리기 ---------- */
.hl-play { padding: 11px 14px 14px; }
.hl-bet-label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 900; color: var(--hl-text); margin-bottom: 11px;
}
.hl-help {
  width: 17px; height: 17px; border-radius: 50%;
  background: #eaf1fb; color: #7e93b5;
  font-size: 11px; font-weight: 900; line-height: 17px; text-align: center;
  cursor: help;
}
.hl-chips { display: flex; justify-content: center; gap: 13px; }
.hl-chip {
  flex: 0 0 132px;
  height: 43px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 1.5px solid var(--hl-border);
  border-radius: 12px;
  background: #fdfeff;
  font-size: 15px; font-weight: 900; color: var(--hl-text);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.hl-chip small { font-size: 11.5px; font-weight: 800; color: var(--hl-muted); }
.hl-chip img { width: 19px; height: 19px; object-fit: contain; }
.hl-chip:hover { border-color: #bcd6f6; }
.hl-chip.is-on { background: #eaf2fe; border-color: #9ec6f6; box-shadow: 0 0 0 3px rgba(158, 198, 246, .35); }
.hl-roll {
  display: block; width: 251px; height: 45px; margin: 14px auto 0;
  border: none; border-radius: 13px;
  background: linear-gradient(180deg, #2a76f4, #1462ee);
  color: #fff; font-size: 17px; font-weight: 900; letter-spacing: -0.3px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(24, 102, 240, .35);
  transition: transform .12s ease, filter .12s ease;
}
.hl-roll:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.hl-roll:disabled { filter: grayscale(.35) brightness(.92); cursor: default; }
.hl-roll-ico { margin-right: 7px; }
.hl-hint { margin: 9px 0 0; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--hl-sub); }

/* ---------- 최근 게임 결과 ---------- */
.hl-recent { margin: 2px 14px 14px; padding: 12px 13px 13px; border: 1px solid var(--hl-border); border-radius: 14px; }
.hl-recent-h { font-size: 13.5px; font-weight: 900; color: var(--hl-text); margin-bottom: 11px; }
.hl-recent-row { display: flex; gap: 12px; }
.hl-recent-item {
  position: relative; flex: 1 1 0; min-width: 0;
  border: 1.5px solid var(--hl-border);
  border-radius: 11px;
  padding: 8px 4px 7px;
  text-align: center;
  background: #fdfeff;
}
.hl-recent-item.is-high { background: #fffdf3; border-color: #f3e6bf; }
.hl-recent-item.is-low  { background: #f7fbff; border-color: #d9e8fa; }
.hl-recent-face {
  width: 27px; height: 27px; margin: 0 auto 5px;
  position: relative; border-radius: 6px; background: #fff;
  border: 1.5px solid #2b2f36;
}
.hl-recent-face i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #17181a; transform: translate(-50%, -50%); }
.hl-recent-lab { font-size: 10.5px; font-weight: 900; }
.hl-recent-item.is-low  .hl-recent-lab { color: var(--hl-low-text); }
.hl-recent-item.is-high .hl-recent-lab { color: var(--hl-yellow-dark); }
.hl-recent-item.is-new { border-color: #2a76f4; box-shadow: 0 0 0 3px rgba(42, 118, 244, .18); }
.hl-recent-tag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  padding: 2px 7px; border-radius: 999px;
  background: var(--hl-blue); color: #fff;
  font-size: 9.5px; font-weight: 900; white-space: nowrap;
}
/* 그 판에 내가 고른 쪽 (○ 적중 · × 실패) */
.hl-recent-note { font-size: 10px; font-weight: 700; color: var(--hl-sub); letter-spacing: -.3px; }
.hl-recent-pick {
  margin-top: 4px; padding-top: 4px;
  border-top: 1px dashed #e7eef8;
  display: flex; align-items: center; justify-content: center; gap: 2px;
  font-size: 9.5px; font-weight: 900; color: var(--hl-sub);
  white-space: nowrap;
}
.hl-recent-pick b { font-weight: 900; }
.hl-recent-pick.is-hit  { color: #1f9d55; }
.hl-recent-pick.is-miss { color: #d2544e; }

/* ============================================================
   사이드 카드
   ============================================================ */
.hl-side { display: flex; flex-direction: column; gap: 12px; }
.hl-card {
  background: var(--hl-card);
  border: 1px solid var(--hl-border);
  border-radius: 16px;
  padding: 12px 13px 13px;
  box-shadow: var(--hl-shadow);
}
.hl-card-h {
  display: flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 900; color: var(--hl-text); margin-bottom: 11px;
}
.hl-card-h .hl-chev { color: #9db3d2; font-size: 12px; }
.hl-card-h .hl-i {
  margin-left: auto; width: 18px; height: 18px; border-radius: 50%;
  background: #eef4fc; color: #8fa6c6; font-size: 11px; font-weight: 900;
  line-height: 18px; text-align: center;
}
.hl-stat { display: flex; align-items: center; justify-content: space-between; padding: 4.5px 0; font-size: 12px; font-weight: 800; }
.hl-stat span { color: var(--hl-muted); }
.hl-stat b { color: var(--hl-text); font-variant-numeric: tabular-nums; }
.hl-pnl {
  margin-top: 8px; padding: 9px 11px;
  border-radius: 12px; background: #f6f9fe; border: 1px solid #e8f0fb;
  display: flex; align-items: center; justify-content: space-between;
}
.hl-pnl span { font-size: 12.5px; font-weight: 800; color: var(--hl-muted); }
.hl-pnl b { font-size: 15px; font-weight: 900; color: var(--hl-blue); font-variant-numeric: tabular-nums; }
.hl-pnl b.is-minus { color: #d2544e; }
.hl-pnl-duck { display: block; width: 42px; margin: 4px 0 0 4px; }

.hl-rules { margin: 0; padding-left: 15px; }
.hl-rules li { font-size: 10.8px; font-weight: 700; color: var(--hl-muted); line-height: 1.95; letter-spacing: -0.3px; }
.hl-rules b { color: var(--hl-text); }
/* 배당 설명 보조 문구 (베팅금 포함이라는 점을 알려준다) */
.hl-rules .hl-rule-sub {
  display: block; margin: 1px 0 3px;
  font-size: 10px; font-weight: 700; color: var(--hl-sub);
  line-height: 1.6; letter-spacing: -0.3px;
}

.hl-bonus-row { display: flex; align-items: center; gap: 7px; padding: 5.5px 0; font-size: 12px; font-weight: 800; }
.hl-bonus-row + .hl-bonus-row { border-top: 1px dashed #eef3fa; }
.hl-bonus-row .hl-crown { font-size: 13px; }
.hl-bonus-row span { color: var(--hl-muted); }
.hl-bonus-row b { margin-left: auto; color: var(--hl-yellow-dark); font-variant-numeric: tabular-nums; }
.hl-bonus-row.is-next { background: #fffaf0; border-radius: 8px; padding-left: 6px; padding-right: 6px; }

.hl-more {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 44px;
  border: 1px solid var(--hl-border); border-radius: 14px;
  background: #fff; color: var(--hl-text);
  font-size: 13px; font-weight: 900; cursor: pointer;
  box-shadow: var(--hl-shadow);
}
.hl-more:hover { background: #f7fbff; }

/* ---------- 하단 안내 ---------- */
.hl-foot {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 14px 0 6px;
  font-size: 11.5px; font-weight: 700; color: var(--hl-sub);
}
.hl-foot img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- 결과 연출 ---------- */
.hl-stage.is-win .hl-guide  { animation: hlPop .5s ease-out; }
.hl-stage.is-lose .hl-guide { animation: hlPop .5s ease-out; }
@keyframes hlPop { 0% { transform: scale(.9); } 60% { transform: scale(1.04); } 100% { transform: scale(1); } }
