/* 토끼카지노 로비 시안
   구조: 왼쪽 떠 있는 메뉴 + 위쪽 고정 헤더(가운데 로그인 노치) + 배너 2단 + 게임 카드 레일 + 베팅 내역 + 푸터
   색: 달밤 가지색 바탕, 당근 주황(주 버튼), 잎 초록(이긴 금액), 달빛 크림(로고) */

:root {
  --bg: #1b1524;
  --panel: #261d33;
  --tile: rgba(52, 41, 68, .72);
  --tile-solid: #30263f;
  --tile-hover: #3b2f4d;
  --text: #fbf7ff;
  --text-2: #c9bedb;
  --muted: #9a8cb0;
  --carrot: #ff8a1f;
  --carrot-hi: #ffa64d;
  --carrot-ink: #2b1200;
  --carrot-tint: rgba(255, 138, 31, .11);
  --leaf: #73e07f;
  --moon: #ffe9b8;
  --violet: #6c47f2;

  --rail: 292px;          /* 왼쪽 메뉴가 차지하는 폭 */
  --gutter: 64px;         /* 본문 좌우 여백 */
  --wrap: 1240px;         /* 본문 최대 폭 (1440 화면에서 1020) */
  --header-h: 68px;
  --cols: 6;              /* 카드 한 줄 장수 */

  --f-display: "Bagel Fat One", "Pretendard Variable", Pretendard, sans-serif;
  --f-ui: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all; overflow-wrap: break-word;
  overflow-x: hidden;
}
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--carrot); outline-offset: 2px; border-radius: 8px; }
.skip { position: fixed; left: 16px; top: -80px; z-index: 200; padding: 10px 16px; border-radius: 999px; background: var(--carrot); color: var(--carrot-ink); font-weight: 800; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }
.display { font-family: var(--f-display); font-weight: 400; letter-spacing: 0; }

/* ---------- 왼쪽 메뉴 ---------- */
.sidebar {
  position: fixed; z-index: 110;
  left: 12px; top: 10px; bottom: 10px;
  width: 280px;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #2a2037 0%, #241b30 100%);
  border-radius: 32px;
  overflow: hidden;
  transition: width .22s var(--ease), transform .26s var(--ease);
}
.sidebar-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 24px 8px;
}
.collapse-btn {
  width: 52px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--tile); color: var(--muted);
}
.collapse-btn:hover { background: var(--tile-hover); color: var(--text); }
.sidebar-scroll {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 32px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 56px), transparent);
}
.sidebar-scroll::-webkit-scrollbar { display: none; }
/* 묶음 제목(PC 는 접히는 묶음, 휴대폰 서랍은 번호 붙은 구역) */
.nav-group > summary, .nav-sec {
  display: flex; align-items: center; gap: 8px;
  height: 38px; margin-top: 6px; padding: 0 26px;
  font-size: 12px; font-weight: 700; color: var(--muted);
}
.nav-group > summary, .nav-sub > summary { list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker, .nav-sub > summary::-webkit-details-marker { display: none; }
.nav-group > summary { border-radius: 12px; transition: color .14s; }
.nav-group > summary:hover { color: var(--text-2); }
.nav-group > summary > .ico:first-child { width: 14px; height: 14px; }
.nav-group > summary span { flex: 1; }
.nav-caret { width: 12px; height: 12px; transition: transform .16s var(--ease); }
.nav-group:not([open]) .nav-caret, .nav-sub:not([open]) .nav-caret { transform: rotate(-90deg); }
.nav-sec i { font-style: normal; font-variant-numeric: tabular-nums; color: var(--carrot); }
.nav-badge { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: var(--carrot-tint); color: var(--carrot); font-size: 11px; font-weight: 800; font-style: normal; }
.nav-sub .nav-caret { margin-left: auto; color: var(--muted); }
.nav-sub ul { padding-left: 18px; }
.nav-mo { display: none; }
.sidebar-foot { flex: none; padding: 8px 12px 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.nav-lang { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 26px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 46px; padding: 0 26px;
  border-radius: 16px;
  font-size: 15px; font-weight: 600; text-align: left; white-space: nowrap;
  transition: background .14s;
}
.nav-link .ico { color: var(--muted); transition: color .14s; }
.nav-link:hover { background: var(--tile); }
.nav-link:hover .ico { color: var(--text-2); }
.nav-link.is-active { background: var(--carrot-tint); color: var(--carrot); }
.nav-link.is-active .ico { color: var(--carrot); }

/* 접은 메뉴(아이콘만) */
html[data-nav="collapsed"] { --rail: 100px; }
html[data-nav="collapsed"] .sidebar { width: 76px; }
html[data-nav="collapsed"] .sidebar-top { flex-direction: column; gap: 10px; padding: 18px 0 4px; }
html[data-nav="collapsed"] .side-logo { padding-left: 0; }
html[data-nav="collapsed"] .side-logo .logo-word { display: none; }
html[data-nav="collapsed"] .nav-group > summary { height: 13px; margin: 6px 16px 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 0; pointer-events: none; }
html[data-nav="collapsed"] .nav-group > summary > *, html[data-nav="collapsed"] .nav-badge, html[data-nav="collapsed"] .nav-lang span { display: none; }
html[data-nav="collapsed"] .nav-lang { justify-content: center; padding: 0; }
html[data-nav="collapsed"] .nav-link { justify-content: center; padding: 0; }
html[data-nav="collapsed"] .nav-link span { display: none; }
html[data-nav="collapsed"] .nav-link .ico { width: 20px; height: 20px; }

/* ---------- 헤더 ---------- */
.header {
  position: fixed; z-index: 20;
  top: 0; left: var(--rail); right: 0;
  height: var(--header-h);
  padding: 0 var(--gutter);
  transition: left .22s var(--ease);
}
.header::before {
  content: ""; position: absolute; inset: 0 0 -18px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--bg) 74%, rgba(27, 21, 36, 0));
}
.header-inner {
  position: relative;
  max-width: var(--wrap); height: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px;
}
.logo { display: inline-flex; align-items: center; gap: 8px; padding-left: 4px; }
.logo-mark { width: 30px; height: 33px; flex: none; }
.logo-word { display: flex; font-family: var(--f-display); font-size: 25px; line-height: 1; color: var(--moon); }
/* 로고는 왼쪽 메뉴 맨 위에 있다. 헤더의 로고는 메뉴가 서랍으로 숨는 휴대폰에서만 보인다. */
.header-logo { display: none; }
.side-logo { min-width: 0; padding-left: 6px; }
.side-logo .logo-word { font-size: 23px; }

.auth-wrap {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
}
.auth-wrap > .icon-btn { margin-top: 14px; }
.auth {
  position: relative; align-self: stretch;
  display: flex; align-items: center; gap: 8px;
  padding: 0 17px 0 12px;
  background: var(--panel);
  border-radius: 0 0 34px 34px;
}
/* 노치 양옆의 오목한 모서리 */
.auth::before, .auth::after { content: ""; position: absolute; top: 0; width: 24px; height: 24px; pointer-events: none; }
.auth::before { right: 100%; background: radial-gradient(circle at 0 100%, transparent 23.5px, var(--panel) 24px); }
.auth::after { left: 100%; background: radial-gradient(circle at 100% 100%, transparent 23.5px, var(--panel) 24px); }
.btn-text { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.btn-text:hover { background: var(--tile); }
.btn-carrot {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--carrot); color: var(--carrot-ink);
  font-size: 14px; font-weight: 800; white-space: nowrap;
  transition: background .14s, transform .14s;
}
.btn-carrot:hover { background: var(--carrot-hi); }
.btn-carrot:active { transform: scale(.97); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--tile); color: var(--text-2);
  transition: background .14s, color .14s;
}
.icon-btn:hover { background: var(--tile-hover); color: var(--text); }
.header-tools { display: flex; gap: 20px; margin-left: auto; }
.avatar-btn { display: none; }

/* ---------- 본문 틀 ---------- */
.main, .footer { margin-left: var(--rail); transition: margin-left .22s var(--ease); }
.main { padding: 100px var(--gutter) 0; }
.footer { padding: 0 var(--gutter) 96px; }
.wrap { max-width: var(--wrap); margin: 0 auto; }

/* ---------- 배너 ---------- */
.hero {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 2); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: 28px;
}
.hero::-webkit-scrollbar { display: none; }
.banner {
  position: relative; isolation: isolate;
  aspect-ratio: 502 / 179; min-width: 0;
  border-radius: 28px; overflow: hidden; scroll-snap-align: start;
  background: var(--b-bg); color: var(--b-ink);
  container-type: inline-size;
}
.banner img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.banner-body { height: 100%; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; }
.banner-tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 11px 0 4px; border-radius: 999px;
  background: rgba(22, 14, 30, .9); color: var(--b-tag);
  font-size: 11px; font-weight: 800;
}
.banner-tag i { width: 16px; height: 16px; border-radius: 50%; background: var(--b-tag); color: #160e1e; display: grid; place-items: center; }
.banner-tag .ico { width: 10px; height: 10px; }
.banner-title { margin-top: 13px; font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 6.2cqw, 34px); line-height: 1.08; }
.banner-sub { margin-top: 7px; font-size: clamp(12px, 2.6cqw, 14px); font-weight: 700; line-height: 1.32; opacity: .92; }
.hero-ctl { position: relative; display: flex; align-items: center; justify-content: center; height: 18px; margin-top: 10px; }
.hero-dots { display: flex; justify-content: center; align-items: center; gap: 4px; height: 6px; }
.hero-pause { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .14s, color .14s; }
.hero-pause:hover { background: var(--tile); color: var(--text-2); }
.hero-pause .ico { width: 12px; height: 12px; }
.hero-pause .ico-play, .hero-pause[aria-pressed="true"] .ico-pause { display: none; }
.hero-pause[aria-pressed="true"] .ico-play { display: block; }
.hero-dots button { width: 14px; height: 14px; display: grid; place-items: center; }
.hero-dots button::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .6; transition: all .2s; }
.hero-dots button.is-active::before { width: 6px; height: 6px; background: var(--carrot); opacity: 1; }

/* ---------- 분류 타일 ---------- */
.cats-wrap { position: relative; margin-top: 42px; }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 98px; height: 98px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--tile); color: var(--muted);
  font-size: 12.5px; font-weight: 700; line-height: 1.25; text-align: center;
  scroll-snap-align: start;
  transition: background .14s, color .14s;
}
.cat .ico { width: 22px; height: 22px; }
.cat:hover { background: var(--tile-hover); color: var(--text-2); }
.cat.is-active { background: var(--carrot-tint); color: var(--carrot); }
.cats-next {
  position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tile-solid); color: var(--text-2);
  box-shadow: -18px 0 22px 10px var(--bg);
}
.cats-next:hover { background: var(--tile-hover); }
.cats-next .ico { width: 14px; height: 14px; }

/* ---------- 검색 줄 ---------- */
.toolbar { display: flex; align-items: center; gap: 16px; margin-top: 40px; }
.search {
  flex: 1; min-width: 0; height: 40px; border-radius: 999px;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--tile); color: var(--muted);
}
.search:focus-within { outline: 2px solid var(--carrot); outline-offset: 2px; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search-open, .search-close { display: none; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--tile); color: var(--text-2);
  font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: background .14s, color .14s;
}
.pill-btn:hover { background: var(--tile-hover); color: var(--text); }
.pill-btn .caret { width: 12px; height: 12px; }
.toolbar > .pill-btn, .split .pill-btn:first-child { min-width: 108px; justify-content: center; }
.split { display: flex; gap: 2px; }
.split .pill-btn:first-child { border-radius: 999px 4px 4px 999px; }
.split .pill-btn:last-child { border-radius: 4px 999px 999px 4px; padding: 0 12px 0 10px; }

/* ---------- 게임 구역 ---------- */
.section { margin-top: 44px; }
.sec-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding-left: 4px; }
.sec-head > .ico { width: 20px; height: 20px; color: var(--muted); }
.sec-head h2 { flex: 1; font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.sec-nav { display: flex; gap: 12px; }
.sec-nav button {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tile); color: var(--text);
  transition: background .14s, opacity .14s;
}
.sec-nav button .ico { width: 13px; height: 13px; }
.sec-nav button:hover:not(:disabled) { background: var(--tile-hover); }
.sec-nav button:disabled { opacity: .38; cursor: default; }

.rail {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--cols) - 1) * 10px) / var(--cols));
  gap: 10px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  padding: 6px 0; margin: -6px 0;
}
.rail::-webkit-scrollbar { display: none; }

.card {
  position: relative; isolation: isolate; display: block;
  aspect-ratio: 162 / 220;
  border-radius: 12px; overflow: hidden; scroll-snap-align: start;
  --deep: color-mix(in srgb, var(--c1) 44%, #1c0b2a);
  background: linear-gradient(var(--deep) 0%, var(--deep) 22%, var(--c2) 100%);
  container-type: inline-size;
  transition: transform .18s var(--ease);
}
.card img {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;
  transform: translateY(4.5%);
  -webkit-mask-image: linear-gradient(transparent 8%, #000 44%); mask-image: linear-gradient(transparent 8%, #000 44%);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0);
  transition: box-shadow .18s;
}
.card:hover { transform: translateY(-4px); }
.card:hover::after { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.card.is-picked::after { box-shadow: inset 0 0 0 3px var(--moon); }
.card-tag {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  max-width: 88%; padding: 3px 11px 4px;
  border-radius: 0 0 10px 10px;
  background: rgba(18, 10, 26, .34);
  color: #fff; font-size: clamp(9px, 6.2cqw, 12px); font-weight: 800; line-height: 1.2; white-space: nowrap;
}
.card-title {
  position: absolute; left: 4%; right: 4%; top: 11%;
  font-family: var(--f-display); font-weight: 400;
  font-size: 16.4cqw; line-height: 1.03; text-align: center; color: #fff;
  -webkit-text-stroke: 2.4cqw color-mix(in srgb, var(--c2) 42%, #1c0b2a); paint-order: stroke fill;
  text-shadow: 0 .9cqw 0 color-mix(in srgb, var(--c2) 42%, #1c0b2a);
}
.card-title--one { top: 13.5%; }
/* 자체 게임 카드: 탭 대신 테두리 캡슐 */
.card--orig .card-tag {
  top: 4.5%; padding: 2px 10px 3px; border-radius: 999px;
  background: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.card--orig .card-title { top: 14%; }
.card--orig .card-title--one { top: 16%; }
.card-badge {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  padding: 4px 12px 3px; border-radius: 10px 10px 0 0;
  background: var(--violet); color: #fff;
  font-size: clamp(9px, 6.2cqw, 12px); font-weight: 800; line-height: 1.2; white-space: nowrap;
}
.card-badge--only { background: #c9f04a; color: #1d2a00; }
.card-badge--rtp { background: #ffd53d; color: #2b1f00; }

/* 게임사 타일 */
.maker {
  aspect-ratio: 162 / 74; border-radius: 16px; scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--tile); color: var(--text-2);
  transition: background .14s, color .14s;
  container-type: inline-size;
}
.maker:hover { background: var(--tile-hover); color: var(--text); }
.maker .ico { width: 11cqw; height: 11cqw; }
.maker b { font-size: 9.4cqw; font-weight: 800; white-space: nowrap; }
.maker--display b { font-family: var(--f-display); font-weight: 400; font-size: 11.5cqw; }
.maker--wide b { letter-spacing: .14em; font-weight: 600; }
.maker--tight b { letter-spacing: -.04em; font-weight: 900; font-size: 10.5cqw; }

.empty { margin-top: 40px; padding: 44px 24px; border-radius: 24px; background: var(--tile); text-align: center; color: var(--text-2); }
.empty b { display: block; margin-bottom: 6px; font-size: 17px; color: var(--text); }

/* ---------- 베팅 내역 ---------- */
.bets { margin-top: 56px; }
.tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: background .14s, color .14s; }
.tab:hover { color: var(--text-2); }
.tab.is-active { background: var(--carrot-tint); color: var(--carrot); }
.tabs .pill-btn { margin-left: auto; height: 34px; padding: 0 12px; font-size: 13px; }
.bet-list { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.bet-row {
  display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); align-items: center; gap: 12px;
  min-height: 74px; padding: 10px 14px; border-radius: 16px;
}
.bet-row:nth-child(even) { background: rgba(52, 41, 68, .5); }
.bet-game { display: flex; align-items: center; gap: 16px; min-width: 0; }
.bet-thumb { width: 38px; height: 52px; border-radius: 8px; object-fit: cover; object-position: center bottom; flex: none; background: var(--tile-solid); }
.bet-rank { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--tile-solid); font-family: var(--f-display); font-size: 17px; color: var(--moon); }
.bet-game b { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bet-user { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bet-user .ico { width: 12px; height: 12px; }
.bet-cell small { display: block; font-size: 12px; color: var(--muted); }
.bet-cell span { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bet-cell .is-win { color: var(--leaf); }
.bet-cell .is-zero { color: var(--muted); }

/* ---------- 푸터 ---------- */
.footer-panel { position: relative; margin-top: 56px; padding: 52px 24px 24px; background: var(--panel); border-radius: 32px; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 0 24px; }
.footer-cols h3 { margin-bottom: 14px; font-size: 16px; font-weight: 800; }
.footer-cols a { display: block; padding: 4px 0; font-size: 14px; color: var(--text-2); }
.footer-cols a:hover { color: var(--text); }
.lang { margin-top: 12px; height: 40px; background: var(--bg); }
.footer-logo {
  position: absolute; top: 0; right: 0;
  height: 70px; padding: 0 22px 8px 30px;
  display: flex; align-items: center; gap: 7px;
  background: var(--bg); border-radius: 0 0 0 30px;
}
.footer-logo .logo-mark { width: 26px; height: 29px; }
.footer-logo .logo-word { font-size: 21px; }
.footer-logo::before, .footer-logo::after { content: ""; position: absolute; width: 28px; height: 28px; background: radial-gradient(circle at 0 100%, transparent 27.5px, var(--bg) 28px); }
.footer-logo::before { right: 100%; top: 0; }
.footer-logo::after { right: 0; top: 100%; }
.pay-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 44px; padding: 18px 24px; border-radius: 24px; background: var(--bg);
}
.pay-bar h3 { font-size: 15px; font-weight: 800; }
.pay-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-list li { height: 28px; padding: 0 11px; border-radius: 999px; display: grid; place-items: center; background: var(--tile-solid); font-size: 12px; font-weight: 800; color: var(--text-2); }

.help { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding: 38px 24px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.help h2 { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.2; }
.help .social { display: flex; gap: 16px; margin-left: auto; }

/* ---------- 떠 있는 버튼 / 휴대폰 아래 메뉴 ---------- */
.chat-fab {
  position: fixed; z-index: 30; right: 32px; bottom: 20px;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--violet); color: #fff;
  box-shadow: 0 10px 28px rgba(8, 4, 14, .5);
  transition: transform .16s var(--ease);
}
.chat-fab:hover { transform: scale(1.06); }
.chat-fab .ico { width: 26px; height: 26px; }
.tabbar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 100; background: rgba(12, 8, 18, .6); opacity: 0; pointer-events: none; transition: opacity .2s; }

/* ---------- 화면 폭별 ---------- */
@media (max-width: 1320px) {
  :root { --gutter: 32px; }
}
@media (max-width: 1180px) {
  :root { --cols: 5; }
  .banner { aspect-ratio: 2.15 / 1; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
}
@media (max-width: 1020px) {
  :root { --cols: 4; }
  .hero { grid-auto-columns: 100%; }
  .banner { aspect-ratio: 3.2 / 1; }
  .header-tools { gap: 10px; }
  .auth-wrap { gap: 12px; }
}

/* 휴대폰·좁은 화면: 메뉴는 서랍, 아래에 떠 있는 탭 메뉴 */
@media (max-width: 899px) {
  :root { --rail: 0px; --gutter: 16px; --header-h: 60px; --cols: 4; }
  html[data-nav="collapsed"] { --rail: 0px; }
  html[data-nav="collapsed"] .sidebar { width: 280px; }
  html[data-nav="collapsed"] .nav-link { justify-content: flex-start; padding: 0 26px; }
  html[data-nav="collapsed"] .nav-link span { display: inline; }
  html[data-nav="collapsed"] .nav-badge { display: inline; }
  .nav-pc, .sidebar-foot { display: none; }
  .nav-mo { display: block; }
  html[data-nav="collapsed"] .sidebar-top { flex-direction: row; padding: 24px 24px 8px; }
  html[data-nav="collapsed"] .side-logo { padding-left: 6px; }
  html[data-nav="collapsed"] .side-logo .logo-word { display: flex; }

  .sidebar { left: 8px; top: 8px; bottom: 8px; transform: translateX(calc(-100% - 16px)); }
  html[data-drawer="open"] .sidebar { transform: none; }
  html[data-drawer="open"] .scrim { opacity: 1; pointer-events: auto; }
  html[data-drawer="open"] body { overflow: hidden; }

  .header-inner { padding-top: 8px; }
  .header-logo { display: inline-flex; }
  .header-logo .logo-mark { width: 28px; height: 31px; }
  .header-logo .logo-word { flex-direction: column; font-size: 14.5px; line-height: 1.02; }
  .auth-wrap > .icon-btn, .header-tools { display: none; }
  .auth { padding: 0 12px 0 8px; gap: 2px; border-radius: 0 0 30px 30px; }
  .avatar-btn { display: grid; width: 38px; height: 38px; color: var(--moon); }

  .main { padding-top: 76px; }
  .footer { padding-bottom: 120px; }
  .hero { grid-auto-columns: 100%; border-radius: 24px; }
  .banner { border-radius: 24px; aspect-ratio: 358 / 136; }
  .banner-body { padding: 18px; }
  .cats-wrap { margin-top: 28px; }
  .cat { flex-basis: 90px; height: 90px; }
  .cats-next { display: none; }

  .toolbar { gap: 10px; margin-top: 24px; }
  .toolbar > .pill-btn, .split .pill-btn:first-child { min-width: 0; }
  .search input::-webkit-search-cancel-button { display: none; }
  .search { flex: none; width: 40px; padding: 0; justify-content: center; }
  .search input, .search > .ico { display: none; }
  .search-open { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text-2); }
  .toolbar .pill-btn span { display: none; }
  .toolbar .split { margin-left: auto; }
  .toolbar.is-searching .search { flex: 1; width: auto; padding: 0 6px 0 16px; justify-content: flex-start; }
  .toolbar.is-searching .search input { display: block; }
  .toolbar.is-searching .search-open { display: none; }
  .toolbar.is-searching .search-close { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--text-2); }
  .toolbar.is-searching > .pill-btn, .toolbar.is-searching .split { display: none; }

  .section { margin-top: 32px; }
  .sec-head h2 { font-size: 22px; }
  .card:hover { transform: none; }

  .bet-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 68px; }
  .bet-cell:nth-child(2), .bet-cell:nth-child(3) { display: none; }
  .bet-cell { text-align: right; }

  .footer-panel { padding: 84px 12px 16px; border-radius: 28px; }
  .footer-cols { padding: 0 12px; }
  .help { padding: 32px 8px 0; }
  .help h2 { font-size: 24px; width: 100%; }
  .help .social { margin-left: 0; width: 100%; }

  .chat-fab { display: none; }
  .tabbar {
    position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 14px;
    height: 62px; padding: 4px; border-radius: 31px;
    display: grid; grid-template-columns: repeat(6, 1fr);
    background: rgba(48, 38, 63, .9);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 12px 32px rgba(8, 4, 14, .5);
  }
  .tabbar button, .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: 27px; color: var(--muted); font-size: 10.5px; font-weight: 800; white-space: nowrap;
  }
  .tabbar .ico { width: 20px; height: 20px; }
  .tabbar .is-active { background: var(--carrot-tint); color: var(--carrot); }
}
@media (max-width: 599px) {
  :root { --cols: 3; }
  .rail { gap: 8px; grid-auto-columns: calc((100% - (var(--cols) - 1) * 8px) / var(--cols)); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
