* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f7fb; color: #333; overflow: hidden; height: 100vh; display: flex; flex-direction: column; position: fixed; inset: 0; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
.header { position: relative; background: linear-gradient(90deg, #0a2540 0%, #1a6fb5 55%, #4cc3ff 100%); color: #fff; padding: 12px 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; overflow: hidden; border-bottom: 2px solid rgba(76,195,255,0.6); }
.header::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, #7fd0ff, transparent); }
.header h1 { font-size: 19px; font-weight: 700; letter-spacing: 2px; text-shadow: 0 0 8px rgba(124,214,255,0.8), 0 2px 4px rgba(0,0,0,0.35); cursor: pointer; user-select: none; position: relative; z-index: 1; }
.header h1:hover { text-shadow: 0 0 14px rgba(160,228,255,1), 0 2px 4px rgba(0,0,0,0.35); }
.header .controls { display: flex; align-items: center; gap: 8px; margin-left: auto; position: relative; z-index: 1; }
.header select { padding: 6px 10px; border: 1px solid rgba(124,214,255,0.55); border-radius: 5px; font-size: 13px; min-width: 180px; background: rgba(255,255,255,0.92); color: #0a2540; box-shadow: 0 0 6px rgba(76,195,255,0.35); outline: none; }
.header select:focus { border-color: #7fd0ff; box-shadow: 0 0 10px rgba(76,195,255,0.6); }
.header label { font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
.loading { color: #dff3ff; font-size: 12px; text-shadow: 0 0 6px rgba(124,214,255,0.9); }
.save-btn { padding: 6px 14px; border: 1px solid rgba(124,214,255,0.55); border-radius: 5px; font-size: 13px; background: rgba(255,255,255,0.92); color: #0a2540; cursor: pointer; box-shadow: 0 0 6px rgba(76,195,255,0.35); }
.save-btn:hover:not(:disabled) { background: #eaf6ff; box-shadow: 0 0 10px rgba(76,195,255,0.6); }
.save-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.scheme-btn-group { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.scheme-btn { padding: 5px 10px; border: 1px solid rgba(124,214,255,0.55); border-radius: 5px; font-size: 13px; background: rgba(255,255,255,0.92); color: #0a2540; cursor: pointer; box-shadow: 0 0 6px rgba(76,195,255,0.35); white-space: nowrap; }
.scheme-btn:hover { background: #eaf6ff; }
.scheme-btn.active { background: #0a6fb5; color: #fff; border-color: #7fd0ff; box-shadow: 0 0 10px rgba(76,195,255,0.7); }
#map-wrap { flex: 1; overflow: hidden; position: relative; background: #fff; touch-action: none; }
#map-content { transform-origin: 0 0; }
#overlay-svg { position: absolute; top: 0; left: 0; }
#tooltip { position: fixed; background: rgba(10,37,64,0.92); color: #fff; padding: 6px 10px; border-radius: 4px; font-size: 12px; pointer-events: none; z-index: 1000; white-space: nowrap; display: none; line-height: 1.4; border: 1px solid rgba(124,214,255,0.5); box-shadow: 0 0 10px rgba(76,195,255,0.35); }
#status-bar { padding: 8px 20px; font-size: 12px; color: #4a6a8a; background: #fff; border-top: 1px solid #e3edf7; flex-shrink: 0; }
.help-text { position: absolute; bottom: 12px; right: 12px; background: rgba(10,37,64,0.75); color: #fff; padding: 6px 10px; border-radius: 4px; font-size: 11px; pointer-events: none; z-index: 10; border: 1px solid rgba(124,214,255,0.4); transition: opacity 1.5s ease; }
.help-text.hide-help { opacity: 0; }

/* ===== 手机竖屏 / 窄屏适配 ===== */
@media (max-width: 820px), (orientation: portrait) {
  .header { flex-wrap: wrap; padding: 10px 12px 12px; gap: 6px 8px; }
  .header h1 { width: 100%; font-size: 17px; letter-spacing: 1px; }
  .header .controls { width: 100%; margin-left: 0; gap: 8px; flex-wrap: wrap; }
  .header label { font-size: 13px; flex-shrink: 0; }
  .header select { flex: 1 1 0; min-width: 0; padding: 8px 6px; font-size: 14px; }
  .save-btn { padding: 8px 10px; font-size: 12px; flex-shrink: 0; }
  .scheme-btn { padding: 6px 8px; font-size: 12px; }
  .loading { margin-left: 0; flex-shrink: 0; }
  #status-bar { padding: 8px 12px; font-size: 12px; }
  .help-text { bottom: 10px; right: 10px; font-size: 10px; }
  #tooltip { max-width: 80vw; white-space: normal; font-size: 11px; }
}