/* Physics Os · 门户样式。原课件、后台与共用基础样式保持独立。 */
.portal {
  --page:#0a1019; --panel:#151e2b; --scene:#0b1625; --soft:#172a41;
  --text:#edf2fa; --muted:#96a6bc; --border:#2e435e; --faint:#213246;
  --accent:#6fa5ff; --accent-ink:#fff; --blue:#437eff; --orange:#ecaf6b;
  --preview-bg:#0a1019; --preview-muted:#96a6bc; --space-xl:36px; --radius:4px;
  --control-height:36px;
  background:radial-gradient(ellipse at 30% 16%,#11243a55,transparent 54%),var(--page);
}
:root[data-theme=light] .portal {
  --page:#f3f5f8; --panel:#fff; --scene:#e5edf7; --soft:#e4ebf7;
  --text:#152640; --muted:#51647d; --border:#b2c4db; --faint:#cbd7e6;
  --accent:#245ed4; --accent-ink:#fff; --preview-bg:#f3f5f8; --preview-muted:#51647d;
}
:root[data-theme=light] .portal .hero-scene,:root[data-theme=light] .portal .card-scene { background-color:#0b1625; }
.portal .site-header { background:transparent; }
.portal .header-inner { max-width:1600px; padding:8px var(--space-xl); gap:8px 38px; }
.portal .brand { gap:14px; }
.portal .brand-symbol { width:41px; height:39px; color:var(--text); flex-shrink:0; }
.portal .brand strong { font-size:1.625rem; font-weight:550; letter-spacing:.005em; }
.portal .main-nav { gap:15px; }
.portal .main-nav a { font-size:1rem; min-height:44px; padding:7px 8px; gap:8px; }
.portal .main-nav a[aria-current=page] { color:#9fdcf8; border-color:#64c5ec; }
:root[data-theme=light] .portal .main-nav a[aria-current=page] { color:var(--accent); border-color:var(--accent); }
.portal .nav-count { font-size:.875rem; }
.portal .header-tools { gap:14px; flex-wrap:wrap; }
.portal .quiet-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; border-color:transparent; color:var(--text); border-radius:4px; }
.portal #theme-toggle { order:-1; border-color:var(--faint); min-width:36px; }
.portal #theme-toggle svg { width:18px; height:18px; }
.portal #theme-toggle span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.portal #reader-account { font-size:.875rem; }
.portal main { max-width:1600px; padding:0 var(--space-xl) 22px; min-height:calc(100dvh - 112px); }
.portal .filter-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px 18px; padding:12px 0; margin:0; border-bottom:1px solid var(--faint); }
.portal .catalog-title { font-size:1rem; font-weight:500; flex:0 1 auto; margin:0 2px 0 0; padding-right:18px; border-right:1px solid var(--border); }
.portal .search-label { position:relative; display:block; flex:1 1 15rem; min-width:0; max-width:24rem; }
.portal .search-icon { position:absolute; width:18px; height:18px; left:10px; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.portal .search-label input { min-height:36px; padding:5px 10px 5px 36px; font-size:.875rem; border-color:var(--faint); background:transparent; border-radius:3px; }
.portal .filter-label { flex:0 1 12rem; min-width:0; }
.portal .filter-label[for=book-filter] { flex-basis:11rem; }
.portal .filter-label select { display:block; width:100%; min-width:0; max-width:100%; min-height:36px; padding:5px 28px 5px 10px; color:var(--text); background:var(--page); border:1px solid var(--faint); border-radius:3px; font-size:.875rem; }
.portal .result-count { font-size:.875rem; margin-left:auto; }
.portal .filter-chips:empty { display:none; }
.portal .filter-chips:not(:empty) { margin:0; padding:8px 0; border-bottom:1px solid var(--faint); }
.portal .filter-chip { font-size:.875rem; background:transparent; padding:2px 6px 2px 0; }
.portal .filter-clear { color:var(--accent); }
.portal .catalog-layout { display:grid; grid-template-columns:minmax(0,1.52fr) minmax(0,1fr); gap:0; align-items:stretch; }
.portal .catalog-layout:has(.resource-index[hidden]) { grid-template-columns:minmax(0,1fr); }
.portal .catalog-layout:has(.resource-index[hidden]) .preview-pane { border-right:0; }
.portal .preview-pane { min-width:0; padding:0; margin:0; border:0; border-right:1px solid var(--faint); border-radius:0; position:relative; background:transparent; }
.portal .preview-pane > summary { display:none; }
.portal .preview-body { padding:22px 24px 20px 0; min-width:0; }
.portal .hero-heading { padding:0 0 5px; }
.portal .preview-label { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:0 0 7px; font-size:.875rem; color:var(--muted); }
.portal .current-dot { width:5px; height:5px; border-radius:50%; background:#75b4ff; }
.portal .preview-state { margin-left:auto; font-size:.875rem; color:var(--muted); }
.portal .preview-heading { margin:0 0 8px; font-size:clamp(1.4rem,2.2vw,2rem); line-height:1.35; font-weight:600; overflow-wrap:anywhere; letter-spacing:.015em; }
.portal .preview-heading:focus { outline:none; }
.portal .preview-meta { display:flex; align-items:center; flex-wrap:wrap; gap:3px 12px; color:var(--muted); font-size:.875rem; }
.portal .preview-description { font-size:.875rem; color:var(--muted); margin:10px 0 0; max-width:58ch; overflow-wrap:anywhere; }
.portal .preview-meta > span+span::before { content:'·'; margin-right:12px; color:var(--border); }
.portal .access-badge { color:var(--accent); white-space:nowrap; }
.portal .access-badge[data-locked=true] { color:var(--muted); }
.portal .hero-scene { width:100%; aspect-ratio:3.4; margin-top:8px; min-width:0; position:relative; display:grid; align-items:center; background:radial-gradient(ellipse at 50% 80%,#163f6f44,transparent 67%),linear-gradient(#1c375322 1px,transparent 1px),linear-gradient(90deg,#1c375322 1px,transparent 1px); background-size:auto,32px 32px,32px 32px; }
.portal .hero-scene > svg { display:block; width:100%; height:auto; }
.portal .hero-scene.cover-scene { aspect-ratio:var(--cover-ratio,16/9); background:var(--scene); }
.portal .resource-cover { display:block; width:100%; height:100%; object-fit:contain; opacity:0; }
.portal .cover-scene .resource-cover { position:absolute; inset:0; }
.portal .image-ready .resource-cover { opacity:1; }
.portal .image-placeholder { position:absolute; inset:0; display:grid; place-items:center; font-size:.875rem; color:var(--muted); }
.portal .image-pending { background:linear-gradient(120deg,var(--scene),var(--panel)); }
.portal .image-failed { position:relative; }
.portal .image-failure { position:absolute; bottom:2px; left:0; right:0; color:var(--muted); font-size:.875rem; padding:6px; background:var(--page); }
.portal .text-action { background:none; border:0; padding:3px 6px; min-height:32px; font-size:inherit; color:var(--accent); }
.portal .illustration-note { margin:4px 0 14px; color:var(--muted); font-size:.875rem; }
.portal .preview-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px 16px; }
.portal .button { border-radius:4px; min-height:36px; font-size:.875rem; }
.portal .button.primary { background:var(--blue); border-color:var(--blue); color:#fff; }
.portal .button.primary:hover { background:#3169ed; }
.portal .preview-actions .primary { min-height:40px; padding:7px 18px; gap:12px; }
.portal .play-triangle { font-size:1rem; }
.portal .secondary-action { background:transparent; border-color:var(--border); }
.portal .preview-open { display:inline-flex; align-items:center; gap:9px; min-height:36px; color:var(--accent); font-size:.875rem; padding:4px 0; }
.portal .preview-open:hover { color:var(--text); }
.portal .preview-player { position:relative; margin:14px 0; background:var(--scene); }
.portal .library-preview-frame { display:block; width:100%; height:520px; min-height:300px; border:0; }
.portal .preview-loading { position:absolute; inset:0; z-index:1; margin:0; padding:20px; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:12px; color:var(--muted); background:var(--scene); font-size:.875rem; }
.portal .preview-loading[data-error=true] { color:var(--orange); }
.portal .resource-index { min-width:0; padding-left:22px; }
.portal .resource-index-list { display:flex; flex-direction:column; height:100%; }
.portal .resource-entry { display:grid; align-items:center; position:relative; width:100%; min-width:0; padding:18px 0; gap:14px; background:transparent; color:var(--text); border:0; border-bottom:1px solid var(--faint); border-radius:0; text-align:left; }
.portal .resource-entry:hover { background:linear-gradient(90deg,transparent,var(--soft)); }
.portal .resource-entry[aria-pressed=true] { box-shadow:inset 3px 0 var(--accent); }
.portal .resource-entry:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.portal .resource-entry .entry-category { color:var(--accent); font-size:.875rem; margin:0 0 6px; }
.portal .resource-entry .card-copy { padding:0; min-width:0; }
.portal .resource-entry h3 { font-size:1.125rem; font-weight:550; line-height:1.45; margin:0 0 8px; overflow-wrap:anywhere; text-wrap:pretty; }
.portal .resource-kind { display:flex; flex-wrap:wrap; gap:3px 10px; font-size:.875rem; color:var(--muted); margin:0; }
.portal .resource-kind > span:first-child { display:none; }
.portal .card-tags { display:flex; flex-wrap:wrap; gap:4px 12px; color:var(--muted); font-size:.875rem; margin:7px 0 0; }
.portal .entry-arrow { font-size:1.25rem; color:var(--muted); justify-self:end; }
.portal .resource-entry:hover .entry-arrow { color:var(--accent); }
.portal .card-scene { display:grid; place-items:center; width:100%; min-width:0; height:auto; aspect-ratio:2.15; border:0; border-radius:0; background:none; overflow:hidden; position:relative; }
.portal .card-scene svg { display:block; width:100%; height:100%; }
.portal .card-scene.cover-scene { aspect-ratio:var(--cover-ratio,16/9); background:var(--scene); }
.portal .resource-entry[data-variant=spotlight] { grid-template-columns:minmax(0,1fr) minmax(0,1.13fr) 16px; flex:1.3; }
.portal [data-variant=spotlight] .card-scene { aspect-ratio:1.3; }
.portal [data-variant=spotlight] .card-tags { display:none; }
.portal .resource-entry[data-variant=landscape] { grid-template-columns:minmax(0,1fr) minmax(0,1.13fr) 16px; flex:1; }
.portal [data-variant=landscape] .card-tags { display:none; }
.portal .resource-entry[data-variant=compact] { grid-template-columns:100px minmax(0,1fr) 16px; flex:.7; border-bottom:0; }
.portal [data-variant=compact] .card-scene { aspect-ratio:1.5; }
.portal [data-variant=compact] .entry-category,.portal [data-variant=compact] .card-tags { display:none; }
.portal .catalog-content { border-top:1px solid var(--faint); min-width:0; }
.portal .resource-groups { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:0; }
.portal .resource-groups:has(> .resource-entry:only-child) { grid-template-columns:minmax(0,1fr); }
.portal .resource-groups > .resource-entry:only-child { border-right:0; }
.portal .resource-groups:has(> .resource-entry:nth-child(2):last-child) [data-variant=feature] { grid-row:auto; }
.portal .resource-entry[data-variant=feature] { grid-row:span 2; grid-template-columns:minmax(0,1fr) 20px; padding:20px 24px 20px 0; border-right:1px solid var(--faint); border-bottom:0; }
.portal [data-variant=feature] .card-copy { grid-row:1; grid-column:1; }
.portal [data-variant=feature] .entry-arrow { grid-row:1; grid-column:2; }
.portal [data-variant=feature] .card-scene { grid-row:2; grid-column:1/-1; aspect-ratio:3.2; }
.portal [data-variant=feature] .card-scene.cover-scene { aspect-ratio:var(--cover-ratio,16/9); }
.portal [data-variant=feature] h3 { font-size:1.375rem; }
.portal .resource-entry[data-variant=strip] { grid-template-columns:minmax(0,1fr) minmax(120px,.8fr) 16px; padding:22px 0 22px 24px; }
.portal [data-variant=strip] .card-scene { grid-column:2; grid-row:1; }
.portal [data-variant=strip] .card-copy { grid-column:1; grid-row:1; }
.portal [data-variant=strip] .entry-arrow { grid-column:3; grid-row:1; }
.portal [data-variant=strip] .card-tags { display:none; }
.portal [data-variant=strip]:last-child { border-bottom:0; }
.portal .browse-all { display:flex; align-items:center; justify-content:center; gap:12px; padding:10px 16px; width:100%; min-height:44px; background:transparent; border:0; border-top:1px solid var(--faint); color:var(--accent); font-size:.875rem; }
.portal .browse-all:hover { background:var(--soft); }
.portal .catalog-rest { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 32px; border-top:1px solid var(--faint); }
.portal .resource-entry[data-variant=row] { grid-template-columns:140px minmax(0,1fr) 16px; }
.portal .catalog-rest .resource-entry:has(.cover-scene) { grid-column:1/-1; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 20px; }
.portal .empty-state { border:0; padding:70px 20px; }
.portal .empty-state h3 { font-size:1.25rem; }
.portal .empty-state p { overflow-wrap:anywhere; }
.portal .login-gate { padding:30px 0; overflow-wrap:anywhere; }
.portal .login-gate h3 { font-size:1.125rem; }
.portal .login-gate p { color:var(--muted); font-size:.875rem; }
.portal .login-gate .button { margin:0 8px 8px 0; }
.portal .site-footer { max-width:1600px; padding:16px var(--space-xl); justify-content:flex-start; gap:12px; font-size:.875rem; }
.portal .resource-header { padding-top:22px; }
.portal .resource-header h1 { font-size:1.5rem; }
.portal .resource-title-group { min-width:0; }
.portal .resource-meta { font-size:.875rem; }
.portal .resource-actions .button { min-height:40px; }
.portal .back-link { min-height:36px; align-items:center; }
.portal .related-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.portal .related-link { min-width:0; }
.portal .related-link strong { overflow-wrap:anywhere; }
.portal .cover-zoom { width:min(96vw,1560px); max-width:none; max-height:96dvh; padding:12px; background:#080f18; color:#edf2fa; border:1px solid #36577c; border-radius:6px; }
.portal .cover-zoom::backdrop { background:#020810e8; }
.portal .cover-zoom-heading { display:flex; align-items:center; gap:12px; }
.portal .cover-zoom-heading h2 { flex:1; min-width:0; font-size:1rem; margin:0; overflow-wrap:anywhere; }
.portal .cover-zoom-heading .button { flex:none; background:#151e2b; color:#edf2fa; }
.portal .cover-zoom img { display:block; width:100%; }
.portal .cover-reader-tools .button { height:auto; min-height:36px; font-size:.875rem; white-space:normal; }
.portal .cover-reader-scale,.portal .cover-reader-hint { font-size:.875rem; }
@media(min-width:1600px) { .portal .hero-scene { aspect-ratio:3.6; } }
@media(max-width:1200px) {
  .portal { --space-xl:24px; }
  .portal .header-inner { gap:6px 22px; }
  .portal .brand strong { font-size:1.4rem; }
  .portal .main-nav { gap:4px; }
  .portal .main-nav a { padding-inline:6px; }
  .portal .header-tools { gap:4px; }
  .portal .catalog-layout { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); }
  .portal .preview-body { padding-right:18px; }
  .portal .resource-index { padding-left:18px; }
  .portal .resource-entry { gap:10px; }
  .portal .resource-entry[data-variant=compact] { grid-template-columns:80px minmax(0,1fr) 14px; }
  .portal .resource-entry h3 { font-size:1rem; }
  .portal .resource-entry[data-variant=strip] { grid-template-columns:minmax(0,1fr) 130px; padding-left:18px; }
  .portal [data-variant=strip] .entry-arrow { display:none; }
}
@media(max-width:940px) {
  .portal .header-inner { gap:8px 18px; }
  .portal .main-nav { order:3; flex-basis:100%; justify-content:space-between; }
  .portal .catalog-layout { grid-template-columns:1fr; }
  .portal .preview-pane { border-right:0; border-bottom:1px solid var(--faint); }
  .portal .preview-pane > summary { display:flex; align-items:center; gap:8px; list-style:none; cursor:pointer; padding:10px 0; min-height:44px; color:var(--muted); font-size:.875rem; user-select:none; -webkit-user-select:none; }
  .portal .preview-pane > summary::-webkit-details-marker { display:none; }
  .portal .preview-pane > summary strong { flex:1; min-width:0; overflow-wrap:anywhere; color:var(--text); font-weight:500; }
  .portal .preview-pane > summary::after { content:'展开'; flex:none; color:var(--accent); }
  .portal .preview-pane[open] > summary::after { content:'收起'; }
  .portal .preview-pane[open] > summary strong { display:none; }
  .portal .preview-pane > summary::after { margin-left:auto; }
  .portal .preview-body .preview-label { display:none; }
  .portal .preview-body { padding:10px 0 18px; }
  .portal .preview-heading { font-size:1.65rem; }
  .portal .hero-scene { aspect-ratio:3.1; }
  .portal .resource-index { padding:0; }
  .portal .resource-index-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .portal .resource-entry[data-variant=spotlight] { grid-column:1/-1; grid-template-columns:38% minmax(0,1fr) 20px; }
  .portal [data-variant=spotlight] .card-scene { aspect-ratio:2.3; }
  .portal .resource-entry[data-variant=landscape],.portal .resource-entry[data-variant=compact] { grid-template-columns:32% minmax(0,1fr) 16px; border-bottom:0; padding-right:12px; }
  .portal .resource-entry[data-variant=compact] { padding-left:12px; border-left:1px solid var(--faint); }
  .portal .catalog-rest .resource-entry[data-variant=row] { grid-template-columns:90px minmax(0,1fr) 12px; }
}
@media(max-width:620px) {
  .portal { --space-xl:16px; }
  .portal .brand { gap:9px; }
  .portal .brand strong { font-size:1.375rem; }
  .portal .brand-symbol { width:32px; height:34px; }
  .portal .main-nav { gap:0; }
  .portal .main-nav a { font-size:.875rem; padding:6px 3px; gap:4px; white-space:normal; }
  .portal .nav-count { font-size:.875rem; }
  .portal button,.portal .button,.portal .quiet-button,.portal .main-nav a,.portal .filter-toolbar input,.portal .filter-label select { min-height:44px; }
  .portal .preview-actions .primary { min-height:44px; }
  .portal .cover-reader-tools .button { min-height:44px; }
  .portal .filter-toolbar { gap:8px; padding:10px 0; }
  .portal .catalog-title { border:0; padding:0; flex:1; }
  .portal .filter-toolbar .search-label { order:1; flex-basis:100%; max-width:none; }
  .portal .filter-label,.portal .filter-label[for=book-filter] { order:2; flex:1 1 10rem; }
  .portal .filter-toolbar .result-count { order:0; }
  .portal .preview-heading { font-size:1.5rem; }
  .portal .hero-scene { aspect-ratio:2.1; }
  .portal .hero-scene > svg { height:100%; object-fit:contain; }
  .portal .preview-meta { gap:4px 8px; }
  .portal .preview-meta > span+span::before { margin-right:8px; }
  .portal .preview-actions { gap:8px 12px; }
  .portal .preview-actions .primary { padding-inline:12px; }
  .portal .preview-open { min-height:44px; }
  .portal .resource-index-list { display:flex; }
  .portal .resource-entry[data-variant=spotlight],.portal .resource-entry[data-variant=landscape],.portal .resource-entry[data-variant=compact] { grid-template-columns:35% minmax(0,1fr) 12px; padding:18px 0; border-left:0; border-bottom:1px solid var(--faint); }
  .portal .resource-entry[data-variant=spotlight] .card-scene { aspect-ratio:1.6; }
  .portal .resource-groups { grid-template-columns:1fr; }
  .portal .resource-entry[data-variant=feature] { grid-row:auto; padding:20px 0; border-right:0; border-bottom:1px solid var(--faint); }
  .portal [data-variant=feature] h3 { font-size:1.25rem; }
  .portal .resource-entry[data-variant=strip] { grid-template-columns:minmax(0,1fr) 35%; padding:18px 0; }
  .portal .catalog-rest { grid-template-columns:1fr; }
  .portal .catalog-rest .resource-entry[data-variant=row] { grid-template-columns:32% minmax(0,1fr) 12px; }
  .portal .catalog-rest .resource-entry:has(.cover-scene) { grid-template-columns:minmax(0,1fr) 16px; }
  .portal .catalog-rest .resource-entry:has(.cover-scene) .card-copy { grid-row:1; }
  .portal .catalog-rest .resource-entry:has(.cover-scene) .entry-arrow { grid-column:2; grid-row:1; }
  .portal .catalog-rest .resource-entry:has(.cover-scene) .card-scene { grid-row:2; grid-column:1/-1; }
  .portal .related-grid { grid-template-columns:1fr; }
  .portal .player-area { min-height:560px; }
  .portal .library-preview-frame { height:560px; }
}
@media(pointer:coarse) {
  .portal button,.portal .button,.portal .quiet-button,.portal .main-nav a,.portal .text-action,.portal .back-link { min-height:44px; }
  .portal .preview-actions .primary { min-height:44px; }
  .portal .filter-toolbar input,.portal .filter-label select { min-height:44px; font-size:1rem; }
}
@media(prefers-reduced-motion:reduce) { .portal * { scroll-behavior:auto; transition:none; } }

/* 方案21：动态主预览、可调宽分组目录。完整交互与封面阅读器沿用上方样式。 */
.portal { --page:#08111d; --scene:#091829; --space-xl:24px; background:var(--page); }
.portal .site-header { background:var(--page); }
.portal .header-inner { max-width:1760px; padding:0 24px; gap:8px 28px; min-height:64px; }
.portal .brand { gap:10px; }
.portal .brand-symbol { width:32px; height:34px; }
.portal .brand strong { font-size:1.45rem; font-weight:650; letter-spacing:-.02em; }
.portal .main-nav { margin-inline:auto; gap:8px; align-self:stretch; }
.portal .main-nav a { min-height:63px; padding:10px 14px; font-size:.9375rem; gap:7px; }
.portal .main-nav a[aria-current=page] { color:var(--accent); background:var(--soft); border-color:var(--blue); }
.portal .nav-count { font-size:.75rem; }
.portal .header-tools { gap:10px; }
.portal main { width:100%; max-width:1760px; padding:24px 24px 18px; min-height:calc(100dvh - 112px); }
.portal .catalog21-layout { display:grid; grid-template-columns:minmax(0,1fr) 16px var(--directory-width,300px); gap:0; align-items:stretch; }
.portal .catalog21-layout > .preview-pane { border:0; min-width:0; }
.portal .catalog21-layout .preview-body { padding:0 22px 0 0; }
.portal .catalog21-layout .hero-heading { padding:0 0 12px; }
.portal .catalog21-layout .preview-label { font-size:.75rem; line-height:1.7; margin:0 0 10px; }
.portal .catalog21-layout .preview-heading { font-size:clamp(1.5rem,2.55vw,2.375rem); line-height:1.36; margin:0 0 4px; letter-spacing:.01em; }
.portal .catalog21-layout .hero-scene { display:grid; place-items:center; margin:0; aspect-ratio:16/8.5; min-height:280px; border:1px solid var(--faint); border-radius:5px; overflow:hidden; background:radial-gradient(ellipse at 55% 55%,#102b47,#071420); }
.portal .catalog21-layout .hero-scene.cover-scene { background:var(--scene); }
.portal .catalog21-layout .hero-scene > svg { display:block; width:100%; height:100%; max-height:100%; }
.portal .collision-material { position:relative; width:100%; line-height:0; }
.portal .collision-material > img { display:block; width:100%; height:auto; }
.portal .collision-material > svg { position:absolute; inset:0; display:block; width:100%; height:100%; pointer-events:none; }
.portal .catalog21-layout .illustration-note { min-height:23px; margin:10px 0 16px; font-size:.8125rem; line-height:1.7; }
/* 主图下方局部方案30：信息页签、源课件说明与紧凑操作。 */
.portal .preview-dock { margin-top:8px; min-width:0; container-type:inline-size; }
.portal .lesson-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; border-bottom:1px solid var(--faint); }
.portal .lesson-tabs { display:flex; align-self:stretch; gap:22px; min-width:0; }
.portal .lesson-tab { position:relative; display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:9px 3px 10px; border:0; border-radius:0; background:transparent; color:var(--muted); font-size:.9375rem; line-height:1.5; white-space:nowrap; }
.portal .lesson-tab[aria-selected=true] { color:var(--text); font-weight:600; }
.portal .lesson-tab[aria-selected=true]::after { content:''; position:absolute; bottom:-1px; left:0; right:0; height:2px; background:var(--blue); }
.portal .lesson-tab:hover { color:var(--text); }
.portal .lesson-tab:focus-visible { outline:2px solid var(--accent); outline-offset:-3px; }
.portal .lesson-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:6px 12px; padding:4px 0; margin-left:auto; }
.portal .lesson-details .lesson-actions .primary { min-height:32px; padding:5px 12px; gap:6px; font-size:.875rem; line-height:1.5; font-weight:550; box-shadow:none; }
.portal .lesson-actions .play-triangle { font-size:.625rem; }
.portal .stop-square { width:8px; height:8px; border:1.5px solid currentColor; border-radius:1px; }
.portal .lesson-details .secondary-action { display:inline-flex; align-items:center; gap:5px; padding:5px 4px; min-height:32px; color:var(--accent); background:transparent; border-color:transparent; font-size:.8125rem; line-height:1.5; }
.portal .lesson-details .secondary-action:hover { color:var(--text); background:var(--soft); }
.portal .lesson-details .secondary-action svg { width:15px; height:15px; flex:none; }
.portal .lesson-panel { min-width:0; padding:18px 0 15px; outline-offset:-2px; }
.portal .lesson-panel[hidden] { display:none; }
.portal .lesson-overview,.portal .lesson-initial { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(0,1fr); gap:24px; }
.portal .lesson-details section,.portal .lesson-details aside { min-width:0; }
.portal .lesson-details h2 { margin:0 0 7px; color:var(--accent); font-size:.9375rem; line-height:1.5; font-weight:550; letter-spacing:.015em; }
.portal .lesson-goal { margin:0 0 5px; color:var(--text); font-size:1.125rem; line-height:1.6; font-weight:550; overflow-wrap:anywhere; }
.portal .lesson-basis { margin:0; color:var(--muted); font-size:.875rem; line-height:1.7; }
.portal .lesson-basis span { margin:0 6px; }
.portal .lesson-description { margin:0; font-size:.9375rem; line-height:1.8; color:var(--text); overflow-wrap:anywhere; }
.portal .lesson-explore { margin-top:15px; padding-top:11px; border-top:1px solid var(--faint); }
.portal .lesson-explore h2 { margin-bottom:4px; }
.portal .lesson-conditions,.portal .lesson-initial-notes { padding-left:24px; border-left:1px solid var(--faint); }
.portal .lesson-points { display:grid; gap:6px; padding:0; margin:0; list-style:none; font-size:.875rem; line-height:1.75; color:var(--text); }
.portal .lesson-points li { position:relative; padding-left:15px; min-width:0; overflow-wrap:anywhere; }
.portal .lesson-points li::before { content:''; position:absolute; left:1px; top:.72em; width:5px; height:5px; border-radius:50%; background:var(--blue); }
.portal .lesson-explore .lesson-points { gap:1px; }
.portal .lesson-explore .lesson-points li::before { width:3px; height:3px; top:.8em; background:var(--accent); }
.portal .lesson-facts { margin:0; display:grid; gap:10px; font-size:.875rem; line-height:1.7; }
.portal .lesson-facts > div { display:grid; grid-template-columns:4.5em minmax(0,1fr); gap:10px; }
.portal .lesson-facts dt { color:var(--muted); }
.portal .lesson-facts dd { margin:0; overflow-wrap:anywhere; }
.portal .lesson-initial-lead { margin:0 0 14px; font-size:1.125rem; line-height:1.6; font-weight:550; }
.portal .lesson-initial-notes p { margin:0; color:var(--muted); font-size:.875rem; line-height:1.8; }
.portal .lesson-initial-notes .lesson-points { color:var(--muted); }
.portal .lesson-summary-status { margin:0 0 10px; color:var(--muted); font-size:.8125rem; line-height:1.6; }
.portal .lesson-knowledge { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px 18px; padding-top:9px; border-top:1px solid var(--faint); font-size:.8125rem; color:var(--muted); }
.portal .lesson-knowledge > span { color:var(--accent); }
.portal .preview-tags { display:flex; flex-wrap:wrap; gap:3px 12px; list-style:none; padding:0; margin:0; font-size:.8125rem; color:var(--muted); }
.portal .preview-tags li { line-height:1.7; overflow-wrap:anywhere; }
.portal .preview-tags li+li::before { content:'·'; margin-right:12px; color:var(--border); }
.portal .lesson-scene-kind { font-size:.6875rem; color:var(--muted); margin-left:auto; }
.portal .lesson-player-note { display:flex; align-items:center; flex-wrap:wrap; gap:5px 15px; margin-top:7px; color:var(--muted); font-size:.75rem; }
.portal .lesson-player-note .preview-open { min-height:32px; font-size:.8125rem; padding:2px 0; margin-left:auto; }
@container(max-width:620px) {
  .portal .lesson-overview,.portal .lesson-initial { grid-template-columns:minmax(0,1fr); gap:16px; }
  .portal .lesson-conditions,.portal .lesson-initial-notes { padding:12px 0 0; border-left:0; border-top:1px solid var(--faint); }
  .portal .lesson-conditions .lesson-points { gap:4px; }
}
@container(max-width:420px) {
  .portal .lesson-tabs { flex-basis:100%; }
  .portal .lesson-actions { width:100%; padding:0 0 8px; }
  .portal .lesson-panel { padding-top:15px; }
  .portal .lesson-scene-kind { flex-basis:100%; margin-left:0; }
}
@media(max-width:959px),(pointer:coarse) {
  .portal .lesson-details .lesson-actions .button,.portal .lesson-tab,.portal .lesson-summary-status .text-action,.portal .lesson-player-note .preview-open { min-height:44px; }
  .portal .lesson-details .lesson-actions .primary { padding-inline:14px; }
}
.portal .catalog-directory { position:sticky; top:18px; align-self:start; display:flex; flex-direction:column; min-width:0; min-height:420px; max-height:calc(100dvh - 104px); padding-left:16px; container-type:inline-size; }
.portal .directory-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.portal .directory-heading h2 { margin:0; font-size:1.25rem; letter-spacing:.02em; }
.portal .directory-refresh { width:32px; min-width:32px; min-height:32px; padding:0; background:transparent; border:0; border-radius:4px; color:var(--muted); font-size:1.625rem; }
.portal .directory-refresh:hover { color:var(--accent); background:var(--soft); }
.portal .directory-scope { margin:3px 0 12px; color:var(--muted); font-size:.75rem; line-height:1.6; }
.portal .catalog-directory .filter-toolbar { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); flex:none; gap:9px 8px; padding:0 0 13px; margin:0; border:0; }
.portal .catalog-directory .search-label { grid-column:1/-1; width:100%; max-width:none; min-width:0; }
.portal .catalog-directory .filter-label { display:block; min-width:0; margin:0; }
.portal .catalog-directory .search-label input { width:100%; min-width:0; min-height:36px; font-size:.8125rem; border-color:var(--border); background:var(--scene); }
.portal .catalog-directory .filter-label select { min-height:34px; padding:5px 20px 5px 7px; font-size:.8125rem; border-color:var(--border); background-color:var(--scene); }
.portal .catalog-directory .filter-chips:not(:empty) { padding:0 0 9px; border:0; }
.portal .catalog-directory .filter-clear { font-size:.8125rem; padding:2px 0; min-height:28px; }
.portal .directory-list { flex:1 1 auto; min-height:120px; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; scrollbar-color:var(--border) transparent; overscroll-behavior:contain; }
.portal .directory-group { margin:0; padding:0; border:0; border-top:1px solid var(--faint); border-radius:0; background:transparent; }
.portal .directory-group > summary { display:flex; align-items:center; gap:7px; min-height:34px; padding:4px; list-style:none; color:var(--muted); font-size:.8125rem; line-height:1.5; cursor:pointer; user-select:none; -webkit-user-select:none; }
.portal .directory-group > summary::-webkit-details-marker { display:none; }
.portal .directory-group > summary::before { content:'›'; flex:none; width:10px; font-size:1.125rem; text-align:center; }
.portal .directory-group[open] > summary::before { transform:rotate(90deg); }
.portal .directory-group > summary:hover { color:var(--text); }
.portal .directory-group-count { margin-left:auto; font-size:.75rem; white-space:nowrap; }
.portal .directory-entry { display:grid; grid-template-columns:62px minmax(0,1fr); align-items:center; gap:10px; width:100%; min-width:0; min-height:77px; padding:10px 7px 10px 4px; text-align:left; background:transparent; border:0; border-left:3px solid transparent; border-bottom:1px solid var(--faint); border-radius:0; color:var(--text); }
.portal .directory-entry:last-child { border-bottom:0; }
.portal .directory-entry:hover { background:var(--soft); }
.portal .directory-entry[aria-pressed=true] { background:var(--soft); border-left-color:var(--blue); border-radius:3px; }
.portal .directory-entry:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.portal .directory-entry .card-scene { display:grid; place-items:center; width:100%; height:43px; min-height:0; aspect-ratio:auto; border:1px solid var(--faint); border-radius:3px; background:var(--scene); }
.portal .directory-copy { min-width:0; }
.portal .directory-copy > strong { display:block; font-size:1rem; line-height:1.5; font-weight:550; overflow-wrap:anywhere; }
.portal .directory-meta { display:flex; flex-wrap:wrap; gap:0 7px; font-size:.75rem; color:var(--muted); line-height:1.6; margin-top:4px; }
.portal .directory-current { color:var(--accent); }
.portal .locked-scene { color:var(--muted); font-size:.6875rem; text-align:center; }
.portal .directory-bottom { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; flex:none; gap:8px; min-height:36px; padding-top:12px; margin-top:7px; border-top:1px solid var(--faint); color:var(--muted); font-size:.75rem; }
.portal .directory-pagination { display:flex; align-items:center; gap:8px; }
.portal .directory-pagination .button { min-width:30px; min-height:30px; padding:2px 6px; background:transparent; font-size:.875rem; }
.portal .catalog-directory .empty-state { padding:20px 4px; text-align:left; }
.portal .catalog-directory .empty-state h3 { font-size:1rem; }
.portal .catalog-directory .empty-state p { font-size:.875rem; line-height:1.7; }
.portal .catalog-resizer { position:relative; min-height:450px; cursor:col-resize; touch-action:none; user-select:none; -webkit-user-select:none; outline-offset:0; }
.portal .catalog-resizer::before { content:''; position:absolute; width:1px; top:0; bottom:0; left:7px; background:var(--faint); }
.portal .catalog-resizer-grip { position:absolute; top:36%; left:5px; width:5px; height:38px; border-radius:4px; background:#3b79b5; opacity:.35; }
.portal .catalog-resizer-hint { position:absolute; top:calc(36% - 35px); right:14px; padding:7px 10px; border:1px solid var(--border); border-radius:4px; background:var(--panel); color:var(--text); font-size:.75rem; white-space:nowrap; pointer-events:none; opacity:0; z-index:3; }
.portal .catalog-resizer:hover::before,.portal .catalog-resizer:focus-visible::before,.catalog-is-resizing .catalog-resizer::before { background:var(--blue); width:2px; }
.portal .catalog-resizer:hover .catalog-resizer-grip,.portal .catalog-resizer:focus-visible .catalog-resizer-grip,.catalog-is-resizing .catalog-resizer-grip { opacity:1; background:var(--accent); }
.portal .catalog-resizer:hover .catalog-resizer-hint,.portal .catalog-resizer:focus-visible .catalog-resizer-hint,.catalog-is-resizing .catalog-resizer-hint { opacity:1; }
.catalog-is-resizing,.catalog-is-resizing * { cursor:col-resize!important; user-select:none!important; -webkit-user-select:none!important; }
.catalog-is-resizing iframe { pointer-events:none; }
.portal .site-footer { max-width:1760px; padding:14px 24px; font-size:.75rem; }
@container(min-width:380px) {
  .portal .directory-entry { grid-template-columns:86px minmax(0,1fr); }
  .portal .directory-entry .card-scene { height:50px; }
}
@media(max-width:1100px) {
  .portal .header-inner { gap:8px 15px; padding-inline:20px; }
  .portal .main-nav { gap:2px; }
  .portal .main-nav a { padding-inline:9px; font-size:.875rem; }
  .portal .brand strong { font-size:1.3rem; }
  .portal main { padding:20px 18px 16px; }
  .portal .catalog21-layout .preview-body { padding-right:15px; }
}
@media(max-width:959px) {
  .portal .header-inner { padding:12px 20px 0; gap:8px 18px; }
  .portal .header-tools { margin-left:auto; }
  .portal .main-nav { order:3; flex-basis:100%; width:100%; justify-content:space-between; margin:0; }
  .portal .main-nav a { min-height:44px; padding:8px 7px; }
  .portal main { padding:18px 20px; }
  .portal .catalog21-layout { display:flex; flex-direction:column; gap:20px; }
  .portal .catalog21-layout .preview-body { padding:10px 0 0; }
  .portal .catalog21-layout .preview-pane > summary { display:flex; align-items:center; gap:8px; list-style:none; min-height:44px; font-size:.875rem; color:var(--muted); padding:8px 0; cursor:pointer; user-select:none; -webkit-user-select:none; }
  .portal .catalog21-layout .preview-pane > summary::-webkit-details-marker { display:none; }
  .portal .catalog21-layout .preview-pane > summary strong { flex:1; min-width:0; color:var(--text); overflow-wrap:anywhere; font-weight:500; }
  .portal .catalog21-layout .preview-pane > summary::after { content:'展开'; color:var(--accent); margin-left:auto; flex:none; }
  .portal .catalog21-layout .preview-pane[open] > summary::after { content:'收起'; }
  .portal .catalog21-layout .preview-pane[open] > summary strong { display:none; }
  .portal .catalog21-layout .preview-label { display:flex; }
  .portal .catalog21-layout .preview-heading { font-size:1.55rem; }
  .portal .catalog21-layout .hero-scene { min-height:200px; }
  .portal .preview-commandbar { gap:10px; }
  .portal .preview-utilities { gap:4px 10px; }
  .portal .catalog-resizer { display:none; }
  .portal .catalog-directory { position:static; width:100%; padding:18px 0 0; min-height:0; max-height:none; border-top:1px solid var(--faint); }
  .portal .directory-list { overflow:visible; min-height:0; }
  .portal .directory-entry { grid-template-columns:90px minmax(0,1fr); min-height:84px; padding:10px 8px; }
  .portal .directory-entry .card-scene { height:54px; }
  .portal .directory-group > summary { min-height:44px; font-size:.875rem; }
  .portal .catalog-directory .filter-toolbar input,.portal .catalog-directory .filter-label select { min-height:44px; font-size:.875rem; }
  .portal .directory-refresh { min-width:44px; min-height:44px; }
  .portal .directory-pagination .button { min-width:44px; min-height:44px; }
  .portal .catalog-directory .filter-clear,.portal .catalog21-layout .button,.portal .catalog21-layout .preview-open { min-height:44px; }
}
@media(max-width:420px) {
  .portal .header-inner { padding-inline:14px; }
  .portal .brand strong { font-size:1.25rem; }
  .portal .header-tools { gap:5px; }
  .portal #reader-account { font-size:.8125rem; }
  .portal .main-nav a { font-size:.8125rem; padding-inline:4px; gap:4px; }
  .portal .nav-count { font-size:.6875rem; }
  .portal main { padding:16px 14px; }
  .portal .directory-entry { grid-template-columns:72px minmax(0,1fr); }
  .portal .directory-entry .card-scene { height:47px; }
  .portal .site-footer { padding-inline:14px; }
}
@media(pointer:coarse) {
  .portal .directory-refresh,.portal .directory-pagination .button { min-width:44px; min-height:44px; }
  .portal .directory-group > summary,.portal .catalog-directory .filter-clear { min-height:44px; }
  .portal .catalog-directory .filter-toolbar input,.portal .catalog-directory .filter-label select { min-height:44px; font-size:1rem; }
}
