/* 彼岸 · 需求广场（小红书式双列瀑布流 + 底部弹窗 + FAB 发布向导） */
.sq-page { padding: 12px 14px 96px; }

/* 顶部滑动标签 */
.sq-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sq-tabs::-webkit-scrollbar { display: none; }
.sq-tab { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 16px; border-radius: 18px; border: 1px solid var(--ap-line); background: var(--ap-surface); color: var(--ap-text); font-size: 16px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .2s; }
.sq-tab small { font-size: 11px; font-weight: 400; color: var(--ap-text-3); }
.sq-tab.is-active { background: var(--gold); color: #1a2a3a; border-color: transparent; transform: translateY(-1px); }
.sq-tab.is-active small { color: #5b4a2a; }

/* 双列瀑布流 */
.sq-masonry { columns: 2; column-gap: 12px; }
.sq-card { break-inside: avoid; margin: 0 0 12px; background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 18px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.08); cursor: pointer; transition: transform .22s ease, box-shadow .22s ease; }
.sq-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.14); }
.sq-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sq-cover { position: relative; height: var(--h, 150px); display: flex; align-items: flex-end; padding: 10px; }
.sq-cover--light { background: linear-gradient(150deg, #fdfbf4, #f3e7cf 55%, #e9d3ad); }
.sq-cover--dark { background: linear-gradient(150deg, #16223f, #0c1530 60%, #070d1c); }
.sq-cover-tag { position: absolute; top: 10px; left: 10px; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.28); color: #fff; backdrop-filter: blur(4px); }
.sq-card-body { padding: 10px 12px 12px; }
.sq-need { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--ap-text); }
.sq-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sq-tag { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--ap-fill); color: var(--ap-text-2); }
.sq-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ap-text-3); }
.sq-author { display: flex; align-items: center; gap: 6px; }
.sq-author b { color: var(--ap-text-2); font-weight: 600; }
.sq-match { color: var(--gold); font-weight: 600; }
.sq-empty { text-align: center; color: var(--ap-text-3); padding: 60px 20px; }

/* 半透明 AI 分身头像 */
.sq-avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #fff; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.sq-avatar--light { background: radial-gradient(circle at 35% 30%, #ffffff, #e7ecf6 45%, #cfd6e6); color: #5b6478; }
.sq-avatar--dark { background: radial-gradient(circle at 40% 35%, #2a3c66, #16223f 60%, #0a1128); color: #cdd8ef; }

/* 右下角 FAB */
.sq-fab { position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--gold); color: #1a2a3a; font-size: 30px; line-height: 1; font-weight: 300; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(245,215,158,.5); cursor: pointer; z-index: 40; transition: transform .2s ease, box-shadow .2s ease; }
.sq-fab:active { transform: scale(.92); box-shadow: 0 6px 16px rgba(245,215,158,.6); }

/* 底部弹窗（bottom sheet） */
.sq-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sq-sheet[hidden] { display: none; }
.sq-sheet-mask { position: absolute; inset: 0; background: rgba(0,0,0,.42); opacity: 0; transition: opacity .28s ease; }
.sq-sheet.is-open .sq-sheet-mask { opacity: 1; }
.sq-sheet-panel { position: relative; width: min(560px, 100%); background: var(--ap-surface); color: var(--ap-text); border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -12px 40px rgba(0,0,0,.28); transform: translateY(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1); max-height: 86vh; overflow: auto; }
.sq-sheet.is-open .sq-sheet-panel { transform: translateY(0); }
.sq-sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--ap-line); margin: 4px auto 14px; }
.sq-detail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sq-detail-name { font-size: 17px; font-weight: 700; }
.sq-x { border: 0; background: var(--ap-fill); color: var(--ap-text-2); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.sq-detail-need { margin: 0 0 12px; font-size: 16px; line-height: 1.6; }
.sq-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.sq-matchbox { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--ap-fill); margin-bottom: 14px; }
.sq-matchbox > span { font-size: 13px; color: var(--ap-text-2); }
.sq-match-ring { --m: 0; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--gold) calc(var(--m) * 1%), var(--ap-line) 0); transition: background 1s ease; flex: none; }
.sq-match-ring.is-on { /* --m 由 JS 设置，动画由 transition 完成 */ }
.sq-match-ring b { font-size: 15px; font-weight: 700; }
.sq-match-ring::after { content: ''; position: absolute; }
.sq-match-ring { position: relative; }
.sq-match-ring b { position: relative; z-index: 1; }
.sq-match-ring::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--ap-surface); }
.sq-soul { margin-bottom: 16px; }
.sq-soul-label { display: block; font-size: 12px; color: var(--ap-text-3); margin-bottom: 8px; }
.sq-soul-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sq-soul-tag { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ap-line); background: var(--ap-surface-2); color: var(--ap-text); cursor: default; }
.sq-soul-tag.is-on { background: var(--gold); color: #1a2a3a; border-color: transparent; }
.sq-sheet-actions { display: flex; gap: 12px; margin-bottom: 10px; }
.sq-sheet-actions .btn { flex: 1; min-height: 52px; }
.sq-gold { background: var(--gold) !important; color: #1a2a3a !important; border: 0; font-weight: 600; border-radius: 16px; }
.sq-gold:hover { filter: brightness(1.04); }
.sq-detail-note, .sq-pub-status { font-size: 12px; color: var(--ap-text-3); line-height: 1.6; }

/* 发布向导 */
.sq-pub-title { margin: 4px 0 14px; font-size: 19px; }
.sq-pub-cats { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.sq-pub-cat { padding: 8px 16px; border-radius: 14px; border: 1px solid var(--ap-line); background: var(--ap-surface-2); color: var(--ap-text); cursor: pointer; }
.sq-pub-cat.is-active { background: var(--gold); color: #1a2a3a; border-color: transparent; font-weight: 600; }
.sq-field { display: block; margin-bottom: 14px; }
.sq-field > span { display: block; font-size: 13px; color: var(--ap-text-2); margin-bottom: 6px; }
.sq-field textarea { width: 100%; border: 1px solid var(--ap-line); border-radius: 12px; padding: 12px; font: inherit; background: var(--ap-surface-2); color: var(--ap-text); resize: vertical; }
.sq-tagpick { margin-bottom: 16px; }
.sq-pub-actions { display: flex; gap: 12px; }
.sq-pub-actions .btn { flex: 1; min-height: 50px; }

@media (min-width: 760px) { .sq-masonry { columns: 3; } .sq-page { max-width: 900px; margin: 0 auto; } }
@media (min-width: 1100px) { .sq-masonry { columns: 4; } .sq-page { max-width: 1080px; } }
@media (prefers-reduced-motion: reduce) { .sq-sheet-panel, .sq-sheet-mask, .sq-card, .sq-tab, .sq-fab { transition: none !important; } }
