/* ===================== 學生遊戲畫面 ===================== */
.view-center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; gap: 12px; }
.loader { width: 44px; height: 44px; border-radius: 50%; border: 3px solid rgba(124,140,255,.25); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.center { text-align: center; }
.err-text { color: var(--rose); font-weight: 600; margin: 0; }

/* ===================== 題庫圖片預載入與軍中無厘頭秘史 ===================== */
.loading-box {
  width: min(480px, 100%);
  padding: 30px 24px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-radius: 20px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: fadeIn .4s ease-out;
}
.loading-emblem {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
}
.loading-tally-img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 2px solid rgba(245, 196, 81, 0.6);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
  z-index: 2;
  position: relative;
}
.loading-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  border: 2px solid rgba(245, 196, 81, 0.4);
  animation: loadingRingPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}
@keyframes loadingRingPulse {
  0% { transform: scale(0.92); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(0.92); opacity: 0.8; }
}
.loading-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .5px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.loading-sub {
  margin: -6px 0 4px;
  font-size: 13.5px;
}
.loading-progress-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 6px;
}
.loading-progress-bar {
  flex: 1;
  height: 10px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.loading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #ec4899, #38bdf8);
  border-radius: 6px;
  transition: width .2s ease-out;
}
.loading-progress-num {
  font-size: 13px;
  font-weight: 800;
  min-width: 40px;
  text-align: right;
  color: var(--accent);
}
.loading-secret-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.loading-secret-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.loading-secret-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  font-weight: 800;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.loading-secret-hint {
  font-size: 11px;
  color: var(--mute);
}
.loading-secret-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
  min-height: 44px;
  transition: opacity .22s ease, transform .22s ease;
}
.loading-secret-text.fade-out {
  opacity: 0;
  transform: translateY(-4px);
}
.loading-secret-footer {
  margin-top: 6px;
  font-size: 11px;
  color: var(--mute);
  text-align: right;
  font-style: italic;
}

.mode-banner {
  position: sticky; top: 0; z-index: 50; padding: 8px 14px; font-size: 13px; text-align: center;
  background: linear-gradient(90deg, rgba(245,196,81,.18), rgba(245,158,11,.18)); color: var(--gold);
  border-bottom: 1px solid rgba(245,196,81,.3);
}

/* 登入 */
.login-card { width: min(420px, 100%); padding: 30px 26px; text-align: left; }
.login-logo { font-size: 46px; text-align: center; animation: float 3s ease-in-out infinite; }
.login-title { text-align: center; margin: 6px 0 2px; font-size: 26px; font-weight: 900; letter-spacing: .5px;
  background: linear-gradient(135deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-theme="dark"] .login-title {
  background: linear-gradient(135deg, #fff, #c7cfff 60%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-sub { text-align: center; margin: 0 0 18px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 頂部資源列 */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; justify-content: space-between;
  padding: 12px 20px; background: var(--bg-1); border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
html[data-theme="dark"] .topbar { background: rgba(11, 15, 26, .95); box-shadow: none; }
.mode-banner:not(.hidden) ~ #viewApp .topbar { top: 35px; }
.res-group { display: flex; gap: 10px; flex-wrap: wrap; }
.res { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); min-width: 120px; }
.res-thumb { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.15); border: 1px solid rgba(217,119,6,.35); }
.res-icon { font-size: 22px; }
.res-val { font-size: 20px; font-weight: 800; line-height: 1.1; }
.res-sub { font-size: 12px; color: var(--text-dim); }
.res-coin .res-val { color: var(--gold); }
.res-bp .res-val { color: var(--sky); }
.res-mult .res-val { color: var(--accent-2); }
.res.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.08); } }
.user-box { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 700; color: var(--text); }

/* 戰略沙盤大地圖（超大可拖曳世界地圖） */
.map-card { position: relative; padding: 14px 16px; margin-bottom: 18px; border-color: rgba(217,119,6,.28); background: var(--bg-1); }
html[data-theme="dark"] .map-card { background: linear-gradient(180deg, rgba(23,32,54,.94), rgba(15,22,39,.98)); border-color: rgba(245,196,81,.3); }
.map-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 12px; }
.map-title-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.map-legend-top {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--bg-2); padding: 5px 14px; border-radius: 99px;
  border: 1px solid var(--line); font-size: 12px; font-weight: 700;
  color: var(--text-dim);
}
.leg-item { display: inline-flex; align-items: center; gap: 5px; }
.leg-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.leg-locked { background: #94a3b8; }
.leg-ready { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.7); }
.leg-active { background: #10b981; }
.map-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.territory-map-wrap {
  position: relative; width: 100%; max-width: 100%; border-radius: 18px; overflow: hidden;
  box-shadow: 0 16px 40px -10px rgba(70,40,25,.35), inset 0 0 0 1px rgba(180,130,100,.2);
  height: auto; background: #faede1;
  user-select: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}
.territory-map-wrap.dragging { scroll-behavior: auto !important; }

.map-drag-hint {
  display: none !important;
}

.territory-map {
  position: relative; width: 100%; min-width: 0; aspect-ratio: 16 / 9;
  container-type: inline-size;
}
.map-bg { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.06) contrast(1.02); pointer-events: none; }

/* 戰略連線 SVG 畫布（依使用者需求隱藏連線，呈現純淨沙盤山水） */
.map-routes-svg { display: none; }

.map-spots { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.map-spot {
  position: absolute; pointer-events: auto; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.map-spot:hover { transform: translate(-50%, -55%) scale(1.1); z-index: 35; }
.map-spot.selected { transform: translate(-50%, -56%) scale(1.15); z-index: 40; }

/* 城池微縮手辦容器（加大尺寸） */
.spot-building-wrap {
  position: relative; width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.spot-building-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  /* 去背微縮模型自然立體投影 */
  filter: drop-shadow(0 10px 18px rgba(45,30,20, 0.45));
  transition: filter .25s ease, transform .25s ease;
}
.map-spot:hover .spot-building-img {
  filter: drop-shadow(0 16px 26px rgba(45,30,20, 0.55)) drop-shadow(0 0 16px rgba(245,196,81, 0.8));
}
.map-spot.selected .spot-building-img {
  filter: drop-shadow(0 18px 30px rgba(45,30,20, 0.65)) drop-shadow(0 0 20px rgba(245,196,81, 0.95));
}

/* 頂部霸業王城專屬點位（純淨透明，絕不遮擋地圖美麗城堡） */
.spot-capital-wrap {
  width: 160px; height: 120px; position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 24px; transition: background 0.3s ease;
}
.map-spot:hover .spot-capital-wrap {
  background: radial-gradient(circle, rgba(245, 196, 81, 0.25) 0%, transparent 70%);
}
.map-spot.selected .spot-capital-wrap {
  background: radial-gradient(circle, rgba(245, 196, 81, 0.38) 0%, transparent 75%);
}

/* 資源微縮圖片圖示 */
.res-mini-icon {
  width: 16px; height: 16px; object-fit: contain; vertical-align: -2.5px;
  border-radius: 4px; display: inline-block; margin-right: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* 城池常駐狀態與產量標籤 */
.spot-label {
  padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 800;
  background: rgba(255, 255, 255, 0.95); border: 1.5px solid var(--line);
  color: var(--text); box-shadow: 0 6px 16px rgba(120,70,50, 0.18);
  backdrop-filter: blur(8px); margin-top: -6px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  white-space: nowrap; transition: all .2s;
}
html[data-theme="dark"] .spot-label { background: rgba(22,30,49, 0.95); border-color: rgba(255,255,255,.2); color: #fff; }
.spot-label-top { display: inline-flex; align-items: center; gap: 4px; }
.spot-label-prod {
  font-size: 10px; font-weight: 900; color: #b45309;
  background: rgba(245, 158, 11, 0.15); padding: 1px 6px; border-radius: 99px;
}
html[data-theme="dark"] .spot-label-prod { color: #fcd34d; background: rgba(245, 158, 11, 0.25); }

.spot-tally-cost {
  position: absolute; top: -6px; left: -6px; z-index: 6;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
  font-size: 10px; font-weight: 900; padding: 2px 7px; border-radius: 99px;
  box-shadow: 0 3px 8px rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.7);
  animation: costBob 2s infinite ease-in-out;
}
@keyframes costBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* 據點狀態樣式 */
.map-spot.locked .spot-building-img { opacity: .45; filter: grayscale(1) drop-shadow(0 2px 8px rgba(0,0,0,.3)); }
.map-spot.locked .spot-label { opacity: .75; border-color: rgba(180,130,100, 0.3); }

.map-spot.ready .spot-building-img {
  filter: saturate(1.3) drop-shadow(0 0 16px rgba(245,158,11, 0.85));
}
.map-spot.ready .spot-building-wrap::after {
  content: ''; position: absolute; inset: -6px; border-radius: 50%;
  border: 2.5px dashed #f59e0b; pointer-events: none;
  animation: spotPulse 1.8s infinite ease-out;
}
.map-spot.ready .spot-label { border-color: #f59e0b; color: #b45309; }
html[data-theme="dark"] .map-spot.ready .spot-label { color: #fcd34d; border-color: #fcd34d; }
@keyframes spotPulse {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.45); opacity: 0; }
}

.map-spot.active .spot-building-img {
  filter: drop-shadow(0 10px 18px rgba(45,30,20, 0.45));
}
.map-spot.active.evolved .spot-building-img {
  filter: drop-shadow(0 10px 22px rgba(124,58,237,.6)) drop-shadow(0 0 16px rgba(244,212,116, 0.7));
}
.spot-flag {
  position: absolute; top: -8px; right: -6px; font-size: 18px; z-index: 5;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.4));
  animation: flagWave 2s infinite ease-in-out alternate;
}

/* 地圖內置：城池戰略指令面板（In-Map Town Popover Panel 就近在城池旁顯示） */
.inmap-town-panel {
  position: absolute; width: clamp(260px, 30cqw, 340px); max-width: calc(100% - 24px);
  max-height: calc(100% - 16px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  z-index: 75; background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px); border: 2px solid rgba(217,119,6, 0.7);
  border-radius: 18px; box-shadow: 0 16px 40px -8px rgba(45,25,15, 0.38), 0 0 0 1px rgba(255,255,255,0.6) inset;
  padding: 12px 15px; display: flex; flex-direction: column; gap: 8px;
  animation: panelPopoverIn 0.22s cubic-bezier(.34,1.56,.64,1);
  transform-origin: center center;
  touch-action: pan-y;
}
html[data-theme="dark"] .inmap-town-panel {
  background: rgba(18, 25, 42, 0.96); border-color: rgba(245,196,81, 0.65);
  box-shadow: 0 20px 48px rgba(0,0,0, 0.65), 0 0 0 1px rgba(255,255,255,0.08) inset;
}
@keyframes panelPopoverIn {
  from { opacity: 0; transform: scale(0.92) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Popover 三角形指向指針 */
.inmap-town-panel::before {
  content: ''; position: absolute; width: 0; height: 0;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.inmap-town-panel.arrow-top::before { top: 28px; bottom: auto; }
.inmap-town-panel.arrow-bottom::before { bottom: 28px; top: auto; }
.inmap-town-panel.panel-on-right::before {
  left: -9px; border-right: 9px solid rgba(217,119,6, 0.9);
}
.inmap-town-panel.panel-on-left::before {
  right: -9px; border-left: 9px solid rgba(217,119,6, 0.9);
}

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.panel-town-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.panel-town-info > div { flex: 1; min-width: 0; }
.panel-town-thumb { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); flex-shrink: 0; }
.panel-town-title {
  margin: 0 0 2px; font-size: 16px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; line-height: 1.35;
}
.panel-town-title .badge,
.b-name .badge { white-space: nowrap; flex-shrink: 0; }
.panel-specialty { display: block; font-size: 11px; color: var(--gold); font-weight: 700; }
.panel-close-btn {
  background: transparent; border: 0; font-size: 16px; cursor: pointer; color: var(--text-dim);
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.panel-close-btn:hover { background: var(--bg-2); color: var(--text); transform: scale(1.1); }

.panel-prod-stat {
  background: var(--bg-2); border-radius: 10px; padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center; font-size: 12px;
}
.panel-prod-val { font-size: 14px; font-weight: 800; color: var(--gold); }

.panel-actions { display: flex; gap: 8px; }
.panel-actions .btn { flex: 1; padding: 8px 10px; min-height: 44px; border-radius: 10px; }

.map-footer-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; flex-wrap: wrap; gap: 8px;
}
.tabs { display: flex; gap: 6px; padding: 12px 20px 0; max-width: 1200px; margin: 0 auto; }
.tab {
  position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text-dim);
  font-weight: 700; cursor: pointer; transition: all .2s;
}
.tab:hover { color: var(--text); background: var(--bg-2); transform: translateY(-1px); }
.tab.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; box-shadow: var(--shadow); }
.tab .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 8px var(--rose); }
.tab .count { font-style: normal; font-size: 11px; background: var(--rose); color: #fff; border-radius: 99px; padding: 0 7px; line-height: 18px; }

.main { max-width: 1400px; margin: 0 auto; padding: 16px 20px 100px; overflow-x: hidden; width: 100%; }
.pane-title { margin: 0; font-size: 18px; color: var(--text); }
.pane { animation: fadeUp .25s ease; overflow-x: hidden; width: 100%; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 領地沙盤左上角懸浮：巡營催糧軍令台（自然融入雲海天空，不佔用兩側佈局寬度） */
.work-overlay-card {
  position: absolute; left: clamp(10px, 1.8cqw, 24px); top: clamp(10px, 1.8cqw, 24px);
  z-index: 25; width: clamp(124px, 15cqw, 175px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(10px, 1.3cqw, 16px) clamp(8px, 1cqw, 14px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(217, 119, 6, 0.35);
  border-radius: 20px;
  box-shadow: 0 10px 28px -6px rgba(45, 25, 15, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  transition: all .2s ease;
}
html[data-theme="dark"] .work-overlay-card {
  background: rgba(18, 25, 42, 0.94);
  border-color: rgba(245, 196, 81, 0.35);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.work-btn {
  width: clamp(84px, 10.5cqw, 126px); height: clamp(84px, 10.5cqw, 126px);
  min-width: 0; min-height: 0;
  aspect-ratio: 1 / 1; flex-shrink: 0; border-radius: 50%; border: 0; cursor: pointer; color: #382000;
  background: radial-gradient(circle at 35% 30%, #fff7df 0%, #f7dc88 45%, #dfb84a 80%, #c99c2d 100%);
  box-shadow:
    0 0 0 4px rgba(244,212,116,.35),
    0 0 0 8px rgba(244,212,116,.15),
    0 12px 28px -6px rgba(239,90,86,.35),
    inset 0 -6px 12px rgba(160,100,25,.3),
    inset 0 3px 10px rgba(255,255,255,.8);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: transform .12s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.work-btn:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 0 8px rgba(244,212,116,.45),
    0 0 0 15px rgba(244,212,116,.2),
    0 20px 42px -6px rgba(239,90,86,.45),
    inset 0 -8px 16px rgba(160,100,25,.3),
    inset 0 4px 12px rgba(255,255,255,.9);
}
.work-btn:active {
  transform: scale(.94);
  box-shadow:
    0 0 0 4px rgba(244,212,116,.4),
    0 8px 18px rgba(239,90,86,.3),
    inset 0 4px 12px rgba(0,0,0,.2);
}
.work-btn.disabled {
  opacity: .55; filter: grayscale(.85); cursor: not-allowed;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.work-btn.disabled:hover { transform: none; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.work-limit-badge {
  margin-top: clamp(6px, 0.8cqw, 10px); padding: 3px 10px; border-radius: 99px;
  background: var(--bg-2); border: 1.5px solid rgba(180,130,100,.25);
  font-size: clamp(9px, 0.9cqw, 11px); font-weight: 700; color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 2px 8px rgba(120,70,50,.06); transition: all .2s ease;
  white-space: nowrap; max-width: 100%;
}
.work-limit-badge b { color: #b45309; font-size: clamp(10px, 1cqw, 12px); }
.work-limit-badge.warn {
  color: var(--rose); border-color: rgba(239,90,86,.45);
  background: rgba(239,90,86,.08);
}
.work-limit-badge.warn b { color: var(--rose); }
.work-thumb { width: clamp(28px, 3.6cqw, 44px); height: clamp(28px, 3.6cqw, 44px); object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.2)); }
.work-label { font-weight: 900; font-size: clamp(11px, 1.2cqw, 15px); color: #382000; letter-spacing: 0.5px; text-shadow: 0 1px 2px rgba(255,255,255,.6); }
.work-val { font-weight: 800; font-size: clamp(10px, 0.95cqw, 12px); color: #6b3e04; }
.float-layer { position: absolute; inset: 0; pointer-events: none; }
.float-num { position: absolute; font-weight: 900; color: #ef5a56; text-shadow: 0 1px 4px rgba(255,255,255,.9); animation: floatUp .9s ease-out forwards; }
html[data-theme="dark"] .float-num { text-shadow: 0 2px 8px rgba(0,0,0,.6); }
@keyframes floatUp { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -70px); } }

.kv { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.kv li { display: flex; justify-content: space-between; gap: 8px; }
.kv li span:first-child { color: var(--text-dim); }
.hint-card { border-color: rgba(239,90,86,.3); font-size: 14px; background: rgba(239,90,86,.04); }
.hint-card b { color: var(--accent); }

.build-head { justify-content: space-between; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { min-height: 38px; min-width: 56px; border: 0; background: transparent; color: var(--text-dim); font-weight: 700; border-radius: 9px; cursor: pointer; transition: all .15s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent); color: #fff; box-shadow: var(--shadow); }

.b-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.b-card {
  position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 14px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--bg-1);
  transition: transform .15s ease, box-shadow .2s, border-color .2s;
}
html[data-theme="dark"] .b-card { background: linear-gradient(180deg, rgba(31,42,68,.8), rgba(23,32,54,.8)); }
.b-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(239,90,86,.4); }
.b-card.evolved { border-color: rgba(124,58,237,.5); box-shadow: 0 0 0 1px rgba(124,58,237,.25), 0 8px 24px -10px rgba(124,58,237,.4); }
.b-card.locked { opacity: .55; }
.b-card.locked:hover { transform: none; }
.b-icon {
  width: 62px; height: 62px; border-radius: 16px; overflow: hidden; padding: 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-2); border: 2px solid var(--line);
  box-shadow: 0 4px 10px rgba(120,70,50,.08);
}
.b-thumb { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .3s ease; }
.b-card:hover .b-thumb { transform: scale(1.1); }
.b-card.locked .b-thumb { opacity: .4; filter: grayscale(1); }
.b-card.evolved .b-icon { border-color: var(--accent-2); box-shadow: 0 0 12px rgba(124,58,237,.35); }

.work-thumb {
  width: 68px; height: 68px; object-fit: cover; border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0,0,0,.15); margin-bottom: 2px;
  border: 2px solid rgba(255,255,255,.4);
  transition: transform .1s ease;
}
.work-btn:hover .work-thumb { transform: scale(1.08); }
.work-btn:active .work-thumb { transform: scale(.92); }

.login-tally-img {
  width: 90px; height: 90px; object-fit: cover; border-radius: 24px;
  box-shadow: 0 10px 25px rgba(245,158,11,.35);
  border: 3px solid rgba(245,158,11,.5);
  margin: 0 auto 12px; display: block;
}

.b-name { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text); }
.b-meta { font-size: 13px; color: var(--text-dim); }
.b-specialty-badge {
  font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px;
  background: rgba(245, 158, 11, 0.15); color: #d97706; border: 1px solid rgba(245, 158, 11, 0.35);
}
html[data-theme="dark"] .b-specialty-badge {
  background: rgba(245, 158, 11, 0.22); color: #fcd34d; border-color: rgba(245, 158, 11, 0.4);
}
.b-stars { color: var(--gold); letter-spacing: 1px; font-size: 13px; }

/* 出征戰備盒子 */
.conquest-box {
  grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-2); border: 1px dashed var(--line); border-radius: 12px;
  padding: 10px 12px; margin-top: 2px;
}
.conquest-req-list {
  display: flex; flex-direction: column; gap: 4px; font-size: 12px;
}
.req-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.req-item.met { color: #10b981; font-weight: 600; }
.req-item.unmet { color: var(--text-dim); }
.req-item .req-tag { font-weight: 700; }
.req-item.unmet .req-tag { color: var(--rose); }

/* 出征按鈕 */
.btn-conquer {
  width: 100%; min-height: 46px; border: 0; border-radius: 12px; font-weight: 900;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; transition: all .2s;
  background: linear-gradient(135deg, #f59e0b, #ea580c); color: #fff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}
.btn-conquer:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
}
.btn-conquer:active:not(:disabled) { transform: scale(.96); }
.btn-conquer:disabled {
  background: var(--bg-2); color: var(--text-mute); border: 1px solid var(--line);
  box-shadow: none; cursor: not-allowed; opacity: .75;
}
.btn-conquer .conquer-sub { font-size: 11px; opacity: .9; font-weight: 600; }

.b-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.b-actions .btn { flex: 1; min-height: 44px; flex-direction: column; gap: 0; line-height: 1.2; padding: 4px 8px; }
.b-actions .btn small { font-weight: 600; font-size: 12px; opacity: .85; }
.b-ms { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-mute); }
.b-ms .progress { flex: 1; height: 6px; }
.b-card.pulse { animation: pulse .4s ease; }
@keyframes pulse { 30% { transform: scale(1.025); box-shadow: 0 0 0 2px rgba(217,119,6,.5); } }

/* 測驗 */
.quiz-intro p { margin: 0 0 12px; }
.tier-flow { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.tier-step { flex: 1; min-width: 150px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; }
.tier-step b { display: block; font-size: 14px; color: var(--text); }
.tier-step.on { border-color: rgba(5,150,105,.5); background: rgba(5,150,105,.08); }
.tier-group { margin-top: 18px; }
.tier-group > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; }
.r-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.r-card { padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-1); display: flex; flex-direction: column; gap: 8px; transition: transform .15s, box-shadow .2s, border-color .2s; }
html[data-theme="dark"] .r-card { background: var(--bg-2); }
.r-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.r-card.passed { border-color: rgba(5,150,105,.45); }
.r-card.today { border-color: rgba(217,119,6,.6); box-shadow: 0 0 0 1px rgba(217,119,6,.25); }
.r-card.locked { opacity: .5; }
.r-title { font-weight: 800; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.r-sub { font-size: 12px; color: var(--text-dim); }
.r-reward { font-size: 12px; color: var(--sky); }

.row-me {
  background: rgba(239, 90, 86, 0.12) !important;
  font-weight: 700;
  border-left: 3px solid var(--accent) !important;
}
.rank-crown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: 999px;
}
.crown-1 { background: rgba(244, 212, 116, 0.35); color: #8c5d00; border: 1px solid #f4d474; box-shadow: 0 2px 8px rgba(244,212,116,0.3); }
.crown-2 { background: #faefe4; color: #524036; border: 1px solid #ebd5c3; }
.crown-3 { background: #fbeae8; color: #b83a36; border: 1px solid #fad2cf; }
.rank-num { font-weight: 800; font-size: 13px; color: var(--text-dim); }
.r-reward { font-size: 12px; color: var(--sky); }

/* 測驗作答 */
.qz-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-right: 40px; }
.qz-top .progress { flex: 1; }
.qz-q { font-size: 18px; font-weight: 700; margin: 8px 0 16px; line-height: 1.6; }
.qz-opts { display: flex; flex-direction: column; gap: 10px; }
.qz-opt {
  display: flex; gap: 12px; align-items: center; text-align: left; min-height: 52px; padding: 10px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--bg-1); cursor: pointer; transition: all .15s;
}
.qz-opt:hover:not(:disabled) { border-color: var(--accent); transform: translateX(3px); background: var(--bg-2); }
.qz-opt .L { flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; background: var(--bg-3); }
.qz-opt.correct { border-color: var(--mint); background: rgba(52,211,153,.12); }
.qz-opt.correct .L { background: var(--mint); color: #062; }
.qz-opt.wrong { border-color: var(--rose); background: rgba(251,113,133,.12); animation: shake .3s; }
.qz-opt.wrong .L { background: var(--rose); color: #fff; }
.qz-opt:disabled { cursor: default; }

/* 題目與選項圖片防跳動 (CLS Layout Shift Prevention) */
.qz-q img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  height: auto;
  margin: 10px auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.03);
}
.qz-opt img {
  display: inline-block;
  vertical-align: middle;
  max-width: 140px;
  max-height: 90px;
  height: auto;
  margin: 4px 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.qz-foot { display: flex; justify-content: space-between; margin-top: 16px; gap: 10px; }

.result-score { font-size: 64px; font-weight: 900; text-align: center; line-height: 1; margin: 6px 0; }
.result-score.pass { background: linear-gradient(135deg, var(--mint), #a7f3d0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-score.fail { color: var(--rose); }
.reward-box { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.reward-box .badge { font-size: 14px; padding: 6px 12px; }
.unlock-list { list-style: none; padding: 12px 14px; margin: 10px 0; border-radius: 12px; background: rgba(167,139,250,.1); border: 1px solid rgba(167,139,250,.35); }
.unlock-list li { padding: 3px 0; font-weight: 700; }
.wrong-list { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.wrong-item { padding: 10px 12px; border-radius: 10px; background: var(--bg-1); border: 1px solid var(--line); font-size: 14px; }
.wrong-item .ans { color: var(--mint); font-weight: 700; }
.wrong-item .mine { color: var(--rose); }

/* 班級 */
.class-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.class-art { font-size: 64px; width: 110px; height: 110px; display: grid; place-items: center; border-radius: 24px; background: radial-gradient(circle, rgba(245,196,81,.25), transparent 70%); flex-shrink: 0; }
.class-hero h2 { margin: 0 0 4px; }
.class-hero p { margin: 4px 0; }
.class-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.donate-row .btn { flex: 1; min-width: 70px; }
.stage-list { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.stage-list li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; background: var(--bg-1); font-size: 14px; }
.stage-list li.done { background: rgba(245,196,81,.1); color: var(--gold); }

.donate-locked-box {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin: 10px 0;
  border-radius: 12px; background: rgba(16,185,129,.1); border: 1.5px solid rgba(16,185,129,.35);
  color: var(--text); font-size: 13px; line-height: 1.5;
}
.donate-locked-box .locked-icon { font-size: 28px; flex-shrink: 0; }
.btn-aid-donate {
  padding: 4px 10px; font-size: 12px; font-weight: 700; border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: 0;
  cursor: pointer; transition: all .15s ease; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(245,158,11,.3);
}
.btn-aid-donate:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 4px 12px rgba(245,158,11,.45); }
.btn-aid-donate:active { transform: scale(.96); }
.btn-aid-donate:disabled {
  background: var(--bg-2); color: var(--text-mute); border: 1px solid var(--line);
  box-shadow: none; cursor: not-allowed; transform: none;
}

.class-art-img {
  width: 100%; height: 100%; object-fit: contain; border-radius: 20px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); transition: transform .3s ease;
}
.class-hero:hover .class-art-img { transform: scale(1.05); }

/* 信箱 */
.mail-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mail-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--bg-1); border: 1px solid var(--line); }
.mail-item .gift-ico { font-size: 28px; }
.empty { text-align: center; padding: 30px 10px; color: var(--text-mute); }

/* 幸運寶箱 */
.lucky {
  position: fixed; z-index: 60; width: 64px; height: 64px; border-radius: 18px; border: 0; font-size: 36px; cursor: pointer;
  background: radial-gradient(circle, rgba(245,196,81,.35), rgba(245,196,81,.05)); animation: luckyBob 1s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(245,196,81,.8));
}
.lucky:hover { transform: scale(1.15); }
@keyframes luckyBob { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-8px) rotate(6deg); } }

/* 離線收益 */
.offline-big { font-size: 40px; font-weight: 900; color: var(--gold); text-align: center; margin: 8px 0; }

/* ---------- 跨平台自適應排版（電腦版、iPad 9 平板、手機） ---------- */

/* 1. iPad 9 橫向與中型筆電 (901px ~ 1199px) */
@media (min-width: 901px) and (max-width: 1199px) {
  .main { max-width: 100%; padding: 12px 14px 80px; }
  .territory-map-wrap { height: auto !important; }
  .inmap-town-panel {
    padding: 10px 13px;
    gap: 6px;
    max-height: calc(100% - 14px);
  }
}

/* 2. iPad 9 直向與小平板 (641px ~ 900px) */
@media (min-width: 641px) and (max-width: 900px) {
  .main { padding: 14px 14px 90px; }
  .territory-map-wrap { height: auto !important; }
  .class-layout { grid-template-columns: 1fr; }
  .inmap-town-panel {
    top: 8px !important;
    bottom: auto !important;
    max-height: calc(100% - 16px) !important;
    padding: 10px 12px;
    gap: 6px;
  }
  .inmap-town-panel::before { display: none !important; }
}

/* 3. 手機垂直緊湊視圖 (<= 640px) */
@media (max-width: 640px) {
  .topbar { padding: 8px 10px; gap: 8px; flex-wrap: wrap; }
  .res { min-width: 0; padding: 6px 10px; gap: 6px; }
  .res-icon { font-size: 18px; }
  .res-val { font-size: 16px; }
  .res-mult { display: none; }
  .user-box .mute { display: none; }
  .map-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .map-legend-top { font-size: 11px; padding: 3px 10px; gap: 8px; }
  .tabs {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--bg-1); border-top: 1px solid var(--line); justify-content: space-around; gap: 4px;
    box-shadow: 0 -4px 16px rgba(15,23,42,.06);
  }
  html[data-theme="dark"] .tabs { background: rgba(11,15,26,.97); box-shadow: none; }
  .tab { flex: 1; flex-direction: column; gap: 0; padding: 4px; min-height: 52px; font-size: 18px; border: 0; }
  .tab span { font-size: 11px; }
  .main { padding: 12px 10px 100px; }
  .build-layout { flex-direction: column; width: 100%; }
  .side { width: 100%; position: static; flex-direction: column; align-items: center; }
  .work-card { max-width: 320px; width: 100%; padding: 16px 14px 12px; }
  .territory-map { margin-bottom: 84px; }
  .territory-map .map-bg { border-radius: 14px; }
  .work-overlay-card {
    left: 0; right: 0; top: calc(100% + 8px);
    width: 100%; height: 76px; padding: 4px 12px; border-radius: 14px;
    flex-direction: row; justify-content: space-between; gap: 10px;
  }
  .work-btn { width: 68px; height: 68px; min-width: 68px; min-height: 68px; }
  .work-emoji { font-size: 20px; }
  .work-thumb { width: 26px; height: 26px; }
  .work-label { font-size: 10px; line-height: 1.1; }
  .work-val { font-size: 9px; }
  .work-limit-badge { margin-top: 0; font-size: 10px; padding: 3px 8px; white-space: normal; text-align: right; flex: 1; }
  .spot-label { font-size: 9.5px; padding: 2px 6px; }
  .spot-badge-daily { font-size: 9.5px; padding: 1px 6px; }
  .map-spot.locked .spot-label-prod { display: none; }
  .territory-map-wrap { height: auto !important; }
  .inmap-town-panel {
    right: 10px !important; left: 10px !important; bottom: 12px !important;
    top: auto !important; width: auto !important; max-width: none !important;
    padding: 12px 14px;
  }
  .inmap-town-panel .panel-close-btn { width: 44px; height: 44px; margin: -6px -6px 0 0; }
  .inmap-town-panel::before { display: none !important; }
  .b-list, .r-grid { grid-template-columns: 1fr; }
  .class-hero { flex-direction: column; text-align: center; }
  .qz-q { font-size: 16px; }
}

/* =============================================================
   天機閣（每日 60 秒急速快答挑戰 ＆ 三階軍備箱開箱系統）
   ============================================================= */

/* 地圖上天機閣專屬浮空仙島 */
.spot-tianji-wrap {
  position: relative; width: 136px; height: 136px;
  display: flex; align-items: center; justify-content: center;
  animation: tianjiFloat 3.8s ease-in-out infinite;
}
@keyframes tianjiFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.spot-tianji-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 14px 24px rgba(45,30,20, 0.45)) drop-shadow(0 0 18px rgba(245,196,81, 0.65));
  transition: filter .25s ease, transform .25s ease;
}
.map-spot:hover .spot-tianji-img {
  filter: drop-shadow(0 20px 32px rgba(45,30,20, 0.55)) drop-shadow(0 0 28px rgba(245,196,81, 0.95));
  transform: scale(1.08);
}
.map-spot.tianji-done .spot-tianji-img {
  filter: grayscale(0.75) opacity(0.6) drop-shadow(0 6px 14px rgba(0,0,0,0.25));
}
.map-spot.tianji-done .spot-label {
  opacity: 0.75; border-color: rgba(180,130,100,0.25); color: var(--text-mute);
}
.spot-badge-daily {
  position: absolute; top: -6px; left: -6px; z-index: 6;
  background: linear-gradient(135deg, #10b981, #059669); color: #fff;
  font-size: 11px; font-weight: 900; padding: 2px 9px; border-radius: 99px;
  box-shadow: 0 3px 8px rgba(16,185,129,0.4); border: 1.5px solid rgba(255,255,255,0.85);
}
.map-spot.tianji-done .spot-badge-daily {
  background: #e2e8f0; color: #64748b; box-shadow: none; border-color: #cbd5e1;
}

/* =============================================================
   世界 Boss：【上古・饕餮】地圖專屬沙盤點位樣式
   ============================================================= */
.spot-boss-wrap {
  position: relative; width: 146px; height: 146px;
  display: flex; align-items: center; justify-content: center;
  animation: bossHoverFloat 4.2s ease-in-out infinite;
}
@keyframes bossHoverFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 底層煞氣法陣光暈 */
.spot-boss-aura {
  position: absolute; inset: -15%; border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.42) 0%, rgba(239, 68, 68, 0.26) 45%, transparent 72%);
  animation: bossAuraPulse 3.2s ease-in-out infinite alternate;
}
@keyframes bossAuraPulse {
  0% { transform: scale(0.92); opacity: 0.75; }
  100% { transform: scale(1.18); opacity: 1; filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.6)); }
}

.spot-boss-img {
  position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 14px 26px rgba(40, 10, 30, 0.6)) drop-shadow(0 0 20px rgba(168, 85, 247, 0.65));
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
}

.map-spot:hover .spot-boss-img {
  filter: drop-shadow(0 20px 36px rgba(40, 10, 30, 0.75)) drop-shadow(0 0 32px rgba(245, 158, 11, 0.95)) drop-shadow(0 0 16px rgba(239, 68, 68, 0.9));
  transform: scale(1.08);
}

/* 封印態：暗黑神秘剪影 + 金色鎖鏈結界 */
.map-spot.boss-sealed .spot-boss-aura {
  background: radial-gradient(circle, rgba(100, 116, 139, 0.35) 0%, rgba(15, 23, 42, 0.6) 55%, transparent 75%);
}
.map-spot.boss-sealed .spot-boss-img {
  filter: brightness(0.24) contrast(1.45) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 14px rgba(245, 196, 81, 0.4));
}
.map-spot.boss-sealed:hover .spot-boss-img {
  filter: brightness(0.35) contrast(1.4) drop-shadow(0 16px 30px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 24px rgba(245, 196, 81, 0.8));
}

/* 封印結界環 */
.spot-boss-seal-ring {
  position: absolute; inset: 4%; border: 2px dashed rgba(245, 196, 81, 0.7);
  border-radius: 50%; pointer-events: none; z-index: 3;
  animation: sealRingRotate 18s linear infinite;
  box-shadow: inset 0 0 15px rgba(245, 196, 81, 0.3), 0 0 15px rgba(245, 196, 81, 0.3);
}
@keyframes sealRingRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 狀態徽章 */
.spot-badge-boss {
  position: absolute; top: -6px; left: -8px; z-index: 6;
  background: linear-gradient(135deg, #ef4444, #f59e0b); color: #fff;
  font-size: 11px; font-weight: 900; padding: 2px 10px; border-radius: 99px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.45); border: 1.5px solid rgba(255, 255, 255, 0.9);
  display: flex; align-items: center; gap: 4px;
}
.map-spot.boss-sealed .spot-badge-boss {
  background: linear-gradient(135deg, #475569, #1e293b); color: #cbd5e1;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.5); border-color: rgba(245, 196, 81, 0.6);
}

/* 世界Boss專屬暗金尊榮標籤 */
.map-spot.spot-boss .spot-label {
  background: linear-gradient(135deg, rgba(26, 16, 36, 0.95), rgba(45, 18, 30, 0.95)) !important;
  border: 1.5px solid rgba(245, 196, 81, 0.6) !important;
  color: #fde047 !important;
  box-shadow: 0 8px 20px rgba(20, 10, 30, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}
.map-spot.spot-boss .spot-label-top span {
  color: #fde047 !important; font-weight: 900; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}
.map-spot.spot-boss .spot-label-prod {
  background: rgba(245, 196, 81, 0.14) !important;
  color: #fbbf24 !important; font-weight: 800; border-radius: 4px; padding: 1px 6px;
}

/* 世界Boss專屬暗金尊榮標籤擴充與大地圖血條 */
.map-spot.spot-boss .spot-label {
  min-width: 140px;
  padding: 8px 12px !important;
}

.spot-boss-map-hp {
  width: 100%;
  margin: 4px 0 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.spot-boss-map-hp-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 800;
  color: #fecdd3;
  line-height: 1.2;
}

.spot-boss-map-hp-title {
  color: #fda4af;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.spot-boss-map-hp-num {
  color: #ffffff;
  font-family: inherit;
  font-size: 11px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.spot-boss-map-hp-pct {
  color: #fde047;
  font-size: 10px;
}

.spot-boss-map-hp-track {
  position: relative;
  width: 100%;
  height: 9px;
  background: rgba(12, 6, 10, 0.95);
  border: 1px solid rgba(245, 196, 81, 0.7);
  border-radius: 99px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(239, 68, 68, 0.35);
}

.spot-boss-map-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #b91c1c 0%, #ef4444 60%, #f59e0b 100%);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}

.spot-boss-map-hp-fill.is-critical {
  background: linear-gradient(90deg, #dc2626 0%, #f43f5e 50%, #fb7185 100%);
  animation: hpCriticalPulse 0.8s ease-in-out infinite alternate;
}

.spot-boss-map-hp-fill.is-defeated {
  background: linear-gradient(90deg, #4b5563, #6b7280);
  box-shadow: none;
}

.spot-boss-map-hp-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: hpShimmer 2.2s infinite;
}

@keyframes hpCriticalPulse {
  0% { filter: brightness(1) drop-shadow(0 0 2px #ef4444); }
  100% { filter: brightness(1.35) drop-shadow(0 0 8px #f43f5e); }
}

@keyframes hpShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* 題目與選項 KaTeX 微調與圖片自適應 */
.katex {
  font-size: 1.08em;
  text-shadow: none;
}
.qz-q .katex {
  font-size: 1.15em;
}


/* 天機閣彈窗與軍備箱預覽 */
.tianji-head-banner {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(245,196,81,0.18), rgba(239,90,86,0.08));
  border: 1.5px solid rgba(217,119,6,0.3); border-radius: 16px; margin-bottom: 16px;
}
.tianji-banner-thumb { width: 68px; height: 68px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2)); flex-shrink: 0; }
.tianji-chests-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0;
}
.chest-preview-card {
  background: var(--bg-1); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 12px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 4px 12px rgba(120,70,50,0.06); transition: all .2s;
}
.chest-preview-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--gold); }
.chest-preview-img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.2)); }
.chest-target-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; }
.tag-gold { background: rgba(245,158,11,0.2); color: #b45309; }
.tag-silver { background: rgba(148,163,184,0.2); color: #475569; }
.tag-bronze { background: rgba(180,130,100,0.2); color: #78350f; }

/* 寶箱機率說明抽屜 */
.chest-prob-toggle {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%;
  padding: 8px; font-size: 13px; font-weight: 700; color: var(--gold); background: rgba(245,158,11,0.08);
  border: 1px dashed rgba(217,119,6,0.4); border-radius: 10px; cursor: pointer; margin-bottom: 12px;
}
.chest-prob-toggle:hover { background: rgba(245,158,11,0.15); }
.chest-prob-detail {
  background: var(--bg-2); border-radius: 12px; padding: 12px; margin-bottom: 14px; font-size: 13px;
  border: 1px solid var(--line); line-height: 1.6; overflow-x: auto;
}
.chest-prob-table {
  width: 100%; border-collapse: collapse; font-size: 12px; text-align: left;
  border-radius: 8px; overflow: hidden; background: var(--bg-1);
}
.chest-prob-table th, .chest-prob-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.chest-prob-table th {
  background: rgba(217,119,6,0.12); color: var(--gold-dark); font-weight: 800;
  white-space: nowrap; font-size: 12px;
}
.chest-prob-table tr:last-child td { border-bottom: none; }
.chest-prob-table tr:hover td { background: rgba(245,158,11,0.06); }
.prob-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.prob-list li { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px; background: var(--bg-1); }

/* 60秒急速快答 HUD */
.tianji-arena { position: relative; padding: 10px 0; }
.tianji-timer-wrap {
  width: 100%; height: 12px; background: rgba(180,130,100,0.2); border-radius: 99px; overflow: hidden; margin-bottom: 12px;
}
.tianji-timer-bar {
  height: 100%; width: 100%; background: linear-gradient(90deg, #10b981, #f59e0b);
  border-radius: 99px; transition: width 0.1s linear, background 0.3s;
}
.tianji-timer-bar.urgent { background: linear-gradient(90deg, #f59e0b, #ef4444); animation: urgentFlash 0.5s infinite; }
@keyframes urgentFlash { 50% { opacity: 0.6; } }

.tianji-hud-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.tianji-hearts { font-size: 20px; letter-spacing: 2px; }
.tianji-score-box { font-size: 15px; font-weight: 900; color: var(--text); }
.tianji-timer-num { font-size: 26px; font-weight: 900; color: #b45309; min-width: 60px; text-align: right; }

/* 道具列 */
.tianji-items-bar {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.item-btn {
  flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; border-radius: 12px; font-size: 13px; font-weight: 800; border: 1.5px solid var(--line);
  background: var(--bg-1); color: var(--text); cursor: pointer; transition: all .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06); touch-action: manipulation;
}
.item-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--gold); box-shadow: var(--shadow); }
.item-btn:active:not(:disabled) { transform: scale(0.96); }
.item-btn:disabled { opacity: 0.4; cursor: not-allowed; border-style: dashed; }
.item-btn.btn-peek { border-color: rgba(245,158,11,0.5); background: #fffbeb; color: #b45309; }
.item-btn.btn-elim { border-color: rgba(239,90,86,0.5); background: #fef2f2; color: #dc2626; }

/* 題目選項特效 */
.qz-opt.opt-eliminated {
  opacity: 0.25; filter: grayscale(1); pointer-events: none; text-decoration: line-through; border-style: dashed;
}
.qz-opt.opt-peeked {
  border-color: #f59e0b !important; background: #fef3c7 !important; color: #92400e !important;
  box-shadow: 0 0 16px rgba(245,158,11,0.7) !important; animation: peekPulse 1s infinite alternate;
}
@keyframes peekPulse { from { transform: scale(1); } to { transform: scale(1.02); } }

/* 開寶箱舞台與震撼動效 */
.chest-stage {
  text-align: center; padding: 18px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.chest-big-wrap {
  position: relative; width: 164px; height: 164px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.chest-big-img {
  position: relative; z-index: 2;
  width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 26px rgba(0,0,0,0.35));
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), filter .25s ease;
}
.chest-big-wrap:hover:not(.rumble):not(.open) .chest-big-img {
  transform: translateY(-4px) scale(1.03);
}
.chest-big-wrap.rumble .chest-big-img {
  animation: chestRumble 0.11s infinite ease-in-out;
  filter: drop-shadow(0 14px 28px rgba(245,158,11,0.6));
}
@keyframes chestRumble {
  0% { transform: translate(0, 0) rotate(0deg) scale(1.02); }
  20% { transform: translate(-6px, 3px) rotate(-4deg) scale(1.04); }
  40% { transform: translate(5px, -3px) rotate(4deg) scale(1.03); }
  60% { transform: translate(-5px, -2px) rotate(-3deg) scale(1.05); }
  80% { transform: translate(4px, 4px) rotate(3deg) scale(1.04); }
  100% { transform: translate(0, 0) rotate(0deg) scale(1.02); }
}
.chest-big-wrap.open .chest-big-img {
  animation: chestOpenPop 0.55s cubic-bezier(.34,1.56,.64,1) forwards;
  filter: drop-shadow(0 16px 32px rgba(245,196,81,0.75));
}
@keyframes chestOpenPop {
  0% { transform: scale(0.92); }
  45% { transform: scale(1.16) translateY(-10px); }
  100% { transform: scale(1.05) translateY(-3px); }
}
.chest-rays {
  position: absolute; inset: -48px; z-index: 1; pointer-events: none; opacity: 0; border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, rgba(251,191,36,0.45) 0deg 14deg, transparent 14deg 30deg),
    radial-gradient(circle, rgba(245,196,81,0.85) 0%, rgba(245,158,11,0.28) 45%, transparent 72%);
  transition: opacity 0.3s;
}
.chest-big-wrap.open .chest-rays { opacity: 1; animation: raysSpin 6s linear infinite; }
.chest-big-wrap.open.hit-bonus .chest-rays {
  background:
    repeating-conic-gradient(from 0deg, rgba(52,211,153,0.45) 0deg 14deg, rgba(251,191,36,0.35) 14deg 28deg, transparent 28deg 40deg),
    radial-gradient(circle, rgba(251,191,36,0.92) 0%, rgba(16,185,129,0.35) 48%, transparent 74%);
}
@keyframes raysSpin { to { transform: rotate(360deg); } }

.chest-burst-ring {
  position: absolute; inset: 10px; z-index: 1; border-radius: 50%; pointer-events: none; opacity: 0;
  border: 3px solid rgba(251,191,36,0.9);
}
.chest-big-wrap.open .chest-burst-ring {
  animation: chestBurstRing 0.7s ease-out forwards;
}
@keyframes chestBurstRing {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.85); opacity: 0; }
}

.chest-title { margin: 0; font-size: 20px; font-weight: 900; color: var(--text); }
.chest-subtitle { margin: 0; font-size: 13px; color: var(--text-dim); max-width: 480px; line-height: 1.5; }
.chest-hint-text { font-size: 14px; font-weight: 700; color: var(--text-dim); min-height: 22px; }
.chest-btn-area { display: flex; justify-content: center; width: 100%; }

/* 寶箱節奏停桿破鎖小遊戲 */
.chest-rhythm-panel {
  width: 100%; max-width: 580px;
  display: grid; grid-template-columns: 1fr 205px; gap: 12px; align-items: stretch;
  text-align: left;
}
.chest-rhythm-main {
  background: var(--bg-1); border: 1.5px solid rgba(217,119,6,0.38); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 6px 18px rgba(120,70,50,0.08);
}
.chest-rhythm-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.chest-rhythm-title { font-size: 14px; font-weight: 900; color: var(--gold-dark); }
.chest-rhythm-status {
  font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px;
  background: rgba(245,158,11,0.14); color: #92400e;
}
.chest-rhythm-status.is-hit { background: rgba(16,185,129,0.16); color: #047857; }
.chest-rhythm-status.is-miss { background: rgba(239,68,68,0.12); color: #b91c1c; }

.chest-rhythm-track {
  position: relative; width: 100%; height: 34px; border-radius: 99px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 2px solid #92400e; box-shadow: inset 0 3px 8px rgba(0,0,0,0.55);
  cursor: pointer; touch-action: manipulation; user-select: none;
  margin: 4px 0; transition: border-color .2s, box-shadow .2s;
}
.chest-rhythm-track.is-hit {
  border-color: #10b981;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.45), 0 0 18px rgba(16,185,129,0.55);
}
.chest-rhythm-track.is-miss {
  border-color: #f87171;
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.45), 0 0 12px rgba(239,68,68,0.35);
}
.chest-rhythm-zone {
  position: absolute; top: 3px; bottom: 3px; border-radius: 99px;
  background: linear-gradient(180deg, rgba(52,211,153,0.92), rgba(5,150,105,0.95));
  border: 1.5px solid #a7f3d0;
  box-shadow: 0 0 14px rgba(16,185,129,0.7);
  pointer-events: none;
}
.chest-rhythm-zone::after {
  content: '✦'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 13px; color: #ecfdf5; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.chest-rhythm-needle {
  position: absolute; top: -6px; bottom: -6px; left: 0%; width: 10px;
  transform: translateX(-50%); border-radius: 99px; pointer-events: none;
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 52%, #b45309 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(251,191,36,0.95), 0 2px 6px rgba(0,0,0,0.5);
  will-change: left;
}
.chest-rhythm-track.is-hit .chest-rhythm-needle {
  background: linear-gradient(180deg, #a7f3d0 0%, #10b981 55%, #047857 100%);
  box-shadow: 0 0 16px rgba(16,185,129,1), 0 2px 6px rgba(0,0,0,0.5);
}
.chest-rhythm-track.is-miss .chest-rhythm-needle {
  background: linear-gradient(180deg, #fecaca 0%, #ef4444 55%, #b91c1c 100%);
  box-shadow: 0 0 12px rgba(239,68,68,0.8), 0 2px 6px rgba(0,0,0,0.5);
}
.chest-rhythm-btn {
  width: 100%; min-height: 46px; font-size: 15px; font-weight: 900;
  box-shadow: 0 6px 18px rgba(217,119,6,0.32); touch-action: manipulation;
  transition: transform .12s ease, box-shadow .12s ease;
}
.chest-rhythm-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(217,119,6,0.42); }
.chest-rhythm-btn:active:not(:disabled) { transform: scale(0.97); }

.chest-rhythm-note {
  background: linear-gradient(145deg, rgba(254,243,199,0.85), rgba(253,230,138,0.42));
  border: 1.5px dashed rgba(217,119,6,0.55); border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.chest-rhythm-note-tag {
  font-size: 12px; font-weight: 900; color: #92400e; display: flex; align-items: center; gap: 4px;
}
.chest-rhythm-note-body {
  margin: 0; font-size: 12.5px; line-height: 1.55; color: #78350f; font-weight: 700;
}
.chest-bonus-pill {
  display: inline-block; margin-bottom: 10px; padding: 5px 14px; border-radius: 99px;
  background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(245,158,11,0.16));
  border: 1px solid rgba(16,185,129,0.45); color: #047857; font-size: 12.5px; font-weight: 900;
}

@media (max-width: 620px) {
  .chest-rhythm-panel { grid-template-columns: 1fr; }
  .chest-rhythm-track { height: 40px; }
  .chest-rhythm-keyhint { display: none; }
}

.rewards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; width: 100%; max-width: 480px;
  margin: 4px auto 0; animation: rewardsPop 0.5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes rewardsPop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.reward-item-card {
  background: var(--bg-1); border: 1.5px solid var(--gold); border-radius: 12px;
  padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 4px 14px rgba(245,158,11,0.2);
}
.reward-item-card img { width: 44px; height: 44px; object-fit: contain; }
.reward-item-card b { font-size: 15px; color: var(--gold-dark); }
.reward-item-card span { font-size: 11px; color: var(--text-dim); }

/* 全域捷報廣播彈窗 */
.milestone-broadcast-modal {
  text-align: center; padding: 20px 14px;
  animation: victoryPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes victoryPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.broadcast-horn {
  font-size: 52px; filter: drop-shadow(0 4px 12px rgba(245,158,11,0.5));
  animation: hornShake 1s infinite alternate;
  margin-bottom: 8px;
}
@keyframes hornShake {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(8deg); }
}
.broadcast-banner-tag {
  display: inline-block; padding: 4px 16px; border-radius: 99px;
  background: linear-gradient(90deg, #d97706, #b45309);
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(217,119,6,0.35); margin-bottom: 12px;
}
.broadcast-headline {
  font-size: 22px; font-weight: 900; color: #b45309; margin: 0 0 8px 0;
}
.broadcast-subtext {
  font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 440px; margin: 0 auto 16px;
}
.broadcast-stats-box {
  background: var(--bg-2); border: 1.5px dashed var(--gold); border-radius: 12px;
  padding: 12px 18px; display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 20px; font-size: 15px; font-weight: 800; color: var(--text);
}
.broadcast-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 16px; font-weight: 800; padding: 12px 32px;
  border-radius: 99px; border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(217,119,6,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px; display: inline-flex; align-items: center; justify-content: center;
}
.broadcast-btn:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217,119,6,0.45);
}
.broadcast-btn:active {
  transform: translateY(0);
}

/* =============================================================
   封測先鋒功勳冊封令彈窗 (Pioneer Edict Modal)
   ============================================================= */
.pioneer-edict-modal {
  text-align: center; padding: 14px 10px; max-width: 540px; margin: 0 auto;
  animation: edictPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes edictPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.pioneer-seal-wrap {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle, #fef3c7 20%, #fde68a 60%, #f59e0b 100%);
  border: 3px solid #d97706; box-shadow: 0 0 24px rgba(245, 158, 11, 0.6);
  margin-bottom: 12px; font-size: 38px;
}
.pioneer-tag {
  display: inline-block; padding: 4px 14px; border-radius: 99px;
  background: linear-gradient(90deg, #b45309, #d97706);
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.35); margin-bottom: 10px;
}
.pioneer-title {
  font-size: 24px; font-weight: 900; color: #b45309; margin: 0 0 10px 0;
  letter-spacing: 0.5px;
}
.pioneer-intro {
  font-size: 14px; color: var(--text-dim); line-height: 1.6; margin: 0 auto 16px;
  background: rgba(245, 158, 11, 0.08); border-radius: 12px; padding: 12px 14px;
  border-left: 4px solid #f59e0b; text-align: left;
}
.pioneer-rank-card {
  display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 12px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.6), rgba(253, 230, 138, 0.4));
  border: 1.5px solid rgba(217, 119, 6, 0.4); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 16px;
}
.pioneer-stat-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.pioneer-stat-lbl { font-size: 12px; color: #92400e; font-weight: 700; }
.pioneer-stat-val { font-size: 20px; font-weight: 900; color: #b45309; }

.pioneer-reward-shelf {
  display: flex; justify-content: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap;
}
.pioneer-reward-card {
  flex: 1 1 180px; max-width: 220px;
  background: var(--bg-1); border: 1.5px solid var(--gold); border-radius: 14px;
  padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.18);
}
.pioneer-reward-icon { font-size: 32px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }
.pioneer-reward-name { font-size: 15px; font-weight: 800; color: #b45309; }
.pioneer-reward-qty { font-size: 20px; font-weight: 900; color: #d97706; }
.pioneer-reward-desc { font-size: 11px; color: var(--text-dim); text-align: center; }

.pioneer-action-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 16px; font-weight: 800; padding: 12px 32px;
  border-radius: 99px; border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 48px; width: 100%; max-width: 320px;
}
.pioneer-action-btn:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217, 119, 6, 0.5);
}

/* =============================================================
   新手 3 步驟圖文出征指南彈窗 (Beginner Guide Modal)
   ============================================================= */
.beginner-guide-modal {
  text-align: left; padding: 10px 4px; max-width: 620px; margin: 0 auto;
}
.beginner-guide-header {
  text-align: center; margin-bottom: 18px;
}
.beginner-guide-title {
  font-size: 22px; font-weight: 900; color: #b45309; margin: 6px 0 4px;
}
.beginner-guide-sub {
  font-size: 13px; color: var(--text-dim); margin: 0;
}
.beginner-steps-container {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px;
}
.beginner-step-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-1); border: 1.5px solid var(--card-border);
  border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(120, 70, 50, 0.04);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.beginner-step-card:hover {
  border-color: rgba(245, 158, 11, 0.5); transform: translateX(3px);
}
.step-badge-col {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.step-num-badge {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: 15px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}
.step-icon-img {
  width: 44px; height: 44px; object-fit: contain; border-radius: 8px; margin-top: 4px;
}
.step-content { flex: 1; min-width: 0; }
.step-title {
  font-size: 16px; font-weight: 800; color: var(--text); margin: 0 0 4px 0;
  display: flex; align-items: center; gap: 6px;
}
.step-title .step-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: rgba(16, 185, 129, 0.15); color: #059669; font-weight: 700;
}
.step-desc {
  font-size: 13px; color: var(--text-dim); line-height: 1.6; margin: 0;
}
.step-desc b { color: #b45309; }

.beginner-guide-footer-tip {
  background: #f0fdf4; border: 1.5px solid rgba(5, 150, 105, 0.25);
  border-radius: 12px; padding: 10px 14px; font-size: 12px; color: #065f46;
  line-height: 1.5; margin-bottom: 18px;
}

/* =============================================================
   首頁新手指引橫幅 (Beginner Banner)
   ============================================================= */
.beginner-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  background: linear-gradient(135deg, #ecfdf5, #fef3c7);
  border: 1.5px solid rgba(16, 185, 129, 0.35); border-radius: 12px;
  padding: 10px 16px; margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08);
  animation: bannerFadeIn 0.3s ease;
}
@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.beginner-banner-left {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 260px;
}
.beginner-banner-icon { font-size: 22px; }
.beginner-banner-text {
  font-size: 13px; font-weight: 600; color: #065f46; line-height: 1.5;
}
.beginner-banner-text b { color: #b45309; }
.beginner-banner-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff; font-size: 12px; font-weight: 800; border: none;
  border-radius: 8px; padding: 6px 14px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.beginner-banner-btn:hover {
  transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

/* =============================================================
   課後暫停城池營造橫幅 (Construction Pause Banner)
   ============================================================= */
.pause-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #e0e7ff; border: 1.5px solid rgba(129, 140, 248, 0.45);
  border-radius: 12px; padding: 10px 16px; margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(30, 27, 75, 0.28);
  font-size: 13px; line-height: 1.5;
  animation: bannerFadeIn 0.3s ease;
}
.pause-banner .pause-icon { font-size: 24px; filter: drop-shadow(0 2px 6px rgba(165,180,252,0.4)); }
.pause-banner .pause-text { flex: 1; }
.pause-banner .pause-text b { color: #fde047; font-weight: 800; }

.btn-paused {
  opacity: 0.65 !important;
  filter: grayscale(0.6) !important;
  cursor: not-allowed !important;
}

/* =============================================================
   版本更新公告系統（可複用模版）
   ============================================================= */
.modal.modal-patch-clean,
.modal.modal-announcement-fullscreen,
.modal:has(.patch-modal-wrap),
.modal:has(.patch-note-container) {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  max-height: 94vh !important;
  width: min(680px, 95vw) !important;
}
.modal.modal-announcement-fullscreen .modal-body,
.modal.modal-patch-clean .modal-body,
.modal:has(.patch-modal-wrap) .modal-body,
.modal:has(.patch-note-container) .modal-body {
  padding: 0 !important;
  background: transparent !important;
}
.modal.modal-patch-clean .modal-x,
.modal.modal-announcement-fullscreen .modal-x,
.modal:has(.patch-modal-wrap) .modal-x,
.modal:has(.patch-note-container) .modal-x {
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  z-index: 50;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
}
.modal.modal-patch-clean .modal-x:hover,
.modal.modal-announcement-fullscreen .modal-x:hover,
.modal:has(.patch-modal-wrap) .modal-x:hover,
.modal:has(.patch-note-container) .modal-x:hover {
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.9);
  transform: rotate(90deg) scale(1.08);
}

/* 公告主容器 */
.patch-modal-wrap,
.patch-note-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1.5px solid rgba(245, 196, 81, 0.45);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 45px rgba(245, 196, 81, 0.2);
  background-color: #0b0f19;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  color: #ffffff;
  box-sizing: border-box;
}

/* 頂部英雄視覺台（饕餮 / 駱駝剪影） */
.patch-stage {
  position: relative;
  width: 100%;
  height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: url('../assets/boss_bg_arena.jpg') center / cover no-repeat;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.patch-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 10, 16, 0.2) 0%, rgba(9, 10, 16, 0.95) 90%);
  pointer-events: none;
}
.patch-silhouette-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.patch-silhouette-box {
  position: relative;
  display: inline-block;
  line-height: 0;
  animation: silhouettePulse 3.5s ease-in-out infinite alternate;
  transform-origin: center bottom;
  margin: 0 auto;
}
.patch-silhouette-img.is-silhouette {
  height: 180px;
  width: 180px;
  object-fit: contain;
  filter: brightness(0) drop-shadow(0 0 16px rgba(245, 196, 81, 0.95)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.8));
  display: block;
}
.patch-silhouette-img.is-caravan-glow {
  height: 175px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(245, 196, 81, 0.85)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.7));
  display: block;
}
@keyframes silhouettePulse {
  0% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 12px rgba(245, 196, 81, 0.7)) drop-shadow(0 0 25px rgba(168, 85, 247, 0.6)); }
  100% { transform: scale(1.025) translateY(-4px); filter: drop-shadow(0 0 22px rgba(245, 196, 81, 1)) drop-shadow(0 0 45px rgba(239, 68, 68, 0.75)); }
}
.silhouette-eye {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 15%, #fef08a 45%, #f59e0b 85%);
  box-shadow: 0 0 8px #f59e0b, 0 0 18px #ef4444;
  z-index: 5;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg));
  transform-origin: center center;
  animation: eyeBlink 4s infinite ease-in-out;
}
.eye-left {
  left: var(--eye-l-x, 24.5%);
  top: var(--eye-l-y, 48.1%);
  width: var(--eye-l-w, 9px);
  height: var(--eye-l-h, 6px);
  --eye-rot: var(--eye-l-rot, 14deg);
}
.eye-right {
  left: var(--eye-r-x, 37.7%);
  top: var(--eye-r-y, 44.5%);
  width: var(--eye-r-w, 11px);
  height: var(--eye-r-h, 8px);
  --eye-rot: var(--eye-r-rot, -6deg);
}
@keyframes eyeBlink {
  0%, 90%, 100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg)) scale(1, 1);
  }
  93%, 95% {
    opacity: 0.15;
    transform: translate(-50%, -50%) rotate(var(--eye-rot, 0deg)) scale(1, 0.1);
  }
}

/* 公告頭部區塊 */
.patch-note-header {
  padding: 22px 24px 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.8) 100%);
  border-bottom: 1px solid rgba(245, 196, 81, 0.25);
  position: relative;
  z-index: 3;
  text-align: left;
}
.patch-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.patch-badge-pill,
.patch-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #b45309, #d97706);
  color: #fff;
  font-size: 11.5px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(254, 240, 138, 0.4);
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.45);
}
.patch-version-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(168, 85, 247, 0.25);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.5);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}
.patch-title,
.patch-main-title {
  margin: 6px 0 6px 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1.5px;
  line-height: 1.25;
  background: linear-gradient(180deg, #ffffff 15%, #fde68a 60%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}
.patch-subtitle,
.patch-sub-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #fde047;
  letter-spacing: 0.4px;
  line-height: 1.5;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* 公告主體捲動區域 */
.patch-body,
.patch-note-body {
  position: relative;
  z-index: 3;
  padding: 16px 22px 20px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(10px);
  text-align: left;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.patch-body::-webkit-scrollbar,
.patch-note-body::-webkit-scrollbar {
  width: 6px;
}
.patch-body::-webkit-scrollbar-thumb,
.patch-note-body::-webkit-scrollbar-thumb {
  background: rgba(245, 196, 81, 0.4);
  border-radius: 99px;
}

.patch-hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.patch-lore-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-left: 4px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  width: 100%;
  box-sizing: border-box;
}
.patch-lore-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: #f1f5f9;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.patch-features-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.patch-section-heading {
  margin: 4px 0 8px 0;
  font-size: 16px;
  font-weight: 900;
  color: #facc15;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* 傳統 features 網格 */
.patch-features-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.patch-feature-card,
.patch-feat-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(22, 30, 49, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.patch-feature-card:hover,
.patch-feat-item:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(245, 196, 81, 0.45);
}
.patch-feature-icon-wrap,
.patch-feat-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.patch-feature-body {
  flex: 1;
}
.patch-feature-title,
.patch-feat-tit {
  font-size: 14px;
  font-weight: 800;
  color: #fef08a !important;
  margin: 0 0 4px 0;
  letter-spacing: 0.3px;
}
.patch-feature-desc,
.patch-feat-sub {
  font-size: 12.5px;
  color: #f1f5f9 !important;
  margin: 0;
  line-height: 1.55;
}

/* 公告分部卡片專屬樣式（第一部 駱駝商人 / 第二部 西域商隊） */
.patch-parts-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
}
.patch-part-card {
  background: linear-gradient(180deg, rgba(26, 36, 56, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
  border: 1.5px solid rgba(245, 196, 81, 0.35);
  border-radius: 14px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.patch-part-card:hover {
  border-color: rgba(245, 196, 81, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 196, 81, 0.2);
}
.patch-part-card.part-camel {
  border-left: 5px solid #f59e0b;
}
.patch-part-card.part-caravan {
  border-left: 5px solid #a855f7;
}
.patch-part-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.patch-part-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.patch-part-title {
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.patch-part-date-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}
.badge-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.45));
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}
.badge-purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(126, 34, 206, 0.45));
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}
.patch-part-desc {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 12px;
}
.patch-part-grid,
.patch-part-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.patch-part-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(11, 17, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.patch-part-item:hover {
  background: rgba(22, 33, 58, 0.95);
  border-color: rgba(245, 196, 81, 0.5);
}
.patch-part-item-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.patch-part-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
/* 核心修復：高明度、高對比標題與說明文字 */
.patch-part-item-title,
.patch-part-item-tit {
  font-size: 13.5px;
  font-weight: 800;
  color: #fef08a !important;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.patch-part-item-desc,
.patch-part-item-sub {
  font-size: 12.5px;
  color: #f1f5f9 !important;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* 公告底部按鈕與時程資訊 */
.patch-note-footer {
  padding: 14px 22px 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(10, 14, 26, 0.98) 100%);
  border-top: 1px solid rgba(245, 196, 81, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  position: relative;
  z-index: 3;
}
.patch-footer-info {
  font-size: 12.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.patch-footer-info b {
  color: #fde047;
}
.patch-preview-tag {
  color: #c084fc;
  font-size: 11.5px;
}
.patch-confirm-btn,
.patch-btn-confirm {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #2a1500 !important;
  background: linear-gradient(180deg, #ffe08a 0%, #f5b323 55%, #d98a14 100%) !important;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 179, 35, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.patch-confirm-btn:hover,
.patch-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245, 179, 35, 0.65);
}

/* =============================================================
   西域駱駝商隊（飄動實體與單字問答試煉 UI）
   ============================================================= */
/* =============================================================
   大漠駝鈴：沙盤大地圖行商駱駝行走動畫（大漠行駝・西域互市前置活動）
   ============================================================= */
.merchant-camel {
  position: absolute;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  user-select: none;
  transform: translate(-50%, -90%);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
  will-change: transform, left, top, opacity;
  pointer-events: auto;
  transition: opacity 0.25s linear;
}

.merchant-camel:hover .camel-avatar-img {
  filter: drop-shadow(0 0 12px rgba(245, 177, 30, 0.85));
}

.camel-body-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 90%;
}

/* 駱駝真實行走步態起伏（4 拍循環顛簸節奏） */
.camel-avatar-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
  transform-origin: 50% 90%;
  animation: camelStepWalking 1.2s ease-in-out infinite;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
  pointer-events: auto;
}

@keyframes camelStepWalking {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-5px) rotate(1.5deg);
  }
  50% {
    transform: translateY(0) rotate(-0.5deg);
  }
  75% {
    transform: translateY(-3px) rotate(-1.5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

/* 腳下行走踩地陰影（隨步態伸縮） */
.camel-shadow {
  width: 68px;
  height: 10px;
  background: radial-gradient(ellipse at center, rgba(15, 10, 5, 0.65) 0%, rgba(15, 10, 5, 0) 70%);
  border-radius: 50%;
  margin-top: -6px;
  animation: camelShadowPulse 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes camelShadowPulse {
  0%, 50%, 100% {
    transform: scale(1.0);
    opacity: 0.65;
  }
  25% {
    transform: scale(0.82);
    opacity: 0.35;
  }
  75% {
    transform: scale(0.88);
    opacity: 0.45;
  }
}

/* 頭頂對話氣泡（以琥珀金橘 #f5b11e 與暖黃 #efeb86 點綴） */
.camel-bubble {
  background: linear-gradient(135deg, rgba(20, 26, 24, 0.94), rgba(12, 16, 14, 0.96));
  border: 1.5px solid #f5b11e;
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  color: #efeb86;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 10px rgba(245, 177, 30, 0.25);
  margin-bottom: 2px;
  pointer-events: auto;
  animation: camelBubbleFloat 2.2s ease-in-out infinite alternate;
}

@keyframes camelBubbleFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

@media (max-width: 600px) {
  .camel-avatar-img {
    width: 76px;
    height: 76px;
  }
  .camel-shadow {
    width: 52px;
  }
}

/* =============================================================
   與商人交流交流...（依老師原型設計像素級重構）
   乾淨柔和白米底盤 ｜ 翠綠單字大卡片 #489e5a ｜ 琥珀黃標籤 #f5b11e
   ============================================================= */
/* =============================================================
   與商人交流交流...（依老師原型設計像素級重構）
   乾淨柔和白米底盤 ｜ 翠綠單字大卡片 #3ea75e ｜ 琥珀黃標籤 #f5a623
   右上左下無多餘圓圈 ｜ 極致舒適可讀性
   ============================================================= */
.modal.merchant-quiz-modal {
  background: #ffffff !important;
  border: 1px solid #efe8db !important;
  border-radius: 28px !important;
  padding: 24px 28px 26px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12), 0 4px 18px rgba(0, 0, 0, 0.04) !important;
  max-width: 610px !important;
  max-height: 92vh !important;
  overflow-y: auto !important;
  width: 93vw !important;
  color: #1e293b !important;
  position: relative !important;
}

.modal.merchant-quiz-modal::-webkit-scrollbar {
  width: 6px;
}

.modal.merchant-quiz-modal::-webkit-scrollbar-track {
  background: transparent;
}

.modal.merchant-quiz-modal::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 99px;
}

.modal.merchant-quiz-modal .modal-x {
  color: #64748b !important;
  font-size: 20px !important;
  top: 20px !important;
  right: 22px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-weight: 700 !important;
}

.modal.merchant-quiz-modal .modal-x:hover {
  color: #1e293b !important;
  transform: scale(1.18) !important;
}

.mq-modal-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #1e293b;
}

/* 頂部標題列 */
.mq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2px;
}

.mq-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mq-title-avatar {
  width: 54px;
  height: 54px;
  background: #fff8e6;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fae69e;
  box-shadow: 0 3px 10px rgba(245, 177, 30, 0.12);
  flex-shrink: 0;
  position: relative;
}

.mq-title-avatar img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.mq-title {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  color: #278648;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.mq-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

/* 三個圓角狀態膠囊標籤 */
.mq-pills-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 16px;
  flex-wrap: wrap;
}

.mq-pill {
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mq-pill-gold {
  background: #fef9e7;
  border: 1px solid #fae39b;
  color: #c27803;
}

.mq-pill-level {
  background: #eaf8ee;
  border: 1px solid #b9e9c3;
  color: #1b823e;
}

.mq-pill-day {
  background: #fef5e6;
  border: 1px solid #fbdca9;
  color: #b45309;
}

/* 核心翠綠單字展示大卡片（#3ea75e 漸層＋沙漠沙丘剪影風格） */
.mq-word-card {
  background: linear-gradient(135deg, #44a35d 0%, #3ca056 55%, #33924c 100%);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(60, 160, 86, 0.25);
}

/* 右下角沙漠微丘剪影與漫步駱駝 */
.mq-word-card::after {
  content: "";
  position: absolute;
  right: -15px;
  bottom: -25px;
  width: 220px;
  height: 120px;
  background: radial-gradient(ellipse at 80% 90%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 55%, rgba(255, 255, 255, 0) 80%);
  pointer-events: none;
}

.mq-word-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.mq-word-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.mq-word-en {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffffff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.mq-word-ipa {
  font-size: 19px;
  font-weight: 800;
  color: #efeb86;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
  margin-left: 4px;
}

.mq-word-pos {
  font-size: 13.5px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  margin-left: 6px;
}

/* 琥珀橙發音按鈕（白字、膠囊、鮮明） */
.mq-speak-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border: none;
  color: #ffffff;
  border-radius: 99px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.38);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mq-speak-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.48);
}

/* 嵌在綠色卡片下方的白色例句小卡片 */
.mq-example-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 16px;
  border-left: 4.5px solid #3ca056;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 1;
}

.mq-example-en {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.45;
  font-family: 'Inter', sans-serif;
}

.mq-example-zh {
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

/* 題目提示文字（左側小捲軸） */
.mq-prompt-text {
  font-size: 16.5px;
  font-weight: 800;
  color: #1e293b;
  margin: 18px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mq-prompt-icon {
  font-size: 20px;
}

/* 4 個選項按鈕（2x2 排列，米白底＋琥珀黃標籤，選中翡翠綠高亮） */
.mq-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 540px) {
  .mq-options-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.mq-opt-btn {
  background: #fffdf8;
  border: 1.5px solid #ece4d2;
  border-radius: 16px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 56px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.mq-opt-btn:hover:not(:disabled) {
  background: #ffffff;
  border-color: #f5a623;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 166, 35, 0.18);
}

/* 琥珀黃小方角標籤（圓角 10px，白字，32x32） */
.mq-opt-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f5a623;
  font-size: 15.5px;
  font-weight: 900;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.18s;
  box-shadow: 0 2px 6px rgba(245, 166, 35, 0.3);
}

.mq-opt-text {
  color: #1e293b;
  font-size: 15.5px;
  font-weight: 800;
}

/* 正確選中狀態：完全對照老師原型圖中 B 選項！ */
.mq-opt-btn.correct {
  background: #ebfbee !important;
  border: 2px solid #3ea75e !important;
  box-shadow: 0 4px 16px rgba(62, 167, 94, 0.22) !important;
}
.mq-opt-btn.correct .mq-opt-tag {
  background: #3ea75e !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(62, 167, 94, 0.35) !important;
}
.mq-opt-btn.correct .mq-opt-text {
  color: #20763a !important;
  font-weight: 900 !important;
}

/* 錯誤選中狀態：淡柔紅底 */
.mq-opt-btn.wrong {
  background: #fef2f2 !important;
  border: 2px solid #ef4444 !important;
}
.mq-opt-btn.wrong .mq-opt-tag {
  background: #ef4444 !important;
  color: #ffffff !important;
}
.mq-opt-btn.wrong .mq-opt-text {
  color: #b91c1c !important;
}

.mq-opt-btn.dim {
  opacity: 0.45;
}

/* Bonus 加分題區塊（同系清新雅致） */
.mq-bonus-box {
  background: #fdfbf7;
  border: 1.5px solid #f1e2c6;
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: bonusSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

@keyframes bonusSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mq-bonus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mq-bonus-badge {
  background: linear-gradient(135deg, #f59e0b, #489e5a);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 99px;
  box-shadow: 0 2px 6px rgba(72, 158, 90, 0.25);
}

.mq-bonus-hint {
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
}

/* 結果與結算橫幅 */
.mq-result-banner {
  padding: 12px 18px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 800;
  margin-top: 14px;
  animation: bannerFade 0.25s ease;
}

@keyframes bannerFade {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.mq-result-banner.success {
  background: #eefaf0;
  border: 1.5px solid #489e5a;
  color: #15803d;
  box-shadow: 0 2px 10px rgba(72, 158, 90, 0.15);
}

.mq-result-banner.warn {
  background: #fff8ec;
  border: 1.5px solid #fcdfa6;
  color: #b45309;
}

.mq-btn-confirm {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.mq-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(217, 119, 6, 0.48);
}

/* ==========================================================================
   西域商隊大盛典：大地圖大帳地標與世界 Boss 級全螢幕毛玻璃大活動 UI
   ========================================================================== */

/* 地圖上的西域商隊大帳手辦 */
.spot-merchant-camp {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 25;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
}

.spot-merchant-camp:hover {
  transform: translate(-50%, -50%) scale(1.08) translateY(-4px);
  filter: drop-shadow(0 10px 20px rgba(217, 119, 6, 0.45));
}

.spot-merchant-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spot-merchant-wrap::before {
  content: '';
  position: absolute;
  width: 90%;
  height: 90%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0) 70%);
  border-radius: 50%;
  animation: merchantCampPulse 2.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes merchantCampPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.18); opacity: 0.85; }
}

.spot-merchant-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45));
  animation: merchantIdleBob 4.2s ease-in-out infinite;
}

@keyframes merchantIdleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* 全螢幕大活動模態彈窗（與駱駝商人風格完全一致：高雅溫潤白底、圓角28px） */
.modal-merchant-fullscreen {
  max-width: 1040px !important;
  width: 95vw !important;
  max-height: 92vh !important;
  background: #ffffff !important;
  border: 1.5px solid #ece4d2 !important;
  border-radius: 28px !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.12), 0 4px 18px rgba(0, 0, 0, 0.04) !important;
  color: #1e293b !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
}

.modal-merchant-fullscreen .modal-x {
  color: #64748b !important;
  font-size: 22px !important;
  top: 18px !important;
  right: 22px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  font-weight: 700 !important;
  z-index: 10 !important;
}

.modal-merchant-fullscreen .modal-x:hover {
  color: #1e293b !important;
  transform: scale(1.18) !important;
}

.me-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 28px;
}

.me-wrap::-webkit-scrollbar {
  width: 6px;
}
.me-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 99px;
}

/* 頂部導航列 */
.me-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1.5px solid #ece4d2;
  margin-bottom: 18px;
}

.me-nav-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.me-nav-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff8e6;
  border: 1.5px solid #fae69e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(245, 177, 30, 0.15);
  flex-shrink: 0;
}

.me-nav-avatar img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.me-nav-h {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  color: #278648; /* 駱駝商人經典深翠綠 */
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.me-nav-sub {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-top: 3px;
}

.me-nav-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.me-pill {
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.me-pill-gold { background: #fef9e7; border: 1px solid #fae39b; color: #c27803; }
.me-pill-level { background: #eaf8ee; border: 1px solid #b9e9c3; color: #1b823e; }
.me-pill-day { background: #fef5e6; border: 1px solid #fbdca9; color: #b45309; }
.me-pill-coupon { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

/* 雙欄第一頁概覽卡片（駱駝商人高雅白底米色） */
.me-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 22px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .me-intro-grid { grid-template-columns: 1fr; }
}

.me-portrait-card {
  background: #ffffff;
  border: 1.5px solid #ece4d2;
  border-radius: 22px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.me-portrait-card img {
  max-width: 320px;
  width: 100%;
  height: auto;
  max-height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.12));
  animation: meFloat 4s ease-in-out infinite;
}

@keyframes meFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.me-speech-bubble {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.55;
  color: #1e293b;
  position: relative;
  margin-top: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.me-speech-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #e2e8f0;
}

.me-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 18px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 800;
}

.me-status-badge.ok { background: #eaf8ee; border: 1px solid #b9e9c3; color: #1b823e; }
.me-status-badge.warn { background: #fef5e6; border: 1px solid #fbdca9; color: #b45309; }
.me-status-badge.danger { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

/* 右欄活動詳情卡片 */
.me-detail-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.me-info-block {
  background: #ffffff;
  border: 1.5px solid #ece4d2;
  border-radius: 20px;
  padding: 18px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.me-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 8px;
}

/* 乾淨 1. 2. 3. 規則清單（加大字體，清晰易讀） */
.me-rules-ol {
  margin: 0;
  padding-left: 24px;
  font-size: 16px;
  line-height: 1.85;
  color: #334155;
  font-weight: 700;
}

.me-rules-ol li {
  margin-bottom: 8px;
}

.me-rules-ol b {
  color: #0f172a;
  font-weight: 900;
  font-size: 16.5px;
}

.me-rules-ol .highlight-badge {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 1px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 13px;
  display: inline-block;
}

.me-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.me-btn-primary {
  flex: 1.4;
  min-height: 52px;
  min-width: 200px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.me-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.45);
}

.me-btn-secondary {
  flex: 1;
  min-height: 52px;
  min-width: 160px;
  background: #ffffff;
  color: #b45309;
  border: 1.5px solid #fbdca9;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: background 0.15s, transform 0.15s;
}

.me-btn-secondary:hover {
  background: #fef9e7;
  transform: translateY(-2px);
}

/* 結算卷軸卡片（白底） */
.me-settle-card {
  background: #ffffff;
  border: 1.5px solid #ece4d2;
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
  animation: settleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #1e293b;
}

@keyframes settleIn {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.me-settle-icon { font-size: 56px; line-height: 1; }
.me-settle-title { font-size: 24px; font-weight: 900; color: #278648; margin: 0; }
.me-settle-desc { font-size: 14.5px; color: #475569; max-width: 480px; line-height: 1.6; }

.me-settle-rewards {
  display: flex;
  gap: 14px;
  margin: 8px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.me-settle-reward-item {
  background: #fef9e7;
  border: 1px solid #fae39b;
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 800;
  color: #b45309;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 西域集市（白底商店商品卡片） */
.me-market-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 18px;
  background: #ffffff;
  border-radius: 14px;
  border: 1.5px solid #ece4d2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.me-coupon-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
  cursor: pointer;
  background: #fef2f2;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  user-select: none;
}

.me-coupon-toggle input { cursor: pointer; }

.me-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.me-item-card {
  background: #ffffff;
  border: 1.5px solid #ece4d2;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.me-item-card:hover {
  transform: translateY(-2px);
  border-color: #f5a623;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.15);
}

.me-item-card.locked {
  opacity: 0.6;
  filter: grayscale(0.5);
}

.me-item-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.me-item-icon {
  font-size: 32px;
  line-height: 1;
  background: #fff8e6;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fae69e;
}

.me-item-info {
  flex: 1;
  min-width: 0;
}

.me-item-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.me-item-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.45;
}

.me-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed #ece4d2;
}

.me-item-price-box {
  display: flex;
  flex-direction: column;
}

.me-item-price {
  font-size: 16px;
  font-weight: 900;
  color: #b45309;
}

.me-item-orig-price {
  font-size: 11px;
  color: #94a3b8;
  text-decoration: line-through;
}

.me-item-buy-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35);
  transition: transform 0.12s;
}

.me-item-buy-btn:hover:not(:disabled) {
  transform: scale(1.04);
}

.me-item-buy-btn:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* =============================================================
   西域商隊・大地圖手辦點位與雙欄答題對決介面樣式
   ============================================================= */

/* 大地圖西域商隊手辦點位 */
.map-spot.spot-merchant-camp {
  z-index: 22;
}

.map-spot.spot-merchant-camp .spot-merchant-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s;
}

.map-spot.spot-merchant-camp:hover .spot-merchant-wrap {
  transform: scale(1.08) translateY(-4px);
  filter: drop-shadow(0 14px 28px rgba(245, 158, 11, 0.45));
}

.spot-merchant-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.map-spot.spot-merchant-camp .spot-label {
  background: #ffffff !important;
  border: 1.5px solid #f5a623 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
  color: #1e293b !important;
}

.map-spot.spot-merchant-camp .spot-label-top span {
  color: #b45309 !important;
  font-weight: 900;
}

/* 西域商隊未開放封印/籌備態 */
.map-spot.spot-merchant-camp.caravan-sealed .spot-merchant-wrap {
  filter: brightness(0.65) contrast(1.1) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
  opacity: 0.88;
}
.map-spot.spot-merchant-camp.caravan-sealed:hover .spot-merchant-wrap {
  transform: scale(1.05) translateY(-2px);
  filter: brightness(0.8) contrast(1.15) drop-shadow(0 10px 22px rgba(217, 119, 6, 0.4));
  opacity: 1;
}
.map-spot.spot-merchant-camp.caravan-sealed .spot-label {
  background: #f8fafc !important;
  border: 1.5px solid #94a3b8 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
.map-spot.spot-merchant-camp.caravan-sealed .spot-label-top span {
  color: #475569 !important;
}
.spot-badge-locked {
  position: absolute; top: -6px; left: -8px; z-index: 6;
  background: linear-gradient(135deg, #475569, #1e293b); color: #f8fafc;
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); border: 1.5px solid rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
}

/* 砍價血條外框與雙層血條（白底） */
.me-haggle-card {
  background: #ffffff;
  border: 1.5px solid #ece4d2;
  border-radius: 20px;
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.me-haggle-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.me-haggle-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.me-haggle-tag {
  font-size: 13.5px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 99px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.me-haggle-tag.cap {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: capPulse 0.8s ease-in-out infinite alternate;
}

@keyframes capPulse {
  from { transform: scale(1); box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); }
  to { transform: scale(1.05); box-shadow: 0 0 16px rgba(239, 68, 68, 0.9); }
}

.me-haggle-progress-track {
  width: 100%;
  height: 16px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.me-haggle-progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10b981 0%, #34d399 45%, #f59e0b 100%);
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.me-haggle-progress-bar.cap-reached {
  background: linear-gradient(90deg, #ef4444, #f59e0b);
  animation: barCapGlow 1s infinite alternate;
}

@keyframes barCapGlow {
  from { filter: drop-shadow(0 0 4px #ef4444); }
  to { filter: drop-shadow(0 0 14px #f59e0b); }
}

.me-haggle-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
}

.me-hud-timer-num {
  font-size: 14.5px;
  font-weight: 900;
  color: #b45309;
  background: #fef5e6;
  border: 1.5px solid #fbdca9;
  padding: 4px 14px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.me-hud-timer-num.urgent {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
  animation: urgentPulse 0.5s ease-in-out infinite alternate;
}

@keyframes urgentPulse {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

/* 答題競技場左右雙欄網格（左欄 320px 隊長立繪佔滿，右欄單字大卡） */
.me-arena-duo-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .me-arena-duo-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 左欄：隊長立繪卡片（佔滿整個左側） */
.me-arena-left {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.me-leader-card {
  background: #ffffff;
  border: 1.5px solid #ece4d2;
  border-radius: 22px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  height: 100%;
}

.me-leader-full-avatar-wrap {
  width: 100%;
  flex: 1;
  min-height: 280px;
  max-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.me-leader-full-img {
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: 100%;
  object-fit: contain;
  filter: none;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.me-leader-full-img.awkward {
  animation: awkwardShake 0.4s ease-in-out;
}

.me-leader-full-img.smug {
  animation: smugBounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes awkwardShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg) translateY(-2px); }
  75% { transform: rotate(5deg) translateY(2px); }
}

@keyframes smugBounce {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.08) translateY(-4px); }
  100% { transform: scale(1); }
}

.me-leader-name {
  font-size: 17px;
  font-weight: 900;
  color: #1e293b;
  margin-bottom: 4px;
}

.me-leader-mood-tag {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 12px;
  border-radius: 99px;
  margin-bottom: 8px;
}

/* 隊長動態對話氣泡 */
.me-leader-bubble {
  width: 100%;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #1e293b;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  margin-top: 8px;
}

.me-leader-bubble::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #e2e8f0 transparent;
}

/* 右欄：照抄駱駝商人單字卡區 */
.me-arena-right {
  display: flex;
  flex-direction: column;
}

/* 駱駝商人前置引言頁面樣式 */
.mq-intro-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: mqFadeIn 0.25s ease-out;
}

@keyframes mqFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mq-intro-speech-card {
  background: #fefdf9;
  border: 1.5px solid #ece4d2;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mq-speech-quote {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  color: #334155;
  background: #f8fafc;
  border-left: 4px solid #10b981;
  padding: 10px 14px;
  border-radius: 0 12px 12px 0;
}

.mq-intro-meta-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.mq-intro-btn-row {
  display: flex;
  gap: 10px;
}

.mq-btn-start {
  flex: 1.3;
  min-height: 48px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.mq-btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.mq-btn-study {
  flex: 1;
  min-height: 48px;
  background: #ffffff;
  color: #b45309;
  border: 1.5px solid #fbdca9;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s, background 0.15s;
}

.mq-btn-study:hover {
  background: #fef9e7;
  transform: translateY(-2px);
}


/* 西域商隊本日測驗單字按鈕 */
.me-btn-study {
  flex: 1.1;
  min-height: 52px;
  min-width: 170px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 15.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.me-btn-study:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.45);
}

/* 本日測驗單字彈窗 (modal-today-words) */
.modal-today-words {
  background: #ffffff !important;
  color: #1e293b !important;
  border-radius: 24px !important;
  padding: 0 !important;
  max-width: 960px !important;
  width: 94vw !important;
  max-height: 86vh !important;
  border: 1.5px solid #ece4d2 !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25) !important;
  overflow: hidden !important;
}

.today-words-container {
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}

.today-words-header {
  padding: 20px 24px 16px;
  background: linear-gradient(180deg, #fffcf5 0%, #ffffff 100%);
  border-bottom: 1.5px solid #f1e9d9;
  flex-shrink: 0;
}

.today-words-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.today-words-badge {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
}

.today-words-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.today-words-sub {
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 8px;
}

.today-words-tip {
  font-size: 12.5px;
  color: #b45309;
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1.5;
}

.today-words-grid {
  padding: 16px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
  flex: 1;
  background: #f8fafc;
}

.today-word-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.today-word-card:hover {
  transform: translateY(-2px);
  border-color: #10b981;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.15);
}

.today-word-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.today-word-num {
  font-size: 12px;
  font-weight: 800;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 6px;
}

.today-word-pos {
  font-size: 11.5px;
  font-weight: 800;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 1px 7px;
  border-radius: 6px;
}

.today-word-audio-btn {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
}

.today-word-audio-btn:hover {
  background: #fde047;
  transform: scale(1.04);
}

.today-word-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.today-word-en {
  font-size: 19px;
  font-weight: 900;
  color: #0f172a;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.3px;
}

.today-word-ipa {
  font-size: 13px;
  color: #64748b;
  font-family: 'Inter', monospace;
}

.today-word-zh {
  font-size: 15px;
  font-weight: 800;
  color: #047857;
  line-height: 1.4;
}

.today-word-ex-box {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  border-left: 3px solid #cbd5e1;
}

.today-word-ex-en {
  color: #334155;
  font-style: italic;
  margin-bottom: 2px;
}

.today-word-ex-zh {
  color: #64748b;
}

.today-words-footer {
  padding: 14px 24px;
  background: #ffffff;
  border-top: 1.5px solid #f1e9d9;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.today-words-btn-close {
  min-height: 46px;
  padding: 0 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.today-words-btn-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

@media (max-width: 640px) {
  .today-words-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .me-btn-row {
    flex-direction: column;
  }
  .me-btn-primary, .me-btn-study, .me-btn-secondary {
    width: 100%;
    min-width: auto;
  }
}

/* 商隊等級表彈窗 (modal-caravan-levels) */
.modal-caravan-levels {
  background: #ffffff !important;
  color: #1e293b !important;
  border-radius: 24px !important;
  padding: 0 !important;
  max-width: 820px !important;
  width: 94vw !important;
  max-height: 86vh !important;
  border: 1.5px solid #ece4d2 !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25) !important;
  overflow: hidden !important;
}

.caravan-levels-container {
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}

.caravan-levels-header {
  padding: 20px 24px 16px;
  background: linear-gradient(180deg, #fffcf5 0%, #ffffff 100%);
  border-bottom: 1.5px solid #f1e9d9;
  flex-shrink: 0;
}

.caravan-levels-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.caravan-levels-badge {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
}

.caravan-levels-title {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
}

.caravan-levels-sub {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 12px;
}

.caravan-cur-status-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.caravan-cur-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14.5px;
  font-weight: 700;
  flex-wrap: wrap;
  gap: 8px;
}

.caravan-cur-label {
  color: #64748b;
}

.caravan-cur-val {
  color: #b45309;
  font-weight: 900;
}

.caravan-cur-exp {
  color: #10b981;
  font-weight: 900;
  font-size: 16px;
}

.caravan-lvl-progress-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.caravan-lvl-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #10b981);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.caravan-lvl-hint {
  font-size: 12.5px;
  color: #475569;
  text-align: right;
  font-weight: 600;
}

.caravan-lvl-hint b {
  color: #b45309;
}

.caravan-levels-list {
  padding: 16px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  flex: 1;
}

.caravan-lvl-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.caravan-lvl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.caravan-lvl-card.is-current {
  border-color: #f59e0b;
  background: #fffdf5;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.caravan-lvl-card.is-reached {
  border-color: #cbd5e1;
}

.caravan-lvl-card.is-locked {
  opacity: 0.88;
  background: #fafafa;
}

.caravan-lvl-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.caravan-lvl-num-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}

.caravan-lvl-card.is-current .caravan-lvl-num-badge {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.caravan-lvl-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.caravan-lvl-name {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

.caravan-lvl-need {
  font-size: 13px;
  color: #64748b;
}

.caravan-lvl-need b {
  color: #b45309;
}

.caravan-lvl-middle {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.caravan-lvl-perk-label {
  font-size: 11.5px;
  font-weight: 800;
  color: #64748b;
}

.caravan-lvl-desc {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.45;
}

.caravan-lvl-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.lvl-status-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.lvl-status-badge.badge-current {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.lvl-status-badge.badge-unlocked {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.lvl-status-badge.badge-locked {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.caravan-levels-footer {
  padding: 14px 24px;
  background: #ffffff;
  border-top: 1.5px solid #f1e9d9;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.caravan-levels-close-btn {
  min-height: 44px;
  padding: 0 22px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.caravan-levels-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.45);
}

.me-btn-view-levels {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: background 0.15s, transform 0.15s;
}

.me-btn-view-levels:hover {
  background: #fde047;
  transform: scale(1.04);
}

.me-pill-btn, .mq-pill-btn {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.me-pill-btn:hover, .mq-pill-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
  .caravan-lvl-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* =============================================================
   進遊戲圖資預載與軍中秘史專屬視覺系統（治癒溫暖亮色沙盤風格）
   ============================================================= */
#viewLoading {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(circle at 50% 35%, #fffdfa 0%, #f9e9da 65%, #ebd3bd 100%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.loading-box {
  max-width: 480px;
  width: 100%;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(180, 130, 100, 0.3) !important;
  border-radius: 24px;
  padding: 34px 28px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 48px -8px rgba(120, 70, 50, 0.16), 0 4px 16px rgba(120, 70, 50, 0.06) !important;
  animation: loadingFadeIn 0.35s ease-out;
}

@keyframes loadingFadeIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.loading-art-card {
  position: relative;
  width: 100%;
  height: 185px;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #fcf6ee 100%);
  border: 1.5px solid rgba(180, 130, 100, 0.28);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: inset 0 2px 6px rgba(120, 70, 50, 0.05), 0 4px 14px rgba(120, 70, 50, 0.06);
}

.loading-story-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.22s ease-in-out, transform 0.3s ease;
}

.loading-story-img.fade-out {
  opacity: 0;
  transform: scale(0.96);
}

.loading-art-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(44, 32, 27, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fef08a;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid rgba(244, 212, 116, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.emblem-symbol {
  font-size: 38px;
  line-height: 1;
  z-index: 2;
  animation: emblemPulse 2.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(245, 196, 81, 0.4));
}

@keyframes emblemPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

.emblem-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(245, 196, 81, 0.2);
  border-top-color: #ef5a56;
  border-right-color: #f59e0b;
  animation: emblemSpin 1.4s linear infinite;
}

@keyframes emblemSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loading-title {
  margin: 12px 0 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #451a03 !important;
  background: none !important;
  -webkit-text-fill-color: initial !important;
}

.loading-sub,
.loading-status {
  margin: 0 0 20px;
  color: #78350f !important;
  opacity: 0.85;
  font-size: 13.5px;
  font-weight: 600;
  min-height: 20px;
}

.loading-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fdf6ec !important;
  border: 1.5px solid rgba(217, 119, 6, 0.22) !important;
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 4px rgba(180, 83, 9, 0.06) !important;
}

.loading-progress-wrap .loading-progress-bar {
  flex: 1;
  margin: 0;
}

.loading-progress-bar {
  height: 12px;
  background: #ecdac5 !important;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

.loading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #eab308 100%) !important;
  border-radius: 99px;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(239, 90, 86, 0.4) !important;
}

.loading-progress-num,
.loading-progress-percent {
  color: #b45309 !important;
  font-family: 'JetBrains Mono', Consolas, Monaco, monospace, sans-serif;
  font-size: 15px;
  font-weight: 900;
  min-width: 44px;
  text-align: right;
  text-shadow: none !important;
}

.loading-secret-card {
  background: linear-gradient(180deg, #fffcf8 0%, #faf3eb 100%) !important;
  border: 1.5px dashed rgba(217, 119, 6, 0.35) !important;
  border-radius: 18px;
  padding: 18px 20px 16px;
  text-align: left;
  position: relative;
  box-shadow: 0 4px 16px rgba(120, 70, 50, 0.06) !important;
}

.loading-secret-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.loading-secret-badge,
.secret-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7 !important;
  color: #92400e !important;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid #fde68a !important;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(146, 64, 14, 0.1) !important;
}

.loading-secret-hint {
  color: #998074 !important;
  font-size: 12px;
  font-weight: 600;
}

.loading-secret-text,
.secret-text {
  color: #1c1917 !important;
  font-size: 15px;
  line-height: 1.75;
  min-height: 52px;
  opacity: 1;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: opacity 0.22s ease-in-out;
  text-shadow: none !important;
}

.loading-secret-text.fade-out,
.secret-text.fade-out {
  opacity: 0;
}

.loading-secret-footer,
.secret-footer {
  color: #8c7e72 !important;
  font-size: 12px;
  text-align: right;
  margin-top: 10px;
  font-style: italic;
  font-weight: 600;
}

/* =============================================================
   測驗題目與選項圖片 CLS (排版跳動) 防護樣式
   ============================================================= */
.qz-q {
  min-height: 44px;
  line-height: 1.6;
}

.qz-q img {
  max-width: 100%;
  max-height: 240px;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.qz-opt img {
  max-width: 100%;
  max-height: 85px;
  height: auto;
  vertical-align: middle;
  object-fit: contain;
  border-radius: 6px;
  background: #ffffff;
  padding: 2px;
  margin: 2px 0;
}

@media (max-width: 480px) {
  .loading-box {
    padding: 20px 16px 18px;
    border-radius: 20px;
  }
  .loading-art-card {
    height: 145px;
    margin-bottom: 10px;
  }
  .loading-title {
    font-size: 18.5px;
  }
  .loading-status {
    font-size: 12.5px;
    margin-bottom: 16px;
  }
  .loading-secret-card {
    padding: 14px 14px 12px;
  }
  .loading-secret-text,
  .secret-text {
    font-size: 13px;
    min-height: 48px;
  }
  .qz-q img {
    max-height: 180px;
  }
}

/* ============================================================= */
/*  每日精熟複習焦點橫幅與視覺層次（防作業感設計）                */
/* ============================================================= */
.daily-review-info-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.85) 0%, rgba(253, 230, 138, 0.45) 100%);
  border: 1px solid rgba(217, 119, 6, 0.32);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.06);
}
.daily-review-info-banner .banner-icon {
  font-size: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.12);
}
.daily-review-info-banner .banner-title {
  font-weight: 700;
  font-size: 14px;
  color: #78350f;
  margin-bottom: 2px;
}
.daily-review-info-banner .banner-desc {
  font-size: 12.5px;
  color: #92400e;
  line-height: 1.5;
}

.r-card.daily-focus-card {
  border-left: 3.5px solid #d97706 !important;
  background: linear-gradient(to right, rgba(254, 243, 199, 0.25), transparent);
}
.r-card.past-card {
  opacity: 0.9;
}
.r-card.past-card:hover {
  opacity: 1;
}

.pulse-subtle {
  animation: subtlePulse 2s infinite ease-in-out;
}
@keyframes subtlePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 4px rgba(217, 119, 6, 0); }
}

/* 稱號徽章 (.title-badge) 與流光動畫 (.title-glow-*) 已抽離至 css/base.css 供全站共用 */
/* 榮譽稱號閣 Modal 樣式 */
.title-gallery-modal {
  padding: 4px 2px;
}
.title-gallery-header {
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(226, 232, 240, 0.8);
  margin-bottom: 16px;
}
.title-gallery-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.title-gallery-sub {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}
.title-gallery-current-banner {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.9), rgba(248, 250, 252, 0.95));
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.8), 0 2px 4px rgba(0,0,0,0.03);
}
.title-gallery-current-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}
.title-gallery-section-title {
  font-size: 14px;
  font-weight: 800;
  color: #334155;
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.title-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.title-card {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 12px 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.title-card.owned {
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}
.title-card.equipped {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 0 0 1.5px #f59e0b, 0 4px 12px rgba(245, 158, 11, 0.15);
}
.title-card.locked {
  opacity: 0.65;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.title-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.title-card-source {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}
.title-card-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}
.title-card-btn {
  width: 100%;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}
.title-card-btn-equip {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
.title-card-btn-equip:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
}
.title-card-badge-equipped {
  background: #fef3c7;
  color: #b45309;
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid #fde68a;
}
.title-card-lock-tip {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 4px;
}

@media (max-width: 640px) {
  .title-gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* 西域商人題庫中文例句挖空底線樣式 */
.word-blank {
  display: inline-block;
  min-width: 44px;
  border-bottom: 2.5px solid #d97706;
  color: #d97706;
  font-weight: 800;
  text-align: center;
  margin: 0 4px;
  letter-spacing: 2px;
  user-select: none;
}
[data-theme="dark"] .word-blank {
  border-bottom-color: #f59e0b;
  color: #f59e0b;
}




/* ===================== 第二紀元飛升誓約進度橫幅 ===================== */
.era2-quest-banner {
  margin: 12px 14px 6px 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
}
.era2-quest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.era2-quest-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.era2-quest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.era2-goal-card {
  background: var(--bg-1, #fff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.era2-goal-card.met {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.06);
}
.era2-goal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.era2-goal-bar {
  height: 5px;
  background: rgba(0,0,0,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.era2-goal-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.era2-goal-card.met .era2-goal-bar-fill {
  background: linear-gradient(90deg, #10b981, #059669);
}
.era2-rule-hint {
  font-size: 12px;
  color: var(--text-mute, #64748b);
  line-height: 1.5;
  margin-top: 4px;
}
.btn-inmap-era2 {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35) !important;
  grid-column: span 2;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-inmap-era2:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45) !important;
}
.btn-inmap-era2.disabled, .btn-inmap-era2:disabled, .btn-inmap-era2.locked-action, .btn-era2.locked-action {
  opacity: 0.82;
  cursor: pointer;
  background: #94a3b8 !important;
  box-shadow: none !important;
}

/* ==========================================================================
   ✨ 第二紀元名都涅槃專屬特效（常駐天朝神光、祥雲流光底座、黑金龍紋琉璃標牌）
   ========================================================================== */

/* 1. 沙盤手辦節點常駐天朝神光（方案 1：周天靈光・升騰金輝） */
.map-spot.era2-spot {
  z-index: 20 !important;
}

.map-spot.era2-spot .spot-building-wrap {
  position: relative;
  overflow: visible !important;
}

/* 仙氣金色靈氣火星粒子容器與動畫 */
.era2-sparks-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.era2-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fef08a;
  border-radius: 50%;
  box-shadow: 0 0 6px #f59e0b, 0 0 10px #fff;
  animation: era2SparkRise 3s infinite ease-out;
  opacity: 0;
}
.era2-spark:nth-child(1) { left: 45%; bottom: 35%; animation-delay: 0.2s; }
.era2-spark:nth-child(2) { left: 55%; bottom: 30%; animation-delay: 1.1s; }
.era2-spark:nth-child(3) { left: 35%; bottom: 45%; animation-delay: 1.8s; }
.era2-spark:nth-child(4) { left: 65%; bottom: 40%; animation-delay: 2.3s; }
.era2-spark:nth-child(5) { left: 50%; bottom: 55%; animation-delay: 0.7s; }

@keyframes era2SparkRise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  20% { opacity: 0.95; transform: translateY(-18px) scale(1.2); }
  80% { opacity: 0.6; transform: translateY(-60px) scale(0.8); }
  100% { opacity: 0; transform: translateY(-95px) scale(0.2); }
}

/* 手辦微縮模型本體：天朝金青雙層琉璃高光與呼吸浮動 */
.map-spot.era2-spot .spot-building-img,
.spot-building-img.era2-img {
  position: relative;
  z-index: 5 !important;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8))
         drop-shadow(0 0 22px rgba(254, 240, 138, 0.5))
         drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55)) !important;
  animation: era2FloatBreath 3.5s ease-in-out infinite !important;
}

.map-spot.era2-spot:hover .spot-building-img,
.map-spot.era2-spot.selected .spot-building-img,
.spot-building-img.era2-img:hover {
  filter: drop-shadow(0 0 16px rgba(254, 240, 138, 0.95))
         drop-shadow(0 0 32px rgba(245, 158, 11, 0.8))
         drop-shadow(0 16px 24px rgba(0, 0, 0, 0.65)) !important;
  transform: translateY(-4px) scale(1.06);
}

@keyframes era2FloatBreath {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* 2. 標牌升級：羊脂白琉璃底色 + 細緻金邊（移除涅槃字樣，純淨高雅） */
.map-spot.era2-spot .spot-label,
.spot-label.era2-label {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1.5px solid #f59e0b !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 0 10px rgba(245, 158, 11, 0.3) !important;
  border-radius: 12px !important;
  color: #78350f !important;
  position: relative;
}

html[data-theme="dark"] .map-spot.era2-spot .spot-label,
html[data-theme="dark"] .spot-label.era2-label {
  background: rgba(28, 24, 20, 0.96) !important;
  border-color: #f59e0b !important;
  color: #fef08a !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 12px rgba(245, 158, 11, 0.35) !important;
}

.map-spot.era2-spot .spot-label-top span {
  color: #b45309 !important;
  font-weight: 900 !important;
}
html[data-theme="dark"] .map-spot.era2-spot .spot-label-top span {
  color: #fef08a !important;
}

.map-spot.era2-spot .spot-label-prod {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #b45309 !important;
  font-weight: 900 !important;
}
html[data-theme="dark"] .map-spot.era2-spot .spot-label-prod {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fde047 !important;
}

/* 3. 名都列表卡片第二紀元樣式 (.era2-card) */
.b-card.era2-card {
  border: 1.5px solid rgba(245, 158, 11, 0.75) !important;
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95), rgba(254, 243, 199, 0.85)) !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.18), 0 0 0 1px rgba(245, 158, 11, 0.3) !important;
}

html[data-theme="dark"] .b-card.era2-card {
  background: linear-gradient(135deg, rgba(30, 22, 14, 0.95), rgba(45, 32, 18, 0.95)) !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.3) !important;
}

.b-card.era2-card .b-icon {
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.5) !important;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
}

.b-card.era2-card .b-thumb {
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8));
}

/* 4. 城池資訊彈窗手辦預覽金光 */
.panel-town-info .panel-town-thumb.era2-thumb {
  filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.85)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

/* 5. 瞬態破空神光（Evolution Burst） */
.map-spot.era2-burst::before {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 50%;
  width: 140px;
  height: 600px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(254, 240, 138, 0.9) 25%, rgba(245, 158, 11, 0.6) 70%, transparent 100%);
  clip-path: polygon(35% 0%, 65% 0%, 100% 100%, 0% 100%);
  filter: blur(3px);
  pointer-events: none;
  z-index: 30;
  animation: era2PillarBurst 1.8s ease-out forwards;
}

/* 6. 動畫 Keyframes 定義 */
@keyframes era2Floating {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes era2PillarBurst {
  0% { opacity: 0; transform: translateX(-50%) scaleY(0.2); }
  25% { opacity: 1; transform: translateX(-50%) scaleY(1.1); filter: blur(2px); }
  60% { opacity: 0.85; transform: translateX(-50%) scaleY(1); }
  100% { opacity: 0; transform: translateX(-50%) scaleY(1.2); filter: blur(8px); }
}
