:root {
  color-scheme: light;
  --ink: #173c42;
  --sub: #6a8288;
  --teal: #078d82;
  --line: #dbe9e8;
  --bg: #f2f7f6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    15px/1.65 system-ui,
    -apple-system,
    "Microsoft YaHei",
    sans-serif;
}
a {
  color: #087f78;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #6dbcb4;
  outline-offset: 3px;
}
.member-page {
  max-width: 1120px;
  padding: 0 24px;
  margin: auto;
}
.member-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}
.back-link {
  font-size: 14px;
  text-decoration: none;
}
.member-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
  border-radius: 20px;
  background: linear-gradient(120deg, #155e75, #0b8a7d);
  color: #fff;
  overflow: hidden;
}
.member-hero h1 {
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 4px 0 8px;
}
.member-hero p {
  margin: 0;
  opacity: 0.88;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  font-weight: 700;
}
.hero-mark {
  width: 92px;
  height: 92px;
  object-fit: contain;
  opacity: 0.2;
}
.notice {
  padding: 12px 16px;
  border: 1px solid #cbe3df;
  border-left: 4px solid var(--teal);
  background: #eaf5f2;
  border-radius: 10px;
  color: #426d67;
}
.message {
  position: sticky;
  top: 8px;
  z-index: 5;
  padding: 12px 16px;
  border: 1px solid #dfb181;
  background: #fff6e9;
  color: #8f4f0e;
  border-radius: 10px;
}
.message.success {
  background: #eaf8f0;
  color: #1c754d;
  border-color: #acdec0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 32px 0;
}
.auth-description {
  padding: 18px;
}
.auth-description h2 {
  font-size: 29px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}
.auth-description p {
  max-width: 30em;
  color: var(--sub);
}
.auth-description a {
  text-decoration: none;
  font-size: 14px;
}
.section-kicker {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  gap: 20px;
}
.auth-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  padding: 8px 0 12px;
  color: var(--sub);
  font-weight: 600;
}
.auth-tabs button[aria-selected="true"] {
  border-bottom-color: var(--teal);
  color: var(--ink);
}
form > label,
.profile-form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
input:not([type="checkbox"]),
select,
textarea {
  border: 1px solid #ccdedb;
  border-radius: 8px;
  background: #fcfefe;
  color: var(--ink);
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.check-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px !important;
}
.primary,
.secondary,
.quiet,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 9px 16px;
  min-height: 42px;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.5;
}
.primary {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
}
.secondary {
  background: #edf8f5;
  color: #087969;
  border-color: #c2e2d9;
}
.quiet {
  background: #fff;
  color: #426b70;
  border-color: var(--line);
}
.danger {
  background: #fff6f3;
  color: #b74628;
  border-color: #f1d0c5;
}
.full {
  width: 100%;
}
.muted {
  font-size: 13px;
  color: var(--sub);
}
.account-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 18px;
}
.account-heading h2 {
  margin: 0;
  font-size: 23px;
}
.account-heading p {
  margin: 2px 0;
}
.account-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow: auto;
}
.account-tabs a {
  white-space: nowrap;
  padding: 10px 15px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  color: var(--sub);
}
.account-tabs a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 700;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
h2 {
  font-size: 22px;
  margin: 4px 0 12px;
}
h3 {
  font-size: 16px;
  margin: 0 0 12px;
}
.pill {
  padding: 3px 10px;
  border-radius: 99px;
  background: #eaf5f1;
  color: #187862;
  font-size: 12px;
  white-space: nowrap;
}
.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin-top: 24px;
}
.span-all {
  grid-column: 1/-1;
}
.subjects {
  grid-column: 1/-1;
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.subjects legend {
  font-size: 14px;
  margin-bottom: 8px;
}
.subjects label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}
.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.form-actions label {
  margin: 0;
}
.benefit-card {
  background: #f0faf5;
  border: 1px solid #cce6d9;
  border-radius: 12px;
  padding: 24px;
  margin: 18px 0;
}
.benefit-card strong {
  font-size: 24px;
  color: #178563;
}
.benefit-card p {
  margin: 6px 0;
}
.security-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 22px;
}
.security-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.device {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.device small {
  display: block;
  color: var(--sub);
}
.device button {
  margin-top: 6px;
}
.wish-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 16px 0;
  padding: 18px;
}
.wish-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}
.wish-heading h3 {
  margin: 0;
}
.wish-index {
  font-size: 13px;
  color: var(--teal);
  font-weight: 700;
}
.wish-preferred-major {margin:12px 0;padding:12px 14px;border:1px solid #f0c59c;border-left:4px solid #d97706;border-radius:10px;background:#fff9ef}
.wish-preferred-label {display:block;margin-bottom:4px;color:#b45309;font-size:12px}
.wish-preferred-major strong {font-size:16px;color:#263238}
.wish-preferred-major p {margin:5px 0 0;font-size:12px}
.wish-card textarea {
  font-size: 13px;
  min-height: 65px;
  margin: 10px 0 6px;
}
.wish-card details {
  font-size: 13px;
  margin: 12px 0;
}
.wish-card summary {
  color: var(--teal);
  cursor: pointer;
}
.wish-card ul {
  padding-left: 18px;
}
.wish-review {
  color: #aa590e;
  background: #fff6e8;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}
.wish-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wish-actions button {
  font-size: 12px;
  min-height: 36px;
  padding: 6px 11px;
}
.empty {
  padding: 40px 18px;
  text-align: center;
  color: var(--sub);
  border: 1px dashed var(--line);
  border-radius: 12px;
  margin-top: 18px;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 26px 0;
}
.preview-grid article > span {
  color: var(--teal);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.preview-grid p {
  color: var(--sub);
  font-size: 14px;
}
.preview-grid h2 {
  font-size: 19px;
}
.admin-row {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  margin-top: 16px;
}
.admin-row .form-actions {
  margin-top: 8px;
}
.admin-row input {
  width: 180px;
}
.admin-row input[type="number"] {
  width: 100px;
}
footer {
  padding: 28px 0 24px;
  color: var(--sub);
  font-size: 12px;
  text-align: center;
}
footer a {
  margin-left: 12px;
}
dialog {
  max-width: 520px;
  width: calc(100% - 32px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  color: var(--ink);
}
dialog::backdrop {
  background: #103c4466;
}
dialog code {
  display: block;
  overflow-wrap: anywhere;
  background: #f1f8f6;
  padding: 14px;
  font-size: 16px;
  margin: 18px 0;
}
dialog p {
  font-size: 14px;
}
.privacy-copy {
  max-width: 800px;
  margin: 16px auto;
}
.privacy-copy h2 {
  font-size: 19px;
  margin-top: 25px;
}
.privacy-copy li {
  margin: 8px 0;
}
@media (max-width: 700px) {
  .member-page {
    padding: 0 14px;
  }
  .member-header {
    padding: 14px 2px;
  }
  .brand {
    font-size: 17px;
  }
  .member-hero {
    padding: 24px 20px;
    border-radius: 14px;
  }
  .member-hero h1 {
    font-size: 22px;
  }
  .member-hero p {
    font-size: 12px;
  }
  .hero-mark {
    display: none;
  }
  .panel {
    padding: 20px 16px;
    border-radius: 12px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 14px 0;
  }
  .auth-description {
    padding: 6px 4px;
  }
  .auth-description h2 {
    font-size: 22px;
    margin: 8px 0;
  }
  .auth-description h2 br {
    display: none;
  }
  .auth-description p {
    font-size: 13px;
  }
  .auth-tabs {
    gap: 24px;
  }
  .profile-form {
    gap: 0 14px;
  }
  .subjects {
    gap: 10px;
  }
  .account-tabs {
    gap: 0;
  }
  .account-tabs a {
    padding: 9px 10px;
    font-size: 13px;
  }
  .security-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .preview-grid .panel {
    padding: 16px;
  }
  .preview-grid h2,
  .preview-grid p {
    margin: 4px 0;
  }
  .account-heading h2 {
    font-size: 20px;
  }
  .wish-card {
    padding: 14px 12px;
  }
  .wish-heading {
    gap: 8px;
  }
  h2 {
    font-size: 19px;
  }
  .notice {
    font-size: 13px;
  }
  .pill {
    font-size: 11px;
  }
  .security-footer > * {
    flex: 1 1 auto;
  }
}
