/* 嘉義市管樂團 團務系統 — 介面（淺色）
 *
 * 設計規則（參考 Apple Liquid Glass）：
 * 1. 兩層：內容層用不透明白色分組；導覽與控制層（側欄、頂端列、分頁列、面板、選單、提示、固定按鈕列）用玻璃，浮在內容上。玻璃不疊玻璃。
 * 2. 圓角同心：外層圓角 − 內距 = 內層圓角。控制元件一律膠囊形。
 *    面板 38 → 卡片 26 → 方格 18 → 欄位 14 → 按鈕、標籤、分頁 膠囊
 * 3. 選取狀態只有一種：玻璃「鏡片」（亮白膠囊＋細陰影），文字與圖示用強調色。
 * 4. 強調色只用在可操作的東西；主要按鈕用強調色玻璃。
 */

:root {
	color-scheme: light;
	--bg: #f5f2ee;
	--surface: #ffffff;
	--surface-2: #f9f7f4;
	--ink: #1d1d1f;
	--ink-2: rgba(29, 29, 31, .58);
	--ink-3: rgba(29, 29, 31, .32);
	--sep: rgba(29, 29, 31, .09);
	--fill: rgba(118, 106, 94, .10);
	--fill-2: rgba(118, 106, 94, .17);
	--tint: #2a5cae;
	--tint-soft: rgba(42, 92, 174, .1);
	--brass: #a2661c;
	--ok: #1c8a4a;
	--warn: #b06800;
	--bad: #d0342c;

	--glass: rgba(255, 255, 255, .56);
	--glass-strong: rgba(255, 255, 255, .72);
	--glass-blur: blur(26px) saturate(190%) brightness(1.03);
	--glass-edge: inset 0 0 0 1px rgba(255, 255, 255, .62), inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -1px 1.5px rgba(70, 50, 30, .06);
	--glass-drop: 0 10px 30px rgba(70, 48, 24, .12), 0 1px 3px rgba(70, 48, 24, .08);
	--lens: rgba(255, 255, 255, .94);
	--lens-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 3px 10px rgba(0, 0, 0, .08), inset 0 0 0 .5px rgba(0, 0, 0, .04);

	--r-sheet: 38px;
	--r-card: 26px;
	--r-tile: 18px;
	--r-field: 14px;
	--pad-card: 16px;
	--ease: cubic-bezier(.32, .72, 0, 1);
	--spring: cubic-bezier(.34, 1.4, .64, 1);
	--safe-t: env(safe-area-inset-top, 0px);
	--safe-b: env(safe-area-inset-bottom, 0px);
	--safe-l: env(safe-area-inset-left, 0px);
	--safe-r: env(safe-area-inset-right, 0px);
	font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body.co {
	min-height: 100vh;
	background: var(--bg);
	color: var(--ink);
	font: 400 1rem/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 2.125rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 600; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9em; }
small { font-size: .82em; }
.muted { color: var(--ink-2); font-size: .9rem; }
.pad { padding: 0 4px; }
.bad { color: var(--bad) !important; }
.warn { color: var(--warn); }
.ok { color: var(--ok); }
.ico { flex: none; display: block; }
:focus-visible { outline: 3px solid rgba(42, 92, 174, .45); outline-offset: 2px; }
::selection { background: rgba(42, 92, 174, .18); }

/* ---------- 玻璃 ---------- */
.glass {
	position: relative;
	background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 45%), var(--glass);
	-webkit-backdrop-filter: var(--glass-blur);
	backdrop-filter: var(--glass-blur);
	box-shadow: var(--glass-edge), var(--glass-drop);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.glass { background: var(--glass-strong); }
}
@media (prefers-reduced-transparency: reduce) {
	.glass { background: #fbfaf8; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* 背景：衛武營音樂廳的木頭暖色，模糊成柔光 */
.co-ambient {
	position: fixed; inset: -14vh -14vw auto; height: 76vh; z-index: -1; pointer-events: none;
	background: var(--ambient) center 30% / cover no-repeat;
	filter: blur(80px) saturate(1.2);
	opacity: .38;
}
.co-ambient::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(245, 242, 238, 0) 25%, var(--bg) 90%); }

.mark { display: block; width: 32px; height: 32px; flex: none; background: currentColor; -webkit-mask: url(img/mark-black.webp) center / contain no-repeat; mask: url(img/mark-black.webp) center / contain no-repeat; }

/* ---------- 版面：電腦（≥1024） ---------- */
.co-side {
	position: fixed; z-index: 30; top: 12px; bottom: 12px; left: 12px; width: 252px;
	display: flex; flex-direction: column; padding: 14px 12px 12px;
	border-radius: 28px;
}
.co-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; color: var(--ink); text-decoration: none !important; }
.co-brand b { display: block; font-size: .98rem; letter-spacing: .03em; }
.co-brand small { display: block; color: var(--ink-2); font-size: .76rem; }
.co-side-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: none; }
.co-side-nav::-webkit-scrollbar { display: none; }
.co-side-nav .grp { margin-bottom: 12px; }
.co-side-nav .grp-t { display: block; padding: 0 12px 4px; font-size: .7rem; font-weight: 600; letter-spacing: .1em; color: var(--ink-3); }
.co-side-nav a {
	display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; margin: 1px 0;
	border-radius: 16px; color: var(--ink); font-size: .94rem; text-decoration: none !important;
	transition: background .25s var(--ease), box-shadow .25s var(--ease), color .2s;
}
.co-side-nav a .ico { color: var(--ink-2); transition: color .2s; }
.co-side-nav a:hover { background: rgba(255, 255, 255, .45); }
.co-side-nav a.on { background: var(--lens); box-shadow: var(--lens-shadow); color: var(--tint); font-weight: 600; }
.co-side-nav a.on .ico { color: var(--tint); }
.co-acct {
	display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; margin-top: 6px;
	border: 0; border-radius: 16px; background: rgba(255, 255, 255, .45); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
	transition: background .2s;
}
.co-acct:hover { background: rgba(255, 255, 255, .72); }
.co-acct > span:not(.avatar) { flex: 1; min-width: 0; }
.co-acct b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-acct small { display: block; color: var(--ink-2); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-acct .ico { color: var(--ink-2); }

.co-main { margin-left: 276px; padding: 30px 40px 96px; max-width: 1260px; }
.co-bar, .co-tabbar { display: none; }

/* ---------- 頁首 ---------- */
.co-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 6px 0 20px; }
.co-head h1 { margin: 0; }
.co-head-t { min-width: 0; }
.co-sub { margin: 6px 0 0; color: var(--ink-2); font-size: .95rem; }
.co-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hello { margin: 6px 0 18px; }
.hello h1 { font-size: 2.25rem; margin: 0; }
.eyebrow { margin: 0 0 2px; color: var(--ink-2); font-size: .85rem; font-weight: 500; }

/* ---------- 按鈕：一律膠囊 ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px;
	background: var(--fill); color: var(--ink);
	font-family: inherit; font-size: .94rem; font-weight: 600; line-height: 1;
	text-decoration: none !important; white-space: nowrap; cursor: pointer;
	transition: transform .35s var(--spring), background .2s, box-shadow .2s, filter .2s;
}
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.95); }
.btn.primary {
	color: #fff;
	background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), var(--tint);
	box-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), inset 0 0 0 .5px rgba(255, 255, 255, .25), 0 4px 12px rgba(42, 92, 174, .28);
}
.btn.primary:hover { filter: brightness(1.07); background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%), var(--tint); }
.btn.danger { color: var(--bad); background: rgba(208, 52, 44, .1); }
.btn.danger:hover { background: rgba(208, 52, 44, .16); }
.btn.plain { background: transparent; color: var(--tint); padding: 0 10px; }
.btn.plain:hover { background: var(--tint-soft); }
.btn.small { min-height: 32px; padding: 0 14px; font-size: .85rem; }
.btn.block { display: flex; width: 100%; min-height: 50px; font-size: 1.02rem; }
.btn.glassy { background: rgba(255, 255, 255, .72); box-shadow: var(--glass-edge), 0 2px 8px rgba(0, 0, 0, .06); }
.btn.glassy:hover { background: rgba(255, 255, 255, .92); }
button.link { background: none; border: 0; color: var(--tint); cursor: pointer; font: inherit; font-size: .85rem; padding: 0 4px; }

/* ---------- 內容層：白色分組 ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: 18px 20px; margin-bottom: 16px; }
.card > h2:first-child { font-size: 1.1rem; margin-bottom: .8em; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid.two > .card { margin: 0; }
.grid.two > .wide { grid-column: 1 / -1; }
.group { margin: 26px 0 0; }
.group-t { display: flex; justify-content: space-between; align-items: baseline; margin: 0 6px 8px; font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
.group-t a { font-size: .92rem; font-weight: 500; }

.list { background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.list.inset { margin-bottom: 16px; }
.row {
	position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px;
	color: var(--ink); text-decoration: none !important; transition: background .15s;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; transform: scaleY(.5); transform-origin: top; background: rgba(29, 29, 31, .16); }
.row.has-ico + .row.has-ico::before { left: 58px; }
.row.link:hover { background: var(--surface-2); }
.row.link:active { background: var(--fill); }
.row > .ico:last-child { color: var(--ink-3); }
.row-l { flex: 1; min-width: 0; }
.row-l b { display: block; font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.row-l small { display: block; color: var(--ink-2); font-size: .82rem; margin-top: 1px; line-height: 1.4; }
.row-v { color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.row-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--fill); color: var(--ink-2); flex: none; }
details.list > summary { list-style: none; cursor: pointer; }
details.list > summary::-webkit-details-marker { display: none; }
details.list > summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); margin-right: 4px; transition: transform .3s var(--ease); }
details.list[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.co-empty { margin: 0 0 16px; padding: 28px 18px; text-align: center; color: var(--ink-2); background: var(--surface); border-radius: var(--r-card); }

/* ---------- 首頁 ---------- */
.dash { display: grid; gap: 0 22px; grid-template-columns: minmax(0, 1fr); max-width: 1180px; }
.dash-a, .dash-b { min-width: 0; }
@media (min-width: 1180px) { .dash { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } .dash-b > .group:first-child { margin-top: 0; } }
.widget { display: block; border-radius: var(--r-card); padding: 18px 20px; color: var(--ink); text-decoration: none !important; position: relative; overflow: hidden; }
.widget.next {
	background:
		radial-gradient(130% 150% at 100% 0%, rgba(214, 150, 70, .28), rgba(214, 150, 70, 0) 58%),
		linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 50%),
		var(--glass);
	-webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
	box-shadow: var(--glass-edge), var(--glass-drop);
	margin-bottom: 12px;
}
.w-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.w-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.w-when { font-size: .82rem; font-weight: 650; color: var(--brass); }
.next-date { display: flex; align-items: center; gap: 14px; margin: 6px 0 0; }
.next-date b { font-size: 3.3rem; line-height: 1; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.next-date span { color: var(--ink-2); font-size: .95rem; line-height: 1.35; font-weight: 500; }
.next-place { margin: 6px 0 14px; font-weight: 550; }
.next-place:last-child { margin-bottom: 0; }
.w-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 32px; }
.widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 4px; }
.widget.mini { background: var(--surface); min-height: 108px; padding: 14px 16px; transition: transform .35s var(--spring); }
.widget.mini:active { transform: scale(.96); }
.widget.mini .w-label { display: block; padding-right: 30px; }
.widget.mini b { display: block; margin-top: 18px; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.widget.mini b small { font-size: .8rem; font-weight: 600; letter-spacing: 0; }
.ring { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.5; }
.ring-bg { stroke: var(--fill-2); }
.ring-fg { stroke: var(--ok); stroke-linecap: round; }
.ring.bad .ring-fg { stroke: var(--bad); }
.install-tip[hidden] { display: none; }
.install-tip .app-ico { width: 44px; height: 44px; border-radius: 11px; flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.install-tip .row-l b { white-space: normal; }

/* 行程列 */
.ev-date { flex: none; width: 46px; text-align: center; line-height: 1.15; }
.ev-date b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ev-date small { color: var(--ink-2); font-size: .74rem; }
.row.ev .row-l { padding-left: 12px; border-left: 3px solid var(--ink-3); }
.row.ev.k-performance .row-l { border-left-color: var(--brass); }
.row.ev.k-ensemble .row-l { border-left-color: #c4954e; }
.row.ev.k-meeting .row-l { border-left-color: var(--tint); }
.row.ev.k-training .row-l, .row.ev.k-lecture .row-l { border-left-color: var(--ok); }

/* ---------- 標籤、統計 ---------- */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.55; background: var(--fill); color: var(--ink-2); vertical-align: middle; white-space: nowrap; }
.badge.ok, .badge.st-active, .badge.a-good { background: rgba(28, 138, 74, .12); color: var(--ok); }
.badge.warn, .badge.st-leave, .badge.st-trial, .badge.a-lent { background: rgba(176, 104, 0, .12); color: var(--warn); }
.badge.bad, .badge.a-repair { background: rgba(208, 52, 44, .11); color: var(--bad); }
.badge.info { background: var(--tint-soft); color: var(--tint); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stats > div { background: var(--surface); border-radius: var(--r-tile); padding: 12px 16px; }
.card .stats > div { background: var(--surface-2); }
.stats span { display: block; color: var(--ink-2); font-size: .8rem; font-weight: 500; }
.stats b { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stats b a { color: inherit; }

/* ---------- 分段控制 ---------- */
.co-seg-wrap { overflow-x: auto; margin: 0 -4px 18px; padding: 3px 4px; scrollbar-width: none; }
.co-seg-wrap.scrolls { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.co-seg-wrap::-webkit-scrollbar { display: none; }
.co-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--fill); white-space: nowrap; }
.co-tabs a { position: relative; padding: 8px 16px; border-radius: 999px; color: var(--ink-2); font-size: .9rem; font-weight: 600; text-decoration: none !important; transition: color .2s, background .3s var(--ease), box-shadow .3s var(--ease); }
.co-tabs a:hover { color: var(--ink); }
.co-tabs a.on { background: var(--lens); color: var(--tint); box-shadow: var(--lens-shadow); }

/* ---------- 表單 ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
	width: 100%; min-height: 46px; padding: 11px 14px;
	border: 0; border-radius: var(--r-field); background: var(--fill); color: var(--ink);
	font-size: 1rem; outline: none; transition: box-shadow .2s, background-color .2s;
	-webkit-appearance: none; appearance: none;
}
select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857a70' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
input:focus, select:focus, textarea:focus { background-color: var(--surface); box-shadow: 0 0 0 3px rgba(42, 92, 174, .26), inset 0 0 0 1px rgba(42, 92, 174, .4); }
input[readonly] { color: var(--ink-2); background-color: var(--surface-2); box-shadow: inset 0 0 0 1px var(--sep); }
input[type=date] { min-width: 0; }
textarea { line-height: 1.6; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--tint); flex: none; margin: 0; }
input[type=file] { font-size: .9rem; }
.co-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.co-form label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 550; color: var(--ink-2); min-width: 0; }
.co-form label > input, .co-form label > select, .co-form label > textarea { color: var(--ink); font-size: 1rem; font-weight: 400; }
.co-form .full { grid-column: 1 / -1; }
.co-form fieldset { border: 0; border-radius: var(--r-tile); background: var(--surface-2); padding: 12px 14px; margin: 0; min-width: 0; }
.co-form legend { float: left; width: 100%; padding: 0 0 8px; color: var(--ink-2); font-size: .82rem; font-weight: 600; }
label.co-check, .co-form label.co-check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; color: var(--ink); margin: 5px 16px 5px 0; font-size: .95rem; font-weight: 400; }
.co-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.co-filter input:not([type=checkbox]):not([type=radio]), .co-filter select { width: auto; min-width: 150px; min-height: 42px; border-radius: 999px; padding-left: 16px; background-color: var(--surface); }
.co-filter input[type=search]:not([type=checkbox]):not([type=radio]) { flex: 1 1 240px; max-width: 400px; padding-left: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857a70' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px 50%; background-size: 17px; }
.co-filter .btn { min-height: 42px; }
.co-inline { display: inline; margin: 0; }
.co-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.co-inline-form input:not([type=checkbox]):not([type=radio]) { width: auto; flex: 1 1 200px; }
.co-inline-form label { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); }
.co-inline-form label input:not([type=checkbox]):not([type=radio]) { width: auto; }
.co-copy { font-family: ui-monospace, Menlo, monospace; font-size: .85rem !important; }
.co-pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.co-bar2 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.co-bar2 .co-filter { margin: 0; }
.co-monthnav { display: inline-flex; gap: 4px; align-items: center; padding: 3px; border-radius: 999px; background: var(--fill); }
.co-monthnav .btn { background: transparent; min-height: 36px; padding: 0 14px; }
.co-monthnav .btn:hover { background: var(--lens); box-shadow: var(--lens-shadow); }
.co-monthnav b { font-size: 1.02rem; min-width: 7em; text-align: center; font-variant-numeric: tabular-nums; }
.co-formbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.co-formbar.sticky, .co-sticky {
	position: sticky; bottom: 16px; z-index: 5; display: flex; gap: 8px; align-items: center;
	width: max-content; max-width: 100%; margin: 16px 0; padding: 7px; border-radius: 999px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 45%), var(--glass);
	-webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
	box-shadow: var(--glass-edge), var(--glass-drop);
}
.co-steps { padding-left: 1.3em; margin: 0 0 10px; }
.co-steps li { margin-bottom: 8px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r-card); margin-bottom: 16px; -webkit-overflow-scrolling: touch; }
.co-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.co-table th, .co-table td { padding: 11px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid rgba(29, 29, 31, .07); }
.co-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--ink-2); font-size: .76rem; font-weight: 600; white-space: nowrap; }
.co-table tbody tr:last-child td { border-bottom: 0; }
.co-table tbody tr:hover td { background: var(--surface-2); }
.co-table td.num, .co-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.co-table .nowrap { white-space: nowrap; }
.co-table tr.today td { background: var(--tint-soft); }
.co-table tr.warn td { background: rgba(176, 104, 0, .06); }
.co-table tr.done td { color: var(--ink-2); }
.co-table tr.late td:first-child { color: var(--bad); }
.co-table input:not([type=checkbox]):not([type=radio]), .co-table select { min-height: 38px !important; padding: 7px 12px !important; border-radius: 12px !important; }
.co-table select { padding-right: 32px !important; }
.co-table input[type=number] { width: 6.5em; }
.co-table td p { margin: 0; }
.co-table.grid { font-size: .82rem; }
.co-table.grid th, .co-table.grid td { padding: 7px 8px; text-align: center; white-space: nowrap; border-left: 1px solid rgba(29, 29, 31, .05); }
.co-table.grid td.nm, .co-table.grid th:nth-child(2) { text-align: left; position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 rgba(29, 29, 31, .08); }
.co-table.grid thead th:nth-child(2) { z-index: 2; background: var(--surface-2); }
.co-table.grid .off { color: var(--ink-3); background: var(--surface-2); font-size: .72rem; }
.co-table.grid .a0 { color: var(--bad); font-weight: 700; }
.co-table.grid .a2 { color: var(--warn); }
.co-table.grid .a8 { color: var(--tint); }
.co-table.fee td { min-width: 2.8em; }
.f-paid { color: var(--ok); }
.f-ex { color: var(--ink-3); }
.f-disc { color: var(--tint); font-size: .75rem; }
.f-def { color: var(--warn); }
.f-due { color: var(--bad); font-weight: 700; background: rgba(208, 52, 44, .06); }
.f-na { color: var(--ink-3); }

.months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.months .m { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 62px; border-radius: var(--r-tile); background: var(--surface); }
.months .m span { font-size: .72rem; color: var(--ink-2); }
.months .m b { font-size: .95rem; margin-top: 2px; }
.months .m.f-paid { background: rgba(28, 138, 74, .1); }
.months .m.f-due { background: rgba(208, 52, 44, .09); }
.months .m.f-disc, .months .m.f-ex { background: var(--surface-2); }
.months .m.f-disc b { font-size: .72rem; }
.year-t { margin: 0 6px 8px; font-size: .95rem; color: var(--ink-2); font-weight: 600; }

/* ---------- 行程 ---------- */
.co-agenda { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.co-agenda .day { display: flex; gap: 14px; background: var(--surface); border-radius: var(--r-card); padding: 14px; }
.co-agenda .day.today { box-shadow: inset 0 0 0 2px var(--tint); }
.co-agenda .day.past { opacity: .55; }
.co-agenda .date { flex: 0 0 44px; text-align: center; padding-top: 2px; }
.co-agenda .date b { display: block; font-size: 1.6rem; line-height: 1.05; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.co-agenda .date span { font-size: .74rem; color: var(--ink-2); }
.co-agenda .today .date b, .co-agenda .today .date span { color: var(--tint); }
.co-agenda .items { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.co-agenda .item { display: grid; grid-template-columns: 3.3em 1fr; column-gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--ink-3); color: var(--ink); text-decoration: none !important; transition: background .15s; }
.co-agenda .item:hover { background: var(--fill); }
.co-agenda .time { color: var(--ink-2); font-variant-numeric: tabular-nums; grid-row: span 2; font-size: .9rem; padding-top: 1px; }
.co-agenda .what { font-weight: 600; }
.co-agenda .meta { color: var(--ink-2); font-size: .82rem; }
.co-agenda .k-performance { border-left-color: var(--brass); }
.co-agenda .k-ensemble { border-left-color: #c4954e; }
.co-agenda .k-meeting { border-left-color: var(--tint); }
.co-agenda .k-training, .co-agenda .k-lecture { border-left-color: var(--ok); }

/* ---------- 點名 ---------- */
.co-roll fieldset { border: 0; padding: 0; margin: 0 0 16px; background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.co-roll legend { float: left; width: 100%; padding: 14px 16px 4px; font-size: .78rem; font-weight: 700; color: var(--ink-2); letter-spacing: .06em; }
.roll-row { clear: both; position: relative; display: grid; grid-template-columns: minmax(9em, 1fr) auto minmax(9em, 1fr); gap: 8px 14px; align-items: center; padding: 10px 16px; }
.roll-row + .roll-row::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; height: 1px; transform: scaleY(.5); background: rgba(29, 29, 31, .16); }
.roll-row .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.roll-row .who b { font-weight: 600; }
.roll-row.empty .who b { color: var(--bad); }
.roll-row .note { min-height: 38px !important; padding: 7px 14px !important; font-size: .9rem !important; border-radius: 999px !important; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--fill); }
.seg label { margin: 0; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 34px; padding: 0 6px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); font-variant-numeric: tabular-nums; user-select: none; transition: background .3s var(--ease), color .2s, box-shadow .3s var(--ease), transform .35s var(--spring); }
.seg span:active { transform: scale(.9); }
.seg input:checked + span { background: var(--lens); box-shadow: var(--lens-shadow); color: var(--ink); }
.seg input[value="1"]:checked + span { color: var(--ok); }
.seg input[value="0.8"]:checked + span, .seg input[value="0.5"]:checked + span { color: var(--tint); }
.seg input[value="0.2"]:checked + span { color: var(--warn); }
.seg input[value="0"]:checked + span { color: var(--bad); }
.seg input:focus-visible + span { outline: 3px solid rgba(42, 92, 174, .45); }
.co-roll-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.co-legend { color: var(--ink-2); font-size: .82rem; }

.co-pick fieldset { border: 0; border-radius: var(--r-tile); background: var(--surface-2); padding: 12px 14px; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.co-pick legend { float: left; width: 100%; font-weight: 650; font-size: .85rem; padding-bottom: 4px; }
.co-pick label.pick { display: inline-flex; align-items: center; gap: 6px; }
.co-pick label.low { color: var(--bad); }
.co-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 20px; }
.co-roster h3 { margin: 0; font-size: .8rem; color: var(--ink-2); }
.co-roster p { margin: 0 0 6px; }
.co-fill { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.co-fill input { width: 7.5em !important; }
.co-fill label { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.co-checks { list-style: none; margin: 0 0 12px; padding: 0; }
.co-checks li { display: grid; grid-template-columns: 1fr 8em 10em auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(29, 29, 31, .07); }
.co-checks li label:first-child { display: flex; align-items: center; gap: 8px; }
.co-checks li.done label:first-child { color: var(--ink-2); text-decoration: line-through; }
.co-checks li.late label:first-child { color: var(--bad); }
.co-checks .rm { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.co-checks input { min-height: 38px !important; padding: 7px 12px !important; }
details { margin: 12px 0; }
details > summary { cursor: pointer; font-weight: 600; padding: 4px 0; }

.co-quota { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 18px; }
.co-quota a { display: flex; flex-direction: column; padding: 10px 14px; background: var(--surface); border-radius: var(--r-tile); color: var(--ink); text-decoration: none !important; transition: transform .35s var(--spring); }
.co-quota a:active { transform: scale(.96); }
.co-quota span { font-size: .75rem; color: var(--ink-2); }
.co-quota b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.co-quota small { color: var(--ink-2); font-weight: 400; }
.co-quota a.under b { color: var(--warn); }
.co-quota a.over b { color: var(--tint); }

.co-dl { display: grid; grid-template-columns: 8em 1fr; gap: 10px 14px; margin: 0; }
.co-dl dt { color: var(--ink-2); }
.co-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.co-text { line-height: 1.8; }
.co-text p { margin: 0 0 .8em; }
.co-res { padding-left: 1.4em; margin: 0; }
.co-res li { margin-bottom: 10px; }
.co-res p { display: inline; }
.co-score { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 16px; }
.co-score label { flex-direction: row !important; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink) !important; font-size: .9rem !important; font-weight: 400 !important; }
.co-score label input { width: 5.5em !important; text-align: center; }
.co-cards { list-style: none; margin: 0 0 16px; padding: 0; background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.co-cards li { position: relative; }
.co-cards li + li::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: 1px; transform: scaleY(.5); background: rgba(29, 29, 31, .16); }
.co-cards a { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; color: var(--ink); text-decoration: none !important; transition: background .15s; }
.co-cards a:hover { background: var(--surface-2); }
.co-cards b { font-size: 1.02rem; font-weight: 600; }
.co-cards span { color: var(--ink-2); font-size: .88rem; }

.avatar { --s: 32px; display: inline-grid; place-items: center; width: var(--s); height: var(--s); flex: none; border-radius: 50%; overflow: hidden; background: var(--fill); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.ini { background: hsl(var(--h) 40% 90%); color: hsl(var(--h) 35% 30%); font-weight: 700; font-size: calc(var(--s) * .42); letter-spacing: -.02em; }
.avatar.ini.two { font-size: calc(var(--s) * .34); }

.acct-list .acct-row { position: relative; display: grid; grid-template-columns: auto minmax(9em, 1fr) minmax(0, 1.7fr) auto; gap: 8px 14px; align-items: center; padding: 12px 16px; }
.acct-list .acct-row + .acct-row::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; height: 1px; transform: scaleY(.5); background: rgba(29, 29, 31, .16); }
.acct-list .acct-row.focus { background: var(--tint-soft); }
.acct-main { min-width: 0; }
.acct-main b { display: block; }
.acct-main small { display: block; color: var(--ink-2); font-size: .8rem; }
.acct-state { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: .78rem; }
.acct-fields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; }
.acct-act { display: flex; gap: 4px; }

.co-preview {
	position: sticky; top: 12px; z-index: 20; display: flex; align-items: center; gap: 10px;
	width: max-content; max-width: 100%; margin: -4px auto 18px; padding: 5px 5px 5px 14px; border-radius: 999px; font-size: .9rem;
}
.co-preview > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-preview .ico { color: var(--brass); }
.co-preview form { margin: 0; }
.co-preview a, .co-preview button { flex: none; border: 0; background: var(--fill); color: var(--ink); font-family: inherit; font-size: .82rem; font-weight: 600; line-height: 1; padding: 9px 13px; border-radius: 999px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.co-preview button { color: #fff; background: var(--tint); }
.row.choose { cursor: pointer; }
.row.choose input { position: absolute; opacity: 0; }
.row.choose .tick { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); flex: none; transition: background .2s, box-shadow .2s; }
.row.choose input:checked ~ .tick { box-shadow: none; background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat; }
.row.choose:has(input:checked) { background: var(--tint-soft); }
.row.choose input:focus-visible ~ .tick { outline: 3px solid rgba(42, 92, 174, .45); }
.row.field { flex-wrap: wrap; }
.row.field select { flex: 1 1 220px; }

/* ---------- 提示訊息 ---------- */
.co-toasts { position: fixed; z-index: 80; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(560px, calc(100vw - 32px)); pointer-events: none; }
.co-toast { pointer-events: auto; max-width: 100%; padding: 12px 18px; border-radius: 22px; font-size: .93rem; font-weight: 550; animation: toast-in .55s var(--spring); cursor: pointer; }
.co-toast::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 10px; vertical-align: 1px; }
.co-toast.err::before { background: var(--bad); }
.co-toast.warn::before { background: var(--warn); }
.co-toast.out { animation: toast-out .35s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-16px) scale(.94); } }
@media (min-width: 1024px) { .co-toasts { left: calc(50% + 138px); } }

/* ---------- 面板（更多、帳號）---------- */
.co-sheet { position: fixed; inset: 0; z-index: 70; }
.co-sheet[hidden] { display: none; }
.co-sheet-bg { position: absolute; inset: 0; background: rgba(40, 28, 16, .16); animation: fade .3s ease; }
.co-sheet-panel {
	position: absolute; left: calc(8px + var(--safe-l)); right: calc(8px + var(--safe-r)); bottom: calc(8px + var(--safe-b)); max-height: 82vh; overflow-y: auto; overscroll-behavior: contain;
	padding: 8px 16px 18px; border-radius: var(--r-sheet); animation: sheet-in .55s var(--ease);
	max-width: 560px; margin: 0 auto;
}
.co-sheet.closing .co-sheet-panel { animation: sheet-out .32s var(--ease) forwards; }
.co-sheet.closing .co-sheet-bg { animation: fade .3s ease reverse forwards; }
@keyframes sheet-in { from { transform: translateY(110%); } }
@keyframes sheet-out { to { transform: translateY(110%); } }
@keyframes fade { from { opacity: 0; } }
.co-sheet-grab { width: 36px; height: 5px; border-radius: 3px; background: rgba(29, 29, 31, .2); margin: 0 auto 14px; }
.co-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 6px; padding: 4px 0 6px; }
.co-tiles a { display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--ink); font-size: .76rem; font-weight: 550; text-align: center; text-decoration: none !important; }
.co-tiles .tile-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: var(--r-tile); background: rgba(255, 255, 255, .62); box-shadow: var(--glass-edge), 0 2px 6px rgba(0, 0, 0, .05); color: var(--ink); transition: transform .35s var(--spring), background .2s; }
.co-tiles a:active .tile-ico { transform: scale(.9); }
.co-tiles a.on .tile-ico { background: var(--lens); box-shadow: var(--lens-shadow); color: var(--tint); }
.co-tiles a.on { color: var(--tint); }
.co-acct-head { display: flex; align-items: center; gap: 14px; padding: 4px 6px 16px; }
.co-acct-head b { display: block; font-size: 1.15rem; }
.co-acct-head small { color: var(--ink-2); }
.co-menu { background: rgba(255, 255, 255, .62); border-radius: 22px; overflow: hidden; box-shadow: var(--glass-edge); }
.co-menu a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; color: var(--ink); text-decoration: none !important; transition: background .15s; }
.co-menu a:hover { background: rgba(255, 255, 255, .72); }
.co-menu a + a::before { content: ""; position: absolute; top: 0; left: 48px; right: 0; height: 1px; transform: scaleY(.5); background: rgba(29, 29, 31, .16); }
.co-menu a > span { flex: 1; }
.co-menu a .ico:first-child { color: var(--ink-2); }
.co-menu a .ico:last-child:not(:first-child) { color: var(--ink-3); }
.co-menu a.danger, .co-menu a.danger .ico:first-child { color: var(--bad); }
@media (min-width: 1024px) {
	.co-sheet.acct .co-sheet-bg { background: transparent; }
	.co-sheet.acct .co-sheet-panel { left: 20px; right: auto; bottom: 84px; width: 300px; margin: 0; border-radius: 24px; padding: 14px 12px 12px; transform-origin: 20% 100%; animation: pop-in .45s var(--spring); }
	.co-sheet.acct .co-sheet-grab { display: none; }
	.co-sheet.acct .co-menu { border-radius: 14px; }
	.co-sheet.acct.closing .co-sheet-panel { animation: pop-out .2s ease forwards; }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.94); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(10px) scale(.94); } }

/* ---------- 登入、說明頁 ---------- */
body.co-login { display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100dvh; padding: calc(24px + var(--safe-t)) 16px calc(24px + var(--safe-b)); background: #2a1d14; }
.login-photo { position: fixed; inset: 0; background-size: cover; background-position: center 45%; transform: scale(1.04); }
.login-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 18, 8, .05), rgba(30, 18, 8, .45)); }
.login-card { position: relative; width: min(400px, 100%); padding: 30px 26px 22px; border-radius: var(--r-sheet); text-align: center; color: var(--ink); background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .1) 45%), rgba(255, 252, 248, .62); animation: card-in .8s var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.login-mark { display: block; width: 64px; height: 64px; margin: 0 auto 12px; background: currentColor; -webkit-mask: url(img/mark-black.webp) center / contain no-repeat; mask: url(img/mark-black.webp) center / contain no-repeat; }
.login-card h1 { font-size: 1.55rem; margin: 0; letter-spacing: .05em; }
.login-sub { margin: 4px 0 22px; color: var(--ink-2); font-weight: 500; letter-spacing: .08em; }
.login-msg { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--r-field); background: rgba(208, 52, 44, .1); color: var(--bad); font-size: .9rem; text-align: left; }
.login-msg[hidden] { display: none; }
.login-google { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.g-btn { width: 100%; max-width: 320px; min-height: 44px; display: flex; justify-content: center; transition: opacity .2s; }
.g-btn.busy { opacity: .4; pointer-events: none; }
.login-note { margin: 0; color: var(--ink-2); font-size: .82rem; }
.login-pw { margin: 18px 0 0; text-align: left; }
.login-pw > summary { list-style: none; text-align: center; color: var(--tint); font-weight: 600; font-size: .9rem; padding: 6px; }
.login-pw > summary::-webkit-details-marker { display: none; }
.login-pw[open] > summary { color: var(--ink-2); }
.login-pw form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.login-pw label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--ink-2); font-weight: 550; }
.login-pw input { background-color: rgba(255, 255, 255, .72) !important; }
.login-help { margin: 18px 0 0; color: var(--ink-2); font-size: .8rem; }
.login-help a { margin-left: 8px; }
body.co-doc { background: var(--bg); }
.doc { max-width: 680px; margin: 0 auto; padding: calc(40px + var(--safe-t)) 20px 60px; line-height: 1.8; }
.doc.center { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.doc .login-mark { margin: 0 0 16px; }
.doc.center .login-mark { margin: 0 auto 16px; }
.doc h1 { font-size: 1.6rem; line-height: 1.35; margin-bottom: 20px; }
.doc h2 { font-size: 1.05rem; margin: 26px 0 6px; }
.doc p { margin: 0 0 10px; }

/* ---------- 列印 ---------- */
.printonly { display: none; }
.sheet h1 { text-align: center; font-size: 1.35rem; margin-bottom: 16px; }
.co-table.print td.sign { min-width: 10em; height: 2.6em; }
.sheet-foot { text-align: right; margin-top: 32px; }
.slip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.slip { border: 1px dashed var(--ink-3); border-radius: var(--r-tile); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; break-inside: avoid; background: var(--surface); }
.slip b { font-size: 1.1rem; }
.slip code { font-size: 1.05rem; letter-spacing: .03em; }
body.co-print { background: #fff; color: #000; }
body.co-print .co-main { margin: 0; max-width: none; padding: 20px; }
body.co-print .printonly { display: block; text-align: center; }
@media print {
	@page { size: A4; margin: 12mm; }
	body.co { background: #fff !important; color: #000; font-size: 11pt; }
	.co-ambient, .co-side, .co-bar, .co-tabbar, .co-toasts, .co-sheet, .co-preview, .noprint, .co-actions, .co-seg-wrap, .co-filter, .co-sticky, .co-formbar, form .btn, .co-delete { display: none !important; }
	.co-main { margin: 0 !important; padding: 0 !important; }
	.printonly { display: block; text-align: center; }
	.table-wrap, .card, .list { box-shadow: none; border-radius: 0; overflow: visible; background: #fff; }
	.co-table { font-size: 9pt; }
	.co-table th, .co-table td { border: 1px solid #999 !important; color: #000; background: #fff !important; }
	.co-table.grid td.nm { position: static; }
	a { color: inherit; }
}

/* ---------- 平板與手機（<1024）：頂端列＋浮動分頁列 ---------- */
@media (max-width: 1023px) {
	.co-side { display: none; }
	.co-main { padding: calc(62px + var(--safe-t)) calc(20px + var(--safe-r)) calc(116px + var(--safe-b)) calc(20px + var(--safe-l)); max-width: 960px; margin: 0 auto; }
	.co-bar {
		display: flex; align-items: center; justify-content: space-between; gap: 8px;
		position: fixed; z-index: 40; top: 0; left: 0; right: 0;
		height: calc(54px + var(--safe-t)); padding: var(--safe-t) calc(12px + var(--safe-r)) 0 calc(12px + var(--safe-l));
		background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
	}
	/* 捲動邊緣：內容滑到頂端列下方時漸漸模糊，不畫硬邊線 */
	.co-bar::before {
		content: ""; position: absolute; inset: 0 0 -18px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
		background: linear-gradient(180deg, rgba(245, 242, 238, .88), rgba(245, 242, 238, .6) 60%, rgba(245, 242, 238, 0));
		-webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%);
		-webkit-mask: linear-gradient(180deg, #000 55%, transparent); mask: linear-gradient(180deg, #000 55%, transparent);
	}
	body.scrolled .co-bar::before { opacity: 1; }
	.co-bar-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); }
	.co-bar-mark .mark { width: 28px; height: 28px; }
	.co-bar-title { position: absolute; left: 70px; right: 70px; bottom: 0; height: 54px; display: grid; place-items: center; font-weight: 650; font-size: 1rem; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .4s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
	body.scrolled .co-bar-title { opacity: 1; transform: none; }
	.co-bar-me { display: grid; place-items: center; width: 42px; height: 42px; border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer; transition: transform .35s var(--spring); }
	.co-bar-me:active { transform: scale(.9); }
	.co-bar-me .avatar { --s: 34px !important; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 8px rgba(0, 0, 0, .12); }

	.co-tabbar {
		display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
		position: fixed; z-index: 40; left: 50%; bottom: calc(12px + var(--safe-b));
		width: min(calc(100% - 24px - var(--safe-l) - var(--safe-r)), 480px); height: 64px; padding: 4px; border-radius: 999px;
		transform: translateX(-50%); transition: height .45s var(--ease), width .45s var(--ease);
	}
	.co-tabbar a, .co-tabbar button {
		display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
		height: 100%; min-width: 0; border: 0; border-radius: 999px; background: none;
		color: var(--ink); font-family: inherit; font-size: .66rem; font-weight: 600; line-height: 1; text-decoration: none !important; cursor: pointer;
		transition: background .35s var(--ease), box-shadow .35s var(--ease), color .2s, transform .35s var(--spring);
	}
	.co-tabbar span { transition: opacity .2s, max-height .3s var(--ease); max-height: 14px; overflow: hidden; white-space: nowrap; }
	.co-tabbar a:active, .co-tabbar button:active { transform: scale(.9); }
	.co-tabbar .on { color: var(--tint); background: var(--lens); box-shadow: var(--lens-shadow); }
	/* 往下捲時分頁列縮小，往上捲恢復 */
	body.tb-min .co-tabbar { height: 50px; width: min(calc(100% - 96px), 330px); }
	body.tb-min .co-tabbar span { opacity: 0; max-height: 0; }

	.co-sticky, .co-formbar.sticky { bottom: calc(88px + var(--safe-b)); }
	.co-preview { top: calc(60px + var(--safe-t)); }
	.co-toasts { top: calc(60px + var(--safe-t)); }
}

/* 摺疊手機打開、平板直式（600–1023） */
@media (min-width: 600px) and (max-width: 1023px) {
	.co-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* 手機（<600） */
@media (max-width: 599px) {
	h1, .co-head h1 { font-size: 1.9rem; }
	.hello h1 { font-size: 2rem; }
	.co-main { padding-left: calc(16px + var(--safe-l)); padding-right: calc(16px + var(--safe-r)); }
	.grid.two { grid-template-columns: 1fr; }
	.co-form { grid-template-columns: 1fr; }
	.co-head { flex-direction: column; align-items: stretch; margin-bottom: 16px; }
	.co-actions { width: 100%; }
	.co-actions .btn { flex: 1 1 auto; }
	.card { padding: var(--pad-card); }
	.co-filter input:not([type=checkbox]):not([type=radio]), .co-filter select { flex: 1 1 140px; min-width: 0; }
	.co-filter input[type=search]:not([type=checkbox]):not([type=radio]) { max-width: none; flex-basis: 100%; }
	.co-filter:not(:has(select)) input[type=search]:not([type=checkbox]):not([type=radio]) { flex: 1 1 0; }
	.widgets { gap: 8px; }
	.widget.mini { min-height: 98px; padding: 12px; }
	.widget.mini b { font-size: 1.3rem; margin-top: 14px; }
	.widget.mini .w-label { font-size: .72rem; padding-right: 24px; }
	.ring { width: 22px; height: 22px; top: 10px; right: 10px; }
	.next-date b { font-size: 2.9rem; }
	.stats { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
	.stats > div { padding: 10px 12px; }
	.stats b { font-size: 1.2rem; }
	.co-dl { grid-template-columns: 6.5em 1fr; }
	.months { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.slip-grid { grid-template-columns: 1fr; }
	.co-checks li { grid-template-columns: 1fr 1fr; }
	.co-checks li label:first-child { grid-column: 1 / -1; }
	.co-preview { font-size: .82rem; gap: 8px; padding-left: 12px; }
	.co-preview a, .co-preview button { padding: 8px 11px; }
	.co-bar2 { flex-direction: column; align-items: stretch; }
	.co-monthnav { justify-content: space-between; }
	.co-bar2 .co-filter select { width: 100%; }

	.roll-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; }
	.roll-row + .roll-row::before { left: 14px; }
	.seg { display: flex; width: 100%; }
	.seg label { flex: 1; }
	.seg span { width: 100%; min-width: 0; height: 40px; }

	.acct-list .acct-row { grid-template-columns: auto 1fr; }
	.acct-list .acct-row + .acct-row::before { left: 16px; }
	.acct-list .acct-fields, .acct-list .acct-act { grid-column: 1 / -1; }
	.acct-list .acct-fields { grid-template-columns: 1fr; }

	.table-wrap.stack { background: transparent; overflow: visible; border-radius: 0; }
	.co-table.stack thead { display: none; }
	.co-table.stack, .co-table.stack tbody, .co-table.stack tr, .co-table.stack td { display: block; width: 100%; }
	.co-table.stack tr { background: var(--surface); border-radius: var(--r-card); padding: 12px 16px; margin-bottom: 10px; }
	.co-table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 5px 0; border: 0; text-align: right; min-height: 30px; }
	.co-table.stack td::before { content: attr(data-label); color: var(--ink-2); font-size: .82rem; text-align: left; flex: none; }
	.co-table.stack td:first-child { font-size: 1.05rem; font-weight: 650; text-align: left; padding-bottom: 6px; }
	.co-table.stack td:first-child::before { display: none; }
	.co-table.stack td:empty { display: none; }
	.co-table.stack tbody tr:hover td { background: none; }
	.co-table.stack td input, .co-table.stack td select { max-width: 62%; }
}
@media (max-width: 599px) and (min-height: 640px) {
	body.co-login { align-items: flex-start; padding-top: calc(56px + var(--safe-t)); }
	.login-card { padding: 26px 22px 20px; }
}
/* 加入主畫面後（App 模式） */
@media (display-mode: standalone) {
	body.co { -webkit-user-select: none; user-select: none; }
	input, textarea, .co-text, .co-table, .co-dl, code { -webkit-user-select: text; user-select: text; }
	.install-tip { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 手機：頁面動作放在標題同一列（小膠囊），不另外佔一整條 */
@media (max-width: 599px) {
	.co-head { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
	.co-head-t { flex: 1 1 auto; }
	.co-actions { width: auto; margin-left: auto; }
	.co-actions .btn { flex: none; min-height: 36px; padding: 0 14px; font-size: .88rem; }
}

/* 長標題縮小 */
.co-head h1.long { font-size: 1.65rem; line-height: 1.25; }
@media (max-width: 599px) { .co-head h1.long { font-size: 1.4rem; } }

/* 展開區塊：統一用右側箭頭，不用瀏覽器預設三角形 */
details:not(.list):not(.login-pw) > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0; color: var(--ink); font-weight: 600; user-select: none; }
details:not(.list):not(.login-pw) > summary::-webkit-details-marker { display: none; }
details:not(.list):not(.login-pw) > summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .3s var(--ease); }
details:not(.list):not(.login-pw)[open] > summary::after { transform: rotate(-135deg); }
details:not(.list):not(.login-pw)[open] > summary { margin-bottom: 8px; }
.card details { border-top: 1px solid rgba(29, 29, 31, .07); margin: 8px 0 0; padding-top: 6px; }

/* 勾選與單選：圓形，選取時填強調色＋白色勾 */
input[type=checkbox], input[type=radio] {
	-webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
	background: var(--surface); box-shadow: inset 0 0 0 1.5px rgba(29, 29, 31, .28); cursor: pointer; vertical-align: middle;
	transition: background-color .2s, box-shadow .2s, transform .35s var(--spring);
}
input[type=checkbox]:active, input[type=radio]:active { transform: scale(.88); }
input[type=checkbox]:checked {
	background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 12.5 3.8 3.8 7.2-8'/%3E%3C/svg%3E") center / 14px no-repeat;
	box-shadow: none;
}
input[type=radio]:checked { background: var(--surface); box-shadow: inset 0 0 0 7px var(--tint); }
input[type=checkbox]:disabled { opacity: .4; cursor: default; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid rgba(42, 92, 174, .45); outline-offset: 2px; }

/* 螢幕較矮（平板橫放）時，側欄縮緊 */
@media (min-width: 1024px) and (max-height: 900px) {
	.co-brand { padding-bottom: 8px; }
	.co-side-nav a { min-height: 35px; }
	.co-side-nav .grp { margin-bottom: 6px; }
	.co-side-nav .grp-t { padding-bottom: 2px; }
}

/* 場次列表 */
.sessions .row.off .row-l b { color: var(--ink-2); font-weight: 500; }
.sessions .row.today { background: var(--tint-soft); }
.att-sum { font-size: .85rem; white-space: nowrap; }
.att-sum b { font-variant-numeric: tabular-nums; }
@media (max-width: 599px) { .att-sum { font-size: .78rem; } }

/* 返回連結（標題上方） */
.co-back { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 2px -6px; padding: 4px 10px 4px 2px; border-radius: 999px; color: var(--tint); font-size: .98rem; font-weight: 500; text-decoration: none !important; transition: background .2s; }
.co-back:hover { background: var(--tint-soft); }
.co-back .ico { stroke-width: 2.2; }

/* 點名：手機上備註欄需要時才出現 */
@media (max-width: 599px) {
	.roll-row .note { display: none; }
	.roll-row.show-note .note { display: block; }
}
.co-main > .list.inset.sessions, .co-main > .co-cards { max-width: 920px; }
@media (max-width: 599px) {
	.co-table.grid th:first-child, .co-table.grid td:first-child { display: none; }
}

/* 出席率列：右側數字＋細長條 */
.rates { max-width: 920px; }
.rate { display: inline-flex; align-items: center; gap: 10px; }
.rate i { position: relative; width: 72px; height: 6px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.rate i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 3px; background: var(--ok); }
.rate.bad i::after { background: var(--bad); }
.rate b { min-width: 3.6em; text-align: right; color: var(--ink); font-weight: 600; }
.rate.bad b { color: var(--bad); }
@media (max-width: 599px) { .rate i { width: 44px; } }

/* 卡片內的簡單清單 */
.co-list { list-style: none; margin: 0; padding: 0; }
.co-list li { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 11px 0; }
.co-list li + li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; transform: scaleY(.5); background: rgba(29, 29, 31, .16); }
.co-list li > b:first-child { font-variant-numeric: tabular-nums; }

/* 名冊：依聲部分組的聯絡人列表 */
.roster { margin-top: 18px; max-width: 920px; }
.group-t.sm { font-size: .8rem; font-weight: 700; color: var(--ink-2); letter-spacing: .06em; margin-bottom: 6px; }
.row.has-av + .row.has-av::before { left: 64px; }
.grid.two { margin-bottom: 16px; }
.card .stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
@media (max-width: 599px) {
	.co-quota { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
	.co-quota a { padding: 8px 10px; border-radius: 14px; }
	.co-quota span { font-size: .68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.co-quota b { font-size: 1rem; }
}

/* 決議 */
.res-list { max-width: 920px; }
.res { position: relative; padding: 14px 18px; }
.res + .res::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: 1px; transform: scaleY(.5); background: rgba(29, 29, 31, .16); }
.res.off { opacity: .6; }
.res-meta { margin: 0 0 4px; color: var(--ink-2); font-size: .82rem; font-weight: 550; }
.res .co-text p:last-child { margin-bottom: 0; }
.res-act { display: flex; gap: 6px; margin-top: 8px; }

/* 會議紀錄內的表格 */
.table-wrap.mini { background: var(--surface-2); border-radius: var(--r-tile); margin: 6px 0 14px; }
.co-table.mini { font-size: .86rem; line-height: 1.55; }
.co-table.mini th { position: static; background: var(--fill); }
.co-table.mini td, .co-table.mini th { padding: 8px 10px; vertical-align: top; }
.co-table.mini th.cap { background: transparent; color: var(--ink); font-size: .9rem; text-align: left; }

/* 列表右側的金額＋刪除鈕 */
.row-v .co-delete { display: inline-block; margin-left: 10px; vertical-align: middle; }
.row-v:has(.co-delete) { display: flex; align-items: center; gap: 0; white-space: nowrap; }

/* 收合在列表裡的新增表單 */
details.list > .co-form.in-list { padding: 4px 16px 18px; border-top: 1px solid rgba(29, 29, 31, .07); }
.row-l.has-plus { display: inline-flex; align-items: center; gap: 8px; color: var(--tint); font-weight: 600; }
details.list[open] > summary .row-l.has-plus { color: var(--ink); }

/* 沒有權限 */
.co-deny { max-width: 420px; margin: 12vh auto 0; text-align: center; }
.co-deny h1 { font-size: 1.6rem; margin: 0 0 8px; }
.co-deny p { color: var(--ink-2); margin: 0 0 22px; }

/* 檔案選擇 */
input[type=file] { font: inherit; font-size: .92rem; color: var(--ink-2); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; color: var(--tint); background: rgba(42, 92, 174, .1); border: 0; border-radius: 999px; padding: 9px 16px; margin-right: 12px; cursor: pointer; transition: background .2s; }
input[type=file]::file-selector-button:hover { background: rgba(42, 92, 174, .16); }
