:root {
  --brand: #0e5fd6;
  --good: #15803d;
  --bad: #dc2626;
  --bg: #0f172a;
  --card: #ffffff;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  overscroll-behavior: none;
}

#map { position: fixed; inset: 0; z-index: 0; }

/* ---------------------------------------------------------------- 顶栏 */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  backdrop-filter: blur(6px);
  font-size: 13px;
  /* 必须高于地图上的定位按钮（.mapbtn z-index:22），否则菜单弹层会被它盖住 */
  z-index: 30;
}
#brand {
  /* logo 图片：比状态栏高，向下压出状态栏（但不能往上顶出屏幕，否则会被裁） */
  position: absolute;
  left: 6px; top: 1px;
  height: 56px; width: auto;
  z-index: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  /* 可点：点一下缩到最小缩放看全图（老爷 2026-11-07）；必须开指针事件，否则点不到 */
  pointer-events: auto;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}
#brand:hover { filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.65)); }
#brand:active { transform: scale(0.95); }
#brand:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }
#topbar { padding-left: 80px; }   /* 给 logo 留出位置，别压到金钱/骰子 chip */
/* 英文 logo（Éire Landlord）更宽更像徽章：给大一点点，同时限宽防压顶栏按钮 */
#brand.en { max-width: 46vw; }        /* 尺寸跟中文 logo 完全一致（56px） */
.login-logo.en { height: 150px; }
@media (min-width: 720px) {
  #brand { height: 66px; left: 8px; }
  /* 宽屏空间够，顶栏按钮别被 96px 截断（「🌐 语言：中文」要完整显示） */
  #topbar .chip.ghost { max-width: 220px; }
  #brand.en { max-width: 30vw; }        /* 桌面同样跟中文一致（66px） */
  #topbar { padding-left: 96px; }
  #topbar:has(#brand.en) { padding-left: 112px; }
}
.spacer { flex: 1; }
.chip {
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: inherit;
}
.chip.ghost { cursor: pointer; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { font-size: 16px; line-height: 1; padding: 4px 11px; position: relative; }
.menu-btn.alert::after {
  content: ""; position: absolute; top: 3px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%; background: #ef4444;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.92);
}
/* 汉堡菜单弹层 */
.menupop {
  position: absolute; top: 44px; right: 8px;
  min-width: 172px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  z-index: 32;
}
.menupop button {
  display: block; width: 100%;
  padding: 11px 12px;
  background: none; border: 0; border-radius: 8px;
  color: #0f172a; font-size: 14px; font-family: inherit;
  text-align: left; cursor: pointer; white-space: nowrap;
}
.menupop button:hover { background: #f1f5f9; }
.menupop button:active { background: #e2e8f0; }

/* ------------------------------------------------------------- 飘字提示 */
#toast {
  position: fixed;
  top: 96px; left: 50%;
  transform: translate(-50%, -12px);
  z-index: 40;
  max-width: 92vw;
  padding: 10px 14px;
  border-radius: 12px;
  /* 跟状态栏 #topbar 同一口径（老爷 2026-11-12：要半透明、颜色别换） */
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.good { background: rgba(22, 163, 74, 0.96); }
#toast.bad { background: rgba(220, 38, 38, 0.96); }
#toast.warn { background: rgba(217, 119, 6, 0.96); }
/* 通知类飘字：停留 8 秒，可点掉，宽一点好读 */
#toast.notify {
  background: rgba(15, 23, 42, 0.85);   /* 和状态栏同一口径 */
  backdrop-filter: blur(6px);
  border: none;
  max-width: min(92vw, 520px);
  font-size: 13.5px;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;      /* 只有通知类飘字可点（点了就关），普通飘字仍然穿透 */
}

/* ------------------------------------------------------------- 底部面板 */
#panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
  max-height: 62vh;
  display: flex;
  flex-direction: column;
}
/* 折叠把手：absolute 在抬头里（老爷：以前用 fixed + JS 算坐标，卡片一换高度它就到处跑） */
#panelToggle {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 1;
  width: 46px; height: 28px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
#panelHead { position: relative; padding: 12px 64px 6px 14px; }
#where { font-size: 17px; font-weight: 700; }
#whereSub { font-size: 12px; color: var(--muted); margin-top: 3px; }
#panelBody { padding: 6px 14px 18px; overflow-y: auto; }
#panel.collapsed #panelBody { display: none; }

.row-title { font-size: 12px; color: var(--muted); margin: 10px 0 6px; font-weight: 600; }

/* 回到我的棋子（替代原来的定位按钮） */
.mapbtn {
  position: fixed;
  right: 10px;
  top: 58px;
  z-index: 22;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.mapbtn.hidden { display: none; }
.mapbtn:active { background: #eef2f7; }

/* 按钮 */
button.primary, button.secondary {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
}
button.primary { background: var(--brand); color: #fff; }
button.primary:disabled { background: #c7d2e5; cursor: default; }
button.primary.big { padding: 14px; font-size: 15px; }
button.primary.buy { background: var(--good); }
button.primary.rent { background: #0d9488; }
button.primary small, button.secondary small { font-weight: 500; font-size: 11.5px; opacity: 0.92; }
.stepbtn .yl { color: #0f766e; }
button.secondary { background: #f1f5f9; color: #334155; }
button.link {
  background: none; border: 0; color: var(--muted);
  font-size: 12.5px; text-decoration: underline; margin-top: 10px; cursor: pointer;
  font-family: inherit;
}

/* 方向按钮 */
.steps { display: flex; flex-direction: column; gap: 7px; }
.stepbtn {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 8px;
  align-items: center;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 11px;
  cursor: pointer;
  font-family: inherit;
}
.stepbtn:active { background: #eef2f7; }
.stepbtn .dir {
  grid-row: span 2;
  font-size: 19px;
  text-align: center;
  color: var(--brand);
  font-weight: 700;
}
.stepbtn .nm { font-size: 14px; font-weight: 600; }
.stepbtn .meta { font-size: 11.5px; color: var(--muted); }
.stepbtn .own { font-weight: 600; }
.stepbtn .free { color: var(--good); }
.stepbtn .rent { color: var(--bad); margin-left: 4px; }

.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.prog { font-size: 12.5px; color: #7c3aed; margin-top: 8px; }
.stats { display: flex; gap: 16px; font-size: 13px; margin-top: 12px; color: #334155; }

#log { margin-top: 12px; }
.logrow {
  font-size: 12.5px;
  color: #334155;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.logrow .t { color: #9ca3af; margin-right: 5px; }
.logrow.rent_in, .logrow.block { color: var(--good); }
.logrow.rent_out, .logrow.broken { color: var(--bad); }

/* ---------------------------------------------------------------- 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal.hidden { display: none; }
/* 从「账号」里弹出的二级弹窗，要盖在账号弹窗上面 */
#emailModal, #pwChangeModal, #nameModal { z-index: 70; }
/* 通用隐藏：任何元素加上 hidden 都必须真的看不见
   （踩过的坑：#paletteBox 用 class="palette hidden"，但只定义了 .modal.hidden，
     结果 class 加上了、面板照样显示，测试只查 class 存在也漏过去了） */
.hidden { display: none !important; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
}
.modal-box h1 { font-size: 20px; margin: 0 0 4px; }
/* 登录弹窗用 logo 代替标题：居中、比弹窗宽一点，向上顶出弹窗（老爷要求） */
.modal-box .login-logo-wrap {
  display: flex; justify-content: center; align-items: center;
  margin: -78px 0 10px;       /* 负上边距 = 让 logo 顶出弹窗顶边 */
}
.modal-box .login-logo {
  height: 150px; width: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
@media (max-width: 380px) {
  .modal-box .login-logo-wrap { margin: -64px 0 8px; }
  .modal-box .login-logo { height: 126px; }
}
/* 游客模式的「登录」按钮（顶栏）、登录弹窗里的「先随便逛逛」 */
.chip.login { background: #0e5fd6; color: #fff; border-color: #0e5fd6; font-weight: 600; }
.chip.login:hover { background: #0b4fae; }
.linkbtn {
  display: block; width: 100%; margin-top: 10px; padding: 8px 0;
  background: none; border: 0; color: #64748b; font-size: 12.5px;
  text-decoration: underline; cursor: pointer;
}
.linkbtn:hover { color: #334155; }
.modal-box h2 { font-size: 17px; margin: 0 0 10px; }
.modal-box .sub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.modal-box input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 8px;
  font-family: inherit;
}
.modal-box .msg { color: var(--bad); font-size: 12.5px; min-height: 16px; margin-top: 6px; }
.modal-box .tiny { font-size: 11px; color: #9ca3af; margin: 8px 0 0; }
.statline { font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
/* 「我的颜色」这一行：色值在左，「选颜色」按钮靠右（跟「退出登录」同款灰按钮） */
.statline.colorline { display: flex; align-items: center; gap: 8px; }
#btnPickColor {
  margin-left: auto; width: auto; display: inline-block;
  padding: 6px 12px; font-size: 12px; border-radius: 8px; border: 0;
  background: #f1f5f9; color: #334155;
  font-family: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
}
#btnPickColor:active { background: #e2e8f0; }

/* 抢购出价 */
.bidrow { display: flex; gap: 8px; margin-top: 8px; }
.bidrow input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}
.bidrow button { width: auto; margin-top: 0; padding: 10px 18px; }

/* 我的产业列表 */
.assets-body { max-height: 62vh; overflow-y: auto; overflow-x: hidden; margin: 6px 0 12px; }
.asset-group { font-size: 12px; color: var(--muted); font-weight: 700; margin: 12px 0 6px; }
/* 每行两段式：上行「街名 …… 价格」，下行小字信息；只有交易按钮才另起一行
   —— 这样手机上永远不用左右移动 */
.asset-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  margin-bottom: 6px;
  cursor: pointer;
  font-family: inherit;
  overflow: hidden;
}
.asset-item:active { background: #eef2f7; }
.asset-item .ai-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.asset-item .ai-top .an {
  font-size: 13.5px; font-weight: 700; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.asset-item .ai-top .ap { font-size: 12px; color: var(--muted); white-space: nowrap; }
.asset-item .ai-sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px;
  font-size: 11.5px; color: #64748b;
}
.asset-item .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.asset-item .an { flex: 1; font-size: 13.5px; font-weight: 600; }
.asset-item .ap { font-size: 12px; color: var(--muted); }
.asset-item .af { font-size: 11px; color: var(--good); }
.asset-item .awarn { font-size: 11px; color: var(--bad); font-weight: 700; }
.asset-item .ah { font-size: 11px; font-weight: 700; color: #92400e; }
.asset-item .abuild {
  font-size: 11.5px; font-weight: 700; color: #fff; background: #0f766e;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap;
}
.asset-item .abuild:active { background: #0b5d57; }
.asset-item .asell { font-size: 11.5px; font-weight: 700; color: #b91c1c; background: #fee2e2; padding: 5px 9px; border-radius: 8px; white-space: nowrap; }
.asset-item .asell:active { background: #fecaca; }
.asset-item .alist { font-size: 11.5px; font-weight: 700; color: #fff; background: #7c3aed; padding: 5px 9px; border-radius: 8px; white-space: nowrap; }
.asset-item .alist.off { background: #ede9fe; color: #6d28d9; }
.asset-item .alist:active { filter: brightness(0.92); }
.asset-item .aring { font-size: 11px; font-weight: 700; color: #fff; background: #6d28d9; padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
/* 账号面板里的取色器 / 自定义色板 */
.palette {
  margin-top: 8px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #f8fafc;
}
.palette-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0;
}
.sw.on { box-shadow: 0 0 0 2px #0f172a; }
.palette-custom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line);
}
.palette-custom .plabel { font-size: 12px; color: var(--muted); }
.palette-custom input[type="color"] {
  width: 40px; height: 30px; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; cursor: pointer;
}
.palette-custom input[type="text"] {
  width: 92px; padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--line);
  border-radius: 7px; font-family: ui-monospace, Consolas, monospace; color: #0f172a;
}
.palette .phint { font-size: 11.5px; color: var(--muted); margin-top: 7px; }
button.mini {
  width: auto; font-size: 12px; padding: 6px 11px; border-radius: 7px;
  margin: 0; display: inline-block; font-family: inherit; font-weight: 600;
}
button.mini.primary { background: linear-gradient(180deg, #2b7fff, #0e5fd6); color: #fff; }
button.mini.ghost { background: #e2e8f0; color: #1e293b; }
button.sell { background: linear-gradient(180deg, #b91c1c, #991b1b); color: #fff; }
button.sell small { color: rgba(255, 255, 255, 0.88); }
button.build { background: linear-gradient(180deg, #0f766e, #0b5d57); color: #fff; }
button.build small { color: rgba(255, 255, 255, 0.88); }
.modal-box.wide { max-width: 420px; }
.logrow.offer_in, .logrow.seize_lost, .logrow.broken { color: var(--bad); }
.logrow.offer_out, .logrow.offer_blocked, .logrow.offer_failed { color: #7c3aed; }
.logrow.fortify { color: var(--good); }
.chip.alert { background: rgba(220, 38, 38, 0.9); color: #fff; }
/* 通知列表 */
.notify-item { font-size: 12.5px; padding: 7px 2px; border-bottom: 1px dashed var(--line); line-height: 1.5;
  display: flex; align-items: flex-start; gap: 6px; }
.notify-item .nt { float: none; color: var(--muted); font-size: 11px; white-space: nowrap; }

/* 地图弹窗 */
.pop { font-size: 13px; min-width: 160px; }
.pop-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pop-row { margin: 2px 0; }
.pop-row.tiny { color: #6b7280; font-size: 11.5px; }
/* 街卡里的玩家买卖（挂牌 / 报价） */
.pop-sect { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); }
.pop-sect:empty { display: none; }
.tr-title { font-size: 12px; font-weight: 700; color: #6d28d9; margin-bottom: 3px; }
.tr-row { margin: 2px 0; }
.tr-row.tiny { color: #6b7280; font-size: 11.5px; }
.mini {
  width: auto; margin-top: 0; margin-left: 6px; padding: 5px 10px;
  font-size: 12px; border-radius: 8px; background: #7c3aed; color: #fff;
  border: 0; font-family: inherit; font-weight: 600; cursor: pointer;
}
.mini.ghost { background: #ede9fe; color: #6d28d9; }
.mini:active { filter: brightness(0.92); }

.fatal {
  position: fixed; inset: auto 12px 12px 12px; z-index: 99;
  background: var(--bad); color: #fff; padding: 12px;
  border-radius: 10px; font-size: 13px;
}

@media (min-width: 720px) {
  #panel { left: 12px; right: auto; width: 380px; bottom: 12px; border-radius: 16px; max-height: 74vh; }
  #topbar { padding: 10px 14px; }
}

/* 手机：底部弹窗 → 左侧抽屉，宽度 60%（老爷要求：面积别那么大、位置挪到左边） */
@media (max-width: 719px) {
  #panel {
    left: 0; right: auto;
    top: auto; bottom: 0;                     /* 左下角（老爷要求） */
    width: min(60vw, 300px);
    max-height: 66vh;
    border-radius: 0 16px 0 0;
    box-shadow: 6px -8px 26px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease;
  }
  #panel.collapsed { transform: none; }                  /* 收起 = 往下缩成一行（不再滑出屏幕） */
  #panel.collapsed #panelBody { display: none; }
  #panel.collapsed #panelHead { padding-bottom: 10px; }
  #panel.collapsed #where { font-size: 15px; }
  #panelHead { padding: 14px 58px 6px 12px; }
  #where { font-size: 15.5px; line-height: 1.3; word-break: break-word; }
  #panelBody { padding: 4px 12px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  /* 把手：absolute 在抬头里，永远贴卡片右上角（不再跟着卡片高度乱跑） */
  #panelToggle {
    width: 44px; height: 26px;
    font-size: 14px;
    right: 8px; top: 6px;
  }
}

/* ------------------------------------------------ 撒金币特效（纯 CSS，无素材） */
#fxLayer {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden;
}
.coin {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #fffbe0 0%, #ffe066 32%, #f2c032 62%, #a9761a 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(80, 50, 0, 0.35);
  animation: coinFly 1.25s cubic-bezier(0.17, 0.72, 0.28, 1) forwards;
  animation-delay: var(--d, 0ms);
  will-change: transform, opacity;
}
/* 金币上的小方孔，一眼看出是金币 */
.coin::after {
  content: ""; position: absolute; inset: 34%; border-radius: 3px;
  background: rgba(120, 78, 10, 0.55);
}
@keyframes coinFly {
  0%   { transform: translate(0, 0) scale(0.35) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  62%  { opacity: 1; }
  100% { transform: translate(var(--tx, 0), calc(var(--ty, 0) + 170px)) scale(0.95) rotate(var(--r, 180deg)); opacity: 0; }
}
/* 一声"叮"的金光：从中心扩散一圈 */
.coinBurstRing {
  position: absolute; width: 70px; height: 70px; margin: -35px 0 0 -35px;
  border-radius: 50%; border: 3px solid rgba(255, 214, 82, 0.95);
  animation: coinRing 0.7s ease-out forwards;
}
@keyframes coinRing {
  0% { transform: scale(0.25); opacity: 0.95; }
  100% { transform: scale(3.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .coin, .coinBurstRing { display: none; }
}

/* --------------------------------------------------- 右下角的骰子（点一下=掷骰子） */
.dicewrap {
  position: fixed; right: 16px; bottom: 96px; z-index: 24;
  width: 52px; height: 52px;
}
.dicemode {
  position: absolute; left: 50%; bottom: calc(100% + 16px); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 2px; border-radius: 999px;
  background: rgba(15, 23, 42, .8); box-shadow: 0 2px 8px rgba(0,0,0,.3); z-index: 3;
}
.dicemode button {
  border: 0; background: none; color: #cbd5e1; cursor: pointer;
  font: 700 11.5px/1 inherit; padding: 4px 7px; border-radius: 999px;
}
.dicemode button.on { background: #0e5fd6; color: #fff; }
.dicemode button:disabled { opacity: .5; cursor: default; }
.dicewrap.flying .dicemode { opacity: 0; pointer-events: none; }   /* 掷的时候别跟着飞 */

/* 两颗骰子：各自一个定位槽，旋转只作用在里面的 .cube 上（不打架） */
.dslot { position: absolute; inset: 0; transition: transform .3s cubic-bezier(.22,1.1,.36,1), opacity .25s; }
.dslot2 { opacity: 0; transform: translate(-26px, 10px) scale(.56); }
.dicewrap.two .dslot2 { opacity: .9; }
/* 只有 ×2 时才把两颗分开；×1 必须保持一颗、而且居中 */
.dicewrap.flying.two #dslot1 { transform: translate(-24px, -2px); }   /* 注意是 id，不是 class（有点重叠更自然） */
.dicewrap.flying.two .dslot2 { opacity: 1; transform: translate(24px, 10px); }
.dicewrap.flying:not(.two) #dslot2 { opacity: 0; }
.dicewrap.double .dicebtn { animation: diceDouble .5s ease-out 2; }
@keyframes diceDouble {
  0%, 100% { filter: drop-shadow(0 6px 10px rgba(15,23,42,.35)); }
  50% { filter: drop-shadow(0 0 18px rgba(250, 204, 21, .95)); }
}
#diceSum {
  position: fixed; left: 50%; top: 57%; transform: translate(-50%, 0) scale(.92);
  z-index: 41; background: rgba(15, 23, 42, .88); color: #fff; border-radius: 12px;
  padding: 9px 15px; font: 700 16px/1.2 -apple-system,"Segoe UI","PingFang SC",sans-serif;
  opacity: 0; transition: opacity .22s, transform .22s; pointer-events: none; white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
#diceSum.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.dicebtn {
  background: none; border: 0; padding: 0; cursor: pointer; position: relative;
  width: 52px; height: 52px; display: block;
  transition: transform .42s cubic-bezier(.22, 1.15, .36, 1);
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, .35));
}
.dicebtn.flying { transform: translate(var(--dx, 0), var(--dy, 0)) scale(2.3); z-index: 40; }
/* 弹出来的时候必须**完全不透明**（不能因为"本回合不能掷"的灰化样式而发虚） */
.dicebtn:disabled { cursor: default; }
.dicebtn:disabled:not(.flying) { filter: drop-shadow(0 6px 10px rgba(15,23,42,.2)) grayscale(.55); opacity: .75; }
.dicebtn.flying {
  opacity: 1;
  filter: drop-shadow(0 14px 22px rgba(15, 23, 42, .45));
}
.dicebtn.tap { animation: diceTap 1.4s ease-in-out infinite; }
@keyframes diceTap {
  0%, 100% { filter: drop-shadow(0 6px 10px rgba(15, 23, 42, .35)); }
  50% { filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .28)) drop-shadow(0 0 10px rgba(250, 204, 21, .8)); }
}
.dicecount {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  border-radius: 10px; background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
  padding: 1px 6px; box-shadow: 0 2px 6px rgba(15, 23, 42, .3);
}
.dicecount.empty { background: #94a3b8; }

/* 立方体：6 个面 + 9 宫格点数，全 CSS 画（无图片素材） */
.dicewrap .cube {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transform: rotateX(0deg) rotateY(0deg);
  transition: transform .95s cubic-bezier(.25, .9, .3, 1);
}
.dicewrap .face {
  position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(150deg, #ffffff, #eef2f7);
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 0 9px rgba(15, 23, 42, .12);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  padding: 13%; gap: 6%; backface-visibility: hidden;
}
.dicewrap .pip { border-radius: 50%; background: #0f172a; box-shadow: inset 0 -1px 1px rgba(255,255,255,.3); }
.dicewrap .pip.off { background: transparent; box-shadow: none; }
.dicewrap .f1 { transform: translateZ(26px) scale(1.08); }
.dicewrap .f6 { transform: rotateY(180deg) translateZ(26px) scale(1.08); }
.dicewrap .f2 { transform: rotateY(90deg) translateZ(26px) scale(1.08); }
.dicewrap .f5 { transform: rotateY(-90deg) translateZ(26px) scale(1.08); }
.dicewrap .f3 { transform: rotateX(90deg) translateZ(26px) scale(1.08); }
.dicewrap .f4 { transform: rotateX(-90deg) translateZ(26px) scale(1.08); }
@media (min-width: 720px) {
  .dicewrap { bottom: 72px; }
}


/* 版权控件（OpenFreeMap / OpenStreetMap）：桌面保持底图原样（收起成 ⓘ，点开两行，无动画）
 * 手机：底图那条文字完全不显示（点 ⓘ 走我们自己的底部浮层） */
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-attrib.maplibregl-compact-show {
  max-width: 56vw;
  font-size: 10.5px;
}
.maplibregl-ctrl-attrib-inner {
  white-space: normal !important;
  word-break: break-word;
  line-height: 1.4;
  max-width: 56vw;
}
/* 版权控件：收起就是一颗 ⓘ 圆钮（24×24，背景透明、没白底方块），展开是同高的白条 —— 点开不跳 */
.maplibregl-ctrl-attrib.maplibregl-compact {
  background: transparent !important;      /* 关键：否则会有一层白底方块压在按钮下面 */
  padding: 0 !important;
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  border-radius: 50% !important;
  overflow: visible !important;
}
.maplibregl-ctrl-attrib.maplibregl-compact.maplibregl-compact-show {
  display: flex !important;
  align-items: center;
  background: rgba(255, 255, 255, 0.92) !important;
  width: auto !important;
  padding: 0 24px 0 8px !important;        /* 右边留出 ⓘ 的位置 */
  border-radius: 12px !important;
}
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {
  height: 24px !important;
  line-height: 24px;
  padding: 0;
  overflow: hidden;
}
/* 手机：底图那条版权文字一律不显示，而且容器也不许「展开成白条」——
 * 否则页面刚打开时 MapLibre 会先加一次 compact-show，出现「白色横条探出来再缩回去」 */
@media (max-width: 719px) {
  .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-inner,
  .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
    display: none !important;
  }
  .maplibregl-ctrl-attrib.maplibregl-compact,
  .maplibregl-ctrl-attrib.maplibregl-compact.maplibregl-compact-show {
    width: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 50% !important;
    box-shadow: none !important;
  }
}

/* 版权浮层（手机）：底部弹出的小卡片，点空白处关闭 */
.credit-box { max-width: 420px; }
.credit-body { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 4px 0 14px; }
.credit-body a { color: #0e5fd6; }
.credit-hint { font-size: 11.5px; color: #94a3b8; text-align: center; }
@media (max-width: 719px) {
  #creditModal { align-items: flex-end; padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  #creditModal .credit-box {
    width: 100%; max-width: none;
    border-radius: 16px 16px 12px 12px;
    padding-bottom: 14px;
  }
}

/* 2026-10 老爷：加固功能先停用（藏起按钮，逻辑留着） */
#btnFortify { display: none !important; }

/* 街卡里的输入框/按钮别被挤成竖排（抢购区块 + 报价区块） */
.maplibregl-popup-content { min-width: 250px; }
#tradeBox input { min-width: 0; }
#tradeBox .mini, #tradeBox button { white-space: nowrap; flex: 0 0 auto; }

/* 手机：竞价入口收进汉堡菜单，顶栏只留金币/骰子/卡片/铃铛 */
@media (max-width: 720px) { #chipAuc { display: none !important; } }
/* 桌面有顶栏 ⚔ chip，菜单里就不重复放 */
@media (min-width: 721px) { #btnAuc { display: none !important; } }

/* 顶栏骰子：可点击，鼠标要变手型 */
#chipDice { cursor: pointer; }

/* 注册密码规则提示（实时） */
.pwhint { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 8px; }
.pwhint span { font-size: 11.5px; color: #94a3b8; border: 1px solid #e2e8f0; border-radius: 999px; padding: 1px 8px; }
.pwhint span.ok { color: #15803d; border-color: #86efac; background: #f0fdf4; }

/* 排行榜 */
.rank-row { display: grid; grid-template-columns: 34px 1fr auto; grid-auto-rows: auto;
  gap: 2px 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid #eef2f7; font-size: 13.5px; }
.rank-row .rk { font-weight: 700; color: #64748b; text-align: center; }
.rank-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .as { font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-row .st { grid-column: 2 / 4; color: #94a3b8; font-size: 11.5px; }
.rank-row.me { background: #eff6ff; border-radius: 8px; }

/* 休眠蒙层 */
.sleepveil { position: fixed; inset: 0; z-index: 55; background: rgba(8, 15, 30, 0.66);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(3px); }
.sleepveil .sleepcard { background: rgba(255,255,255,.96); border-radius: 16px; padding: 18px 26px;
  text-align: center; box-shadow: 0 12px 40px rgba(2,8,24,.45); display: flex; flex-direction: column; gap: 4px; }
.sleepveil .zzz { font-size: 30px; }
.sleepveil b { font-size: 16px; }
.sleepveil span { font-size: 12.5px; color: #64748b; }


/* ------------------------------------------------------------- 棋子（玩家小人） */
#mePiece {
  width: 42px; height: 49px;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.35));
}
#mePiece .mphop { width: 100%; height: 100%; transform-origin: 50% 100%; }
#mePiece .mphop.hop { animation: mpHop 0.52s cubic-bezier(0.34, 0.78, 0.4, 1); }
@keyframes mpHop {
  0%   { transform: translateY(0)     scale(1); }
  46%  { transform: translateY(-18px) scale(0.98, 1.02); }   /* 直接起跳，不做下蹲 */
  78%  { transform: translateY(-5px)  scale(1.01, 0.99); }
  100% { transform: translateY(0)     scale(1); }
}
/* 选棋子 */
.piecegrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 8px; }
.piecegrid button {
  background: #f8fafc; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; font-size: 10.5px; color: var(--muted);
}
.piecegrid button svg { width: 31px; height: 36px; }
.piecegrid button.on { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 700; }

/* 棋子面板：普通 / 限量 两个 tab（限量棋子只有活动能给） */
.statline.pieceline { display: flex; align-items: center; gap: 8px; }
.piecetabs { margin-left: auto; display: inline-flex; gap: 4px; }
.piecetabs .ptab {
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: #f8fafc; font-size: 11.5px; color: var(--muted); cursor: pointer;
}
.piecetabs .ptab.on { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; font-weight: 700; }
.piecegrid button { position: relative; }
.piecegrid button span { white-space: nowrap; font-size: 10px; }
.piecegrid.limited { grid-template-columns: repeat(4, 1fr); }
.piecegrid button.locked { opacity: .55; filter: grayscale(.55); }
.piecegrid button .lockico { position: absolute; right: 3px; top: 2px; font-size: 10px; font-style: normal; }
@media (max-width: 480px) { .piecegrid { grid-template-columns: repeat(4, 1fr); } }

/* 账号里补填找回邮箱 */
.statline.emailline { display: flex; align-items: center; gap: 8px; }
.statline.emailline b { font-weight: 700; }
.statline.emailline button {
  flex: 0 0 auto; height: 26px; padding: 0 12px; margin: 0;
  font-size: 12px; font-weight: 600; border-radius: 8px;
}

/* 账号弹窗：标题行 + 和「选颜色」同款的小按钮 */
.acchdr { display: flex; align-items: center; gap: 8px; }
.acchdr h2 { margin: 0; }
.pillbtn {
  width: auto; display: inline-block; margin-left: auto;
  padding: 6px 12px; font-size: 12px; border-radius: 8px; border: 0;
  background: #f1f5f9; color: #334155;
  font-family: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.pillbtn:active { background: #e2e8f0; }
.statline.emailline .pillbtn { margin-left: auto; }

/* M50 高速出口列表 */
.hwlist { max-height: 46vh; overflow: auto; margin: 4px 0 10px; }
.hwrow {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; cursor: pointer;
}
.hwrow:active { background: #eef2f7; }
.hwrow b { font-size: 13.5px; }
.hwrow small { color: var(--muted); font-size: 11.5px; }
.hwrow .fee { margin-left: auto; font-weight: 700; color: #b45309; white-space: nowrap; }

/* M50 高速出入口标记（和警局同款，换个颜色好区分） */
.ev-hw span {
  background: #0f766e !important;
  border-color: #ccfbf1 !important;
}

/* 玩家棋子永远在最上层（不被 🛣 高速 / 🚓 警局图标挡住） */
#mePiece, .maplibregl-marker:has(#mePiece) { z-index: 20 !important; }

/* 首屏（游客）先把登录态元素藏住，等 /state 确认后再决定显示 */
html.boot-guest #chipCoins, html.boot-guest #chipDice, html.boot-guest #diceWrap,
html.boot-guest #btnNotify, html.boot-guest #btnAssets, html.boot-guest #btnAccount,
html.boot-guest #btnLogout2, html.boot-guest #chipCards, html.boot-guest #chipAuc,
html.boot-guest #chipJail { display: none !important; }

/* 游客首屏：登录按钮立刻出现（不用等 /state） */
html.boot-guest #btnLoginTop { display: inline-block !important; }

/* 卡片「使用」按钮被规则挡住时：仍可点，点了会说明原因，只是变暗 */
.ev-btn.is-off { opacity: .55; }

/* 签到 7 格 */
.ck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ck-cell {
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 8px 6px;
  text-align: center; background: #f8fafc;
}
.ck-cell b { display: block; font-size: 11px; color: #64748b; font-weight: 600; }
.ck-cell .rw { font-size: 11.5px; font-weight: 800; margin-top: 4px; white-space: nowrap; }
.ck-cell .sub2 { font-size: 10.5px; color: #64748b; margin-top: 1px; white-space: nowrap; }
.ck-cell.done { background: #ecfdf5; border-color: #a7f3d0; }
.ck-cell.done .rw { color: #047857; }
.ck-cell.today { background: #eff6ff; border-color: #93c5fd; box-shadow: 0 0 0 2px #bfdbfe inset; }
.ck-cell.today .rw { color: #1d4ed8; }
.ck-cell.locked .rw { color: #94a3b8; }

/* 顶栏签到入口：手机上收进汉堡菜单（顶栏只留金币/通知/菜单） */
@media (max-width: 720px) { .ck-chip { display: none !important; } }
html.boot-guest #btnCheckin { display: none !important; }

/* 金币滚动时轻微放大，滚完回位（数字本身由 JS 逐帧插值） */
#chipCoins.rolling { transform: scale(1.06); transition: transform .18s ease-out; }

/* 金币变动浮字（+3,000 / −1,500） */
.coinFloat {
  position: fixed; transform: translate(-50%, -50%);
  font-weight: 800; font-size: 14px; letter-spacing: .3px;
  pointer-events: none; z-index: 120; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  animation: coinFloatUp 1.15s cubic-bezier(.2,.8,.3,1) forwards;
}
.coinFloat.up { color: #4ade80; }
.coinFloat.down { color: #f87171; }
@keyframes coinFloatUp {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
  14%  { opacity: 1; transform: translate(-50%, -56%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -118%) scale(1); }
}
@keyframes coinFloatDown {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
  14%  { opacity: 1; transform: translate(-50%, -44%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 22%) scale(1); }
}
.coinFloat.below { animation-name: coinFloatDown; }

/* 地图内的层级：#map 自成一层（z-index:0）→ 弹窗永远盖住棋子和图标，
   而页面上的 modal（z-index 60）又永远盖住整个地图 */
.maplibregl-popup { z-index: 30 !important; }
.maplibregl-ctrl { z-index: 25 !important; }
.maplibregl-marker { z-index: 10; }

/* 最近动态：全服动态（谁 + 做了什么） */
.logrow .who { font-weight: 700; color: #475569; }
.logrow.me .who { color: #1d4ed8; }

/* 游客面板底部：注册送金币，居中 */
.guest-hint { text-align: center; }

/* 遭遇事件：整屏遮罩 + 大卡片（和机会卡同一个视觉） */
#encModal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(8,15,30,.55); backdrop-filter: blur(2px); z-index: 9700; padding: 18px; }
#encModal.on { display: flex; }
#encModal .enc-card { width: min(84vw, 340px); background: #fff; border-radius: 22px; padding: 22px 20px 18px;
  text-align: center; box-shadow: 0 30px 70px rgba(8,15,30,.45); animation: encPop .32s cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes encPop { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#encModal .emo { font-size: 54px; line-height: 1; }
#encModal .tag { margin-top: 8px; font-size: 11px; letter-spacing: .16em; font-weight: 800; color: #94a3b8; }
#encModal h2 { margin: 6px 0 6px; font-size: 21px; color: #0f172a; }
#encModal p { margin: 0; font-size: 14px; line-height: 1.6; color: #475569; }
#encModal .amt { margin: 14px 0 4px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
#encModal .amt.good { color: #047857; }
#encModal .amt.bad { color: #b91c1c; }
#encModal .enc-ok { margin-top: 14px; width: 100%; border: 0; background: #2563eb; color: #fff;
  font-weight: 800; font-size: 15px; padding: 13px 0; border-radius: 14px; cursor: pointer; }

/* 客服反馈弹窗 */
.support-box { max-width: 420px; width: min(92vw, 420px); }

/* ---------- 管理员广播横幅 ---------- */
#noticeWrap { position: fixed; inset: 0; z-index: 58; }  /* 低于弹窗(60)，高于地图/棋子 */
#noticeWrap.hidden { display: none; }
#noticeBar {
  position: absolute; left: 10px; right: 10px; top: 54px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,58,138,.85), rgba(37,99,235,.85));  /* 老爷 2026-11-12：0.85 透明 */
  color: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.28);
  animation: noticeIn .22s ease-out;
}
@keyframes noticeIn { from { transform: translateY(-14px); opacity: 0 } to { transform: none; opacity: 1 } }
#noticeBar .ntxt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; }
#noticeBar .ntxt b { display: block; font-size: 14px; margin-bottom: 1px; }
#noticeBar .ntxt span { opacity: .92; word-break: break-word; }
/* 公告详情链接（后台 link 字段）：横幅白字底上用浅蓝，弹窗白底上用深蓝 */
.notice-link { font-weight: 700; text-decoration: underline; white-space: nowrap; }
#noticeBar .notice-link { color: #bfdbfe; display: block; margin-top: 2px; }   /* 手机上单独一行，别跟正文挤在一起 */
#nmBody .notice-link { color: #1d4ed8; }
/* 公告附带金币：横幅里金色小字、弹窗里琥珀色一行、通知列表里的小徽标 */
.ncomp { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; color: #fde68a; }
#nmBody .ncomp { margin-top: 8px; font-size: 13px; color: #b45309; }
.ncomp-badge { margin-left: 6px; font-size: 12px; font-weight: 700; color: #b45309; }
#noticeBar button {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 10px; border: 0;
  background: #fff; color: #1e3a8a; font-weight: 700; font-size: 13px; cursor: pointer;
}
@media (min-width: 900px) { #noticeBar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); } }

:root {
  --brand: #0e5fd6;
  --good: #15803d;
  --bad: #dc2626;
  --bg: #0f172a;
  --card: #ffffff;
  --line: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  overscroll-behavior: none;
}

#map { position: fixed; inset: 0; z-index: 0; }

/* ---------------------------------------------------------------- 顶栏 */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  backdrop-filter: blur(6px);
  font-size: 13px;
  /* 必须高于地图上的定位按钮（.mapbtn z-index:22），否则菜单弹层会被它盖住 */
  z-index: 30;
}
#brand {
  /* logo 图片：比状态栏高，向下压出状态栏（但不能往上顶出屏幕，否则会被裁） */
  position: absolute;
  left: 6px; top: 1px;
  height: 56px; width: auto;
  z-index: 1;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  /* 可点：点一下缩到最小缩放看全图（老爷 2026-11-07）；必须开指针事件，否则点不到 */
  pointer-events: auto;
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}
#brand:hover { filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.65)); }
#brand:active { transform: scale(0.95); }
#brand:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 8px; }
#topbar { padding-left: 80px; }   /* 给 logo 留出位置，别压到金钱/骰子 chip */
/* 英文 logo（Éire Landlord）更宽更像徽章：给大一点点，同时限宽防压顶栏按钮 */
#brand.en { max-width: 46vw; }        /* 尺寸跟中文 logo 完全一致（56px） */
.login-logo.en { height: 150px; }
@media (min-width: 720px) {
  #brand { height: 66px; left: 8px; }
  /* 宽屏空间够，顶栏按钮别被 96px 截断（「🌐 语言：中文」要完整显示） */
  #topbar .chip.ghost { max-width: 220px; }
  #brand.en { max-width: 30vw; }        /* 桌面同样跟中文一致（66px） */
  #topbar { padding-left: 96px; }
  #topbar:has(#brand.en) { padding-left: 112px; }
}
.spacer { flex: 1; }
.chip {
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: inherit;
}
.chip.ghost { cursor: pointer; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn { font-size: 16px; line-height: 1; padding: 4px 11px; position: relative; }
.menu-btn.alert::after {
  content: ""; position: absolute; top: 3px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%; background: #ef4444;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.92);
}
/* 汉堡菜单弹层 */
.menupop {
  position: absolute; top: 44px; right: 8px;
  min-width: 172px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
  z-index: 32;
}
.menupop button {
  display: block; width: 100%;
  padding: 11px 12px;
  background: none; border: 0; border-radius: 8px;
  color: #0f172a; font-size: 14px; font-family: inherit;
  text-align: left; cursor: pointer; white-space: nowrap;
}
.menupop button:hover { background: #f1f5f9; }
.menupop button:active { background: #e2e8f0; }

/* ------------------------------------------------------------- 飘字提示 */
#toast {
  position: fixed;
  top: 96px; left: 50%;
  transform: translate(-50%, -12px);
  z-index: 40;
  max-width: 92vw;
  padding: 10px 14px;
  border-radius: 12px;
  /* 跟状态栏 #topbar 同一口径（老爷 2026-11-12：要半透明、颜色别换） */
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.good { background: rgba(22, 163, 74, 0.96); }
#toast.bad { background: rgba(220, 38, 38, 0.96); }
#toast.warn { background: rgba(217, 119, 6, 0.96); }
/* 通知类飘字：停留 8 秒，可点掉，宽一点好读 */
#toast.notify {
  background: rgba(15, 23, 42, 0.85);   /* 和状态栏同一口径 */
  backdrop-filter: blur(6px);
  border: none;
  max-width: min(92vw, 520px);
  font-size: 13.5px;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;      /* 只有通知类飘字可点（点了就关），普通飘字仍然穿透 */
}

/* ------------------------------------------------------------- 底部面板 */
#panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  background: var(--card);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
  max-height: 62vh;
  display: flex;
  flex-direction: column;
}
/* 折叠把手：absolute 在抬头里（老爷：以前用 fixed + JS 算坐标，卡片一换高度它就到处跑） */
#panelToggle {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 1;
  width: 46px; height: 28px;
  border: 0;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
#panelHead { position: relative; padding: 12px 64px 6px 14px; }
#where { font-size: 17px; font-weight: 700; }
#whereSub { font-size: 12px; color: var(--muted); margin-top: 3px; }
#panelBody { padding: 6px 14px 18px; overflow-y: auto; }
#panel.collapsed #panelBody { display: none; }

.row-title { font-size: 12px; color: var(--muted); margin: 10px 0 6px; font-weight: 600; }

/* 回到我的棋子（替代原来的定位按钮） */
.mapbtn {
  position: fixed;
  right: 10px;
  top: 58px;
  z-index: 22;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.mapbtn.hidden { display: none; }
.mapbtn:active { background: #eef2f7; }

/* 按钮 */
button.primary, button.secondary {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
}
button.primary { background: var(--brand); color: #fff; }
button.primary:disabled { background: #c7d2e5; cursor: default; }
button.primary.big { padding: 14px; font-size: 15px; }
button.primary.buy { background: var(--good); }
button.primary.rent { background: #0d9488; }
button.primary small, button.secondary small { font-weight: 500; font-size: 11.5px; opacity: 0.92; }
.stepbtn .yl { color: #0f766e; }
button.secondary { background: #f1f5f9; color: #334155; }
button.link {
  background: none; border: 0; color: var(--muted);
  font-size: 12.5px; text-decoration: underline; margin-top: 10px; cursor: pointer;
  font-family: inherit;
}

/* 方向按钮 */
.steps { display: flex; flex-direction: column; gap: 7px; }
.stepbtn {
  display: grid;
  grid-template-columns: 30px 1fr;
  grid-template-rows: auto auto;
  gap: 1px 8px;
  align-items: center;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 11px;
  cursor: pointer;
  font-family: inherit;
}
.stepbtn:active { background: #eef2f7; }
.stepbtn .dir {
  grid-row: span 2;
  font-size: 19px;
  text-align: center;
  color: var(--brand);
  font-weight: 700;
}
.stepbtn .nm { font-size: 14px; font-weight: 600; }
.stepbtn .meta { font-size: 11.5px; color: var(--muted); }
.stepbtn .own { font-weight: 600; }
.stepbtn .free { color: var(--good); }
.stepbtn .rent { color: var(--bad); margin-left: 4px; }

.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.prog { font-size: 12.5px; color: #7c3aed; margin-top: 8px; }
.stats { display: flex; gap: 16px; font-size: 13px; margin-top: 12px; color: #334155; }

#log { margin-top: 12px; }
.logrow {
  font-size: 12.5px;
  color: #334155;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.logrow .t { color: #9ca3af; margin-right: 5px; }
.logrow.rent_in, .logrow.block { color: var(--good); }
.logrow.rent_out, .logrow.broken { color: var(--bad); }

/* ---------------------------------------------------------------- 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.modal.hidden { display: none; }
/* 从「账号」里弹出的二级弹窗，要盖在账号弹窗上面 */
#emailModal, #pwChangeModal, #nameModal { z-index: 70; }
/* 通用隐藏：任何元素加上 hidden 都必须真的看不见
   （踩过的坑：#paletteBox 用 class="palette hidden"，但只定义了 .modal.hidden，
     结果 class 加上了、面板照样显示，测试只查 class 存在也漏过去了） */
.hidden { display: none !important; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 360px;
}
.modal-box h1 { font-size: 20px; margin: 0 0 4px; }
/* 登录弹窗用 logo 代替标题：居中、比弹窗宽一点，向上顶出弹窗（老爷要求） */
.modal-box .login-logo-wrap {
  display: flex; justify-content: center; align-items: center;
  margin: -78px 0 10px;       /* 负上边距 = 让 logo 顶出弹窗顶边 */
}
.modal-box .login-logo {
  height: 150px; width: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}
@media (max-width: 380px) {
  .modal-box .login-logo-wrap { margin: -64px 0 8px; }
  .modal-box .login-logo { height: 126px; }
}
/* 游客模式的「登录」按钮（顶栏）、登录弹窗里的「先随便逛逛」 */
.chip.login { background: #0e5fd6; color: #fff; border-color: #0e5fd6; font-weight: 600; }
.chip.login:hover { background: #0b4fae; }
.linkbtn {
  display: block; width: 100%; margin-top: 10px; padding: 8px 0;
  background: none; border: 0; color: #64748b; font-size: 12.5px;
  text-decoration: underline; cursor: pointer;
}
.linkbtn:hover { color: #334155; }
.modal-box h2 { font-size: 17px; margin: 0 0 10px; }
.modal-box .sub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.modal-box input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 8px;
  font-family: inherit;
}
.modal-box .msg { color: var(--bad); font-size: 12.5px; min-height: 16px; margin-top: 6px; }
.modal-box .tiny { font-size: 11px; color: #9ca3af; margin: 8px 0 0; }
.statline { font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
/* 「我的颜色」这一行：色值在左，「选颜色」按钮靠右（跟「退出登录」同款灰按钮） */
.statline.colorline { display: flex; align-items: center; gap: 8px; }
#btnPickColor {
  margin-left: auto; width: auto; display: inline-block;
  padding: 6px 12px; font-size: 12px; border-radius: 8px; border: 0;
  background: #f1f5f9; color: #334155;
  font-family: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
}
#btnPickColor:active { background: #e2e8f0; }

/* 抢购出价 */
.bidrow { display: flex; gap: 8px; margin-top: 8px; }
.bidrow input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}
.bidrow button { width: auto; margin-top: 0; padding: 10px 18px; }

/* 我的产业列表 */
.assets-body { max-height: 62vh; overflow-y: auto; overflow-x: hidden; margin: 6px 0 12px; }
.asset-group { font-size: 12px; color: var(--muted); font-weight: 700; margin: 12px 0 6px; }
/* 每行两段式：上行「街名 …… 价格」，下行小字信息；只有交易按钮才另起一行
   —— 这样手机上永远不用左右移动 */
.asset-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  margin-bottom: 6px;
  cursor: pointer;
  font-family: inherit;
  overflow: hidden;
}
.asset-item:active { background: #eef2f7; }
.asset-item .ai-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.asset-item .ai-top .an {
  font-size: 13.5px; font-weight: 700; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.asset-item .ai-top .ap { font-size: 12px; color: var(--muted); white-space: nowrap; }
.asset-item .ai-sub {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px;
  font-size: 11.5px; color: #64748b;
}
.asset-item .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.asset-item .an { flex: 1; font-size: 13.5px; font-weight: 600; }
.asset-item .ap { font-size: 12px; color: var(--muted); }
.asset-item .af { font-size: 11px; color: var(--good); }
.asset-item .awarn { font-size: 11px; color: var(--bad); font-weight: 700; }
.asset-item .ah { font-size: 11px; font-weight: 700; color: #92400e; }
.asset-item .abuild {
  font-size: 11.5px; font-weight: 700; color: #fff; background: #0f766e;
  padding: 5px 9px; border-radius: 8px; white-space: nowrap;
}
.asset-item .abuild:active { background: #0b5d57; }
.asset-item .asell { font-size: 11.5px; font-weight: 700; color: #b91c1c; background: #fee2e2; padding: 5px 9px; border-radius: 8px; white-space: nowrap; }
.asset-item .asell:active { background: #fecaca; }
.asset-item .alist { font-size: 11.5px; font-weight: 700; color: #fff; background: #7c3aed; padding: 5px 9px; border-radius: 8px; white-space: nowrap; }
.asset-item .alist.off { background: #ede9fe; color: #6d28d9; }
.asset-item .alist:active { filter: brightness(0.92); }
.asset-item .aring { font-size: 11px; font-weight: 700; color: #fff; background: #6d28d9; padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
/* 账号面板里的取色器 / 自定义色板 */
.palette {
  margin-top: 8px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: #f8fafc;
}
.palette-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0;
}
.sw.on { box-shadow: 0 0 0 2px #0f172a; }
.palette-custom {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line);
}
.palette-custom .plabel { font-size: 12px; color: var(--muted); }
.palette-custom input[type="color"] {
  width: 40px; height: 30px; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; cursor: pointer;
}
.palette-custom input[type="text"] {
  width: 92px; padding: 6px 8px; font-size: 12.5px; border: 1px solid var(--line);
  border-radius: 7px; font-family: ui-monospace, Consolas, monospace; color: #0f172a;
}
.palette .phint { font-size: 11.5px; color: var(--muted); margin-top: 7px; }
button.mini {
  width: auto; font-size: 12px; padding: 6px 11px; border-radius: 7px;
  margin: 0; display: inline-block; font-family: inherit; font-weight: 600;
}
button.mini.primary { background: linear-gradient(180deg, #2b7fff, #0e5fd6); color: #fff; }
button.mini.ghost { background: #e2e8f0; color: #1e293b; }
button.sell { background: linear-gradient(180deg, #b91c1c, #991b1b); color: #fff; }
button.sell small { color: rgba(255, 255, 255, 0.88); }
button.build { background: linear-gradient(180deg, #0f766e, #0b5d57); color: #fff; }
button.build small { color: rgba(255, 255, 255, 0.88); }
.modal-box.wide { max-width: 420px; }
.logrow.offer_in, .logrow.seize_lost, .logrow.broken { color: var(--bad); }
.logrow.offer_out, .logrow.offer_blocked, .logrow.offer_failed { color: #7c3aed; }
.logrow.fortify { color: var(--good); }
.chip.alert { background: rgba(220, 38, 38, 0.9); color: #fff; }
/* 通知列表 */
.notify-item { font-size: 12.5px; padding: 7px 2px; border-bottom: 1px dashed var(--line); line-height: 1.5;
  display: flex; align-items: flex-start; gap: 6px; }
.notify-item .nt { float: none; color: var(--muted); font-size: 11px; white-space: nowrap; }

/* 地图弹窗 */
.pop { font-size: 13px; min-width: 160px; }
.pop-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pop-row { margin: 2px 0; }
.pop-row.tiny { color: #6b7280; font-size: 11.5px; }
/* 街卡里的玩家买卖（挂牌 / 报价） */
.pop-sect { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); }
.pop-sect:empty { display: none; }
.tr-title { font-size: 12px; font-weight: 700; color: #6d28d9; margin-bottom: 3px; }
.tr-row { margin: 2px 0; }
.tr-row.tiny { color: #6b7280; font-size: 11.5px; }
.mini {
  width: auto; margin-top: 0; margin-left: 6px; padding: 5px 10px;
  font-size: 12px; border-radius: 8px; background: #7c3aed; color: #fff;
  border: 0; font-family: inherit; font-weight: 600; cursor: pointer;
}
.mini.ghost { background: #ede9fe; color: #6d28d9; }
.mini:active { filter: brightness(0.92); }

.fatal {
  position: fixed; inset: auto 12px 12px 12px; z-index: 99;
  background: var(--bad); color: #fff; padding: 12px;
  border-radius: 10px; font-size: 13px;
}

@media (min-width: 720px) {
  #panel { left: 12px; right: auto; width: 380px; bottom: 12px; border-radius: 16px; max-height: 74vh; }
  #topbar { padding: 10px 14px; }
}

/* 手机：底部弹窗 → 左侧抽屉，宽度 60%（老爷要求：面积别那么大、位置挪到左边） */
@media (max-width: 719px) {
  #panel {
    left: 0; right: auto;
    top: auto; bottom: 0;                     /* 左下角（老爷要求） */
    width: min(60vw, 300px);
    max-height: 66vh;
    border-radius: 0 16px 0 0;
    box-shadow: 6px -8px 26px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease;
  }
  #panel.collapsed { transform: none; }                  /* 收起 = 往下缩成一行（不再滑出屏幕） */
  #panel.collapsed #panelBody { display: none; }
  #panel.collapsed #panelHead { padding-bottom: 10px; }
  #panel.collapsed #where { font-size: 15px; }
  #panelHead { padding: 14px 58px 6px 12px; }
  #where { font-size: 15.5px; line-height: 1.3; word-break: break-word; }
  #panelBody { padding: 4px 12px 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  /* 把手：absolute 在抬头里，永远贴卡片右上角（不再跟着卡片高度乱跑） */
  #panelToggle {
    width: 44px; height: 26px;
    font-size: 14px;
    right: 8px; top: 6px;
  }
}

/* ------------------------------------------------ 撒金币特效（纯 CSS，无素材） */
#fxLayer {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden;
}
.coin {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #fffbe0 0%, #ffe066 32%, #f2c032 62%, #a9761a 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(80, 50, 0, 0.35);
  animation: coinFly 1.25s cubic-bezier(0.17, 0.72, 0.28, 1) forwards;
  animation-delay: var(--d, 0ms);
  will-change: transform, opacity;
}
/* 金币上的小方孔，一眼看出是金币 */
.coin::after {
  content: ""; position: absolute; inset: 34%; border-radius: 3px;
  background: rgba(120, 78, 10, 0.55);
}
@keyframes coinFly {
  0%   { transform: translate(0, 0) scale(0.35) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  62%  { opacity: 1; }
  100% { transform: translate(var(--tx, 0), calc(var(--ty, 0) + 170px)) scale(0.95) rotate(var(--r, 180deg)); opacity: 0; }
}
/* 一声"叮"的金光：从中心扩散一圈 */
.coinBurstRing {
  position: absolute; width: 70px; height: 70px; margin: -35px 0 0 -35px;
  border-radius: 50%; border: 3px solid rgba(255, 214, 82, 0.95);
  animation: coinRing 0.7s ease-out forwards;
}
@keyframes coinRing {
  0% { transform: scale(0.25); opacity: 0.95; }
  100% { transform: scale(3.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .coin, .coinBurstRing { display: none; }
}

/* --------------------------------------------------- 右下角的骰子（点一下=掷骰子） */
.dicewrap {
  position: fixed; right: 16px; bottom: 96px; z-index: 24;
  width: 52px; height: 52px;
}
.dicemode {
  position: absolute; left: 50%; bottom: calc(100% + 16px); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 2px; border-radius: 999px;
  background: rgba(15, 23, 42, .8); box-shadow: 0 2px 8px rgba(0,0,0,.3); z-index: 3;
}
.dicemode button {
  border: 0; background: none; color: #cbd5e1; cursor: pointer;
  font: 700 11.5px/1 inherit; padding: 4px 7px; border-radius: 999px;
}
.dicemode button.on { background: #0e5fd6; color: #fff; }
.dicemode button:disabled { opacity: .5; cursor: default; }
.dicewrap.flying .dicemode { opacity: 0; pointer-events: none; }   /* 掷的时候别跟着飞 */

/* 两颗骰子：各自一个定位槽，旋转只作用在里面的 .cube 上（不打架） */
.dslot { position: absolute; inset: 0; transition: transform .3s cubic-bezier(.22,1.1,.36,1), opacity .25s; }
.dslot2 { opacity: 0; transform: translate(-26px, 10px) scale(.56); }
.dicewrap.two .dslot2 { opacity: .9; }
/* 只有 ×2 时才把两颗分开；×1 必须保持一颗、而且居中 */
.dicewrap.flying.two #dslot1 { transform: translate(-24px, -2px); }   /* 注意是 id，不是 class（有点重叠更自然） */
.dicewrap.flying.two .dslot2 { opacity: 1; transform: translate(24px, 10px); }
.dicewrap.flying:not(.two) #dslot2 { opacity: 0; }
.dicewrap.double .dicebtn { animation: diceDouble .5s ease-out 2; }
@keyframes diceDouble {
  0%, 100% { filter: drop-shadow(0 6px 10px rgba(15,23,42,.35)); }
  50% { filter: drop-shadow(0 0 18px rgba(250, 204, 21, .95)); }
}
#diceSum {
  position: fixed; left: 50%; top: 57%; transform: translate(-50%, 0) scale(.92);
  z-index: 41; background: rgba(15, 23, 42, .88); color: #fff; border-radius: 12px;
  padding: 9px 15px; font: 700 16px/1.2 -apple-system,"Segoe UI","PingFang SC",sans-serif;
  opacity: 0; transition: opacity .22s, transform .22s; pointer-events: none; white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
#diceSum.on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.dicebtn {
  background: none; border: 0; padding: 0; cursor: pointer; position: relative;
  width: 52px; height: 52px; display: block;
  transition: transform .42s cubic-bezier(.22, 1.15, .36, 1);
  filter: drop-shadow(0 6px 10px rgba(15, 23, 42, .35));
}
.dicebtn.flying { transform: translate(var(--dx, 0), var(--dy, 0)) scale(2.3); z-index: 40; }
/* 弹出来的时候必须**完全不透明**（不能因为"本回合不能掷"的灰化样式而发虚） */
.dicebtn:disabled { cursor: default; }
.dicebtn:disabled:not(.flying) { filter: drop-shadow(0 6px 10px rgba(15,23,42,.2)) grayscale(.55); opacity: .75; }
.dicebtn.flying {
  opacity: 1;
  filter: drop-shadow(0 14px 22px rgba(15, 23, 42, .45));
}
.dicebtn.tap { animation: diceTap 1.4s ease-in-out infinite; }
@keyframes diceTap {
  0%, 100% { filter: drop-shadow(0 6px 10px rgba(15, 23, 42, .35)); }
  50% { filter: drop-shadow(0 2px 4px rgba(15, 23, 42, .28)) drop-shadow(0 0 10px rgba(250, 204, 21, .8)); }
}
.dicecount {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  border-radius: 10px; background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center;
  padding: 1px 6px; box-shadow: 0 2px 6px rgba(15, 23, 42, .3);
}
.dicecount.empty { background: #94a3b8; }

/* 立方体：6 个面 + 9 宫格点数，全 CSS 画（无图片素材） */
.dicewrap .cube {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transform: rotateX(0deg) rotateY(0deg);
  transition: transform .95s cubic-bezier(.25, .9, .3, 1);
}
.dicewrap .face {
  position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(150deg, #ffffff, #eef2f7);
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 0 9px rgba(15, 23, 42, .12);
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  padding: 13%; gap: 6%; backface-visibility: hidden;
}
.dicewrap .pip { border-radius: 50%; background: #0f172a; box-shadow: inset 0 -1px 1px rgba(255,255,255,.3); }
.dicewrap .pip.off { background: transparent; box-shadow: none; }
.dicewrap .f1 { transform: translateZ(26px) scale(1.08); }
.dicewrap .f6 { transform: rotateY(180deg) translateZ(26px) scale(1.08); }
.dicewrap .f2 { transform: rotateY(90deg) translateZ(26px) scale(1.08); }
.dicewrap .f5 { transform: rotateY(-90deg) translateZ(26px) scale(1.08); }
.dicewrap .f3 { transform: rotateX(90deg) translateZ(26px) scale(1.08); }
.dicewrap .f4 { transform: rotateX(-90deg) translateZ(26px) scale(1.08); }
@media (min-width: 720px) {
  .dicewrap { bottom: 72px; }
}


/* 版权控件（OpenFreeMap / OpenStreetMap）：桌面保持底图原样（收起成 ⓘ，点开两行，无动画）
 * 手机：底图那条文字完全不显示（点 ⓘ 走我们自己的底部浮层） */
.maplibregl-ctrl-attrib,
.maplibregl-ctrl-attrib.maplibregl-compact-show {
  max-width: 56vw;
  font-size: 10.5px;
}
.maplibregl-ctrl-attrib-inner {
  white-space: normal !important;
  word-break: break-word;
  line-height: 1.4;
  max-width: 56vw;
}
/* 版权控件：收起就是一颗 ⓘ 圆钮（24×24，背景透明、没白底方块），展开是同高的白条 —— 点开不跳 */
.maplibregl-ctrl-attrib.maplibregl-compact {
  background: transparent !important;      /* 关键：否则会有一层白底方块压在按钮下面 */
  padding: 0 !important;
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  border-radius: 50% !important;
  overflow: visible !important;
}
.maplibregl-ctrl-attrib.maplibregl-compact.maplibregl-compact-show {
  display: flex !important;
  align-items: center;
  background: rgba(255, 255, 255, 0.92) !important;
  width: auto !important;
  padding: 0 24px 0 8px !important;        /* 右边留出 ⓘ 的位置 */
  border-radius: 12px !important;
}
.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner {
  height: 24px !important;
  line-height: 24px;
  padding: 0;
  overflow: hidden;
}
/* 手机：底图那条版权文字一律不显示，而且容器也不许「展开成白条」——
 * 否则页面刚打开时 MapLibre 会先加一次 compact-show，出现「白色横条探出来再缩回去」 */
@media (max-width: 719px) {
  .maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-inner,
  .maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
    display: none !important;
  }
  .maplibregl-ctrl-attrib.maplibregl-compact,
  .maplibregl-ctrl-attrib.maplibregl-compact.maplibregl-compact-show {
    width: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 50% !important;
    box-shadow: none !important;
  }
}

/* 版权浮层（手机）：底部弹出的小卡片，点空白处关闭 */
.credit-box { max-width: 420px; }
.credit-body { font-size: 13px; line-height: 1.7; color: var(--muted); margin: 4px 0 14px; }
.credit-body a { color: #0e5fd6; }
.credit-hint { font-size: 11.5px; color: #94a3b8; text-align: center; }
@media (max-width: 719px) {
  #creditModal { align-items: flex-end; padding: 0 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  #creditModal .credit-box {
    width: 100%; max-width: none;
    border-radius: 16px 16px 12px 12px;
    padding-bottom: 14px;
  }
}

/* 2026-10 老爷：加固功能先停用（藏起按钮，逻辑留着） */
#btnFortify { display: none !important; }

/* 街卡里的输入框/按钮别被挤成竖排（抢购区块 + 报价区块） */
.maplibregl-popup-content { min-width: 250px; }
#tradeBox input { min-width: 0; }
#tradeBox .mini, #tradeBox button { white-space: nowrap; flex: 0 0 auto; }

/* 手机：竞价入口收进汉堡菜单，顶栏只留金币/骰子/卡片/铃铛 */
@media (max-width: 720px) { #chipAuc { display: none !important; } }
/* 桌面有顶栏 ⚔ chip，菜单里就不重复放 */
@media (min-width: 721px) { #btnAuc { display: none !important; } }

/* 顶栏骰子：可点击，鼠标要变手型 */
#chipDice { cursor: pointer; }

/* 注册密码规则提示（实时） */
.pwhint { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 8px; }
.pwhint span { font-size: 11.5px; color: #94a3b8; border: 1px solid #e2e8f0; border-radius: 999px; padding: 1px 8px; }
.pwhint span.ok { color: #15803d; border-color: #86efac; background: #f0fdf4; }

/* 排行榜 */
.rank-row { display: grid; grid-template-columns: 34px 1fr auto; grid-auto-rows: auto;
  gap: 2px 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid #eef2f7; font-size: 13.5px; }
.rank-row .rk { font-weight: 700; color: #64748b; text-align: center; }
.rank-row .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .as { font-weight: 700; font-variant-numeric: tabular-nums; }
.rank-row .st { grid-column: 2 / 4; color: #94a3b8; font-size: 11.5px; }
.rank-row.me { background: #eff6ff; border-radius: 8px; }

/* 休眠蒙层 */
.sleepveil { position: fixed; inset: 0; z-index: 55; background: rgba(8, 15, 30, 0.66);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(3px); }
.sleepveil .sleepcard { background: rgba(255,255,255,.96); border-radius: 16px; padding: 18px 26px;
  text-align: center; box-shadow: 0 12px 40px rgba(2,8,24,.45); display: flex; flex-direction: column; gap: 4px; }
.sleepveil .zzz { font-size: 30px; }
.sleepveil b { font-size: 16px; }
.sleepveil span { font-size: 12.5px; color: #64748b; }


/* ------------------------------------------------------------- 棋子（玩家小人） */
#mePiece {
  width: 42px; height: 49px;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.35));
}
#mePiece .mphop { width: 100%; height: 100%; transform-origin: 50% 100%; }
#mePiece .mphop.hop { animation: mpHop 0.52s cubic-bezier(0.34, 0.78, 0.4, 1); }
@keyframes mpHop {
  0%   { transform: translateY(0)     scale(1); }
  46%  { transform: translateY(-18px) scale(0.98, 1.02); }   /* 直接起跳，不做下蹲 */
  78%  { transform: translateY(-5px)  scale(1.01, 0.99); }
  100% { transform: translateY(0)     scale(1); }
}
/* 选棋子 */
.piecegrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 8px; }
.piecegrid button {
  background: #f8fafc; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; font-size: 10.5px; color: var(--muted);
}
.piecegrid button svg { width: 31px; height: 36px; }
.piecegrid button.on { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 700; }
@media (max-width: 480px) { .piecegrid { grid-template-columns: repeat(4, 1fr); } }

/* 账号里补填找回邮箱 */
.statline.emailline { display: flex; align-items: center; gap: 8px; }
.statline.emailline b { font-weight: 700; }
.statline.emailline button {
  flex: 0 0 auto; height: 26px; padding: 0 12px; margin: 0;
  font-size: 12px; font-weight: 600; border-radius: 8px;
}

/* 账号弹窗：标题行 + 和「选颜色」同款的小按钮 */
.acchdr { display: flex; align-items: center; gap: 8px; }
.acchdr h2 { margin: 0; }
.pillbtn {
  width: auto; display: inline-block; margin-left: auto;
  padding: 6px 12px; font-size: 12px; border-radius: 8px; border: 0;
  background: #f1f5f9; color: #334155;
  font-family: inherit; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.pillbtn:active { background: #e2e8f0; }
.statline.emailline .pillbtn { margin-left: auto; }

/* M50 高速出口列表 */
.hwlist { max-height: 46vh; overflow: auto; margin: 4px 0 10px; }
.hwrow {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; cursor: pointer;
}
.hwrow:active { background: #eef2f7; }
.hwrow b { font-size: 13.5px; }
.hwrow small { color: var(--muted); font-size: 11.5px; }
.hwrow .fee { margin-left: auto; font-weight: 700; color: #b45309; white-space: nowrap; }

/* M50 高速出入口标记（和警局同款，换个颜色好区分） */
.ev-hw span {
  background: #0f766e !important;
  border-color: #ccfbf1 !important;
}

/* 玩家棋子永远在最上层（不被 🛣 高速 / 🚓 警局图标挡住） */
#mePiece, .maplibregl-marker:has(#mePiece) { z-index: 20 !important; }

/* 首屏（游客）先把登录态元素藏住，等 /state 确认后再决定显示 */
html.boot-guest #chipCoins, html.boot-guest #chipDice, html.boot-guest #diceWrap,
html.boot-guest #btnNotify, html.boot-guest #btnAssets, html.boot-guest #btnAccount,
html.boot-guest #btnLogout2, html.boot-guest #chipCards, html.boot-guest #chipAuc,
html.boot-guest #chipJail { display: none !important; }

/* 游客首屏：登录按钮立刻出现（不用等 /state） */
html.boot-guest #btnLoginTop { display: inline-block !important; }

/* 卡片「使用」按钮被规则挡住时：仍可点，点了会说明原因，只是变暗 */
.ev-btn.is-off { opacity: .55; }

/* 签到 7 格 */
.ck-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ck-cell {
  border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 8px 6px;
  text-align: center; background: #f8fafc;
}
.ck-cell b { display: block; font-size: 11px; color: #64748b; font-weight: 600; }
.ck-cell .rw { font-size: 11.5px; font-weight: 800; margin-top: 4px; white-space: nowrap; }
.ck-cell .sub2 { font-size: 10.5px; color: #64748b; margin-top: 1px; white-space: nowrap; }
.ck-cell.done { background: #ecfdf5; border-color: #a7f3d0; }
.ck-cell.done .rw { color: #047857; }
.ck-cell.today { background: #eff6ff; border-color: #93c5fd; box-shadow: 0 0 0 2px #bfdbfe inset; }
.ck-cell.today .rw { color: #1d4ed8; }
.ck-cell.locked .rw { color: #94a3b8; }

/* 顶栏签到入口：手机上收进汉堡菜单（顶栏只留金币/通知/菜单） */
@media (max-width: 720px) { .ck-chip { display: none !important; } }
html.boot-guest #btnCheckin { display: none !important; }

/* 金币滚动时轻微放大，滚完回位（数字本身由 JS 逐帧插值） */
#chipCoins.rolling { transform: scale(1.06); transition: transform .18s ease-out; }

/* 金币变动浮字（+3,000 / −1,500） */
.coinFloat {
  position: fixed; transform: translate(-50%, -50%);
  font-weight: 800; font-size: 14px; letter-spacing: .3px;
  pointer-events: none; z-index: 120; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  animation: coinFloatUp 1.15s cubic-bezier(.2,.8,.3,1) forwards;
}
.coinFloat.up { color: #4ade80; }
.coinFloat.down { color: #f87171; }
@keyframes coinFloatUp {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
  14%  { opacity: 1; transform: translate(-50%, -56%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -118%) scale(1); }
}
@keyframes coinFloatDown {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
  14%  { opacity: 1; transform: translate(-50%, -44%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 22%) scale(1); }
}
.coinFloat.below { animation-name: coinFloatDown; }

/* 地图内的层级：#map 自成一层（z-index:0）→ 弹窗永远盖住棋子和图标，
   而页面上的 modal（z-index 60）又永远盖住整个地图 */
.maplibregl-popup { z-index: 30 !important; }
.maplibregl-ctrl { z-index: 25 !important; }
.maplibregl-marker { z-index: 10; }

/* 最近动态：全服动态（谁 + 做了什么） */
.logrow .who { font-weight: 700; color: #475569; }
.logrow.me .who { color: #1d4ed8; }

/* 游客面板底部：注册送金币，居中 */
.guest-hint { text-align: center; }

/* 遭遇事件：整屏遮罩 + 大卡片（和机会卡同一个视觉） */
#encModal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(8,15,30,.55); backdrop-filter: blur(2px); z-index: 9700; padding: 18px; }
#encModal.on { display: flex; }
#encModal .enc-card { width: min(84vw, 340px); background: #fff; border-radius: 22px; padding: 22px 20px 18px;
  text-align: center; box-shadow: 0 30px 70px rgba(8,15,30,.45); animation: encPop .32s cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes encPop { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#encModal .emo { font-size: 54px; line-height: 1; }
#encModal .tag { margin-top: 8px; font-size: 11px; letter-spacing: .16em; font-weight: 800; color: #94a3b8; }
#encModal h2 { margin: 6px 0 6px; font-size: 21px; color: #0f172a; }
#encModal p { margin: 0; font-size: 14px; line-height: 1.6; color: #475569; }
#encModal .amt { margin: 14px 0 4px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
#encModal .amt.good { color: #047857; }
#encModal .amt.bad { color: #b91c1c; }
#encModal .enc-ok { margin-top: 14px; width: 100%; border: 0; background: #2563eb; color: #fff;
  font-weight: 800; font-size: 15px; padding: 13px 0; border-radius: 14px; cursor: pointer; }

/* 客服反馈弹窗 */
.support-box { max-width: 420px; width: min(92vw, 420px); }

/* ---------- 管理员广播横幅 ---------- */
#noticeWrap { position: fixed; inset: 0; z-index: 58; }  /* 低于弹窗(60)，高于地图/棋子 */
#noticeWrap.hidden { display: none; }
#noticeBar {
  position: absolute; left: 10px; right: 10px; top: 54px;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,58,138,.85), rgba(37,99,235,.85));  /* 老爷 2026-11-12：0.85 透明 */
  color: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.28);
  animation: noticeIn .22s ease-out;
}
@keyframes noticeIn { from { transform: translateY(-14px); opacity: 0 } to { transform: none; opacity: 1 } }
#noticeBar .ntxt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; }
#noticeBar .ntxt b { display: block; font-size: 14px; margin-bottom: 1px; }
#noticeBar .ntxt span { opacity: .92; word-break: break-word; }
/* 公告详情链接（后台 link 字段）：横幅白字底上用浅蓝，弹窗白底上用深蓝 */
.notice-link { font-weight: 700; text-decoration: underline; white-space: nowrap; }
#noticeBar .notice-link { color: #bfdbfe; display: block; margin-top: 2px; }   /* 手机上单独一行，别跟正文挤在一起 */
#nmBody .notice-link { color: #1d4ed8; }
/* 公告附带金币：横幅里金色小字、弹窗里琥珀色一行、通知列表里的小徽标 */
.ncomp { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; color: #fde68a; }
#nmBody .ncomp { margin-top: 8px; font-size: 13px; color: #b45309; }
.ncomp-badge { margin-left: 6px; font-size: 12px; font-weight: 700; color: #b45309; }
#noticeBar button {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 10px; border: 0;
  background: #fff; color: #1e3a8a; font-weight: 700; font-size: 13px; cursor: pointer;
}
@media (min-width: 900px) { #noticeBar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); } }

/* 客服（微信）弹窗：给 iframe 足够高度，避免推荐问题和发送按钮被裁 */
.support-box { width: min(96vw, 540px); max-height: 92vh; }
#supWx { margin-top: 6px; }
#supFrame { display: block; width: 100%; height: 70vh; min-height: 460px; border: 0; border-radius: 12px; background: #fff; }
@media (max-width: 520px) { #supFrame { height: 66vh; min-height: 400px; } }

/* 微信客服：手机上整个弹窗铺满，给 iframe 完整高度 */
@media (max-width: 600px) {
  #supportModal.wxmode .modal-box { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
    border-radius: 0; padding: 10px 10px 12px; display: flex; flex-direction: column; }
  #supportModal.wxmode #supFrame { flex: 1; height: auto; min-height: 0; }
  #supportModal.wxmode #supWx { flex: 1; min-height: 0; display: flex; }
}

/* 街名链接（动态 / 通知面板 / 收租列表）：颜色跟随正文，只有下划线 + hover 变蓝 */
a.lnk { color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
a.lnk:hover { color: var(--brand, #0e5fd6); }

/* 手机：卡片进汉堡菜单 */
@media (max-width: 720px) {
  #chipCards { display: none !important; }
  #btnCards { display: flex; }

  #btnMarket { display: flex; }
}
@media (min-width: 721px) {
  #btnCards { display: none; }
}

/* 桌面：签到只在顶栏；手机：顶栏放不下，菜单里给一个 */
@media (min-width: 721px) { #btnCheckinMenu { display: none !important; } }
@media (max-width: 720px) { #btnCheckinMenu:not(.hidden) { display: flex !important; } }

/* 菜单项显示规则（最后声明，优先级最高）
   ⚠️ 必须带 :not(.hidden)：`display:flex !important` 会盖掉 `.hidden{display:none!important}`，
   否则手机端这三项永远藏不住（游客菜单白名单就是这么被顶穿的，2026-10-29 修）。 */
@media (min-width: 721px) {
  #btnMarket { display: none !important; }
  #btnCards { display: none !important; }
  #btnCheckinMenu { display: none !important; }
}
@media (max-width: 720px) {
  #btnMarket:not(.hidden) { display: flex !important; }
  #btnCards:not(.hidden) { display: flex !important; }
  #btnCheckinMenu:not(.hidden) { display: flex !important; }
}

/* 顶栏「内测」小标：小屏缩小并贴在 logo 右上角，避免挤到金币 */
#betaTag {
  position: absolute;
  left: 58px; top: 6px;
  z-index: 3;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f59e0b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.55;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
@media (max-width: 380px) {
  #betaTag { font-size: 9px; padding: 1px 5px; left: 54px; top: 6px; }
}
@media (min-width: 720px) {
  #betaTag { left: 72px; top: 10px; font-size: 12px; padding: 2px 9px; }
}

}
/* 面板里的抢购/报价行（老爷 2026-10-21）：窄面板 60vw 下输入框要能缩，按钮小一号，别被裁 */
.bidrow { gap: 6px; }
.bidrow input { flex: 1 1 0%; min-width: 0; width: 100%; padding: 6px 8px; font-size: 13px; }
.bidrow button { flex: 0 0 auto; padding: 6px 10px; font-size: 13px; }
/* 街卡里的两个交易按钮（报价 / 出价抢）跟下面「偷租」一样大（老爷 2026-11-12）：
   只缩卡片内 .bidrow 的按钮，面板里的 #btnOffer 不动 */
#tradeBox .bidrow button { padding: 5px 8px; font-size: 12.5px; border: 1px solid transparent; }
/* 「出价抢」保留原来的黄色（老爷 2026-11-12：颜色不要改）——放 CSS 里，别再写行内 style
   上面那条 1px 透明描边是为了跟「偷租」（白底 1px 描边）等高，否则矮 2px */
#tradeBox #btnAucBid { background: #f5b301; color: #3a2b00; font-weight: 700; }


/* 汉堡菜单项的红底提醒（竞价 / 我的产业） */
.menuitem.alert { background: rgba(220, 38, 38, 0.12); color: #b91c1c; font-weight: 700; border-radius: 10px; }
.menuitem.alert:hover { background: rgba(220, 38, 38, 0.2); }


/* 街卡弹窗排版兜底：长文案换行，不往卡片外面跑 */
.maplibregl-popup-content { max-width: min(340px, calc(100vw - 20px)) !important; }
.maplibregl-popup-content, .maplibregl-popup-content .tiny,
.maplibregl-popup-content .pop-row, .maplibregl-popup-content .sect-title {
  overflow-wrap: anywhere; word-break: break-word; white-space: normal;
}
.maplibregl-popup-content .tiny { line-height: 1.35; }


/* 竞价/挂牌 tab：选中态用描边而不是实心蓝 */
#evAuc .ev-btn.on { background: #2563eb !important; color: #fff !important; border: 1px solid #2563eb !important; }


/* 通知里的「确认」按钮基线对齐（别往下掉） */
.notify-item .refund-ok {
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; position: relative; top: -1.5px;
  line-height: 1; padding: 3px 10px; font-size: 0.9em; border-radius: 8px;
}


/* 通知行：文字区可换行，日期固定在右上，不再被按钮挤乱 */
/* 报价通知的「已失效」小标签：声明报价已被撤回/拒绝/成交，灰色描边，别抢正文的视觉 */
.notify-item .ndead {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  font-size: 11px; line-height: 16px; color: #9ca3af;
  border: 1px solid #d1d5db; border-radius: 999px; white-space: nowrap;
}
.notify-item > span:not(.nt):not(.nright) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; padding-right: 10px; }


/* 右侧竖列：日期在上，「确认」按钮在下 */
.notify-item .nright { display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex: 0 0 auto; margin-left: auto; align-self: flex-start; min-width: 68px; }
.notify-item .nright .refund-ok { align-self: flex-end; }

/* 版权品牌行：不加粗（中英一致）；网页版链接平时无下划线，鼠标移上去才出现 */
.cc-brand { font-weight: 400; }
.cc-brand a { color: inherit; text-decoration: none; text-underline-offset: 2px; }
.maplibregl-ctrl-attrib-inner .cc-brand a:hover { text-decoration: underline; }
#creditBody .cc-brand { display: inline-block; margin-bottom: 2px; font-weight: 700; }  /* 手机弹窗里加粗（清晰），桌面署名条字太小保持常规 */
/* 手机弹窗没有 hover，链接下划线常显，才看得出可点 */
#creditBody .cc-brand a { text-decoration: underline; }
/* 游客面板副标题：两段各自不拆开（手机面板只有 ~230px，否则「区」会单独掉到第二行） */
#whereSub .ws-nw { white-space: nowrap; }

/* ---------- 偷租（2026-10-27） ---------- */
.stealrow{margin-top:8px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.stealrow.cd{color:#b45309;font-weight:600}
.stealrow .tiny{color:#64748b;font-size:11.5px}
.stealrow button.mini{background:#fff;border:1px solid #cbd5e1;color:#0f172a;border-radius:8px;padding:6px 10px;font-size:13px;cursor:pointer}
.stealrow button.mini:hover{border-color:#0e5fd6;color:#0e5fd6}

/* 收租明细弹窗（2026-10-27） */
#rentSummary{margin:2px 0 12px}
#rentSummary .ag{font-size:12px;color:var(--muted);font-weight:700;line-height:1.55}
#rentSummary .ag + .ag{margin-top:2px}
.rentrow{border-bottom:1px solid #eef2f7;padding:7px 2px}
.rentrow:last-child{border-bottom:0}
.rr-main{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.rr-main b{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rr-amt{color:#15803d;font-weight:700;white-space:nowrap}
.rr-sub{color:#64748b;font-size:11.5px;margin-top:1px}
#btnRentAll{margin-top:10px}

/* 街卡一行：累积租金 + 收租/偷租按钮（2026-10-27） */
.renthere{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;margin-top:8px}
.renthere .tiny{color:#64748b;font-size:11.5px;white-space:normal;flex:1 1 auto;min-width:0;line-height:1.3}
.renthere button.mini{flex:0 0 auto;padding:5px 8px;font-size:12.5px}
.renthere button.mini.good{background:#0d9488;border-color:#0d9488;color:#fff}
.renthere button.mini.good:hover{background:#0f766e;border-color:#0f766e}
.renthere button.mini.ghost{background:#fff;border:1px solid #cbd5e1;color:#0f172a;font-weight:500}
.renthere button.mini.ghost:hover{border-color:#0e5fd6;color:#0e5fd6}

/* 产业卡片 tab（产业 / 收租，2026-10-27） */
.assets-tabs{display:flex;gap:6px;margin:0 0 9px}
.assets-tabs button{flex:1;padding:7px 10px;border-radius:9px;border:1px solid #cbd5e1;background:#fff;color:#334155;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.assets-tabs button.on{background:#eff6ff;border-color:#0e5fd6;color:#0e5fd6}
.asset-item .rr-amt{color:#15803d;font-weight:700;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.dicecd{position:absolute;left:50%;top:calc(100% + 6px);transform:translateX(-50%);
font-size:10.5px;font-weight:700;color:#475569;white-space:nowrap;line-height:15px;
background:linear-gradient(150deg,#ffffff,#eef2f7);border:1px solid #cbd5e1;border-radius:9px;padding:2px 6px;
box-shadow:0 3px 9px rgba(15,23,42,.16),inset 0 0 9px rgba(15,23,42,.07);
opacity:.75;
pointer-events:none;font-variant-numeric:tabular-nums}
.dicecd.hidden{display:none}

/* ================= 设置弹窗（2026-11-11：主题 / 音效 / 通知 合并；语言仍留在菜单） =================
   类名一律 set-* 前缀：样式表里原来就有 .sw（调色板色块：border:2px solid #fff，且 .sw.on 有
   box-shadow 外圈），第一次做开关时撞上它 —— 白点被 2px 边框顶偏、外面多一圈深色描边。 */
.modal-box h2 .set-x {
  margin-left: auto; border: 0; background: none; color: var(--muted);
  font-size: 18px; line-height: 1; padding: 2px 6px; cursor: pointer;
}
.set-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-main { flex: 1; min-width: 0; }
.set-t { font-size: 14px; font-weight: 600; }
.set-s { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
/* 主题三段：一次点到，不用轮换 */
.set-seg { display: flex; background: #f1f5f9; border: 1px solid var(--line); border-radius: 10px; padding: 2px; flex: none; }
.set-seg button {
  border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px;
  padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.set-seg button.on { background: var(--brand); color: #fff; font-weight: 600; }
/* 开关（音效 / 通知）：46×28，圆点 22，四周各留 3 —— 圆点正好竖直居中，不会歪 */
.set-sw {
  width: 46px; height: 28px; border: 0; padding: 0; border-radius: 99px;
  background: #cbd5e1; position: relative; cursor: pointer; flex: none;
  transition: background .18s; -webkit-appearance: none; appearance: none;
}
.set-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: left .18s;
}
.set-sw.on { background: #16a34a; }
.set-sw.on::after { left: 21px; }
.set-sw.set-sw-locked { opacity: .45; }
/* 开启中：圆点轻微脉冲，表示「在等 push 服务」，不是没点上 */
@keyframes set-sw-pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
.set-sw.set-sw-busy::after { animation: set-sw-pulse .9s ease-in-out infinite; }        /* 系统不让开（被拒 / iOS 没加主屏 / 微信）：点它给引导 */
.set-sw:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* 夜间 */
html.map-dark .set-seg { background: #131a22; }
html.map-dark .set-seg button.on { background: #2563eb; }
html.map-dark .set-sw { background: #374151; }
html.map-dark .set-sw.on { background: #16a34a; }
html.map-dark .modal-box .set-x { color: #93a0af; }

/* ================= 夜间界面（跟地图主题联动；html.map-dark） =================
 * 只做「覆盖」，不改上面的任何一条规则 —— 想回退把整段删掉即可。
 * 地图三档在「跟随系统/夜间」时 game.js 会给 <html> 加上 .map-dark。
 */
html.map-dark {
  --card: #1a222c;
  --line: #2b3542;
  --text: #e7ecf3;
  --muted: #93a0af;
  --bg: #0d1218;
  color-scheme: dark;
}
html.map-dark body { background: #0d1218; color: var(--text); }
/* 左面板 / 顶栏 */
html.map-dark #panel { box-shadow: 0 -6px 24px rgba(0,0,0,.55); }
html.map-dark #panelHead { background: #1a222c; }
html.map-dark #where { color: #e7ecf3; }
html.map-dark #whereSub { color: #93a0af; }
html.map-dark .modal-box { background: #1a222c !important; color: #e7ecf3; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
html.map-dark .modal-box h2, html.map-dark .modal-box h3, html.map-dark .modal-box b { color: #e7ecf3; }
/* 菜单 */
html.map-dark .menupop { background: #1a222c; border-color: #2b3542; }
html.map-dark .menuitem { color: #e7ecf3; }
html.map-dark .menupop button:hover { background: #232d39; }
/* 各种列表行 / 次级按钮 */
html.map-dark .asset-item, html.map-dark .hwrow, html.map-dark .ck-cell,
html.map-dark .piecegrid button, html.map-dark .pillbtn, html.map-dark .stepbtn,
html.map-dark button.secondary, html.map-dark #btnPickColor, html.map-dark .palette,
html.map-dark .mapbtn, html.map-dark #noticeBar button, html.map-dark .assets-tabs button,
html.map-dark .stealrow button.mini, html.map-dark .renthere button.mini.ghost {
  background: #212a35; color: #e7ecf3; border-color: #2c3644;
}
html.map-dark .asset-item:active, html.map-dark .hwrow:active, html.map-dark .stepbtn:active,
html.map-dark .mapbtn:active { background: #2a3542; }
/* 卖给银行：夜间也要是红的，但用暗红，别在暗底上太扎眼（老爷 2026-11-12）
   —— 必须带 .sell，否则被上面那条 html.map-dark button.secondary 的灰黑底盖掉 */
html.map-dark button.secondary.sell { background: linear-gradient(180deg, #8c2f2f, #6d1f1f); color: #fff; border-color: #7a2a2a; }
html.map-dark button.secondary.sell small { color: rgba(255, 255, 255, 0.9); }
html.map-dark button.secondary.sell:active { background: linear-gradient(180deg, #7a2828, #5c1a1a); }
html.map-dark .asset-item .asell { background: #3a1f26; color: #fda4af; border-color: #4a2830; }
/* 文字层级 */
html.map-dark .logrow { color: #cbd5e1; border-bottom-color: #263140; }
html.map-dark .tiny { color: #8b97a6; }
html.map-dark .hint { color: #93a0af; }
html.map-dark .ai-sub, html.map-dark .rr-sub, html.map-dark .rr-tax, html.map-dark .asset-group { color: #8b97a6; }
html.map-dark .hint b, html.map-dark .tiny b { color: #dbe3ec; }
/* 输入控件 */
html.map-dark input, html.map-dark select, html.map-dark textarea {
  background: #131a22; color: #e7ecf3; border-color: #2c3644;
}
html.map-dark input::placeholder, html.map-dark textarea::placeholder { color: #6b7787; }
/* 弹窗外框 / 内嵌页 */
html.map-dark .ev-box { background: #1a222c; }
html.map-dark #supFrame { background: #1a222c; }
/* 休眠蒙层（3 分钟无操作的小卡片）也跟着夜间走 */
html.map-dark .sleepveil { background: rgba(4, 8, 14, 0.78); }
html.map-dark .sleepveil .sleepcard { background: rgba(26, 34, 44, 0.97); color: #e7ecf3;
  border: 1px solid #2b3542; box-shadow: 0 16px 44px rgba(0,0,0,.65); }
html.map-dark .sleepveil b { color: #e7ecf3; }
html.map-dark .sleepveil span { color: #93a0af; }
html.map-dark #encModal .enc-card { background: #1a222c; }
html.map-dark .pwhint span.ok { background: #16301f; color: #6ee7a0; }
/* 选中态保持品牌蓝 */
html.map-dark .assets-tabs button.on { background: #2563eb; color: #fff; }

/* 排行榜：自己那一行原来是浅蓝底；名次/小字原来也是浅色系 */
html.map-dark .rank-row.me { background: #1e3358; }
html.map-dark .rank-row .rk { color: #93a0af; }
html.map-dark .rank-row .st { color: #7c8899; }

/* 汉堡菜单：不依赖 .menuitem —— 后来新加的菜单项忘写 class 也照样是浅色字 */
html.map-dark #menuPop button { color: #e7ecf3; }
html.map-dark #menuPop .menuitem.alert { color: #fca5a5; }

/* 产业 / 收租 列表：街名与卡池标题同色，小字与卡池小字同色 */
html.map-dark .asset-item .ai-top .an { color: #e7ecf3; }
html.map-dark .asset-item .ai-sub { color: #93a0af; }
html.map-dark .asset-item .rr-sub { color: #93a0af; }
html.map-dark .asset-item .rr-amt { color: #4ade80; }

/* 地图上的街道弹出卡片（maplibre popup）：白底 → 深底 */
html.map-dark .maplibregl-popup-content {
  background: #1a222c !important;
  color: #e7ecf3;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
html.map-dark .maplibregl-popup-anchor-top .maplibregl-popup-tip,
html.map-dark .maplibregl-popup-anchor-top-left .maplibregl-popup-tip,
html.map-dark .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: #1a222c !important; }
html.map-dark .maplibregl-popup-anchor-bottom .maplibregl-popup-tip,
html.map-dark .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip,
html.map-dark .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: #1a222c !important; }
html.map-dark .maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: #1a222c !important; }
html.map-dark .maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: #1a222c !important; }
html.map-dark .pop-row.tiny { color: #93a0af; }
html.map-dark .pop-name { color: #f1f5f9; }

/* 遭遇 / 机会卡大卡片：标题和正文原来是为白底配的深色 */
html.map-dark #encModal h2 { color: #f1f5f9; }
html.map-dark #encModal p { color: #b6c2cf; }
html.map-dark #encModal .tag { color: #93a0af; }
html.map-dark #encModal .amt.bad { color: #f87171; }
html.map-dark #encModal .amt.good { color: #34d399; }

/* 深色下把「赚钱/亏钱」的绿红提亮（白底用的深绿深红在深底上看不清） */
html.map-dark { --good: #34d399; --bad: #f87171; }

/* ---------- 更新日志（玩家版：js/changelog.js 里 pub:true 的条目） ---------- */
.chg-list { max-height: 58vh; overflow: auto; margin: 0 -2px; }
.chg-day { padding: 12px 0 4px; border-top: 1px solid var(--line); }
.chg-day:first-child { border-top: 0; padding-top: 0; }
.chg-date { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.chg-item { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; }
.chg-chip { flex: 0 0 auto; font-size: 11px; font-weight: 700; line-height: 1.7;
  padding: 0 8px; border-radius: 999px; border: 1px solid currentColor; }
.chg-chip.new { color: #0e5fd6; }
.chg-chip.bal { color: #b45309; }
.chg-chip.ux  { color: #15803d; }
.chg-chip.fix { color: #7c3aed; }
.chg-chip.sec { color: #b91c1c; }
.chg-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.55; color: var(--text); }
html.map-dark .chg-chip.new { color: #7aa8ff; }
html.map-dark .chg-chip.bal { color: #fbbf24; }
html.map-dark .chg-chip.ux  { color: #34d399; }
html.map-dark .chg-chip.fix { color: #a78bfa; }
html.map-dark .chg-chip.sec { color: #f87171; }

/* ---- 小屏安全（2026-11-04）：所有弹窗本体不超过视口，内容在弹窗里自己滚 ----
   老爷在手机上打开「我的卡片」，弹窗比屏幕还高，上下都看不见。
   登录/注册弹窗例外：logo 是故意用负上边距顶出弹窗的，加 overflow 会把 logo 裁掉。 */
.modal-box{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);
           overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
#loginModal .modal-box,#registerModal .modal-box{max-height:none;overflow:visible}
/* ---- 小屏安全（续）：街上弹出的卡片 / 汉堡菜单 / 遭遇卡也不能超屏 ---- */
.maplibregl-popup-content{max-height:calc(100vh - 150px);max-height:calc(100dvh - 150px);
  overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.menupop{max-height:calc(100vh - 60px);max-height:calc(100dvh - 60px);
  overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
#encModal .enc-card{max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);
  overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}

/* ---- 收租/产业弹窗（2026-11-05 老爷：收租会超出屏幕，产业正常）
   统一成「标题 + 标签固定，列表自己滚，底部按钮永远可见」，两个 tab 一个样。
   只作用于 #assetsModal，卡片/通知等其他弹窗不受影响。 */
#assetsModal .modal-box{display:flex;flex-direction:column;overflow:hidden;
  max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px)}
#assetsModal .modal-box>h2,#assetsModal .assets-tabs,#assetsModal #rentSummary{flex:0 0 auto}
#assetsModal .assets-body{flex:1 1 auto;min-height:0;max-height:none;
  overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
#assetsModal #rentPane:not(.hidden){display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
#assetsModal #btnRentAll,#assetsModal #btnCloseAssets{flex:0 0 auto}

/* ---- 个人资料弹窗（2026-11-05 老爷：资料页也超出屏幕，顶部金币被切）
   「标题固定 + 数据区自己滚 + 底部两个按钮永远可见」；外面那层整页可滚，
   旧浏览器不认 dvh 时不会再把弹窗上下裁掉。 */
.modal{align-items:flex-start;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.modal-box{margin:auto}
#loginModal,#registerModal{align-items:center}      /* 登录/注册照旧居中：logo 是负边距顶出去的 */
#accountModal .modal-box{display:flex;flex-direction:column;overflow:hidden;
  max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px)}
#accountModal .acchdr{flex:0 0 auto}
#accountModal #accStats{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain}
#accountModal .modal-box>button{flex:0 0 auto}

/* ---------------------------------------------------- 别人的棋子（2026-11-06）
 * 半透明 + 名字；自己的棋子（#mePiece）不变。追加在末尾，避免被前面那份覆盖。
 */
.ghostPawn {
  /* 2026-11-12 拍一拍：必须能点到，否则真人点击被地图吞掉（原来 none，程序化 click 能过、手指点不到） */
  width: 34px; pointer-events: auto; cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.3));
}
/* 只有小人是半透明的，名字要看得清（MapLibre 会往 marker 上写 inline opacity，别跟它抢） */
.ghostPawn .gp-hop { width: 34px; height: 40px; transform-origin: 50% 100%; opacity: 0.55; }
.ghostPawn .gp-hop svg { width: 100%; height: 100%; }
.ghostPawn .gp-name {
  /* 棋子本体只有 34px 宽，名字要能整个露出来 → 绝对定位到棋子下方居中 */
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, -2px);
  font-size: 10.5px; line-height: 1.15; font-weight: 700; opacity: 0.95;
  text-align: center; white-space: nowrap; color: #fff;
  background: rgba(15, 23, 42, 0.72); border-radius: 6px; padding: 1px 5px;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
  /* 名字用的是玩家自己的颜色，浅色/深色都会糊在地图上 → 加一圈白色描边
     （老爷 2026-11-07 定稿：0.7px × 8 方向 + 1.5px 柔光） */
  text-shadow:
    -0.7px -0.7px 0 #fff, 0 -0.7px 0 #fff, 0.7px -0.7px 0 #fff,
    -0.7px  0    0 #fff,                   0.7px  0    0 #fff,
    -0.7px  0.7px 0 #fff, 0  0.7px 0 #fff, 0.7px  0.7px 0 #fff,
    0 0 1.5px rgba(255, 255, 255, 0.7);
}
/* 手指点击面积放到 46×52（棋子本体只有 34px 宽） */
.ghostPawn::after { content: ""; position: absolute; left: 50%; top: 50%;
  width: 46px; height: 52px; transform: translate(-50%, -50%); }
.ghostPawn, .maplibregl-marker:has(.ghostPawn) { z-index: 15 !important; }

/* ---------------------------------------------------- 游戏内确认弹窗（2026-11-08）
 * 替代浏览器原生 window.confirm：原生框在 Windows / iOS / 安卓长得都不一样（Windows 上
 * 是「game.0086.ie 显示」那种报错样式），还会把整页冻住。这里复用站点 .modal/.modal-box，
 * 标题 + 正文（保留换行）+ 两个手机够大的按钮。逻辑在 js/confirm.js。
 */
#askModal { z-index: 90; }                        /* 盖过账户/卡片等二级弹窗（它们 70） */
#askModal .ask-box { max-width: 380px; }
#askModal .ask-title { font-size: 17px; margin: 0 0 8px; }
#askModal .ask-body {
  white-space: pre-line; font-size: 13.5px; line-height: 1.65;
  color: #334155; margin: 0 0 16px; word-break: break-word;
}
#askModal .ask-actions { display: flex; gap: 10px; }
/* 两个按钮各占一半、46px 高：手机单手点得中 */
#askModal .ask-actions button { flex: 1 1 0; width: auto; margin: 0; min-height: 46px; font-size: 15px; }
#askModal button.primary.danger { background: linear-gradient(180deg, #b91c1c, #991b1b); }
html.map-dark #askModal .ask-body { color: #c9d3e0; }
/* 确认弹窗里的输入框（挂牌价）：16px 字体避免 iOS 聚焦时自动放大 */
#askModal .ask-input {
  width: 100%; box-sizing: border-box; margin: 0 0 14px; padding: 11px 12px;
  border: 1px solid #cbd5e1; border-radius: 11px;
  font: inherit; font-size: 16px; color: #111827; background: #fff;
}
#askModal .ask-input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
html.map-dark #askModal .ask-input { background: #0f1620; color: #e7ecf3; border-color: #33445c; }

/* ------------------------------------------------- 邀请好友（2026-11-13）
   一人一条链接：前 4 位好友买下第一条街各给 2,500 金币，第 5 位给限定棋子「好友星章」 */
.invslots { display: flex; gap: 6px; }
.invslot { flex: 1; position: relative; text-align: center; padding: 8px 2px 6px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.invslot .em { height: 26px; display: grid; place-items: center; font-size: 18px; line-height: 1; }
.invslot .em img { width: 28px; height: 26px; object-fit: contain; }
.invslot .n { font-size: 10px; font-weight: 700; color: #94a3b8; margin-top: 5px; }
.invslot.done { background: #f0fdf4; border-color: #bbf7d0; }
.invslot.done .n { color: var(--good, #15803d); }
.invslot.done::after { content: "✓"; position: absolute; top: -6px; right: -4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--good, #15803d); color: #fff; font-size: 9px; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.invslot.gem { border-color: #fcd34d; background: linear-gradient(180deg, #fffbeb, #fff7e6); }
.invslot.gem .n { color: #b45309; }
.invbar { height: 8px; border-radius: 99px; background: #e9eef5; margin: 12px 0 0; overflow: hidden; }
.invbar i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #f59e0b, #f97316); transition: width .3s; }
.invnote { margin-top: 10px; font-size: 12px; line-height: 1.55; color: #0f172a;
  background: linear-gradient(180deg, #fffbeb, #fff7e6); border: 1px solid #fde68a;
  border-radius: 11px; padding: 10px 12px; }
.invacts { display: flex; gap: 8px; margin-top: 12px; }
.invacts button { flex: 1; margin-top: 0; }
html.map-dark .invnote { color: #e7ecf3; background: linear-gradient(180deg, #241f12, #1b1a13); border-color: #7c5c12; }
/* 夜间模式（html.map-dark） */
html.map-dark .invslot { background: #111c2b; border-color: #233247; }
html.map-dark .invslot .n { color: #8595ab; }
html.map-dark .invslot.done { background: #0f2417; border-color: #1d5c36; }
html.map-dark .invslot.gem { background: linear-gradient(180deg, #2a2210, #1d1a0f); border-color: #7c5c12; }
html.map-dark .invslot.done::after { box-shadow: 0 0 0 2px #111c2b; }
html.map-dark .invbar { background: #1e2b3d; }
