/* ============================================================
   星物交换栈 · Star Swap Station
   深色渐变 · 玻璃拟态 · 细腻动效
   ============================================================ */

/* ---------- Reset & Tokens ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

:root {
  --bg: #0a0a18;
  --card: rgba(255, 255, 255, .055);
  --card2: rgba(255, 255, 255, .09);
  --line: rgba(255, 255, 255, .10);
  --line2: rgba(255, 255, 255, .17);
  --text: #f2f3fb;
  --dim: #9c9ebd;
  --dim2: #6f7294;
  --a1: #7c6cff;
  --a2: #ff5fb2;
  --a3: #38e1ff;
  --grad: linear-gradient(120deg, #7c6cff, #ff5fb2 55%, #ff9a5b);
  --grad2: linear-gradient(120deg, #38e1ff, #7c6cff);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, .35);
  --header-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(124, 108, 255, .45); }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

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

/* ---------- 背景 ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(124,108,255,.22), transparent 60%),
    radial-gradient(1000px 700px at -10% 20%, rgba(255,95,178,.14), transparent 55%),
    radial-gradient(900px 900px at 50% 130%, rgba(56,225,255,.10), transparent 60%),
    linear-gradient(180deg, #0a0a18, #0d0c20 55%, #0a0a16);
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(900px 520px at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(900px 520px at 50% 0%, #000 0%, transparent 78%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: float 16s ease-in-out infinite; }
.orb-1 { width: 420px; height: 420px; left: -80px; top: 120px; background: rgba(124,108,255,.35); }
.orb-2 { width: 360px; height: 360px; right: -60px; top: 40%; background: rgba(255,95,178,.28); animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; left: 38%; bottom: -120px; background: rgba(56,225,255,.22); animation-delay: -9s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -30px) scale(1.06); }
}

/* ---------- 布局 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 48px; }

.view { display: none; }
.view.active { display: block; animation: rise .35s ease both; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 24, .62);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: var(--header-h); display: flex; align-items: center; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: .5px; white-space: nowrap; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; font-size: 16px;
  box-shadow: 0 4px 16px rgba(255,95,178,.35);
}
.site-nav { display: flex; gap: 4px; flex: 1; }
.nav-link {
  padding: 8px 14px; border-radius: 10px; color: var(--dim);
  text-decoration: none; font-size: 14px; font-weight: 600; transition: .25s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-link.active { color: #fff; background: rgba(124,108,255,.18); }
.header-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* ---------- 按钮 ---------- */
.btn {
  border: 0; cursor: pointer; font-family: inherit; font-weight: 600;
  border-radius: 12px; padding: 10px 18px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .25s, background .25s, border-color .25s;
}
.btn:active { transform: scale(.97); }
.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 6px 20px rgba(255,95,178,.3); }
.btn-primary:hover { box-shadow: 0 8px 28px rgba(124,108,255,.5); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.07); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: var(--line2); }
.btn-danger { background: rgba(255,80,120,.14); color: #ff6b8b; border: 1px solid rgba(255,80,120,.32); }
.btn-danger:hover { background: rgba(255,80,120,.26); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 14px; }

/* ---------- 用户 chip ---------- */
.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 14px 5px 5px; cursor: pointer;
  color: var(--text); font-family: inherit; transition: .25s;
}
.user-chip:hover { background: rgba(255,255,255,.1); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 15px; flex-shrink: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-name { font-size: 13px; font-weight: 700; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-level { font-size: 11px; color: var(--dim); }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 60px 20px 40px; position: relative; }
.hero-badge {
  display: inline-flex; gap: 6px; align-items: center; padding: 6px 14px;
  border-radius: 999px; background: rgba(124,108,255,.14);
  border: 1px solid rgba(124,108,255,.3); color: #c9c2ff;
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.hero-title { font-size: clamp(30px, 6vw, 52px); font-weight: 900; letter-spacing: 1px; line-height: 1.2; }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--dim); margin-top: 16px; font-size: 15px; }
.hero-stats { display: flex; gap: 34px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat b em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12px; color: var(--dim); }
.hero-cta { margin-top: 30px; }

/* ---------- 筛选栏 ---------- */
.filter-panel { padding: 14px; border-radius: 16px; margin-bottom: 18px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-box { position: relative; flex: 1; min-width: 200px; }
.search-box > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .6; pointer-events: none; }
.search-box input { width: 100%; padding: 10px 12px 10px 36px; border-radius: 10px; }

/* ---------- 表单控件 ---------- */
input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; outline: none; width: 100%;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(124,108,255,.6);
  box-shadow: 0 0 0 3px rgba(124,108,255,.18);
  background: rgba(255,255,255,.08);
}
select {
  appearance: none; -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--dim) 50%),
    linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 34px; cursor: pointer;
}
select option { background: #161430; color: #fff; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--dim2); }

/* ---------- 提示条 ---------- */
.tip-bar {
  display: flex; gap: 8px; align-items: center;
  background: rgba(56,225,255,.07); border: 1px solid rgba(56,225,255,.2);
  color: #aef1ff; padding: 10px 16px; border-radius: 12px;
  font-size: 13px; margin-bottom: 18px;
}

/* ---------- 列表头 ---------- */
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 14px; }
.count { font-size: 14px; color: var(--dim); }
.count b { color: var(--text); font-weight: 800; }
.hint { font-size: 12px; color: var(--dim2); }

/* ---------- 物品卡片 ---------- */
.item-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.item-card {
  display: block; text-decoration: none; color: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  animation: rise .5s both;
}
.item-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(124,108,255,.45); }
.thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #15132c; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; display: block; }
.item-card:hover .thumb img { transform: scale(1.07); }
.thumb-link { display: block; color: inherit; text-decoration: none; }

.badge {
  position: absolute; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.4;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.badge.cat { left: 10px; top: 10px; background: rgba(10,10,24,.55); border: 1px solid rgba(255,255,255,.18); }
.badge.method { right: 10px; top: 10px; background: rgba(56,225,255,.2); color: #bff6ff; border: 1px solid rgba(56,225,255,.42); }
.badge.method.post { background: rgba(255,201,86,.2); color: #ffe9b3; border-color: rgba(255,201,86,.42); }
.badge.done { right: 10px; bottom: 10px; background: rgba(90,209,160,.26); color: #b8f0d9; border: 1px solid rgba(90,209,160,.4); }

.card-body { padding: 14px 16px 16px; }
.card-title {
  font-size: 15px; font-weight: 700; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-tags { display: flex; gap: 8px; margin: 9px 0 7px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 2px 9px; border-radius: 8px; background: rgba(255,255,255,.07); color: var(--dim); white-space: nowrap; }
.tag.star { color: #ffd166; background: rgba(255,209,102,.12); }
.tag.city { color: #9fd8ff; background: rgba(90,156,255,.12); }
.card-want { font-size: 13px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
}
.publisher { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv { font-size: 11px; font-weight: 700; white-space: nowrap; }
.time { font-size: 12px; color: var(--dim2); white-space: nowrap; }

.my-actions { display: flex; gap: 8px; padding: 0 16px 16px; flex-wrap: wrap; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 56px 20px; color: var(--dim); }
.empty-icon { font-size: 44px; margin-bottom: 12px; opacity: .7; }
.empty p { margin-bottom: 16px; }

/* ---------- 玻璃卡片 ---------- */
.glass-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.glass-card-strong {
  background: rgba(20,18,42,.72); border: 1px solid var(--line2);
  border-radius: var(--radius); box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

/* ---------- 页头 ---------- */
.page-head { padding: 36px 0 18px; }
.page-head h2 { font-size: 26px; font-weight: 800; }
.page-head p { color: var(--dim); font-size: 14px; margin-top: 6px; }

/* ---------- 同城专区 ---------- */
.city-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.city-tab {
  padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.06);
  border: 1px solid var(--line); color: var(--dim); cursor: pointer;
  font-size: 13px; font-weight: 600; transition: .25s; font-family: inherit;
}
.city-tab:hover { color: #fff; background: rgba(255,255,255,.1); }
.city-tab.active {
  color: #fff; background: var(--grad); border-color: transparent;
  box-shadow: 0 4px 16px rgba(255,95,178,.3);
}
.city-tab .n { font-size: 11px; opacity: .85; margin-left: 4px; }
.city-intro { padding: 14px 18px; margin-bottom: 18px; border-radius: 14px; }
.city-intro-inner { font-size: 14px; color: var(--dim); }
.city-intro-inner b { color: var(--text); font-weight: 800; }

/* ---------- 发布表单 ---------- */
.form-card { padding: 26px; border-radius: 22px; margin-bottom: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field-label { font-size: 13px; font-weight: 700; }
.field-label em { color: #ff6b8b; font-style: normal; }
.field-label .dim { font-weight: 400; font-size: 12px; }
.upload-field { margin-top: 22px; }
.upload-area { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.upload-box {
  width: 120px; height: 120px; border-radius: 14px;
  border: 1.5px dashed rgba(255,255,255,.25); background: rgba(255,255,255,.03);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--dim); cursor: pointer; transition: .25s; font-family: inherit;
}
.upload-box:hover { border-color: var(--a1); color: #fff; background: rgba(124,108,255,.1); }
.upload-plus { font-size: 26px; line-height: 1; }
.upload-text { font-size: 12px; }
.preview-list { display: flex; gap: 12px; flex-wrap: wrap; }
.preview-item { position: relative; width: 120px; height: 120px; border-radius: 14px; overflow: hidden; animation: pop .3s; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-item .del {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(10,10,24,.7); border: 0; color: #fff; cursor: pointer;
  font-size: 13px; display: grid; place-items: center; transition: .2s;
}
.preview-item .del:hover { background: #ff4d6d; }
.url-row { display: flex; gap: 10px; margin-top: 12px; }
.url-row input { flex: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 26px; }

/* ---------- 详情页 ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px; color: var(--dim);
  text-decoration: none; font-size: 14px; font-weight: 600; margin: 22px 0 14px;
  transition: .2s;
}
.back:hover { color: #fff; gap: 10px; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 24px; }
.gallery .g-main { border-radius: 16px; overflow: hidden; aspect-ratio: 4/3; background: #15132c; }
.g-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.g-thumb {
  width: 76px; height: 58px; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; opacity: .65; transition: .25s;
}
.g-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-thumb.active, .g-thumb:hover { border-color: var(--a1); opacity: 1; }

.d-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.chip.cat { background: rgba(124,108,255,.16); color: #c9c2ff; }
.chip.method { background: rgba(56,225,255,.13); color: #aef1ff; }
.chip.post { background: rgba(255,201,86,.14); color: #ffe9b3; }
.chip.city { background: rgba(90,209,160,.13); color: #b8f0d9; }
.d-title { font-size: 24px; font-weight: 800; margin: 14px 0 4px; line-height: 1.3; }
.d-star { color: #ffd166; font-weight: 700; }
.d-meta { color: var(--dim); font-size: 13px; margin-top: 6px; }
.d-section { margin-top: 18px; }
.d-section h4 { font-size: 13px; color: var(--dim); letter-spacing: .5px; margin-bottom: 8px; }
.want-box {
  background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.22);
  padding: 12px 14px; border-radius: 12px; color: #ffe9b3;
}
.publisher-card {
  display: flex; align-items: center; gap: 14px; margin-top: 20px;
  padding: 14px; background: rgba(255,255,255,.05);
  border: 1px solid var(--line); border-radius: 14px;
}
.pc-meta { flex: 1; min-width: 0; }
.pc-name { font-weight: 700; }
.pc-credits { font-size: 12px; color: var(--dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); margin-top: 7px; overflow: hidden; }
.credit-bar i { display: block; height: 100%; background: var(--grad2); border-radius: 99px; transition: width 1s ease; }
.contact-box {
  margin-top: 16px; padding: 12px 16px; border-radius: 12px;
  background: rgba(90,209,160,.1); border: 1px solid rgba(90,209,160,.26); font-size: 14px;
}
.contact-box b { font-size: 15px; word-break: break-all; }
.owner-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.msg-panel { margin-top: 18px; padding: 22px; border-radius: 20px; }
.msg-list { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.msg {
  background: rgba(255,255,255,.05); padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line);
}
.msg.me { background: rgba(124,108,255,.1); border-color: rgba(124,108,255,.26); }
.msg-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
.msg-head b { color: var(--text); }
.msg-form { display: flex; gap: 10px; margin-top: 16px; }
.msg-form input { flex: 1; }

/* ---------- 我的发布 ---------- */
.profile-strip { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-strip .avatar { width: 56px; height: 56px; font-size: 22px; }
.ps-info { min-width: 0; }
.ps-name { font-size: 18px; font-weight: 800; }
.ps-sub { font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-right { margin-left: auto; display: flex; gap: 24px; }
.ps-stat { text-align: center; }
.ps-stat b { font-size: 20px; display: block; line-height: 1.3; }
.ps-stat span { font-size: 12px; color: var(--dim); }

/* ---------- 底部导航 ---------- */
.bottom-nav { display: none; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5,5,14,.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px; animation: fadeIn .25s;
}
.modal {
  width: 100%; max-width: 420px; padding: 26px;
  background: rgba(22,20,46,.92); border: 1px solid var(--line2);
  border-radius: 22px; box-shadow: var(--shadow); animation: pop .3s;
}
.modal h3 { font-size: 19px; }
.modal-sub { color: var(--dim); font-size: 13px; margin: 6px 0 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.stars { display: flex; gap: 6px; margin: 12px 0 4px; }
.stars button {
  font-size: 30px; background: none; border: 0; cursor: pointer;
  color: #3a3a52; transition: transform .2s, color .2s; padding: 2px;
}
.stars button.on { color: #ffd166; transform: scale(1.18); text-shadow: 0 0 18px rgba(255,209,102,.55); }

/* ---------- Toast ---------- */
#toastWrap {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 10px;
  align-items: center; pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  padding: 11px 20px; border-radius: 12px; background: rgba(24,22,48,.96);
  border: 1px solid var(--line2); color: #fff; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: .3s;
}
.toast.show { opacity: 1; transform: none; }
.toast.warn { border-color: rgba(255,209,102,.5); }

/* ---------- Footer ---------- */
.site-footer { text-align: center; color: var(--dim2); font-size: 13px; padding: 30px 20px 40px; }

/* ---------- 动画 ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 840px) {
  .site-nav { display: none; }
  .btn-publish-top { display: none; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(10,10,24,.85);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    align-items: center; gap: 4px;
  }
  .bn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 0; color: var(--dim); text-decoration: none; font-size: 11px;
    background: none; border: 0; cursor: pointer; font-family: inherit; transition: .2s;
  }
  .bn-item.active { color: #fff; }
  .bn-icon { font-size: 20px; line-height: 1; }
  .bn-publish {
    flex: 0 0 auto; width: 54px; height: 54px; border-radius: 50%;
    background: var(--grad); color: #fff; border: 0; font-size: 26px;
    margin: -30px 6px 0; box-shadow: 0 8px 24px rgba(255,95,178,.5);
    display: grid; place-items: center; cursor: pointer; transition: transform .2s;
  }
  .bn-publish:hover { transform: scale(1.06); }
  .bn-publish:active { transform: scale(.94); }
  main.container { padding-bottom: 96px; }
  .site-footer { padding-bottom: 92px; }
}

@media (max-width: 640px) {
  .hero { padding: 44px 14px 30px; }
  .hero-stats { gap: 18px; }
  .desktop-only { display: none; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .search-box { min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px 16px; }
  .header-inner { gap: 12px; }
  .user-meta { display: none; }
  .user-chip { padding: 4px; }
  .logo-text { font-size: 16px; }
  .detail-layout { padding: 16px; }
  .ps-right { margin-left: 0; width: 100%; justify-content: space-between; gap: 10px; }
  .modal { padding: 22px 18px; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: 14px; }
  .my-actions { padding: 0 12px 12px; }
  .url-row { flex-direction: column; }
}
