:root {
  color-scheme: dark;
  --ink: #f6ecd7;
  --muted: #b7c4c6;
  --gold: #e8c786;
  --green: #b9cf9c;
  --line: #aab8b535;
  --panel: #23343d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #172730;
  color: var(--ink);
  font:
    15px/1.5 system-ui,
    -apple-system,
    sans-serif;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  background: #304650;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 15px;
  min-height: 44px;
  transition: background 0.15s;
}
button:hover {
  background: #405861;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button,
a,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button.primary {
  background: var(--gold);
  color: #25333b;
  border-color: #f7dfa9;
  font-weight: 750;
}
header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 22px 32px 12px;
  max-width: 1440px;
  margin: auto;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.brand small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.2em;
}
.crest {
  background: var(--gold);
  color: #203027;
  padding: 10px 8px;
  border-radius: 5px 5px 14px 14px;
  font-size: 16px;
}
.power {
  text-align: center;
  padding: 8px 25px;
  background: #34474b;
  border-color: #d7bf7770;
  border-radius: 6px 6px 20px 20px;
}
.power span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.17em;
  color: var(--gold);
}
.power strong {
  display: block;
  font-size: 29px;
  line-height: 1.2;
  color: #f8e6b7;
  font-variant-numeric: tabular-nums;
}
.account {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
}
.account button {
  display: block;
  margin: 5px 0 0 auto;
  min-height: 28px;
  padding: 1px 8px;
  font-size: 11px;
}
.resourcebar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  padding: 10px 16px 17px;
  color: var(--gold);
  font-size: 19px;
}
.resourcebar span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.resourcebar small {
  font-size: 9px;
  color: var(--muted);
}
.resourcebar b {
  font-size: 16px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
#connection {
  font-size: 10px;
  color: var(--green);
}
main {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px 32px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
}
.scene-shell {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #283e47;
  position: relative;
  align-self: start;
}
.scene-heading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 24px;
  background: linear-gradient(#183039d9, transparent);
  pointer-events: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 700;
}
h1 {
  font-size: 25px;
  line-height: 1.2;
  margin: 7px 0;
}
h2 {
  font-size: 23px;
  line-height: 1.3;
  margin: 8px 0 12px;
}
h3 {
  font-size: 16px;
  margin: 0;
}
.map-tag {
  font-size: 9px;
  color: #d8e3bd;
  padding: 6px 10px;
  border: 1px solid #aebe9860;
  background: #24373aaa;
  border-radius: 30px;
  letter-spacing: 0.08em;
}
.scene-caption {
  padding: 14px 22px;
  font-size: 12px;
  color: var(--muted);
  background: #193039;
  border-top: 1px solid var(--line);
}
aside {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #213841;
  padding: 22px;
  align-self: start;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}
.metric {
  padding: 12px;
  background: #10212a77;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}
.metric b {
  font-size: 23px;
  color: var(--gold);
  font-weight: 650;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.row b {
  text-align: right;
}
.full {
  width: 100%;
  margin-top: 10px;
}
.status {
  display: inline-block;
  font-size: 11px;
  color: var(--green);
  padding: 4px 8px;
  background: #a9c38b15;
  border: 1px solid #a9c38b40;
  border-radius: 5px;
}
.status.warning {
  color: #efc780;
  border-color: #efc78066;
}
.progress {
  height: 7px;
  background: #09191f;
  border-radius: 8px;
  overflow: hidden;
  margin: 13px 0;
}
progress.progress {
  display: block;
  width: 100%;
  border: 0;
  appearance: none;
}
progress.progress::-webkit-progress-bar {
  background: #09191f;
  border-radius: 8px;
}
progress.progress::-webkit-progress-value {
  background: var(--gold);
  border-radius: 8px;
}
progress.progress::-moz-progress-bar {
  background: var(--gold);
}
.card {
  padding: 15px;
  background: #10212a66;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 10px 0;
}
.card button {
  margin-top: 9px;
}
.card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.list-content {
  padding: 110px 25px 25px;
  min-height: 450px;
}
.list-content .card {
  max-width: 650px;
}
.auth {
  max-width: 560px;
  margin: 45px auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #29414a, #142b35);
}
.auth h1 {
  font-size: 42px;
  margin: 15px 0;
}
.auth p {
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
  margin: 16px 0;
  color: var(--muted);
}
input {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #10212a;
  color: var(--ink);
  margin-top: 5px;
}
.auth-actions {
  display: flex;
  gap: 10px;
}
.error {
  color: #edac8b !important;
}
.auth > small {
  color: var(--muted);
  font-size: 10px;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
}
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: transparent;
}
.bottom-nav svg {
  fill: none;
  stroke: currentColor;
}
#reportCount {
  font-size: 10px;
  color: var(--gold);
}
#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  padding: 14px 20px;
  background: var(--gold);
  color: #15231a;
  max-width: calc(100% - 30px);
  border-radius: 10px;
  box-shadow: 0 5px 30px #0006;
  font-size: 13px;
}
dialog {
  max-width: 460px;
  width: calc(100% - 30px);
  background: #1d333e;
  color: var(--ink);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
dialog::backdrop {
  background: #061019cb;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 680px) {
  header {
    padding: 14px 12px 8px;
    gap: 7px;
  }
  .brand > span:last-child {
    display: none;
  }
  .power {
    padding: 8px 15px;
  }
  .power span {
    font-size: 8px;
  }
  .power strong {
    font-size: 25px;
  }
  .account {
    font-size: 9px;
  }
  .resourcebar small {
    display: none;
  }
  .resourcebar b {
    font-size: 14px;
  }
  .workspace {
    display: block;
  }
  .scene-heading {
    padding: 14px;
  }
  .scene-heading h1 {
    font-size: 20px;
  }
  .map-tag {
    display: none;
  }
  .auth {
    margin: 24px 14px;
    padding: 24px;
  }
  .auth h1 {
    font-size: 34px;
  }
  .list-content {
    padding: 95px 15px 20px;
    min-height: 300px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
