
:root{--bg:#F5F7FA;--ink:#18324B;--blue:#2563A6;--blue-soft:#E8F0FC;--line:#DCE4ED;--muted:#596B7C;--good:#176B50;--danger:#AE3547;--amber:#77540E;--radius:16px}
*{box-sizing:border-box}body{margin:0;background:var(--bg);font:15px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink)}button,input,select,textarea{font:inherit}button,select{cursor:pointer}button{min-height:44px;border:1px solid var(--line);border-radius:10px;background:white;color:var(--ink);font-weight:650;padding:9px 15px;transition:background .15s}button:hover{background:#F0F5FB}button:disabled{cursor:not-allowed;opacity:.52}button.primary{background:var(--blue);border-color:var(--blue);color:white}button.primary:hover{background:#1C528C}button.danger{color:var(--danger);border-color:#E8C3C9}button.ghost{background:transparent;border-color:transparent}button.small{padding:6px 11px;font-size:13px;min-height:36px}a{color:var(--blue)}:focus-visible{outline:3px solid #54A1EB;outline-offset:3px}input,select,textarea{width:100%;color:var(--ink);background:white;border:1px solid #BCCBDA;border-radius:9px;padding:10px 12px;min-height:44px}textarea{resize:vertical;line-height:1.6;min-height:185px}label{font-weight:650;font-size:13px;display:block;margin-bottom:6px}h1,h2,h3,p{margin-top:0}h1{font-size:25px;line-height:1.25;margin-bottom:6px;letter-spacing:-.7px}h2{font-size:20px;line-height:1.35;margin-bottom:12px}h3{font-size:15px;margin-bottom:8px}p{margin-bottom:14px}small,.muted{color:var(--muted)}small{font-size:12px}svg.icon{width:20px;height:20px;flex:none;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.demo-banner{background:#FFF1CE;color:#60470C;padding:8px 24px;font-size:12px;display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #E9DBB2}.demo-banner strong{font-weight:750}.topbar{padding:20px 24px;background:white;border-bottom:1px solid var(--line);display:flex;gap:18px;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center}.brandmark{width:43px;height:43px;display:grid;place-items:center;border-radius:13px;background:var(--ink);color:white}.brandmark svg{width:26px;height:26px}.brand-title{font-weight:800;letter-spacing:-.45px;font-size:21px;line-height:1.1}.brand-sub{font-size:12px;color:var(--muted);margin-top:5px}.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.actions{display:flex;gap:10px;flex-wrap:wrap}.shell{display:grid;grid-template-columns:210px minmax(0,1fr);min-height:calc(100vh - 137px)}.sidebar{background:#F9FBFD;border-right:1px solid var(--line);padding:22px 14px;display:flex;flex-direction:column;gap:5px}.navbtn{border:0;background:transparent;display:flex;gap:12px;align-items:center;justify-content:flex-start;width:100%;text-align:left;padding:11px 13px;border-radius:11px}.navbtn.active{background:#DDEBFC;color:#134D8D}.navbtn .count{margin-left:auto;font-size:12px;background:white;border-radius:20px;padding:0 7px}.nav-label{color:var(--muted);font-size:11px;font-weight:700;letter-spacing:1px;text-transform:uppercase;margin:20px 12px 6px}.sidebar-foot{margin-top:auto;padding:24px 12px 6px;font-size:12px;color:var(--muted)}.workspace{min-width:0;padding:25px;max-width:1600px;width:100%;margin:0 auto}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:22px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:1.1px;text-transform:uppercase;color:var(--blue);margin-bottom:8px}.page-head p{color:var(--muted);margin-bottom:0;font-size:14px}.toolbar{display:grid;grid-template-columns:minmax(170px,1fr) 180px 155px;gap:10px;margin-bottom:16px}.split{display:grid;grid-template-columns:295px minmax(0,1fr);gap:18px;align-items:start}.list-panel,.detail,.panel{background:white;border:1px solid var(--line);border-radius:var(--radius);min-width:0}.list-panel{padding:7px;overflow:hidden}.list-header{padding:12px 11px;font-weight:750;font-size:13px;display:flex;justify-content:space-between;border-bottom:1px solid var(--line);margin-bottom:5px}.item{display:flex;gap:11px;width:100%;text-align:left;border:0;border-radius:10px;background:white;padding:15px 12px;font-weight:400;min-height:96px;align-items:flex-start}.item+.item{margin-top:3px}.item.active{background:var(--blue-soft);box-shadow:inset 3px 0 var(--blue)}.item strong{display:block;line-height:1.3;font-size:14px}.item .sub{font-size:12px;color:var(--muted);display:block;margin:3px 0}.item .subject{font-size:13px;line-height:1.4;display:block}.avatar{width:37px;height:37px;background:#EDF1F6;color:#34526D;border-radius:50%;flex-shrink:0;display:grid;place-items:center;font-size:12px;font-weight:800}.avatar.blue{background:#D8E8FF;color:#215184}.avatar.large{width:51px;height:51px;font-size:16px}.detail{padding:24px}.detail-head{margin-bottom:24px}.detail-head h2{font-size:25px;letter-spacing:-.5px;margin:13px 0 8px}.tag{display:inline-flex;align-items:center;gap:5px;font-size:11px;line-height:1.4;font-weight:700;border-radius:6px;background:#EDF2F7;padding:4px 8px;max-width:100%}.tag.good{background:#E4F3EA;color:#176444}.tag.warning{background:#FFF1D5;color:#79510A}.tag.bad{background:#FCE9EC;color:#A42A3D}.tag.blue{background:#E6F0FF;color:#245B98}.card{border:1px solid var(--line);border-radius:12px;padding:18px;margin-bottom:17px;background:white}.card.soft{background:#F7F9FC}.card.tint{background:#F0F6FE;border-color:#CADFF7}.card.note{background:#FFF9EA;border-color:#EEDFB8}.card p:last-child{margin-bottom:0}.card .actions{margin-top:16px}.message{white-space:pre-wrap;font-size:14px}.section-title{font-size:14px;font-weight:750;margin:23px 0 12px;display:flex;justify-content:space-between;gap:10px;align-items:center}.compare{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin:13px 0}.comparison{background:#F6F8FB;border:1px solid var(--line);border-radius:10px;padding:14px;font-size:14px}.comparison.after{background:#F0F6FF;border-color:#BCD4F2}.comparison small{display:block;font-weight:750;margin-bottom:7px}.portrait{height:118px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;border-radius:8px;background:#DFE6EC;color:#607589}.portrait.new{background:#D8E7F9;color:#23568E}.portrait svg{width:43px;height:43px}.facts{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:17px}.fact{min-width:0}.fact span{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}.fact strong{font-size:14px;overflow-wrap:anywhere}.timeline{padding:0;margin:0;list-style:none}.timeline li{position:relative;padding:0 0 18px 21px;border-left:1px solid #D5E0EB;margin-left:4px;font-size:13px}.timeline li:before{content:"";position:absolute;left:-4px;top:5px;width:7px;height:7px;border-radius:100%;background:#88A9C8}.timeline li:last-child{border-color:transparent;padding-bottom:0}.timeline small{display:block;font-size:11px;margin-top:4px}.evidence{padding:11px 0;border-bottom:1px solid #E8EDF3;font-size:13px}.evidence:last-child{border:0;padding-bottom:0}.evidence small{display:block;margin-top:4px}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin:20px 0}.metric{background:white;border:1px solid var(--line);border-radius:13px;padding:20px}.metric b{display:block;font-size:29px;font-weight:750;margin:5px 0}.metric small{display:block}.metric-title{font-size:12px;color:var(--muted);font-weight:650}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.panel{padding:22px}.panel p{font-size:14px}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px;text-align:left}th{font-size:11px;color:var(--muted);background:#F6F8FA}th,td{padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:top}td strong{display:block}.empty{text-align:center;padding:40px 20px;color:var(--muted)}.empty h3{color:var(--ink)}.module{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:16px 0;border-bottom:1px solid var(--line)}.module:last-child{border:0}.module p{font-size:13px;margin:5px 0 0;color:var(--muted)}.switch{min-width:96px;flex:none}.switch.on{background:#E6F2ED;color:var(--good);border-color:#B8D7C8}.switch.off{background:#F2F3F6;color:#5E6873}.mobile-back{display:none}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:min(620px,calc(100% - 32px));padding:13px 20px;background:#163A54;color:white;border-radius:12px;box-shadow:0 8px 35px #0003;z-index:30;font-size:14px}.toast[hidden]{display:none}dialog{border:1px solid var(--line);border-radius:18px;padding:0;color:var(--ink);width:min(780px,calc(100% - 30px));max-height:calc(100dvh - 34px);background:white;box-shadow:0 18px 80px #0B23353D}dialog::backdrop{background:#10273C80;backdrop-filter:blur(2px)}.dialog-head{padding:20px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:white;z-index:1}.dialog-head h2{margin:0}.dialog-body{padding:22px 24px}.dialog-foot{padding:16px 24px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;background:#F9FBFD;position:sticky;bottom:0;flex-wrap:wrap}.field{margin-bottom:17px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.permission{padding:12px 14px;border-radius:10px;background:#FFF4DD;font-size:12px;margin-bottom:16px}.permission.good{background:#E9F5ED}.permission.bad{background:#FBEDEF}.price-total{display:flex;gap:28px;padding:18px;background:#F0F6FE;border-radius:10px;margin:16px 0}.price-total b{display:block;font-size:23px}.service-option{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid var(--line);border-radius:10px;margin-bottom:10px;font-weight:400;font-size:14px}.service-option input{width:18px;min-height:18px;margin-top:4px;accent-color:var(--blue)}.service-option span{flex:1}.service-option strong{display:block}.service-option small{display:block;margin-top:3px}.muted-box{border:1px dashed #B9CADB;padding:15px;border-radius:10px;font-size:13px;color:var(--muted)}.stack>*+*{margin-top:10px}.error{color:var(--danger)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.initial-warning{padding:30px;text-align:center}.stand-mode .detail{font-size:17px}.stand-mode .detail-head h2{font-size:30px}.stand-mode .detail .message,.stand-mode .comparison{font-size:16px}.stand-mode .detail button{min-height:52px}.stand-mode .split{grid-template-columns:240px minmax(0,1fr)}.nowrap{white-space:nowrap}.line{border-top:1px solid var(--line);margin:22px 0}.kpi-bar{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 17px}.history-body{white-space:pre-wrap;margin-top:7px;font-size:12px;background:#F6F8FB;padding:10px;border-radius:6px}
@media(min-width:1450px){.split{grid-template-columns:330px minmax(0,1fr)}.detail{padding:29px}}
@media(max-width:1080px){.shell{grid-template-columns:175px 1fr}.workspace{padding:19px}.sidebar{padding:17px 9px}.split{grid-template-columns:245px minmax(0,1fr)}.detail{padding:18px}.metrics{grid-template-columns:repeat(2,1fr)}.brand-sub{display:none}.toolbar{grid-template-columns:1fr 165px}.toolbar select:last-child{grid-column:1/-1}.navbtn{font-size:13px;padding:10px}.compare{gap:9px}.comparison{padding:11px}}
@media(max-width:760px){body{font-size:15px}.demo-banner{padding:8px 14px;font-size:11px}.demo-banner .storage-label{display:none}.topbar{padding:14px;gap:10px;align-items:flex-start}.brandmark{width:36px;height:36px}.brand-title{font-size:18px}.topbar .actions{gap:6px}.topbar .actions button{font-size:12px;padding:8px 10px;min-height:39px}.topbar .actions svg{display:none}.shell{display:block}.sidebar{display:flex;flex-direction:row;overflow:auto;border-right:0;border-bottom:1px solid var(--line);padding:8px;gap:4px}.navbtn{width:auto;white-space:nowrap;flex:none;gap:7px;min-height:40px;padding:8px 11px}.navbtn svg{width:17px;height:17px}.sidebar .nav-label,.sidebar-foot{display:none}.workspace{padding:18px 13px}.page-head{gap:10px;margin-bottom:17px}.page-head p{font-size:13px}.page-head h1{font-size:24px}.page-head .small{font-size:11px}.toolbar{grid-template-columns:1fr 145px;gap:8px}.toolbar input{grid-column:1/-1}.toolbar select:last-child{grid-column:auto}.split,.stand-mode .split{display:block}.split.has-selection .list-panel{display:none}.split:not(.has-selection) .detail{display:none}.detail{padding:19px 16px}.detail-head h2{font-size:24px}.mobile-back{display:inline-flex;align-items:center;gap:6px;margin-bottom:15px}.compare{grid-template-columns:1fr}.compare.photos{grid-template-columns:1fr 1fr}.grid{grid-template-columns:1fr}.metrics{gap:10px}.metric{padding:15px}.metric b{font-size:25px}.facts{gap:12px}.tag{font-size:10px}.fields{grid-template-columns:1fr;gap:0}dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:13px}.dialog-head{padding:15px 17px}.dialog-head h2{font-size:19px}.dialog-body{padding:18px 17px}.dialog-foot{padding:14px 17px}.dialog-foot .actions{width:100%}.dialog-foot .actions button{flex:1}.permission{font-size:12px}.price-total{gap:18px;padding:15px}.price-total b{font-size:20px}.toast{bottom:14px;font-size:13px}.panel{padding:18px}.detail .actions button{flex-grow:1}.module{align-items:flex-start}.table-wrap{margin:0 -5px}.item{min-height:87px}}

/* Shared app: preserve the prototype's blue workspace, with resilient sizing. */
html{scroll-padding-block:20px}
body{min-width:320px;min-height:100vh;min-height:100dvh}
[hidden]{display:none!important}
button,input,select,textarea{touch-action:manipulation}
input,select,textarea{max-width:100%}
textarea{scroll-margin-block:24px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #1673c4;outline-offset:3px}
button:active:not(:disabled){transform:translateY(1px)}
.workspace,.detail,.card,.panel,.item>*,.fields>*,.toolbar>*,.grid>*,.module>*,.dialog-head>*,.dialog-foot>*{min-width:0}
.detail-head h2,.item strong,.subject,.message,.evidence,.history-body,.comparison,.permission,.module p,.card p,.auth-error{overflow-wrap:anywhere}
.item{transition:background .15s,box-shadow .15s}
.list-panel,.detail,.panel{box-shadow:0 2px 7px #18324b03}
.item.active strong{color:#164d85}
.navbtn.active{box-shadow:inset 3px 0 #2563a6}
.tag{overflow-wrap:anywhere}
.table-wrap{overscroll-behavior-x:contain;scrollbar-width:thin}
th,td{overflow-wrap:anywhere}

/* The body scrolls inside the dialog; actions stay outside that scroll area. */
dialog[open]{display:flex;flex-direction:column;overflow:hidden;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px)}
.dialog-head,.dialog-foot{flex:none;position:static}
.dialog-head{gap:16px}
.dialog-body{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
.dialog-foot{padding-bottom:max(16px,env(safe-area-inset-bottom));box-shadow:0 -4px 15px #18324b05}
.dialog-foot>small{flex:1 1 200px}
.dialog-foot .actions{flex-shrink:0}
.dialog-body textarea{min-height:180px}
.dialog-head button{flex:none}

/* Authentication is an ordinary local account, separate from demo senders. */
#login-screen:not([hidden]){display:grid;place-items:center;min-height:100vh;min-height:100dvh;padding:32px 20px;background:radial-gradient(ellipse at 50% 0,#e5effc 0,transparent 68%),var(--bg)}
#login-screen main,.auth-card{width:min(100%,430px);padding:32px;background:white;border:1px solid var(--line);border-radius:20px;box-shadow:0 14px 55px #18324b0c}
.auth-card main{padding:0;border:0;box-shadow:none}
#login-screen h1{font-size:27px;margin-top:18px}
#login-screen p{color:var(--muted)}
#login-screen form{margin-top:24px}
#login-screen label{margin-bottom:8px}
#login-screen input{margin-bottom:16px;min-height:48px;font-size:16px}
#login-screen button[type=submit],#login-screen .primary{width:100%;min-height:48px}
#login-screen small{display:block;margin-top:18px;line-height:1.6}
.auth-error{color:var(--danger);font-size:14px;margin:12px 0}
.auth-error:empty{display:none}

/* Connection status always uses words; color is supplemental. */
.connection-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;padding:9px 24px;background:#edf3fa;border-bottom:1px solid var(--line);font-size:12px;color:#3b546c}
#connection-status{display:inline-flex;align-items:center;gap:8px;overflow-wrap:anywhere}
#connection-status::before{content:"";width:7px;height:7px;border-radius:50%;background:#708398;flex:none}
#connection-status[data-status=online]{color:#176444}
#connection-status[data-status=online]::before{background:#1c805a}
#connection-status[data-status=offline],#connection-status[data-status=conflict]{color:#80510d;font-weight:650}
#connection-status[data-status=offline]::before,#connection-status[data-status=conflict]::before{background:#b77616}
.connection-bar button{min-height:36px;padding:5px 10px;font-size:12px}
.conflict-panel{margin:0 0 18px;padding:18px;border:1px solid #e2c18b;border-radius:12px;background:#fff7e9;overflow-wrap:anywhere}
.conflict-panel h2,.conflict-panel h3{color:#67440d}
.conflict-panel p{font-size:14px}
.conflict-panel textarea,.conflict-panel pre{white-space:pre-wrap;overflow-wrap:anywhere;background:white}
.conflict-panel pre{padding:12px;border:1px solid #ead8bb;border-radius:9px;font-family:inherit;font-size:13px;line-height:1.6;max-height:220px;overflow:auto}
.conflict-panel .actions{margin-top:14px}
.module-mode{width:155px;flex:none;font-size:13px;min-height:44px}
.module-mode label{font-size:12px}
.module-mode select{font-size:13px}
.note-form textarea,#note-body{min-height:110px}
.note-form .actions{margin-top:10px}
.notes-list{margin:15px 0 0;padding:0;list-style:none}
.notes-list li{padding:14px 0;border-top:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere}
.notes-list small{display:block;margin-top:6px}
.mobile-nav{display:none}
#login-retry{width:100%;margin-top:10px}
button[data-act=stand][aria-pressed=true]{background:#ddebfc;border-color:#85abd3;color:#134d8d}

@media(min-width:1024px){
 .sidebar{padding-top:24px}
 .list-panel{position:sticky;top:20px;max-height:calc(100dvh - 40px);overflow-y:auto;scrollbar-width:thin}
 .detail{padding:26px}
 .toolbar{grid-template-columns:minmax(180px,1fr) 180px 155px}
}
@media(min-width:761px) and (max-width:1023px){
 .toolbar{grid-template-columns:1fr 1fr}
 .toolbar>div:first-child{grid-column:1/-1}
 .compare:not(.photos){grid-template-columns:1fr}
}
@media(max-width:760px){
 input,select,textarea{font-size:16px}
 .demo-banner{line-height:1.45;padding-top:max(8px,env(safe-area-inset-top))}
 .topbar{flex-wrap:wrap;align-items:center}
 .topbar .brand{flex:1 1 170px}
 .topbar .actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .topbar .actions button{min-height:46px;font-size:14px}
 .topbar .actions button:only-child{grid-column:1/-1}
 .topbar .actions svg{display:inline;width:18px;height:18px;margin-right:3px}
 .sidebar{position:fixed;inset:auto 0 0;z-index:20;overflow:visible;padding:5px max(8px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border-top:1px solid var(--line);border-bottom:0;background:white;box-shadow:0 -3px 18px #18324b0c}
 .sidebar .desktop-nav-option{display:none}
 .mobile-nav{display:flex;gap:4px;width:100%}
 .mobile-nav>.mobile-tab,.mobile-more{flex:1 1 0;min-width:0}
 .mobile-tab{position:relative;display:flex;flex-direction:column;justify-content:center;gap:3px;width:100%;min-height:54px;padding:5px 1px;font-size:12px;font-weight:600;text-align:center}
 .mobile-tab.active{box-shadow:none}
 .mobile-tab svg{width:19px;height:19px}
 .mobile-tab .count{position:absolute;left:calc(50% + 6px);top:3px;padding:0 4px;font-size:10px;color:#134d8d;background:#e6f1fe}
 .mobile-more summary{list-style:none;cursor:pointer}
 .mobile-more summary::-webkit-details-marker{display:none}
 .mobile-more-menu{position:absolute;right:max(8px,env(safe-area-inset-right));bottom:calc(100% + 8px);width:min(240px,calc(100vw - 24px));max-height:calc(100dvh - 120px);overflow:auto;padding:6px;background:white;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px #18324b29}
 .mobile-more-menu .navbtn{width:100%;min-height:44px;white-space:normal}
 .workspace{padding:18px 12px calc(80px + env(safe-area-inset-bottom))}
 .page-head{flex-wrap:wrap;align-items:center}
 .page-head>div{flex:1 1 215px}
 .page-head .small{min-height:44px;font-size:13px}
 .toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .toolbar>div:first-child{grid-column:1/-1}
 .toolbar input{font-size:16px}
 .toolbar select{font-size:14px;padding-inline:9px}
 .split.has-selection .list-panel{display:none}
 .split:not(.has-selection) .detail{display:none}
 .workspace:has(.split.has-selection)>.page-head,.workspace:has(.split.has-selection)>.toolbar{display:none}
 #view-title,#selected-detail{scroll-margin-top:12px}
 .detail{padding:18px 15px}
 .detail-head h2{font-size:25px;line-height:1.25}
 .mobile-back{min-height:44px;padding-inline:10px}
 .detail .actions{gap:9px}
 .detail .actions button{min-height:46px;font-size:14px}
 .comparison{padding:13px}
 .compare.photos{gap:9px}
 .facts{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .metric b{font-size:24px;overflow-wrap:anywhere}
 .module{flex-wrap:wrap;gap:12px}
 .module>div:first-child{flex:1 1 185px}
 .module-mode{width:100%;flex-basis:100%}
 .module-mode select{font-size:16px}
 .connection-bar{padding:8px 14px;gap:6px;font-size:11px}
 .connection-bar button{min-height:44px}
 .conflict-panel{padding:15px}
 .conflict-panel .actions button{flex:1 1 140px;min-height:44px}
 dialog[open]{width:calc(100% - 16px);max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);margin:8px auto}
 .dialog-head{padding:13px 15px}
 .dialog-head button{min-height:44px}
 .dialog-head h2{font-size:19px}
 .dialog-body{padding:17px 15px}
 .dialog-body textarea{min-height:150px}
 .dialog-foot{padding:12px 15px max(12px,env(safe-area-inset-bottom));gap:10px}
 .dialog-foot>small{flex-basis:100%;font-size:12px}
 .dialog-foot .actions{width:100%;gap:8px}
 .dialog-foot .actions button{min-height:46px;font-size:14px}
 .dialog-foot>.primary{width:100%;min-height:46px}
 .toast{bottom:calc(76px + env(safe-area-inset-bottom));line-height:1.5}
 #login-screen:not([hidden]){padding:max(20px,env(safe-area-inset-top)) 14px max(20px,env(safe-area-inset-bottom))}
 #login-screen main,.auth-card{padding:25px 21px;border-radius:17px}
 .stand-mode .detail{font-size:18px}
 .stand-mode .detail-head h2{font-size:30px}
 .stand-mode .detail .message,.stand-mode .detail .comparison{font-size:18px}
 .stand-mode .detail .actions button{min-height:56px;font-size:17px;flex-basis:100%}
 .stand-mode .detail .tag{font-size:12px}
}
@media(max-height:520px){
 .dialog-head{padding-block:8px}
 .dialog-foot{padding-top:8px;padding-bottom:8px}
 .dialog-body{padding-block:12px}
 .dialog-body textarea{min-height:100px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
 button:active:not(:disabled){transform:none}
}

/* The live workspace keeps counts and the next decision within easy reach. */
[data-mode=live_readonly] .topbar .actions:empty{display:none}
[data-mode=live_readonly] .brandmark{background:#dce8fa;color:#26578d}
.dashboard-workspace{width:100%;max-width:1240px;margin-inline:auto}
.dashboard-head{margin-bottom:18px;align-items:center}
.dashboard-head h1{font-size:clamp(28px,4vw,39px);letter-spacing:-.04em;margin:0}
.dashboard-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.dashboard-controls select{width:auto;max-width:100%;min-width:145px}
.dashboard-controls button{min-height:44px;white-space:nowrap}
.dashboard-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:20px}
.dashboard-metric{display:flex;flex-direction:column;gap:3px;min-width:0;padding:16px 19px;color:var(--ink);text-decoration:none;background:white;border:1px solid var(--line);border-radius:14px}
.dashboard-metric:hover{border-color:#89afd6;background:#fbfdff}
.dashboard-metric span{font-weight:700}
.dashboard-metric strong{font-size:clamp(30px,5vw,44px);line-height:1.15;font-variant-numeric:tabular-nums}
.dashboard-metric small{display:block;overflow-wrap:anywhere}
.dashboard-metric:first-child strong{color:#235e9d}
.dashboard-columns{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px;align-items:start}
.dashboard-panel{min-width:0;padding:20px;background:white;border:1px solid var(--line);border-radius:16px;scroll-margin-top:16px;box-shadow:0 3px 12px #18324b05}
.dashboard-panel-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 14px;margin-bottom:12px}
.dashboard-panel-title h2,.dashboard-history h2{margin:0;font-size:20px}
.dashboard-panel-title select{width:auto;max-width:100%;font-size:14px}
.dashboard-panel-controls{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.dashboard-panel-controls button{min-height:44px;white-space:nowrap}
.dashboard-panel-controls button[aria-disabled="true"]{cursor:wait;opacity:.6}
.dashboard-panel .card{margin:16px 0 0;padding:12px;font-size:12px}
.dashboard-empty{padding:18px 0 8px;color:var(--muted)}
.dashboard-empty h3{margin:0;font-weight:500}
.review-case{min-width:0}
.review-title{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 8px;padding-block:7px}
.review-title h3{margin:0;font-size:22px;line-height:1.25;overflow-wrap:anywhere}
.review-tags{display:flex;flex-wrap:wrap;gap:5px}
.review-changes{display:grid;gap:12px;margin:16px 0}
.review-change dt{font-weight:700;margin-bottom:7px;overflow-wrap:anywhere}
.review-change dd{margin:0}
.review-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.review-values>div{min-width:0;padding:10px;white-space:pre-wrap;overflow-wrap:anywhere;background:#f4f7fa;border:1px solid #e7edf3;border-radius:9px}
.review-values>div:last-child{background:#eef5fe;border-color:#dce8f7}
.review-values>div>span:first-child{display:block;margin:0 0 4px;white-space:normal;color:var(--muted);font-weight:700;font-size:12px}
.review-image{display:block;width:100%;max-height:230px;aspect-ratio:1;object-fit:contain;border-radius:6px;background:white}
.review-places{margin:0;padding-inline-start:1.15em;white-space:normal}
.review-places li+li{margin-top:4px}
.review-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:16px}
.review-actions button{min-height:50px;font-size:16px}
.review-actions .review-activate{grid-column:1/-1}
.dashboard-note,.review-summary{margin:10px 0 0;color:var(--muted);overflow-wrap:anywhere}
.dashboard-note{font-size:13px}
.dashboard-feedback{margin:0 0 10px;padding:9px 12px;background:#edf7f1;border-radius:9px;color:#165c43;font-size:14px;overflow-wrap:anywhere}
.dashboard-feedback.warning{color:#714c0e;background:#fff3da}
.dashboard-feedback.neutral{color:var(--muted);background:#f4f7fa}
.customer-events{list-style:none;margin:0;padding:0}
.customer-event{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 0;border-top:1px solid var(--line)}
.customer-event:first-child{border:0}
.customer-event>div:first-child{min-width:0;overflow-wrap:anywhere}
.customer-event strong,.customer-event small{display:block}
.customer-event small{margin-top:2px}
.customer-event-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;text-align:right}
.customer-event-actions a{font-size:13px}
.customer-event.is-new strong{color:#235e9d}
.customer-event-actions button{min-height:44px}
.dashboard-history{margin-top:16px}
.dashboard-history h2{margin-bottom:11px}
.stand-mode .dashboard-metric span,.stand-mode .dashboard-panel h2{font-size:20px}
.stand-mode .review-title h3{font-size:26px}
.stand-mode .review-values{font-size:16px}
.stand-mode .review-actions button{min-height:58px;font-size:17px}
@media(max-width:760px){
 .dashboard-head{margin-bottom:13px}
 .dashboard-overview{gap:9px;margin-bottom:12px}
 .dashboard-metric{padding:12px;gap:2px}
 .dashboard-controls{margin-bottom:12px}
 .dashboard-panel{padding:14px}
 .dashboard-columns{grid-template-columns:minmax(0,1fr);gap:12px}
 .dashboard-history{margin-top:12px}
 .dashboard-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .dashboard-panel-title select{font-size:16px}
}
