/* Shared board: calm, compact and directly linked to original records. */
:root{color:#3f342c;background:#f5f5f3;--line:#e8e6e1;--muted:#7c7872;--blue:#607f9a;--orange:#c28149;font-size:16px}
body{background:#f5f5f3}main{max-width:680px;padding:0 20px calc(104px + env(safe-area-inset-bottom));margin:0 auto}
button,a,input,select{touch-action:manipulation}button{box-shadow:none}button.primary{background:#746d60;border-color:#746d60}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #cc8b50;outline-offset:3px}
.card{box-shadow:none;border-color:#e9e7e2;background:#fff;border-radius:18px}h1,h2,h3{color:#3f342c}h2{font-size:19px}p{line-height:1.7}
.app-header{display:flex;justify-content:space-between;align-items:center;padding:20px 0 18px;gap:8px;margin-bottom:4px}
.app-header h1{font-size:clamp(17px,4.6vw,22px);font-weight:600;letter-spacing:.025em;display:flex;align-items:center;gap:10px;margin:0;min-width:0}
.app-header h1 .line-icon{width:29px;height:29px;flex:none}.header-actions{display:flex;gap:0;flex:none}.line-icon{display:inline-block;width:23px;height:23px;vertical-align:middle;flex-shrink:0}
.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;border:0;background:transparent;padding:10px;border-radius:12px;color:#51463b}
.profile-button{position:relative}.profile-role{position:absolute;right:1px;bottom:0;font-size:10px;border-radius:10px;padding:1px 4px;background:#f5f5f3}.header-actions .profile-button .line-icon{width:29px;height:29px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px;min-height:40px}.section-heading h2{display:flex;align-items:center;gap:8px;font-size:18px;letter-spacing:.025em;font-weight:600;line-height:1.4;margin:0}
.next-section{margin-top:4px}.next-cards{padding-top:12px}.next-card-wrap{position:relative;margin:0 0 26px}.next-card-wrap:last-child{margin-bottom:20px}
.next-card{position:relative;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:8px;background:#fff;border-radius:17px;padding:25px 52px 15px 12px;border:1px solid #e8e6e1;min-height:0}
.role-tab{--tab-bg:#fbe3c6;--tab-fold:#e8c8a4;position:absolute;top:-14px;left:18px;display:inline-block;min-width:53px;padding:3px 20px 4px 16px;line-height:23px;border-radius:8px 2px 0 0;background:var(--tab-bg);color:#95633d;font-size:14px;font-weight:600;letter-spacing:.08em;white-space:nowrap;pointer-events:none;user-select:none;clip-path:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,0 100%)}
.role-tab:after{content:"";position:absolute;right:0;top:0;width:9px;height:9px;background:var(--tab-fold);clip-path:polygon(0 0,100% 100%,0 100%)}.role-tab.husband{--tab-bg:#dce9f4;--tab-fold:#bacfdf;color:#57758b}
.completion-control{display:flex;align-items:center;justify-content:center;border:0;background:transparent;min-width:44px;width:44px;height:44px;padding:5px}
.completion-control>span{display:flex;align-items:center;justify-content:center;width:23px;height:23px;border:1.6px solid #8b8074;border-radius:6px;color:#71614f}.completion-control[aria-checked=true]>span{background:#eee9df;border-color:#9d8d79}
.completion-control .line-icon{width:17px;height:17px}.next-body{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0;width:100%;text-align:left;background:none;border:0;padding:7px 0 3px;min-height:44px;color:#3f342c}
.next-title{display:block;min-width:0;width:100%;font-size:16px;line-height:1.6;overflow-wrap:anywhere;font-weight:500;color:#3f342c}.decision-body:hover,.next-body:hover,.next-empty:hover,.completion-control:hover,.favorite-contact-body:hover{background:transparent}
.short-due{font-size:12px;line-height:1.6;background:#f9e6d6;padding:3px 8px;border-radius:5px;max-width:100%;overflow-wrap:anywhere;color:#8a5d3e}.husband .short-due{background:#e4edf4;color:#57758b}.short-due.overdue{color:#a44738}
.select-next{position:absolute;right:3px;top:3px;width:44px;min-width:44px;height:44px;padding:13px;color:#887b6d}.select-next .line-icon{width:18px;height:18px}
.next-empty{grid-column:1/-1;display:flex;align-items:center;gap:7px;min-width:0;background:transparent;border:0;text-align:left;font-size:15px;line-height:1.6;padding:7px 6px;min-height:44px;color:#84796d;overflow-wrap:anywhere}.next-empty .line-icon{width:17px;height:17px;flex:none}.next-empty span{min-width:0}
.just-completed{padding-bottom:56px}.just-completed .next-title{text-decoration:line-through;color:#9a9185}.completion-feedback{position:absolute;bottom:7px;left:23px;right:12px;display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px;color:#797369}.completion-feedback button{font-size:12px;min-height:36px;padding:4px 10px;border:0;text-decoration:underline;background:transparent}
.decision-section{margin:2px 0 22px}.decision-section.no-decision{margin-top:0;margin-bottom:10px}.no-decision .section-heading{margin-bottom:0}.no-decision h2{font-size:15px;color:#817a70}.no-decision .line-icon{width:20px;height:20px}
.decision-card{background:white;border-radius:18px;border:1px solid #eeede9;padding:14px 16px 7px}.decision-body{position:relative;display:flex;flex-direction:column;text-align:left;width:100%;padding:5px 30px 7px 0;border:0;background:transparent;min-height:64px;gap:6px}
.decision-body strong{font-size:17px;line-height:1.6;overflow-wrap:anywhere}.decision-body>.line-icon{position:absolute;right:0;top:calc(50% - 12px);color:#807366}.excerpt{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.65;color:#888077;font-size:14px;overflow-wrap:anywhere;white-space:pre-wrap}
.unpin{background:none;border:0;text-decoration:underline;color:#8d8071;font-size:12px;padding:5px 0;min-height:36px}.favorites-section{margin-top:12px}.favorites-section .section-heading h2{font-size:17px}
.text-link{display:inline-flex;align-items:center;gap:2px;font-size:13px;color:#7e7368;background:transparent;padding:6px 0;min-height:44px}.text-link .line-icon{width:17px;height:17px}
.favorite-contact{display:flex;align-items:center;gap:6px;border:1px solid #eeede9;background:white;border-radius:18px;margin:10px 0;padding:12px}
.favorite-contact-body{display:flex;align-items:center;gap:13px;flex:1;min-width:0;text-align:left;background:none;border:0;padding:8px 2px;min-height:66px}.contact-symbol{display:flex;align-items:center;justify-content:center;flex:none;width:36px;color:#665340}.contact-symbol .line-icon{width:32px;height:32px}
.contact-copy{display:flex;flex-direction:column;gap:5px;min-width:0}.contact-copy strong{font-size:16px;line-height:1.5;overflow-wrap:anywhere;font-weight:600}.contact-copy>span{color:#8b8177;font-size:14px;overflow-wrap:anywhere}
.phone-action{display:inline-flex;justify-content:center;align-items:center;flex:none;min-width:46px;min-height:46px;border:1px solid #d8d1c6;border-radius:10px;color:#655744;background:#fff;align-self:center}
.compact-empty{font-size:13px;color:#928b82;line-height:1.7;padding:5px 0;margin:6px 0 14px}.nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;background:#fff;border-top:1px solid #dedbd5;padding:7px max(12px,calc((100vw - 660px)/2)) calc(7px + env(safe-area-inset-bottom));box-shadow:none}
.nav button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:5px 0;border-radius:10px;min-width:0;min-height:55px;font-size:12px;background:none;color:#756452}.nav button .line-icon{width:25px;height:25px}.nav button.active{background:transparent;color:#d68a4b}.nav button.active span{font-weight:600}
.reference-choices{display:grid;gap:8px;margin:10px 0 22px}.reference-choice{display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px;padding:12px;border-radius:12px;background:white;min-height:62px}.reference-choice>span{display:grid;gap:6px;min-width:0}.reference-choice strong{font-size:15px;overflow-wrap:anywhere;line-height:1.6}.reference-choice[aria-current=true]{border-color:#c2905d}.reference-choice .line-icon{width:19px;height:19px}.search-result{display:flex;flex-direction:column;gap:6px;width:100%;text-align:left;margin:8px 0;padding:13px;overflow-wrap:anywhere}
#referenceForm{border-top:1px solid var(--line);padding-top:18px;margin-bottom:15px}dialog{background:#f5f5f3}dialog h2{font-size:18px;margin:8px 0;max-width:calc(100% - 60px)}
@media(min-width:700px){.next-card{padding-left:16px}.next-title{font-size:17px}.app-header{padding-top:26px}}
@media(max-width:359px){main{padding-left:14px;padding-right:14px}.next-card{padding-left:8px;padding-right:52px;gap:4px}.next-title{font-size:15px}.next-body{gap:6px}.contact-symbol{width:25px}.contact-symbol .line-icon{width:25px}.favorite-contact{padding:10px}.favorite-contact-body{gap:7px}.contact-copy strong{font-size:15px}.contact-copy>span{font-size:13px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Shared SVG call action: never nested inside a detail control. */
.phone-action{width:46px;height:46px;min-width:46px;min-height:46px;padding:10px;box-sizing:border-box;line-height:0;color:#655744}.phone-action .line-icon{display:block;width:24px;height:24px;overflow:visible;pointer-events:none}
.contact .contact-detail{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:5px;padding:6px 0!important;overflow-wrap:anywhere;white-space:normal}.contact-detail strong{font-size:16px;line-height:1.6;overflow-wrap:anywhere;text-align:left}.contact-phone{font-size:14px;color:#8b8177;overflow-wrap:anywhere}.contact>.phone-action{flex:none;display:inline-flex;font-size:0}
