/* 小陈房源管理 —— 纯原生 CSS，无框架。断点仅 768px / 1024px（见 design.md 7.2）。 */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-soft: #faf9f6;
  --ink: #1e2623;
  --ink-soft: #4b5751;
  --muted: #75817b;
  --line: #e2ddd2;
  --line-strong: #cfc8bb;
  --accent: #0f6f64;
  --accent-dark: #0a564e;
  --accent-soft: #e4f2ef;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warn: #b54708;
  --warn-soft: #fef0e6;
  --rent: #0f6f64;
  --sale: #9a5b00;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(30, 38, 35, 0.06);
  --shadow: 0 10px 30px rgba(30, 38, 35, 0.08);
  --gap: 16px;
  --container: 1200px;
  --header-h: 64px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

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

/* hidden 属性必须始终生效：组件自身的 display 规则不能覆盖它 */
[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--accent);
}

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

.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;
}

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-danger {
  color: var(--danger);
  border-color: #e5b3ad;
  background: var(--danger-soft);
}

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

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label,
.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px; /* 避免 iOS 聚焦自动放大 */
}

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

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
  outline-offset: 1px;
}

.input-row {
  display: flex;
  align-items: stretch;
}

.input-row .input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.field-error {
  min-height: 18px;
  font-size: 13px;
  color: var(--danger);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.badge-for_rent { background: var(--accent-soft); color: var(--rent); }
.badge-rented { background: #edf1f0; color: #4b6058; }
.badge-for_sale { background: #fdf1de; color: var(--sale); }
.badge-sold { background: #f1ece6; color: #7a5a2f; }

/* ---------- 页头 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 243, 238, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.app-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--container);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 8px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-text small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-actions .btn {
  white-space: nowrap;
}

/* ---------- 页面容器 ---------- */
.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 16px 96px;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
}

.page-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.page-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 筛选区 ---------- */
.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters-row .field {
  flex: 1 1 160px;
  margin: 0;
}

.filter-toggle {
  display: inline-flex;
}

.filters-body {
  display: none;
  flex-direction: column;
  gap: 10px;
}

/* 移动端：筛选收进底部抽屉（基础样式即移动端，≥768px 恢复为行内） */
.filters.open .filters-body {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 62;
  display: flex;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 30px rgba(30, 38, 35, 0.18);
}

.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

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

.segmented button {
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- 列表 ---------- */
.list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ece7de;
  overflow: hidden;
}

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

.card-cover-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

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

.card-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-community {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 14px;
  color: var(--ink-soft);
}

.card-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: auto;
  padding-top: 6px;
  font-weight: 700;
  color: var(--ink);
}

.card-price strong {
  font-size: 22px;
  letter-spacing: -0.01em;
}

.card-price span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.card-updated {
  flex: 1 1 100%;
  font-size: 12px;
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.card-actions .btn {
  flex: 1 1 auto;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.pagination .btn {
  min-width: 88px;
}

/* ---------- 空态 / 提示 ---------- */
.empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
}

.empty strong {
  color: var(--ink);
  font-size: 18px;
}

.banner {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #f0c9a8;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 14px;
}

.banner.show {
  display: flex;
}

.banner-danger {
  border-color: #eab7b1;
  background: var(--danger-soft);
  color: var(--danger);
}

.banner-text {
  flex: 1;
}

/* 骨架屏 */
.skeleton-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.skeleton-card {
  height: 300px;
  border-radius: var(--radius);
  background: linear-gradient(100deg, #ece7de 30%, #f6f3ec 50%, #ece7de 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------- 详情 ---------- */
.detail-back {
  margin-bottom: 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.detail-main {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ece7de;
  cursor: zoom-in;
}

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

.detail-main-empty {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
}

.detail-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.detail-thumbs button {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: #ece7de;
  cursor: pointer;
}

.detail-thumbs button[aria-current="true"] {
  border-color: var(--accent);
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.detail-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.detail-price strong {
  font-size: 30px;
  letter-spacing: -0.02em;
}

.detail-price span {
  font-size: 14px;
  color: var(--muted);
}

.detail-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.detail-grid dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-grid dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.detail-notes {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 -16px -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  bottom: 0;
}

.detail-actions .btn {
  flex: 1 1 auto;
}

/* ---------- 表单 ---------- */
.form-wrap {
  max-width: 100%;
}

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

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.form-section {
  margin: 20px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.form-section h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px -16px -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.form-actions .btn {
  flex: 1 1 140px;
}

.form-actions .btn-primary {
  flex: 2 1 180px;
}

.form-errors {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #eab7b1;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
}

.form-errors.show {
  display: block;
}

/* 图片管理 */
.image-manager {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-manager-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.image-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #ece7de;
}

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

.image-item .icon-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(30, 38, 35, 0.72);
  color: #fff;
  cursor: pointer;
}

.image-empty {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 弹窗 / 抽屉 / 灯箱 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 26, 24, 0.5);
}

.dialog {
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.dialog h2 {
  margin: 0 0 4px;
  font-size: 19px;
}

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

.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.dialog-actions .btn {
  flex: 1;
}

.drawer {
  position: fixed;
  inset: auto 0 0;
  z-index: 62;
  transform: translateY(100%);
  transition: transform 0.25s ease;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 30px rgba(30, 38, 35, 0.18);
}

.drawer.open {
  transform: translateY(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 61;
  background: rgba(20, 26, 24, 0.4);
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c0f0e;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 56px;
  min-width: 44px;
  transform: translateY(-50%);
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }

.lightbox-counter {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

/* 移动端浮动新增按钮 */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1200px 600px at 15% 0%, #e0efe9 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #f2e6d3 0%, transparent 55%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.login-brand .brand-mark {
  width: 44px;
  height: 44px;
}

.login-brand .brand-mark svg {
  width: 26px;
  height: 26px;
}

.login-brand h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.04em;
}

.login-brand p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-error {
  min-height: 20px;
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--danger);
}

.login-submit {
  width: 100%;
  margin-top: 6px;
}

.login-foot {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 断点：≥768px（平板两列） ---------- */
@media (min-width: 768px) {
  .app-header-inner {
    padding: 8px 24px;
  }

  .page {
    padding: 24px 24px 80px;
  }

  .page-title h1 {
    font-size: 26px;
  }

  .filters {
    padding: 14px 16px;
  }

  .filters-toggle-row {
    display: none;
  }

  .filters-body,
  .filters.open .filters-body {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .filters-body .field {
    flex: 1 1 160px;
    margin: 0;
  }

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

  .form-wrap {
    max-width: 720px;
    margin: 0 auto;
  }

  .form-card {
    padding: 24px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-actions {
    position: static;
    margin: 20px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    background: transparent;
  }

  .form-actions .btn {
    flex: 0 0 auto;
    min-width: 120px;
  }

  .form-actions .btn-primary {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .detail-gallery {
    gap: 12px;
  }

  .detail-thumbs button {
    flex-basis: 96px;
    width: 96px;
    height: 96px;
  }

  .fab {
    display: none;
  }

  .form-actions.desktop-spread {
    justify-content: flex-end;
  }
}

/* ---------- 断点：≥1024px（桌面三列 / 详情左右分栏） ---------- */
@media (min-width: 1024px) {
  .app-header-inner {
    padding: 8px 32px;
  }

  .page {
    padding: 28px 32px 64px;
  }

  .list-grid,
  .skeleton-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .fab {
    display: none;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr);
    align-items: start;
    gap: 24px;
  }

  .detail-info {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }

  .detail-actions {
    position: static;
    margin: 0;
    padding: 4px 0 0;
    border-top: 1px solid var(--line);
  }

  .detail-actions .btn {
    flex: 1 1 40%;
  }

  .form-wrap {
    max-width: 760px;
  }
}

/* ---------- 动效与无障碍 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover {
    transform: none;
  }
}

body.lightbox-open {
  overflow: hidden;
}
