/* ===== 桌機殼 2026-10-08(Josh:「不像在電腦上用的東西」)=====
   左側固定側邊欄 + 正式工具列 + 右側「今天」面板。只在 body.dk(≥881px,desk-shell.js 掛)生效;
   手機不掛 .dk → 這個檔案對手機零影響。色彩全部吃既有主題 token(--accent/--text/--card…),換主題/深色自動跟。 */
#dk-side, .dk-arrows { display: none; }

body.dk {
  --dk-side-w: 256px;
  --dk-side-bg: color-mix(in srgb, var(--bg) 70%, var(--side-bg));
  --dk-hair: color-mix(in srgb, var(--text) 9%, transparent);
  --dk-hover: color-mix(in srgb, var(--text) 5%, transparent);
  --dk-press: color-mix(in srgb, var(--text) 8%, transparent);
  --dk-muted: color-mix(in srgb, var(--text) 52%, transparent);
  font-feature-settings: "tnum" 1;
}
body.dk #app { display: flex; background: var(--dk-side-bg); }

/* ---------- 側邊欄 ---------- */
body.dk #dk-side {
  display: flex; flex-direction: column; flex: none; width: var(--dk-side-w); height: 100%;
  padding: 14px 12px 10px; gap: 4px; overflow-y: auto; overflow-x: hidden;
  background: var(--dk-side-bg); border-right: 1px solid var(--dk-hair);
  scrollbar-width: none; user-select: none; -webkit-user-select: none;
}
body.dk #dk-side::-webkit-scrollbar { display: none; }
body.dk #dk-side button { font-family: inherit; color: inherit; cursor: pointer; }

.dk-side-head { padding: 0 2px 6px; }
.dk-fam {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: transparent;
  border-radius: 10px; text-align: left; transition: background var(--dur-fast) var(--ease-out);
}
.dk-fam:not(.static):hover { background: var(--dk-hover); }
.dk-fam.static { cursor: default !important; }
.dk-fam-logo { width: 30px; height: 30px; border-radius: 8px; flex: none; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.dk-fam-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.dk-fam-text b { font-size: 15px; font-weight: 750; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.dk-fam-sub { font-size: 12px; color: var(--dk-muted); }
.dk-caret { color: var(--dk-muted); flex: none; }

.dk-search {
  display: flex; align-items: center; gap: 8px; height: 34px; margin: 2px 0 10px; padding: 0 8px 0 10px;
  border: 1px solid var(--dk-hair); border-radius: 9px; background: color-mix(in srgb, var(--card) 70%, transparent);
  color: var(--dk-muted) !important; font-size: 13px; text-align: left;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.dk-search span { flex: 1; }
.dk-search:hover { background: var(--card); border-color: color-mix(in srgb, var(--text) 16%, transparent); }
body.dk kbd {
  font: 600 11px/1 ui-sans-serif, -apple-system, system-ui, sans-serif; color: var(--dk-muted);
  padding: 3px 5px; border-radius: 5px; background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px solid var(--dk-hair); border-bottom-width: 1.5px; min-width: 18px; text-align: center; display: inline-block;
}

.dk-nav, .dk-side-foot { display: flex; flex-direction: column; gap: 1px; }
.dk-nav button, .dk-side-foot [data-dk] {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; font-size: 14px; font-weight: 550; color: var(--text) !important; text-align: left;
  transition: background var(--dur-fast) var(--ease-out);
}
.dk-nav button svg, .dk-side-foot [data-dk] svg { width: 18px; height: 18px; flex: none; color: var(--dk-muted); transition: color var(--dur-fast) var(--ease-out); }
.dk-nav button span:first-of-type, .dk-side-foot [data-dk] span { flex: 1; }
.dk-nav button:hover, .dk-side-foot [data-dk]:hover { background: var(--dk-hover); }
.dk-nav button:active, .dk-side-foot [data-dk]:active { background: var(--dk-press); }
.dk-nav button.active, .dk-side-foot [data-dk].active {
  background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 3px rgba(42,36,32,.08); font-weight: 650;
}
.dk-nav button.active svg, .dk-side-foot [data-dk].active svg { color: var(--accent); }
.dk-count { font-size: 12px; font-weight: 600; color: var(--dk-muted); font-variant-numeric: tabular-nums; }

.dk-sec { padding: 14px 2px 0; }
.dk-sec-h {
  display: flex; align-items: center; justify-content: space-between; padding: 0 8px 4px;
  font-size: 11.5px; font-weight: 700; color: var(--dk-muted); letter-spacing: 0.02em;
}
.dk-sec-btn { width: 24px; height: 24px; border: 0; background: transparent; border-radius: 6px; display: grid; place-items: center; color: var(--dk-muted) !important; }
.dk-sec-btn:hover { background: var(--dk-hover); color: var(--text) !important; }

/* 迷你月曆 */
.dk-minical { padding: 2px 4px 0; }
.dkm-head { display: flex; align-items: center; gap: 2px; padding: 0 2px 6px 6px; }
.dkm-title { flex: 1; font-size: 13px; font-weight: 700; color: var(--text); }
.dkm-head button { width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; font-size: 17px; line-height: 1; color: var(--dk-muted) !important; }
.dkm-head button:hover { background: var(--dk-hover); color: var(--text) !important; }
.dkm-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.dkm-wd { text-align: center; font-size: 10.5px; font-weight: 600; color: var(--dk-muted); padding-bottom: 3px; }
.dkm-d {
  position: relative; height: 28px; border: 0; background: transparent; border-radius: 7px; padding: 0;
  font-size: 12px; font-weight: 550; color: var(--text) !important; font-variant-numeric: tabular-nums;
}
.dkm-d:hover { background: var(--dk-hover); }
.dkm-d.o { color: color-mix(in srgb, var(--text) 30%, transparent) !important; }
.dkm-d i { position: absolute; left: 50%; bottom: 3px; width: 3.5px; height: 3.5px; margin-left: -1.75px; border-radius: 50%; background: color-mix(in srgb, var(--text) 35%, transparent); }
.dkm-d.r { background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 0; }
.dkm-d.r.rs { border-radius: 7px 0 0 7px; }
.dkm-d.r.re { border-radius: 0 7px 7px 0; }
.dkm-d.r.rs.re { border-radius: 7px; }
.dkm-d.t { color: #fff !important; font-weight: 750; }
.dkm-d.t::before { content: ''; position: absolute; inset: 2px 50% auto auto; width: 24px; height: 24px; transform: translateX(50%); border-radius: 50%; background: var(--action, var(--accent)); z-index: -1; }
.dkm-d.t { z-index: 0; }
.dkm-d.t i { background: rgba(255,255,255,.85); }

/* 家人 */
.dk-members { display: flex; flex-direction: column; gap: 1px; }
.dk-mem {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; font-size: 13.5px; font-weight: 550; text-align: left; color: var(--text) !important;
}
.dk-mem:hover { background: var(--dk-hover); }
.dk-av {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--c); color: #fff; font-size: 10.5px; font-weight: 750; letter-spacing: -0.02em; overflow: hidden; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.dk-mem-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-me { font-size: 11px; color: var(--dk-muted); font-weight: 600; }

.dk-side-foot { margin-top: auto; padding-top: 12px; flex-direction: row; align-items: center; gap: 4px; }
.dk-side-foot [data-dk] { flex: 1; }
.dk-keys-btn { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; }
.dk-keys-btn:hover { background: var(--dk-hover); }

/* ---------- 主區與工具列 ---------- */
body.dk #main { background: var(--card); border-radius: 0; box-shadow: none; }
body.dk #topbar {
  flex-wrap: nowrap; gap: 8px; min-height: 60px; padding: 10px 18px 10px 16px;
  background: color-mix(in srgb, var(--card) 88%, transparent); background-image: none;
  border-bottom: 1px solid var(--dk-hair); box-shadow: none;
}
/* 側邊欄已承接:品牌、待辦/行事曆切換、搜尋、清單、設定、家庭 chip */
body.dk .topbar-brand, body.dk #surf-switch, body.dk #search-btn, body.dk #lists-btn,
body.dk #top-settings, body.dk #fam-chip-top { display: none !important; }
body.dk .dk-arrows { display: none; order: 1; gap: 2px; flex: none; }
body.dk.dk-cal .dk-arrows { display: flex; }
.dk-arrows button {
  width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center;
  color: var(--text); cursor: pointer;
}
.dk-arrows button:hover { background: var(--dk-hover); }
.dk-arrows button:active { background: var(--dk-press); }
body.dk .cal-title-btn { order: 2; flex: 1; margin-left: 4px; }
body.dk #cal-title { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; line-height: 32px; height: 32px; }
body.dk .cal-title-btn .caret { display: none; }
body.dk .cal-title-btn { pointer-events: none; }
body.dk .topbar-left { order: 3; }
body.dk .topbar-right { order: 4; display: flex; align-items: center; gap: 8px; }

/* 檢視切換:macOS 分段控制 */
body.dk .view-switch { background: color-mix(in srgb, var(--text) 6%, transparent); border-radius: 9px; padding: 2px; box-shadow: none; }
body.dk .top-view-switch button { padding: 5px 13px; font-size: 13px; font-weight: 550; border-radius: 7px; color: var(--text); cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
body.dk .view-switch button:not(.active):hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
body.dk .view-switch button.active { background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 2px rgba(0,0,0,.12); font-weight: 650; }

body.dk .today-btn {
  height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  transition: background var(--dur-fast) var(--ease-out);
}
body.dk .today-btn:hover { background: color-mix(in srgb, var(--text) 4%, var(--card)); }
body.dk #top-add {
  height: 32px; padding: 0 14px 0 11px; border-radius: 8px; border: 0; cursor: pointer;
  background: var(--action, var(--accent)); color: #fff; font-size: 13px; font-weight: 650;
  display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
body.dk #top-add.hidden { display: none; }
body.dk #top-add:hover { filter: brightness(1.06); }
body.dk #top-add .fam-plus { font-size: 16px; font-weight: 500; line-height: 1; }

/* ---------- 行事曆 ---------- */
body.dk #calendar { padding: 0 !important; background: var(--card); }
body.dk .fc { --fc-border-color: var(--dk-hair); --fc-today-bg-color: transparent; }
body.dk .fc .fc-scrollgrid, body.dk .fc .fc-scrollgrid-section > * { border-color: var(--dk-hair); }
body.dk .fc .fc-timegrid-slot { height: 2.6em; }
body.dk .fc .fc-timegrid-slot-minor { border-top-style: none; }
body.dk .fc .fc-timegrid-slot-label-cushion { font-size: 11px; font-weight: 600; color: var(--dk-muted); padding-right: 10px; }
body.dk .fc .fc-col-header-cell { background: var(--card); border-bottom-color: var(--dk-hair); }
body.dk .fc .fc-col-header-cell-cushion { padding: 10px 4px 8px; }
body.dk .fc .fc-timegrid-col.fc-day-today { background: color-mix(in srgb, var(--accent) 3.5%, transparent); }
body.dk .fc .fc-day-sat, body.dk .fc .fc-day-sun { background-color: color-mix(in srgb, var(--text) 1.6%, transparent); }
body.dk .fc .fc-timegrid-now-indicator-line { border-color: var(--danger); border-width: 1.5px 0 0; }
body.dk .fc .fc-timegrid-now-indicator-arrow { border-color: var(--danger); border-width: 5px 0 5px 6px; border-top-color: transparent; border-bottom-color: transparent; }

/* 時間軸事件:沿用 iOS 實色填 + 白字(499 拍板),只把排版改成桌面密度:標題在上、時間在下、圓角 6、事件間留白縫 */
body.dk #calendar .fc-view-harness { border: 0; border-radius: 0; box-shadow: none; }
body.dk .fc .fc-timegrid-event:not(.ev-chore):not(.ev-todo):not(.ev-holiday):not(.ev-outline) {
  border-radius: 6px; box-shadow: 0 0 0 1.5px var(--card); padding: 3px 7px 3px 8px;
  transition: filter var(--dur-fast) var(--ease-out);
}
body.dk .fc .fc-timegrid-event:hover { filter: brightness(1.05) saturate(1.05); }
body.dk .fc .fc-timegrid-event .fc-event-main-frame { flex-direction: column; gap: 1px; }
body.dk .fc .fc-timegrid-event .fc-event-time { order: 2; font-size: calc(11px * var(--text-scale)) !important; font-weight: 500 !important; margin: 0; }
body.dk .fc .fc-timegrid-event .fc-event-title-container { order: 1; }
body.dk .fc .fc-timegrid-event .fc-event-title { font-size: calc(12.5px * var(--text-scale)) !important; font-weight: 650 !important; line-height: 1.25; }
body.dk .fc .fc-timegrid-event.ev-compact .fc-event-main-frame { flex-direction: row; align-items: baseline; gap: 6px; }

/* 整天列 */
body.dk .fc .fc-timegrid-axis-cushion { font-size: 11px; font-weight: 600; color: var(--dk-muted); }
body.dk .fc .fc-daygrid-body .fc-daygrid-block-event:not(.ev-holiday) { border-radius: 5px; }
body.dk .fc .fc-daygrid-body .fc-daygrid-block-event:not(.ev-holiday) .fc-event-title { font-weight: 600; font-size: calc(12px * var(--text-scale)); padding-left: 3px; }

/* 月檢視 */
body.dk .fc .fc-dayGridMonth-view .fc-col-header-cell-cushion { font-size: 12px; font-weight: 650; color: var(--dk-muted); padding: 8px 4px; }
body.dk .fc .fc-dayGridMonth-view .fc-daygrid-day-number { font-size: 13px; font-weight: 600; padding: 6px 8px; color: var(--text); }
body.dk .fc .fc-dayGridMonth-view .fc-day-today { background: color-mix(in srgb, var(--accent) 4%, transparent) !important; }

/* ---------- 右側「今天」面板 ---------- */
body.dk.desk-split #main { grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); }
body.dk.desk-split #family-screen { background: color-mix(in srgb, var(--bg) 55%, var(--card)); border-left: 1px solid var(--dk-hair); }
body.dk.desk-split .td-wrap { padding: 18px 16px 24px !important; }
body.dk.desk-split .td-head { display: flex; align-items: baseline; padding: 6px 4px 6px; }
body.dk.desk-split .td-h1 { font-size: 15px !important; font-weight: 750; letter-spacing: -0.01em; }
#dk-agenda { margin: 0 0 22px; }
.dka-head { display: flex; align-items: flex-end; justify-content: space-between; padding: 2px 4px 10px; }
.dka-kicker { font-size: 12px; font-weight: 650; color: var(--accent); letter-spacing: .01em; }
.dka-h { margin: 1px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.dka-add {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: var(--card); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.dka-add:hover { background: color-mix(in srgb, var(--text) 4%, var(--card)); }
.dka-list { display: flex; flex-direction: column; gap: 6px; }
.dka-row {
  display: flex; align-items: stretch; gap: 10px; width: 100%; padding: 9px 12px 9px 10px; border: 0; border-radius: 10px; text-align: left;
  background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 2px rgba(42,36,32,.05); cursor: pointer; font-family: inherit;
  transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.dka-row:hover { box-shadow: 0 0 0 0.5px var(--dk-hair), 0 4px 12px rgba(42,36,32,.08); }
.dka-row:active { transform: scale(.99); }
.dka-bar { width: 3.5px; border-radius: 2px; background: var(--c); flex: none; }
.dka-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.dka-title { font-size: calc(13.5px * var(--text-scale)); font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dka-when { font-size: calc(12px * var(--text-scale)); color: var(--dk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.dka-row.past { opacity: .5; }
.dka-row.live { box-shadow: 0 0 0 1.5px var(--c), 0 4px 12px rgba(42,36,32,.08); }
.dka-empty { padding: 14px; border-radius: 10px; background: var(--card); color: var(--dk-muted); font-size: 13px; box-shadow: 0 0 0 0.5px var(--dk-hair); }

/* 右欄的待辦/清單:按鈕降成桌面次要樣式(不要整條粉紅大按鈕) */
body.dk.desk-split .td-create-btn {
  background: transparent; color: var(--dk-muted); border: 1px dashed color-mix(in srgb, var(--text) 16%, transparent);
  font-size: 13px; font-weight: 600; padding: 8px 12px; margin: 8px 0 14px;
}
body.dk.desk-split .td-create-btn:hover { background: var(--card); color: var(--text); filter: none; }
body.dk.desk-split .td-sec-h, body.dk.desk-split .td-col h2 { font-size: 13px; }

/* 待辦頁(全頁) */
body.dk.desk-todo .td-wrap { max-width: 1080px; padding: 28px 40px 48px !important; }
body.dk.desk-todo .td-h1 { font-size: 28px !important; font-weight: 800; letter-spacing: -0.02em; }

/* 非行事曆分頁:頁面自帶大標,工具列收起(不留一條空白橫條) */
body.dk:not(.dk-cal) #topbar { display: none !important; }

/* 全站「＋ 新增…」大粉紅按鈕 → 桌面次要按鈕 */
body.dk .td-create-btn {
  background: transparent; color: var(--dk-muted); border: 1px dashed color-mix(in srgb, var(--text) 16%, transparent);
  font-size: 13px; font-weight: 600; padding: 9px 12px; border-radius: 10px;
}
body.dk .td-create-btn:hover { background: var(--card); color: var(--text); filter: none; }

/* 設定頁:置中閱讀寬度;下拉選單改成「標籤在左、選單在右」的 macOS 偏好設定排法 */
body.dk #settings-screen .ios-row:has(> .ios-select) { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; text-align: left; }
body.dk #settings-screen .ios-row + .ios-row::before { left: 14px; }
body.dk #settings-screen .ios-row:has(> .ios-select) > .ios-row-top { flex: 1; min-width: 0; margin: 0; display: flex; justify-content: flex-start; text-align: left; }
body.dk #settings-screen .ios-row > .ios-select { width: auto; min-width: 200px; max-width: 280px; flex: none; margin: 0; }
body.dk #settings-screen .set-page { max-width: 760px; margin: 0 auto; }
body.dk #set-close { display: none; }

/* ---------- 快捷鍵說明 ---------- */
#dk-keysheet { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(28,22,18,.28); animation: dkk-in .14s ease; }
#dk-keysheet.hidden { display: none; }
.dkk-card { width: min(520px, 92vw); background: var(--card); border-radius: 16px; padding: 22px 24px 18px; box-shadow: var(--shadow-lg); }
.dkk-card h3 { margin: 0 0 14px; font-size: 17px; font-weight: 750; }
.dkk-card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.dkk-card dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--dk-hair); }
.dkk-card dt { display: flex; gap: 4px; order: 2; }
.dkk-card dd { margin: 0; font-size: 13px; color: var(--text); }
@keyframes dkk-in { from { opacity: 0; } }

/* 窄桌機:側邊欄收窄、迷你月曆讓位 */
@media (max-width: 1100px) {
  body.dk { --dk-side-w: 220px; }
  body.dk .top-view-switch button { padding: 5px 10px; }
}
@media (max-height: 760px) { body.dk .dk-sec-cal { display: none; } }
body.dk #settings-screen .set-page { padding-top: 28px; }
html.dark body.dk .dh-num.today { background: var(--action, var(--accent)); color: #fff; }

/* ---------- 群組(2026-10-08 Josh:「看不出行程屬於哪個群組」)---------- */
body.dk #cal-spaces { display: none !important; }   /* 桌機改由側邊欄「群組」列表承擔 */
.dk-sec-sp.hidden { display: none; }
.dk-spaces { display: flex; flex-direction: column; gap: 1px; }
.dk-sp { position: relative; display: flex; align-items: center; border-radius: 8px; }
.dk-sp:hover { background: var(--dk-hover); }
.dk-sp-tog {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border: 0;
  background: transparent; font-size: 13.5px; font-weight: 550; text-align: left; color: var(--text) !important;
}
.dk-sp-box {
  width: 16px; height: 16px; border-radius: 5px; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--c); background: transparent; transition: background var(--dur-fast) var(--ease-out);
}
.dk-sp-box svg { opacity: 0; }
.dk-sp.on .dk-sp-box { background: var(--c); }
.dk-sp.on .dk-sp-box svg { opacity: 1; }
.dk-sp:not(.on) .dk-sp-name { color: var(--dk-muted); }
.dk-sp-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-sp-cur { font-size: 11px; color: var(--dk-muted); font-weight: 600; }
.dk-sp-solo {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 22px; padding: 0 8px; border-radius: 6px;
  border: 0; background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 2px rgba(0,0,0,.08);
  font-size: 11.5px; font-weight: 650; color: var(--text) !important; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.dk-sp:hover .dk-sp-solo, .dk-sp-solo:focus-visible { opacity: 1; pointer-events: auto; }
.dk-sp:hover .dk-sp-cur { visibility: hidden; }

.dka-sp {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: 3px;
  font-size: 11.5px; font-weight: 650; color: var(--dk-muted);
}
.dka-sp::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--sc); }
/* 短行程(半小時內):一行放「標題 + 群組名」,時間收起(滑過看 title) */
body.dk .fc .fc-timegrid-event.ev-compact .fc-event-main-frame { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 5px; overflow: hidden; }
body.dk .fc .fc-timegrid-event.ev-compact .fc-event-time { display: none; }
body.dk .fc .fc-timegrid-event.ev-compact .fc-event-title-container { flex: 0 1 auto; min-width: 0; overflow: hidden; }
body.dk .fc .fc-timegrid-event.ev-compact .fc-event-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 2026-10-08 易用性修正(Josh:「側邊欄有沒有讓人困惑的地方?整站檢查」)===== */
/* 「在行事曆顯示」只管行事曆 → 只在行事曆頁出現,別的頁面不放一組沒作用的勾選框 */
/* 邀請:寫字,不再是意義不明的「+」 */
.dk-invite { width: auto !important; padding: 0 8px !important; gap: 4px; display: inline-flex !important; align-items: center; font-size: 12px; font-weight: 650; letter-spacing: 0; }
.dk-keys-btn { color: var(--dk-muted) !important; }
.dk-keys-btn:hover { color: var(--text) !important; }

/* 清單/家務:側邊欄點進去是一個「頁面」(填滿主區、側邊欄照常可點),不是蓋在行事曆上的浮窗 */
body.dk #lists-scrim { display: none !important; }
body.dk #lists-panel {
  top: 0; left: var(--dk-side-w); right: 0; bottom: 0; transform: none; width: auto; max-height: none; height: auto;
  border: 0; border-radius: 0; box-shadow: none; background: var(--card); z-index: 30; animation: none !important;
}
body.dk #lists-panel.closing { display: none; }
body.dk #lists-panel > * { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
body.dk #lists-panel .lists-titleband { background: transparent; border: 0; padding: 28px 24px 8px; }
body.dk #lists-panel .lists-logo, body.dk #lists-panel .lists-titletext p, body.dk #lists-panel .lists-footband { display: none; }
body.dk #lists-panel .lists-titletext h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
body.dk #lists-panel .panel-head { border: 0; padding: 8px 24px 12px; }
body.dk #lists-panel #lists-close { display: none; }   /* 頁面用側邊欄離開,不需要 ✕ */
body.dk #lists-panel .panel-body { padding-left: 24px; padding-right: 24px; }

/* 搜尋/新增(⌘K):桌面上是畫面上方置中的指令面板,不是手機的底部抽屜 */
body.dk #omni-sheet { align-items: flex-start; padding-top: 14vh; background: rgba(28,22,18,.22); }
body.dk #omni-sheet .sheet-card {
  width: min(600px, 92vw); border-radius: 16px; padding: 14px 14px 12px; box-shadow: var(--shadow-lg);
  animation: dk-pop .16s var(--ease-out) both;
}
body.dk #omni-sheet .sheet-grip { display: none; }
@keyframes dk-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* 行程詳情:高度跟著內容,不留一大片空白 */
body.dk #detail-modal .modal-card { height: auto !important; min-height: 0 !important; }
body.dk #detail-modal .modal-card > *:not(.modal-head):not(.modal-actions) { flex: 0 0 auto; }

/* 通知詢問:桌面放右下角,不擋行事曆中間 */
body.dk .notif-prompt { margin: 0 !important; left: auto !important; right: 20px; bottom: 20px !important; transform: none !important; max-width: 420px; }

/* 年檢視格子太小:不放群組標,避免變成一排看不懂的小圓 */
body.dk #lists-panel .panel-tabs { display: none; }
body.dk #lists-panel .panel-head { padding: 0; min-height: 0; border: 0; }

/* ===== 群組並列(2026-10-08 Josh:電腦版不需要切換群組)===== */
.dk-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.dk-brand b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.dk-brand b.wk-wm { font-size: 19px; font-weight: 900; letter-spacing: -0.02em; line-height: 1; }
.dk-sec-sp { position: relative; }
.dk-sp { display: block !important; border-radius: 10px; padding: 2px 0 6px; }
.dk-sp + .dk-sp { margin-top: 2px; }
.dk-sp-row { position: relative; display: flex; align-items: center; border-radius: 8px; }
.dk-sp-row:hover { background: var(--dk-hover); }
.dk-sp-tog.static { cursor: default; }
.dk-sp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; margin: 0 3px; }
.dk-sp-n { font-size: 12px; font-weight: 600; color: var(--dk-muted); margin-left: auto; padding-right: 2px; }
.dk-sp-acts {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 4px;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-out);
}
.dk-sp-row:hover .dk-sp-acts, .dk-sp-acts:focus-within { opacity: 1; pointer-events: auto; }
.dk-sp-row:hover .dk-sp-n { visibility: hidden; }
.dk-sp-act {
  height: 22px; padding: 0 8px; border-radius: 6px; border: 0; background: var(--card);
  box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 2px rgba(0,0,0,.08);
  font-size: 11.5px; font-weight: 650; color: var(--text) !important;
}
.dk-sp-act:hover { background: color-mix(in srgb, var(--text) 4%, var(--card)); }
.dk-sp:not(.on) .dk-sp-mems { opacity: .45; }
.dk-sp-mems { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 8px 0 34px; }
.dk-av-btn { border: 0; background: transparent; padding: 0; border-radius: 50%; line-height: 0; }
.dk-av-btn .dk-av { width: 26px; height: 26px; font-size: 10px; transition: transform var(--dur-fast) var(--ease-out); }
.dk-av-btn:hover .dk-av { transform: scale(1.08); }
.dk-av.me { box-shadow: 0 0 0 2px var(--dk-side-bg), 0 0 0 3.5px var(--c); }
.dk-menu {
  position: absolute; right: 2px; top: 26px; z-index: 40; min-width: 180px; padding: 5px; border-radius: 10px;
  background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair), var(--shadow-md); display: flex; flex-direction: column;
}
.dk-menu.hidden { display: none; }
.dk-menu button {
  border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 7px;
  font-size: 13px; font-weight: 550; color: var(--text) !important;
}
.dk-menu button:hover { background: var(--accent-soft); }

/* 家務/清單頁的群組分段標題 */
body.dk .dk-grp-h { display: flex; align-items: center; gap: 8px; margin: 18px 4px 8px; font-size: 13px; font-weight: 750; color: var(--text); }
body.dk .dk-grp-h:first-child { margin-top: 4px; }
body.dk .dk-grp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
body.dk .dk-grp-empty { padding: 12px 14px; color: var(--dk-muted); font-size: 13px; }

/* ---------- 語言按鈕(側邊欄底部) ---------- */
.dk-side-foot { position: relative; }
.dk-lang-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; font-size: 12.5px; font-weight: 600; color: var(--dk-muted) !important; white-space: nowrap;
}
.dk-lang-btn:hover { background: var(--dk-hover); color: var(--text) !important; }
.dk-lang-menu { top: auto; bottom: 40px; right: 40px; min-width: 170px; }
.dk-lang-menu button { display: flex; align-items: center; justify-content: space-between; }
.dk-lang-menu button b { color: var(--accent); font-weight: 800; }

/* ---------- 今天面板:置頂、下一個重要日子 ---------- */
.dka-sec { margin: 0 0 14px; }
.dka-sec-h { display: flex; align-items: center; gap: 5px; padding: 0 4px 6px; font-size: 12px; font-weight: 750; color: var(--accent); }
.dka-pin {
  display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; margin-bottom: 6px; border: 0; border-radius: 10px;
  text-align: left; cursor: pointer; font-family: inherit;
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  box-shadow: inset 3px 0 0 var(--c), 0 0 0 0.5px color-mix(in srgb, var(--accent) 22%, transparent);
}
.dka-pin:hover { background: color-mix(in srgb, var(--accent) 11%, var(--card)); }
.dka-sp-in { display: inline-flex; align-items: center; gap: 4px; }
.dka-sp-in::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--sc); }
.dka-next {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; margin: 0 0 18px; border: 0; border-radius: 12px;
  text-align: left; cursor: pointer; font-family: inherit; background: var(--card);
  box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 2px rgba(42,36,32,.05);
}
.dka-next:hover { box-shadow: 0 0 0 0.5px var(--dk-hair), 0 4px 12px rgba(42,36,32,.08); }
.dka-next-n {
  flex: none; width: 52px; height: 52px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--card)); color: var(--accent); line-height: 1;
}
.dka-next-n b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dka-next-n small { font-size: 10.5px; font-weight: 700; margin-top: 3px; }
.dka-kicker2 { font-size: 11.5px; font-weight: 700; color: var(--dk-muted); }

/* ===== iOS 群組色條語言(2026-10-08 Josh:「沿用 iOS 的色條概念」)=====
   對齊 iOS TimeGridView EventBlock:左緣 4pt 群組色直條(圓角 1.5、被色塊圓角裁切),內容內縮 4pt;
   塊內寫群組名(白底小標,文字=群組色加深,同 iOS spaceTextColor)。只在 >1 個群組顯示時出現(同 iOS spaceStripColor)。 */
body.dk .fc .fc-event.sp-strip { position: relative; overflow: hidden; border-left: 0 !important; }
body.dk .fc .fc-event.sp-strip::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 1.5px;
  background: var(--sp-c); z-index: 2; pointer-events: none;
}
body.dk .fc .fc-timegrid-event.sp-strip .fc-event-main,
body.dk .fc .fc-daygrid-block-event.sp-strip .fc-event-main { padding-left: 4px; }
body.dk .fc tr.fc-event.sp-strip td:first-child { box-shadow: inset 4px 0 0 var(--sp-c); }
body.dk .fc .ev-sp {
  display: inline-flex; align-items: center; max-width: 7em; margin-right: 5px; padding: 0 6px; border-radius: 999px;
  vertical-align: 1px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; flex: none;
  font-size: 10.5px; font-weight: 700; line-height: 15px;
  background: rgba(255,255,255,.92); color: color-mix(in srgb, var(--sp-c) 58%, #000);
}
body.dk .fc .fc-timegrid-event:not(.ev-compact) .ev-sp { display: flex; width: fit-content; margin: 1px 0 3px; }
body.dk .fc .fc-daygrid-event .ev-sp, body.dk .fc .fc-multimonth .ev-sp { display: none; }   /* 月、年色條太窄:只留左緣群組色條 */
body.dk .fc .fc-list-event .ev-sp { background: color-mix(in srgb, var(--sp-c) 12%, var(--card)); }

/* 右側置頂/今天列:iOS FamilyDayView 列的元素——左緣 5.5pt 圓角群組色條 + 行程色點 + 右側群組標 */
.dka-row { align-items: center; gap: 10px; padding: 9px 10px; }
.dka-row .dka-bar { display: none; }
.dka-strip { flex: none; align-self: stretch; width: 5.5px; min-height: 26px; border-radius: 2.25px; background: var(--sc); }
.dka-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.dka-row .dka-main { flex: 1; }
.dka-tag {
  flex: none; max-width: 7em; padding: 1px 6px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 11px; font-weight: 650; color: color-mix(in srgb, var(--sc) 58%, #000); background: color-mix(in srgb, var(--sc) 12%, transparent);
}
html.dark .dka-tag { color: color-mix(in srgb, var(--sc) 60%, #fff); }
html.dark body.dk .fc .ev-sp { background: rgba(255,255,255,.92); }
.dka-row.pinned { background: color-mix(in srgb, var(--accent) 7%, var(--card)); margin-bottom: 6px; }
.dka-row.live { box-shadow: 0 0 0 1.5px var(--c), 0 4px 12px rgba(42,36,32,.08); }

/* 農曆小字(對齊 iOS 月格:國曆數字旁灰色小字,不另佔事件列) */
body.dk .fc .dk-lunar { font-size: 10.5px; font-weight: 600; color: var(--dk-muted); letter-spacing: 0; }
body.dk .fc .dk-lunar.mon, body.dk .fc .dk-lunar.fest { color: var(--accent); }
body.dk .fc .fc-daygrid-day-top { align-items: baseline; gap: 4px; }
body.dk .fc .fc-daygrid-day-top .dk-lunar { padding-top: 7px; }
body.dk .fc .dh .dk-lunar { display: block; margin-top: 1px; }

/* 國定假日寫在欄頭(日期與農曆下方);時間格檢視的整天列不再放假日色條,只留待辦與整天行程 */
body.dk .fc .dh .dk-hol {
  display: block; max-width: 100%; margin-top: 3px; padding: 1px 6px; border-radius: 5px;
  font-size: 11px; font-weight: 700; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--danger); background: var(--danger-soft);
}
body.dk .fc .fc-timegrid .fc-daygrid-event-harness:has(> .ev-holiday) { display: none; }

/* ===== 新增/編輯行程視窗(電腦版重新設計 2026-10-08)=====
   左欄:時間、重複、提醒、地點、備註;右欄(淡底面板):群組、誰看得到、顏色。
   標題是大字無框輸入;行程/待辦切換縮進標題列;下拉選單統一高度(Safari 原生 select 會縮成一條細線)。 */
body.dk #event-modal.dk-ev .modal-card { width: min(920px, 94vw); max-height: 90vh; padding: 0; gap: 0; }
body.dk #event-modal.dk-ev .ev-modal-pin { margin: 0; border-radius: 16px 16px 0 0; }
body.dk #event-modal.dk-ev #ev-live-preview { display: none; }
body.dk #event-modal.dk-ev .modal-head { display: flex; align-items: center; gap: 14px; padding: 16px 20px 14px; border-bottom: 1px solid var(--dk-hair); }
body.dk #event-modal.dk-ev .modal-head h3 { flex: 1; margin: 0; font-size: 18px !important; font-weight: 800 !important; }
body.dk #event-modal.dk-ev #ev-mode-seg { width: auto; margin: 0; padding: 2px; border-radius: 9px; background: color-mix(in srgb, var(--text) 6%, transparent); }
body.dk #event-modal.dk-ev #ev-mode-seg button { padding: 5px 16px; font-size: 13px; border-radius: 7px; min-height: 0; }
body.dk #event-modal.dk-ev .ev-modal-scroll { display: flex !important; flex-direction: column; gap: 0; padding: 0; overflow-y: auto; }
body.dk #event-modal.dk-ev .ev-modal-scroll > .title-input {
  margin: 18px 22px 6px; min-height: 0; padding: 4px 0; border: 0 !important; box-shadow: none !important; background: transparent !important;
  border-radius: 0; font-size: 24px !important; font-weight: 800 !important; letter-spacing: -0.01em;
}
body.dk #event-modal.dk-ev .ev-modal-scroll > .title-input::placeholder { color: color-mix(in srgb, var(--text) 30%, transparent); }
body.dk #event-modal.dk-ev .ev-modal-scroll > #ev-todo-fields { margin: 6px 22px 18px; }
body.dk #event-modal.dk-ev .dk-ev-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); border-top: 1px solid var(--dk-hair); min-height: 0; }
body.dk #event-modal.dk-ev .dk-ev-main { display: flex; flex-direction: column; gap: 16px; padding: 18px 22px 22px; min-width: 0; }
body.dk #event-modal.dk-ev .dk-ev-side {
  display: flex; flex-direction: column; gap: 16px; padding: 18px 20px 22px; min-width: 0;
  background: color-mix(in srgb, var(--bg) 60%, var(--card)); border-left: 1px solid var(--dk-hair);
}
body.dk #event-modal.dk-ev .dk-ev-time { display: flex; flex-direction: column; gap: 10px; }
body.dk #event-modal.dk-ev .dk-ev-time .check-row { margin: 0; font-size: 13.5px; }
body.dk #event-modal.dk-ev .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* 欄位小標:一致的 12px 灰字 */
body.dk #event-modal.dk-ev .field > span, body.dk #event-modal.dk-ev .field-label {
  font-size: 12px !important; font-weight: 700 !important; color: var(--dk-muted) !important; letter-spacing: 0;
}
/* 輸入盒/下拉:統一 40px、自訂箭頭(不吃 Safari 原生樣式) */
body.dk #event-modal.dk-ev select, body.dk #event-modal.dk-ev input[type="date"], body.dk #event-modal.dk-ev #ev-location, body.dk #event-modal.dk-ev textarea {
  -webkit-appearance: none; appearance: none; width: 100%; min-height: 40px; height: 40px; padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--text) 13%, transparent) !important; border-radius: 10px !important;
  background-color: var(--card); box-shadow: none !important; font: inherit; font-size: 14px; font-weight: 550 !important; color: var(--text);
}
body.dk #event-modal.dk-ev select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8078' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
body.dk #event-modal.dk-ev textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
body.dk #event-modal.dk-ev select:focus, body.dk #event-modal.dk-ev input:focus, body.dk #event-modal.dk-ev textarea:focus {
  outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important;
}
body.dk #event-modal.dk-ev .dt-chip {
  min-height: 44px; border: 1px solid color-mix(in srgb, var(--text) 13%, transparent) !important; border-radius: 10px !important;
  box-shadow: none !important; padding: 0 12px; font-size: 14px; font-weight: 600 !important;
}
body.dk #event-modal.dk-ev .dt-chip:hover { border-color: color-mix(in srgb, var(--text) 25%, transparent) !important; }
.ev-yearly-note { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
/* 右欄的選擇鈕(群組、誰看得到):緊湊藥丸、選中=實心淡底 */
body.dk #event-modal.dk-ev .dk-ev-side .member-pick { gap: 6px; }
body.dk #event-modal.dk-ev .dk-ev-side .member-chip { height: 30px; padding: 0 11px; font-size: 13px; }
/* 顏色:較小的色點、緊湊排列;已命名的顏色維持藥丸 */
body.dk #event-modal.dk-ev .ev-color-row { gap: 7px; }
body.dk #event-modal.dk-ev .ev-color-row > button:not([class*="named"]):not(.ev-col-named) { width: 26px; height: 26px; }
body.dk #event-modal.dk-ev .ai-note { font-size: 12px; margin-top: -8px; }
/* 按鈕列 */
body.dk #event-modal.dk-ev .ev-modal-scroll > .modal-actions {
  position: sticky; bottom: 0; margin: 0 !important; padding: 12px 20px !important; border-radius: 0 0 16px 16px;
  border-top: 1px solid var(--dk-hair); background: var(--card) !important;
}
body.dk #event-modal.dk-ev .modal-actions .btn { height: 36px; border-radius: 9px; font-weight: 650; box-shadow: none; }
body.dk #event-modal.dk-ev .modal-actions .btn.primary { background: var(--action, var(--accent)); border-color: transparent; padding: 0 22px; }
body.dk #event-modal.dk-ev .ev-modal-scroll > .title-input, body.dk #event-modal.dk-ev .ev-modal-scroll > #ev-todo-fields { width: auto !important; max-width: none; align-self: stretch; }
body.dk #event-modal.dk-ev .ev-modal-scroll { overflow-x: hidden; }
body.dk #event-modal.dk-ev .dt-chip { display: flex; align-items: center; justify-content: space-between; }

/* ===== 清單頁(電腦版):左欄清單、右欄內容 ===== */
body.dk #lists-panel > * { max-width: 1100px; }
body.dk #lists-panel #tab-lists:not(.hidden) {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; overflow: hidden; padding-bottom: 24px;
}
body.dk #lists-panel #lists-home { display: flex !important; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; max-height: calc(100vh - 120px); }
body.dk #lists-panel #list-detail { display: flex !important; flex-direction: column; gap: 12px; min-width: 0; animation: none !important;
  background: var(--card); border-radius: 16px; box-shadow: 0 0 0 0.5px var(--dk-hair), 0 2px 10px rgba(42,36,32,.06); padding: 18px 20px; max-height: calc(100vh - 120px); overflow-y: auto; }
body.dk.dk-ld-empty #lists-panel #list-detail { visibility: hidden; }
body.dk #lists-panel #ld-back { display: none; }
body.dk #lists-panel .ld-head { justify-content: flex-start; gap: 10px; padding: 0 0 6px; border-bottom: 1px solid var(--dk-hair); }
body.dk #lists-panel #ld-title { flex: 1; text-align: left; font-size: 22px; font-weight: 800; margin: 0; }
/* 左欄清單列:卡片式、選中=白底+陰影 */
body.dk #lists-panel #lists-rows .lp-card { background: transparent; border: 0; box-shadow: none; display: flex; flex-direction: column; gap: 4px; padding: 0; }
body.dk #lists-panel #lists-rows .lrow { border-radius: 10px; border: 0; background: transparent; }
body.dk #lists-panel #lists-rows .lrow .item-face { padding: 10px 12px; border-radius: 10px; background: transparent; border: 0; }
body.dk #lists-panel #lists-rows .lrow:hover .item-face { background: var(--dk-hover); }
body.dk #lists-panel #lists-rows .lrow.dk-on .item-face { background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 3px rgba(42,36,32,.08); }
body.dk #lists-panel #lists-rows .lrow .lrow-emoji {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 18px;
  background: color-mix(in srgb, var(--accent) 9%, var(--card)); flex: none;
}
body.dk #lists-panel #lists-rows .lrow .item-name { font-weight: 650; font-size: calc(14.5px * var(--text-scale)); }
body.dk #lists-panel #lists-rows .lrow-chev { display: none; }
body.dk #lists-panel #lists-rows .lrow-add {
  margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--text) 16%, transparent);
  background: transparent; color: var(--dk-muted); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer;
}
body.dk #lists-panel #lists-rows .lrow-add:hover { background: var(--card); color: var(--text); }
/* 右欄項目 */
body.dk #lists-panel #list-items .lp-card { border: 0; box-shadow: none; background: transparent; }
body.dk #lists-panel #list-items .item-row { border: 0; border-bottom: 1px solid var(--dk-hair); border-radius: 0; background: transparent; }
body.dk #lists-panel #list-items .item-row .item-face { padding: 11px 4px; background: transparent; }
body.dk #lists-panel #list-items .item-row:hover .item-face { background: color-mix(in srgb, var(--text) 3%, transparent); }
body.dk #lists-panel #item-add-form { margin-top: 4px; }
body.dk #lists-panel #item-add {
  height: 42px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--text) 13%, transparent); background: var(--card); padding: 0 12px; font: inherit; font-size: 14px;
}
body.dk #lists-panel #item-add:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===== 家務頁(電腦版):兩欄卡片 ===== */
body.dk #lists-panel #tab-chores:not(.hidden) { padding-bottom: 32px; }
body.dk #lists-panel #chore-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
body.dk #lists-panel #chore-list > .dk-grp-h, body.dk #lists-panel #chore-list > .up-empty, body.dk #lists-panel #chore-list > .dk-grp-empty, body.dk #lists-panel #chore-list > .echo-strip, body.dk #lists-panel #chore-list > :not(.chore-row) { grid-column: 1 / -1; }
body.dk #lists-panel .chore-row { border: 0; border-radius: 14px; background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 3px rgba(42,36,32,.06); overflow: hidden; }
body.dk #lists-panel .chore-row .chore-face { padding: 14px 16px; gap: 14px; background: transparent; align-items: center; }
body.dk #lists-panel .chore-row .chore-name { font-size: calc(15px * var(--text-scale)); font-weight: 700; }
body.dk #lists-panel .chore-row .chore-sub { font-size: calc(12.5px * var(--text-scale)); margin-top: 3px; }
body.dk #lists-panel .chore-row .btn { height: 34px; padding: 0 16px; border-radius: 9px; font-size: 13px; font-weight: 650; box-shadow: none; }
body.dk #lists-panel .chore-row .chore-done-btn:not(.is-done) { background: var(--action, var(--accent)); color: #fff; border-color: transparent; }
body.dk #lists-panel .chore-row .chore-done-btn.is-done { background: color-mix(in srgb, #2F9E44 12%, var(--card)); color: #2b7a3b; border-color: transparent; }
body.dk #lists-panel #add-chore {
  width: auto !important; margin-top: 16px; height: 38px; padding: 0 18px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--text) 18%, transparent);
  background: transparent; color: var(--text); font-weight: 650; box-shadow: none;
}
body.dk #lists-panel #add-chore:hover { background: var(--card); }
/* 清單:群組 chips 在電腦版收起(全部群組直接分段列出);列的滑動編輯/刪除鈕在電腦版不常駐 */
body.dk #lists-panel #lists-spaces { display: none !important; }
body.dk #lists-panel #lists-rows .dk-grp-h { margin: 14px 6px 4px; font-size: 12px; color: var(--dk-muted); }
body.dk #lists-panel #lists-rows .dk-grp-h:first-child { margin-top: 0; }
body.dk #lists-panel #lists-rows .item-swipe-edit, body.dk #lists-panel #lists-rows .item-swipe-del { display: none !important; }
body.dk #lists-panel #lists-rows .lrow-x { box-shadow: none; }
body.dk #lists-panel #lists-rows .lrow .fh-td-space { display: none; }
body.dk #lists-panel #list-items .item-swipe-edit { display: none !important; }
body.dk #lists-panel #list-items .item-row .item-swipe-del { opacity: 0; transition: opacity var(--dur-fast) var(--ease-out); }
body.dk #lists-panel #list-items .item-row:hover .item-swipe-del { opacity: 1; }

/* ===== 待辦頁(電腦版):單欄、像提醒事項 ===== */
body.dk.desk-todo .td-wrap { max-width: 760px !important; margin: 0 auto !important; padding: 36px 32px 48px !important; }
body.dk.desk-todo .td-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 4px 16px; padding-bottom: 14px; }
body.dk.desk-todo .td-head .td-h1 { flex: 1; margin: 0; font-size: 30px !important; font-weight: 800; display: flex; align-items: baseline; gap: 10px; }
body.dk.desk-todo .td-head .td-note { order: 3; flex-basis: 100%; margin: 0; font-size: 13px; color: var(--dk-muted); }
.dk-td-n { font-size: 15px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }
body.dk.desk-todo .td-head .dk-td-new {
  width: auto; margin: 0; height: 36px; padding: 0 16px; border-radius: 9px; border: 0; background: var(--action, var(--accent)) !important;
  color: #fff !important; font-size: 13.5px; font-weight: 650; cursor: pointer;
}
body.dk.desk-todo .td-desk { display: block !important; }
body.dk.desk-todo .td-col-lists { display: none !important; }
body.dk.desk-todo .td-col .fh-sec-h { display: none; }
body.dk.desk-todo .td-col .ios-card { border-radius: 14px; box-shadow: 0 0 0 0.5px var(--dk-hair), 0 2px 10px rgba(42,36,32,.05) !important; overflow: hidden; }
body.dk.desk-todo .fh-td { min-height: 52px; padding-left: 16px !important; }
body.dk.desk-todo .fh-td-title { font-size: calc(15px * var(--text-scale)); }
body.dk.desk-todo .fh-due { font-size: calc(12px * var(--text-scale)); font-weight: 650; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--text) 6%, transparent); }
body.dk.desk-todo .fh-td-add { min-height: 52px; padding-left: 16px !important; }
body.dk.desk-todo .fh-td-input { font-size: calc(15px * var(--text-scale)); }
body.dk.desk-todo .td-empty { display: none; }
body.dk #lists-panel #lists-rows .lrow-x, body.dk #lists-panel #lists-rows .lrow-x .item-face { border-left: 0 !important; box-shadow: none; }
body.dk #lists-panel #lists-rows .lrow-x.dk-on .item-face { box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 3px rgba(42,36,32,.08); }
body.dk #lists-panel #lists-rows .lrow + .lrow, body.dk #lists-panel #lists-rows .lrow { border-top: 0 !important; }
body.dk #lists-panel #lists-rows .lrow::before, body.dk #lists-panel #lists-rows .lrow::after { display: none !important; }
body.dk #lists-panel .ld-head h3, body.dk #lists-panel #ld-title { text-align: left !important; justify-content: flex-start; margin-right: auto !important; }
body.dk #lists-panel .ld-head { display: flex !important; align-items: center; }
body.dk #lists-panel #lists-rows .lp-card > * { border-top: 0 !important; }

/* 重要日子詳情卡 */
#dk-imp .dk-imp-card { width: min(440px, 92vw); }
#dk-imp .modal-head h3 { display: flex; align-items: center; gap: 8px; }
.dk-imp-emoji { font-size: 22px; }
.dk-imp-body { display: flex; align-items: center; gap: 16px; padding: 16px 2px 8px; }
.dk-imp-big {
  flex: none; width: 76px; height: 76px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--card)); color: var(--accent); line-height: 1;
}
.dk-imp-big b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dk-imp-big small { font-size: 12px; font-weight: 700; margin-top: 4px; }
.dk-imp-lines { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dk-imp-date { font-size: 15px; font-weight: 700; color: var(--text); }
.dk-imp-age { font-size: 14px; color: var(--text); }
.dk-imp-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ===== 首頁(登入頁)2026-10-08 重新設計:左=暖色漸層品牌面板+產品示意,右=乾淨的登入欄 =====
   只在 ≥900px;手機版登入頁(對齊 iOS AuthView)一條都不套。所有 auth 元素 ID/接線不變。 */
.auth-welcome, .auth-feats, .auth-mock { display: none; }
@media (min-width: 900px) {
  #auth-gate.key-gate { background: var(--card) !important; }
  #auth-gate .auth-split {
    grid-template-columns: minmax(0, 1.12fr) minmax(400px, 0.88fr); gap: 0; max-width: none; padding: 0; min-height: 100dvh;
  }
  /* 左:品牌面板 */
  #auth-gate .auth-hero {
    position: relative; overflow: hidden; align-self: stretch; margin: 14px 0 14px 14px; border-radius: 28px;
    padding: 64px 56px 0; display: flex; flex-direction: column;
    background:
      radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--brand) 26%, transparent) 0%, transparent 55%),
      radial-gradient(90% 70% at 100% 100%, color-mix(in srgb, #F6B26B 30%, transparent) 0%, transparent 60%),
      linear-gradient(160deg, #FFF4EE 0%, #FCE6DE 55%, #F9DCCF 100%);
  }
  html.dark #auth-gate .auth-hero { background: radial-gradient(120% 80% at 0% 0%, rgba(237,120,104,.28), transparent 55%), linear-gradient(160deg, #2a201d, #1d1715); }
  #auth-gate .auth-hero::after {   /* 細格線質感 */
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
    background-image: linear-gradient(rgba(53,39,34,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(53,39,34,.05) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: linear-gradient(180deg, #000 0%, transparent 75%);
  }
  #auth-gate .auth-hero > * { position: relative; z-index: 1; }
  #auth-gate .auth-hero-brand.ob-wordmark { font-size: 28px; }
  #auth-gate .auth-hero-title { margin-top: 40px; font-size: clamp(38px, 3.6vw, 56px); line-height: 1.08; letter-spacing: -0.03em; max-width: 640px; }
  #auth-gate .auth-hero-sub { font-size: 18px; max-width: 520px; color: color-mix(in srgb, var(--text) 68%, transparent); }
  /* 斷行:各行長度平均;中日韓不在詞中間斷(只在標點、空白處換行),太窄時才退回任意斷 */
  #auth-gate :is(.auth-hero-title, .auth-hero-sub, .auth-panel h1, .auth-panel h2, .auth-panel p) { text-wrap: balance; }
  #auth-gate :is(.auth-hero-title, .auth-hero-sub) { white-space: pre-line; }
  #auth-gate .auth-hero-title:lang(ja) { font-size: clamp(32px, 3.1vw, 48px); max-width: 680px; }   /* 日文第一行 13 字要放得下,才能在「、」後換行 */   /* 譯文可用 \n 指定最佳斷點(日文) */
  #auth-gate :is(.auth-hero-title, .auth-hero-sub, .auth-panel h1, .auth-panel h2, .auth-panel p):is(:lang(zh), :lang(ja), :lang(ko)) { word-break: keep-all; overflow-wrap: anywhere; }
  #auth-gate .auth-preview { display: none; }
  .auth-feats { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
  .auth-feats li {
    display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px;
    background: rgba(255,255,255,.72); backdrop-filter: blur(8px); box-shadow: 0 0 0 1px rgba(53,39,34,.06);
    font-size: 13.5px; font-weight: 650; color: var(--text);
  }
  html.dark .auth-feats li { background: rgba(255,255,255,.08); }
  .af-ic { font-size: 15px; }
  /* 產品示意:Mac 視窗 + 浮動卡 */
  .auth-mock { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 280px; position: relative; padding-top: 36px; }
  /* 產品實拍(示範資料,各語言一張 hero/app-{lang}.webp,原圖 1024×922):放在 Mac 視窗框裡,
     填滿標題下方剩下的高度、貼齊面板底部;螢幕矮就從下面裁,螢幕高就多露幾週 */
  .am-win {
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; border-radius: 14px 14px 0 0; overflow: hidden;
    background: #FCFAF7; box-shadow: 0 30px 80px rgba(80,40,30,.22), 0 0 0 1px rgba(53,39,34,.08);
  }
  html.dark .am-win { background: #1f1b19; }
  .am-bar { height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid rgba(53,39,34,.07); background: #fff; }
  html.dark .am-bar { background: #26201d; }
  .am-bar i { width: 10px; height: 10px; border-radius: 50%; background: #FF5F57; }
  .am-bar i:nth-child(2) { background: #FEBC2E; } .am-bar i:nth-child(3) { background: #28C840; }
  .am-bar-t { margin-left: 18px; width: 120px; height: 8px; border-radius: 5px; background: rgba(53,39,34,.12); }
  .am-shot { display: block; flex: 1 1 auto; min-height: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
  /* 右:登入欄(不再是一張卡,直接置中一欄) */
  #auth-gate .modal-card.key-card.auth-panel {
    align-self: center; justify-self: center; width: min(400px, 100%) !important; max-height: none;
    background: transparent !important; border: 0; box-shadow: none; padding: 40px 8px; gap: 12px; display: flex; flex-direction: column;
  }
  #auth-gate .auth-panel .auth-panel-mark { display: none; }
  .auth-welcome { display: block; margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
  #auth-gate .auth-panel .gate-tagline { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
  /* 社群登入放上面(多數人用這個),Email 放下面 */
  #auth-gate .auth-panel > .auth-welcome { order: 1; } #auth-gate .auth-panel > .gate-tagline { order: 2; }
  #auth-gate .auth-panel > #auth-apple { order: 3; } #auth-gate .auth-panel > #gsi-btn { order: 4; } #auth-gate .auth-panel > #auth-google { order: 4; }
  #auth-gate .auth-panel > .gate-or { order: 5; margin: 8px 0; }
  #auth-gate .auth-panel > .login-fields { order: 6; } #auth-gate .auth-panel > #key-gate-error { order: 7; }
  #auth-gate .auth-panel > #auth-login { order: 8; } #auth-gate .auth-panel > #auth-signup { order: 9; } #auth-gate .auth-panel > #auth-forgot { order: 10; }
  #auth-gate .auth-panel #auth-apple { height: 48px; border-radius: 12px !important; font-size: 15px; font-weight: 650; }
  #auth-gate .auth-panel .login-fields { gap: 10px; }
  #auth-gate .auth-panel .login-fields input {
    height: 48px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); box-shadow: none; font-size: 15px; padding: 0 14px;
  }
  #auth-gate .auth-panel .login-fields input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
  #auth-gate .auth-panel #auth-login { height: 48px; border-radius: 12px; font-size: 15px; font-weight: 700; margin-top: 2px; }
  #auth-gate .gate-lang-wrap { top: 22px; right: 26px; }
}

/* ===== 連續捲動的月檢視 ===== */
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-frame { min-height: 128px; }
body.dk .fc .fc-dayGridScroll-view .fc-col-header-cell-cushion { font-size: 12px; font-weight: 650; color: var(--dk-muted); padding: 8px 4px; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-number { font-size: 13px; font-weight: 600; padding: 6px 8px; color: var(--text); }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day.dk-mo-odd { background: color-mix(in srgb, var(--text) 2.2%, transparent); }
body.dk .fc .fc-dayGridScroll-view .fc-day-today { background: color-mix(in srgb, var(--accent) 5%, transparent) !important; }
body.dk .fc .fc-dayGridScroll-view .fc-day-today .fc-daygrid-day-number {
  background: var(--action, var(--accent)); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; margin: 4px 6px; display: grid; place-items: center;
}
body.dk .fc .fc-dayGridScroll-view .dk-mo-label { font-weight: 800; color: var(--accent); margin-right: 2px; }
body.dk .fc .fc-dayGridScroll-view .fc-day-today .dk-mo-label { color: #fff; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top { align-items: baseline; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top .dk-lunar { padding-top: 7px; }
body.dk .fc .fc-dayGridScroll-view .fc-scroller { scroll-behavior: auto; }

/* ===== 年檢視(熱度圖)===== */
body.dk.dk-year #calendar { position: relative; }
body.dk.dk-year #calendar > :not(#dk-year) { visibility: hidden; }
#dk-year { position: absolute; inset: 0; z-index: 5; overflow-y: auto; padding: 18px 26px 28px; background: var(--card); }
.yr-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.yr-sum { display: flex; align-items: baseline; gap: 10px; }
.yr-sum b { font-size: 20px; font-weight: 800; color: var(--text); }
.yr-sum span { font-size: 13px; color: var(--dk-muted); font-weight: 600; }
.yr-legend { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--dk-muted); }
.yr-legend span { margin: 0 4px; }
.yr-legend i { width: 13px; height: 13px; border-radius: 4px; }
.yr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 26px; }
@media (max-width: 1250px) { .yr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.yr-m { min-width: 0; }
.yr-mh {
  display: flex; align-items: baseline; justify-content: space-between; width: 100%; padding: 4px 4px 6px; border: 0; background: transparent;
  cursor: pointer; font-family: inherit; border-radius: 8px;
}
.yr-mh:hover { background: var(--dk-hover); }
.yr-mh b { font-size: 15px; font-weight: 800; color: var(--text); }
.yr-m.cur .yr-mh b { color: var(--accent); }
.yr-mh span { font-size: 11.5px; color: var(--dk-muted); font-weight: 600; }
.yr-wd, .yr-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.yr-wd span { text-align: center; font-size: 10.5px; font-weight: 600; color: var(--dk-muted); padding-bottom: 2px; }
.yr-d {
  position: relative; aspect-ratio: 1 / 1; min-height: 26px; border: 0; border-radius: 7px; padding: 0; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; background: transparent;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.yr-d.o { cursor: default; }
.yr-d:not(.o):hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(42,36,32,.18); z-index: 2; }
.yr-d.we { color: color-mix(in srgb, var(--text) 62%, transparent); }
.yr-d.h { color: var(--danger); font-weight: 750; }
/* 熱度:0 無底、1 淡、2–3 中、4–5 深、6+ 最深(用品牌色) */
.yr-d.l1, .yr-legend .l1 { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.yr-d.l2, .yr-legend .l2 { background: color-mix(in srgb, var(--accent) 34%, transparent); }
.yr-d.l3, .yr-legend .l3 { background: color-mix(in srgb, var(--accent) 58%, transparent); color: #fff; }
.yr-d.l4, .yr-legend .l4 { background: color-mix(in srgb, var(--accent) 85%, #000 0%); color: #fff; }
.yr-legend .l0 { background: color-mix(in srgb, var(--text) 6%, transparent); }
.yr-d.t { box-shadow: 0 0 0 2px var(--text); }
.yr-d.imp::after { content: ''; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: #8E24AA; box-shadow: 0 0 0 1.5px var(--card); }
#dk-yr-tip {
  position: fixed; z-index: 95; width: 250px; padding: 10px 12px; border-radius: 12px; pointer-events: none;
  background: var(--card); box-shadow: 0 0 0 0.5px var(--dk-hair, rgba(0,0,0,.1)), 0 12px 32px rgba(42,36,32,.18);
  opacity: 0; transform: translateY(-4px); transition: opacity .12s ease, transform .12s ease;
}
#dk-yr-tip.on { opacity: 1; transform: none; }
.yt-h { font-size: 13px; font-weight: 750; color: var(--text); margin-bottom: 6px; }
.yt-hol { color: var(--danger); }
.yt-r { display: flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 3px 0; color: var(--text); }
.yt-r i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.yt-r span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-r em { font-style: normal; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.yt-empty, .yt-more { font-size: 12px; color: var(--muted); }

/* 捲動月:拿掉日期格的直線,只留週與週之間的淡橫線;月界=圓角階梯線(同手機) */
body.dk .fc .fc-dayGridScroll-view td, body.dk .fc .fc-dayGridScroll-view th { border-left-color: transparent !important; border-right-color: transparent !important; }
body.dk .fc .fc-dayGridScroll-view .fc-scrollgrid { border: 0 !important; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day { position: relative; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day.dk-mo-odd { background: transparent; }
body.dk .fc .fc-dayGridScroll-view .mb-top::before,
body.dk .fc .fc-dayGridScroll-view .mb-corner::before,
body.dk .fc .fc-dayGridScroll-view .mb-corner::after,
body.dk .fc .fc-dayGridScroll-view .mb-bottom::after {
  content: ''; position: absolute; pointer-events: none; z-index: 8; border: 0 solid color-mix(in srgb, var(--accent) 70%, transparent);
}
body.dk .fc .fc-dayGridScroll-view .mb-top::before { left: -1px; right: -1px; top: -1px; border-top-width: 2px; }
/* 1 號那格一次畫完整段直線(上方左上圓角、下方右下圓角),上下兩段不再分屬兩格 → Safari 也不會錯開 */
body.dk .fc .fc-dayGridScroll-view .mb-corner::before { left: -1px; right: -1px; top: -1px; bottom: 9px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 10px; }
body.dk .fc .fc-dayGridScroll-view .mb-corner::after { left: -11px; bottom: -1px; width: 12px; height: 12px; border-right-width: 2px; border-bottom-width: 2px; border-bottom-right-radius: 10px; }
body.dk .fc .fc-dayGridScroll-view .mb-bottom::after { left: -1px; right: -1px; bottom: -1px; border-bottom-width: 2px; }
body.dk .fc .fc-dayGridScroll-view .mb-bottom.mb-elbow::after { right: 10px; }
body.dk .fc .fc-dayGridScroll-view .fc-day-sat, body.dk .fc .fc-dayGridScroll-view .fc-day-sun { background-color: transparent !important; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-frame { border: 0; }

/* 行程顏色(電腦版):分類兩欄清單 + 色盤 10 欄整齊格 */
body.dk #event-modal.dk-ev .ev-color-row { display: flex !important; flex-direction: column !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 14px; }
body.dk #event-modal.dk-ev .dkc-sec { width: 100%; }
body.dk #event-modal.dk-ev .dkc-h { font-size: 11.5px; font-weight: 700; color: var(--dk-muted); margin-bottom: 7px; }
body.dk #event-modal.dk-ev .dkc-named .dkc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
body.dk #event-modal.dk-ev .dkc-named .ev-named {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; margin: 0; border-radius: 9px;
  border: 1px solid transparent; background: color-mix(in srgb, var(--text) 4%, transparent);
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: none;
}
body.dk #event-modal.dk-ev .dkc-named .ev-named:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
body.dk #event-modal.dk-ev .dkc-named .ev-named.on { background: var(--card); border-color: var(--text); }
body.dk #event-modal.dk-ev .dkc-named .ev-named .cdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
body.dk #event-modal.dk-ev .dkc-swatches .dkc-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
body.dk #event-modal.dk-ev .dkc-swatches .ev-sw {
  width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 30px; margin: 0; border: 0; border-radius: 50%; cursor: pointer; position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); transition: transform var(--dur-fast) var(--ease-out);
}
body.dk #event-modal.dk-ev .dkc-swatches .ev-sw:hover { transform: scale(1.1); }
body.dk #event-modal.dk-ev .dkc-swatches .ev-sw.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }
body.dk #event-modal.dk-ev .dkc-swatches .ev-sw.locked { opacity: .55; }
body.dk #event-modal.dk-ev .ev-color-name-btn { align-self: flex-start; width: auto !important; white-space: nowrap; margin: 0; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 650; color: var(--accent); cursor: pointer; }

/* 捲動月:日期數字置中、農曆小字貼在數字右邊(數字本身維持正中,農曆不擠歪它) */
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top {
  display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; flex-direction: initial;
}
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top .fc-daygrid-day-number { grid-column: 2; padding: 6px 4px; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top .dk-lunar { grid-column: 3; justify-self: start; padding: 0 0 0 2px !important; margin: 0; white-space: nowrap; }
body.dk .fc .fc-dayGridScroll-view .fc-day-today .fc-daygrid-day-number { margin: 4px 0; }

body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top .dk-mo-label { grid-column: 1; grid-row: 1; justify-self: end; margin: 0 2px 0 0; font-size: 13px; }
body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top .fc-daygrid-day-number, body.dk .fc .fc-dayGridScroll-view .fc-daygrid-day-top .dk-lunar { grid-row: 1; }

/* 行程浮窗(滑鼠停在行程上) */
#dk-ev-tip {
  position: fixed; z-index: 96; width: 280px; max-width: calc(100vw - 16px); padding: 12px 14px; border-radius: 12px; pointer-events: none;
  background: var(--card); color: var(--text); box-shadow: 0 0 0 0.5px var(--dk-hair, rgba(0,0,0,.1)), 0 14px 36px rgba(42,36,32,.2);
  opacity: 0; transform: translateY(3px); transition: opacity .12s ease, transform .12s ease; font-size: 13px; line-height: 1.45;
}
#dk-ev-tip.on { opacity: 1; transform: none; }
#dk-ev-tip .et-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
#dk-ev-tip .et-head i { width: 4px; align-self: stretch; min-height: 18px; border-radius: 2px; background: var(--c); flex: none; }
#dk-ev-tip .et-head b { flex: 1; min-width: 0; font-size: 15px; font-weight: 750; line-height: 1.3; word-break: break-word; }
#dk-ev-tip .et-r { display: flex; gap: 8px; padding: 2px 0; color: color-mix(in srgb, var(--text) 82%, transparent); }
#dk-ev-tip .et-ic { width: 16px; flex: none; text-align: center; font-size: 12px; }
#dk-ev-tip .et-r span:last-child { min-width: 0; white-space: pre-line; word-break: break-word; }
@media (prefers-reduced-motion: reduce) { #dk-ev-tip { transition: none; } }

/* ===== 2026-10-09 全站巡視修正 ===== */
/* 列表檢視:群組色條的 ::before 在 <tr> 上會被當成多一格,整張表錯位(整天/假日那列被擠成直排)→ 列表改用第一格內側色條 */
body.dk .fc tr.fc-event.sp-strip { position: static; overflow: visible; }
body.dk .fc tr.fc-event.sp-strip::before { content: none !important; display: none !important; }
body.dk .fc .fc-list-table { table-layout: auto; width: 100%; }
body.dk .fc .fc-list-event td { padding: 11px 14px; vertical-align: middle; }
body.dk .fc .fc-list-event-time { width: 130px; font-variant-numeric: tabular-nums; }
body.dk .fc .fc-list-event-graphic { width: 18px; }
body.dk .fc .fc-list-day-cushion { padding: 10px 14px; }
body.dk .fc .fc-list-event:hover td { background: color-mix(in srgb, var(--text) 3%, transparent); }

/* 今天面板:已結束的行程只把文字調淡,不把整張卡洗白 */
.dka-row.past { opacity: 1; }
.dka-row.past .dka-title, .dka-row.past .dka-when { color: color-mix(in srgb, var(--text) 45%, transparent); }
.dka-row.past .dka-dot, .dka-row.past .dka-strip { opacity: .45; }

/* 右側面板的待辦/清單:只留一個新增入口(行內輸入框),拿掉重複的「新增待辦…」文字與虛線按鈕 */
body.dk.desk-split #family-screen .td-empty,
body.dk.desk-split #family-screen .td-create-btn { display: none !important; }
body.dk.desk-split #family-screen .td-head .td-note { display: none; }
body.dk.desk-split #family-screen [data-group-lists] .td-group-note { display: none; }
body.dk #family-screen [data-group-lists] .ios-card:has(> .td-empty) { background: transparent; box-shadow: none; border: 0; }
body.dk #family-screen [data-group-lists] .ios-card > .td-empty {
  display: block !important; margin: 0; padding: 4px 4px 8px; font-size: 12.5px; color: var(--dk-muted); background: none; border: 0;
}

/* 一次性提示(開啟提醒、拍通知單):電腦版放在行事曆左下角,不擋右側面板 */
body.dk .notif-prompt, body.dk #coach-card {
  left: calc(var(--dk-side-w) + 20px) !important; right: auto !important; bottom: 20px !important; transform: none !important;
  width: min(380px, calc(100vw - var(--dk-side-w) - 40px)); margin: 0 !important;
}
body.dk #coach-card.hidden, body.dk .notif-prompt.hidden { display: none; }
body.dk .notif-prompt:not(.hidden) ~ #coach-card { bottom: 150px !important; }

/* 「你現有的行事曆，可以直接顯示進來」:電腦版改成工具列下方一條細提示,不是整片粉紅底 */
body.dk #sync-card { margin: 8px 16px 0 !important; padding: 8px 12px; border-radius: 10px; border-style: solid; border-color: var(--dk-hair); background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
body.dk #sync-card .sync-card-text b { font-size: 13px; font-weight: 600; }
body.dk #sync-card .btn { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; }

/* 點月曆某天的速覽:電腦版改成畫面中間的小卡(原本是手機的底部面板) */
body.dk #day-peek { background: rgba(28,22,18,.24); align-items: center; justify-content: center; }
body.dk #day-peek .dp-card {
  width: min(440px, 92vw); max-height: 70vh; border-radius: 16px; border: 0; padding: 8px 14px 14px;
  box-shadow: 0 0 0 0.5px var(--dk-hair), var(--shadow-lg); animation: dk-pop .16s var(--ease-out) both;
}
body.dk #day-peek .dp-grip { display: none; }

/* 所有對話框(家務、清單、成員、待辦、行事曆…)跟新增行程同一套欄位樣式 */
body.dk .modal:not(.key-gate):not(#event-modal) .modal-card.small { width: min(480px, 94vw); }
body.dk .modal:not(.key-gate) .modal-card .modal-actions .btn { white-space: nowrap; height: 36px; border-radius: 9px; font-weight: 650; box-shadow: none; }
body.dk .modal:not(.key-gate) .modal-card .modal-actions .btn.primary { background: var(--action, var(--accent)); border-color: transparent; color: #fff; padding: 0 20px; }
body.dk .modal:not(.key-gate) .modal-card .modal-actions .btn.danger { margin-right: auto; }
body.dk .modal:not(.key-gate):not(#event-modal) .modal-card select,
body.dk .modal:not(.key-gate):not(#event-modal) .modal-card input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
body.dk .modal:not(.key-gate):not(#event-modal) .modal-card textarea {
  -webkit-appearance: none; appearance: none; min-height: 40px; border: 1px solid color-mix(in srgb, var(--text) 13%, transparent) !important;
  border-radius: 10px !important; box-shadow: none !important; background-color: var(--card); font-size: 14px; font-weight: 550 !important;
}
body.dk .modal:not(.key-gate):not(#event-modal) .modal-card select {
  padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8078' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
body.dk .modal:not(.key-gate) .modal-card input:focus, body.dk .modal:not(.key-gate) .modal-card select:focus, body.dk .modal:not(.key-gate) .modal-card textarea:focus {
  outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft) !important;
}
/* 表情符號列:換行排列,不要藏一半在右邊 */
body.dk .modal .emoji-row, body.dk .modal .emoji-pick, body.dk .modal [class*="emoji-row"] { flex-wrap: wrap !important; overflow: visible !important; }
/* 分段選擇(輪流/認領等):macOS 分段控制外觀 */
body.dk .modal:not(#event-modal) .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 9px; background: color-mix(in srgb, var(--text) 6%, transparent); }
body.dk .modal:not(#event-modal) .seg button { border: 0; background: transparent; border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; }
body.dk .modal:not(#event-modal) .seg button.on, body.dk .modal:not(#event-modal) .seg button.active { background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.14); }

/* 深色:選中的藥丸文字要看得到 */
html.dark body.dk .member-chip.on, html.dark body.dk .member-pick .on { color: var(--text) !important; background: color-mix(in srgb, var(--accent) 22%, var(--card)) !important; }

/* 群組與成員、行事曆同步等子頁:標題靠左、返回在上 */
body.dk #spaces-screen .subpage-head, body.dk #calsync-screen .subpage-head, body.dk #members-screen .subpage-head { justify-content: flex-start; gap: 14px; }
body.dk .modal .chore-emoji-row { flex-wrap: wrap; overflow: visible; }
/* 子頁標題:返回連結在左、標題緊接其後,不再置中漂在中間 */
body.dk .set-page .subpage-head { justify-content: flex-start; gap: 12px; padding-top: 28px; }
body.dk .set-page .subpage-head h3 { position: static !important; transform: none !important; margin: 0; font-size: 22px; font-weight: 800; }
body.dk .set-page .subpage-head .subpage-spacer { display: none; }
/* 電腦版一律從月曆開始 → 「啟動檢視」設定在電腦版沒有作用,收起來 */
body.dk #settings-screen .ios-row:has(#set-startup-select) { display: none !important; }
/* 設定頁:左側章節目錄 + 右側內容(填掉左邊的大片空白) */
body.dk #settings-screen.dk-set { display: grid; grid-template-columns: 180px minmax(0, 720px); justify-content: center; align-items: start; column-gap: 40px; padding: 0 32px; }
body.dk #settings-screen.dk-set > .set-page { max-width: none; margin: 0; width: 100%; }
body.dk .dk-set-nav { position: sticky; top: 0; padding-top: 104px; display: flex; flex-direction: column; gap: 2px; }
body.dk .dk-set-nav button {
  border: 0; background: transparent; text-align: left; padding: 7px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; font-weight: 550;
  color: var(--dk-muted); cursor: pointer;
}
body.dk .dk-set-nav button:hover { background: var(--dk-hover); color: var(--text); }
body.dk .dk-set-nav button.on { background: var(--card); color: var(--text); font-weight: 650; box-shadow: 0 0 0 0.5px var(--dk-hair), 0 1px 2px rgba(0,0,0,.06); }
@media (max-width: 1150px) { body.dk #settings-screen.dk-set { grid-template-columns: minmax(0, 720px); } body.dk .dk-set-nav { display: none; } }
html.dark body.dk .member-chip.selected { color: var(--text) !important; background: color-mix(in srgb, var(--chip-c, var(--accent)) 28%, #1d1a18) !important; }

/* ===== 2026-10-09 第二輪細節 ===== */
/* 側邊欄群組:滑過只亮那一列(不是連頭像整塊),多一顆改顏色的色點 */
.dk-sp:hover { background: transparent !important; }
.dk-sp-colorbtn { width: 22px; padding: 0 !important; display: grid !important; place-items: center; }
.dk-sp-colorbtn i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent); }
#dk-color-pop {
  position: fixed; z-index: 97; width: 236px; padding: 12px; border-radius: 12px; background: var(--card);
  box-shadow: 0 0 0 0.5px var(--dk-hair, rgba(0,0,0,.1)), 0 14px 36px rgba(42,36,32,.2); animation: dk-pop .14s var(--ease-out) both;
}
#dk-color-pop.hidden { display: none; }
.dkcp-h { font-size: 12.5px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.dkcp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.dkcp-sw { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; color: #fff; font: 700 12px/1 system-ui; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform var(--dur-fast) var(--ease-out); }
.dkcp-sw:hover { transform: scale(1.08); }
.dkcp-sw.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--text); }
.dkcp-note { margin-top: 10px; font-size: 11.5px; color: var(--dk-muted); line-height: 1.4; }

/* 清單項目:刪除改成右邊的小垃圾桶(滑過才出現),不再是整塊紅色;位置固定,不推擠其他內容 */
body.dk #lists-panel #list-items .item-row .item-face { padding-right: 46px !important; }
body.dk #lists-panel #list-items .item-row .item-swipe-del {
  position: absolute; top: 50%; right: 6px; left: auto; bottom: auto; transform: translateY(-50%); width: 32px !important; height: 32px;
  border-radius: 8px !important; background: transparent !important; color: color-mix(in srgb, var(--text) 45%, transparent) !important;
  opacity: 0; pointer-events: none; display: grid; place-items: center; z-index: 3;
}
body.dk #lists-panel #list-items .item-row:hover .item-swipe-del { opacity: 1; pointer-events: auto; }
body.dk #lists-panel #list-items .item-row .item-swipe-del:hover { background: var(--danger-soft) !important; color: var(--danger) !important; }
body.dk #lists-panel #list-items .item-row .item-swipe-del svg { width: 17px; height: 17px; }
body.dk #lists-panel #list-items .item-row:hover .item-face { background: color-mix(in srgb, var(--text) 3%, transparent); }
/* 清單標題靠左,跟下面的項目對齊 */
body.dk #lists-panel .ld-head { display: flex !important; justify-content: flex-start !important; text-align: left; }
body.dk #lists-panel .ld-head #ld-title { flex: 1 1 auto; text-align: left !important; margin: 0 !important; position: static !important; transform: none !important; left: auto !important; }

/* 家務卡:不提供滑過刪除(會蓋住「完成」);要刪除請點家務名稱進編輯視窗 */
body.dk #lists-panel .chore-row .item-swipe-del { display: none !important; }
body.dk #lists-panel .chore-row:hover .chore-face { padding-right: 16px !important; }
body.dk #lists-panel .chore-row .chore-info { cursor: pointer; min-width: 0; }
body.dk #lists-panel .chore-row .chore-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dk #lists-panel .chore-row .chore-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dk #lists-panel .chore-row:hover { box-shadow: 0 0 0 0.5px var(--dk-hair), 0 4px 12px rgba(42,36,32,.08); }

/* ===== 側邊欄搜尋框=真的輸入框,結果在框下方展開(2026-10-09 Josh)===== */
.dk-search { cursor: text; }
body.dk .dk-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; margin: 0; border: 0 !important; border-radius: 0;
  background: transparent !important; box-shadow: none !important; outline: none;
  font: inherit; font-size: 13px; color: var(--text);
}
body.dk .dk-search input::placeholder { color: var(--dk-muted); opacity: 1; }
body.dk .dk-search:focus-within { background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
body.dk .dk-search:focus-within kbd { display: none; }

/* 下拉:不蓋暗幕、不擋畫面其他地方的點擊,點外面就收 */
body.dk #omni-sheet.dk-dock { display: block; padding: 0; background: transparent; pointer-events: none; }
body.dk #omni-sheet.dk-dock .sheet-card {
  position: fixed; pointer-events: auto; margin: 0; padding: 8px; max-width: none; border-radius: 12px; overflow-y: auto;
  box-shadow: 0 14px 40px rgba(28,22,18,.18), 0 0 0 1px var(--dk-hair);
  animation: dk-drop .12s var(--ease-out) both;
}
@keyframes dk-drop { from { opacity: 0; transform: translateY(-4px); } }
body.dk #omni-sheet.dk-dock #omni-input { display: none; }
body.dk #omni-sheet.dk-dock #omni-preview { order: 1; margin-top: 0; }
body.dk #omni-sheet.dk-dock #omni-ai { order: 2; }
body.dk #omni-sheet.dk-dock #omni-results { order: 3; overflow: visible; }
body.dk #omni-sheet.dk-dock #omni-more { order: 4; margin: 8px 6px 2px; font-size: 13px; }
body.dk #omni-sheet.dk-dock.om-empty #omni-preview,
body.dk #omni-sheet.dk-dock.om-empty #omni-results,
body.dk #omni-sheet.dk-dock.om-empty #omni-more { display: none !important; }
body.dk #omni-sheet.dk-dock:not(.om-empty) #omni-scan { display: none; }
body.dk #omni-sheet.dk-dock .omni-scan {
  margin-top: 6px; padding: 8px 10px; gap: 9px; font-size: 13px; border-radius: 9px;
  border-color: transparent; background: transparent; color: var(--text);
}
body.dk #omni-sheet.dk-dock #omni-scan { margin-top: 0; color: var(--dk-muted); }
body.dk #omni-sheet.dk-dock .omni-scan:hover, body.dk #omni-sheet.dk-dock .omni-scan:focus-visible { background: var(--dk-hover); }
body.dk #omni-sheet.dk-dock .omni-scan .os-ic { font-size: 15px; }
body.dk #omni-sheet.dk-dock .om-row:focus-visible { outline: none; background: var(--dk-hover); }
/* 電腦版:不放「按住說話」;照片改說「拖進來、貼上，或點選檔案」 */
body.dk #omni-mic { display: none !important; }
body.dk .omni-scan .os-lbl-m { display: none; }
body.dk .omni-scan .os-lbl-dk { display: inline; }
