:root {
  color-scheme: light;
  --ink: #1b2639;
  --muted: #667187;
  --violet: #3c7996;
  --dark-violet: #263b61;
  --line: #dce4ee;
  --wash: #f1f5f9;
  --lina: #b96d4b;
  --gold: #c79a52;
  --error: #8b2e46;
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.55;
  color: var(--ink);
  background: var(--wash);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  isolation: isolate;
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(115deg, #101a30e8, #172b43c9 52%, #4c2e2fc2),
    url("night-sky.png") center / cover fixed;
}
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border: 1px solid #efd4a044;
  border-radius: 50%;
  pointer-events: none;
}
body::before { width: 24rem; height: 24rem; top: -13rem; right: -7rem; box-shadow: 0 0 70px #c6885338; }
body::after { width: 17rem; height: 17rem; bottom: -10rem; left: -6rem; border-color: #80bfd24a; box-shadow: 0 0 70px #3b91ad35; }
h1, h2, p, ul { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #d79668; outline-offset: 2px; }

.member-shell {
  width: min(100% - 28px, 31rem);
  margin: clamp(24px, 10vh, 96px) auto 32px;
  padding: clamp(18px, 5vw, 34px);
  border: 1px solid #ffffff6b;
  border-radius: 24px;
  background: #fffffff0;
  box-shadow: 0 28px 80px #07101f66, inset 0 1px #fff;
  backdrop-filter: blur(20px) saturate(125%);
  overflow-wrap: anywhere;
}
.member-heading { margin-bottom: 18px; }
.member-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.member-brand {
  color: var(--dark-violet);
  font-family: "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
  font-weight: 750;
  font-size: 1.13rem;
  letter-spacing: .12em;
}
.member-celestial { display: flex; align-items: center; gap: 7px; color: #fff; }
.member-celestial span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--violet); box-shadow: 0 5px 14px #2b627c38; font: 700 .9rem "Noto Serif SC", serif; }
.member-celestial span:last-child { background: var(--lina); box-shadow: 0 5px 14px #9d563738; }
.member-celestial i { color: var(--gold); font-style: normal; }
.member-pair { margin-top: 8px; color: #506273; font-size: .82rem; }
.member-pair span { padding-inline: 3px; color: var(--gold); }
.member-heading h1 { margin-block: 10px 5px; font-size: clamp(1.65rem, 5vw, 2.12rem); letter-spacing: .02em; }
.member-heading p:last-child, .member-help { color: var(--muted); }
.member-form, .member-password-fields { min-width: 0; display: grid; gap: 10px; }
.member-form label {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--dark-violet);
  font-size: .95rem;
  font-weight: 650;
}
.member-form input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #cbd9e3;
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
  font-weight: 400;
}
.member-form input:not([type="checkbox"]):focus { outline: none; border-color: #5e8da5; box-shadow: 0 0 0 3px #ddecf2; }
.member-form input[readonly] { background: #f7f4fa; color: var(--muted); }
.member-form .member-check {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  gap: 7px;
  font-weight: 450;
}
.member-check input { margin: 0; accent-color: var(--violet); width: 17px; height: 17px; }
.member-primary, .member-secondary, .member-link {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  font-weight: 650;
  text-align: center;
}
.member-primary { color: #fff; background: linear-gradient(135deg, #356f89, var(--dark-violet)); box-shadow: 0 8px 18px #263b6126; }
.member-primary:not(:disabled):hover { background: #172740; }
.member-secondary, .member-link { color: var(--dark-violet); background: #eaf3f7; border-color: #cfdee7; }
.member-secondary:not(:disabled):hover, .member-link:hover { background: #dcecf2; }
.member-link { text-underline-offset: 2px; }
.member-help { margin-block: -4px 0; font-size: .9rem; }
.member-status { color: var(--muted); }
.member-status:not(:empty) { margin-bottom: 8px; }
.member-status.has-error { color: var(--error); }

.member-admin-page .member-shell { width: min(100% - 28px, 56rem); margin-top: clamp(14px, 5vh, 46px); }
.member-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
  color: var(--dark-violet);
}
.member-admin-bar nav { display: flex; flex-wrap: wrap; gap: 7px; }
.member-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.member-panel { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #f8fbfc, #fff8f4); }
.member-panel h2 { margin-bottom: 10px; font-size: 1.125rem; }
.member-list { padding-left: 0; list-style: none; }
.member-list-item { padding-block: 7px; border-top: 1px solid var(--line); }
.member-username { display: inline-block; font-weight: 700; }
.member-reset > summary, .member-change > summary {
  min-height: 44px;
  padding-block: 10px;
  color: var(--dark-violet);
  font-weight: 650;
  cursor: pointer;
}
.member-change { margin-top: 13px; }
.member-change > form { max-width: 32rem; }

@media (max-width: 640px) {
  .member-admin-grid { grid-template-columns: 1fr; }
  body { background-attachment: scroll; }
  .member-shell { margin-top: 18px; border-radius: 19px; }
  .member-celestial span { width: 27px; height: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
