/* ==========================================================================
   业务页面样式 — 登录 / 详情 / 发布 / 类型 / 店铺 / 管理台
   ========================================================================== */

/* --------------------------------------------------------------- 通用 */

.btn--sm { height: 34px; padding: 0 14px; font-size: 13.5px; }

.pagehead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 2px 0 16px;
}
.pagehead h1 { margin: 0 0 3px; font-size: clamp(20px, 4.4vw, 26px); font-weight: 600; letter-spacing: -.02em; }
.pagehead p { margin: 0; font-size: 13px; }

.avatar--s { width: 30px; height: 30px; font-size: 13px; }

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px; padding: 1px 5px; border-radius: 4px;
  background: var(--surface-2); color: var(--accent-ink);
}

/* --------------------------------------------------------- 用户身份条 */

.userchip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px 0 4px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  transition: background .16s var(--ease-out);
}
.userchip:hover { background: var(--surface-2); }
.userchip__av {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
}
.userchip__name { font-size: 13.5px; font-weight: 500; }
.userchip__role {
  font-size: 11px; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-ink);
}

/* -------------------------------------------------------------- 卡片 */

.card__del {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-2);
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(6px);
  box-shadow: 0 1px 4px rgba(28, 24, 20, .12);
  transition: transform .14s var(--ease-out), background .16s var(--ease-out), color .16s var(--ease-out);
}
.card__del:active { transform: scale(.9); }
.card__del:hover { background: var(--accent); color: #fff; }

.card__owner {
  display: block; margin-top: 5px; padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-3);
}
.card__owner::before { content: '店铺 '; }

.taglist { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 6px; }
.taglist--s { gap: 4px; margin: 0 0 7px; }
/* 品牌标签：高级黑色胶囊样式 */
.tagchip {
  font-size: 11px; letter-spacing: .06em; padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--ink); color: #fff; border: 0;
  font-weight: 500; line-height: 1.5;
}
.tagchip--s {
  font-size: 10px; letter-spacing: .04em; padding: 1.5px 7px;
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line);
}
.tagchip--edit { display: inline-flex; align-items: center; gap: 4px; padding-right: 5px; }
.tagchip--edit button {
  width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 1;
}
.tagchip--edit button:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* ---------------------------------------------------------- 商品详情 */

.detail { display: grid; gap: 18px; }
.detail__gal { display: grid; gap: 8px; }
.detail__main {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-lg); background: var(--surface-2);
  aspect-ratio: 1 / 1;
  touch-action: pan-y;
}
.detail__main img { transition: opacity .2s ease, transform .2s ease; user-select: none; -webkit-user-drag: none; }
.detail__main img { width: 100%; height: 100%; object-fit: cover; }
.detail__zoom {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(20, 19, 17, .55); color: #fff; font-size: 12px;
  backdrop-filter: blur(6px);
}
.detail__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.detail__thumbs::-webkit-scrollbar { display: none; }
.detail__thumb {
  flex: none; width: 62px; aspect-ratio: 1/1; border-radius: var(--r-sm);
  overflow: hidden; border: 2px solid transparent; background: var(--surface-2);
  transition: border-color .16s var(--ease-out), transform .16s var(--ease-out);
}
.detail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail__thumb.is-on { border-color: var(--ink); }
.detail__thumb:active { transform: scale(.94); }
.detail__thumb img { transition: opacity .2s ease; }
.detail__thumb.is-on { box-shadow: 0 0 0 2px var(--accent-soft); }
.detail__mobilebar { display: none; }

.detail__info { display: grid; gap: 10px; align-content: start; }
.detail__cat {
  justify-self: start; font-size: 12px; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.detail__info h1 { margin: 0; font-size: clamp(19px, 4vw, 24px); font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.detail__price { font-size: 24px; font-weight: 600; color: var(--accent); letter-spacing: -.01em; }
.detail__price .muted { font-size: 15px; font-weight: 400; }
.detail__desc { padding-top: 12px; border-top: 1px solid var(--line); }
.detail__desc h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.detail__desc p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.75; }

.detail__owner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: var(--r-md); background: var(--surface-2);
}
.detail__owner .avatar { flex: none; }
.detail__owner > div { flex: 1; min-width: 0; }
.detail__ownername { font-size: 14px; font-weight: 500; }
.detail__ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.detail__ops .btn--primary { grid-column: 1 / -1; }
/* 店主专属操作：编辑 / 删除 */
.detail__ownerops { display: grid; gap: 8px; margin-top: 10px; }

/* ---------------------------------------------------------- 发布商品 */

.uploader { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.uploader__item {
  position: relative; aspect-ratio: 1/1; border-radius: var(--r-md);
  overflow: hidden; background: var(--surface-2);
}
.uploader__item img { width: 100%; height: 100%; object-fit: cover; }
.uploader__cover {
  position: absolute; left: 6px; bottom: 6px;
  padding: 2px 7px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-size: 11px;
}
.uploader__x {
  position: absolute; right: 5px; top: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
  background: rgba(20, 19, 17, .55); color: #fff;
}
.uploader__add {
  aspect-ratio: 1/1; border-radius: var(--r-md);
  border: 1.5px dashed var(--line-2); background: var(--surface-2);
  display: grid; place-items: center; gap: 3px; cursor: pointer;
  color: var(--ink-3); font-size: 12px;
  transition: border-color .16s var(--ease-out), color .16s var(--ease-out);
}
.uploader__add:hover { border-color: var(--ink-3); color: var(--ink-2); }

.picker { border-top: 1px solid var(--line); padding-top: 12px; }
.picker__head { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.picker__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 6px; max-height: 168px; overflow-y: auto; padding-right: 2px;
}
.picker__item {
  aspect-ratio: 1/1; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; background: var(--surface-2);
  transition: transform .14s var(--ease-out), border-color .16s var(--ease-out);
}
.picker__item img { width: 100%; height: 100%; object-fit: cover; }
.picker__item:active { transform: scale(.93); }
.picker__item.is-on { border-color: var(--accent); }

.taginput {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 7px 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface-2);
}
.taginput input {
  flex: 1; min-width: 110px; border: 0; background: none; outline: none;
  font-size: 14px; color: var(--ink);
}
.taginput input::placeholder { color: var(--ink-3); }

.inline-form { display: flex; gap: 8px; }
.inline-form input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink);
}
.inline-form input:focus { outline: none; border-color: var(--ink-3); background: var(--surface); }
.inline-form .btn { flex: none; }

/* ---------------------------------------------------------- 类型管理 */

.catlist { display: grid; gap: 8px; }
.catlist__row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2);
}
.catlist__name { font-size: 14px; font-weight: 500; }
.catlist__row .mini:disabled { opacity: .35; cursor: not-allowed; }

/* 分类筛选九宫格 */
.catgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.catgrid__item {
  height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center; padding: 0 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-2); font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: transform .14s var(--ease-out), background .16s var(--ease-out),
              border-color .16s var(--ease-out), color .16s var(--ease-out);
}
.catgrid__item:active { transform: scale(.96); }
.catgrid__item.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* -------------------------------------------------------------- 店铺 */

.shophead {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-1); margin-bottom: 16px;
}
.shophead .avatar { flex: none; width: 52px; height: 52px; font-size: 19px; }
.shophead__main { flex: 1; min-width: 0; }
.shophead h1 { margin: 0 0 2px; font-size: 18px; font-weight: 600; }
.shophead p { margin: 0; font-size: 12.5px; }

.userlist { display: grid; gap: 8px; }
.userlist__row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2);
  text-align: left; transition: background .16s var(--ease-out);
}
.userlist__row:hover { background: var(--surface); box-shadow: var(--shadow-1); }
.userlist__name { font-size: 14px; font-weight: 500; }

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

.utable { display: grid; gap: 8px; }
.utable__row {
  display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px;
  align-items: center; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--surface-2);
}
.utable__name { font-size: 14px; font-weight: 500; }
.utable__role {
  margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--line); color: var(--ink-2);
}
.utable__role.is-admin { background: var(--accent-soft); color: var(--accent-ink); }

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

.auth {
  min-height: calc(100dvh - 40px);
  display: grid; place-items: center; padding: 24px 16px 40px;
}
.auth__card {
  width: 100%; max-width: 380px;
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2); padding: 26px 22px 22px;
  animation: rise .4s var(--ease) both;
}
.auth__brand { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.auth__brand strong { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.tabs--auth { margin-bottom: 18px; }
.auth__hint {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-3); line-height: 1.9;
}
.auth__hint p { margin: 0; }

.captcha { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; align-items: center; }
.captcha canvas {
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  cursor: pointer; display: block; width: 120px; height: 44px;
}
.captcha input {
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); letter-spacing: .12em;
  text-transform: uppercase; min-width: 0;
}
.captcha input:focus { outline: none; border-color: var(--ink-3); background: var(--surface); }
.captcha__re {
  font-size: 12.5px; color: var(--ink-2); padding: 6px 8px;
  border-radius: var(--r-sm); white-space: nowrap;
}
.captcha__re:hover { background: var(--surface-2); }

/* --------------------------------------------------------- 断点适配 */

@media (min-width: 640px) {
  .uploader { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  .detail { grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: start; }
  .detail__gal { position: sticky; top: 130px; }
  .detail__ops { grid-template-columns: repeat(3, 1fr); }
  .detail__ops .btn--primary { grid-column: 1 / -1; }
  .uploader { grid-template-columns: repeat(5, 1fr); }
  .auth { min-height: calc(100dvh - 60px); }
}

/* ==========================================================================
   搜索方式切换 + 类型快捷管理
   ========================================================================== */

.search { position: relative; }
.search__mode {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 2;
  height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line-2); font-size: 12px; white-space: nowrap;
  transition: background .16s var(--ease-out), color .16s var(--ease-out),
              border-color .16s var(--ease-out), transform .14s var(--ease-out);
}
.search__mode:active { transform: translateY(-50%) scale(.94); }
.search__mode[aria-pressed="true"] {
  background: var(--ink); color: #fff; border-color: var(--ink);
}
.search__input { padding-right: 58px !important; }
.search__clear { right: 8px; }

.chip--add {
  width: 32px; padding: 0; justify-content: center;
  color: var(--ink-3); border-style: dashed;
}
.chip--add:hover { color: var(--ink); border-color: var(--ink-3); }

/* ==========================================================================
   头像 / 视频 / 审核 / 页脚 / 手机端框架
   ========================================================================== */

.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.userchip__av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar--lg { width: 64px; height: 64px; font-size: 22px; }

.avatarpick { display: flex; align-items: center; gap: 14px; }
.avatarpick .avatar { flex: none; }
.avatarpick__ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.avatarpick__ops p { width: 100%; margin: 0; font-size: 12px; }

.linkbtn {
  display: inline-block; margin-bottom: 12px;
  font-size: 13px; color: var(--ink-2); text-decoration: underline;
  text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--ink); }

.auth__notice {
  margin: -4px 0 12px; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink-2); font-size: 12.5px;
}
.field__err { color: var(--accent); font-size: 12.5px; }
.field__ok {
  display: block; margin: -4px 0 12px; padding: 9px 12px;
  border-radius: var(--r-sm); background: #eaf3e6; color: #2f6b1f; font-size: 12.5px;
}

.videolist { display: grid; gap: 8px; }
.videolist__row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2);
}
.videolist__name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.videos { display: grid; gap: 12px; margin-top: 12px; }
.videos__item { border-radius: var(--r-md); overflow: hidden; background: var(--dark); }
.videos__item video { width: 100%; display: block; max-height: 320px; background: var(--dark); }
.videos__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: var(--surface-2);
}
.videos__name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

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

.utable__ops { display: flex; gap: 6px; }
.rlist { display: grid; gap: 10px; }
.rlist__row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 11px 12px; border-radius: var(--r-md); background: var(--surface-2);
}
.rlist__name { font-size: 14px; font-weight: 500; }

/* ------------------------------------------------------------------ 页脚 */

.sitefoot {
  max-width: 1400px; margin: 0 auto;
  padding: 24px 18px 28px; text-align: center;
  border-top: 1px solid var(--line);
}
.sitefoot p { margin: 0 0 6px; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.sitefoot__brand {
  font-size: 13px !important; color: var(--ink-2) !important;
  font-weight: 600; letter-spacing: .02em; margin-bottom: 8px !important;
}

.state--error .state__icon { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }

@media (max-width: 639px) {
  .sitefoot { padding-bottom: calc(126px + var(--tabbar-h) + env(safe-area-inset-bottom)); }
}

/* 手机优先视口：桌面浏览器也保持手机宽度，避免导航和内容被拉伸。 */
html { overflow-x: hidden; }
body {
  width: 100%; max-width: 480px; margin: 0 auto;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  overflow-x: hidden;
}
main, .appbar, .sitefoot { width: 100%; max-width: 480px; margin-left: auto; margin-right: auto; }
.tabbar {
  left: 50%; right: auto; width: 100%; max-width: 480px;
  transform: translateX(-50%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  display: grid;
}
.tabbar a, .tabbar button { min-height: 44px; flex-direction: column; gap: 2px; }
.tabbar a span, .tabbar button span { white-space: nowrap; }
.tabbar a:active, .tabbar button:active { opacity: .6; }
.fab { display: grid; width: 56px; height: 56px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
.appbar__inner { max-width: 480px; }

@media (min-width: 481px) {
  html { background: #e8eeeb; }
  body { box-shadow: 0 0 0 1px rgba(31, 64, 52, .08), 0 18px 60px rgba(31, 64, 52, .14); }
  .desknav { display: none !important; }
  .tabbar { display: grid !important; }
  .fab { display: grid !important; right: calc(50% - 240px + 16px); }
  .appbar__actions .appbar__desk, .appbar__actions .iconbtn { display: none !important; }
}

/* --------------------------------------- 平板区间（768–899）保持手机框 */
/* 注意：≥900px 由 app.css 接管为完整桌面布局（desknav + 多列网格），
   所以手机框只在 768–899 生效，避免两者叠加把顶栏挤爆 */

@media (min-width: 768px) and (max-width: 899px) {
  html { background: #e8e6e1; }
  body {
    background: var(--bg);
    max-width: 430px; margin: 0 auto;
    box-shadow: 0 0 0 1px rgba(28, 24, 20, .07), 0 18px 60px rgba(28, 24, 20, .14);
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    position: relative;
  }
  /* 视口级覆盖：手机宽度内一律保持单手布局 */
  .appbar, main, .sitefoot { max-width: 430px; margin-left: auto; margin-right: auto; }
  .tabbar { max-width: 430px; left: 0; right: 0; margin: 0 auto; }
  .fab { right: calc(50% - 215px + 16px); }
  .viewer { max-width: 430px; left: 0; right: 0; margin: 0 auto; }
  .sheet { max-width: 430px; left: 0; right: 0; margin: 0 auto; }
  .toast { max-width: 380px; }

  .desknav { display: none; }
  .album, .album.is-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); columns: 2; }
  .detail { grid-template-columns: 1fr; gap: 18px; }
  .detail__gal { position: static; }
  .checkout-grid { grid-template-columns: 1fr; }
  .uploader { grid-template-columns: repeat(3, 1fr); }
  .main, main { padding-left: 10px; padding-right: 10px; }
}

/* ----------------------------------------------------- 逛逛商家（公开发现入口） */
.merchants { margin: 2px 0 18px; }
.merchants__scroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.merchants__scroll::-webkit-scrollbar { display: none; }
.merchant {
  flex: 0 0 auto; width: 92px; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .16s var(--ease-out), border-color .16s var(--ease-out), box-shadow .16s var(--ease-out);
}
.merchant:active { transform: scale(.97); }
.merchant:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.merchant__av {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 18px; font-weight: 600; overflow: hidden;
}
.merchant__av img { width: 100%; height: 100%; object-fit: cover; }
.merchant__name { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.merchant__count { font-size: 11.5px; color: var(--ink-3); }

/* 发布流程强化 */
.publish-stepbar {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 18px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: rgba(255, 253, 249, .72);
}
.publish-step { display: flex; align-items: center; gap: 7px; color: var(--ink-3); white-space: nowrap; }
.publish-step span {
  width: 27px; height: 27px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-2); color: var(--ink-3);
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
}
.publish-step b { font-size: 12.5px; font-weight: 600; }
.publish-step.is-active { color: var(--accent-ink); }
.publish-step.is-active span { background: var(--accent); color: #fff; }
.publish-stepbar > i { flex: 1; height: 1px; background: var(--line-2); min-width: 12px; }
.publish-panel { margin-bottom: 14px; }
.publish-panel--media { border-top: 3px solid var(--accent); }
.publish-panel .panel__head h3 { letter-spacing: -.01em; }
.publish-panel--info { padding-bottom: 18px; }
.publish-panel--info #pubSubmit { min-height: 48px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.uploader__add { background: #fbf7f1; border-color: #d4b9a3; color: var(--accent-ink); }
.uploader__add:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.taginput, .inline-form input, .field input, .field select, .field textarea { background: #fbf8f3; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155, 91, 54, .1); }

@media (max-width: 639px) {
  .pagehead { margin-bottom: 12px; }
  .pagehead h1 { font-size: 22px; }
  .publish-stepbar { gap: 6px; padding: 10px 9px; }
  .publish-step { gap: 4px; }
  .publish-step span { width: 24px; height: 24px; font-size: 10px; }
  .publish-step b { font-size: 11px; }
  .publish-panel--info #pubSubmit { position: sticky; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); z-index: 10; }
  .detail { padding-bottom: 78px; }
  .detail__mobilebar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 88;
    display: grid; grid-template-columns: 82px 1fr; gap: 9px;
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255, 253, 249, .96); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(61, 42, 27, .08); backdrop-filter: blur(14px);
  }
  .detail__mobilebar .btn { min-height: 44px; }
  .detail__mobilefav { border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); font-size: 12px; color: var(--ink-2); }
}

/* 第二阶段：发现、加载和媒体反馈 */
.discovery-hero { display:flex; align-items:stretch; justify-content:space-between; gap:16px; margin: 0 0 18px; padding: 22px 24px; border:1px solid #ead9cb; border-radius:20px; background:linear-gradient(118deg,#fffaf3 0%,#f2e5d7 100%); overflow:hidden; position:relative; }
.discovery-hero::after { content:''; position:absolute; width:180px; height:180px; border-radius:50%; right:14%; top:-92px; background:rgba(155,91,54,.10); }
.discovery-hero__copy { position:relative; z-index:1; min-width:0; }
.discovery-hero .eyebrow { color:var(--accent-ink); font-size:11px; font-weight:700; letter-spacing:.12em; }
.discovery-hero h1 { margin:6px 0 5px; font-size:clamp(22px,4vw,32px); letter-spacing:-.04em; }
.discovery-hero p { margin:0; color:var(--ink-2); font-size:13px; line-height:1.6; max-width:560px; }
.discovery-hero__stats { display:flex; gap:14px; margin-top:14px; color:var(--ink-3); font-size:12px; }
.discovery-hero__stats b { color:var(--ink); margin-right:3px; }
.discovery-hero__action { position:relative; z-index:1; align-self:center; flex:none; display:flex; align-items:center; gap:10px; padding:11px 15px; border-radius:var(--r-pill); background:var(--dark); color:#fff; font-size:12px; font-weight:700; }
.discovery-hero__action span { font-size:17px; line-height:1; }
.discovery-status { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:-4px 0 14px; padding:9px 12px; border-radius:var(--r-md); background:rgba(255,253,249,.78); border:1px solid var(--line); color:var(--ink-2); font-size:12px; }
.discovery-status i { display:inline-block; width:6px; height:6px; margin-right:7px; border-radius:50%; background:var(--accent); }
.skeleton-page { display:grid; gap:14px; }
.skeleton-page span { height:92px; border-radius:var(--r-lg); background:linear-gradient(90deg,#eee7df 25%,#f8f4ee 45%,#eee7df 65%); background-size:300% 100%; animation:skeleton-shimmer 1.2s ease-in-out infinite; }
.skeleton-page--detail { grid-template-columns:1fr 1fr; }
.skeleton-page--detail span:first-child { grid-row:span 3; height:340px; }
@keyframes skeleton-shimmer { from { background-position:100% 0; } to { background-position:-100% 0; } }
.card__media, .detail__main, .detail__thumb { position:relative; }
.card__media::before, .detail__main::before, .detail__thumb::before { content:''; position:absolute; inset:0; background:linear-gradient(90deg,rgba(238,231,223,.8) 25%,rgba(248,244,238,.9) 45%,rgba(238,231,223,.8) 65%); background-size:300% 100%; animation:skeleton-shimmer 1.2s ease-in-out infinite; pointer-events:none; opacity:1; transition:opacity .2s; z-index:0; }
.card__media:has(img.is-loaded)::before, .detail__main:has(img.is-loaded)::before, .detail__thumb:has(img.is-loaded)::before { opacity:0; }
.card__media img, .detail__main img, .detail__thumb img { position:relative; z-index:1; }
.card__media.is-media-error::after, .detail__main.is-media-error::after, .detail__thumb.is-media-error::after { content:'图片暂不可用'; position:absolute; inset:0; display:grid; place-items:center; z-index:2; color:var(--ink-3); font-size:12px; background:#eee8df; }
@media (max-width:639px) { .discovery-hero { padding:18px 16px; } .discovery-hero__action { padding:10px 12px; } .discovery-hero p { font-size:12px; } .skeleton-page--detail { grid-template-columns:1fr; } .skeleton-page--detail span:first-child { grid-row:auto; height:260px; } }

/* ------------------------------------------------------------------ 页面重写组件 */
.detail { display: block; padding-bottom: 82px; }
.detail__gal { display: block; }
.detail-topline { display:flex; align-items:center; justify-content:space-between; min-height:44px; margin-bottom:8px; }
.backlink { color:var(--accent); font-size:14px; }
.detail-copyhead { display:flex; align-items:flex-start; gap:12px; justify-content:space-between; }
.detail-copyhead h1 { margin:4px 0 8px; font-size:20px; line-height:1.4; }
.copy-link { flex:none; min-height:44px; border:0; color:var(--accent); background:var(--accent-soft); border-radius:8px; padding:8px 12px; }
.detail-price-line { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.detail-count { color:var(--ink-3); font-size:12px; }
.detail-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.detail-photo-wrap { position:relative; aspect-ratio:1; min-width:0; }
.detail-photo { display:block; width:100%; height:100%; padding:0; border:0; border-radius:10px; overflow:hidden; background:#cfe5da; }
.detail-photo img { width:100%; height:100%; object-fit:cover; }
.detail-check { position:absolute; right:7px; top:7px; width:30px; height:30px; border:2px solid #fff; border-radius:50%; background:rgba(31,42,39,.5); color:transparent; font-size:17px; z-index:2; }
.detail-photo-wrap.is-selected .detail-check { background:var(--accent); color:#fff; }
.detail-photo-wrap.is-selected .detail-photo { outline:3px solid var(--accent); outline-offset:-3px; }
.detail-selectbar { display:flex; justify-content:space-between; align-items:center; min-height:46px; color:var(--ink-3); font-size:12px; }
.detail__info { display:grid; gap:12px; margin-top:18px; }
.detail__info h1 { display:none; }
.detail__ops { grid-template-columns:1fr 1fr; }
.detail__ops .btn--primary { grid-column:1 / -1; }
.detail__mobilebar { position:fixed; display:grid; grid-template-columns:1fr 1fr; gap:8px; left:0; right:0; bottom:0; z-index:88; padding:8px 12px calc(8px + env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--line); }
.detail__mobilebar .btn, .detail__mobilefav { min-height:46px; border-radius:8px; }
.detail__mobilefav { border:1px solid var(--line); background:var(--accent-soft); color:var(--accent); }
.detail-empty { grid-column:1/-1; padding:48px 0; text-align:center; color:var(--ink-3); }
.category-layout { display:grid; grid-template-columns:112px 1fr; gap:12px; align-items:start; }
.category-side { position:sticky; top:120px; display:grid; gap:4px; }
.category-side__item { display:flex; justify-content:space-between; min-height:44px; padding:10px 9px; border:0; border-radius:8px; background:transparent; color:var(--ink-2); text-align:left; }
.category-side__item b { color:var(--ink-3); font-size:12px; }
.category-side__item.is-on { background:var(--accent-soft); color:var(--accent); font-weight:700; }
.category-results .album { display:block; }
.category-results .feed-card { padding:9px; }
.category-results .feed-copy { font-size:13px; }
.profile-page { display:grid; gap:12px; }
.profile-card { display:flex; align-items:center; gap:12px; padding:16px; border-radius:14px; background:var(--surface); box-shadow:var(--shadow-1); }
.profile-card--guest { min-height:100px; }
.profile-card h1, .profile-card p { margin:0; }
.profile-card p { margin-top:5px; color:var(--ink-3); font-size:12px; }
.profile-main { flex:1; min-width:0; }
.profile-main h1 { font-size:18px; }
.profile-stats { display:grid; grid-template-columns:repeat(3,1fr); padding:15px 8px; border-radius:14px; background:var(--surface); box-shadow:var(--shadow-1); }
.profile-stats div { display:grid; justify-items:center; gap:4px; border-right:1px solid var(--line); }
.profile-stats div:last-child { border:0; }
.profile-stats b { color:var(--accent); font-size:20px; }
.profile-stats span { color:var(--ink-3); font-size:12px; }
.profile-list { display:grid; gap:1px; overflow:hidden; border-radius:14px; background:var(--surface); box-shadow:var(--shadow-1); }
.profile-entry { display:flex; justify-content:space-between; align-items:center; min-height:52px; padding:0 16px; border:0; border-bottom:1px solid var(--line); background:var(--surface); color:var(--ink); text-decoration:none; font-size:14px; }
.profile-entry:last-child { border:0; }
.profile-entry b { color:var(--ink-3); font-size:21px; font-weight:400; }
.profile-logout { margin-top:4px; }
.batch-page { padding-bottom:76px; }
.batch-count { color:var(--accent); font-size:13px; }
.batch-list { display:grid; gap:8px; }
.batch-row { display:flex; align-items:center; gap:10px; min-height:80px; padding:8px 10px; border-radius:12px; background:var(--surface); }
.batch-row input { width:22px; height:22px; accent-color:var(--accent); }
.batch-row img { width:64px; height:64px; border-radius:10px; object-fit:cover; background:#cfe5da; }
.batch-row span { display:grid; gap:6px; min-width:0; }
.batch-row b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.batch-row small { color:var(--ink-3); }
.batch-actions { position:fixed; left:0; right:0; bottom:0; z-index:88; display:grid; grid-template-columns:repeat(4,1fr); gap:6px; padding:8px 10px calc(8px + env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--line); }
.batch-actions button { min-height:44px; border:0; border-radius:8px; background:var(--accent-soft); color:var(--accent); font-size:12px; }
.batch-actions .is-danger { color:#b84a4a; }
