.topbar{position:sticky;top:0;z-index:40;flex-wrap:wrap}.topbar>.row{flex-wrap:wrap;justify-content:flex-end}.topbar #common-scope-toggle{display:inline-flex;align-items:center;gap:7px;background:#274457;border-color:#718b9b;white-space:nowrap}.topbar #common-scope-toggle[aria-pressed=true]{background:#087f8f;border-color:#8acdd0;color:#fff}.topbar #common-scope-toggle strong{font-size:12px;background:#fff;color:#075b68;padding:2px 6px;border-radius:4px}.topbar #common-scope-toggle[hidden]{display:none}.ui-scope-status{margin-bottom:16px;padding:10px 14px}.detail{display:flex;flex-direction:column}.detail.hidden{display:none}.detail .detail-head{flex:0 0 auto}.detail .card-common-shared{flex:0 0 auto;display:grid;gap:8px;padding:0 18px 12px;border-bottom:1px solid #d6e1ea}.detail .card-common-shared .field{margin:0;padding:9px 11px;background:#f5f9fc;border:1px solid #d6e1ea;border-radius:5px;min-width:0}.detail .card-common-shared .remark-emphasis{background:#fff1d2;border-left:3px solid #bd4f16;color:#793b0c}.detail .card-common-shared h3{font-size:13px;margin:0}.detail .card-common-shared h3 small{font-size:11px;font-weight:400;color:#57717f}.detail .common-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:80px;overflow:auto;font-size:13px;margin-top:6px}.detail .common-contact-list{max-height:80px;overflow:auto;display:grid;gap:8px;margin-top:6px}.detail .common-person{display:flex;gap:7px;align-items:flex-start;min-width:0}.detail .common-person .pre{min-width:0;font-size:13px}.detail .common-person .tag{flex-shrink:0}.detail .tabs{flex:0 0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;padding:0 7px}.detail .tabs button{padding:11px 3px;min-width:0;font-size:12px;white-space:normal}.detail .detail-body{flex:1 1 auto;min-height:150px;overflow:auto}.detail.card-expanded{width:680px;max-width:100%;flex-basis:680px}.detail.card-expanded .card-common-shared{grid-template-columns:repeat(2,minmax(0,1fr))}.detail.card-expanded .common-contacts{grid-column:1/-1}.detail.card-expanded .common-contact-list{grid-template-columns:repeat(2,minmax(0,1fr))}.priority-layout.has-card.card-expanded-layout{grid-template-columns:minmax(0,1fr) 680px}.priority-layout .detail{max-height:calc(100vh - 100px);overflow:visible}.priority-layout .detail .detail-body{max-height:none;overflow:auto}.detail .personal-memo-editor{background:#f3f8fb;border:1px solid #d6e1ea;padding:12px;border-radius:6px;margin-bottom:18px}.detail .personal-memo-editor h3{font-size:14px;margin-bottom:7px}.detail .personal-memo-editor h3 small{font-size:11px;font-weight:400}.detail .personal-memo-editor textarea{width:100%;min-height:100px;margin-bottom:8px}.detail .personal-memo-editor .row{flex-wrap:wrap}.vehicle-keyword-form{display:flex;gap:14px;align-items:end}.vehicle-keyword-form>label{flex:1;min-width:0}.ui-card-expand{white-space:nowrap}.detail .card-common-shared .desktop-edit{display:inline-flex!important}
@media(max-width:1200px){.priority-layout.has-card.card-expanded-layout{grid-template-columns:minmax(0,1fr) 540px}.detail.card-expanded{width:540px;flex-basis:540px}}
@media(max-width:1000px){.priority-layout.has-card.card-expanded-layout{grid-template-columns:minmax(0,1fr)}.priority-layout.card-expanded-layout .detail{position:static;max-height:none}.priority-layout.card-expanded-layout .detail.card-expanded{width:100%;flex-basis:auto}}
@media(max-width:760px){.topbar>.row{justify-content:flex-start;width:100%;gap:7px}.detail.card-expanded{width:100%;flex-basis:auto}.detail .card-common-shared{padding:0 12px 10px}.detail.card-expanded .card-common-shared,.detail.card-expanded .common-contact-list{grid-template-columns:1fr}.detail .detail-body{min-height:160px;max-height:none}.detail .ui-card-expand{min-height:40px}.vehicle-keyword-form{display:block}.vehicle-keyword-form>.row{margin-top:12px}.priority-layout .detail{max-height:none}.detail .personal-memo-editor textarea{font-size:16px}}

/* Keep every common section reachable even on a short display. */
.topbar{height:auto;min-height:68px;padding:12px 24px}
.detail,.priority-layout .detail{max-height:none;overflow:hidden;align-self:flex-start}
.detail .detail-body,.priority-layout .detail .detail-body{max-height:380px;min-height:180px;flex:none}
.detail.card-expanded .basic-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
.detail.card-expanded .basic-fields>p{grid-column:1/-1}
@media(max-width:760px){.topbar{padding:12px 16px}.detail.card-expanded .basic-fields{grid-template-columns:1fr}.detail .detail-body,.priority-layout .detail .detail-body{max-height:380px}}
