/* Rainbow — member web. Dark premium base; the rainbow is an accent, not a flood. */
:root {
  --bg: #0b0717;
  --bg-2: #130b24;
  --card: #191236;
  --card-2: #221843;
  --line: #352b5c;
  --line-soft: #291f4a;
  --fg: #efeafc;
  --fg-dim: #b6abda;
  --fg-faint: #7d72aa;
  --gold: #f4c762;
  --player: #4e8cff;
  --player-weak: rgba(78, 140, 255, .14);
  --banker: #ff5d5d;
  --banker-weak: rgba(255, 93, 93, .14);
  --tie: #35d07f;
  --tie-weak: rgba(53, 208, 127, .14);
  --ok: #35d07f;
  --warn: #ffb23e;
  --bad: #ff5d5d;
  --rainbow: linear-gradient(90deg, #ff5d5d, #ffb23e, #ffe24e, #35d07f, #4e8cff, #7c6cff, #b06cff);
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 10px 34px rgba(0, 0, 0, .45);
  --tab-h: 64px;
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 720px at 74% -6%, rgba(224, 70, 150, .20), transparent 60%),
    radial-gradient(980px 640px at 10% 6%, rgba(104, 86, 224, .22), transparent 58%),
    radial-gradient(1100px 820px at 92% 96%, rgba(240, 176, 96, .10), transparent 60%),
    radial-gradient(760px 640px at 26% 104%, rgba(158, 76, 206, .16), transparent 60%),
    linear-gradient(160deg, #0c081e, #130a28 52%, #190d22);
  background-attachment: fixed;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
}
/* 몽환적 starfield + soft light band */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(255,255,255,.75), transparent),
    radial-gradient(1.4px 1.4px at 78% 14%, rgba(255,220,255,.6), transparent),
    radial-gradient(1.2px 1.2px at 42% 68%, rgba(200,220,255,.6), transparent),
    radial-gradient(1.8px 1.8px at 88% 72%, rgba(255,235,210,.55), transparent),
    radial-gradient(1.3px 1.3px at 60% 40%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.2px 1.2px at 30% 88%, rgba(220,210,255,.55), transparent),
    radial-gradient(1.5px 1.5px at 6% 60%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.2px 1.2px at 94% 44%, rgba(255,215,235,.5), transparent),
    radial-gradient(1.3px 1.3px at 50% 10%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.2px 1.2px at 20% 48%, rgba(210,225,255,.5), transparent);
}
body::after {
  content: ""; position: fixed; left: -12%; right: -12%; top: 54%; height: 200px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(226,120,180,.10) 28%, rgba(150,120,255,.13) 54%, rgba(240,190,120,.08) 76%, transparent);
  filter: blur(28px); transform: rotate(-6deg);
}
/* 별 반짝임(twinkle) 애니메이션 제거 — 화면 전체 고정 레이어가 매 프레임 바뀌어 3매·6매 히스토리(셀 수천 개)
   스크롤 시 긴 멈춤 발생(측정: 긴 작업 14회→0회, 렌더 2091ms→483ms). 별은 정지 상태로 유지. */
body::before { opacity: .8; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo svg { display: block; }
.logo .word { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.logo .word b {
  background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- auth screen ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
}
.auth-card {
  width: 100%; max-width: 380px; background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 22px 22px; position: relative; overflow: hidden;
}
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--rainbow); }
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head .logo { justify-content: center; }
.auth-head p { margin: 12px 0 0; color: var(--fg-dim); font-size: 13.5px; }
.tabs { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.tabs button {
  flex: 1; padding: 9px; border: 0; background: transparent; color: var(--fg-dim); font-weight: 600; font-size: 14px; border-radius: 9px;
}
.tabs button.active { background: var(--card-2); color: var(--fg); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--fg-dim); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 13px; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 11px; color: var(--fg); font-size: 15px; outline: none;
}
.field input:focus { border-color: #4b4270; box-shadow: 0 0 0 3px rgba(124,108,255,.16); }
.btn {
  width: 100%; padding: 13px; border: 0; border-radius: 12px; font-weight: 700; font-size: 15px; color: #0a0910;
  background: var(--rainbow); background-size: 180% 100%; transition: background-position .3s;
}
.btn:hover { background-position: 60% 0; }
.btn.secondary { background: var(--card-2); color: var(--fg); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--fg-dim); border: 1px solid var(--line); }
.btn.sm { width: auto; padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.msg { margin-top: 12px; font-size: 13px; text-align: center; min-height: 18px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.auth-links { margin-top: 10px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fg-faint); }

/* ---------- app shell ---------- */
.app { display: none; min-height: 100vh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
.app.show { display: block; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: rgba(10, 9, 16, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .logo { cursor: pointer; border-radius: 8px; }
.topbar .logo:focus-visible { outline: 2px solid #4b4270; outline-offset: 3px; }
.topbar .logo .word { font-size: 21px; }
.topbar .spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--card-2); border: 1px solid var(--line); white-space: nowrap; color: var(--fg-dim);
}
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--fg-dim); display: grid; place-items: center; position: relative; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--banker); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }

/* desktop top menu (shown ≥900px; replaces the bottom tab bar) */
.topnav { display: none; }
.topnav button { position: relative; border: 0; background: transparent; color: var(--fg-faint); font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 9px; cursor: pointer; letter-spacing: -.01em; }
.topnav button:hover { color: var(--fg-dim); }
.topnav button.active { color: var(--fg); }
.topnav button.active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px; height: 2.5px; border-radius: 2px; background: var(--rainbow); }
.topnav .tnav-badge { position: absolute; top: 3px; right: 2px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 999px; background: var(--banker); color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; }

.content { max-width: 1280px; margin: 0 auto; padding: 16px; }
.view { display: none; }
.view.show { display: block; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* segmented toggle */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--fg-dim); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 8px; }
.seg button.active { background: var(--card-2); color: var(--fg); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 150px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--fg); font-size: 14px; outline: none; }
.muted { color: var(--fg-faint); font-size: 12.5px; }

/* stats row */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.stat .k { font-size: 11.5px; color: var(--fg-faint); }
.stat .v { font-size: 20px; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; }

.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-dim); font-weight: 700; margin: 18px 2px 10px; }
.section-title .bar { width: 3px; height: 14px; border-radius: 2px; background: var(--rainbow); }

/* signal table cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.tcard { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; display: flex; align-items: center; gap: 12px; }
.tcard .name { font-weight: 700; font-size: 14.5px; }
.tcard .sub { color: var(--fg-faint); font-size: 12px; margin-top: 2px; }
.tcard .grow { flex: 1; min-width: 0; }
.pick { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 19px; color: #fff; flex-shrink: 0; }
.pick.P { background: var(--player-weak); color: var(--player); border: 1px solid rgba(78,140,255,.4); }
.pick.B { background: var(--banker-weak); color: var(--banker); border: 1px solid rgba(255,93,93,.4); }
.pick.T { background: var(--tie-weak); color: var(--tie); border: 1px solid rgba(53,208,127,.4); }
.pick.none { background: var(--card); color: var(--fg-faint); border: 1px dashed var(--line); font-size: 12px; }
.oxraw { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--fg-dim); background: var(--bg-2); border: 1px solid var(--line-soft); }
.step { font-size: 12px; color: var(--gold); font-weight: 700; }
.count { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--fg-dim); }
.count b { color: var(--fg); }

/* recent list */
.recent { display: grid; gap: 8px; }
.rrow { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 12px; }
.rrow .pill { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.rrow .res { margin-left: auto; font-size: 12.5px; font-weight: 700; }
.rrow .res.win { color: var(--ok); } .rrow .res.lose { color: var(--bad); }

/* matrix room cards */
.rcard { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.rcard:hover { transform: translateY(-3px); border-color: #3a3357; box-shadow: 0 16px 32px rgba(0,0,0,.42); }
.rcard.rank-top { border-color: rgba(244,199,98,.5); }
.rcard.rank-top:hover { border-color: rgba(244,199,98,.8); }
.rcard .head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rcard .rank { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #0a0910; }
.rcard .rank.r1 { background: #f4c762; } .rcard .rank.r2 { background: #c7cbd6; } .rcard .rank.r3 { background: #e08a4a; }
.rcard .rank.low { background: var(--line); color: var(--fg-dim); }
.rcard .rname { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcard .rate { font-weight: 800; font-size: 15px; }
.rstats { display: flex; gap: 14px; font-size: 12.5px; color: var(--fg-dim); margin-bottom: 10px; }
.rstats .pbt { display: inline-flex; align-items: center; gap: 5px; }
.rstats .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rstats .dot.P { background: var(--player); } .rstats .dot.B { background: var(--banker); } .rstats .dot.T { background: var(--tie); }
.rstats b { color: var(--fg); font-weight: 800; }

/* O/X grids (6매 = 6 rows × 12, 3매 = 3 rows × 20) */
.grid6, .grid3 { border-collapse: collapse; width: 100%; table-layout: fixed; }
.grid6 td, .grid3 td { border: 1px solid #332b4e; height: 15px; text-align: center; font-size: 9px; font-weight: 800; line-height: 1; }
.grid6 td.O, .grid3 td.O { color: var(--player); } .grid6 td.X, .grid3 td.X { color: var(--banker); }
.grid6 tr.wl td, .grid3 tr.wl td { font-size: 8.5px; color: #fff; }
.grid6 tr.wl td.win, .grid3 tr.wl td.win { background: #1f3fb0; } .grid6 tr.wl td.lose, .grid3 tr.wl td.lose { background: #b03333; }

/* 6매 베스트 예측 box */
.bestpred { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 12px; border: 1px solid rgba(244,199,98,.3); border-radius: 10px; background: rgba(244,199,98,.05); }
.bestpred .bp-label { font-size: 12px; color: var(--gold); font-weight: 700; }
.bestpred .bp-val { font-size: 22px; font-weight: 800; margin-left: auto; line-height: 1; }
.bestpred .bp-rate { font-size: 13px; color: var(--ok); font-weight: 700; }

/* 3매 pattern list (ranked 1~4위) */
.patlist { display: grid; gap: 8px; margin-top: 2px; }
.patrow { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 9px; padding: 8px; }
.pathead { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.pathead .pbadge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--fg); }
.pathead .pbadge.rk { background: var(--card-2); }
.pathead .prate { font-weight: 800; font-size: 13px; }
.pathead .ppred { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--fg-dim); }
.pathead .ppred b { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; font-size: 17px; font-weight: 900; color: var(--fg-faint); background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.pathead .ppred b.P { color: #fff; background: var(--player); border-color: var(--player); box-shadow: 0 0 12px rgba(78,140,255,.55); }
.pathead .ppred b.B { color: #fff; background: var(--banker); border-color: var(--banker); box-shadow: 0 0 12px rgba(255,93,93,.55); }.pv.P { color: var(--player); } .pv.B { color: var(--banker); }

/* shoe-length filter + poll status + room count */
.shoefilter { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 2px 12px; }
.shoefilter .sflabel { font-size: 12px; color: var(--fg-faint); margin-right: 2px; }
.shoefilter button { border: 1px solid var(--line); background: var(--card-2); color: var(--fg-dim); font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 9px; }
.shoefilter button.active { background: var(--rainbow); background-size: 180% 100%; color: #0a0910; border-color: transparent; }
.pollstat { display: block; font-size: 12px; line-height: 1.6; color: var(--fg-dim); font-variant-numeric: tabular-nums; margin: 0 2px 8px; }
.pollstat .pdot { display: inline-block; vertical-align: 1px; margin-right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--fg-faint); }
.pollstat .pdot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(53,208,127,.6); }
.pollstat .pdot.bad { background: var(--warn); }
.roomcount { font-size: 13px; color: var(--fg-dim); margin: 0 2px 10px; }
.roomcount b { color: var(--fg); font-weight: 800; }

/* 패턴 고정 / 순위 고정 toggle switches */
.tg-wrap { display: inline-flex; align-items: center; gap: 16px; margin-left: auto; }
/* 좁은 화면: 토글이 검색 조건 줄 끝에 떠 있지 않도록 아래 줄에 왼쪽 정렬 */
@media (max-width: 640px) {
  .tg-wrap { flex-basis: 100%; margin-left: 0; margin-top: 4px; gap: 22px; }
  .shoefilter button { padding: 7px 12px; }
}
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .tg-track { width: 40px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex-shrink: 0; }
.toggle .tg-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
.toggle input:checked + .tg-track { background: #7c6cff; }
.toggle input:checked + .tg-track::after { transform: translateX(18px); }
.toggle input:focus-visible + .tg-track { outline: 2px solid #4b4270; outline-offset: 2px; }
.toggle .tg-lbl { font-size: 13px; color: var(--fg-dim); font-weight: 600; white-space: nowrap; }
.toggle input:checked ~ .tg-lbl { color: var(--fg); }

/* emphasized matrix section headers (상위/하위/전체) */
.mx-head { display: flex; align-items: center; gap: 11px; margin: 26px 2px 14px; }
.mx-head .mx-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; flex-shrink: 0; }
.mx-head .mx-ico svg { width: 18px; height: 18px; }
.mx-head h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.mx-head .mx-count { font-size: 12.5px; font-weight: 700; color: var(--fg-dim); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.mx-top .mx-ico { color: var(--gold); background: rgba(244,199,98,.14); box-shadow: 0 0 0 1px rgba(244,199,98,.25) inset; }
.mx-top h3 { color: var(--gold); }
.mx-low .mx-ico { color: var(--bad); background: rgba(255,93,93,.13); box-shadow: 0 0 0 1px rgba(255,93,93,.22) inset; }
.mx-all .mx-ico { color: var(--player); background: rgba(78,140,255,.13); box-shadow: 0 0 0 1px rgba(78,140,255,.22) inset; }

/* desktop refinement: 3-up grid, roomier cards */
@media (min-width: 900px) {
  .rcard .head { margin-bottom: 12px; }
  .rcard .rname { font-size: 15px; }
  .rcard .rate { font-size: 17px; }
  .mx-head { margin-top: 30px; }
}
@media (min-width: 1100px) {
  #v-6 .cards, #v-3 .cards { grid-template-columns: repeat(3, 1fr); }
}

/* 고객센터 (공지사항 / 쪽지 / 1:1문의) */
.cs-banner { display: flex; align-items: center; gap: 10px; padding: 11px 14px; margin-bottom: 16px; border-radius: 12px; background: linear-gradient(90deg, rgba(226,70,150,.14), rgba(124,108,255,.12)); border: 1px solid rgba(226,120,180,.25); color: var(--fg-dim); font-size: 13px; }
.cs-banner svg { width: 18px; height: 18px; color: #ff8fc2; flex-shrink: 0; }
.cs-banner b { color: var(--fg); }
.cs-head { margin: 4px 2px 14px; }
.cs-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.cs-tabs { display: inline-flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 4px; margin-bottom: 16px; max-width: 100%; }
.cs-tab { border: 0; background: transparent; color: var(--fg-dim); font-weight: 700; font-size: 13.5px; padding: 9px 18px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.cs-tab.active { background: linear-gradient(180deg, var(--card-2), var(--card)); color: var(--fg); box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.cs-badge { min-width: 16px; height: 16px; padding: 0 5px; border-radius: 999px; background: var(--banker); color: #fff; font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; }
.cs-actionbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

/* 상단 🔔 (새 쪽지·문의 답변) */
.bellbtn { margin-right: 6px; }
.bellbtn .bell-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--banker); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.bellbtn:has(.bell-badge:not(.hidden)) svg { color: var(--fg); }
.bellbtn.ring { border-color: #7c6cff; }
.bellbtn.ring svg { color: #ffd166; animation: m-bell-ring 2.4s ease-in-out infinite; transform-origin: 50% 3px; }
@keyframes m-bell-ring { 0%, 68%, 100% { transform: rotate(0); } 74% { transform: rotate(16deg); } 80% { transform: rotate(-14deg); } 86% { transform: rotate(8deg); } 92% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .bellbtn.ring svg { animation: none; } }

/* 회원 토스트 */
.m-toasts { position: fixed; z-index: 300; top: 68px; right: 14px; display: grid; gap: 8px; width: min(360px, calc(100vw - 28px)); }
.m-toast { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px 10px 12px 12px; border-radius: 14px; background: linear-gradient(180deg, rgba(40,28,78,.97), rgba(26,19,54,.97)); border: 1px solid #4b4270; border-left: 4px solid #7c6cff; box-shadow: 0 12px 30px rgba(0,0,0,.45); animation: mt-in .25s ease-out; }
@keyframes mt-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.m-toast .mt-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(124,108,255,.2); color: #b3a8ff; }
.m-toast .mt-ic svg { width: 17px; height: 17px; }
.m-toast .mt-body { display: grid; gap: 2px; min-width: 0; }
.m-toast .mt-body strong { font-size: 13.5px; }
.m-toast .mt-body span { color: var(--fg-dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-toast .mt-go { border: 0; border-radius: 8px; padding: 7px 11px; font-weight: 800; font-size: 12.5px; color: #0a0910; background: var(--rainbow); background-size: 180% 100%; cursor: pointer; }
.m-toast .mt-x { border: 0; background: transparent; color: var(--fg-faint); font-size: 18px; line-height: 1; padding: 2px 4px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .m-toast { animation: none; } }
@media (max-width: 560px) { .m-toasts { top: 62px; right: 10px; left: 10px; width: auto; } }

/* 쪽지·문의 게시판 */
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--fg-dim); font-size: 13px; }
.board-top b { color: var(--fg); }
.board { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.brow + .brow { border-top: 1px solid var(--line-soft); }
.bhead { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 0; background: transparent; color: var(--fg-dim); text-align: left; cursor: pointer; font-size: 14px; }
.bhead:hover { background: rgba(255,255,255,.03); }
.bdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: transparent; }
.brow.unread .bdot { background: var(--banker); }
.brow.unread .bhead { color: var(--fg); font-weight: 700; }
.btitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bdate { flex: none; color: var(--fg-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.bbody { display: none; padding: 0 14px 14px 31px; color: var(--fg); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.brow.open .bbody { display: block; }
.brow.open .bhead { color: var(--fg); }
.tstat { flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.tstat.open { color: var(--warn); background: rgba(255,178,62,.12); }
.tstat.answered { color: var(--ok); background: rgba(53,208,127,.12); }
.tstat.closed { color: var(--fg-faint); background: rgba(255,255,255,.05); }
.newans { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: var(--banker); vertical-align: 1px; }
.pager { display: flex; justify-content: center; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.pager .pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--card-2); color: var(--fg-dim); font-weight: 700; font-size: 13px; cursor: pointer; }
.pager .pg.cur { color: #0a0910; background: var(--rainbow); border-color: transparent; }
.pager .pg:disabled { opacity: .35; cursor: default; }

/* 1:1 문의 */
.tk-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(120deg, rgba(124,108,255,.16), rgba(244,199,98,.07)); }
.tk-intro > div { display: grid; gap: 3px; min-width: 0; }
.tk-intro b { font-size: 14.5px; color: var(--fg); }
.tk-intro span { font-size: 12.5px; color: var(--fg-dim); line-height: 1.5; }
.tk-intro .btn { flex: none; }
.tkrow .bhead { align-items: flex-start; padding: 14px 16px; gap: 12px; }
.tkrow.s-open { box-shadow: inset 3px 0 0 var(--warn); }
.tkrow.unread { background: rgba(124,108,255,.08); box-shadow: inset 3px 0 0 #7c6cff; }
.tkrow.s-closed .bhead { opacity: .7; }
.tk-mid { flex: 1; min-width: 0; display: grid; gap: 6px; }
.tk-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--fg); font-weight: 700; }
.tk-l1 .newans { margin-left: 0; flex: none; }
.tk-l2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-faint); font-size: 12.5px; font-weight: 500; }
.tk-l2:empty { display: none; }
.tk-l2 em { font-style: normal; font-weight: 700; color: var(--fg-dim); margin-right: 6px; }
.tk-side { flex: none; display: grid; justify-items: end; gap: 6px; }
.tk-cnt { color: var(--fg-faint); font-size: 11.5px; }
.tk-none { display: grid; gap: 6px; padding: 40px 16px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; color: var(--fg-dim); font-size: 13px; }
.tk-none b { color: var(--fg); font-size: 14.5px; }

.modal.tk-modal { max-width: 560px; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.tk-mhead { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 14px 20px; border-bottom: 1px solid var(--line); }
.tk-mhead > div { flex: 1; }
.tk-mtitle { font-size: 17px; font-weight: 800; color: var(--fg); overflow-wrap: anywhere; }
.tk-msub { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--fg-faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tk-x { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--fg-dim); font-size: 14px; cursor: pointer; }
.tk-x:hover { color: var(--fg); border-color: #7c6cff; }
.tk-form { display: grid; gap: 8px; padding: 16px 20px 4px; }
.tk-lbl { display: flex; justify-content: space-between; color: var(--fg-dim); font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.tk-lbl span { color: var(--fg-faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.tk-inp { width: 100%; height: 44px; padding: 0 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; color: var(--fg); font-size: 14px; outline: none; }
.tk-inp:focus, .tk-ta:focus { border-color: #7c6cff; box-shadow: 0 0 0 3px rgba(124,108,255,.22); }
.modal textarea.ta.tk-ta { min-height: 240px; line-height: 1.55; }
@media (max-height: 700px) { .modal textarea.ta.tk-ta { min-height: 160px; } }
.modal textarea.ta.tk-ta.sm { min-height: 72px; }
.tk-mfoot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 18px; }
.tk-thread { flex: 1; min-height: 140px; max-height: 50vh; overflow-y: auto; padding: 16px 20px; display: grid; align-content: start; gap: 12px; }
.tk-day { display: flex; align-items: center; gap: 10px; color: var(--fg-faint); font-size: 11.5px; font-weight: 700; }
.tk-day::before, .tk-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.tk-msg { display: flex; align-items: flex-end; gap: 8px; }
.tk-msg.me { justify-content: flex-end; }
.tk-av { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 900; color: #0a0910; background: var(--rainbow); }
.tk-bwrap { display: grid; gap: 4px; max-width: 80%; }
.tk-msg.me .tk-bwrap { justify-items: end; }
.tk-who { display: flex; align-items: baseline; gap: 6px; color: var(--fg-dim); font-size: 12px; font-weight: 700; }
.tk-who time { color: var(--fg-faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.tk-bub { padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.55; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-msg.them .tk-bub { background: rgba(244,199,98,.09); border: 1px solid rgba(244,199,98,.32); border-bottom-left-radius: 4px; }
.tk-msg.me .tk-bub { background: rgba(124,108,255,.2); border: 1px solid rgba(124,108,255,.42); border-bottom-right-radius: 4px; }
.tk-wait { justify-self: center; padding: 7px 12px; border-radius: 999px; background: rgba(255,178,62,.1); color: var(--warn); font-size: 12px; font-weight: 600; text-align: center; }
.tk-compose { padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.tk-cbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.tk-err { color: var(--bad); font-size: 12.5px; }
.tk-closed { padding: 14px 20px; border-top: 1px solid var(--line); color: var(--fg-faint); font-size: 13px; text-align: center; }
@media (max-width: 560px) { .tk-intro { flex-direction: column; align-items: stretch; } .tk-bwrap { max-width: 88%; } }

/* 몽환적 frosted-glass surfaces (let the nebula glow through) */
.rcard, .tcard, .stat, .item, .info-head { background: linear-gradient(180deg, rgba(34,24,67,.70), rgba(24,17,52,.72)); backdrop-filter: blur(9px); }
.auth-card { background: linear-gradient(180deg, rgba(34,24,67,.84), rgba(22,16,48,.88)); backdrop-filter: blur(12px); }
.modal { background: linear-gradient(180deg, rgba(34,24,67,.92), rgba(22,16,48,.94)); backdrop-filter: blur(14px); }
.topbar { background: rgba(12,8,26,.72); }
.tabbar { background: rgba(14,9,30,.82); }

/* login screen (mynwc-style: centered emblem, iconned pill inputs, password eye) */
.auth-card { max-width: 400px; }
.auth-head .logo.big { justify-content: center; }
.auth-head .logo.big svg { filter: drop-shadow(0 6px 20px rgba(124,108,255,.55)); }
.auth-head .brand { margin-top: 12px; }
.auth-head .brand .word { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.auth-head .tagline { margin: 8px 0 0; color: var(--fg-dim); font-size: 13px; letter-spacing: .01em; }
.inp { display: flex; align-items: center; gap: 9px; padding: 10px 13px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 13px; transition: border-color .15s, box-shadow .15s; }
.inp:focus-within { border-color: #5a4f86; box-shadow: 0 0 0 3px rgba(124,108,255,.18); }
.inp .ic { width: 18px; height: 18px; color: var(--fg-faint); flex-shrink: 0; }
/* .field input 의 둥근 모서리(11px)를 물려받으면 자동완성 배경을 칠할 때 양끝에 반달 잔상이 생김 → 모서리 0.
   좌우 2px 여백: 커서가 입력칸 가장자리에 붙어 잘려 보이지 않게. */
.inp input { flex: 1; min-width: 0; border: 0; border-radius: 0; background: transparent; color: var(--fg); font-size: 15px; line-height: 1.5; outline: none; padding: 0 2px; box-shadow: none; }
.inp input:focus { box-shadow: none; }
/* 저장된 아이디·비밀번호 자동완성이 입력칸을 하늘색/흰색으로 덮는 것 방지 (어두운 테마 유지).
   입력칸 전체를 인셋 그림자로 덮어 칠한다(모서리 0이라 잔상 없음).
   ※ 'transition: background-color 9999s' 트릭은 쓰지 않음 — 회원가입↔로그인 전환처럼 칸이 숨겨졌다 다시 보이면
     트랜지션이 풀려 자동완성 색이 그대로 드러남(깨짐). */
.inp input:-webkit-autofill,
.inp input:-webkit-autofill:hover,
.inp input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-2) inset;
  box-shadow: 0 0 0 1000px var(--bg-2) inset;
  caret-color: var(--fg);
}
/* 표준 선택자는 따로(모르는 브라우저가 위 규칙까지 버리지 않게) */
.inp input:autofill { -webkit-text-fill-color: var(--fg); box-shadow: 0 0 0 1000px var(--bg-2) inset; caret-color: var(--fg); }
.inp .eye { border: 0; background: transparent; color: var(--fg-faint); display: grid; place-items: center; padding: 0 2px; cursor: pointer; }
.inp .eye svg { width: 18px; height: 18px; }
.inp .eye.on { color: #7c6cff; }

/* login bottom: stacked 로그인/회원가입 + divider + quick-link grid + LIVE banner (mynwc layout) */
.auth-btns { display: grid; gap: 10px; }
.auth-btns .btn.secondary { background: var(--card-2); color: var(--fg); border: 1px solid var(--line); }
.auth-btns .btn.secondary:hover { border-color: #5a4f86; }
.auth-sep { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--fg-faint); font-size: 12px; }
.auth-sep::before, .auth-sep::after { content: ""; height: 1px; flex: 1; background: var(--line-soft); }
.auth-links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.al-btn { display: flex; align-items: center; gap: 9px; padding: 13px 14px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--line); color: var(--fg-dim); font-size: 13px; font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s; }
.al-btn:hover { border-color: #5a4f86; color: var(--fg); }
.al-btn svg { width: 18px; height: 18px; color: var(--fg-faint); flex-shrink: 0; }
/* 가입문의(보라)·공지 채널(텔레그램 파랑) — 색 원형 배지 안에 흰 아이콘 */
.al-cs svg, .al-tg svg { width: 30px; height: 30px; padding: 7px; margin: -6px 0; border-radius: 50%; color: #fff; }
.al-cs svg { background: #7c6cff; box-shadow: 0 2px 8px rgba(124,108,255,.45); }
.al-tg svg { background: #2AABEE; box-shadow: 0 2px 8px rgba(42,171,238,.45); padding: 7px 8px 7px 6px; }
.al-btn .al-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin: -9px 0; box-shadow: 0 0 0 1px rgba(60,220,170,.35), 0 3px 10px rgba(0,0,0,.4); }
/* 바로가기 회원가입 = 전체폭 주요 버튼(2열 그리드 위) */
.al-join { width: 100%; justify-content: center; margin-bottom: 10px; color: var(--fg); font-size: 14px; }
.auth-live { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 13px 15px; border-radius: 13px; text-decoration: none; color: var(--fg); font-weight: 700; font-size: 13.5px; background: linear-gradient(90deg, rgba(226,70,110,.24), rgba(124,108,255,.16)); border: 1px solid rgba(226,120,150,.32); transition: filter .15s; }
.auth-live:hover { filter: brightness(1.12); }
.auth-live .live-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--banker); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; }
.auth-live .live-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.auth-live .al-live-txt { flex: 1; }
.auth-live .al-arrow { width: 16px; height: 16px; opacity: .8; }
@media (prefers-reduced-motion: no-preference) { .auth-live .live-dot { animation: livepulse 1.4s ease-in-out infinite; } }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* lists / info */
.list { display: grid; gap: 10px; }
.item { background: var(--card); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; }
.item h4 { margin: 0 0 6px; font-size: 14.5px; }
.item .meta { color: var(--fg-faint); font-size: 12px; }
.item .body { color: var(--fg-dim); font-size: 13.5px; margin-top: 8px; white-space: pre-wrap; }
.item.unread { border-color: #4b4270; }
.pindot { color: var(--gold); }
.redeem { display: flex; gap: 8px; }
.redeem input { flex: 1; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; color: var(--fg); font-size: 15px; outline: none; text-transform: uppercase; }
.info-head { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.info-head .u { font-size: 18px; font-weight: 800; }
.info-head .exp { margin-top: 6px; color: var(--fg-dim); font-size: 13px; }

/* bottom tabs */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(6, 1fr); /* 홈·3매·6매·신호·고객센터·내정보 */
  background: rgba(12, 10, 22, .9); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tabbar button { border: 0; background: transparent; color: var(--fg-faint); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; position: relative; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.active { color: var(--fg); }
.tabbar button.active::before { content: ""; position: absolute; top: 0; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--rainbow); }
.tabbar .tbadge { position: absolute; top: 8px; right: 50%; margin-right: -22px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: var(--banker); color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(5,4,10,.66); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: 100%; max-width: 440px; background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; max-height: 86vh; overflow: auto; }
.modal h3 { margin: 0 0 14px; }
.thread { display: grid; gap: 8px; margin: 12px 0; }
.bubble { padding: 10px 12px; border-radius: 12px; font-size: 13.5px; max-width: 85%; white-space: pre-wrap; }
.bubble.member { background: var(--player-weak); border: 1px solid rgba(78,140,255,.3); justify-self: end; }
.bubble.admin { background: var(--card); border: 1px solid var(--line); justify-self: start; }
.row { display: flex; gap: 8px; }
textarea.ta { width: 100%; padding: 11px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; color: var(--fg); font-size: 14px; outline: none; resize: vertical; min-height: 64px; }

.empty { text-align: center; color: var(--fg-faint); padding: 40px 0; font-size: 13.5px; }

@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .topbar .chip.hide-sm { display: none; }
}

/* desktop ≥900px: top menu replaces the mobile bottom tab bar.
   Placed last so it overrides the base .tabbar/.topnav/.app rules above. */
@media (min-width: 900px) {
  .topnav { display: flex; gap: 2px; margin-left: 14px; }
  .tabbar { display: none; }
  .app { padding-bottom: 32px; }
}

/* 무지개 스크롤바 (Chrome·Edge·Safari). Firefox 는 그라데이션 미지원 → 보라 단색 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(12, 9, 26, .9); }
::-webkit-scrollbar-thumb {
  border-radius: 999px; border: 2px solid rgba(12, 9, 26, .9);
  background: linear-gradient(180deg, #ff5d5d, #ffb23e, #ffe24e, #35d07f, #4e8cff, #7c6cff, #b06cff);
}
::-webkit-scrollbar-thumb:horizontal { background: var(--rainbow); }
::-webkit-scrollbar-thumb:hover { border-width: 1px; }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) { html { scrollbar-color: #7c6cff rgba(12, 9, 26, .9); } }

/* ================= 홈(로그인 후 첫 화면) — 시안 D:\Project\Rainbow\design-concepts\home.html 이식, 클래스 hm- ================= */
/* 홈일 때만 본문 폭 제한·여백 해제 → 하늘이 화면 끝까지 */
.content:has(> #v-home.show) { max-width: none; padding: 0; }
#v-home { --ease: cubic-bezier(.2, .8, .2, 1); }
#v-home.show { animation: none; }
.hm-hero { position: relative; min-height: calc(100vh - 62px); min-height: calc(100svh - 62px); display: grid; place-items: center; overflow: hidden; isolation: isolate; padding: 56px 24px 220px;
  /* 아래 끝을 서서히 투명하게 → 뒤 배경과 경계선 없이 이어짐 */
  -webkit-mask-image: linear-gradient(#000 calc(100% - 110px), transparent); mask-image: linear-gradient(#000 calc(100% - 110px), transparent); }
.hm-sky { position: absolute; inset: 0; z-index: -3;
  background:
    radial-gradient(1200px 600px at 50% 105%, rgba(124, 108, 255, .34), transparent 62%),
    radial-gradient(800px 420px at 12% 8%, rgba(78, 140, 255, .16), transparent 60%),
    radial-gradient(700px 420px at 92% 18%, rgba(176, 108, 255, .16), transparent 60%),
    linear-gradient(180deg, #08051a 0%, #120a2c 48%, #23124a 100%); }
.hm-stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
/* 별똥별: 작은 요소만 transform/opacity (화면 전체 반복 애니메이션 없음 — 스크롤 렉 방지) */
.hm-shoot { position: absolute; z-index: -2; top: 12%; left: 70%; width: 140px; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .95), transparent); transform: rotate(-24deg); animation: hmShoot 9s linear infinite; }
.hm-shoot.s2 { top: 22%; left: 30%; width: 100px; animation-delay: 4.2s; animation-duration: 11s; }
.hm-shoot.s3 { top: 6%; left: 48%; width: 80px; animation-delay: 7.5s; animation-duration: 13s; }
@keyframes hmShoot {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-24deg); }
  2% { opacity: 1; }
  8% { opacity: 0; transform: translate3d(-260px, 116px, 0) rotate(-24deg); }
  100% { opacity: 0; transform: translate3d(-260px, 116px, 0) rotate(-24deg); }
}
.hm-arc { position: absolute; left: 50%; bottom: 92px; width: min(1060px, 138vw); transform: translateX(-50%); z-index: -1; pointer-events: none; }
.hm-arc svg { display: block; width: 100%; height: auto; overflow: visible; }
.hm-band { fill: none; stroke-width: 10; stroke-linecap: round; opacity: .92; stroke-dasharray: 1; stroke-dashoffset: 1; animation: hmDraw 1.6s var(--ease) forwards; }
.hm-band:nth-child(2) { animation-delay: .08s; } .hm-band:nth-child(3) { animation-delay: .16s; } .hm-band:nth-child(4) { animation-delay: .24s; }
.hm-band:nth-child(5) { animation-delay: .32s; } .hm-band:nth-child(6) { animation-delay: .4s; } .hm-band:nth-child(7) { animation-delay: .48s; }
@keyframes hmDraw { to { stroke-dashoffset: 0; } }
.hm-glow { filter: blur(26px); opacity: 0; animation: hmGlow 1.8s .9s forwards; }
.hm-glow .hm-band { stroke-width: 26; animation-duration: 1.8s; }
@keyframes hmGlow { to { opacity: .42; } }
.hm-moon { position: absolute; left: 50%; bottom: 96px; width: 220px; height: 220px; margin-left: -110px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 50% 45%, #fff6dc 0%, #ffe9b0 32%, rgba(255, 214, 140, .25) 58%, transparent 70%);
  opacity: 0; transform: translateY(60px); animation: hmRise 2.2s var(--ease) .5s forwards; }
@keyframes hmRise { to { opacity: .9; transform: none; } }
.hm-hills { position: absolute; left: 0; right: 0; bottom: 0; height: 240px; z-index: -1; }
.hm-hills svg { width: 100%; height: 100%; display: block; }
.hm-water { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; z-index: -1; background: linear-gradient(180deg, rgba(124, 108, 255, .18), var(--bg) 85%); }
.hm-water::before { content: ''; position: absolute; left: 50%; top: 6px; width: 260px; height: 70px; margin-left: -130px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 233, 176, .35), transparent 70%); filter: blur(4px); }

.hm-in { position: relative; max-width: 980px; text-align: center; }
.hm-in::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 46%; width: 125%; height: 120%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(11, 7, 23, .72), rgba(11, 7, 23, .35) 60%, transparent); pointer-events: none; }
.hm-hello { display: inline-flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 999px; background: rgba(25, 18, 54, .7); border: 1px solid rgba(124, 108, 255, .35);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 15px; font-weight: 700; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.hm-hello b { font-weight: 900; }
.hm-dday { padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 900; color: #0b0717; background: var(--ok); font-variant-numeric: tabular-nums; }
.hm-dday.warn { background: var(--warn); } .hm-dday.bad { background: var(--bad); color: #fff; }
.hm-h1 { margin: 26px 0 0; font-size: clamp(40px, 7.2vw, 96px); line-height: 1.04; font-weight: 900; letter-spacing: -.05em; }
.hm-h1 .ln { display: block; overflow: hidden; padding-bottom: .08em; }
.hm-h1 .ln > span { display: inline-block; transform: translateY(105%); animation: hmUp 1s var(--ease) forwards; }
.hm-h1 .ln:nth-child(2) > span { animation-delay: .14s; }
@keyframes hmUp { to { transform: none; } }
.hm-h1 .first { color: #fff; }
.hm-h1 .grad { background: linear-gradient(90deg, #ff5d5d, #ffb23e, #ffe24e, #35d07f, #4e8cff, #7c6cff, #b06cff, #ff5d5d); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: hmUp 1s var(--ease) .14s forwards, hmFlow 8s linear 1.2s infinite; }
@keyframes hmFlow { to { background-position: -200% 0; } }
.hm-lead { margin: 22px auto 0; max-width: 640px; font-size: clamp(16px, 1.7vw, 20px); line-height: 1.65; color: var(--fg-dim); font-weight: 500; }
.hm-lead strong { color: var(--fg); font-weight: 800; }
.hm-fade { opacity: 0; transform: translateY(18px); animation: hmFade .9s var(--ease) forwards; }
.hm-d1 { animation-delay: .35s; } .hm-d2 { animation-delay: .5s; } .hm-d3 { animation-delay: .65s; } .hm-d4 { animation-delay: .8s; }
@keyframes hmFade { to { opacity: 1; transform: none; } }

.hm-entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 36px auto 0; max-width: 880px; }
.hm-entry { position: relative; display: grid; gap: 6px; padding: 20px 20px 18px; border-radius: 18px; text-align: left; cursor: pointer; color: var(--fg); font: inherit;
  background: rgba(25, 18, 54, .72); border: 1px solid rgba(124, 108, 255, .28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.hm-entry::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: var(--rainbow); opacity: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; transition: opacity .25s; pointer-events: none; }
.hm-entry:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(124, 108, 255, .3); border-color: transparent; }
.hm-entry:hover::before, .hm-entry.main::before { opacity: 1; }
.hm-entry.main { background: linear-gradient(160deg, rgba(124, 108, 255, .32), rgba(25, 18, 54, .8)); }
.hm-entry .k { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--fg-dim); }
.hm-entry .t { font-size: 26px; font-weight: 900; letter-spacing: -.03em; color: #fff; }
.hm-entry .t .arrow { display: inline-block; margin-left: 6px; transition: transform .25s var(--ease); }
.hm-entry:hover .t .arrow { transform: translateX(5px); }
.hm-entry .s { font-size: 14px; color: var(--fg-dim); font-weight: 600; }
.hm-entry .s b { color: #fff; font-weight: 900; font-size: 17px; font-variant-numeric: tabular-nums; }
.hm-live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.hm-live.ok { color: var(--ok); background: rgba(53, 208, 127, .14); }
.hm-live.warn { color: var(--warn); background: rgba(255, 178, 62, .14); }
.hm-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: hmPing 1.8s ease-out infinite; }
@keyframes hmPing { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.hm-ticker { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 24px; padding: 9px 20px; border-radius: 999px; font-size: 14px; color: var(--fg-dim); font-weight: 600;
  background: rgba(11, 7, 23, .62); border: 1px solid var(--line-soft); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hm-ticker b { color: var(--fg); font-weight: 900; font-size: 18px; font-variant-numeric: tabular-nums; margin-right: 3px; }

.hm-body { position: relative; max-width: 1180px; margin: -110px auto 0; padding: 0 24px 60px; z-index: 2; }
.hm-sec { display: flex; align-items: baseline; gap: 14px; margin: 64px 0 18px; }
.hm-sec h2 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: 900; letter-spacing: -.035em; }
.hm-sec p { margin: 0; color: var(--fg-faint); font-size: 14.5px; font-weight: 600; }
.hm-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hm-card { position: relative; overflow: hidden; display: grid; gap: 10px; padding: 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line-soft); text-align: left; cursor: pointer; color: var(--fg); font: inherit;
  transition: transform .25s var(--ease), border-color .25s, opacity .8s var(--ease); }
.hm-card:hover { transform: translateY(-4px); border-color: var(--line); }
.hm-card .bar { position: absolute; inset: 0 0 auto 0; height: 3px; }
.hm-card h3 { margin: 4px 0 0; font-size: 22px; font-weight: 900; letter-spacing: -.03em; }
.hm-card p { margin: 0; color: var(--fg-dim); font-size: 14.5px; line-height: 1.65; }
.hm-card .go { margin-top: 4px; font-size: 14px; font-weight: 800; color: #fff; display: inline-flex; gap: 6px; align-items: center; }
.hm-card .go span { transition: transform .2s var(--ease); }
.hm-card:hover .go span { transform: translateX(4px); }
.hm-mini { height: 92px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-soft); display: grid; place-items: center; }
.hm-beads { display: grid; grid-template-columns: repeat(10, 16px); grid-auto-rows: 16px; gap: 5px; }
.hm-beads i { width: 16px; height: 16px; border-radius: 50%; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .3s var(--ease); }
.hm-beads i.on { opacity: 1; transform: none; }
.hm-beads i.P { background: var(--player); box-shadow: 0 0 10px rgba(78, 140, 255, .55); }
.hm-beads i.B { background: var(--banker); box-shadow: 0 0 10px rgba(255, 93, 93, .55); }
.hm-ox { display: flex; gap: 6px; }
.hm-ox i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-style: normal; font-weight: 900; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .3s var(--ease); }
.hm-ox i.on { opacity: 1; transform: none; }
.hm-ox i.o { color: var(--ok); background: rgba(53, 208, 127, .14); }
.hm-ox i.x { color: var(--banker); background: rgba(255, 93, 93, .14); }
.hm-sig { display: flex; align-items: center; gap: 16px; }
.hm-sig .pick { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; font-size: 26px; font-weight: 900; color: #fff; background: var(--player); box-shadow: 0 0 22px rgba(78, 140, 255, .6); }
.hm-ring { position: relative; width: 56px; height: 56px; }
.hm-ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.hm-ring circle { fill: none; stroke-width: 5; }
.hm-ring .bg { stroke: var(--line); }
.hm-ring .fg { stroke: url(#hmRingGrad); stroke-linecap: round; stroke-dasharray: 151; transition: stroke-dashoffset .9s linear; }
.hm-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.hm-sig .step { font-size: 13px; color: var(--fg-dim); font-weight: 700; }
.hm-sig .step b { display: block; color: #fff; font-size: 17px; font-weight: 900; }

.hm-grid3 { display: grid; grid-template-columns: 1.1fr 1.3fr 1fr; gap: 16px; }
.hm-panel { padding: 22px 24px; border-radius: 20px; background: var(--card); border: 1px solid var(--line-soft); }
.hm-panel h4 { margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 800; color: var(--fg-dim); }
.hm-panel h4 button { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--fg-faint); font-weight: 700; cursor: pointer; }
.hm-panel h4 button:hover { color: var(--fg); }
.hm-pass .big { font-size: 52px; font-weight: 900; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #35d07f, #4e8cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-pass .big.off { background: linear-gradient(90deg, #ff5d5d, #ffb23e); -webkit-background-clip: text; background-clip: text; }
.hm-pass .big small { font-size: 20px; margin-left: 4px; }
.hm-pass .range { margin-top: 8px; font-size: 14px; color: var(--fg-dim); font-weight: 600; }
.hm-meter { margin-top: 16px; height: 8px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.hm-meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--rainbow); transition: width 1.4s var(--ease); }
.hm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 16px; margin-top: 16px; border-radius: 12px; font-size: 14px; font-weight: 800;
  border: 1px solid var(--line); background: var(--card-2); color: #fff; cursor: pointer; transition: border-color .2s; font-family: inherit; }
.hm-btn:hover { border-color: #7c6cff; }
.hm-list { display: grid; }
.hm-list button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border: 0; border-top: 1px solid var(--line-soft); background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.hm-list button:first-child { border-top: 0; padding-top: 0; }
.hm-list button:hover .tt { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hm-list .tag { padding: 3px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 900; color: var(--warn); background: rgba(255, 178, 62, .14); }
.hm-list .tag.n { color: var(--fg-dim); background: rgba(255, 255, 255, .06); }
.hm-list .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14.5px; }
.hm-list time { font-size: 12.5px; color: var(--fg-faint); font-variant-numeric: tabular-nums; }
.hm-cs .num { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.hm-cs .num b { font-size: 44px; font-weight: 900; line-height: 1; color: #fff; }
.hm-cs .num span { color: var(--fg-dim); font-weight: 700; }
.hm-cs p { margin: 10px 0 0; color: var(--fg-dim); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.hm-cs .new { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 900; color: #fff; background: var(--banker); }
.hm-empty { color: var(--fg-faint); font-size: 14px; }
.hm-reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.hm-reveal.in { opacity: 1; transform: none; }
.hm-cards .hm-reveal:nth-child(2), .hm-grid3 .hm-reveal:nth-child(2) { transition-delay: .1s; }
.hm-cards .hm-reveal:nth-child(3), .hm-grid3 .hm-reveal:nth-child(3) { transition-delay: .2s; }
.hm-card.hm-reveal.in:hover { transform: translateY(-4px); transition-delay: 0s; }
.hm-foot { max-width: 1180px; margin: 0 auto; padding: 22px 24px 8px; border-top: 1px solid var(--line-soft); color: var(--fg-faint); font-size: 13px; text-align: center; }
@media (max-width: 900px) {
  .hm-entries { grid-template-columns: 1fr; max-width: 460px; }
  .hm-entry { grid-template-columns: 1fr auto; align-items: center; }
  .hm-entry .k { grid-column: 1 / -1; }
  .hm-entry .t { white-space: nowrap; font-size: 23px; }
  .hm-entry .s { text-align: right; font-size: 12.5px; }
  .hm-cards, .hm-grid3 { grid-template-columns: 1fr; }
  .hm-hero { padding: 40px 18px 190px; min-height: auto; }
  .hm-arc { bottom: 70px; }
  .hm-moon { bottom: 70px; width: 160px; height: 160px; margin-left: -80px; }
  .hm-hills { height: 170px; }
  .hm-body { margin-top: -70px; padding: 0 16px 40px; }
  .hm-sec { flex-direction: column; gap: 6px; margin-top: 46px; }
  .hm-ticker { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #v-home *, #v-home *::before, #v-home *::after { animation: none !important; transition: none !important; }
  .hm-band { stroke-dashoffset: 0; } .hm-glow { opacity: .42; } .hm-moon { opacity: .9; transform: none; }
  .hm-h1 .ln > span, .hm-fade, .hm-reveal { transform: none; opacity: 1; }
  .hm-shoot { display: none; }
  .hm-beads i, .hm-ox i { opacity: 1; transform: none; }
}
