/* ============================================================
 * 叠叠消 · 站点样式
 * 1) 游戏页（index.html）
 * 2) 游戏大厅（games.html）
 * 3) 外链播放（play.html）
 * ============================================================ */

:root {
  --bg: #a9d8b7;
  --bg-deep: #8cc69b;
  --ink: #123a2b;
  --ink-soft: #4b7b63;
  --card: #f8fbf2;
  --card-line: #dfe9d5;
  --accent: #f0a93c;
  --accent-soft: #ffe08a;
  --panel: #0f2d3c;
  --cyan: #3dd6e4;
  --radius: 16px;
  --shadow: 0 10px 24px -14px rgba(18, 58, 43, .55);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100svh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, .55) 2.5px, transparent 2.6px),
    radial-gradient(120% 55% at 50% -20%, #c6ead1 0%, transparent 60%);
  background-size: 46px 46px, 100% 100%;
  background-attachment: fixed;
  -webkit-user-select: none;
  user-select: none;
  overflow-x: hidden;
}

/* 下半屏的深绿波浪 */
body::before {
  content: "";
  position: fixed;
  left: -10%;
  right: -10%;
  bottom: -6%;
  height: 62%;
  background: linear-gradient(180deg, #93cda3 0%, #7dbd90 100%);
  border-radius: 50% 50% 0 0 / 12% 12% 0 0;
  z-index: -1;
  pointer-events: none;
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------------- 顶部 ---------------- */

.head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.logo {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #f2775c, #e2543c);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 44px;
  text-align: center;
  box-shadow: 0 3px 0 #b94230, 0 10px 18px -10px rgba(150, 40, 20, .9);
  transform: rotate(-3deg);
}

.brand-txt { min-width: 0; }

.brand h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.05;
  color: var(--ink);
  white-space: nowrap;
}

.brand p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  border: 2px solid #d8e5cd;
  border-radius: 11px;
  background: #f7fbf1;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 #c9d9bd;
  transition: transform .12s ease, background .16s ease;
}

.pill:active { transform: translateY(1px); box-shadow: 0 1px 0 #c9d9bd; }
.pill:hover { background: #ffffff; }

.lang-pill {
  appearance: none;
  height: 38px;
  padding: 0 30px 0 11px;
  border: 2px solid #d8e5cd;
  border-radius: 11px;
  background: #f7fbf1 url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23123a2b' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  box-shadow: 0 2px 0 #c9d9bd;
  max-width: 128px;
}

/* ---------------- 数据条 ---------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  padding: 10px 8px 11px;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: var(--card);
  text-align: center;
  box-shadow: var(--shadow);
}

.stat b {
  display: block;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #7f9c8b;
}

/* ---------------- TRX 面板 ---------------- */

.trx {
  padding: 13px 15px 12px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #12384a 0%, #0d2a38 100%);
  box-shadow: 0 14px 26px -18px rgba(6, 30, 40, .95);
  color: #e7f4f6;
  margin-bottom: 14px;
}

.trx-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trx-bolt {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 209, 92, .16);
  font-size: 16px;
}

.trx-label {
  font-size: 13px;
  font-weight: 700;
  color: #b9d2da;
}

.trx-balance {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.trx-balance b {
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  color: #4fe0ec;
  font-variant-numeric: tabular-nums;
}

.trx-balance span {
  font-size: 13px;
  font-weight: 700;
  color: #7fd3dd;
}

.btn-claim {
  appearance: none;
  flex-shrink: 0;
  padding: 9px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #5ee4ef, #2cc3d3);
  color: #05343c;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 #1a93a0;
  transition: transform .12s ease;
}

.btn-claim:active { transform: translateY(1px); box-shadow: 0 2px 0 #1a93a0; }

.trx-rule {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.65;
  color: #9db9c3;
}

.trx.is-off { display: none; }

/* ---------------- 棋盘 ---------------- */

.board-wrap {
  position: relative;
  margin-bottom: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
  overflow: hidden;
}

.board {
  position: relative;
  width: 100%;
  min-height: 300px;
  touch-action: manipulation;
}

.board::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .4) 1.6px, transparent 1.7px);
  background-size: 30px 30px;
  opacity: .7;
  pointer-events: none;
}

.tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf4 0%, #fdf4e2 100%);
  border: 2px solid #e9bb7d;
  box-shadow: 0 3px 0 #d9a464, 0 6px 10px -6px rgba(90, 55, 10, .6);
  cursor: pointer;
  will-change: transform, opacity;
  transition: transform .12s ease, filter .16s ease, opacity .16s ease;
  overflow: hidden;
}

.tile span {
  display: block;
  line-height: 1;
  pointer-events: none;
  transform: translateY(1px);
}

.tile:active { transform: scale(.94); }

.tile.is-blocked {
  cursor: default;
  filter: grayscale(.62) brightness(.92);
  opacity: .62;
}

.tile.is-blocked:active { transform: none; }

.tile.pop { animation: tile-pop .22s ease forwards; }

@keyframes tile-pop {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(.4); opacity: 0; }
}

.tile.shake { animation: tile-shake .28s ease; }

@keyframes tile-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px) rotate(-2deg); }
  75% { transform: translateX(3px) rotate(2deg); }
}

/* 飞向收集槽的残影 */
.fly {
  position: fixed;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf4, #fdf4e2);
  border: 2px solid #e9bb7d;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.4, .1, .4, 1), opacity .3s ease;
}

/* 被道具退回的牌（回退区） */
.return-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .34);
  border: 1px dashed rgba(255, 255, 255, .85);
}

.return-row[hidden] { display: none; }

.return-row .tile {
  position: relative;
  left: auto;
  top: auto;
  z-index: 1;
  cursor: pointer;
}

/* ---------------- 收集槽 ---------------- */

.tray {
  padding: 12px 14px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #22513f 0%, #1a4534 100%);
  box-shadow: 0 14px 26px -18px rgba(6, 30, 22, .95);
  margin-bottom: 12px;
}

.tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 700;
  color: #d5ead9;
}

.tray-head b {
  font-size: 13px;
  font-weight: 700;
  color: #9fc7ac;
  font-variant-numeric: tabular-nums;
}

.tray-slots {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.slot {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  border: 2px dashed rgba(255, 255, 255, .2);
  background: rgba(0, 0, 0, .12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot.has {
  border: none;
  background: none;
}

.slot-tile {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(180deg, #fffdf4, #fdf4e2);
  border: 2px solid #e9bb7d;
  box-shadow: 0 2px 0 #d9a464;
  font-size: 22px;
  animation: slot-in .16s ease;
}

@keyframes slot-in {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.slot-tile.clear {
  animation: slot-clear .26s ease forwards;
}

@keyframes slot-clear {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(.2); opacity: 0; }
}

.tray.full .slot { border-color: rgba(255, 130, 110, .55); }

/* ---------------- 道具 ---------------- */

.props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.prop {
  appearance: none;
  padding: 9px 6px 10px;
  border: 2px solid #d2e0c6;
  border-radius: 13px;
  background: #eff5e8;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 3px 0 #c8d8bb;
  transition: transform .12s ease, filter .16s ease;
}

.prop .icon {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.prop .name {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 700;
}

.prop .left {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: #7b9585;
}

.prop.accent {
  background: linear-gradient(180deg, #ffe9a9, #ffd882);
  border-color: #f0c060;
  box-shadow: 0 3px 0 #dcae4e;
}

.prop:active { transform: translateY(1px); box-shadow: 0 2px 0 #c8d8bb; }

.prop:disabled,
.prop[aria-disabled="true"] {
  cursor: default;
  filter: grayscale(.5);
  opacity: .62;
}

.prop:disabled:active { transform: none; }

/* ---------------- 更多游戏入口 ---------------- */

.more-games {
  display: none;
  margin-top: 14px;
  text-align: center;
}

.more-games.show { display: block; }

.more-games a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .8);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------------- 遮罩层 ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 40, 30, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.overlay[hidden] { display: none; }

.sheet {
  width: 100%;
  max-width: 380px;
  padding: 22px 20px 20px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
  text-align: center;
  animation: sheet-in .22s ease;
}

@keyframes sheet-in {
  from { transform: translateY(10px) scale(.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sheet h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.sheet p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #5e7f6d;
}

.sheet .big {
  display: block;
  margin: 14px 0 2px;
  font-size: 26px;
  font-weight: 800;
  color: #e08a1e;
  font-variant-numeric: tabular-nums;
}

.btn-main {
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(180deg, #2fbb87, #1f9e6f);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 0 #17754f;
}

.btn-main:active { transform: translateY(1px); box-shadow: 0 3px 0 #17754f; }

.btn-sub {
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: none;
  border-radius: 12px;
  background: #eef3ea;
  color: #3f6353;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* ---------------- 提现弹窗 ---------------- */

.wd-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.wd-head h2 {
  margin: 0;
  font-size: 18px;
  text-align: left;
  flex: 1;
}

.wd-tag {
  font-size: 11px;
  font-weight: 700;
  color: #1a9aa8;
  background: rgba(61, 214, 228, .14);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.wd-sheet { max-width: 400px; text-align: left; }

.wd-desc {
  margin: 6px 0 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #5e7f6d;
}

.addr-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px dashed #c3d6bd;
  border-radius: 11px;
  background: #f6f9f1;
}

.addr-box code {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  color: #2c5a45;
  word-break: break-all;
  font-family: Consolas, Monaco, monospace;
}

.copy-btn {
  appearance: none;
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid #cfe0c7;
  border-radius: 8px;
  background: #fff;
  color: #2c5a45;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.wd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  font-size: 12.5px;
  color: #6d8b7b;
}

.wd-input {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid #d6e4cf;
  border-radius: 11px;
  background: #f9fcf5;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  outline: none;
}

.wd-input:focus { border-color: #7fbf9f; }

.wd-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #8aa295;
}

.wd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.wd-actions .btn-main { margin: 0; }
.wd-actions .btn-sub { margin: 0; }

/* ---------------- 提示条 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  z-index: 200;
  transform: translate(-50%, 14px);
  max-width: 84vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(12, 42, 32, .92);
  color: #eaf7ee;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- 大厅 ---------------- */

.hub-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hub-head .back {
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .85);
  white-space: nowrap;
}

.hub-head h1 {
  flex: 1;
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-sub {
  margin: -6px 0 16px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 0 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--card-line);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
  transition: transform .14s ease;
}

.game-card:active { transform: scale(.98); }

.game-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  overflow: hidden;
  background: linear-gradient(150deg, #ffe08a, #ffb03a);
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-cover[data-tone="mint"] { background: linear-gradient(150deg, #a7f0b6, #2ec596); }
.game-cover[data-tone="blue"] { background: linear-gradient(150deg, #9fd8ff, #3f8ee0); }
.game-cover[data-tone="rose"] { background: linear-gradient(150deg, #ffc2d4, #ef6f9c); }

.game-name {
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-desc {
  padding: 0 12px;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: #6f907e;
  min-height: 32px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-go {
  margin: 0 12px;
  padding: 7px 0;
  border-radius: 9px;
  background: #e9f3e2;
  color: #2b6a4e;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
}

.hub-empty {
  padding: 40px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .45);
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}

/* ---------------- 外链播放页 ---------------- */

.player-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.player-bar h1 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-bar a {
  text-decoration: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .6);
  border: 1px solid rgba(255, 255, 255, .85);
  white-space: nowrap;
}

.player-frame {
  width: 100%;
  height: calc(100svh - 110px);
  border: 0;
  border-radius: 16px;
  background: #0d1f19;
  box-shadow: var(--shadow);
}

.player-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------------- 适配 ---------------- */

@media (max-width: 420px) {
  .wrap { padding: 14px 12px calc(22px + env(safe-area-inset-bottom)); }
  .brand h1 { font-size: 25px; }
  .logo { width: 38px; height: 38px; line-height: 38px; font-size: 20px; border-radius: 10px; }
  .pill, .lang-pill { height: 34px; }
  .stat b { font-size: 20px; }
  .trx-balance b { font-size: 23px; }
  .tray-slots { gap: 5px; }
  .slot-tile { font-size: 18px; }
  .prop .name { font-size: 12px; }
}

@media (max-width: 350px) {
  .stats { gap: 6px; }
  .stat { padding: 8px 4px 9px; }
  .stat b { font-size: 18px; }
  .stat span { font-size: 10px; }
}

/* 阿拉伯语等 RTL 语言：棋盘与徽标保持位置，仅文字方向跟随 */
[dir="rtl"] .brand p { direction: rtl; }

/* ---------------- 会员入口 / 注册登录弹窗 ---------------- */

.auth-pill {
  gap: 6px;
  padding: 0 12px;
  font-weight: 700;
  color: #14664a;
}

.auth-pill .auth-ico { font-size: 14px; line-height: 1; }
.auth-pill .auth-label { font-size: 13px; white-space: nowrap; }
.auth-pill.is-on { background: linear-gradient(180deg, #e6f8ef, #cfefdd); border-color: #9ed6b7; }

.m-sheet {
  max-width: 400px;
  text-align: left;
}

.m-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.m-head h2 { margin: 0; }

.m-close {
  appearance: none;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: #eef3ea;
  color: #5d7d6c;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.m-close:hover { background: #e2ebdc; }

.m-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #f0f5ec;
}

.m-tab {
  flex: 1;
  appearance: none;
  padding: 8px 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #6d8b7b;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.m-tab.on {
  background: #ffffff;
  color: #123a2b;
  box-shadow: 0 2px 6px -2px rgba(18, 58, 43, .28);
}

.m-field { display: block; margin-bottom: 10px; }
.m-field[hidden] { display: none; }

.m-field > span {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #6d8b7b;
}

.m-field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d6e4cf;
  border-radius: 11px;
  background: #f9fcf5;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.m-field input:focus {
  outline: none;
  border-color: #7fbf9f;
  background: #ffffff;
}

.m-tip {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #8aa295;
}

.m-err {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fdecea;
  color: #b3402f;
  font-size: 12px;
  line-height: 1.5;
}

.m-err[hidden] { display: none; }

#mModal .btn-main { margin-top: 12px; }
#mModal .btn-sub { margin-top: 10px; }

.m-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: #f4f9ef;
}

.m-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #3fc492, #1f9e6f);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.m-user-txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-user-txt b {
  font-size: 15px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-user-txt span { font-size: 12px; color: #7e988a; word-break: break-all; }

.m-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0 4px;
}

.m-stats > div {
  padding: 10px 8px;
  border: 1px solid #e6f0df;
  border-radius: 12px;
  background: #f8fbf4;
  text-align: center;
}

.m-stats b {
  display: block;
  font-size: 17px;
  color: #123a2b;
  font-variant-numeric: tabular-nums;
}

.m-stats span { display: block; margin-top: 2px; font-size: 11px; color: #7e988a; }

@media (max-width: 430px) {
  /* 多了一个会员入口，窄屏让工具条换行，避免挤压标题 */
  .head { flex-wrap: wrap; }
  .tools { width: 100%; justify-content: flex-end; gap: 6px; }
  /* 320~360 宽的机型上语言选择框是最宽的一项，收紧内边距让五个按钮排在一行 */
  .lang-pill {
    max-width: 118px;
    padding: 0 22px 0 8px;
    background-position: right 8px center;
  }
  .auth-pill { padding: 0 9px; }
  .auth-pill .auth-label { font-size: 12px; }
}

@media (max-width: 340px) {
  /* 极窄屏只保留图标，保证五个按钮仍在一行 */
  .auth-pill { padding: 0 10px; }
  .auth-pill .auth-label { display: none; }
}
