:root {
  --bg: #eef0f3;
  --panel: rgba(255, 255, 255, 0.94);
  --solid: #ffffff;
  --line: rgba(17, 24, 39, 0.08);
  --line2: rgba(17, 24, 39, 0.14);
  --text: #16181d;
  --muted: #6b7280;
  --accent: #12876f;
  --accent-dim: #0d6b58;
  --gold: #b45309;
  --bad: #c53030;
  --good: #18794e;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body { touch-action: auto; }

#app { position: fixed; inset: 0; }

#world {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: default;
}

/* 鼠标悬停框：独立 DOM 层，直接跟随指针，不经过画布重绘 */
#hover-ring {
  position: absolute;
  left: 0;
  top: 0;
  display: none;
  pointer-events: none;
  z-index: 6;
  box-shadow: 0 0 0 1px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.85);
  will-change: transform;
}

/* ---------------- 顶栏 ---------------- */

#topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(7px + env(safe-area-inset-top)) 12px 7px;
  background: var(--solid);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
  z-index: 15;
  user-select: none;
}
#topbar > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 7px; min-width: 0; }
.logo { display: block; width: 18px; height: 18px; }
.brand-name { font-weight: 600; font-size: 13px; letter-spacing: 0.01em; white-space: nowrap; }

.scorebox {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--solid);
  border: 1px solid var(--line2);
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  position: relative;
}
.score-label { font-size: 11px; color: var(--muted); }
#score {
  font-size: 18px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-feature-settings: "tnum";
}
.delta {
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  transform: translateY(2px);
}
.delta.show { opacity: 1; transform: translateY(0); }
.delta.plus { color: var(--good); }
.delta.minus { color: var(--bad); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------- 按钮 ---------------- */

.btn {
  appearance: none;
  border: 1px solid var(--line2);
  background: var(--solid);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
  touch-action: manipulation;
}
.btn:hover { background: #f7f8f9; border-color: rgba(17, 24, 39, 0.22); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid rgba(18, 135, 111, 0.45); outline-offset: 1px; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: rgba(17, 24, 39, 0.05); color: var(--text); }
.btn.primary { background: #16181d; border-color: #16181d; color: #fff; }
.btn.primary:hover { background: #272a31; border-color: #272a31; }
.btn.wide { width: 100%; padding: 10px; font-size: 14px; }
.btn.icon { padding: 5px 9px; font-size: 15px; line-height: 1; color: var(--muted); }
.btn.tiny { padding: 3px 8px; font-size: 11px; border-radius: 7px; }
.btn.danger { color: var(--bad); }

.userchip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 11px;
  border-radius: 999px;
  background: var(--solid);
  border: 1px solid var(--line2);
}
#myname { font-size: 12px; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#statusbar {
  position: absolute;
  top: calc(50px + env(safe-area-inset-top));
  left: 12px;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  background: var(--panel);
  backdrop-filter: blur(8px);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  z-index: 12;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  cursor: default;
  user-select: none;
}
#statusbar .sep { opacity: 0.45; }
/* 缩放开关就长在状态气泡里：点「近 / 中 / 远」循环换档 */
.zoom-chip {
  pointer-events: auto;
  border: 0;
  background: rgba(18, 135, 111, 0.10);
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.5;
  padding: 0 8px;
  margin: -1px 0;
  border-radius: 999px;
  cursor: pointer;
}
.zoom-chip:hover { background: rgba(18, 135, 111, 0.18); }
.zoom-chip:focus-visible { outline: 2px solid rgba(18, 135, 111, 0.45); outline-offset: 1px; }

/* ---------------- 小地图 ---------------- */

.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

#minimap {
  position: absolute;
  right: 12px;
  bottom: calc(46px + env(safe-area-inset-bottom));
  width: clamp(240px, 28vw, 400px);
  z-index: 20;
  user-select: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px 7px 11px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.mini-actions { display: flex; gap: 4px; }

/* 标题栏：左边是「旗子格子」按钮（按下进入选色），中间是玩家 id，右边放大地图。
   这里不留分隔线 —— 旗子格子下面不要横杠。 */
#minimap-head {
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 0;
  gap: 7px;
  padding: 6px 7px;
}

/* 经典扫雷格子造型的按钮：格子本身由画布按雷面的同一套比例画出来 */
.flag-cell {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  /* 标题栏是白底：给格子垫一圈淡描边，白色高光才不会和背景糊在一起 */
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.12);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.flag-cell canvas { display: block; width: 100%; height: 100%; }
.flag-cell:hover canvas { filter: brightness(0.97); }
.flag-cell:active canvas { transform: translateY(1px); }
.flag-cell:focus-visible { outline: 2px solid rgba(18, 135, 111, 0.45); outline-offset: 1px; }

.mini-user {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}
#mini-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-id {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#minimap-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 320 / 148;
  cursor: default;
  background: #eceef0;
  touch-action: none;
}

.info-line {
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  border-top: 1px solid var(--line);
  min-height: 44px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  cursor: default;
  user-select: none;
}
.info-line b { color: var(--text); font-weight: 600; }
.info-line .pos { color: var(--text); font-weight: 600; white-space: nowrap; }
.info-line .cell-thumb {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: -5px;
  border-radius: 3px;
  background: #c0c0c0;
}

/* ---------------- 旗子颜色 ---------------- */

.flag-card { width: min(380px, 100%); padding-bottom: 16px; }
.flag-card .panel-head { padding: 12px 16px; font-size: 14px; }
.flag-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  padding: 14px 16px 10px;
}
/* 每个选项就是一颗和标题栏一样的小格子按钮，不带文字 */
.flag-swatch {
  appearance: none;
  aspect-ratio: 1 / 1;
  padding: 2px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.12);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, box-shadow 0.15s;
}
.flag-swatch canvas { display: block; width: 100%; height: 100%; }
.flag-swatch:hover { background: rgba(17, 24, 39, 0.04); }
.flag-swatch:active canvas { transform: translateY(1px); }
.flag-swatch.active {
  box-shadow: 0 0 0 2px rgba(18, 135, 111, 0.7);
  background: rgba(18, 135, 111, 0.07);
}


/* ---------------- 底部提示 ---------------- */

#hintbar {
  position: absolute;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  gap: 13px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  z-index: 12;
  max-width: calc(100vw - 20px);
  overflow-x: auto;
  scrollbar-width: none;
  cursor: default;
  user-select: none;
}
#hintbar::-webkit-scrollbar { display: none; }
#hintbar kbd {
  font-family: inherit;
  background: rgba(17, 24, 39, 0.06);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  font-size: 10px;
  color: #3f4652;
}

/* ---------------- Toast ---------------- */

#toasts {
  position: absolute;
  top: 94px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 60;
  pointer-events: none;
}
.toast {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--solid);
  border: 1px solid var(--line2);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  animation: toast-in 0.18s ease both;
}
.toast.plus { color: var(--good); }
.toast.minus { color: var(--bad); }
.toast.info { color: var(--text); font-weight: 500; }
.toast.out { animation: toast-out 0.25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ---------------- 弹层 ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.28);
  backdrop-filter: blur(4px);
}
.overlay.hidden, .hidden { display: none !important; }

.card {
  background: var(--solid);
  border: 1px solid var(--line2);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
  max-height: 92vh;
  overflow: auto;
}

.login-card { width: min(380px, 100%); padding: 26px 22px 20px; }
.login-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.title-icon { flex: none; border-radius: 4px; }

.auth-tabs { margin-bottom: 14px; }

.tabs { display: flex; gap: 3px; background: #f1f2f4; border-radius: 10px; padding: 3px; }
.tab {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--solid); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }

.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input, .inline input {
  width: 100%;
  background: var(--solid);
  border: 1px solid var(--line2);
  border-radius: 10px;
  color: var(--text);
  padding: 9px 11px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .inline input:focus {
  border-color: rgba(18, 135, 111, 0.65);
  box-shadow: 0 0 0 3px rgba(18, 135, 111, 0.12);
}
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--bad); font-size: 12px; }
.form-error.form-ok { color: var(--good); }
.field-note { font-weight: 400; color: var(--muted); font-size: 11px; }
.auth-links { display: flex; justify-content: center; margin-top: 2px; }
.link-btn {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 4px 6px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent); }

/* ---------------- 大地图 ---------------- */

.bigmap-card { width: min(1180px, 94vw); padding-bottom: 4px; }
.bigmap-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px 2px;
}
.coord-inputs { display: flex; gap: 8px; }
.coord-inputs label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.coord-inputs input {
  width: 92px;
  padding: 5px 7px;
  font-family: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: var(--solid);
  border: 1px solid var(--line2);
  border-radius: 7px;
  color: var(--text);
  outline: none;
}
.coord-inputs input:focus {
  border-color: rgba(18, 135, 111, 0.65);
  box-shadow: 0 0 0 3px rgba(18, 135, 111, 0.12);
}
.bigmap-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.bigmap-hint { padding: 4px 14px 8px; font-size: 11px; }
#bigmap-canvas {
  display: block;
  width: 100%;
  height: min(72vh, 56vw);
  margin: 8px auto 0;
  cursor: default;
  border: 1px solid var(--line2);
  border-radius: 6px;
  touch-action: none;
}

/* ---------------- 排行榜 ---------------- */

.board-card { width: min(560px, 100%); padding-bottom: 14px; }
.board-card .panel-head { padding: 12px 16px; font-size: 14px; }
#board-tabs { margin: 0 16px 14px; }
.board-me {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
}
.board-me-main { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.board-me-name { font-size: 17px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.board-me-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(18, 135, 111, 0.10);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
}
.board-me-rank { font-size: 12px; font-weight: 600; color: var(--muted); }
.board-me-sub { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; padding: 0 16px; margin-bottom: 12px; }
.total-card { background: #f8f9fa; border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.total-card .k { font-size: 10px; color: var(--muted); }
.total-card .v { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.total-card .v.good { color: var(--good); }
.total-card .v.bad { color: var(--bad); }
.total-card.online { background: rgba(18, 135, 111, 0.07); border-color: rgba(18, 135, 111, 0.22); }
.total-card.online .v { color: var(--accent); }

/* 总榜里“我的累计”：和上面的全服累计共用同一套五列网格，位置逐张对齐 */
.mine-panel {
  margin: 0 0 12px;
  padding: 0 16px;
}
.mine-panel .mine-title { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.mine-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; }
.mine-item {
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
}
.mine-item .k { font-size: 10px; color: var(--muted); }
.mine-item .v { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; }
.mine-item .v.good { color: var(--good); }
.mine-item .v.bad { color: var(--bad); }
/* 排行榜底部：总榜里显示本人的注册信息 */
.board-foot { padding: 10px 16px 4px; font-size: 11px; color: var(--muted); display: grid; gap: 5px; }
.board-foot:empty { padding: 0; height: 0; }
.board-foot .foot-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed var(--line2);
  padding-top: 5px;
}
.board-foot .foot-row b { font-weight: 600; color: var(--text); word-break: break-all; text-align: right; }
/* 总榜右下角的群入口：点一下复制群号 */
.board-qq-row { display: flex; justify-content: flex-end; padding: 8px 16px 0; }
.board-qq {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f9fa;
  font: inherit;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.board-qq b {
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.board-qq:hover { color: var(--accent); border-color: rgba(18, 135, 111, 0.35); background: rgba(18, 135, 111, 0.06); }
.board-qq:hover b { color: var(--accent); }
.board-qq:focus-visible { outline: 2px solid rgba(18, 135, 111, 0.45); outline-offset: 1px; }
.board-qq:active { transform: translateY(1px); }

.table-wrap { overflow: auto; padding: 0 16px; }
.board-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.board-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--solid);
}
.board-table td { padding: 8px 10px; border-bottom: 1px solid #f1f2f4; }
.board-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.board-table tbody tr:hover { background: #f8fafb; }
.board-table .rank { color: var(--muted); width: 34px; }
.board-table .me { color: var(--accent); font-weight: 700; }
.board-table .top1 { color: var(--gold); font-weight: 700; }
.board-card .table-wrap { margin-top: 2px; }
.muted { color: var(--muted); font-size: 11px; padding: 8px 16px 0; }

.admin-card { width: min(1060px, 100%); padding-bottom: 14px; }
.admin-tools { padding: 12px 16px 4px; }
.admin-tools .admin-search input { width: 200px; }
.admin-note { padding: 6px 0 0; font-size: 11px; line-height: 1.6; }
.admin-note kbd { font-size: 10px; }
.inline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.inline input { width: 90px; padding: 6px 8px; font-size: 13px; }
.admin-table th, .admin-table td { padding: 6px 8px; }
.admin-table td { white-space: nowrap; }
.acts-cell { display: flex; gap: 4px; align-items: center; }
.acts { display: flex; gap: 4px; align-items: center; }
.mobile-acts { display: none; margin-top: 6px; }
.admin-nearest b { color: var(--text); font-variant-numeric: tabular-nums; }
.act-select {
  background: var(--solid);
  color: var(--text);
  border: 1px solid var(--line2);
  border-radius: 7px;
  padding: 3px 4px;
  font-family: inherit;
  font-size: 11px;
  max-width: 112px;
}
.mobile-sub { display: none; font-size: 10px; color: var(--muted); margin-top: 2px; }
.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(18, 135, 111, 0.12);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
}

.conn-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--solid);
  border: 1px solid rgba(197, 48, 48, 0.35);
  color: var(--bad);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  z-index: 70;
  pointer-events: none;
}

/* ---------------- 重置密码页 ---------------- */

.reset-page #app {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.reset-page .login-card { width: min(360px, 100%); }
.reset-page a { color: var(--accent); }
.form-ok { color: var(--good); font-size: 12px; }

/* ---------------- 手机 ---------------- */

/* 手机 / 触屏：底部不显示操作说明条（桌面的左键 / 右键提示在手机上没意义，也压雷面） */
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  #hintbar { display: none; }
}

@media (max-width: 720px) {
  .brand-name { display: none; }
  #topbar { gap: 7px; padding-left: 8px; padding-right: 8px; }
  #score { font-size: 16px; }
  #statusbar { top: calc(46px + env(safe-area-inset-top)); left: 8px; }
  #minimap { width: min(216px, 62vw); right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); }
  #minimap .info-line { font-size: 10px; line-height: 1.45; min-height: 38px; padding: 6px 8px; }
  #minimap-head { gap: 6px; padding: 5px 6px; }
  .flag-cell { width: 26px; height: 26px; }
  .mini-user { font-size: 11px; }
  .flag-card { width: min(340px, 100%); }
  .flag-grid { gap: 6px; padding: 12px 12px 8px; }

  #bigmap-canvas { height: min(58vh, 78vw); }
  .bigmap-bar { padding: 8px 10px 2px; gap: 6px; }
  .coord-inputs input { width: 74px; font-size: 12px; }
  .bigmap-actions { margin-left: 0; gap: 4px; }
  .overlay { padding: 10px; }
  .board-card, .bigmap-card { max-height: 94vh; }
  .board-table { font-size: 11px; }
  .board-table th, .board-table td { padding: 6px 7px; }
  .totals { grid-template-columns: repeat(3, 1fr); }
  .mine-grid { grid-template-columns: repeat(3, 1fr); }
  #minimap .cell-thumb { width: 18px; height: 18px; vertical-align: -4px; }
  .login-card { padding: 22px 18px 16px; }
  .admin-table .hide-sm { display: none; }
  .admin-table .acts-col { display: none; }
  .mobile-sub { display: block; }
  .mobile-acts { display: block; }
  .act-select { max-width: 88px; font-size: 10px; }
}

/* 窄桌面：先收起 ID / 注册日期，再加收邮箱，保证右侧「执行」不被裁掉 */
@media (max-width: 980px) {
  .admin-table .hide-md { display: none; }
}

@media (max-width: 820px) {
  .admin-table .hide-lg { display: none; }
}

@media (max-width: 480px) {
  .userchip { padding: 2px 3px 2px 8px; }
  #myname { max-width: 60px; font-size: 11px; }
  .btn { padding: 5px 9px; font-size: 11px; }
}

/* 管理后台分页条 */
.admin-page {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 0;
  font-size: 11px;
}
.admin-page:empty { padding: 0; }
.admin-page .muted { padding: 0; }
.admin-page-btns { display: flex; gap: 6px; }
.admin-page .btn[disabled] { opacity: 0.45; cursor: default; }
