/* 高保真软 UI：浅底、大圆角、轻阴影、玻璃底栏（对齐 Figma Midcircle） */
:root {
  --bg-page: #f5f6f8;
  --bg-elevated: #ffffff;
  --primary: #5a9d91;
  --primary-deep: #4a8579;
  --primary-soft: rgba(90, 157, 145, 0.14);
  --accent-warm: #e8c4a8;
  --text: #1f2933;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --card: #ffffff;
  --border: rgba(31, 41, 51, 0.08);
  --radius: 22px;
  --radius-lg: 28px;
  --shadow-soft: 0 10px 40px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.05);
  --info-bg: #f9f8f3;
  --nav-h: 58px;
  --fab-size: 54px;
  --nav-float-gap: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
  color: var(--text);
  background: var(--bg-page);
  letter-spacing: 0.01em;
}

#app.screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: calc(
    var(--nav-h) + var(--nav-float-gap) + var(--fab-size) / 2 + 18px + var(--safe-bottom)
  );
}

.screen--auth {
  padding-bottom: calc(var(--nav-float-gap) + 24px + var(--safe-bottom));
}

.screen--sub {
  padding-bottom: 24px;
}

/* 顶栏 */
.app-header {
  flex-shrink: 0;
  padding: max(14px, env(safe-area-inset-top)) 18px 10px;
  background: transparent;
}

.app-header-inner {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  gap: 12px;
  min-height: 48px;
}

.app-header-text {
  flex: 1;
  min-width: 0;
  padding-right: 72px;
}

.app-header-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 8px;
}

.app-header-title::before {
  content: '';
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #7ecfc1, var(--primary));
  box-shadow: 0 2px 8px rgba(90, 157, 145, 0.45);
}

.app-header-sub {
  margin: 4px 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-faint);
  line-height: 1.35;
}

.app-header-actions {
  position: absolute;
  right: 0;
  top: 2px;
  display: flex;
  gap: 2px;
}

.icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.75);
  padding: 8px 10px;
  font-size: 1.05rem;
  cursor: pointer;
  border-radius: 14px;
  color: var(--text);
  opacity: 0.88;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.icon-btn:hover {
  background: #fff;
  opacity: 1;
}

/* 主区滚动 */
.main-scroll,
.main-with-nav {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 24px;
}

.main-with-nav.pad-bottom {
  padding-bottom: 100px;
}

.pad {
  padding-left: 20px;
  padding-right: 20px;
}

/* 卡片与表单 */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.pad .card {
  margin: 0;
}

.h2,
.h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.muted {
  color: var(--text-muted);
  line-height: 1.45;
}

.small {
  font-size: 0.875rem;
}

.tiny {
  font-size: 0.7rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.field input,
.field textarea,
.field select,
.search-input {
  font: inherit;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.search-input {
  width: 100%;
  box-shadow: var(--shadow-card);
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn {
  font: inherit;
  cursor: pointer;
  border-radius: 14px;
  border: none;
  padding: 12px 20px;
  font-weight: 600;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary-deep);
  border: 1px solid rgba(90, 157, 145, 0.38);
}

.btn-block {
  width: 100%;
  margin-top: 20px;
}

.link-btn {
  border: none;
  background: none;
  color: var(--primary-deep);
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
}

/* 合规条 / 一期说明（米色信息区） */
.compliance-banner {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--info-bg);
  border: 1px solid rgba(31, 41, 51, 0.06);
  margin-bottom: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #4b5563;
  box-shadow: var(--shadow-card);
}

/* 帖子详情：图上方紧凑免责声明 */
.compliance-banner--detail-strip {
  gap: 6px;
  padding: 5px 10px;
  margin: 0 -20px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  line-height: 1.35;
  box-shadow: none;
}

.compliance-banner--detail-strip .compliance-icon {
  font-size: 0.72rem;
  line-height: 1;
  align-self: flex-start;
  margin-top: 1px;
}

.compliance-banner--detail-strip p {
  margin: 0;
}

.compliance-icon {
  flex-shrink: 0;
}

/* 身份卡片 */
.role-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.role-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  font: inherit;
  box-shadow: var(--shadow-card);
}

.role-icon {
  font-size: 1.5rem;
}

.role-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chevron {
  opacity: 0.35;
  font-size: 1.25rem;
}

/* 信息流搜索条 */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 12px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.search-icon {
  opacity: 0.45;
}

.search-placeholder {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 科室 chips */
.chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 6px;
  scrollbar-width: none;
}

.chips-row::-webkit-scrollbar {
  display: none;
}

.chips-row.static {
  overflow: visible;
  flex-wrap: wrap;
}

.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}

.chip--on {
  background: var(--primary-soft);
  border-color: rgba(90, 157, 145, 0.35);
  color: var(--primary-deep);
  font-weight: 600;
}

.chip:focus-visible {
  outline: 2px solid rgba(90, 157, 145, 0.35);
  outline-offset: 2px;
}

/* 双列帖子 */
.feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-bottom: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 0;
  transition:
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.post-card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.post-card:active {
  transform: scale(0.99);
}

.post-card-img-wrap {
  position: relative;
  aspect-ratio: 5 / 4;
  background: #eef4f2;
}

.post-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 帖子详情多图网格 */
.post-img-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.post-img-cell {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #eef4f2;
}

.post-img-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reply-compose {
  margin-top: 8px;
  padding-top: 4px;
}

.badge-urgent {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
}

.post-card-body {
  padding: 8px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.post-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.tag-dept {
  align-self: flex-start;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(90, 157, 145, 0.25);
  color: var(--primary-deep);
  font-weight: 600;
}

/* 文章列表 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-row {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
}

.article-thumb {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eef4f2;
}

.article-row-title {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.article-row-sum {
  margin-top: 6px;
}

.article-row-meta {
  margin-top: 8px;
}

.pill {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 700;
  margin-right: 4px;
  vertical-align: middle;
}

.pill-wrap {
  margin-bottom: 8px;
}

/* 详情 */
.article-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.25;
}

.hero-img {
  border-radius: 20px;
  overflow: hidden;
  margin: 12px 0;
  aspect-ratio: 16 / 9;
  background: #eef4f2;
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 帖子详情：参考小红书 — 头图在上，标题与正文在中，讨论区在下 */
.post-detail-xhs {
  display: flex;
  flex-direction: column;
}

.post-detail-xhs .post-detail-cover {
  margin: 0 -20px 14px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  background: #eef4f2;
}

.post-detail-xhs .post-detail-cover .hero-img,
.post-detail-xhs .post-detail-cover .post-img-grid {
  margin: 0;
  border-radius: 0;
}

.post-detail-xhs .post-detail-cover .hero-img {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  background: #eef4f2;
}

.post-detail-xhs .post-detail-cover .hero-img img {
  width: 100%;
  height: auto;
  max-height: min(78vh, 920px);
  object-fit: contain;
  object-position: center top;
  display: block;
}

.post-detail-xhs .post-detail-cover .post-img-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
}

.post-detail-xhs .post-detail-cover .post-img-cell {
  aspect-ratio: auto;
  border-radius: 12px;
  overflow: hidden;
}

.post-detail-xhs .post-detail-cover .post-img-cell img {
  width: 100%;
  height: auto;
  max-height: min(70vh, 800px);
  object-fit: contain;
  object-position: center top;
  display: block;
}

.post-detail-xhs .article-title {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 8px;
}

.post-detail-meta {
  margin: 0 0 14px;
  line-height: 1.45;
}

.post-detail-xhs .post-body-card {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.post-detail-xhs .post-detail-body .body-text {
  margin-bottom: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.post-detail-xhs .post-body-card .body-text {
  margin-bottom: 0;
}

.post-detail-xhs .post-detail-body .compliance-banner {
  margin-bottom: 12px;
}

.post-detail-comments {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.post-detail-comments .section-title--comments {
  margin: 14px 0 12px;
  font-size: 0.95rem;
}

.post-detail-comments .reply-head-main strong {
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.post-detail-comments .reply-body {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.body-text {
  line-height: 1.45;
  margin: 0;
}

.ai-box {
  margin: 16px 0;
  padding: 16px;
  border-radius: 18px;
  background: var(--info-bg);
  border: 1px solid rgba(31, 41, 51, 0.06);
  box-shadow: var(--shadow-card);
}

.ai-box--collapsible {
  margin: 12px 0 16px;
  padding: 0;
}

.ai-summary-summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}

.ai-summary-summary::-webkit-details-marker {
  display: none;
}

.ai-summary-summary-text {
  flex: 1;
  min-width: 0;
}

.ai-summary-summary::after {
  content: '▼';
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.55;
  transition: transform 0.18s ease;
}

details.ai-box--collapsible[open] > .ai-summary-summary::after {
  transform: rotate(-180deg);
}

.ai-summary-inner {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(31, 41, 51, 0.06);
}

.ai-summary-lead {
  margin: 0 0 10px;
}

.ai-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.ai-box--muted {
  opacity: 0.92;
}

.ai-box--err {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.2);
}

.ai-subh {
  margin: 12px 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.ai-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.ai-para {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.ai-live-box {
  background: var(--info-bg);
  border: 1px solid rgba(31, 41, 51, 0.06);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.ai-live-title {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 700;
}

.ai-suggest-chips {
  flex-wrap: wrap;
  overflow: visible;
}

.chip--ai {
  border-style: dashed;
  border-width: 2px;
  background: rgba(255, 255, 255, 0.92);
}

.chip-ai-mark {
  font-weight: 500;
  font-size: 0.72rem;
  opacity: 0.85;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 24px 0 12px;
}

.reply-tile {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.reply-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.reply-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.reply-role-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-deep);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(90, 157, 145, 0.35);
  white-space: nowrap;
}

.reply-role {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-deep);
  margin-top: 4px;
}

.reply-body {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.reply-likes {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-body p {
  margin: 0 0 0.75em;
  line-height: 1.55;
}

/* 列表 tile */
.tile-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-tile {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  font: inherit;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.list-tile:disabled {
  opacity: 0.5;
  cursor: default;
}

.list-tile .tile-title {
  flex: 1;
}

.tile-lead {
  margin-right: 10px;
}

.profile-head {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, #d4f0ea, var(--primary-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 16px rgba(90, 157, 145, 0.2);
}

.profile-card .profile-head {
  margin-bottom: 0;
}

.msg-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.msg-list-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.msg-list-card .msg-row {
  border-radius: 0;
  border: none;
  background: transparent;
  border-bottom: 1px solid rgba(31, 41, 51, 0.06);
  box-shadow: none;
}

.msg-list-card .msg-row:last-child {
  border-bottom: none;
}

/* 搜索 tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  cursor: pointer;
  font-size: 0.85rem;
}

.tab--on {
  background: var(--primary-soft);
  border-color: rgba(90, 157, 145, 0.35);
  color: var(--primary-deep);
  font-weight: 700;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 0.85rem;
  cursor: pointer;
}

/* 底栏：左右两簇 + 中间 FAB 占位，保证 Pro/我的 与左侧对称 */
.bottom-nav {
  position: fixed;
  left: var(--nav-float-gap);
  right: var(--nav-float-gap);
  bottom: max(10px, var(--safe-bottom));
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
  z-index: 20;
  padding-left: max(4px, env(safe-area-inset-left));
  padding-right: max(4px, env(safe-area-inset-right));
}

.bottom-nav-cluster {
  flex: 1;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  min-width: 0;
}

.nav-btn {
  flex: 0 1 auto;
  min-width: 0;
  max-width: none;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--text-faint);
}

.nav-btn--active {
  color: var(--primary-deep);
  font-weight: 700;
}

.nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  opacity: 0.85;
}

.nav-icon--home {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E")
    center / 70% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E")
    center / 70% no-repeat;
}

.nav-btn--active .nav-icon--home {
  background: var(--primary);
}

.nav-icon--book,
.nav-icon--pro,
.nav-icon--person {
  background: #94a3b8;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z'/%3E%3C/svg%3E")
    center / 65% no-repeat;
}

.nav-btn--active .nav-icon--book {
  background: var(--primary);
}

/* 专业区：盾牌勾（示意「可信 / 专业」） */
.nav-icon--pro {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-1 17l-4-4 1.41-1.41L11 15.17l6.59-6.59L19 10l-8 8z'/%3E%3C/svg%3E")
    center / 68% no-repeat;
}

.nav-btn--active .nav-icon--pro {
  background: var(--primary);
}

.nav-icon--person {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E")
    center / 68% no-repeat;
}

.nav-btn--active .nav-icon--person {
  background: var(--primary);
}

.nav-label {
  font-size: 9px;
  line-height: 1.15;
  max-width: 72px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.upload-add {
  padding: 10px 16px;
  margin: 0;
  border-radius: 12px;
  font-weight: 600;
}

.upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.upload-thumb-card {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f1f5f4;
}

.upload-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.upload-thumb-remove:hover {
  background: rgba(15, 23, 42, 0.72);
}

.fab-slot {
  width: var(--fab-size);
  flex-shrink: 0;
}

.fab {
  position: fixed;
  left: 50%;
  bottom: calc(
    max(10px, var(--safe-bottom)) + var(--nav-h) / 2 - var(--fab-size) / 2
  );
  transform: translateX(-50%);
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  border: none;
  background: linear-gradient(160deg, #6db5a8, var(--primary-deep));
  color: #fff;
  font-size: 1.65rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(74, 133, 121, 0.45);
  z-index: 25;
}

.fab:hover {
  filter: brightness(1.05);
}

/* 登录 / 注册：大留白与浮层卡片 */
.main-scroll--auth {
  padding-top: 8px;
}

.surface-panel {
  max-width: 100%;
}

.surface-panel .card.pad {
  padding: 22px 20px 24px;
}

/* 个人中心：信息卡 + 统计条 */
.profile-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 18px 16px;
  margin-bottom: 16px;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.stat-pill {
  flex: 1 1 calc(50% - 4px);
  min-width: calc(50% - 4px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f9fafb;
  font: inherit;
  color: inherit;
  cursor: default;
  text-align: left;
}

.stat-pill .stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stat-pill .stat-num {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

/* 发帖页：分组白卡片 */
.main-scroll--create .form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.main-scroll--create .form-stack .field,
.main-scroll--create .form-stack .row-2,
.main-scroll--create .form-stack .chips-row.static {
  margin-top: 0;
  background: var(--card);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.main-scroll--create .form-stack .row-2 {
  display: grid;
}

.main-scroll--create .upload-block {
  background: var(--card);
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  margin-top: 12px;
}

.main-scroll--create .h3 {
  font-size: 1.05rem;
  font-weight: 800;
}

.main-scroll--create .ai-hint {
  margin-bottom: 0;
}

.ai-hint {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #5c5c56;
  background: var(--info-bg);
  border: 1px solid rgba(31, 41, 51, 0.06);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.chip-demo-mark {
  font-weight: 500;
  opacity: 0.88;
}

/* 启动页（一期：邮箱登录入口） */
.screen--splash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.splash-hero {
  position: relative;
  height: 38vh;
  min-height: 200px;
  max-height: 320px;
  overflow: hidden;
}

.splash-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.splash-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
}

.splash-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 20px 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.splash-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--text);
}

.splash-sub {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.splash-card {
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  padding: 16px 16px 14px;
  margin-bottom: auto;
}

.splash-card-text {
  margin: 0 0 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.splash-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.splash-btn-main,
.splash-btn-sub {
  font-size: 0.88rem;
  padding: 12px 10px;
  white-space: nowrap;
}

.splash-foot {
  text-align: center;
  margin-top: 18px;
  margin-bottom: 0;
}

@media (min-width: 560px) {
  #app.screen {
    max-width: 440px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(15, 23, 42, 0.06);
  }
}
