/* 重木的自留地 · 门户样式（www.yaoshaolin.com 专用，独立于相册站样式） */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-soft: #ccfbf1;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 10px 28px rgba(17, 24, 39, .06);
  --maxw: 960px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }

/* ===== 顶部 ===== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .02em;
}
.site-nav { display: flex; align-items: center; gap: 14px; margin-left: auto; color: var(--muted); font-size: .92rem; }

/* ===== Hero ===== */
.hero { padding: 64px 0 8px; text-align: center; }
.hero-badge {
  display: inline-block; padding: 4px 14px; margin: 0 0 16px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
  font-size: .85rem; font-weight: 600;
}
.hero h1 { margin: 0 0 14px; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: 0 auto; }

.section { padding: 36px 0 0; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow);
}
.auth-card { max-width: 460px; margin: 0 auto; }
.auth-card h2 { text-align: left; font-size: 1.15rem; margin: 0 0 14px; }

/* ===== 按钮 / 表单 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 22px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }

.auth-form .btn { width: 100%; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; text-align: left; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input[type="text"], .field input[type="password"] {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; background: var(--bg); color: var(--text); width: 100%;
}
.field input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.checkbox-field { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: .9rem; color: var(--muted); }
.checkbox-field input { width: 16px; height: 16px; }

.msg { font-size: .9rem; margin: 12px 0 0; text-align: center; }
.msg.error { color: #b91c1c; }
.msg.ok { color: var(--brand-dark); }
.msg.info { color: var(--muted); }
.hint { color: var(--muted); font-size: .86rem; text-align: center; margin: 12px 0 0; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .82rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }

details.quick-login { margin-top: 14px; }
details.quick-login summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
details.quick-login[open] summary { margin-bottom: 12px; }

/* ===== 扫码 ===== */
.qr-box { text-align: center; padding: 6px 0 0; }
.qr-img {
  width: 220px; height: 220px; margin: 0 auto 12px; display: block;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; object-fit: contain;
}
.qr-status { font-size: .92rem; color: var(--muted); min-height: 24px; margin: 0 0 8px; }
.qr-status.scanned { color: var(--brand-dark); font-weight: 600; }
.qr-status.expired { color: #b91c1c; }
.short-code { text-align: center; margin: 14px 0 0; padding: 12px; background: var(--bg); border-radius: 12px; }
.short-code-label { font-size: .86rem; color: var(--muted); margin: 0 0 4px; }
.short-code-value {
  font-size: 2rem; font-weight: 800; letter-spacing: .16em; color: var(--brand-dark); margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ===== 已登录：两扇门 ===== */
.welcome { text-align: center; font-size: 1.05rem; color: var(--muted); margin: 0 0 18px; }
.welcome strong { color: var(--text); }
.pill {
  display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: .78rem; font-weight: 600;
}
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.entry-card {
  position: relative; display: block; padding: 28px 26px 24px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .15s, border-color .15s, box-shadow .15s;
}
.entry-card:hover {
  text-decoration: none; transform: translateY(-3px); border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(13, 148, 136, .10), 0 16px 36px rgba(13, 148, 136, .14);
}
.entry-icon { font-size: 2rem; line-height: 1; }
.entry-card h2 { margin: 12px 0 6px; font-size: 1.2rem; }
.entry-card p { margin: 0 0 14px; color: var(--muted); font-size: .95rem; }
.entry-url {
  display: block; font-size: .82rem; color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.entry-go { display: inline-block; margin-top: 12px; color: var(--brand); font-weight: 700; font-size: .95rem; }

/* ===== 首页功能入口（账号设置 / 成员管理 / 使用说明 / 退出）===== */
.quick-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
  margin: 26px 0 4px;
}
.quick-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.quick-link:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ===== 页脚 ===== */
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; margin-top: 56px; color: var(--muted); font-size: .9rem; text-align: center; }
.site-footer p { margin: 0; }
.site-footer .beian { margin-top: 8px; font-size: .85rem; }
.site-footer .beian a { color: inherit; text-decoration: none; }
.site-footer .beian a:hover { text-decoration: underline; }

/* ===== 响应式 ===== */
@media (max-width: 560px) {
  .container { width: min(100% - 32px, var(--maxw)); }
  .hero { padding-top: 48px; }
}

/* 手机端：把"账号密码"提到最前，二维码挪到后面（手机没法扫自己屏幕） */
@media (max-width: 720px) {
  #loginBox { display: flex; flex-direction: column; }
  #loginFormWrap { order: 1; }
  #loginDivider { order: 2; }
  #qrLoginWrap { order: 3; }
  #loginBox details.quick-login { order: 4; }
  .qr-img { width: 200px; height: 200px; }
}
