:root {
  color-scheme: dark;
  --bg: #090f16;
  --panel: #111b25;
  --line: #2b3843;
  --muted: #a2b0ba;
  --text: #eff3f5;
  --accent: #e6ad71;
  --cool: #83d8c9;
  font:
    16px/1.45 'Barlow',
    'Segoe UI',
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 95% -20%, #263b47, transparent 45%), var(--bg);
}
button,
input,
select {
  font: inherit;
}
a {
  color: var(--cool);
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
[hidden] {
  display: none !important;
}
header {
  border-bottom: 1px solid var(--line);
  background: #0b141de6;
}
.bar,
main {
  max-width: 1140px;
  margin: auto;
  padding: 0 32px;
}
.bar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand b {
  color: var(--accent);
}
.insignia {
  display: grid;
  place-items: center;
  width: 32px;
  height: 28px;
  background: var(--accent);
  color: #1c1815;
  font: bold italic 20px/1 monospace;
  clip-path: polygon(16% 0, 100% 0, 84% 100%, 0 100%);
}
.bar-actions,
.row,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bar-actions {
  justify-content: end;
}
.bar-actions span {
  color: var(--muted);
  font-size: 0.85rem;
}
.mast {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin: 36px 0 20px;
}
.kicker,
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font:
    600 0.72rem/1.4 'IBM Plex Mono',
    monospace;
  margin: 0 0 6px;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  margin: 0;
}
h2,
h3 {
  letter-spacing: -0.025em;
  margin: 0;
}
h2 {
  font-size: 1.35rem;
}
h3 {
  font-size: 1.04rem;
}
p {
  margin: 0.5rem 0;
}
.signal {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.signal:before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cool);
}
.signal.offline:before {
  background: #ec876e;
}
nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  margin-bottom: 22px;
}
nav button {
  border: 0;
  background: transparent !important;
  border-radius: 0;
  color: var(--muted);
  white-space: nowrap;
  padding: 12px 16px;
}
nav button[aria-current='page'] {
  color: var(--accent);
  box-shadow: inset 0 -2px var(--accent);
}
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  background: #26343f;
  color: var(--text);
  border: 1px solid #42525f;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 40px;
}
button:hover,
.btn:hover {
  filter: brightness(1.15);
}
button.primary {
  background: var(--accent);
  color: #221a10;
  border-color: var(--accent);
}
button.subtle {
  background: transparent;
  border-color: var(--line);
  min-height: 34px;
  padding: 5px 10px;
  font-size: 0.8rem;
}
.danger {
  color: #ffb29c;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.stack {
  display: grid;
  gap: 16px;
}
.card {
  padding: 22px;
  background: linear-gradient(150deg, #15212b, #101922);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 0;
}
.card h2,
.card h3 {
  margin-bottom: 12px;
}
.scene {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 80%, #31404a, transparent 58%),
    linear-gradient(130deg, #18252d, #101b25 55%, #223542);
  padding: 26px 24px;
  border-top: 2px solid var(--accent);
}
.scene:after {
  content: '';
  position: absolute;
  right: -85px;
  top: -100px;
  border: 1px solid #9db8c31d;
  border-radius: 50%;
  width: 260px;
  height: 260px;
  box-shadow:
    0 0 0 22px #a3d8df07,
    0 0 0 45px #a3d8df08;
  pointer-events: none;
}
.scene > * {
  position: relative;
  z-index: 1;
}
.scene h2 {
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.1;
  max-width: 85%;
}
.muted,
small,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 0.85rem;
  margin: 0.4rem 0 1rem;
}
.actions {
  margin-top: 14px;
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
}
.fields > label,
.field {
  display: grid;
  gap: 5px;
  font-size: 0.88rem;
  color: #c8d4da;
}
.wide {
  grid-column: 1/-1;
}
input,
select {
  width: 100%;
  min-width: 0;
  min-height: 41px;
  border: 1px solid #42515e;
  border-radius: 4px;
  padding: 8px 10px;
  background: #0c151d;
  color: var(--text);
}
input[type='checkbox'] {
  width: 1.15em;
  min-height: auto;
  height: 1.15em;
  accent-color: var(--accent);
}
.toggle {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
}
input[readonly] {
  color: var(--cool);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 3px;
}
progress {
  display: block;
  width: 100%;
  height: 7px;
  border: 0;
  appearance: none;
  background: #27333e;
  border-radius: 5px;
  margin: 0.6rem 0;
}
progress::-webkit-progress-bar {
  background: #27333e;
  border-radius: 5px;
}
progress::-webkit-progress-value {
  background: var(--cool);
  border-radius: 5px;
}
progress::-moz-progress-bar {
  background: var(--cool);
}
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow-wrap: anywhere;
}
.list li:last-child {
  border: 0;
}
.pill {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--cool);
  font: 0.78rem/1.5 monospace;
}
.compact {
  font-size: 0.87rem;
}
.auth {
  max-width: 440px;
  margin: 11vh auto;
}
.auth h1 {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
}
.auth label {
  margin: 14px 0;
}
#feedback {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: #193329;
  border: 1px solid #4e7865;
  border-radius: 6px;
  box-shadow: 0 8px 35px #0009;
  max-width: min(92vw, 650px);
  z-index: 10;
}
#feedback.error {
  background: #40201f;
  border-color: #a85e51;
}
main {
  padding-bottom: 48px;
}
.metric {
  font: 600 1.8rem/1 monospace;
  color: var(--cool);
}
.readout {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.readout span {
  display: grid;
  gap: 3px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.split h2 {
  margin: 0;
}
.urlrow {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0 15px;
}
.urlrow input {
  flex: 1;
}
.compact li > span {
  min-width: 0;
}
#panel {
  min-height: 300px;
}
@media (max-width: 740px) {
  .bar,
  main {
    padding-inline: 15px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .mast {
    margin-top: 25px;
  }
  .card {
    padding: 17px;
  }
  nav button {
    padding: 10px 12px;
  }
  .bar {
    min-height: 58px;
  }
  .bar-actions {
    gap: 5px;
  }
  .bar-actions span {
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .signal {
    font-size: 0.72rem;
  }
}
@media (max-width: 430px) {
  .fields {
    grid-template-columns: 1fr;
  }
  .mast {
    align-items: start;
    flex-direction: column;
  }
  .bar-actions span {
    display: none;
  }
}
.scene .scene-actor {
  position: absolute;
  z-index: 0;
  right: 4%;
  top: 4%;
  width: 27%;
  height: 65%;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.94;
  filter: drop-shadow(2px 9px 12px #000b);
}
.scene h2 {
  max-width: 70%;
}
.scene > p,
.scene > .row,
.scene > progress {
  max-width: 73%;
}
.scene .actions {
  padding-top: 4px;
}
.pet-image {
  float: right;
  max-width: 30%;
  height: 100px;
  object-fit: contain;
}
@media (max-width: 440px) {
  .scene .scene-actor {
    right: 1%;
    width: 25%;
  }
  .scene h2 {
    max-width: 75%;
  }
}
.presets {
  margin: 0 0 15px;
}
.chat-commands {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.chat-commands summary {
  cursor: pointer;
  color: var(--cool);
  font-size: 0.9rem;
}
.chat-commands code {
  color: var(--accent);
  font-size: 0.86rem;
  white-space: nowrap;
}
.chat-commands li {
  flex-wrap: wrap;
  align-items: baseline;
}
.chat-commands li span {
  color: var(--muted);
}
