/* ============================================================
   斗地主 · 大厅 / 登录 / 面板 样式
   复用 styles.css 的设计令牌
   ============================================================ */

.screen { position: absolute; inset: 0; overflow: hidden; }

/* 大厅底色 */
.hall {
  background:
    radial-gradient(120% 95% at 50% -8%, oklch(0.34 0.055 160) 0%, oklch(0.18 0.03 162) 46%, oklch(0.10 0.015 250) 100%);
}
.hall::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 50% at 12% 22%, oklch(0.8 0.12 86 / 0.10), transparent 70%),
    radial-gradient(40% 50% at 88% 78%, oklch(0.7 0.12 160 / 0.10), transparent 70%),
    repeating-linear-gradient(45deg, oklch(1 0 0 / 0.012) 0 2px, transparent 2px 7px);
}

/* 通用入场（transform-only，动画被冻结时仍可见） */
@keyframes screenIn { from { transform: translateY(10px); } to { transform: none; } }
.screen > * { position: relative; }

/* 强调色 */
.accent-green  { --acc: oklch(0.64 0.13 155); --acc-d: oklch(0.5 0.12 156); }
.accent-teal   { --acc: oklch(0.66 0.12 195); --acc-d: oklch(0.5 0.11 196); }
.accent-gold   { --acc: oklch(0.76 0.13 85);  --acc-d: oklch(0.62 0.13 76); }
.accent-red    { --acc: oklch(0.62 0.17 28);  --acc-d: oklch(0.5 0.16 28); }
.accent-purple { --acc: oklch(0.6 0.14 300);  --acc-d: oklch(0.47 0.13 300); }

/* ===================== 登录 ===================== */
.login { display: grid; place-items: center; }
.login-inner { text-align: center; z-index: 2; animation: screenIn .5s var(--ease); }
.login-emblem {
  width: 120px; height: 120px; margin: 0 auto 22px;
  border-radius: 30px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  box-shadow: 0 14px 40px oklch(0.7 0.13 75 / 0.4), inset 0 2px 0 oklch(1 0 0 / 0.3);
  font-size: 58px; color: oklch(0.25 0.05 60); position: relative;
}
.login-emblem .suits { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; letter-spacing: -8px; }
.login-title {
  font-size: 54px; font-weight: 900; letter-spacing: 4px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 4px 20px oklch(0.7 0.13 75 / 0.25);
}
.login-sub { color: var(--text-dim); font-size: 15px; letter-spacing: 6px; margin-top: 6px; margin-bottom: 46px; }
.login-actions { display: flex; flex-direction: column; gap: 14px; width: 320px; margin: 0 auto; }
.login-btn {
  height: 54px; border-radius: 14px; border: none; cursor: pointer;
  font-family: var(--font-cn); font-size: 17px; font-weight: 700; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: .16s var(--ease);
}
.login-btn:hover { transform: translateY(-2px); }
.login-btn.wechat { background: linear-gradient(160deg, oklch(0.72 0.16 150), oklch(0.6 0.15 152)); color: white; }
.login-btn.phone { background: oklch(0.26 0.03 250 / 0.9); color: var(--text); border: 1px solid var(--panel-line); }
.login-btn.guest { background: transparent; color: var(--text-dim); border: 1px solid var(--panel-line); }
.login-btn .ic { font-size: 20px; }
.login-agree { margin-top: 30px; font-size: 12px; color: var(--text-dim); letter-spacing: 1px; }
.login-agree b { color: var(--gold-soft); font-weight: 600; }
/* 登录背景装饰牌 */
.login-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.login-deco .card {
  position: absolute; box-shadow: 0 16px 40px oklch(0 0 0 / 0.45);
  --cw: 96px; --ch: 138px;
}

/* ===================== 大厅 ===================== */
.lobby { display: flex; flex-direction: column; }
.lobby-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 22px 28px; z-index: 5;
}
/* 玩家卡 */
.player-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--panel-line);
  border-radius: 16px; padding: 10px 18px 10px 10px; backdrop-filter: blur(8px);
  cursor: pointer; transition: .16s var(--ease);
}
.player-card:hover { border-color: var(--gold-deep); }
.avatar-ring {
  width: 58px; height: 58px; border-radius: 16px; position: relative; flex: none;
  background: linear-gradient(160deg, oklch(0.5 0.04 250), oklch(0.3 0.03 250));
  display: grid; place-items: center; font-size: 30px;
  box-shadow: inset 0 0 0 2px var(--gold-deep);
}
.pc-info { display: flex; flex-direction: column; gap: 5px; min-width: 150px; }
.pc-name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.pc-lv { font-family: var(--font-num); font-size: 11px; font-weight: 600; color: oklch(0.25 0.05 60); background: linear-gradient(160deg, var(--gold), var(--gold-deep)); padding: 1px 8px; border-radius: 20px; }
.level-bar { height: 7px; border-radius: 4px; background: oklch(0.14 0.02 250 / 0.8); overflow: hidden; }
.level-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.pc-exp { font-family: var(--font-num); font-size: 10px; color: var(--text-dim); }
.pc-rank { font-size: 11px; color: var(--gold-soft); letter-spacing: .5px; white-space: nowrap; }

.header-right { display: flex; align-items: center; gap: 12px; }
.currencies { display: flex; gap: 10px; }
.cur {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--panel-line);
  border-radius: 22px; padding: 7px 7px 7px 14px; backdrop-filter: blur(8px);
}
.cur .ico { font-size: 16px; }
.cur .amt { font-family: var(--font-num); font-weight: 600; font-size: 17px; min-width: 60px; }
.cur.coin .amt { color: var(--gold-soft); }
.cur.diamond .amt { color: oklch(0.78 0.12 215); }
.cur .plus {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  background: linear-gradient(160deg, var(--gold), var(--gold-deep)); color: oklch(0.25 0.05 60);
  display: grid; place-items: center; font-weight: 900; font-size: 18px; line-height: 0;
  transition: .14s var(--ease);
}
.cur .plus:hover { transform: scale(1.12); }

.header-icons { display: flex; gap: 8px; }
.hdr-btn {
  width: 46px; height: 46px; border-radius: 13px; cursor: pointer; position: relative;
  background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(8px);
  display: grid; place-items: center; font-size: 20px; transition: .16s var(--ease);
}
.hdr-btn:hover { border-color: var(--gold-deep); transform: translateY(-2px); }
.dot { position: absolute; top: 6px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: oklch(0.62 0.2 28); box-shadow: 0 0 0 2px oklch(0.16 0.025 250); }

/* 大厅主体 */
.lobby-body { flex: 1; display: flex; align-items: center; justify-content: center; gap: 28px; padding: 0 40px 30px; z-index: 4; }
.mode-hero {
  width: 430px; height: 430px; border-radius: 28px; cursor: pointer;
  background: linear-gradient(165deg, oklch(0.4 0.09 155), oklch(0.24 0.06 158));
  border: 1px solid oklch(0.7 0.1 86 / 0.25);
  position: relative; overflow: hidden; padding: 38px;
  display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: 0 24px 60px oklch(0 0 0 / 0.5);
  transition: .22s var(--ease); animation: screenIn .5s var(--ease);
}
.mode-hero:hover { transform: translateY(-6px); box-shadow: 0 32px 70px oklch(0 0 0 / 0.6); }
.mode-hero .watermark { position: absolute; top: -40px; right: -20px; font-size: 320px; color: oklch(1 0 0 / 0.05); line-height: 0.8; }
.mode-hero .tagpill { align-self: flex-start; white-space: nowrap; font-size: 12px; letter-spacing: 2px; color: var(--gold-soft); border: 1px solid var(--gold-deep); padding: 4px 12px; border-radius: 20px; margin-bottom: 14px; }
.mode-hero h2 { font-size: 40px; font-weight: 900; letter-spacing: 2px; }
.mode-hero p { color: var(--text-dim); font-size: 14px; margin-top: 8px; letter-spacing: 1px; }
.mode-hero .start {
  margin-top: 24px; align-self: flex-start;
  background: linear-gradient(160deg, var(--gold), var(--gold-deep)); color: oklch(0.24 0.05 60);
  font-weight: 900; font-size: 18px; letter-spacing: 3px; padding: 13px 40px; border-radius: 14px;
  box-shadow: 0 8px 22px oklch(0.7 0.13 75 / 0.4);
}

.mode-grid { display: grid; grid-template-columns: 1fr; gap: 16px; width: 320px; }
.mode-card {
  height: 132px; border-radius: 20px; cursor: pointer; padding: 20px 22px;
  background: linear-gradient(160deg, oklch(0.26 0.03 250 / 0.92), oklch(0.18 0.025 250 / 0.92));
  border: 1px solid var(--panel-line); position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  transition: .18s var(--ease); animation: screenIn .5s var(--ease) backwards;
}
.mode-card:hover { transform: translateY(-4px); border-color: var(--acc); }
.mode-card .mc-suit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 92px; color: var(--acc); opacity: 0.16; }
.mode-card .mc-tab { width: 40px; height: 4px; border-radius: 3px; background: var(--acc); margin-bottom: 12px; }
.mode-card h3 { font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.mode-card p { color: var(--text-dim); font-size: 12.5px; margin-top: 6px; }

/* 右侧竖排功能 */
.side-dock { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 12px; z-index: 5; }
.dock-btn {
  width: 64px; height: 64px; border-radius: 18px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  transition: .16s var(--ease); position: relative;
}
.dock-btn:hover { border-color: var(--gold-deep); transform: translateX(-4px); }
.dock-btn .di { font-size: 24px; }
.dock-btn .dl { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }

/* 公告条 */
.announce {
  position: absolute; left: 28px; bottom: 22px; z-index: 5;
  display: flex; align-items: center; gap: 10px; max-width: 560px;
  background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(8px);
  border-radius: 22px; padding: 8px 18px 8px 8px; overflow: hidden;
}
.announce .tag { background: linear-gradient(160deg, var(--gold), var(--gold-deep)); color: oklch(0.25 0.05 60); font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 16px; white-space: nowrap; }
.announce .txt { font-size: 13px; color: var(--text-dim); white-space: nowrap; }

/* ===================== 选场 sheet ===================== */
.sheet-overlay { position: absolute; inset: 0; z-index: 50; background: oklch(0.06 0.01 250 / 0.6); backdrop-filter: blur(4px); display: grid; place-items: center; animation: screenIn .25s var(--ease); }
.sheet {
  width: 560px; max-height: 80%; background: linear-gradient(180deg, oklch(0.2 0.025 250), oklch(0.14 0.02 250));
  border: 1px solid var(--gold-deep); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 70px oklch(0 0 0 / 0.6);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--panel-line); }
.sheet-head h3 { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
.field-list { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.field-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px;
  border-radius: 16px; cursor: pointer; border: 1px solid var(--panel-line);
  background: oklch(0.22 0.025 250 / 0.7); transition: .15s var(--ease);
}
.field-row:hover { transform: translateX(4px); border-color: var(--acc); background: oklch(0.26 0.03 250 / 0.8); }
.field-row.locked { opacity: 0.55; cursor: not-allowed; }
.field-row.locked:hover { transform: none; }
.fr-badge { width: 50px; height: 50px; border-radius: 14px; background: var(--acc); display: grid; place-items: center; font-size: 24px; flex: none; box-shadow: inset 0 0 0 2px oklch(1 0 0 / 0.18); }
.fr-main { flex: 1; }
.fr-name { font-size: 17px; font-weight: 800; }
.fr-tag { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.fr-stat { text-align: right; white-space: nowrap; }
.fr-base { font-family: var(--font-num); font-size: 18px; font-weight: 600; color: var(--gold-soft); white-space: nowrap; }
.fr-base small { font-size: 11px; color: var(--text-dim); font-family: var(--font-cn); }
.fr-online { font-size: 11px; color: oklch(0.66 0.12 155); margin-top: 3px; }
.fr-online::before { content: "● "; }
.fr-lock { font-size: 12px; color: oklch(0.7 0.14 28); margin-top: 3px; }

/* ===================== 匹配 ===================== */
.matching { display: grid; place-items: center; background: radial-gradient(120% 100% at 50% 30%, oklch(0.3 0.05 160), oklch(0.1 0.015 250)); }
.match-inner { text-align: center; z-index: 2; }
.match-title { font-size: 26px; font-weight: 800; letter-spacing: 4px; margin-bottom: 6px; }
.match-field { color: var(--gold-soft); letter-spacing: 2px; margin-bottom: 44px; font-size: 14px; }
.match-seats { display: flex; gap: 40px; justify-content: center; margin-bottom: 44px; }
.match-seat { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.match-av {
  width: 100px; height: 100px; border-radius: 26px; display: grid; place-items: center; font-size: 46px;
  background: oklch(0.18 0.02 250 / 0.7); border: 2px dashed var(--panel-line); color: var(--text-dim);
  transition: .4s var(--ease);
}
.match-av.filled { border: 2px solid var(--gold); background: linear-gradient(160deg, oklch(0.5 0.04 250), oklch(0.3 0.03 250)); animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }
.match-seat .nm { font-size: 13px; color: var(--text-dim); min-height: 18px; }
.match-seat .nm.on { color: var(--text); }
.match-tip { color: var(--text-dim); letter-spacing: 3px; font-size: 14px; }
.match-tip .dots::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } }
.match-cancel { margin-top: 36px; }

/* ===================== 通用弹窗 ===================== */
.modal-overlay { position: absolute; inset: 0; z-index: 55; background: oklch(0.06 0.01 250 / 0.66); backdrop-filter: blur(5px); display: grid; place-items: center; animation: screenIn .22s var(--ease); }
.modal {
  width: 620px; max-width: 90%; max-height: 84%; display: flex; flex-direction: column;
  background: linear-gradient(180deg, oklch(0.21 0.025 250), oklch(0.14 0.02 250));
  border: 1px solid var(--gold-deep); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px oklch(0 0 0 / 0.65);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--panel-line); flex: none; }
.modal-head h3 { font-size: 21px; font-weight: 800; letter-spacing: 2px; display: flex; align-items: center; gap: 10px; }
.modal-head .x { width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: var(--text-dim); border: 1px solid var(--panel-line); transition: .15s var(--ease); }
.modal-head .x:hover { color: var(--text); border-color: var(--gold-deep); }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { padding: 9px 22px; border-radius: 11px; cursor: pointer; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--text-dim); border: 1px solid var(--panel-line); background: oklch(0.18 0.02 250 / 0.6); transition: .14s var(--ease); }
.tab.on { color: oklch(0.24 0.05 60); background: linear-gradient(160deg, var(--gold), var(--gold-deep)); border-color: transparent; }

/* 商城 */
.coin-grid, .item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pack {
  position: relative; border-radius: 16px; padding: 22px 18px; text-align: center;
  background: oklch(0.24 0.03 250 / 0.7); border: 1px solid var(--panel-line); cursor: pointer;
  transition: .15s var(--ease);
}
.pack:hover { transform: translateY(-3px); border-color: var(--gold-deep); }
.pack .pic { font-size: 40px; }
.pack .amt { font-family: var(--font-num); font-size: 22px; font-weight: 600; color: var(--gold-soft); margin-top: 6px; }
.pack .bonus { font-size: 11px; color: oklch(0.68 0.13 150); margin-top: 2px; min-height: 15px; }
.pack .buy { margin-top: 12px; padding: 8px 0; border-radius: 10px; background: linear-gradient(160deg, var(--gold), var(--gold-deep)); color: oklch(0.24 0.05 60); font-weight: 800; font-size: 14px; }
.pack .hot-tag { position: absolute; top: -8px; right: 12px; background: oklch(0.62 0.2 28); color: white; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 10px; }
.pack.item { text-align: left; display: flex; gap: 14px; align-items: center; }
.pack.item .pic { font-size: 34px; }
.pack.item .it-main { flex: 1; }
.pack.item .it-name { font-size: 15px; font-weight: 700; }
.pack.item .it-desc { font-size: 11.5px; color: var(--text-dim); margin-top: 3px; }
.pack.item .it-cost { font-family: var(--font-num); font-size: 14px; color: oklch(0.78 0.12 215); white-space: nowrap; }
.pack.item .it-cost::before { content: "💎 "; }
.pack.item .it-cost.owned { color: var(--gold-soft); }
.pack.item .it-cost.owned::before { content: "✓ "; }
.pack.item.equipped { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-deep); }
.eq-badge { font-size: 10px; font-weight: 700; color: oklch(0.25 0.05 60); background: linear-gradient(160deg, var(--gold), var(--gold-deep)); padding: 1px 7px; border-radius: 10px; margin-left: 7px; }

/* ===================== 残局闯关 ===================== */
.endless-select { background: radial-gradient(120% 95% at 50% -8%, oklch(0.32 0.07 195) 0%, oklch(0.16 0.03 200) 50%, oklch(0.1 0.015 250) 100%); display: flex; flex-direction: column; align-items: center; }
.endless-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 28px 40px 6px; z-index: 5; }
.endless-head h2 { font-size: 30px; font-weight: 900; letter-spacing: 4px; }
.endless-head .icon-btn { width: auto; padding: 0 16px; font-size: 14px; letter-spacing: 1px; }
.endless-sub { color: var(--text-dim); font-size: 14px; letter-spacing: 1px; margin-bottom: 30px; z-index: 5; }
.level-grid { display: grid; grid-template-columns: repeat(3, 220px); gap: 20px; z-index: 5; }
.level-card { height: 180px; border-radius: 20px; cursor: pointer; padding: 22px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(160deg, oklch(0.26 0.04 200 / 0.9), oklch(0.18 0.03 210 / 0.9)); border: 1px solid var(--panel-line); transition: .18s var(--ease); }
.level-card:hover { transform: translateY(-5px); border-color: var(--gold); }
.level-card.locked { opacity: 0.45; cursor: not-allowed; }
.level-card.locked:hover { transform: none; border-color: var(--panel-line); }
.level-card.cleared { border-color: oklch(0.6 0.12 155 / 0.6); }
.level-card .lv-no { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-num); font-size: 24px; font-weight: 700; background: linear-gradient(160deg, var(--gold), var(--gold-deep)); color: oklch(0.24 0.05 60); margin-bottom: 4px; }
.level-card.cleared .lv-no { background: linear-gradient(160deg, oklch(0.62 0.13 155), oklch(0.48 0.11 158)); color: white; }
.level-card.locked .lv-no { background: oklch(0.22 0.02 250); color: var(--text-dim); }
.level-card .lv-name { font-size: 12px; color: var(--text-dim); letter-spacing: 1px; }
.level-card .lv-title { font-size: 19px; font-weight: 800; }
.level-card .lv-stars { color: var(--gold); letter-spacing: 2px; font-size: 14px; }
.level-card .lv-reward { font-size: 12px; color: var(--gold-soft); }

.endless-play .endless-opp { position: absolute; top: 110px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; z-index: 20; }
.endless-opp .opp-cards { display: flex; align-items: center; gap: 10px; }
.endless-opp .opp-count { font-family: var(--font-num); font-size: 15px; color: var(--gold-soft); margin-left: 6px; }
.endless-table { position: absolute; top: 300px; left: 50%; transform: translateX(-50%); width: 700px; display: flex; flex-direction: column; align-items: center; gap: 18px; z-index: 15; }
.endless-table .e-zone { min-height: 88px; display: flex; align-items: center; justify-content: center; }
.endless-table .played-cards .card { --cw: 58px; --ch: 82px; }
.endless-table .played-cards .card .corner .r { font-size: 15px; }
.endless-table .played-cards .card .corner .s { font-size: 12px; }
.endless-table .played-cards .card .pip { font-size: 28px; }
.my-hand.endless { bottom: 30px; }

/* ===================== 癞子徽标 ===================== */
.card.laizi { box-shadow: 0 0 0 2px oklch(0.78 0.16 60), 0 2px 6px oklch(0 0 0 / 0.3); }
.card.laizi .laizi-badge {
  position: absolute; top: 3px; right: 4px; width: 18px; height: 18px;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: white;
  background: linear-gradient(160deg, oklch(0.72 0.18 50), oklch(0.6 0.17 38));
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.4);
}
.my-hand .card.laizi { box-shadow: 0 0 0 2px oklch(0.8 0.16 60), 0 0 14px oklch(0.78 0.16 60 / 0.5); }
.laizi-hint { position: absolute; left: 50%; bottom: 168px; transform: translateX(-50%); z-index: 24; font-size: 12px; color: oklch(0.82 0.14 60); letter-spacing: 1px; background: oklch(0.14 0.02 250 / 0.8); padding: 5px 14px; border-radius: 20px; border: 1px solid oklch(0.6 0.14 50 / 0.4); }

/* ===================== 难度选择条 ===================== */
.diff-chips { display: flex; gap: 10px; padding: 4px 14px 14px; }
.diff-chip {
  flex: 1; display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 11px 8px; border-radius: 12px; cursor: pointer;
  background: oklch(0.2 0.025 250 / 0.7); border: 1px solid var(--panel-line);
  transition: .15s var(--ease); font-size: 14px; font-weight: 600;
}
.diff-chip:hover { transform: translateY(-2px); }
.diff-chip.on { border-color: var(--acc); background: oklch(0.28 0.04 250 / 0.85); box-shadow: 0 0 0 1px var(--acc); }
.diff-chip .di { font-size: 18px; }
.diff-chip .dsub { display: block; font-size: 10px; color: var(--text-dim); font-weight: 400; margin-top: 1px; }
.diff-chip .dx2 { font-family: var(--font-num); font-size: 11px; color: oklch(0.78 0.16 30); margin-left: 2px; }

/* ===================== 段位页 ===================== */
.rank-hero { display: flex; flex-direction: column; align-items: center; padding: 6px 0 18px; }
.rank-emblem { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; font-size: 58px; background: radial-gradient(circle at 50% 35%, oklch(0.4 0.09 86 / 0.6), oklch(0.2 0.025 250 / 0.7)); border: 2px solid var(--gold-deep); box-shadow: 0 0 30px oklch(0.7 0.13 75 / 0.3); margin-bottom: 12px; }
.rank-name-big { font-size: 28px; font-weight: 900; letter-spacing: 3px; }
.rank-stars-big { margin-top: 8px; font-size: 20px; letter-spacing: 3px; color: var(--gold); }
.rank-stars-big .empty { color: oklch(0.4 0.02 250); }
.rank-progress { margin-top: 14px; width: 80%; }
.rank-progress .pbar { height: 9px; border-radius: 5px; background: oklch(0.16 0.02 250 / 0.8); overflow: hidden; }
.rank-progress .pbar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.rank-progress .ptxt { font-size: 12px; color: var(--text-dim); text-align: center; margin-top: 7px; }
.rank-ladder { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.ladder-row { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 12px; background: oklch(0.2 0.025 250 / 0.6); border: 1px solid var(--panel-line); }
.ladder-row.cur { border-color: var(--gold); background: linear-gradient(120deg, oklch(0.32 0.07 86 / 0.4), oklch(0.2 0.025 250 / 0.6)); }
.ladder-row.passed { opacity: 0.6; }
.ladder-row .li { font-size: 26px; width: 36px; text-align: center; }
.ladder-row .ln { flex: 1; font-size: 15px; font-weight: 700; }
.ladder-row .lr { font-size: 12px; color: var(--text-dim); font-family: var(--font-num); }
.ladder-row .lcur { font-size: 11px; color: var(--gold-soft); font-weight: 700; }

/* ===================== 转盘 ===================== */
.wheel-wrap { display: flex; flex-direction: column; align-items: center; padding: 6px 0; }
.wheel-stage { position: relative; width: 320px; height: 320px; margin: 6px 0 18px; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 5; font-size: 32px; filter: drop-shadow(0 2px 3px oklch(0 0 0 / 0.5)); }
.wheel-disc { width: 100%; height: 100%; border-radius: 50%; border: 6px solid var(--gold-deep); box-shadow: 0 0 0 4px oklch(0.2 0.025 250), 0 12px 30px oklch(0 0 0 / 0.5); transition: transform 4.2s cubic-bezier(.17,.67,.2,1); position: relative; overflow: hidden; }
.wheel-seg { position: absolute; left: 50%; top: 50%; width: 50%; height: 50%; transform-origin: 0 0; }
.wheel-seg .seg-label { position: absolute; left: 26%; top: 16%; transform: rotate(22deg); font-size: 11px; font-weight: 700; white-space: nowrap; color: oklch(0.2 0.02 60); }
.wheel-hub { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(160deg, var(--gold), var(--gold-deep)); display: grid; place-items: center; font-weight: 800; color: oklch(0.24 0.05 60); font-size: 15px; z-index: 4; box-shadow: 0 3px 8px oklch(0 0 0 / 0.5); cursor: pointer; border: 3px solid oklch(0.9 0.06 88); }
.wheel-hub.spinning { pointer-events: none; opacity: 0.7; }
.wheel-note { font-size: 12px; color: var(--text-dim); }

/* ===================== 好友房间 ===================== */
.friend-screen { background: radial-gradient(120% 95% at 50% -8%, oklch(0.32 0.06 300) 0%, oklch(0.16 0.03 290) 50%, oklch(0.1 0.015 250) 100%); display: flex; flex-direction: column; align-items: center; }
.friend-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 28px 40px 10px; }
.friend-head h2 { font-size: 28px; font-weight: 900; letter-spacing: 3px; }
.friend-head .icon-btn { width: auto; padding: 0 16px; font-size: 14px; }
.room-panel { display: flex; gap: 24px; margin-top: 26px; }
.room-card { width: 320px; border-radius: 22px; padding: 30px; background: linear-gradient(165deg, oklch(0.26 0.04 290 / 0.9), oklch(0.18 0.03 290 / 0.9)); border: 1px solid var(--panel-line); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.room-card h3 { font-size: 20px; font-weight: 800; letter-spacing: 2px; }
.room-card .ricon { font-size: 50px; }
.room-card p { color: var(--text-dim); font-size: 13px; text-align: center; line-height: 1.6; }
.room-code-box { display: flex; gap: 8px; }
.room-code-box input { width: 150px; font-family: var(--font-num); font-size: 22px; letter-spacing: 4px; text-align: center; padding: 10px; border-radius: 10px; background: oklch(0.14 0.02 250 / 0.8); border: 1px solid var(--panel-line); color: var(--text); outline: none; }
.room-code-box input:focus { border-color: var(--gold-deep); }
.room-seats { display: flex; gap: 18px; margin-top: 8px; }
.room-seat { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.room-seat .rs-av { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; font-size: 34px; background: oklch(0.18 0.02 250 / 0.7); border: 2px dashed var(--panel-line); color: var(--text-dim); }
.room-seat .rs-av.filled { border: 2px solid var(--gold); background: linear-gradient(160deg, oklch(0.5 0.04 250), oklch(0.3 0.03 250)); }
.room-seat .rs-n { font-size: 12px; color: var(--text-dim); }
.created-code { font-family: var(--font-num); font-size: 40px; font-weight: 700; letter-spacing: 6px; color: var(--gold-soft); }

/* ===================== 结算明细 ===================== */
.result-breakdown { margin: 16px auto 8px; width: 90%; display: flex; flex-direction: column; gap: 6px; }
.bd-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 12px; border-radius: 8px; background: oklch(0.16 0.02 250 / 0.5); }
.bd-row .bk { color: var(--text-dim); }
.bd-row .bv { font-family: var(--font-num); font-weight: 600; color: var(--gold-soft); }
.bd-row.total { background: oklch(0.3 0.04 86 / 0.3); border: 1px solid var(--gold-deep); }
.bd-row.total .bv { color: var(--gold); font-size: 15px; }
.streak-banner { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 5px 16px; border-radius: 20px; font-size: 14px; font-weight: 700; background: linear-gradient(160deg, oklch(0.66 0.16 40), oklch(0.56 0.16 28)); color: white; box-shadow: 0 4px 12px oklch(0.6 0.15 30 / 0.4); animation: streakPop .4s var(--ease); }
@keyframes streakPop { from { transform: scale(.6); } to { transform: scale(1); } }

/* 签到 + 任务 */
.sign-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.sign-day {
  border-radius: 12px; padding: 10px 4px; text-align: center; border: 1px solid var(--panel-line);
  background: oklch(0.2 0.025 250 / 0.6);
}
.sign-day.done { background: linear-gradient(165deg, oklch(0.4 0.09 155 / 0.5), oklch(0.26 0.06 158 / 0.5)); border-color: oklch(0.6 0.12 155 / 0.6); }
.sign-day.today { border-color: var(--gold); box-shadow: 0 0 0 2px oklch(0.8 0.11 86 / 0.3); }
.sign-day .d { font-size: 11px; color: var(--text-dim); }
.sign-day .gift { font-size: 22px; margin: 4px 0; }
.sign-day .rw { font-size: 10px; color: var(--gold-soft); font-family: var(--font-num); }
.sign-day .check { font-size: 16px; color: oklch(0.66 0.14 150); }
.sign-cta { margin: 16px 0 26px; text-align: center; }

.task-list { display: flex; flex-direction: column; gap: 12px; }
.task {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 14px;
  background: oklch(0.22 0.025 250 / 0.7); border: 1px solid var(--panel-line);
}
.task .t-main { flex: 1; }
.task .t-name { font-size: 15px; font-weight: 700; }
.task .t-desc { font-size: 12px; color: var(--text-dim); margin: 4px 0 7px; }
.task .t-bar { height: 6px; border-radius: 4px; background: oklch(0.14 0.02 250 / 0.8); overflow: hidden; width: 200px; }
.task .t-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 4px; }
.task .t-prog { font-size: 11px; color: var(--text-dim); font-family: var(--font-num); margin-top: 4px; }
.task .t-reward { text-align: right; }
.task .t-rw { font-size: 12px; color: var(--gold-soft); margin-bottom: 8px; white-space: nowrap; }
.claim-btn { padding: 7px 18px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; border: none; transition: .14s var(--ease); white-space: nowrap; }
.claim-btn.go { background: linear-gradient(160deg, var(--gold), var(--gold-deep)); color: oklch(0.24 0.05 60); }
.claim-btn.go:hover { transform: translateY(-2px); }
.claim-btn.wait { background: oklch(0.2 0.02 250 / 0.7); color: var(--text-dim); border: 1px solid var(--panel-line); cursor: default; }
.claim-btn.done { background: transparent; color: oklch(0.6 0.1 150); border: 1px solid oklch(0.5 0.1 150 / 0.5); cursor: default; }

/* 排行榜 */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 13px; background: oklch(0.21 0.025 250 / 0.7); border: 1px solid var(--panel-line); }
.rank-row.top { background: linear-gradient(120deg, oklch(0.32 0.07 86 / 0.4), oklch(0.2 0.025 250 / 0.7)); border-color: var(--gold-deep); }
.rank-no { width: 34px; text-align: center; font-family: var(--font-num); font-size: 19px; font-weight: 700; color: var(--text-dim); }
.rank-medal { font-size: 24px; width: 34px; text-align: center; }
.rank-av { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(160deg, oklch(0.5 0.04 250), oklch(0.3 0.03 250)); display: grid; place-items: center; font-size: 24px; }
.rank-name { flex: 1; font-size: 15px; font-weight: 600; }
.rank-wins { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.rank-coins { font-family: var(--font-num); font-size: 16px; color: var(--gold-soft); white-space: nowrap; flex: none; }

/* 设置 */
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--panel-line); }
.set-row:last-child { border-bottom: none; }
.set-row .label { font-size: 15px; }
.set-row .sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.toggle { width: 50px; height: 28px; border-radius: 16px; background: oklch(0.25 0.02 250); cursor: pointer; position: relative; transition: .18s var(--ease); border: 1px solid var(--panel-line); }
.toggle.on { background: linear-gradient(160deg, var(--gold), var(--gold-deep)); border-color: transparent; }
.toggle i { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: white; transition: .18s var(--ease); box-shadow: 0 2px 4px oklch(0 0 0 / 0.4); }
.toggle.on i { left: 24px; }

/* 个人中心 */
.profile-top { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.profile-av { width: 90px; height: 90px; border-radius: 24px; background: linear-gradient(160deg, oklch(0.5 0.04 250), oklch(0.3 0.03 250)); display: grid; place-items: center; font-size: 46px; box-shadow: inset 0 0 0 3px var(--gold-deep); }
.profile-meta h3 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.profile-meta .uid { font-size: 12px; color: var(--text-dim); font-family: var(--font-num); margin-top: 4px; white-space: nowrap; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-box { text-align: center; padding: 16px 8px; border-radius: 14px; background: oklch(0.22 0.025 250 / 0.7); border: 1px solid var(--panel-line); }
.stat-box .num { font-family: var(--font-num); font-size: 26px; font-weight: 600; color: var(--gold-soft); }
.stat-box .lbl { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.ach-title { font-size: 14px; color: var(--text-dim); letter-spacing: 2px; margin-bottom: 12px; }
.ach-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ach { width: 70px; text-align: center; }
.ach .badge { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 6px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(160deg, oklch(0.32 0.07 86 / 0.5), oklch(0.2 0.025 250 / 0.7)); border: 1px solid var(--gold-deep); }
.ach .badge.lock { background: oklch(0.18 0.02 250 / 0.6); border-color: var(--panel-line); filter: grayscale(1); opacity: 0.5; }
.ach .an { font-size: 11px; color: var(--text-dim); }

/* shell toast */
.shell-toast {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); z-index: 80;
  background: oklch(0.12 0.015 250 / 0.95); border: 1px solid var(--gold-deep);
  color: var(--text); padding: 12px 26px; border-radius: 12px; font-size: 15px; letter-spacing: 1px;
  box-shadow: 0 12px 30px oklch(0 0 0 / 0.5); animation: screenIn .25s var(--ease);
}
