: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));
  pointer-events: none;
}
#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;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  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.92);   /* 和状态栏同一口径 */
  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, #1e3a8a, #2563eb);
  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; }
#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));
  pointer-events: none;
}
#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;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  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.92);   /* 和状态栏同一口径 */
  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, #1e3a8a, #2563eb);
  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; }
#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; }
}

/* 动态里的街名链接（挂牌） */
.logrow a.lnk { color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.logrow 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 { display: flex !important; } }

/* 菜单项显示规则（最后声明，优先级最高） */
@media (min-width: 721px) {
  #btnMarket { display: none !important; }
  #btnCards { display: none !important; }
  #btnCheckinMenu { display: none !important; }
}
@media (max-width: 720px) {
  #btnMarket { display: flex !important; }
  #btnCards { display: flex !important; }
  #btnCheckinMenu { 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; }


/* 汉堡菜单项的红底提醒（竞价 / 我的产业） */
.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: #fff !important;
  color: var(--brand, #0e5fd6) !important;
  border: 2px solid var(--brand, #0e5fd6) !important;
  font-weight: 700;
}


/* 通知里的「确认」按钮基线对齐（别往下掉） */
.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 > 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}
