/* ==========================================================================
   업다운 베팅 카트 — 스카이시티 시안 그대로 (레드 2026-09-28 「배팅카트 시안이랑 똑같이 · PC / 모바일 · 색감도 똑같이」)

   원본: E:\Documents\스카이시티\소스\css\minigame.css 215~569 (최종 적용값을 풀어 적었다)
     PC(1025~)  — 오른쪽 칸. .mg-play 판 안의 값: 상자 #0a1022 · 표 #070b18 · 칸 44 · 금액 버튼 38 · UP/DOWN 56
     폰(~1024)  — 하단 탭 바로 위에 고정, 접고 펴지 않는다. 표는 두 항목씩.
   구성: [게임종류 · 게임시간 · 게임회차 · 결과시간 · 베팅금액 · 예상당첨금] → [금액 여섯 칸] → [▲ UP | ▼ DOWN]

   ★ 접두어 udc- — market.css 의 옛 .mk-buy · .ud-cell 겹겹 규칙과 <안 섞이게> 새로 판다.
   ★ 색은 전부 --udc-* 변수로 받는다. 기본값이 시안 색이고, igaming 은 팔레트 변수에 이어 덮어쓴다.
   ========================================================================== */
.udc{
  --udc-bg:        #0a0d16;
  --udc-bg-deep:   #06080f;
  --udc-surface:   #121726;
  --udc-surface-2: #1a2133;
  --udc-surface-3: #242d44;
  --udc-line:      #20283b;
  --udc-text:      #ffffff;
  --udc-text-sub:  #9aa3b8;
  --udc-text-mute: #5f6880;
  --udc-t2:        #dce3f0;
  --udc-t5:        #6f7a94;
  --udc-gold:      #fcb826;
  --udc-on-gold:   #000000;
  --udc-up:        #2fd89a;
  --udc-up-2:      #14a874;
  --udc-up-ink:    #03170f;
  --udc-down:      #ff5a82;
  --udc-down-2:    #d62c5c;
  --udc-down-ink:  #ffffff;
  /* PC 판 안쪽 면 (시안 .mg-play) */
  --udc-box:       #0a1022;
  --udc-box-line:  rgba(255,255,255,.06);
  --udc-info:      #070b18;
  --udc-t-bg:      .15s cubic-bezier(.7,-.4,.4,1.4);
  --udc-t-color:   .2s ease-in-out;

  position:sticky; top:calc(var(--header-h) + 20px);
  display:grid; grid-template-columns:minmax(0,1fr); gap:12px;
  font-family:var(--font);   /* 사이트 글꼴로 통일 (레드 2026-09-28) — 전엔 Noto Sans KR */
  font-size:14px; font-weight:400;
  color:var(--udc-text);
}
/* ⚠ 초기화는 :where 로 우선순위 0 — 아래 .udc-range · .udc-side 의 글자 · 테두리를 덮지 않게 */
:where(.udc) *{ box-sizing:border-box; }
:where(.udc) button{ font-family:inherit; border:0; cursor:pointer; }
:where(.udc) button:disabled{ cursor:default; }

.udc__box{
  display:grid; grid-template-columns:minmax(0,1fr); gap:12px;
  padding:14px; border-radius:16px; background:var(--udc-box); border:1px solid var(--udc-box-line);
}

/* ---- [이름 ··· 값] 표 ---- */
.udc-info{ display:grid; grid-template-columns:minmax(0,1fr); padding:4px 14px; border-radius:12px; background:var(--udc-info); }
.udc-cell{ display:flex; align-items:center; gap:8px; min-width:0; height:44px; margin:0; padding:0; background:none; }
.udc-info > .udc-cell + .udc-cell{ border-top:1px solid color-mix(in srgb, var(--udc-line) 70%, transparent); }
/* 시안 PC 는 「베팅금액」 위에 선이 없다 (앞에 숨은 .ud-amt-head 가 끼어 + 선택자가 안 걸린다) — 보이는 그대로 */
.udc-info > .udc-cell + .udc-cell--amt{ border-top:0; }
.udc-cell__k{ flex:none; width:62px; font-size:12px; font-weight:700; color:var(--udc-t5); white-space:nowrap; }
.udc-cell > b{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:900; color:var(--udc-text); font-variant-numeric:tabular-nums; }
.udc-cell--round > b{ color:var(--udc-gold); }
.udc-cell--win > b{ color:var(--udc-up); }
.udc-cell--kind > b em{ margin-left:5px; padding:1px 6px; border-radius:4px; background:var(--udc-surface-2); font-style:normal; font-size:12px; font-weight:800; color:var(--udc-t2); }

/* 게임시간 — 작은 세 칸 */
.udc-times{ display:flex; align-items:center; flex:1; min-width:0; max-width:132px; gap:2px; padding:2px; border-radius:6px; background:var(--udc-surface-2); }
.udc-range{
  flex:1 1 0; display:inline-flex; align-items:center; justify-content:center; white-space:nowrap;
  height:26px; padding:0; border-radius:5px;
  background:var(--udc-surface-2); font-size:12px; font-weight:700; color:var(--udc-text-sub);
  transition:background var(--udc-t-bg), color var(--udc-t-color);
}
.udc-range:hover{ color:var(--udc-text); }
.udc-range.is-on{ background:var(--udc-gold); color:var(--udc-on-gold); font-weight:800; }
.udc-range.is-off{ opacity:.4; }

/* 베팅금액 — 줄 안의 작은 입력칸, 숫자 뒤 단위 */
.udc-amount{
  display:flex; align-items:center; gap:6px; flex:1; min-width:0; max-width:150px; height:28px; padding:0 8px;
  border:1px solid var(--udc-line); border-radius:6px; background:var(--udc-surface-2);
  transition:border-color var(--udc-t-color);
}
.udc-amount:focus-within{ border-color:var(--udc-gold); }
.udc-amount::after{ content:attr(data-unit); flex:none; margin-left:3px; font-size:12px; font-weight:700; color:var(--udc-t5); }
.udc-amount input{
  flex:1; min-width:0; border:0; background:transparent; outline:0;
  font-family:inherit; font-size:14px; font-weight:900; color:var(--udc-text); text-align:right; font-variant-numeric:tabular-nums;
}
.udc-amount input::placeholder{ color:var(--udc-text-mute); }

/* ---- 금액 여섯 칸 ---- */
.udc-quick{ display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:6px; }
.udc-quick button{
  height:38px; padding:0; border-radius:8px; background:var(--udc-surface-2);
  font-size:12px; font-weight:900; color:var(--udc-text); white-space:nowrap; letter-spacing:-.02em;
  transition:background var(--udc-t-bg), color var(--udc-t-color);
}
.udc-quick button:hover{ background:var(--udc-surface-3); }
.udc-quick .udc-quick__max{ color:var(--udc-gold); }

/* ---- ▲ UP | ▼ DOWN — 누르면 접수 ---- */
.udc-sides{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:0; }
.udc-side{
  height:56px; border-radius:14px;
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  font-size:16px; font-weight:900; letter-spacing:.01em;
  border:2px solid transparent !important;
  transition:filter var(--udc-t-bg), border-color var(--udc-t-color), transform var(--udc-t-bg);
}
.udc-side em{ font-style:normal; font-weight:800; opacity:.8; font-variant-numeric:tabular-nums; }
.udc-side--up{
  background:linear-gradient(180deg, var(--udc-up) 0%, var(--udc-up-2) 100%); color:var(--udc-up-ink);
  box-shadow:0 6px 18px -8px var(--udc-up), inset 0 1px 0 rgba(255,255,255,.35);
}
.udc-side--down{
  background:linear-gradient(180deg, var(--udc-down) 0%, var(--udc-down-2) 100%); color:var(--udc-down-ink);
  box-shadow:0 6px 18px -8px var(--udc-down), inset 0 1px 0 rgba(255,255,255,.3);
}
.udc-side:hover{ filter:brightness(1.1); }
.udc-side:active{ transform:translateY(1px); }
.udc-side:disabled{ filter:grayscale(.4) brightness(.8); }

/* 접수 중 · 거절 까닭 — 시안에 없는 줄. 있을 때만 뜬다 */
.udc-note{ margin:0; padding:0 4px; text-align:center; font-size:12px; font-weight:700; color:var(--udc-text-sub); }
.udc-note--bad{ color:var(--udc-down); }
.udc-note--good{ color:var(--udc-up); }

/* ---- PC 배율 — 시안은 html{zoom:.9}(1080~) · .85(1024~1079) 로 <전체>를 줄여 그린다 ----
   우리는 zoom 이 없다. 카트에만 걸어 <화면에 찍히는 크기>를 시안과 같게 한다 (sports.css 2615 레드 09-26 방침과 같다).
   ★ 폭은 칸(grid 304)이 정해 그대로다 — 높이 · 여백 · 글자만 줄어든다.
   ⚠ sticky top 도 zoom 이 곱해지므로 나눠서 되돌린다. */
@media (min-width:1080px){
  .udc{ zoom:.9; top:calc((var(--header-h) + 20px) / .9); }
}
@media (min-width:1025px) and (max-width:1079px){
  .udc{ zoom:.85; top:calc((var(--header-h) + 20px) / .85); }
}

/* ==========================================================================
   휴대폰 (1024 이하 — 웨일리 하단 탭 기준) — 탭 바로 위 고정, 두 항목씩
   ========================================================================== */
@media (max-width:1024px){
  .udc{
    position:fixed; top:auto; left:0; right:0; bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); z-index:50;
    display:block; padding:10px 12px 26px;   /* 아래 26 — 탭 가운데 입금 버튼이 올라오는 자리 */
    background:var(--udc-bg-deep); border-top:1px solid var(--udc-line); box-shadow:0 -10px 28px rgba(0,0,0,.5);
  }
  body:has(.udc){ padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 250px); }
  .udc__box{ gap:6px; padding:0; background:none; border:0; border-radius:0; }
  .udc-info{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:2px 12px; background:var(--udc-surface); }
  .udc-cell{ height:36px; }
  .udc-info > .udc-cell + .udc-cell{ border-top:0; }
  .udc-info > :is(.udc-cell--round, .udc-cell--until, .udc-cell--amt, .udc-cell--win){ border-top:1px solid color-mix(in srgb, var(--udc-line) 70%, transparent) !important; }
  .udc-cell:is(.udc-cell--time, .udc-cell--until, .udc-cell--win){ padding-left:12px; }   /* 오른쪽 칸 — 가운데 선에서 시작 */
  .udc-cell__k{ width:auto; font-size:11px; }
  .udc-cell:is(.udc-cell--time, .udc-cell--until, .udc-cell--win) > .udc-cell__k{ width:58px; }
  .udc-cell > b{ font-size:13px; }
  .udc-cell--kind > b em, .udc-times, .udc-amount{ background:var(--udc-bg); }
  .udc-cell--kind > b em{ margin-left:4px; font-size:11px; }
  .udc-times{ max-width:104px; }
  .udc-range{ height:24px; }
  .udc-amount{ max-width:110px; height:26px; }
  .udc-amount input{ font-size:13px; }
  .udc-quick{ gap:4px; }
  .udc-quick button{ height:30px; }
  .udc-sides{ gap:6px; margin-top:2px; }
  .udc-side{ height:44px; font-size:15px; }
}

/* ==========================================================================
   ★★ 업다운 리디자인 — 배팅 카드 (레드 2026-10-03 「배팅 카드도 디자인 시안대로 가자」, 10분 칸은 뺀다)
   원본: 전달 묶음 handoff/css/bet-cart.css (.cart · .cr · .sg4 · .camt · .csep · .cchips · .cact · .clim)
     한 판 304px · [이름 72 | 값 오른쪽] 줄 사이 선 · 게임시간·베팅금액은 줄을 꽉 채움 · 선 하나 아래 금액 칩 3×2 · UP/DOWN · 한도 안내
   ★ 색은 여전히 --udc-* 변수 — 기본값만 시안 색으로 바꾼다. igaming 은 팔레트 변수로 덮어쓴다(이식 규칙)
   ★ 숫자(회차 시각 · 금액 · 배당 · 칩)는 고정폭 — 1초마다 바뀌는 칸이 흔들리지 않게
   ========================================================================== */
.udc{
  --udc-box:       #0B111E;
  --udc-info:      transparent;
  --udc-surface-2: #141C2C;
  --udc-surface-3: #1B2436;
  --udc-line:      rgba(255,255,255,.055);
  --udc-t5:        #556074;
  --udc-t2:        #C4CEDC;
  --udc-text-sub:  #78839A;
  --udc-gold:      #FFB020;
  --udc-on-gold:   #1B1304;
  --udc-up:        #45EDBB;
  --udc-up-2:      #21C796;
  --udc-up-ink:    #032016;
  --udc-down:      #F8558C;
  --udc-down-2:    #D62A66;
  --udc-win:       #2EE3AD;
  --udc-mono:      "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* 금액 칩 글자 두 벌 — PC 는 다 적고(10,000 · 맥스), 폰은 줄인다(1만 · MAX) */
.udc-quick i{ font-style:normal; }
.udc-quick .udc-ls{ display:none; }
.udc-limit{ margin:0; font-size:10px; color:var(--udc-t5); text-align:center; }

@media (min-width:1025px){
  /* ★ 축소를 푼다 (레드 2026-10-03 「카트 폰트 사이즈가 시안보다 작은 것 같아」) — 위의 zoom .9 · .85 는 옛 스카이시티 시안이
       화면 전체를 90% 로 그린 데 맞춘 것이다. 새 시안(bet-cart.css)은 100% 값이라 겹치면 글자가 10% 작아진다.
       zoom 이 sticky top 에도 곱해져 나눠 두었던 것도 되돌린다 */
  .udc{ zoom:1; top:calc(var(--header-h) + 20px); }
  .udc__box{ gap:0; padding:0; border-radius:12px; background:var(--udc-box); }
  .udc-info{ padding:4px 16px 14px; border-radius:0; background:var(--udc-info); }
  .udc-cell{ display:grid; grid-template-columns:72px minmax(0,1fr); gap:10px; height:auto; min-height:46px; }
  .udc-info > .udc-cell + .udc-cell, .udc-info > .udc-cell + .udc-cell--amt{ border-top:1px solid var(--udc-line); }
  .udc-cell__k{ width:auto; font-size:11.5px; font-weight:400; color:var(--udc-t5); }
  .udc-cell > b{ justify-self:end; font-size:14px; font-weight:700; }
  .udc-cell--kind > b{ display:inline-flex; align-items:center; gap:7px; }
  .udc-cell--kind > b em{ margin:0; padding:4px 9px; border-radius:6px; background:var(--udc-surface-3); font-size:11px; font-weight:700; color:var(--udc-t2); }
  .udc-cell--until > b{ font-family:var(--udc-mono); letter-spacing:-.01em; }
  .udc-cell--win > b{ font-family:var(--udc-mono); font-size:16px; color:var(--udc-win); }

  /* 게임시간 — 줄을 꽉 채우는 세 칸, 고른 칸은 앰버 */
  .udc-times{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:3px; width:100%; max-width:none; padding:3px; border-radius:9px; background:var(--udc-surface-2); }
  .udc-range{ height:auto; padding:8px 0; border-radius:6px; background:none; font-size:11.5px; color:var(--udc-text-sub); }
  .udc-range.is-on{ background:var(--udc-gold); color:var(--udc-on-gold); box-shadow:0 2px 8px color-mix(in srgb, var(--udc-gold) 28%, transparent); }

  /* 베팅금액 — 줄을 꽉 채우는 입력칸 */
  .udc-amount{ width:100%; max-width:none; height:auto; padding:11px 13px; gap:8px; border:0; border-radius:9px; background:var(--udc-surface-2);
    box-shadow:inset 0 0 0 1px transparent; transition:box-shadow .16s ease; }
  .udc-amount:focus-within{ box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--udc-gold) 60%, transparent); }
  .udc-amount input{ font-family:var(--udc-mono); font-size:18px; font-weight:700; letter-spacing:-.01em; }
  .udc-amount::after{ font-size:12px; font-weight:400; color:var(--udc-text-sub); }

  /* 선 하나 아래 금액 칩 3×2 */
  .udc-quick{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:6px; padding:14px 16px 0; border-top:1px solid rgba(255,255,255,.12); }
  .udc-quick button{ height:auto; padding:11px 0; border:1px solid var(--udc-line); border-radius:9px; background:var(--udc-surface-2);
    font-family:var(--udc-mono); font-size:11px; font-weight:700; color:var(--udc-t2);
    transition:background .15s, border-color .15s, transform .12s; }
  .udc-quick button:hover{ background:var(--udc-surface-3); border-color:rgba(255,255,255,.18); transform:translateY(-1px); }
  .udc-quick .udc-quick__max{ font-family:inherit; color:var(--udc-gold); border-color:color-mix(in srgb, var(--udc-gold) 32%, transparent); }
  .udc-quick .udc-quick__max:hover{ border-color:color-mix(in srgb, var(--udc-gold) 60%, transparent); }

  /* ▲ UP | ▼ DOWN */
  .udc-sides{ padding:10px 16px 0; }
  .udc-side{ height:auto; padding:17px 0; gap:7px; border-radius:11px; font-size:16px; font-weight:800; }
  .udc-side em{ font-family:var(--udc-mono); font-size:13px; font-weight:700; opacity:.62; }
  .udc-side--up{ box-shadow:0 5px 18px color-mix(in srgb, var(--udc-win) 26%, transparent); }
  .udc-side--down{ box-shadow:0 5px 18px color-mix(in srgb, var(--udc-down) 26%, transparent); }
  .udc-side--up:hover{ box-shadow:0 8px 24px color-mix(in srgb, var(--udc-win) 40%, transparent); transform:translateY(-2px); }
  .udc-side--down:hover{ box-shadow:0 8px 24px color-mix(in srgb, var(--udc-down) 40%, transparent); transform:translateY(-2px); }

  .udc-limit{ padding:11px 16px 16px; }
  .udc-note{ padding:0 16px 12px; }
}
/* 폰 — 칩은 짧게, 한도 줄은 뺀다(시안 폰 카드엔 없다 · 고정 카드 높이를 아낀다) */
@media (max-width:1024px){
  .udc-quick .udc-lf{ display:none; }
  .udc-quick .udc-ls{ display:inline; }
  .udc-limit{ display:none; }
  .udc-cell--win > b{ color:var(--udc-win); }
}

/* ★ 업다운 화면만 카트 칸을 조금 좁힌다 (레드 2026-10-03 「배팅카트 가로로 적당히 조금 줄여 달래」) — 304 → 280.
     카트 칸 폭은 market.css .mk-detail(예측마켓과 같이 씀) 이라, 카트가 든 화면만 :has 로 고른다. 휴대폰(한 줄)은 그대로 */
@media (min-width:1025px){
  .mk-detail:has(.udc){ grid-template-columns:minmax(0,1fr) 280px; }
}
