:root {
  --ink: #3b4a44;
  --paper: rgba(244, 242, 233, 0.92);
  --jade: #6f8f7a;
  --jade-deep: #4d6b58;
  --line: rgba(59, 74, 68, 0.14);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #aab9b2; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
}
#app { position: fixed; inset: 0; }
#app canvas { display: block; width: 100%; height: 100%; outline: none; }
.hidden { display: none !important; }

/* ---------- 加载层 ---------- */
.loader {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #b7c6bf 0%, #d8ddd2 55%, #c9d1c4 100%);
  transition: opacity 0.9s ease;
}
.loader.fade { opacity: 0; pointer-events: none; }
.loader-inner { text-align: center; width: min(340px, 78vw); }
.loader-brand { font-size: 26px; letter-spacing: 0.34em; font-weight: 600; text-indent: 0.34em; color: #46594f; }
.loader-slogan { margin-top: 12px; font-size: 12px; letter-spacing: 0.16em; color: #6b7d72; }
.loader-bar { margin-top: 34px; height: 3px; border-radius: 3px; background: rgba(59,74,68,0.15); overflow: hidden; }
.loader-fill { height: 100%; width: 0%; background: var(--jade-deep); transition: width 0.25s ease; }
.loader-text { margin-top: 12px; font-size: 11px; letter-spacing: 0.1em; color: #7d8d83; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 16px 0;
  pointer-events: none;
}
.title-name { font-size: 15px; letter-spacing: 0.24em; color: #405148; text-shadow: 0 1px 6px rgba(255,255,255,0.6); }
.title-slogan { margin-top: 3px; font-size: 10px; letter-spacing: 0.1em; color: #5f7267; text-shadow: 0 1px 6px rgba(255,255,255,0.6); }
.topbar-actions { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.identity {
  padding: 6px 12px; font-size: 12px; letter-spacing: 0.1em;
  color: #4a5d52; background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; backdrop-filter: blur(6px);
}
.peer-tag {
  padding: 6px 11px; font-size: 11px; letter-spacing: 0.08em;
  color: #55695d; background: rgba(244,242,233,0.82); border: 1px solid var(--line);
  border-radius: 999px; backdrop-filter: blur(6px);
}
.icon-btn {
  min-width: 34px; height: 34px; padding: 0 9px;
  font-size: 14px; color: #4a5d52; background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(6px);
}
.icon-btn:active { transform: scale(0.95); }
.room-tag { font-size: 10px; color: #8a9a90; }

/* ---------- 交互提示 ---------- */
.hint { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 22; display: flex; gap: 10px; align-items: center; }
.hint-btn {
  padding: 10px 26px; font-size: 14px; letter-spacing: 0.14em; color: #f3f4ee;
  background: rgba(77,107,88,0.92); border: none; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(40,60,48,0.28); cursor: pointer;
  animation: breathe 2.4s ease-in-out infinite;
}
.hint-btn-alt { background: rgba(96,88,72,0.9); font-size: 13px; padding: 10px 20px; }
@keyframes breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.hint-btn:active { transform: scale(0.97); }

/* ---------- 游船：选船面板 + 船上三区操作条 ---------- */
.boat-mask {
  position: fixed; inset: 0; z-index: 41; display: flex; align-items: center; justify-content: center;
  background: rgba(24,34,28,0.42); backdrop-filter: blur(4px); padding: 16px;
}
.boat-picker {
  width: min(560px, 94vw); max-height: 88vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 20px 70px rgba(20,34,26,0.34);
}
.boat-picker-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px; border-bottom: 1px solid var(--line); }
.boat-picker-head h3 { margin: 0; font-size: 16px; letter-spacing: 0.2em; font-weight: 600; }
.boat-picker-rule { margin: 14px 22px 8px; font-size: 12px; line-height: 1.8; color: #6b7d72; }
.boat-picker-rule b { color: var(--jade-deep); font-weight: 600; }
.fare-note { color: #b6523f !important; margin-left: 6px; }
.boat-card:disabled, .tram-seat:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.boat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 10px 22px 18px; }
.boat-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  padding: 14px 14px 12px; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.boat-card:hover { transform: translateY(-3px); border-color: var(--jade-deep); box-shadow: 0 8px 20px rgba(40,60,48,0.16); }
.boat-swatch { display: block; width: 100%; height: 8px; border-radius: 5px; margin-bottom: 3px; }
.boat-card-name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: 0.08em; }
.boat-card-desc { font-size: 11px; color: #86958b; }
.boat-card-zones { font-size: 10px; color: #9a8f6f; margin-top: 2px; }
.boat-card-go { position: absolute; right: 12px; bottom: 11px; font-size: 12px; color: var(--jade-deep); }
.boat-picker-foot { padding: 0 22px 18px; font-size: 11px; color: #9aa79e; text-align: center; }

.boat-bar {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 23;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.boat-bar-title { font-size: 12px; letter-spacing: 0.14em; color: #f3f4ee; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.zone-timer { margin-left: 10px; font-size: 11px; letter-spacing: 0.06em; color: #ffe0a8; font-variant-numeric: tabular-nums; }
.boat-bar-btns { display: flex; gap: 8px; align-items: center; }
.boat-zone-btn, .boat-off-btn {
  padding: 9px 16px; font-size: 12px; letter-spacing: 0.08em; color: #f3f4ee;
  background: rgba(77,107,88,0.9); border: 1px solid rgba(255,255,255,0.14); border-radius: 999px;
  cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.boat-zone-btn.on { background: rgba(184,149,90,0.95); color: #2e2a20; font-weight: 600; }
.boat-zone-btn:active, .boat-off-btn:active { transform: scale(0.97); }
.boat-off-btn { background: rgba(96,88,72,0.92); }

.status {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 22;
  padding: 7px 18px; font-size: 12px; letter-spacing: 0.08em;
  color: #44564c; background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; backdrop-filter: blur(6px); white-space: nowrap;
  max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
}
.toast {
  position: fixed; left: 50%; bottom: 148px; transform: translateX(-50%); z-index: 30;
  padding: 10px 20px; font-size: 13px; color: #f3f4ee;
  background: rgba(59,74,68,0.9); border-radius: 999px;
  animation: rise 0.3s ease;
  max-width: 90vw; text-align: center;
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 园内公告（常驻，可关闭） ---------- */
.notice-banner {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 48;
  display: flex; align-items: center; gap: 10px;
  max-width: min(92vw, 640px); padding: 9px 12px 9px 16px;
  background: rgba(251, 246, 232, 0.97); color: #4a3f2c;
  border: 1px solid #d8c9a4; border-left: 4px solid #b9863c;
  border-radius: 10px; box-shadow: 0 6px 22px rgba(60, 50, 30, 0.18);
  font-size: 13px; animation: noticeDrop 0.35s ease;
}
@keyframes noticeDrop { from { opacity: 0; transform: translate(-50%, -14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.notice-icon { font-size: 15px; flex: 0 0 auto; }
.notice-text { flex: 1 1 auto; line-height: 1.5; }
.notice-close {
  flex: 0 0 auto; width: 22px; height: 22px; line-height: 20px; text-align: center;
  border: none; border-radius: 50%; background: transparent; color: #8a7a5e;
  font-size: 18px; cursor: pointer;
}
.notice-close:hover { background: rgba(0,0,0,0.07); color: #4a3f2c; }

/* ---------- 营地升级横幅 ---------- */
.tier-banner {
  position: fixed; left: 50%; top: 17%; z-index: 46; pointer-events: none;
  transform: translateX(-50%); text-align: center; white-space: nowrap;
  animation: tierIn 4.2s ease both;
}
/* 压一层柔和暗底：屋顶、山色都是浅的，光靠浅色字压不住 */
.tier-banner::before {
  content: ""; position: absolute; inset: -30px -80px; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(22,28,26,0.62) 0%, rgba(22,28,26,0.36) 46%, rgba(22,28,26,0) 74%);
}
.tier-kicker {
  font-size: 11px; letter-spacing: 0.52em; color: #f0e2c0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.95), 0 0 12px rgba(0,0,0,0.8);
  padding-left: 0.52em;
}
.tier-name {
  font-family: "Songti SC", "SimSun", serif;
  font-size: 40px; font-weight: 600; letter-spacing: 0.3em; padding-left: 0.3em;
  color: #fff8e8; margin: 4px 0 10px;
  text-shadow: 0 0 4px rgba(28,22,14,0.95), 0 2px 12px rgba(0,0,0,0.9), 0 0 48px rgba(255,196,120,0.6);
}
.tier-name::before, .tier-name::after {
  content: ""; display: inline-block; vertical-align: middle;
  width: 54px; height: 1px; margin: 0 16px 8px;
  background: linear-gradient(90deg, transparent, rgba(255,226,178,0.9), transparent);
  box-shadow: 0 0 6px rgba(0,0,0,0.6);
}
.tier-note {
  font-size: 12px; letter-spacing: 0.2em; color: #f2e9d4; opacity: 0.95;
  text-shadow: 0 1px 5px rgba(0,0,0,0.95), 0 0 14px rgba(0,0,0,0.7);
}
@keyframes tierIn {
  0% { opacity: 0; transform: translate(-50%, 16px); }
  14% { opacity: 1; transform: translate(-50%, 0); }
  74% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}
@media (max-width: 760px) {
  .tier-name { font-size: 28px; }
  .tier-name::before, .tier-name::after { width: 26px; margin: 0 8px 6px; }
}

/* ---------- 云栖戏台：点曲落座 ---------- */
.opera-picker { width: min(600px, 94vw); max-height: 92vh; display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.opera-cards-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; flex: 1 1 auto; min-height: 116px; max-height: 42vh; }
.opera-stage {
  margin: 14px 22px 6px; padding: 20px 18px 18px; text-align: center;
  background: linear-gradient(180deg, #3c2a25 0%, #5a3a30 60%, #6b4636 100%);
  border: 1px solid #8d6a4a; border-radius: 12px; color: #f4e6c8;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}
.opera-now { font-size: 18px; letter-spacing: 0.16em; font-weight: 600; color: #f0d39a; }
.opera-actor { margin-top: 5px; font-size: 11px; letter-spacing: 0.1em; color: #cbb08a; }
.opera-line { margin-top: 18px; font-size: 15px; line-height: 1.9; letter-spacing: 0.06em; min-height: 56px; color: #fbf1dc; }
.opera-progress { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.opera-progress span { width: 18px; height: 3px; border-radius: 3px; background: rgba(240,211,154,0.28); }
.opera-progress span.on { background: #f0d39a; }
.opera-controls { display: flex; gap: 8px; justify-content: center; padding: 12px 22px 4px; flex-wrap: wrap; }
.opera-ctrl {
  padding: 8px 16px; font-size: 12px; letter-spacing: 0.08em; cursor: pointer;
  color: var(--jade-deep); background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.opera-ctrl.on { color: #fff; background: var(--jade-deep); border-color: var(--jade-deep); }
.opera-ctrl.leave { color: #8a5a44; border-color: rgba(138,90,68,0.3); }
.opera-ctrl:active { transform: scale(0.97); }
.opera-list-title { margin: 14px 22px 2px; font-size: 11px; letter-spacing: 0.18em; color: #9aa79e; }
.opera-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 10px 22px 18px; }
.opera-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 13px 13px 11px; text-align: left; cursor: pointer; background: #fff;
  border: 1px solid var(--line); border-radius: 11px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.opera-card:hover { transform: translateY(-3px); border-color: var(--jade-deep); box-shadow: 0 8px 20px rgba(40,60,48,0.16); }
.opera-card.on { border-color: #b5563f; box-shadow: 0 0 0 2px rgba(181,86,63,0.18); }
.opera-swatch { display: block; width: 100%; height: 7px; border-radius: 5px; margin-bottom: 3px; }
.opera-card b { font-size: 13px; color: var(--ink); letter-spacing: 0.04em; }
.opera-genre { font-size: 10px; color: #a07a52; }
.opera-desc { font-size: 10px; color: #94a299; }

/* ---------- 设置面板 ---------- */
.panel {
  position: fixed; z-index: 40; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(360px, 90vw); max-height: 84vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 60px rgba(30,45,36,0.28); backdrop-filter: blur(12px);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 15px; letter-spacing: 0.18em; font-weight: 600; }
.close-btn { width: 28px; height: 28px; font-size: 20px; line-height: 1; color: #6b7d72; background: transparent; border: none; cursor: pointer; }
.panel-body { padding: 16px 18px 20px; }
.row { display: flex; align-items: center; justify-content: space-between; min-height: 42px; font-size: 13px; }
.row input[type="range"] { width: 55%; accent-color: var(--jade-deep); }
.row select {
  padding: 5px 8px; font-size: 12px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
}
.row-btns { gap: 10px; margin-top: 6px; }
.soft-btn {
  flex: 1; padding: 9px 0; font-size: 12px; color: #4a5d52;
  background: rgba(111,143,122,0.12); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.panel-note { margin: 14px 0 0; font-size: 11px; line-height: 1.7; color: #86958b; }

/* ---------- 移动端摇杆 ---------- */
.joystick {
  position: fixed; left: 24px; bottom: max(28px, env(safe-area-inset-bottom));
  width: 108px; height: 108px; border-radius: 50%;
  background: rgba(244,242,233,0.26); border: 1px solid rgba(255,255,255,0.35);
  z-index: 21; touch-action: none;
}
.joystick-knob {
  position: absolute; left: 50%; top: 50%; width: 46px; height: 46px;
  margin: -23px 0 0 -23px; border-radius: 50%;
  background: rgba(244,242,233,0.7); border: 1px solid rgba(255,255,255,0.5);
}

.loader.leave { background: rgba(200, 213, 204, 0.96); z-index: 70; }

.fatal {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 30px; text-align: center; font-size: 14px; line-height: 1.8;
  color: #5a463f; background: #efeae1;
}
.fatal-msg { max-width: 560px; }
.fatal-btn {
  font: inherit; cursor: pointer; padding: 10px 26px; border-radius: 22px;
  color: #f6f4ec; background: #5c7a68; border: 1px solid #4d6a58;
}
.fatal-btn:hover { background: #4d6a58; }

/* 首次入园操作引导 */
.guide-mask {
  position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(32,45,38,0.34); backdrop-filter: blur(3px);
}
.guide-card {
  width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 24px 26px;
  border-radius: 16px; background: rgba(247,246,239,0.97);
  border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 18px 60px rgba(30,40,34,0.22);
}
.guide-title { font-size: 20px; font-weight: 600; letter-spacing: 2px; color: #3f5549; }
.guide-sub { margin: 6px 0 18px; font-size: 12px; color: #8a9a90; }
.guide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guide-item { padding: 11px 13px; border-radius: 10px; background: rgba(224,231,222,0.6); }
.guide-item b { display: block; font-size: 12px; color: #4a6354; margin-bottom: 4px; }
.guide-item span { font-size: 11px; line-height: 1.6; color: #66766c; }
.guide-item.warn { background: rgba(214,223,211,0.9); }
.guide-item.warn b { color: #8a6a45; }
.guide-ok {
  display: block; width: 100%; margin-top: 18px; padding: 11px; border: 0; border-radius: 9px;
  background: #68877a; color: #fff; font-size: 14px; letter-spacing: 4px; cursor: pointer;
}
.guide-ok:hover { background: #587767; }

/* 常驻操作条 */
.control-tip {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 7px 14px; border-radius: 999px;
  background: rgba(244,242,233,0.74); border: 1px solid rgba(255,255,255,0.42);
  font-size: 11px; color: #66766c; white-space: nowrap; backdrop-filter: blur(4px);
}
.ctl-mobile { display: none; }
.ctl-guide {
  border: 0; background: none; color: #5c7c6c; cursor: pointer;
  font-size: 11px; text-decoration: underline; padding: 0;
}

@media (max-width: 600px) {
  .title-slogan { display: none; }
  .identity { padding: 5px 9px; font-size: 11px; }
  .peer-tag { padding: 5px 8px; font-size: 10px; }
  .hint { bottom: 150px; }
  .boat-bar { bottom: 150px; }
  .boat-zone-btn, .boat-off-btn { padding: 8px 11px; font-size: 11px; }
  .status { top: 62px; font-size: 11px; }
  .toast { bottom: 200px; }
  .ctl-pc { display: none; }
  .ctl-mobile { display: inline; }
  .control-tip { bottom: 6px; font-size: 10px; padding: 6px 10px; max-width: 96vw; overflow: hidden; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { padding: 20px; }
}

/* ---------- 书卷面板 ---------- */
.book-mask {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 24, 20, 0.55);
  backdrop-filter: blur(3px);
}
.book-panel {
  position: relative;
  width: min(680px, 92vw); max-height: 84vh;
  display: flex; flex-direction: column;
  padding: 26px 30px 22px;
  color: #3b342a;
  background: linear-gradient(135deg, #f6efdc 0%, #eee3c6 100%);
  border: 1px solid rgba(120, 96, 56, 0.35);
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45), inset 0 0 40px rgba(190,160,100,0.25);
}
.book-panel::before {
  content: ""; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px;
  background: rgba(150, 110, 60, 0.35);
}
.book-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(120,96,56,0.25); padding-bottom: 12px; }
.book-title { font-size: 21px; font-weight: 700; letter-spacing: 1px; }
.book-author { margin-top: 5px; font-size: 12px; color: #7a6a4e; }
.book-close, .book-nav, .book-list-btn {
  font: inherit; cursor: pointer; color: #5a4a30;
  background: rgba(255,255,255,0.45); border: 1px solid rgba(120,96,56,0.35);
  border-radius: 4px; padding: 6px 12px; transition: background .15s;
}
.book-close:hover, .book-nav:hover, .book-list-btn:hover { background: rgba(255,255,255,0.85); }
.book-page {
  flex: 1; min-height: 160px; overflow-y: auto;
  margin: 18px 0; padding-right: 8px;
  font-size: 16px; line-height: 2.05; letter-spacing: 0.5px; text-align: justify;
}
.book-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.book-pageno { font-size: 13px; color: #7a6a4e; }
.book-list-btn { align-self: center; margin-top: 10px; font-size: 13px; }
.book-list-mask {
  position: absolute; inset: 0; border-radius: 6px;
  background: rgba(246,239,220,0.98);
  display: flex; align-items: center; justify-content: center;
}
.book-list { width: 88%; max-height: 80%; overflow-y: auto; }
.book-list-head { font-size: 18px; font-weight: 700; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.book-list-item {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 15px;
  cursor: pointer; color: #5a4a30; padding: 10px 14px; margin-bottom: 8px;
  background: rgba(255,255,255,0.5); border: 1px solid rgba(120,96,56,0.25); border-radius: 4px;
}
.book-list-item.on { background: #d9c9a3; font-weight: 700; }
.book-list-item:hover { background: rgba(255,255,255,0.9); }
.book-list-note { margin-top: 12px; font-size: 12px; color: #8a7a5e; }
@media (max-width: 640px) {
  .book-panel { padding: 18px; }
  .book-page { font-size: 15px; line-height: 1.9; }
  .book-title { font-size: 18px; }
}

/* ===== 路引面板 ===== */
.route-panel {
  width: min(560px, 92vw); max-height: 82vh; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 24px; color: #3b342a;
  background: linear-gradient(135deg, #f6efdc 0%, #eee3c6 100%);
  border: 1px solid rgba(120, 96, 56, 0.35); border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}
.route-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding-right: 4px; }
.route-item {
  display: grid; grid-template-columns: 1fr auto; align-items: start; column-gap: 12px;
  text-align: left; font: inherit; cursor: pointer;
  padding: 12px 14px; border-radius: 6px; color: #5a4a30;
  background: rgba(255,255,255,0.55); border: 1px solid rgba(120,96,56,0.25);
}
.route-item:hover { background: rgba(255,255,255,0.92); }
.route-name { grid-column: 1; font-size: 15px; font-weight: 600; }
.route-meta {
  grid-column: 1; margin-top: 4px; font-size: 12px; line-height: 1.55; color: #7a6a4e;
  overflow-wrap: anywhere; word-break: break-word;
}
.route-go {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap;
  font-size: 12px; color: #4d6a58;
}
.route-note { font-size: 12px; color: #8a7a5e; line-height: 1.7; }

/* ===== 自动走状态条 ===== */
.walk-bar {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 55; display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 22px; font-size: 13px; color: #f4f2e8;
  background: rgba(52, 68, 58, 0.86); border: 1px solid rgba(255,255,255,0.18);
}
.walk-stop { font: inherit; cursor: pointer; padding: 4px 12px; border-radius: 14px; color: #34443a; background: #e8e2cf; border: none; }

/* ===== 钓鱼面板 ===== */
.fish-wrap {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  z-index: 58; width: min(520px, 94vw);
}
.fish-panel {
  position: relative; padding: 14px 16px; border-radius: 12px; color: #3b342a;
  background: rgba(246, 240, 226, 0.96); border: 1px solid rgba(120,96,56,0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.fish-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fish-spot { font-size: 14px; font-weight: 600; }
.fish-spot i { font-style: normal; font-size: 12px; color: #7a6a4e; font-weight: 400; }
.fish-head-btns { display: flex; gap: 6px; }
.fish-baits { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.bait-chip {
  font: inherit; font-size: 13px; cursor: pointer; padding: 4px 12px; border-radius: 14px;
  color: #5a4a30; background: rgba(255,255,255,0.6); border: 1px solid rgba(120,96,56,0.3);
}
.bait-chip.on { background: #cfdcb8; border-color: #7d9660; font-weight: 600; }
.fish-body { margin-top: 10px; }
.fish-bar { height: 12px; border-radius: 6px; background: rgba(120,96,56,0.18); overflow: hidden; }
.fish-bar i { display: block; height: 100%; transition: width .08s linear; }
.fish-bar i.power { background: linear-gradient(90deg,#8fb36a,#e0b04a); }
.fish-bar i.tension { background: linear-gradient(90deg,#7fa8c9,#d9683f); }
.fish-progress { height: 6px; margin-top: 6px; border-radius: 3px; background: rgba(120,96,56,0.14); overflow: hidden; }
.fish-progress i { display: block; height: 100%; background: #6f9a7c; }
.fish-msg { margin-top: 10px; font-size: 13px; min-height: 20px; color: #4d4438; }
.fish-msg.hot { color: #b4402c; font-weight: 600; }
.fish-actions { display: flex; gap: 10px; margin-top: 10px; }
.fish-btn {
  flex: 1; font: inherit; font-size: 13px; cursor: pointer; padding: 9px 14px; border-radius: 8px;
  color: #f6f4ec; background: #5c7a68; border: 1px solid #4d6a58;
}
.fish-btn.hot { background: #b4402c; border-color: #94331f; }
.fish-btn.ghost { color: #5c7a68; background: transparent; }
.catch-card {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: rgba(207, 220, 184, 0.5); border: 1px solid rgba(125, 150, 96, 0.5);
}
.catch-name { font-size: 16px; font-weight: 700; }
.catch-meta { margin-top: 3px; font-size: 12px; color: #5a5a44; }
.dex-mask { position: absolute; inset: 0; border-radius: 12px; background: rgba(246,240,226,0.98); display: flex; align-items: center; justify-content: center; }
.dex-panel { width: 90%; max-height: 86%; overflow-y: auto; }
.dex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.dex-item { padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,0.6); border: 1px solid rgba(120,96,56,0.2); font-size: 12px; }
.dex-item b { display: block; font-size: 13px; margin-bottom: 2px; }
.dex-empty { font-size: 12px; color: #8a7a5e; }
.dex-log { margin-top: 10px; font-size: 12px; color: #7a6a4e; line-height: 1.8; }

.icon-btn.text { width: auto; padding: 0 12px; font-size: 12px; letter-spacing: 1px; }
.icon-btn.text.afk-live { color: #f3f4ee; background: var(--jade-deep, #4d6b58); border-color: transparent; }
.afk-badge {
  position: fixed; right: 16px; top: 76px; z-index: 22;
  padding: 6px 14px; font-size: 11px; letter-spacing: 0.06em;
  color: #f3f4ee; background: rgba(77,107,88,0.9); border-radius: 999px;
  box-shadow: 0 4px 14px rgba(40,60,48,0.22);
}

/* ===== 自动跑任务（托管） ===== */
.auto-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.auto-run-btn {
  border: 1px solid var(--jade-deep, #4d6b58); background: var(--jade-deep, #4d6b58); color: #f3f4ee;
  border-radius: 999px; padding: 7px 16px; font-size: 12px; letter-spacing: .04em; cursor: pointer;
  transition: opacity .2s, transform .2s;
}
.auto-run-btn:hover { opacity: .88; transform: translateY(-1px); }
.auto-run-btn.on { background: #fff; color: #4d6b58; }
.auto-bar-tip { font-size: 10px; color: #93a096; line-height: 1.5; }

.auto-hud {
  position: fixed; right: 16px; top: 112px; z-index: 23;
  display: flex; align-items: center; gap: 9px; max-width: 340px;
  padding: 8px 10px 8px 12px; border-radius: 12px;
  color: #f3f4ee; background: rgba(52, 78, 62, .93);
  box-shadow: 0 6px 20px rgba(30, 45, 38, .28); border: 1px solid rgba(255, 255, 255, .14);
}
.auto-hud-dot { width: 8px; height: 8px; border-radius: 50%; background: #d8e58e; flex: 0 0 auto; animation: autoPulse 1.4s ease-in-out infinite; }
@keyframes autoPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }
.auto-hud-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auto-hud-info b { font-size: 11px; font-weight: 600; white-space: nowrap; }
.auto-hud-info span { font-size: 10px; opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.auto-hud-remain { font-style: normal; color: #ffe08a; font-weight: 600; opacity: .95; }
.auto-hud-phase { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .16); white-space: nowrap; }
.auto-hud-stop { border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; border-radius: 999px; padding: 3px 9px; font-size: 10px; cursor: pointer; white-space: nowrap; }
.auto-hud-stop:hover { background: rgba(255, 255, 255, .14); }
@media (max-width: 760px) { .auto-hud { right: 10px; top: 104px; max-width: calc(100vw - 20px); } .auto-bar-tip { flex-basis: 100%; } }

/* ===== 天气 / 时辰 ===== */
.weather-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); backdrop-filter: blur(6px);
  font-size: 12px; color: #4a5d52;
}
.weather-chip b { font-weight: 600; letter-spacing: 0.06em; }
.weather-chip span { font-size: 11px; color: #5f7267; }
.weather-chip em { font-style: normal; font-size: 10px; color: #8a9a90; }

/* ===== 采集 / 施工进度 ===== */
.hold-bar {
  position: fixed; left: 50%; bottom: 148px; transform: translateX(-50%);
  z-index: 56; display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(52, 68, 58, 0.88); color: #f4f2e8; font-size: 12px;
  box-shadow: 0 8px 26px rgba(30, 45, 36, 0.3);
}
.hold-label { letter-spacing: 0.06em; white-space: nowrap; }
.hold-track { width: 130px; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.2); overflow: hidden; }
.hold-track i { display: block; height: 100%; background: linear-gradient(90deg, #cfe0a8, #e8c07a); transition: width .08s linear; }
.hold-bar em { font-style: normal; font-size: 11px; opacity: 0.75; }

/* ===== 营造面板 ===== */
.village-panel {
  width: min(900px, 94vw); max-height: 88vh;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 22px; color: #3b342a;
  background: linear-gradient(135deg, #f6efdc 0%, #eee3c6 100%);
  border: 1px solid rgba(120, 96, 56, 0.35); border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
}
.village-mats { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.mat-chip {
  display: flex; align-items: center; gap: 5px; font-size: 12px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.55); border: 1px solid rgba(120,96,56,0.22);
}
.mat-chip i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.mat-chip b { font-weight: 600; }
.tool-chip {
  margin-left: auto; font: inherit; font-size: 12px; cursor: pointer;
  padding: 5px 12px; border-radius: 999px;
  background: #d9c9a3; border: 1px solid rgba(120,96,56,0.35); color: #4a3b28;
}
.wx-chip {
  margin-left: 6px; font-size: 11px; padding: 5px 10px; border-radius: 999px;
  color: #4a5b50; background: rgba(112,142,120,0.12); border: 1px solid rgba(112,142,120,0.3);
  white-space: nowrap; cursor: help;
}
.wx-chip.wet { color: #7a5426; background: rgba(198,150,78,0.18); border-color: rgba(178,130,62,0.42); }
@media (max-width: 760px) { .wx-chip { margin-left: 0; } }
.village-body { display: grid; grid-template-columns: 296px 1fr; gap: 14px; min-height: 0; flex: 1; }
.village-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 52vh; padding-right: 4px; }
.village-tabs { display: flex; gap: 4px; margin-bottom: 4px; position: sticky; top: 0; z-index: 2; background: #f4ecda; padding-bottom: 4px; }
.village-tabs button {
  flex: 1; font: inherit; font-size: 11px; cursor: pointer; padding: 5px 2px;
  border-radius: 5px; border: 1px solid rgba(120,96,56,0.25);
  background: rgba(255,255,255,0.5); color: #6a5a40;
}
.village-tabs button.on { background: #cfdcb8; border-color: #7d9660; font-weight: 600; }
.plot-row {
  display: flex; align-items: center; gap: 8px; text-align: left;
  font: inherit; font-size: 12px; cursor: pointer; padding: 7px 9px;
  border-radius: 5px; border: 1px solid rgba(120,96,56,0.2);
  background: rgba(255,255,255,0.5); color: #5a4a30;
}
.plot-row.on { background: #e6dcc0; border-color: #a98d5c; }
.plot-row.done { background: rgba(207,220,184,0.55); }
.plot-row.locked { opacity: 0.48; }
.plot-code { min-width: 44px; font-weight: 600; }
.plot-state { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plot-badge { font-size: 10px; color: #7a6a4e; }
.village-detail { display: flex; flex-direction: column; gap: 9px; overflow-y: auto; max-height: 52vh; padding-right: 4px; }
.detail-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.detail-head b { font-size: 16px; }
.tag { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,0.6); border: 1px solid rgba(120,96,56,0.25); }
.tag.ok { background: #cfdcb8; }
.tag.work { background: #e8d3a2; }
.tag.own { background: #dcd2bb; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-btn {
  font: inherit; font-size: 12px; cursor: pointer; padding: 7px 14px; border-radius: 6px;
  color: #f6f4ec; background: #5c7a68; border: 1px solid #4d6a58;
}
.mini-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.mini-btn.ghost { color: #5c7a68; background: transparent; }
.mini-btn.work { background: #8a6a3c; border-color: #6f5330; }
.bp-list { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-chip {
  display: flex; flex-direction: column; gap: 2px; font: inherit; font-size: 12px;
  cursor: pointer; padding: 6px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.55); border: 1px solid rgba(120,96,56,0.25); color: #5a4a30;
}
.bp-chip.on { background: #cfdcb8; border-color: #7d9660; }
.bp-chip.off { opacity: 0.4; cursor: not-allowed; }
.bp-chip span { font-size: 10px; color: #7a6a4e; }
.bp-desc { font-size: 11px; color: #7a6a4e; line-height: 1.6; width: 100%; }
.cost-list { display: flex; flex-direction: column; gap: 4px; }
.cost-row { display: grid; grid-template-columns: 52px 68px 1fr; align-items: center; gap: 8px; font-size: 11px; color: #6a5a40; }
.cost-row i { font-style: normal; font-size: 11px; }
.cost-row.ok i { color: #4d6a58; font-weight: 600; }
.cost-track { height: 6px; border-radius: 3px; background: rgba(120,96,56,0.18); overflow: hidden; }
.cost-track b { display: block; height: 100%; background: #8aa877; }
.detail-note { font-size: 11px; color: #7a6a4e; line-height: 1.7; }
.village-help { margin-top: 4px; padding: 10px 12px; border-radius: 8px; background: rgba(224,231,222,0.55); font-size: 11px; line-height: 1.75; color: #5f7267; }
.village-help b { display: block; font-size: 12px; margin-bottom: 4px; color: #4a6354; }
.village-help p { margin: 0; }

/* ===== 公共料场 / 引继码 ===== */
.depot-row {
  padding: 7px 10px; border-radius: 8px;
  background: rgba(206, 220, 184, 0.35); border: 1px dashed rgba(120, 150, 96, 0.45);
}
.depot-label { font-size: 11px; font-weight: 600; color: #4a6354; letter-spacing: 0.08em; }
.mat-chip.small { padding: 3px 8px; font-size: 11px; }
.mat-chip.small i { width: 7px; height: 7px; }
.mini-btn.tiny { padding: 4px 10px; font-size: 11px; border-radius: 999px; }
.mini-btn.on { background: #b07a34; border-color: #8a5c22; }
.code-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(120, 96, 56, 0.2);
  font-size: 11px; color: #5a4a30;
}
.code-label { font-weight: 600; color: #4a6354; }
.code-text { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: 0.16em; font-size: 13px; }
.code-input {
  flex: 1; min-width: 120px; font: inherit; font-size: 11px; padding: 5px 9px;
  border-radius: 6px; border: 1px solid rgba(120, 96, 56, 0.3);
  background: rgba(255, 255, 255, 0.8); color: #4a3b28;
}
.mini-btn, .bp-chip, .plot-row { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* 手机上长按按钮会弹系统菜单，把「点此开工」的手势彻底掐干净 */
.village-panel button { -webkit-touch-callout: none; user-select: none; }

@media (max-width: 760px) {
  .village-panel { padding: 14px; max-height: 92vh; }
  .village-body { grid-template-columns: 1fr; }
  .village-list { max-height: 28vh; }
  .village-detail { max-height: 44vh; }
  .weather-chip em { display: none; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
}

.lock-toggle {
  align-self: flex-start; font: inherit; font-size: 10px; cursor: pointer;
  padding: 3px 9px; margin: 0 0 3px; border-radius: 999px;
  color: #7a6a4e; background: transparent; border: 1px dashed rgba(120,96,56,0.35);
}
.lock-toggle.on { background: rgba(217,201,163,0.7); border-style: solid; }

/* ---------- 邻人对话 / 心情日记 / 呼吸引导（疗愈四景） ---------- */
.npc-panel {
  width: min(560px, 92vw); max-height: 86vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px 18px; backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(30, 45, 38, 0.25);
}
.npc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.npc-avatar {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #f4efe2; background: linear-gradient(145deg, #7f8f74, #566b58);
}
.npc-id { flex: 1; min-width: 0; }
.npc-name { font-size: 16px; font-weight: 600; letter-spacing: 0.06em; color: #3c4d43; }
.npc-role { margin-top: 3px; font-size: 11px; color: #73847a; }
.npc-aff { font-size: 11px; color: #7a6a4e; background: rgba(217,201,163,0.5); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.npc-text {
  margin: 18px 2px 20px; font-size: 14px; line-height: 2; color: #45564c;
  white-space: pre-line; letter-spacing: 0.02em;
}
.npc-options { display: flex; flex-wrap: wrap; gap: 9px; }
.npc-opt {
  font: inherit; font-size: 13px; cursor: pointer; padding: 9px 15px;
  color: #40564a; background: rgba(111,143,122,0.12); border: 1px solid rgba(77,107,88,0.28);
  border-radius: 999px; transition: background 0.15s;
}
.npc-opt:hover { background: rgba(111,143,122,0.26); }
.npc-opt:active { transform: scale(0.97); }
.npc-opt:disabled { opacity: 0.45; cursor: default; }
.npc-note { margin-top: 14px; font-size: 10px; color: #93a096; letter-spacing: 0.04em; }
/* DeepSeek 自由对话：气泡历史 + 输入条 */
.npc-chat {
  margin: 14px 0 16px; max-height: 46vh; min-height: 90px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; padding-right: 4px;
}
.npc-chat::-webkit-scrollbar { width: 5px; }
.npc-chat::-webkit-scrollbar-thumb { background: rgba(111,143,122,0.35); border-radius: 3px; }
.npc-bubble { display: flex; gap: 9px; align-items: flex-start; line-height: 1.8; }
.npc-bubble-who {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  color: #f4efe2; background: linear-gradient(145deg, #9a8a6a, #6d5f45);
}
.npc-bubble.mine { flex-direction: row-reverse; }
.npc-bubble.mine .npc-bubble-who { background: linear-gradient(145deg, #7f8f74, #566b58); }
.npc-bubble-text {
  font-size: 14px; color: #45564c; letter-spacing: 0.02em; white-space: pre-line;
  padding: 9px 13px; border-radius: 12px; max-width: 82%;
  background: rgba(217,201,163,0.28); border: 1px solid rgba(160,140,100,0.2);
}
.npc-bubble.mine .npc-bubble-text { background: rgba(111,143,122,0.16); border-color: rgba(77,107,88,0.2); }
.npc-typing { align-self: flex-start; font-size: 12px; color: #7c8b80; display: flex; gap: 3px; align-items: center; }
.npc-typing i { width: 4px; height: 4px; border-radius: 50%; background: #8a9a8d; animation: npcBlink 1.1s infinite ease-in-out; }
.npc-typing i:nth-child(2) { animation-delay: 0.18s; }
.npc-typing i:nth-child(3) { animation-delay: 0.36s; margin-right: 6px; }
@keyframes npcBlink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }
.npc-input-row { display: flex; gap: 8px; margin-top: 4px; }
.npc-input {
  flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 10px 13px;
  color: #3c4d43; background: rgba(255,255,255,0.55);
  border: 1px solid rgba(77,107,88,0.28); border-radius: 10px; outline: none;
}
.npc-input:focus { border-color: rgba(77,107,88,0.6); background: rgba(255,255,255,0.8); }
.npc-input:disabled { opacity: 0.5; }
.npc-send {
  flex: 0 0 auto; font: inherit; font-size: 13px; cursor: pointer; padding: 0 18px;
  color: #f4efe2; background: #5d715f; border: none; border-radius: 10px;
}
.npc-send:hover { background: #4d604f; }
.npc-send:disabled { opacity: 0.45; cursor: default; }

.journal-panel {
  width: min(600px, 92vw); max-height: 88vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(30, 45, 38, 0.25);
}
.journal-input {
  width: 100%; margin-top: 14px; resize: vertical; font: inherit; font-size: 14px; line-height: 1.8;
  padding: 12px 14px; color: #3c4d43; border: 1px solid rgba(77,107,88,0.25);
  border-radius: 12px; background: rgba(255,255,255,0.55); outline: none;
}
.journal-input:focus { border-color: rgba(77,107,88,0.5); }
.journal-actions { margin: 12px 0 8px; text-align: right; }
.journal-list { max-height: 40vh; overflow: auto; margin-top: 10px; border-top: 1px solid var(--line); }
.journal-empty { padding: 18px 4px; font-size: 12px; color: #9aa79d; text-align: center; }
.journal-entry { display: flex; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.je-time { flex: 0 0 118px; font-size: 10px; color: #93a096; font-family: ui-monospace, monospace; }
.je-text { flex: 1; font-size: 13px; line-height: 1.7; color: #45564c; white-space: pre-wrap; }

.breathe-bar {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 24;
  display: flex; align-items: center; gap: 12px; white-space: nowrap;
  padding: 10px 14px 10px 12px; font-size: 12px; color: #3c5a4c;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  backdrop-filter: blur(8px); box-shadow: 0 8px 28px rgba(30,45,38,0.18);
}
.breathe-pulse {
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px;
  background: rgba(150, 214, 196, 0.75); animation: breathePulse 19s ease-in-out infinite;
}
.breathe-bar button {
  font: inherit; font-size: 11px; cursor: pointer; padding: 4px 12px;
  color: #6a5a3e; background: rgba(217,201,163,0.55); border: none; border-radius: 999px;
}
@keyframes breathePulse {
  0% { transform: scale(0.7); opacity: 0.5; }
  21% { transform: scale(1.5); opacity: 1; }
  58% { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(0.7); opacity: 0.5; }
}
@media (max-width: 760px) {
  .npc-aff { display: none; }
  .breathe-bar { font-size: 10px; gap: 8px; bottom: 76px; }
  .je-time { flex-basis: 96px; }
}

/* ---------- 观光车场 / 车上选站条 ---------- */
.tram-next {
  margin: 4px 22px 8px; padding: 9px 12px; font-size: 12px; color: #5a6b5f;
  background: rgba(111,143,122,0.12); border: 1px solid rgba(77,107,88,0.2); border-radius: 10px; text-align: center;
}
.tram-next b { color: var(--jade-deep); font-size: 14px; }
.tram-cards { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.tram-card { position: relative; }
.tram-bar { background: linear-gradient(180deg, rgba(46,64,54,.92), rgba(38,54,46,.92)); }
.tram-bar-btns { flex-wrap: wrap; }
.tram-stop-sel {
  font: inherit; font-size: 12px; padding: 6px 10px; max-width: 190px;
  color: #3c4d43; background: #eef1e8; border: 1px solid rgba(77,107,88,.35); border-radius: 8px; cursor: pointer;
}
@media (max-width: 760px) {
  .tram-stop-sel { max-width: 130px; font-size: 11px; }
  .tram-bar { bottom: 150px; }
}
/* 观光车：先选车再选座 */
.tram-card.is-sel { outline: 2px solid var(--jade-deep); outline-offset: -2px; background: rgba(111,143,122,.16); }
.tram-card.is-sel .boat-card-go { color: var(--jade-deep); font-weight: 700; }
.tram-seat-pick {
  margin: 10px 22px 4px; padding: 12px; border: 1px solid rgba(77,107,88,.28);
  border-radius: 12px; background: rgba(255,255,255,.42);
}
.tram-seat-title { font-size: 13px; font-weight: 700; color: #3c4d43; margin-bottom: 9px; }
.tram-seat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tram-seat {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 6px; border: 1px solid rgba(77,107,88,.35); border-radius: 9px;
  background: #f4f2e9; color: #43554a; cursor: pointer; font: inherit; font-size: 12px;
  transition: background .15s, transform .15s;
}
.tram-seat:hover { background: #dfe9de; transform: translateY(-1px); }
.tram-seat b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--jade-deep); color: #fff; font-size: 12px; }
.tram-seat span { color: #6d7d70; font-size: 11px; }
.tram-quick-board { width: 100%; margin-top: 10px; padding: 9px 12px; border: 0; border-radius: 9px; background: var(--jade-deep, #3c6b52); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.tram-quick-board:hover { filter: brightness(1.08); }
.tram-quick-board:disabled { opacity: .45; cursor: not-allowed; }
.tram-board-tip { text-align: center; color: #8a988c; font-size: 10px; margin-top: 5px; }
@media (max-width: 760px) {
  .tram-seat-pick { margin: 8px 12px 2px; padding: 9px; }
  .tram-seat-grid { grid-template-columns: repeat(2, 1fr); }
  .tram-seat span { font-size: 10px; }
}

/* ---------- 生活点 / 任务大厅 / 商铺 / 行囊 ---------- */
.life-chip {
  display: flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; cursor: pointer;
  background: rgba(217,201,163,.55); border: 1px solid rgba(160,140,100,.35);
  font-size: 12px; color: #5a4d34; white-space: nowrap;
}
.life-chip:hover { background: rgba(217,201,163,.8); }
.life-coin { color: #b08a3e; font-size: 14px; }
.life-chip b { font-size: 14px; color: #6b5426; }
.life-label { font-size: 10px; opacity: .75; }
.life-badge { min-width: 16px; text-align: center; border-radius: 999px; background: #b6523f; color: #fff; font-size: 10px; padding: 0 5px; }
.icon-btn.text .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #b6523f; margin-left: 3px; vertical-align: top; }

/* NPC 对话里的委托 */
.npc-quests { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.npc-quests-title { font-size: 12px; font-weight: 700; color: #6d5f45; margin-bottom: 8px; }
.npc-quest-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(217,201,163,.22); margin-bottom: 7px; }
.npc-quest-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.npc-quest-info b { font-size: 13px; color: #3c4d43; }
.npc-quest-info span { font-size: 11px; color: #73847a; }
.npc-quest-info em { font-size: 10px; color: #8a7a5a; font-style: normal; }

/* 任务大厅 / 商铺共用面板 */
.quest-panel, .shop-panel {
  width: min(720px, 94vw); max-height: 88vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px 18px; backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(30,45,38,.25);
}
.auto-bar { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(111,143,122,.28); }
.quest-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.quest-summary span { font-size: 11px; color: #6b7c6e; background: rgba(111,143,122,.12); padding: 5px 11px; border-radius: 999px; }
.quest-summary b { color: #8a6a2e; }
.life-ledger { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -4px 0 14px; font-size: 10px; color: #8a927f; }
.life-ledger span { white-space: nowrap; }
.daily-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 9px; font-style: normal; color: #fff; background: var(--jade-deep); vertical-align: 1px; }
.quest-cost { font-style: normal; color: #b6523f; margin-left: 4px; }
.quest-list { display: flex; flex-direction: column; gap: 9px; }
.quest-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(77,107,88,.18); border-radius: 12px; background: rgba(255,255,255,.42); }
.quest-item.st-ready { border-color: rgba(182,82,63,.5); background: rgba(214,150,120,.14); }
.quest-item.st-done { opacity: .58; }
.quest-mark { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(111,143,122,.22); color: #4d6353; font-size: 13px; font-weight: 700; }
.st-ready .quest-mark { background: #b6523f; color: #fff; }
.quest-body { flex: 1; min-width: 0; }
.quest-top { display: flex; align-items: baseline; gap: 10px; }
.quest-top b { font-size: 14px; color: #3c4d43; }
.quest-reward { font-size: 11px; color: #8a6a2e; }
.quest-desc { font-size: 11px; color: #6b7c6e; margin: 3px 0; line-height: 1.6; }
.quest-foot { font-size: 10px; color: #93a096; }
.quest-area { color: #6d8a70; }
.npc-quest-btn { flex: 0 0 auto; font: inherit; font-size: 12px; cursor: pointer; padding: 7px 14px; border-radius: 999px; color: #f4efe2; background: var(--jade-deep); border: none; }
.npc-quest-btn:hover { filter: brightness(1.1); }
.npc-quest-btn.go { background: #b6523f; }
.quest-progress { flex: 0 0 auto; font-size: 11px; color: #93a096; padding: 6px 10px; }
.q-ready { color: #b6523f !important; }
.q-done { color: #6d8a70 !important; }
.quest-note { margin-top: 14px; font-size: 10px; color: #93a096; letter-spacing: .03em; line-height: 1.6; }
.quest-note b { color: #6b8a70; font-weight: 600; }

.shop-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.shop-switch button { font: inherit; font-size: 11px; cursor: pointer; padding: 5px 11px; border-radius: 999px; color: #5d6f60; background: rgba(111,143,122,.1); border: 1px solid rgba(77,107,88,.2); }
.shop-switch button.on { background: var(--jade-deep); color: #fff; border-color: var(--jade-deep); }
.shop-switch-group { align-items: center; margin: 6px 0; }
.shop-group-label { font-size: 10px; color: #8a927f; letter-spacing: .1em; min-width: 48px; }
.shop-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 10px; }
.shop-search {
  flex: 1 1 220px; min-width: 160px; font: inherit; font-size: 12px; color: #4d5f50;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(77,107,88,.3);
  background: rgba(255,255,255,.55); outline: none;
}
.shop-search:focus { border-color: var(--jade-deep); background: #fff; }
.shop-count { font-size: 10px; color: #93a096; white-space: nowrap; }
.shop-pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.shop-pager button { font: inherit; font-size: 11px; cursor: pointer; padding: 5px 11px; border-radius: 999px; color: #5d6f60; background: rgba(111,143,122,.1); border: 1px solid rgba(77,107,88,.2); }
.shop-pager button:disabled { opacity: .38; cursor: default; }
.shop-pager span { font-size: 11px; color: #6b7c6e; min-width: 54px; text-align: center; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 10px; }
.shop-card { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(77,107,88,.18); border-radius: 12px; background: rgba(255,255,255,.42); }
.shop-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: rgba(217,201,163,.5); color: #6b5426; font-size: 15px; }
.shop-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-info b { font-size: 13px; color: #3c4d43; }
.shop-info span { font-size: 10px; color: #8a978d; line-height: 1.4; }
.shop-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.shop-price { font-size: 12px; color: #8a6a2e; }
.shop-buy .mini-btn { padding: 4px 12px; font-size: 11px; }
.shop-empty { grid-column: 1/-1; text-align: center; padding: 30px 12px; color: #93a096; font-size: 12px; }
.ghost { background: rgba(111,143,122,.12) !important; color: #5d6f60 !important; }
/* NPC 货栈 · 做买卖 */
.npc-trade-btn { font-size: 11px; padding: 5px 11px; border: 1px solid var(--jade-deep); color: var(--jade-deep); background: transparent; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.npc-trade-btn:hover { background: var(--jade-deep); color: #fff; }
.trade-panel {
  width: min(680px, 94vw); max-height: 88vh; overflow: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px 18px; backdrop-filter: blur(10px);
  box-shadow: 0 18px 60px rgba(30,45,38,.25);
}
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.trade-col-title { font-size: 12px; font-weight: 600; color: var(--jade-deep); letter-spacing: .06em; padding: 0 2px 9px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.trade-row { display: flex; align-items: center; gap: 9px; padding: 9px 6px; border-bottom: 1px dashed rgba(111,143,122,.18); }
.trade-icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #f4efe2; background: linear-gradient(145deg, #9aa88c, #6f8269); }
.trade-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trade-info b { font-size: 12px; color: #3c4d43; }
.trade-info span { font-size: 10px; color: #8a978d; }
.trade-price { font-size: 11px; color: #8a6a2e; white-space: nowrap; }
.trade-row .mini-btn { padding: 4px 11px; font-size: 11px; }
@media (max-width: 760px) {
  .quest-panel, .shop-panel { padding: 14px; }
  .trade-panel { padding: 14px; }
  .trade-cols { grid-template-columns: 1fr; }
  .life-label { display: none; }
  .shop-grid { grid-template-columns: 1fr; }
}

/* ---------- 顶栏精简：不遮挡画面（全局生效，WebView 视口宽度多变也不失效） ---------- */
/* 左侧竖排标题会把右侧按钮挤成三行，直接去掉 */
.title-block { display: none; }
/* 状态提示原来固定在 top:76/62px，正好压在换行按钮上；移到底部避开摇杆与操作条 */
.status { top: auto; bottom: 200px; font-size: 11px; padding: 6px 14px; }
@media (max-width: 600px) {
  .topbar { padding-left: 10px; padding-right: 10px; }
  .topbar-actions { gap: 5px; row-gap: 6px; }
  /* 功能按钮收紧，按「任务→路引→观光车→营造→挂机→商铺→行囊→设置」排 */
  .icon-btn, .icon-btn.text { height: 30px; min-width: 30px; padding: 0 8px; font-size: 11px; letter-spacing: 0; }
  .weather-chip, .identity, .peer-tag, .life-chip { padding-top: 4px; padding-bottom: 4px; }
  .status { bottom: 200px; font-size: 10px; padding: 5px 12px; }
  /* toast 与 status 原本同在 200px 会叠字；上移让开 */
  .toast { bottom: 246px; }
}

/* ---------- 账号登录 / 注册（进入园林前） ---------- */
.auth-mask {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, rgba(228,235,228,.98), rgba(198,213,202,.98));
  padding: 20px;
}
.auth-card {
  width: min(420px, 94vw); background: rgba(255,255,255,.82);
  border: 1px solid rgba(111,143,122,.22); border-radius: 18px;
  box-shadow: 0 18px 60px rgba(60,80,68,.16);
  padding: 30px 26px 26px; backdrop-filter: blur(8px);
}
.auth-brand { font-size: 22px; letter-spacing: .22em; color: #3c5146; font-weight: 600; text-align: center; text-indent: .22em; }
.auth-sub { margin-top: 8px; font-size: 12px; color: #7b8c81; text-align: center; letter-spacing: .05em; line-height: 1.7; }
.auth-tabs { display: flex; gap: 6px; margin: 22px 0 16px; background: rgba(111,143,122,.1); border-radius: 10px; padding: 4px; }
.auth-tab { flex: 1; border: 0; background: transparent; padding: 9px 0; border-radius: 8px; font-size: 13px; color: #6b7d72; cursor: pointer; }
.auth-tab.on { background: #fff; color: #3c5146; font-weight: 600; box-shadow: 0 2px 8px rgba(60,80,68,.1); }
.auth-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.auth-field label { font-size: 11px; color: #7b8c81; letter-spacing: .04em; }
.auth-field input {
  border: 1px solid rgba(111,143,122,.28); border-radius: 9px; padding: 11px 12px;
  font-size: 14px; color: #33453b; background: rgba(255,255,255,.9); outline: none;
}
.auth-field input:focus { border-color: #6f8f78; box-shadow: 0 0 0 3px rgba(111,143,122,.12); }
.auth-btn {
  width: 100%; margin-top: 6px; border: 0; border-radius: 10px; padding: 13px 0;
  font-size: 15px; letter-spacing: .1em; color: #fff; cursor: pointer;
  background: linear-gradient(145deg, #6f8f78, #4f6d59);
}
.auth-btn:disabled { opacity: .6; cursor: default; }
.auth-msg { min-height: 18px; margin-top: 10px; font-size: 12px; text-align: center; color: #b4553f; }
.auth-guest {
  display: block; width: 100%; margin-top: 8px; border: 0; background: transparent;
  font-size: 12px; color: #7b8c81; cursor: pointer; text-decoration: underline; padding: 8px;
}
.auth-hint { margin-top: 14px; font-size: 11px; color: #93a096; line-height: 1.7; text-align: center; }

/* ---------- 账号身份 / 同游成员名单 ---------- */
.account-dot { color: #6f9a6b; font-size: 9px; margin-left: 4px; vertical-align: middle; }
.roster-mask {
  position: fixed; inset: 0; z-index: 62; display: flex; align-items: center; justify-content: center;
  background: rgba(38, 52, 44, 0.32); backdrop-filter: blur(3px); padding: 16px;
}
.roster-panel {
  width: min(420px, 94vw); max-height: 80vh; overflow: auto;
  background: #f7f4ea; border: 1px solid rgba(111,143,122,.25); border-radius: 16px;
  box-shadow: 0 16px 50px rgba(40,55,45,.25); padding: 20px 18px 16px;
}
.roster-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.roster-title { font-size: 17px; color: #3c5146; letter-spacing: .08em; font-weight: 600; }
.roster-sub { margin-top: 5px; font-size: 11px; color: #8a978d; }
.roster-head .book-close { font-size: 24px; line-height: 1; border: 0; background: transparent; color: #8a978d; cursor: pointer; padding: 0 4px; }
.roster-me {
  font-size: 12px; color: #4f6d59; background: rgba(111,143,122,.1);
  border-radius: 9px; padding: 9px 12px; margin-bottom: 12px;
}
.roster-me span { color: #8a978d; font-size: 11px; }
.roster-list { display: flex; flex-direction: column; }
.roster-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed rgba(111,143,122,.18); }
.roster-avatar {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #f4efe2; background: linear-gradient(145deg, #9aa88c, #6f8269);
}
.roster-name { flex: 1; font-size: 13px; color: #3c4d43; }
.roster-act, .roster-same { font-size: 10px; }
.roster-act { color: #8a978d; }
.roster-same { color: #8a6a2e; background: rgba(180,150,70,.12); border-radius: 6px; padding: 2px 6px; }
.roster-empty { font-size: 12px; color: #9aa59c; text-align: center; padding: 22px 0; }
.roster-foot { margin-top: 12px; font-size: 10px; color: #a2aca4; text-align: center; }
.account-row { align-items: center; }
.account-info { flex: 1; font-size: 12px; color: #4f6d59; }
.account-info em { font-style: normal; color: #8a978d; }
.account-info.muted { color: #9aa59c; }
.soft-btn.tiny { padding: 4px 10px; font-size: 11px; }

/* ---------- 横屏适配（APP 锁 landscape，逻辑高度约 360px）----------
   竖屏的 @media(max-width:600px) 紧凑布局在横屏因宽度>600 会失效，
   这里按“矮屏”重新收紧各浮层 bottom，避免按钮栏/摇杆/toast 挤成一团。 */
/* ============ 镇园试炼：战斗 HUD ============ */
.battle-hud { position: fixed; inset: 0; pointer-events: none; z-index: 40; font-family: 'Songti SC','SimSun',serif; }
.battle-top {
  position: absolute; top: max(56px, calc(env(safe-area-inset-top) + 46px)); left: 14px;
  width: min(340px, 76vw); padding: 10px 13px; border-radius: 12px;
  background: rgba(24,32,29,.82); border: 1px solid rgba(185,139,77,.5);
  box-shadow: 0 6px 24px rgba(0,0,0,.35); color: #f0e6d0; pointer-events: auto;
}
.battle-lv { font-size: 15px; font-weight: 700; letter-spacing: .5px; margin-bottom: 7px; }
.battle-lv b { color: #ffd88a; font-size: 19px; }
.battle-wave { font-size: 11px; font-weight: 400; color: #c9b98a; }
.battle-bars { display: flex; flex-direction: column; gap: 5px; }
.b-bar { position: relative; height: 15px; border-radius: 8px; background: rgba(0,0,0,.5); overflow: hidden; border: 1px solid rgba(255,255,255,.12); }
.b-bar i { position: absolute; inset: 0 auto 0 0; display: block; border-radius: 8px; transition: width .18s ease; }
.b-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; text-shadow: 0 1px 2px #000; }
.b-bar.hp i { background: linear-gradient(90deg,#b8443a,#e06a58); }
.b-bar.mp i { background: linear-gradient(90deg,#3a6fb8,#6aa8e0); }
.b-bar.exp i { background: linear-gradient(90deg,#8a6b2a,#d8b24a); }
.battle-target { margin-top: 7px; padding-top: 6px; border-top: 1px dashed rgba(185,139,77,.4); display: flex; justify-content: space-between; font-size: 12px; }
.battle-target b { color: #d8e8c0; }
.battle-target b.boss { color: #ffb45a; font-weight: 800; }
.battle-target span { color: #c9b98a; }
.battle-bottom {
  position: absolute; right: 14px; bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 68vw; pointer-events: auto;
}
.battle-btn {
  min-width: 72px; padding: 10px 13px; border-radius: 10px; cursor: pointer;
  background: rgba(30,42,37,.9); color: #efe3c8; border: 1px solid rgba(185,139,77,.55);
  font-size: 14px; font-family: inherit; box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.battle-btn:active { transform: translateY(1px); background: rgba(54,74,64,.95); }
.battle-btn em { font-style: normal; font-size: 10px; color: #b9a878; margin-left: 3px; }
.battle-btn.atk { background: linear-gradient(180deg,#a4483a,#8a3429); border-color: #e0a878; font-weight: 700; }
.battle-btn.skill { background: linear-gradient(180deg,#8a5bb0,#6a3a90); border-color: #c89ae0; }
.battle-btn.potion { background: linear-gradient(180deg,#4a8a5a,#2f6a3f); border-color: #9ed8a8; }
.battle-btn.on { background: linear-gradient(180deg,#b8932e,#96751e); color: #fff8e0; }
.battle-btn.quit { background: rgba(40,40,40,.85); }
.battle-gold { position: absolute; right: 16px; bottom: max(96px, calc(env(safe-area-inset-bottom) + 92px)); font-size: 12px; color: #f2d98a; text-shadow: 0 1px 3px #000; }
.battle-bag-mask { z-index: 46; }
.battle-bag { width: min(560px, 94vw); max-height: 90vh; display: flex; flex-direction: column; }
.battle-equip-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; padding: 10px 14px; border-bottom: 1px solid rgba(185,139,77,.3); }
.battle-equip-slot { background: rgba(0,0,0,.25); border-radius: 7px; padding: 6px 8px; min-width: 0; }
.battle-equip-slot .slot-name { display: block; font-size: 10px; color: #b9a878; }
.battle-equip-slot b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.battle-bag-list { overflow-y: auto; padding: 10px 14px; flex: 1 1 auto; min-height: 80px; display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.battle-bag-item { border: 1px solid #6fa8d8; border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,.04); }
.bbi-head { display: flex; justify-content: space-between; font-size: 13px; }
.bbi-head span { color: #b9a878; font-size: 11px; }
.bbi-attrs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 6px 0; font-size: 11px; color: #cfe0c8; }
.bbi-actions { display: flex; gap: 6px; }
.bbi-actions button { flex: 1; padding: 5px 0; border-radius: 6px; cursor: pointer; font-size: 11px; border: 1px solid #b98b4d; background: rgba(185,139,77,.18); color: #f0e2c4; }
.bbi-actions button:hover { background: rgba(185,139,77,.4); }

@media (orientation: landscape) and (max-height: 540px) {
  .topbar { padding: max(8px, env(safe-area-inset-top)) 12px 0; }
  .title-name { font-size: 13px; }
  .title-slogan, .room-tag { display: none; }
  .icon-btn { min-width: 30px; height: 30px; padding: 0 8px; font-size: 12px; }
  .identity, .peer-tag { padding: 4px 9px; font-size: 10px; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 62vw; }
  .status { top: 82px; bottom: auto; font-size: 11px; padding: 5px 14px; }
  .hint { bottom: 62px; }
  .boat-bar { bottom: 58px; gap: 5px; }
  .boat-zone-btn, .boat-off-btn { padding: 6px 12px; font-size: 11px; }
  .toast { bottom: 116px; font-size: 12px; padding: 7px 16px; }
  .joystick { left: 14px; bottom: max(14px, env(safe-area-inset-bottom)); width: 88px; height: 88px; }
  .joystick-knob { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .control-tip { bottom: 6px; font-size: 10px; padding: 5px 10px; max-width: 60vw; }
  .ctl-pc { display: none; }
  .ctl-mobile { display: inline; }
  .panel { width: min(440px, 92vw); max-height: 92vh; }
  .opera-picker { width: min(520px, 92vw); max-height: 94vh; }
  .opera-stage { margin: 8px 14px 4px; padding: 10px 12px; }
  .opera-now { font-size: 14px; }
  .opera-line { margin-top: 8px; font-size: 12px; min-height: 34px; line-height: 1.5; }
  .opera-progress { margin-top: 6px; }
  .opera-cards-scroll { min-height: 92px; max-height: 46vh; }
  .opera-cards { padding: 6px 14px 10px; gap: 6px; }
  .opera-card { padding: 8px 10px; }
  .book-mask > div, .book-panel, .village-panel, .shop-panel, .quest-panel,
  .route-panel, .journal-panel, .npc-panel, .dex-panel { max-height: 92vh; }
  .village-body { grid-template-columns: 1fr 1fr; }
  .battle-top { top: max(48px, calc(env(safe-area-inset-top) + 38px)); left: 10px; width: min(260px, 62vw); padding: 7px 10px; }
  .battle-lv { font-size: 12px; margin-bottom: 5px; }
  .battle-lv b { font-size: 15px; }
  .b-bar { height: 12px; }
  .battle-target { font-size: 10px; margin-top: 5px; padding-top: 4px; }
  .battle-bottom { right: 10px; bottom: max(10px, calc(env(safe-area-inset-bottom) + 8px)); gap: 5px; max-width: 62vw; }
  .battle-btn { min-width: 56px; padding: 7px 9px; font-size: 12px; }
  .battle-btn em { display: none; }
  .battle-gold { bottom: max(64px, calc(env(safe-area-inset-bottom) + 60px)); font-size: 10px; }
  .battle-bag { max-height: 94vh; }
  .battle-equip-grid { grid-template-columns: repeat(3,1fr); padding: 6px 10px; }
  .battle-bag-list { min-height: 60px; padding: 6px 10px; }
}
