:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #15201c;
  --muted: #64736d;
  --line: #dfe7e3;
  --green: #16a34a;
  --green-dark: #126b36;
  --green-soft: #e8f7ee;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --yellow: #d99a00;
  --shadow: 0 10px 30px rgba(25, 55, 42, .07);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 197, 94, .08), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(45, 212, 191, .07), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }

.shell { width: min(720px, calc(100% - 40px)); margin: 0 auto; }
.site-header { padding: 26px 0 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; flex: none; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.12; }
.brand-copy strong { font-size: 15px; letter-spacing: -.2px; }
.brand-copy span { color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.ghost-button, .secondary-button, .primary-button, .danger-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 15px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.ghost-button { color: var(--muted); background: transparent; }
.ghost-button:hover { color: var(--text); background: rgba(255, 255, 255, .7); }
.primary-button { color: #fff; background: var(--green); border-color: var(--green); }
.primary-button:hover { background: #128a3e; }
.secondary-button { color: var(--text); background: var(--surface); border-color: var(--line); }
.secondary-button:hover { border-color: #bfcfc7; }
.danger-button { color: var(--red); background: var(--red-soft); border-color: #fecaca; }
.danger-button:hover { background: #fee2e2; }
.full { width: 100%; }

.page { padding: 46px 0 70px; }
.view { animation: rise .24s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.hero { padding: 18px 0 26px; }
.hero-kicker { color: var(--green-dark); font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.hero h1 { margin: 9px 0 0; font-size: clamp(36px, 7vw, 54px); line-height: 1.08; letter-spacing: -.045em; font-weight: 650; }
.hero-text { margin: 18px 0 0; color: var(--muted); max-width: 520px; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-note { margin: 18px 0 0; color: var(--green-dark); font-size: 12px; }
.hero-note a { text-decoration: underline; text-underline-offset: 3px; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 26px 0 0; }
.service-chip { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .78); }
.service-chip:hover { border-color: #bcd5c8; background: #fff; }
.service-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.service-chip span:last-child { display: flex; flex-direction: column; min-width: 0; }
.service-chip strong { font-size: 13px; }
.service-chip small { color: var(--muted); font-size: 10.5px; }
.home-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.home-panel h2 { margin: 0; font-size: 14px; }
.home-panel p { margin: 4px 0 0; color: var(--muted); font-size: 12px; max-width: 440px; }
.home-status { flex: none; color: var(--muted); font-size: 12px; text-align: right; }
.home-status strong { color: var(--green-dark); }

.auth-card { max-width: 430px; margin: 20px auto 0; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.auth-heading h1 { margin: 8px 0 0; font-size: 27px; letter-spacing: -.03em; }
.auth-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.auth-heading p strong { color: var(--text); font-weight: 600; word-break: break-all; }
.mode-tabs { display: flex; gap: 4px; margin: 22px 0 0; padding: 4px; border-radius: 10px; background: var(--surface-2); }
.mode-tab { flex: 1; min-height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; }
.mode-tab.active { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(20, 40, 30, .08); }
.form { display: flex; flex-direction: column; margin-top: 20px; }
.form.compact { margin-top: 13px; }
.field-label { margin: 13px 0 6px; color: var(--text); font-size: 12px; font-weight: 600; }
.field-label:first-child { margin-top: 0; }
.input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); outline: none; font-size: 14px; }
.input::placeholder { color: #9aa8a2; }
.input:focus { border-color: #86bfa1; box-shadow: 0 0 0 3px rgba(22, 163, 74, .10); }
select.input { appearance: auto; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.reveal-button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-height: 28px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; }
.reveal-button:hover { color: var(--text); background: var(--surface-2); }
.code-input { font-size: 22px; font-weight: 650; letter-spacing: .34em; text-align: center; font-variant-numeric: tabular-nums; }
.form-error { margin: 11px 0 0; padding: 8px 10px; border-radius: 7px; background: var(--red-soft); color: #b91c1c; font-size: 12px; }
.input + .form-error { margin-top: 10px; }
.primary-button.full, .secondary-button.full, .danger-button.full { margin-top: 18px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.auth-links a:hover, .auth-links button:hover { color: var(--text); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.auth-footnote { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: #8a9791; font-size: 11px; }

.account-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 8px 0 22px; }
.account-heading h1 { margin: 8px 0 0; font-size: 34px; letter-spacing: -.04em; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.account-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.account-card h2 { margin: 0 0 14px; font-size: 14px; }
.profile-list { display: flex; flex-direction: column; gap: 0; margin: 0; }
.profile-list div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.profile-list div:first-child { border-top: 0; padding-top: 0; }
.profile-list dt { color: var(--muted); font-size: 12px; }
.profile-list dd { margin: 0; text-align: right; font-size: 12.5px; overflow-wrap: anywhere; }
.badge { display: inline-flex; padding: 2px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.badge.ok { color: var(--green-dark); background: var(--green-soft); }
.badge.warn { color: #9a6700; background: #fef7e0; }
.badge.gray { color: var(--muted); background: var(--surface-2); }
.field-hint { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; }
.account-card .form.compact .field-label:first-child { margin-top: 0; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 10px 15px; border-radius: 9px; background: #1d2a24; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); font-size: 12px; z-index: 20; }

@media (max-width: 620px) {
  .shell { width: calc(100% - 28px); }
  .site-header { padding-top: 18px; }
  .header-inner { align-items: flex-start; }
  .header-actions .ghost-button[href="/"] { display: none; }
  .page { padding: 30px 0 48px; }
  .hero { padding-top: 8px; }
  .hero h1 { font-size: 38px; }
  .service-grid, .account-grid { grid-template-columns: 1fr; }
  .home-panel { align-items: flex-start; flex-direction: column; }
  .home-status { text-align: left; }
  .auth-card { margin-top: 8px; padding: 22px; border-radius: 13px; }
  .account-heading h1 { font-size: 28px; }
  .account-heading { align-items: center; }
  .account-card { padding: 17px; }
}
