/* 市集搜尋結果 /search?q=（2026-11-03）。外框與 token 來自 chrome.css；沒有 inline style。
   2026-12-01：卡片改成封面＋頭像（公開與祕密同一個結構，樣子參考 LoveRun 領取頁的市集卡）：上方一條 3:1 的封面（沒有圖＝品牌漸層）、
   疊在封面下緣的圓形頭像（沒有圖＝名稱第一個字，祕密市集右下角多一個小鎖頭）、下面是標記、名稱、（祕密）一句說明、按鈕。 */
.ms .ms-head { text-align: center; }
.ms .ms-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.35; margin-bottom: 10px; }
.ms .ms-head .sx-note { margin: 0 auto 24px; }
.ms-hint { display: inline-flex; margin: 16px auto 0; padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--sx-purple-d); font-weight: 700; font-size: 14px; }
.ms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.ms-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--sx-radius-tile); border: 3px solid #fff; background: #fff; box-shadow: var(--sx-shadow-card); transition: transform .25s ease, box-shadow .25s ease; }
.ms-card:hover { transform: translateY(-5px); box-shadow: var(--sx-shadow-hover); }
/* 封面：3:1（和伺服器的 1200×400 一樣）。沒有圖＝品牌漸層加一點亮點，高度和有圖的卡片一樣，同一排看起來整齊。 */
.ms-cover { position: relative; flex: none; aspect-ratio: 3 / 1; overflow: hidden; background: linear-gradient(135deg, #ece7ff, #f6f3ff); }
.ms-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ms-tiny { filter: blur(10px); transform: scale(1.2); }
.ms-cover-plain { background: radial-gradient(rgba(255, 255, 255, .22) 1.6px, transparent 2.2px) 0 0 / 22px 22px, linear-gradient(135deg, var(--sx-purple-l), var(--sx-purple-d)); }
/* 圓形頭像疊在封面下緣：淺紫底＋名稱第一個字；有圖時圖蓋在字上面（圖還沒到、被擋掉或載入失敗時，看到的就是第一個字）。
   祕密市集的小鎖頭在右下角、壓在白框上，不是取代頭像。 */
.ms-avatar { position: relative; z-index: 1; flex: none; align-self: center; box-sizing: border-box; width: 60px; height: 60px; margin-top: -30px; border: 3px solid #fff; border-radius: 50%; background: var(--sx-lavender); box-shadow: 0 2px 10px rgba(45, 36, 99, .18); display: grid; place-items: center; }
.ms-avatar-initial { color: var(--sx-purple); font-family: var(--sx-display); font-size: 26px; font-weight: 700; line-height: 1; }
.ms-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ms-avatar-lock { position: absolute; right: -5px; bottom: -5px; box-sizing: border-box; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; background: linear-gradient(135deg, #3a2d91, #6c56e6); box-shadow: 0 2px 6px rgba(58, 45, 145, .35); }
.ms-avatar-lock::before { content: ""; position: absolute; left: 6px; top: 3px; width: 6px; height: 6px; box-sizing: border-box; border: 2px solid #fff; border-bottom: 0; border-radius: 3px 3px 0 0; }
.ms-avatar-lock::after { content: ""; position: absolute; left: 4px; top: 8px; width: 10px; height: 7px; border-radius: 2px; background: #fff; }
.ms-body { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 4px; padding: 6px 18px 18px; text-align: center; }
.ms-badge { margin: 0; padding: 2px 10px; border-radius: 999px; background: var(--sx-sky); color: var(--sx-sky-d); font-size: 12px; font-weight: 800; }
.ms-badge-secret { background: #ffe08a; color: #3b2900; }
.ms-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; max-width: 100%; margin: 2px 0 8px; overflow: hidden; font-family: var(--sx-display); font-size: 1.15rem; color: var(--sx-deep); line-height: 1.4; overflow-wrap: anywhere; }
.ms-note { margin: -4px 0 8px; color: var(--sx-muted); font-size: 14px; }
/* 按鈕固定貼在卡片底部：同一排卡片被撐成一樣高，按鈕也在同一條線上。 */
.ms-join { align-self: stretch; margin-top: auto; min-height: 46px; font-size: 15px; }
.ms-join-request { background: #3a2d91; box-shadow: 0 5px 0 #221a62; }
.ms-message { display: grid; justify-items: center; gap: 6px; padding: 24px 0 calc(var(--sx-wave) + 10px); text-align: center; }
.ms-message-tuntun { width: 140px; height: auto; }
.ms-message h2 { margin: 6px 0 0; font-size: 1.5rem; }
.ms-message p { margin: 0; color: var(--sx-muted); }
.ms .ms-body-sec { padding-bottom: calc(var(--sx-wave) + 48px); }
@media (prefers-reduced-motion: reduce) { .ms-card { transition: none; } .ms-card:hover { transform: none; } }
