/* 见青 · 原型共享样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --paper: #FAF9F6;
  --ink: rgba(31,36,40,.92);
  --ink-soft: rgba(31,36,40,.85);
  --gray: #8A8F98;
  --green: #2D3A31;
  --brass: #C9A962;
}
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 76px;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: .03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 1;
}
a { color: inherit; }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 0;
  font-size: 14px;
  position: relative;
  z-index: 2;
  min-height: 56px;
}
.topbar .back { color: var(--gray); text-decoration: none; }
.topbar .mini-brand {
  font-family: "Noto Serif SC", serif;
  font-size: 15px; font-weight: 600;
  color: var(--green);
}
.account {
  height: 36px; line-height: 36px;
  padding: 0 20px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--green);
  font-size: 13px; color: var(--green);
  cursor: pointer;
  white-space: nowrap;
}

/* 按钮 */
.btn-primary {
  display: block;
  height: 44px; line-height: 44px;
  border-radius: 999px;
  background: var(--green);
  color: rgba(250,249,246,.92);
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px -2px rgba(45,58,49,.18);
}
.btn-ghost {
  flex: 1;
  display: block;
  height: 44px; line-height: 42px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn-row { display: flex; gap: 12px; }

/* 底部导航（固定） */
.nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 64px;
  border-top: 1px solid rgba(31,36,40,.06);
  background: rgba(250,249,246,.94);
  backdrop-filter: blur(8px);
  font-size: 14px;
  z-index: 10;
}
.nav a { text-decoration: none; color: var(--gray); }
.nav a.on { color: var(--green); font-weight: 500; }

/* Toast */
.toast {
  position: fixed;
  bottom: 84px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--green);
  color: rgba(250,249,246,.95);
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 60;
  pointer-events: none;
  max-width: 84%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 登录弹窗（暗色黄铜） */
.login-mask {
  position: fixed; inset: 0;
  /* 调整渐变透明度，图片加载失败也好看 */
  background: linear-gradient(rgba(14,18,15,0.7),rgba(14,18,15,0.7)), url("./sakura_night.png") center / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 50;
  opacity: 0;
  transition: opacity .3s;
}
.login-mask.show {
  opacity: 1;
}

.login-dialog {
  position: relative;
  width: 100%; max-width: 380px;
  background: #1A201C;
  border: 1.5px solid rgba(201,169,98,.5);
  border-radius: 4px;
  padding: 32px 32px 28px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.4),
    0 0 48px rgba(201,169,98,.09),
    0 24px 64px rgba(0,0,0,.5);
  transform: translateY(10px);
  transition: transform .3s;
}
.login-mask.show .login-dialog { transform: translateY(0); }
.login-close {
  position: absolute; top: 14px; right: 16px;
  color: rgba(250,249,246,.35);
  font-size: 18px;
  cursor: pointer;
  background: none; border: none;
}
.login-brand {
  font-family: "Noto Serif SC", serif;
  font-size: 26px; font-weight: 600;
  color: rgba(250,249,246,.92);
}
.login-slogan { margin-top: 6px; font-size: 13px; color: rgba(250,249,246,.45); }
.login-reason {
  margin: 16px auto 0;
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(201,169,98,.65);
  font-size: 12px;
  color: var(--brass);
}
.login-field { margin-top: 24px; text-align: left; }
.login-field label {
  display: block;
  font-size: 12px;
  color: rgba(250,249,246,.45);
  margin-bottom: 8px;
}
.login-field input {
  width: 100%;
  height: 42px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(250,249,246,.18);
  border-radius: 0;
  padding: 0 2px;
  font-size: 14px;
  color: rgba(250,249,246,.9);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.login-field input:focus {
  border-bottom-color: var(--brass);
  box-shadow: 0 12px 16px -12px rgba(201,169,98,.6);
}
.login-field input::placeholder { color: rgba(250,249,246,.25); }
.login-err {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  color: #D08770;
  text-align: left;
}
.login-err.show { display: block; }
.btn-brass {
  display: block;
  width: 100%;
  margin-top: 28px;
  height: 42px; line-height: 42px;
  border: none;
  border-radius: 2px;
  background: linear-gradient(180deg, #D4B473, #C9A962);
  color: #1A1F1B;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 0 24px rgba(201,169,98,.40),
    0 2px 8px rgba(0,0,0,.4);
  transition: box-shadow .25s;
}
.btn-brass:hover {
  box-shadow:
    0 0 44px rgba(201,169,98,.65),
    0 2px 8px rgba(0,0,0,.4);
}
.btn-brass:disabled { opacity: .6; cursor: default; }
.login-fineprint {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(250,249,246,.3);
  line-height: 1.8;
}

/* 确认弹窗（浅色） */
.confirm-mask {
  position: fixed; inset: 0;
  background: rgba(31,36,40,.35);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 50;
  opacity: 0;
  transition: opacity .25s;
}
.confirm-mask.show { opacity: 1; }
.confirm-dialog {
  width: 100%; max-width: 320px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
  text-align: center;
}
.confirm-dialog h4 { font-size: 16px; font-weight: 600; color: var(--ink); }
.confirm-dialog p { margin-top: 10px; font-size: 13px; color: var(--gray); line-height: 1.8; }
.confirm-actions { display: flex; gap: 12px; margin-top: 22px; }
.confirm-actions .btn-ghost { height: 40px; line-height: 38px; }
.confirm-actions .btn-danger {
  flex: 1;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: var(--green);
  color: rgba(250,249,246,.92);
  font-size: 14px;
  cursor: pointer;
}

/* 演示面板（原型工具） */
.demo-fab {
  position: fixed;
  left: 12px; bottom: 72px;
  z-index: 40;
  font-size: 11px;
  color: var(--gray);
  border: 1px dashed rgba(138,143,152,.5);
  background: rgba(250,249,246,.9);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
}
.demo-panel {
  position: fixed;
  left: 12px; bottom: 106px;
  z-index: 40;
  background: #fff;
  border: 1px solid rgba(31,36,40,.1);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 8px 32px rgba(45,58,49,.15);
  display: none;
  max-width: 240px;
}
.demo-panel.show { display: block; }
.demo-panel h5 { font-size: 11px; color: var(--gray); margin-bottom: 8px; font-weight: 500; }
.demo-panel button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 12px;
  color: var(--green);
  padding: 7px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.demo-panel button:hover { background: rgba(45,58,49,.06); }

/* 打字指示器 */
.typing { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.typing i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(138,143,152,.7);
  animation: tp 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes tp {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* 呼吸动画（报告加载 / 照见卡） */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* 骨架屏 */
.skel {
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(45,58,49,.06) 25%, rgba(45,58,49,.12) 50%, rgba(45,58,49,.06) 75%);
  background-size: 200% 100%;
  animation: skel 1.4s infinite;
}
@keyframes skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
