.house-ticket-center{display:grid;gap:26px;margin-top:18px}
.ticket-kind-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.ticket-kind-tabs button{flex:1;min-width:120px;padding:10px 14px}
.ticket-kind-tabs button.active{background:#edf5ff;border-color:#537db6;color:#214f83;font-weight:600}
.ticket-problem-summary{max-width:48ch;font-size:12px;line-height:1.65;white-space:normal;overflow-wrap:anywhere;color:#53647a}
.ticket-problem-summary p{margin:5px 0;white-space:pre-wrap}
.ticket-problem-summary summary{cursor:pointer;color:#365a8a}
.house-ticket-person-title{max-width:48ch;white-space:normal;overflow-wrap:anywhere}
.house-ticket-person-title .link-btn{white-space:normal;text-align:left;line-height:1.5}
.house-ticket-head-status .badge,.house-ticket-person-state .badge{white-space:normal;max-width:24ch;text-align:right;line-height:1.5}
.house-ticket-section{display:grid;gap:12px;min-width:0}
.house-ticket-section-title{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px 14px;margin:0 0 2px;font-size:16px}
.house-ticket-section-title>span{font-size:12px;font-weight:400;color:#74839d}
.house-ticket-card{min-width:0;border:1px solid #dfe5ef;border-radius:14px;background:#fff;overflow:hidden}
.house-ticket-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:14px;padding:20px 22px 10px}
.house-ticket-identity{min-width:0}
.house-ticket-identity h2{margin:4px 0 6px;font-size:16px;line-height:1.5;overflow-wrap:anywhere}
.house-ticket-identity h2 .link-btn{font:inherit;text-align:left;white-space:normal;overflow-wrap:anywhere;max-width:100%;padding:0;min-height:0}
.house-ticket-kind{display:flex;gap:6px;align-items:center;color:#6d7d96;font-size:11px}
.house-ticket-kind svg{width:14px;height:14px;flex:none}
.house-ticket-meta{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:baseline;color:#74839d;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.house-ticket-head-status{display:flex;flex-direction:column;gap:5px;align-items:flex-end;padding-top:4px}
.house-ticket-count{font-size:12px;color:#74839d}
.house-ticket-actions{display:flex;flex-wrap:wrap;gap:8px;padding:6px 22px 18px}
.house-ticket-actions button,.house-ticket-person-actions button{min-height:36px;padding:7px 12px;font-size:12px;border-radius:9px}
.house-ticket-actions .house-ticket-resolve{border-color:#c5d7f0;background:#edf5ff;color:#214f83}
.house-ticket-actions .house-ticket-resolve:hover{background:#e0edff}
.house-ticket-members{border-top:1px solid #e7ebf3;background:#fbfcfe}
.house-ticket-members>summary{display:flex;align-items:center;gap:9px;list-style:none;cursor:pointer;min-height:44px;padding:12px 22px;font-size:12px;color:#48617f}
.house-ticket-members>summary::-webkit-details-marker{display:none}
.house-ticket-members>summary:before{content:'›';font-size:20px;line-height:14px;transform:rotate(0deg);transition:transform .15s}
.house-ticket-members[open]>summary:before{transform:rotate(90deg)}
.house-ticket-member-count{margin-left:auto;white-space:nowrap;font-size:11px;color:#74839d}
.house-ticket-member-list{padding:0 22px;background:#fff}
.house-ticket-person{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 20px;padding:16px 0;border-top:1px solid #e9edf4;min-width:0}
.house-ticket-person-main{min-width:0}
.house-ticket-customer-email{display:block;font-size:13px;overflow-wrap:anywhere}
.house-ticket-person-title{margin:4px 0;font-size:13px}
.house-ticket-person-title .link-btn{min-height:0;padding:0;text-align:left;font-size:inherit;white-space:normal;overflow-wrap:anywhere}
.house-ticket-person-state{display:flex;flex-direction:column;align-items:flex-end;gap:7px;min-width:0}
.house-ticket-time{display:inline-block;white-space:nowrap;font-size:11px;color:#74839d;line-height:1.6}
.house-ticket-person-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px}
.house-ticket-person-actions .subtle{color:#7a8799}
.house-ticket-person-actions .house-ticket-copy-result{border-color:#ccdced;background:#f5f9ff;color:#3e5d80}
.house-ticket-person-actions .house-ticket-record-notice{border-color:#c5d7f0;background:#edf5ff;color:#214f83}
.house-ticket-copy-contact{display:inline-flex;align-items:center;gap:8px}
.house-ticket-copy-result{display:inline-flex;align-items:center;gap:6px}
.house-ticket-copy-result svg{width:14px;height:14px;flex:none}
.house-ticket-copy-contact .house-ticket-contact,.house-ticket-draft-tools .house-ticket-contact{margin-left:0}
.house-ticket-contact{display:inline-flex;align-items:center;margin-left:auto}
.house-ticket-contact .chat-link{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:30px;height:30px;min-width:30px;min-height:30px;padding:0;border:0;border-radius:50%;background:#788293;color:#fff;font-size:.8rem;font-weight:700;line-height:1;text-decoration:none}
.house-ticket-contact .chat-link[data-chat-channel="LINE"]{background:#06c755;color:#fff;font-size:.59rem;letter-spacing:-.2px}
.house-ticket-contact .chat-link[data-chat-channel="FACEBOOK"]{background:#1877f2;color:#fff;font-size:1.05rem}
.house-ticket-contact .chat-link:hover{filter:brightness(.95);text-decoration:none}
.house-ticket-notice-actor{color:#8190a4;font-size:11px}
.house-ticket-notice-blocked{grid-column:1/-1;font-size:12px;color:#94752c;margin:0;line-height:1.6}
.house-ticket-detail-notice{margin:12px 0 20px}
.house-ticket-detail-notice .house-ticket-person-actions{margin-top:10px}
.house-ticket-draft-tools{display:flex;gap:8px;align-items:center}
.house-ticket-notice-editor textarea{min-height:170px;line-height:1.8;resize:vertical}
.house-ticket-notice-editor .form-foot button[type=submit]{min-width:160px}
.house-ticket-template-picker>.field{margin-bottom:4px}
.house-ticket-template-status{font-size:12px;color:#8b7037;line-height:1.6;margin:5px 0}
.house-ticket-template-status:empty{display:none}
.house-ticket-template-picker>small{font-size:11px;line-height:1.6}
.house-ticket-progress{display:grid;gap:4px;margin-top:7px;font-size:11px;color:#62758f}
.house-ticket-progress-line{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px}
.house-ticket-progress-line svg{width:12px;height:12px;flex:none}
.house-ticket-progress-line>span{white-space:nowrap}
.house-ticket-customer-card{padding:19px 22px 0}
.house-ticket-customer-card>.house-ticket-identity{padding-bottom:10px}
.house-ticket-related-house{font-size:11px;color:#74839d;overflow-wrap:anywhere}
.house-ticket-related-house .link-btn{padding:0;min-height:0;font-size:inherit;white-space:normal;overflow-wrap:anywhere}
.house-ticket-preview-house{overflow-wrap:anywhere;margin:0 0 14px;font-size:16px}
.house-ticket-preview-section h3{font-size:14px;margin:20px 0 10px}
.house-ticket-preview-list{list-style:none;margin:0;padding:0;border:1px solid #e2e8f1;border-radius:10px;overflow:hidden}
.house-ticket-preview-list li{display:grid;gap:4px;padding:12px 14px;font-size:13px;overflow-wrap:anywhere}
.house-ticket-preview-list li+li{border-top:1px solid #e9edf4}
.house-ticket-preview-list li>span{font-size:12px;color:#6d7d96}
.house-ticket-skipped .house-ticket-preview-list{background:#fffaf2;border-color:#f0e3c8}
.house-ticket-repeat{background:#fff0f3;color:#be344e;white-space:nowrap;font-size:11px}
.house-ticket-closure-history{padding:0 22px 14px;font-size:12px;color:#647791}
.house-ticket-closure-history>details>summary{cursor:pointer;min-height:28px;line-height:28px}
.house-ticket-closure-history ol{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:7px}
.house-ticket-closure-history li{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 14px}
.house-ticket-closure-event{display:inline-flex;align-items:baseline;gap:6px;flex-wrap:wrap}
.house-ticket-preview .house-ticket-closure-history{padding:0}
#modal-body>.house-ticket-closure-history,#modal-body .modal-content>.house-ticket-closure-history{border:1px solid #f3dce1;border-radius:10px;padding:12px 15px;margin:0 0 18px;background:#fffafb}
@media(max-width:700px){
 .house-ticket-center{gap:23px;margin-top:15px}
 .house-ticket-head{padding:16px 15px 9px;grid-template-columns:minmax(0,1fr);gap:8px}
 .house-ticket-head-status{flex-direction:row;align-items:center;flex-wrap:wrap;gap:7px;padding-top:0}
 .house-ticket-identity h2{font-size:14px}
 .house-ticket-actions{padding:6px 15px 15px}
 .house-ticket-members>summary{padding:12px 15px}
 .house-ticket-member-list{padding:0 15px}
 .house-ticket-person{grid-template-columns:minmax(0,1fr);gap:8px;padding:14px 0}
 .house-ticket-person-state{flex-direction:row;align-items:center;flex-wrap:wrap;gap:7px 12px}
 .house-ticket-customer-card{padding:15px 15px 0}
 .house-ticket-meta{font-size:11px;gap:3px 10px}
 .house-ticket-closure-history{padding:0 15px 12px}
 .house-ticket-section-title{font-size:15px}
 .house-ticket-section-title>span{font-size:11px}
}

.ticket-queue-label{display:flex;flex-wrap:wrap;gap:6px 16px;padding:12px 20px;border-bottom:1px solid #e6e8ed;font-size:.85rem}.ticket-queue-label span{color:#737d8e}

/* Emphasize actionable work; completed filters remain accessible without counts. */
.house-task-tabs .ticket-tab-pending:not(.active){color:#92400e;font-weight:600}
.house-task-tabs .ticket-tab-history:not(.active){color:#687386;font-weight:400}
.house-ticket-count.ticket-count-pending{color:#92400e;font-weight:600}
