:root {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #19343c;
  background: #f1f6f6;
  line-height: 1.6;
  font-synthesis: none;
  --ink: #1a333b;
  --muted: #51676f;
  --accent: #10686a;
  --line: #d2dfe2;
}

* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0 }
header, main { padding-inline: max(20px, calc((100% - 920px) / 2)) }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 18px;
  background: white;
  border-bottom: 1px solid var(--line);
}
h1, h2, h3 { margin: 0 }
h1 { font-size: 21px }
h2 { font-size: 18px }
h3 { font-size: 15px }
main { padding-block: 24px 44px }
button, input, select { font: inherit }
button, select, input {
  border: 1px solid #aebfc5;
  border-radius: 7px;
  padding: 7px 12px;
  color: inherit;
  background: #fff;
}
button { cursor: pointer }
button:hover, a:hover { filter: brightness(.94) }
button:disabled { cursor: progress; opacity: .65 }
button.primary, button[type="submit"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
a { color: var(--accent) }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid #12777a;
  outline-offset: 3px;
}
form { display: grid; gap: 13px }
form label { display: grid; gap: 4px; font-size: 14px }
form input, form select { width: 100%; min-width: 0; min-height: 44px }
#status, #phone-notice { margin: 0 0 14px; color: var(--muted); font-size: 14px }
#status:empty, #phone-notice:empty { display: none }
#status[data-error], #phone-notice[data-error] { color: #a12922 }
#account { display: flex; align-items: center; gap: 10px; white-space: nowrap }

body.signed-out {
  background: #eff5f5 url("/login-model.jpg") center / cover no-repeat fixed;
}
body.signed-out main {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding-block: 30px;
  background: linear-gradient(135deg, rgb(242 249 248 / 94%), rgb(224 240 239 / 74%));
}
.sign-in { width: min(100%, 430px) }
.sign-in-card {
  display: grid;
  gap: 19px;
  padding: clamp(23px, 5vw, 39px);
  border: 1px solid rgb(255 255 255 / 85%);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 70px rgb(18 61 66 / 13%);
}
.brand { display: flex; align-items: center; justify-content: center; gap: 13px; margin-bottom: 8px }
.brand h1 { font-size: clamp(18px, 5vw, 24px); font-weight: 700; color: var(--ink) }
.brand-mark {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--accent);
}
.brand-mark span {
  display: block;
  width: 16px;
  height: 8px;
  margin-top: -2px;
  border: 1px solid #e4fffb;
  border-radius: 2px;
  transform: rotate(-20deg) skewX(26deg);
}
.sign-in-note { margin: 0; color: var(--muted); font-size: 14px }
#sign-in-notice:empty { display: none }
#sign-in-notice:has(#status:empty) { display: none }
#sign-in-notice #status { margin: 0 }
.sign-in form button[type="submit"], .full { width: 100%; min-height: 45px }
#wechat-login p { margin-bottom: 12px }
.methods { display: flex; flex-wrap: wrap; gap: 5px; background: #f0f5f5; border-radius: 9px; padding: 4px }
.methods button { flex: 1; white-space: nowrap; border-color: transparent; background: transparent; font-size: 14px }
.methods button[aria-pressed="true"] { background: white; border-color: #d4e3e3; color: #0d6060 }
.sms-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end }
.sms-row button { min-height: 44px; font-size: 13px }
.trial-option { display: grid; gap: 6px; text-align: center; border-top: 1px solid #e0e8e8; padding-top: 15px }
.trial-option button { min-height: 44px; color: #0c6263; border-color: #b9d4d4; background: #f1f9f8; font-weight: 650 }
.trial-option p { margin: 0; color: var(--muted); font-size: 13px }

#project-list { display: grid; gap: 10px; margin-top: 13px }
.project-row { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 18px }
.project-row { display: flex; align-items: center; justify-content: space-between; gap: 16px }
.project-row button { min-width: 6em }
.empty-state { color: var(--muted); margin: 12px 0 }
#formal-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: start; margin-bottom: 12px }
#formal-tools:not(:has(> :not([hidden]))) { display: none }
#invite-members {
  padding: 6px 12px;
  background: white;
  border: 1px solid #aebfc5;
  border-radius: 7px;
}
#invite-members summary { cursor: pointer }
#send-invite { padding-block: 8px }
dialog { width: min(calc(100% - 2rem), 395px); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); padding: 24px }
dialog::backdrop { background: rgb(20 45 52 / 40%) }
dialog h2 { margin-bottom: 14px }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px }

@media (max-width: 400px) {
  header, main { padding-inline: 14px }
  header h1 { font-size: 17px }
}
