/* Keep the atelier style; make saving and the frequent ledger action easy to find. */
.workspace-sync-status{position:fixed;left:18px;bottom:16px;z-index:1100;display:flex;align-items:center;gap:8px;max-width:min(540px,calc(100vw - 36px));padding:7px 12px;border:1px solid #d4dfda;border-radius:14px;background:#f7faf8;color:#385a50;font-size:12px;box-shadow:0 2px 10px #152d2110}
.workspace-sync-status[hidden],.auth-locked .workspace-sync-status{display:none}
.workspace-sync-status[data-phase="error"],.workspace-sync-status[data-phase="conflict"]{background:#fff4e8;color:#7c3817;border-color:#d9b798}
.workspace-sync-status button{flex-shrink:0;min-height:36px;border:1px solid currentColor;border-radius:8px;background:transparent;color:inherit;padding:4px 9px;cursor:pointer}
.account-details-toggle{display:none}
.empty-action{display:inline-flex;align-items:center;justify-content:center;min-height:40px;margin-top:12px;padding:9px 16px;border:0;border-radius:999px;background:#3d533b;color:#fff;font:inherit;font-size:13px;cursor:pointer;box-shadow:0 6px 16px rgba(42,67,49,.12)}
.empty-action:focus-visible{outline:3px solid rgba(79,130,120,.28);outline-offset:3px}
.receipt-launch{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px;padding:10px 12px;border:1px solid #dce7df;border-radius:12px;background:#f5f8f5}.receipt-launch span{font-size:11px;color:#718078}.receipt-entry{width:auto;min-height:38px;margin:0;color:#315b54!important;background:#fff!important;font-weight:700;white-space:nowrap}
body.modal-open .bottombar,body.modal-open .fab-tx-add,body.modal-open .sch-fab{visibility:hidden;pointer-events:none}
body.viewer-open .bottombar,body.viewer-open .fab-tx-add,body.viewer-open .sch-fab{visibility:hidden;pointer-events:none}
.gallery-editor .node-thumb[role="button"]{cursor:zoom-in}.gallery-editor .node-thumb[role="button"]:focus-visible{outline:3px solid rgba(79,130,120,.42);outline-offset:2px}
.viewer-body{position:relative}.viewer-step{position:absolute;top:calc(50% - 44px);z-index:2;width:44px;height:56px;border:1px solid rgba(255,255,255,.2);border-radius:14px;background:rgba(18,18,17,.62);color:#fff;font-size:34px;line-height:1;cursor:pointer;backdrop-filter:blur(8px)}.viewer-step:disabled{opacity:.2;cursor:default}.viewer-prev{left:8px}.viewer-next{right:8px}
@media(max-width:600px){.viewer-step{position:fixed;top:42%;width:42px;height:54px}.viewer-prev{left:8px}.viewer-next{right:8px}}
.gallery-editor .node-time-field{grid-column:1/3;display:grid;gap:5px;font-size:11px;color:#617057}.gallery-editor .node-time-field>span{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}.gallery-editor .node-time-field .node-recorded-at{min-width:0;font-size:12px;padding:8px}.gallery-editor .node-time-now{border:1px solid #d7dfcf;border-radius:9px;background:#fff;color:#526c40;padding:7px 10px;font:inherit;font-size:11px;white-space:nowrap;cursor:pointer}.gallery-editor .node-time-field small{color:#91998b;font-weight:400}
.gallery-editor .node-name{grid-column:1/3}.gallery-editor .node-duration-field{grid-column:1/3;display:grid;grid-template-columns:minmax(0,1fr) 112px;gap:7px}.gallery-editor .node-duration-field .node-duration{grid-column:auto;grid-row:auto;width:100%}.gallery-editor .node-duration-mode{width:100%;min-width:0;border:1px solid #dce2d4;border-radius:8px;background:#fff;color:#64715d;padding:6px 8px;font:inherit;font-size:11px}
.gallery-editor .node-row-toolbar{grid-column:1/3;display:flex;align-items:center;gap:5px}.gallery-editor .node-index{margin-right:auto;color:#66745e;font-size:11px}.gallery-editor .node-row-toolbar button{width:30px;height:28px;border:1px solid #dce2d4;border-radius:8px;background:#fff;color:#526c40;cursor:pointer}.gallery-editor .node-row-toolbar button:disabled{opacity:.3;cursor:default}
@media(max-width:600px){.gallery-editor .node-row{grid-template-columns:78px minmax(0,1fr)!important}.gallery-editor .node-row-toolbar{grid-column:1/3;grid-row:1;padding-right:34px}.gallery-editor .node-thumb{grid-column:1!important;grid-row:2/4!important;width:78px!important;height:86px!important}.gallery-editor .node-name{grid-column:2!important;grid-row:2!important}.gallery-editor .node-duration-field{grid-column:2!important;grid-row:3!important;grid-template-columns:minmax(0,1fr) 108px}.gallery-editor .node-time-field{grid-column:1/3;grid-row:4}.gallery-editor .gallery-cover-choice{top:46px!important;left:17px!important}.gallery-editor .node-del{top:10px!important;right:10px!important}}
@media(max-width:600px){.viewer-thumbs{max-width:94vw;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;padding:4px 2px 8px;scroll-snap-type:x proximity}.viewer-thumbs img{flex:0 0 56px;scroll-snap-align:center}.viewer-info #viewer-node-info{margin-top:8px;font-size:12px;line-height:1.6}}
.backup-actions{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}
#backup-status{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;color:#315b54}
#tx-draft-discard{margin:0 0 12px}
#page-ledger .account-overview-head>.btn{color:#244b43;background:#f5faf7;border:1px solid #cbded4;min-height:36px}
#page-ledger .account-balance-card small{color:#e5efeb}
#page-ledger .account-edit{color:#fff;min-width:42px;min-height:36px}
#page-ledger .fab-tx-add{width:auto;min-width:112px;padding:0 18px;border-radius:28px;font-size:15px;right:24px;bottom:76px}
@media(max-width:620px){
 .workspace-sync-status{position:fixed;left:12px;right:12px;bottom:auto;top:12px;max-width:none;margin:0;flex-wrap:wrap}
 .workspace-sync-status[data-phase="error"],.workspace-sync-status[data-phase="conflict"]{position:fixed;left:8px;right:8px;top:8px;bottom:auto;margin:0;z-index:1100}
 #page-ledger .account-overview{padding:16px;margin-bottom:14px}
 #page-ledger .account-overview-head{gap:8px;flex-wrap:wrap;margin-bottom:8px}
 #page-ledger .account-overview-head>div{flex:1 1 100%}
 #page-ledger .account-overview-head>.btn{flex:1;font-size:12px}
 .account-details-toggle{display:block;color:#f1f7f4;background:transparent;border:0;text-decoration:underline;text-underline-offset:3px;min-height:40px;margin-left:auto;font-size:12px;cursor:pointer}
 #page-ledger .account-balance-grid{display:grid;grid-template-columns:1fr;gap:6px}
 #page-ledger .account-balance-grid:not(.accounts-expanded){display:none}
 #page-ledger .fab-tx-add{right:16px;bottom:calc(96px + env(safe-area-inset-bottom));min-height:46px;z-index:220}
 #page-ledger .stats-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 #page-ledger .stats-row .stat-card{padding:12px 8px}
 #page-ledger .stats-row .value{font-size:20px;overflow-wrap:anywhere}
 #page-ledger .card-head{flex-wrap:wrap;gap:8px}
 #page-ledger .card-head h2,#tx-manage-categories{flex-shrink:0;white-space:nowrap}
 #page-ledger .tx-filter-bar{flex:1 0 100%;flex-wrap:wrap}
 #page-ledger .tx-filter-bar select{flex:1;min-width:0}
}

/* Frequent actions remain above navigation and within the dialog viewport. */
:root{--mobile-nav-clearance:calc(100px + env(safe-area-inset-bottom,0px))}
.modal-body.tx-editor{display:flex;flex-direction:column;overflow:hidden;min-height:0;padding-bottom:12px}
.tx-editor-scroll{overflow-y:auto;min-height:0;overscroll-behavior:contain;padding-bottom:12px;scroll-padding-block:12px}
.tx-editor>.modal-foot{flex-shrink:0;margin:0;padding:12px 0 0;background:#fff}
.tx-editor>.modal-foot button{min-height:44px;flex:1}
.tx-prepay{margin:12px 0}.tx-prepay>summary{cursor:pointer;min-height:44px;padding:12px 0;color:#385a50}
.auth-register-toggle{border:0;background:transparent;color:#385a50;text-decoration:underline;min-height:44px;cursor:pointer;font:inherit;font-size:13px}
.auth-invite[hidden]{display:none!important}
.sync-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid #d4dfda;border-radius:999px;padding:5px 10px;background:#f7faf8;color:#385a50;font:inherit;font-size:11px;min-height:32px;cursor:pointer}
.sync-chip[data-phase="error"],.sync-chip[data-phase="conflict"],.sync-chip[data-phase="remote"]{background:#fff4e8;color:#7c3817}
.sync-chip[hidden]{display:none}
@media(max-width:768px){
 #page-ledger .fab-tx-add{bottom:var(--mobile-nav-clearance);z-index:510}
 #page-ledger{padding-bottom:calc(var(--mobile-nav-clearance) + 60px)}
 .modal{max-height:calc(100dvh - 28px)}
 .gallery-tools button,.gallery-eye{min-width:44px;min-height:44px}
 .order-page-head{flex-wrap:wrap;gap:10px}
}

.sync-summary{display:flex;justify-content:flex-end;margin:0 0 10px;min-height:0}.sync-summary:has(> #workspace-sync-chip[hidden]):not(:has(> .pet-entry)){display:none}.workspace-sync-status[data-phase="remote"]{background:#fff4e8;color:#7c3817;border-color:#d9b798}

/* A compact daily overview keeps the original studio panels in place. */
.at-daily-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 20px}
.at-daily-shortcuts button{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px;min-width:0;border:1px solid #dce3d6;border-radius:16px;background:#f7f9f3;color:#496049;padding:12px 16px;text-align:left;cursor:pointer;font:inherit}
.at-daily-shortcuts span{font-size:12px;overflow-wrap:anywhere}.at-daily-shortcuts strong{font-size:22px;font-weight:500}
.at-daily-shortcuts .has-reminder{background:#fbf2e8;border-color:#ead8c3;color:#805936}
.at-daily-shortcuts button:focus-visible,.st-empty-fold summary:focus-visible{outline:3px solid #7ca190;outline-offset:3px}
.st-empty-fold{margin:6px 0;border-bottom:1px solid #e1e5da}.st-empty-fold>summary{min-height:44px;display:list-item;padding:12px 4px;color:#65745f;font-size:12px;cursor:pointer}
.st-empty-message{margin:0;padding:4px 4px 14px;color:#687660;font-size:12px}
.st-empty-groups{margin-top:16px}.st-empty-groups:empty{display:none}
#schedule-tasks .st-empty-fold{margin:0;padding:0;border-top:0}
#schedule-tasks .st-empty-fold>summary{margin:0}
@media(max-width:600px){.at-daily-shortcuts{gap:7px}.at-daily-shortcuts button{padding:10px;gap:6px;flex-direction:column;align-items:flex-start}.at-daily-shortcuts strong{font-size:21px}.at-mainline-unset{min-height:0!important;padding:20px!important}.at-mainline-unset h2{font-size:24px;margin:12px 0}.at-mainline-unset .at-mainline-empty{display:none}.at-mainline-unset .at-goal-desc{margin-bottom:16px}.at-mainline-unset .at-tag{display:none}}
