/* 古玩交易大厅 · 独立样式（与站点暖米色视觉一致） */

:root {
  --cream: #f5f0e8;
  --paper: #fdfbf6;
  --ink: #3a3028;
  --ink-soft: #6b5a48;
  --brown: #8b7355;
  --line: rgba(200, 184, 154, 0.6);
  --gold: #c8a24a;
  --gold-deep: #a9853a;
  --shadow: 0 10px 28px rgba(58, 48, 40, 0.18);
  --font-serif: "STSong", "SimSun", "Songti SC", serif;
  --font-sans: -apple-system, "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-serif);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font-family: inherit;
}

button {
  cursor: pointer;
}

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

/* ---------- 顶部品牌栏 ---------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: rgba(245, 240, 232, 0.97);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
}

.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brown), #c8b89a, var(--brown), transparent);
}

.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.topnav a:hover {
  background: rgba(200, 184, 154, 0.22);
  color: var(--ink);
}

.topnav a.active {
  color: var(--ink);
  background: rgba(200, 162, 74, 0.16);
  box-shadow: inset 0 0 0 1px rgba(200, 162, 74, 0.35);
}

.login-btn {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 7px 18px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.login-btn:hover {
  border-color: var(--brown);
  background: #fff;
}

/* ---------- 舞台 ---------- */
.stage {
  position: relative;
  height: calc(100% - 56px);
  width: 100%;
  overflow: hidden;
}

#hall-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  outline: none;
}

#hall-canvas:active {
  cursor: grabbing;
}

.hall-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
  background: linear-gradient(135deg, #f5f0e8, #e8dfd1);
}

/* ---------- 公告条 ---------- */
.notice-strip {
  position: absolute;
  top: 16px;
  left: 16px;
  max-width: min(420px, calc(100% - 32px));
  background: rgba(253, 251, 246, 0.95);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(58, 48, 40, 0.12);
  overflow: hidden;
  z-index: 10;
}

.notice-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 10px 14px;
  text-align: left;
  color: var(--ink);
  font-size: 13px;
}

.notice-label {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1px;
  color: #fff;
  background: var(--brown);
  border-radius: 4px;
  padding: 2px 7px;
}

.notice-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.notice-caret {
  color: var(--brown);
  font-size: 11px;
  transition: transform 0.18s ease;
}

.notice-toggle[aria-expanded="true"] .notice-caret {
  transform: rotate(180deg);
}

.notice-body {
  padding: 0 14px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  margin-top: 2px;
  padding-top: 10px;
  white-space: pre-wrap;
}

/* ---------- 店铺面板 ---------- */
.shop-panel {
  position: absolute;
  top: 76px;
  right: 16px;
  width: 360px;
  max-height: calc(100% - 150px);
  overflow-y: auto;
  background: rgba(253, 251, 246, 0.97);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
  z-index: 12;
  -webkit-overflow-scrolling: touch;
}

.shop-panel::-webkit-scrollbar {
  width: 6px;
}

.shop-panel::-webkit-scrollbar-thumb {
  background: rgba(139, 115, 85, 0.35);
  border-radius: 3px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.panel-heading {
  flex: 1;
  min-width: 0;
}

.shop-name {
  font-size: 21px;
  letter-spacing: 2px;
  color: var(--ink);
  line-height: 1.3;
}

.shop-seller {
  margin-top: 5px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--brown);
}

.panel-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1;
}

.panel-close:hover {
  border-color: var(--brown);
  color: var(--ink);
}

.shop-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  line-height: 1.6;
}

.badge-ok {
  background: rgba(106, 142, 96, 0.16);
  color: #4f7047;
}

.badge-warn {
  background: rgba(200, 162, 74, 0.2);
  color: #8a6b1f;
}

.badge-bad {
  background: rgba(176, 90, 74, 0.16);
  color: #9a4a3a;
}

.badge-muted {
  background: rgba(139, 115, 85, 0.14);
  color: var(--ink-soft);
}

.shop-category::before {
  content: "·";
  margin-right: 8px;
  color: var(--line);
}

.shop-count {
  margin-left: auto;
}

.shop-intro {
  margin: 10px 0 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-soft);
}

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

.good-card {
  display: block;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(200, 184, 154, 0.55);
  border-radius: 9px;
  padding: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.good-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(139, 115, 85, 0.14);
}

.good-thumb {
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  background: #e8e0d2;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.good-thumb.placeholder {
  color: rgba(139, 115, 85, 0.55);
  font-size: 24px;
  background: linear-gradient(135deg, #efe8da, #e2d8c6);
}

.good-title {
  margin-top: 7px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.good-price {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 700;
  color: #9a7b3f;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.good-negotiable {
  font-size: 10px;
  font-weight: 400;
  color: var(--brown);
  background: rgba(139, 115, 85, 0.12);
  border-radius: 3px;
  padding: 1px 5px;
}

.goods-empty {
  grid-column: 1 / -1;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--brown);
  padding: 8px 0;
}

/* ---------- 缩放按钮 ---------- */
.zoom-controls {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.zoom-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(253, 251, 246, 0.95);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(58, 48, 40, 0.12);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.zoom-controls button:hover {
  border-color: var(--brown);
  background: #fff;
}

/* ---------- 铺位列表（默认为读屏隐藏；3D 不可用时可见） ---------- */
.a11y-booths-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* 降级模式：列表成为主要操作区，放在公告条下方并可滚动 */
.a11y-booths-wrap.a11y-visible {
  position: relative;
  z-index: 5;
  width: auto;
  height: auto;
  max-height: calc(100% - 88px);
  overflow: auto;
  clip: auto;
  white-space: normal;
  margin: 68px 16px 16px;
  padding: 12px 14px;
  background: rgba(253, 251, 246, 0.97);
  border: 1px solid var(--line, #d9cdb8);
  border-radius: 10px;
}

.a11y-booths-wrap.a11y-visible .a11y-booths {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.a11y-booths button:focus-visible {
  outline: 2px solid var(--brown, #7a5c3e);
  outline-offset: 2px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translate(-50%, 12px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-item {
  background: rgba(58, 48, 40, 0.92);
  color: #f7f1e5;
  font-family: var(--font-sans);
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: 0 8px 20px rgba(30, 24, 18, 0.25);
  max-width: 80vw;
  text-align: center;
}

/* ---------- 弹窗 ---------- */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 24, 18, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  position: relative;
  width: min(380px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(20, 16, 12, 0.35);
  padding: 24px 22px 22px;
}

.modal-title {
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 12px;
  text-align: center;
}

.modal-body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1;
}

.modal-close:hover {
  border-color: var(--brown);
  color: var(--ink);
}

.empty-booth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, #a9853a, #c8a24a);
  color: #fff8ea;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 1px;
  border-radius: 999px;
  padding: 9px 26px;
  box-shadow: 0 6px 14px rgba(169, 133, 58, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

/* ---------- 移动端：店铺面板为底部抽屉 ---------- */
@media (max-width: 768px) {
  .topbar {
    height: 52px;
    padding: 0 12px;
    gap: 10px;
  }

  .brand {
    font-size: 15px;
    letter-spacing: 2px;
  }

  .topnav {
    gap: 0;
    justify-content: flex-end;
  }

  .topnav a {
    font-size: 12px;
    padding: 6px 7px;
  }

  .topnav a:first-child {
    display: none;
  }

  .login-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .stage {
    height: calc(100% - 52px);
  }

  .notice-strip {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

  .notice-toggle {
    padding: 9px 12px;
    font-size: 12px;
  }

  .shop-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 58%;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(58, 48, 40, 0.22);
  }

  .shop-name {
    font-size: 18px;
  }

  .goods-grid {
    gap: 8px;
  }

  .zoom-controls {
    left: 14px;
    bottom: 14px;
  }

  .zoom-controls button {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .toast {
    bottom: 70px;
  }
}

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

/* ============================================================
   内容页（登录 / 商品 / 店铺 / 公告 / 账号）页面级样式
   只作用于 body.page，不影响大厅页
   ============================================================ */

body.page {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, #f7f2ea 0%, #f1e9dc 100%);
}

.page .topbar {
  position: sticky;
  top: 0;
}

.page-main {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 64px;
  font-family: var(--font-sans);
}

.page-title {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: 4px;
  color: var(--ink);
  margin-bottom: 18px;
}

.page-loading,
.empty-state {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--brown);
  text-align: center;
  padding: 22px 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(253, 251, 246, 0.6);
}

.page-error {
  font-family: var(--font-sans);
  font-size: 14px;
  color: #9a4a3a;
  background: rgba(176, 90, 74, 0.1);
  border: 1px solid rgba(176, 90, 74, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.page .btn-primary,
.page .btn-ghost {
  border: 0;
  cursor: pointer;
  text-align: center;
}

.page .btn-primary[disabled],
.page .btn-ghost[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-block;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 1px;
  border: 1px solid var(--line) !important;
  border-radius: 999px;
  padding: 9px 24px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.btn-ghost:hover {
  border-color: var(--brown) !important;
  background: #fff;
}

/* ---------- 登录 / 注册 / 重置 ---------- */
.auth-main {
  max-width: 540px;
}

.auth-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 26px 24px 28px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 18px;
  background: rgba(139, 115, 85, 0.08);
  border-radius: 999px;
}

.auth-tab {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-soft);
  transition: background 0.18s ease, color 0.18s ease;
}

.auth-tab.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(58, 48, 40, 0.12);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid rgba(200, 184, 154, 0.75);
  border-radius: 9px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.16);
}

.code-row {
  display: flex;
  gap: 8px;
}

.code-row input {
  flex: 1;
  min-width: 0;
}

.code-row button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12px;
  border-radius: 9px;
  padding: 0 14px;
  white-space: nowrap;
}

.code-row button[disabled] {
  color: var(--brown);
  cursor: not-allowed;
  background: rgba(139, 115, 85, 0.08);
}

.form-error {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #9a4a3a;
  background: rgba(176, 90, 74, 0.1);
  border: 1px solid rgba(176, 90, 74, 0.22);
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 14px;
}

.auth-help {
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.7;
  color: var(--brown);
  text-align: center;
}

/* ---------- 商品详情 ---------- */
.item-main {
  max-width: 1040px;
}

.item-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.item-media {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #efe8da, #e2d8c6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(139, 115, 85, 0.65);
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 4px;
}

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

.item-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.item-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #efe8da;
  cursor: pointer;
}

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

.item-thumb.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(200, 162, 74, 0.25);
}

.item-info {
  min-width: 0;
}

.item-info h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: 2px;
  color: var(--ink);
  margin-bottom: 12px;
  word-break: break-word;
}

.item-price-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#item-price {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 700;
  color: #9a7b3f;
}

.item-views {
  margin-top: 6px;
  font-size: 12px;
  color: var(--brown);
}

.item-seller {
  display: inline-block;
  margin: 14px 0 6px;
  font-size: 14px;
  color: var(--brown);
  text-decoration: none;
  border-bottom: 1px dashed rgba(139, 115, 85, 0.5);
  word-break: break-word;
}

.item-seller:hover {
  color: var(--ink);
  border-bottom-color: var(--brown);
}

.item-specs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 16px;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.6;
}

.item-specs dt {
  color: var(--brown);
  white-space: nowrap;
}

.item-specs dd {
  color: var(--ink);
  min-width: 0;
  word-break: break-word;
}

.item-description {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inquiry-form .btn-primary {
  align-self: flex-end;
}

/* ---------- 店铺 ---------- */
.shop-header {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--brown);
  margin-bottom: 6px;
}

.shop-header h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: 4px;
  color: var(--ink);
  word-break: break-word;
}

.shop-header .shop-seller {
  margin-top: 6px;
}

.shop-header .shop-intro {
  margin: 12px 0 0;
}

/* 店铺页复用了大厅的 .shop-meta 类名，这里覆盖大厅的“·”与右推布局 */
.shop-header .shop-category::before {
  content: none;
  margin: 0;
}

.shop-header .shop-count {
  margin-left: 12px;
}

.shop-goods h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 12px;
}

.shop-goods .goods-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

/* ---------- 公告 / 悬赏 ---------- */
.notices-main .panel-section {
  margin-bottom: 30px;
}

.notices-main h1 {
  margin-bottom: 16px;
}

.notices-main h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 12px;
}

.notice-list,
.bounty-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notice-item,
.bounty-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
}

.notice-head,
.bounty-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.notice-title,
.bounty-title {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--ink);
  word-break: break-word;
}

.notice-pinned {
  flex-shrink: 0;
  font-size: 11px;
  color: #8a6b1f;
  background: rgba(200, 162, 74, 0.2);
  border-radius: 999px;
  padding: 2px 9px;
}

.notice-body,
.bounty-body {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.notice-meta,
.bounty-meta {
  margin-top: 10px;
  font-size: 12px;
  color: var(--brown);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.bounty-reward {
  font-weight: 700;
  color: #9a7b3f;
  font-size: 14px;
}

/* ---------- 账号 ---------- */
.account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.account-header h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: 3px;
  color: var(--ink);
  word-break: break-word;
}

.account-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 13px;
}

.account-fields dt {
  color: var(--brown);
}

.account-fields dd {
  color: var(--ink);
  min-width: 0;
  word-break: break-word;
}

.account-section {
  margin-bottom: 28px;
}

.account-section h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 12px;
}

.favorite-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.favorite-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.favorite-thumb {
  height: 108px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #efe8da, #e2d8c6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(139, 115, 85, 0.6);
  font-family: var(--font-serif);
  font-size: 20px;
}

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

.favorite-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}

.favorite-title:hover {
  color: #9a7b3f;
}

.favorite-meta {
  font-size: 12px;
  color: var(--brown);
  word-break: break-word;
}

.favorite-remove {
  align-self: flex-start;
  margin-top: auto;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-soft);
}

.favorite-remove:hover {
  border-color: var(--brown);
  color: var(--ink);
}

.inquiry-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inquiry-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}

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

.inquiry-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  word-break: break-word;
}

.inquiry-title:hover {
  color: #9a7b3f;
}

.inquiry-message {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.inquiry-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--brown);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- 内容页移动端 ---------- */
@media (max-width: 768px) {
  .page-main {
    padding: 18px 12px 52px;
  }

  .page-title {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .auth-card {
    padding: 20px 16px 22px;
    border-radius: 14px;
  }

  .item-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border-radius: 14px;
  }

  .item-info h1 {
    font-size: 21px;
  }

  #item-price {
    font-size: 24px;
  }

  .item-thumb {
    width: 60px;
    height: 60px;
  }

  .shop-header {
    padding: 18px 16px;
  }

  .shop-header h1 {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .account-header {
    padding: 18px 16px;
  }

  .account-header h1 {
    font-size: 22px;
  }

  .favorite-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================
   卖家工作台（task 13）
   ============================================================ */
.seller-main {
  max-width: 1180px;
}

.seller-head {
  margin-bottom: 18px;
}

.seller-sub {
  margin-top: -10px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--brown);
  letter-spacing: 1px;
  word-break: break-word;
}

.seller-disabled {
  max-width: 640px;
}

.seller-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.seller-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: rgba(253, 251, 246, 0.8);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: sticky;
  top: 72px;
}

.seller-nav-item {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.seller-nav-item:hover {
  background: rgba(200, 162, 74, 0.12);
  color: var(--ink);
}

.seller-nav-item.active {
  background: linear-gradient(135deg, #a9853a, #c8a24a);
  color: #fff8ea;
  box-shadow: 0 4px 12px rgba(169, 133, 58, 0.28);
}

.seller-panels {
  min-width: 0;
}

.seller-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
}

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

.panel-head h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--ink);
}

.panel-hint {
  margin-bottom: 14px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--brown);
}

.seller-page .btn-small {
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: 0;
}

.seller-panel .page-loading {
  margin-bottom: 12px;
}

.seller-panel .page-error {
  margin: 10px 0;
}

/* ---------- 店铺 ---------- */
.shop-card {
  margin-top: 14px;
  padding: 18px;
  background: rgba(253, 251, 246, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.shop-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.shop-card-head h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: 2px;
  color: var(--ink);
  word-break: break-word;
}

.shop-card-kind {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--brown);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}

.shop-card-intro {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.shop-card-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  margin-top: 14px;
  font-family: var(--font-sans);
  font-size: 13px;
}

.shop-card-meta dt {
  color: var(--brown);
}

.shop-card-meta dd {
  color: var(--ink);
  min-width: 0;
  word-break: break-word;
}

.shop-card + .seller-form {
  margin-top: 16px;
}

/* ---------- 表单 ---------- */
.seller-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  background: rgba(253, 251, 246, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: var(--font-sans);
}

.seller-form h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--ink);
}

.seller-page .form-error {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #9a4a3a;
  background: rgba(176, 90, 74, 0.1);
  border: 1px solid rgba(176, 90, 74, 0.25);
  border-radius: 9px;
  padding: 9px 12px;
  word-break: break-word;
}

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

.field-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.field-check input {
  width: auto;
}

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

/* ---------- 统计卡 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  background: rgba(200, 162, 74, 0.08);
  border: 1px solid rgba(200, 184, 154, 0.55);
  border-radius: 12px;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--brown);
}

.stat-value {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--ink);
  word-break: break-word;
}

/* ---------- 商品 / 成交表格 ---------- */
.seller-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin-top: 6px;
}

.seller-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 13px;
}

.seller-table th,
.seller-table td {
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.seller-table thead th {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown);
  white-space: nowrap;
}

.seller-table tbody tr:hover {
  background: rgba(200, 162, 74, 0.06);
}

.seller-table tfoot th,
.seller-table tfoot td {
  font-weight: 700;
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 0;
  white-space: nowrap;
}

.good-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #efe8da, #e2d8c6);
  color: rgba(139, 115, 85, 0.6);
  font-family: var(--font-serif);
  font-size: 18px;
}

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

.good-title {
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}

.good-reject {
  margin-top: 4px;
  font-size: 12px;
  color: #9a4a3a;
  word-break: break-word;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---------- 图片预览 ---------- */
.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-preview {
  position: relative;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #efe8da;
}

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

.image-remove {
  position: absolute;
  right: 3px;
  bottom: 3px;
  border: 0;
  border-radius: 999px;
  background: rgba(58, 48, 40, 0.72);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 2px 8px;
}

/* ---------- 意向 ---------- */
.inquiry-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--brown);
}

.inquiry-controls select {
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 5px 8px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid rgba(200, 184, 154, 0.75);
  border-radius: 8px;
}

/* ---------- 账号 ---------- */
.seller-panel .account-fields {
  margin: 6px 0 18px;
}

/* ---------- 卖家工作台移动端 ---------- */
@media (max-width: 768px) {
  .seller-main {
    padding: 16px 12px 48px;
  }

  .seller-head .page-title {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .seller-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .seller-nav {
    position: static;
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    padding: 6px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .seller-nav-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 8px 16px;
  }

  .seller-panel {
    padding: 16px;
    border-radius: 14px;
  }

  .panel-head h2 {
    font-size: 20px;
    letter-spacing: 2px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }
}

/* ============================================================
   管理后台（只作用于 body.admin-page，不回退既有页面）
   ============================================================ */
.admin-main {
  max-width: 1280px;
}

.admin-head {
  margin-bottom: 18px;
}

.admin-head .page-title {
  margin-bottom: 6px;
}

.admin-sub {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--brown);
}

.admin-mobile-tip {
  display: none;
  margin-top: 10px;
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: #8a5a2b;
  background: rgba(200, 162, 74, 0.14);
  border: 1px solid rgba(200, 162, 74, 0.4);
  border-radius: 9px;
}

.admin-mobile-tip-inline {
  margin: 0 0 12px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-nav {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  background: rgba(253, 251, 246, 0.86);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.admin-nav-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 9px 12px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 9px;
  transition: background 0.16s ease, color 0.16s ease;
}

.admin-nav-item:hover {
  background: rgba(200, 162, 74, 0.1);
  color: var(--ink);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(169, 133, 58, 0.92), rgba(200, 162, 74, 0.92));
  color: #fff8ea;
}

.admin-nav-item.has-dirty::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b0553a;
}

.admin-panels {
  min-width: 0;
}

.admin-panel {
  min-width: 0;
  padding: 20px;
  background: rgba(253, 251, 246, 0.92);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(58, 48, 40, 0.05);
}

.admin-panel .panel-head {
  margin-bottom: 14px;
}

.admin-subhead {
  margin: 20px 0 10px;
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--ink);
}

.admin-stat-grid {
  margin-top: 4px;
}

.admin-page .stat-note {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--brown);
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px)) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.admin-filter-actions {
  display: flex;
  align-items: end;
}

.admin-field-grow {
  min-width: 0;
}

.admin-page .btn-small {
  padding: 7px 14px;
  font-size: 12px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(200, 184, 154, 0.4);
}

.admin-table th {
  white-space: nowrap;
  font-weight: 600;
  color: var(--brown);
  background: rgba(200, 162, 74, 0.08);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table tr:hover td {
  background: rgba(200, 162, 74, 0.05);
}

.admin-strong {
  color: var(--ink);
  font-weight: 600;
  word-break: break-word;
}

.admin-muted {
  font-size: 11px;
  color: var(--brown);
  word-break: break-word;
}

.admin-mono {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  color: var(--ink-soft);
}

.admin-clip {
  max-width: 240px;
  word-break: break-word;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-empty {
  padding: 22px 12px !important;
  text-align: center;
  color: var(--brown);
}

.admin-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.admin-page-info {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--brown);
}

.admin-total {
  margin-top: 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-soft);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(200, 162, 74, 0.06);
  border: 1px solid rgba(200, 184, 154, 0.55);
  border-radius: 12px;
}

.admin-form h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--ink);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.admin-page .form-error {
  font-family: var(--font-sans);
  font-size: 13px;
  color: #9a4a3a;
  background: rgba(176, 90, 74, 0.1);
  border: 1px solid rgba(176, 90, 74, 0.25);
  border-radius: 9px;
  padding: 9px 12px;
  word-break: break-word;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-page .notice-item,
.admin-page .bounty-item,
.admin-page .notification-item {
  padding: 14px;
  background: #fffdf8;
  border: 1px solid rgba(200, 184, 154, 0.7);
  border-radius: 10px;
}

.admin-page .notification-item.is-unread {
  border-left: 3px solid var(--gold);
  background: rgba(200, 162, 74, 0.07);
}

.admin-page .notification-item.is-read {
  opacity: 0.82;
}

.admin-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.admin-item-head h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--ink);
  word-break: break-word;
}

.admin-item-body {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  word-break: break-word;
  white-space: pre-wrap;
}

.admin-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.admin-page .admin-link {
  padding: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--gold-deep);
  background: none;
  border: 0;
  cursor: pointer;
}

.admin-inline-actions {
  margin-bottom: 12px;
}

.admin-page .modal-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-page .modal-text {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  word-break: break-word;
}

.admin-page .modal-reason {
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid rgba(200, 184, 154, 0.75);
  border-radius: 9px;
  resize: vertical;
  outline: none;
}

.admin-page .modal-reason:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.16);
}

.admin-page .modal-actions {
  justify-content: flex-end;
}

/* ---------- 布局编辑器 ---------- */
.layout-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 16px;
  align-items: start;
}

.layout-stage {
  min-width: 0;
}

.layout-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.layout-dirty {
  margin-left: auto;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: #8a5a2b;
  background: rgba(200, 162, 74, 0.16);
  border: 1px solid rgba(200, 162, 74, 0.45);
  border-radius: 999px;
  white-space: nowrap;
}

#layout-canvas {
  display: block;
  width: 100%;
  height: 500px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f1e5;
  touch-action: none;
  cursor: grab;
}

#layout-canvas:active {
  cursor: grabbing;
}

.layout-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: rgba(200, 162, 74, 0.06);
  border: 1px solid rgba(200, 184, 154, 0.55);
  border-radius: 12px;
}

.layout-side h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 2px;
  color: var(--ink);
}

.layout-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
}

.layout-meta dt {
  color: var(--brown);
}

.layout-meta dd {
  color: var(--ink);
  word-break: break-word;
}

.layout-note {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.6;
  color: var(--brown);
}

/* ---------- 管理后台移动端（纵向卡片，无横向滚动） ---------- */
@media (max-width: 900px) {
  .admin-main {
    padding: 16px 12px 48px;
  }

  .admin-head .page-title {
    font-size: 22px;
    letter-spacing: 2px;
  }

  .admin-mobile-tip {
    display: block;
  }

  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .admin-nav {
    position: static;
    flex-direction: row;
    max-width: 100%;
    overflow-x: auto;
    padding: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .admin-nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 14px;
    text-align: center;
    white-space: nowrap;
  }

  .admin-nav-item.has-dirty::after {
    top: 6px;
    right: 6px;
  }

  .admin-panel {
    padding: 14px;
  }

  .admin-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-filter-actions .btn-small {
    width: 100%;
  }

  .layout-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  #layout-canvas {
    height: 320px;
  }

  .layout-dirty {
    margin-left: 0;
  }

  .admin-pager {
    justify-content: space-between;
  }

  .admin-item-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
