:root {
  --hw-bg: #111f44;
  --hw-panel: #182d55;
  --hw-panel2: #254776;
  --hw-border: #415e87;
  --hw-text: #eef5ff;
  --hw-muted: #aac6e9;
  --hw-cyan: #6ae4f6;
  --hw-gold: #ffcb54;
  --hw-red: #ff8d98
}

body {
  background: #111f44
}

.hw-header {
  background: linear-gradient(110deg, #172755, #244977);
  border-color: #52739c;
  box-shadow: 0 3px 15px #07142944
}

.hw-brand>span {
  text-shadow: 0 2px 0 #583c23
}

.hw-header .hw-brand {
  border-color: #526e93
}

.hw-resources strong {
  color: #fff0b1;
  font-weight: 650
}

.hw-layers {
  background: #17284e;
  border-color: #4b6590
}

.hw-layers>button {
  color: #b7d3f5
}

.hw-layers>button.active {
  background: #245da0;
  color: #fff7bf;
  box-shadow: inset 3px 0 #ffcc55
}

.hw-layer-bottom button {
  background: #233d68;
  border-color: #4b6c9a
}

.hw-panel {
  background: #182d55;
  border-color: #52739c
}

.hw-panel-tabs {
  background: #1e355f;
  border-color: #496a97
}

.hw-panel-tabs button.active {
  background: #2b65a2;
  color: #fff0b1
}

.hw-panel-title {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: #fff0c0
}

.hw-panel-scroll {
  scrollbar-color: #6188b7 #192d52
}

.hw-panel-kicker {
  color: #83dcff
}

.hw-stat-grid strong {
  color: #f5fbff
}

.hw-stat-grid small,
.hw-subtle,
.hw-section p {
  color: #b7cee8
}

.hw-panel-foot {
  background: #15294c;
  border-color: #496a97
}

.hw-panel-foot button {
  background: #2a4c79
}

.hw-clock {
  background: linear-gradient(90deg, #1a3159, #1d3b64);
  border-color: #4b6c97
}

.hw-tick strong {
  color: #ffdf82
}

.hw-clock .hw-primary,
.hw-dialog .hw-primary {
  color: #192343;
  background: #ffcd5c;
  border-color: #ffe19a
}

.hw-primary:hover {
  background: #ffe39c
}

.hw-mapstage {
  background: #17354a
}

.hw-map-badge {
  background: #18335cee;
  border-color: #82a4c8;
  color: #fff0b1
}

.hw-map-actions {
  align-items: flex-start
}

.hw-map-actions button {
  background: #213b64f2;
  border-color: #6584a8;
  color: #eaf6ff
}

.hw-map-actions button.active {
  background: #3978b8;
  color: #fff7ca;
  border-color: #e5d18a
}

.hw-map-top {
  flex-wrap: wrap;
  right: 1rem;
  align-items: center
}

.hw-map-top select {
  width: auto;
  max-width: 205px;
  padding: .35rem 1.8rem .35rem .55rem;
  background-color: #203b65e8;
  font-size: .75rem;
  border-color: #6b8eb0
}

.hw-route-preview {
  background: #243e63f5;
  border-color: #ddc26e;
  color: #fff2cc
}

.hw-map-bottom span {
  background: #19385be0;
  color: #d8ecff
}

#hw-hover-info {
  position: absolute;
  left: 1rem;
  bottom: 3.4rem;
  max-width: calc(100% - 235px);
  padding: .45rem .65rem;
  background: #142e50ef;
  color: #eff6ff;
  border: 1px solid #668caa;
  border-radius: 5px;
  font-size: .8rem;
  line-height: 1.7;
  pointer-events: none
}

#hw-hover-info:empty {
  display: none
}

#hw-minimap {
  background: #17354a;
  border: 2px solid #9dc0de;
  box-shadow: 0 5px 25px #061c3b66
}

.hw-legend {
  position: absolute;
  right: 1rem;
  top: 6.5rem;
  max-width: 290px;
  background: #142c51f5;
  border: 1px solid #6c8caf;
  border-radius: 7px;
  box-shadow: 0 6px 25px #06142655;
  z-index: 2
}

.hw-legend summary {
  padding: .5rem .8rem;
  cursor: pointer;
  color: #fff0b9;
  font-size: .8rem
}

.hw-legend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem .8rem;
  padding: .6rem .8rem;
  font-size: .75rem;
  color: #d6eaff
}

.hw-legend-grid span {
  white-space: nowrap
}

#hw-faction-colors {
  border-top: 1px solid #527198;
  padding: .6rem .8rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem .7rem;
  font-size: .75rem;
  color: #e8f1fb
}

#hw-faction-colors:empty {
  display: none
}

.hw-faction-key {
  display: flex;
  align-items: center;
  gap: .45rem
}

.hw-faction-key i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid #f1f6fb77;
  border-radius: 2px
}

.hw-tile-facts {
  margin: 1rem 0;
  display: grid;
  gap: .45rem;
  font-size: .8rem;
  line-height: 1.7
}

.hw-tile-facts>div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: .6rem;
  padding: .25rem 0
}

.hw-tile-facts dt {
  color: #a7c5e6
}

.hw-tile-facts dd {
  margin: 0;
  color: #edf6ff;
  overflow-wrap: anywhere
}

.hw-tile-facts .hw-resource-fact {
  background: #304568;
  padding: .45rem .5rem;
  border-radius: 4px
}

.hw-resource-fact dt {
  color: #e5cc84
}

.hw-resource-fact dd {
  font-weight: 600;
  color: #ffe9a2
}

.hw-section {
  border-color: #3a5a84
}

.hw-section>summary {
  cursor: pointer;
  font-size: .9rem;
  color: #f1da9c;
  padding: .2rem 0
}

.hw-section button,
.hw-section select,
.hw-section input {
  background-color: #233f69;
  border-color: #587ca6
}

.hw-build-button small {
  color: #adc9e6
}

.hw-pill {
  background: #305788;
  color: #dff5ff
}

.hw-line-entry {
  display: grid;
  gap: .4rem;
  padding: .75rem 0;
  border-bottom: 1px solid #3f5d84
}

.hw-line-entry>strong {
  font-size: .85rem;
  color: #fff0be
}

.hw-line-entry>span,
.hw-line-entry>small {
  font-size: .75rem;
  color: #bad3ed
}

.hw-line-transfer {
  display: flex;
  gap: .4rem
}

.hw-line-transfer select {
  flex: 1;
  min-width: 0
}

.hw-line-transfer button {
  flex: none;
  padding: .4rem;
  font-size: .75rem
}

.hw-access-row {
  padding: .75rem 0;
  border-bottom: 1px solid #3b5b84;
  display: grid;
  gap: .5rem
}

.hw-access-row>strong {
  font-size: .85rem;
  color: #f0dfb7
}

.hw-access-row label {
  grid-template-columns: 35px minmax(0, 1fr);
  align-items: center
}

.hw-danger {
  border-color: #d07081 !important;
  color: #ffc4c9 !important;
  background: #743b51 !important
}

.hw-draft-section {
  background: #2b4264;
  border: 1px solid #b3a174;
  padding: .8rem;
  margin-bottom: 1rem;
  border-radius: 6px
}

.hw-draft-section h3 {
  font-size: .95rem;
  color: #ffe1a1;
  margin: 0 0 .5rem
}

.hw-draft-section p {
  font-size: .8rem;
  line-height: 1.7;
  margin-bottom: .5rem;
  color: #dceafa
}

.hw-dialog {
  background: #182d50;
  border-color: #7a9ac0
}

.hw-dialog-footer {
  background: #152848;
  border-color: #415e87
}

.hw-config input,
.hw-config select,
.hw-console-body input,
.hw-console-body select {
  background: #233e65;
  border-color: #5f80a5
}

.hw-briefing {
  border-color: #577699
}

.hw-briefing strong {
  color: #fff0b7
}

.hw-briefing p {
  color: #bad2ed
}

.hw-eyebrow {
  color: #ffcd63
}

.hw-dialog-heading p {
  color: #c3d9ed
}

.hw-console-body {
  display: grid;
  gap: 1rem;
  padding: .5rem 2rem 1rem
}

.hw-console-body .hw-checkbox input {
  width: 18px
}

.hw-diplomat,
.hw-report,
.hw-city-row {
  border-color: #3e5e88
}

.hw-diplomat p,
.hw-city-row p {
  color: #bad3ed
}

.hw-report p {
  color: #d9e9f8
}

.hw-report small {
  color: #86d9ff
}

#hw-toast {
  background: #244973f5;
  border-color: #9bc3e8;
  color: #fff5d7
}

#hw-toast.error {
  background: #603349;
  border-color: #e79c9d;
  color: #ffe0da
}

@media(max-width:1150px) {
  #hw-hover-info {
    max-width: calc(100% - 205px);
    font-size: .75rem
  }

  .hw-legend {
    max-width: 260px
  }

  .hw-map-top select {
    max-width: 175px
  }
}

@media(max-height:720px) {
  .hw-legend {
    top: 6rem
  }

  .hw-legend-grid {
    gap: .3rem;
    padding: .4rem .6rem
  }

  .hw-map-actions button {
    padding: .35rem .45rem
  }
}

.hg-symbol {
  flex: none;
  vertical-align: middle;
  overflow: visible
}

.hw-legend-grid>span {
  display: flex;
  align-items: center;
  gap: .4rem
}

.hw-legend-grid .hg-symbol {
  width: 20px;
  height: 20px
}

.hg-table-wrap .hg-symbol {
  min-width: 24px
}

.hw-line-transfer button {
  max-width: 90px
}

#hw-network-filter {
  pointer-events: auto
}

.hw-console-body label {
  color: #d9e9fa
}

.hw-map-actions button:hover {
  background: #3d6fa1;
  border-color: #bed9f0
}

.hw-tile-facts dd {
  min-width: 0
}

.hw-map-actions>select {
  pointer-events: auto;
  flex: 0 1 auto;
  width: auto;
  max-width: min(190px, 100%);
  padding: .35rem 1.8rem .35rem .55rem;
  font-size: .75rem;
  background-color: #203b65ed;
  border-color: #6b8eb0
}

.hw-legend {
  top: 10rem
}

#hw-save-place {
  font-size: .8rem;
  line-height: 1.7;
  color: #c2d4ee
}

#hw-offer-text {
  white-space: pre-line;
  line-height: 1.9
}

#hw-panel-content [data-offer] {
  display: block;
  width: 100%;
  margin: .5rem 0;
  border-color: #f2c75b;
  color: #fff1b2
}

.hw-observing .hw-panel {
  width: min(470px, 36vw)
}

.hw-observing .hw-panel-tabs,
.hw-observing [data-tool],
.hw-observing [data-command-control] {
  display: none
}

.hw-observer-card {
  border: 1px solid #56769d;
  border-radius: 7px;
  padding: .8rem;
  margin: .8rem 0;
  background: #203c65
}

.hw-observer-card h3 {
  font-size: 1rem;
  line-height: 1.8
}

.hw-observer-card h3 i {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 1px solid #e2eeff
}

.hw-observer-card h3 small {
  display: block;
  font-size: .72rem;
  color: #b5cee8
}

.hw-observer-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  font-size: .75rem;
  color: #bad0e9
}

.hw-observer-metrics strong {
  display: block;
  color: #f7e6ae;
  font-size: .9rem
}

.hw-observer-card .hw-button-grid {
  margin-top: .5rem
}

#hw-observer-toolbar {
  padding: .6rem 1rem;
  border-bottom: 1px solid #577699
}

#hw-observer-toolbar label {
  grid-template-columns: auto 1fr;
  align-items: center
}

#hw-observer-toolbar select {
  padding: .3rem
}

.hw-observing .hw-map-actions {
  top: 3.7rem
}

.hw-observing .hw-legend {
  top: 6.5rem
}

#hw-control-release {
  font-size: .75rem
}

.hw-observer-tabs {
  display: flex;
  gap: .3rem;
  padding: .6rem;
  border-bottom: 1px solid var(--hw-border);
  background: #1e355f
}

.hw-observer-tabs[hidden] {
  display: none
}

.hw-observer-tabs button {
  flex: 1;
  padding: .6rem .25rem;
  font-size: .8rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hw-muted)
}

.hw-observer-tabs button.active {
  background: #2b65a2;
  color: #fff0b1;
  border-color: #5d84ad
}

.hw-rank-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem
}

.hw-rank-controls label {
  font-size: .8rem
}

.hw-rank-controls select {
  padding: .4rem
}

.hw-rank-table-wrap {
  overflow-x: auto
}

.hw-rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
  font-variant-numeric: tabular-nums
}

.hw-rank-table th,
.hw-rank-table td {
  padding: .65rem .35rem;
  border-bottom: 1px solid #3f5d84;
  text-align: right;
  white-space: nowrap
}

.hw-rank-table th {
  color: #b7cee8;
  font-weight: 500
}

.hw-rank-table th:nth-child(2),
.hw-rank-table td:nth-child(2) {
  text-align: left
}

.hw-rank-table button {
  padding: 0;
  background: none;
  border: 0;
  color: #fff0c0;
  font-size: inherit
}

.hw-rank-table i {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  margin-right: .3rem
}

.hw-rank-table small {
  display: block;
  color: #aac6e9;
  font-size: .68rem;
  margin-top: .25rem
}

.hw-config-note {
  color: #aac6e9;
  font-size: .75rem;
  line-height: 1.7;
  margin: -.3rem 0 .5rem
}

.hw-tick strong {
  font-variant-numeric: tabular-nums;
  min-width: 5ch;
  display: inline-block
}

.hw-relations-svg {
  display: block;
  width: 100%;
  min-height: 300px;
  background: #12283e;
  border: 1px solid #5b7b9c;
  border-radius: 10px;
  margin: 14px 0
}

.hw-relation-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px
}

.hw-relation-list p {
  border-bottom: 1px solid #39526e;
  padding: 10px 0;
  line-height: 1.6
}

.hw-exchange {
  padding: 12px 0;
  border-top: 1px solid #39526e
}

.hw-exchange small {
  display: block;
  margin-top: 8px;
  color: #bad0e6
}

.hw-observer-tabs {
  flex-wrap: wrap
}

.hw-observer-tabs button {
  flex: 1 1 40%
}

/* Map-only mode removes every surrounding panel and overlay. */
#hex-app.hw-map-only{position:fixed;inset:0;width:100%;height:100dvh;display:block;z-index:1000}
.hw-map-only>.hw-header,.hw-map-only>.hw-clock,.hw-map-only .hw-layers,.hw-map-only .hw-panel{display:none!important}
.hw-map-only .hw-body{display:block;height:100%;min-height:0}
.hw-map-only .hw-mapstage{position:fixed;inset:0;width:100%;height:100dvh}
.hw-map-only .hw-mapstage>:not(canvas):not(.hw-map-exit){display:none!important}
.hw-map-only #hw-map{width:100%;height:100%}
.hw-map-exit{position:absolute;z-index:20;right:14px;top:14px;opacity:0;transition:opacity .15s;background:#152b40d9;pointer-events:auto}
.hw-mapstage:hover>.hw-map-exit,.hw-map-exit:focus-visible{opacity:1}
.hw-results-dialog{width:min(1120px,calc(100vw - 64px));max-width:1120px;max-height:92dvh;border-color:#4c6585;background:#14263f}
.hw-result-winner{font-size:1.8rem;font-weight:700;border-left:5px solid var(--winner);padding-left:1rem;margin:.8rem 0}
.hw-result-scroll{overflow:auto;margin:1rem 0;max-height:52vh}
.hw-result-first{background:#ffdb6630}
.hw-results-dialog .hw-dialog-heading{padding:25px 32px 14px;border-bottom:1px solid #344a64}
.hw-results-dialog .hw-dialog-heading .hw-eyebrow{font-size:10px;letter-spacing:.16em;margin-bottom:7px;color:#98afc8}
.hw-results-dialog .hw-dialog-heading h2{font-size:20px;margin:0;font-weight:600}
#hw-results-content{padding:24px 32px 18px}
.hw-result-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 24px;background:linear-gradient(110deg,#233954,#1a2e48);border:1px solid #425a77;border-radius:12px}
.hw-result-verdict{font-size:11px;color:#e6c47c;letter-spacing:.12em}
.hw-results-dialog .hw-result-winner{display:flex;align-items:center;gap:14px;font-size:30px;line-height:1.3;margin:8px 0;border:0;padding:0;font-weight:650;color:#f4f7fc}
.hw-result-winner span{font-size:12px;padding:4px 10px;border:1px solid #b99b5d;border-radius:5px;color:#ffdc90;font-weight:500}
.hw-result-hero p{margin:0;color:#bacbe0;font-size:13px;line-height:1.6}
.hw-result-clock{text-align:right;white-space:nowrap;border-left:1px solid #45607e;padding-left:30px}
.hw-result-clock small{display:block;color:#9fb4cc;font-size:11px;margin-bottom:7px}
.hw-result-clock strong{font-variant-numeric:tabular-nums;font-size:24px;font-weight:500;color:#f2f6fb}
.hw-result-meta{display:flex;gap:9px 20px;flex-wrap:wrap;padding:13px 2px 19px;font-size:11px;color:#9db1ca}
.hw-result-meta span{overflow-wrap:anywhere}.hw-result-debug{color:#e0bb71}
.hw-result-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:25px}
.hw-result-metrics article{background:#1b304b;border:1px solid #334c69;border-radius:9px;padding:14px 18px}
.hw-result-metrics small{font-size:11px;color:#aabed5;display:block;margin-bottom:9px}
.hw-result-metrics strong{font-size:25px;font-weight:550;font-variant-numeric:tabular-nums;color:#edf4fd}
.hw-result-metrics em{font-style:normal;font-size:10px;color:#9fb4cc;font-weight:400;margin-left:7px}
.hw-result-table-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
.hw-result-table-heading h3{font-size:14px;font-weight:550;margin:0}
.hw-result-tabs{display:flex;gap:3px;padding:3px;background:#0f2037;border:1px solid #304762;border-radius:7px}
.hw-result-tabs button{border:0;background:transparent;color:#9db2cc;font-size:11px;padding:7px 12px;min-height:0;border-radius:4px}
.hw-result-tabs button[aria-selected="true"]{background:#314b6b;color:#f0f6ff}
.hw-result-tabs button:focus-visible{outline:2px solid #e0be70;outline-offset:2px}
.hw-result-comparison [hidden]{display:none!important}
.hw-result-scroll{margin:0;border:1px solid #344c69;border-radius:9px;max-height:35vh;overflow:auto}
.hw-result-table{width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.5}
.hw-result-table th,.hw-result-table td{padding:11px 15px;text-align:right;border-bottom:1px solid #2c435e;font-weight:400}
.hw-result-table thead th{color:#9eb4ce;font-size:10px;background:#192d47;position:sticky;top:0;z-index:1}
.hw-result-table th:first-child{text-align:left}.hw-result-table tbody tr:last-child>*{border-bottom:0}
.hw-result-table tbody tr:nth-child(even){background:#172c46}.hw-result-table tbody tr.hw-result-first{background:#263b51}
.hw-result-table tbody tr:hover{background:#2b425e}
.hw-result-faction{display:flex;align-items:center;gap:8px;color:#e2ebf7}.hw-result-faction i{width:7px;height:7px;border-radius:50%;flex:none}
.hw-result-faction b{font-size:9px;line-height:1;padding:4px 5px;background:#d8b66b20;color:#e9c882;border-radius:3px;font-weight:500}
.hw-result-footnote{font-size:10px;line-height:1.7;color:#8fa7c2;margin:13px 0 0}
.hw-results-dialog .hw-dialog-footer{padding:16px 32px;border-top:1px solid #344a64;background:#112238;gap:9px;display:flex;flex-wrap:wrap;position:sticky;bottom:0;z-index:3}
.hw-results-dialog .hw-dialog-footer button{font-size:12px;padding:9px 15px;min-height:36px;border-radius:6px}
#hw-results-map{margin-right:auto;background:transparent;border-color:#425d7c;color:#c1d1e5}
#hw-results-continue{background:transparent;border-color:#425d7c;color:#c1d1e5}
.hw-sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media(max-width:850px){.hw-results-dialog{width:calc(100vw - 28px)}#hw-results-content{padding:18px}.hw-results-dialog .hw-dialog-heading,.hw-results-dialog .hw-dialog-footer{padding:18px}.hw-result-table-heading{align-items:flex-start;flex-direction:column}.hw-result-metrics{gap:7px}.hw-result-metrics article{padding:12px}.hw-result-hero{padding:18px}.hw-result-clock{padding-left:16px}}
.hw-agent-buttons{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0}
.hw-agent-file{display:grid;gap:.4rem;border:1px solid #6584a8;border-radius:6px;padding:.5rem}
#hw-agent-status{overflow-wrap:anywhere;color:#ffe69b}

  /* Campaign actions use hierarchy and functional color, rather than a wall
     of identical full-width buttons. Everything stays inside a single scroll. */
  .hw-campaign {
    width: min(620px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    border: 1px solid #49617c;
    border-radius: 16px;
    background: #14263d;
    overflow: auto;
  }
  .hw-campaign-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 26px 28px 22px; border-bottom: 1px solid #ffffff0d;
    background: linear-gradient(120deg, #203653, #14263d);
  }
  .hw-campaign-head .hw-eyebrow {font-size: 10px; letter-spacing: .18em; color: #edc77d}
  .hw-campaign-head h2 {margin: 10px 0 4px; font-size: 26px; font-weight: 600; letter-spacing: .02em}
  .hw-campaign-head p {margin: 0; font-size: 13px; color: #aabacf; line-height: 1.6}
  .hw-campaign-head .hw-campaign-x {
    display: grid; place-items: center; width: 30px; height: 30px; min-height: 0;
    padding: 0; background: #ffffff08; border: 1px solid #ffffff12;
    border-radius: 50%; font-size: 21px; color: #9dafc7;
  }
  .hw-campaign-main {display: grid; gap: 22px; padding: 22px 28px 24px}
  .hw-campaign-main section {min-width: 0}
  .hw-campaign-main h3 {margin: 0 0 10px; font-size: 12px; font-weight: 500; color: #8fa3bc; letter-spacing: .08em}
  .hw-campaign-grid {display: grid; grid-template-columns: 1fr 1fr; gap: 10px}
  .hw-campaign .hw-campaign-action {
    display: flex; align-items: center; gap: 12px; text-align: left;
    min-width: 0; min-height: 72px; padding: 13px 15px;
    background: #21374e; border: 1px solid #425c74; border-radius: 10px;
    color: #edf3fb; transition: border-color .15s, background .15s;
  }
  .hw-campaign-action:hover {border-color: #7894b0; background: #29435e}
  .hw-campaign-action strong {display: block; font-size: 15px; font-weight: 500; line-height: 1.5}
  .hw-campaign-action small {display: block; margin-top: 3px; font-size: 11px; color: #97abc2; line-height: 1.5}
  .hw-campaign-icon {
    flex: 0 0 31px; display: grid; place-items: center; width: 31px; height: 33px;
    border-radius: 8px; background: #83b7da16; color: #9bcbe5; font-size: 22px;
  }
  .hw-campaign #hw-new {border-color: #8b734a; background: #5b4b302e}
  #hw-new .hw-campaign-icon {color: #f1cd87; background: #e7ba6a18}
  .hw-campaign #hw-agent-settings .hw-campaign-icon {color: #a9dccb; background: #8bcbb71a}
  .hw-campaign-save {margin-top: 10px; padding: 13px 15px; background: #0e2033; border: 1px solid #ffffff0b; border-radius: 10px}
  .hw-campaign-save-title {display: flex; align-items: center; gap: 7px}
  .hw-campaign-save-title i {width: 6px; height: 6px; border-radius: 50%; background: #89c6ae}
  .hw-campaign-save-title strong {font-size: 12px; font-weight: 500; color: #bbd5cc}
  .hw-campaign #hw-save-place {padding: 0; margin: 7px 0 9px; font-size: 12px; color: #92a8c0; line-height: 1.65}
  .hw-campaign summary {cursor: pointer; color: #9db7d1; font-size: 12px; line-height: 1.8}
  .hw-campaign-save-options {display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px}
  .hw-campaign-save-options button {padding: 6px 9px; min-height: 30px; font-size: 11px; background: #1d3349; border-color: #36516b; border-radius: 6px}
  .hw-campaign-utilities {display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px}
  .hw-campaign-utilities button, .hw-campaign-utilities a {
    display: flex; justify-content: center; align-items: center; min-height: 35px;
    padding: 7px 5px; border: 1px solid #314962; border-radius: 7px; background: #1b3047;
    color: #b4c7dc; font-size: 12px; text-decoration: none;
  }
  .hw-campaign-utilities button:disabled {opacity: .38}
  .hw-campaign-developer {margin-top: 10px}
  .hw-campaign-developer a {display: inline-block; margin-top: 5px; font-size: 12px; color: #9bbbd5}
  .hw-campaign-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    position: sticky; bottom: 0; padding: 15px 28px; border-top: 1px solid #ffffff0d; background: #112238;
  }
  .hw-campaign-foot a {font-size: 12px; color: #8da3bd; text-decoration: none}
  .hw-campaign-foot .hw-primary {min-width: 112px; padding: 9px 18px; border-radius: 8px; font-size: 14px}

  /* In-game AI assignment: one imported-file choice per faction, no modal. */
  .hw-panel-tabs {grid-template-columns: repeat(5,1fr)}
  .hw-panel-tabs [data-tab="agents"] {color: #a8d5c3}
  .hw-observer-tabs [data-observer-view="agents"] {flex-basis: 100%; color: #a8d5c3; background: #83bca312; border-color: #83bca32b}
  .hw-ai-panel {padding: 3px 0 14px}
  .hw-ai-heading > span {font-size: 9px; letter-spacing: .16em; color: #92bda9}
  .hw-ai-heading h2 {margin: 7px 0 6px; font-size: 21px; font-weight: 500; color: #ecf3fb}
  .hw-ai-heading p {margin: 0; font-size: 12px; color: #9fb3c9; line-height: 1.7}
  .hw-ai-import {display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 18px 0 14px}
  .hw-ai-import-button {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    padding: 8px 12px; border: 1px solid #6b9c8c; border-radius: 7px;
    background: #81c5ad16; color: #c3e8da; font-size: 13px;
  }
  .hw-ai-import-button b {font-size: 17px; font-weight: 400}
  .hw-ai-import-button[aria-disabled="true"] {opacity: .45; pointer-events: none}
  .hw-ai-import small {font-size: 10px; color: #7f99b3}
  .hw-ai-totals {display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 11px; margin-bottom: 4px; border-bottom: 1px solid #ffffff0d}
  .hw-ai-totals span {font-size: 10px; color: #8ea9c2}
  .hw-ai-roster {display: grid; gap: 8px; margin-top: 12px}
  .hw-ai-row {min-width: 0; padding: 12px; border: 1px solid #405872; border-radius: 9px; background: #20364e}
  .hw-ai-identity {display: flex; align-items: center; gap: 9px; margin-bottom: 9px}
  .hw-ai-identity > i {width: 8px; height: 25px; border-radius: 3px; flex: 0 0 8px}
  .hw-ai-identity strong {display: block; font-size: 14px; font-weight: 500; color: #e5eef8}
  .hw-ai-identity small {display: block; margin-top: 2px; font-size: 10px; color: #94aac1}
  .hw-ai-choice {display: block; min-width: 0}
  .hw-ai-row .hw-ai-choice select {
    width: 100%; min-width: 0; height: 34px; padding: 6px 9px; border-radius: 6px;
    border: 1px solid #4c6781; background: #13283d; color: #dce9f5; font-size: 12px;
  }
  .hw-ai-row .hw-ai-choice select:focus-visible {outline: 2px solid #91c7b0; outline-offset: 2px}
  .hw-ai-row .hw-ai-choice select:disabled {opacity: .5}
  .hw-ai-profile {margin: 7px 0 0; font-size: 10px; color: #a5cfbb}
  .hw-ai-help,.hw-ai-status {font-size: 11px; line-height: 1.8; color: #93abc2; margin: 13px 0 0}
  .hw-ai-status {color: #d4c191; overflow-wrap: anywhere}
  .hw-ai-notice {padding: 9px 11px; border-radius: 7px; background: #c7a25b13; border: 1px solid #b4935738; font-size: 11px; color: #dac79e; line-height: 1.7}
  .hw-ai-files {margin-top: 16px; padding-top: 12px; border-top: 1px solid #ffffff0d}
  .hw-ai-files summary {font-size: 11px; color: #93aec7; cursor: pointer}
  .hw-ai-files > div {padding-top: 10px}
  .hw-ai-files strong {display: block; font-size: 11px; font-weight: 400; color: #c2d3e3; overflow-wrap: anywhere}
  .hw-ai-files small,.hw-ai-files p {display: block; margin: 3px 0 0; font-size: 10px; color: #819db8}
  .hw-ai-sr {position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap}
  @media(max-width: 700px) {
    .hw-campaign {width: calc(100vw - 28px); max-height: calc(100dvh - 28px)}
    .hw-campaign-head {padding: 20px}
    .hw-campaign-main {padding: 18px 20px 20px; gap: 18px}
    .hw-campaign-foot {padding: 13px 20px}
    .hw-campaign .hw-campaign-action {gap: 8px; padding: 11px 10px}
    .hw-campaign-action strong {font-size: 13px}
    .hw-campaign-action small {font-size: 10px}
    .hw-campaign-utilities {grid-template-columns: repeat(2,1fr)}
  }
.hw-ai-desktop{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}.hw-ai-desktop button{font-size:12px;padding:8px 12px;min-height:36px}.hw-ai-desktop small{flex-basis:100%;color:var(--hw-muted,#9fb2ca);font-size:12px}
