/* «Соль и Суверенитеты: Открытые Воды» — оформление. */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: #071a22;
  color: #e8f2f4;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.so-wrap { max-width: 1180px; margin: 0 auto; padding: 12px 14px 22px; }

.so-top { margin-bottom: 10px; }
.so-title { margin: 0 0 4px; font-size: 24px; letter-spacing: .5px; }
.so-tagline { margin: 0 0 10px; color: #9fc0c9; font-size: 14px; }

.so-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.so-stat {
  background: #0d2833; border: 1px solid #1d4655; border-radius: 8px;
  padding: 6px 12px; min-width: 108px; display: flex; flex-direction: column;
}
.so-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #86a8b3; }
.so-stat-value { font-size: 17px; font-weight: 600; color: #ffd682; }
.so-stat-wanted .so-stat-value { color: #ff9d7a; }

.so-goal { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.so-goal-bar { flex: 1; height: 10px; background: #0d2833; border: 1px solid #1d4655; border-radius: 6px; overflow: hidden; }
.so-goal-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2f9e8f, #ffd682); }
.so-goal-text { font-size: 13px; color: #9fc0c9; }

.so-stage { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.so-map { position: relative; flex: 1 1 640px; }
#so-canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10;
  background: #08202a; border: 1px solid #1d4655; border-radius: 10px; touch-action: none; outline: none;
}

.so-toast {
  position: absolute; left: 12px; bottom: 12px; margin: 0; max-width: 80%;
  padding: 6px 12px; border-radius: 8px; font-size: 14px;
  background: rgba(7, 26, 34, .86); border: 1px solid #2f6274; color: #ffd682;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.so-toast-on { opacity: 1; }

.so-side { flex: 0 0 260px; display: flex; flex-direction: column; gap: 10px; }
.so-minimap {
  width: 100%; height: auto; background: #0a1f28;
  border: 1px solid #1d4655; border-radius: 8px;
}
.so-hint { margin: 0; font-size: 13px; line-height: 1.4; color: #bcd6dd; background: #0d2833; border: 1px solid #1d4655; border-radius: 8px; padding: 8px 10px; }

.so-cargo { background: #0d2833; border: 1px solid #1d4655; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.so-cargo-title { margin: 0 0 4px; color: #86a8b3; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.so-cargo ul { margin: 0; padding-left: 18px; }
.so-cargo-empty { margin: 0; color: #6d8b96; }
.so-cargo-icon { margin-right: 4px; }

.so-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.so-btn {
  background: #14424f; color: #e8f2f4; border: 1px solid #2f6274; border-radius: 8px;
  padding: 8px 12px; font-size: 14px; cursor: pointer; font-family: inherit;
}
.so-btn:hover:not(:disabled) { background: #1b5a6b; }
.so-btn:disabled { opacity: .45; cursor: default; }
.so-btn-key { background: #b5762a; border-color: #ffd682; color: #10191c; font-weight: 600; }
.so-btn-key:hover:not(:disabled) { background: #d18c33; }
.so-btn-ghost { background: transparent; }
.so-btn-buy { background: #1d6a52; border-color: #3fbf95; }
.so-btn-sell { background: #6a3320; border-color: #d18c5a; }

.so-modal {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 14, 19, .72); z-index: 20; padding: 16px;
}
.so-modal[hidden] { display: none; }
.so-modal-box {
  background: #0d2833; border: 1px solid #2f6274; border-radius: 12px;
  padding: 16px 18px; width: min(720px, 100%); max-height: 90vh; overflow: auto;
}
.so-modal-title { margin: 0 0 12px; font-size: 20px; color: #ffd682; }
.so-modal-text { margin: 0 0 14px; font-size: 15px; line-height: 1.5; }
.so-modal-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.so-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.so-table td { padding: 6px 4px; border-bottom: 1px solid #17414f; }
.so-num { text-align: right; white-space: nowrap; }
.so-act { text-align: right; }
.so-good { white-space: nowrap; }

@media (max-width: 820px) {
  .so-side { flex: 1 1 100%; }
  .so-title { font-size: 19px; }
  .so-stat { min-width: 88px; padding: 5px 9px; }
}
