@media (max-width: 700px) {
:root {
  --bg: #07090c;
  --panel: #0c1016;
  --panel-2: #10161e;
  --fg: #d6e2ee;
  --muted: #7d8b99;
  --dim: #5b6774;
  --line: #1c2530;
  --line-2: #2a3542;
  --ok: #3dffb0;
  --ok-dim: rgba(61, 255, 176, 0.14);
  --warn: #ffb020;
  --lock: #7aa2ff;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

body.home {
  min-height: 100svh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.universe {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #020308 url("/assets/universe.jpg?v=2") center / cover no-repeat;
}
.universe::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(7, 9, 12, 0.66) 0%, rgba(7, 9, 12, 0.88) 100%);
}

a { color: inherit; text-decoration: none; }

.grid-bg, .scan { display: none; }

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
  margin: 0 auto 0.9rem;
  text-align: center;
  width: 100%;
}
.masthead img {
  height: 52px;
  width: auto;
  display: block;
}

.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: max(0.7rem, env(safe-area-inset-top)) 0.7rem calc(1.2rem + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  border: 1px solid var(--line);
  background: rgba(12, 16, 22, 0.92);
  backdrop-filter: blur(10px);
  padding: 0.75rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}

.tagline {
  font-family: var(--mono);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #d6e2ee;
  line-height: 1.1;
  white-space: normal;
}

.status {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  display: inline-block;
}

.btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  padding: 0.7rem 0.7rem;
  min-height: 44px;
  color: var(--fg);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn.lock { color: var(--lock); border-color: #2c3d63; }
button.btn { cursor: pointer; width: auto; }

.layout {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-top: 0;
  background: rgba(12, 16, 22, 0.92);
  backdrop-filter: blur(10px);
}

.meta {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.85rem 0.95rem;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.meta h2 {
  margin: 0 0 0.65rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.kv { display: grid; gap: 0.4rem; }
.kv div {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 0.3rem;
}
.kv dt { color: var(--dim); }
.kv dd { margin: 0; color: var(--fg); text-align: right; word-break: break-all; }

.main { padding: 1rem 0.85rem 1.2rem; }

.prompt {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt span { color: var(--ok); }

h1 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 0.7rem;
}

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.slots {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.72rem;
}
table.slots .col-name { width: 46%; }
table.slots .col-status { width: 22%; }
table.slots .col-path { width: 32%; }
table.slots td,
table.slots th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.slots th {
  text-align: left;
  color: var(--dim);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.6rem;
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid var(--line);
}
table.slots td {
  padding: 0.8rem 0.35rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.pill {
  display: inline-block;
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--line-2);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill.stub { color: var(--warn); border-color: rgba(255, 176, 32, 0.4); }
.pill.auth { color: var(--lock); border-color: #2c3d63; }
.pill.ok { color: var(--ok); border-color: rgba(61, 255, 176, 0.4); background: var(--ok-dim); }

.path { color: var(--ok); }
.note { color: var(--muted); white-space: normal; }

.list-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ok);
  margin: 1.1rem 0 0.5rem;
}
.list-title:first-child { margin-top: 0; }

.flash {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--warn);
  margin: 0 0 0.9rem;
}

form.login {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  width: 100%;
}
form.login .btn { width: 100%; }

input[type="text"],
input[type="password"],
input[name="user"],
input[name="name"],
input[name="pass"] {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--fg);
  background: #05070a;
  border: 1px solid var(--line-2);
  padding: 0.7rem 0.6rem;
  min-height: 44px;
  width: 100%;
}

.stack { display: grid; gap: 0.7rem; max-width: none; }
.row { display: grid; gap: 0.45rem; }
.row input { width: 100%; min-width: 0; }

.checks {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}
.checks legend {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.checks label {
  font-family: var(--mono);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.guest-card {
  border: 1px solid var(--line);
  padding: 0.8rem 0.75rem 1rem;
  margin-bottom: 0.7rem;
}
.guest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  font-family: var(--mono);
}

.page {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 0;
  padding: 1rem 0.8rem 2.5rem;
}
.page .panel {
  border: 1px solid var(--line);
  background: rgba(12, 16, 22, 0.92);
  padding: 1rem 0.9rem 1.2rem;
}
.back { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
}
