/* 会员网站样式。方向：复古游乐厅——浅绿底、米黄卡片、深红主色、金币图标。
   规矩（让整站看起来统一）：
   - 间距只用 4 / 8 / 12 / 16 / 24；圆角只用三种：卡片 16、按钮和输入框 12、标签和筹码全圆。
   - 阴影只有两种：--sh（卡片：一条实边加一点柔光）和 --sh-btn（按钮：下面一条实边，按下去会缩回）。
   - 图标一律 1.8 粗的线条；圆形的东西（分类、供应商、快捷入口）都是同一套“圆牌”。
   变量名沿用旧的，后台“主题”设置还能覆盖：--gold = 主色，--gold-2 = 强调文字色。 */
:root {
  --bg: #b9dcc8; --panel: #fbf2d5; --panel-2: #f3e6bb; --paper: #fffbea; --line: #cdb680; --line-2: #e4d4a3;
  --text: #2b2317; --muted: #6f6650; --gold: #b3261e; --gold-2: #96190f; --on-gold: #fff8e6;
  --ok: #1d7a4c; --bad: #b3261e; --warn: #9a6200; --green: #1f6b4a; --green-dk: #1c3d2c;
  --coin: radial-gradient(circle at 35% 30%, #ffe9a6, #e9b949); --coin-line: #c98f1a;
  --sh: 0 2px 0 rgba(90,70,20,.2), 0 10px 22px -16px rgba(28,61,44,.55);
  --sh-btn: 0 2px 0 #bfa566;
  --r: 16px; --r-s: 12px; --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg) radial-gradient(rgba(255,255,255,.3) 1px, transparent 1.5px) 0 0 / 14px 14px; color: var(--text); font: 15px/1.55 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); -webkit-font-smoothing: antialiased; }
a { color: var(--green); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }

/* 顶栏 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; padding: 0 16px; background: rgba(251,242,213,.96); backdrop-filter: blur(10px); border-bottom: 2px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--green-dk); font-weight: 800; font-size: 18px; letter-spacing: .2px; min-width: 0; }
.brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, #cf3a2c, var(--gold-2)); color: var(--on-gold); font-size: 17px; font-weight: 800; flex: none; text-transform: uppercase; box-shadow: 0 2px 0 #6f120b; }
.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.lang { background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 6px; font-size: 13px; }
.bal-chip { background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13.5px; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.marquee { overflow: hidden; white-space: nowrap; background: #f6e7b4; border-bottom: 1px solid var(--line); color: var(--gold-2); font-size: 13px; padding: 6px 0; }
.marquee span { display: inline-block; padding-left: 100%; animation: mq 24s linear infinite; }
@keyframes mq { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee span { animation: none; padding-left: 16px; } }
.banner-maint { background: #f6dd9a; color: var(--gold-2); padding: 10px 16px; font-size: 14px; text-align: center; }

h1 { font-size: 22px; line-height: 1.3; margin: 4px 0 16px; font-weight: 800; color: var(--green-dk); }
h2 { font-size: 16px; line-height: 1.35; margin: 0 0 12px; font-weight: 800; color: var(--green-dk); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* 卡片：米黄底，里面一圈细线，像老式票券 */
.card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 4px rgba(205,182,128,.5), var(--sh); }

/* 账户卡：右上角一抹金色，金额用深红大字 */
.hero { background: radial-gradient(120% 140% at 100% 0%, #f6dd9a 0%, var(--panel) 58%); border-color: #c2a55e; }
.hero h1 { margin-top: 0; }
.hero .amt { font-size: 34px; line-height: 1.2; font-weight: 800; color: var(--gold-2); font-variant-numeric: tabular-nums; letter-spacing: .3px; margin-top: 2px; }
.hero .logo { border-radius: 50%; }

.row { display: flex; gap: 12px; align-items: center; }
.row.wrapr { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.otp-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.otp-row .btn { min-width: 112px; white-space: nowrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* 按钮：下面一条实边，按下去会沉一点 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: var(--r-s); border: 1.5px solid #bfa566; background: linear-gradient(#fffbea, var(--panel-2)); box-shadow: var(--sh-btn); cursor: pointer; font-weight: 700; text-align: center; color: var(--green); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover { filter: brightness(1.03); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 #bfa566; }
.btn.gold { background: linear-gradient(#d4402f, var(--gold)); color: var(--on-gold); border-color: #8e1a12; box-shadow: 0 2px 0 #6f120b; }
.btn.gold:active { box-shadow: 0 0 0 #6f120b; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn:focus-visible, .input:focus-visible, .lang:focus-visible, .seg button:focus-visible, .cats button:focus-visible, .chip:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .btn, .cats button img { transition: none; } }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r-s); border: 1.5px solid var(--line); background: var(--paper); font-size: 16px; box-shadow: inset 0 2px 0 rgba(90,70,20,.06); }
.input:focus { border-color: var(--green); }
.input::placeholder { color: #a79c7c; }
textarea.input { min-height: 80px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--green); color: var(--green); }
.form-err { color: var(--bad); font-size: 14px; min-height: 20px; margin: -4px 0 12px; }

.seg { display: flex; background: var(--panel-2); border: 1.5px solid var(--line); border-radius: var(--r-s); padding: 4px; margin-bottom: 16px; }
.seg button { flex: 1; min-height: 38px; border: 0; background: transparent; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 700; }
.seg button.on { background: var(--gold); color: var(--on-gold); box-shadow: 0 2px 0 #6f120b; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: 0; }
.tag { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); white-space: nowrap; }
.tag.approved { color: var(--ok); border-color: #8fc4a8; background: #e9f5ea; }
.tag.rejected { color: var(--bad); border-color: #e0a59f; background: #fbe9e3; }
.tag.pending { color: var(--warn); border-color: #dcc07a; background: #fdf3cd; }
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.money.in { color: var(--ok); }
.money.out { color: var(--text); }
.empty { text-align: center; color: var(--muted); padding: 28px 0; }

/* 快捷入口：四个圆牌 */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px; border-radius: var(--r-s); color: var(--text); font-size: 13px; font-weight: 700; }
.quick svg, .tabbar svg { width: 22px; height: 22px; stroke: var(--green); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.quick svg { width: 48px; height: 48px; padding: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); box-shadow: 0 2px 0 rgba(90,70,20,.2); }
.quick a:hover svg { border-color: var(--green); }

.games { display: grid; grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 12px; }
.game { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sh); }
.game .gname { font-weight: 700; }
.glist { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }

/* 优惠：左边一条红边，像票根 */
.promo { border-left: 5px solid var(--gold); }
.promo .pname { font-weight: 800; font-size: 16px; color: var(--green-dk); }
.bankbox { background: var(--paper); border: 1.5px dashed var(--line); border-radius: var(--r-s); padding: 12px; margin-bottom: 16px; font-size: 14px; }
.bankbox .acct { font-size: 20px; font-weight: 800; letter-spacing: .6px; font-variant-numeric: tabular-nums; color: var(--green-dk); }
.slip-prev { max-width: 160px; max-height: 160px; border-radius: 10px; border: 1.5px solid var(--line); display: block; margin-top: 8px; }

.chat { display: flex; flex-direction: column; height: calc(100dvh - 200px); min-height: 360px; }
.msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 12px; }
.msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; background: var(--paper); border: 1.5px solid var(--line-2); white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; background: var(--gold); border-color: var(--gold); color: var(--on-gold); border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: transparent; border: 0; color: var(--muted); font-size: 13px; text-align: center; }
.msg time { display: block; font-size: 11px; opacity: .65; margin-top: 2px; }
.composer { display: flex; gap: 8px; }

/* 底部导航（手机） */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(251,242,213,.97); border-top: 2px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.tabbar a.desk { display: none; }
.tabbar a.on, .tabbar a.on-m { color: var(--gold-2); font-weight: 800; }
.tabbar a svg { stroke: var(--muted); }
.tabbar a.on svg, .tabbar a.on-m svg { stroke: var(--gold); }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px); transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
#toast div { background: #2b2317; color: #fff8e6; padding: 10px 16px; border-radius: var(--r-s); box-shadow: 0 6px 24px rgba(60,45,10,.35); text-align: center; }
#toast div.err { background: #8e1a12; color: #fff; }

.menu a { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px dashed var(--line); color: var(--text); font-weight: 600; }
.menu a:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; word-break: break-all; font-variant-numeric: tabular-nums; font-weight: 600; }

/* 横幅 */
.banner { position: relative; margin-bottom: 16px; border-radius: var(--r); overflow: hidden; border: 2px solid var(--line); box-shadow: var(--sh); background: var(--panel-2); }
.banner .slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banner .slides::-webkit-scrollbar { display: none; }
.banner .slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 5 / 2; display: block; color: #fff8e6; }
.banner .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner .cap { position: absolute; left: 7%; top: 50%; transform: translateY(-50%); max-width: 52%; display: flex; flex-direction: column; gap: 4px; text-shadow: 0 2px 0 rgba(0,0,0,.28); }
.banner .cap b { font-size: clamp(20px, 6vw, 34px); line-height: 1.15; font-weight: 800; letter-spacing: .5px; }
.banner .cap small { font-size: clamp(12px, 3.2vw, 15px); opacity: .95; }
.banner .dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.banner .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,248,230,.55); }
.banner .dots i.on { background: #fff8e6; width: 18px; border-radius: 4px; }

/* 游戏分类和供应商 */
.cats { display: flex; gap: 8px; justify-content: space-around; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1.5px dashed var(--line); overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: 1 0 60px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: transparent; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 4px 2px 6px; border-radius: var(--r-s); }
.cats button img { width: 56px; height: 56px; transition: transform .15s; }
.cats button span { padding: 1px 10px; border-radius: 999px; }
.cats button:hover img { transform: translateY(-2px); }
.cats button.on span { background: var(--gold); color: var(--on-gold); }
.cats button.on img { transform: scale(1.08); filter: drop-shadow(0 3px 0 rgba(90,70,20,.3)); }
.provs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 8px; }
.provs a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 12px; font-weight: 600; text-align: center; min-width: 0; }
.provs a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provs a.off { opacity: .45; }
.provs a:hover .picon { transform: translateY(-2px); }
.picon { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--coin); border: 2.5px solid var(--coin-line); box-shadow: 0 2px 0 rgba(90,70,20,.25); color: var(--gold-2); font-weight: 800; font-size: 13px; letter-spacing: .3px; transition: transform .15s; }
.picon img { width: 100%; height: 100%; object-fit: cover; }
.game .picon { width: 48px; height: 48px; font-size: 13px; }

.reflink { background: var(--paper); border: 1.5px dashed var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; word-break: break-all; margin-bottom: 12px; color: var(--muted); }

/* 每日签到：7 个小格，签过的盖绿章，今天的描红边 */
.ci-days { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ci-days li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--paper); font-size: 11px; color: var(--muted); min-width: 0; }
.ci-days li span { white-space: nowrap; }
.ci-days li b { font-weight: 800; font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.ci-days li.got { background: #e3f1e0; border-color: #8fc4a8; }
.ci-days li.got b { color: var(--ok); }
.ci-days li.today { border-color: var(--gold); box-shadow: 0 2px 0 rgba(150,25,15,.35); }
.ci-days li.today span { color: var(--gold-2); font-weight: 800; }

.side { display: none; }

@media (min-width: 760px) and (max-width: 1099px) {
  .tabbar { left: 50%; transform: translateX(-50%); max-width: 720px; border: 2px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; }
}
@media (min-width: 760px) {
  .games { --cols: 3; }
  .provs { grid-template-columns: repeat(6, 1fr); }
  .promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .promo-grid .card { margin-bottom: 0; }
}

/* 电脑版（宽 1100 以上）：左边导航、中间内容、右边账户栏。每一页都是这个框架。 */
@media (min-width: 1100px) {
  :root { --nav-w: 216px; --side-w: 320px; }
  body { padding-bottom: 32px; }
  .top { padding: 0 24px; }
  .tabbar { top: 56px; bottom: 0; left: 0; right: auto; width: var(--nav-w); height: auto; display: flex; flex-direction: column; gap: 4px; padding: 24px 12px; border-top: 0; border-right: 2px solid var(--line); background: var(--panel); }
  .tabbar a, .tabbar a.desk { display: flex; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 12px 16px; font-size: 15px; border-radius: var(--r-s); border: 1.5px solid transparent; }
  .tabbar a:hover { background: var(--panel-2); }
  .tabbar a.on { background: var(--gold); color: var(--on-gold); border-color: #8e1a12; box-shadow: 0 2px 0 #6f120b; }
  .tabbar a.on svg { stroke: var(--on-gold); }
  .tabbar a.on-m { color: var(--muted); font-weight: 600; }
  .tabbar a.on-m svg { stroke: var(--muted); }
  .wrap { max-width: none; margin: 0 calc(var(--side-w) + 24px) 0 var(--nav-w); padding: 24px 28px; }
  #notice, body > footer.wrap { margin-left: var(--nav-w); }
  .side { display: block; position: fixed; top: 56px; right: 0; bottom: 0; width: calc(var(--side-w) + 24px); padding: 24px 24px 24px 0; overflow-y: auto; scrollbar-width: thin; }
  .mob { display: none; }
  body[data-view="/wallet"] #app > *, body[data-view="/me"] #app > *, body[data-view="/chat"] #app > *, body[data-view="/login"] #app > *, body[data-view="/register"] #app > *, body[data-view="/forgot"] #app > * { max-width: 780px; }
  #app > h1 { font-size: 24px; margin-bottom: 16px; }
  .card { padding: 20px; }
  .games { --cols: 3; gap: 16px; }
  .provs { grid-template-columns: repeat(6, 1fr); gap: 24px 12px; }
  .picon { width: 68px; height: 68px; font-size: 15px; }
  .game .picon { width: 52px; height: 52px; font-size: 13px; }
  .provs a { font-size: 13px; }
  .cats button { font-size: 14px; gap: 6px; }
  .cats button img { width: 72px; height: 72px; }
  .banner .slide { aspect-ratio: 4 / 1; }
  .banner .cap b { font-size: 32px; } .banner .cap small { font-size: 15px; }
  .chat { height: calc(100vh - 210px); }
  #toast { bottom: 28px; }
}
@media (min-width: 1500px) {
  .games { --cols: 4; }
  .provs { grid-template-columns: repeat(8, 1fr); }
}
