:root {
  --mf-ink: #101114;
  --mf-muted: #45474d;
  --mf-line: #d5d6dc;
  --mf-bg: #fafafb;
  --mf-side: #eff0f3;
  --mf-control: #f2f3f6;
  --mf-card: #f8f8fa;
  --mf-selected: #dedfe4;
  --mf-sidebar: clamp(172px, 18.85vw, 273px);
  --mf-accent: #378ce4;
  --mf-page-x: clamp(16px, 2.13vw, 31px);
  --mf-page-r: clamp(14px, 1.52vw, 22px);
  --mf-page-top: clamp(28px, 4.25vw, 62px);
}
:root[data-theme=dark] {
  --mf-ink: #f3f3f5;
  --mf-muted: #bfc0ca;
  --mf-line: #454650;
  --mf-bg: #1e1f25;
  --mf-side: #26272d;
  --mf-control: #2d2e36;
  --mf-card: #25262d;
  --mf-selected: #373a44;
}
[hidden] { display: none !important; }
body { margin: 0; }
.mf-shell { display: flex; height: 100dvh; background: var(--mf-bg); color: var(--mf-ink); font: 18px/1.27 Arial, Helvetica, sans-serif; }
.mf-shell #app { min-width: 0; flex: 1; height: 100%; }
.mf-shell svg, .mf-dialog svg, .mf-menu svg { display: block; width: 25px; height: 25px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.mf-shell .folder-art { stroke-width: 1; }
.mf-shell button:focus-visible, .mf-menu button:focus-visible, .mf-dialog button:focus-visible { outline-color: currentColor; outline-offset: 1px; }
.mf-sidebar {
  width: var(--mf-sidebar); flex: none; padding: calc(var(--mf-page-top) + 6px) clamp(9px, 1vw, 15px) 15px;
  background: linear-gradient(115deg, var(--mf-side), var(--mf-control)); border-right: 1px solid var(--mf-line); overflow-y: auto;
}
.mf-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 50px clamp(2px, .9vw, 13px); white-space: nowrap; }
.mf-brand > span { width: clamp(40px, 4.1vw, 59px); aspect-ratio: 1; display: grid; place-items: center; color: white; border-radius: 14px; background: linear-gradient(135deg,#777b82,#95989e 60%,#777b82); }
.mf-brand svg { width: 61%; height: 61%; }
.mf-brand strong { font-size: clamp(21px, 2.15vw, 31px); letter-spacing: -.034em; }
.mf-sidebar nav { display: flex; flex-direction: column; gap: 11px; }
.mf-sidebar nav button { display: flex; align-items: center; gap: clamp(8px, 1.45vw, 21px); width: 100%; min-height: 55px; padding: 8px clamp(10px, 1.7vw, 25px); text-align: left; border-radius: 15px; font-size: clamp(17px, 1.54vw, 22px); }
.mf-sidebar nav svg { width: clamp(23px, 2.18vw, 32px); height: clamp(23px, 2.18vw, 32px); }
.mf-sidebar nav button[aria-current], .mf-sidebar nav button:hover { background: var(--mf-selected); }
.mf-sidebar nav button:last-child { margin-top: 34px; position: relative; }
.mf-sidebar nav button:last-child::before { content: ''; position: absolute; inset: -21px 9px auto; border-top: 1px solid var(--mf-line); }
.mf-nav-close, .mf-hamburger { display: none; }
.mf-main { height: 100%; overflow: auto; overscroll-behavior: contain; padding: var(--mf-page-top) var(--mf-page-r) 25px var(--mf-page-x); background: linear-gradient(151deg, var(--mf-control), var(--mf-bg) 22%, var(--mf-bg) 90%, var(--mf-card)); }
.mf-main :is(header,h1,h2,h3,p) { margin: 0; }
.mf-main header { border: 0; min-height: 0; }
.mf-main h1 { color: var(--mf-ink); font-size: clamp(30px, 2.76vw, 40px); font-weight: 750; letter-spacing: -.045em; }
.mf-title { display: flex; align-items: center; padding-inline-start: 10px; }
.mf-main .mf-header { display: grid; gap: 18px; margin-bottom: 31px; }
.mf-actions { display: flex; min-width: 0; gap: 15px; align-items: center; }
.mf-actions > button, .mf-categories button, .mf-trash-tools button, .mf-backup-actions button {
  display: flex; gap: 12px; align-items: center; justify-content: center; border: 1.5px solid var(--mf-line);
  background: linear-gradient(var(--mf-bg), var(--mf-control)); padding: 8px clamp(11px, 1.58vw, 23px); min-height: 54px;
  white-space: nowrap; border-radius: 15px; font-size: clamp(16px, 1.38vw, 20px);
}
.mf-actions > button:hover, .mf-categories button:hover, .mf-trash-tools button:hover, .mf-backup-actions button:hover { background: var(--mf-selected); }
.mf-actions > button svg { width: 29px; height: 29px; }
.mf-search {
  display: flex; align-items: center; flex: 1; min-width: 0; gap: 15px; min-height: 59px; padding: 0 20px;
  border: 1.5px solid var(--mf-line); border-radius: 19px; background: var(--mf-control); margin-right: 7px;
}
.mf-search svg { width: 27px; height: 27px; }
.mf-search input { width: 100%; min-width: 0; border: 0; padding: 8px 0; background: transparent; color: var(--mf-ink); font-size: clamp(18px, 1.6vw, 23px); outline: none; }
.mf-search input::placeholder { color: var(--mf-muted); opacity: 1; }
.mf-search:focus-within { border-color: var(--mf-muted); }
.mf-content { display: grid; gap: 22px; min-width: 0; }
.mf-panel { min-width: 0; padding: 16px 17px 21px; border: 1.5px solid var(--mf-line); border-radius: 21px; }
.mf-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 1px 10px 20px; }
.mf-panel h2, .mf-settings h2, .mf-view-tools h2 { min-width: 0; display: flex; align-items: center; gap: 18px; font-size: clamp(23px, 2.08vw, 30px); letter-spacing: -.037em; overflow-wrap: anywhere; }
.mf-panel h2 > svg, .mf-settings h2 > svg { width: 35px; height: 35px; }
.mf-see { display: inline-flex; flex-direction: row-reverse; align-items: center; padding: 6px 0 6px 5px; gap: 3px; color: var(--mf-muted); white-space: nowrap; font-size: 20px; }
.mf-see svg { width: 19px; height: 19px; }
.mf-panel-empty.continue { min-height: 270px; }
.mf-panel-empty:is(.folders,.all) { min-height: 235px; }
.mf-panel-empty .mf-empty { min-height: 150px; }
.mf-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--mf-muted); }
.mf-empty p { font-size: clamp(18px, 1.6vw, 23px); }
.mf-shell .empty-paper { width: min(100%, 303px); height: 121px; }
.mf-shell .empty-paper.all { height: 112px; }
.mf-empty .empty-folders { display: flex; align-items: center; justify-content: center; gap: 21px; height: 82px; }
.mf-empty .empty-folders .folder-art { width: min(22vw, 92px); height: 75px; }
.mf-cards { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 202px), 1fr)); }
.mf-cards.continue-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 252px), 1fr)); }
.mf-cards.rail { display: flex; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; padding: 1px; }
.mf-cards.rail > * { flex: 0 0 max(194px, calc((100% - 52px) / 5)); }
.mf-cards.continue-cards.rail > * { flex-basis: max(231px, calc((100% - 39px) / 4)); }
.mf-card { position: relative; min-width: 0; background: var(--mf-card); border: 1px solid var(--mf-line); border-radius: 14px; }
.mf-card > [data-command=open] { width: 100%; height: 100%; min-width: 0; display: flex; align-items: center; text-align: start; padding: 9px 27px 9px 13px; gap: 12px; border-radius: inherit; }
.mf-card > [data-command=open]:hover { background: var(--mf-control); }
.mf-card button > span { min-width: 0; }
.mf-card strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; font-size: 18px; letter-spacing: -.025em; }
.mf-card small { display: block; margin-top: 3px; font-size: 16px; color: var(--mf-muted); overflow-wrap: anywhere; }
.mf-card .mf-options { position: absolute; bottom: 3px; right: 2px; }
.mf-card .mf-favorite { position: absolute; top: 6px; right: 7px; pointer-events: none; }
.mf-shell .folder-art { width: 52px; height: 43px; }
.mf-shell .mf-favorite { width: 19px; height: 19px; fill: #ffd43e; stroke: #f5c926; }
.mf-card [data-command=open] > .mf-preview { flex: none; }
.folder-cards .mf-card { min-height: 73px; }
.folder-cards .mf-card > [data-command=open] { gap: 10px; }
.folder-cards .mf-card strong { letter-spacing: -.02em; }
.mf-home-continue:not(.mf-panel-empty) { padding-bottom: 25px; }
.continue-cards .mf-card > button:first-child { align-items: flex-start; min-height: 155px; padding-block: 12px; }
.continue-cards .mf-card > button:first-child > span:not(.mf-preview) { padding-top: 8px; }
.mf-preview { display: grid; place-items: center; width: 102px; height: 128px; overflow: hidden; background: #f7f7f8; border: 1px solid var(--mf-line); border-radius: 8px; box-shadow: 0 2px 4px #0001; }
.mf-preview img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mf-card progress { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 7px; color: var(--mf-accent); background: #e2e4eb; }
.mf-card progress::-webkit-progress-bar { background: #e2e4eb; border-radius: 7px; }
.mf-card progress::-webkit-progress-value { background: var(--mf-accent); border-radius: 7px; }
.mf-card progress::-moz-progress-bar { background: var(--mf-accent); border-radius: 7px; }
.file-cards .mf-card > button:first-child { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px 8px 34px; }
.file-cards .mf-preview { width: min(125px, 87%); height: 124px; }
.file-cards .mf-card .folder-art { width: 85px; height: 75px; }
.mf-rows { padding: 0 9px 0 12px; }
.mf-rows.is-scrollable { max-height: 234px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.mf-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(82px, 1fr) minmax(85px, .95fr) 37px; gap: 12px; min-height: 46px; align-items: center; border-bottom: 1px solid var(--mf-line); }
.mf-row:last-child { border-bottom: 0; }
.mf-main[data-density=compact] .mf-row { min-height: 39px; }
.mf-main[data-density=wide] .mf-row { min-height: 58px; }
.mf-row-open { display: flex; align-items: center; gap: 21px; text-align: start; padding: 5px 9px; min-width: 0; min-height: 44px; }
.mf-row-open:hover { background: var(--mf-control); }
.mf-row-name { min-width: 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.02em; }
.mf-row-name small { display: block; color: var(--mf-muted); font-weight: 400; }
.mf-row time, .mf-row-meta { min-width: 0; color: var(--mf-muted); font-size: 17px; overflow-wrap: anywhere; }
.mf-row-meta { display: flex; align-items: center; gap: 8px; }
.mf-row-meta svg { width: 20px; height: 20px; }
.mf-options { display: grid; place-items: center; min-width: 32px; min-height: 32px; padding: 4px; }
.mf-options:hover { background: var(--mf-selected); }
.mf-options svg { width: 24px; height: 24px; }
.mf-row .folder-art { width: 32px; height: 32px; }
.format-icon { width: 30px; height: 31px; display: grid; place-content: center; border-radius: 6px; color: white; flex: none; font-size: 20px; font-weight: 700; background: #777c8a; }
.format-icon svg { width: 21px; height: 21px; }
.format-pdf { background: linear-gradient(120deg,#e53d2b,#f75449); }.format-word { background: #337bf0; }.format-slides { background: #d46343; }.format-sheet { background: #14844a; }.format-photo { background: #a581ff; }.format-zip { background: #f5c43c; color: #795200; }
.mf-autosave { display: flex; align-items: center; gap: 13px; padding-top: 23px; color: var(--mf-muted); font-size: 19px; }
.mf-autosave svg { width: 34px; height: 34px; }
.mf-no-results { color: var(--mf-muted); padding: 18px 12px; }
.mf-categories { display: flex; flex-wrap: wrap; gap: 12px; }
.mf-categories button { min-height: 50px; flex: 1 0 auto; padding-inline: 15px; }
.mf-categories [aria-pressed=true] { background: var(--mf-selected); border-color: var(--mf-muted); }
.mf-categories [data-format=pdf] svg { background: #e9483c; border-radius: 5px; color: white; padding: 3px; }
.mf-categories [data-format=images] svg { background: #ad8cf6; border-radius: 5px; color: white; padding: 2px; }
.mf-categories [data-format=archives] svg { background: #ffe18a; border-radius: 5px; color: #8b6300; padding: 2px; }
.mf-categories [data-format=signed] svg { color: #2558b8; }
.mf-view-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mf-view-tools > h2 { flex: 1; }
.mf-view-tools > button { min-height: 42px; padding: 6px; }
.mf-sort { display: flex; align-items: center; gap: 5px; padding: 5px; border: 1px solid var(--mf-line); border-radius: 10px; background: var(--mf-control); color: inherit; }
.mf-sort select { min-height: 30px; border: 0; background: transparent; color: inherit; }
.mf-saved { padding-inline: 13px; }
.mf-saved > .mf-panel { margin-top: 14px; padding: 12px 10px 16px; }
.mf-saved > .mf-panel header { margin-bottom: 12px; }
.mf-saved > .mf-panel h2 { font-size: clamp(20px,1.76vw,26px); }
.mf-main .mf-panel-description { color: var(--mf-muted); margin: -13px 0 22px 61px; }
.mf-recent-group { margin: 12px 0 0; border: 1px solid var(--mf-line); border-radius: 17px; overflow: hidden; }
.mf-recent-group h3 { padding: 7px 20px; background: var(--mf-control); }
.mf-rows.recent .mf-row { grid-template-columns: minmax(0, 2.2fr) minmax(70px,.95fr) 37px; }
.mf-rows.recent .mf-row-name { font-weight: 700; }
.mf-rows.recent .mf-preview { width: 77px; height: 49px; }
.mf-trash-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; padding: 10px; background: var(--mf-control); border-radius: 16px; }
.mf-trash-tools > span { flex: 1; display: flex; align-items: center; gap: 10px; padding-inline: 6px; }
.mf-trash-tools button { border-radius: 12px; min-height: 44px; font-size: 17px; padding-inline: 12px; }
.mf-trash-head, .mf-rows.trash .mf-row { display: grid; grid-template-columns: 32px minmax(0,1.4fr) minmax(0,1.1fr) minmax(60px,.65fr) 37px; align-items: center; gap: 12px; }
.mf-trash-head { padding: 10px 9px 10px 12px; color: var(--mf-muted); border-bottom: 1px solid var(--mf-line); }
.mf-shell input[type=checkbox] { appearance: auto; accent-color: var(--mf-ink); min-width: 18px; min-height: 18px; justify-self: center; }
.mf-settings { min-width: 0; display: grid; gap: 14px; }
.mf-settings > h2 { margin: 0 0 5px 7px; font-size: clamp(25px,2.4vw,35px); }
.mf-settings-box, .mf-setting-summary { border: 1px solid var(--mf-line); border-radius: 17px; padding: 8px 19px 11px 25px; }
.mf-settings h3 { display: flex; align-items: center; gap: 18px; font-size: clamp(20px,1.8vw,26px); letter-spacing: -.025em; }
.mf-settings h3 svg { width: 30px; height: 30px; }
.mf-setting-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 41px; margin-left: 6px; }
.mf-setting-row + .mf-setting-row { border-top: 1px solid var(--mf-line); }
.mf-setting-row > span { grid-column: 2; }
.mf-setting-row > button, .mf-segments { grid-column: 3; }
.mf-setting-selector { display: flex; flex-direction: row-reverse; gap: 6px; align-items: center; padding: 5px 2px 5px 6px; min-height: 40px; max-width: 230px; text-align: end; color: var(--mf-muted); overflow-wrap: anywhere; }
.mf-setting-selector svg { width: 20px; height: 20px; }
.mf-segments { display: flex; min-width: min(32vw,460px); border: 1px solid var(--mf-line); background: var(--mf-control); border-radius: 11px; }
.mf-segments button { min-height: 34px; flex: 1; font-size: 16px; padding: 4px 8px; }
.mf-segments [aria-pressed=true] { background: #d7e3fb; color: #0754c5; }
.mf-shell .mf-switch { width: 50px; height: 28px; min-height: 28px; border-radius: 20px; padding: 2px; background: #a2a4ae; display: flex; align-items: center; }
.mf-switch::before { content: ''; display: block; border-radius: 50%; width: 23px; height: 23px; box-shadow: 0 2px 3px #0002; background: white; }
.mf-shell .mf-switch[aria-checked=true] { justify-content: flex-end; background: #2e79f1; }
.mf-settings-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.mf-setting-summary { display: flex; align-items: center; min-height: 91px; gap: 13px; padding: 10px 17px; }
.mf-setting-summary h3 { font-size: 22px; }
.mf-setting-summary p { margin: 6px 0 0; color: var(--mf-muted); font-size: 16px; }
.mf-setting-summary .mf-switch { margin-inline-start: auto; flex: none; }
.mf-backup-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--mf-line); padding-top: 8px; }
.mf-backup-actions button { min-height: 36px; border-radius: 10px; font-size: 15px; }
.mf-backup-actions svg { width: 19px; height: 19px; }
.mf-scrim { position: fixed; z-index: 91; inset: 0; border-radius: 0; background: #0b11164f; }
.mf-editing .mf-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 92; transform: translateX(-104%); visibility: hidden; }
.mf-drawer-open .mf-sidebar { transform: none; visibility: visible; }
.mf-drawer-open .mf-nav-close { display: grid; place-items: center; margin-left: auto; width: 35px; height: 42px; }
.mf-nav-close svg { width: 20px; height: 20px; }
.mf-menu { position: fixed; z-index: 95; width: min(245px, calc(100vw - 20px)); max-height: min(460px, calc(100dvh - 20px)); overflow: auto; border: 1px solid var(--mf-line); border-radius: 13px; background: var(--mf-bg); color: var(--mf-ink); padding: 7px 11px; box-shadow: 0 10px 25px #0002; font: 17px/1.2 Arial, sans-serif; }
.mf-menu h3 { margin: 8px 7px 12px; font-size: 16px; }
.mf-menu button { display: flex; align-items: center; width: 100%; min-height: 43px; padding: 9px 8px; text-align: start; gap: 13px; border-radius: 0; font-size: 16px; overflow-wrap: anywhere; }
.mf-menu button + button { border-top: 1px solid var(--mf-line); }
.mf-menu button:hover, .mf-menu button[aria-checked=true] { background: var(--mf-selected); }
.mf-menu button[aria-checked=true] svg { fill: currentColor; }
.mf-menu svg { width: 20px; height: 20px; }
.mf-dialog { width: min(500px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; border: 1px solid var(--mf-line); border-radius: 24px; padding: 23px 29px; background: var(--mf-bg); color: var(--mf-ink); box-shadow: 0 12px 36px #0003; font: 18px/1.3 Arial, sans-serif; }
.mf-dialog:has(.mf-import-options) { width: min(474px, calc(100vw - 24px)); }
.mf-dialog::backdrop { background: #20263266; }
.mf-dialog h2 { text-align: center; font-size: 28px; margin: 0 0 20px; }
.mf-dialog form, .mf-import-options { display: grid; gap: 12px; }
.mf-dialog label { display: grid; gap: 6px; font-size: 16px; color: var(--mf-muted); }
.mf-dialog :is(input,select,.mf-folder-select) { width: 100%; min-height: 51px; min-width: 0; border: 1px solid var(--mf-line); border-radius: 11px; padding: 8px 15px; background: var(--mf-bg); color: var(--mf-ink); font: 18px Arial, sans-serif; }
.mf-folder-select { display: flex; align-items: center; gap: 10px; }
.mf-dialog .mf-folder-select select { border: 0; border-radius: 0; padding: 0; min-height: 34px; }
.mf-dialog-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 10px; }
.mf-dialog-actions button, .mf-import-options button { min-height: 51px; border: 1px solid var(--mf-line); border-radius: 11px; font-size: 17px; }
.mf-dialog-actions [type=submit] { background: var(--mf-control); font-weight: 700; }
.mf-import-options button { position: relative; display: grid; place-items: center; width: 100%; padding: 6px 42px; }
.mf-import-options svg { position: absolute; inset-inline-start: 17px; }
.mf-dialog button:hover { background: var(--mf-selected); }
.mf-import-caption { margin: 13px 0 0; color: var(--mf-muted); text-align: center; font-size: 14px; }
.mf-form-error { color: #b73232; font-size: 15px; margin: 0; }
#mf-notice { position: fixed; z-index: 98; inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) auto; width: max-content; max-width: min(600px, calc(100vw - 20px)); max-height: min(36dvh, 240px); overflow: auto; padding: 10px 13px; border-radius: 12px; box-shadow: 0 2px 19px #0002; border: 1px solid var(--mf-line); background: var(--mf-bg); color: var(--mf-ink); font: 15px Arial,sans-serif; white-space: pre-line; overflow-wrap: anywhere; }

.mf-editing .editor { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); background: #eeeff3; font-family: system-ui,sans-serif; }
.mf-editing .editor > .tab { min-width: 0; }
.mf-editing .editor .notebook-tab { min-width: min(160px, 60vw); }
.mf-editing .editor .tabs { min-width: 0; }
.mf-editing .editor > .bar [data-action=navigation] { --tool-x: 2.7%; }
.mf-editing .editor .workspace { background: #eeeff3; }
[data-theme=dark] .mf-editing .editor, [data-theme=dark] .mf-editing .editor .workspace { background: #1b1c20; }
.mf-editing .paper-scroll { padding-block: 12px 10px; min-width: 0; }
.mf-editing .paper-scroll > canvas { box-shadow: 0 3px 28px #1d263524; }
.mf-editing .mf-thumbs { position: absolute; top: 18px; left: max(10px, env(safe-area-inset-left)); z-index: 3; display: grid; place-items: center; width: 45px; height: 45px; background: var(--mf-bg); color: var(--mf-ink); border: 1px solid var(--mf-line); border-radius: 11px; box-shadow: 0 2px 8px #1d263514; }
.mf-editing .mf-thumbs svg { width: 25px; height: 25px; }
.mf-editing .page-list { position: absolute; z-index: 3; top: 70px; left: max(10px, env(safe-area-inset-left)); width: min(171px, 48vw); max-height: calc(100% - 80px); border: 1px solid var(--mf-line); border-radius: 12px; box-shadow: 0 2px 8px #1d263524; padding: 6px; }
.mf-editing .page-list .page-options { gap: 5px; }
.mf-editing .object-actions, .mf-editing .shape-quick { flex-wrap: wrap; overflow: visible; }
.mf-editing .object-actions > * { flex: 0 1 auto; }
.mf-editing .editor .shape-quick:not([hidden]) { min-width: 0; width: 100%; }
.mf-editing .editor .selection-tools { min-width: 0; }
.mf-editing .editor .shape-quick button { flex: 0 0 auto; }
.mf-editing .editor .secondary .finger-mode { min-height: 30px; }

@media (max-width: 1050px) {
  .mf-main .mf-header { gap: 13px; margin-bottom: 22px; }
  .mf-actions { gap: 8px; }
  .mf-search { margin-right: 0; padding-inline: 12px; }
  .mf-actions > button { gap: 6px; }
  .mf-actions > button svg, .mf-search svg { width: 24px; height: 24px; }
  .mf-settings-summary { gap: 10px; }
  .mf-row-open { gap: 10px; }
  .mf-row { gap: 7px; }
  .mf-shell .mf-card .mf-options { min-width: 36px; min-height: 36px; }
}
@media (max-width: 940px) {
  .mf-editing .editor > .bar:not(.secondary) { display: flex; height: auto; min-height: 41px; flex-wrap: wrap; justify-content: space-between; gap: 0; overflow: visible; padding: 3px max(7px, env(safe-area-inset-right)) 3px max(7px, env(safe-area-inset-left)); }
  .mf-editing .editor > .bar:not(.secondary) > button { position: static; transform: none; flex: 0 0 39px; min-height: 35px; }
  .mf-editing .editor > .bar.secondary { height: auto; gap: 7px; flex-wrap: wrap; padding: 4px 8px; }
  .mf-editing .editor .secondary:not(.shape-mode) > .history:first-child { margin-left: 0; gap: 4px; }
  .mf-editing .editor .secondary:not(.shape-mode) :is(.swatches,[aria-label=Spessore]), .mf-editing .editor .secondary .finger-mode { position: static; }
  .mf-editing .editor .secondary .zoom { margin-left: auto; }
}
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .mf-sidebar { --mf-sidebar: min(273px, calc(100vw - 39px)); position: fixed; z-index: 92; inset: 0 auto 0 0; transform: translateX(-104%); visibility: hidden; padding-top: max(26px, calc(18px + env(safe-area-inset-top))); }
  .mf-drawer-open .mf-sidebar { transform: none; visibility: visible; }
  .mf-brand { gap: 11px; margin-bottom: 27px; }
  .mf-brand > span { width: 46px; }
  .mf-brand strong { font-size: 27px; }
  .mf-sidebar nav button { gap: 17px; }
  .mf-hamburger { display: grid; place-items: center; width: 43px; height: 44px; padding: 6px; }
  .mf-title { padding-inline-start: 0; gap: 8px; }
  .mf-main { padding: max(12px, calc(env(safe-area-inset-top) + 6px)) max(13px, env(safe-area-inset-right)) max(17px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left)); }
  .mf-main .mf-header { margin-bottom: 17px; }
  .mf-actions { flex-wrap: wrap; }
  .mf-search { flex-basis: 100%; min-height: 49px; border-radius: 14px; }
  .mf-actions > button { flex: 1; min-height: 46px; border-radius: 12px; }
  .mf-content { gap: 13px; }
  .mf-panel { padding: 11px 10px 13px; border-radius: 17px; }
  .mf-panel > header { margin: 0 1px 12px; }
  .mf-panel h2, .mf-settings h2, .mf-view-tools h2 { gap: 8px; font-size: 23px; }
  .mf-panel h2 > svg { width: 27px; height: 27px; }
  .mf-see { font-size: 16px; min-height: 35px; }
  .mf-see svg { width: 16px; height: 16px; }
  .mf-panel-empty.continue, .mf-panel-empty:is(.folders,.all) { min-height: 0; }
  .mf-panel-empty .mf-empty { min-height: 136px; }
  .mf-shell .empty-paper { height: 91px; }
  .mf-shell .empty-paper.all { height: 83px; }
  .mf-empty .empty-folders { height: 64px; gap: 12px; }
  .mf-empty .empty-folders .folder-art { width: min(20vw, 74px); height: 57px; }
  .mf-cards.rail { gap: 8px; }
  .mf-cards.continue-cards.rail > * { flex-basis: 224px; }
  .mf-cards.folder-cards.rail > * { flex-basis: 204px; }
  .mf-card .mf-preview { width: 81px; height: 107px; }
  .mf-card .folder-art { width: 43px; }
  .mf-card strong { font-size: 16px; }
  .mf-card small { font-size: 14px; }
  .continue-cards .mf-card > button:first-child { min-height: 132px; }
  .file-cards { grid-template-columns: repeat(auto-fill,minmax(min(100%,135px),1fr)); }
  .mf-cards:not(.rail).folder-cards { grid-template-columns: repeat(auto-fill,minmax(min(100%,160px),1fr)); }
  .mf-cards:not(.rail).continue-cards { grid-template-columns: repeat(auto-fill,minmax(min(100%,210px),1fr)); }
  .mf-rows { padding: 0 1px; }
  .mf-row { grid-template-columns: minmax(0,1fr) auto 40px; grid-template-rows: auto auto; column-gap: 5px; row-gap: 0; min-height: 61px; padding: 3px 0; }
  .mf-row-open { grid-column: 1 / 3; grid-row: 1; padding: 3px 1px; min-height: 34px; gap: 8px; }
  .mf-row-name { font-size: 16px; }
  .mf-row time { grid-column: 1; grid-row: 2; padding-left: 39px; }
  .mf-row time, .mf-row-meta { font-size: 13px; align-self: start; }
  .mf-row .mf-options { grid-column: 3; grid-row: 1 / 3; min-height: 42px; min-width: 39px; }
  .mf-row .mf-row-meta { grid-column: 2; grid-row: 2; }
  .mf-rows.recent .mf-row { grid-template-columns: minmax(0,1fr) auto 40px; }
  .mf-rows.recent .mf-preview { width: 47px; height: 32px; }
  .mf-rows.recent .mf-row time { padding-left: 55px; }
  .mf-main .mf-panel-description { margin: -7px 0 11px 4px; font-size: 16px; }
  .mf-trash-tools > span { flex-basis: 100%; }
  .mf-trash-tools button { padding: 5px; white-space: normal; font-size: 15px; flex: 1 1 auto; }
  .mf-trash-head { grid-template-columns: 25px 1fr; gap: 5px; padding: 5px 1px; }
  .mf-trash-head > span:nth-last-child(-n+2) { display: none; }
  .mf-rows.trash .mf-row { grid-template-columns: 25px minmax(0,1fr) auto 38px; gap: 0 4px; }
  .mf-rows.trash input { grid-column: 1; grid-row: 1 / 3; }
  .mf-rows.trash .mf-row-open { grid-column: 2 / 4; }
  .mf-rows.trash .mf-row-meta { grid-column: 2; font-size: 12px; }
  .mf-rows.trash .mf-row-meta svg { display: none; }
  .mf-rows.trash time { grid-column: 3; padding: 0; }
  .mf-rows.trash .mf-options { grid-column: 4; }
  .mf-autosave { padding-top: 15px; gap: 8px; font-size: 16px; }
  .mf-autosave svg { width: 26px; height: 26px; }
  .mf-settings-summary { grid-template-columns: 1fr; }
  .mf-settings-box { padding: 8px 9px 10px 10px; }
  .mf-setting-row { grid-template-columns: 23px minmax(0,1fr) auto; gap: 6px; min-height: 46px; margin-left: 0; font-size: 16px; }
  .mf-setting-row > svg { width: 20px; }
  .mf-setting-selector { max-width: min(42vw, 180px); font-size: 15px; }
  .mf-setting-row:has(.mf-segments) { padding-block: 5px; }
  .mf-segments { grid-column: 2 / -1; grid-row: 2; margin-bottom: 3px; }
  .mf-setting-summary { padding-inline: 10px; }
  .mf-setting-summary h3 { font-size: 20px; }
  .mf-setting-summary p { font-size: 14px; }
  .mf-dialog { padding-inline: 16px; }
  .mf-editing .editor > .bar:not(.secondary) { display: grid; grid-template-columns: repeat(auto-fit,minmax(38px,1fr)); justify-content: center; }
  .mf-editing .editor > .bar:not(.secondary) > button { grid-column: auto; position: static; transform: none; min-width: 36px; width: 100%; min-height: 40px; }
  .mf-editing .editor .secondary .history, .mf-editing .editor .secondary .swatches, .mf-editing .editor .secondary .zoom { gap: 3px; max-width: 100%; }
  .mf-editing .editor .secondary .swatch { width: 24px; height: 24px; }
  .mf-editing .editor .secondary [aria-label=Spessore] button { min-width: 30px; }
  .mf-editing .editor .secondary .finger-mode { min-width: 39px; }
  .mf-editing .editor .secondary .zoom { justify-self: end; }
  .mf-editing .mf-thumbs { top: 10px; left: 8px; width: 38px; height: 38px; }
  .mf-editing .page-list { top: 52px; max-height: calc(100% - 60px); }
}
@media (pointer: fine) and (min-width: 1060px) {
  .mf-card .mf-options { opacity: 0; }
  .mf-card:is(:hover,:focus-within) .mf-options { opacity: 1; }
  .mf-card > [data-command=open] { padding-right: 12px; }
  .folder-cards .mf-card > [data-command=open] { padding-right: 7px; }
}
.mf-dialog { max-height: calc(min(100dvh, var(--mf-visible-height, 100dvh)) - 24px); }
.mf-menu-settings { width: min(448px, calc(100vw - 20px)); }
@media (min-width: 1060px) {
  :root { --mf-bg: #fdfdfe; --mf-selected: #dfe0e4; }
  :root[data-theme=dark] { --mf-bg: #1e1f25; --mf-selected: #373a44; }
  .mf-sidebar { padding-right: 10px; }
  .mf-brand { margin-bottom: 51px; }
  .mf-sidebar nav { gap: 12px; }
  .mf-main { background: linear-gradient(151deg, var(--mf-control), var(--mf-bg) 13%, var(--mf-bg) 94%, var(--mf-card)); }
  .mf-main .mf-header { gap: 14px; }
  .mf-actions > button[data-command=import] { min-width: 160px; }
  .mf-panel-empty > header { margin-bottom: 15px; }
  .mf-panel-empty:is(.folders,.all) .mf-empty { min-height: 140px; }
  .mf-panel-empty .mf-empty { transform: translateX(-8px); }
  .mf-panel h2 { gap: 20px; }
  .mf-empty p { font-size: 22px; }
}
.mf-shell .mf-view-back, .mf-shell .mf-view-action { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--mf-line); border-radius: 13px; background: var(--mf-bg); padding: 6px 12px; }
.mf-view-action { min-width: 125px; font-size: 17px; }
.mf-view-tools .mf-view-back { min-width: 54px; margin-right: 11px; }
.mf-view-action svg { width: 20px; height: 20px; }
.mf-overview .mf-view-tools { margin-bottom: 17px; }
.mf-main .mf-view-description { margin-bottom: 21px; color: var(--mf-muted); font-size: 17px; }
.mf-overview .continue-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.mf-overview .folder-cards { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.mf-overview .folder-cards .mf-card { min-height: 122px; }
.mf-overview .folder-cards .mf-card > [data-command=open] { padding-inline: 22px; }
.mf-overview .continue-cards .mf-card > [data-command=open] { padding: 14px 24px 14px 16px; align-items: center; gap: 18px; }
.mf-overview .continue-cards .mf-card > [data-command=open] > span:not(.mf-preview) { padding: 0; flex: 1; }
.mf-overview .continue-cards .mf-card strong { font-size: 21px; }
.mf-overview .continue-cards .mf-options { right: 10px; top: 16px; bottom: auto; opacity: 1; }
.mf-overview .continue-cards .mf-preview { width: 111px; }
.mf-overview .continue-cards progress { max-width: 308px; }
.mf-overview .continue-cards progress::-webkit-progress-value { background: #6e737d; }
.mf-overview .continue-cards progress::-moz-progress-bar { background: #6e737d; }
.mf-files-table { max-height: max(122px, calc(100dvh - 350px)); overflow-y: auto; border: 1px solid var(--mf-line); border-radius: 17px; padding: 0 22px; }
.mf-files-head { display: grid; grid-template-columns: minmax(0,2.4fr) minmax(82px,1fr) minmax(85px,.95fr) 37px; gap: 12px; min-height: 55px; align-items: center; color: var(--mf-muted); border-bottom: 1px solid var(--mf-line); background: var(--mf-bg); font-size: 16px; position: sticky; top: 0; z-index: 2; }
.mf-files-table .mf-rows { padding: 0; }
.mf-files-table .mf-row { min-height: 54px; }
@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) and (pointer: coarse) {
  .mf-overview .continue-cards, .mf-overview .folder-cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,153px),1fr)); gap: 10px; }
  .mf-overview .continue-cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,225px),1fr)); }
  .mf-overview .folder-cards .mf-card { min-height: 84px; }
  .mf-overview .folder-cards .mf-card > [data-command=open] { padding-inline: 9px 34px; }
  .mf-overview .continue-cards .mf-card strong { font-size: 16px; padding-right: 11px; }
  .mf-overview .continue-cards .mf-preview { width: 78px; }
  .mf-overview .continue-cards .mf-card > [data-command=open] { padding-inline: 9px 20px; gap: 10px; }
  .mf-view-tools { gap: 6px; }
  .mf-view-tools h2 { flex-basis: calc(100% - 62px); }
  .mf-view-tools .mf-view-back { min-width: 44px; margin-right: 0; }
  .mf-view-action { min-width: 0; flex: 1; }
  .mf-files-head { display: none; }
  .mf-files-table { max-height: max(220px, calc(100dvh - 270px)); padding: 0 7px; }
}

.mf-editing .paper-scroll { gap: var(--mf-sheet-gap, 18px); }
@media (min-width: 941px) and (min-height: 501px) {
  .mf-editing .editor > .tab { height: 36px; }
  .mf-editing .editor > .bar:not(.secondary) { height: 50px; }
  .mf-editing .editor > .bar.secondary { min-height: 38px; }
  .mf-editing .workspace { margin-top: 10px; border-top: 1px solid var(--mf-line); }
  .mf-editing .mf-thumbs, .mf-editing .page-list { left: 18px; }
}
@media (min-width: 761px) and (max-width: 940px) and (min-height: 501px) {
  .mf-editing .editor > .tab { height: 27px; min-height: 27px; }
  .mf-editing .editor > .bar:not(.secondary) { min-height: 37px; padding-block: 1px; }
  .mf-editing .editor > .bar.secondary { min-height: 32px; padding-block: 0; }
}

@media (min-width: 941px) and (min-height: 501px) {
  .mf-editing .mf-scrim { background: linear-gradient(to bottom, transparent 0 134px, #1115221c 134px); }
}
