/* Workout Challenge：在 ui-template Soft 主題上面加的樣式（只用主題的 token，不寫死顏色）
   手機優先：輸入框 16px（iPhone 不會自動放大）、按鈕至少 44px、一行最多兩個按鈕 */

:root {
  --wc-tab-h: 62px;
  --wc-max: 640px;
  --wc-fire: light-dark(#e2662f, #f08a52);
  --wc-gold: light-dark(#c98f2b, #e5b85c);
  --wc-silver: light-dark(#8a9199, #b9c0c8);
  --wc-bronze: light-dark(#b0703f, #d29767);
}
html, body { height: 100%; }
body { overflow: hidden; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }
.input, .select, .textarea, input, select, textarea { font-size: 16px; }
.btn { min-height: 44px; }
.btn--sm { min-height: 36px; }
.btn--block { width: 100%; }
.btn--lg { min-height: 52px; font-size: var(--fs-lg); }
.muted { color: var(--text-3); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.mt { margin-top: var(--space-4); }
.hide { display: none !important; }

/* ---- 外框：上方標題列＋中間捲動區＋下方分頁列 ---- */
.wc-app { height: 100dvh; display: flex; flex-direction: column; background: var(--body-bg); }
.wc-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-2);
  padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: var(--surface-1); border-bottom: 1px solid var(--border-1);
}
.wc-top__title { flex: 1; min-width: 0; font-size: var(--fs-lg); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-top__back { min-width: 44px; padding: 0; }
.wc-icon-btn { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--text-1); }
.wc-icon-btn:hover { background: var(--surface-2); }
.wc-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wc-view { max-width: var(--wc-max); margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.wc-tabs {
  flex: 0 0 auto; display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom); background: var(--surface-1); border-top: 1px solid var(--border-1);
}
.wc-tab {
  height: var(--wc-tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--text-3); text-decoration: none; font-size: 12px;
}
.wc-tab__icon { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: .7; }
.wc-tab.is-active { color: var(--color-primary); font-weight: 600; }
.wc-tab.is-active .wc-tab__icon { filter: none; opacity: 1; }

/* ---- 區塊與卡片 ---- */
.wc-section { margin-top: var(--space-5); }
.wc-section > h2 { font-size: var(--fs-lg); margin: 0 0 var(--space-3); display: flex; align-items: center; gap: 8px; }
.wc-section > h2 small { margin-left: auto; font-size: var(--fs-sm); font-weight: 400; color: var(--text-3); }
.wc-card { background: var(--surface-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-1); }
.wc-card + .wc-card { margin-top: 12px; }
a.wc-card { display: block; color: inherit; text-decoration: none; }
.wc-row { display: flex; align-items: center; gap: 12px; }
.wc-grow { flex: 1; min-width: 0; }
.wc-emoji { font-size: 32px; line-height: 1; width: 48px; height: 48px; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; flex: 0 0 auto; }
.wc-title { font-weight: 700; font-size: var(--fs-lg); line-height: 1.3; }
.wc-sub { color: var(--text-2); font-size: var(--fs-sm); margin-top: 2px; }
.wc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; }
.wc-chip--primary { background: var(--color-primary-soft); color: var(--color-primary-soft-text); }
.wc-chip--success { background: var(--color-success-soft); color: var(--color-success-soft-text); }
.wc-chip--info { background: var(--color-info-soft); color: var(--color-info-soft-text); }
.wc-chip--warning { background: var(--color-warning-soft); color: var(--color-warning-soft-text); }
.wc-chip--danger { background: var(--color-danger-soft); color: var(--color-danger-soft-text); }
.wc-bmi { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.wc-bmi > div { flex-basis: 100%; }
/* 體重建議：BMI 刻度 15–40（分界 18.5／24／27 在 14%／36%／48%，app.js adviceHtml 一致）＋目標 */
.wc-goal { margin-top: 12px; display: grid; gap: 6px; }
.wc-gauge { position: relative; height: 10px; border-radius: 999px; margin: 6px 0 0;
  background: linear-gradient(90deg, var(--color-info) 0 14%, var(--color-success) 14% 36%, var(--color-warning) 36% 48%, var(--color-danger) 48% 100%); }
.wc-gauge i { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--surface-1); border: 3px solid var(--text-1); box-shadow: var(--shadow-1); }
.wc-gauge__ticks { position: relative; height: 16px; font-size: 11px; color: var(--text-3); }
.wc-gauge__ticks span { position: absolute; transform: translateX(-50%); }
.wc-goal__line { font-size: var(--fs-sm); line-height: 1.5; }
.wc-bmi--empty { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 12px; background: none; color: var(--text-2); font: inherit; text-align: left; cursor: pointer; }
.wc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.wc-actions > :only-child { grid-column: 1 / -1; }
.wc-empty { text-align: center; padding: 32px 16px; color: var(--text-2); }
.wc-empty__icon { font-size: 44px; }

/* ---- 首頁英雄區：等級、XP 進度、連續天數 ---- */
.wc-hero { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.wc-level {
  --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--color-primary) calc(var(--p) * 1%), var(--surface-3) 0);
}
.wc-level__inner { width: 70px; height: 70px; border-radius: 50%; background: var(--surface-1); display: grid; place-items: center; text-align: center; line-height: 1.1; }
.wc-level__n { font-size: 26px; font-weight: 800; }
.wc-level__lbl { font-size: 11px; color: var(--text-3); }
.wc-stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.wc-stat { background: var(--surface-2); border-radius: var(--radius-md); padding: 10px 8px; text-align: center; }
.wc-stat__v { font-size: 22px; font-weight: 700; line-height: 1.2; }
.wc-stat__l { font-size: 12px; color: var(--text-2); }
.wc-fire { color: var(--wc-fire); }
.wc-bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.wc-bar > i { display: block; height: 100%; background: var(--color-primary); border-radius: 999px; transition: width .4s; }
.wc-bar--success > i { background: var(--color-success); }

/* ---- 今天的任務 ---- */
.wc-task { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-md); }
.wc-task__done { color: var(--color-success); font-weight: 700; }

/* ---- 挑戰的每日計畫 ---- */
.wc-plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.wc-day { border-radius: 12px; padding: 8px 4px; text-align: center; background: var(--surface-2); font-size: 12px; color: var(--text-2); border: 2px solid transparent; }
.wc-day b { display: block; font-size: 16px; color: var(--text-1); }
.wc-day--done { background: var(--color-success-soft); color: var(--color-success-soft-text); }
.wc-day--today { border-color: var(--color-primary); }
.wc-day--rest { opacity: .65; }
.wc-day--missed { background: var(--color-danger-soft); color: var(--color-danger-soft-text); }

/* ---- 分段切換（動態牆／排行榜、挑戰詳情分頁）---- */
.wc-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.wc-seg button { min-height: 40px; border: 0; background: transparent; border-radius: 999px; font: inherit; color: var(--text-2); cursor: pointer; }
.wc-seg button.is-active { background: var(--surface-1); color: var(--text-1); font-weight: 600; box-shadow: var(--shadow-1); }

/* ---- 動態牆 ---- */
/* 「動態牆／我的紀錄」固定在捲動區最上面；底色和頁面一樣，捲下去才加分隔線 */
.wc-feedbar { position: sticky; top: 0; z-index: 5; margin: -16px -16px 12px; padding: 10px 16px; background: var(--body-bg); border-bottom: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.wc-feedbar.is-stuck { border-bottom-color: var(--border-1); box-shadow: var(--shadow-1); }
.wc-feedbar .wc-seg { margin-bottom: 0; }
.wc-more { display: flex; justify-content: center; margin-top: var(--space-4); }
.wc-feed-end { margin: var(--space-4) 0 0; text-align: center; font-size: var(--fs-sm); color: var(--text-3); }
.wc-post__head { display: flex; align-items: center; gap: 10px; }
.wc-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; }
.wc-post__body { margin-top: 10px; }
.wc-post__note { margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.wc-media { display: grid; gap: 6px; margin-top: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.wc-media img, .wc-media video { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; background: var(--surface-3); display: block; }
.wc-media video { object-fit: contain; background: #000; }
.wc-post__foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.wc-cheer { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-1); color: var(--text-1); font: inherit; cursor: pointer; }
.wc-cheer.is-on { background: var(--color-primary-soft); border-color: transparent; color: var(--color-primary-soft-text); font-weight: 600; }

/* ---- 排行榜 ---- */
.wc-rank { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-1); }
.wc-rank:last-child { border-bottom: 0; }
.wc-rank__n { width: 32px; text-align: center; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wc-rank--me { background: var(--color-primary-soft); border-radius: 12px; }
.wc-rank__v { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- 勳章 ---- */
.wc-badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wc-badge { text-align: center; padding: 14px 6px 12px; border-radius: var(--radius-lg); background: var(--surface-1); border: 1px solid var(--border-1); cursor: pointer; font: inherit; color: inherit; }
.wc-badge__icon { width: 60px; height: 60px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; border: 4px solid var(--border-2); background: var(--surface-2); }
.wc-badge--bronze .wc-badge__icon { border-color: var(--wc-bronze); }
.wc-badge--silver .wc-badge__icon { border-color: var(--wc-silver); }
.wc-badge--gold .wc-badge__icon { border-color: var(--wc-gold); }
.wc-badge--rainbow .wc-badge__icon { border-color: transparent; background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, conic-gradient(#e85d5d, #e8b25d, #6ccf7a, #5da8e8, #a77de8, #e85d5d) border-box; }
.wc-badge--locked .wc-badge__icon { filter: grayscale(1); opacity: .45; }
.wc-badge__name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.wc-badge .wc-bar { height: 5px; margin: 6px 8px 0; }

/* ---- 打卡：選檔案與上傳進度 ---- */
.wc-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wc-pick label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; border: 2px dashed var(--border-2); border-radius: var(--radius-lg); cursor: pointer; color: var(--text-2); text-align: center; }
.wc-pick label span:first-child { font-size: 28px; }
.wc-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wc-files { display: grid; gap: 8px; margin-top: 12px; }
.wc-file { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.wc-file img, .wc-file video { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #000; flex: 0 0 auto; }
.wc-file .wc-bar { margin-top: 6px; }

/* ---- 打卡成功的慶祝畫面 ---- */
.wc-celebrate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--body-bg) 85%, transparent); backdrop-filter: blur(4px); }
.wc-celebrate__box { width: 100%; max-width: 380px; text-align: center; background: var(--surface-1); border-radius: 24px; padding: 28px 20px 20px; box-shadow: var(--shadow-3, var(--shadow-1)); animation: wc-pop .35s ease-out; }
.wc-celebrate__big { font-size: 64px; line-height: 1; }
.wc-celebrate__xp { font-size: 34px; font-weight: 800; color: var(--color-primary); margin: 8px 0; }
.wc-celebrate__list { display: grid; gap: 8px; margin: 16px 0; text-align: left; }
.wc-confetti { position: fixed; top: -12px; width: 10px; height: 14px; border-radius: 2px; z-index: 51; pointer-events: none; animation: wc-fall linear forwards; }
@keyframes wc-pop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes wc-fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { .wc-celebrate__box { animation: none; } .wc-confetti { display: none; } }

/* ---- 圖表（單一數列：主色；格線與文字用文字 token）---- */
.ch { position: relative; }
.ch svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.ch-grid { stroke: var(--border-1); stroke-width: 1; }
.ch-tick { fill: var(--text-3); font-size: 11px; font-family: var(--font-body); }
.ch-val { fill: var(--text-2); font-size: 11px; font-weight: 600; font-family: var(--font-body); }
.ch-bar { fill: var(--color-primary); }
.ch-hit:hover .ch-bar, .ch-hit:focus .ch-bar { fill: var(--color-primary-hover); }
.ch-hit { outline: none; cursor: default; }
.ch-tip { position: absolute; z-index: 2; pointer-events: none; padding: 4px 10px; border-radius: 8px; background: var(--text-1); color: var(--surface-1); font-size: 12px; white-space: nowrap; }
.hm-scroll { overflow-x: auto; direction: rtl; }       /* 從最近的週開始看 */
.hm-scroll svg { direction: ltr; max-width: none; }
.hm-0 { fill: var(--surface-3); background: var(--surface-3); }
.hm-1 { fill: color-mix(in srgb, var(--color-primary) 35%, var(--surface-1)); background: color-mix(in srgb, var(--color-primary) 35%, var(--surface-1)); }
.hm-2 { fill: color-mix(in srgb, var(--color-primary) 65%, var(--surface-1)); background: color-mix(in srgb, var(--color-primary) 65%, var(--surface-1)); }
.hm-3 { fill: var(--color-primary); background: var(--color-primary); }
.hm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 8px; font-size: 12px; color: var(--text-3); }
.hm-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---- 登入頁 ---- */
/* 登入／註冊頁：body 不捲動（App 是 .wc-main 在捲），所以這一層要固定高度、自己捲；用 min-height 會撐開而捲不動（註冊表單變長後手機按不到「建立帳號」）*/
.wc-auth { height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: grid; place-items: start center; padding: 40px 16px calc(40px + env(safe-area-inset-bottom)); }
.input[readonly] { background: var(--surface-2); color: var(--text-2); }
.wc-auth__box { width: 100%; max-width: 400px; }
.wc-logo { font-size: 56px; text-align: center; }
.wc-avatars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.wc-avatars button { aspect-ratio: 1; border: 2px solid transparent; border-radius: 12px; background: var(--surface-2); font-size: 22px; cursor: pointer; min-height: 40px; }
.wc-avatars button.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); }
.wc-form { display: grid; gap: 14px; }
.wc-form .field { margin: 0; }

/* ---- 後台：桌機用 ui-template 的 app-shell；手機時側欄收成上方選單 ---- */
.wc-admin .main { padding: 24px; }
.wc-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.wc-kpi { background: var(--surface-1); border: 1px solid var(--border-1); border-radius: var(--radius-lg); padding: 14px 16px; }
.wc-kpi__l { font-size: 13px; color: var(--text-2); }
.wc-kpi__v { font-size: 26px; font-weight: 700; }
.wc-review { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wc-days-editor { max-height: 420px; overflow: auto; }
.wc-days-editor .input { height: 36px; }
.wc-admin-mobile-nav { display: none; }
@media (max-width: 960px) {
  .wc-admin .sidebar { display: none; }
  .wc-admin-mobile-nav { display: block; padding: 8px 16px; border-bottom: 1px solid var(--border-1); background: var(--surface-1); }
  .wc-admin .main { padding: 16px; }
}
@media (max-width: 960px) {
  .wc-admin.app-shell { grid-template-columns: 1fr; }
  .wc-admin .topbar, .wc-admin .main { grid-column: 1; }
  .wc-admin-mobile-nav { padding: 0 12px; border: 1px solid var(--border-2); width: auto; }
}
.textarea { border-radius: var(--radius-md); }
.wc-admin .form-grid + .field { margin-top: var(--space-4); }
@media (max-width: 960px) { .wc-admin .topbar__title { display: none; } }
/* 後台動作庫：示意圖清單 */
.wc-ex-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.wc-ex-media figure { margin: 0; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--border-1); border-radius: 12px; }
.wc-ex-media img { width: 100%; height: auto; border-radius: 10px; background: #FBF3EA; }
/* 後台右上角「目前組織」：只有一個組織時也顯示（不能選） */
.wc-tenant-sel { width: auto; max-width: 220px; }
.wc-tenant-sel:disabled { opacity: 1; }
@media (max-width: 600px) { .wc-tenant-sel { max-width: 150px; } }
.toast__close { min-width: 44px; min-height: 44px; }

/* ---- 動作說明：項目旁的 i 按鈕（點的範圍 44px）、說明視窗 ---- */
.wc-guide-btn { flex: 0 0 auto; width: 44px; height: 44px; margin: -6px -4px; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0; }
.wc-guide-btn { color: var(--text-3); opacity: .75; transition: color .15s, opacity .15s; }   /* 細線小圖示、淡色：看得到但不搶眼 */
.wc-guide-btn svg { display: block; }
.wc-guide-btn:hover, .wc-guide-btn:focus-visible, .wc-guide-btn:active { color: var(--color-primary); opacity: 1; }
.wc-guide { display: grid; gap: 12px; }
.wc-guide__top { display: flex; align-items: center; gap: 12px; }
.wc-guide__std { font-weight: 600; line-height: 1.4; }
/* 分解動作：底色固定淺色（圖是淺色畫風），高度限制住，一個畫面看得完 */
.wc-guide__anim { margin: 0; border-radius: 14px; background: #FBF3EA; overflow: hidden; }
.wc-guide__anim img { display: block; width: 100%; max-height: 190px; object-fit: contain; }
.wc-guide-pics { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -4px; padding: 0 4px 4px; }
.wc-guide-pics figure { margin: 0; flex: 0 0 100%; scroll-snap-align: start; }
.wc-guide-pics:has(figure + figure) figure { flex-basis: 88%; }
.wc-guide-pics img { width: 100%; height: auto; max-height: 190px; object-fit: contain; display: block; border-radius: 14px; background: #FBF3EA; }
.wc-guide-pics figcaption { font-size: var(--fs-sm); color: var(--text-2); text-align: center; margin-top: 4px; }
.wc-guide__h { font-size: var(--fs-sm); color: var(--text-2); margin: 0 0 4px; }
.wc-guide__steps, .wc-guide__tips { margin: 0; padding-left: 22px; display: grid; gap: 3px; line-height: 1.5; }
.wc-guide__tips li::marker { content: '⚠ '; color: var(--color-warning); }
.wc-guide__safety { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--color-warning-soft); color: var(--color-warning-soft-text); font-size: var(--fs-sm); line-height: 1.5; }

/* ---- 今天的項目清單 ---- */
.wc-items { padding: 4px 12px; }
.wc-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border-1); cursor: pointer; min-height: 60px; }
.wc-item:last-child { border-bottom: 0; }
.wc-item:focus-visible { outline: 2px solid var(--color-primary); border-radius: 10px; }
.wc-item__icon { font-size: 26px; width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; flex: 0 0 auto; }
.wc-item__name { font-weight: 600; }
.wc-item__std { font-size: 13px; color: var(--text-2); }
.wc-item__pts { color: var(--color-success); font-weight: 700; white-space: nowrap; }
.wc-item__pts small { margin-left: 4px; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--color-primary-soft); color: var(--color-primary-soft-text); }
.wc-item__go { color: var(--color-primary); font-weight: 600; white-space: nowrap; }
.wc-item.is-done .wc-item__icon { background: var(--color-success-soft); }

/* ---- 打卡表單 ---- */
.wc-lines { display: grid; gap: 8px; }
.wc-line { display: flex; align-items: center; gap: 8px; }
.wc-line span { width: 20px; color: var(--text-3); font-weight: 600; }
.wc-switch { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.wc-switch input { width: 22px; height: 22px; accent-color: var(--color-primary); flex: 0 0 auto; }
.wc-group { border: 1px dashed var(--border-2); border-radius: var(--radius-md); padding: 4px 12px 12px; }
.wc-people { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; max-height: 220px; overflow-y: auto; }
.wc-person { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-1); color: var(--text-1); font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wc-person.is-on { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary-soft-text); font-weight: 600; }

/* ---- 活動說明的項目列表、我的各項分數 ---- */
.wc-rule { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-1); }
.wc-rule:last-child { border-bottom: 0; }
.wc-rule > span:first-child { font-size: 22px; width: 30px; text-align: center; }
.wc-rule__s { font-weight: 700; white-space: nowrap; color: var(--text-2); }
.wc-rule__s.is-top { color: var(--color-primary); }
.wc-scores { display: grid; gap: 6px; }
.wc-score { display: grid; grid-template-columns: 9em 1fr 2.5em; align-items: center; gap: 8px; font-size: 14px; }
.wc-score__n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-score__bar { height: 10px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.wc-score__bar i { display: block; height: 100%; background: var(--border-2); border-radius: 999px; }
.wc-score.is-top .wc-score__bar i { background: var(--color-primary); }
.wc-score__v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.wc-post__lines { margin: 6px 0 0; padding-left: 1.4em; }
.wc-post__lines li { margin: 2px 0; }
.wc-items-editor { display: grid; gap: 12px; }
.wc-item-edit { padding: 14px; background: var(--surface-2); }
.wc-item-edit .form-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.wc-admin #tiers .input { height: 36px; min-width: 80px; }
.wc-person small { color: var(--text-3); font-size: 11px; }
.wc-score__n small { display: block; font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.wc-rule__s small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); text-align: right; }

/* ---- 大頭貼 ---- */
.wc-avatar { overflow: hidden; }
.wc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-avatar--sm { width: 26px; height: 26px; font-size: 14px; border: 2px solid var(--surface-1); }
.wc-avatar--lg { width: 56px; height: 56px; font-size: 30px; }
.wc-avstack { display: inline-flex; align-items: center; }
.wc-avstack .wc-avatar + .wc-avatar { margin-left: -8px; }
.wc-with { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.wc-cheerers { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; }
.wc-post__foot { flex-wrap: wrap; }
.wc-person .wc-avatar--sm { border: 0; }
.wc-av-btn { position: relative; border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.wc-av-btn > span:last-child { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-1); box-shadow: var(--shadow-1); display: grid; place-items: center; font-size: 13px; }
.wc-col { display: flex; flex-direction: column; gap: 6px; }
.wc-people-list .wc-rank { padding: 8px 4px; }
.wc-av-note { margin: 0; padding: 12px; border-radius: var(--radius-md); background: var(--color-primary-soft); color: var(--color-primary-soft-text); font-size: 14px; }
.wc-av-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wc-av-stage { width: min(260px, 70vw); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 4px var(--color-primary-soft), var(--shadow-1); touch-action: none; }
.wc-av-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.wc-av-zoom { width: 100%; accent-color: var(--color-primary); min-height: 44px; }
.wc-admin .wc-avatar { width: 32px; height: 32px; font-size: 18px; flex: 0 0 auto; }
.wc-admin .wc-avatar--sm { width: 28px; height: 28px; }
dialog.modal .wc-form { min-width: 0; }
.wc-col > .btn { white-space: normal; }
.wc-avatars { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.wc-avatars button { min-width: 0; }

/* ---- 成就獎牌：緞帶＋金屬圓牌（銅、銀、金、彩虹、鑽石）＋星星；金屬色是「材質」，不跟主題換 ---- */
.medal { --m: 64px; --c1: #f1c08f; --c2: #b8743e; --edge: #8e5328; --r1: #e05d5d; --r2: #3f6fb5;
  position: relative; display: inline-flex; flex-direction: column; align-items: center; width: var(--m); flex: 0 0 auto; }
.medal--sm { --m: 40px; }
.medal--lg { --m: 104px; }
.medal__ribbon { width: calc(var(--m) * .62); height: calc(var(--m) * .36); position: relative; margin-bottom: calc(var(--m) * -.1); }
.medal__ribbon::before, .medal__ribbon::after { content: ''; position: absolute; top: 0; width: 46%; height: 100%; border-radius: 3px 3px 0 0; }
.medal__ribbon::before { left: 4%; background: linear-gradient(var(--r1), color-mix(in srgb, var(--r1) 75%, #000)); transform: skewX(12deg); }
.medal__ribbon::after { right: 4%; background: linear-gradient(var(--r2), color-mix(in srgb, var(--r2) 75%, #000)); transform: skewX(-12deg); }
.medal__disc { position: relative; z-index: 1; width: var(--m); height: var(--m); border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.85) 0 12%, transparent 38%), linear-gradient(145deg, var(--c1), var(--c2));
  border: calc(var(--m) * .06) solid var(--edge); box-shadow: inset 0 0 0 calc(var(--m) * .05) rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.18); }
.medal__icon { font-size: calc(var(--m) * .46); line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.medal__stars { margin-top: 2px; font-size: calc(var(--m) * .16); letter-spacing: 1px; color: var(--edge); line-height: 1; }
.medal--silver { --c1: #ffffff; --c2: #a9b4c0; --edge: #7b8794; --r1: #5b87b0; --r2: #8fb3d6; }
.medal--gold { --c1: #fff2a8; --c2: #e0a422; --edge: #b07b10; --r1: #d94b4b; --r2: #f0b429; }
.medal--rainbow { --edge: #9b6bd8; --r1: #ff7aa8; --r2: #6cc5ff; }
.medal--rainbow .medal__disc { background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.9) 0 12%, transparent 40%),
  conic-gradient(from 20deg, #ff8a8a, #ffd36e, #8be08b, #7cc8ff, #b48cff, #ff8ad8, #ff8a8a); }
.medal--diamond { --c1: #f2fdff; --c2: #8fdcf0; --edge: #3fa7c9; --r1: #4fc3e8; --r2: #b48cff; }
.medal--diamond .medal__disc::after { content: '✦'; position: absolute; top: 10%; right: 14%; font-size: calc(var(--m) * .2); color: #fff; animation: medal-twinkle 1.8s ease-in-out infinite; }
.medal--locked { --c1: #eeeae5; --c2: #cfc8bf; --edge: #b9b1a7; --r1: #cfc8bf; --r2: #ddd6ce; }
.medal--locked .medal__icon { filter: grayscale(1) opacity(.35); }
.medal--shine .medal__disc::before { content: ''; position: absolute; inset: -20%; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.75) 50%, transparent 65%);
  transform: translateX(-120%); animation: medal-shine 2.4s ease-in-out .3s infinite; }
@keyframes medal-shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes medal-twinkle { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .medal--shine .medal__disc::before, .medal--diamond .medal__disc::after { animation: none; } }

/* ---- 成就頁 ---- */
.ach-head { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--color-primary-soft), var(--surface-1)); }
.ach-head__trophy { font-size: 52px; line-height: 1; animation: ach-bob 2.6s ease-in-out infinite; }
.ach-head__pts { margin: 4px 0 6px; }
.ach-head__pts b { font-size: 24px; color: var(--color-primary); }
@keyframes ach-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
.ach-list { display: grid; gap: 10px; }
.ach-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--radius-lg); border: 1px solid var(--border-1);
  background: var(--surface-1); color: inherit; font: inherit; cursor: pointer; box-shadow: var(--shadow-1); transition: transform .12s; }
.ach-card:active { transform: scale(.98); }
.ach-card--gold, .ach-card--rainbow, .ach-card--diamond { border-color: color-mix(in srgb, var(--color-warning) 45%, var(--border-1)); }
.ach-card__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ach-card__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ach-card__val { font-size: 13px; color: var(--text-2); }
.ach-card__val b { font-size: 18px; color: var(--text-1); }
.ach-card__next { font-size: 12px; color: var(--text-2); }
.ach-card__next b { color: var(--color-primary); }
.ach-lv { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.ach-lv--bronze { background: #f6dcc4; color: #8e5328; }
.ach-lv--silver { background: #e6ebf0; color: #56626e; }
.ach-lv--gold { background: #fff0b8; color: #8a6008; }
.ach-lv--rainbow { background: linear-gradient(90deg, #ffd6d6, #fff1c2, #d4f5d4, #d3ecff, #e8dcff); color: #6b4aa0; }
.ach-lv--diamond { background: #dcf6fd; color: #227c99; }
.ach-stamp { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--color-primary); color: var(--color-on-primary); }
.ach-stamp--big { font-size: 26px; background: none; padding: 0 6px; }
.ach-track { display: flex; align-items: center; margin: 2px 0; }
.ach-track i { flex: 1; height: 2px; background: var(--border-1); max-width: 26px; }
.ach-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--surface-2); flex: 0 0 auto; }
.ach-dot--bronze { background: #d08b4f; border-color: #8e5328; }
.ach-dot--silver { background: #c9d2db; border-color: #7b8794; }
.ach-dot--gold { background: #f2c230; border-color: #b07b10; }
.ach-dot--rainbow { background: conic-gradient(#ff8a8a, #ffd36e, #8be08b, #7cc8ff, #b48cff, #ff8a8a); border-color: #9b6bd8; }
.ach-dot--diamond { background: #9fe3f5; border-color: #3fa7c9; }
.ach-detail { display: flex; flex-direction: column; align-items: center; }
.ach-tiers { display: grid; gap: 8px; }
.ach-tier { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface-2); }
.ach-tier.is-off { opacity: .6; }
.wc-card.ach-recent { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 16px 10px; }   /* 水平排：獎牌在上、名稱在下 */
.ach-recent__item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.ach-recent__item b { font-size: 13px; line-height: 1.3; color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ach-recent__item small { font-size: 11px; line-height: 1.3; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ach-pop { animation: wc-pop .4s ease-out both; }
.ach-pop:nth-child(2) { animation-delay: .08s; } .ach-pop:nth-child(3) { animation-delay: .16s; } .ach-pop:nth-child(4) { animation-delay: .24s; }
.ach-pts { color: var(--color-primary); font-weight: 700; }

/* ---- 動態牆（Threads／IG／FB 風格）---- */
.wc-post { padding-bottom: 10px; }
.wc-post .wc-post__body { margin-top: 8px; }
/* 同一個項目、同一天的卡：每個人一行（點了展開完整打卡） */
.wc-grp__icon { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; }
.wc-grp__icon img, .wc-grp__icon svg { width: 26px; height: 26px; }
.wc-grp__list { margin-top: 8px; }
.wc-grp__row + .wc-grp__row { border-top: 1px solid var(--border-1); }
.wc-grp__btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 6px 0; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.wc-grp__btn .wc-grow { min-width: 0; }
.wc-grp__who { display: block; }
.wc-grp__sum { display: block; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-grp__soc { flex: 0 0 auto; white-space: nowrap; }
.wc-grp__thumb { position: relative; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; }
.wc-grp__thumb img { width: 100%; height: 100%; object-fit: cover; }
.wc-grp__thumb i { position: absolute; right: 2px; bottom: 2px; font-style: normal; font-size: 11px; line-height: 1; padding: 2px 4px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; }
.wc-grp__full > .wc-card { box-shadow: none; border: 0; border-radius: 0; margin: 0; padding: 0 0 10px; background: none; content-visibility: visible; }
.wc-grp__full .wc-post__head { justify-content: flex-end; }   /* 那一行已經有名字和項目：只留自己的編輯選單 */
.wc-grp__full .wc-post__head > :not(.wc-post__menu), .wc-grp__full .wc-chip--primary { display: none; }
.wc-grp__full .gal { margin-left: 0; margin-right: 0; border-radius: 10px; }
.wc-grp__more { margin-top: 6px; }
/* 動態牆：依項目／依人切換（小的兩段式按鈕，放在分享近況下面） */
.wc-feedby { display: inline-flex; gap: 2px; padding: 2px; margin: 0 0 10px; border-radius: 999px; background: var(--surface-2); }
.wc-feedby button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.wc-feedby button.is-active { background: var(--surface-1); color: var(--text-1); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
/* 照片影片：滿版（貼齊卡片左右）、可以左右滑；框的比例（--ar）照第一張，限制在 4:5～1.91:1（app.js galleryHtml） */
.gal { position: relative; margin: 12px -16px 0; background: var(--surface-3); overflow: hidden; }
.gal__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gal__track::-webkit-scrollbar { display: none; }
.gal__slide { position: relative; flex: 0 0 100%; aspect-ratio: var(--ar, 0.8); scroll-snap-align: center; background: #111; overflow: hidden; }
.gal__slide img, .gal__slide video { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; }
/* 模糊預覽：24px 的小圖放大＋模糊，真的圖片載好就蓋在上面（不用 JS） */
.gal__lqip { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(14px); transform: scale(1.12); }
.gal__slide video[controls] { object-fit: contain; }
/* 比例差太多（截圖、全景、方向不同）：整張放進來，旁邊墊同一張的模糊版（調暗一點，照片才看得清楚） */
.gal__slide--fit img, .gal__slide--fit video { object-fit: contain; }
.gal__slide--fit .gal__lqip { filter: blur(20px) brightness(.72); transform: scale(1.2); }
.gal__play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 28px;
  padding-left: 6px; cursor: pointer; backdrop-filter: blur(4px); }
.gal__count { position: absolute; top: 10px; right: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; }
.gal__dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.gal__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); }
.gal__dots i.on { background: #fff; transform: scale(1.25); }
.gal__burst { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; pointer-events: none; opacity: 0; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); }
.gal__burst.is-on { animation: wc-burst .9s ease-out; }
@keyframes wc-burst { 0% { opacity: 0; transform: scale(.3); } 25% { opacity: 1; transform: scale(1.2); } 45% { transform: scale(.95); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.1) translateY(-20px); } }
@media (prefers-reduced-motion: reduce) { .gal__burst.is-on { animation-duration: .01s; } }
/* 互動列 */
.wc-social { margin-top: 8px; }
.wc-social__bar { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border-1); padding-top: 8px; }
.wc-react, .wc-cbtn, .wc-react-more { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface-1); color: var(--text-1); font: inherit; cursor: pointer; }
.wc-react.is-on { background: var(--color-primary-soft); border-color: transparent; color: var(--color-primary-soft-text); font-weight: 600; }
.wc-react-more { padding: 0 10px; font-size: 14px; }
.wc-cbtn { margin-left: auto; }
.wc-rsum { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.wc-rsum__emo { font-size: 16px; letter-spacing: -2px; }
.wc-cmts { display: grid; gap: 4px; width: 100%; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--text-1); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.wc-cmt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 選表情（FB 那種一排浮起來）*/
.wc-picker { position: fixed; z-index: 60; display: flex; gap: 2px; padding: 6px; border-radius: 999px; background: var(--surface-1); box-shadow: 0 6px 24px rgba(0,0,0,.18); animation: wc-pop .18s ease-out; }
.wc-picker button { display: flex; flex-direction: column; align-items: center; min-width: 44px; min-height: 44px; border: 0; background: none; cursor: pointer; border-radius: 12px; color: var(--text-2); font: inherit; }
.wc-picker button span { font-size: 28px; line-height: 1.1; transition: transform .12s; }
.wc-picker button small { font-size: 10px; }
.wc-picker button:hover span, .wc-picker button:focus span { transform: scale(1.3) translateY(-4px); }
.wc-rx { position: relative; }
.wc-rx i { position: absolute; right: -4px; bottom: -4px; font-style: normal; font-size: 16px; }
/* 留言：底部彈出 */
dialog.modal--sheet { width: min(560px, 100vw); max-height: 82dvh; }
@media (max-width: 640px) {
  dialog.modal--sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 20px 20px 0 0; }
}
.wc-sheet { display: flex; flex-direction: column; gap: 10px; }
.wc-sheet__list { display: grid; gap: 14px; max-height: 50dvh; overflow-y: auto; padding: 2px; }
.wc-comment { display: flex; gap: 10px; align-items: flex-start; }
.wc-comment__body { white-space: pre-wrap; word-break: break-word; }
.wc-sheet__form { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border-1); padding-top: 10px; }
.wc-sheet__form .input { flex: 1; min-width: 0; }
/* 新互動通知 */
.wc-activity { border-color: var(--color-primary); }
.wc-activity__list { display: grid; gap: 6px; margin-top: 10px; }
.wc-activity__item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.wc-activity__item span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-cmts { min-height: 44px; padding: 6px 0; align-content: center; }

/* ---- 體重管理 ---- */
.ch-line { fill: none; stroke: var(--color-primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { fill: var(--surface-1); stroke: var(--color-primary); stroke-width: 2.5; }
.ch-hit:hover .ch-dot, .ch-hit:focus .ch-dot { fill: var(--color-primary); }
.ch-base { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 5 4; }
.wt-hero__v { font-size: 22px; font-weight: 700; margin: 2px 0 10px; }
.wt-chg { font-weight: 700; white-space: nowrap; }
.wt-down { color: var(--color-success); }
.wt-up { color: var(--color-danger); }
.wt-recs { padding: 0; overflow: hidden; }
.wt-rec { padding: 12px 14px; border-top: 1px solid var(--border-1); }
.wt-rec:first-child { border-top: 0; }
.wt-rec.is-deleted .wt-rec__kg { color: var(--text-3); }
.wt-rec.is-deleted .wt-num { text-decoration: line-through; }
a.wc-item, a.wc-item:hover { color: inherit; text-decoration: none; }
.wt-rec__main { display: flex; gap: 12px; align-items: flex-start; }
.wt-rec__kg { font-size: 22px; font-weight: 700; min-width: 86px; line-height: 1.2; }
.wt-rec__kg small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.wt-rec__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wt-rec__acts .btn { min-height: 44px; }
.wt-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.wt-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface-2); display: block; }
.wt-hist { margin-top: 10px; display: grid; gap: 10px; }
.wt-hist__row { padding-top: 10px; border-top: 1px solid var(--border-1); }
.wt-hist__top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.wc-card details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.wt-sep { border: 0; border-top: 1px dashed var(--border-2); margin: 20px 0; }
.wt-kg-input { font-size: 22px; font-weight: 700; }

/* ---- 分享近況、連結預覽卡 ---- */
.wc-card.wc-compose { display: flex; flex-direction: row; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.wc-compose:hover { color: inherit; text-decoration: none; }
.wc-link-wrap { position: relative; margin-top: 10px; }
.wc-link { display: block; border: 1px solid var(--border-1); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); color: inherit; text-decoration: none; }
.wc-link:hover { color: inherit; text-decoration: none; border-color: var(--border-2); }
.wc-link__img { display: block; width: 100%; aspect-ratio: 1.91 / 1; object-fit: cover; background: var(--surface-3); }
.wc-link__txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-width: 0; }
.wc-link__site { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wc-link__title { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-link__desc { font-size: 13px; color: var(--text-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-link__rm { position: absolute; top: 6px; right: 6px; background: var(--surface-1); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.wc-link--loading { display: flex; align-items: center; gap: 10px; padding: 12px; }
.wc-post__note a { color: var(--color-primary); overflow-wrap: anywhere; }

/* ---- 改版通知、改版紀錄 ---- */
.wc-update .modal__body { max-height: 70vh; overflow: auto; }
.wc-rel__title { font-weight: 700; }
.wc-rel ul { margin: 6px 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.wc-rel li { line-height: 1.5; }
.wc-card.wc-rel ul { margin-bottom: 0; }

/* ---- 加到手機主畫面 ---- */
.wc-a2hs__h { font-size: 15px; margin: 4px 0 8px; }
.wc-a2hs__steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wc-a2hs__steps li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.wc-a2hs__n { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--color-primary-soft); color: var(--color-primary-soft-text); margin-top: 1px; }
.wc-key { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border-1); }
.modal details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--text-2); }
/* 上方的安裝提示列（install.js）：App 在標題列下面、不跟著捲動；登入頁在最上面 */
.wc-install { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; background: var(--color-primary-soft); color: var(--color-primary-soft-text);
  border-bottom: 1px solid var(--border-1); font-size: var(--fs-sm); line-height: 1.4; }
.wc-install > img { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px; }
.wc-install__t { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.wc-install__go { flex: 0 0 auto; min-height: 44px; white-space: nowrap; }
.wc-install__x { flex: 0 0 auto; width: 44px; height: 44px; border: 0; background: none; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; border-radius: 50%; }
.wc-install__x:focus-visible { outline: 2px solid var(--color-primary); outline-offset: -4px; }
body > .wc-install { position: sticky; top: 0; z-index: 40; padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
.wc-install-sheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.wc-install-sheet__bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.wc-install-sheet__box { position: relative; width: 100%; max-width: 480px; max-height: 85dvh; overflow: auto; background: var(--body-bg); color: inherit;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.wc-install-sheet--arrow .wc-install-sheet__box { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }   /* 箭頭在最下面，不要蓋到按鈕 */
.wc-install-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.wc-install-sheet__head h2 { font-size: var(--fs-lg); margin: 0; }
.wc-install-sheet .wc-install__x { color: var(--text-2); }
.wc-install-arrow { position: fixed; left: 50%; transform: translateX(-50%); z-index: 1001; pointer-events: none; padding: 6px 14px; border-radius: 999px;
  background: var(--color-primary); color: #fff; font-weight: 700; font-size: var(--fs-sm); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); animation: wc-install-bob 1s ease-in-out infinite alternate; }
.wc-install-arrow--bottom { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
.wc-install-arrow--top { top: calc(8px + env(safe-area-inset-top, 0px)); left: auto; right: 12px; transform: none; }
@keyframes wc-install-bob { to { translate: 0 6px; } }
.wc-install-arrow--top { animation-name: wc-install-bob-up; }
@keyframes wc-install-bob-up { to { translate: 0 -6px; } }
@media (prefers-reduced-motion: reduce) { .wc-install-arrow { animation: none; } }
@media (min-width: 1024px) { .wc-install { display: none; } }

/* ---- 換頁：進度條、骨架畫面、淡入、按下的回饋 ---- */
.wc-top { position: relative; }
.wc-progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; z-index: 30; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .2s; }
.wc-progress.is-on { opacity: 1; }
.wc-progress::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 3px; background: var(--color-primary); animation: wc-progress 1s ease-in-out infinite; }
@keyframes wc-progress { from { left: -40%; } to { left: 100%; } }
.wc-skel-wrap { display: grid; gap: 12px; }
.wc-skel-card { display: grid; gap: 10px; }
.wc-skel { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: wc-shimmer 1.2s linear infinite; }
.wc-skel--block { height: 120px; border-radius: var(--radius-md); }
.wc-skel--av { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; }
.wc-skel--seg { height: 48px; border-radius: 999px; }
.wc-skel-row { display: flex; gap: 12px; align-items: center; }
.wc-skel-row .wc-grow { display: grid; gap: 8px; }
.wc-skel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@keyframes wc-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.wc-fade { animation: wc-fade .18s ease-out; }
@keyframes wc-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.wc-tab { transition: transform .1s; }
.wc-tab:active { transform: scale(.92); }
@media (prefers-reduced-motion: reduce) { .wc-skel, .wc-progress::before { animation: none; } .wc-fade { animation: none; } .wc-tab:active { transform: none; } }

/* ---- 右上角的「我」（大頭貼＋暱稱）---- */
.wc-me { display: inline-flex; align-items: center; gap: 6px; max-width: 42%; min-height: 44px; padding: 0 12px 0 4px; border-radius: 999px; color: var(--text-1); text-decoration: none; font-size: 14px; font-weight: 600; flex: 0 1 auto; }
.wc-me:hover { background: var(--surface-2); color: var(--text-1); text-decoration: none; }
.wc-me.is-active { background: var(--color-primary-soft); color: var(--color-primary-soft-text); }
.wc-me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.wc-me .wc-avatar { flex: 0 0 auto; }
.wc-me .wc-avatar { width: 32px; height: 32px; font-size: 18px; border: 0; }
/* 畫面外的卡片先不畫（往下捲到才排版、上色），動態牆、成就頁換頁比較快 */
.wc-post { content-visibility: auto; contain-intrinsic-size: auto 480px; }
.ach-card { content-visibility: auto; contain-intrinsic-size: auto 118px; }
.wc-items > .wc-item { content-visibility: auto; contain-intrinsic-size: auto 68px; }
/* 連結做成的卡片也要橫排（a.wc-card 預設 display:block 會蓋掉 .wc-row）；第一個區塊不要上方空白；分頁按了不要底線 */
a.wc-card.wc-row { display: flex; }
#view > .wc-section:first-child { margin-top: 0; }
.wc-tab, .wc-tab:hover, .wc-tab:focus { text-decoration: none; }
.wt-prog { margin-top: 12px; }
.wc-post__menu { margin-left: 4px; font-size: 22px; line-height: 1; color: var(--text-2); flex: 0 0 auto; }

/* 右上角 ⚙️ 設定 */
.wc-set-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; line-height: 1; }
.wc-set-btn.is-active { background: var(--color-primary-soft); }
/* 設定頁：一行一個（左圖示、中間文字、右邊開關或 ›） */
.wc-set { padding: 4px 0; overflow: hidden; }
.wc-set-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 16px; border: 0; background: none; color: var(--text-1);
  font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.wc-set-row + .wc-set-row { border-top: 1px solid var(--border-1); }
@media (hover: hover) { .wc-set-row:hover { background: var(--surface-2); color: var(--text-1); text-decoration: none; } }
.wc-set-row:disabled { cursor: default; }
.wc-set-row b { display: block; font-weight: 600; }
.wc-set-row small { display: block; color: var(--text-3); font-size: 13px; }
.wc-set-row__icon { font-size: 22px; width: 28px; text-align: center; flex: 0 0 auto; }
.wc-set-row__right { color: var(--text-3); font-size: 20px; flex: 0 0 auto; }
.wc-toggle { display: inline-block; width: 46px; height: 28px; border-radius: 999px; background: var(--border-2, var(--border-1)); position: relative; transition: background .2s; vertical-align: middle; }
.wc-toggle i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.wc-toggle.is-on { background: var(--color-primary); }
.wc-toggle.is-on i { transform: translateX(18px); }
/* 試玩期提示、首頁活動名稱連到辦法 */
.wc-trial { display: block; border-color: var(--color-primary); color: var(--text-1); text-decoration: none; }
.wc-trial:hover { color: var(--text-1); text-decoration: none; }
.wc-link-plain { color: inherit; text-decoration: none; display: block; }
.wc-link-plain:hover { color: inherit; text-decoration: none; }

/* 自訂圖示（svg:名稱）：跟 emoji 一樣大小，跟著字級縮放 */
.wc-ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; object-fit: contain; }

/* 排行榜：綜合（四個榜：手機一個接一個往下滑，電腦四個並排）、單項（上面一排項目可以橫向滑，名單左右滑換項目） */
.wc-view--wide { max-width: var(--wc-max); }
@media (min-width: 900px) { .wc-view--wide { max-width: 1240px; } }
.bd-seg { max-width: 360px; margin-left: auto; margin-right: auto; }
.bd-note { margin: 0 0 12px; text-align: center; }
.bd-grid { display: grid; gap: 8px 16px; }
@media (min-width: 900px) { .bd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; } .bd-col .wc-rank { gap: 8px; } }
.bd-col__h { display: flex; align-items: baseline; gap: 8px; font-size: 17px; margin: 12px 0 8px; }
.bd-col__h small { color: var(--text-3); font-weight: 400; font-size: 13px; margin-left: auto; }
.bd-chips { position: relative; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 0 -16px 12px; padding: 2px 16px 6px; -webkit-overflow-scrolling: touch; }
.bd-chips::-webkit-scrollbar { display: none; }
.bd-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-1);
  background: var(--surface-1); color: var(--text-2); font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer; scroll-snap-align: center; }
.bd-chip__i { font-size: 20px; line-height: 1; }
.bd-chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; font-weight: 600; }
/* 單項：每個項目一頁並排，左右滑由瀏覽器原生捲動＋scroll-snap（不靠 JS 動畫，跟手、不卡） */
.bd-swipe { position: relative; display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; margin: 0 -16px; -webkit-overflow-scrolling: touch; }
.bd-swipe::-webkit-scrollbar { display: none; }
.bd-panel { flex: 0 0 100%; min-width: 0; box-sizing: border-box; padding: 2px 16px 6px; scroll-snap-align: start; scroll-snap-stop: always; }
.bd-skel { min-height: 52px; }
.bd-item-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bd-item-h .wc-icon-btn { font-size: 28px; color: var(--text-2); flex: 0 0 auto; }
.bd-item-h .wc-title .wc-ico, .bd-item-h .wc-title { font-size: 20px; }
.bd-hint { margin: 8px 0 0; }

@media (min-width: 900px) { .bd-hint { display: none; } }

/* 邀請 QR Code：QR 一律白底深色（深色模式也是，相機才讀得到） */
.wc-invite .modal__body { display: grid; gap: 12px; }
.wc-invite__qr { width: min(280px, 100%); margin: 0 auto; padding: 10px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px var(--border-1); }
.wc-invite__qr svg { display: block; width: 100%; height: auto; }
.wc-invite__hint { margin: 0; text-align: center; font-size: var(--fs-sm); color: var(--text-2); }
.wc-invite__url { font: 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; text-align: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.wc-invite__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wc-invite .btn { min-height: 44px; }

/* 頭像：可愛動物（大格、4 個一排）；AI 畫的大頭貼選項 */
.wc-avatars.wc-avatars--cute { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wc-avatars--cute button { padding: 3px; border-radius: 50%; background: transparent; min-height: 56px; }
.wc-avatars--cute button img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.wc-avatars--cute button:disabled { opacity: .6; cursor: default; }
.wc-av-ai { display: grid; gap: 8px; }
.wc-av-ai__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wc-av-ai__opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border: 2px solid var(--border-1); border-radius: 16px; background: var(--surface-1); font: inherit; color: var(--text-1); cursor: pointer; min-height: 44px; }
.wc-av-ai__opt.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); font-weight: 600; }
.wc-av-ai__opt:disabled { cursor: default; color: var(--text-2); }
.wc-av-ai__pic { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); font-size: 28px; }
.wc-av-ai__pic img { width: 100%; height: 100%; display: block; }
.wc-av-ai__spin { width: 26px; height: 26px; border: 3px solid var(--border-2); border-top-color: var(--color-primary); border-radius: 50%; animation: wc-spin .9s linear infinite; }
@keyframes wc-spin { to { transform: rotate(360deg); } }
.wc-av-edit { display: grid; gap: 12px; }
.wc-av-edit .wc-seg { margin-bottom: 0; }
/* 後台組織列表：直接看得到邀請 QR Code，點了放大 */
.wc-tqr { display: flex; gap: 10px; align-items: center; min-width: 260px; }
.wc-tqr__img { flex: 0 0 auto; width: 84px; height: 84px; padding: 4px; border: 1px solid var(--border-1); border-radius: 10px; background: #fff; cursor: zoom-in; }
.wc-tqr__img svg { display: block; width: 100%; height: 100%; }

.wc-prize { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }

/* 休息券 */
.wc-stat--btn { border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 0; min-height: 44px; }
.wc-rest { display: grid; gap: 12px; }
.wc-rest__count { text-align: center; font-size: 28px; }
.wc-rest__count span { font-size: 16px; color: var(--text-2); }
.wc-rest__reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wc-rest__reasons button { min-height: 44px; border: 2px solid var(--border-1); border-radius: 14px; background: var(--surface-1); font: inherit; color: var(--text-1); cursor: pointer; padding: 6px 8px; }
.wc-rest__reasons button.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); font-weight: 600; }
#rs-form { display: grid; gap: 10px; }
#rs-form .wc-seg { margin-bottom: 0; }
.wc-rest__confirm { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-2); }
.wc-rest__bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.wc-rest__bar i { display: block; height: 100%; background: var(--color-primary); transition: width .9s linear; }
.wc-rest__used { display: grid; gap: 4px; border-top: 1px solid var(--border-1); padding-top: 10px; }
.wc-rest-risk { border-color: var(--color-warning, #e0a03c); }

/* 抽查對話（App 和後台共用） */
.wc-thread { display: grid; gap: 8px; }
.wc-msg { max-width: 85%; justify-self: start; }
.wc-msg--me { justify-self: end; text-align: right; }
.wc-msg__who { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.wc-msg__body { display: inline-block; text-align: left; white-space: pre-wrap; padding: 8px 12px; border-radius: 14px; background: var(--surface-2); font-size: 14px; }
.wc-msg--me .wc-msg__body { background: var(--color-primary-soft); }
.wc-msg--sys { justify-self: center; max-width: 100%; font-size: 12px; color: var(--text-2); text-align: center; }
.wc-reply { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.wc-case-tag { font-size: 13px; padding: 6px 10px; border-radius: 10px; background: var(--color-primary-soft); }
.wc-case-card { display: block; color: inherit; text-decoration: none; border-color: var(--color-primary); }

/* ---- 電腦版（2026-10-28 Ryan：手機版很好用，電腦版不要只是放大的手機）----
   1024px 以上：左邊固定側欄（組織名稱＋主選單），右邊上方標題列、下面內容；首頁、動態牆、成就用兩欄或多欄
   手機（1024px 以下）照原本：下方分頁列、內容一欄。這裡的兩層包裝在手機上不影響排版（display: contents／一般區塊） */
.wc-brand { display: none; }
.wc-feedlay, .wc-feedlay__side { display: contents; }   /* 手機：「動態牆／我的紀錄」要能黏在捲動區上方，不能被包在別的區塊裡 */
.wc-dash__alerts:not(:empty) { margin-bottom: 12px; }
@media (min-width: 1024px) {
  .wc-app { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .wc-tabs { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; border-top: 0; border-right: 1px solid var(--border-1); overflow-y: auto; }
  .wc-brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--border-1);
    color: var(--text-1); font-weight: 700; font-size: 16px; line-height: 1.3; text-decoration: none; }
  .wc-brand:hover, .wc-brand:focus { color: var(--text-1); text-decoration: none; }
  .wc-brand img { flex: 0 0 auto; border-radius: 8px; }
  .wc-tab { height: 48px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 14px; border-radius: 12px; font-size: 15px; color: var(--text-2); }
  .wc-tab__icon { width: 24px; font-size: 20px; text-align: center; }
  .wc-tab:hover { background: var(--surface-2); color: var(--text-1); }
  .wc-tab.is-active { background: var(--color-primary-soft); color: var(--color-primary-soft-text); }
  .wc-tab:active { transform: none; }
  .wc-top { grid-column: 2; grid-row: 1; min-height: 64px; padding: 10px 32px; }
  .wc-main { grid-column: 2; grid-row: 2; }
  .wc-view { max-width: 760px; padding: 28px 32px 56px; }
  .wc-view[data-page="home"], .wc-view[data-page="feed"], .wc-view[data-page="badges"] { max-width: 1200px; }
  .wc-view--wide { max-width: 1240px; }

  /* 今天：左邊分數＋項目（自律、運動兩類並排），右邊提醒、揪團加分、排行榜前 5、最近的成就 */
  .wc-dash { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "main alerts" "main side"; grid-template-rows: auto 1fr; column-gap: 28px; align-items: start; }
  .wc-dash__alerts { grid-area: alerts; margin-bottom: 0; }
  .wc-dash__alerts:not(:empty) { margin-bottom: 4px; }
  .wc-dash__main { grid-area: main; }
  .wc-dash__side { grid-area: side; }
  .wc-dash__alerts:empty ~ .wc-dash__side > .wc-section:first-child { margin-top: 0; }
  .wc-dash__alerts .wc-row { align-items: flex-start; }
  .wc-dash__alerts .wc-col { flex-direction: row; flex-wrap: wrap; }
  .wc-mini-board .wc-rank { padding: 8px 4px; }

  /* 動態：貼文一欄 600px（照片不會撐滿整個螢幕），右欄固定：分頁、分享近況、切換、排行榜 */
  .wc-feedlay { display: grid; grid-template-columns: minmax(0, 600px) 320px; justify-content: center; gap: 28px; align-items: start; }
  .wc-feedlay__main { grid-column: 1; grid-row: 1; min-width: 0; }
  .wc-feedlay__side { display: block; grid-column: 2; grid-row: 1; position: sticky; top: 0; max-height: calc(100dvh - 120px); overflow-y: auto; padding: 2px; }
  .wc-feedlay__side .wc-feedbar { position: static; margin: 0 0 12px; padding: 0; background: none; border: 0; box-shadow: none; }
  .wc-feedlay__side .wc-feedby { display: flex; width: 100%; }
  .wc-feedlay__side .wc-feedby button { flex: 1; }
  .wc-feedlay__side .wc-compose { margin-bottom: 12px; }
  .wc-feedlay__side .wc-mini-board { margin-top: 12px; }

  /* 成就：卡片多欄 */
  .ach-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

  /* 留言等底部彈出的視窗：電腦版置中 */
  dialog.modal--sheet { margin: auto; border-radius: 20px; }
}
/* 夠寬（1280px 以上）首頁的自律、運動兩類並排；1024–1279 兩類上下排，項目名稱才不會被擠成直的 */
@media (min-width: 1280px) {
  .wc-dash { grid-template-columns: minmax(0, 1fr) 340px; }
  .wc-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-items: start; }
}
/* 用滑鼠的裝置：可以點的東西滑過去有回饋 */
@media (hover: hover) and (pointer: fine) {
  .wc-item { border-radius: 10px; transition: background .12s; }
  .wc-item:hover { background: var(--surface-2); }
  .wc-grp__btn { width: calc(100% + 16px); margin: 0 -8px; padding: 6px 8px; border-radius: 10px; transition: background .12s; }
  .wc-grp__btn:hover { background: var(--surface-2); }
  .ach-card:hover { border-color: var(--border-2); box-shadow: var(--shadow-2, var(--shadow-1)); }
  a.wc-card:hover { border-color: var(--border-2); }
  .wc-react:hover, .wc-cbtn:hover, .wc-react-more:hover, .wc-cheer:hover { background: var(--surface-2); }
  .wc-react.is-on:hover { background: var(--color-primary-soft); }
}
