:root {
  color-scheme: dark;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  background: #080c1f;
  color: #f6f7ff;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #080c1f; }

body { margin: 0; min-height: 100vh; background: #080c1f; color: #f6f7ff; }

button, input { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #b8ff2c;
  color: #080c1f;
  font-weight: 600;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
  padding: 0 32px;
  border-bottom: 1px solid #293252;
  background: #0d1229;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #b8ff2c;
  color: #080c1f;
  letter-spacing: .04em;
}

.public-nav { display: flex; flex: 1; gap: 24px; }

.public-nav a, .back-link {
  color: #aeb6ce;
  text-decoration: none;
}

.public-nav a:hover, .back-link:hover { color: #f6f7ff; }

.back-link { white-space: nowrap; }

.auth-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  align-items: center;
  gap: 64px;
  width: min(1200px, 100%);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 56px 32px;
  outline: none;
}

.season-context { max-width: 480px; }

.eyebrow, .task-meta {
  margin: 0 0 14px;
  color: #b8ff2c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .11em;
}

.task-meta { display: flex; gap: 8px; color: #aeb6ce; letter-spacing: 0; }
.task-meta strong { color: #b8ff2c; }

.season-context h2 {
  max-width: 12ch;
  margin: 0 0 20px;
  font-size: clamp(38px, 4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.035em;
}

.season-context > p:not(.eyebrow) {
  max-width: 42ch;
  margin: 0;
  color: #aeb6ce;
  line-height: 1.75;
}

.trust-list {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  color: #d9deed;
  list-style: none;
}

.trust-list span { margin-right: 8px; color: #b8ff2c; }

.auth-card {
  width: 100%;
  padding: 32px;
  border: 1px solid #293252;
  border-radius: 12px;
  background: #101630;
}

.auth-card h1 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.task-lead {
  margin: 0 0 24px;
  color: #aeb6ce;
  line-height: 1.6;
}

.method-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 8px;
  background: #080c1f;
}

.method-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #aeb6ce;
  cursor: pointer;
}

.method-switch button[aria-selected="true"] { background: #252d4c; color: #f6f7ff; }

form { display: grid; gap: 18px; }

.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }

.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #3a4568;
  border-radius: 8px;
  outline: none;
  background: #080c1f;
  color: #f6f7ff;
}

.field input:focus {
  border-color: #b8ff2c;
  box-shadow: 0 0 0 3px rgb(184 255 44 / 28%);
}

.field input[readonly] { background: #171e3c; color: #aeb6ce; }
.field input:disabled { cursor: wait; opacity: .75; }

.field-hint, .card-foot {
  margin: 0;
  color: #aeb6ce;
  font-size: 13px;
  line-height: 1.55;
}

.card-foot { margin-top: 18px; text-align: center; }

.primary-action, .secondary-action, .link-button {
  display: grid;
  width: 100%;
  min-height: 48px;
  place-items: center;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.primary-action {
  margin-top: 4px;
  border: 1px solid #b8ff2c;
  background: #b8ff2c;
  color: #080c1f;
}

.secondary-action, .link-button {
  margin-top: 10px;
  border: 1px solid #3a4568;
  background: transparent;
  color: #f6f7ff;
}

.primary-action:hover { background: #c7ff55; }
.secondary-action:hover, .link-button:hover { border-color: #7380a9; background: #171e3c; }
.primary-action:disabled, .secondary-action:disabled { cursor: wait; opacity: .7; }

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c7a7ff;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-action:disabled { color: #78829e; cursor: default; text-decoration: none; }

button:focus-visible, a:focus-visible {
  outline: 3px solid rgb(184 255 44 / 44%);
  outline-offset: 3px;
}

.inline-notice {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
  padding: 14px;
  border-left: 3px solid #6c2bd9;
  background: #171e3c;
  color: #d9deed;
  line-height: 1.5;
}

.inline-notice.error { border-left-color: #fb7185; }
.inline-notice.warning { border-left-color: #fbbf24; }
.inline-notice.success { border-left-color: #4ade80; }
.inline-notice small { display: block; margin-top: 6px; color: #aeb6ce; }

.notice-symbol {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid currentcolor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
}

.player-identity {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid #293252;
  border-radius: 8px;
  background: #171e3c;
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: #6c2bd9;
  color: #fff;
  font-weight: 600;
}

.player-identity strong, .player-identity span { display: block; }
.player-identity div span { margin-top: 4px; color: #aeb6ce; font-size: 13px; }

.password-rules {
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  color: #aeb6ce;
  font-size: 13px;
  list-style: none;
}

.password-rules li::before { content: "○"; display: inline-block; width: 20px; }
.password-rules li.met { color: #4ade80; }
.password-rules li.met::before { content: "✓"; }

.status-list { margin: 0 0 22px; }

.status-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #293252;
}

.status-list > div:first-child { border-top: 1px solid #293252; }
.status-list dt { color: #aeb6ce; }
.status-list dd { margin: 0; text-align: right; }
.status-list .positive { color: #4ade80; }

.password-editor {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid #293252;
}

.skeleton {
  height: 180px;
  border-radius: 8px;
  background: linear-gradient(90deg, #171e3c, #202846, #171e3c);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
}

.boot-message { color: #aeb6ce; }

noscript {
  display: block;
  max-width: 600px;
  margin: 48px auto;
  padding: 16px;
  border: 1px solid #fb7185;
}

@keyframes skeleton { to { background-position: -200% 0; } }

@media (max-width: 900px) {
  .site-header { padding-inline: 24px; }
  .public-nav { display: none; }
  .back-link { margin-left: auto; }
  .auth-main { gap: 32px; padding-inline: 24px; }
  .season-context h2 { font-size: 38px; }
}

@media (max-width: 700px) {
  .site-header { height: 60px; padding-inline: 16px; }
  .brand-name { display: none; }
  .brand-mark { width: 44px; height: 32px; }
  .back-link { font-size: 13px; }
  .auth-main {
    display: block;
    min-height: calc(100vh - 60px);
    padding: 24px 16px 40px;
  }
  .season-context { margin-bottom: 18px; }
  .season-context h2, .season-context > p:not(.eyebrow), .trust-list { display: none; }
  .eyebrow { margin-bottom: 0; }
  .auth-card { padding: 0; border: 0; background: transparent; }
  .auth-card h1 { font-size: 26px; }
}

@media (max-width: 350px) {
  .site-header { padding-inline: 12px; }
  .auth-main { padding-inline: 12px; }
  .method-switch button { font-size: 14px; }
  .field-heading { align-items: flex-start; }
  .status-list > div { grid-template-columns: 1fr; gap: 5px; }
  .status-list dd { text-align: left; }
}

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