:root {
  color-scheme: dark;
  --ink: #17120d;
  --paper: #efe2c7;
  --paper-2: #d8c6a5;
  --night: #172238;
  --night-2: #22314d;
  --stone: #454545;
  --panel: #303030;
  --grass: #5a9f38;
  --grass-dark: #417a28;
  --gold: #f3c33d;
  --diamond: #5ce1dc;
  --red: #c9473d;
  --muted: #b8b0a1;
  --white: #fffdf7;
  --edge: 3px solid var(--ink);
  --shadow-up: inset 2px 2px 0 rgb(255 255 255 / .35), inset -3px -3px 0 rgb(0 0 0 / .35);
  --shadow-down: inset 3px 3px 0 rgb(0 0 0 / .32), inset -2px -2px 0 rgb(255 255 255 / .2);
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--white);
  background: var(--night);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; image-rendering: pixelated; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: -5rem;
  padding: .65rem 1rem;
  color: var(--ink);
  background: var(--gold);
  border: var(--edge);
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgb(37 37 37 / .96);
  border-bottom: var(--edge);
  box-shadow: 0 5px 0 rgb(0 0 0 / .28);
  backdrop-filter: blur(10px);
}
.nav-wrap {
  width: min(100% - 2rem, var(--max));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: .02em;
}
.brand-cube {
  width: 42px;
  height: 42px;
  flex: none;
  background: url("/assets/tex/grass_side.png") center / cover;
  border: var(--edge);
  box-shadow: var(--shadow-up);
}
.brand small {
  display: block;
  color: #8ed46c;
  font-size: .68rem;
  letter-spacing: .1em;
}
.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.site-nav a {
  padding: .58rem .82rem;
  border: 2px solid transparent;
  text-decoration: none;
  font-weight: 750;
}
.site-nav a:hover { background: #484848; border-color: var(--ink); }
.site-nav .nav-cta { background: var(--grass); border-color: var(--ink); box-shadow: var(--shadow-up); }

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(17 36 66 / .18), rgb(14 28 48 / .86)),
    linear-gradient(135deg, #668fdb, #9bb9ef 48%, #5b83c8);
  border-bottom: var(--edge);
}
.cloud-layer {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.pixel-cloud {
  --cloud-scale: 1;
  position: absolute;
  left: 0;
  display: block;
  background: #fff;
  opacity: .82;
  transform-origin: center;
  will-change: transform;
  animation: cloud-drift linear infinite;
}
.pixel-cloud-one {
  top: clamp(30px, 4vw, 56px);
  width: 96px;
  height: 30px;
  box-shadow: 30px 0 0 #fff, -22px 12px 0 #fff, 54px 12px 0 #fff;
  opacity: .9;
  animation-duration: 60s;
}
.pixel-cloud-two {
  top: clamp(108px, 11vw, 154px);
  width: 70px;
  height: 24px;
  box-shadow: 24px 0 0 #fff, -16px 10px 0 #fff;
  opacity: .8;
  animation-duration: 85s;
  animation-delay: -30s;
}
.pixel-cloud-three {
  top: clamp(72px, 7vw, 106px);
  width: 120px;
  height: 34px;
  box-shadow: 40px 0 0 #fff, -26px 14px 0 #fff, 70px 14px 0 #fff;
  opacity: .75;
  animation-duration: 110s;
  animation-delay: -60s;
}
@keyframes cloud-drift {
  from { transform: translate3d(-220px, 0, 0) scale(var(--cloud-scale)); }
  to { transform: translate3d(calc(100vw + 220px), 0, 0) scale(var(--cloud-scale)); }
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 52px;
  background: url("/assets/tex/grass_side.png") center / 52px 52px repeat;
  border-top: var(--edge);
}
.hero-grid {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--max));
  margin: auto;
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(7rem, 12vw, 9rem);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  padding: .38rem .7rem;
  color: var(--ink);
  background: var(--gold);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-up);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 12ch;
  margin: 1.3rem 0 0;
  color: var(--ink);
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -.045em;
  text-wrap: balance;
  text-shadow: 3px 3px 0 rgb(255 255 255 / .38);
}
.hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  margin: 1.35rem 0 0;
  color: #18243a;
  font-size: clamp(1rem, 2vw, 1.16rem);
  font-weight: 650;
}
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.actions-center { justify-content: center; }
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.15rem;
  color: #fff;
  background: #535353;
  border: var(--edge);
  border-radius: 0;
  box-shadow: var(--shadow-up);
  cursor: pointer;
  text-decoration: none;
  font-weight: 900;
}
.button:hover { filter: brightness(1.12); transform: translateY(-1px); }
.button:active { transform: translateY(2px); box-shadow: var(--shadow-down); }
.button-primary { background: var(--grass); }
.button-danger { background: var(--red); }
.button-quiet { background: #4a4a4a; }
.button-small { min-height: 38px; padding: .48rem .72rem; font-size: .88rem; }

.status-card {
  color: #f8f6ef;
  background: var(--panel);
  border: var(--edge);
  box-shadow: var(--shadow-up), 0 9px 0 rgb(0 0 0 / .25);
}
.status-card-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .85rem 1rem;
  color: var(--muted);
  background: #242424;
  border-bottom: 2px solid var(--ink);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.status-light {
  width: 11px;
  height: 11px;
  flex: none;
  background: #9a9284;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.status-light.online { background: #63c33d; box-shadow: 0 0 0 4px rgb(99 195 61 / .16); }
.status-light.offline { background: var(--red); }
.status-body { padding: 1.25rem; }
.server-title { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.server-title h2 { margin: 0; font-size: 1.2rem; }
.server-title p { margin: .25rem 0 0; color: #96d875; font-size: .9rem; }
.status-badge { padding: .28rem .5rem; color: var(--ink); background: var(--paper-2); border: 2px solid var(--ink); font-size: .75rem; font-weight: 900; }
.status-badge.online { background: #81ce60; }
.status-badge.offline { color: #fff; background: var(--red); }
.server-address {
  margin-top: 1rem;
  padding: .8rem .9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #fff;
  background: #737373;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-down);
  word-break: break-all;
}
.server-address code { font-size: .98rem; font-weight: 800; }
.status-grid {
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}
.status-stat { padding: .7rem; background: #3d3d3d; border: 2px solid var(--ink); }
.status-stat span { display: block; color: #aaa396; font-size: .72rem; }
.status-stat strong { display: block; margin-top: .15rem; overflow: hidden; text-overflow: ellipsis; font-size: .96rem; white-space: nowrap; }
.status-meta { margin: .8rem 0 0; color: #a9a296; font-size: .75rem; }

.section { padding: clamp(4rem, 8vw, 6.5rem) 1rem; border-bottom: var(--edge); }
.section-stone { background: #353535 url("/assets/tex/stone.png") center / 64px repeat; background-blend-mode: multiply; }
.section-night { background: var(--night); }
.section-paper { color: var(--ink); background: var(--paper) url("/assets/tex/planks.png") center / 64px repeat; background-blend-mode: soft-light; }
.section-inner { width: min(100%, var(--max)); margin: auto; }
.section-heading { max-width: 720px; margin-bottom: 2rem; }
.section-heading.center { margin-inline: auto; text-align: center; }
.section-heading h2 { margin: .65rem 0 0; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.12; letter-spacing: -.03em; text-wrap: balance; }
.section-heading p { margin: .9rem 0 0; color: var(--muted); }
.section-paper .section-heading p { color: #4a3b29; }
.kicker { color: var(--diamond); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feature-card {
  min-height: 220px;
  padding: 1.35rem;
  color: var(--ink);
  background: #d0d0d0;
  border: var(--edge);
  box-shadow: var(--shadow-up);
}
.feature-icon { width: 42px; height: 42px; display: block; }
.feature-card h3 { margin: 1rem 0 .35rem; }
.feature-card p { margin: 0; color: #4e4235; font-size: .94rem; }

.join-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  color: #fff;
  background: #2d2d2d;
  border: var(--edge);
  box-shadow: var(--shadow-up);
}
.join-band h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2.5rem); }
.join-band p { margin: .45rem 0 0; color: #c9c2b7; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: steps; }
.step {
  position: relative;
  padding: 1.5rem;
  color: var(--ink);
  background: var(--paper);
  border: var(--edge);
  box-shadow: var(--shadow-up);
  counter-increment: steps;
}
.step::before {
  content: "0" counter(steps);
  display: inline-block;
  padding: .2rem .5rem;
  background: var(--gold);
  border: 2px solid var(--ink);
  font-weight: 950;
}
.step h3 { margin: 1rem 0 .35rem; }
.step p { margin: 0; color: #4b3c2b; }

.page-hero { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 1rem; background: linear-gradient(135deg, #273d63, #16243b); border-bottom: var(--edge); }
.page-hero-inner { position: relative; z-index: 1; width: min(100%, 860px); margin: auto; }
.page-hero h1 { margin: .8rem 0 0; font-size: clamp(2.35rem, 7vw, 4.8rem); line-height: 1.05; letter-spacing: -.04em; }
.page-hero p { max-width: 680px; margin: 1rem 0 0; color: #c9d5eb; }

.form-shell { width: min(100%, 760px); margin: auto; }
.form-card { padding: clamp(1.2rem, 5vw, 2rem); color: var(--ink); background: #cecece; border: var(--edge); box-shadow: var(--shadow-up); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .42rem; margin-top: 1rem; }
.field:first-child, .field:nth-child(2) { margin-top: 0; }
.field label, .field legend { font-size: .9rem; font-weight: 900; }
.required { color: #a31e18; }
.input, .textarea, .select {
  width: 100%;
  color: #fff;
  background: #777;
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--shadow-down);
  padding: .75rem .85rem;
}
.input::placeholder, .textarea::placeholder { color: #e2ddd3; opacity: .76; }
.textarea { min-height: 120px; resize: vertical; }
.help { margin: 0; color: #534737; font-size: .78rem; }
.chip-set { margin: 0; padding: 0; border: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .45rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; padding: .52rem .8rem; background: #838383; border: 2px solid var(--ink); box-shadow: var(--shadow-up); cursor: pointer; font-size: .86rem; font-weight: 800; }
.chip input:checked + span { color: #fff; background: var(--grass); }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.consent { margin-top: 1.15rem; display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; }
.consent input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--grass); }
.consent a { color: #185d83; font-weight: 800; }
.form-actions { margin-top: 1.3rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-message { min-height: 1.5rem; margin: .8rem 0 0; font-size: .9rem; font-weight: 800; }
.form-message.error { color: #8e1712; }
.form-message.success { color: #246817; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.receipt {
  padding: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--white);
  background: var(--panel);
  border: var(--edge);
  box-shadow: var(--shadow-up);
  text-align: center;
}
.receipt[hidden] { display: none; }
.receipt-icon { width: 62px; height: 62px; margin: auto; background: url("/assets/tex/gold.png") center / cover; border: var(--edge); }
.receipt h2 { margin: 1.25rem 0 .4rem; }
.receipt p { color: #cbc4b9; }
.receipt code { display: inline-block; padding: .5rem .7rem; color: var(--gold); background: #1e1e1e; border: 2px solid var(--ink); word-break: break-all; }

.privacy-copy { width: min(100%, 820px); margin: auto; }
.privacy-copy h2 { margin-top: 2.2rem; }
.privacy-copy li + li { margin-top: .5rem; }
.notice { padding: 1rem; background: rgb(243 195 61 / .14); border: 2px solid var(--gold); }

.admin-shell { width: min(100% - 2rem, 1320px); margin: 2rem auto 5rem; }
.admin-toolbar { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; padding: 1rem; background: #2c2c2c; border: var(--edge); }
.admin-toolbar .field { min-width: 170px; margin: 0; color: #fff; }
.summary-grid { margin: 1rem 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; }
.summary-card { padding: 1rem; color: var(--ink); background: var(--paper); border: var(--edge); box-shadow: var(--shadow-up); }
.summary-card strong { display: block; font-size: 1.55rem; }
.application-list { display: grid; gap: .9rem; }
.application-card { padding: 1rem; color: var(--ink); background: #d1d1d1; border: var(--edge); box-shadow: var(--shadow-up); }
.application-top { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.application-top h2 { margin: 0; font-size: 1.08rem; }
.application-meta { margin: .2rem 0 0; color: #54493c; font-size: .8rem; }
.application-data { margin-top: .9rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; }
.application-data div { min-width: 0; padding: .6rem; background: #b9b9b9; border: 2px solid #3d3328; }
.application-data span { display: block; color: #554a3d; font-size: .7rem; font-weight: 800; }
.application-data strong { overflow-wrap: anywhere; }
.application-intro { margin: .8rem 0 0; padding: .7rem; white-space: pre-wrap; background: #b9b9b9; border: 2px solid #3d3328; }
.application-actions { margin-top: .8rem; display: grid; grid-template-columns: 170px minmax(220px, 1fr) auto; gap: .7rem; align-items: end; }
.application-actions .field { margin: 0; }
.security-panel { margin-top: 1rem; }
.security-form { margin-top: 1rem; }
.empty-state { padding: 2rem; text-align: center; color: #c8c1b6; background: #282828; border: var(--edge); }
.pager { margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: .8rem; }

.login-card { width: min(100% - 2rem, 460px); margin: clamp(3rem, 10vw, 8rem) auto; padding: 1.5rem; color: var(--ink); background: #cecece; border: var(--edge); box-shadow: var(--shadow-up); }
.login-card h1 { margin-top: 0; }

.site-footer { padding: 2rem 1rem; color: #a8a197; background: #1a1a1a url("/assets/tex/cobble.png") center / 64px repeat; background-blend-mode: multiply; }
.footer-inner { width: min(100%, var(--max)); margin: auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-inner a { color: #d8d2c8; }

.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; }
[hidden] { display: none !important; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 14ch; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .application-data { grid-template-columns: repeat(2, 1fr); }
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .nav-wrap { padding: .65rem 0; align-items: flex-start; flex-wrap: wrap; }
  .site-nav { width: 100%; margin: 0; overflow-x: auto; padding-bottom: .2rem; }
  .site-nav a { flex: none; }
  .brand-cube { width: 36px; height: 36px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.35rem, 14vw, 3.8rem); }
  .status-grid { grid-template-columns: 1fr; }
  .card-grid, .form-grid { grid-template-columns: 1fr; }
  .field:nth-child(2) { margin-top: 1rem; }
  .join-band { grid-template-columns: 1fr; }
  .join-band .button { width: 100%; }
  .application-data { grid-template-columns: 1fr; }
  .application-actions { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .pixel-cloud { --cloud-scale: .78; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .pixel-cloud-one { transform: translate3d(9vw, 0, 0) scale(var(--cloud-scale)); }
  .pixel-cloud-two { transform: translate3d(48vw, 0, 0) scale(var(--cloud-scale)); }
  .pixel-cloud-three { transform: translate3d(78vw, 0, 0) scale(var(--cloud-scale)); }
}
