:root{--bg:#f5f6f8;--panel:#fff;--ink:#20252c;--muted:#667181;--line:#e0e5ec;--red:#b82035;--soft:#fbecf0;--green:#206c52}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--line);background:white;color:var(--ink);padding:10px 16px;border-radius:8px}button:hover{background:#f1f3f6}button:disabled{opacity:.5;cursor:wait}button.primary{background:var(--red);color:white;border-color:var(--red)}button.ghost{border:0;background:transparent}a{color:var(--red)}input,textarea,select{display:block;width:100%;padding:10px 12px;border:1px solid #cbd2dc;border-radius:7px;background:white;color:var(--ink);margin-top:5px}input[type=checkbox]{display:inline-block;width:auto;margin:0 8px 0 0}textarea{min-height:110px;resize:vertical}label{display:block;margin:12px 0}h1{font-size:26px;margin:0 0 8px}h2{font-size:20px;margin:0 0 10px}h3{font-size:16px;margin:0 0 10px}p{margin:8px 0}.muted{color:var(--muted)}.small{font-size:12px}.top{height:72px;background:var(--panel);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 28px;gap:15px}.brand{font-size:19px;font-weight:700;letter-spacing:1px}.brand b{color:var(--red)}.top .right{display:flex;align-items:center;gap:10px}.shell{display:grid;grid-template-columns:210px minmax(0,1fr);min-height:calc(100vh - 72px)}nav{padding:24px 14px;background:white;border-right:1px solid var(--line)}nav button{display:block;width:100%;text-align:left;border:0;margin-bottom:8px;padding:12px 16px}nav button.active{color:var(--red);background:var(--soft);font-weight:600}main{padding:30px;max-width:1400px;width:100%;margin:auto}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}.card{background:white;border:1px solid var(--line);border-radius:12px;padding:22px;margin:18px 0}.grid>.card{margin:0}.hero{padding:30px;background:linear-gradient(110deg,#fff,#fceef1);border:1px solid #ead8dd;border-radius:14px;margin:24px 0}.hero button{padding:14px 25px}.stat{font-size:30px;font-weight:600}.badge{display:inline-block;border-radius:5px;background:#edf0f4;color:#495667;padding:3px 9px;font-size:12px}.badge.good{background:#e9f5ef;color:var(--green)}.badge.warn{background:var(--soft);color:var(--red)}.listrow{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.listrow:last-child{border-bottom:0}.empty{padding:30px 12px;color:var(--muted);text-align:center}.steps{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.steps span{padding:6px 12px;border-radius:6px;background:#e9edf2;color:#637080}.steps .active{background:var(--red);color:#fff}.choice{padding:22px;text-align:left;border-radius:12px;min-height:90px}.choice strong{display:block;margin-bottom:7px}.choice.selected{border:2px solid var(--red);background:var(--soft)}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.full{grid-column:1/-1}.notice{background:#fff7e7;color:#714c09;border:1px solid #f1d8a5;border-radius:8px;padding:12px 16px;margin:15px 0}.login{max-width:410px;margin:12vh auto;padding:30px}.login .primary{width:100%;margin-top:12px}.error{color:var(--red)}.mailbody{min-height:360px;line-height:1.85}.twocol{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:20px}.pre{white-space:pre-wrap;overflow-wrap:anywhere}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.toolbar input,.toolbar select{width:auto;min-width:170px;margin:0}.toolbar input{flex:1}.btns{display:flex;gap:9px;flex-wrap:wrap;margin-top:18px}.logininfo{padding:18px;background:#f0f3f7;border-radius:8px}dialog{border:1px solid var(--line);border-radius:14px;padding:26px;max-width:760px;width:calc(100% - 30px);max-height:90vh;color:var(--ink)}dialog::backdrop{background:#11182766}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#242a33;color:#fff;max-width:90%;padding:12px 20px;border-radius:8px;display:none;z-index:50}.loading{padding:100px;text-align:center}.statusline{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.pill{background:#eef2f6;padding:4px 10px;border-radius:20px}.footer-note{margin-top:30px;color:var(--muted);font-size:12px}.diff{border-left:3px solid var(--red);padding-left:14px}.draft-list{max-height:65vh;overflow:auto}.checkbox{display:inline-flex;align-items:center;margin:6px 14px 6px 0}button:focus-visible,a:focus-visible{outline:3px solid #c76676;outline-offset:2px}@media(max-width:800px){.shell{grid-template-columns:1fr}nav{display:flex;gap:4px;flex-wrap:wrap;padding:8px;border-right:0;border-bottom:1px solid var(--line)}nav button{width:auto;margin:0;padding:8px 12px}main{padding:18px}.twocol,.formgrid{grid-template-columns:1fr}.top{padding:12px 16px;height:auto;flex-wrap:wrap}.top .small{display:none}.hero{padding:22px}.toolbar>*{width:100%!important}.grid{grid-template-columns:1fr}}
.twocol{align-items:start}.twocol aside .pre{max-height:260px;overflow:auto;font-size:13px;padding-right:8px}
main{min-width:0}
.shell{min-height:100vh}.sidebar-brand{font-size:17px;letter-spacing:.5px;white-space:nowrap;margin:0 2px 24px}@media(max-width:800px){.sidebar-brand{flex-basis:100%;padding:8px 12px;margin:0 0 8px}}
.sidebar-account{border-top:1px solid var(--line);margin-top:20px;padding-top:16px;width:100%}.sidebar-account-label{padding:0 16px 8px}@media(max-width:800px){.sidebar-account{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin-top:8px;padding-top:8px}.sidebar-account-label{padding:8px 12px}}
main[aria-label="商材管理"],main[aria-label="メール管理"]{align-self:start;margin:0 auto}
.industry-tabs button[aria-pressed=true]{background:var(--red);border-color:var(--red);color:white;font-weight:600}.content-guide{margin:16px 0}.content-products{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:16px;margin-top:18px}.product-card{min-width:0;border:1px solid var(--line);border-radius:10px;padding:18px;display:flex;flex-direction:column;align-items:stretch}.product-card h3{margin:14px 0 6px;overflow-wrap:anywhere}.product-description{font-size:13px;color:var(--muted);flex:1}.product-card summary{cursor:pointer;font-size:13px}.product-card .btns{margin-top:16px}.product-card .btns button{flex:1;font-size:12px;padding:9px 10px}.content-mail-text{min-width:0;overflow-wrap:anywhere;flex:1 1 240px}#content-mails .listrow{padding:16px 0}#content-mail-recipient select{max-width:100%}
/* Fit all lead columns within the desktop viewport; compact screens retain table-only scrolling. */
@media(min-width:801px){
 #lead-panel .lead-table{table-layout:fixed;min-width:0;width:100%;font-size:12px}
 #lead-panel .lead-table th,#lead-panel .lead-table td{min-width:0;max-width:none;padding:10px 7px;white-space:normal;overflow-wrap:anywhere}
 #lead-panel .lead-table thead th{font-size:11px}
 #lead-panel .lead-table thead th:nth-child(1){width:19%}
 #lead-panel .lead-table thead th:nth-child(2){width:7%}
 #lead-panel .lead-table thead th:nth-child(3){width:9%}
 #lead-panel .lead-table thead th:nth-child(4){width:20%}
 #lead-panel .lead-table thead th:nth-child(5){width:12%}
 #lead-panel .lead-table thead th:nth-child(6){width:11%}
 #lead-panel .lead-table thead th:nth-child(7){width:11%}
 #lead-panel .lead-table thead th:nth-child(8){width:11%}
 #lead-panel .table-actions{min-width:0}
 #lead-panel .table-actions button{padding:5px 3px;font-size:11px;white-space:normal;overflow-wrap:anywhere}
 #lead-panel .lead-table .badge{max-width:100%;padding:3px 5px;font-size:11px}
 #lead-panel .date-cell{font-size:11px}
}
.collection-overview h2{margin:0}.collection-lead{font-size:17px;margin:16px 0}.collection-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 24px;margin:20px 0}.collection-settings dt{color:var(--muted);font-size:12px;margin-bottom:6px}.collection-settings dd{margin:0;font-size:16px;font-weight:600;overflow-wrap:anywhere}.collection-industries{grid-column:span 2}.collection-industries .badge{margin:0 4px 5px 0;font-weight:400}.collection-flow{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:16px;margin:20px 0;background:#f5f6f8;border-radius:8px;gap:20px}.collection-flow strong,.collection-flow span{display:block}.collection-flow span{font-size:12px;color:var(--muted);margin-top:4px}.collection-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:14px 0 20px}.collection-metrics>div{border-left:2px solid var(--line);padding-left:16px}.collection-metrics span{display:block;font-size:12px;color:var(--muted)}.collection-metrics strong{display:block;font-size:30px;margin:5px 0}.collection-metrics small{font-size:13px;font-weight:400;margin-left:5px}.collection-details summary{cursor:pointer;font-weight:600;font-size:16px}.collection-details[open] summary{margin-bottom:18px}.collection-details fieldset{border:1px solid var(--line);border-radius:8px;padding:12px 16px;margin:14px 0}.collection-details legend{font-size:13px;color:var(--muted)}.collection-details li{margin:9px 0}.collection-details summary:focus-visible{outline:3px solid #c76676;outline-offset:4px}.industry-checks{display:flex;gap:6px 12px;flex-wrap:wrap}.industry-checks label{margin:2px 0}@media(max-width:800px){.collection-settings{grid-template-columns:1fr 1fr;gap:14px}.collection-industries{grid-column:1/-1}.collection-flow,.collection-metrics{grid-template-columns:1fr;gap:14px}.collection-lead{font-size:15px}.collection-overview .row button{flex:1}.collection-details{padding:18px}}
.industry-tabs{display:flex;gap:6px;overflow-x:auto;border-bottom:1px solid var(--line);padding:0 0 10px;margin-top:22px}.industry-tabs button{white-space:nowrap;flex-shrink:0}.industry-tabs button[aria-selected=true]{background:var(--red);border-color:var(--red);color:white;font-weight:600}.tab-count{display:inline-block;margin-left:6px;padding:0 6px;border-radius:4px;background:#66718116;font-size:12px}.industry-tabs button[aria-selected=true] .tab-count{background:#ffffff25}.list-caption{margin:12px 0}.lead-table-wrap{width:100%;max-height:70vh;overflow:auto;border:1px solid var(--line);border-radius:10px;background:white;isolation:isolate}.lead-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1270px;font-size:13px;line-height:1.5}.lead-table th,.lead-table td{padding:12px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);vertical-align:top;text-align:left}.lead-table thead th{position:sticky;top:0;z-index:2;background:#edf0f4;color:#495667;white-space:nowrap;font-size:12px;font-weight:600}.lead-table th:first-child{position:sticky;left:0;min-width:200px;max-width:250px;background:white;z-index:1;box-shadow:2px 0 3px #20252c08;overflow-wrap:anywhere}.lead-table thead th:first-child{z-index:3;background:#edf0f4}.lead-table tbody tr:nth-child(even),.lead-table tbody tr:nth-child(even) th{background:#fafbfc}.lead-table tbody tr:hover,.lead-table tbody tr:hover th{background:#fff6f8}.lead-table tr:last-child>*{border-bottom:0}.lead-table tr>:last-child{border-right:0}.lead-table td:nth-child(2){white-space:nowrap}.lead-table td:nth-child(3){min-width:120px}.lead-table td:nth-child(5){min-width:155px}.lead-table td:nth-child(6){min-width:145px}.lead-table th[scope=row]{font-weight:400}.lead-table th[scope=row] strong{display:block;margin-bottom:4px}.email-cell{min-width:215px;max-width:280px}.email-address{display:block;overflow-wrap:anywhere;user-select:all;margin-bottom:5px}.date-cell{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--muted);font-size:12px}.table-actions{display:flex;flex-direction:column;gap:5px;min-width:110px}.table-actions button{font-size:12px;padding:5px 9px;white-space:nowrap}.table-actions button:disabled{cursor:not-allowed}.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}@media(max-width:800px){.lead-table-wrap{max-height:65vh}.lead-table th:first-child{min-width:150px;max-width:175px}.lead-table th,.lead-table td{padding:10px}.list-caption .small{font-size:11px}}
.quota-card{margin:0 0 18px;padding:16px 20px}.quota-number{font-size:28px;line-height:1.3}.quota-meter{display:block;width:100%;height:9px;margin:12px 0;accent-color:var(--green)}.quota-card>.row:last-child{margin-top:10px}
/* Action palette is separate from the red brand and warning colors. */
:root{--action:#0079fd;--action-dark:#0064d2;--action-soft:#edf6ff;--action-line:#b7d9ff}
button{color:var(--action-dark);border-color:var(--action-line)}
button:hover:not(:disabled){background:var(--action-soft);border-color:var(--action)}
button.primary,.industry-tabs button[aria-selected=true],.industry-tabs button[aria-pressed=true]{background:var(--action);border-color:var(--action);color:#fff}
button.primary:hover:not(:disabled),.industry-tabs button[aria-selected=true]:hover:not(:disabled),.industry-tabs button[aria-pressed=true]:hover:not(:disabled){background:var(--action-dark);border-color:var(--action-dark)}
button.ghost:hover:not(:disabled){background:var(--action-soft)}
nav button{color:var(--ink)}
nav button.active{color:var(--action-dark);background:var(--action-soft)}
.choice.selected{border-color:var(--action);background:var(--action-soft)}
.steps .active{background:var(--action)}
button:focus-visible,.collection-details summary:focus-visible{outline-color:var(--action)}
button:disabled{cursor:not-allowed}
dialog:has(.patrol-modal){max-width:960px}
.patrol-modal h2{margin:0}.patrol-saved{background:var(--bg);border-radius:8px;padding:12px 16px;margin:14px 0}.patrol-saved .collection-settings{margin:0;gap:8px 20px}.patrol-modal #settings-form{padding:0}.patrol-modal .patrol-actions{border-top:1px solid var(--line);padding-top:16px;margin-top:16px}.patrol-modal #patrol-sources{margin-top:16px;overflow-wrap:anywhere}.patrol-modal #patrol-sources[hidden]{display:none}
#lead-panel .lead-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;align-items:stretch}
#lead-panel .lead-toolbar>*{min-width:0;width:100%!important;margin:0}
#lead-panel .lead-add{padding:0;min-height:44px;font-size:24px;line-height:1;display:flex;align-items:center;justify-content:center}
@media(max-width:800px){#lead-panel .lead-toolbar{grid-template-columns:minmax(0,1fr) 44px}#lead-panel .lead-toolbar #lead-search{grid-column:1/-1}}
.card.collection-results{padding:14px 18px;margin:0 0 16px}
.collection-results>.row{gap:8px}.collection-results h2{font-size:18px;margin:0}.collection-results [data-act=collection-config]{padding:6px 12px;min-height:36px}
.collection-results .collection-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:10px 0}
.collection-results .collection-metrics>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;padding-left:12px;min-width:0}
.collection-results .collection-metrics strong{margin:0;font-size:26px;line-height:1.3;white-space:nowrap}.collection-results .collection-metrics span{font-size:13px}
.collection-footer{display:flex;gap:4px 20px;justify-content:space-between;flex-wrap:wrap}.collection-footer p{margin:0}
@media(max-width:800px){.card.collection-results{padding:12px 14px}.collection-results h2{font-size:16px}.collection-results .collection-metrics{grid-template-columns:1fr;gap:4px;margin:8px 0}.collection-results .collection-metrics>div{border:0;padding:0;justify-content:space-between}.collection-results .collection-metrics strong{font-size:24px}.collection-footer{font-size:11px}}
.patrol-header-actions{gap:8px;flex-wrap:nowrap}.patrol-modal .patrol-close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;font-size:26px;line-height:1;flex-shrink:0}
.patrol-information{margin-top:18px}.patrol-information>.collection-details{padding:0;margin:12px 0 0}.patrol-information>#patrol-sources{margin-top:12px}
.loading{display:flex;align-items:center;justify-content:center;min-height:240px;padding:0}
.loading-spinner{display:block;width:24px;height:24px;border:3px solid var(--action-line);border-top-color:var(--action);border-radius:50%;animation:loading-spin .8s linear infinite}
@keyframes loading-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.loading-spinner{animation:none}}
.patrol-saved .collection-industries .badge{background:#0064d9;color:#fff;font-weight:600}
