/* ============================================================
   二中碰碰车 · 样式
   设计要点：简约背景 + 半透明玻璃卡片 + 左侧半屏抽屉菜单
   ============================================================ */

:root {
  --bg: #eef1f7;
  --ink: #1d2027;
  --ink-soft: #5c6270;
  --ink-faint: #868d9c;
  --line: rgba(24, 28, 40, 0.09);
  --card: rgba(255, 255, 255, 0.55);
  --card-strong: rgba(255, 255, 255, 0.78);
  --field: rgba(255, 255, 255, 0.72);
  --accent: #3f6bff;
  --accent-soft: rgba(63, 107, 255, 0.12);
  --danger: #e2494d;
  --shadow: 0 18px 44px rgba(24, 32, 64, 0.1);
  --shadow-soft: 0 6px 20px rgba(24, 32, 64, 0.07);
  --radius: 20px;
  --radius-sm: 13px;
  --bar-h: 60px;
  --drawer-w: clamp(268px, 68vw, 400px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* 屏幕够宽时，菜单正好占一半 */
@media (min-width: 640px) {
  :root {
    --drawer-w: 50vw;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141c;
    --ink: #eef1f8;
    --ink-soft: #a9b0c2;
    --ink-faint: #7d8496;
    --line: rgba(255, 255, 255, 0.11);
    --card: rgba(32, 36, 50, 0.5);
    --card-strong: rgba(34, 38, 54, 0.8);
    --field: rgba(255, 255, 255, 0.07);
    --accent: #7c98ff;
    --accent-soft: rgba(124, 152, 255, 0.16);
    --danger: #ff7a7d;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
    --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 背景：两块柔和的色斑 + 淡淡的网格 ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}

.sky-top {
  width: 118vw;
  height: 118vw;
  max-width: 820px;
  max-height: 820px;
  top: -46vw;
  left: -28vw;
  background: radial-gradient(circle at 30% 30%, rgba(122, 158, 255, 0.5), transparent 62%);
}

.sky-bottom {
  width: 110vw;
  height: 110vw;
  max-width: 760px;
  max-height: 760px;
  right: -34vw;
  bottom: -44vw;
  background: radial-gradient(circle at 60% 40%, rgba(255, 178, 194, 0.42), transparent 62%);
}

@media (min-width: 720px) {
  .sky::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(120, 130, 160, 0.07) 1px, transparent 1px),
      linear-gradient(90deg, rgba(120, 130, 160, 0.07) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse at 50% 22%, #000 12%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 22%, #000 12%, transparent 78%);
  }
}

@media (prefers-color-scheme: dark) {
  .sky-top {
    background: radial-gradient(circle at 30% 30%, rgba(66, 92, 190, 0.42), transparent 62%);
  }
  .sky-bottom {
    background: radial-gradient(circle at 60% 40%, rgba(140, 66, 96, 0.34), transparent 62%);
  }
}

/* ---------- 应用骨架 ---------- */

#app {
  position: relative;
  z-index: 1;
}

.app {
  min-height: 100dvh;
  padding-bottom: calc(96px + var(--safe-bottom));
}

/* 只有内容区会被模糊，抽屉菜单保持清晰 */
.app-blur {
  min-height: 100dvh;
  transition: filter 0.34s ease;
}

body.drawer-open .app-blur {
  filter: blur(5px) saturate(0.88) brightness(0.98);
  pointer-events: none;
  user-select: none;
}

.app-inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 14px;
}

/* 打开菜单时，右侧原本的内容整体模糊 */
body.drawer-open .app-blur {
  pointer-events: none;
  user-select: none;
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(18, 22, 34, 0.26);
  backdrop-filter: blur(1px);
  animation: fade-in 0.28s ease both;
}

/* ---------- 顶栏：左上角头像 + 网站名称 ---------- */

.hero {
  padding-top: calc(var(--safe-top) + 14px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: var(--bar-h);
  margin: 0 -6px;
  padding: 8px 6px;
  background: linear-gradient(180deg, rgba(238, 241, 247, 0.86), rgba(238, 241, 247, 0.6));
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

@media (prefers-color-scheme: dark) {
  .topbar {
    background: linear-gradient(180deg, rgba(18, 20, 28, 0.86), rgba(18, 20, 28, 0.58));
  }
}

.avatar-btn {
  /* 左上角头像本身就是按钮 */
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: transparent;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s ease;
}

@media (prefers-color-scheme: dark) {
  .avatar-btn {
    border-color: rgba(255, 255, 255, 0.16);
  }
}

.avatar-btn:active {
  transform: scale(0.94);
}

.title-block {
  text-align: center;
  line-height: 1.25;
}

.site-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.site-sub {
  margin: 0;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
}

.topbar-side {
  display: flex;
  justify-content: flex-end;
  min-width: 46px;
}

/* ---------- 头像 ---------- */

.avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  color: #fff;
  font-weight: 600;
  user-select: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.is-letter {
  background-image: linear-gradient(135deg, var(--tint-a, #6f8dff), var(--tint-b, #9f7bff));
  font-size: 0.42em;
  letter-spacing: 0;
}

/* ---------- 动态列表 ---------- */

.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  margin: 10px 2px 2px;
}

.feed-label {
  font-size: 13px;
  color: var(--ink-soft);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.filter-chip button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(120, 128, 150, 0.18);
  cursor: pointer;
}

.feed {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

/* 内容卡片：半透明玻璃质感 */
.post {
  position: relative;
  padding: 14px 15px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  animation: card-in 0.34s ease both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-head .avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

.post-who {
  min-width: 0;
  flex: 1;
}

.post-name {
  font-size: 14.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-time {
  font-size: 11.5px;
  color: var(--ink-faint);
}

.post-more {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
}

.post-more:hover {
  background: rgba(120, 128, 150, 0.14);
  color: var(--danger);
}

.post-text {
  margin: 10px 0 0;
  font-size: 15.5px;
  line-height: 1.68;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-avatar .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

/* 照片网格（尺寸由 JS 按屏幕宽度算好） */
.photo-grid {
  display: grid;
  gap: 6px;
  margin-top: 11px;
  max-width: 100%;
}

.photo-grid[data-count='1'] {
  max-width: 88%;
}

.photo {
  position: relative;
  overflow: hidden;
  border-radius: 11px;
  background: rgba(120, 128, 150, 0.14);
  cursor: zoom-in;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.photo img.is-ready {
  opacity: 1;
}

.photo-fail {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 12px;
}

@media (hover: hover) {
  .photo:hover img {
    transform: scale(1.03);
  }
}

.post-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.post-actions .link-btn {
  font-size: 13px;
}

/* ---------- 空状态 / 加载 ---------- */

.empty {
  margin: 26px auto;
  padding: 26px 20px;
  max-width: 420px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.32);
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

@media (prefers-color-scheme: dark) {
  .empty {
    background: rgba(255, 255, 255, 0.04);
  }
}

.empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
}

.loading {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--ink-faint);
  font-size: 13px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(130, 140, 165, 0.32);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.feed-more {
  display: flex;
  justify-content: center;
  padding: 16px 0 8px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--card-strong);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.btn-primary {
  background: linear-gradient(135deg, #4d74ff, #6e5cff);
  color: #fff;
  box-shadow: 0 10px 24px rgba(70, 96, 255, 0.3);
}

.btn-ghost {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink-soft);
}

.btn-danger {
  border-color: rgba(226, 73, 77, 0.3);
  background: rgba(226, 73, 77, 0.12);
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* 悬浮发布按钮 */
.fab {
  position: fixed;
  right: max(18px, calc((100vw - 720px) / 2 + 18px));
  bottom: calc(22px + var(--safe-bottom));
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 54px;
  padding: 0 22px 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #4d74ff, #6e5cff);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 16px 34px rgba(70, 96, 255, 0.38);
  cursor: pointer;
  transition: transform 0.18s ease;
}

.fab:active {
  transform: scale(0.95);
}

.fab svg {
  width: 21px;
  height: 21px;
}

/* ---------- 抽屉菜单（占屏幕一半，右侧内容模糊） ---------- */

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  width: var(--drawer-w);
  max-width: 92vw;
  padding: calc(var(--safe-top) + 18px) 18px calc(var(--safe-bottom) + 16px);
  border-right: 1px solid var(--line);
  border-radius: 0 26px 26px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 248, 253, 0.82));
  box-shadow: 24px 0 60px rgba(20, 28, 60, 0.2);
  backdrop-filter: blur(26px) saturate(1.3);
  -webkit-backdrop-filter: blur(26px) saturate(1.3);
  transform: translateX(-104%);
  transition: transform 0.34s cubic-bezier(0.22, 0.9, 0.28, 1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (prefers-color-scheme: dark) {
  .drawer {
    background: linear-gradient(180deg, rgba(26, 30, 44, 0.92), rgba(20, 23, 34, 0.86));
  }
}

body.drawer-open .drawer {
  transform: translateX(0);
}

.drawer-me {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-name {
  font-size: 17px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-handle {
  font-size: 12px;
  color: var(--ink-faint);
}

.drawer-bio {
  margin: 12px 2px 0;
  font-size: 13px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.drawer-stats {
  display: flex;
  gap: 18px;
  margin: 14px 2px 6px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.drawer-stats b {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 14px -6px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease;
}

.menu-item:hover,
.menu-item:active {
  background: rgba(120, 132, 170, 0.15);
}

.menu-item .mi-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.menu-item .mi-icon svg {
  width: 18px;
  height: 18px;
}

.menu-item .mi-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item .mi-text > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item .mi-sub {
  font-size: 11.5px;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-item.is-danger {
  color: var(--danger);
}

.menu-item.is-danger .mi-icon {
  background: rgba(226, 73, 77, 0.12);
  color: var(--danger);
}

.menu-item.is-active {
  background: rgba(120, 132, 170, 0.16);
  font-weight: 600;
}

.drawer-section {
  margin: 18px -6px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.drawer-section-title {
  padding: 0 12px 6px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.drawer-avatar {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}

.drawer-who {
  min-width: 0;
}

.drawer-foot {
  margin-top: auto;
  padding-top: 16px;
  font-size: 11.5px;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- 弹层（发布 / 编辑资料 / 确认框） ---------- */

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(16, 20, 32, 0.42);
  backdrop-filter: blur(5px);
  animation: fade-in 0.22s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.dialog {
  width: 100%;
  max-width: 520px;
  max-height: 88dvh;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  overflow-y: auto;
  animation: sheet-up 0.28s cubic-bezier(0.22, 0.9, 0.28, 1) both;
}

@media (min-width: 640px) {
  .dialog-backdrop {
    align-items: center;
  }
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dialog-head h3 {
  margin: 0;
  font-size: 17px;
}

.dialog-head .close-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(120, 128, 150, 0.14);
  cursor: pointer;
}

.dialog p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.dialog-actions .btn {
  flex: 1;
  max-width: 180px;
}

.field {
  margin-bottom: 14px;
}

.field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.field-note {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--ink-faint);
}

.input,
.textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(63, 107, 255, 0.5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.65;
}

.counter {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
  text-align: right;
}

/* 发布框里的照片选择区 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}

.photo-pick {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(120, 128, 150, 0.1);
}

.photo-pick img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-pick .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 18, 28, 0.62);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.photo-pick .busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 18, 28, 0.45);
  color: #fff;
  font-size: 12px;
}

.photo-add {
  display: grid;
  place-items: center;
  gap: 4px;
  aspect-ratio: 1 / 1;
  border: 1px dashed rgba(120, 132, 170, 0.5);
  border-radius: var(--radius-sm);
  background: rgba(120, 128, 150, 0.06);
  color: var(--ink-soft);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 6px;
}

.photo-add svg {
  width: 22px;
  height: 22px;
}

.photo-add[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* 编辑资料里的头像 */
.avatar-editor {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-editor .avatar-big {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  transition: opacity 0.2s ease;
}

.avatar-editor .avatar-big.is-busy {
  opacity: 0.5;
}

.avatar-editor .hint {
  margin: 6px 0 8px;
  font-size: 12.5px;
  color: var(--ink-faint);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 13.5px;
  cursor: pointer;
}

.link-btn.danger {
  color: var(--danger);
}

/* ---------- 登录 / 注册页 ---------- */

.auth {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px 16px calc(28px + var(--safe-bottom));
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 28px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  animation: card-in 0.4s ease both;
}

.auth-brand {
  text-align: center;
  margin-bottom: 22px;
}

.auth-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 22px;
  background: linear-gradient(135deg, #4d74ff, #6e5cff);
  color: #fff;
  box-shadow: 0 14px 30px rgba(70, 96, 255, 0.32);
}

.auth-logo svg {
  width: 32px;
  height: 32px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: 0.08em;
}

.auth-brand p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(120, 128, 150, 0.14);
}

.tabs button {
  padding: 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.tabs button.is-active {
  background: var(--card-strong);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-soft);
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(226, 73, 77, 0.12);
  color: var(--danger);
  font-size: 13px;
}

.auth-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.7;
}

/* ---------- 轻提示 / 大图查看 ---------- */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 88vw;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 28, 40, 0.86);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: card-in 0.24s ease both;
}

.toast button {
  padding: 0;
  border: 0;
  background: none;
  color: #9fb4ff;
  font-size: 14px;
  cursor: pointer;
  pointer-events: auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 12, 20, 0.88);
  animation: fade-in 0.2s ease both;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 100%;
  max-height: 92dvh;
  border-radius: 14px;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
