/* ============================================================
   Dremory · 灵感图集  —— 极简白盒风
   纯白 / 大量留白 / 细边框 / 黑白灰 · 响应式
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
  --accent: #111111;
  --accent-soft: rgba(17, 17, 17, .06);
  --accent-grad: #111111;

  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-soft: #f6f6f5;
  --text: #111111;
  --text-2: #5f5f5f;
  --text-3: #9a9a9a;
  --border: #e8e8e6;
  --border-strong: #d8d8d5;
  --shadow: 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .10);
  --mask: rgba(255, 255, 255, .72);
  --cursor-glow: rgba(17, 17, 17, .05);
  --track: rgba(0, 0, 0, .08);
  --radius: 4px;
}
[data-theme="dark"] {
  --accent: #f5f5f5;
  --accent-soft: rgba(255, 255, 255, .10);
  --accent-grad: #f5f5f5;

  --bg: #0c0c0c;
  --bg-elev: #161616;
  --bg-soft: #1c1c1c;
  --text: #f2f2f2;
  --text-2: #a8a8a8;
  --text-3: #6e6e6e;
  --border: #262626;
  --border-strong: #343434;
  --shadow: 0 1px 3px rgba(0, 0, 0, .5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .7);
  --mask: rgba(0, 0, 0, .72);
  --cursor-glow: rgba(255, 255, 255, .07);
  --track: rgba(255, 255, 255, .12);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--text-3); }
.sm { font-size: 12.5px; }
.center { text-align: center; }
::selection { background: var(--text); color: var(--bg); }

/* ---------- 鼠标聚焦效果（弱化） ---------- */
.cursor-glow, .cursor-ring, .cursor-dot { display: none; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  transition: all .18s ease; white-space: nowrap; letter-spacing: .01em;
  border: 1px solid transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { opacity: .85; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--text); }
.btn-outline { border: 1px solid var(--text); color: var(--text); background: transparent; }
.btn-outline:hover { background: var(--text); color: var(--bg); }
.btn.lg { padding: 13px 28px; font-size: 15px; }
.btn.sm { padding: 6px 14px; font-size: 13px; }
.btn.block { width: 100%; margin-top: 16px; }
.btn-ico { width: 16px; height: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-loading {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(127,127,127,.4); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; transition: background .2s; flex: none;
  border: 1px solid transparent;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 20px; height: 20px; fill: var(--text); }
[data-theme="light"] .ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; flex: none; letter-spacing: -.02em; }
.brand-logo { width: 26px; height: 26px; fill: var(--text); }
.brand-logo.lg { width: 42px; height: 42px; }
.brand-name { letter-spacing: -.02em; }

.search-box {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft); border-radius: var(--radius); padding: 0 14px;
  border: 1px solid transparent; transition: border-color .2s, background .2s;
}
.search-box:focus-within { border-color: var(--text); background: var(--bg); }
.search-ico { width: 17px; height: 17px; fill: var(--text-3); flex: none; }
.search-box input { flex: 1; border: none; outline: none; background: transparent; padding: 11px 0; color: var(--text); font-size: 14px; }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang-select { display: flex; align-items: center; gap: 4px; background: transparent; border-radius: var(--radius); padding: 0 8px; border: 1px solid var(--border); }
.lang-ico { width: 16px; height: 16px; fill: var(--text-3); }
.lang-select select { border: none; background: transparent; color: var(--text); outline: none; padding: 9px 2px; font-weight: 500; cursor: pointer; font-size: 13px; }
.lang-select option { background: var(--bg-elev); color: var(--text); }

/* 头像下拉 */
.avatar-menu { position: relative; }
.avatar-btn { padding: 0; }
.avatar {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 15px; overflow: hidden; flex: none;
  border: 1px solid var(--border-strong);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 48px; height: 48px; font-size: 18px; }
.avatar.xl { width: 92px; height: 92px; font-size: 34px; border-width: 1px; }
.dropdown {
  position: absolute; right: 0; top: 48px; width: 232px;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s ease;
}
.dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dd-name { font-weight: 600; font-size: 14px; }
.dd-mail { font-size: 12px; color: var(--text-3); word-break: break-all; }
.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  transition: background .15s;
}
.dd-item:hover { background: var(--bg-soft); }
.dd-item svg { width: 18px; height: 18px; fill: var(--text-2); }
.dd-item.danger { color: #c0392b; }
.dd-item.danger svg { fill: #c0392b; }
.dd-sep { height: 1px; background: var(--border); margin: 4px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; max-width: 1280px; margin: 0 auto;
  padding: 110px 32px 90px; text-align: center;
}
.blob { display: none; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(0,0); } }

.hero-content { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; }
.hero-badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border-strong);
  font-size: 12px; font-weight: 500; color: var(--text-2);
  margin-bottom: 28px; letter-spacing: .02em;
}
.hero-title {
  font-size: clamp(34px, 5.5vw, 56px); line-height: 1.12; font-weight: 700;
  letter-spacing: -.03em; margin-bottom: 22px; color: var(--text);
}
.hero-title .grad { -webkit-text-fill-color: currentColor; color: var(--text); }
.hero-sub { font-size: 16px; color: var(--text-2); margin-bottom: 36px; line-height: 1.7; font-weight: 400; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-bottom: 64px; }
.hero-stats { display: flex; gap: 0; justify-content: center; }
.hero-stats > div { padding: 0 32px; border-right: 1px solid var(--border); }
.hero-stats > div:last-child { border-right: none; }
.hero-stats b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.hero-stats span { font-size: 13px; color: var(--text-3); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero-badge, .hero-title, .hero-sub, .hero-cta, .hero-stats { animation: fadeUp .7s ease both; }
.hero-title { animation-delay: .05s; } .hero-sub { animation-delay: .12s; }
.hero-cta { animation-delay: .2s; } .hero-stats { animation-delay: .28s; }

/* Hero 装饰拍立得（极简风隐藏） */
.hero-polaroids { display: none; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  position: sticky; top: 69px; z-index: 90;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  padding: 18px 32px; max-width: 1280px; margin: 0 auto;
  border-bottom: 1px solid var(--border);
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: transparent; border: 1px solid var(--border-strong); color: var(--text-2);
  transition: all .18s ease;
}
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag-banner {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 7px 8px 7px 14px; border-radius: 999px;
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--border-strong);
  font-weight: 500; font-size: 13px;
}
.tag-banner-x { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.tag-banner-x svg { width: 12px; height: 12px; }
.tag-banner-name { font-size: 14px; font-weight: 600; }

/* ---------- 瀑布流 ---------- */
.masonry-wrap { max-width: 1280px; margin: 0 auto; padding: 32px 32px 100px; }
.masonry { columns: 4; column-gap: 20px; }
@media (max-width: 1100px) { .masonry { columns: 3; } }
@media (max-width: 860px) { .masonry { columns: 3; } }
@media (max-width: 620px) { .masonry { columns: 2; column-gap: 12px; } }

.card {
  break-inside: avoid; margin-bottom: 20px;
  border-radius: var(--radius); overflow: hidden; background: var(--bg-elev);
  border: 1px solid var(--border); cursor: pointer;
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s ease, transform .3s ease, border-color .3s ease;
}
.card.revealed { opacity: 1; transform: translateY(0); }
.card:hover { border-color: var(--border-strong); }
.card-imgbox { position: relative; overflow: hidden; background: var(--bg-soft); }
.card-imgbox.orient-p { aspect-ratio: 3 / 4; }
.card-imgbox.orient-l { aspect-ratio: 4 / 3; }
.card-imgbox.orient-s { aspect-ratio: 1 / 1; }
.card-imgbox img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card-imgbox img { transform: scale(1.03); }

.card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; z-index: 2; }
.badge {
  padding: 3px 9px; border-radius: 2px; font-size: 11px; font-weight: 600;
  color: #fff; letter-spacing: .03em;
  background: rgba(17,17,17,.82); backdrop-filter: blur(4px);
}
.badge.ai { background: rgba(17,17,17,.82); }
.badge.type { background: rgba(17,17,17,.82); }
.badge.free { background: rgba(255,255,255,.92); color: var(--text); border: 1px solid var(--border); }
.badge.price { background: #fff; color: var(--text); border: 1px solid var(--border); }

.card-like {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.94); color: #555; border: 1px solid var(--border);
  opacity: 0; transform: scale(.85); transition: all .2s;
}
.card:hover .card-like { opacity: 1; transform: scale(1); }
.card-like svg { width: 17px; height: 17px; fill: currentColor; }
.card-like.liked { color: #e60023; opacity: 1; transform: scale(1); }

.card-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 45%);
  display: flex; flex-direction: column; padding: 12px;
  opacity: 0; transition: opacity .25s;
}
.card:hover .card-overlay { opacity: 1; }
.card-quick {
  align-self: flex-end;
  background: #fff; color: #111; font-weight: 600; font-size: 12px;
  padding: 8px 15px; border-radius: 999px;
  transform: translateY(6px); transition: transform .25s;
}
.card:hover .card-quick { transform: translateY(0); }
.card-meta { color: #fff; margin-top: auto; }
.card-meta h4 { font-size: 14px; font-weight: 600; margin-bottom: 3px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.card-meta .author { font-size: 12px; opacity: .9; display: flex; align-items: center; gap: 6px; }
.card-meta .author .avatar { width: 20px; height: 20px; font-size: 10px; border: none; }

.card-foot { display: flex; align-items: center; gap: 8px; padding: 11px 13px; }
.card-foot .avatar { width: 26px; height: 26px; font-size: 11px; border: 1px solid var(--border); }
.card-foot b { font-size: 13px; font-weight: 500; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.card-foot .cprice { font-size: 13px; font-weight: 700; color: var(--text); }
.card-foot .cprice.free { color: var(--text-3); font-weight: 500; }

.empty { text-align: center; padding: 90px 20px; color: var(--text-3); }
.empty svg { width: 48px; height: 48px; fill: none; stroke: var(--text-3); margin: 0 auto 16px; }
.empty.sm { padding: 44px 20px; }

/* ---------- 弹层通用 ---------- */
.overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
#profileOverlay { z-index: 200; }
#detailOverlay { z-index: 210; }
#authOverlay, #uploadOverlay { z-index: 220; }
#payOverlay { z-index: 230; }
.overlay[hidden] { display: none; }
.overlay-mask { position: absolute; inset: 0; background: var(--mask); backdrop-filter: blur(8px); animation: maskIn .25s ease; }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
.close-btn {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-soft); display: grid; place-items: center;
  transition: transform .2s, background .2s; border: 1px solid var(--border);
}
.close-btn:hover { background: var(--border-strong); }
.close-btn svg { width: 17px; height: 17px; }
.close-btn.light { background: rgba(255,255,255,.16); color: #fff; border-color: transparent; }
.close-btn.light:hover { background: rgba(255,255,255,.3); }

.modal-panel {
  position: relative; z-index: 2; width: 100%; max-width: 420px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
  padding: 34px 30px; box-shadow: var(--shadow-lg);
  max-height: 92vh; overflow-y: auto;
  animation: panelIn .3s ease;
}
.modal-panel.wide { max-width: 660px; }
.modal-panel.sm { max-width: 400px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand-logo { margin: 0 auto 12px; }
.auth-head h3 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.auth-tabs { display: flex; background: var(--bg-soft); border-radius: var(--radius); padding: 3px; margin-bottom: 24px; }
.auth-tab { flex: 1; padding: 10px; border-radius: 3px; font-weight: 500; font-size: 14px; color: var(--text-2); transition: all .2s; }
.auth-tab.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow); }

/* 表单 */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--text); outline: none; transition: border-color .2s;
  resize: vertical;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--text); }
.form-err { color: #c0392b; font-size: 13px; font-weight: 500; min-height: 18px; margin: 2px 0 6px; }

/* ---------- 详情页 ---------- */
.detail-panel {
  position: relative; z-index: 2; width: 100%; max-width: 1040px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-lg); max-height: 94vh;
  animation: panelIn .3s ease; overflow-y: auto;
}
.detail-grid { display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-gallery { background: #111; display: flex; flex-direction: column; }
.gallery-stage { position: relative; flex: 1; min-height: 420px; display: grid; place-items: center; padding: 30px; }
.gallery-imgbox { max-width: 100%; max-height: 62vh; display: grid; place-items: center; overflow: hidden; }
.gallery-imgbox img {
  max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: 2px;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff;
  display: grid; place-items: center; transition: background .2s; z-index: 5;
}
.gallery-nav:hover { background: rgba(255,255,255,.3); }
.gallery-nav.prev { left: 14px; }
.gallery-nav.next { right: 14px; }
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-tools {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; z-index: 5;
}
.tool-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255,255,255,.14); color: #fff; font-size: 13px; font-weight: 500;
  transition: background .2s;
}
.tool-btn:hover { background: rgba(255,255,255,.3); }
.tool-btn svg { width: 16px; height: 16px; }
.gallery-count { color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; background: rgba(0,0,0,.4); padding: 6px 12px; border-radius: 999px; }
.orient-badge {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  background: rgba(0,0,0,.5); color: #fff; font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 999px;
}
.thumbs { display: flex; gap: 8px; padding: 12px 16px; background: rgba(255,255,255,.04); overflow-x: auto; }
.thumb {
  width: 54px; height: 54px; border-radius: 2px; overflow: hidden; flex: none;
  border: 2px solid transparent; opacity: .55; transition: all .2s; cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: #fff; opacity: 1; }

.detail-info { padding: 32px 30px; overflow-y: auto; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-badges .badge { position: static; }
.detail-title { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 10px; line-height: 1.3; }
.detail-desc { color: var(--text-2); font-size: 14.5px; margin-bottom: 22px; line-height: 1.7; }

.seller-row { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.seller-info { flex: 1; }
.seller-name { font-weight: 600; font-size: 15px; }
.seller-sub { font-size: 12px; color: var(--text-3); }

.price-row { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.price-box { flex: 1; }
.price-label { display: block; font-size: 12px; color: var(--text-3); font-weight: 500; }
.price-val { font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.price-val.free { color: var(--text-3); font-weight: 500; }

.block-label { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tag-chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: transparent; color: var(--text-2); border: 1px solid var(--border-strong);
  transition: all .18s; display: inline-flex; align-items: center; gap: 5px;
}
.tag-chip::before { content: '#'; opacity: .5; }
.tag-chip:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.related-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.related-card { flex: none; width: 108px; cursor: pointer; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); border: 1px solid var(--border); transition: border-color .2s; }
.related-card:hover { border-color: var(--border-strong); }
.related-card img { width: 100%; height: 138px; object-fit: cover; }
.related-card .rc-name { font-size: 12px; font-weight: 500; padding: 7px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 上传表单 ---------- */
.up-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .up-grid { grid-template-columns: 1fr; } }

.orient-pick { display: flex; gap: 12px; }
.orient-opt { flex: 1; cursor: pointer; }
.orient-opt input { position: absolute; opacity: 0; }
.orient-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  transition: all .2s; background: var(--bg);
}
.orient-opt input:checked + .orient-card { border-color: var(--text); background: var(--bg-soft); }
.orient-ico { display: grid; place-items: center; }
.orient-ico i { display: block; border: 2px solid var(--text-3); border-radius: 3px; transition: border-color .2s; }
.orient-ico.portrait i { width: 22px; height: 32px; }
.orient-ico.landscape i { width: 34px; height: 24px; margin-top: 4px; }
.orient-opt input:checked + .orient-card .orient-ico i { border-color: var(--text); }
.orient-card b { font-size: 13px; font-weight: 500; }

.price-pick { display: flex; flex-direction: column; gap: 10px; }
.switch-line { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; }
.switch-line input { position: absolute; opacity: 0; }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s; }
.switch-line input:checked + .switch { background: var(--text); }
.switch-line input:checked + .switch::after { transform: translateX(18px); }
.amount-box { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 0 12px; }
.amount-box:focus-within { border-color: var(--text); }
.yuan { font-weight: 600; color: var(--text); font-size: 17px; }
.amount-box input { border: none; outline: none; background: transparent; padding: 10px 0; width: 100%; color: var(--text); font-weight: 600; font-size: 16px; }

.drop-zone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 32px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  cursor: pointer; transition: all .2s; text-align: center; background: var(--bg);
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--text); background: var(--bg-soft); }
.drop-zone svg { width: 32px; height: 32px; fill: none; stroke: var(--text-3); stroke-width: 1.6; }
.drop-zone.dragover svg { stroke: var(--text); }
.drop-zone span { font-weight: 500; font-size: 14px; }

.up-previews { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.up-prev { position: relative; width: 84px; height: 84px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.up-prev img { width: 100%; height: 100%; object-fit: cover; }
.up-prev button {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; font-size: 14px; line-height: 1;
}
.ai-notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--border-strong); color: var(--text);
  font-size: 13.5px; font-weight: 500; margin-bottom: 14px;
}
.ai-notice svg { width: 20px; height: 20px; fill: var(--text-2); flex: none; margin-top: 1px; }
.up-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
.drop-count { font-weight: 600; color: var(--text); font-size: 14px; min-height: 20px; }

/* ---------- 作品分享 ---------- */
.share-block { margin-bottom: 26px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  font-size: 12px; font-weight: 700;
  transition: transform .18s ease, opacity .2s;
}
.share-btn:hover { transform: translateY(-2px); opacity: .85; }
.share-btn svg { width: 18px; height: 18px; }
.share-btn.copy { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border-strong); }
.qr-pop {
  margin-top: 12px; display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev);
}
.qr-pop img { width: 160px; height: 160px; background: #fff; border-radius: 4px; padding: 6px; }
.qr-pop span { font-size: 13px; font-weight: 500; color: var(--text-2); }

/* ---------- 支付 ---------- */
.pay-head { text-align: center; margin-bottom: 20px; }
.pay-ico { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: var(--bg-soft); display: grid; place-items: center; border: 1px solid var(--border); }
.pay-ico svg { width: 26px; height: 26px; stroke: var(--text); }
.pay-head h3 { font-size: 20px; font-weight: 700; }
.pay-item { display: flex; align-items: center; gap: 12px; background: var(--bg-soft); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; }
.pay-item img { width: 52px; height: 52px; border-radius: 4px; object-fit: cover; }
.pay-item > div { flex: 1; min-width: 0; }
.pay-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-price { font-weight: 700; color: var(--text); font-size: 18px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.pay-method {
  display: flex; align-items: center; gap: 8px; padding: 13px;
  border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer;
  font-size: 14px; font-weight: 500; transition: all .2s;
}
.pay-method input { position: absolute; opacity: 0; }
.pay-method:has(input:checked) { border-color: var(--text); background: var(--bg-soft); }
.pay-wechat, .pay-ali { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; }
.pay-wechat { background: #07c160; }
.pay-ali { background: #1677ff; }

/* ---------- 个人主页 ---------- */
.profile-panel {
  position: relative; z-index: 2; width: 100%; max-width: 840px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-lg); max-height: 94vh; overflow-y: auto;
  animation: panelIn .3s ease;
}
.profile-banner {
  height: 150px; position: relative;
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
}
.profile-body { padding: 0 36px 36px; position: relative; }
.profile-body .avatar.xl {
  display: inline-grid; margin-top: -46px; margin-bottom: 14px;
  border: 4px solid var(--bg-elev); background: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}
.pf-name { font-size: 25px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.02em; }
.pf-bio { color: var(--text-2); font-size: 14.5px; margin-bottom: 22px; white-space: pre-wrap; line-height: 1.7; }
.pf-stats { display: flex; gap: 0; margin-bottom: 22px; }
.pf-stats > div { padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--border); }
.pf-stats > div:last-child { border-right: none; }
.pf-stats b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.pf-stats span { font-size: 13px; color: var(--text-3); }
.pf-actions { margin-bottom: 22px; }
.pf-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.pf-tab { padding: 11px 16px; font-weight: 500; font-size: 14px; color: var(--text-3); border-bottom: 2px solid transparent; transition: all .18s; margin-bottom: -1px; }
.pf-tab.active { color: var(--text); border-color: var(--text); font-weight: 600; }
.pf-grid { columns: 3; column-gap: 14px; }
@media (max-width: 700px) { .pf-grid { columns: 2; } }
.pf-grid .card { margin-bottom: 14px; }

/* 编辑态 */
.profile-edit { position: relative; }
.edit-ribbon {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  background: var(--text); color: var(--bg);
  text-align: center; font-size: 12px; font-weight: 600; letter-spacing: 2px;
  padding: 8px;
}
.edit-banner {
  height: 150px; margin-top: 31px;
  background: var(--bg-soft); border-bottom: 1px solid var(--border);
  display: grid; place-items: center;
}
.banner-change {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-elev); color: var(--text); font-weight: 500; font-size: 13px;
  padding: 10px 18px; border-radius: 999px; transition: all .2s; border: 1px solid var(--border-strong);
}
.banner-change:hover { border-color: var(--text); }
.banner-change svg { width: 17px; height: 17px; }
.edit-body { padding: 0 36px 36px; position: relative; }
.edit-avatar-wrap { position: relative; display: inline-block; cursor: pointer; margin-top: -46px; margin-bottom: 6px; }
.edit-avatar-wrap .avatar.xl { border: 4px solid var(--bg-elev); box-shadow: 0 0 0 1px var(--border); }
.edit-avatar-mask {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,.5); color: #fff;
  display: grid; place-items: center; opacity: 0; transition: opacity .25s;
}
.edit-avatar-wrap:hover .edit-avatar-mask { opacity: 1; }
.edit-avatar-mask svg { width: 28px; height: 28px; }
.edit-fields { margin-top: 16px; }
.edit-fields input, .edit-fields textarea {
  font-size: 15px; font-weight: 500; padding: 12px 15px;
  border: 1px solid var(--text);
}
.edit-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  padding: 12px 22px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
}
.toast.out { animation: toastOut .3s forwards; }
.toast .t-ico { width: 20px; height: 20px; border-radius: 50%; background: #16a34a; color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.toast.err .t-ico { background: #c0392b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 36px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ============================================================
   移动端适配
   ============================================================ */
@media (max-width: 768px) {
  /* 导航：两行布局 —— 第一行品牌+操作区，第二行通栏搜索 */
  .nav-inner { flex-wrap: wrap; row-gap: 8px; padding: 10px 14px 9px; }
  .nav-actions { flex: none; }
  .lang-select { flex: none; }
  .brand { font-size: 17px; }
  .brand-logo { width: 24px; height: 24px; }
  .search-box { order: 10; flex: 1 1 100%; max-width: none; }
  .search-box input { font-size: 16px; line-height: 1.2; padding: 8px 0; }
  .nav-actions { gap: 6px; }
  .lang-select { padding: 0 6px; }
  .lang-select select { padding: 8px 2px; font-size: 13px; }
  .icon-btn { width: 36px; height: 36px; }
  .btn-primary#uploadBtn { padding: 8px 12px; }
  .btn-primary#uploadBtn span { display: none; }
  .btn-primary#uploadBtn .btn-ico { width: 18px; height: 18px; }
  .btn-ghost#loginBtn { padding: 8px 14px; font-size: 13px; }
  .avatar { width: 34px; height: 34px; font-size: 14px; }
  .dropdown { right: -10px; width: 220px; }

  .hero { padding: 60px 20px 50px; }
  .hero-badge { font-size: 11px; margin-bottom: 20px; }
  .hero-title { font-size: clamp(28px, 8vw, 38px); }
  .hero-sub { font-size: 14px; margin-bottom: 28px; }
  .hero-cta { gap: 10px; margin-bottom: 44px; }
  .hero-cta .btn.lg { padding: 12px 22px; font-size: 14px; }
  .hero-stats > div { padding: 0 20px; }
  .hero-stats b { font-size: 21px; }

  .filter-bar { top: 99px; padding: 12px 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { padding: 7px 14px; font-size: 13px; white-space: nowrap; flex: none; }

  .masonry-wrap { padding: 20px 16px 70px; }
  .masonry { column-gap: 12px; }
  .card { margin-bottom: 12px; }

  .overlay { padding: 0; }
  .modal-panel { border-radius: 0; max-height: 100vh; height: 100vh; max-height: 100dvh; height: 100dvh; padding: 24px 18px; border: none; }
  .field input, .field select, .field textarea { padding: 10px 13px; font-size: 16px; }
  .drop-zone { padding: 22px; }
  .up-prev { width: 72px; height: 72px; }

  .detail-panel, .profile-panel { border-radius: 0; max-height: 100vh; height: 100vh; max-height: 100dvh; height: 100dvh; border: none; }
  .gallery-stage { min-height: 300px; padding: 16px; }
  .gallery-imgbox, .gallery-imgbox img { max-height: 48vh; max-height: 48dvh; }
  .gallery-nav { width: 36px; height: 36px; }
  .gallery-nav.prev { left: 8px; } .gallery-nav.next { right: 8px; }
  .thumbs { padding: 8px 12px; }
  .thumb { width: 48px; height: 48px; }
  .detail-info { padding: 22px 18px; }
  .detail-title { font-size: 20px; }
  .avatar.lg { width: 44px; height: 44px; font-size: 16px; }
  .price-val { font-size: 25px; }
  .related-card { width: 100px; }
  .related-card img { height: 120px; }

  .profile-banner { height: 110px; }
  .profile-body { padding: 0 20px 24px; }
  .profile-body .avatar.xl { margin-top: -38px; }
  .avatar.xl { width: 76px; height: 76px; font-size: 28px; }
  .pf-name { font-size: 21px; }
  .pf-stats { flex-wrap: wrap; row-gap: 12px; }
  .pf-stats > div { padding-right: 18px; margin-right: 18px; }
  .pf-stats b { font-size: 18px; }
  .pf-grid { columns: 2; column-gap: 10px; }
  .edit-banner { height: 130px; margin-top: 27px; }
  .edit-body { padding: 0 20px 24px; }
  .edit-avatar-wrap { margin-top: -38px; }

  .footer-inner { padding: 24px 18px; flex-direction: column; gap: 8px; text-align: center; }
  .footer-inner .muted { font-size: 11px; }

  .toast-wrap { bottom: 16px; left: 16px; right: 16px; transform: none; align-items: stretch; }
  .toast { border-radius: 10px; justify-content: flex-start; }
}

@media (max-width: 480px) {
  .nav-inner { gap: 8px; }
  .brand-name { display: none; }
  .search-box input { font-size: 13px; padding: 9px 0; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn.lg { width: 100%; }
  .hero-stats > div { padding: 0 14px; }
  .hero-stats b { font-size: 18px; }
  .hero-stats span { font-size: 11px; }
  .gallery-stage { min-height: 240px; padding: 12px; }
  .gallery-imgbox, .gallery-imgbox img { max-height: 40vh; max-height: 40dvh; }
  .detail-title { font-size: 18px; }
  .detail-info { padding: 18px 14px; }
  .price-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .price-row .btn-primary.lg { width: 100%; }
  .profile-banner { height: 96px; }
  .profile-body { padding: 0 16px 20px; }
  .profile-body .avatar.xl { margin-top: -34px; }
  .avatar.xl { width: 68px; height: 68px; font-size: 25px; }
  .pf-stats > div { padding-right: 12px; margin-right: 12px; }
  .pf-stats b { font-size: 16px; }
  .pf-stats span { font-size: 11px; }
  .pay-methods { grid-template-columns: 1fr; }
}

/* 手机横屏（矮视口）：导航恢复单行，减少上下遮挡 */
@media (max-width: 900px) and (max-height: 500px) {
  .nav-inner { flex-wrap: nowrap; row-gap: 0; padding: 8px 14px; }
  .search-box { order: 0; flex: 1; }
  .search-box input { font-size: 14px; }
  .filter-bar { top: 57px; }
}

/* 触摸设备：卡片信息默认可见 */
@media (hover: none) and (pointer: coarse) {
  .card-overlay { opacity: 1; background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 55%); }
  .card-quick { transform: translateY(0); opacity: .95; }
  .card-like { opacity: 1; transform: scale(1); }
  .card:hover { transform: none; }
  .card:hover .card-imgbox img { transform: none; }
  .btn-primary:hover { opacity: 1; }
  .share-btn:hover { transform: none; }
}

/* 安全区域 */
@supports (padding: env(safe-area-inset-bottom)) {
  .toast-wrap { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .footer-inner { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
