/* Folder surfaces use the established apple / cheese palette, not a separate app skin. */
.material-study-entry { display:flex;align-items:center;gap:22px;width:100%;padding:24px 28px;text-align:left;background:var(--tint);border-radius:24px; }
.material-study-entry>span:nth-child(2) { display:grid;gap:4px;flex:1; }
.material-study-entry strong { font-size:24px;font-weight:600; }
.material-study-entry small { color:var(--muted); }
.material-study-entry>span:last-child { font-size:14px;font-weight:600; }
.study-entry-symbol { font:italic 44px Georgia,serif;color:var(--accent-ink); }
.materials-surface.chapter-open>:not(#material-knowledge):not(.material-drop-hint) { display:none!important; }
.derivatives-page { overflow-wrap:anywhere; }
.derivative-breadcrumb { display:flex;align-items:center;gap:18px;margin-bottom:14px; }
.derivative-back { min-height:44px;padding:8px 0;color:var(--accent-ink);font-size:14px; }
.derivative-back::before { content:'←';margin-right:10px; }
.derivative-hero { display:flex;align-items:center;justify-content:space-between;gap:24px;padding:8px 0 24px; }
.derivative-hero h1 { font-size:clamp(32px,4vw,46px);font-weight:600;letter-spacing:-1.5px;margin:10px 0 12px; }
.derivative-intro { color:var(--muted);font-size:16px;line-height:1.75; }
.derivative-meta { display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:14px;color:var(--muted);font-size:12px; }
.derivative-source-state { color:var(--accent-ink); }
.derivative-symbol { font:italic clamp(40px,5vw,68px) Georgia,serif;color:var(--accent-ink);padding:0 28px;opacity:.55; }
.derivative-tabs { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));position:sticky;top:94px;z-index:4;isolation:isolate;padding:5px;background:var(--bg);border-radius:16px;box-shadow:inset 0 0 0 1px var(--ring);margin:0 0 26px; }
.derivative-tabs [role=tab] { min-width:0;min-height:46px;position:relative;font-size:15px;font-weight:550;color:var(--muted);border-radius:12px; }
.derivative-tabs [aria-selected=true] { color:var(--fg); }
.derivative-tab-indicator { position:absolute;inset:5px auto 5px 5px;width:calc((100% - 10px)/4);border-radius:12px;z-index:-1;background:var(--surface);box-shadow:0 2px 5px var(--line);transition:transform .38s var(--ease);pointer-events:none; }
.derivatives-page>[role=tabpanel] { scroll-margin-top:170px; }
.derivative-learning { display:grid;grid-template-columns:248px minmax(0,1fr);gap:32px;align-items:start; }
.derivative-toc { position:sticky;top:176px; }
.derivative-toc h2 { font-size:15px;font-weight:600;margin:0 0 20px; }
.derivative-topic-group { margin:0 0 18px; }
.derivative-topic-group h3 { font-size:12px;letter-spacing:.04em;color:var(--muted);font-weight:500;margin:0 0 8px; }
.derivative-toc button { display:flex;align-items:baseline;gap:10px;width:100%;min-height:48px;padding:12px;text-align:left;border-radius:12px;font-size:14px;line-height:1.6; }
.derivative-toc button>span:first-child { color:var(--muted);font-variant-numeric:tabular-nums;font-size:12px; }
@media(hover:hover) { .derivative-toc button:hover { background:var(--surface); } }
.derivative-toc button[aria-current] { background:var(--apple);font-weight:600; }
.derivative-content { min-width:0; }
.derivative-topic-picker { display:none; }
.derivative-point { padding:32px;border-radius:26px;background:var(--surface);scroll-margin-top:174px; }
.derivative-point>h2 { font-size:clamp(23px,2.5vw,30px);font-weight:600;line-height:1.5;margin:12px 0 24px;max-width:25em; }
.derivative-question-prompt { border-left:3px solid var(--apple);padding-left:18px;margin:0 0 22px; }
.derivative-question-prompt p { font-size:18px;line-height:1.8;margin-top:8px;max-width:38em; }
.derivative-actions { display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;margin:16px 0 24px; }
.derivative-actions .btn { white-space:normal; }
.derivatives-page summary { cursor:pointer;min-height:44px;padding:10px 0;line-height:1.7;font-size:14px;color:var(--accent-ink); }
.derivative-boundary { padding-top:10px;border-top:1px solid var(--ring); }
.derivative-boundary p { padding:4px 0 12px;line-height:1.9; }
.derivative-study.module { padding:0;margin:0;background:transparent;border-radius:0; }
.derivative-study .module-heading { margin:0;font-size:14px;min-height:48px;gap:8px;color:var(--accent-ink); }
.derivative-study .ring-icon { display:none; }
.derivative-study .fold-mark { width:26px;height:26px; }
.derivative-study-fields { display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;padding:10px 0; }
.derivative-study .field { max-width:180px; }
.derivative-study p { width:100%; }
.derivative-step-nav { display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--ring);margin-top:18px;padding-top:10px; }
.derivative-step-nav .link { font-size:13px; }
.derivative-step-nav button:disabled { opacity:.35;cursor:default; }
#derivative-panel-practice,#derivative-panel-records,#derivative-panel-sources { max-width:900px;margin-inline:auto; }
.derivative-panel-heading { margin:8px 0 24px; }
.derivative-panel-heading h2,.derivatives-page section[aria-label] h2 { font-size:24px;font-weight:600;margin-bottom:12px; }
.derivative-panel-heading p { max-width:48em;line-height:1.85; }
.derivative-practice-nav { display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px;margin:22px 0; }
.derivative-practice-nav button { min-height:44px;border-radius:12px;box-shadow:inset 0 0 0 1px var(--ring-strong);font-variant-numeric:tabular-nums; }
.derivative-practice-nav [aria-pressed=true] { background:var(--primary);color:var(--on-primary);box-shadow:none; }
.derivative-practice { background:var(--surface);border-radius:26px;padding:22px 30px; }
.derivative-practice>summary { font-size:13px; }
.derivative-practice fieldset { border:0;margin:12px 0 22px;padding:0;min-width:0; }
.derivative-practice legend { font-size:21px;line-height:1.8;margin-bottom:20px;font-weight:550; }
.derivative-practice label { display:flex;gap:12px;align-items:baseline;padding:14px 16px;margin-bottom:10px;border-radius:14px;box-shadow:inset 0 0 0 1px var(--ring);cursor:pointer;transition:background .2s,box-shadow .2s; }
.derivative-practice label:has(input:checked) { background:var(--tint);box-shadow:inset 0 0 0 1.5px var(--accent); }
.derivative-practice input { accent-color:var(--accent);flex-shrink:0; }
.derivative-option-letter { color:var(--muted);font-size:13px; }
.derivative-practice .row { flex-wrap:wrap;gap:12px 24px; }
.derivative-practice-footer { display:flex;flex-wrap:wrap;gap:8px 24px;border-top:1px solid var(--ring);margin-top:18px;padding-top:10px; }
.derivative-practice .link { white-space:normal;text-align:left;min-height:44px; }
.derivative-practice p { line-height:1.85;margin:10px 0; }
.derivative-related { margin:24px 0; }
.derivative-question { border-top:1px solid var(--ring);padding:20px 0; }
.derivative-question h3 { font-size:18px;margin-bottom:12px; }
.derivative-question p { margin-bottom:8px; }
.derivative-links { display:flex;flex-wrap:wrap;gap:8px 16px;margin:12px 0; }
.derivative-links .link { min-height:44px;text-align:left;white-space:normal; }
.derivative-record-group { padding:24px 0;border-bottom:1px solid var(--ring); }
.derivative-record-group h3 { font-size:17px;font-weight:600;margin-bottom:14px; }
.derivative-record-group h3 span { margin-left:10px;font-weight:400; }
.derivative-record { display:flex;justify-content:space-between;gap:12px;padding:16px 0; }
.derivative-record>span:first-child { max-width:70%; }
.derivative-source { display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:20px 0 12px; }
.derivative-source label { flex:1 1 260px;min-width:0; }
.derivative-source label span { display:block;font-size:14px;margin-bottom:10px; }
.derivative-source select { width:100%; }
.derivative-local-note { padding:18px 0 26px; }
#derivative-panel-sources>p { line-height:1.9; }
.derivative-provenance { margin:16px 0; }
.derivative-provenance p { margin:8px 0; }
#derivative-panel-sources>details>.link { margin-right:18px; }
@media(max-width:900px) {
  .derivative-learning { display:block; }.derivative-toc { display:none; }.derivative-topic-picker { display:grid;gap:8px;margin-bottom:16px; }
  .derivative-topic-picker .field { width:100%; }.derivative-symbol { display:none; }
}
@media(max-width:760px) {
  .materials-surface.chapter-open { padding-top:8px; }.derivative-breadcrumb { margin-bottom:4px;gap:14px; }
  .derivative-hero { padding:8px 0 20px; }.derivative-hero h1 { font-size:32px;letter-spacing:-.8px;margin:8px 0 10px; }.derivative-intro { display:none; }
  .derivative-meta { margin-top:10px;gap:5px 14px; }.derivative-tabs { top:76px;margin-bottom:20px; }.derivative-tabs [role=tab] { font-size:13px;min-height:44px; }
  .derivative-point { padding:22px 20px;border-radius:22px;scroll-margin-top:156px; }.derivative-point>h2 { font-size:23px;margin:10px 0 18px; }
  .derivative-question-prompt { padding-left:12px;margin-bottom:16px; }.derivative-question-prompt p { font-size:16px;margin-top:6px; }
  .derivative-actions { gap:6px 14px;margin:0 0 16px; }.derivative-actions .link { font-size:13px; }
  .derivative-panel-heading h2,.derivatives-page section[aria-label] h2 { font-size:22px; }
  .derivative-practice-nav { grid-template-columns:repeat(4,minmax(0,1fr));gap:8px; }.derivative-practice { padding:18px 20px; }
  .derivative-practice legend { font-size:18px; }.derivative-practice label { padding:12px;gap:8px; }
  .derivative-record { display:block; }.derivative-record>span { display:block;max-width:none!important; }
  .material-study-entry { padding:20px;gap:14px;flex-wrap:wrap; }.material-study-entry strong { font-size:21px; }.material-study-entry>span:last-child { margin-left:auto; }
}
@media(prefers-reduced-motion:reduce) { .derivative-tab-indicator { transition:transform .38s cubic-bezier(.32,.72,0,1); } }
.materials-surface { display:block;padding:28px 0 40px;min-height:calc(100dvh - 210px); }
.materials-head { display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px; }
.materials-head h1 { font-size:clamp(40px,5vw,60px);line-height:1.2;letter-spacing:-1.8px;margin:12px 0; }
.materials-head .sub { font-size:16px;max-width:35em; }
.materials-hero-folder { padding:8px 28px;transform:rotate(-7deg); }
.materials-hero-folder .folder-symbol { width:112px;height:94px; }
.folder-symbol { width:60px;height:52px;overflow:visible;flex-shrink:0; }
.folder-symbol .folder-back { fill:var(--a3); }
.folder-symbol .folder-front { fill:var(--apple);transform-origin:50% 100%;transition:transform .35s var(--ease); }
.materials-toolbar,.material-finder,.material-section-title,.material-foot { display:flex;align-items:center;justify-content:space-between;gap:16px; }
.materials-toolbar .row { margin:0;gap:10px; }
.materials-surface .btn:not(.ghost),.material-dialog .btn:not(.ghost) { background:var(--btn) var(--button-shade);background-blend-mode:multiply;color:var(--on-accent); }
@media(hover:hover) { .materials-surface .btn:not(.ghost):hover,.material-dialog .btn:not(.ghost):hover { background:var(--btn) var(--button-shade); } }
.materials-surface .btn.ghost { background:var(--surface); }
.materials-surface button,.material-dialog button { transition:transform .2s var(--ease),background .2s var(--ease); }
.material-storage { max-width:65em;margin:18px 0 6px;line-height:1.8;color:var(--muted); }
.material-notice { min-height:24px;line-height:1.8;margin:0 0 20px;color:var(--accent-ink); }
.material-notice.is-error,.material-error { color:var(--danger-ink); }
.material-finder { gap:12px;margin-bottom:22px; }
.material-search { display:flex;align-items:center;gap:12px;flex:1;min-width:0;background:var(--surface);border-radius:18px;padding:0 16px; }
.material-search svg { width:20px;height:20px;color:var(--muted); }
.material-search .field { width:100%;background:transparent;min-height:52px;padding:10px 0; }
.material-finder>select { background:var(--surface);min-height:52px;width:140px;padding:10px 14px; }
.materials-path { display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:44px;scroll-margin-top:calc(110px + env(safe-area-inset-top, 0px));color:var(--muted);font-size:14px; }
.material-crumb { padding:8px 6px;min-height:44px;color:var(--fg);border-radius:10px;overflow-wrap:anywhere; }
@media(hover:hover) { .material-crumb:hover { background:var(--tint); } }
.material-section { margin-top:28px; }
.material-section h2 { font-size:19px;font-weight:550;letter-spacing:-.2px;margin:0 0 16px; }
.material-section .section-note { margin:-7px 0 18px; }
.material-folder-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px; }
.material-folder-grid.records-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.material-folder { position:relative;min-width:0;background:var(--surface);border-radius:24px; }
.folder-open { display:flex;flex-direction:column;align-items:flex-start;gap:9px;width:100%;min-height:166px;padding:22px;text-align:left;border-radius:24px; }
.folder-open .folder-symbol { margin-bottom:7px; }
.folder-open strong { font-size:16px;font-weight:550;overflow-wrap:anywhere; }
.folder-open .small { line-height:1.6;font-size:12px; }
@media(hover:hover) { .folder-open:hover { background:var(--tint); } }
@media(hover:hover) { .folder-open:hover .folder-front { transform:skewX(-5deg) scaleY(.92); } }
.record-folder { background:var(--tint); }
.record-folder .folder-symbol { width:48px;height:42px; }
.record-folder .folder-open { min-height:156px; }
@media(hover:hover) { .record-folder .folder-open:hover { background:var(--tint); } }
.record-folder .folder-back { fill:color-mix(in srgb,var(--a3) 65%,var(--card)); }
.record-folder .folder-front { fill:var(--a3); }
.folder-manage { position:absolute;top:6px;right:6px;width:44px;height:44px;border-radius:50%;font-size:20px;letter-spacing:1px; }
@media(hover:hover) { .folder-manage:hover { background:var(--tint); } }
.material-section-title h2 { margin-bottom:0; }
.material-section-title { margin-bottom:16px; }
.material-file-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.material-file-grid:focus { outline:none; }
.material-file { display:flex;align-items:center;gap:16px;min-width:0;padding:20px;text-align:left;background:var(--surface);border-radius:22px; }
@media(hover:hover) { .material-file:hover { background:var(--tint); } }
.file-symbol { display:grid;place-items:center;min-width:48px;height:60px;background:var(--tint);border-radius:9px 15px 9px 9px;font-family:Outfit,sans-serif;font-size:11px;letter-spacing:.5px;color:var(--accent-ink); }
.file-copy { display:flex;flex-direction:column;gap:6px;min-width:0;flex:1; }
.file-copy strong { font-size:15px;font-weight:500;overflow-wrap:anywhere;line-height:1.5; }
.file-copy .small { font-size:12px;line-height:1.6; }
.file-location { font-size:11px;color:var(--muted);overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.file-open-mark { align-self:flex-start;color:var(--muted);font-size:18px; }
.material-empty { display:flex;flex-direction:column;align-items:center;text-align:center;padding:44px 24px;border-radius:28px;background:var(--card2);gap:14px; }
.material-empty .folder-symbol { width:76px;height:66px;margin-bottom:6px; }
.material-empty h3 { font-size:20px;font-weight:500;line-height:1.6;margin:0; }
.material-empty p { max-width:33em;line-height:1.8;margin:0; }
/* 手机上还没有文件时，空的那块收小一点，别占半屏（整体布局和图表） */
@media(max-width:760px) { .materials-surface .material-empty { padding:24px 20px;gap:10px;border-radius:22px; }.materials-surface .material-empty .folder-symbol { width:52px;height:46px;margin-bottom:0; }.materials-surface .material-empty h3 { font-size:17px; }.materials-surface .material-empty p { line-height:1.65; } }
.material-empty .btn { align-self:center; }
#material-more,#material-filter-reset { margin-top:18px; }
.material-foot { align-items:flex-start;flex-wrap:wrap;margin-top:30px;padding-top:10px;line-height:1.8; }
.material-backup { position:relative; }
.material-backup summary { padding:12px;min-height:44px;cursor:pointer;font-size:13px;color:var(--fg); }
.material-backup>div { position:absolute;right:0;top:100%;width:280px;padding:18px 22px;background:var(--surface);border-radius:22px;box-shadow:0 10px 40px var(--gshadow);z-index:5;display:flex;flex-direction:column;align-items:flex-start;gap:10px; }
.material-backup p { line-height:1.8; }
.material-dialog { width:min(680px,calc(100% - 32px));transition:width .48s cubic-bezier(.32,.72,0,1); }
.material-dialog h2 { font-size:28px;margin:0 40px 24px 0;overflow-wrap:anywhere; }
.material-editor { display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px; }
.material-field { display:flex;flex-direction:column;gap:9px;min-width:0;font-size:13px; }
.material-field:first-child,.material-editor>.row,.material-editor>p { grid-column:1 / -1; }
.material-field .field { width:100%;background:var(--bg);min-height:48px;padding:12px; }
.material-preview { background:var(--bg);border-radius:18px;padding:16px; }
.material-preview-head { display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px; }
.material-preview>img { display:block;max-width:100%;max-height:340px;height:auto;object-fit:contain;border-radius:10px;margin:12px auto; }
.material-preview>pre { white-space:pre-wrap;overflow-wrap:anywhere;max-height:260px;overflow:auto;font-size:13px;line-height:1.8; }
.material-preview p { line-height:1.8; }
.material-danger { margin-top:22px; }
.material-error { line-height:1.8;margin:18px 0 0;font-size:13px; }
.material-drop-hint { display:none; }
.materials-surface.is-dragging>.material-drop-hint { display:flex;position:absolute;inset:0;z-index:6;background:var(--glass);border:2px dashed var(--a3);border-radius:30px;align-items:center;justify-content:center;flex-direction:column;gap:24px;pointer-events:none; }
.material-drop-hint .folder-symbol { width:100px;height:84px; }
.materials-surface :focus-visible,.material-dialog :focus-visible { outline:2px solid var(--a2);outline-offset:4px; }
@media(max-width:1050px) {
  .material-folder-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }.folder-open { padding:20px; }
}
@media(max-width:760px) {
  .materials-surface { padding:16px 0 28px; }.materials-head { gap:16px;margin-bottom:22px; }.materials-head h1 { margin:9px 0;font-size:42px; }.materials-head .sub { font-size:14px;line-height:1.8; }
  .materials-hero-folder { padding:0; }.materials-hero-folder .folder-symbol { width:72px;height:64px; }
  .materials-toolbar { align-items:flex-start;gap:5px; }.materials-toolbar .row { gap:8px; }.materials-toolbar .btn { padding:10px 15px;font-size:13px;min-height:46px; }.material-backup summary { padding:12px 2px;font-size:12px;white-space:nowrap; }
  .material-storage,.material-notice { font-size:12px;line-height:1.9; }.material-notice { margin-bottom:16px; }.material-finder { gap:8px;margin-bottom:10px; }.material-search { padding:0 12px;gap:8px; }.material-search .field { font-size:16px;min-height:48px; }.material-finder>select { width:105px;min-height:48px;padding:8px;font-size:14px; }
  .materials-path { scroll-margin-top:calc(85px + env(safe-area-inset-top, 0px)); }.material-section { margin-top:24px; }.material-section h2 { font-size:17px; }
  .material-folder-grid,.material-folder-grid.records-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }.folder-open { min-height:156px;padding:18px;gap:8px; }.folder-open strong { font-size:15px; }.folder-open .small { font-size:11px; }.folder-symbol { width:54px;height:46px; }
  .record-folder .folder-open { min-height:150px; }.material-folder { border-radius:22px; }.material-file-grid { grid-template-columns:1fr;gap:10px; }.material-file { padding:18px 16px;gap:14px; }.material-empty { padding:34px 18px; }.material-empty h3 { font-size:18px; }.material-empty .small { font-size:12px; }
  .material-foot { flex-direction:column;gap:8px; }.material-foot .small { font-size:11px; }.material-dialog { padding:32px 22px; }.material-dialog h2 { font-size:24px; }.material-editor { gap:14px; }.material-field { grid-column:1 / -1; }.material-field .field { font-size:16px; }.material-editor>.row { flex-wrap:wrap; }.material-backup>div { width:260px; }.material-preview-head { gap:8px; }.material-preview-head>.small { font-size:11px; }
}
@media(max-width:360px) { .materials-toolbar { flex-wrap:wrap; }.material-backup { margin-left:auto; }.materials-hero-folder { display:none; }.material-finder { flex-wrap:wrap; }.material-finder>select { width:100%; }.material-search { flex-basis:100%; } }
@media(prefers-reduced-motion:reduce) {
  .materials-hero-folder,.materials-surface button:active:not(:disabled),.material-dialog button:active:not(:disabled),.folder-open:hover .folder-front { transform:none; }
}

/* ===== 和第三轮界面统一（Claude 2026-10-15，合并 Codex 的资料文件夹之后）=====
   搜索框、下拉框、输入框、备份菜单、路径、卡片、弹层都换成和档案、复盘一样的做法；进出文件夹的动画在 materials.js 的 enter()。 */

/* 输入框聚焦：只留一圈细绿边，不再在外面再套一圈 */
.materials-surface .field:focus-visible,.material-dialog .field:focus-visible { outline:none; }
.materials-surface .field:focus,.material-dialog .field:focus { box-shadow:inset 0 0 0 1.5px var(--accent); }

/* 搜索：外面这一圈就是输入框，里面不再套一个框 */
.material-search { box-shadow:inset 0 0 0 1px var(--ring);transition:box-shadow .2s; }
.material-search:focus-within { box-shadow:inset 0 0 0 1.5px var(--accent),0 8px 20px var(--gshadow); }
.material-search .field,.material-search .field:focus { box-shadow:none;outline:none; }
.material-search .field::-webkit-search-cancel-button { -webkit-appearance:none;display:none; }
.material-search svg { transition:color .2s; }
.material-search:focus-within svg { color:var(--fg); }

/* 下拉框：去掉系统自带的箭头，换成细的向下箭头 */
select.field,.material-finder>select.field,.material-field select.field { -webkit-appearance:none;appearance:none;padding-right:38px;cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%232F4A24' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;background-size:12px 8px; }

/* 备份与恢复：不用系统的小三角，换成会转的箭头；弹出的小面板轻轻落下来 */
.material-backup summary { list-style:none;display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:999px;font-weight:600;transition:background .2s; }
.material-backup summary::-webkit-details-marker { display:none; }
.material-backup summary::after { content:"";width:6px;height:6px;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .3s var(--ease); }
.material-backup[open] summary::after { transform:translateY(1px) rotate(-135deg); }
.material-backup[open] summary { background:var(--tint); }@media(hover:hover) { .material-backup summary:hover { background:var(--tint); } }
.material-backup>div { box-shadow:0 0 0 1px var(--ring),0 14px 40px var(--gshadow);transform-origin:top right; }
.material-backup[open]>div { animation:materialPop .26s cubic-bezier(.22,1,.36,1); }
@keyframes materialPop { from { opacity:0;transform:translateY(-6px) scale(.97); } }

/* 路径：每一级是一个小胶囊，现在在哪一级就高亮哪一级 */
.materials-path { gap:4px;font-size:13px; }
.material-crumb { padding:6px 12px;min-height:36px;border-radius:999px;font-weight:600;color:var(--muted);transition:background .2s,color .2s; }
@media(hover:hover) { .material-crumb:hover { color:var(--fg); } }
.material-crumb:last-child,.materials-path>span[aria-current] { padding:6px 12px;border-radius:999px;background:var(--surface);box-shadow:inset 0 0 0 1px var(--ring);color:var(--fg);font-weight:600; }
.materials-path>span[aria-hidden] { color:var(--ring-strong); }

/* 卡片：一圈细边和底色分开；悬停只换底色；箭头轻轻挪一下 */
.material-folder:not(.record-folder),.material-file { box-shadow:0 0 0 1px var(--ring); }
.file-open-mark { transition:transform .25s var(--ease),color .2s; }
@media(hover:hover) { .material-file:hover .file-open-mark { transform:translate(2px,-2px);color:var(--fg); } }

@media(max-width:760px) {
  /* 手机上文件夹卡片矮一点，一屏能看到更多 */
  .folder-open,.record-folder .folder-open { min-height:118px;padding:16px;gap:6px; }
  .folder-symbol { width:44px;height:38px; }.record-folder .folder-symbol { width:40px;height:35px; }
  .material-backup summary { padding:10px;font-size:12px; }
  /* 弹层和档案一样从底部滑上来，占满宽度，顶上留出把手的位置 */
  .material-dialog.workspace-dialog { width:100%;padding:36px 22px calc(28px + env(safe-area-inset-bottom)); }
}
@media(prefers-reduced-motion:reduce) {
  .material-backup[open]>div { animation:materialPop .3s cubic-bezier(.32,.72,0,1); }
  .material-file:hover .file-open-mark { transform:none; }
}

.materials-surface button,.material-dialog button,.material-search,.file-open-mark,.material-backup summary { transition-timing-function:cubic-bezier(.32,.72,0,1);transition-duration:.28s; }
.derivative-tab-indicator { transition:none; }

/* Keep the drop layer mounted so both entry and exit can interpolate. */
.material-drop-hint { display:flex;position:absolute;inset:0;z-index:6;background:var(--glass);border:2px dashed var(--a3);border-radius:30px;align-items:center;justify-content:center;flex-direction:column;gap:24px;opacity:0;visibility:hidden;transform:scale(.92);pointer-events:none;transition:opacity .32s cubic-bezier(.32,.72,0,1),transform .32s cubic-bezier(.32,.72,0,1),visibility .32s cubic-bezier(.32,.72,0,1); }
.materials-surface.is-dragging>.material-drop-hint { opacity:1;visibility:visible;transform:none; }
#material-folders + .materials-toolbar { margin-top:28px; }
@media(max-width:760px) { #material-chapter-open { padding:16px 18px;gap:12px;border-radius:20px; }#material-chapter-open strong { font-size:17px; }#material-chapter-open .study-entry-symbol { font-size:24px; } }
