/* Digitalibrary Operate skin. Reader pages retain their own typography and controls. */
:root { --dl-ink:#171714; --dl-yellow:#f5d723; --dl-paper:#f6f5ef; --dl-line:#d9d8cf; --sf-accent:#171714; --sf-primary:#171714; }
body { background:var(--dl-paper); color:var(--dl-ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
::selection { background:var(--dl-yellow); color:var(--dl-ink); }
:where(button,input,select,textarea,a,summary):focus-visible { outline:3px solid #8a6500; outline-offset:3px; }
:where(input,textarea) { caret-color:var(--dl-ink); }
html { scrollbar-color:#77766c var(--dl-paper); }
.sf-top { background:var(--dl-ink); border:0; color:#fff; box-shadow:0 3px 18px #17171418; }
.sf-brand { color:#fff; min-height:48px; gap:12px; }
.sf-brand h1 { font-family:inherit; font-size:clamp(20px,2vw,27px); font-weight:750; letter-spacing:-.035em; }
.sf-brand small { color:#e4e2d8; font-size:12px; }
.sf-brand-mark { background:var(--dl-yellow); color:var(--dl-ink); border:0; border-radius:7px; font-size:16px; font-weight:850; width:44px; height:44px; }
.sf-top .sf-btn,.sf-top .sf-file-menu>summary { border-color:#6e6d62; background:transparent; color:#fff; }
.sf-top .sf-btn:hover,.sf-top .sf-file-menu>summary:hover { background:#393930; }
.sf-btn,.sf-tool,.sf-tabs button,.sf-file-menu>summary,.sf-page-navigation button { min-height:48px; border-radius:7px; font-family:inherit; font-weight:650; }
.sf-btn-primary,.sf-btn-library-primary,.sf-top .sf-btn-primary { background:var(--dl-yellow); color:var(--dl-ink); border-color:var(--dl-yellow); }
.sf-btn-primary:hover,.sf-btn-library-primary:hover,.sf-top .sf-btn-primary:hover { background:#e8c90c; color:#171714; border-color:#e8c90c; }
.sf-top .sf-btn:disabled { color:#c1c0b6; border-color:#55554b; opacity:.72; }
.sf-top .sf-status { color:#e4e2d8; font-size:13px; }
.sf-top .sf-file-panel { background:#fff; color:var(--dl-ink); border:1px solid var(--dl-line); box-shadow:0 12px 32px #17171430; }
.sf-top .sf-file-panel .sf-btn { color:var(--dl-ink); background:#fff; border-color:#d0cfc5; }
.sf-top .sf-file-panel .sf-btn:hover { background:var(--dl-paper); }
.sf-top .sf-file-panel .sf-file-hint { color:#53534a; }
.sf-work,.sf-welcome { max-width:none; }
.sf-pages,.sf-panel,.sf-stage-head,.sf-admin-bar,.sf-current-draft { border-color:var(--dl-line); }
.sf-stage { background:#e9e8e1; }
.sf-pages,.sf-panel,.sf-stage-head { background:#fff; }
.sf-pages h2,.sf-stage-head h2 { font-family:inherit; letter-spacing:-.02em; color:var(--dl-ink); }
.sf-pages-list button[aria-current=true] { border-color:#171714; background:#f8efb6; box-shadow:0 2px 8px #17171412; }
.sf-tabs button[aria-selected=true] { background:#171714; color:#fff; border-color:#171714; }
.sf-tool:hover,.sf-btn:hover { border-color:#77766c; }
.sf-tool-group-label,.sf-canvas-help,.sf-small { color:#53534a; }
.sf-pane :where(input,select,textarea) { min-height:48px; border-color:#bbbbae; border-radius:6px; font-family:inherit; }
.sf-dialog { border:1px solid var(--dl-line); border-radius:12px; box-shadow:0 18px 60px #17171440; }
.sf-dialog h2,.sf-library-heading h2 { font-family:inherit; letter-spacing:-.03em; }
.sf-library-publication-note { max-width:72ch; }
.sf-dl-link { color:#e7e4d8; min-height:48px; display:inline-flex; align-items:center; text-decoration:underline; text-underline-offset:4px; font-size:13px; }
.dl-app-notices { position:fixed; bottom:12px; left:12px; right:12px; z-index:10020; margin:auto; max-width:850px; color:#171714; background:#fff7cf; border:1px solid #9a8418; border-radius:10px; padding:12px 16px; box-shadow:0 8px 24px #17171428; font:14px/1.5 ui-sans-serif,system-ui,sans-serif; }
.dl-app-notices[hidden] { display:none; }.dl-app-notices p { margin:0; max-width:72ch; }.dl-app-notices>div { display:flex; align-items:center; gap:16px; justify-content:space-between; }.dl-app-notices button,.dl-install-help button { min-height:48px; padding:10px 18px; border:1px solid #171714; border-radius:6px; color:#fff; background:#171714; font:650 14px ui-sans-serif,system-ui,sans-serif; cursor:pointer; }
.dl-install-help { max-width:540px; width:calc(100% - 36px); padding:28px; background:#fff; color:#171714; border:1px solid #d9d8cf; border-radius:12px; box-shadow:0 18px 60px #17171440; font:16px/1.6 ui-sans-serif,system-ui,sans-serif; }.dl-install-help::backdrop { background:#17171488; }.dl-install-help h2 { margin:0 0 20px; font-size:26px; line-height:1.15; letter-spacing:-.03em; }
@media (max-width:860px) { .sf-top { padding:12px; }.sf-brand h1 { font-size:20px; }.sf-top-actions { min-width:0; }.sf-header-navigation { flex-wrap:wrap; }.sf-dl-link { display:none; }.dl-app-notices { bottom:8px; left:8px; right:8px; font-size:13px; }.dl-app-notices>div { flex-wrap:wrap; }.sf-work { padding:0; } }
@media (prefers-reduced-motion:reduce) { .sf-top,.sf-btn,.sf-tool { transition:none!important; } }

.dl-transfer-dialog{max-width:600px;padding:28px;color:#292720;background:#fff}.dl-transfer-dialog h2{font-size:1.5rem;line-height:1.2;margin:0 0 16px}.dl-transfer-dialog p{line-height:1.5}.dl-transfer-dialog progress{display:block;width:100%;height:14px;accent-color:var(--dl-ink);margin:20px 0}.dl-transfer-dialog button{min-height:48px}

.sf-top .sf-btn-primary:hover:not(:disabled),.sf-top .sf-btn-primary:active:not(:disabled){background:#e9cf00;border-color:#e9cf00;color:#171714}.sf-top .sf-btn-primary:focus-visible{outline-color:#8db5ff}

/* Parità Studio 2026-10-27: etichette leggibili e geometria touch coerente. */
.sf-top,.sf-top-actions,.sf-header-navigation,.sf-header-publish,.sf-utility-strip,.sf-welcome,.sf-library-heading,.sf-admin-bar,.sf-draft-actions { min-width:0; }
.sf-header-navigation .sf-btn,.sf-header-navigation .sf-file-menu > summary,
.sf-header-publish .sf-btn,.sf-utility-strip .sf-btn,
body[data-editor-view="editor"] :is(.sf-tool,.sf-btn,.sf-tabs [role="tab"],.sf-mode-label select,.sf-zoom-label select,.sf-more-tools > summary,.sf-advanced > summary,.sf-obj-list button),
body[data-editor-view="editor"] #sf-toggle-pages { min-height:48px; }
.sf-header-navigation .sf-file-menu > summary,
body[data-editor-view="library"] .sf-file-menu > summary { white-space:nowrap; overflow-wrap:normal; word-break:normal; }
.sf-header-navigation .sf-file-menu > summary::after { flex:none; }
.sf-top .sf-file-panel { overscroll-behavior:contain; scrollbar-gutter:stable; max-width:calc(100vw - 24px); }
.sf-top .sf-file-panel .sf-btn { min-height:48px; }
.sf-top .sf-file-panel .sf-dl-link { color:var(--dl-ink); padding:10px 8px; }
.sf-file-panel :is(button,a):focus-visible { outline-offset:-3px; }
.sf-top :is(button,a,summary):focus-visible { outline:3px solid #f5d723; outline-offset:3px; }
.sf-top .sf-file-panel :is(button,a):focus-visible { outline-color:#715600; }
.sf-btn:active:not(:disabled),.sf-tool:active:not(:disabled) { filter:brightness(.94); }
body[data-editor-view="editor"] .sf-page-position input { min-height:48px; }
body[data-editor-view="editor"] .sf-pane :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select) { min-height:48px; }
body[data-editor-view="editor"] .sf-check { min-height:48px; }
@media (max-width:860px) {
  body[data-editor-view="editor"] .sf-utility-strip .sf-help-menu > summary { min-height:48px; }
  body[data-editor-view="editor"] .sf-help-menu #sf-school-tools { max-height:calc(100dvh - 210px); overflow-y:auto; overscroll-behavior:contain; }
  body[data-editor-view="editor"] .sf-pages-list { max-width:100%; overflow-x:auto; }
  body[data-editor-view="editor"] .sf-pages-list > li { min-width:78px; }
  body[data-editor-view="editor"] .sf-canvas-wrap { min-height:260px; }
}
@media (max-width:600px) {
  .sf-top,body[data-editor-view="library"] .sf-top { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; padding:12px 16px; }
  .sf-brand { grid-column:1; grid-row:1; max-width:100%; min-height:44px; }
  .sf-brand h1 { font-size:19px; }
  .sf-brand small { display:block; font-size:10px; }
  .sf-brand-mark { width:38px; height:38px; }
  .sf-top #sf-top-actions,body[data-editor-view="library"] .sf-top #sf-top-actions { display:contents; }
  .sf-header-navigation { grid-column:1; grid-row:2; display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(72px,.8fr); width:100%; gap:8px; }
  .sf-header-navigation > .sf-btn,.sf-header-navigation .sf-file-menu > summary { min-width:0; width:100%; min-height:48px; padding:8px 9px; gap:6px; font-size:13px; white-space:nowrap; }
  .sf-header-navigation #btn-biblioteca,.sf-header-navigation #btn-admin { width:100%; height:48px; padding:8px 7px; font-size:13px; gap:6px; }
  .sf-header-navigation #sf-admin-label { display:inline; }
  .sf-header-navigation #btn-biblioteca svg,.sf-header-navigation #btn-admin svg { width:18px; height:18px; }
  .sf-header-navigation .sf-file-menu,body[data-editor-view="library"] .sf-header-navigation .sf-file-menu { grid-column:auto!important; min-width:0; }
  .sf-header-publish { grid-column:1; grid-row:3; }
  .sf-header-publish .sf-btn { min-height:48px; font-size:13px; }
  .sf-utility-strip { grid-column:1; grid-row:4; grid-template-columns:96px minmax(0,1fr) 56px; gap:4px; padding:0; }
  body[data-editor-view="library"] .sf-utility-strip { grid-row:3; padding:0; }
  .sf-utility-strip .sf-history-actions .sf-btn { width:48px; height:48px; }
  .sf-utility-strip .sf-help-menu > summary { min-height:48px; }
  body[data-editor-view="editor"] .sf-stage { padding:12px; }
  body[data-editor-view="editor"] .sf-tool { min-height:48px; font-size:13px; }
  body[data-editor-view="editor"] .sf-mode-label select,
  body[data-editor-view="editor"] .sf-zoom-label select { min-height:48px; font-size:16px; }
  body[data-editor-view="editor"] .sf-canvas-wrap { padding:10px; }
  .sf-admin-bar > div { width:100%; }
  .sf-admin-bar > div > .sf-btn { flex:1 1 130px; }
}
@media (max-width:379px) {
  .sf-top,body[data-editor-view="library"] .sf-top { padding-inline:12px; }
  .sf-header-navigation { gap:6px; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr) 72px; }
  .sf-header-navigation #btn-biblioteca,.sf-header-navigation #btn-admin { font-size:12px; padding-inline:5px; }
}

/* I dialoghi di creazione seguono lo stesso accento dello Studio. */
body .sf-create-dialog { color:var(--dl-ink); border-color:var(--dl-line); }
body .sf-create-dialog::backdrop { background:#171714b3; }
body .sf-create-eyebrow,body .sf-create-help,body .sf-create-choice small,body .sf-create-choice em,
body .sf-create-pdf span:first-of-type { color:#53534a; }
body .sf-create-label input { color:var(--dl-ink); border-color:#aaa99e; }
body .sf-create-choice,body .sf-create-pdf { color:var(--dl-ink); background:#f8f7f2; border-color:#c5c3b8; }
body .sf-create-choice:has(input:checked) { color:var(--dl-ink); background:#fff9d5; border-color:#38382d; box-shadow:inset 0 0 0 1px #38382d; }
body .sf-create-choice input { accent-color:#39392f; }
body .sf-create-choice:hover,body .sf-create-pdf:hover { background:#f2efe0; border-color:#7d7b6e; }
body .sf-create-choice:active { background:#eae5cf; }
body .sf-create-choice:focus-within,body .sf-create-pdf:focus-visible,body .sf-create-dialog button:focus-visible,body .sf-create-label input:focus-visible { outline-color:#715600; }
body .sf-create-footer { border-color:var(--dl-line); }
body .sf-created-text-note { color:#414137; border-color:#6c6751; background:#f6f2df; }
.sf-top .sf-utility-strip .sf-help-menu > summary { color:#fff; background:transparent; border-color:#6e6d62; }
.sf-top .sf-help-menu #sf-school-tools { background:#fff; border-color:var(--dl-line); }
.sf-top .sf-help-menu #sf-school-tools .sf-btn { color:var(--dl-ink); background:#fff; border-color:var(--dl-line); }
.sf-top .sf-help-menu #sf-school-tools .sf-btn:focus-visible { outline-color:#715600; }
.sf-top #sf-mobile-navigation .sf-btn[aria-pressed="true"] { color:var(--dl-ink); background:var(--dl-yellow); border-color:var(--dl-yellow); }
body[data-editor-view="editor"] .sf-pages-list button[aria-current="true"],
body[data-editor-view="editor"] .sf-obj-list button[aria-current="true"] { color:var(--dl-ink); background:#fff9d5; border-color:#38382d; box-shadow:inset 0 0 0 1px #38382d; }
body[data-editor-view="editor"] .sf-pages-list button[aria-current="true"] span { color:#414137; }
body[data-editor-view="editor"] .sf-tabs [role="tab"][aria-selected="true"] { color:var(--dl-ink); background:#fff9d5; border-color:#6c6751; }
body[data-editor-view="editor"] .sf-tool[aria-pressed="true"] { color:var(--dl-ink); background:var(--dl-yellow); border-color:#716418; }
body[data-editor-view="editor"] .sf-check input { accent-color:#39392f; }
body[data-editor-view="editor"] :is(input,textarea) { caret-color:var(--dl-ink); }
body[data-editor-view="editor"] .sf-btn-primary { color:var(--dl-ink); background:var(--dl-yellow); border-color:var(--dl-yellow); }
body[data-editor-view="editor"] .sf-btn-primary:hover:not(:disabled) { color:var(--dl-ink); background:#e8c90c; border-color:#e8c90c; }
body[data-editor-view="editor"] .sf-btn-primary:disabled { color:#777569; background:#e9e5cd; border-color:#d7d1b3; }

@media (max-width:600px) { body[data-editor-view="editor"] .sf-stage-context .sf-zoom-label select { width:104px; padding-left:8px; padding-right:22px; } }

.sf-configure-content{width:100%;min-height:48px;margin:0 0 12px;font-weight:700}.sf-video-poster-summary{display:block;width:100%;max-height:180px;object-fit:contain;margin:0 0 16px;border:1px solid #d6d2ca;border-radius:8px}.sf-media-source{overflow-wrap:anywhere}
