/* 言楼 · 样式
   设计方向：贴吧的骨架（分区、帖子列表、楼层、楼中楼），换成干净的白卡片风格。 */

:root {
  --bg: #f2f5fa;
  --bg-2: #e9eef7;
  --card: #ffffff;
  --text: #171c26;
  --text-2: #5b6575;
  --muted: #8b94a3;
  --line: #e9edf3;
  --line-2: #dfe5ee;
  --brand: #2f6bff;
  --brand-dark: #1e4fd6;
  --brand-soft: #edf3ff;
  --accent: #ff7a45;
  --green: #17a673;
  --red: #e5484d;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 10px 28px rgba(17, 24, 39, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #eaf0ff 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #eef7f4 0%, transparent 50%), var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

img,
video {
  max-width: 100%;
}

input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

textarea {
  resize: none;
}

::placeholder {
  color: #a8b0bd;
}

.muted {
  color: var(--muted);
}

.dot {
  margin: 0 4px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- 启动 / 加载 */

.boot {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
}

.boot-logo img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(47, 107, 255, 0.25);
}

.boot-text {
  font-size: 18px;
  letter-spacing: 4px;
  font-weight: 600;
  color: var(--text-2);
}

.loading {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 80px 0;
}

.loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.35;
  animation: bounce 1s infinite ease-in-out;
}

.loading span:nth-child(2) {
  animation-delay: 0.15s;
}

.loading span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  background: #f0f2f6;
  color: var(--text);
  transition: transform 0.12s ease, background 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}

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

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

.btn-primary {
  background: linear-gradient(135deg, #3b79ff, #2357ec);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4a84ff, #2a5ef2);
}

.btn-ghost {
  background: #fff;
  border-color: var(--line-2);
  color: var(--text-2);
}

.btn-ghost:hover {
  border-color: #cdd5e2;
  color: var(--text);
}

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

.btn-lg {
  padding: 13px 20px;
  font-size: 15px;
  width: 100%;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

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

.danger-text {
  color: var(--red) !important;
}

.link {
  border: 0;
  background: none;
  color: var(--brand);
  padding: 0;
  font-size: 14px;
}

.link.danger {
  color: var(--red);
  margin-left: auto;
}

.tool {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-2);
  flex: 0 0 auto;
}

.tool:hover {
  background: #f7f9fd;
}

.tool.active {
  background: var(--brand-soft);
  border-color: #c9d9ff;
}

/* ---------------------------------------------------------------- 输入框 */

input[type="text"],
input:not([type]),
input[type="search"],
textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  background: #fafbfd;
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input:focus,
textarea:focus {
  border-color: #a9c0ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.1);
}

/* ---------------------------------------------------------------- 头图 / 品牌 */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 5px 12px rgba(47, 107, 255, 0.25);
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(120deg, #2f6bff, #6f9bff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(233, 237, 243, 0.9);
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.zone-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.zone-tab {
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.zone-tab:hover {
  background: #f1f4fa;
  color: var(--text);
}

.zone-tab.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f3f5f9;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 12px;
  width: 210px;
  height: 36px;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.search-box:focus-within {
  background: #fff;
  border-color: #bfd0ff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.08);
}

.search-ico {
  width: 16px;
  height: 16px;
  opacity: 0.55;
}

.search-box input {
  border: 0;
  background: transparent;
  padding: 0;
  height: 100%;
  font-size: 14px;
  box-shadow: none;
}

.search-box input:focus {
  box-shadow: none;
  background: transparent;
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease;
}

.icon-btn:hover {
  background: #f1f4fa;
}

.icon-btn img {
  width: 21px;
  height: 21px;
  opacity: 0.72;
}

.badge {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff5252;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.avatar-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  display: inline-flex;
}

/* 我的下拉菜单 */

.me-pop {
  position: fixed;
  top: 58px;
  right: max(20px, calc((100vw - 1080px) / 2 + 20px));
  width: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 40;
  animation: pop-in 0.14s ease;
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.me-pop-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.me-pop-head b {
  display: block;
  font-size: 14px;
}

.me-pop-head span {
  font-size: 12px;
  color: var(--muted);
}

.me-pop-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  background: none;
  border-radius: 9px;
  font-size: 14px;
  color: var(--text-2);
}

.me-pop-item:hover {
  background: #f5f7fb;
}

.me-pop-item.danger {
  color: var(--red);
}

/* 移动端分区条 + 底部标签 */

.zone-strip {
  display: none;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 56px;
  z-index: 25;
}

.zone-strip::-webkit-scrollbar {
  display: none;
}

.zone-strip .zone-tabs {
  padding: 0 12px;
  height: 46px;
  flex-wrap: nowrap;
  overflow: visible;
}

.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  justify-content: space-around;
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 10px;
}

.tab img {
  width: 23px;
  height: 23px;
  opacity: 0.55;
}

.tab.active {
  color: var(--brand);
}

.tab.active img {
  opacity: 1;
  filter: invert(32%) sepia(83%) saturate(2850%) hue-rotate(216deg) brightness(99%) contrast(96%);
}

.tab-fab img {
  width: 38px;
  height: 38px;
  opacity: 1;
  margin-top: -14px;
  padding: 7px;
  background: linear-gradient(135deg, #3b79ff, #2357ec);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.35);
  filter: invert(1);
}

.tab .badge {
  top: 0;
  right: 4px;
}

/* ---------------------------------------------------------------- 布局 */

.view {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 20px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.section-head .muted {
  font-size: 12px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 16px;
}

.page-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.crumb-line {
  padding: 2px 2px 12px;
}

.crumb {
  font-size: 13px;
  color: var(--muted);
}

.crumb:hover {
  color: var(--brand);
}

/* ---------------------------------------------------------------- 首页 */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 32px 34px;
  background: linear-gradient(120deg, #2b5fe0 0%, #3d7bff 48%, #63a3ff 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 20px 40px -18px rgba(47, 107, 255, 0.55);
}

.hero::before {
  content: "言楼";
  position: absolute;
  right: -10px;
  top: -40px;
  font-size: 190px;
  font-weight: 900;
  letter-spacing: 6px;
  color: rgba(255, 255, 255, 0.08);
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 1px;
}

.hero p {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.hero .btn-primary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(16, 34, 92, 0.22);
}

.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 26px;
  padding-bottom: 4px;
}

.hero-stats div {
  text-align: right;
}

.hero-stats b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.hero-stats i {
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.section {
  margin-top: 22px;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.zone-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 132px;
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.zone-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #cfdcff;
}

.zone-card.kind-anonymous {
  background: linear-gradient(160deg, #2b2f3a, #3c4252);
  border-color: transparent;
  color: #f3f5fa;
}

.zone-card.kind-school {
  background: linear-gradient(160deg, #eefaf4, #e6f6ee);
  border-color: #d5efe2;
}

.zone-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.zone-card-top b {
  font-size: 17px;
  font-weight: 700;
}

.zone-card-top i {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.zone-card.kind-anonymous .zone-card-top i,
.zone-card.kind-anonymous .zone-slogan {
  color: rgba(255, 255, 255, 0.6);
}

.zone-slogan {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.zone-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
}

.zone-card-foot em {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f4fa;
  color: var(--text-2);
}

.zone-card.kind-anonymous .zone-card-foot em {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
}

.zone-arrow {
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
}

.lock-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1e8;
  color: #c25a1c;
  font-size: 11px;
}

/* ---------------------------------------------------------------- 帖子列表 */

.feed {
  margin-top: 22px;
  overflow: hidden;
}

.thread-list {
  display: flex;
  flex-direction: column;
}

.thread {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 18px;
  border-top: 1px solid var(--line);
  transition: background 0.14s ease;
}

.thread:hover {
  background: #fafcff;
}

.thread-avatar {
  display: inline-flex;
  margin-top: 1px;
}

.thread-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thread-title {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.thread:hover .thread-title {
  color: var(--brand);
}

.thread-preview {
  font-size: 13px;
  color: var(--text-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.thread-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.thread-author {
  color: var(--text-2);
}

.thread-side {
  flex: 0 0 auto;
  text-align: center;
  min-width: 42px;
  padding-top: 3px;
}

.thread-side b {
  display: block;
  font-size: 15px;
  color: var(--text);
}

.thread-side i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.zone-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: #3a6cf0;
  font-size: 11.5px;
  font-weight: 600;
}

.zone-tag.zt-anonymous {
  background: #ececf3;
  color: #5b5f72;
}

.zone-tag.zt-school {
  background: #e7f7ef;
  color: #128a5b;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.pager-btn {
  padding: 7px 16px;
  border-radius: 999px;
  background: #f3f5f9;
  font-size: 13px;
  color: var(--text-2);
}

.pager-btn:hover {
  background: #eaeef7;
}

.pager-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pager-info {
  font-size: 12.5px;
  color: var(--muted);
}

.empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: #eef3ff;
  color: #8ea9e8;
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text-2);
  font-weight: 600;
}

.empty p {
  margin: 0;
  font-size: 13px;
}

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

.avatar {
  --av: #5b8cff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background: var(--av);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  overflow: hidden;
  user-select: none;
}

.avatar span {
  transform: translateY(0.5px);
}

.avatar.anon {
  background: #d8dde7;
  color: #7d8698;
  font-size: 13px;
}

.av0 {
  --av: #5b8cff;
}
.av1 {
  --av: #ff8a5b;
}
.av2 {
  --av: #2ec4a5;
}
.av3 {
  --av: #a06bff;
}
.av4 {
  --av: #ff6b9d;
}
.av5 {
  --av: #46b3ff;
}
.av6 {
  --av: #f2b53b;
}
.av7 {
  --av: #7d88a8;
}

.thread-avatar .avatar {
  width: 38px;
  height: 38px;
}

/* ---------------------------------------------------------------- 分区页 */

.zone-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 26px 28px;
  background: linear-gradient(120deg, #2f6bff, #5b9cff);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 18px 34px -20px rgba(47, 107, 255, 0.6);
}

.zone-hero.kind-anonymous {
  background: linear-gradient(120deg, #282c37, #454b5d);
  box-shadow: 0 18px 34px -20px rgba(20, 23, 31, 0.6);
}

.zone-hero.kind-school {
  background: linear-gradient(120deg, #0f9d6a, #37c48d);
  box-shadow: 0 18px 34px -20px rgba(15, 157, 106, 0.5);
}

.zone-hero-main h1 {
  margin: 6px 0 4px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.zone-hero-main p {
  margin: 0 0 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.zone-hero-main span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
}

.zone-hero .crumb {
  color: rgba(255, 255, 255, 0.75);
}

.zone-hero .btn-primary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(10, 25, 66, 0.2);
}

/* 验证问题 */

.quiz-wrap {
  padding: 40px 0;
}

.quiz-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 30px;
  text-align: center;
}

.quiz-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #fff3ea;
  color: #d06422;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
}

.quiz-card h2 {
  margin: 14px 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.quiz-desc {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 13.5px;
}

.quiz-rule {
  background: #f7f9fd;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 18px;
}

.quiz-question {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 18px;
}

.quiz-form {
  display: flex;
  gap: 8px;
}

.quiz-form input {
  flex: 1;
}

.quiz-form .btn {
  flex: 0 0 auto;
  padding: 0 22px;
}

.quiz-error {
  margin: 12px 0 0;
  color: var(--red);
  font-size: 13px;
}

.quiz-foot {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--muted);
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

/* ---------------------------------------------------------------- 帖子页 */

.post-card {
  padding: 22px 24px 6px;
}

.post-title {
  margin: 0 0 10px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.3px;
  word-break: break-word;
}

.post-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.floor {
  padding: 16px 0 4px;
}

.post-card .floor {
  border-top: 0;
  padding-top: 14px;
}

.floor-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.floor-nick {
  font-size: 14px;
  font-weight: 600;
}

.badge-owner {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff1e8;
  color: #d06422;
  font-weight: 700;
}

.floor-time {
  font-size: 11.5px;
  color: var(--muted);
}

.floor-no {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
}

.floor-body {
  padding-left: 46px;
}

.rich {
  font-size: 15px;
  line-height: 1.8;
  word-break: break-word;
  white-space: pre-wrap;
}

.rich .sticker-img {
  display: inline-block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  vertical-align: middle;
  margin: 2px 2px;
  border-radius: 8px;
}

.rich .sticker-vid {
  display: inline-block;
  width: 76px;
  height: 76px;
  object-fit: cover;
  vertical-align: middle;
  margin: 2px;
  border-radius: 10px;
}

.sticker.croc {
  display: inline-block;
  width: 58px;
  height: 58px;
  vertical-align: middle;
  margin: 2px 4px;
}

.sticker.croc svg {
  width: 100%;
  height: 100%;
}

.floor-actions {
  display: flex;
  gap: 14px;
  margin: 8px 0 6px;
  font-size: 12px;
}

.floor-actions .link {
  font-size: 12px;
  color: var(--muted);
}

.floor-actions .link:hover {
  color: var(--brand);
}

.sub-list {
  margin: 10px 0 6px;
  background: #f7f9fd;
  border-radius: 12px;
  padding: 8px 14px;
}

.sub-head {
  font-size: 11.5px;
  color: var(--muted);
  padding: 4px 0 2px;
}

.sub-item {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px dashed #e3e9f4;
}

.sub-item:first-of-type {
  border-top: 0;
}

.sub-item .avatar {
  width: 26px;
  height: 26px;
  font-size: 12px;
}

.sub-main {
  min-width: 0;
  flex: 1;
}

.sub-main b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.sub-main time {
  margin-left: 6px;
  font-size: 11px;
  color: var(--muted);
}

.sub-main .rich {
  font-size: 13.5px;
  line-height: 1.7;
}

.floors {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.floors .floor {
  padding: 16px 20px;
}

.floor-empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0 4px;
}

.att-grid.small {
  grid-template-columns: repeat(auto-fill, minmax(96px, 116px));
  gap: 6px;
}

.att-img {
  padding: 0;
  border: 0;
  background: #f1f4fa;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  display: block;
}

.att-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.att-img:hover img {
  transform: scale(1.03);
}

.att-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  max-height: 360px;
}

.att-audio {
  width: 100%;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fafbfd;
  border-radius: 12px;
  padding: 9px 12px;
  min-width: 0;
}

.file-card.disabled {
  opacity: 0.6;
}

.file-ico {
  font-size: 20px;
}

.file-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.file-meta b {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.reply-bar {
  position: sticky;
  bottom: 16px;
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 12px 30px -12px rgba(23, 32, 56, 0.25);
  backdrop-filter: blur(10px);
}

.reply-bar textarea {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 8px 4px;
  min-height: 36px;
  max-height: 140px;
  flex: 1;
}

.reply-bar textarea:focus {
  box-shadow: none;
}

.reply-bar.align-end {
  align-items: flex-end;
}

/* ---------------------------------------------------------------- 发帖页 */

.compose {
  padding: 22px 24px;
}

.compose-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.zone-chip {
  padding: 3px 12px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.compose-title {
  border: 0 !important;
  background: transparent !important;
  font-size: 21px !important;
  font-weight: 700;
  padding: 10px 2px !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.compose-title:focus {
  box-shadow: none !important;
}

.compose-content {
  border: 0 !important;
  background: transparent !important;
  font-size: 15px;
  line-height: 1.8;
  padding: 14px 2px !important;
  min-height: 220px;
  box-shadow: none !important;
}

.compose-content:focus {
  box-shadow: none !important;
}

.compose-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  position: relative;
}

.compose-tools .tool {
  width: auto;
  padding: 0 14px;
  gap: 6px;
  font-size: 13px;
}

.compose-tip {
  font-size: 11.5px;
}

.compose-tools .btn-primary {
  margin-left: auto;
}

.compose-preview {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafd;
  border: 1px dashed var(--line-2);
}

.preview-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.compose-anon {
  margin-left: auto;
  font-size: 11.5px;
  color: #5b5f72;
  background: #ececf3;
  border-radius: 999px;
  padding: 2px 9px;
}

.att-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f4fa;
  border-radius: 999px;
  padding: 5px 10px 5px 12px;
  font-size: 12px;
  color: var(--text-2);
}

.pending-chip .x {
  border: 0;
  background: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  line-height: 1;
  color: var(--muted);
}

.upload-tray {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 300px;
}

.upload-chip {
  background: #1f2532;
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.upload-chip .chip-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-chip .chip-bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  min-width: 44px;
}

.upload-chip .chip-bar i {
  display: block;
  height: 100%;
  background: #6ea0ff;
  transition: width 0.2s ease;
}

.upload-chip .chip-pct {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

.upload-chip.done {
  background: #12735a;
}

.upload-chip.failed {
  background: #8d2f33;
}

.chip-err {
  font-size: 10.5px;
  color: #ffd9da;
}

/* ---------------------------------------------------------------- 私信列表 */

.conv-list {
  overflow: hidden;
}

.conv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.conv:first-child {
  border-top: 0;
}

.conv:hover {
  background: #fafcff;
}

.conv .avatar {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.conv-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.conv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.conv-top b {
  font-size: 14.5px;
}

.conv-top time {
  font-size: 11px;
  color: var(--muted);
}

.conv-preview {
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  flex: 0 0 auto;
}

/* 新私信弹窗 */

.dm-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.dm-search input {
  flex: 1;
}

.dm-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow: auto;
}

.dm-result {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 12px;
  padding: 8px 12px;
  text-align: left;
}

.dm-result:hover {
  border-color: #c8d7ff;
  background: #f7faff;
}

.dm-result span {
  font-weight: 600;
  font-size: 14px;
}

.dm-result i {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  color: var(--brand);
}

/* ---------------------------------------------------------------- 聊天 */

.chat {
  height: calc(100vh - 110px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.chat-head b {
  font-size: 15px;
}

.chat-head .avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.chat-head .crumb {
  font-size: 16px;
  color: var(--text-2);
  padding: 0 6px 0 0;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: linear-gradient(180deg, #f7f9fd, #f3f6fb);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-time {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}

.bubble-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 78%;
}

.bubble-row.them {
  align-self: flex-start;
}

.bubble-row.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 9px 13px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.bubble-row.mine .bubble {
  background: linear-gradient(135deg, #3d7bff, #2d63f0);
  border-color: transparent;
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}

.bubble .rich {
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.bubble-row.mine .rich {
  color: #fff;
}

.bubble .att-grid {
  margin: 6px 0 0;
}

.bubble-row.mine .att-img {
  background: rgba(255, 255, 255, 0.15);
}

.bubble-row.them .avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

.chat-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
  position: relative;
}

.chat-input textarea {
  border: 0;
  background: #f4f6fa;
  border-radius: 12px;
  padding: 9px 12px;
  min-height: 38px;
  max-height: 120px;
  flex: 1;
  box-shadow: none;
}

.chat-input textarea:focus {
  box-shadow: none;
  background: #f0f4ff;
}

/* ---------------------------------------------------------------- 表情面板 */

.emoji-panel {
  position: absolute;
  right: 8px;
  bottom: calc(100% + 8px);
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 40px -12px rgba(20, 30, 60, 0.3);
  z-index: 55;
  overflow: hidden;
  animation: pop-in 0.14s ease;
}

.emoji-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--line);
}

.emoji-tab {
  border: 0;
  background: none;
  padding: 8px 12px;
  border-radius: 9px 9px 0 0;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 2px solid transparent;
}

.emoji-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}

.emoji-scroll {
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
}

.croc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.croc-cell {
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 12px;
  aspect-ratio: 1;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.croc-cell:hover {
  border-color: #c8d7ff;
  background: #f5f9ff;
}

.croc-holder {
  display: block;
  width: 100%;
  height: 100%;
}

.meme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.meme-cell {
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 12px;
  padding: 4px;
  aspect-ratio: 1;
  overflow: hidden;
}

.meme-cell img,
.meme-cell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.emoji-group-name {
  font-size: 11.5px;
  color: var(--muted);
  padding: 8px 4px 4px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 2px;
}

.emoji-cell {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  padding: 6px 0;
  border-radius: 8px;
}

.emoji-cell:hover {
  background: #f1f4fa;
}

.emoji-note {
  margin: 10px 2px 2px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------------- 设置 */

.profile-card {
  padding: 20px 22px;
  margin-bottom: 14px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-main .avatar {
  width: 54px;
  height: 54px;
  font-size: 22px;
}

.profile-main b {
  display: block;
  font-size: 18px;
}

.profile-main span {
  font-size: 12.5px;
  color: var(--muted);
}

.settings {
  overflow: hidden;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.setting-row:first-child {
  border-top: 0;
}

.setting-label b {
  font-size: 14.5px;
}

.setting-label p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 460px;
}

.setting-value {
  font-size: 13.5px;
  color: var(--text-2);
  flex: 0 0 auto;
}

.switch {
  position: relative;
  width: 46px;
  height: 27px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d7dee9;
  transition: background 0.18s ease;
}

.switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease;
}

.switch input:checked + i {
  background: var(--brand);
}

.switch input:checked + i::after {
  transform: translateX(19px);
}

.settings-foot {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  margin: 26px 0 0;
}

/* ---------------------------------------------------------------- 弹窗 / 提示 */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.modal-mask.show {
  opacity: 1;
}

.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.5);
  transform: translateY(8px) scale(0.98);
  transition: transform 0.18s ease;
  overflow: hidden;
}

.modal-mask.show .modal {
  transform: none;
}

.modal-head {
  padding: 22px 24px 0;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.modal-body {
  padding: 14px 24px 6px;
  font-size: 14px;
  color: var(--text-2);
}

.modal-body .modal-text {
  margin: 0 0 10px;
  line-height: 1.7;
}

.modal-body .modal-text.muted {
  color: var(--muted);
  font-size: 13px;
}

.modal-body .modal-text b {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  padding: 16px 24px 22px;
  flex-wrap: wrap;
}

.modal-actions .btn {
  flex: 1;
  min-width: 120px;
}

.toast-root {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1f2532;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  box-shadow: 0 14px 30px -10px rgba(15, 23, 42, 0.55);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(520px, 88vw);
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ea0ff;
  flex: 0 0 auto;
}

.toast-success .toast-dot {
  background: #34d399;
}

.toast-error .toast-dot {
  background: #ff6b6b;
}

.popconfirm {
  position: fixed;
  z-index: 90;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.35);
  padding: 12px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.popconfirm.show {
  opacity: 1;
  transform: none;
}

.popconfirm.out {
  opacity: 0;
}

.pc-msg {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  margin-bottom: 10px;
}

.pc-actions {
  display: flex;
  gap: 8px;
}

.pc-actions .btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 12.5px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(10, 14, 22, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.lightbox.show {
  opacity: 1;
}

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 10px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.error-card {
  max-width: 460px;
  margin: 60px auto;
  padding: 26px;
  text-align: center;
}

.error-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.error-card p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 0 0 16px;
}

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

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  position: relative;
  overflow: hidden;
}

.auth-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-orbs i {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
}

.auth-orbs i:nth-child(1) {
  width: 420px;
  height: 420px;
  left: -120px;
  top: -140px;
  background: radial-gradient(circle at 30% 30%, #cfe0ff, transparent 70%);
}

.auth-orbs i:nth-child(2) {
  width: 360px;
  height: 360px;
  right: -100px;
  top: 8%;
  background: radial-gradient(circle at 30% 30%, #d6f5e9, transparent 70%);
}

.auth-orbs i:nth-child(3) {
  width: 480px;
  height: 480px;
  left: 40%;
  bottom: -260px;
  background: radial-gradient(circle at 30% 30%, #e8e2ff, transparent 70%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 30px 28px 22px;
  box-shadow: 0 30px 60px -30px rgba(23, 37, 84, 0.35);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  box-shadow: 0 10px 22px -6px rgba(47, 107, 255, 0.5);
}

.auth-brand-text b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  background: linear-gradient(120deg, #2f6bff, #7fa6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-brand-text span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  background: #eef2f9;
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px 0;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  font-weight: 600;
}

.auth-tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(23, 37, 84, 0.08);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.field-hint {
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-submit {
  margin-top: 4px;
}

.auth-tip {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.auth-tip .link {
  font-size: 12.5px;
}

.auth-legal {
  margin: 18px 0 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- 管理台 */

.admin-body {
  background: #f2f5fa;
}

.admin-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 18px 60px;
}

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

.admin-title {
  font-size: 15px;
  color: var(--muted);
  border-left: 1px solid var(--line-2);
  padding-left: 12px;
}

.admin-head .link {
  margin-left: auto;
}

.admin-login {
  max-width: 460px;
  margin: 40px auto;
  padding: 26px;
}

.admin-login h2 {
  margin: 0 0 6px;
  font-size: 19px;
}

.admin-login p {
  margin: 0 0 16px;
  font-size: 12.5px;
}

.admin-login input {
  margin-bottom: 12px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat {
  padding: 14px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.stat span {
  font-size: 11.5px;
  color: var(--muted);
}

.admin-block {
  margin-bottom: 16px;
  padding-bottom: 16px;
}

.admin-zones {
  padding: 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-zone {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}

.admin-zone code {
  font-size: 11.5px;
  color: var(--muted);
  background: #f1f4fa;
  padding: 1px 6px;
  border-radius: 6px;
}

.admin-zone .muted {
  font-size: 11.5px;
}

.admin-form {
  padding: 12px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-form-row {
  display: flex;
  gap: 10px;
}

.admin-form-row label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
}

.admin-form input,
.admin-form textarea {
  font-weight: 400;
}

.admin-check {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  padding-top: 18px;
  font-weight: 400 !important;
  color: var(--text-2);
}

.admin-check input {
  width: auto;
}

.admin-form-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.admin-tip {
  padding: 10px 18px 0;
  font-size: 12px;
}

@media (max-width: 720px) {
  .admin-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-form-row {
    flex-direction: column;
  }
}


@media (max-width: 900px) {
  .topbar-inner {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }

  .brand-logo {
    width: 27px;
    height: 27px;
  }

  .brand-name {
    font-size: 19px;
  }

  .topbar .zone-tabs {
    display: none;
  }

  .zone-strip {
    display: block;
    top: 56px;
  }

  .topbar-right {
    margin-left: auto;
  }

  .search-box {
    width: 40px;
    justify-content: center;
    padding: 0;
    background: transparent;
  }

  .search-box input {
    display: none;
  }

  .search-box:focus-within {
    width: min(180px, 44vw);
    background: #f3f5f9;
    border-color: transparent;
    box-shadow: none;
    justify-content: flex-start;
    padding: 0 10px;
  }

  .search-box:focus-within input {
    display: block;
  }

  .tabbar {
    display: flex;
  }

  .view {
    padding: 14px 12px calc(84px + env(safe-area-inset-bottom));
  }

  .hero {
    padding: 22px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero::before {
    font-size: 120px;
    top: -20px;
  }

  .hero-stats {
    justify-content: space-between;
    gap: 12px;
  }

  .hero-stats div {
    text-align: left;
  }

  .zone-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .zone-card {
    padding: 13px;
    min-height: 118px;
  }

  .thread {
    padding: 13px 14px;
    gap: 10px;
  }

  .thread-side {
    display: none;
  }

  .post-card {
    padding: 18px 16px 4px;
  }

  .post-title {
    font-size: 20px;
  }

  .floor-body {
    padding-left: 0;
  }

  .floor-head .avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .floors .floor {
    padding: 14px 16px;
  }

  .reply-bar {
    bottom: calc(76px + env(safe-area-inset-bottom));
    border-radius: 16px;
  }

  .chat {
    height: calc(100vh - 150px);
  }

  .bubble-row {
    max-width: 86%;
  }

  .compose {
    padding: 16px;
  }

  .compose-title {
    font-size: 19px !important;
  }

  .compose-tools {
    gap: 8px;
  }

  .compose-tip {
    display: none;
  }

  .page-head h1 {
    font-size: 21px;
  }

  .setting-row {
    padding: 14px 16px;
    gap: 12px;
  }

  .modal {
    max-width: 360px;
  }

  .pager {
    gap: 10px;
  }

  .upload-tray {
    bottom: calc(150px + env(safe-area-inset-bottom));
    right: 12px;
  }

  .me-pop {
    top: 52px;
    right: 12px;
  }

  .quiz-card {
    padding: 22px 18px;
  }
}

@media (max-width: 520px) {
  .zone-grid {
    grid-template-columns: 1fr;
  }

  .zone-card {
    min-height: auto;
  }

  .hero-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .zone-hero {
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
  }

  .zone-hero .btn {
    align-self: flex-start;
  }

  .post-sub .link.danger {
    margin-left: 0;
  }

  .emoji-panel {
    right: 4px;
    left: 4px;
    width: auto;
  }
}
