/* Management surfaces share the table's controls, with quieter secondary actions. */
:root{--panel-bg:#203b34;--panel-edge:#7c9f8c66;--panel-soft:#b6cec1;--panel-gap:16px}
.home-view{gap:20px;margin-top:clamp(24px,5vh,60px)}
.home-view h1{font-size:clamp(30px,5vw,42px)}
.home-resume{display:flex;flex-direction:column;gap:18px;text-align:left;padding:22px;border-color:#87ae96;background:#173e32;box-shadow:0 8px 28px #072c2333}
#home-progress{order:-1;line-height:1.6;color:var(--panel-soft);font-size:14px;overflow-wrap:anywhere}
#home-progress>strong{display:block;color:var(--ui-text);font-size:20px;margin-bottom:10px}
.progress-tags{display:flex;flex-wrap:wrap;gap:8px}
.progress-tags>span{padding:3px 8px;background:#092c2666;border:1px solid #94b3a333;border-radius:5px;font-size:13px;white-space:nowrap}
.home-links{gap:12px}.home-links button{min-height:46px;color:var(--ui-text)}
.home-view #home-status{margin:0;padding:12px 0;border-top:1px solid #9abb9e33}
.at-home footer #save-status{display:none}
#modal:not(.shop-dialog){width:min(780px,calc(100vw - 32px));max-height:90dvh;background:var(--panel-bg);padding:0}
#modal:not(.shop-dialog) .modal-inner{padding:0 24px 24px}
#modal:not(.shop-dialog) .modal-header{position:sticky;top:0;z-index:4;isolation:isolate;display:flex;gap:12px;align-items:center;margin:0 -24px 20px;padding:18px 24px;background:var(--panel-bg);border-bottom:1px solid var(--panel-edge)}
.modal-header h2{flex:1;min-width:0;overflow-wrap:anywhere;font-size:24px;line-height:1.3}
body #dialog-home{font-size:14px;padding:8px 10px;min-height:40px;white-space:nowrap;color:var(--ui-text);background:var(--control-face)}
#modal p{line-height:1.65;font-size:16px}#modal p.muted{font-size:14px;color:var(--panel-soft)}
#modal .modal-actions{gap:10px;flex-wrap:wrap;margin-top:18px;margin-bottom:18px}
body #modal .save-row{background:#172f29;border:1px solid var(--panel-edge);border-radius:10px;padding:16px;gap:9px;min-width:0;box-shadow:none;margin:0}
.save-row>strong{font-size:17px;line-height:1.5;overflow-wrap:anywhere}
.save-row>small{line-height:1.65;overflow-wrap:anywhere;color:var(--panel-soft)}
.save-row>span{line-height:1.6;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.save-row>div:not(.device-heading){display:flex;flex-wrap:wrap;gap:8px;align-items:center}
body #modal .save-row button{margin:0;min-height:40px;padding:9px 13px;font-size:14px}
body #modal .primary-control{background:var(--ui-blue);color:var(--ui-text);border-color:#9fcee866}
body #modal :is(.danger-control,[data-save-action=delete],[data-cloud-delete],[data-session-revoke],#revoke-others){background:transparent;color:#ffc0b7;border-color:#ba847566;box-shadow:none}
body #modal [data-save-action=delete]{margin-left:auto}
.account-identity{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;margin:16px 0}.account-identity strong{font-size:20px;overflow-wrap:anywhere}.account-identity span{font-size:14px;color:var(--panel-soft)}
#sync-live{padding:14px 16px;border:1px solid var(--panel-edge);border-left:4px solid #a3c6b0;border-radius:7px;background:#102c25;font-size:14px!important;line-height:1.6;margin:0 0 16px;overflow-wrap:anywhere}
#sync-live:empty{display:none}#sync-live[data-state=conflict],#sync-live[data-state=pending],#sync-live[data-state=remote]{border-left-color:#ebc16e}#sync-live[data-state=error]{border-left-color:#f08c85}#sync-live[data-state=syncing]{border-left-color:#78bfe9}
details.sync-scope{margin:10px 0;padding:0;border:0;background:none;border-bottom:1px solid var(--panel-edge);border-radius:0}
#modal details>summary{font-size:14px;line-height:1.5;cursor:pointer;min-height:44px;padding:12px 0;color:#dfd9bd}
#modal details>summary:focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px;border-radius:4px}
#modal .sync-scope p{font-size:14px;margin:4px 0 14px;color:var(--panel-soft)}
body #modal .sync-result{background:#1b382d;border-color:var(--panel-edge);padding:16px;margin:16px 0 24px}
#modal .sync-result h3{font-size:17px}#modal .sync-result p{font-size:14px}#modal .sync-result .save-row{margin-block:8px}
#modal .section-title{display:flex;align-items:center;gap:10px;border-top:1px solid var(--panel-edge);padding-top:22px;margin:24px 0 14px;font-size:19px}
.section-title small{font-size:13px;color:var(--panel-soft);font-weight:400}
#modal .quiet-status{font-size:14px;color:var(--panel-soft);padding:12px 0;margin:12px 0}
#modal .empty-state{font-size:15px;text-align:center;padding:24px 16px;color:var(--panel-soft);border:1px dashed var(--panel-edge);border-radius:10px}
#modal .pending-list{gap:12px}.record-id{font-size:12px;overflow-wrap:anywhere}.device-heading{align-items:flex-start}.device-heading strong{line-height:1.5;overflow-wrap:anywhere}.device-heading button{flex:none}.device-list details .save-row{margin-top:8px!important}
@media(max-width:700px){
 .home-view{gap:14px}.home-resume{padding:18px}.home-art{margin-bottom:0}.home-links{gap:10px}
 #modal:not(.shop-dialog){width:calc(100vw - 16px);max-height:94dvh}
 #modal:not(.shop-dialog) .modal-inner{padding:0 16px 20px}
 #modal:not(.shop-dialog) .modal-header{margin:0 -16px 16px;padding:12px 16px;gap:8px}
 .modal-header h2{font-size:20px}body #dialog-home{padding:8px;font-size:13px;min-height:44px}
 #modal .modal-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body #modal .modal-actions .action{min-width:0;width:100%;min-height:44px;padding:10px;font-size:14px}
 body #modal .save-row{padding:14px}body #modal .save-row button{min-height:44px;flex-grow:1}
 body #modal .device-heading button{flex-grow:0}#modal>.toast{right:12px;max-width:calc(100% - 24px)}
}
/* Primary actions stay visible; metadata and maintenance live behind disclosure. */
#modal .secondary-menu{min-width:0;margin:12px 0;border:0;background:transparent}
#modal .secondary-menu>summary{color:var(--panel-soft);font-size:14px}
#modal .secondary-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 14px}
body #modal .secondary-actions button{min-height:40px;padding:9px 12px;background:var(--control-face);color:var(--ui-text);font-size:14px}
#modal .record-actions{display:grid!important;grid-template-columns:auto 1fr;align-items:start;gap:12px!important}
#modal .record-menu{margin:0;min-width:0}#modal .record-menu>summary{min-height:40px;padding:9px 8px;text-align:right}
#modal .record-menu[open]{grid-column:1/-1}#modal .record-menu[open]>summary{text-align:left;padding-inline:0}
#modal .record-menu p{font-size:14px;color:var(--panel-soft)}
#modal .account-primary{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}#modal .account-primary .action{min-height:44px;padding:12px 16px}
#modal .sync-result{padding:0 14px!important;background:transparent!important;border-color:var(--panel-edge)!important;margin:16px 0!important}
#modal .sync-result>summary{color:var(--ui-text);font-size:14px;line-height:1.7;padding:12px 0;overflow-wrap:anywhere}
.home-view{margin-top:clamp(32px,8vh,90px)}.home-view h1{margin-bottom:8px}
@media(max-width:700px){body #modal .secondary-actions button{min-height:44px}#modal .record-menu>summary{min-height:44px}.home-view{margin-top:32px}}
