/* 入口與個人頁（public/app.js）專用樣式：登入／初始化、外殼、首頁儀表板、案件列表、我的。
   共用 token 與基礎元件在 ../styles.css；這裡只放此區塊獨有的 class（前綴 .app-）。
   原則：疊加在既有結構上，不改既有 class 的語意；深淺色都走 token。 */

/* ---------- 共用小元件 ---------- */
.app-hide { display: none !important; }
.app-tone-copper { color: var(--primary); background: var(--copper-soft); }
.app-tone-green { color: var(--green); background: var(--green-soft); }
.app-tone-blue { color: var(--blue); background: var(--blue-soft); }
.app-tone-purple { color: var(--purple); background: var(--purple-soft); }
.app-tone-amber { color: var(--amber); background: var(--amber-soft); }
.app-tone-red { color: var(--red); background: var(--red-soft); }
.app-tone-teal { color: var(--teal); background: var(--teal-soft); }
.app-tone-gray { color: var(--gray); background: var(--gray-soft); }
.app-dot-all { background: var(--text-3); }
.app-dot-copper { background: var(--primary); }
.app-dot-green { background: var(--green); }
.app-dot-blue { background: var(--blue); }
.app-dot-purple { background: var(--purple); }
.app-dot-red { background: var(--red); }
.app-dot-gray { background: var(--gray); }

.empty.app-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 12px 26px; }
.app-art { width: 104px; height: 70px; fill: none; stroke: var(--border-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-art .a { stroke: var(--primary); }
.app-empty-text { font-size: 14px; font-weight: 600; color: var(--text-2); }
.app-empty-action { margin-top: 8px; }

.app-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-weight: 600; border: 1px solid transparent; line-height: 1.5; }
.app-notice .icon { flex: 0 0 auto; margin-top: 2px; }
.app-notice--amber { background: var(--amber-soft); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }
.app-notice a { color: inherit; text-decoration: underline; }

.app-section-hint { font-size: 12.5px; color: var(--text-3); text-align: right; }
.app-section-lead { font-size: 14px; color: var(--text-2); margin: -2px 0 14px; line-height: 1.65; }
.app-section-lead b, .app-dev-group-note b, .app-pwa-tip b, .app-me .field .hint b, .app-auth-form .field .hint b { color: var(--text); font-weight: 700; }
/* 劃重點：結論／金額／期限用銅色淡底，紅燈用淡紅底 */
mark.app-hl { color: inherit; font-weight: 700; padding: 0 3px; border-radius: 3px; background: linear-gradient(transparent 50%, var(--copper-soft) 50%); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
mark.app-hl--red { color: var(--red); background: linear-gradient(transparent 50%, var(--red-soft) 50%); }
/* 標籤淡、數值粗 */
.app-kv { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.app-kv .app-k { color: var(--text-3); font-weight: 500; }
.app-kv .app-v { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.app-more-link { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.app-more { margin-top: 10px; color: var(--text-2); }
.app-card .card-title h2 .icon { color: var(--primary); }

.app-skeleton .app-skel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.app-skel-grid .skel.b { height: 92px; margin: 0; }

@keyframes app-shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.app-shake { animation: app-shake .5s; }
@keyframes app-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.app-dash, .app-cases, .app-me { animation: app-fade .2s ease-out; }

/* ---------- 外殼：topbar 標題層次、tabbar、「我的」用頭像當圖示（品牌 lockup 的 .brand／.brand-name 由 styles.css 負責） ---------- */
.app-nav-avatar { display: grid; place-items: center; }
.app-nav-avatar .avatar { transition: box-shadow .15s; }
.nav.active .app-nav-avatar .avatar { box-shadow: 0 0 0 2px var(--on-primary); }
.app-tab.active .app-nav-avatar .avatar { box-shadow: 0 0 0 2px var(--primary); }
.app-nav-theme .icon { transition: transform .3s; }
.app-nav-theme:hover .icon { transform: rotate(18deg); }

.app-topbar-mark { display: none; width: 30px; height: 30px; flex: 0 0 auto; }
.app-topbar-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.topbar .app-topbar-title h1 { flex: none; }
.topbar .app-topbar-title .sub { display: block; margin-left: 0; line-height: 1.25; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.tabbar .app-tab { font-size: 12.5px; font-weight: 600; }
.tabbar .app-tab .app-nav-label { line-height: 1; }

/* ---------- 登入／初始化 ---------- */
.app-auth .hero.app-hero { padding: 44px 44px 36px; gap: 28px; }
.app-hero-top { display: flex; flex-direction: column; }
.app-lockup { display: flex; align-items: center; gap: 12px; }
.app-lockup-mark { width: 48px; height: 48px; flex: 0 0 auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.app-lockup-text { display: flex; flex-direction: column; line-height: 1.25; }
.app-lockup-text b { font-size: 17px; font-weight: 800; color: #f1ecdf; letter-spacing: .01em; }
.app-lockup-text span { font-size: 12.5px; color: #bdb7a8; }
.app-auth .hero h1.app-hero-title { font-size: 30px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 800; margin-top: 34px; color: #f7f3e8; max-width: 19em; }
.app-auth .hero p.app-hero-lead { color: #bdb7a8; max-width: 46ch; margin-top: 14px; font-size: 15px; line-height: 1.7; }
.app-auth .hero ul.app-hero-points { margin-top: 30px; display: grid; gap: 14px; }
.app-auth .hero .app-hero-points li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); color: #e6e1d4; }
.app-hero-points li .icon { color: #d4a06e; margin-top: 3px; width: 20px; height: 20px; }
.app-hero-points li b { display: block; font-size: 15px; color: #f1ecdf; line-height: 1.4; }
.app-hero-points li span { display: block; font-size: 13.5px; color: #bdb7a8; line-height: 1.65; margin-top: 5px; }
.app-auth .hero .foot.app-hero-foot { font-size: inherit; color: inherit; }
.app-hero-cta { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); background: #d4a06e; color: #1a140d; text-decoration: none; font-weight: 700; transition: background .15s, transform .15s; max-width: 440px; }
.app-hero-cta:hover { background: #e4b482; text-decoration: none; transform: translateY(-1px); }
.app-hero-cta > span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.app-hero-cta b { font-size: 15px; }
.app-hero-cta small { font-weight: 500; font-size: 12.5px; opacity: .8; }
.app-hero-cta .icon { width: 22px; height: 22px; }
.app-hero-cta .icon:first-child { width: 26px; height: 26px; }

.app-auth .pane.app-pane { background: var(--bg); padding: 28px 20px; }
.app-auth-box { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.app-auth form.app-auth-form { max-width: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 28px 24px; box-shadow: var(--shadow); gap: 16px; position: relative; overflow: hidden; }
.app-auth form.app-auth-form::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--primary), #48a098); }
.app-auth-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.app-auth-kicker { font-size: 12.5px; font-weight: 700; color: var(--primary); letter-spacing: .08em; }
.app-auth .app-auth-head h2 { font-size: 24px; letter-spacing: -0.01em; }
.app-auth-lead { font-size: 14px; color: var(--text-2); line-height: 1.65; }
.app-auth-form .field > label { font-size: 13px; }
.app-auth-form .field .hint { font-size: 13.5px; line-height: 1.6; color: var(--text-2); margin-top: 2px; }
.app-auth-form .input { height: 44px; font-size: 15px; }
.app-pw { position: relative; }
.app-pw .input { padding-right: 44px; }
.app-pw-eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 32px; border: 0; background: transparent; color: var(--text-3); border-radius: 6px; display: grid; place-items: center; padding: 0; }
.app-pw-eye:hover { color: var(--text); background: var(--surface-2); }
.app-alert { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; line-height: 1.5; border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
.app-alert .icon { flex: 0 0 auto; margin-top: 1px; }
.app-alert[hidden] { display: none; }
.btn.app-auth-submit { justify-content: space-between; padding: 0 18px 0 22px; margin-top: 4px; }
.btn.app-auth-submit > span { flex: 1; text-align: center; }
.app-auth-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); justify-content: center; }
.app-auth-help { display: none; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius); border: 1px dashed var(--border-2); color: var(--text-2); text-decoration: none; font-size: 13.5px; background: var(--surface); }
.app-auth-help:hover { text-decoration: none; border-color: var(--primary); color: var(--text); }
.app-auth-help > .icon:first-child { color: var(--primary); width: 22px; height: 22px; }
.app-auth-help span { flex: 1; min-width: 0; }
.app-auth-help b { color: var(--text); margin-right: 4px; }

/* ---------- 首頁 ---------- */
.app-greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.app-greet h2 { font-size: 22px; letter-spacing: -0.01em; }
.app-greet p { color: var(--text-2); font-size: 13.5px; margin-top: 4px; line-height: 1.6; font-variant-numeric: tabular-nums; }

.kpis.app-kpis { gap: 12px; }
.kpi.app-kpi { --app-tone: var(--text); --app-tone-soft: var(--surface-3); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'v ic' 'k ic' 'hint hint'; align-items: start; padding: 14px 16px 12px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.kpi.app-kpi::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--app-tone); opacity: .9; }
.kpi.app-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--app-tone) 45%, var(--border)); text-decoration: none; }
.kpi.app-kpi .v { grid-area: v; font-size: 30px; line-height: 1.05; color: var(--app-tone); }
.kpi.app-kpi .k { grid-area: k; font-size: 13.5px; font-weight: 700; color: var(--text); margin-top: 4px; }
.app-kpi-hint { grid-area: hint; display: flex; align-items: center; gap: 2px; font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.app-kpi-hint .icon { opacity: .7; transition: transform .15s; }
.kpi.app-kpi:hover .app-kpi-hint .icon { transform: translateX(2px); }
.app-kpi-ic { grid-area: ic; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--app-tone-soft); color: var(--app-tone); margin-left: 8px; }
.app-kpi-ic .icon { width: 20px; height: 20px; }
.app-kpi--copper { --app-tone: var(--primary); --app-tone-soft: var(--copper-soft); }
.app-kpi--green { --app-tone: var(--green); --app-tone-soft: var(--green-soft); }
.app-kpi--blue { --app-tone: var(--blue); --app-tone-soft: var(--blue-soft); }
.app-kpi--red { --app-tone: var(--red); --app-tone-soft: var(--red-soft); }
.app-kpi--teal { --app-tone: var(--teal); --app-tone-soft: var(--teal-soft); }
.app-kpi--ink { --app-tone: var(--text); --app-tone-soft: var(--surface-3); }
.app-kpi--quiet { --app-tone: var(--text-3); --app-tone-soft: var(--surface-2); }

.app-tip { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); background: linear-gradient(90deg, var(--copper-soft), var(--surface) 70%); }
.app-tip:hover { text-decoration: none; border-color: var(--primary); }
.app-tip > .icon.lg { color: var(--primary); width: 30px; height: 30px; }

.list-item.link.app-row { padding: 12px 8px; gap: 12px; align-items: flex-start; }
.app-row-body { min-width: 0; }
.app-row-head { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; line-height: 1.4; }
.app-row-name { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.app-row-sub { font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-row-key { color: var(--text-3); margin-right: 2px; }
.app-row-dim { color: var(--text-3); }
.app-row-time { font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; align-self: flex-start; margin-top: 4px; }
.app-row .avatar { margin-top: 2px; }
.app-chip-wait { gap: 3px; }
.app-run-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; flex: 0 0 auto; }
.app-run-dot .dot.pulse { background: var(--blue); }

.app-activity { margin-top: -4px; }
.app-act-group + .app-act-group { margin-top: 6px; }
.app-act-day { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--text-3); letter-spacing: .04em; padding: 14px 0 6px; }
.app-act-day::after { content: ''; flex: 1; border-top: 1px dashed var(--border); }
.app-act { display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.app-act:hover { background: var(--surface-2); text-decoration: none; }
.app-act > .icon { color: var(--text-3); }
.app-act-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.app-act-text { font-size: 14px; line-height: 1.65; }
.app-act-text b { font-weight: 700; }
.app-act-meta { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.5; font-variant-numeric: tabular-nums; }

/* ---------- 案件列表 ---------- */
.app-cases-toolbar { position: sticky; top: var(--topbar-h); z-index: 10; margin: -18px -16px 0; padding: 12px 16px 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.app-cases-search .search .input { height: 42px; }
.btn.app-toggle { gap: 6px; height: 42px; padding: 0 14px; }
.btn.app-toggle.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
[data-theme='dark'] .btn.app-toggle.on { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.stage-filters.app-filters { margin-top: 10px; gap: 8px; }
.stage-filters .chip.app-filter { gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); font-size: 12.5px; }
.stage-filters .chip.app-filter:hover { border-color: var(--text-3); color: var(--text); }
.stage-filters .chip.app-filter.on { border-color: transparent; }
.app-filter-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.app-filter-n { font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 2px; opacity: .75; }
.app-filter-n[hidden] { display: none; }
.stage-filters .chip.app-filter--red { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--surface); }
.stage-filters .chip.app-filter--red.on { background: var(--red); color: #fff; }
.app-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 8px; font-size: 13px; color: var(--text-2); }
.app-list-count b { color: var(--text); font-weight: 800; font-size: 15px; }
.app-list-sort { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 12.5px; white-space: nowrap; }

.app-case-list { padding: 6px; }
.case-row.app-case-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 14px 12px; border-radius: var(--radius); position: relative; transition: background .15s; }
.app-case-list > .case-row + .case-row::before { content: ''; position: absolute; left: 68px; right: 12px; top: 0; border-top: 1px solid var(--border); }
.app-case-list > .case-row:hover::before, .app-case-list > .case-row:hover + .case-row::before { border-color: transparent; }
.app-case-row .name { font-size: 15px; line-height: 1.4; }
.app-case-main { min-width: 0; }
.case-row.app-case-row.app-running { box-shadow: inset 3px 0 0 var(--blue); }
.app-case-row .meta { font-size: 12.5px; margin-top: 5px; line-height: 1.5; color: var(--text-3); }
.app-case-row .meta b { color: var(--text); font-weight: 700; }
.app-case-row .snippet { font-size: 13.5px; color: var(--text-2); margin-top: 7px; line-height: 1.6; }
.app-sep { color: var(--text-3); margin: 0 3px; }
.app-running-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--primary); }
.app-red-flag { display: inline-flex; align-items: center; gap: 3px; color: var(--red); font-weight: 700; margin-right: 6px; vertical-align: -1px; }
.case-row.app-case-row.red { background: color-mix(in srgb, var(--red-soft) 55%, transparent); box-shadow: inset 3px 0 0 var(--red); }
.case-row.app-case-row.red:hover { background: var(--red-soft); }
.case-row.app-case-row .side.app-case-side { gap: 6px; font-size: 12.5px; }
.app-case-time { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 我的 ---------- */
.app-profile { position: relative; overflow: hidden; padding: 22px 20px; }
.app-profile-bg { position: absolute; inset: 0 0 auto 0; height: 70px; background: linear-gradient(135deg, var(--copper-soft), transparent 70%); pointer-events: none; }
.app-profile-row { position: relative; display: flex; align-items: center; gap: 16px; }
.app-avatar-xl { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 800; box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border); flex: 0 0 auto; transition: background .2s; }
.app-profile-text h2 { font-size: 20px; letter-spacing: -0.01em; }
.app-profile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 6px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.app-profile-handle { font-family: var(--mono); font-size: 13px; }
.app-profile-last { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.app-section .card-title h2 .icon { color: var(--primary); }
.app-section .card-title { margin-bottom: 14px; }
.app-me .field .hint { font-size: 13.5px; line-height: 1.65; color: var(--text-2); margin-top: 2px; }
.app-me .form-grid { gap: 16px 16px; }
.app-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 2px 0; }
.app-swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; position: relative; box-shadow: 0 0 0 1px var(--border-2); transition: transform .1s, box-shadow .15s; }
.app-swatch:hover { transform: scale(1.08); }
.app-swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.app-swatch.on::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translate(-50%, -65%) rotate(-45deg); }
.app-swatch--custom { display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); overflow: hidden; }
.app-swatch--custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.segment.app-theme-seg { padding: 4px; gap: 3px; }
.segment.app-theme-seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; font-size: 13.5px; }
.segment.app-theme-seg button .icon { opacity: .75; }
.segment.app-theme-seg button.on .icon { color: var(--primary); opacity: 1; }
.app-pwa-tip { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.app-pwa-tip .icon { flex: 0 0 auto; margin-top: 3px; color: var(--text-3); }
.app-pw-meter { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin-top: -4px; line-height: 1.5; }
.app-pw-meter[hidden] { display: none; }
.app-pw-bar { flex: 0 0 120px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.app-pw-bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .25s, background .25s; }
.app-pw-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-pw-meter[data-level='1'] .app-pw-bar i { width: 33%; background: var(--red); }
.app-pw-meter[data-level='2'] .app-pw-bar i { width: 66%; background: var(--amber); }
.app-pw-meter[data-level='3'] .app-pw-bar i { width: 100%; background: var(--green); }

.app-dev-title h2 { flex-wrap: wrap; }
.chip.app-count { background: var(--surface-3); color: var(--text-2); font-size: 12.5px; }
.app-dev-group + .app-dev-group { margin-top: 18px; }
.app-dev-group-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text-2); margin-bottom: 10px; flex-wrap: wrap; }
.app-dev-group-head .muted { font-weight: 500; }
.app-dev-group-head .btn { margin-left: auto; }
.app-dev-group-note { font-size: 13.5px; color: var(--text-2); margin: -4px 0 10px; line-height: 1.65; }
.app-dev-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.app-dev { display: flex; align-items: center; gap: 12px; padding: 13px 14px; }
.app-dev + .app-dev { border-top: 1px solid var(--border); }
.app-dev--current { background: color-mix(in srgb, var(--green-soft) 55%, transparent); }
.app-dev-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; background: var(--surface-2); color: var(--text-2); }
.app-dev-ic--browser { background: var(--copper-soft); color: var(--primary); }
.app-dev-ic--agent { background: var(--teal-soft); color: var(--teal); }
.app-dev-ic--tool { background: var(--surface-3); color: var(--text-2); }
.app-dev-body { min-width: 0; }
.app-dev-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.app-dev-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.app-dev-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-3); margin-top: 5px; line-height: 1.5; }
.app-dev-meta span { display: inline-flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-dev-meta .app-dev-since { display: inline; }
.app-dev-out { flex: 0 0 auto; }
.app-dev-out:hover { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: var(--red-soft); }

/* ---------- 動效尊重 ---------- */
@media (prefers-reduced-motion: reduce) {
  .app-shake, .app-dash, .app-cases, .app-me, .kpi.app-kpi, .app-kpi-hint .icon, .app-hero-cta, .app-swatch, .app-pw-bar i, .app-avatar-xl, .app-nav-theme .icon { animation: none !important; transition: none !important; }
}

/* ---------- 手機 ---------- */
@media (max-width: 899px) {
  .app-topbar-mark { display: block; }
  .app-greet h2 { font-size: 20px; }
  .app-cases-toolbar { margin: -14px -14px 0; padding: 10px 14px 8px; }
  .auth.app-auth { grid-template-rows: auto 1fr; }
  .app-auth .hero.app-hero { padding: 22px 20px 20px; gap: 0; justify-content: flex-start; }
  .app-lockup-mark { width: 40px; height: 40px; }
  .app-auth .hero h1.app-hero-title { font-size: 19px; margin-top: 16px; max-width: none; }
  .app-auth .hero p.app-hero-lead { display: none; }
  .app-auth .hero ul.app-hero-points { display: none; }
  .app-auth .hero .foot.app-hero-foot { display: none; }
  .app-auth .pane.app-pane { padding: 18px 14px 28px; align-items: flex-start; }
  .app-auth form.app-auth-form { padding: 22px 18px 20px; }
  .app-auth .app-auth-head h2 { font-size: 22px; }
  .app-auth-help { display: flex; }
}
@media (max-width: 599px) {
  .kpi.app-kpi { padding: 12px 12px 10px; }
  .kpi.app-kpi .v { font-size: 26px; }
  .app-kpi-ic { width: 34px; height: 34px; border-radius: 10px; margin-left: 4px; }
  .app-skeleton .app-skel-grid { grid-template-columns: 1fr 1fr; }
  .app-section-hint { display: none; }
  .app-list-sort { display: none; }
  .case-row.app-case-row { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 10px; padding: 14px 10px; }
  .app-case-list > .case-row + .case-row::before { left: 10px; right: 10px; }
  .case-row.app-case-row .avatar.lg { width: 40px; height: 40px; font-size: 14px; align-self: start; }
  .case-row.app-case-row .side.app-case-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; margin-top: 4px; }
  .btn.app-toggle { padding: 0 11px; }
  .app-profile { padding: 18px 16px; }
  .app-profile-row { gap: 12px; }
  .app-avatar-xl { width: 56px; height: 56px; font-size: 20px; }
  .app-profile-text h2 { font-size: 18px; }
  .app-profile-last { display: none; }
  .app-dev { gap: 10px; padding: 12px 12px; }
  .app-dev-ic { width: 36px; height: 36px; border-radius: 10px; }
  .app-dev-head { font-size: 14px; }
  .app-dev-meta { gap: 2px 10px; }
  .app-dev-meta .app-dev-since { display: none; }
}
