/* Detail controls are informational dialogs, never hidden card filters. */
.summary .metric{position:relative}
.summary .metric>span:first-child{padding-right:18px}
.summary .metric .spv-metric-help{position:absolute;right:8px;top:9px;padding:0;min-height:0;width:17px;height:17px;display:grid;place-items:center;border:1px solid #9eafbc;border-radius:50%;font-size:11px;line-height:1;color:#425970;background:#fff8;pointer-events:none}
.summary .metric small{display:block!important;font-size:10px!important;min-height:1.3em;margin-top:7px;line-height:1.3;color:#526477}
.summary .metric[role=button]:active{transform:none!important}
.summary .metric[role=button]:focus:not(:focus-visible){outline:none!important}
.summary .metric[role=button][aria-pressed]{border-color:inherit}
.spv-summary-details{display:grid;gap:12px;min-width:0}
.spv-summary-details>p{margin:0;line-height:1.55}
.spv-detail-meta{color:#526477;font-size:13px}
.spv-detail-item{border:1px solid #d6e0e8;background:#f6f9fb;border-radius:12px;padding:13px;display:grid;gap:8px;overflow-wrap:anywhere}
.spv-detail-item p{margin:0;line-height:1.45}
.spv-detail-item .button{justify-self:start;min-height:42px}
.spv-detail-note{border-left:3px solid #d5a457;padding-left:9px;color:#526477;white-space:pre-wrap}
.spv-detail-empty{padding:14px;border:1px solid #b8dfc3;border-radius:10px;background:#eaf7ee}
.spv-summary-details>.button{min-height:44px;white-space:normal}
.spv-compare-table{width:100%;border-collapse:collapse;font-size:13px}
.spv-compare-table td{padding:9px 6px;border-bottom:1px solid #d6e0e8;text-align:left;overflow-wrap:anywhere}
.spv-compare-table tr:first-child{font-weight:750;background:#edf3f7}
.spv-publication-status{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 20px 12px;padding:9px 12px;background:#edf3f7;border:1px solid #d6e0e8;border-radius:10px;font-size:12px;font-weight:650}
.spv-publication-status[data-state=published]{background:#eaf7ee;border-color:#b8dfc3}
.spv-publication-status[data-state=changed]{background:#fff5de;border-color:#e4c78b}
.spv-help-button{display:inline-grid!important;place-items:center;flex:0 0 auto;width:30px;min-width:30px;height:30px;min-height:30px;padding:0;border:1px solid #a8bac9;border-radius:50%;background:#fff;color:#294255;font-size:16px;font-weight:750;line-height:1}
.spv-history-actions{display:flex!important;gap:8px;align-items:center;padding:0 20px 12px}
.spv-history-actions #undo,.spv-history-actions #redo{display:inline-flex!important;flex:1 1 0;justify-content:center;align-items:center;min-height:42px;padding:8px 12px;font-size:13px}
.spv-history-actions #undo:disabled,.spv-history-actions #redo:disabled{opacity:.42;cursor:default}
#spv-save-indicator.spv-explainable-save{cursor:pointer;white-space:normal;line-height:1.25;position:relative;padding-right:18px}
#spv-save-indicator.spv-explainable-save::after{content:'?';position:absolute;right:5px;top:5px;display:grid;place-items:center;width:13px;height:13px;border:1px solid currentColor;border-radius:50%;font-size:9px;line-height:1}
#spv-save-indicator[data-state*="Not Saved"],#spv-save-indicator[data-state*="not synced"],#spv-save-indicator[data-state*="Device Only"]{background:#fff4df;border-color:#e4c78b;color:#835312}
#spv-save-indicator[data-state*="Saving"]{background:#eaf2fb;border-color:#b8cfe7;color:#295b82}
@media(max-width:700px){.spv-publication-status{margin-left:12px;margin-right:12px}.spv-history-actions{padding-left:12px;padding-right:12px}.summary .metric .spv-metric-help{right:5px;top:7px;width:15px;height:15px;font-size:10px}}

#spv-save-indicator[data-state="Saved on Device"],#spv-save-indicator[data-state*="unavailable"]{background:#fff4df;border-color:#e4c78b;color:#835312}
.spv-history-actions{grid-column:1/-1;box-sizing:border-box;width:100%}

/* v1.19: visible action icons, optional view/search below the plan, week picker. */
.spv-action-icon{display:inline-block;width:21px;height:21px;min-width:21px;flex:0 0 21px;vertical-align:middle}
#how-to-use,#more-open{display:inline-flex!important;justify-content:center!important;align-items:center!important;gap:8px!important}
.planner-panel>.spv-bottom-view-tools{margin:10px 20px 18px;border:1px solid #d6e0e8;border-radius:12px;background:#f6f9fb;overflow:hidden;min-width:0}
.spv-bottom-view-tools>summary{display:flex;align-items:center;gap:9px;cursor:pointer;padding:12px 14px;font-size:13px;font-weight:700;list-style:none}
.spv-bottom-view-tools>summary::after{content:'+';margin-left:auto;font-size:20px;line-height:1}
.spv-bottom-view-tools[open]>summary::after{content:'−'}
.spv-bottom-view-tools>summary::-webkit-details-marker{display:none}
.spv-bottom-view-tools .planner-tools{display:flex!important;flex-wrap:wrap;padding:10px 12px!important;border-top:1px solid #d6e0e8}
.spv-bottom-view-tools .search-box{flex:1 1 240px;min-width:0;width:100%}
.spv-view-tools-note{padding:0 14px;margin:0 0 5px;font-size:12px;color:#526477}
.planner-panel>.week-control button.week-number{border:1px solid #b7c9d6!important;border-radius:11px!important;background:#e9f1f7!important;padding:10px 5px!important;min-height:55px;cursor:pointer;white-space:normal!important;text-align:center;box-shadow:0 1px 3px #25374612}
.planner-panel>.week-control button.week-number::after{content:'Choose ▾';display:block;margin-top:5px;font-size:10px;line-height:1.2;font-weight:650;color:#526477}
.planner-panel>.week-control button.week-number:focus-visible{outline:3px solid #d5a457;outline-offset:2px}
.spv-week-picker{display:grid;gap:12px;min-width:0}
.spv-week-picker label{display:grid;gap:6px;font-weight:700}
.spv-week-picker select{box-sizing:border-box;width:100%;min-width:0;font-size:16px;min-height:48px;padding:10px;border:1px solid #b7c9d6;border-radius:10px;background:#f6f9fb;color:#253746}
.spv-week-preview{padding:12px;border:1px solid #d6e0e8;border-radius:10px;background:#edf3f7;margin:0}
.spv-week-picker .button{min-height:44px}
@media(max-width:700px){.planner-panel>.spv-bottom-view-tools{margin-left:12px;margin-right:12px}}

/* v1.20: exits remain available at the bottom of long views. */
.spv-navigation-footer{position:sticky;bottom:0;z-index:3;display:flex;justify-content:flex-end;gap:10px;box-sizing:border-box;clear:both;padding:12px 0 max(6px,env(safe-area-inset-bottom));margin-top:14px;border-top:1px solid #d6e0e8;background:#fff;box-shadow:0 -7px 12px #ffffffed}
.spv-navigation-footer>.button,.spv-navigation-footer>button{display:flex;justify-content:center;align-items:center;width:100%;min-height:44px;border:1px solid #b8c8d5;border-radius:10px;background:#edf3f7;color:#253746;padding:11px 16px;font-size:14px;font-weight:750;cursor:pointer}
#modal>.spv-navigation-footer{grid-column:1/-1}
.spv-viewer-footer{position:sticky;bottom:0;z-index:5;padding:12px 0 max(10px,env(safe-area-inset-bottom));background:#f3f4f7;box-shadow:0 -8px 12px #f3f4f7ed}
#spv-worker-portal .spv-viewer-footer button{width:100%;min-height:46px;border:1px solid #7c8798;border-radius:12px;background:#414d5a;color:#fff;font-size:15px;font-weight:750;padding:12px 16px;cursor:pointer}
#spv-worker-portal .spv-w-header{position:sticky;top:0;z-index:6}
#spv-worker-portal #spv-pub-exit{white-space:nowrap;min-height:44px}
/* v1.21: concise About and fully collapsed, scannable instructions. */
.spv-about-benefits{padding-left:21px;margin:14px 0;display:grid;gap:10px;line-height:1.5}
.spv-about-custom{padding:15px;border:1px solid #b8cddc;border-radius:12px;background:#edf4f8;margin:16px 0}
.spv-about-custom h3{margin:0 0 7px;font-size:18px}
.spv-about-custom p{margin:0;line-height:1.55}
#modal .guide-section>summary{padding-top:13px;padding-bottom:13px;line-height:1.4}
