/* No visible source-art frame before its shadow-free decode is ready. */
.shadow-pending{visibility:hidden!important}.paper:has(>.paper-art.shadow-pending)>.reflow-art{visibility:hidden!important}
.paper,.paper-art,.reflow-art,.project,.mobile-paper-snapshot{filter:none!important;box-shadow:none!important}.paper::before,.paper::after{box-shadow:none!important;filter:none!important}
.bg-tool svg{color:#997718}.bg-tool svg path{fill:#ffe36b;stroke:#997718}.bg-tool{position:relative}.bg-tool:after{content:'';position:absolute;bottom:3px;width:18px;height:3px;background:#ffe36b;border-radius:2px}
/* Title safe bands; full font and same left edge for the body. */
.project[data-title-band=window] .paper-head{top:9.2%!important;left:11%!important;right:11%!important}
.project[data-title-band=window][data-title-rows=long] .paper-head{top:4.8%!important;left:28%!important;right:28%!important}
/* Picker stays grouped but shows more choices per screen. */
.paper-finder .finder-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:9px}.paper-finder .finder-tile img{height:112px!important;max-height:112px!important}.paper-finder .finder-choose{padding:8px 5px!important}.paper-finder .finder-choose span{font-size:13px!important;line-height:1.5}.paper-finder .finder-star{width:28px!important;height:28px!important;font-size:18px!important;top:4px!important;right:4px!important}.finder-theme-group{margin-bottom:22px}
@media(max-width:700px){.paper-finder .finder-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.paper-finder .finder-tile img{height:87px!important}.paper-finder .finder-choose span{font-size:12px!important}.paper-finder .finder-lengths{width:auto}.paper-finder .finder-lengths button{padding:5px 8px}.paper-finder{padding:12px!important}.finder-theme-heading h3{font-size:14px}.paper-finder .finder-families,.paper-finder .finder-colors{gap:5px}.paper-finder .finder-families button,.paper-finder .finder-colors button{padding:5px 7px!important;font-size:12px!important}}
.finder-lengths button{white-space:nowrap;min-width:5.2em}.finder-organize-row{align-items:center}

.archive-day-drawer .archive-row,#dayArchive .archive-row{padding:8px 11px!important;margin:0!important;min-height:0!important;gap:3px!important;line-height:1.5!important;border-radius:9px!important}
.archive-day-drawer #dayArchive{display:grid;gap:7px!important}.archive-day-drawer .archive-row .event-title{font-size:14px!important;line-height:1.5!important;margin:0!important}.archive-day-drawer .archive-row .event-project-label{font-size:11px!important;line-height:14px!important;margin:0!important}
#calendarGrid .calendar-event-chip,#fullMonthGrid .calendar-event-chip{padding:3px 6px!important}#calendarGrid .calendar-events,#fullMonthGrid .calendar-events{gap:4px!important}#calendarGrid .calendar-event-chip .event-project-label,#fullMonthGrid .calendar-event-chip .event-project-label{height:12px!important;line-height:12px!important;margin-bottom:1px!important}#calendarGrid .calendar-event-chip .event-title,#fullMonthGrid .calendar-event-chip .event-title{font-size:13px!important;line-height:18px!important;max-height:36px!important}
.mobile-calendar .mobile-record-card{padding:7px 9px!important;min-height:0!important;gap:3px!important;margin:0 0 6px!important}.mobile-calendar .mobile-record-card>small{margin-bottom:1px!important;line-height:14px!important}.mobile-calendar .mobile-record-card>strong{line-height:1.5!important}.mobile-month-entry{padding:1px 2px!important;margin:1px 0!important}
.paper-finder .finder-grid{grid-template-columns:repeat(auto-fill,minmax(116px,1fr));gap:7px}.paper-finder .finder-tile img{height:78px!important;max-height:78px!important}.paper-finder .finder-choose{padding:6px 4px!important}.paper-finder .finder-star{width:26px!important;height:26px!important;font-size:17px!important;top:3px!important;right:3px!important}.paper-finder .finder-theme-heading{margin-bottom:7px!important}.paper-finder .finder-theme-group{margin-bottom:16px!important}.paper-finder .finder-choose span{font-size:12px!important;line-height:1.4!important;margin:4px 0 0!important}.custom-paper-caption{display:block;font:11px/1.5 system-ui;color:var(--muted);margin-top:2px}
@media(max-width:700px){.paper-finder .finder-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.paper-finder .finder-tile img{height:64px!important}.paper-finder .finder-choose{padding:5px 3px!important}}
@media(min-width:375px) and (max-width:700px){.paper-finder .finder-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Body defaults to left; explicit paragraph alignment remains a user choice. */
#projects .write-area,#projects .entry,#projects .entry-text{text-align:left}#projects .entry-text[data-note-align=left]{text-align:left!important}#projects .entry-text[data-note-align=center]{text-align:center!important}#projects .entry-text[data-note-align=right]{text-align:right!important}
.archive-row{padding:7px 10px!important;min-height:0!important;gap:3px!important;margin:0 0 6px!important;line-height:1.45!important}.archive-row .event-project-label{line-height:14px!important;margin:0!important;font-size:11px!important}.archive-row .event-title,.mobile-record-card .er-title-ink{line-height:1.45!important}.mobile-record-card{height:auto!important}
.alignment-tools{position:relative;display:inline-flex;align-items:center}.alignment-pop{position:absolute;z-index:50;left:0;top:calc(100% + 5px);display:flex;background:var(--bar);border:1px solid var(--border);border-radius:10px;padding:5px;gap:4px}.alignment-pop[hidden]{display:none!important}.alignment-pop button{display:flex;align-items:center;justify-content:center;gap:4px;padding:7px 8px;background:var(--bar);color:var(--ink);border:0;border-radius:7px;font:12px system-ui;white-space:nowrap;min-height:38px}.alignment-pop button[aria-pressed=true]{background:var(--tint);color:var(--accent-dark)}.alignment-pop svg,.alignment-tool svg,.bold-tool svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.bold-tool svg{stroke-width:2.8}.title-format-mode .alignment-tools{display:none!important}
@media(max-width:700px){body .mobile-accessory .mobile-format-panel .font-picker{grid-column:3!important}body .mobile-accessory .mobile-format-panel .picture-tool{grid-column:4!important}body .mobile-accessory .mobile-format-panel .bold-tool{grid-column:5!important}.mobile-format-panel>.alignment-tools{grid-column:6;grid-row:1;min-width:0;display:flex}.mobile-format-panel .alignment-pop{top:auto;bottom:calc(100% + 8px);left:auto;right:0}.mobile-format-panel .alignment-pop button{min-width:65px}.mobile-format-panel .alignment-pop button svg{width:17px;height:17px}.mobile-format-panel .alignment-tool{width:100%!important}}
body .toolbar .actions #cloudSyncBtn{display:none!important}
.dock{gap:5px!important;padding:7px 10px!important}.dock button{display:grid!important;grid-template-rows:24px 14px;place-items:center!important;gap:2px!important;min-width:45px!important;height:auto!important;padding:3px 5px!important}.dock .dock-label{font:11px/14px system-ui;color:inherit;white-space:nowrap}.dock button[aria-current=page]{color:var(--accent-dark);background:var(--tint);border-radius:9px}.my-page{max-width:620px;margin:0 auto;padding:18px 0 40px}.my-page-heading{display:flex;align-items:center;gap:14px}.my-page h1{font-size:24px}.my-account{padding:28px 22px;border:1px solid var(--border);background:var(--bar);border-radius:18px;text-align:center;margin-top:14px}.my-avatar{margin:auto;width:64px;height:64px;color:var(--accent-dark);background:var(--tint);padding:10px;border-radius:50%}.my-avatar svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.my-account h2{font:600 21px/1.5 system-ui;margin:18px 0 8px}.my-status,.my-local{font:14px/1.6 system-ui;color:var(--muted)}.my-account .my-login{font:16px/1.5 system-ui;min-height:44px;border:1px solid var(--accent);border-radius:10px;padding:9px 28px;background:var(--accent-dark);color:#fff;cursor:pointer;margin:14px 0}.my-local{margin:10px 0 0;font-size:12px}
body[data-calendar-entry-plan=A] #archiveViewToggle,body[data-calendar-entry-plan=A] #archiveViewMenu,body[data-calendar-entry-plan=A] .mobile-calendar-modes{display:none!important}
.calendar-entry{font:13px/1.5 system-ui;position:relative;display:flex;gap:5px;align-items:center}.calendar-entry button{min-height:36px;padding:6px 11px;border:1px solid var(--border);border-radius:8px;color:var(--ink);background:var(--bar);font:inherit;cursor:pointer;white-space:nowrap}.calendar-entry button[aria-pressed=true]{background:var(--tint);color:var(--accent-dark);border-color:var(--accent)}.calendar-entry-menu{position:absolute;z-index:100;right:0;top:calc(100% + 5px);display:grid;min-width:120px;padding:5px;background:var(--bar);border:1px solid var(--border);border-radius:11px}.calendar-entry-menu[hidden]{display:none!important}.calendar-entry-menu button{text-align:left;border:0}@media(max-width:700px){.mobile-calendar-top{flex-wrap:wrap}.mobile-calendar-top h2{font-size:17px;flex:1;min-width:95px}.mobile-calendar-top .calendar-entry{margin:0}.mobile-calendar-top .calendar-entry button{padding:5px 8px;font-size:12px}.mobile-calendar-top>button{padding:4px!important}}

.mobile-calendar .mobile-record-card{border-bottom:0!important}
.archive-day-drawer .archive-row,#dayArchive .archive-row,.mobile-calendar .mobile-record-card{padding:5px 9px!important;gap:2px!important;min-height:44px!important}.archive-row{padding:5px 9px!important;gap:2px!important;min-height:44px!important;margin-bottom:5px!important}
/* The current record overlay is a different card path from the legacy drawer. */
.er-day-list{gap:6px!important}.er-day-card{padding:6px 10px!important;min-height:44px!important;border-radius:9px!important}.er-card-project{margin:0 0 2px!important;line-height:14px!important}.er-card-title{line-height:1.45!important}.er-day-count{margin-bottom:14px!important}.er-topline{margin-bottom:18px!important}
.er-day-card{padding:5px 10px!important}.er-card-title{display:block!important}.alignment-pop{left:auto;right:0;max-width:calc(100vw - 16px)}
/* Picker labels: six CJK characters fit, descriptions stay on one line. */
.paper-finder .finder-choose{min-width:0;width:100%}.paper-finder .finder-choose>span{display:block;white-space:nowrap!important;font-size:11px!important;line-height:17px!important;letter-spacing:0!important;overflow:hidden;text-overflow:ellipsis;width:100%;min-width:0}.paper-finder .custom-paper-caption{white-space:nowrap;font-size:10px;line-height:15px;letter-spacing:0;overflow:hidden;text-overflow:ellipsis}
@media(min-width:701px){.paper-finder .finder-choose>span{font-size:12px!important}.paper-finder .custom-paper-caption{font-size:11px}}
/* Compact event form; checkbox controls never inherit full-width input sizing. */
#calendarCreateBackdrop{padding:10px}.calendar-create-dialog{box-sizing:border-box;width:min(430px,100%);max-height:calc(100dvh - 20px);overflow:auto;padding:13px!important}.calendar-create-head{align-items:start;margin-bottom:8px;gap:8px}.calendar-create-head h2{font-size:19px!important;line-height:24px;margin:0!important}.calendar-create-head p{font-size:12px!important;line-height:17px;margin:3px 0 0!important}.calendar-create-head button{width:30px;height:30px;padding:0;line-height:1}.calendar-form-field{margin:8px 0!important}.calendar-create-dialog label,.calendar-form-label{font-size:12px!important;line-height:17px!important;margin-bottom:4px!important}.calendar-create-dialog input:not([type=checkbox]):not([type=hidden]),.calendar-create-dialog select,.calendar-datetime-button{box-sizing:border-box;min-height:38px;padding:7px 10px!important;font-size:14px!important;line-height:21px}.calendar-create-dialog textarea{box-sizing:border-box;min-height:44px!important;height:44px!important;padding:7px 10px;font-size:14px!important;line-height:21px}.calendar-color-options{gap:4px!important}.calendar-color-options button{padding:4px 7px!important;min-height:28px!important;font-size:12px!important;line-height:18px!important;white-space:nowrap;gap:5px!important}.calendar-color-options button i{width:8px!important;height:8px!important}.calendar-event-flags{margin:8px 0!important;gap:22px}.calendar-event-flags label{margin:0!important;min-height:25px}.calendar-create-dialog input[type=checkbox]{appearance:auto;width:16px!important;height:16px!important;min-height:0!important;flex:0 0 16px;padding:0!important;margin:0!important}.calendar-create-dialog fieldset.calendar-form-field{padding:6px 9px 8px!important}.calendar-create-dialog fieldset>label{justify-content:flex-start;white-space:nowrap;margin:0!important;min-height:24px}.calendar-create-actions{margin-top:10px!important;gap:8px}.calendar-create-actions button{padding:7px 13px!important;min-height:38px;font-size:14px}.calendar-create-dialog #calendarReminderOptions[hidden]{display:none!important}
/* Keep records readable, remove excess wrapper spacing in every visible path. */
.mobile-calendar .mobile-record-card,.archive-day-drawer .archive-row,#dayArchive .archive-row,.archive-row{padding:4px 9px!important;gap:1px!important;margin-bottom:3px!important;min-height:44px!important}.er-day-list{gap:4px!important}.er-day-card{padding:4px 10px!important;min-height:44px!important}.er-card-project{margin-bottom:1px!important}.er-day-count{margin-bottom:10px!important}.er-topline{margin-bottom:12px!important}.mobile-day-timeline .mobile-record-row{padding-block:3px!important;border-bottom:0!important}
.dust-project-card.arrange-before,.dust-project-card.arrange-after{outline:2px solid var(--accent)!important;outline-offset:-2px;box-shadow:none!important}

.account-auth{border:1px solid var(--border);border-radius:20px;max-width:420px;width:calc(100% - 24px);padding:28px;box-sizing:border-box;background:#fff;color:#45403d;font:16px/1.6 system-ui}.account-auth::backdrop{background:#453d4333}.account-auth h2{font-size:24px;margin:16px 0 4px}.account-auth p{margin:0 0 18px;color:#766d72;font-size:14px}.account-auth label{display:block;font-size:14px;margin-top:12px}.account-auth input{display:block;width:100%;box-sizing:border-box;min-height:44px;border:1px solid #d8cbd1;border-radius:9px;padding:9px;font:16px system-ui;margin-top:6px}.account-auth button{min-height:40px;font:14px system-ui;cursor:pointer;border:1px solid #d8cbd1;background:white;border-radius:9px;padding:8px 12px}.account-auth .primary{width:100%;background:#9d6179;color:white;border:0;margin:18px 0 10px}.account-auth .auth-close{float:right}.account-auth .auth-links{display:flex;justify-content:space-between;margin-bottom:14px}.account-auth .guest{width:100%}.account-auth .error{color:#a83f53;min-height:20px;margin:6px 0}
.my-logout{display:block;margin:8px auto}.my-logout[hidden]{display:none!important}.account-auth .error{overflow-wrap:anywhere}.account-auth .auth-links[hidden]{display:none!important}
.finder-results{display:block}.finder-theme-group{display:block}.finder-theme-heading{display:flex!important;justify-content:space-between;align-items:center;gap:12px;margin:12px 0 7px!important}.finder-theme-heading h3{font-size:14px;margin:0}.finder-theme-heading small{font-size:11px;color:var(--muted);white-space:nowrap}.finder-organize-row{display:flex;flex-wrap:wrap;gap:8px;margin:9px 0}.finder-series{display:flex;align-items:center;gap:6px;margin:0!important;font-size:12px}.finder-series select{width:auto;max-width:160px}.finder-lengths{display:flex;gap:5px}.finder-lengths button{border:1px solid var(--border);background:var(--bar);color:var(--ink);font:12px/1.4 inherit;padding:6px 8px;border-radius:9px;cursor:pointer}.finder-lengths button[aria-pressed=true]{background:var(--tint);border-color:var(--accent)}
.format-tools .format-action{display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:0 0 auto;min-width:76px;width:auto;padding:4px 7px;white-space:nowrap;font-size:11px}.format-action svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.format-action[aria-pressed=true]{background:var(--tint);color:var(--accent-dark);outline:1px solid var(--accent)}
@media(max-width:700px){body .mobile-accessory .mobile-format-panel>.whole-format-clear{grid-row:3!important;grid-column:1/4!important}body .mobile-accessory .mobile-format-panel>.format-brush{grid-row:3!important;grid-column:4/7!important}body .mobile-accessory .mobile-format-panel>.format-action{width:100%!important;min-height:30px!important;padding:3px 6px!important}.title-format-mode .format-action{display:none!important}}

#view-archive .view-head>div:has(>.calendar-entry){display:grid;grid-template-columns:auto auto;align-items:center;column-gap:10px}#view-archive .view-head>div:has(>.calendar-entry)>.view-sub{grid-column:1/-1}

/* Compact, legible icon-only controls; names are in native hover/focus labels. */
.bold-tool svg{width:14px!important;height:14px!important;stroke-width:2.5!important}.item-tool svg,.format-action svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.format-tools .format-action{min-width:30px!important;width:30px!important;flex:0 0 30px;padding:4px!important}.format-action>span{display:none!important}.format-tools .item-tool{min-width:30px!important;flex:0 0 30px!important}.paper{transition:none!important}
@media(max-width:700px){body .mobile-accessory .mobile-format-panel>.format-action{width:100%!important;min-width:0!important}body .dock{bottom:0!important;top:auto!important;box-sizing:border-box;height:auto!important;min-height:54px;padding:3px 7px max(3px,env(safe-area-inset-bottom))!important;gap:2px!important;border-radius:13px 13px 0 0;box-shadow:none}.dock button{padding:2px 4px!important;min-width:44px!important;grid-template-rows:22px 13px!important;gap:1px!important}.dock .dock-label{font-size:10px!important;line-height:13px!important}.dock svg{width:20px!important;height:20px!important}}
/* A native canvas is the only painted full-card content. The source DOM never paints. */
@media(max-width:700px){body:not(.mobile-reading) #projects>.project:not(.display-title,.display-letter,.display-dot)>.paper{opacity:0!important;pointer-events:none!important}}
.entry.item>.check,.entry.item>.item-grip{touch-action:none;-webkit-user-select:none;user-select:none}.entry.item.todo-sort-ready>.item-grip{display:flex;left:0;top:0;width:20px;min-height:26px;pointer-events:none;border-radius:5px;background:var(--bar)}.entry.item.todo-sort-ready>.check{visibility:hidden}.todo-dragging{opacity:.4}.todo-drop{outline:1.5px solid var(--accent);outline-offset:1px}.todo-drag-ghost{padding:4px 8px;border:1px solid var(--accent);border-radius:7px;background:var(--bar);color:var(--ink);opacity:.95}.todo-drag-ghost .item-grip,.todo-drag-ghost .check{display:none!important}
@media(max-width:700px){body .mobile-reader-note .mobile-accessory .mobile-format-panel.mobile-format-open{grid-template-columns:repeat(7,minmax(0,1fr))!important;grid-template-rows:40px 40px!important}body .mobile-accessory .mobile-format-panel>.whole-format-clear{grid-row:2!important;grid-column:7!important}body .mobile-accessory .mobile-format-panel>.format-brush{grid-row:1!important;grid-column:7!important}}

/* v26: the visible control row sits within four pixels of the visible browser edge. */
@media(max-width:700px){body .dock{padding:2px 6px!important;min-height:45px!important}body.mobile-reading .mobile-reader-note .mobile-accessory{padding-bottom:0!important;box-shadow:none}body.mobile-reading .mobile-reader-note .mobile-accessory .mobile-format-panel.mobile-format-open{padding:3px 6px!important;gap:2px!important;grid-template-rows:34px 34px!important;border-bottom:0!important;align-items:center}body .mobile-accessory .mobile-format-panel .tool{height:32px!important}body .mobile-accessory .mobile-format-panel .clear-format-tool{grid-column:6!important;width:100%!important;justify-self:stretch!important}.mobile-accessory .clear-scope-menu{position:fixed!important;left:auto!important;right:6px!important;top:auto!important;bottom:calc(var(--accessory-bottom,75px) + 4px)!important}}
.calendar-entry .calendar-review-button{padding:5px 7px;border:1px solid var(--border);border-radius:8px;background:var(--bar);color:var(--ink);font:inherit;white-space:nowrap;min-height:32px}.calendar-entry .calendar-review-button:hover{background:var(--tint)}
.format-tools .whole-format-clear{display:none!important}.clear-scope-tools{position:relative;display:inline-flex;align-items:center}.clear-scope-menu{position:absolute;right:0;top:calc(100% + 6px);width:220px;z-index:600;background:var(--bar);border:1px solid var(--border);border-radius:10px;padding:5px;box-shadow:0 4px 15px #0001}.clear-scope-menu[hidden]{display:none!important}.clear-scope-menu button{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;border:0;border-radius:6px;background:var(--bar);color:var(--ink);text-align:left;padding:7px 9px;font:13px/1.5 system-ui}.clear-scope-menu button:hover{background:var(--tint)}.clear-scope-menu svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}.clear-format-tool svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.clear-format-tool{font-size:0!important}

/* Actual inner icon centres, not just the grid wrapper. */
@media(max-width:700px){body .mobile-accessory .mobile-format-panel>.alignment-tools{justify-content:center;min-width:0}body .mobile-accessory .mobile-format-panel .alignment-tools>.alignment-tool{flex:1 1 auto!important;min-width:0!important;width:100%!important;display:flex!important;justify-content:center!important;align-items:center!important;padding:4px!important}body .mobile-accessory .alignment-tool svg,body .mobile-accessory .clear-format-tool svg{display:block;flex-shrink:0}}
