/* A quiet writing surface; appearance and object tools open only when needed. */
.note-scene{background:#eeede7}
.note-topbar{background:#f7f6f1eF;border-bottom-color:#e5e4dc;backdrop-filter:blur(12px)}
.note-paper{border-color:#dfdbce;box-shadow:0 8px 32px #645b3e09;max-width:880px;margin-top:36px;padding:50px 62px 64px}
.note-title{letter-spacing:1px;font-size:32px;margin-bottom:30px}
.note-meta{margin-bottom:20px}
.note-meta #noteTags{opacity:.65}
.note-scene .document-toolbar{flex-wrap:nowrap;gap:5px;padding:8px 0;border-top:0;border-bottom:1px solid #b7b19d28;margin-bottom:32px;top:67px;z-index:6}
.document-toolbar button{color:#868875;font-size:12px;height:32px;padding:0 10px}
.document-toolbar button:hover,.document-toolbar button.is-active{background:#b3bd9f1a}
.note-actions .space-design-button{background:transparent;border-color:transparent;color:#8a907e;font-size:12px}
.note-actions .space-design-button[aria-expanded=true]{background:#e9ecdf}
.note-breadcrumb{border:0;padding:0;opacity:.7}
.writing-hint{font-size:10px;color:#a7a695;border-top:0;padding-top:0;margin-top:40px;letter-spacing:.3px}
.note-scene[data-texture=dots] .note-paper{background-image:radial-gradient(#968d6219 .7px,transparent .7px);background-size:19px 19px}
.note-scene[data-texture=grid] .note-paper{background-image:linear-gradient(#968d620d 1px,transparent 1px),linear-gradient(90deg,#968d620d 1px,transparent 1px)}
.note-scene .tiptap{min-height:45vh}
.note-scene[data-layout=daily] .tiptap{line-height:1.95}
.note-scene .image-block[data-flow=left]{float:left;clear:left;margin:8px 24px 16px 0!important}
.note-scene .image-block[data-flow=right]{float:right;clear:right;margin:8px 0 16px 24px!important}
.image-block .image-resize{width:17px;height:17px;border-radius:50%;background:#9ba88c;border:3px solid #fffcf3}
.image-block.selected{outline:1px dashed #a2ad93;outline-offset:5px}
.format-panel{background:#faf8f0cc;border-color:#e5e1d4;padding:13px;border-radius:10px}
.format-row{gap:7px;margin:7px 0}
.format-row button{background:transparent;font-size:11px;color:#818b73;padding:7px 9px}
.format-row button:hover{background:#e9edde}
.format-row select{font-family:var(--sans);font-size:11px}
.format-row .insert-placement{max-width:none}
.paper-popover.design-panel{width:304px;top:59px;max-height:calc(100dvh - 80px);border-radius:16px;border:1px solid #e2dfd1;background:#fffdf7fa;box-shadow:0 10px 40px #514c4017;padding:22px;z-index:30;color:#727b66}
.paper-popover .panel-heading{align-items:center}
.paper-popover .panel-heading h2{font:14px var(--sans);margin:0;letter-spacing:.3px;color:#70795f}
.paper-popover .panel-heading>button{width:28px;height:28px;font-size:21px;color:#a1a58f}
.paper-popover .panel-section{margin-top:21px;padding-top:0;border:0}
.paper-popover .panel-section h3{font-size:10px;color:#a2a38f;letter-spacing:.5px;margin-bottom:12px}
.paper-popover .paper-swatches{gap:16px;padding:2px}
.paper-popover .paper-swatches button{width:32px;height:32px;border:3px solid #fffdf7;box-shadow:0 0 0 1px #dedacc;border-radius:50%}
.paper-popover .paper-swatches button.active{outline:1px solid #9daa86;outline-offset:3px}
.paper-popover .segment-control{gap:8px}
.paper-popover .segment-control button{height:48px;border:1px solid #e4e2d7;border-radius:8px;background-color:#faf9f3;color:#949a84;font-size:11px}
.paper-popover [data-texture=dots]{background-image:radial-gradient(#8b997a33 .6px,transparent .6px);background-size:7px 7px}
.paper-popover [data-texture=grid]{background-image:linear-gradient(#8b997a18 1px,transparent 1px),linear-gradient(90deg,#8b997a18 1px,transparent 1px);background-size:8px 8px}
.paper-popover .segment-control button.active,.paper-popover .font-options button.active{border-color:#a7b395;background-color:#eff2e7;color:#6a7c59;box-shadow:none}
.paper-popover .font-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.paper-popover .font-options button{padding:10px 3px;font-size:11px;background:#faf9f3;border-color:#e4e2d7;border-radius:8px;min-width:0}
.paper-popover .font-options button:last-child{grid-column:auto}
.paper-popover .font-options [data-note-font=hand]{font-size:14px}
.paper-details{border-top:1px solid #ece8dc;margin-top:22px;padding-top:14px}
.paper-details summary{font-size:10px;color:#a0a48e;cursor:pointer}
.paper-details .font-options{display:flex;margin:14px 0}
.paper-details .font-options button{flex:1}
.paper-details .decoration-options{gap:5px}
.paper-details .decoration-options button{background:transparent;font-size:10px;color:#9ba18e}
.photo-toolbar,.photo-settings{position:fixed;z-index:32;color:#7b856e;background:#fffdf7fa;border:1px solid #e0dfd2;box-shadow:0 5px 24px #56634318;font:12px var(--sans);backdrop-filter:blur(12px)}
.photo-toolbar{display:flex;align-items:center;gap:4px;border-radius:24px;padding:5px 8px}
.photo-toolbar[hidden],.photo-settings[hidden]{display:none!important}
.photo-toolbar button{background:transparent;color:#869074;border-radius:50%;font-size:12px;padding:5px 8px;min-width:28px;height:28px}
.photo-toolbar button:hover{background:#eef1e5}
.photo-toolbar .media-drag-handle{font-size:18px;cursor:grab;touch-action:none}
.photo-toolbar select{font:11px var(--sans);color:#829070;border:0;background:transparent;max-width:105px;padding:5px}
.photo-settings{width:258px;max-width:calc(100vw - 20px);max-height:calc(100dvh - 90px);overflow:auto;border-radius:14px;padding:17px}
.photo-settings header{display:flex;align-items:center;justify-content:space-between;padding-bottom:11px;margin-bottom:15px;border-bottom:1px solid #ece9df}
.photo-settings header button{font-size:21px;padding:0 3px;background:transparent;color:#a2a68f}
.photo-settings label{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:15px 0;font-size:11px;color:#929981}
.photo-settings input{width:140px;accent-color:#9cae86}
.photo-settings select{width:140px;padding:7px;border:1px solid #e1e3d5;border-radius:6px;background:#fafaf2;color:#849273;font:11px var(--sans)}
.page-layer-tools{border-radius:18px;padding:5px 8px;gap:4px;background:#fffdf7f5;border-color:#e1dfd2;box-shadow:0 5px 20px #56634316;flex-wrap:wrap;max-width:300px}
.page-layer-tools button{background:transparent;color:#859174}
.layer-floating-tools{position:fixed;z-index:33;top:auto;left:auto;transform:none;max-width:calc(100vw - 20px)}
.layer-floating-tools[hidden]{display:none!important}
.page-layer-tools:not(.show-more) .layer-secondary-action{display:none}
.page-layer-tools .layer-secondary-action{background:#eef0e633}
.page-layer-item[data-type=image][data-frame=rounded] .page-layer-art{overflow:hidden;border-radius:9px}
.page-layer-item[data-type=image]:is([data-frame=polaroid],[data-frame=tape]) .page-layer-art{background:#fffdf8;padding:10px 10px 22px;box-shadow:1px 4px 10px #75613e18}
.page-layer-item[data-type=image][data-frame=tape]:before{content:'';position:absolute;left:30%;width:40%;top:-8px;height:18px;background:#c8bd969e;z-index:1;pointer-events:none}
.page-layer-item[data-type=image]:not([data-ratio=original]) img{aspect-ratio:4/3;object-fit:cover}
.page-layer-item[data-type=image][data-ratio=square] img{aspect-ratio:1}
.page-layer-item[data-type=image][data-ratio=portrait] img{aspect-ratio:3/4}
/* The gallery gives the writing room to breathe, too. */
.page-intro{padding:40px 0 30px}
.page-intro h1{font-size:30px;letter-spacing:1px;color:#59604f}
.intro-copy{font-size:12px;letter-spacing:.5px;margin-top:10px;color:#a0a493}
.gallery-grid{column-gap:28px}
.note-card:not(.add-card){border-color:#e4e1d6;box-shadow:0 3px 12px #554b3607;border-radius:5px;margin-bottom:30px}
.note-card:not(.add-card):hover{box-shadow:0 6px 20px #554b3610;transform:translateY(-2px)}
.note-card .card-body{padding:18px 20px}
.card-title{font-size:18px;letter-spacing:.5px}
.card-copy{opacity:.78}
.card-date,.card-tags{opacity:.65}
.filter-row{margin-bottom:20px}
.space-design-button{background:transparent;border-color:transparent}
.filter-chip.active,.view-switch button.active{background:#e9ece2}
.view-switch{border-color:transparent}
.view-switch button{color:#a0a791}
.sidebar{background:#f0f0e9}
.sidebar-footer{border:0}
.sidebar-footer .status-dot{opacity:.5}
.new-note-button{background:#819076;font-size:12px}
.writing-cover>span{display:none}
.image-block .visual-photo,.page-layer-item:not([data-type=text]) .page-layer-art{touch-action:none}
.note-card[data-layout=postcard]:before{opacity:.4}
.note-card[data-layout=postcard]{box-shadow:0 3px 12px #554b3607}
@media(min-width:1280px){body.note-design-open .note-scene{padding-right:0}body.note-design-open .note-topbar{margin-right:0}}
@media(max-width:680px){
  .note-paper{margin:20px 12px 0;padding:30px 22px 40px}
  .note-title{font-size:27px}
  .note-scene .document-toolbar{position:sticky;top:57px;gap:1px;padding:7px 0;margin-bottom:27px}
  .document-toolbar button{padding:0 7px;font-size:11px}
  .format-toggle-label{display:none}
  .paper-popover.design-panel{left:auto;right:12px!important;top:64px;bottom:auto;width:min(304px,calc(100vw - 24px));max-height:calc(100dvh - 80px);padding:20px;border-radius:14px}
  .note-actions .save-state{display:none}
  .page-intro{padding:28px 0 23px}
  .page-intro h1{font-size:26px}
  .gallery-grid{column-gap:16px}
  .note-card .card-body{padding:12px}
  .card-title{font-size:16px}
  .page-layer-tools{max-width:240px}
}
body.dark .page-intro h1{color:var(--ink)}
body.dark .sidebar{background:var(--sidebar)}
body.dark .note-topbar{background:#282e24ef}
.preserved-text-range{background:#cbdab65c;border-radius:2px;box-shadow:0 0 0 1px #b9cba42e}
.insertion-marker{position:absolute;z-index:21;width:30px;height:30px;padding:0;border:1px dashed #9caf84;border-radius:50%;background:#f3f7e9dc;color:#8da274;font:19px/1 var(--sans);transform:translate(-7px,-7px);box-shadow:0 2px 8px #6e80521a}
.insertion-marker[hidden]{display:none}
.sticker-tray:not(.hidden){position:fixed;z-index:38;width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 110px);margin:0;box-shadow:0 10px 35px #54614325;background:#fffaf0f7;backdrop-filter:blur(12px)}
@media(max-width:680px){.sticker-tray:not(.hidden){width:auto!important;top:auto!important;left:10px!important;right:10px!important;bottom:10px!important}.insertion-marker{width:34px;height:34px}}

/* Clear entry points: writing styles and inserted content have separate drawers. */
.editor-popover{position:fixed;z-index:37;width:338px;max-height:calc(100dvh - 100px);overflow:auto;margin:0!important;border:1px solid #e2dfd0;border-radius:15px;padding:18px;background:#fffdf6fa;box-shadow:0 10px 38px #54614324;color:#7b876b;font:12px/1.6 var(--sans);backdrop-filter:blur(12px)}
.editor-popover.hidden{display:none}
.editor-popover-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;border-bottom:1px solid #ece8da;padding-bottom:11px}
.editor-popover-heading h2{font:13px var(--sans);font-weight:400;margin:0;color:#7b8969}
.editor-popover-heading>button{background:transparent;color:#a6a78f;font-size:21px;padding:0 2px;line-height:1}
.text-block-options,.text-align-options{display:flex;gap:7px}
.text-block-options button{flex:1;padding:9px 6px;background:#f7f7ec;color:#859174;border:1px solid #e3e5d4;border-radius:7px;font-size:11px}
.text-block-options button.is-active,.editor-popover button.is-active{background:#eaf0df;color:#65804f;border-color:#becbaa}
.text-block-options [data-command=heading]{font-size:14px;font-family:'LXGW WenKai',serif}
.text-emphasis{justify-content:space-between;margin:13px 0!important}
.text-emphasis button{font-size:12px!important;border-radius:6px;padding:6px 8px!important;min-width:32px}
.text-emphasis [data-command=clear]{font-size:10px!important;color:#a5a58e}
.text-font-fields{display:grid;grid-template-columns:1fr 70px 40px;gap:10px;margin:16px 0}
.text-font-fields label{font-size:10px;color:#a2a38d;display:flex;flex-direction:column;gap:7px}
.text-font-fields select{min-width:0;width:100%;border:1px solid #e2e4d3;border-radius:6px;padding:7px 4px;background:#fafaf1;color:#82916f;font:11px var(--sans)}
.text-font-fields input[type=color]{width:34px;height:31px;padding:3px;border:1px solid #e2e4d3;background:#fafaf1;border-radius:6px}
.text-align-options button{flex:1;background:transparent!important;color:#929d81;font-size:10px!important}
.editor-extra{border-top:1px solid #ece8da;margin-top:13px;padding-top:11px}
.editor-extra summary{font-size:10px;color:#a0a48e;cursor:pointer}
.editor-extra .format-row{margin-top:10px}
.insert-content-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.insert-content-grid button{padding:13px 9px;text-align:left;background:#f8f8ee;border:1px solid #e3e5d4;border-radius:9px;color:#7e8d6b}
.insert-content-grid button:hover{background:#edf2e3;border-color:#b9c8a6}
.insert-content-grid span{display:block;font-size:12px;margin-bottom:5px}
.insert-content-grid small{font-size:9px;line-height:1.6;color:#a3aa92}
.insert-secondary{display:flex;justify-content:space-between;gap:6px;margin-top:13px}
.insert-secondary button{background:transparent;color:#9ca68a;font-size:10px;padding:4px}
.placement-field{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#9ca68a;margin-top:10px}
.placement-field select{background:#fafaf1;border:1px solid #e2e4d3;border-radius:6px;padding:7px;color:#84936f;font:11px var(--sans)}
.illustration-options svg{width:100%;height:105px;flex-shrink:0}
.illustration-filters select{max-width:165px}

.photo-settings{width:280px;z-index:39;padding:17px;max-height:calc(100dvh - 100px)}
.photo-section-label{display:block;font-size:10px;color:#a1a58e;margin:14px 0 8px}
.photo-choice-options{display:flex;gap:5px}
.photo-choice-options button,.photo-direction-options button{flex:1;min-width:0;border:1px solid #e3e5d6;border-radius:6px;background:#f9f9ef;color:#909b7e;padding:7px 3px;font:10px var(--sans)}
.photo-choice-options button[aria-pressed=true]{background:#eaf0df;border-color:#b8caa0;color:#6d8553}
.photo-direction-options{display:flex;gap:6px;margin:15px 0}
.photo-crop-toggle{display:block;width:100%;padding:8px;background:#eef2e4;color:#82996b;border:1px solid #dae3cc;border-radius:7px;font-size:10px;margin:10px 0}
.photo-crop-toggle[aria-pressed=true]{background:#e1ebd4;color:#657f4f}
.photo-settings .photo-reset{display:block;margin:16px auto 0;border:0;background:transparent;color:#a2a58d;font-size:10px;padding:4px}
.photo-settings input[type=range]{appearance:none;-webkit-appearance:none;background:transparent;height:16px;width:140px}
.photo-settings input[type=range]::-webkit-slider-runnable-track{height:3px;background:#dfe5d2;border-radius:3px}
.photo-settings input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;margin-top:-4.5px;border-radius:50%;background:#9dad86;border:2px solid #fffdf5;box-shadow:0 1px 3px #7e8f6329}
.photo-settings label[hidden]{display:none}
.photo-placement-details{font-size:10px;color:#a1a58e;border-top:1px solid #ece8dc;margin-top:12px;padding-top:12px}
.photo-placement-details select{margin-top:10px;width:100%;padding:7px;border:1px solid #e1e4d2;border-radius:6px;background:#fafaf1;color:#8b9a76;font:11px var(--sans)}
.visual-photo[data-photo-cropping=true],.page-layer-art[data-photo-cropping=true]{position:relative;cursor:move!important;touch-action:none;outline:1px solid #9eaf89;outline-offset:3px}
[data-photo-cropping=true]:after{content:'';position:absolute;inset:0;pointer-events:none;background-image:linear-gradient(90deg,transparent 33%,#ffffffe0 33.2%,transparent 33.6%,transparent 66%,#ffffffe0 66.2%,transparent 66.6%),linear-gradient(transparent 33%,#ffffffe0 33.2%,transparent 33.6%,transparent 66%,#ffffffe0 66.2%,transparent 66.6%);border:1px solid #ffffffe0;z-index:2}
.page-layer-item[data-type=image] .page-layer-art{overflow:hidden;position:relative}
.photo-toolbar button[aria-pressed=true]{background:#e5edd9;color:#708b56}
@media(max-width:680px){
 .editor-popover{width:calc(100vw - 24px);max-height:65dvh;padding:17px 18px;border-radius:16px}
 .photo-settings{width:calc(100vw - 24px);max-width:none;max-height:64dvh;border-radius:16px;padding:17px 20px}
 .photo-settings header{margin-bottom:10px}.photo-choice-section{display:block}.photo-section-label{margin:10px 0 6px}
 .photo-settings .photo-placement-details{margin-top:10px}.illustration-options svg{height:85px}
 .document-toolbar{gap:0!important}.document-toolbar button{padding:0 5px!important;font-size:10px!important;min-width:26px}
 .illustration-filters{flex-wrap:wrap}.illustration-filters input{flex-basis:100%;width:100%}.illustration-filters select{flex:1;max-width:none}
}
