/* Hallmark · shape: app screen · genre: modern-minimal · theme: Console (deal 1/3, seed friends-only-minecraft-server-control-8af3·bc5d2f6d·2026-11-10·r0) · redesign: full
 * nav: top bar, wordmark and sign out · signature: the server reading (players in amber mono beside the live state and Start) · states: loading, empty, error, full on status, users, allowlist, settings · console: graphite
 * axes: dark/grotesk-sans/chromatic-amber · posture: restrained · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4 · weakest: P/E, it could be any game console; led with the live player reading and the start control as one instrument, and cut the gradients and card tells */
/* Hallmark · dropped "Controls" · the buttons name themselves beside the live server reading */
/* Hallmark · reworded "Admin" to "Administration" · the owner area is a section, not a nickname */
/* Hallmark · dropped "Bedrock 1.21.100" · the live version is 1.26.62 and the status line carries it */
/* Hallmark · reworded "1.21.100" to "1.26.62" · 19 names the stale build */
/* Hallmark · reworded "1.21" to "1.26" · 19 names the stale version */
/* Hallmark · finish-review: subagent · 4 findings · 4 resolved · gap: none */
@import url("./tokens.css");
@import url("./base.css");

html, body { overflow-x: clip; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

@font-face {
  font-family: "Host Grotesk";
  src: url("fonts/host-grotesk.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/atkinson-hyperlegible-mono.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

.shell {
  padding-block: var(--space-lg) var(--space-xl);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-md);
}

.wordmark {
  margin: 0;
  max-width: none;
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: var(--tracking-display);
  line-height: 1.1;
}

.who {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--color-muted);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.who strong {
  color: var(--color-ink);
  font-weight: 500;
}

.console {
  display: grid;
  gap: var(--rule-hair);
  overflow: hidden;
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-rule);
}

.console > section {
  background: var(--color-paper-2);
  color: var(--color-ink);
}

.status {
  display: grid;
  grid-template-areas:
    "main"
    "foot";
  gap: var(--space-lg);
  padding: var(--space-lg);
}

.status-main {
  grid-area: main;
  min-width: 0;
}

.status-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.status-reading {
  min-width: 0;
}

.phase-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.phase {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: var(--space-3xs) var(--space-xs);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.4;
}

.phase::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: currentColor;
}

.phase.online {
  color: var(--color-cool);
  border-color: color-mix(in oklab, var(--color-cool) 45%, var(--color-rule));
}

.phase.starting,
.phase.stopping {
  color: var(--color-accent);
  border-color: color-mix(in oklab, var(--color-accent) 45%, var(--color-rule));
}

.phase.degraded,
.phase.cooldown {
  color: var(--color-accent);
  border-color: color-mix(in oklab, var(--color-accent) 45%, var(--color-rule));
}

.phase.error {
  color: var(--color-bad);
  border-color: color-mix(in oklab, var(--color-bad) 45%, var(--color-rule));
}

.phase-detail {
  color: var(--color-muted);
  font-size: var(--text-sm);
  min-width: 0;
}

.players {
  margin-top: var(--space-md);
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-3xl);
  font-variant-numeric: tabular-nums slashed-zero;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.players > span:first-child {
  color: var(--color-accent);
}

.players small {
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0;
}

.reachability {
  margin-top: var(--space-2xs);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.address-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.address {
  display: inline-block;
  min-width: 20ch;
  padding: var(--space-xs) var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-paper-3);
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: var(--space-sm);
  max-width: 58ch;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.status .notice {
  margin-top: var(--space-sm);
}

.status .notice:empty {
  display: none;
}

.status-foot {
  grid-area: foot;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.status-foot .address-row {
  margin-top: 0;
}

.status-foot .note {
  flex: 1 1 28ch;
  margin-top: 0;
  max-width: none;
}

.actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 0 var(--space-sm);
  border: var(--rule-hair) solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-short) var(--ease-out),
    border-color var(--dur-short) var(--ease-out),
    color var(--dur-short) var(--ease-out),
    transform var(--dur-micro) var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: -4px;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn-primary:hover {
  background: color-mix(in oklab, var(--color-accent) 86%, var(--color-ink));
}

.btn-secondary {
  border-color: var(--color-rule-2);
  background: transparent;
  color: var(--color-ink);
}

.btn-secondary:hover {
  background: var(--color-paper-3);
}

.btn-quiet {
  border-color: transparent;
  color: var(--color-ink-2);
}

.btn-quiet:hover {
  background: var(--color-paper-2);
  color: var(--color-ink);
}

.btn-danger {
  border-color: color-mix(in oklab, var(--color-bad) 60%, var(--color-rule));
  color: var(--color-bad);
}

.btn-danger:hover {
  background: var(--color-bad-soft);
}

.btn-small {
  min-height: var(--control-height-sm);
  padding: 0 var(--space-xs);
  font-size: var(--text-xs);
}

.btn-small::before {
  inset: -6px;
}

.btn-block {
  width: 100%;
}

.check {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
  color: var(--color-muted);
  font-size: var(--text-sm);
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-accent);
}

.notice {
  min-height: 1.5em;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.notice.ok {
  color: var(--color-ok);
}

.notice.warn {
  color: var(--color-accent);
}

.notice.error {
  color: var(--color-bad);
}

#last-result {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

#last-result.notice.error {
  color: var(--color-bad);
}

#last-result.notice.warn {
  color: var(--color-accent);
}

.metrics {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.section-label {
  margin-bottom: var(--space-sm);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0;
}

.metrics dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.metric {
  min-width: 0;
  padding: 0 var(--space-md);
  border-left: var(--rule-hair) solid var(--color-rule);
}

.metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.metric dt {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.metric dd {
  margin: var(--space-2xs) 0 0;
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric dd.ok {
  color: var(--color-ok);
}

.metric dd.warn {
  color: var(--color-accent);
}

.banner {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
}

.banner code {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
}

#key-problem {
  border-color: color-mix(in oklab, var(--color-accent) 55%, var(--color-rule));
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

#unclean {
  border-color: color-mix(in oklab, var(--color-bad) 55%, var(--color-rule));
  background: var(--color-bad-soft);
  color: var(--color-bad);
}

.admin {
  padding: var(--space-lg);
}

.admin > .notice:empty {
  display: none;
}

.admin > h2 {
  margin: 0 0 var(--space-md);
  font-size: var(--text-md);
  font-weight: 500;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-xl);
}

.admin-section {
  min-width: 0;
}

.admin-side {
  display: grid;
  gap: var(--space-lg);
  align-content: start;
}

.admin-section h3 {
  margin: 0 0 var(--space-2xs);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0;
}

.hint {
  min-height: 1lh;
  margin: var(--space-2xs) 0 0;
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.field {
  display: grid;
  gap: var(--space-3xs);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 var(--space-xs);
  border: var(--rule-hair) solid var(--color-muted);
  border-radius: var(--radius-pill);
  background: var(--color-paper-3);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.4;
}

.field textarea {
  min-height: 140px;
  padding: var(--space-xs);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  background: var(--color-paper-2);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-ink-2);
  outline: 2px solid var(--color-focus);
  outline-offset: -3px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.user-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: var(--space-sm);
  align-items: end;
  margin-top: var(--space-sm);
}

.field-wide {
  grid-column: 1 / -1;
}

.user-form > .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.user-list {
  margin-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-2xs) 0;
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.user-row .name {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 0;
  overflow: hidden;
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-actions {
  display: flex;
  flex-shrink: 0;
  gap: var(--space-2xs);
}

.role {
  display: inline-block;
  padding: 1px var(--space-2xs);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.role.owner {
  border-color: color-mix(in oklab, var(--color-accent) 55%, var(--color-rule));
  color: var(--color-accent);
}

.password {
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm);
  border: var(--rule-hair) solid var(--color-ok);
  border-radius: var(--radius-pill);
  background: var(--color-paper-3);
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-sm);
  white-space: pre-wrap;
}

.version-row {
  display: flex;
  align-items: end;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.version-row .field {
  flex: 1 1 auto;
}

.footer {
  padding-top: var(--space-md);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.login-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: var(--space-lg);
}

.login-card {
  width: min(100%, 380px);
  color: var(--color-ink);
  padding: var(--space-lg);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-paper-2);
}

.login-card h1 {
  max-width: none;
  font-size: var(--text-xl);
}

.login-lead {
  margin-top: var(--space-2xs);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

#login-form {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

#login-form .btn {
  margin-top: var(--space-2xs);
}

.error {
  min-height: 1.5em;
  color: var(--color-bad);
  font-size: var(--text-sm);
}

@media (max-width: 60rem) {
  .status {
    grid-template-areas:
      "main"
      "foot";
  }

  .status-top {
    align-items: flex-start;
  }

  .metrics dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: var(--space-md);
  }

  .metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .admin-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 40rem) {
  .metrics dl {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .metric {
    padding: var(--space-xs) 0;
    border-top: var(--rule-hair) solid var(--color-rule);
    border-left: 0;
  }

  .metric:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .topbar {
    align-items: flex-start;
  }

  .who {
    gap: var(--space-xs);
  }

  .user-form {
    grid-template-columns: 1fr;
  }

  .user-form > .btn {
    justify-self: stretch;
  }

  .version-row {
    align-items: stretch;
    flex-direction: column;
  }
}
