/* ============================================================
   SportLink style.css (v2)
   配色：羽球場木地板暖橘 + 草綠運動感
   ============================================================ */
:root{
  --green:#10b981; --green-d:#059669;
  --ink:#1e293b; --ink-2:#64748b; --ink-3:#94a3b8;
  --bg:#f1f5f9; --card:#ffffff; --line:#e2e8f0;
  --orange:#f59e0b; --red:#ef4444; --blue:#3b82f6;
  --radius:14px;
}
*{ box-sizing:border-box; margin:0; padding:0; }
body{
  font-family:-apple-system,"Segoe UI","Microsoft JhengHei",sans-serif;
  background:var(--bg); color:var(--ink); line-height:1.6;
  -webkit-tap-highlight-color:transparent;
}
input,select,button{ font-family:inherit; font-size:1rem; }

/* ---------- 登入 ---------- */
.auth-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
  background:linear-gradient(160deg,#10b981 0%,#059669 100%); }
.auth-card{ background:var(--card); border-radius:20px; padding:32px 26px; width:100%; max-width:380px;
  box-shadow:0 20px 50px rgba(0,0,0,.25); }
.brand{ text-align:center; margin-bottom:24px; }
.brand-logo{ font-size:2.6rem; }
.brand-name{ font-size:1.6rem; font-weight:700; color:var(--green-d); letter-spacing:.5px; }
.brand-sub{ color:var(--ink-2); font-size:.85rem; }
.auth-tabs{ display:flex; background:var(--bg); border-radius:10px; padding:4px; margin-bottom:18px; }
.auth-tab{ flex:1; padding:9px; border:none; background:none; border-radius:8px; color:var(--ink-2);
  font-weight:600; cursor:pointer; }
.auth-tab.active{ background:var(--card); color:var(--green-d); box-shadow:0 1px 4px rgba(0,0,0,.1); }
#auth input:not([type="checkbox"]),#auth select{ width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:10px;
  margin-bottom:12px; background:var(--card); }
#auth input:focus,#auth select:focus{ outline:none; border-color:var(--green); }
.row-2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.row-3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.reg-consent{ display:flex; align-items:flex-start; gap:8px; font-size:.78rem; color:var(--ink-2); margin-bottom:14px; cursor:pointer; }
.reg-consent input{ width:auto; margin:2px 0 0 0; flex-shrink:0; }
.onboarding-section{ margin-bottom:14px; }
.onboarding-section b{ display:block; margin-bottom:4px; color:var(--green-d); }
.onboarding-section p{ font-size:.85rem; color:var(--ink-2); line-height:1.5; }

/* ---------- 按鈕 ---------- */
.btn-block{ width:100%; padding:13px; border:none; border-radius:10px; font-weight:700; cursor:pointer; }
.btn-primary{ background:var(--green); color:#fff; }
.btn-primary:hover{ background:var(--green-d); }
.btn-sm{ padding:7px 14px; border:1px solid var(--line); border-radius:8px; background:var(--card);
  color:var(--ink); font-weight:600; cursor:pointer; font-size:.85rem; }
.btn-sm.btn-primary{ background:var(--green); color:#fff; border-color:var(--green); }
.btn-xs{ padding:5px 11px; border:1px solid var(--line); border-radius:7px; background:var(--card);
  cursor:pointer; font-size:.8rem; font-weight:600; }
.btn-xs.btn-primary{ background:var(--green); color:#fff; border-color:var(--green); }

/* ---------- 頂列 ---------- */
.topbar{ position:sticky; top:0; z-index:50; background:var(--green); color:#fff;
  display:flex; align-items:center; justify-content:space-between; padding:14px 18px; }
.topbar-title{ font-weight:700; font-size:1.2rem; }
.topbar-user{ display:flex; align-items:center; gap:12px; font-size:.9rem; }
.btn-logout{ background:rgba(255,255,255,.2); color:#fff; border:none; padding:6px 12px;
  border-radius:8px; cursor:pointer; font-size:.82rem; }

/* ---------- 內容 ---------- */
.content{ max-width:560px; margin:0 auto; padding:16px 16px 90px; }
.section-title{ font-weight:700; margin:18px 4px 12px; color:var(--ink); position:relative; padding-left:12px; }
.section-title::before{ content:''; position:absolute; left:0; top:3px; bottom:3px; width:4px;
  background:var(--green); border-radius:2px; }
.card{ background:var(--card); border-radius:var(--radius); padding:18px; margin-bottom:14px;
  box-shadow:0 1px 3px rgba(0,0,0,.06); }
.card-title{ font-weight:700; margin-bottom:12px; }
.create-card input,.create-card select{ width:100%; padding:11px 13px; border:1px solid var(--line);
  border-radius:10px; margin-bottom:10px; }
.create-card input:focus,.create-card select:focus{ outline:none; border-color:var(--green); }
.loading{ text-align:center; color:var(--ink-3); padding:30px 10px; }

/* ---------- 揪團卡 ---------- */
.match-card{ background:var(--card); border-radius:var(--radius); padding:16px; margin-bottom:12px;
  box-shadow:0 1px 3px rgba(0,0,0,.06); border-left:4px solid var(--green); }
.match-title{ font-weight:700; font-size:1.05rem; }
.match-host{ color:var(--ink-2); font-size:.85rem; margin:3px 0; }
.host-link{ color:var(--green-d); cursor:pointer; font-weight:600; }
.host-link:hover{ text-decoration:underline; }
.badge-host{ background:var(--orange); color:#fff; padding:1px 7px; border-radius:10px; font-size:.7rem; }
.match-venue{ color:var(--ink-2); font-size:.82rem; }
.match-foot{ display:flex; justify-content:space-between; align-items:center; margin:10px 0; }
.match-spots{ font-size:.85rem; color:var(--ink); font-weight:600; }
.match-cost{ background:#ecfdf5; color:var(--green-d); padding:3px 10px; border-radius:8px;
  font-size:.82rem; font-weight:700; }
.match-actions{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.overflow-wrap{ position:relative; display:inline-block; }
.btn-more{ padding:7px 12px; font-weight:700; }
.overflow-menu{ position:absolute; right:0; top:calc(100% + 4px); background:var(--card); border:1px solid var(--line);
  border-radius:10px; box-shadow:0 6px 16px rgba(0,0,0,.15); z-index:20; display:flex; flex-direction:column; min-width:150px; overflow:hidden; }
.overflow-menu button{ border:none; background:none; padding:10px 14px; text-align:left; cursor:pointer; font-size:.85rem; white-space:nowrap; }
.overflow-menu button:hover{ background:var(--bg); }

/* ---------- 場館卡 ---------- */
.venue-card{ background:var(--card); border-radius:var(--radius); padding:16px; margin-bottom:12px;
  box-shadow:0 1px 3px rgba(0,0,0,.06); cursor:pointer; transition:transform .1s; }
.venue-card:active{ transform:scale(.99); }
.venue-head{ display:flex; justify-content:space-between; align-items:center; }
.venue-name{ font-weight:700; font-size:1.05rem; }
.venue-price{ color:var(--green-d); font-weight:700; }
.venue-meta{ color:var(--ink-2); font-size:.85rem; margin:4px 0 8px; }
.venue-facil{ display:flex; flex-wrap:wrap; gap:6px; }
.chip{ background:var(--bg); color:var(--ink-2); padding:3px 9px; border-radius:8px; font-size:.75rem; }

/* ---------- Modal ---------- */
.modal{ position:fixed; inset:0; background:rgba(0,0,0,.5); display:flex; align-items:center;
  justify-content:center; padding:16px; z-index:100; }
.modal-card{ background:var(--card); border-radius:18px; padding:22px; width:100%; max-width:460px;
  max-height:86vh; overflow-y:auto; }
.modal-head{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:16px; }
.modal-title{ font-weight:700; font-size:1.15rem; }
.modal-sub{ color:var(--ink-2); font-size:.83rem; margin-top:2px; }
.modal-close{ background:var(--bg); border:none; width:32px; height:32px; border-radius:50%;
  cursor:pointer; font-size:1rem; color:var(--ink-2); }
.date-row{ margin-bottom:14px; }
.date-row label{ display:block; font-size:.85rem; color:var(--ink-2); margin-bottom:6px; }
.date-row input{ width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:10px; }

/* ---------- 時段格 ---------- */
.slot-legend{ display:flex; gap:14px; font-size:.78rem; color:var(--ink-2); margin-bottom:12px; }
.slot-legend .dot{ width:10px; height:10px; border-radius:3px; display:inline-block; margin-right:4px; }
.dot.free{ background:#d1fae5; border:1px solid var(--green); }
.dot.full{ background:#fee2e2; border:1px solid var(--red); }
.dot.mine{ background:#dbeafe; border:1px solid var(--blue); }
.slot-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.slot{ border-radius:10px; padding:12px; text-align:center; border:1.5px solid; }
.slot.free{ background:#ecfdf5; border-color:var(--green); cursor:pointer; }
.slot.free:active{ background:#d1fae5; }
.slot.full{ background:#fef2f2; border-color:#fca5a5; color:var(--ink-3); }
.slot.mine{ background:#eff6ff; border-color:var(--blue); }
.slot-time{ font-weight:700; }
.slot-status{ font-size:.76rem; margin-top:2px; }

/* ---------- 付款 ---------- */
.pay-card{ max-width:380px; }
.pay-countdown-wrap{ display:flex; justify-content:space-between; align-items:center;
  background:#fff7ed; padding:12px 16px; border-radius:12px; margin-bottom:16px; }
.pay-countdown{ font-size:1.5rem; font-weight:700; color:var(--orange); font-variant-numeric:tabular-nums; }
.pay-detail{ margin-bottom:16px; }
.pay-row{ display:flex; justify-content:space-between; padding:9px 0; border-bottom:1px solid var(--line); }
.pay-row.highlight b{ color:var(--green-d); font-size:1.15rem; }
.pay-row span{ color:var(--ink-2); }
#pay-method{ width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:10px; margin-bottom:14px; }

/* ---------- 報名名單 ---------- */
.participant-row{ display:flex; justify-content:space-between; align-items:flex-start;
  padding:12px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; gap:8px; }
.p-name{ font-weight:600; }
.p-level{ color:var(--ink-3); font-size:.78rem; margin-left:8px; }
.p-action{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.tag-ok{ color:var(--green-d); font-size:.82rem; font-weight:600; }
.tag-no{ color:var(--red); font-size:.82rem; }

/* ---------- 聊天 ---------- */
.chat-box{ background:var(--card); border-radius:var(--radius); padding:14px; height:62vh;
  overflow-y:auto; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.chat-row{ display:flex; margin-bottom:10px; align-items:flex-end; gap:7px; }
.chat-row.mine{ justify-content:flex-end; }
.chat-av{ flex-shrink:0; cursor:pointer; }
.chat-av-wrap{ width:32px; height:32px; border-radius:50%; overflow:hidden; }
.chat-av-img{ width:32px; height:32px; object-fit:cover; border-radius:50%; }
.chat-av-txt{ width:32px; height:32px; border-radius:50%; background:var(--green); color:#fff; display:flex; align-items:center; justify-content:center; font-size:.85rem; font-weight:700; }
.chat-content{ display:flex; flex-direction:column; max-width:74%; }
.chat-name{ font-size:.72rem; color:var(--green-d); margin-bottom:3px; cursor:pointer; }
.chat-name:hover span{ text-decoration:underline; }
.bubble{ padding:9px 13px; border-radius:14px; font-size:.92rem; word-break:break-word; }
.bubble.mine{ background:var(--green); color:#fff; border-bottom-right-radius:4px; }
.bubble.other{ background:var(--bg); color:var(--ink); border-bottom-left-radius:4px; }
.bubble-name{ font-size:.72rem; color:var(--ink-3); margin-bottom:2px; }
.chat-input-row{ display:flex; gap:8px; margin-top:10px; }
.chat-input-row input{ flex:1; padding:11px 14px; border:1px solid var(--line); border-radius:22px; }
.chat-input-row input:focus{ outline:none; border-color:var(--green); }
.btn-send{ background:var(--green); color:#fff; border:none; padding:0 20px; border-radius:22px;
  cursor:pointer; font-weight:600; }

/* ---------- 個人 ---------- */
.profile-card{ text-align:center; }
.profile-avatar{ font-size:3rem; }
.profile-name{ font-weight:700; font-size:1.3rem; }
.profile-email{ color:var(--ink-2); font-size:.85rem; margin-bottom:14px; }
.profile-grid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }
.profile-grid>div{ background:var(--bg); border-radius:10px; padding:10px; }
.profile-grid span{ display:block; font-size:.72rem; color:var(--ink-3); }
.profile-grid b{ font-size:1.05rem; }
.rev-summary{ display:flex; gap:10px; }
.rev-item{ flex:1; background:var(--bg); border-radius:10px; padding:10px; text-align:center; }
.rev-item span{ display:block; font-size:.72rem; color:var(--ink-3); }
.rev-item b{ font-size:1.2rem; color:var(--ink); }
.rev-item.total b{ color:var(--green-d); }
.rev-count{ text-align:center; color:var(--ink-3); font-size:.8rem; margin-top:8px; }

/* ---------- 底部導覽 ---------- */
.bottom-nav{ position:fixed; bottom:0; left:0; right:0; background:var(--card); border-top:1px solid var(--line);
  display:flex; max-width:560px; margin:0 auto; }
.nav-item{ flex:1; border:none; background:none; padding:8px 0 10px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:2px; color:var(--ink-3); font-size:.72rem; }
.nav-item.active{ color:var(--green-d); }
.nav-ico{ font-size:1.3rem; position:relative; display:inline-block; }
/* 通知小紅點 */
.nav-dot{ position:absolute; top:-4px; right:-6px; background:#ef4444; color:#fff;
  font-size:.55rem; font-weight:700; border-radius:999px; padding:1px 4px; min-width:14px;
  text-align:center; line-height:1.4; }

/* ---------- Toast ---------- */
.toast{ position:fixed; bottom:80px; left:50%; transform:translateX(-50%) translateY(20px);
  background:var(--ink); color:#fff; padding:11px 20px; border-radius:24px; font-size:.88rem;
  opacity:0; pointer-events:none; transition:all .25s; z-index:200; white-space:nowrap; }
.toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }
.toast.error{ background:var(--red); }

/* ============================================================
   v3 新增元件
   ============================================================ */

/* 卡片標題列（含按鈕）*/
.card-title-row{ display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.card-title-row .card-title{ margin-bottom:0; }
.m-input{ width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:10px; margin-bottom:10px; font-family:inherit; }
.m-input:focus{ outline:none; border-color:var(--green); }

/* 揪團卡：未綁定/費用待定 變淡 */
.match-venue.dim,.match-cost.dim{ color:var(--ink-3); background:none; }

/* 付款說明 */
.pay-note{ background:#fffbeb; border:1px solid #fde68a; color:#92400e; font-size:.78rem;
  padding:10px 12px; border-radius:10px; margin-bottom:14px; line-height:1.5; }

/* 球友雷達 */
.radar-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:8px; }
.radar-card{ background:var(--card); border-radius:12px; padding:14px; text-align:center;
  box-shadow:0 1px 3px rgba(0,0,0,.06); cursor:pointer; }
.radar-card:active{ transform:scale(.98); }
.radar-avatar{ width:44px; height:44px; border-radius:50%; background:var(--green);
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700;
  font-size:1.2rem; margin:0 auto 8px; }
.radar-name{ font-weight:700; }
.radar-level{ font-size:.78rem; color:var(--ink-2); }
.radar-meta{ font-size:.72rem; color:var(--ink-3); margin-top:2px; }

/* 數據統計 */
.stat-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:14px; }
.stat-box{ background:var(--card); border-radius:12px; padding:14px 8px; text-align:center;
  box-shadow:0 1px 3px rgba(0,0,0,.06); }
.stat-box span{ display:block; font-size:.72rem; color:var(--ink-3); }
.stat-box b{ font-size:1.5rem; color:var(--green-d); }
.workout-row{ display:flex; justify-content:space-between; align-items:center; background:var(--card);
  border-radius:12px; padding:14px; margin-bottom:10px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.w-type{ font-weight:700; }
.w-date{ font-size:.78rem; color:var(--ink-3); }
.w-stats{ display:flex; gap:12px; align-items:center; font-size:.85rem; }
.w-cal{ color:var(--orange); font-weight:700; }

/* 我的預訂 / 隊伍 */
.mybook-row,.team-row{ display:flex; justify-content:space-between; align-items:center;
  padding:12px 0; border-bottom:1px solid var(--line); }
.mybook-row:last-child,.team-row:last-child{ border-bottom:none; }
.mb-sub{ font-size:.78rem; color:var(--ink-3); margin-top:2px; }
.mb-deposit{ color:var(--green-d); font-weight:700; font-size:.85rem; }
.mb-unpaid{ background:#fef3c7; color:#b45309; font-size:.68rem; font-weight:700; padding:1px 7px; border-radius:8px; margin-left:6px; display:inline-flex; gap:4px; align-items:center; }
.mb-cd{ font-variant-numeric:tabular-nums; }

/* 編輯按鈕 */
.profile-card{ position:relative; }
.profile-edit-btn{ position:absolute; top:14px; right:14px; font-size:.8rem; color:var(--green-d);
  cursor:pointer; padding:4px 10px; border:1px solid var(--green); border-radius:8px; }

/* 賽後評價 */
.review-person{ padding:14px 0; border-bottom:1px solid var(--line); }
.rp-name{ font-weight:700; margin-bottom:8px; }
.rp-scores{ display:flex; gap:10px; margin-bottom:8px; flex-wrap:wrap; }
.rp-scores label{ font-size:.8rem; color:var(--ink-2); }
.rp-scores select{ padding:4px 8px; border:1px solid var(--line); border-radius:6px; margin-left:2px; }
.rp-comment{ width:100%; padding:8px 12px; border:1px solid var(--line); border-radius:8px; margin-bottom:8px; }

/* 評價評語 */
.rev-cmt{ background:var(--bg); border-radius:8px; padding:8px 12px; font-size:.82rem;
  color:var(--ink); margin-top:8px; }
.rev-cmt b{ color:var(--ink-2); }

/* 五格底部導覽微調 */
.bottom-nav .nav-item{ font-size:.68rem; }
.bottom-nav .nav-ico{ font-size:1.2rem; }

/* 頂部時鐘 */
.topbar-clock{ font-size:.78rem; opacity:.85; font-variant-numeric:tabular-nums; margin-right:4px; }

/* 縣市篩選 */
.city-tabs{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.city-tab{ padding:6px 14px; border:1px solid var(--line); border-radius:20px; background:var(--card);
  color:var(--ink-2); font-size:.82rem; font-weight:600; cursor:pointer; }
.city-tab.active{ background:var(--green); color:#fff; border-color:var(--green); }

/* 大頭貼 */
.avatar-img{ width:72px; height:72px; border-radius:50%; object-fit:cover; }
.profile-avatar{ font-size:3rem; display:flex; align-items:center; justify-content:center; height:72px; }
.avatar-edit-wrap{ display:flex; align-items:center; gap:14px; margin-bottom:14px; padding:12px;
  background:var(--bg); border-radius:12px; }
.avatar-preview-img{ width:60px; height:60px; border-radius:50%; object-fit:cover; }
.avatar-upload-label{ cursor:pointer; display:inline-block; }

/* 場館預訂列表 */
.book-time-row{ margin:12px 0 6px; }
.book-label{ display:block; font-size:.85rem; color:var(--ink-2); margin-bottom:6px; }
.book-inputs{ display:flex; gap:10px; align-items:center; }
.book-inputs input[type="time"]{ flex:1; padding:10px 12px; border:1px solid var(--line); border-radius:10px;
  font-size:1rem; }
.section-sub{ font-size:.8rem; color:var(--ink-3); font-weight:600; margin:14px 0 8px; }
.venue-bookings-list{ display:flex; flex-direction:column; gap:8px; }
.booking-row{ display:flex; align-items:center; gap:12px; background:var(--bg);
  border-radius:10px; padding:10px 12px; }
.bk-av{ flex-shrink:0; }
.bk-avatar-img{ width:36px; height:36px; border-radius:50%; object-fit:cover; }
.bk-avatar-txt{ width:36px; height:36px; border-radius:50%; background:var(--green); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.95rem; }
.bk-info{ flex:1; }
.bk-name{ font-weight:600; font-size:.9rem; }
.bk-level{ font-size:.74rem; color:var(--ink-3); }
.bk-time{ font-weight:700; color:var(--green-d); font-size:.9rem; }

/* 球友統計 */
.user-stats-row{ display:flex; gap:10px; margin-bottom:14px; }
.user-stat{ flex:1; background:var(--bg); border-radius:10px; padding:10px; text-align:center; }
.user-stat span{ display:block; font-size:.72rem; color:var(--ink-3); }
.user-stat b{ font-size:1.3rem; color:var(--green-d); }

/* 球局狀態標籤 */
.badge-status{ display:inline-block; padding:2px 8px; border-radius:8px; font-size:.7rem; font-weight:700; margin-left:8px; vertical-align:middle; }
.badge-recruiting{ background:#d1fae5; color:#059669; }
.badge-formed{ background:#dbeafe; color:#1d4ed8; }
.badge-ended{ background:#f1f5f9; color:#64748b; }
.badge-skill{ display:inline-block; padding:2px 8px; border-radius:8px; font-size:.7rem; font-weight:700; margin-left:6px; vertical-align:middle; background:#fef3c7; color:#92400e; }
.badge-age{ display:inline-block; padding:2px 8px; border-radius:8px; font-size:.7rem; font-weight:700; margin-left:6px; vertical-align:middle; background:#e0e7ff; color:#3730a3; }

/* 結束球局按鈕 */
.btn-end{ background:#fff7ed; color:#d97706; border-color:#fbbf24; }
.btn-end:hover{ background:#fef3c7; }
.btn-sm:disabled{ opacity:.45; cursor:not-allowed; }
/* 開發測試用按鈕：預設隱藏，開啟測試模式（topbar 的 🔧）才會出現 */
.btn-dev{ background:#ede9fe; color:#6d28d9; border-color:#c4b5fd; font-size:.74rem; display:none; }
.btn-dev:hover{ background:#ddd6fe; }
body.dev-mode .btn-dev{ display:inline-block; }
.btn-devtoggle{ background:rgba(255,255,255,.2); color:#fff; border:none; padding:6px 9px;
  border-radius:8px; cursor:pointer; font-size:.85rem; opacity:.6; }
.btn-devtoggle.active{ background:#fff; color:#6d28d9; opacity:1; }
/* 提早退出球局 */
.btn-leave{ background:#fef2f2; color:var(--red); border-color:#fca5a5; }
.btn-leave:hover{ background:#fee2e2; }
/* 複製到下週 */
.btn-dup{ background:#ecfdf5; color:var(--green-d); border-color:#6ee7b7; font-size:.74rem; }
.btn-dup:hover{ background:#d1fae5; }
/* 簽到 */
.btn-checkin{ background:#eff6ff; color:#1d4ed8; border-color:#93c5fd; }
.btn-checkin:hover{ background:#dbeafe; }
/* 踢出成員 */
.btn-kick{ background:#fef2f2; color:var(--red); border-color:#fca5a5; }
.btn-kick:hover{ background:#fee2e2; }
/* 封鎖 */
.btn-blacklist{ background:#fff7ed; color:#c2410c; border-color:#fdba74; }
.btn-blacklist:hover{ background:#ffedd5; }
/* 已收款勾選 */
.paid-toggle{ display:inline-flex; align-items:center; gap:4px; font-size:.78rem; color:var(--ink-2); cursor:pointer; margin:0 4px; }
.paid-toggle input{ cursor:pointer; }
.paid-mismatch{ width:100%; font-size:.74rem; color:#b45309; background:#fef3c7; padding:4px 8px; border-radius:6px; margin-top:4px; }

/* 信用分顏色：一眼看出誰可能有問題，不用點進去比對數字 */
.credit-good{ color:var(--green-d); font-weight:700; }
.credit-mid{ color:#b45309; font-weight:700; }
.credit-bad{ color:var(--red); font-weight:700; }

/* 代打/訪客 */
.guest-section{ margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.guest-row{ display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.guest-name{ font-weight:600; font-size:.88rem; flex:1; }
.guest-add-row{ display:flex; gap:8px; margin-top:10px; }
.guest-add-row input{ flex:1; padding:8px 12px; border:1px solid var(--line); border-radius:8px; }

/* ============================================================
   v4 新增元件
   ============================================================ */

/* 設施篩選 */
.facility-filter{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; align-items:center; }
.facil-label{ font-size:.78rem; color:var(--ink-3); font-weight:600; }
.facil-chip{ padding:5px 12px; border:1px solid var(--line); border-radius:16px; background:var(--card);
  color:var(--ink-2); font-size:.78rem; cursor:pointer; transition:all .15s; }
.facil-chip:hover{ border-color:var(--green); color:var(--green-d); }
.facil-chip.active{ background:var(--green); color:#fff; border-color:var(--green); }
.facil-chip.facil-clear{ background:#fee2e2; color:var(--red); border-color:#fca5a5; }
.chip-active{ background:#d1fae5 !important; color:var(--green-d) !important; }

/* 場館詳情設施 */
.venue-facil-detail{ display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; }

/* 好友申請/列表 */
.friend-list-area{ margin-bottom:4px; }
.friend-req-row,.friend-row,.invite-card{ display:flex; align-items:center; gap:12px; padding:10px 12px;
  background:var(--card); border-radius:12px; margin-bottom:8px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.friend-av{ flex-shrink:0; }
.friend-av-img{ width:40px; height:40px; border-radius:50%; object-fit:cover; }
.friend-av-txt{ width:40px; height:40px; border-radius:50%; background:var(--green); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1rem; }
.friend-info{ flex:1; min-width:0; }
.friend-name{ font-weight:700; font-size:.95rem; }
.friend-level{ font-size:.74rem; color:var(--ink-3); }
.friend-actions{ display:flex; gap:6px; flex-shrink:0; }
.req-badge{ background:var(--red); color:#fff; border-radius:12px; padding:1px 8px; font-size:.72rem; font-weight:700; }
.tag-pending{ color:var(--ink-3); font-size:.78rem; }
.tag-mismatch{ color:#b45309; font-size:.74rem; margin-left:6px; background:#fef3c7; padding:1px 6px; border-radius:6px; }

/* 未讀徽章 */
.unread-badge{ background:var(--red); color:#fff; border-radius:8px; padding:0 5px; font-size:.68rem;
  font-weight:700; margin-left:3px; }
.friend-chat-btn{ position:relative; }

/* 私人訊息 */
.dm-card{ max-width:460px; }
.dm-box{ height:52vh; overflow-y:auto; background:var(--bg); border-radius:12px; padding:12px;
  display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.dm-msg{ display:flex; max-width:78%; gap:7px; align-items:flex-end; }
.dm-mine{ align-self:flex-end; flex-direction:column; align-items:flex-end; }
.dm-theirs{ align-self:flex-start; flex-direction:row; align-items:flex-end; }
.dm-av-wrap{ flex-shrink:0; }
.dm-av-img{ width:28px; height:28px; border-radius:50%; object-fit:cover; }
.dm-av-txt{ width:28px; height:28px; border-radius:50%; background:var(--green); color:#fff; display:flex; align-items:center; justify-content:center; font-size:.8rem; font-weight:700; }
.dm-bubble{ padding:9px 13px; border-radius:14px; font-size:.92rem; word-break:break-word; line-height:1.45; }
.dm-mine .dm-bubble{ background:var(--green); color:#fff; border-bottom-right-radius:4px; }
.dm-theirs .dm-bubble{ background:var(--card); color:var(--ink); border-bottom-left-radius:4px;
  box-shadow:0 1px 2px rgba(0,0,0,.06); }
.dm-time{ font-size:.68rem; color:var(--ink-3); margin-top:3px; }

/* 隊伍改版 */
.team-row{ display:flex; justify-content:space-between; align-items:flex-start; padding:12px 0; }
.team-info{ flex:1; }
.team-btns{ display:flex; flex-direction:column; gap:5px; align-items:flex-end; flex-shrink:0; margin-left:10px; }
.team-members{ display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.member-chip{ background:var(--bg); color:var(--ink-2); padding:2px 9px; border-radius:8px; font-size:.74rem; }

/* 邀請球友列表 */
.invite-user-list{ display:flex; flex-direction:column; gap:8px; max-height:60vh; overflow-y:auto; }

/* 球友雷達 av wrapper */
.radar-av-wrap{ display:flex; justify-content:center; margin-bottom:8px; }
.radar-av-wrap .avatar-img{ width:50px; height:50px; }

/* userview actions */
.uv-actions{ display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }

/* ============================================================
   v5 新增元件
   ============================================================ */

/* 星星評分 */
.star{ font-size:.95rem; }
.star-full{ color:#f59e0b; }
.star-empty{ color:#d1d5db; }
.rating-num{ font-size:.78rem; color:var(--ink-3); margin-left:3px; }
.venue-rating-inline{ display:flex; align-items:center; gap:2px; margin:3px 0 6px; }
.venue-rating-row{ display:flex; align-items:center; gap:4px; margin-top:4px; }
.venue-rating-row .rating-num{ font-size:.84rem; color:var(--ink-2); }

/* 可用場次徽章 */
.avail-badge{ font-size:.72rem; font-weight:700; padding:1px 7px; border-radius:8px; }
.avail-free{ background:#d1fae5; color:#059669; }
.avail-full{ background:#fee2e2; color:#dc2626; }

/* 場館評分表單 */
.venue-review-form{ background:var(--bg); border-radius:12px; padding:14px; margin-bottom:4px; }
.star-input-row{ display:flex; align-items:center; gap:8px; }
.star-input-label{ font-size:.82rem; color:var(--ink-2); white-space:nowrap; }
.star-input{ display:flex; gap:4px; }
.star-btn{ font-size:1.6rem; color:#d1d5db; cursor:pointer; line-height:1; transition:color .1s; user-select:none; }
.star-btn:hover, .star-btn-on{ color:#f59e0b; }
.star-val-label{ font-size:.82rem; color:var(--ink-3); }
.venue-rev-row{ display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.venue-rev-row:last-child{ border-bottom:none; }
.vrev-content{ flex:1; min-width:0; }
.vrev-top{ display:flex; align-items:center; gap:8px; margin-bottom:3px; }
.vrev-name{ font-weight:700; font-size:.88rem; }
.vrev-comment{ font-size:.82rem; color:var(--ink-2); }

/* 報名名單 - 頭貼 */
.participant-row{ display:flex; justify-content:space-between; align-items:flex-start; padding:12px 0; border-bottom:1px solid var(--line); gap:8px; }
.participant-row:last-child{ border-bottom:none; }
.p-info{ display:flex; align-items:flex-start; gap:10px; flex:1; cursor:pointer; min-width:0; }
.p-av{ flex-shrink:0; }
.p-avatar-img{ width:40px; height:40px; border-radius:50%; object-fit:cover; }
.p-avatar-txt{ width:40px; height:40px; border-radius:50%; background:var(--green); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1rem; }
.p-name{ font-weight:600; }
.p-level{ color:var(--ink-3); font-size:.78rem; margin-left:6px; }
.p-bio{ font-size:.78rem; color:var(--ink-2); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:160px; }

/* 取消預訂按鈕 */
.btn-cancel{ background:#fee2e2; color:var(--red); border-color:#fca5a5; }
.btn-cancel:hover{ background:#fecaca; }

/* 排行榜 */
.leaderboard-tabs{ display:flex; gap:8px; margin-bottom:14px; flex-wrap:wrap; }
.lb-tab{ padding:7px 18px; border:1px solid var(--line); border-radius:20px; background:var(--card);
  color:var(--ink-2); font-size:.82rem; font-weight:600; cursor:pointer; }
.lb-tab.active{ background:var(--green); color:#fff; border-color:var(--green); }
.lb-row{ display:flex; align-items:center; gap:10px; background:var(--card); border-radius:12px;
  padding:12px 14px; margin-bottom:8px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.lb-me{ border:2px solid var(--green); }
.lb-medal{ font-size:1.3rem; width:28px; text-align:center; flex-shrink:0; }
.lb-rank-num{ display:inline-block; width:24px; height:24px; background:var(--bg); border-radius:50%;
  text-align:center; line-height:24px; font-size:.78rem; font-weight:700; color:var(--ink-3); }
.lb-av{ flex-shrink:0; }
.lb-avatar-img{ width:36px; height:36px; border-radius:50%; object-fit:cover; }
.lb-avatar-txt{ width:36px; height:36px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font-weight:700; font-size:.95rem; color:#fff; }
.lb-info{ flex:1; min-width:0; }
.lb-name{ font-weight:700; font-size:.9rem; }
.lb-sub{ margin-top:2px; }
.lb-score{ font-weight:700; color:var(--green-d); font-size:.95rem; flex-shrink:0; }
.lb-clickable{ cursor:pointer; transition:transform .1s; }
.lb-clickable:active{ transform:scale(.98); }

/* 統一排行榜 - 週期切換鈕 */
.lb-period{ padding:7px 18px; border:1px solid var(--line); border-radius:20px; background:var(--card);
  color:var(--ink-2); font-size:.82rem; font-weight:600; cursor:pointer; }
.lb-period.active{ background:#f59e0b; color:#fff; border-color:#f59e0b; }
.lb-desc{ background:#eff6ff; color:#1d4ed8; font-size:.78rem; padding:8px 12px; border-radius:8px; margin-bottom:10px; }

/* 徽章牆（我的） */
.badge-wall{ display:flex; flex-wrap:wrap; gap:10px; }
.badge-chip{ display:flex; align-items:center; gap:8px; background:var(--bg); border-radius:12px; padding:10px 14px; flex:1 1 calc(50% - 10px); min-width:140px; }
.badge-chip-icon{ font-size:1.6rem; flex-shrink:0; }
.badge-chip-info{ display:flex; flex-direction:column; }
.badge-chip-info b{ font-size:.85rem; }
.badge-chip-info span{ font-size:.72rem; color:var(--ink-3); }
.lb-venue-icon{ font-size:1.3rem; flex-shrink:0; }

/* 段位徽章 */
.rank-badge{ color:#fff; padding:2px 8px; border-radius:10px; font-size:.72rem; font-weight:700; display:inline-block; }
.profile-rank{ display:flex; align-items:center; justify-content:center; gap:8px; margin:6px 0 14px; }
.rank-score{ font-size:.82rem; color:var(--ink-3); }

/* ============================================================
   v6 新增元件
   ============================================================ */

/* 場館預訂 / 揪團建立 — 時間選擇：日期單獨一行，開始/結束時間用兩欄 grid 各佔一半寬度，
   保證一定排得下、不會被擠到換行（不再用 hour+min 兩個選單拼起來，改成一個選單直接選 14:30 這種完整時間） */
.match-date-full{ width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:10px; margin-bottom:10px; }
.match-time-row2{ margin-bottom:10px; }
.time-field{ display:flex; flex-direction:column; gap:4px; }
.time-field label{ font-size:.76rem; color:var(--ink-3); }
.time-field select{ width:100%; padding:10px 8px; border:1px solid var(--line); border-radius:10px; font-size:.95rem; background:var(--card); color:var(--ink); cursor:pointer; }
.booking-price-preview{ font-size:.82rem; color:var(--ink-2); margin-bottom:4px; min-height:20px; }
.price-preview{ background:#ecfdf5; color:var(--green-d); padding:4px 10px; border-radius:8px; font-weight:600; display:inline-block; }

/* 揪團卡引導提示 */
.match-hint{ font-size:.74rem; color:var(--ink-3); margin-left:8px; }

/* 球友 userview 資料列 */
.uv-profile-row{ display:flex; align-items:flex-start; gap:14px; margin-bottom:16px; }
.uv-avatar-img{ width:60px; height:60px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.uv-avatar-txt{ width:60px; height:60px; border-radius:50%; background:var(--green); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1.4rem; flex-shrink:0; }
.uv-profile-info{ flex:1; }
.uv-meta{ font-size:.82rem; color:var(--ink-2); margin-bottom:6px; }
.uv-bio{ font-size:.88rem; color:var(--ink); background:var(--bg); border-radius:8px; padding:8px 12px; line-height:1.6; white-space:pre-wrap; }

/* ============================================================
   v7 新增元件
   ============================================================ */

/* 揪團篩選 */
.match-filter-row{ display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.mf-chip{ padding:6px 16px; border:1px solid var(--line); border-radius:20px; background:var(--card);
  color:var(--ink-2); font-size:.8rem; font-weight:600; cursor:pointer; }
.mf-chip.active{ background:var(--green); color:#fff; border-color:var(--green); }

/* 已結束的揪團卡 */
.match-card-ended{ opacity:.65; border-left-color:var(--ink-3); }

/* 揪團流程提示 */
.match-flow-hint{ color:var(--ink-3) !important; font-size:.78rem !important; margin-bottom:12px; }

/* 揪團有時間無場地 */
.match-date-fields{ margin-bottom:10px; }
.match-date-fields input{ width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:10px; margin-bottom:0; }

/* XP 條 */
.xp-bar-card{ padding:14px 18px; }
.xp-level-row{ display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.xp-level-name{ font-weight:700; font-size:1.05rem; }
.xp-label{ font-size:.82rem; color:var(--ink-2); }
.xp-bar-track{ background:var(--bg); border-radius:8px; height:12px; overflow:hidden; margin-bottom:6px; }
.xp-bar-fill{ height:100%; border-radius:8px; transition:width .4s; }
.xp-next-label{ font-size:.76rem; color:var(--ink-3); text-align:right; }
.xp-guide{ margin-top:10px; font-size:.82rem; }
.xp-guide summary{ cursor:pointer; color:var(--green-d); font-weight:600; user-select:none; }
.xp-guide-list{ margin:8px 0 0 4px; padding:0; list-style:none; display:flex; flex-direction:column; gap:5px; }
.xp-guide-list li{ display:flex; gap:6px; align-items:center; color:var(--ink-2); }
.xp-guide-list b{ color:var(--green-d); }
/* 球局結束後評分場地 */
.star-input-row{ display:flex; gap:6px; justify-content:center; margin-bottom:6px; }
.star-input-row .star-btn{ font-size:1.8rem; background:none; border:none; color:#d1d5db; cursor:pointer; padding:0; transition:color .1s; }
.star-input-row .star-btn.star-btn-on{ color:#f59e0b; }

/* 多面預訂 */
.book-courts-row{ display:flex; align-items:center; gap:10px; margin:6px 0 8px; }

/* 手錶連動 */
.wearable-status{ text-align:center; padding:20px; color:var(--ink-2); font-size:.9rem; }
.wearable-data-tag{ background:#ecfdf5; color:var(--green-d); font-size:.78rem; padding:8px 10px; border-radius:8px; margin-bottom:10px; }
.wearable-stats{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:14px; }
.wear-stat{ background:var(--bg); border-radius:10px; padding:12px; text-align:center; }
.wear-stat span{ display:block; font-size:.72rem; color:var(--ink-3); }
.wear-stat b{ font-size:1.4rem; color:var(--green-d); }
.hr-chart-wrap{ background:var(--bg); border-radius:10px; padding:10px; margin-bottom:14px; }
.wearable-rec-row{ display:flex; gap:8px; }

/* 活動紀錄 */
.act-row{ display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid var(--line); font-size:.85rem; }
.act-row:last-child{ border-bottom:none; }
.act-ico{ font-size:1.1rem; flex-shrink:0; }
.act-label{ flex:1; color:var(--ink); }
.act-time{ font-size:.72rem; color:var(--ink-3); white-space:nowrap; }
.act-date-hdr{ font-size:.74rem; font-weight:700; color:var(--green-d); margin:14px 0 4px; }
.act-date-hdr:first-child{ margin-top:0; }
