Peach: Local-first video metadata scraper and media manager.
feat(web): 首次设置页改用 Auth Card 版式与勾线动效
longmeidao08d3cc7742de
diff --git a/docs/BOARD_UI.md b/docs/BOARD_UI.mdindex 26e2737b9..b7103cb6b 100644--- a/docs/BOARD_UI.md+++ b/docs/BOARD_UI.md@@ -209,6 +209,28 @@ Radial Chart Card、Bar List Card、Heatmap 与 Sankey 的 Pro 源码**未取得| 复核队列分页 | Pagination:nav 两端对齐 `gap-2`;Previous/Next 是 32px 次级小键(圆角 8、内边距 6/8、带箭头);页码 `size-8 rounded-lg` Body Medium,当前页 border-button 描边 + primary 底 + xs 阴影并标 `aria-current="page"`,其余次文字色、悬停 secondary-hover;两侧折成「…」各留一个邻页;一页时不渲染;没有过渡 | 尺寸与颜色照抄;分页做在前端,一页 20 张(接口 4.6 MB 本机读 0.1 秒,卡的是一次画 1300 张卡);箭头用雪碧图的 `chevron-left/right`,文案「上一页/下一页」;分组与筛选按整条队列算、卡片只画本页;换分类/分组/筛选回第 1 页 || 数据管理页 | dashboard/finance 模板:顶上一排 plain stat card(132px、圆角 16、secondary 底、p 16;32px 图标格 + 20px 字形;标签 Body Medium 次文字色;读数 title-1-medium 24/34;`grid-cols-2 lg:grid-cols-4 gap-4`),下面是图表卡与数据表 | 五张读数卡一行(1120 内),窄了折两列、再折一列;整张卡是入口按钮,悬停抬主文字色 6% 底(上游卡不可点);读数下一行 Caption 是同一份 payload 的分项;扫描与采集、空文件夹各占一整行,左说明右按钮;链接管理与资源同步不动 |+## 首次设置 Auth Card++Button 取证(2026-09-10):对照官网 `/components/button` 与保存的+`board-reference/button.json`。选择文件夹为 medium 纯图标 secondary,添加媒体库为+带前置图标的 secondary,完成设置为 primary;高度 36px、图标 20px、圆角 10px。+主按钮渐变使用官网实测色值,hover 叠层以 150ms 淡入;按下缩放至 0.98,+按下 220ms、释放 420ms,曲线为 `cubic-bezier(.4,0,.2,1)`,减少动态效果时关闭。+按钮保留原动作、键盘焦点、忙态防重复与禁用语义,不写入预览配置。++Checkbox 动效取证(2026-09-10):项目保存的 `board-reference/checkbox.json` 中+`checkbox-glyph.tsx` 使用 16px SVG、`pathLength=1` 与 `animate-check-draw`。+实时 `/components/checkbox` CSS 确认为 200ms `cubic-bezier(.65,0,.35,1)`,+`stroke-dashoffset` 从 `1px` 到 `0`;减少动态效果时立即显示完整勾线。+150ms 只负责背景、边框和阴影过渡,不能用它代替描线动画。+setup 使用同一勾线形状、蓝色渐变及这两组状态规则。++2026-09-10 使用内置浏览器核对 `/components/auth-card`,复用已登记的+`boardui-auth-card.json`:集中式标题、Logo、表单与底部主按钮,24px 圆角、+24/32px 内边距和轻阴影。Peach 的媒体来源表单采用 560px 上限;保留目录增删、+来源选择、可选密码、高级设置、扫描及历史导入。390px 下单列,无横向溢出。+独立只读预览为 18985;不提交真实配置、不启动扫描,生产未切换。+## 验证记录侧栏采用 AI chat 公开变体的分组标题、展开叶项与尾部计数;分组箭头位于右侧,标题高 36px,展开复用共享 Collapse。媒体库入口适配公开 `DashboardUserMenu`:265px 面板、16px 圆角、10px 内边距,桌面右侧 8px、手机下方展开,150ms ease-out 淡入、缩放 .95 与 2px 模糊。独立按钮控制侧栏展开;媒体库图标打开选择面板,展开面板时入口显示轮廓。首页使用 20px 槽位的 Peach logo,按透明边距校准可见轮廓及文字起点,收起态按钮为 36px 正方形。媒体库与导航图标统一 20px、1.7px 线宽,无图标底色。设置固定在底部,与明暗开关并排;收起时明暗开关只显示目标主题图标。主题动画参考公开 `https://www.boardui.com/r/theme-toggle.json`:200ms 滑块与 820ms 柔边扩散,缓动 `cubic-bezier(.16,1,.3,1)`,减少动态效果时直接切换。diff --git a/src/peach/routes_pages.py b/src/peach/routes_pages.pyindex cbee116f9..bd90c1734 100644--- a/src/peach/routes_pages.py+++ b/src/peach/routes_pages.py@@ -130,6 +130,7 @@ button[type=submit]:hover{background:color-mix(in srgb,var(--ink) 88%,var(--grougrid 的空轨道会留下一段 gap。 */.dir{display:flex;flex-wrap:wrap;gap:10px;padding:16px;border:1px solid var(--line-soft);border-radius:var(--control-radius);margin-top:16px}.dir:first-child{margin-top:0}.dir .bad{flex-basis:100%;margin:0}+.entry-input{display:contents}.dir input[type=text]{flex:1 1 auto;width:auto;min-width:0}.dir > input[type=text]{flex:1 1 0;width:0}.sourcefields{flex-basis:100%;display:grid;gap:8px;min-width:0}@@ -167,7 +168,7 @@ _SETUP_HEAD = ('<!doctype html>\n<html lang="zh-CN"><head><meta charset="utf-8">#: 这里只决定同一道题在浏览器里怎么称呼:命令行那份题面要把可选值写进去,页面用控件表达。_SETUP_COPY = {"data_root": ("数据目录", "Peach 数据库、缓存和设置文件都放在这里。"),- "media_dir": ("媒体文件夹", "Peach 从这些文件夹读取视频和图片。可以是外置硬盘上的文件夹,但必须已经存在。"),+ "media_dir": ("媒体库", "Peach 从媒体库读取视频和图片。请选择已存在的文件夹,也可以使用外置硬盘。"),"host": ("谁可以访问", ""),"port": ("端口", "浏览器地址里冒号后面的数字,一般不用改。"),"mdns_name": ("局域网访问地址", "选了「同一局域网的设备」之后,其他设备在浏览器里输入这个地址就能打开 Peach。"),@@ -255,9 +256,10 @@ _SETUP_SCRIPT = """<script>})();</script>"""-#: 与站内共用勾选框相同的字形(lucide `check`)。这一页不加载站内脚本,所以内联一份。-_CHECK_SVG = ('<svg viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round">'- '<path d="M20 6 9 17l-5-5"/></svg>')+#: Board CheckboxGlyph 的归一化勾线;来源见 docs/BOARD_UI.md。+_CHECK_SVG = ('<svg viewBox="0 0 16 16" fill="none">'+ '<path d="M4 7.7002L6.64645 10.3466C6.84171 10.5419 7.15829 10.5419 7.35355 10.3466L12 5.7002" '+ 'stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" pathLength="1"/></svg>')#: 移除一行媒体文件夹的字形(lucide `x`)。_X_SVG = '<svg viewBox="0 0 24 24"><path d="M18 6 6 18M6 6l12 12"/></svg>'#: 「选择文件夹」(lucide `folder-search`):弹系统对话框去挑一个文件夹。`folder-open` 归@@ -326,8 +328,13 @@ def _document(title: str, body: str) -> str:# 页内脚本对两张页面都生效:找不到对应控件时它什么也不做。index = (PROJECT_ROOT / "web/index.html").read_text(encoding="utf-8")symbols = ''.join(re.findall(r'<symbol id="i-(?:check|chevron-down|hard-drive)"[^>]*>.*?</symbol>', index))+ facts_css = ''+ if 'class="configfacts"' in body:+ configuration_css = (PROJECT_ROOT / 'web/css/23-configuration.css').read_text(encoding='utf-8')+ facts_css = '\n'.join(line for line in configuration_css.splitlines()+ if line.startswith(('.configfacts', '@media(max-width:560px){.configfacts')))return (f"{_SETUP_HEAD}<title>{title}</title><style>{_theme_tokens()}{_scrollbar_rules()}</style>"- f'{_SETUP_STYLE}<style>{_button_rules()}</style>{board_entry_style()}</head><body><svg width="0" height="0" aria-hidden="true" style="position:absolute">{symbols}</svg><main>{body}</main>{_SETUP_SCRIPT}{_SHARED_SCRIPT}</body></html>\n')+ f'{_SETUP_STYLE}<style>{_button_rules()}</style>{board_entry_style()}<style>{facts_css}</style></head><body><svg width="0" height="0" aria-hidden="true" style="position:absolute">{symbols}</svg><main>{body}</main>{_SETUP_SCRIPT}{_SHARED_SCRIPT}</body></html>\n')def board_entry_style() -> str:@@ -380,12 +387,15 @@ def dependency_link(url: str, label: str) -> str:'<svg aria-hidden="true" viewBox="0 0 24 24"><path d="M15 3h6v6M10 14 21 3M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg></a>')-def runtime_facts_html(config) -> str:- return ("<h2>运行信息</h2><dl>"- + "".join(f'<dt>{escape(row["term"])}</dt><dd class="help">{escape(row["value"])}'+def runtime_facts_html(config, *, collapsible: bool = False) -> str:+ content = ('<dl class="configfacts">'+ + "".join(f'<dt>{escape(row["term"])}</dt><dd>{escape(row["value"])}'+ (' ' + dependency_link(row["download_url"], row["download_label"]) if row.get("download_url") else '')+ '</dd>' for row in runtime_fact_entries(config))+ "</dl>")+ if collapsible:+ return '<details><summary><span>运行信息</span>' + _CHEVRON_SVG + '</summary>' + content + '</details>'+ return '<h2>运行信息</h2>' + contentdef _copy_for(key: str, fallback: str) -> tuple[str, str]:@@ -397,12 +407,12 @@ def _media_dir_row(value: str, error: str, *, first: bool, location: str = "locasource = '<select name="media_location" aria-label="媒体来源">' + ''.join(f'<option value="{key}"{" selected" if key == location else ""}>{label}</option>'for key, label in SOURCE_OPTIONS) + '</select>'- mapping = (f'<label>Windows 中的对应路径<input name="media_root" type="text" aria-label="Windows 中的对应路径" '- f'placeholder="例如 B:\\" value="{escape(root, quote=True)}"></label>') if not windows else ''- attrs = ' id="f-media_dir" required' if first else ' aria-label="媒体文件夹"'- return (f'<div class="dir"><input name="media_dir" type="text"{attrs} autocomplete="off" '+ mapping = (f'<label>Windows 中的对应路径<span class="entry-input"><input name="media_root" type="text" aria-label="Windows 中的对应路径" '+ f'placeholder="例如 B:\\" value="{escape(root, quote=True)}"></span></label>') if not windows else ''+ attrs = ' id="f-media_dir" required' if first else ' aria-label="媒体库"'+ return (f'<div class="dir"><span class="entry-input"><input name="media_dir" type="text"{attrs} autocomplete="off" 'f'spellcheck="false" aria-invalid="{"true" if error else "false"}" '- f'value="{escape(value, quote=True)}">'+ f'value="{escape(value, quote=True)}"></span>'f'<button type="button" class="pick" aria-label="选择文件夹" hidden>{_FOLDER_SVG}</button>'f'<button type="button" class="rm" aria-label="移除这个文件夹" hidden>{_X_SVG}</button>'+ (f'<p class="bad" role="alert">{escape(error)}</p>' if error else "")@@ -416,7 +426,7 @@ def _media_dirs_html(values: Sequence[str], errors: Sequence[str], note: str, *,两个按不动的键,不如只给一个输入框。第一行必填,后面的行留空就当没填;错误写在出错的那一行底下。首次运行页与配置页共用这一段。"""- title, help_text = _copy_for("media_dir", "媒体文件夹")+ title, help_text = _copy_for("media_dir", "媒体库")rows = list(values) or [""]body = "".join(_media_dir_row(value, errors[index] if index < len(errors) else "", first=index == 0,@@ -427,7 +437,7 @@ def _media_dirs_html(values: Sequence[str], errors: Sequence[str], note: str, *,'<div class="field">'f'<label for="f-media_dir">{escape(title)}<span class="req" aria-hidden="true">*</span></label>'f'<div class="dirs" id="dirs">{body}</div>'- '<button type="button" class="add" id="add-dir" hidden>添加文件夹</button>'+ '<button type="button" class="add" id="add-dir" hidden><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>添加媒体库</button>'f'<template id="dir-row">{_media_dir_row("", "", first=False, windows=windows)}</template>''<p class="help" id="cloudHelp" hidden>先在 CloudDrive 登录网盘并完成挂载。''<a href="https://www.clouddrive2.com/help.html" target="_blank" rel="noreferrer">挂载帮助'@@ -474,6 +484,8 @@ def _field_html(question, value: str, error: str, note: str) -> str:f'value="{escape(value, quote=True)}">')if question.key == "mdns_name":control = f'<div class="affix"><span>https://</span>{control}<span>.local</span></div>'+ else:+ control = f'<span class="entry-input">{control}</span>'label = f'<label for="f-{key}">{escape(title)}{star}</label>'tail = "".join(f'<p class="help">{escape(line)}</p>' for line in (help_text, note) if line)@@ -517,15 +529,15 @@ def setup_page(+ "".join(advanced) + "</details>")access_error = str(errors.get("access_password", ""))fields.insert(1, '<div class="field"><label for="access-password">访问密码<span class="optional">可选</span></label>'- '<input id="access-password" name="access_password" type="password" maxlength="256" '+ '<span class="entry-input"><input id="access-password" name="access_password" type="password" maxlength="256" 'f'aria-invalid="{"true" if access_error else "false"}" '- 'autocomplete="new-password" aria-describedby="access-help">'+ 'autocomplete="new-password" aria-describedby="access-help"></span>'+ (f'<p class="bad" id="access-help" role="alert">{escape(access_error)}</p>' if access_errorelse '<p class="help" id="access-help">留空即可直接访问;设置密码需至少 8 个字符。</p>')+ '<p class="help">未设置密码时,能连接到 Peach 的设备可直接进入。</p>'- '<label for="access-confirm">确认访问密码</label><input id="access-confirm" '+ '<label for="access-confirm">确认访问密码</label><span class="entry-input"><input id="access-confirm" 'f'aria-invalid="{"true" if access_error else "false"}" '- 'name="access_confirm" type="password" maxlength="256" autocomplete="new-password"></div>')+ 'name="access_confirm" type="password" maxlength="256" autocomplete="new-password"></span></div>')filled = [path for path in media_dirs if path]if not filled:scan_text = "完成设置后扫描并补全资料"@@ -534,62 +546,39 @@ def setup_page(else:scan_text = f"完成设置后扫描这 {len(filled)} 个文件夹并补全资料"body = (- '<header><img class="mark" src="/peach-logo.png" alt="" width="40" height="40">'+ '<section class="setup-auth-card"><header><img class="mark" src="/peach-logo.png" alt="" width="40" height="40">'"<h1>欢迎使用 Peach</h1>"- '<p class="lede">选一个媒体文件夹,开始整理你的馆藏。</p></header>'+ '<p class="lede">添加媒体库,开始整理你的馆藏。</p></header>''<form method="post" action="/setup">'+ "".join(fields)+ + '<section class="setup-options" aria-label="完成设置后">'+ _check_html("scan_now", scan_text, checked=scan_now)+ '<p class="help">读取已有 NFO 和封面,采集缺失资料。进度可在设置中查看,资料候选在复核后应用。</p>'+ '<section class="history-guide-choice"><h2>浏览器历史记录<span class="optional">可选</span></h2>'+ _check_html("history_guide", "接下来导入浏览器历史记录", checked=values.get("history_guide") == "y")+ '<p class="help">用于生成口味分析。完成设置后选择读取这台电脑,或导入其他设备的记录;也可稍后从「口味」进入。</p></section>'- + '<button type="submit">完成设置</button></form>'+ + '</section><button type="submit">完成设置</button></form></section>')return _document("Peach · 首次运行", body)def setup_done_page(applied, *, windows: bool, scan_requested: bool, history_guide: bool = False) -> str:"""成功页:接下来会自动发生什么,以及口令在哪。口令本身不显示在页面上。"""- tree = applied.treeconfig = applied.configdestination = escape(_normal_url(config) + ('taste?onboarding=1' if history_guide else ''), quote=True)destination_label = '导入浏览器历史记录' if history_guide else '进入 Peach'- if distribution.standalone():- scan = "首次扫描已排队。" if scan_requested else "你可以稍后在配置界面开始扫描。"- return _document("Peach · 设置完成",- '<h1>设置完成</h1><p class="lede">正在启动你的馆藏。' + scan + '</p>'- f'<p><a class="geist-button primary" href="{destination}">{destination_label}</a></p>'- f'<meta http-equiv="refresh" content="8;url={destination}">'- + runtime_facts_html(config))- ledger = (f"Peach 数据库已存在,没有动它:{tree.database}" if tree.ledger_existed- else f"Peach 数据库:{tree.database}(已应用 {tree.migrations} 个迁移)")- ca = (f"本机 CA:{tree.ca_cert}" if tree.ca_cert is not None- else f"未生成本机 CA({tree.ca_error});装好 openssl 后跑 "- "<code>peach init --force</code> 补上。局域网设备要装这份 CA 才不报证书错。"- + ('<span class="help">' + dependency_link('https://openssl-library.org/source/', '下载 OpenSSL') + '</span>'- if not shutil.which('openssl') and (windows or not Path('/usr/bin/openssl').is_file()) else ''))- scan = ("<li>首次扫描已排队,托盘会在服务起来之后在后台跑,期间页面照常能用。</li>"- if scan_requested else- "<li>没有请求首次扫描;要扫就跑 <code>peach scan configured</code>。</li>")- from .media_configuration import rows- mounts = ("" if windows else '<dl class="facts">' + ''.join(- f'<dt>{escape(row["location"])} · {escape(row["root"])}</dt><dd>{escape(row["path"])}</dd>'- for row in rows(config, windows=False)) + '</dl>')+ scan = ("首次扫描已排队,将在后台整理媒体库。你可以继续使用 Peach。" if scan_requested+ else "你可以稍后在配置页开始扫描媒体库。")body = (- "<h1>设置完成</h1>"- "<p>托盘正在停掉这条引导服务,改用正常的 Peach 服务;这个页面几秒后就会连不上,"- f"届时打开 <code>{escape(_normal_url(config))}</code> 即可。</p>"- "<ul>"- f"<li>{escape(ledger)}</li>"- f"<li>{ca}</li>"- "<li>访问密码可在配置页设置、修改或关闭。</li>"- f"{scan}"- "</ul>"- f"{mounts}"- + f'<p><a class="geist-button primary" href="{destination}">{destination_label}</a></p>'- + runtime_facts_html(config)+ '<section class="setup-auth-card"><header><img class="mark" src="/peach-logo.png" alt="" width="40" height="40">'+ '<h1>设置完成</h1><p class="lede">正在启动你的馆藏。</p></header>'+ f'<p>{scan}</p>'+ + f'<p><a class="setup-enter" href="{destination}">{destination_label}</a></p>'+ + runtime_facts_html(config, collapsible=True)+ + '</section>')+ if distribution.standalone():+ body += f'<meta http-equiv="refresh" content="8;url={destination}">'return _document("Peach · 设置完成", body)diff --git a/tests/test_configuration_sources.py b/tests/test_configuration_sources.pyindex 304e484f8..30bef9c35 100644--- a/tests/test_configuration_sources.py+++ b/tests/test_configuration_sources.py@@ -85,7 +85,7 @@ class MediaConfigurationTests(unittest.TestCase):self.assertIn('name="media_root"', html)self.assertIn('value="B:/"', html)- def test_cloud_only_completion_page_shows_its_mount_and_scan_command(self):+ def test_completion_page_keeps_runtime_details_collapsed(self):from peach.routes_pages import setup_done_pagewith tempfile.TemporaryDirectory() as directory:base = Path(directory).resolve()@@ -95,12 +95,18 @@ class MediaConfigurationTests(unittest.TestCase):ca_cert=None, ca_error='unavailable', token_path=base / 'token')with patch('peach.distribution.standalone', return_value=False):html = setup_done_page(SimpleNamespace(config=config, tree=tree), windows=False, scan_requested=False)- self.assertIn('/Volumes/115', html)- self.assertIn('peach scan configured', html)- self.assertNotIn('peach scan local', html)- self.assertIn('<a class="geist-button primary" href=', html)+ self.assertNotIn('/Volumes/115', html)+ self.assertNotIn('peach scan configured', html)+ self.assertNotIn('本机 CA', html)+ self.assertNotIn('已应用 0 个迁移', html)+ self.assertIn('稍后在配置页开始扫描媒体库', html)+ self.assertIn('<details><summary><span>运行信息</span>', html)+ self.assertNotIn('<details open', html)+ self.assertIn('<a class="setup-enter" href=', html)with patch('peach.distribution.standalone', return_value=True):packaged = setup_done_page(SimpleNamespace(config=config, tree=tree), windows=True,scan_requested=False, history_guide=True)- self.assertIn('<a class="geist-button primary" href=', packaged)+ self.assertIn('<a class="setup-enter" href=', packaged)self.assertIn('>导入浏览器历史记录</a>', packaged)+ self.assertIn('<details><summary><span>运行信息</span>', packaged)+ self.assertNotIn('<details open', packaged)diff --git a/web/board-entry.css b/web/board-entry.cssindex 52682c818..fa5dc91e5 100644--- a/web/board-entry.css+++ b/web/board-entry.css@@ -13,3 +13,105 @@ button[type=submit]:hover,form>button:hover,.geist-button.primary:hover{backgrou/* Auth Card:单行登录偏好。 */.remember{display:flex;align-items:center;gap:8px;font-size:14px;line-height:20px}.remember input{appearance:auto;width:16px;height:16px;margin:0;accent-color:#2473fe;flex:none}+/* Auth Card 的首启表单保留媒体来源与高级设置。 */+body:has(.setup-auth-card){padding:48px 24px;min-height:100svh}+main:has(.setup-auth-card){width:100%;max-width:560px;padding:32px;box-shadow:0 1px 2px #0000000d}+.setup-auth-card header{display:grid;justify-items:start;text-align:left;gap:8px}+.setup-auth-card .mark{margin-bottom:8px}+.setup-auth-card h1{margin:0;font-size:24px;line-height:32px;font-weight:500}+.setup-auth-card .lede{margin:0;font-size:14px;line-height:20px}+.setup-auth-card form{margin-top:28px}+.setup-auth-card .field{margin-top:24px}+.setup-auth-card form>.field:first-child{margin-top:0}+.setup-auth-card .dir{padding:12px;background:var(--surface);border:0;border-radius:var(--control-radius)}+.setup-auth-card input,.setup-auth-card .affix{background:var(--surface)}+.setup-auth-card .help{font-size:12px;line-height:18px}+.setup-auth-card .field>label:not(:first-child){margin-top:16px}+.setup-auth-card details{padding:0;background:transparent;border-radius:0}+.setup-auth-card summary{min-height:32px;justify-content:space-between;font-size:14px}+.setup-auth-card .setup-options{margin-top:24px;display:grid;gap:8px}+.setup-auth-card .check{margin:0;align-items:flex-start;min-height:24px;gap:8px;font-size:13px;line-height:20px}+.setup-auth-card .history-guide-choice{margin-top:12px}+.setup-auth-card .history-guide-choice h2{margin:0 0 12px;padding:0;border:0;font-size:14px;font-weight:500}+.setup-auth-card .bad{padding:8px 10px;border-radius:var(--control-radius);background:color-mix(in srgb,var(--drop) 8%,var(--ground));overflow-wrap:anywhere}+.setup-auth-card :is(button[type=submit],.setup-enter){margin-top:24px;min-height:36px}+.setup-auth-card .switch label{height:auto;min-height:40px;padding:6px 8px;text-align:center;font-size:13px;line-height:18px}+/* 输入、选择、复选与操作使用入口页共用的 Board 控件状态。 */+.setup-auth-card{--control-h:40px;font-size:14px;line-height:20px}+.setup-auth-card .field>label,.setup-auth-card .field>.legend{font-size:14px;line-height:20px;margin-bottom:6px;color:var(--ink-2)}+.setup-auth-card :is(input[type=text],input[type=password],input[type=number],.affix,.gselectfield){height:40px;border:0;border-radius:10px;background-color:var(--surface);box-shadow:inset 0 0 0 2px transparent;font:inherit;transition:background-color .15s ease,box-shadow .15s ease,color .15s ease}+.setup-auth-card :is(input,.affix,.gselectfield):hover{border-color:color-mix(in srgb,var(--ink) 25%,var(--line))}+.setup-auth-card :focus-visible{outline:2px solid var(--muted);outline-offset:2px}+.setup-auth-card .gselectfield:focus-visible{outline:2px solid var(--muted);outline-offset:-2px}+.setup-auth-card .affix:focus-within{outline:0;box-shadow:none}+.setup-auth-card input[aria-invalid=true]{border-color:var(--drop);box-shadow:0 0 0 2px color-mix(in srgb,var(--drop) 12%,transparent)}+.setup-auth-card input:disabled{background:var(--surface);color:var(--muted);box-shadow:none;cursor:not-allowed}+.setup-auth-card .affix input[type=text]{height:100%;border:0;box-shadow:none;background:transparent;border-radius:0}+.setup-auth-card :is(.pick,.rm,.add){height:36px;border:1px solid var(--line);background:var(--ground);color:var(--ink);box-shadow:0 1px 2px #0000000d;font-size:14px;border-radius:10px}+.setup-auth-card :is(.pick,.rm,.add):hover{background:var(--surface);border-color:color-mix(in srgb,var(--ink) 25%,var(--line))}+.setup-auth-card .rm:hover{background:var(--drop);color:#fff;border-color:var(--drop)}+.setup-auth-card .pcheck{width:16px;height:20px;align-self:flex-start}+.setup-auth-card .pcheck>span{width:16px;height:16px;border-radius:4px;border:1px solid var(--line);background:var(--ground);box-shadow:0 1px 2px #0000000d;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}+.setup-auth-card .pcheck input:checked+span{background:linear-gradient(#3b82f6,#2563eb);color:#fff;border-color:transparent;box-shadow:inset 0 2px 0 #ffffff40,inset 0 0 0 1px #3b82f6}+.setup-auth-card .check:hover .pcheck input:checked+span{background:linear-gradient(#60a5fa,#3b82f6)}+.setup-auth-card .pcheck>span{position:relative}+.setup-auth-card .pcheck>span svg{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:16px;height:16px;stroke-width:2}+.setup-auth-card .pcheck input:not(:checked)+span path{display:none}+.setup-auth-card .pcheck input:checked+span path{stroke-dasharray:1;stroke-dashoffset:1px;animation:setup-check-draw .2s cubic-bezier(.65,0,.35,1) forwards}+@keyframes setup-check-draw{from{stroke-dashoffset:1px}to{stroke-dashoffset:0}}+@media(prefers-reduced-motion:reduce){.setup-auth-card .pcheck input:checked+span path{animation:none;stroke-dashoffset:0}}+.setup-auth-card .pcheck input:focus-visible+span,.setup-auth-card .switch label:has(input:focus-visible){outline:2px solid var(--muted);outline-offset:2px}+.setup-auth-card .switch{position:relative;isolation:isolate;border:0;padding:4px;gap:4px;border-radius:10px;background:var(--surface)}+.setup-auth-card .switch::before{content:'';position:absolute;z-index:-1;left:4px;top:4px;bottom:4px;width:calc((100% - 12px)/2);background:var(--ground);border-radius:7px;box-shadow:0 1px 2px #0000001a;transition:transform .2s cubic-bezier(.16,1,.3,1)}+.setup-auth-card .switch:has(label:nth-of-type(2) input:checked)::before{transform:translateX(calc(100% + 4px))}+.setup-auth-card .switch label:has(input:checked){background:transparent;box-shadow:none;color:var(--ink)}+.setup-auth-card .switch label{min-height:32px;color:var(--muted)}+.setup-auth-card summary:hover{color:var(--ink-2)}+.setup-auth-card .gselectfield{padding:0 12px;gap:8px;width:100%;color:var(--ink)}+.setup-auth-card .gselectfield>svg{width:16px;height:16px}+.setup-auth-card .popmenu{padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--ground);box-shadow:0 4px 16px #00000018}+.setup-auth-card .popmenu button{min-height:36px;padding:8px;border:0;border-radius:8px;background:transparent;color:var(--ink);font:inherit}+.setup-auth-card .popmenu button:hover,.setup-auth-card .popmenu button[aria-selected=true]{background:var(--surface)}+.setup-auth-card{--surface:#f0f0f0;--muted:#737373;--ink-2:#525252}+@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .setup-auth-card{--surface:#292929;--muted:#a3a3a3;--ink-2:#d4d4d4}}+:root[data-theme=dark] .setup-auth-card{--surface:#292929;--muted:#a3a3a3;--ink-2:#d4d4d4}+.setup-auth-card :is(h1,h2,summary){color:var(--ink)}+.setup-auth-card .sourcefields label{color:var(--ink-2)}+.setup-auth-card .add{display:inline-flex;align-items:center;gap:6px}+.setup-auth-card .add[hidden]{display:none}+.setup-auth-card .add svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}+.setup-auth-card .dir{background:transparent;padding:0}+.setup-auth-card input:is([type=text],[type=password],[type=number]){padding-left:38px;background-repeat:no-repeat;background-position:12px center;background-size:16px}+.setup-auth-card input[type=text]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5l2 2h9a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2Z'/%3E%3C/svg%3E")}+.setup-auth-card input[type=password]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3M12 14v3'/%3E%3C/svg%3E")}+.setup-auth-card input[type=number]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 9h16M3 15h16M10 3 8 21M16 3l-2 18'/%3E%3C/svg%3E")}+.setup-auth-card .affix input[type=text]{padding-left:12px;background-image:none}+.setup-auth-card .entry-input{display:block;position:relative;min-width:0;width:100%}+.setup-auth-card .dir>.entry-input{flex:1 1 0;width:0}+.setup-auth-card .entry-input>input{display:block;width:100%}+.setup-auth-card .entry-input:has(input:focus-visible)::after{content:'';position:absolute;inset:2px 2px 2px 34px;border-radius:8px;box-shadow:inset 0 0 0 2px var(--muted);pointer-events:none}+.setup-auth-card .entry-input input:focus-visible{outline:0;box-shadow:none}+.setup-auth-card .affix input[type=text]:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--muted);border-radius:8px}+/* Board Button medium;公开源码与状态测量见 docs/BOARD_UI.md。 */+.setup-auth-card{--button-border:#ebebeb;--button-border-hover:#d4d4d4;--button-border-active:#a3a3a3;--button-hover:#f7f7f7;--button-active:#ebebeb;--button-shadow:#0000000d;--button-disabled:linear-gradient(#ebebeb,#d4d4d4)}+@media(prefers-color-scheme:dark){:root:not([data-theme=light]) .setup-auth-card{--button-border:#404040;--button-border-hover:#737373;--button-border-active:#525252;--button-hover:color-mix(in srgb,#404040 60%,transparent);--button-active:#262626;--button-shadow:#0000002e;--button-disabled:linear-gradient(#404040,#262626)}}+:root[data-theme=dark] .setup-auth-card{--button-border:#404040;--button-border-hover:#737373;--button-border-active:#525252;--button-hover:color-mix(in srgb,#404040 60%,transparent);--button-active:#262626;--button-shadow:#0000002e;--button-disabled:linear-gradient(#404040,#262626)}+.setup-auth-card :is(.pick,.add,button[type=submit],.setup-enter){display:inline-flex;align-items:center;justify-content:center;height:36px;padding:8px 12px;border-radius:10px;font-size:14px;font-weight:500;line-height:20px;white-space:nowrap;user-select:none;box-shadow:0 1px 2px var(--button-shadow);transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,transform .42s cubic-bezier(.4,0,.2,1)}+.setup-auth-card :is(.pick,.add)[hidden]{display:none}+.setup-auth-card button.pick{width:36px;padding:8px;align-self:flex-start;margin-top:2px}+.setup-auth-card .pick svg{width:20px;height:20px;flex:none}+.setup-auth-card button.add{padding-left:8px}+.setup-auth-card :is(.pick,.add){background:var(--ground);border:1px solid var(--button-border);color:var(--ink)}+.setup-auth-card :is(.pick,.add):hover:not(:disabled):not([aria-disabled=true]){background:var(--button-hover);border-color:var(--button-border-hover)}+.setup-auth-card :is(.pick,.add):active:not(:disabled):not([aria-disabled=true]){background:var(--button-active);border-color:var(--button-border-active)}+.setup-auth-card :is(button[type=submit],.setup-enter){position:relative;isolation:isolate;overflow:hidden;border:0;color:#fff;background:linear-gradient(180deg,lab(54.1736% 13.3369 -74.6839),lab(44.0605% 29.0279 -86.0352))}+.setup-auth-card :is(button[type=submit],.setup-enter)::before{content:'';position:absolute;inset:0;z-index:-1;border-radius:inherit;pointer-events:none;background:linear-gradient(180deg,#3392ff,lab(54.1736% 13.3369 -74.6839));opacity:0;transition:opacity .15s ease}+.setup-auth-card :is(button[type=submit],.setup-enter):hover:not(:disabled):not([aria-disabled=true])::before{opacity:1}+.setup-auth-card :is(button[type=submit],.setup-enter):active:not(:disabled):not([aria-disabled=true]){background:linear-gradient(180deg,lab(44.0605% 29.0279 -86.0352),lab(36.9089% 35.0961 -85.6872))}+.setup-auth-card :is(button[type=submit],.setup-enter):active::before{opacity:0}+.setup-auth-card :is(.pick,.add,button[type=submit],.setup-enter):active:not(:disabled):not([aria-disabled=true]){transform:scale(.98);transition-duration:.15s,.15s,.15s,.15s,.22s}+.setup-auth-card :is(.pick,.add,button[type=submit],.setup-enter):is(:disabled,[aria-disabled=true]){cursor:not-allowed;color:var(--muted);box-shadow:none;transform:none;background:var(--surface);border-color:var(--button-border)}+.setup-auth-card :is(button[type=submit],.setup-enter):is(:disabled,[aria-disabled=true]){background:var(--button-disabled)}+.setup-auth-card :is(button[type=submit],.setup-enter):is(:disabled,[aria-disabled=true])::before{display:none}+@media(prefers-reduced-motion:reduce){.setup-auth-card :is(.pick,.add,button[type=submit],.setup-enter),.setup-auth-card :is(.pick,.add,button[type=submit],.setup-enter):active{transition:none;transform:none}.setup-auth-card :is(button[type=submit],.setup-enter)::before{transition:none}}+@media(max-width:600px){body:has(.setup-auth-card){padding:24px 16px}main:has(.setup-auth-card){padding:24px}.setup-auth-card input[type=password]{font-size:16px}}