/* 单屏工作台的布局入口。业务组件继续使用 styles.css；此文件统一容器和视觉令牌。 */
:root {
  --bg:#f7f7f8; --surface:#ffffff; --surface-2:#f1f2f4; --surface-3:#e5e7eb;
  --text:#18191b; --muted:#60646c; --line:#dce0e5; --primary:#ff5100; --primary-dark:#cc3d00;
  --tool-bg:var(--bg); --tool-panel:var(--surface); --tool-panel-soft:var(--surface-2);
  --tool-line:var(--line); --tool-text:var(--text); --tool-muted:var(--muted); --tool-orange:var(--primary); --tool-sidebar:var(--surface);
  --workspace-bg:var(--bg); --workspace-panel:var(--surface); --workspace-line:var(--line); --workspace-text:var(--text); --workspace-muted:var(--muted);
}
html[data-theme="dark"] {
  --bg:#101113; --surface:#1b1c1f; --surface-2:#25272c; --surface-3:#33363c;
  --text:#f7f8fa; --muted:#b0b5bf; --line:#3e424a; --primary:#ff6a24; --primary-dark:#ff7c40;
  --tool-bg:var(--bg); --tool-panel:var(--surface); --tool-panel-soft:var(--surface-2);
  --tool-line:var(--line); --tool-text:var(--text); --tool-muted:var(--muted); --tool-orange:var(--primary); --tool-sidebar:var(--surface);
}
html,body { height:100%; }
body { font-family:"Segoe UI Variable","Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; background:var(--bg); color:var(--text); overflow:hidden; }
button,input,select,textarea { font:inherit; }
button { touch-action:manipulation; }
.toast { pointer-events:none; color:#171717; box-shadow:0 6px 20px #00000018; font-weight:600; }
button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible,[tabindex]:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
button:not(:disabled) { transition:background-color .16s,color .16s,border-color .16s; }
button:disabled { opacity:.45; cursor:not-allowed; }
.app-shell { height:100dvh; min-height:0; display:flex; flex-direction:column; }
.top-nav { flex:0 0 auto; min-height:68px; position:relative; background:var(--surface); backdrop-filter:none; }
.nav-inner { max-width:1680px; width:calc(100% - 48px); min-height:68px; gap:28px; }
.brand-mark { width:34px; height:34px; background:var(--primary); box-shadow:none; }
.brand-title { font-weight:750; letter-spacing:-.5px; }
.nav-actions { justify-content:flex-end; gap:8px; }
.nav-button,.login-button,.theme-button,.nav-random-button { min-height:42px; font-weight:600; font-size:13px; flex-shrink:0; }
.nav-search-box { order:-1; max-width:420px; height:42px; margin-right:auto; background:var(--bg); }
.nav-search-box input { font-size:13px; }
.nav-search-box input:focus-visible { outline:none; }
.nav-button.active,.primary-button,.login-button { box-shadow:none; }
#feedView .segment.active,#feedView .section-filter-strip button.active,.admin-anchor-nav button.active { color:var(--primary-dark); box-shadow:none; }
.nav-random-button { background:transparent; color:var(--muted); border-color:var(--line); }
.main-area { flex:1; min-height:0; overflow:hidden; padding:0; }
#feedView #leftPanelDock .workspace-filter-sheet { display:none; right:24px; left:auto; }
#feedView.mobile-filters-open #leftPanelDock .workspace-filter-sheet { display:grid; }
#feedView #leftPanelDock .workspace-filter-sheet .dock-panel-page { display:none; overflow:auto; }
#feedView #leftPanelDock .workspace-filter-sheet .dock-panel-page.active { display:grid; }
#leftDockHistoryPanel .favorite-list { display:grid; gap:8px; }
#leftDockHistoryPanel .favorite-list button { display:grid; text-align:left; gap:5px; padding:12px; min-height:44px; background:var(--surface-2); color:var(--text); border:1px solid var(--line); border-radius:8px; }
.main-area > .view:not(#feedView) { width:100%; max-width:1680px; }
.user-watermark { opacity:.022; }
.view { height:100%; min-height:0; }
.view:not(.active) { display:none!important; }
#feedView.workspace-feed.active,body[data-right-dock="collapsed"] #feedView.workspace-feed.active { width:100%; max-width:1680px; height:100%; margin:auto; padding:24px 32px; gap:24px; align-items:stretch; grid-template-columns:minmax(0,1fr); }

#feedView .feed-workspace { height:100%; min-height:0; display:grid; grid-template-rows:auto auto auto minmax(0,1fr); overflow:hidden; padding:0; }
#feedView .workspace-head { min-height:64px; margin:0 0 16px; display:flex; align-items:center; gap:18px; padding:0; }
#feedView .workspace-head h1 { font-size:30px; line-height:1.25; letter-spacing:-1px; font-weight:720; }
#feedView .workspace-head h1 span { font-size:16px; font-weight:500; background:none; color:var(--muted); }
.eyebrow { color:var(--muted); font-size:11px; letter-spacing:1.5px; font-weight:500; margin:0 0 8px; }
.library-actions { margin-left:auto; display:flex; gap:8px; }
.library-actions button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:0 14px; font-size:13px; border-radius:10px; }
#feedView .system-stats { display:none; }
#feedView .workspace-toolbar { display:flex; margin:0; padding:0 0 12px; min-height:52px; gap:14px; align-items:center; }
#feedView .section-filter-strip { flex:1; min-width:0; overflow:auto; scrollbar-width:none; }
#feedView .section-filter-strip button { min-height:38px; font-size:12px; padding:0 13px; font-weight:600; }
#feedView .segmented { flex-shrink:0; min-height:38px; }
#feedView .segmented .segment { min-height:30px; font-size:12px; min-width:40px; font-weight:500; }
#feedView .mobile-filter-button { min-height:38px; font-size:12px; }
#feedView .result-summary { margin:0 0 12px; min-height:30px; }
#feedView .result-summary > span { font-size:12px; }
#feedView .result-summary button { min-height:30px; font-size:11px; }
#feedView .project-grid,#feedView[data-feed-mode="launcher"] .project-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; overflow:auto; min-height:0; align-content:start; padding:2px 4px 16px 2px; scrollbar-width:thin; scrollbar-color:var(--line) transparent; }
#feedView .project-card.app-tile { min-height:176px; padding:18px; gap:16px; border:1px solid var(--line); border-radius:16px; background:var(--surface); overflow:visible; grid-template-rows:1fr auto; }
#feedView .project-card.app-tile::before { display:none; }
#feedView .project-card.app-tile:hover { transform:none; border-color:color-mix(in srgb,var(--text) 25%,var(--line)); box-shadow:none; }
#feedView .app-launch { grid-template-columns:56px minmax(0,1fr); gap:16px; min-height:78px; }
#feedView .app-info { gap:5px; }
#feedView .app-title-row { padding-right:0; display:block; }
#feedView .app-title-row strong { font-size:15px; font-weight:680; line-height:1.45; white-space:nowrap; display:block; }
#feedView .heat-count-display,#feedView .like-count-display { display:none; }
#feedView .app-author { font-size:11px; }
#feedView .app-desc { font-size:12px; line-height:1.6; }
#feedView .app-access-note { font-size:10px; color:var(--muted); }
#feedView .app-meta-row { gap:4px; min-width:0; overflow:visible; flex-wrap:nowrap; margin:0; padding:0; height:auto; min-height:32px; align-items:center; }
#feedView .app-meta-row .tag-list { flex:1 1 0; min-width:0; max-width:none; flex-wrap:nowrap; height:26px; overflow:hidden; }
#feedView .app-meta-row .tag-list span { font-size:10px; line-height:24px; }
#feedView .app-meta-row button { width:32px; min-width:32px; min-height:32px; height:32px; display:inline-grid; place-items:center; border:0; border-radius:8px; background:transparent; color:var(--muted); padding:0; }
#feedView .app-meta-row button:hover { background:var(--surface-2); color:var(--primary); }
#feedView .app-meta-row button svg { width:16px; height:16px; }
#feedView .app-meta-row .tag-list span { flex-shrink:0; }
#feedView .app-meta-row .open-card-button { display:none; }
#feedView .segmented { box-shadow:none; }
#libraryDensityButton { min-height:38px; font-size:12px; white-space:nowrap; border:1px solid var(--line); padding:0 12px; border-radius:8px; flex-shrink:0; }
#feedView[data-feed-mode="launcher"] .project-grid { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
#feedView[data-feed-mode="launcher"] .project-card.app-tile { min-height:152px; padding:16px 12px 10px; gap:8px; }
#feedView[data-feed-mode="launcher"] .app-launch { display:flex; flex-direction:column; align-items:center; gap:10px; min-height:0; }
#feedView[data-feed-mode="launcher"] .app-info { width:100%; text-align:center; }
#feedView[data-feed-mode="launcher"] .app-title-row strong { font-size:12px; text-align:center; }
#feedView[data-feed-mode="launcher"] .app-author,#feedView[data-feed-mode="launcher"] .app-desc,#feedView[data-feed-mode="launcher"] .app-access-note,#feedView[data-feed-mode="launcher"] .app-meta-row .tag-list,#feedView[data-feed-mode="launcher"] .comment-count-display { display:none; }
#feedView[data-feed-mode="launcher"] .app-meta-row { justify-content:center; }
#feedView[data-feed-mode="launcher"] .app-meta-row button { width:26px; min-width:26px; height:30px; min-height:30px; }
.primary-button,.login-button { background:var(--primary); color:#171717; font-weight:650; }
#feedView .primary-button { box-shadow:none; }
html[data-theme="dark"] .primary-button,html[data-theme="dark"] .login-button { color:#201811; }
.secondary-button { background:var(--surface); border:1px solid var(--line); color:var(--text); }
/* 图标形态只在此处定义，避开历史伪元素、旋转、混色叠加。 */
.curated-icon,#feedView .app-icon.curated-icon { position:relative; width:56px; height:56px; aspect-ratio:1; flex-shrink:0; display:grid; place-items:center; border-radius:12px; background:color-mix(in srgb,var(--primary) 13%,var(--surface)); color:var(--art); border:0; box-shadow:none; transform:none; overflow:hidden; }
.curated-icon::before,.curated-icon::after,#feedView .app-icon.curated-icon::before,#feedView .app-icon.curated-icon::after { display:none; }
.curated-icon svg,#feedView .app-icon.curated-icon svg { position:relative; z-index:1; width:30px; height:30px; stroke:none; transform:none; }
.curated-icon[data-style="3"] { background:transparent!important; border:1px solid var(--art)!important; }
.curated-icon[data-style="10"] { background:var(--surface-2)!important; color:var(--text)!important; border-radius:5px!important; }
/* 后台保留操作上下文，一次展示一个完整工作区域。 */
#adminView.active,#visitorLogsView.active,#createView.active { display:flex; flex-direction:column; width:min(1500px,100%); padding:24px 32px; margin:auto; overflow:hidden; }
#adminView > .section-head,#visitorLogsView > .section-head,#createView > .section-head { margin:0 0 20px; flex:0 0 auto; padding:0; }
#adminView > .section-head,#visitorLogsView > .section-head,#createView > .section-head { display:flex; border:0; border-radius:0; background:none; box-shadow:none; flex-direction:row; align-items:center; text-align:left; gap:12px; }
#adminView .section-head::after,#visitorLogsView .section-head::after,#createView .section-head::after { display:none; }
#adminView > .section-head > div:first-child { flex:1; }
#adminView > .section-head > button { width:auto; min-height:40px; font-size:12px; padding:0 12px; }
.admin-anchor-nav { box-shadow:none; }
#adminView button,#visitorLogsView button { border-radius:8px; font-size:12px; font-weight:550; box-shadow:none; }
#adminView .admin-title-actions button,#adminView .admin-section-title button,#adminView .user-actions button,#adminView .alias-button { min-height:36px; padding:0 12px; background:var(--surface); border:1px solid var(--line); }
#adminView .user-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; padding:18px; border-radius:12px; background:var(--bg); }
#adminView .user-row strong { font-size:14px; line-height:1.7; }
#adminView .user-row span { font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
#adminView .admin-section-title h2 { font-size:16px; font-weight:600; }
#adminView .admin-section-title { gap:12px; }
#adminView .dashboard-stats > div { background:var(--surface-2); }
#adminView h1,#visitorLogsView h1,#createView h1 { font-size:28px; }
.admin-anchor-nav { position:static; display:flex; flex-wrap:nowrap; overflow:auto; flex:0 0 auto; scrollbar-width:thin; margin:0 0 18px; padding:5px; background:var(--surface-2); border-radius:12px; border:0; gap:5px; }
.admin-anchor-nav button { min-height:42px; white-space:nowrap; font-size:13px; padding:0 18px; border-radius:8px; }
.admin-anchor-nav button.active { background:var(--surface); color:var(--primary-dark); }
.admin-dashboard { display:block; flex:1; min-height:0; overflow:auto; padding:1px; }
.admin-work-pane { margin:0!important; padding:24px!important; background:var(--surface); border:1px solid var(--line); border-radius:16px; display:grid; align-content:start; gap:18px; min-width:0; }
.admin-work-pane > h2 { margin:0; }
.admin-work-pane { box-shadow:none; backdrop-filter:none; }
#adminView .dashboard-stat { background:var(--bg); box-shadow:none; }
#adminView .admin-anchor-nav button.active { background:var(--surface); color:var(--primary); }
#adminAside,#adminPanel { border:0; padding:0; background:none; box-shadow:none; gap:16px; }
#adminAside > .admin-section-title { padding:0 4px 16px; }
.pane-suppressed { display:none!important; }
#adminView .dashboard-stats { grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
#adminView .dashboard-stat { min-height:94px; border-radius:12px; }
#adminView .user-table,#adminView .access-log-list,#adminView .source-download-list,#visitorLogsView .access-log-list { min-width:0; overflow:auto; }
#adminView input,#adminView select,#visitorLogsView input { min-height:42px; font-size:13px; max-width:100%; }
#visitorLogsView > :not(.section-head) { min-height:0; }
#visitorLogsView .visitor-log-panel { overflow:auto; }
#createView .deploy-layout { min-height:0; overflow:auto; display:block; }
#createView .deploy-panel { width:100%; max-width:980px; margin:auto; background:var(--surface); padding:24px; }
#createView .deploy-panel-head { position:sticky; top:-24px; z-index:3; background:var(--surface); padding:12px 0; }
body[data-view="project"] .main-area { overflow:auto; }
body[data-view="project"] .project-runner-view { height:auto; min-height:100%; }
.appearance-dialog { width:min(760px,calc(100% - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:24px; background:var(--surface); color:var(--text); border:1px solid var(--line); border-radius:20px; }
dialog::backdrop { background:#1118; backdrop-filter:blur(4px); }
.appearance-dialog header,.appearance-dialog footer { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.appearance-dialog h2 { margin:0; }
.appearance-dialog p,.appearance-dialog footer span { color:var(--muted); font-size:13px; line-height:1.6; }
.appearance-search { display:grid; gap:8px; margin:16px 0; font-size:13px; }
.appearance-dialog input,.appearance-dialog select { width:100%; min-height:44px; border:1px solid var(--line); background:var(--bg); color:var(--text); border-radius:8px; padding:10px; }
.icon-library { display:grid; grid-template-columns:repeat(auto-fill,minmax(40px,1fr)); gap:6px; max-height:190px; overflow:auto; }
.icon-library button { min-height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); }
.icon-library button:hover { border-color:var(--primary); color:var(--primary); }
.icon-library svg { width:25px; height:25px; stroke:none; }
.icon-style-library { display:grid; grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); gap:8px; margin:20px 0; }
.icon-style-library button { padding:8px; display:grid; justify-items:center; gap:8px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--text); font-size:11px; }
.icon-style-library button[aria-pressed="true"] { border-color:var(--primary); background:var(--surface-2); }
.appearance-dialog footer button { display:flex; gap:8px; align-items:center; white-space:nowrap; min-height:44px; }
@media(min-width:1600px) { #feedView .project-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1200px) {
  .nav-inner { width:calc(100% - 32px); gap:16px; }
  .nav-button:not(.canvas-nav-button) span,.nav-random-button span { display:none; }
  .nav-button { min-width:42px; }
  #feedView.workspace-feed.active,body[data-right-dock="collapsed"] #feedView.workspace-feed.active { padding:20px; }
  #feedView .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-right-dock="open"] #feedView.workspace-feed.active { grid-template-columns:minmax(0,1fr); }
  #feedView .activity-rail { position:fixed; z-index:80; right:16px; top:80px; bottom:20px; width:300px; height:auto; box-shadow:var(--shadow); }
}
@media(max-width:720px) {
  .top-nav { min-height:112px; }
  .nav-inner { min-height:112px; width:calc(100% - 28px); gap:10px; flex-wrap:wrap; padding:10px 0 56px; position:relative; }
  .brand { min-width:0; flex:1; }
  .brand-title { font-size:17px; }
  .nav-actions { width:auto; flex:0 0 auto; }
  .nav-actions .nav-button,.nav-actions .nav-random-button,.shortcut-help-button { display:none; }
  .nav-actions .theme-button { display:inline-grid; width:38px; height:38px; min-height:38px; }
  .nav-actions .login-button { min-height:38px; padding:0 12px; }
  .mobile-nav-wrap { display:block; order:3; }
  .mobile-menu-button { min-width:38px; min-height:38px; }
  .nav-search-box { display:flex; position:absolute; bottom:10px; left:0; right:0; height:38px; min-width:0; width:100%; max-width:none; margin:0; }
  .nav-actions .shortcut-help-button { display:none; }
  .user-watermark { grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:150px; }
  .mobile-nav-menu { right:0; top:50px; }
  #feedView.workspace-feed.active,body[data-right-dock="collapsed"] #feedView.workspace-feed.active { padding:16px 14px calc(70px + env(safe-area-inset-bottom)); gap:0; }
  #feedView .workspace-head { min-height:45px; margin-bottom:12px; gap:6px; flex-direction:row; flex-wrap:nowrap; text-align:left; }
  #feedView .workspace-head h1 { font-size:23px; }
  #feedView .workspace-head .eyebrow { display:none; }
  .library-actions { gap:6px; }
  .library-actions button { min-height:38px; padding:0 10px; font-size:12px; }
  #appearanceButton span { display:none; }
  #feedView .workspace-toolbar { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:8px; }
  #feedView .section-filter-strip { display:flex; flex:1 0 100%; width:100%; }
  #feedView .section-filter-strip button { min-height:34px; }
  #feedView .segmented { display:flex; flex:1; width:auto; justify-content:space-between; min-height:36px; }
  #feedView .segmented .segment { min-width:34px; font-size:11px; }
  #feedView .mobile-filter-button { width:38px; min-width:38px; min-height:38px; }
  #feedView .result-summary { display:flex; min-height:26px; margin-bottom:8px; }
  #feedView .result-summary > span { font-size:11px; }
  #feedView .result-summary button { min-height:30px; }
  #feedView .project-grid,#feedView[data-feed-mode="launcher"] .project-grid { grid-template-columns:minmax(0,1fr); gap:12px; padding:0 2px 12px 0; }
  #feedView[data-feed-mode="launcher"] .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #feedView[data-feed-mode="launcher"] .project-card.app-tile { padding:12px 8px; min-height:148px; }
  #libraryDensityButton { padding:0 9px; font-size:11px; }
  #feedView .project-card.app-tile { padding:14px; min-height:166px; gap:12px; border-radius:14px; }
  #feedView .app-launch { grid-template-columns:50px minmax(0,1fr); gap:12px; }
  #feedView .app-icon.curated-icon { width:50px; height:50px; border-radius:13px; }
  #feedView .app-meta-row button { min-width:34px; width:34px; min-height:36px; height:36px; }
  #feedView .app-title-row strong { font-size:15px; }
  #feedView .mobile-tool-nav { display:flex; min-height:58px; bottom:0; left:0; right:0; padding:5px 10px max(5px,env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--line); }
  #feedView .mobile-tool-nav button { min-height:48px; flex:1; }
  #feedView .workspace-filter-sheet { width:calc(100% - 24px); max-height:calc(100dvh - 160px); left:12px; right:12px; bottom:76px; top:auto; }
  #feedView .activity-rail { width:calc(100% - 24px); right:12px; left:12px; bottom:76px; top:160px; border-radius:16px; }
  #adminView.active,#visitorLogsView.active,#createView.active { padding:16px 14px; }
  #adminView h1,#visitorLogsView h1,#createView h1 { font-size:23px; }
  .admin-anchor-nav { margin-bottom:12px; }
  .admin-anchor-nav button { min-height:42px; padding:0 12px; font-size:12px; }
  .admin-work-pane { padding:16px!important; gap:14px; }
  #adminView .dashboard-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #adminView .user-row { grid-template-columns:minmax(0,1fr); gap:12px; padding:14px; }
  #adminView .user-actions { justify-content:flex-end; }
  #adminView .admin-form { display:flex; flex-wrap:wrap; }
  #adminView .admin-form input { min-width:0; flex:1 1 150px; }
  #adminAside > .admin-section-title { flex-wrap:wrap; }
  .admin-title-actions { flex-wrap:wrap; }
  .appearance-dialog { padding:18px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; } }

/* 手机输入采用 16px，避免系统自动放大；操作维持可触达尺寸。 */
@media(max-width:720px) { input,select,textarea,.nav-search-box input,#adminView input,#adminView select { font-size:16px; } #feedView .app-meta-row button { min-height:44px; min-width:36px; } }
