/* ==========================================================================
   시즌2 월드 오퍼레이션 전용 스타일 (내 소속 · 경유지 · 영토 · 길막 · 탈것 · 국가 내정)
   PC & 모바일 반응형 완벽 대응
   ========================================================================== */

/* 1. [★ 내 소속] 황금 필터 버튼 & 인연 배지 */
.filter-pill.s2-my-roster-pill {
  border-color: rgba(243, 196, 84, 0.55);
  background: linear-gradient(135deg, rgba(243, 196, 84, 0.16), rgba(217, 119, 6, 0.12));
  color: #fde68a;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(243, 196, 84, 0.12);
}

.filter-pill.s2-my-roster-pill:hover {
  border-color: rgba(250, 204, 21, 0.85);
  background: linear-gradient(135deg, rgba(243, 196, 84, 0.26), rgba(217, 119, 6, 0.2));
}

.filter-pill.s2-my-roster-pill.active {
  border-color: #facc15;
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #0b0d14;
  box-shadow: 0 2px 12px rgba(234, 179, 8, 0.35);
}

.s2-affil-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.s2-affil-badge.is-patron {
  background: rgba(235, 190, 96, 0.16);
  border: 1px solid rgba(235, 190, 96, 0.55);
  color: #fde68a;
}

.s2-affil-badge.is-creator {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
}

/* 2. [★ 내 소속] 전용 로스터 서브뷰 */
.s2-roster-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.s2-roster-summary-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 11px;
  border-radius: var(--radius-sm, 8px);
  background: linear-gradient(135deg, rgba(235, 190, 96, 0.1), rgba(124, 140, 255, 0.08));
  border: 1px solid rgba(235, 190, 96, 0.32);
  font-size: 11.5px;
}

.s2-roster-summary-counts {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  color: var(--text-main, #e8ecf5);
}

.s2-roster-summary-upkeep {
  font-size: 11px;
  color: #fde68a;
}

.s2-roster-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 16px;
  border-radius: var(--radius-md, 12px);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(235, 190, 96, 0.35);
}

.s2-roster-empty-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #facc15;
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.s2-roster-empty p {
  font-size: 12px;
  color: var(--text-muted, #9aa4bf);
  line-height: 1.55;
  margin: 0;
}

.s2-roster-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.s2-roster-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px 12px;
  border-radius: var(--radius-md, 11px);
  background: rgba(20, 24, 38, 0.85);
  border: 1px solid rgba(235, 190, 96, 0.24);
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.14s ease, background 0.16s ease;
}

.s2-roster-card:hover {
  border-color: rgba(235, 190, 96, 0.55);
  background: rgba(26, 31, 48, 0.94);
}

.s2-roster-card.is-selected {
  border-color: #ebbe60;
  box-shadow: 0 0 0 1px rgba(235, 190, 96, 0.32);
}

.s2-roster-card.is-critical {
  border-color: rgba(244, 63, 94, 0.65);
}

.s2-roster-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.s2-roster-title-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.s2-roster-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.s2-roster-badges-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.s2-roster-loc {
  font-size: 11px;
  color: var(--text-muted, #9aa4bf);
}

.s2-roster-loc.is-moving {
  color: #a5b4fc;
}

.s2-roster-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.s2-rm-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 0;
}

.s2-rm-label {
  font-size: 10px;
  color: var(--text-muted, #94a3b8);
}

.s2-rm-cell strong {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.s2-roster-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.s2-roster-actions .btn {
  padding: 5px 6px;
  font-size: 11px;
  justify-content: center;
  white-space: nowrap;
}

/* 3. 1:1 채팅 스위처 내 소속 그룹 헤더 */
.s2-switcher-group-head {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
}

.s2-switcher-group-head:first-child {
  border-top: none;
  margin-top: 0;
}

.s2-switcher-group-head.is-gold {
  color: #fde68a;
  background: rgba(235, 190, 96, 0.07);
  border-radius: 6px;
}

.switcher-item.is-my-affiliated {
  border-left: 2px solid rgba(235, 190, 96, 0.65);
}

/* 4. 지구본 경유지 지정 컨트롤 & 타일 영토/길막 배지 */
.s2-globe-waypoint-ctrl {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 6;
  display: flex;
  gap: 6px;
}

.s2-waypoint-toggle-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.55);
  background: rgba(11, 15, 26, 0.86);
  backdrop-filter: blur(6px);
  color: #67e8f9;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.s2-waypoint-toggle-btn:hover {
  border-color: #22d3ee;
  background: rgba(14, 28, 44, 0.94);
}

.s2-waypoint-toggle-btn.active {
  border-color: #facc15;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
}

.s2-waypoint-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 6px;
  border-radius: var(--radius-md, 10px);
  background: linear-gradient(180deg, rgba(14, 24, 38, 0.96), rgba(11, 15, 26, 0.96));
  border: 1px solid rgba(34, 211, 238, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.s2-waypoint-bar.hidden {
  display: none !important;
}

.s2-wp-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.s2-wp-actor-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #bae6fd;
  flex: 1 1 220px;
}

.s2-wp-actor-wrap select {
  flex: 1;
  min-width: 140px;
}

.s2-wp-breakthrough-chk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #fde68a;
  cursor: pointer;
  user-select: none;
}

.s2-wp-breakthrough-chk input[type='checkbox'] {
  accent-color: #facc15;
  width: 15px;
  height: 15px;
}

.s2-wp-route-row {
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow-x: auto;
}

.s2-wp-hint {
  font-size: 11.5px;
  color: #94a3b8;
}

.s2-wp-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.s2-wp-origin {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-weight: 600;
}

.s2-wp-arrow {
  color: #22d3ee;
  font-weight: 700;
}

.s2-wp-step {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #a5f3fc;
  font-weight: 600;
}

.s2-wp-step.is-dest {
  background: rgba(250, 204, 21, 0.18);
  border-color: rgba(250, 204, 21, 0.6);
  color: #fef08a;
}

.s2-wp-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.s2-wp-left-btns {
  display: flex;
  gap: 6px;
}

/* 타일 인스펙터 영토/통행정책/길막 표시줄 */
.s2-tile-ops-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0;
}

.s2-ti-owner {
  font-size: 11.5px;
  color: #e2e8f0;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.s2-ti-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.s2-ti-badge.is-open {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.38);
  color: #6ee7b7;
}

.s2-ti-badge.is-toll {
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde68a;
}

.s2-ti-badge.is-forbidden {
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.52);
  color: #fda4af;
}

.s2-ti-badge.is-blockade {
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.6);
  color: #fdba74;
}

/* 5. 탈것 · 길막 · 국가 영토/내정/산하세력/병합 시트 카드 */
.s2-ops-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 11px 12px;
  margin-top: 8px;
  border-radius: var(--radius-md, 10px);
  background: rgba(18, 22, 35, 0.78);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.09));
}

.s2-ops-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main, #f1f5f9);
}

.s2-sub-heading {
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.s2-sub-label {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.s2-upkeep-pill {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(235, 190, 96, 0.1);
  border: 1px solid rgba(235, 190, 96, 0.32);
  color: #fde68a;
}

/* 이동 능력 배지 & 탈것 슬롯 */
.s2-cap-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.s2-cap-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.s2-cap-pill em {
  font-style: normal;
  color: #94a3b8;
  font-size: 10.5px;
}

.s2-cap-pill.is-speed {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.08);
}

.s2-cap-pill.is-ok {
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(52, 211, 153, 0.1);
  color: #a7f3d0;
}

.s2-cap-pill.is-no {
  color: #94a3b8;
}

.s2-mount-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-mount-slot.is-equipped {
  border-color: rgba(235, 190, 96, 0.42);
  background: rgba(235, 190, 96, 0.07);
}

.s2-mount-slot.is-empty {
  color: var(--text-muted, #94a3b8);
  font-size: 12px;
}

.s2-mount-slot-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.s2-mount-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.s2-mount-effect-line {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.s2-grade-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(235, 190, 96, 0.2);
  color: #fde68a;
}

.s2-trait-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.s2-trait-tag.is-sky {
  background: rgba(192, 132, 252, 0.18);
  color: #e9d5ff;
}

.s2-owned-mounts-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.s2-owned-mounts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.s2-owned-mount-btn {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 11px;
  cursor: pointer;
}

.s2-owned-mount-btn:hover:not(:disabled) {
  border-color: rgba(235, 190, 96, 0.6);
  color: #fde68a;
}

.s2-owned-mount-btn.active {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  cursor: default;
}

.s2-mount-shop-drawer {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-mount-shop-drawer.hidden {
  display: none !important;
}

.s2-shop-caption {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
}

.s2-mount-shop-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s2-mount-shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.s2-mount-shop-item.is-owned {
  border-color: rgba(52, 211, 153, 0.3);
}

.s2-mount-shop-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.s2-mount-shop-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}

.s2-price-tag {
  font-size: 11px;
  font-weight: 700;
  color: #facc15;
}

.s2-mount-shop-desc {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

/* 세력 종속·반란·길막 */
.s2-vassal-status-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(124, 140, 255, 0.08);
  border: 1px solid rgba(124, 140, 255, 0.3);
}

.s2-vassal-lord-badge {
  font-size: 12px;
  color: #c7d2fe;
}

.s2-rebellion-alert {
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.55);
  color: #fecdd3;
  font-size: 11.5px;
  font-weight: 700;
}

.s2-blockade-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.s2-blockade-desc {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s2-blockade-desc strong {
  font-size: 12px;
}

.s2-blockade-desc span {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.s2-btn-danger-outline {
  border-color: rgba(251, 146, 60, 0.6) !important;
  color: #fdba74 !important;
}

/* 국가 대시보드 · 민심 · 병력 · 내정 · 영토 · 산하세력 · 병합 */
.s2-nation-dashboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s2-sentiment-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.s2-sentiment-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.s2-tax-hint {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.s2-sentiment-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.s2-sentiment-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eab308, #facc15);
  transition: width 0.25s ease;
}

.s2-sentiment-fill.is-high {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.s2-sentiment-fill.is-low {
  background: linear-gradient(90deg, #e11d48, #fb7185);
}

.s2-military-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(235, 190, 96, 0.06);
  border: 1px solid rgba(235, 190, 96, 0.24);
}

.s2-military-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s2-military-info strong {
  font-size: 12.5px;
}

.s2-military-info em {
  font-style: normal;
  font-size: 11.5px;
}

.s2-max-tier-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: #fde68a;
}

.s2-interior-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s2-interior-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.s2-interior-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 8px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-main, #f1f5f9);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.s2-interior-btn:hover:not(:disabled) {
  border-color: rgba(235, 190, 96, 0.6);
  background: rgba(235, 190, 96, 0.1);
}

.s2-interior-btn strong {
  font-size: 11.5px;
}

.s2-interior-btn span {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
}

/* 영토 보유 목록 & 인접 영토 확장 */
.s2-owned-tiles-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 84px;
  overflow-y: auto;
}

.s2-tile-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(235, 190, 96, 0.12);
  border: 1px solid rgba(235, 190, 96, 0.35);
  color: #fde68a;
}

.s2-claim-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.s2-claim-row select {
  flex: 1 1 180px;
}

/* 통행 정책 폼 */
.s2-territory-policy-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-policy-radio-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.s2-policy-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.s2-policy-opt input[type='radio'] {
  display: none;
}

.s2-policy-opt.active {
  border-color: #ebbe60;
  background: rgba(235, 190, 96, 0.15);
  color: #fde68a;
}

.s2-policy-inputs-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.s2-inline-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}

.s2-inline-field input,
.s2-inline-field select {
  width: 100%;
}

.s2-exempt-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.s2-exempt-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #cbd5e1;
}

.s2-exempt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 105px;
  overflow-y: auto;
  padding-top: 2px;
}

.s2-exempt-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.s2-exempt-chip input[type='checkbox'] {
  accent-color: #34d399;
  margin: 0;
}

.s2-exempt-chip em {
  font-style: normal;
  color: #94a3b8;
  font-size: 10px;
}

.s2-exempt-chip.is-checked {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.14);
  color: #a7f3d0;
}

.s2-full-btn {
  width: 100%;
  justify-content: center;
}

/* 산하 세력 목록 · 파견 폼 · 평화 병합 */
.s2-vassal-roster {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.s2-vassal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(124, 140, 255, 0.08);
  border: 1px solid rgba(124, 140, 255, 0.25);
  font-size: 11.5px;
}

.s2-vassal-item.is-danger {
  border-color: rgba(244, 63, 94, 0.55);
  background: rgba(244, 63, 94, 0.12);
}

.s2-dispatch-vassal-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-form-row-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.s2-merge-faction-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-merge-preview {
  font-size: 11.5px;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(235, 190, 96, 0.08);
  border: 1px solid rgba(235, 190, 96, 0.28);
  color: #e2e8f0;
}

/* 모바일 작은 뷰포트 대응 */
@media (max-width: 680px) {
  .s2-roster-actions {
    grid-template-columns: 1fr;
  }

  .s2-interior-grid,
  .s2-policy-radio-row,
  .s2-policy-inputs-row,
  .s2-form-row-2col {
    grid-template-columns: 1fr;
  }

  .s2-mount-shop-item {
    flex-direction: column;
    align-items: stretch;
  }

  .s2-mount-shop-act .btn {
    width: 100%;
    justify-content: center;
  }

  .s2-wp-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .s2-wp-left-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .s2-wp-actions-row > .btn-gold {
    width: 100%;
    justify-content: center;
  }

  .s2-globe-waypoint-ctrl {
    left: 8px;
    bottom: 8px;
  }

  .s2-waypoint-toggle-btn {
    padding: 5px 10px;
    font-size: 11.5px;
  }
}

/* ==========================================================================
   6. NPC 경지 레벨 · 경험치(EXP) · 자유 스탯 포인트 배분 & 340 상한 게이지 UI
   ========================================================================== */

@keyframes s2StatPtPulse {
  0%,
  100% {
    box-shadow: 0 0 6px rgba(250, 204, 21, 0.25);
    border-color: rgba(250, 204, 21, 0.65);
  }
  50% {
    box-shadow: 0 0 13px rgba(250, 204, 21, 0.55);
    border-color: #fde047;
  }
}

.s2-npc-lv-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: #fde68a;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(217, 119, 6, 0.14));
  border: 1px solid rgba(250, 204, 21, 0.48);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.s2-npc-statpt-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  color: #11131b;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border: 1px solid #fef08a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  animation: s2StatPtPulse 2s ease-in-out infinite;
}

.s2-npc-statpt-badge.is-locked {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  animation: none;
}

.chip-temper-tag {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 4px;
  white-space: nowrap;
}

.chip-temper-tag.is-header {
  font-size: 10.5px;
  padding: 1px 6px;
  margin-left: 0;
}

/* 경지 레벨 & 경험치 카드 */
.s2-level-exp-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  background: linear-gradient(145deg, rgba(28, 24, 16, 0.72), rgba(16, 20, 32, 0.88));
  border: 1px solid rgba(243, 201, 105, 0.34);
}

.s2-level-exp-card.is-fallen {
  background: rgba(255, 255, 255, 0.03);
  border-style: dashed;
  border-color: rgba(243, 201, 105, 0.25);
}

.s2-level-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.s2-lv-gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #141109;
  background: linear-gradient(135deg, #fde047, #eab308);
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.28);
  white-space: nowrap;
}

.s2-lv-gold-badge.is-fallen {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(234, 179, 8, 0.4);
  box-shadow: none;
}

.s2-exp-text {
  font-size: 11.5px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.s2-exp-text strong {
  color: #fde68a;
  font-weight: 700;
}

.s2-exp-text em {
  font-style: normal;
  color: #94a3b8;
  font-size: 11px;
}

.s2-exp-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.s2-exp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ca8a04, #facc15, #fef08a);
  transition: width 0.28s ease;
}

.s2-exp-rule-hint {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.42;
}

/* 자유 스탯 포인트 배분 황금 박스 */
.s2-stat-alloc-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 3px;
  padding: 10px 11px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.13), rgba(217, 119, 6, 0.08));
  border: 1px solid rgba(250, 204, 21, 0.58);
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.14);
}

.s2-stat-alloc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.s2-stat-alloc-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fef08a;
}

.s2-stat-alloc-title strong {
  font-size: 14px;
  color: #ffffff;
  padding: 0 3px;
  font-variant-numeric: tabular-nums;
}

.s2-alloc-reset-btn {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.28);
  color: #e2e8f0;
  font-size: 11px;
  cursor: pointer;
}

.s2-alloc-reset-btn:hover {
  border-color: #fde047;
  color: #fef08a;
}

.s2-alloc-reset-btn.hidden,
.s2-stat-alloc-added.hidden {
  display: none !important;
}

.s2-stat-alloc-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.s2-stat-alloc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(11, 14, 23, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-stat-alloc-row.has-alloc {
  border-color: rgba(250, 204, 21, 0.55);
  background: rgba(24, 24, 16, 0.78);
}

.s2-stat-alloc-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.s2-stat-alloc-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  min-width: 28px;
}

.s2-stat-alloc-base {
  font-size: 11px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}

.s2-stat-alloc-base strong {
  color: #fde68a;
  font-size: 12px;
}

.s2-stat-alloc-added {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: #064e3b;
  background: #34d399;
  padding: 1px 6px;
  border-radius: 999px;
}

.s2-stat-alloc-eq-hint {
  font-size: 10px;
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 0 5px;
  border-radius: 4px;
}

.s2-stat-stepper-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.s2-step-btn {
  min-width: 30px;
  height: 25px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.s2-step-btn:hover:not(:disabled) {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.2);
  color: #fef08a;
}

.s2-step-btn.is-plus5 {
  border-color: rgba(250, 204, 21, 0.42);
  background: rgba(234, 179, 8, 0.14);
  color: #fde68a;
}

.s2-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.s2-step-count {
  min-width: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #fef08a;
  font-variant-numeric: tabular-nums;
}

.s2-stat-locked-badge {
  margin-top: 2px;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(250, 204, 21, 0.08);
  border: 1px dashed rgba(250, 204, 21, 0.38);
  color: #fde68a;
  font-size: 11.5px;
  line-height: 1.4;
}

/* NPC 5대 능력치 + 활력 듀얼 게이지 바 (실효 상한 340 기준) */
.s2-npc-stats-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.s2-stat-bar-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 7px 9px;
  border-radius: var(--radius-xs, 6px);
  background: rgba(9, 10, 15, 0.55);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.s2-stat-bar-card.over-cap {
  border-color: rgba(250, 204, 21, 0.45);
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.08), rgba(9, 10, 15, 0.6));
}

.s2-stat-bar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.s2-stat-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}

.s2-stat-bar-values {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.s2-stat-bar-values > strong {
  font-size: 13px;
  color: #f8fafc;
}

.s2-stat-bar-card.over-cap .s2-stat-bar-values > strong {
  color: #fde047;
}

.s2-stat-breakdown {
  font-style: normal;
  font-size: 10.5px;
  color: #94a3b8;
}

.s2-stat-breakdown .pos {
  color: #34d399;
  font-weight: 600;
}

.s2-stat-breakdown .neg {
  color: #fb7185;
  font-weight: 600;
}

.s2-stat-gauge-track {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.s2-stat-gauge-base {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  transition: width 0.22s ease;
}

.s2-stat-bar-card.over-cap .s2-stat-gauge-base {
  background: linear-gradient(90deg, #eab308, #facc15);
}

.s2-stat-gauge-equip {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.22s ease;
}

.s2-stat-gauge-vit {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #059669, #34d399);
  transition: width 0.22s ease;
}

.s2-stat-gauge-vit.is-low {
  background: linear-gradient(90deg, #e11d48, #fb7185);
}

.s2-stat-cap-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(250, 204, 21, 0.55);
  pointer-events: none;
}

@media (max-width: 560px) {
  .s2-npc-stats-bars {
    grid-template-columns: 1fr;
  }

  .s2-stat-alloc-row {
    flex-wrap: wrap;
  }

  .s2-stat-stepper-ctrl {
    margin-left: auto;
  }
}

/* ==========================================================================
   7. 존재 실시간 이름 검색 · 단일 통합 현신·신탁 컴포저 · 국가 세율/방어막 · 세력 전향 · 적 영토 공성
   ========================================================================== */

/* 7-1. 우측 패널 존재 실시간 검색 바 */
.s2-entity-search-wrap {
  padding: 6px 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(12, 15, 24, 0.55);
}

.s2-entity-search-box,
.s2-quick-filter-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.s2-entity-search-input,
.s2-switcher-search-input {
  width: 100%;
  padding: 6px 28px 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main, #f1f5f9);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.s2-entity-search-input:focus,
.s2-switcher-search-input:focus {
  outline: none;
  border-color: rgba(235, 190, 96, 0.65);
  background: rgba(255, 255, 255, 0.075);
}

.s2-entity-search-clear,
.s2-switcher-search-clear {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 10.5px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.14s ease, color 0.14s ease;
}

.s2-entity-search-clear:hover,
.s2-switcher-search-clear:hover {
  background: rgba(235, 190, 96, 0.3);
  color: #fef08a;
}

.s2-entity-search-clear.hidden,
.s2-switcher-search-clear.hidden {
  display: none !important;
}

/* 1:1 채팅 스위처 팝오버 빠른 검색 */
.s2-quick-filter-row {
  margin-bottom: 7px;
}

/* 단일 통합 1:1 현신·신탁 3단 슬림 컴포저 */
.s2-unified-composer {
  transition: border-color 0.18s ease, background 0.18s ease;
}

.s2-unified-composer.composer-oracle {
  border-top-color: rgba(235, 190, 96, 0.36);
  background: linear-gradient(180deg, rgba(24, 21, 14, 0.88), rgba(12, 14, 21, 0.92));
}

.s2-unified-composer.composer-grand-oracle {
  border-top-color: rgba(245, 158, 11, 0.55);
  background: linear-gradient(180deg, rgba(30, 19, 18, 0.9), rgba(12, 14, 21, 0.94));
}

.s2-unified-toolbar {
  flex-wrap: wrap;
  gap: 6px 10px;
}

.s2-intensity-radiogroup {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2.5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 100%;
}

.s2-intensity-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted, #94a3b8);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.s2-intensity-pill:hover {
  color: var(--text-main, #f1f5f9);
  background: rgba(255, 255, 255, 0.05);
}

.s2-intensity-pill .s2-ip-cost {
  font-style: normal;
  font-size: 10.5px;
  opacity: 0.78;
  font-variant-numeric: tabular-nums;
}

.s2-intensity-pill.is-chat.active {
  background: var(--accent-indigo, #5b5ef4);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(91, 94, 244, 0.35);
}

.s2-intensity-pill.is-mid-oracle.active {
  background: linear-gradient(135deg, #d8a43a, #f3c969);
  color: #161209;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(234, 179, 8, 0.32);
}

.s2-intensity-pill.is-grand-oracle.active {
  background: linear-gradient(135deg, #f59e0b, #fb7185);
  color: #fffaf0;
  font-weight: 700;
  border-color: rgba(254, 240, 138, 0.45);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.38);
}

/* [2줄] 일상 현신 옵션 스트립 + 목표 타일 원클릭 전환 칩 */
.s2-unified-chat-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.s2-pending-move-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 6px 3.5px 9px;
  border-radius: 999px;
  background: rgba(235, 190, 96, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fde68a;
  font-size: 11px;
  font-weight: 600;
  max-width: 100%;
}

.s2-pmc-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.s2-pmc-switch-btn {
  appearance: none;
  border: 1px solid rgba(250, 204, 21, 0.55);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.28), rgba(217, 119, 6, 0.24));
  color: #fef08a;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.14s ease, background 0.14s ease;
}

.s2-pmc-switch-btn:hover:not(:disabled) {
  filter: brightness(1.12);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.42), rgba(217, 119, 6, 0.34));
}

.s2-pmc-clear-btn {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.s2-pmc-clear-btn:hover {
  background: rgba(244, 63, 94, 0.32);
  color: #fff;
}

/* [2줄] 중신탁 / 대신탁 한 줄 슬림 옵션 스트립 + 접이식 다이스 요약 배지 */
.s2-unified-oracle-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s2-unified-oracle-strip {
  display: grid;
  grid-template-columns: minmax(112px, 0.85fr) minmax(132px, 1.25fr) auto;
  gap: 6px;
  align-items: center;
}

.s2-dice-summary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(235, 190, 96, 0.38);
  background: rgba(235, 190, 96, 0.1);
  color: #fde68a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.s2-dice-summary-btn:hover,
.s2-dice-summary-btn.active {
  border-color: rgba(250, 204, 21, 0.72);
  background: rgba(235, 190, 96, 0.2);
}

.s2-dice-summary-btn strong {
  color: #fef08a;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.s2-dice-caret {
  font-style: normal;
  font-size: 10px;
  color: #cbd5e1;
  padding-left: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.s2-oracle-preview-drawer.hidden {
  display: none !important;
}

.s2-oracle-preview-drawer.is-open {
  animation: s2OraclePreviewSlide 0.16s ease-out;
}

@keyframes s2OraclePreviewSlide {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.composer-pill.pill-grand-oracle:focus-within {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}

/* 7-2. 국가 시간당 재정 수지 요약 배지 & 외곽 영토 방어막 배너 & 정기 세율 정책 바 */
.s2-fiscal-balance-badge {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.s2-fiscal-balance-badge em {
  font-style: normal;
  font-size: 11px;
  color: #94a3b8;
}

.s2-fiscal-balance-badge.is-surplus {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.13), rgba(6, 78, 59, 0.16));
  border-color: rgba(52, 211, 153, 0.45);
}

.s2-fiscal-balance-badge.is-deficit {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.15), rgba(136, 19, 55, 0.18));
  border-color: rgba(251, 113, 133, 0.52);
}

.s2-territory-shield-banner {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
}

.s2-territory-shield-banner.is-protected {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(52, 211, 153, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.44);
  color: #bae6fd;
}

.s2-territory-shield-banner.is-protected strong {
  color: #6ee7b7;
}

.s2-territory-shield-banner.is-exposed {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(217, 119, 6, 0.14));
  border: 1px solid rgba(244, 63, 94, 0.62);
  color: #fecdd3;
  font-weight: 600;
}

.s2-territory-shield-banner.is-exposed strong {
  color: #fde047;
}

.s2-tax-rate-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s2-tax-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.s2-tax-rate-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main, #f1f5f9);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.s2-tax-rate-btn:hover:not(:disabled) {
  border-color: rgba(235, 190, 96, 0.55);
  background: rgba(235, 190, 96, 0.09);
}

.s2-tax-rate-btn strong {
  font-size: 11.5px;
  font-weight: 700;
}

.s2-tax-rate-btn span {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
}

.s2-tax-rate-btn.active {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.18);
}

.s2-tax-rate-btn.active strong {
  color: #a7f3d0;
}

.s2-tax-rate-btn.active span {
  color: #d1fae5;
}

.s2-tax-rate-btn.is-high-tax.active {
  border-color: #fb7185;
  background: rgba(244, 63, 94, 0.2);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.22);
}

.s2-tax-rate-btn.is-high-tax.active strong {
  color: #fecdd3;
}

.s2-tax-rate-btn.is-high-tax.active span {
  color: #fda4af;
}

/* 7-3. 세력 국가 소속(종주국) 변경 컨트롤 */
.s2-vassal-status-box.is-independent {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.12);
}

.s2-allegiance-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(235, 190, 96, 0.06);
  border: 1px solid rgba(235, 190, 96, 0.28);
}

.s2-allegiance-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.s2-allegiance-controls .s2-allegiance-select {
  flex: 1 1 190px;
}

.s2-allegiance-caption {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

/* 7-4. 적국 영토 현장 격파 공성 전술 박스 */
.s2-siege-tactical-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.2), rgba(217, 119, 6, 0.16));
  border: 1px solid rgba(251, 113, 133, 0.65);
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.18);
}

.s2-siege-tactical-box.is-final-capital {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.28), rgba(234, 179, 8, 0.22));
  border-color: #facc15;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.25);
}

/* 적대 관계가 아닌 중립 타국 영토: 경보색 대신 차분한 안내 톤 */
.s2-siege-tactical-box.is-neutral {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: none;
}

.s2-siege-tactical-box.is-neutral .s2-siege-tactical-title {
  color: #e2e8f0;
}

.s2-siege-tactical-box.is-blocked {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(88, 28, 135, 0.22));
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: none;
}

.s2-siege-tactical-title {
  font-size: 12.5px;
  color: #fef2f2;
  line-height: 1.45;
}

.s2-siege-tactical-title strong {
  color: #fde047;
}

.s2-siege-tactical-title em {
  font-style: normal;
  font-size: 11px;
  color: #cbd5e1;
}

.s2-siege-shield-note {
  font-size: 11.5px;
  color: #fde68a;
  padding: 6px 9px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px dashed rgba(250, 204, 21, 0.45);
  line-height: 1.42;
}

.s2-btn-siege {
  width: 100%;
  justify-content: center;
  font-weight: 800;
  color: #fff1f2;
  background: linear-gradient(135deg, #e11d48, #d97706);
  border: 1px solid rgba(253, 224, 71, 0.65);
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.32);
}

.s2-btn-siege:hover:not(:disabled) {
  filter: brightness(1.08);
  background: linear-gradient(135deg, #f43f5e, #f59e0b);
  border-color: #fef08a;
}

@media (max-width: 680px) {
  .s2-intensity-pill {
    padding: 4px 8px;
    font-size: 11px;
  }

  .s2-unified-oracle-strip {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .s2-unified-oracle-strip .s2-oracle-dest-select {
    grid-column: 1 / -1;
    order: 3;
  }

  .s2-tax-rate-grid {
    grid-template-columns: 1fr;
  }

  .s2-allegiance-controls .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   8. 시즌2 확장 UI: 세력 영업수익 · 국가 과잉확장 · 최대활력(100+) · 스택(×N) ·
      현지 국가/세력 상점 · 지형 채집/프롬프트 제작/거점 탐사 · 토벌 군락 HP/기여도
   ========================================================================== */

/* 8-1. 세력 영업수익 & 국가 원거리·과잉확장 경고 */
.s2-faction-fiscal-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.s2-upkeep-pill.is-revenue {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.s2-upkeep-pill.is-net-pos {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.42);
  color: #bae6fd;
}

.s2-upkeep-pill.is-net-neg {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(251, 113, 133, 0.5);
  color: #fecdd3;
}

.s2-upkeep-pill em {
  font-style: normal;
  opacity: 0.85;
  font-size: 10.5px;
}

.s2-overextension-alert {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(225, 29, 72, 0.16));
  border: 1px solid rgba(251, 146, 60, 0.58);
  color: #fde68a;
}

.s2-overextension-alert strong {
  color: #fda4af;
}

.s2-claim-distance-note {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.42;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid rgba(250, 204, 21, 0.48);
}

/* 8-2. 최대 활력(100+) 배지 & 가방 아이템 중복 스택(×N) */
.s2-max-vit-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.38);
}

.chip-stack-count {
  display: inline-block;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(234, 179, 8, 0.24);
  border: 1px solid rgba(250, 204, 21, 0.48);
}

.chip-stack-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(235, 190, 96, 0.14);
  border: 1px solid rgba(235, 190, 96, 0.4);
}

/* 8-3. 현지 국가·세력 상점 (polityShopSubView.js) */
.s2-polity-shop-drawer.hidden,
.s2-field-ops-drawer.hidden,
.s2-craft-selected-slots.hidden {
  display: none !important;
}

.s2-polity-shop-drawer,
.s2-field-ops-drawer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-async-loading {
  padding: 12px 10px;
  text-align: center;
  font-size: 11.5px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
}

.s2-shop-empty-note {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted, #94a3b8);
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.s2-shop-wallet-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  background: rgba(235, 190, 96, 0.07);
  border: 1px solid rgba(235, 190, 96, 0.25);
}

.s2-polity-shops-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.s2-polity-shop-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.s2-polity-shop-group.is-faction-shop {
  border-color: rgba(52, 211, 153, 0.34);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06), rgba(15, 23, 42, 0.4));
}

.s2-psg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.s2-psg-title {
  font-size: 12px;
  color: #f8fafc;
}

.s2-shop-flow-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.s2-shop-flow-tag.is-burn {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.13);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.s2-shop-flow-tag.is-polity-rev {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.48);
}

.s2-psg-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.s2-polity-shop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(11, 15, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.s2-psi-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.s2-psi-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
}

.s2-shop-eff-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.s2-shop-eff-pill.is-heal {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.38);
}

.s2-shop-eff-pill.is-maxhp {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.42);
}

.s2-shop-eff-pill.is-equip {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.s2-shop-eff-pill.is-catalyst {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.4);
}

.s2-psi-bonus {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
}

.s2-psi-desc {
  font-size: 10.5px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.s2-psi-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.s2-psi-actions .btn {
  white-space: nowrap;
  justify-content: center;
}

/* 8-4. 지형 채집 · 프롬프트 제작 · 거점 탐사 (fieldGatherCraftExploreSubView.js) */
.s2-head-loc-hint {
  font-style: normal;
  font-weight: 500;
  font-size: 11px;
  color: #94a3b8;
}

.s2-field-tabs-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.s2-field-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 5px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.03);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.s2-field-tab-btn em {
  font-style: normal;
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
}

.s2-field-tab-btn:hover {
  border-color: rgba(235, 190, 96, 0.5);
  background: rgba(235, 190, 96, 0.08);
}

.s2-field-tab-btn.active {
  border-color: #eab308;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.22), rgba(16, 185, 129, 0.14));
  color: #fef08a;
}

.s2-field-tab-btn.active em {
  color: #fde68a;
}

.s2-field-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s2-field-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.s2-field-biome-badge {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.36);
  color: #d1fae5;
}

.s2-field-biome-badge.is-landmark {
  background: rgba(235, 190, 96, 0.14);
  border-color: rgba(235, 190, 96, 0.45);
  color: #fef3c7;
}

.s2-field-biome-badge em {
  font-style: normal;
  font-size: 10.5px;
  color: #fde68a;
}

.s2-field-cd-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.s2-field-cd-badge.is-ready {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.13);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.s2-field-cd-badge.is-cooldown {
  color: #fdba74;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.45);
}

.s2-field-sub-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.s2-gather-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.s2-gather-preview-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.32);
  color: #a7f3d0;
}

.s2-hub-craft-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
}

.s2-hub-craft-badge.is-active {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.45);
}

.s2-hub-craft-badge.is-none {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.s2-craft-mat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #cbd5e1;
}

.s2-craft-sel-counter {
  color: #fde68a;
  font-size: 11px;
}

.s2-craft-mat-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 165px;
  overflow-y: auto;
}

.s2-craft-mat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(11, 15, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.s2-craft-mat-item.is-selected {
  border-color: rgba(250, 204, 21, 0.58);
  background: rgba(234, 179, 8, 0.11);
}

.s2-craft-mat-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  cursor: pointer;
  font-size: 11.5px;
}

.s2-craft-mat-check-label input[type='checkbox'] {
  accent-color: #facc15;
}

.s2-cmi-name {
  font-weight: 700;
  color: #f1f5f9;
}

.s2-cmi-meta {
  font-size: 10.5px;
  color: #94a3b8;
}

.s2-craft-mat-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.s2-cms-btn {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.s2-cms-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.s2-cms-qty {
  min-width: 16px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  color: #fef08a;
}

.s2-craft-selected-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.s2-craft-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fef08a;
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.5);
}

.s2-slot-remove-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #fda4af;
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.s2-field-warn {
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.42;
}

.s2-field-warn.is-amber {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.42);
}

.s2-field-warn.is-danger {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(251, 113, 133, 0.48);
}

.s2-field-warn.is-muted {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.s2-prompt-craft-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.s2-craft-kind-radios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.s2-craft-kind-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11.5px;
  font-weight: 700;
  color: #cbd5e1;
  cursor: pointer;
}

.s2-craft-kind-opt.active {
  border-color: rgba(250, 204, 21, 0.6);
  background: rgba(234, 179, 8, 0.15);
  color: #fef08a;
}

.s2-landmark-desc-box {
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  color: #e2e8f0;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.s2-explore-guide-box {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.45;
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.34);
}

/* 8-5. 지구본 인스펙터 마수 군락·던전 HP & 누적 기여도 1위 카드 */
.s2-threat-inspector-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
  padding: 7px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.15), rgba(88, 28, 135, 0.16));
  border: 1px solid rgba(251, 113, 133, 0.45);
}

.s2-tic-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #fecdd3;
}

.s2-tic-hp-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(250, 204, 21, 0.45);
}

.s2-tic-hp-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

.s2-tic-hp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f43f5e, #fb923c);
  transition: width 0.22s ease;
}

.s2-tic-sub {
  font-size: 11px;
  color: #fda4af;
  line-height: 1.42;
}

@media (max-width: 680px) {
  .s2-polity-shop-item {
    flex-direction: column;
    align-items: stretch;
  }

  .s2-psi-actions {
    flex-direction: row;
  }

  .s2-psi-actions .btn {
    flex: 1;
  }

  .s2-field-tabs-bar {
    grid-template-columns: 1fr;
  }
}

/* 경유지 신탁 이동 — 지령 한마디 입력칸 */
.s2-wp-command-input {
  flex: 1 1 220px;
  width: auto;
  white-space: normal;
}

/* 목표 추격 줄 */
.s2-pursuit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.s2-pursuit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
  white-space: nowrap;
}

.s2-pursuit-row .s2-pursuit-target-select {
  flex: 1 1 160px;
  width: auto;
  font-size: 12px;
  padding: 6px 12px;
}

.s2-pursuit-row .btn-start-pursuit {
  white-space: nowrap;
}

/* 이동 중 자동 회복 */
.s2-travel-recovery-box {
  margin-top: 10px;
  padding: 10px 12px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.s2-tr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.s2-tr-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12.5px;
}

.s2-tr-actions {
  display: flex;
  gap: 6px;
}

.s2-tr-actions .btn-sm {
  padding: 4px 11px;
}

.s2-tr-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.s2-tr-label {
  flex: 0 0 28px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.s2-tr-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.s2-travel-recovery-box .s2-tr-num {
  width: 64px;
  padding: 4px 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius-xs);
  -moz-appearance: textfield;
}

.s2-tr-num::-webkit-outer-spin-button,
.s2-tr-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* 활력 막대: 발동선(빨강) ~ 목표선(초록) */
.s2-tr-bar {
  --tr-th: 0%;
  --tr-tg: 0%;
  position: relative;
  height: 6px;
  margin: 2px 0 12px 38px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
}

.s2-tr-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--tr-th);
  width: calc(var(--tr-tg) - var(--tr-th));
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, rgba(251, 113, 133, 0.55), rgba(52, 211, 153, 0.7));
}

.s2-tr-bar::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--tr-th);
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
  background: rgba(251, 113, 133, 0.22);
}

.s2-tr-bar-mark {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  border-radius: 1px;
  transform: translateX(-1px);
}

.s2-tr-bar-mark.is-threshold {
  left: var(--tr-th);
  background: var(--accent-crimson);
}

.s2-tr-bar-mark.is-target {
  left: var(--tr-tg);
  background: var(--accent-emerald);
  display: none;
}

.s2-tr-bar.has-target .s2-tr-bar-mark.is-target {
  display: block;
}

.s2-tr-bar-max {
  position: absolute;
  right: 0;
  top: 9px;
  font-size: 10px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* 켜고 끄는 칩 (체크박스 대체) */
.s2-tr-chip {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  user-select: none;
}

.s2-tr-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.s2-tr-chip span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: line-through;
  text-decoration-color: rgba(148, 157, 179, 0.45);
  transition: all 0.15s ease;
}

.s2-tr-chip:hover span {
  border-color: var(--border-strong);
}

.s2-tr-chip input:checked + span {
  color: var(--text-main);
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(129, 140, 248, 0.5);
  text-decoration: none;
}

.s2-tr-chip.is-danger input:checked + span {
  color: var(--accent-crimson);
  background: rgba(251, 113, 133, 0.12);
  border-color: rgba(251, 113, 133, 0.4);
}

.s2-tr-chip input:focus-visible + span {
  outline: 2px solid var(--accent-indigo-light);
  outline-offset: 2px;
}

.s2-tr-arrow {
  color: var(--text-dim);
  font-size: 11px;
}

.s2-tr-note {
  font-size: 11px;
  color: var(--text-dim);
  padding-left: 38px;
}

@media (max-width: 520px) {
  .s2-tr-bar,
  .s2-tr-note {
    margin-left: 0;
    padding-left: 0;
  }

  .s2-tr-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .s2-tr-label {
    flex-basis: auto;
  }
}

/* ==========================================================================
   지도 '영토 관리 모드' — 지구본 위에 떠 있는 관리 패널
   ========================================================================== */
.s2-territory-gov-toggle {
  border-color: rgba(243, 201, 105, 0.55);
  color: #fcd98a;
}
.s2-territory-gov-toggle.active {
  border-color: #f3c969;
  background: linear-gradient(135deg, #a16207, #854d0e);
  color: #fff;
  box-shadow: 0 0 14px rgba(243, 201, 105, 0.45);
}

/* 모드 중: 지구본 영역이 화면 가운데 큰 모달로 커진다 (바깥은 어둡게) */
.globe-canvas-wrap.is-gov-modal {
  position: fixed;
  inset: 28px 36px;
  z-index: 950;
  min-height: 0;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid rgba(243, 201, 105, 0.5);
  background: radial-gradient(circle at 40% 45%, #141a2a, #07080d 75%);
  box-shadow: 0 0 0 100vmax rgba(3, 4, 8, 0.72), 0 24px 60px rgba(0, 0, 0, 0.6);
}
.globe-canvas-wrap.is-gov-modal .globe-hint {
  right: auto;
  left: 14px;
  top: 12px;
}
body.s2-gov-modal-open {
  overflow: hidden;
}

.s2-territory-gov-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 7;
  width: min(380px, 42%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md, 12px);
  background: linear-gradient(180deg, rgba(20, 18, 12, 0.96), rgba(11, 13, 20, 0.96));
  border: 1px solid rgba(243, 201, 105, 0.45);
  box-shadow: var(--shadow-popover, 0 16px 40px rgba(0, 0, 0, 0.55));
  color: var(--text-main, #f1f3f9);
  font-size: 12px;
  overflow: hidden;
  touch-action: pan-y;
  user-select: text;
}
.s2-territory-gov-panel.hidden {
  display: none !important;
}

.tg-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tg-title {
  font-weight: 800;
  color: #fcd98a;
  white-space: nowrap;
}
.tg-head select {
  flex: 1;
  min-width: 0;
}
.tg-close-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main, #f1f3f9);
  cursor: pointer;
}
.tg-close-btn:hover {
  border-color: #f3c969;
}

.tg-seg {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tg-seg-btn {
  flex: 1 1 0;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #949db3);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.tg-seg-btn.active {
  border-color: #f3c969;
  background: rgba(243, 201, 105, 0.16);
  color: #fcd98a;
}
.tg-seg-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.tg-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.tg-body.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.tg-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--text-muted, #949db3);
}
.tg-summary strong {
  color: var(--text-main, #f1f3f9);
}

.tg-regent-row {
  font-size: 11.5px;
}
.tg-regent-chk {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  cursor: pointer;
}
.tg-regent-chk input[type='checkbox'] {
  width: auto;
  height: auto;
  margin: 0;
  flex: 0 0 auto;
}

.tg-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}
.tg-legend-bar {
  width: 90px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(239, 68, 68), rgb(251, 191, 36), rgb(52, 211, 153));
}

.tg-muted {
  color: var(--text-dim, #5e667a);
  font-size: 11.5px;
}
.tg-tip {
  margin-top: 2px;
}
.tg-sec-label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fcd98a;
}

.tg-worst-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tg-worst-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  background: var(--bg-card, rgba(255, 255, 255, 0.032));
  color: var(--text-main, #f1f3f9);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.tg-worst-item:hover {
  border-color: rgba(243, 201, 105, 0.45);
}

.tg-tile-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tg-tile-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tg-tile-head strong {
  font-size: 13.5px;
}
.tg-tile-biome,
.tg-tile-dist {
  color: var(--text-muted, #949db3);
  font-size: 11.5px;
}
.tg-tile-policy {
  font-size: 12px;
}
.tg-tile-effects {
  font-size: 11.5px;
  color: #a7f3d0;
}
.tg-tile-warn {
  padding: 6px 8px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
  font-size: 11.5px;
  font-weight: 700;
}

.tg-bar-row {
  display: grid;
  grid-template-columns: 42px 1fr 64px;
  align-items: center;
  gap: 8px;
}
.tg-bar-label {
  font-size: 11.5px;
  color: var(--text-muted, #949db3);
}
.tg-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: visible;
}
.tg-bar-fill {
  height: 100%;
  border-radius: 999px;
}
.tg-bar-target {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 1px;
}
.tg-bar.is-control .tg-bar-target {
  display: none;
}
.tg-bar-val {
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tg-bar-val .tg-up {
  margin-left: 4px;
  color: #6ee7b7;
  font-weight: 600;
}
.tg-bar-val .tg-down {
  margin-left: 4px;
  color: #fca5a5;
  font-weight: 600;
}

.tg-act-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px;
}
.tg-act-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 7px 9px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(243, 201, 105, 0.35);
  background: rgba(243, 201, 105, 0.07);
  color: var(--text-main, #f1f3f9);
  cursor: pointer;
  text-align: left;
}
.tg-act-btn:hover:not(:disabled) {
  border-color: #f3c969;
  background: rgba(243, 201, 105, 0.14);
}
.tg-act-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.tg-act-btn.is-castle {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.08);
}
.tg-act-btn.is-danger {
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.07);
}
.tg-act-main {
  font-size: 12px;
  font-weight: 700;
}
.tg-act-sub {
  font-size: 10.5px;
  color: var(--text-muted, #949db3);
}

/* 모바일: 모달은 화면 가득, 관리 패널은 아래쪽 시트 */
@media (max-width: 960px) {
  .globe-canvas-wrap.is-gov-modal {
    inset: 0;
    border-radius: 0;
  }
  .s2-territory-gov-panel {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 52px;
    width: auto;
    max-height: 46%;
  }
}

/* ==========================================================================
   세력 공방·제조법 탭 / NPC 수학·교양 / 상점 제작품 배지
   ========================================================================== */
.s2-recipe-good-tag {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.s2-recipe-card [data-role='recipe-body'],
.s2-study-card [data-role='study-body'] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.s2-recipe-card [data-role='recipe-body'].is-busy {
  opacity: 0.55;
  pointer-events: none;
}
.rc-muted {
  color: var(--text-muted, #949db3);
  font-size: 11.5px;
}
.rc-summary {
  font-size: 12px;
}
.rc-section {
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  border-radius: var(--radius-sm, 8px);
  padding: 6px 9px;
  background: var(--bg-card, rgba(255, 255, 255, 0.032));
}
.rc-section > summary {
  cursor: pointer;
  font-weight: 800;
  color: #fcd98a;
  padding: 2px 0;
}
.rc-section[open] > summary {
  margin-bottom: 6px;
}
.rc-section > *:not(summary) + *:not(summary) {
  margin-top: 6px;
}
.rc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.rc-row > select {
  flex: 1 1 160px;
  min-width: 0;
}
.rc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rc-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  white-space: nowrap;
}
.rc-chip.t2 {
  border-color: rgba(96, 165, 250, 0.55);
  color: #bfdbfe;
}
.rc-chip.t3 {
  border-color: rgba(243, 201, 105, 0.6);
  color: #fcd98a;
}
.rc-chip.is-mine {
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
}
.rc-dep-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rc-dep-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 64px;
  align-items: center;
  gap: 6px;
}
.rc-num {
  width: 64px;
}
.rc-num-wide {
  width: 96px;
}
.rc-mat-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rc-mat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 6px;
}
.rc-direction {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  font-family: inherit;
}
.rc-seg {
  display: flex;
  gap: 4px;
}
.rc-seg-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #949db3);
  font-weight: 700;
  cursor: pointer;
}
.rc-seg-btn.active {
  border-color: #f3c969;
  background: rgba(243, 201, 105, 0.16);
  color: #fcd98a;
}
.rc-preview {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 9px;
  border-radius: var(--radius-sm, 8px);
  border: 1px dashed rgba(243, 201, 105, 0.45);
  background: rgba(243, 201, 105, 0.06);
}
.rc-recipe {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 9px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  background: rgba(255, 255, 255, 0.025);
}
.rc-recipe + .rc-recipe {
  margin-top: 6px;
}
.rc-recipe-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.rc-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
}
.rc-check input[type='checkbox'] {
  width: auto;
  height: auto;
  margin: 0;
}
.rc-danger {
  color: #fda4af;
}
.study-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}

.rc-dep-row .rc-chip {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   자연재해 · 재앙 (타일 정보 칸)
   ========================================================================== */
.dz-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-bottom: 6px;
}
.dz-strip-title {
  font-size: 11px;
  font-weight: 800;
  color: #fca5a5;
}
.dz-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
  font-size: 11px;
  cursor: pointer;
}
.dz-chip.is-active {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}
.dz-inspector {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
}
.dz-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  border: 1px dashed rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.07);
  font-size: 12px;
}
.dz-card.is-active {
  border-style: solid;
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(239, 68, 68, 0.09);
}
.dz-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 8px;
}
.dz-origin,
.dz-sub {
  color: var(--text-muted, #949db3);
  font-size: 11.5px;
}
.dz-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.dz-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #a7f3d0);
}
.dz-actions,
.dz-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.dz-amount {
  width: 80px;
}
.dz-cast-toggle {
  align-self: flex-start;
}
.dz-cast {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: rgba(239, 68, 68, 0.06);
}
.dz-cast-btn {
  align-self: flex-start;
}

/* ==========================================================================
   신탁 허가 창
   ========================================================================== */
.op-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 4, 8, 0.66);
}
.op-dialog {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid rgba(243, 201, 105, 0.5);
  background: linear-gradient(180deg, #17150f, #0d0f17);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: var(--text-main, #f1f3f9);
  font-size: 13px;
}
.op-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 8px;
}
.op-head strong {
  font-size: 15px;
  color: #fcd98a;
}
.op-target,
.op-wallet,
.op-note,
.op-reason {
  color: var(--text-muted, #949db3);
  font-size: 12px;
}
.op-section-label {
  font-size: 11px;
  font-weight: 800;
  color: #fcd98a;
}
.op-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.op-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
}
.op-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(243, 201, 105, 0.08);
  border: 1px solid rgba(243, 201, 105, 0.35);
}
.op-cost {
  font-size: 20px;
  color: #fcd98a;
}
.op-list {
  font-size: 14px;
  color: var(--text-dim, #5e667a);
  margin-right: 4px;
}
.op-discounts {
  font-size: 12px;
  color: #a7f3d0;
}
.op-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* ==========================================================================
   연구 · 테크트리 탭
   ========================================================================== */
.s2-tech-card [data-role='tech-body'] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.tt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.tt-branch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  background: var(--bg-card, rgba(255, 255, 255, 0.032));
}
.tt-branch-head {
  font-weight: 800;
  color: #fcd98a;
}
.tt-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 8px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.02);
}
.tt-node.is-done {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(52, 211, 153, 0.07);
}
.tt-node.is-researching {
  border-color: rgba(243, 201, 105, 0.7);
  background: rgba(243, 201, 105, 0.08);
}
.tt-node.is-locked {
  opacity: 0.55;
}
.tt-node-head {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.tt-desc,
.tt-status {
  font-size: 11px;
  color: var(--text-muted, #949db3);
}
.tt-node .btn {
  align-self: flex-start;
}

/* 재앙 내리기 모달 */
.dz-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 4, 8, 0.66);
}
.dz-modal {
  width: min(560px, 100%);
  max-height: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: linear-gradient(180deg, #1a1012, #0d0f17);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: var(--text-main, #f1f3f9);
  overflow: hidden;
}
.dz-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  font-size: 15px;
}
.dz-modal-x {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
}
.dz-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
  font-size: 13px;
}
.dz-m-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dz-m-label {
  font-size: 12px;
  font-weight: 800;
  color: #fca5a5;
}
.dz-m-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.dz-m-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-strong, rgba(255, 255, 255, 0.13));
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.dz-m-card:hover {
  border-color: rgba(248, 113, 113, 0.6);
}
.dz-m-card.active {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.14);
}
.dz-m-icon {
  font-size: 22px;
  line-height: 1.1;
}
.dz-m-hide {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.dz-m-hide input[type='checkbox'] {
  width: auto;
  height: auto;
  margin: 3px 0 0;
  flex: 0 0 auto;
}
.dz-m-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  border: 1px dashed rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.06);
}
.dz-m-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── 세력 파견 탭: 겹친 상자 정리 · 단계별 배치 ── */
.s2-expedition-card .rc-section,
.s2-expedition-card .exp-block {
  border: none;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.07));
  border-radius: 0;
  background: transparent;
  padding: 10px 0 2px;
}
.s2-expedition-card .exp-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.s2-expedition-card .exp-block-title,
.s2-expedition-card .rc-section > summary {
  font-weight: 800;
  font-size: 13px;
  color: #fcd98a;
}
.s2-expedition-card .rc-section > summary {
  list-style: none;
}
.s2-expedition-card .rc-section > summary::-webkit-details-marker {
  display: none;
}
.s2-expedition-card .rc-section > summary::after {
  content: '▾';
  margin-left: 6px;
  font-size: 11px;
  color: var(--text-muted, #949db3);
}
.s2-expedition-card .rc-section:not([open]) > summary::after {
  content: '▸';
}
.s2-expedition-card .exp-step-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-main, #e5e7eb);
  margin-top: 2px;
}
.s2-expedition-card .exp-squad-seg {
  flex-wrap: wrap;
}
.s2-expedition-card .exp-squad-seg .rc-seg-btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  padding: 6px 6px;
  font-size: 12px;
}
.s2-expedition-card .exp-map-btn,
.s2-expedition-card .exp-dispatch-btn {
  width: 100%;
  justify-content: center;
}
.s2-expedition-card .exp-tile-row .rc-num-wide {
  width: 88px;
}

/* ── 생산 주문 ── */
.po-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.po-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; background: rgba(255,255,255,0.03); }
.po-row.is-paused { opacity: 0.55; }
.po-rank { min-width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; background: rgba(235,190,96,0.18); color: #ebbe60; }
.po-main { flex: 1 1 180px; min-width: 0; }
.po-target { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.po-btns { display: inline-flex; gap: 2px; }
.po-btns .btn { padding: 2px 8px; }
.po-log + .po-log { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(255,255,255,0.08); }

/* 영토 관리: 확장할 수 있는 칸 (지도 🚩) */
.tg-expand-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tg-expand-cost {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  margin: 4px 0 2px;
}
.tg-expand-btn {
  width: 100%;
  margin-top: 4px;
}
.btn-claim-on-map {
  white-space: nowrap;
}

/* 국가·세력 인구 추세 */
.pop-trend {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-muted, #949db3);
  font-size: 11px;
  white-space: nowrap;
  cursor: help;
}
.pop-trend.is-up {
  color: var(--accent-emerald, #3dd598);
  border-color: rgba(61, 213, 152, 0.4);
}
.pop-trend.is-down {
  color: var(--accent-crimson, #f87171);
  border-color: rgba(248, 113, 113, 0.4);
}
.pop-trend-box {
  margin: 4px 0 2px;
  font-size: 11.5px;
}
.pop-trend-box > summary.pop-trend {
  margin-left: 0;
  list-style: none;
  cursor: pointer;
  padding: 3px 9px;
  -webkit-tap-highlight-color: transparent;
}
.pop-trend-box > summary.pop-trend::-webkit-details-marker {
  display: none;
}
.pop-trend-more {
  margin-left: 4px;
  color: var(--text-muted, #949db3);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pop-trend-box[open] .pop-trend-more {
  text-decoration: none;
}
.pop-trend-why {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  background: rgba(9, 10, 15, 0.5);
  color: var(--text-main, #f1f3f9);
  line-height: 1.5;
}
.pop-trend-why ul {
  margin: 5px 0 0;
  padding-left: 16px;
  color: var(--text-muted, #949db3);
}
.pop-trend-why li + li {
  margin-top: 2px;
}
.pop-trend-note {
  margin-top: 4px;
  color: var(--text-muted, #949db3);
  font-size: 10.5px;
}

/* 파견대 자리(슬롯) 내역 */
.exp-slot-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin: 2px 0 6px;
}
.exp-slot-hint {
  font-size: 10.5px;
}

/* 산하 세력 분봉 설명 */
.s2-vassal-explain {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted, #949db3);
  margin: 2px 0 8px;
}
.s2-vassal-explain strong {
  color: var(--text-main, #f1f3f9);
}
.s2-vassal-explain-sub {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
}
