.cp-dialog{box-sizing:border-box;width:min(960px,calc(100vw - 28px));max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);padding:0;border:1px solid var(--line,#e5dfd1);border-radius:26px;background:var(--paper,#faf8f2);color:var(--ink,#272422);overflow:hidden}.cp-dialog::backdrop{background:#24251fd9;backdrop-filter:blur(5px)}.cp-dialog>header{display:flex;justify-content:space-between;gap:20px;padding:24px 28px;border-bottom:1px solid var(--line,#e5dfd1)}.cp-dialog h2{font-size:25px;margin:6px 0}.cp-dialog h3{font-size:17px;margin:0 0 10px}.cp-dialog p{font-size:12px;line-height:1.6;margin:8px 0;color:var(--muted,#77716a)}.cp-dialog .cp-kicker{font-size:10px;font-weight:800;letter-spacing:.12em;color:#9b780b}.cp-close{flex:none;width:44px;height:44px;border:1px solid var(--line,#e5dfd1);border-radius:13px;background:#fff;font-size:25px;cursor:pointer}.cp-body{padding:24px 28px;overflow:auto;max-height:calc(100vh - 235px);max-height:calc(100dvh - 235px)}.cp-dialog footer{padding:18px 28px;border-top:1px solid var(--line,#e5dfd1);display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.cp-dialog button,.cp-dialog .cp-link{min-height:44px}.cp-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.cp-dialog .primary-action,.cp-dialog .secondary-action{font-size:12px;white-space:normal;padding:11px 16px;line-height:1.4}.cp-notice{border:1px solid #eed99f;background:linear-gradient(120deg,#fff7dc,#fffdf7);border-radius:16px;padding:16px}.cp-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.cp-metric{padding:18px;border:1px solid #ecdfb9;border-radius:18px;background:linear-gradient(135deg,#fff8df,#fffdf8);min-width:0}.cp-metric strong{display:block;font-size:25px;margin:8px 0}.cp-metric span{font-size:12px}.cp-list{display:grid;gap:12px}.cp-record{border:1px solid var(--line,#e5dfd1);border-radius:16px;padding:16px;background:#ffffffa8;min-width:0;overflow-wrap:anywhere}.cp-record strong{font-size:14px}.cp-record small{display:block;color:var(--muted,#77716a);font-size:12px;line-height:1.6;margin-top:7px}.cp-record .cp-link{display:inline-flex;align-items:center;gap:8px;margin-top:12px;color:#3c6483;background:#eaf0f7;border:1px solid #bfcede;padding:0 14px;border-radius:10px;font-size:12px;text-decoration:none}.cp-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.cp-form label{display:grid;align-content:start;gap:7px;min-width:0;font-size:12px;font-weight:700;color:var(--muted,#77716a)}.cp-form input,.cp-form select,.cp-form textarea{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid #ddd8cd;border-radius:12px;background:#fff;padding:11px 13px;font:inherit;font-weight:400;color:var(--ink,#272422)}.cp-wide{grid-column:1/-1}.cp-form .cp-confirm{display:flex;align-items:center;gap:10px;background:#fff5d7;padding:14px;border-radius:12px;line-height:1.5}.cp-confirm input{width:20px;height:20px;min-height:20px;flex:none;accent-color:#d3a300}.cp-error{color:#953a25!important}.cp-dialog [hidden]{display:none!important}.cp-preview{border-top:1px solid #ddd2ae;padding-top:20px;margin-top:20px}.cp-form .cp-help{font-size:11px;font-weight:400;line-height:1.5}.cp-dialog .cp-counts{font-size:12px;font-weight:700;color:#8c6a08}@media(max-width:700px){.cp-dialog{width:calc(100vw - 16px);border-radius:20px;max-height:calc(100dvh - 16px)}.cp-dialog>header{padding:18px}.cp-dialog h2{font-size:21px}.cp-body{padding:18px;max-height:calc(100dvh - 235px)}.cp-dialog footer{padding:14px 18px;padding-bottom:max(14px,env(safe-area-inset-bottom,0px))}.cp-form,.cp-metrics{grid-template-columns:minmax(0,1fr)}.cp-form input,.cp-form select,.cp-form textarea{font-size:16px}.cp-toolbar>*{flex:1 1 150px}.cp-dialog footer p{flex-basis:100%}}
.cp-dialog{background:#faf8f2}
/* Preserve a touch-sized exit on short, landscape phone viewports too. */
@media(max-width:1024px) and (max-height:500px){.project-conversation-head .dialog-close{width:44px;min-width:44px;height:44px;min-height:44px;flex-shrink:0}}

/* Project-creation reference: fixed chrome, clear steps, illustrated guide and one content scroller. */
.cp-dialog[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;width:min(1000px,calc(100vw - 32px));height:min(770px,calc(100vh - 32px));height:min(770px,calc(100dvh - 32px));max-height:calc(100dvh - 32px)}
.cp-dialog>header{padding:20px 26px;align-items:flex-start;gap:16px;background:#faf9f5}
.cp-dialog h2{font-size:24px;line-height:1.2;margin:7px 0 6px}
.cp-dialog>header p{margin:0;font-size:12px;overflow-wrap:anywhere}
.cp-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:12px 22px;border-bottom:1px solid var(--line,#e5dfd1);background:#fbfaf7}
.cp-steps button{border:0;border-radius:12px;background:transparent;padding:8px;display:flex;align-items:center;gap:9px;min-width:0;font:inherit;font-size:12px;color:#7c7970;text-align:left;cursor:pointer}
.cp-steps button span{display:grid;place-items:center;flex:none;width:28px;height:28px;border:1px solid #e3dfd5;border-radius:50%;background:#fff;font-size:11px}
.cp-steps button[aria-current]{background:#fff5d5;color:#302b1c}
.cp-steps button[aria-current] span{background:#ffbf00;border-color:#ffbf00;font-weight:800}
.cp-steps button:disabled{opacity:.42;cursor:not-allowed}
.cp-body{padding:0;max-height:none!important;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.cp-layout{display:grid;grid-template-columns:235px minmax(0,1fr);min-height:100%}
.cp-guide{align-self:stretch;position:relative;box-sizing:border-box;min-width:0;padding:24px 22px;background:linear-gradient(145deg,#fff8df,#faf8f0 78%);border-right:1px solid #e9e2cf}
.cp-guide-art{height:118px;position:relative;display:flex;align-items:center;margin:8px 0 12px;overflow:hidden}
.cp-guide-art>svg{box-sizing:content-box;width:44px;height:44px;padding:18px;color:#51400a;background:#ffca24;border-radius:22px;transform:rotate(-5deg);box-shadow:0 12px 28px #d8b84724}
.cp-guide-art>span{font-size:78px;font-weight:800;line-height:1;color:#d4b85520;position:absolute;right:-3px;bottom:0;letter-spacing:-.07em}
.cp-guide h3{font-size:19px;line-height:1.35;margin:0 0 8px;overflow-wrap:anywhere}
.cp-guide p{font-size:12px;margin:0 0 22px}
.cp-client-summary{display:flex;align-items:center;gap:10px;border-top:1px solid #e8ddba;padding-top:17px;min-width:0}
.cp-avatar{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:12px;background:#fff2bf;font-size:11px;font-weight:800;color:#775d15}
.cp-client-summary>div{min-width:0}.cp-client-summary strong{display:block;font-size:12px;overflow-wrap:anywhere;line-height:1.45}
.cp-client-summary small{display:block;color:#827c6e;font-size:11px;line-height:1.5;overflow-wrap:anywhere;margin-top:2px}
.cp-side-counts{display:grid;gap:9px;margin:18px 0 0;font-size:11px;color:#7b7567}
.cp-side-counts>div{display:flex;justify-content:space-between;gap:12px}.cp-side-counts dd{margin:0;font-weight:800;color:#51482f}
.cp-content{min-width:0;padding:26px 28px 30px}
.cp-section-heading h3{font-size:22px;line-height:1.3;margin:8px 0 7px}
.cp-section-heading p{margin:0 0 23px;font-size:12px}
.cp-module-list{display:grid;gap:12px}
.cp-module{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:0 13px;padding:14px;border:1px solid #e7e1d4;border-radius:17px;background:linear-gradient(115deg,#fffcf3,#ffffffc9)}
.cp-module-icon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#fff3c9;color:#9c7919;border:1px solid #efdfad}
.cp-module-icon svg{width:23px;height:23px}.cp-module h4{font-size:14px;margin:0;display:flex;align-items:center;justify-content:space-between;gap:10px}
.cp-module h4 span{display:grid;place-items:center;min-width:24px;height:24px;border-radius:8px;background:#f2efe7;color:#746d5e;font-size:11px}
.cp-module p{font-size:11px;margin:4px 0 8px}.cp-module small{display:block;font-size:10px;color:#9a7b26;margin:0 0 8px}
.cp-module button{grid-column:3;justify-self:end;max-width:145px;font-size:11px!important;min-height:38px!important;padding:8px 12px!important}
.cp-empty{padding:13px 0 0;font-size:11px!important}
.cp-existing{margin-top:22px;border-top:1px solid #e8e1d2;padding-top:14px}
.cp-existing summary{min-height:44px;cursor:pointer;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:space-between}
.cp-existing summary span{font-weight:400;color:#8b8061}.cp-existing .cp-list{margin-top:14px}
.cp-form{margin:0;gap:17px 16px}.cp-form>h3{display:none}
.cp-form label{font-size:11px;gap:7px}.cp-form input,.cp-form select,.cp-form textarea{min-height:44px;border-radius:12px;padding:11px 12px;font-size:13px;background:#fff}
.cp-form textarea{min-height:82px;resize:vertical}.cp-form .cp-confirm{font-size:11px;padding:13px;align-items:flex-start}
.cp-confirm input{margin-top:1px;min-height:20px}.cp-form>p{margin:0}
.cp-dialog footer{padding:15px 24px;gap:14px;flex-wrap:nowrap;background:#faf9f5}
.cp-dialog footer>p{font-size:10px;margin:0;max-width:290px}.cp-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.cp-dialog footer button{font-size:12px;padding:11px 16px;min-height:44px}
.cp-preview{border-top:0;padding-top:18px;margin-top:0}.cp-notice{padding:14px 16px;border-radius:14px}.cp-notice strong{font-size:12px}
.cp-list>h3{font-size:14px;margin:12px 0 0}.cp-list>h3:first-child{margin-top:0}.cp-record{padding:14px;border-radius:13px}.cp-record strong{font-size:13px}.cp-record small{font-size:11px}
.cp-dialog button:focus-visible,.cp-dialog summary:focus-visible{outline:2px solid #a77e00;outline-offset:3px}
.cp-discard{width:min(420px,calc(100vw - 32px));box-sizing:border-box;border:1px solid #e4dac0;border-radius:20px;padding:24px;background:#fcfaf4;color:#29251e}.cp-discard::backdrop{background:#28261fc9}.cp-discard h2{font-size:21px;margin:0 0 10px}.cp-discard p{font-size:13px;line-height:1.6;color:#777064;margin:0 0 20px}.cp-discard>div{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap}.cp-discard button{min-height:44px;font-size:12px;padding:10px 14px}
.cp-footer-actions .cp-visit-button{background:#edf2f6;border:1px solid #bed0dc;color:#385f79}
.cp-contract-choice{display:flex;gap:8px;flex-wrap:wrap}.cp-contract-choice button{min-height:44px;font-size:12px}.cp-contract-choice [aria-pressed=true]{background:#fff1bd;border-color:#e4bf55;color:#6c5110}
.cp-contract-summary{padding:16px;border:1px solid #eadcb2;border-radius:14px;background:linear-gradient(135deg,#fff9e6,#fffdfa);min-width:0;overflow-wrap:anywhere}.cp-contract-summary strong{font-size:13px}.cp-contract-summary dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:15px 0}.cp-contract-summary dt{font-size:10px;color:#80765c}.cp-contract-summary dd{font-size:13px;font-weight:700;margin:5px 0}.cp-contract-summary small{font-size:11px;color:#80765c}
@media(max-width:700px){.cp-contract-choice{display:grid;grid-template-columns:minmax(0,1fr)}.cp-contract-summary dl{grid-template-columns:minmax(0,1fr)}.cp-contract-choice button{font-size:13px}}
@media(max-width:700px){
 .cp-dialog[open]{width:calc(100vw - 16px);height:calc(100vh - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:20px}
 .cp-dialog>header{padding:16px 18px}.cp-dialog h2{font-size:20px}.cp-close{width:44px;height:44px}
 .cp-steps{padding:8px;gap:2px}.cp-steps button{padding:6px 2px;flex-direction:column;gap:4px;min-height:58px;text-align:center;font-size:10px}.cp-steps button span{width:24px;height:24px}
 .cp-layout{grid-template-columns:minmax(0,1fr)}.cp-guide{position:relative;top:auto;min-height:0;border-right:0;border-bottom:1px solid #e9e2cf;padding:15px 18px}
 .cp-guide>.cp-kicker,.cp-guide>h3,.cp-guide>p{display:none}.cp-guide-art{position:absolute;right:17px;top:12px;width:43px;height:43px;margin:0}.cp-guide-art>svg{width:24px;height:24px;padding:8px;border-radius:13px}.cp-guide-art>span{display:none}
 .cp-client-summary{padding:0 54px 0 0;border:0}.cp-side-counts{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:13px;gap:9px;font-size:10px}.cp-side-counts>div{gap:4px}
 .cp-content{padding:21px 18px}.cp-section-heading h3{font-size:21px}.cp-section-heading p{margin-bottom:19px}
 .cp-form{grid-template-columns:minmax(0,1fr);gap:16px}.cp-form input,.cp-form select,.cp-form textarea{font-size:16px}.cp-form label{font-size:12px}
 .cp-module{grid-template-columns:auto minmax(0,1fr);padding:14px;gap:0 11px}.cp-module button{grid-column:2;min-height:44px!important;width:100%;max-width:none;justify-self:stretch}.cp-module-icon{width:37px;height:37px}.cp-module h4{font-size:13px}
 .cp-dialog footer{padding:12px 16px;padding-bottom:max(12px,env(safe-area-inset-bottom,0px));flex-direction:column;align-items:stretch;gap:9px}
 .cp-dialog footer>p{max-width:none;font-size:9px;flex-basis:auto}.cp-footer-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cp-footer-actions button{padding:10px 8px;font-size:11px}
 .cp-footer-actions .cp-visit-button{grid-column:1/-1}
}
.cp-dialog .cp-record .cp-evidence{white-space:pre-wrap;overflow-wrap:anywhere}
