.memo-shell{max-width:1200px;margin:auto;padding:24px}.memo-header{display:flex;align-items:center;gap:24px;padding:12px 0;border-bottom:1px solid #99adba}.memo-header a{color:inherit}.memo-header strong{font-size:20px}.memo-header span{margin-left:auto;font-size:12px}.memo-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:20px 0}.memo-toolbar label{display:flex;gap:8px;align-items:center}.memo-toolbar button,.memo-toolbar select,.memo-actions button,.memo-title input{font:inherit;padding:7px 10px;border:1px solid #a9bbc7;border-radius:4px;background:transparent;color:inherit}.memo-title{display:flex;align-items:center;gap:12px;margin-bottom:12px}.memo-title input{max-width:500px;width:100%}.memo-actions{margin-bottom:8px}.memo-paper.notebook-body{display:block;width:1140px;min-width:1140px;min-height:1600px;padding:0}.memo-writing{padding:0}.memo-paper .free-notebook{min-height:1600px}.memo-paper .notebook-stage::after{display:none}@media screen and (min-width:700px){.memo-paper.notebook-body{width:1140px;min-width:1140px;min-height:1600px}.notebook-scroll{overflow-x:hidden}}@media(max-width:699px){.memo-shell{padding:12px}.notebook-scroll{overflow-x:auto}}
@media print{.memo-print-paper{position:relative;width:1140px;height:1600px;background-image:linear-gradient(to right,#f3f6f8 1px,transparent 1px),linear-gradient(to bottom,#f3f6f8 1px,transparent 1px);background-size:18px 18px}}
/* Match the journal's panel, type and controls. */
.memo-shell{max-width:none;margin:0 auto;padding:0 30px 30px}
.memo-header{position:sticky;top:0;z-index:80;min-height:62px;padding:10px 0;background:#11151b;border-color:#303845;font:700 13px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.06em}
.memo-header a{color:#9ebed1;text-decoration:none}.memo-header strong{color:#e6ebf2;font-size:16px}.memo-header span{color:#aebecb}
#journal{margin-top:24px;padding:24px 30px;background:#191f28;border:1px solid #343c49;border-radius:6px;box-shadow:0 18px 48px #0004}
.memo-toolbar{margin:0 0 18px;gap:10px;color:#a9c0d0;font:700 12px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.04em}
.memo-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;position:sticky;left:0;z-index:3;margin:0;padding:5px 8px;border-top:1px solid #384454;background:#171d25}
.memo-paper.notebook-body{border-top:0}
.memo-actions #image-add{padding:3px 7px;border:1px solid #526777;border-radius:3px;background:#202a35;color:#bfd6e3;font:400 11px ui-monospace,SFMono-Regular,Menlo,Consolas,'Hiragino Kaku Gothic ProN',monospace}
.memo-actions #image-add:hover{background:#304452}
.memo-toolbar button,.memo-toolbar select,.memo-actions button,.memo-title input{background:#202833;border-color:#425769;color:#d5e5ed;border-radius:4px}
.memo-toolbar button:hover,.memo-actions button:hover{background:#304452}
.memo-title{color:#a9c0d0;font:700 12px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.05em}
.memo-title input{font:14px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:normal}
html[data-theme=light] .memo-header{background:#edf1f4;border-color:#cbd4dc}html[data-theme=light] .memo-header a{color:#48718a}html[data-theme=light] .memo-header strong{color:#263846}html[data-theme=light] .memo-header span{color:#526f7f}
html[data-theme=light] #journal{background:#f8fbfd;border-color:#cbd9e1;box-shadow:0 10px 30px #1834460a}
html[data-theme=light] .memo-toolbar,html[data-theme=light] .memo-title{color:#3e6071}
html[data-theme=light] .memo-toolbar button,html[data-theme=light] .memo-toolbar select,html[data-theme=light] .memo-actions button,html[data-theme=light] .memo-title input{background:#f4f8fa;border-color:#b7cbd5;color:#294a5a}
html[data-theme=light] .memo-actions #image-add{background:#eef5f8;border-color:#a9beca;color:#294a5a}
html[data-theme=light] .memo-actions{border-color:#cad6de;background:#f8fbfd}
html[data-theme=light] .memo-actions #image-add:hover{background:#dcebf2}
html[data-theme=light] .memo-toolbar button:hover,html[data-theme=light] .memo-actions button:hover{background:#dcebf2}
@media screen{
 .memo-toolbar{padding-bottom:14px;border-bottom:1px solid #405464}
 .memo-toolbar :is(#memo-tree-toggle,#memo-delete),.memo-tree-actions #memo-new{display:inline-flex;align-items:center;gap:6px}
 .memo-toolbar :is(#memo-tree-toggle,#memo-delete)::before,.memo-tree-actions #memo-new::before{content:'';width:16px;height:16px;flex:none;background:currentColor;mask:var(--memo-tool-icon) center/contain no-repeat;-webkit-mask:var(--memo-tool-icon) center/contain no-repeat}
 .memo-tree-actions #memo-new::before{width:16px}
 #memo-tree-toggle{--memo-tool-icon:var(--icon-files)}
 #memo-new{--memo-tool-icon:var(--icon-new-memo)}
 #memo-delete{--memo-tool-icon:var(--icon-delete)}
 .memo-metadata{display:grid;gap:10px;margin-bottom:12px;padding-bottom:14px;border-bottom:1px solid #405464}
 .memo-metadata .memo-move-label,.memo-metadata .memo-title{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:8px;margin:0;color:#a9c0d0;font:700 12px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.05em}
 .memo-metadata .memo-move-label select,.memo-metadata .memo-title input{width:100%;max-width:none;min-width:0;padding:7px 10px;border:1px solid #425769;border-radius:4px;background:#202833;color:#d5e5ed;font:14px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:normal}
 html[data-theme=light] .memo-toolbar,html[data-theme=light] .memo-metadata{border-color:#d7e2e8}
 html[data-theme=light] .memo-metadata .memo-move-label,html[data-theme=light] .memo-metadata .memo-title{color:#3e6071}
 html[data-theme=light] .memo-metadata .memo-move-label select,html[data-theme=light] .memo-metadata .memo-title input{background:#f4f8fa;border-color:#b7cbd5;color:#294a5a}
 @media(max-width:480px){.memo-metadata .memo-move-label,.memo-metadata .memo-title{grid-template-columns:54px minmax(0,1fr)}}
}
@media(max-width:699px){.memo-shell{padding:0 12px 16px}#journal{margin-top:16px;padding:16px 12px}.memo-toolbar{gap:7px}}

.memo-header .menu-toggle{flex:none;margin-right:0}.memo-header strong{margin-right:auto}.app-drawer a.drawer-item{text-decoration:none}.memo-header #memo-save{margin-left:auto}
/* Shared header information remains available while scrolling. */
@media screen{.memo-header,.week-header{gap:16px}.memo-header strong,.week-header strong{margin-right:0;flex:none}.memo-header .header-context,.week-header .header-context{margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;color:#a9c0d0}.memo-header .header-account,.week-header .header-account{margin-left:auto;flex:none;flex-wrap:nowrap;gap:14px;font:12px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:0}.memo-header .header-account span,.week-header .header-account span{margin:0;color:#8794a5}.memo-header #memo-save,.week-header #week-save{margin-left:auto;font-size:11px;white-space:nowrap}.memo-header .header-account:not([hidden])~*,.week-header .header-account:not([hidden])~*{margin-left:0}html[data-theme=light] .memo-header .header-context,html[data-theme=light] .week-header .header-context{color:#405e70}@media(max-width:800px){.memo-header,.week-header{gap:8px}.memo-header .header-account,.week-header .header-account{gap:8px}.memo-header #header-username,.week-header #header-username{display:none}.memo-header .header-context,.week-header .header-context{font-size:10px}.memo-header strong,.week-header strong{font-size:13px}.memo-header #memo-save,.week-header #week-save{font-size:10px}.memo-header .header-account,.week-header .header-account{font-size:10px}}}
@media screen{.memo-header .header-account,.week-header .header-account{margin-left:0}}
@media screen{
body[data-embedded-memo=true] .memo-shell{padding:0}
body[data-embedded-memo=true] .memo-header,body[data-embedded-memo=true] .demo-banner,body[data-embedded-memo=true] footer{display:none}
body[data-embedded-memo=true] #journal{margin:0;padding:12px;border:0;border-radius:0;box-shadow:none}
body[data-embedded-memo=true] .memo-toolbar{gap:6px;margin-bottom:12px}
body[data-embedded-memo=true] .memo-toolbar #memo-save{margin-left:auto;font-size:11px}
body[data-embedded-memo=true] .notebook-scroll{overflow-x:auto}
}

/* A paper-shaped placeholder prevents the memo card from collapsing while loading. */
@media screen{
 .memo-loading[hidden]{display:none}
 .memo-loading-title{height:32px;width:min(65%,320px);margin:0 0 14px;border-radius:4px;background:#7d96a333}
 .memo-loading-scroll{overflow:hidden}
 .memo-loading-paper{width:100%;aspect-ratio:1140/1600;border-top:1px solid #526b7966;background-image:linear-gradient(#8ba4b718 1px,transparent 1px),linear-gradient(90deg,#8ba4b718 1px,transparent 1px),linear-gradient(#8ba4b72a,#8ba4b72a),linear-gradient(#8ba4b72a,#8ba4b72a),linear-gradient(#8ba4b72a,#8ba4b72a);background-size:18px 18px,18px 18px,42% 10px,68% 10px,53% 10px;background-position:0 0,0 0,20px 28px,20px 52px,20px 76px;background-repeat:repeat,repeat,no-repeat,no-repeat,no-repeat}
}

/* Keep editing controls the same screen size as Daily when the paper is scaled. */
@media screen and (min-width:700px), screen and (pointer:fine){
 body[data-memo-zoomed=true] .free-notebook .block-delete,body[data-memo-zoomed=true] .free-notebook .block-font,body[data-memo-zoomed=true] .free-notebook .block-scope,body[data-memo-zoomed=true] .free-notebook .block-color{transform:scale(var(--memo-ui-inverse,1));transform-origin:top left}
 body[data-memo-zoomed=true] .free-notebook .block-color:hover{transform:scale(var(--memo-ui-inverse,1))}
 body[data-memo-zoomed=true] .free-notebook .drag-resize{transform:scale(var(--memo-ui-inverse,1));transform-origin:center}
 body[data-memo-zoomed=true] .image-handle:not(.rotate){transform:scale(var(--memo-ui-inverse,1));transform-origin:center}
 body[data-memo-zoomed=true] .image-handle.rotate{transform:translateX(-50%) scale(var(--memo-ui-inverse,1));transform-origin:center}
 body[data-memo-zoomed=true] .image-controls .image-delete{transform:scale(var(--memo-ui-inverse,1));transform-origin:top left}
 body[data-memo-zoomed=true] .image-block.selected .image-move{transform:scale(var(--memo-ui-inverse,1));transform-origin:center}
}

/* A compact, pixel-like file tree for organizing memo pages. */
@media screen{
 .memo-layout{position:relative;display:flex;align-items:flex-start;min-width:0}
 .memo-main{flex:1;min-width:0}
 /* The whole left edge opens the folder drawer; the icon remains visible
    at the top of the rail. */
 .memo-tree-rail{position:absolute;z-index:3;top:0;bottom:0;left:0;width:24px;padding:12px 0;border:0;border-right:1px solid #405464;border-radius:6px 0 0 6px;background:#1c2832;color:#a8c3d1;cursor:pointer}
 .memo-tree-rail:focus-visible{outline:2px solid #9ac2da;outline-offset:-2px}
 .memo-tree-rail-icon{position:absolute;top:12px;left:50%;transform:translateX(-50%);display:block;width:18px;height:18px;background:currentColor;mask:var(--icon-files) center/contain no-repeat;-webkit-mask:var(--icon-files) center/contain no-repeat}
 html[data-theme=light] .memo-tree-rail{border-color:#cbdde6;background:#f8fbfd;color:#527b90}
 html[data-theme=light] .memo-tree-rail:focus-visible{outline-color:#527b90}
 .memo-tree-panel{position:absolute;z-index:77;top:-24px;bottom:-24px;left:-30px;width:min(240px,calc(100% + 30px));overflow:auto;padding:16px;border:1px solid #405464;border-radius:6px 0 0 6px;background:#1c2832;box-shadow:4px 0 24px #0005;color:#b9ceda;font:700 11px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}
 .memo-tree-heading{position:sticky;top:-16px;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:8px;padding:4px 0;background:#1c2832;letter-spacing:.06em}
 .memo-tree-heading button,.memo-tree-actions button{padding:3px 5px;border:1px solid #52697a;border-radius:3px;background:#202833;color:inherit;font:inherit;white-space:nowrap}
 .memo-tree-actions{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}.memo-tree-actions button{font-size:9px}
 .memo-tree{display:flex;flex-direction:column;gap:3px}
 .memo-tree-heading #memo-tree-close{width:32px;height:32px;padding:0;font:20px/1 system-ui,sans-serif}
 .memo-tree-row{--tree-indent:calc(var(--tree-depth)*12px);position:relative;isolation:isolate;display:flex;align-items:flex-start;gap:5px;width:100%;min-width:0;padding:5px 4px 5px calc(4px + var(--tree-indent));border:0;border-radius:3px;background:transparent;color:inherit;text-align:left;font:inherit}
 .memo-tree-row::before{content:'';position:absolute;z-index:-1;inset:0 0 0 var(--tree-indent);border-radius:3px;pointer-events:none}
 .memo-tree-row:hover,.memo-tree-row[aria-current=true]{color:#f2f8fb}
 .memo-tree-row:hover::before,.memo-tree-row[aria-current=true]::before{background:#344b59}
 .memo-tree-row.dragging{opacity:.45}.memo-tree-row.drop-target::before{background:#527d91;outline:2px solid #9dc9dd;outline-offset:-2px}
.memo-tree-icon{flex:none;color:#8db9d1}.memo-tree-name{min-width:0;overflow-wrap:anywhere}
 .memo-move-label{display:inline-flex;align-items:center;gap:6px}.memo-move-label select{max-width:140px}
 html[data-theme=light] .memo-tree-panel{border-color:#c1d1d9;background:#f8fbfd;box-shadow:0 8px 24px #29495d33;color:#3e6071}
 html[data-theme=light] .memo-tree-heading{background:#f8fbfd}
 html[data-theme=light] .memo-tree-heading button,html[data-theme=light] .memo-tree-actions button{background:#f4f8fa;border-color:#b7cbd5;color:#315f76}
 html[data-theme=light] .memo-tree-row:hover,html[data-theme=light] .memo-tree-row[aria-current=true]{color:#294e63}
 html[data-theme=light] .memo-tree-row:hover::before,html[data-theme=light] .memo-tree-row[aria-current=true]::before{background:#dcebf2}
 html[data-theme=light] .memo-tree-row.drop-target::before{background:#b9dce9;outline-color:#508ba7}
 html[data-theme=light] .memo-tree-icon{color:#5e8ea9}
 .memo-tree-icon{display:inline-flex;align-items:center;gap:2px;height:16px}
 .memo-tree-chevron{width:8px;height:8px;fill:currentColor}
 .memo-tree-symbol{width:16px;height:16px;fill:currentColor}
 .memo-tree-row.folder .memo-tree-symbol{color:#b4dcf3}
 html[data-theme=light] .memo-tree-row.folder .memo-tree-symbol{color:#80bde0}
 .memo-tree-detail{fill:#191f28}
 html[data-theme=light] .memo-tree-detail{fill:#fff}
 .memo-tree-row:hover .memo-tree-detail,.memo-tree-row[aria-current=true] .memo-tree-detail{fill:#344b59}
 html[data-theme=light] .memo-tree-row:hover .memo-tree-detail,html[data-theme=light] .memo-tree-row[aria-current=true] .memo-tree-detail{fill:#dcebf2}
 @media(max-width:699px){.memo-tree-panel{top:-16px;bottom:-16px;left:-12px;width:min(240px,calc(100% + 12px))}.memo-tree-row{--tree-indent:calc(var(--tree-depth)*9px);padding-left:calc(2px + var(--tree-indent))}.memo-tree-rail{width:29px}.memo-main{margin-left:17px}}
 body[data-embedded-memo=true] .memo-tree-panel{top:-12px;bottom:-12px;left:-12px;width:min(240px,calc(100% + 12px))}
 body[data-embedded-memo=true] .memo-tree-rail{width:24px}
 body[data-embedded-memo=true] .memo-main{margin-left:18px}
}
@media print{.memo-tree-rail{display:none!important}}

/* Memos use one continuous writing area on plain paper. */
@media screen{
 .memo-paper.notebook-body,html[data-theme=light] .memo-paper.notebook-body{background-image:none}
 .memo-paper .free-notebook .free-block{left:2%!important;top:18px!important;width:calc(98% - 4px)!important;min-height:36px}
 .memo-paper .free-notebook .free-hint,.memo-paper .free-notebook .block-delete,.memo-paper .free-notebook .block-move{display:none!important}
}
@media print{
 .memo-print-paper{background-image:none}
}

.memo-tree-status{margin:0 0 8px;color:#df8888;overflow-wrap:anywhere}.memo-tree-status:empty{display:none}html[data-theme=light] .memo-tree-status{color:#a33b3b}
.memo-tree-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}.memo-tree-actions button{min-width:0;justify-content:center}
.memo-tree-item{position:relative;min-width:0}.memo-tree-item .memo-tree-row{padding-right:30px}.memo-tree-more{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:26px;height:24px;border:0;border-radius:3px;background:transparent;color:inherit;font:700 17px/1 system-ui,sans-serif;cursor:pointer;opacity:0}.memo-tree-item:hover .memo-tree-more,.memo-tree-item:focus-within .memo-tree-more,.memo-tree-more[aria-expanded=true]{opacity:1}.memo-tree-more:hover,.memo-tree-more:focus-visible{background:#405d6c}.memo-tree-menu{position:absolute;right:0;top:100%;z-index:3}html[data-theme=light] .memo-tree-more:hover,html[data-theme=light] .memo-tree-more:focus-visible{background:#c9e1eb}@media(hover:none){.memo-tree-more{opacity:1}}

.memo-tree-actions #folder-new{display:inline-flex;align-items:center;gap:6px}.memo-tree-actions #folder-new::before{content:'';display:inline-block;flex:none;width:16px;height:16px;background:currentColor;mask:var(--memo-action-icon) center/contain no-repeat;-webkit-mask:var(--memo-action-icon) center/contain no-repeat}.memo-tree-actions #folder-new{--memo-action-icon:var(--icon-new-folder)}
@media screen{
 .memo-main,body[data-embedded-memo=true] .memo-main{margin-left:0}
 .memo-toolbar{align-items:center}.memo-heading{display:flex;align-items:center;gap:10px;flex:1 1 180px;min-width:0}.memo-heading-text{display:flex;flex-direction:column;gap:4px;min-width:0}.memo-heading-text strong{font:700 20px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;color:#d5e5ed;overflow-wrap:anywhere}.memo-heading-text span{font:12px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;color:#a9c0d0;overflow-wrap:anywhere}
 .memo-toolbar .memo-tree-rail,body[data-embedded-memo=true] .memo-toolbar .memo-tree-rail{position:relative;inset:auto;width:38px;height:62px;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:5px;border:1px solid #52697a;border-radius:5px;background:#202833;color:#a8c3d1}
 .memo-toolbar .memo-tree-rail::before{display:none}.memo-toolbar .memo-tree-rail::after{content:'›';font:20px/1 system-ui,sans-serif}.memo-tree-rail-icon{position:static;transform:none;width:18px;height:18px}.memo-toolbar .memo-tree-rail:hover{background:#202833}
 html[data-theme=light] .memo-heading-text strong{color:#294a5a}html[data-theme=light] .memo-heading-text span{color:#668292}html[data-theme=light] .memo-toolbar .memo-tree-rail,html[data-theme=light] .memo-toolbar .memo-tree-rail:hover{background:#f8fbfd;border-color:#cbdde6;color:#527b90}
}
@media screen{.memo-toolbar{border-bottom:0}}

@media screen{.memo-paper.notebook-body{min-height:var(--memo-visible-height,1600px)}.memo-paper .free-notebook{min-height:var(--memo-visible-height,1600px);overflow:visible}}
@media screen{.memo-extra-paper{margin-top:24px;border-top:1px solid #a9bbc7!important}}
@media screen{.memo-extra-paper{position:relative}.memo-page-image-add{position:absolute;z-index:5;top:5px;right:8px;padding:3px 7px;border:1px solid #526777;border-radius:3px;background:#202a35;color:#bfd6e3;font:400 11px ui-monospace,SFMono-Regular,Menlo,monospace;cursor:pointer}html[data-theme=light] .memo-page-image-add{background:#f4f8fa;border-color:#a9bbc7;color:#315f76}}
@media screen and (min-width:700px){body[data-memo-zoomed=true] .block-typeface option{font-size:calc(14px * var(--memo-ui-inverse,1))}}

@media screen{.memo-heading-text #memo-title{width:100%;min-width:0;padding:0;border:0;border-radius:0;background:transparent;color:#d5e5ed;font:700 20px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:normal;outline-offset:3px}.memo-heading-text #memo-title::placeholder{color:#809aa9;opacity:1}.memo-heading-text #memo-title:disabled{opacity:.6}html[data-theme=light] .memo-heading-text #memo-title{color:#294a5a}}
@media (pointer:coarse){.memo-tree-row{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}}
.memo-touch-ghost{position:fixed;z-index:9999;pointer-events:none;transform:translate(12px,12px);max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px 10px;border:1px solid #83a7b9;border-radius:4px;background:#dcebf2;color:#294e63;box-shadow:0 3px 10px #0003;font:12px ui-monospace,monospace}
@media (pointer:coarse){.memo-tree-row{-webkit-user-drag:none}}
