:root {
  color-scheme: light;
  --sky: #9ed7ff;
  --earth: #61472f;
  --grass: #49a23f;
  --leaf: #2f8e2c;
  --stone: #d7d9d6;
  --stone-2: #889099;
  --wood: #8c5a32;
  --torch: #f3c54b;
  --red: #b43c32;
  --ink: #20252b;
  --muted: #66707d;
  --surface: #f9faf8;
  --panel: #eef0ed;
  --border: #68727d;
  --border-dark: #232a33;
  --shadow: rgba(10, 15, 20, 0.45);
  --night: #0b1b2d;
  --night-panel: rgba(13, 29, 48, 0.88);
  --green-button: #4b9f38;
  --green-dark: #27631f;
}

:root[data-theme="night"] {
  color-scheme: dark;
  --sky: #0b1b2d;
  --earth: #0f1724;
  --grass: #2d6b57;
  --leaf: #6ca46f;
  --stone: #2b3448;
  --stone-2: #465269;
  --wood: #b06f3a;
  --torch: #ffc857;
  --red: #e06759;
  --ink: #f2f5e9;
  --muted: #b7c1b7;
  --surface: #111827;
  --panel: #192235;
  --border: #6d7b91;
  --shadow: #050810;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(246, 250, 252, 0.92) 0 50%, rgba(8, 24, 42, 0.94) 50% 100%),
    linear-gradient(180deg, #9fd8ff 0 150px, #eaf7ff 150px 50%, #0c1a2c 50% 100%);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 50%, rgba(0, 0, 0, 0.14) 50%),
    radial-gradient(circle at 14% 34px, rgba(255, 255, 255, 0.7) 0 5px, transparent 6px),
    radial-gradient(circle at 31% 58px, rgba(255, 255, 255, 0.8) 0 4px, transparent 5px),
    radial-gradient(circle at 69% 38px, rgba(178, 213, 255, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 84% 66px, rgba(178, 213, 255, 0.85) 0 3px, transparent 4px);
  z-index: -1;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px 10px;
  background: transparent;
  border-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand,
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  text-decoration: none;
  font-weight: 800;
  color: var(--ink);
}

.brand-cube {
  width: 52px;
  height: 52px;
  display: inline-block;
  background:
    linear-gradient(180deg, #65b34b 0 34%, #8b5a35 34% 100%),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(0, 0, 0, 0.12) 8px 10px);
  border: 4px solid var(--border-dark);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
  image-rendering: pixelated;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: clamp(1.15rem, 4.5vw, 2.05rem);
  letter-spacing: 0;
}

.brand-copy small {
  font-size: 0.9rem;
}

.nav-link,
.theme-toggle,
.button {
  min-height: 40px;
  border: 3px solid var(--border-dark);
  background: var(--green-button);
  color: #17120b;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.34);
  padding: 8px 12px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.nav-link {
  min-height: auto;
  padding: 8px 10px;
  background: rgba(246, 247, 244, 0.92);
  color: var(--ink);
}

.nav-link.is-active {
  background: var(--green-button);
  color: #fff;
}

.theme-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  min-width: 94px;
  background: rgba(17, 29, 47, 0.9);
  color: #fff;
}

.theme-toggle span {
  padding: 8px 9px;
  font-size: 0;
}

.theme-toggle span:first-child::before {
  content: "☀";
  font-size: 1rem;
}

.theme-toggle span:last-child::before {
  content: "☾";
  font-size: 1rem;
}

:root:not([data-theme="night"]) .theme-toggle span:first-child,
:root[data-theme="night"] .theme-toggle span:last-child {
  background: var(--green-button);
}

.page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 12px 20px 48px;
}

.hero-band,
.admin-head,
.panel,
.content-panel,
.metric,
.flash {
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: 5px 5px 0 var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.hero-band,
.admin-head {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 22px;
}

.mock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.35rem, 8vw, 4.6rem);
  line-height: 0.95;
  margin-bottom: 10px;
  letter-spacing: 0;
}

h2 {
  font-size: 1.25rem;
}

.lead {
  color: #4f5a61;
  max-width: 62ch;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.panel,
.content-panel {
  padding: 18px;
}

.day-panel {
  background: rgba(249, 250, 248, 0.98);
}

.night-panel {
  background: rgba(13, 29, 48, 0.94);
  color: #f7fbff;
  border-color: #6a7480;
}

.metric {
  padding: 14px;
}

.metric span,
.status-tile span,
small,
.small {
  color: var(--muted);
  font-size: 0.86rem;
}

.metric strong,
.status-tile strong {
  display: block;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.status-tile {
  padding: 14px 18px;
  background: rgba(239, 233, 215, 0.86);
  border: 3px solid var(--border-dark);
  min-width: 210px;
}

.stack-form,
.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 3px solid var(--border);
  background: #f4f5f2;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.08);
}

input::placeholder {
  color: #7a838d;
}

textarea {
  resize: vertical;
}

.button.primary,
.button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 44%),
    var(--green-button);
  color: #fff;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.22);
}

.button.secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 44%),
    #56606d;
  color: #fff;
}

.button.danger {
  background: var(--red);
  color: #fff;
}

.button.tiny {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 0.85rem;
}

.button-row,
.row-actions,
.section-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.button-row select {
  width: auto;
  min-width: 220px;
}

.section-line {
  justify-content: space-between;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.pixel-icon {
  width: 26px;
  height: 26px;
  display: inline-block;
  border: 3px solid var(--border-dark);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.pixel-icon.user {
  background:
    radial-gradient(circle at 50% 28%, var(--green-button) 0 5px, transparent 6px),
    linear-gradient(var(--green-button), var(--green-button)) center 16px / 14px 9px no-repeat;
}

.pixel-icon.mail {
  background:
    linear-gradient(35deg, transparent 45%, #fff 46% 54%, transparent 55%),
    linear-gradient(-35deg, transparent 45%, #fff 46% 54%, transparent 55%),
    #dfe6ee;
}

.pixel-icon.lock {
  background:
    linear-gradient(#ffd361, #ffd361) center 8px / 11px 8px no-repeat,
    linear-gradient(#3a414a, #3a414a) center 14px / 17px 12px no-repeat;
}

.pixel-icon.chat {
  background:
    linear-gradient(var(--green-button), var(--green-button)) 5px 7px / 15px 10px no-repeat,
    linear-gradient(135deg, transparent 0 55%, var(--green-button) 56%) 9px 17px / 9px 7px no-repeat;
}

.confirm-panel,
.access-panel {
  background: var(--night-panel);
  color: #f7fbff;
  border-color: #6a7480;
}

.confirm-panel .panel-title,
.access-panel h2 {
  color: #f7fbff;
}

.confirm-box {
  border: 3px solid #65b84f;
  background: rgba(7, 31, 30, 0.82);
  color: #f7fbff;
  padding: 18px;
  margin-bottom: 16px;
  text-align: center;
}

.confirm-box span {
  color: #ffd659;
}

.access-panel p {
  color: #d8e4ee;
}

.micro-copy {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.micro-copy a,
.mock-link {
  color: var(--green-button);
  font-weight: 800;
  text-decoration: none;
}

.centered-muted {
  color: #bfc9d4;
  text-align: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 10px 0 20px;
}

.social-icon {
  width: 58px;
  height: 58px;
  border: 3px solid #6a7480;
  background: #263547;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.34), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.social-icon.grass {
  background:
    linear-gradient(180deg, #64b54a 0 34%, #8b5a35 34% 100%);
}

.social-icon.discord {
  background:
    radial-gradient(circle at 34% 42%, #101a31 0 4px, transparent 5px),
    radial-gradient(circle at 66% 42%, #101a31 0 4px, transparent 5px),
    #7289da;
}

.divider {
  height: 2px;
  background: rgba(191, 201, 212, 0.22);
  margin: 0 10px 18px;
}

.flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.flash {
  padding: 10px 12px;
}

.flash.error {
  border-color: var(--red);
}

.flash.success {
  border-color: var(--leaf);
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  background: var(--panel);
  border: 3px solid var(--border);
  text-decoration: none;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--stone-2);
}

.meta-list dt {
  font-weight: 800;
}

.meta-list dd {
  margin: 0;
}

.chat-log {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding: 10px;
  background: var(--panel);
  border: 3px solid var(--border);
}

.chat-preview {
  background:
    linear-gradient(90deg, rgba(249, 250, 248, 0.98) 0 50%, rgba(13, 29, 48, 0.9) 50% 100%);
}

.chat-preview .section-line {
  border-bottom: 2px solid rgba(104, 114, 125, 0.35);
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.online-dot {
  color: #d9e8f5;
  font-size: 0.95rem;
}

.online-dot::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  background: #62ca50;
  border-radius: 50%;
}

.chat-preview-list {
  display: grid;
}

.chat-preview-list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  padding: 9px 8px;
  border-bottom: 2px solid rgba(104, 114, 125, 0.22);
}

.chat-preview-list strong {
  color: var(--green-button);
}

.chat-preview-list span {
  overflow-wrap: anywhere;
}

.split-panel {
  background:
    linear-gradient(90deg, rgba(249, 250, 248, 0.98) 0 50%, rgba(13, 29, 48, 0.94) 50% 100%);
}

.mock-chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 14px;
  align-items: center;
}

.mock-chat-input span {
  display: block;
  min-height: 42px;
  padding: 10px 12px;
  color: #6d7681;
  background: rgba(244, 245, 242, 0.9);
  border: 3px solid var(--border);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.08);
}

.send-button {
  min-width: 68px;
  padding-inline: 18px;
}

.pixel-icon.bars {
  background:
    linear-gradient(var(--green-button), var(--green-button)) 3px 15px / 5px 7px no-repeat,
    linear-gradient(var(--green-button), var(--green-button)) 11px 10px / 5px 12px no-repeat,
    linear-gradient(var(--green-button), var(--green-button)) 19px 5px / 5px 17px no-repeat;
}

.pixel-icon.shield {
  background:
    linear-gradient(135deg, transparent 0 18%, var(--green-button) 19% 81%, transparent 82%),
    #2a4728;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.status-grid.compact {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.status-card {
  min-height: 118px;
  padding: 12px;
  text-align: center;
  background: rgba(249, 250, 248, 0.9);
  border: 3px solid var(--border);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.status-card span,
.status-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
}

.status-card strong {
  display: block;
  margin: 5px 0;
  font-size: 1.6rem;
  line-height: 1;
}

.status-card .green,
.plugin-list .green {
  color: #52c444;
}

.status-card .red,
.plugin-list .red {
  color: #ff6258;
}

.night-card {
  background: rgba(13, 29, 48, 0.86);
  color: #f7fbff;
}

.server-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(244, 245, 242, 0.82);
  border: 3px solid var(--border);
}

.server-status-list,
.server-admin-list {
  display: grid;
  gap: 14px;
}

.server-card,
.server-admin-list > div {
  padding: 14px;
  background: rgba(249, 250, 248, 0.9);
  border: 3px solid var(--border);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.34);
}

.server-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.server-card-head h3 {
  margin-bottom: 2px;
}

.server-card-head span,
.server-refresh-note,
.server-admin-list span,
.server-admin-list small {
  color: var(--muted);
}

.connection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-field input {
  min-width: 0;
}

.server-admin-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto auto;
  gap: 10px;
  align-items: center;
}

.admin-tabs {
  display: flex;
  gap: 22px;
  padding: 0 10px 10px;
  border-bottom: 2px solid rgba(104, 114, 125, 0.26);
  overflow-x: auto;
}

.admin-tabs span {
  color: var(--muted);
  white-space: nowrap;
}

.admin-tabs .is-active {
  color: var(--green-button);
  border-bottom: 3px solid var(--green-button);
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.plugin-list {
  display: grid;
  border: 3px solid rgba(104, 114, 125, 0.45);
}

.plugin-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 2px solid rgba(104, 114, 125, 0.22);
}

.plugin-list div:last-child {
  border-bottom: 0;
}

.chat-row {
  display: grid;
  gap: 2px;
  padding: 8px;
  background: var(--surface);
  border: 2px solid var(--border);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}

.form-error {
  color: var(--red);
  min-height: 1.2em;
}

.content-body {
  font-size: 1.03rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 10px;
  border-bottom: 3px solid var(--stone-2);
  text-align: left;
  vertical-align: top;
}

.code-block {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--panel);
  border: 3px solid var(--border);
  padding: 12px;
}

.tabs,
.locale-editor {
  display: grid;
  gap: 14px;
}

.locale-editor {
  padding: 12px;
  background: var(--panel);
  border: 3px solid var(--border);
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
}

.auth-shell {
  width: min(460px, 100%);
  margin: 32px auto;
}

.blocked-shell {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.blocked-card {
  width: min(520px, 100%);
  background: var(--surface);
  border: 4px solid var(--red);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: 22px;
  text-align: center;
}

.blocked-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background:
    linear-gradient(90deg, transparent 0 28px, var(--red) 28px 44px, transparent 44px),
    linear-gradient(0deg, transparent 0 28px, var(--red) 28px 44px, transparent 44px),
    var(--stone);
  border: 4px solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
}

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

@media (min-width: 760px) {
  .page-shell {
    padding: 28px 24px 64px;
  }

  .hero-band,
  .admin-head {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 32px 38px;
  }

  .mock-row {
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  }

  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 759px) {
  body {
    background:
      linear-gradient(90deg, rgba(247, 250, 253, 0.92) 0 50%, rgba(9, 25, 43, 0.92) 50% 100%),
      linear-gradient(180deg, #9fd8ff 0 135px, #edf7ff 135px 48%, #0c1a2c 48% 100%);
  }

  .topbar {
    padding: 14px 12px 8px;
    align-items: flex-start;
  }

  .brand-cube {
    width: 34px;
    height: 34px;
    border-width: 3px;
  }

  .brand-copy small {
    display: none;
  }

  .nav {
    gap: 5px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-link {
    padding: 6px 7px;
    font-size: 0.82rem;
  }

  .theme-toggle {
    min-width: 72px;
  }

  .page-shell {
    padding: 10px 10px 42px;
  }

  .hero-band {
    padding: 18px 16px;
  }

  .hero-band h1 {
    font-size: 2.2rem;
  }

  .chat-preview {
    background: rgba(249, 250, 248, 0.96);
  }

  .online-dot {
    color: var(--muted);
  }

  .chat-preview-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .mock-row,
  .status-grid,
  .status-grid.compact,
  .connection-grid,
  .admin-actions {
    grid-template-columns: 1fr;
  }

  .server-card-head,
  .server-admin-list > div {
    grid-template-columns: 1fr;
    display: grid;
  }

  .button-row select {
    width: 100%;
  }

  .split-panel {
    background: rgba(249, 250, 248, 0.96);
  }

  .server-meta {
    display: grid;
  }

  .status-card.night-card {
    background: rgba(13, 29, 48, 0.92);
  }
}

/* Mockup-aligned public shell. Kept as an override layer to preserve route, form and JS contracts. */
html {
  min-height: 100%;
}

body {
  color: #222831;
  background:
    linear-gradient(90deg, rgba(244, 250, 255, 0.94) 0 50%, rgba(7, 19, 32, 0.94) 50% 100%),
    linear-gradient(180deg, #7dc0ff 0 122px, #eaf6ff 122px 58%, #071321 58% 100%);
}

body::before {
  background:
    linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(35, 47, 62, 0.38) calc(50% - 1px) calc(50% + 1px), rgba(0, 0, 0, 0.18) calc(50% + 1px)),
    linear-gradient(#d7ecff, #d7ecff) 150px 34px / 34px 10px no-repeat,
    linear-gradient(#eef8ff, #eef8ff) 185px 34px / 48px 15px no-repeat,
    linear-gradient(#d7ecff, #d7ecff) 214px 58px / 38px 9px no-repeat,
    linear-gradient(#eef8ff, #eef8ff) 250px 46px / 70px 12px no-repeat,
    linear-gradient(#eef8ff, #eef8ff) 10px 18px / 12px 12px no-repeat,
    linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 92px) 24px / 8px 8px no-repeat,
    linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 184px) 48px / 7px 7px no-repeat,
    linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 356px) 15px / 8px 8px no-repeat,
    linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 488px) 63px / 7px 7px no-repeat;
}

.topbar,
.page-shell {
  width: min(1180px, calc(100vw - 56px));
}

.topbar {
  position: relative;
  margin: 0 auto;
  padding: 56px 8px 40px;
  align-items: flex-start;
}

.brand {
  gap: 18px;
  color: #20252b;
}

.brand-cube {
  width: 68px;
  height: 68px;
  border-color: #1f2833;
  background:
    linear-gradient(180deg, #66b84a 0 32%, #3f8c34 32% 39%, #8f6238 39% 100%),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(0, 0, 0, 0.16) 8px 10px);
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.28);
}

.brand-copy strong {
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 0.95;
}

.brand-copy small {
  color: #687586;
  font-size: 1.25rem;
  font-weight: 800;
}

.nav {
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}

.lang-switch,
.theme-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-control {
  color: #f4f8fb;
}

.theme-label {
  display: inline-block;
  margin-right: 8px;
  color: #f4f8fb;
  font-weight: 800;
}

.nav-link,
.theme-toggle,
.button {
  border-color: #25313d;
  border-radius: 0;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.34), inset 0 0 0 2px rgba(255, 255, 255, 0.14);
}

.nav-link {
  min-width: 58px;
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  background: rgba(247, 248, 246, 0.95);
  color: #20252b;
  text-transform: uppercase;
}

.nav-link.is-active {
  background: #4ca83a;
  color: #fff;
}

.theme-toggle {
  min-width: 154px;
  min-height: 54px;
  border-color: #4c5a69;
  background: rgba(24, 35, 49, 0.92);
}

.theme-toggle span {
  display: grid;
  place-items: center;
  min-width: 72px;
  padding: 12px 16px;
}

:root:not([data-theme="night"]) .theme-toggle span:first-child,
:root[data-theme="night"] .theme-toggle span:last-child {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 55%),
    #4ca83a;
}

.page-shell {
  margin: 0 auto;
  padding: 0 0 70px;
}

.panel,
.content-panel,
.flash,
.hero-band,
.admin-head {
  border: 3px solid #68727d;
  border-radius: 0;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.32);
}

.mock-row {
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.panel,
.content-panel {
  padding: 26px;
}

.day-panel,
.form-panel,
.account-panel,
.auth-shell .panel,
.grid.two .panel {
  background: rgba(255, 255, 252, 0.94);
  color: #222831;
}

.night-panel,
.confirm-panel,
.access-panel {
  background: rgba(13, 28, 45, 0.92);
  color: #f4f8fb;
}

.panel-title {
  gap: 14px;
  margin-bottom: 24px;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.1;
}

.pixel-icon {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border-color: #28313b;
}

.stack-form {
  gap: 15px;
}

label {
  color: inherit;
  font-size: 1rem;
}

input,
select,
textarea {
  min-height: 48px;
  border-width: 2px;
  border-color: #8a939c;
  background: rgba(249, 250, 248, 0.94);
  color: #222831;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.08), inset -2px -2px 0 rgba(255, 255, 255, 0.7);
}

.button {
  min-height: 52px;
  display: inline-grid;
  place-items: center;
  line-height: 1.1;
}

.button.primary,
.button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 3px, transparent 3px 6px),
    #4ca83a;
}

.button.secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 48%),
    #53606d;
}

.confirm-panel,
.access-panel {
  display: grid;
  align-content: center;
}

.confirm-panel > *,
.access-panel > * {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.confirm-box {
  width: 100%;
  border-color: #5bb84a;
  background: rgba(8, 34, 34, 0.86);
  box-shadow: inset 0 0 28px rgba(91, 184, 74, 0.12);
}

.micro-copy,
.centered-muted,
.small {
  overflow-wrap: anywhere;
}

.chat-preview,
.server-preview,
.admin-preview,
.split-panel {
  background:
    linear-gradient(90deg, rgba(255, 255, 252, 0.94) 0 calc(50% - 1px), rgba(13, 28, 45, 0.92) calc(50% - 1px) 100%);
}

.split-panel {
  margin-bottom: 20px;
}

.section-line {
  min-height: 40px;
  border-bottom: 2px solid rgba(104, 114, 125, 0.28);
  margin: -4px 0 14px;
  padding-bottom: 14px;
}

.section-line .panel-title {
  margin-bottom: 0;
}

.chat-preview-list {
  margin: 0 -8px;
}

.chat-preview-list div {
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 48px;
  align-items: center;
}

.mock-chat-input span {
  min-height: 48px;
  border-width: 2px;
}

.status-grid,
.status-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.status-card {
  min-height: 126px;
  display: grid;
  align-content: center;
  border-width: 2px;
}

.status-card strong {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.server-card {
  background: rgba(255, 255, 252, 0.88);
  border-width: 2px;
}

.connection-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-tabs {
  border: 2px solid rgba(104, 114, 125, 0.25);
  padding: 10px 18px 0;
}

.admin-actions {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.plugin-list {
  background: rgba(255, 255, 252, 0.34);
  border-width: 2px;
}

.auth-shell {
  width: min(560px, calc(100vw - 40px));
  margin: 48px auto 80px;
}

.auth-shell h1 {
  font-size: clamp(2.1rem, 6vw, 3.35rem);
  line-height: 1.05;
}

.auth-shell .panel {
  overflow: hidden;
}

.code-block {
  color: #222831;
  background: rgba(244, 245, 242, 0.95);
  border-width: 2px;
  overflow-x: auto;
}

.small {
  display: block;
  max-width: 100%;
  word-break: break-word;
}

@media (max-width: 900px) {
  body {
    background:
      linear-gradient(180deg, rgba(244, 250, 255, 0.95) 0 42%, rgba(7, 19, 32, 0.95) 42% 100%),
      linear-gradient(180deg, #7dc0ff 0 116px, #eaf6ff 116px 44%, #071321 44% 100%);
  }

  body::before {
    background:
      linear-gradient(#d7ecff, #d7ecff) 96px 30px / 42px 11px no-repeat,
      linear-gradient(#eef8ff, #eef8ff) 128px 44px / 66px 12px no-repeat,
      linear-gradient(#a9c4e6, #a9c4e6) 62% 46% / 7px 7px no-repeat,
      linear-gradient(#a9c4e6, #a9c4e6) 82% 50% / 8px 8px no-repeat;
  }

  .topbar,
  .page-shell {
    width: min(100% - 24px, 640px);
  }

  .topbar {
    display: grid;
    gap: 22px;
    padding: 28px 0 26px;
  }

  .brand-cube {
    width: 54px;
    height: 54px;
  }

  .brand-copy strong {
    font-size: clamp(1.65rem, 8vw, 2.45rem);
  }

  .brand-copy small {
    display: block;
    font-size: 1rem;
  }

  .nav {
    align-items: stretch;
  }

  .lang-switch,
  .theme-control {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .mock-row {
    grid-template-columns: 1fr;
  }

  .chat-preview,
  .server-preview,
  .admin-preview,
  .split-panel {
    background: rgba(255, 255, 252, 0.94);
  }

  .online-dot {
    color: #66707d;
  }

  .panel,
  .content-panel {
    padding: 22px 18px;
  }

  .chat-preview-list div {
    grid-template-columns: 1fr;
  }

  .mock-chat-input,
  .chat-form,
  .copy-field {
    grid-template-columns: 1fr;
  }
}

/* Mobile-first layout contract. Desktop split view is an enhancement above 900px. */
body {
  background:
    linear-gradient(180deg, rgba(245, 251, 255, 0.96) 0 360px, rgba(8, 20, 34, 0.95) 360px 100%),
    linear-gradient(180deg, #80c2ff 0 120px, #eef8ff 120px 360px, #081422 360px 100%);
}

body::before {
  background:
    linear-gradient(#d7ecff, #d7ecff) 88px 32px / 34px 10px no-repeat,
    linear-gradient(#eef8ff, #eef8ff) 120px 42px / 64px 12px no-repeat,
    linear-gradient(#a9c4e6, #a9c4e6) 66% 392px / 7px 7px no-repeat,
    linear-gradient(#a9c4e6, #a9c4e6) 84% 426px / 8px 8px no-repeat;
}

.topbar,
.page-shell {
  width: min(100% - 24px, 560px);
}

.topbar {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  padding: 24px 0 22px;
}

.brand {
  gap: 12px;
  min-width: 0;
}

.brand-cube {
  width: 50px;
  height: 50px;
  border-width: 3px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.28);
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong {
  font-size: clamp(1.6rem, 8vw, 2.25rem);
  overflow-wrap: anywhere;
}

.brand-copy small {
  display: block;
  font-size: 0.95rem;
}

.nav {
  display: grid;
  gap: 12px;
  align-items: stretch;
}

.lang-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.theme-control {
  display: grid;
  grid-template-columns: auto minmax(136px, 1fr);
  justify-content: stretch;
  gap: 10px;
}

.theme-label {
  align-self: center;
  margin: 0;
  color: #f4f8fb;
}

.nav-link {
  min-width: 0;
  min-height: 44px;
  padding: 8px;
}

.theme-toggle {
  width: 100%;
  min-width: 0;
  min-height: 48px;
}

.theme-toggle span {
  min-width: 0;
  padding: 10px 14px;
}

.page-shell {
  padding: 0 0 48px;
}

.mock-row,
.grid.two,
.connection-grid,
.admin-actions,
.chat-form,
.copy-field {
  grid-template-columns: minmax(0, 1fr);
}

.mock-row {
  gap: 14px;
  margin-bottom: 14px;
}

.panel,
.content-panel {
  padding: 18px;
}

.panel-title {
  gap: 10px;
  font-size: clamp(1.25rem, 5.5vw, 1.65rem);
  margin-bottom: 18px;
}

.pixel-icon {
  width: 27px;
  height: 27px;
  border-width: 2px;
}

.stack-form {
  gap: 13px;
}

input,
select,
textarea {
  min-height: 46px;
  font-size: 1rem;
}

.stack-form .button,
.mock-chat-input .button,
.chat-form .button,
.admin-actions .button,
.copy-field .button {
  width: 100%;
}

.confirm-panel,
.access-panel {
  min-height: 260px;
}

.chat-preview,
.server-preview,
.admin-preview,
.split-panel {
  background: rgba(255, 255, 252, 0.94);
}

.online-dot {
  color: #66707d;
}

.chat-preview-list {
  margin: 0;
}

.chat-preview-list div {
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding-inline: 0;
}

.mock-chat-input {
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 8px;
}

.status-grid,
.status-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 10px;
}

.status-card {
  min-height: 104px;
  padding: 10px;
}

.server-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.admin-tabs {
  gap: 14px;
  padding-inline: 10px;
}

.plugin-list div {
  align-items: center;
}

.auth-shell {
  width: min(100% - 24px, 520px);
  margin: 24px auto 48px;
}

.auth-shell h1 {
  font-size: clamp(2rem, 10vw, 3rem);
}

@media (min-width: 640px) {
  .topbar,
  .page-shell {
    width: min(100% - 36px, 760px);
  }

  .brand-cube {
    width: 60px;
    height: 60px;
  }

  .mock-chat-input,
  .chat-form,
  .copy-field {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .copy-field .button {
    width: auto;
  }
}

@media (min-width: 901px) {
  body {
    background:
      linear-gradient(90deg, rgba(244, 250, 255, 0.94) 0 50%, rgba(7, 19, 32, 0.94) 50% 100%),
      linear-gradient(180deg, #7dc0ff 0 122px, #eaf6ff 122px 58%, #071321 58% 100%);
  }

  body::before {
    background:
      linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(35, 47, 62, 0.38) calc(50% - 1px) calc(50% + 1px), rgba(0, 0, 0, 0.18) calc(50% + 1px)),
      linear-gradient(#d7ecff, #d7ecff) 150px 34px / 34px 10px no-repeat,
      linear-gradient(#eef8ff, #eef8ff) 185px 34px / 48px 15px no-repeat,
      linear-gradient(#d7ecff, #d7ecff) 214px 58px / 38px 9px no-repeat,
      linear-gradient(#eef8ff, #eef8ff) 250px 46px / 70px 12px no-repeat,
      linear-gradient(#eef8ff, #eef8ff) 10px 18px / 12px 12px no-repeat,
      linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 92px) 24px / 8px 8px no-repeat,
      linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 184px) 48px / 7px 7px no-repeat,
      linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 356px) 15px / 8px 8px no-repeat,
      linear-gradient(#a9c4e6, #a9c4e6) calc(50% + 488px) 63px / 7px 7px no-repeat;
  }

  .topbar,
  .page-shell {
    width: min(1180px, calc(100vw - 56px));
  }

  .topbar {
    display: flex;
    padding: 56px 8px 40px;
  }

  .brand {
    gap: 18px;
  }

  .brand-cube {
    width: 68px;
    height: 68px;
    border-width: 4px;
  }

  .brand-copy strong {
    font-size: clamp(2.1rem, 4vw, 3.25rem);
  }

  .brand-copy small {
    font-size: 1.25rem;
  }

  .nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .lang-switch,
  .theme-control {
    display: flex;
  }

  .nav-link {
    min-width: 58px;
    min-height: 58px;
    padding: 8px 12px;
  }

  .theme-toggle {
    min-width: 154px;
  }

  .page-shell {
    padding-bottom: 70px;
  }

  .mock-row {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
  }

  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel,
  .content-panel {
    padding: 26px;
  }

  .panel-title {
    gap: 14px;
    font-size: clamp(1.45rem, 2vw, 2rem);
    margin-bottom: 24px;
  }

  .pixel-icon {
    width: 31px;
    height: 31px;
    border-width: 3px;
  }

  .chat-preview,
  .server-preview,
  .admin-preview,
  .split-panel {
    background:
      linear-gradient(90deg, rgba(255, 255, 252, 0.94) 0 calc(50% - 1px), rgba(13, 28, 45, 0.92) calc(50% - 1px) 100%);
  }

  .online-dot {
    color: #d9e8f5;
  }

  .chat-preview-list div {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .admin-actions {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .admin-actions .button {
    width: auto;
  }
}
