/* [codex] 2026-10-31 主城收集器倒數與離線上限保持可見。 */
/* [codex] 2026-10-27 Keep full-screen city inside the optional ad strip. */
/* [codex] 2026-10-11 Pixi DOM 地圖容器尺寸與畫布定位。 */
/* [claude code] 2026-10-10 🐾 桃園築夢動畫介面收尾驗收通過,升 0.102 待發布 */
/* [codex] 2026-10-08 偵察預覽與操作列在短橫版、放大字級保持可見。 */
/* [codex] 2026-10-08 遊戲主城五入口與出征卡片直橫版。 */
/* [claude code] 2026-10-18 第二輪優化 25 項盤點並寫成規格(SPEC 十七),等「開始」 */
.game-city{min-height:0;height:calc(100dvh - var(--td-top-inset,0px) - env(safe-area-inset-bottom));max-width:none;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);display:flex;flex-direction:column;overflow:hidden;background:#bdce94}
.game-city>header{padding:0 12px;position:relative;flex-shrink:0}.game-city>header h1{font-size:1.1rem}.city-menu{margin-left:auto;position:relative;z-index:5}.city-menu[open]{background:#fff4da;padding:8px;border:1px solid #ac8653;border-radius:12px;position:absolute;right:8px;top:8px;max-height:80dvh;overflow:auto}.city-menu button{display:block;width:100%;margin-top:4px}.game-city>.wallet-strip{background:#efe0b6;padding:8px;margin:0;text-align:center;font-weight:bold}.game-city>.city-toolbar,.game-city>p:not(.wallet-strip):not(.collector-time){display:none}.game-city>.city-stage{flex:1;min-height:0;display:block;position:relative;margin:0}.game-city .city-map-region{height:100%}.game-city .city-map{height:100%;min-height:0;border:0;border-radius:0}.game-city .city-drawer{display:none}.city-primary{display:flex;gap:4px;padding:6px;background:#674b2f;flex-shrink:0}.city-primary button{flex:1;min-width:0;padding:8px 2px;font-weight:bold;border:2px solid #bf9b5c;background:#f0dda8}.chapter-tabs{display:flex;flex-wrap:wrap;gap:6px}.campaign-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.stage-card{border:2px solid #b89a62;background:#fff0ce;padding:12px;border-radius:12px;overflow-wrap:anywhere}.stage-card h2{font-size:1.05rem}.stage-card button{width:100%}.expedition-shell>button{margin:8px}.scout-map{width:100%;height:auto;border-radius:12px}.game-city button{font-size:.9rem}
[data-orientation=landscape] .game-city{padding-right:90px}[data-orientation=landscape] .game-city .city-primary{position:absolute;right:0;top:0;bottom:0;width:90px;flex-direction:column;padding-top:env(safe-area-inset-top)}[data-orientation=landscape] .campaign-grid{grid-template-columns:repeat(3,minmax(0,1fr))}

.wallet-strip{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}.resource-chip{display:flex;align-items:center;gap:4px;background:#fff4d3;border-radius:20px;padding:4px 8px;font-size:.85rem}.resource-chip img{width:24px;height:24px;object-fit:contain}.city-primary img{display:block;width:28px;height:28px;object-fit:contain;margin:auto}.city-info,.city-builder-info{position:absolute;background:#fff4dce8;border-radius:14px;padding:6px 10px;z-index:2}.city-info{top:10px;left:10px}.city-builder-info{bottom:12px;left:10px}.city-info p,.city-builder-info p{margin:4px}.city-info button,.city-builder-info button{min-height:40px}.game-city .wallet-strip{flex-shrink:0}

.scout-shell{height:100dvh;min-height:0;padding:8px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:.3rem;overflow:hidden}.scout-shell>header{grid-row:1}.scout-shell>.phase{grid-row:2;margin:0;padding:4px}.scout-details{grid-row:3;max-height:30dvh;overflow:auto}.scout-details p,.scout-details h2{margin:.2rem 0}.scout-details h2{font-size:1.1rem}.scout-loot{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.2rem}.scout-preview{grid-row:4;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center}.scout-preview .scout-map{max-height:100%;object-fit:contain}.scout-actions{grid-row:5;display:flex;gap:.3rem}.scout-actions button{flex:1;min-width:0;padding:8px 4px}
[data-orientation=landscape] .scout-shell{grid-template-columns:minmax(0,1fr) minmax(220px,32%);grid-template-rows:auto auto minmax(0,1fr) auto}[data-orientation=landscape] .scout-shell>header,[data-orientation=landscape] .scout-shell>.phase,[data-orientation=landscape] .scout-actions{grid-column:1/-1}[data-orientation=landscape] .scout-details{grid-row:3;grid-column:2;max-height:none}[data-orientation=landscape] .scout-preview{grid-row:3;grid-column:1}[data-orientation=landscape] .scout-actions{grid-row:4}

/* The city occupies the safe viewport; the thumb rail uses bounded buttons. */
.game-city {
  position: relative;
  height: calc(100dvh - var(--td-top-inset,0px) - env(safe-area-inset-bottom));
  min-height: 0;
  padding: 0;
}
.game-city .city-primary button { flex: 0 0 auto; min-height: 48px; }
[data-orientation=landscape] .game-city { padding-right: 80px; }
[data-orientation=landscape] .game-city .city-primary {
  width: 80px;
  padding: 6px 4px;
  justify-content: center;
  gap: 6px;
  overflow-y: auto;
  background: #674b2f;
}
[data-orientation=landscape] .game-city .city-primary button {
  width: 100%;
  min-height: 48px;
  height: clamp(48px, 16dvh, 76px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  font-size: .8rem;
  line-height: 1.1;
  border-width: 6px;
}
.game-city .city-primary img { width: 20px; height: 20px; margin: 0; flex-shrink: 0; }
@media (orientation: landscape) and (max-height: 500px) {
  .game-city > header { padding: 0 8px; }
  .game-city > header h1 { margin: 2px 0; font-size: 1rem; }
  .game-city > .wallet-strip { padding: 4px; gap: 4px; }
  .game-city .resource-chip { padding: 2px 6px; font-size: .75rem; }
  .game-city .resource-chip img { width: 20px; height: 20px; }
  .city-info, .city-builder-info { padding: 4px 6px; font-size: .75rem; }
  .city-info { top: 6px; left: 6px; }
  .city-builder-info { bottom: 6px; left: 6px; }
  .city-info p, .city-builder-info p { margin: 2px; }
  .city-info button, .city-builder-info button { min-height: 44px; }
}
[data-orientation=portrait] .game-city .city-primary { justify-content: space-around; }
[data-orientation=portrait] .game-city .city-primary button { flex: 1; }
@media (max-height: 320px) {
  [data-orientation=landscape] .game-city .city-primary { justify-content: flex-start; }
}

.scout-preview .scout-map{height:100%;width:auto;max-width:100%;flex-shrink:1;background:#a8bd7a}
