@import "./theme.css";
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:is(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
button { -webkit-tap-highlight-color: transparent; }
button, input { transition: background-color .15s, border-color .15s, color .15s; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.page { max-width: 1280px; min-height: 100svh; margin-inline: auto; padding: 0 clamp(20px, 4.4vw, 58px); display: flex; flex-direction: column; }
.topbar, .footer, .brand, .tools, .plain-tool, .domain { display: flex; align-items: center; }
.topbar, .footer { justify-content: space-between; }
.topbar { min-height: clamp(73px, 10vh, 100px); gap: 16px; }
.brand { gap: 11px; }
.wordmark { color: var(--ink); font-size: 1.5rem; line-height: 1; font-weight: 720; letter-spacing: -.045em; }
.brand-caption { border-left: 1px solid var(--input-line); padding-left: 12px; margin-left: 3px; font-size: .875rem; font-weight: 550; color: var(--muted); }
.tools { gap: 19px; }
.preview-tag { border: 1px solid var(--line); background: var(--sky); color: var(--brand-strong); border-radius: 99px; padding: 3px 10px; font-size: .77rem; font-weight: 550; letter-spacing: .045em; white-space: nowrap; }
.plain-tool, .back-link, .text-button, .icon-only { border: 0; background: transparent; color: var(--muted); }
.plain-tool { min-height: 40px; gap: 6px; padding: 4px 0; font-size: .875rem; }
.plain-tool:hover, .back-link:hover, .text-button:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 4px; }
.auth-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,440px);
  align-items: center;
  gap: clamp(34px, 7.5vw, 110px);
  margin: auto 0;
  padding-block: clamp(22px, 4vh, 54px);
}
.panel-art { min-width: 0; padding-inline: clamp(0px, 2vw, 28px); }
.hero-copy .hero-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.hero-copy p { margin: 14px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.hero-illustration {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-height: clamp(196px, 24vw, 278px);
  max-width: 510px;
  margin-top: 32px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #e5edf8, #eef2f7 80%);
}
.hero-illustration::before, .hero-illustration::after {
  content: "";
  position: absolute;
  inset: 13% 7%;
  z-index: -1;
  border: 1px solid #bfd0e8;
  border-radius: 50%;
}
.hero-illustration::after { inset: 20% 13%; border-color: #cedced; }
.hero-identity {
  width: min(210px, 64%);
  padding: 17px;
  border: 1px solid #b4c9e9;
  border-radius: 18px;
  background: #c7d8f1;
  box-shadow: 0 13px 30px -12px #48679670;
  transform: rotate(-6deg);
}
.hero-identity img { display: block; }
.hero-tiles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); justify-items: center; gap: 8px; margin-top: 13px; }
.hero-tiles .icon { width: 100%; height: auto; aspect-ratio: 1; padding: 22%; border-radius: 9px; background: #f6f9fd; color: var(--brand); }
.workspace {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 3.2vw, 42px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
#screen { width: 100%; max-width: 375px; }
.screen-view { width: 100%; }
.view-head { margin-bottom: 26px; }
.view-head h1, .view-head h2, .dialog-head h2 { font-size: clamp(1.55rem, 2.35vw, 2rem); line-height: 1.24; margin: 0; font-weight: 660; letter-spacing: -.045em; }
.view-head :is(h1,h2):focus { outline: none; }
.intro { font-size: .94rem; line-height: 1.65; color: var(--muted); margin: 9px 0 0; }
.qr-stage { display: grid; justify-items: center; gap: 11px; margin: 0 auto 17px; }
.qrbox { --corner: var(--accent); border: 1px solid var(--line); border-radius: 15px; background: #f8fafd; padding: 14px; width: clamp(171px, 21vh, 204px); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.qrbox::before { content: ""; position: absolute; inset: 9px; pointer-events: none; background:
 linear-gradient(var(--corner),var(--corner)) left top / 13px 2px,
 linear-gradient(var(--corner),var(--corner)) left top / 2px 13px,
 linear-gradient(var(--corner),var(--corner)) right top / 13px 2px,
 linear-gradient(var(--corner),var(--corner)) right top / 2px 13px,
 linear-gradient(var(--corner),var(--corner)) left bottom / 13px 2px,
 linear-gradient(var(--corner),var(--corner)) left bottom / 2px 13px,
 linear-gradient(var(--corner),var(--corner)) right bottom / 13px 2px,
 linear-gradient(var(--corner),var(--corner)) right bottom / 2px 13px; background-repeat: no-repeat; }
.qrbox img { width: 100%; display: block; }
.qr-stage.is-expired .qrbox img { opacity: .23; }
.qr-stage.is-expired .status-dot { background: #8a7957; }
.qr-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .83rem; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #398362; }
.btn { border: 1px solid transparent; min-height: 45px; border-radius: 12px; padding: 10px 16px; font-size: .95rem; font-weight: 570; display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; }
.btn-primary { width: 100%; background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-secondary { color: var(--brand); border-color: var(--input-line); background: #fff; }
.btn-secondary:hover { background: var(--sky); }
.btn-secondary:disabled { background: #f1f5f9; color: var(--muted); }
.demo-note { margin: 8px 0 0; text-align: center; font-size: .78rem; color: var(--muted); line-height: 1.55; }
.demo-note summary { cursor: pointer; padding: 5px; text-decoration: underline; text-underline-offset: 3px; }
.demo-note p { margin: .3rem 0; overflow-wrap: anywhere; }
.alternates { margin-top: 24px; }
.divider { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.method-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); margin-top: 13px; gap: 9px; }
.method-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: #334155; background: #fff; border: 1px solid var(--line); padding: 10px 2px 9px; border-radius: 9px; min-height: 60px; font-size: .82rem; }
.method-btn:hover, .choice-btn:hover { background: var(--sky); border-color: #afc4e3; }
.method-btn .icon { width: 20px; height: 20px; }
.method-ding .icon { color: #2675bd; }
.method-phone .icon, .method-mail .icon { color: var(--brand); }
.method-wechat .icon { color: #29814e; }
.back-link { padding: 3px 0; font-size: .87rem; margin: 0 0 15px; min-height: 32px; }
.form-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-size: .9rem; font-weight: 580; }
.input { width: 100%; min-width: 0; min-height: 45px; border: 1px solid var(--input-line); color: var(--ink); border-radius: 11px; padding: 9px 12px; background: white; font-size: 1rem; }
.input::placeholder { color: #64748b; }
.input[readonly] { background: #f1f5f9; }
.otp-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.hint, .feedback { font-size: .85rem; line-height: 1.65; margin: 0; }
.hint { color: var(--muted); }
.feedback, .success-note { padding: 9px 11px; border-radius: 7px; margin: 10px 0; }
.is-error { color: #872d27; background: #fff1ee; }
.success-note { background: #ecf5e9; color: #255c3f; }
.choice-list { display: grid; gap: 10px; }
.choice-btn { display: flex; align-items: center; text-align: left; gap: 12px; width: 100%; padding: 13px; background: white; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; }
.method-icon { display: inline-flex; align-items: center; justify-content: center; width: 37px; height: 37px; flex: none; background: var(--sky); color: var(--brand); border-radius: 9px; }
.method-icon .icon { width: 21px; height: 21px; }
.choice-btn > .icon { margin-left: auto; width: 15px; height: 15px; color: var(--muted); }
.choice-copy, .binding-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.choice-title, .binding-copy strong { font-size: .95rem; font-weight: 600; }
.choice-meta, .binding-copy span { font-size: .83rem; color: var(--muted); overflow-wrap: anywhere; }
.binding-row { display: flex; gap: 11px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.binding-list { border-top: 1px solid var(--line); }
.row-actions { margin-left: auto; flex: none; display: flex; gap: 9px; }
.text-button { padding: 7px 1px; font-size: .85rem; color: var(--brand-strong); }
.action-row { display: flex; gap: 10px; margin-top: 23px; }
.action-row .btn { width: 100%; }
.footer { margin-top: auto; gap: 12px; padding: 14px 3px 22px; color: var(--muted); }
.domain { gap: 6px; font-size: .82rem; letter-spacing: .02em; }
.footer .plain-tool { font-size: .81rem; }
dialog { width: min(420px, calc(100% - 32px)); padding: 26px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); box-shadow: 0 15px 65px #0f172a26; }
dialog::backdrop { background: #172b4566; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { font-size: 1.36rem; }
.icon-only { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--sky); }
dialog p { margin: 15px 0 0; line-height: 1.75; font-size: .94rem; }
.help-foot { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: .83rem; }
@media (max-width: 850px) {
  .page { max-width: 610px; }
  .topbar { min-height: 73px; }
  .auth-card { grid-template-columns: minmax(0,1fr); padding-block: 12px 26px; }
  .panel-art { display: none; }
  .workspace { padding: 28px clamp(19px,6vw,44px); border-radius: 20px; }
  .view-head { margin-bottom: 22px; }
  .topbar .tools { gap: 10px; }
  .footer { padding-top: 8px; }
}
@media (max-width: 440px) {
  .page { padding: 0 14px; }
  .brand { gap: 8px; }
  .brand-caption { display: none; }
  .brand img { width: 31px; height: 31px; }
  .wordmark { font-size: 1.5rem; }
  .topbar .tools { gap: 12px; }
  .plain-tool { font-size: .81rem; }
  .workspace { padding: 25px 20px; }
  .otp-row .btn-secondary { padding-inline: 10px; }
  .method-row { gap: 7px; }
  .qrbox { width: 170px; }
}
@media (prefers-reduced-motion: reduce) {
  button, input { transition: none; }
}

.method-list { display: grid; gap: 10px; margin: 18px 0; }
.method-choice { border: 1px solid var(--line); border-radius: 12px; }
.method-choice summary { cursor: pointer; font-weight: 600; padding: 13px 16px; }
.method-choice summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.method-choice[open] { border-color: #9fb9de; }
.method-choice .form-stack { padding: 0 16px 16px; gap: 10px; }
.method-pending { margin: 0; color: var(--muted); font-size: .84rem; }

a.method-btn { text-decoration: none; }
.method-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.method-unavailable { color: var(--muted); background: #f8fafc; }
.method-unavailable small { font-size: .67rem; }
.qr-embed { width: 176px; }
.qr-embed iframe { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); border: 0; background: white; }
.qr-embed::before { z-index: 1; }
.qr-refresh { display: flex; align-items: center; gap: 5px; padding: 0; }
.qr-refresh[hidden] { display: none; }
.login-help { position: relative; z-index: 2; }
.login-help summary { cursor: pointer; list-style: none; }
.login-help summary::-webkit-details-marker { display: none; }
.login-help div { position: absolute; right: 0; top: 100%; width: min(280px, 76vw); padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 12px 28px #172b4520; }
.login-help p { font-size: .86rem; line-height: 1.65; margin: 3px 0 7px; }

.project-directory { width: 100%; max-width: 1030px; margin: 0 auto auto; padding-block: clamp(28px, 8vh, 88px) 34px; }
.project-directory .view-head { margin-bottom: 28px; }
.project-directory .view-head h1 { font-size: clamp(1.85rem, 3.6vw, 2.7rem); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px),1fr)); gap: clamp(14px, 2.2vw, 24px); }
.project-link {
  position: relative;
  display: grid;
  gap: 22px;
  min-height: 185px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 12px 28px -20px #46658b52;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.project-link:hover { border-color: #a9c0e1; box-shadow: var(--shadow); transform: translateY(-2px); }
.project-icon, .project-arrow { display: inline-grid; place-items: center; color: var(--brand); }
.project-icon { width: 52px; height: 52px; border-radius: 15px; background: var(--sky); }
.project-icon--office { background: #e9f0fb; }
.project-icon--campaign { background: #e7f2f8; color: #3b6784; }
.project-icon--performance { background: #eef0fb; color: #505f9b; }
.project-icon .icon { width: 26px; height: 26px; }
.project-arrow {
  position: absolute;
  inset: 24px 24px auto auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f8fafc;
  transition: background-color .16s ease, color .16s ease;
}
.project-link:hover .project-arrow { color: white; background: var(--brand); }
.project-copy { display: grid; align-content: end; gap: 5px; min-width: 0; }
.project-copy strong { font-size: clamp(1.05rem, 2vw, 1.22rem); font-weight: 680; }
.project-copy span { color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 25px; }
.project-actions form { margin: 0; }
.project-actions .btn-primary { color: var(--muted); background: transparent; }
.project-actions .btn-primary:hover { color: var(--brand-strong); background: var(--sky); }
.project-empty { padding: 28px; margin: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--muted); }
@media (max-width: 540px) {
  .project-directory { padding-top: 21px; }
  .project-directory .view-head { margin-bottom: 19px; }
  .project-link { min-height: 0; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 14px; padding: 16px 55px 16px 16px; border-radius: 16px; }
  .project-icon { width: 44px; height: 44px; border-radius: 12px; }
  .project-icon .icon { width: 23px; height: 23px; }
  .project-arrow { inset: 50% 14px auto auto; transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .project-link, .project-arrow { transition: none; }
  .project-link:hover { transform: none; }
}
