:root {
  --panel-2: rgba(8, 25, 14, 0.98);
  --edge: rgba(120, 255, 160, 0.16);
  --text: #d8ffe1;
  --muted: #8fb89a;
  --accent: #79ffa6;
  --accent-2: #57d7ff;
  --warn: #ffe36f;
  --error: #ff8c8c;
  --radius: 18px;
  --shadow: 0 0 0 1px rgba(120, 255, 160, 0.12), 0 28px 90px rgba(0, 0, 0, 0.48);
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 4px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-family: var(--mono);
  background:
    radial-gradient(circle at top, rgba(87, 215, 255, 0.08), transparent 24%),
    radial-gradient(circle at bottom right, rgba(121, 255, 166, 0.08), transparent 30%),
    linear-gradient(180deg, #081108 0%, #030504 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 4px;
  opacity: 0.24;
}

body::after {
  background: radial-gradient(circle at center, transparent 55%, rgba(0, 0, 0, 0.34) 100%);
}

.shell {
  width: min(1240px, 100%);
  height: calc(100dvh - 56px);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(6, 14, 8, 0.99), rgba(3, 8, 5, 0.99));
  box-shadow: var(--shadow);
}

.shell__chrome,
.shell__menubar,
.shell__statusline,
.pane__titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.shell__chrome,
.shell__menubar,
.shell__statusline {
  padding: 7px 12px;
}

.shell__chrome {
  border-bottom: 1px solid var(--edge);
  background: rgba(10, 22, 14, 0.98);
}

.shell__traffic {
  display: flex;
  gap: 8px;
}

.shell__dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}

.shell__dot--red { background: #ff6868; }
.shell__dot--amber { background: #ffd76a; }
.shell__dot--green { background: #7dff9d; }

.shell__window-title,
.shell__window-meta,
.shell__menubar,
.shell__statusline,
.pane__title,
.pane__meta,
.pet-shell__tag,
.pet-shell__commands-title,
.terminal__help {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.shell__window-meta,
.shell__menubar,
.pane__meta,
.terminal__help,
.pet-shell__lede,
.pet-shell__caption,
.pet-shell__commands li,
.pet-shell__stats dt {
  color: var(--muted);
}

.shell__menubar,
.shell__statusline {
  background: rgba(7, 17, 10, 0.96);
}

.shell__menubar {
  border-bottom: 1px solid rgba(120, 255, 160, 0.08);
}

.shell__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, 0.7fr);
  min-height: 0;
  overflow: hidden;
}

.pane {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.pane--primary {
  border-right: 1px solid var(--edge);
}

.pane__titlebar {
  padding: 7px 12px;
  border-bottom: 1px solid rgba(120, 255, 160, 0.08);
  background: rgba(7, 18, 11, 0.98);
}

.terminal,
.pet-shell {
  min-height: 0;
  padding: 9px;
}

.terminal {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 7px;
  background: linear-gradient(180deg, rgba(4, 11, 7, 0.98), rgba(7, 18, 11, 0.98));
}

.terminal__banner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
  padding: 7px 9px;
  border: 1px solid rgba(120, 255, 160, 0.1);
  border-radius: var(--radius);
  background: rgba(120, 255, 160, 0.03);
}

.terminal__banner-art,
.pet-shell__art {
  margin: 0;
  line-height: 1.12;
}

.terminal__banner-art {
  color: var(--accent);
  font-size: clamp(0.58rem, 0.95vw, 0.78rem);
}

.terminal__banner p,
.pet-shell__lede,
.pet-shell__caption,
.pet-shell__commands ul,
.pet-shell__stats dd {
  margin: 0;
}

.terminal__log {
  list-style: none;
  margin: 0;
  padding: 9px;
  overflow: auto;
  border: 1px solid rgba(120, 255, 160, 0.1);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
  display: grid;
  align-content: start;
  gap: 5px;
}

.terminal__line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
  font-size: 0.82rem;
  line-height: 1.35;
}

.terminal__stamp {
  color: rgba(143, 184, 154, 0.68);
  white-space: nowrap;
}

.terminal__line[data-type="boot"] .terminal__body,
.terminal__line[data-type="system"] .terminal__body {
  color: var(--muted);
}

.terminal__line[data-type="command"] .terminal__body {
  color: var(--accent-2);
}

.terminal__line[data-type="response"] .terminal__body {
  color: var(--text);
}

.terminal__line[data-type="error"] .terminal__body {
  color: var(--error);
}

.terminal__prompt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(120, 255, 160, 0.12);
  border-radius: var(--radius);
  background: rgba(120, 255, 160, 0.04);
}

.terminal__prompt-prefix {
  color: var(--accent);
  white-space: nowrap;
}

.terminal__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  caret-color: var(--accent);
}

input::placeholder {
  color: rgba(216, 255, 225, 0.28);
}

.terminal__cursor {
  display: none;
}

.terminal__prompt:focus-within {
  border-color: rgba(121, 255, 166, 0.34);
  box-shadow: 0 0 0 1px rgba(121, 255, 166, 0.14), 0 0 0 4px rgba(121, 255, 166, 0.05);
}

.pet-shell {
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(6, 15, 9, 0.98), rgba(6, 18, 10, 0.98));
}

.pet-shell__tag,
.pet-shell__commands-title {
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid rgba(120, 255, 160, 0.16);
  border-radius: 999px;
  background: rgba(120, 255, 160, 0.05);
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.05;
}

.pet-shell__screen,
.pet-shell__stats,
.pet-shell__commands {
  border: 1px solid rgba(120, 255, 160, 0.1);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.pet-shell__screen {
  padding: 7px 9px;
}

.pet-shell__art {
  min-height: 88px;
  display: grid;
  place-items: center;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(121, 255, 166, 0.24);
  font-size: 0.78rem;
}

.pet-shell__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.pet-shell__stats div {
  padding: 7px 9px;
  border-right: 1px solid rgba(120, 255, 160, 0.08);
  border-bottom: 1px solid rgba(120, 255, 160, 0.08);
}

.pet-shell__stats div:nth-child(2n) {
  border-right: 0;
}

.pet-shell__stats div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.pet-shell__stats dt {
  margin-bottom: 6px;
}

.pet-shell__commands {
  padding: 7px 9px;
}

.pet-shell__commands ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.pet-shell__commands code,
.terminal__body code {
  color: var(--warn);
}

.shell__statusline {
  border-top: 1px solid rgba(120, 255, 160, 0.08);
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (max-width: 980px) {
  .shell__workspace {
    grid-template-columns: 1fr;
  }

  .shell {
    height: auto;
    min-height: calc(100dvh - 56px);
  }

  .pane--primary {
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }

  .terminal__banner {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .shell__chrome,
  .shell__menubar,
  .shell__statusline,
  .pane__titlebar,
  .terminal,
  .pet-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .shell__chrome,
  .shell__menubar,
  .shell__statusline,
  .terminal__prompt {
    flex-direction: column;
    align-items: start;
  }

  .terminal__prompt {
    grid-template-columns: 1fr;
  }

  .terminal__prompt-prefix {
    white-space: normal;
  }

  .pet-shell__stats {
    grid-template-columns: 1fr;
  }

  .pet-shell__stats div {
    border-right: 0;
  }

  .pet-shell__stats div:nth-last-child(-n + 2) {
    border-bottom: 1px solid rgba(120, 255, 160, 0.08);
  }

  .pet-shell__stats div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
