:root{--bg:#090b0e;--panel:#14181d;--line:#2c333c;--text:#edf1f5;--muted:#8e99a7;--red:#b83a30}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Segoe UI,Arial,sans-serif}header{padding:14px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;background:#0c0f13}header h1{font-size:19px;margin:0}header span,.muted{color:var(--muted);font-size:12px}header b{font-size:12px;color:#d5dbe2}main{display:grid;grid-template-columns:390px minmax(0,1fr);gap:14px;padding:14px}section{background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:13px;margin-bottom:12px}h2{font-size:14px;margin:0 0 10px}.row{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin:8px 0}label{font-size:12px;color:#bbc3cd;display:flex;gap:6px;align-items:center}button,input,select{background:#1b2027;border:1px solid #37404a;color:#eee;border-radius:6px;padding:7px 9px}button{cursor:pointer}.primary{background:var(--red);border-color:#d04a3f}textarea{width:100%;resize:vertical;background:#080a0d;color:#e9edf1;border:1px solid var(--line);border-radius:7px;padding:10px;font:12px/1.45 Consolas,monospace}.source{height:220px}.filtered{height:38vh;min-height:260px}.workspace{min-width:0}.head{display:flex;justify-content:space-between;align-items:center;gap:10px}.head h2{margin-bottom:3px}.chips{display:flex;gap:5px;flex-wrap:wrap}.chip{font-size:11px}.filtertitle{font-size:12px;font-weight:700;color:#bbc3cd;margin:10px 0 7px}.filtergroup{margin-top:10px;padding-top:2px;border-top:1px solid #242b33}.hint{font-size:11px;line-height:1.4;color:#7f8996;margin:10px 0 0}.previewbox{position:sticky;top:10px}.previewbox #stage{min-height:320px;background:linear-gradient(135deg,#252b32,#0c0f13);padding:18px;overflow:auto}.chat{font-family:Arial,sans-serif;font-weight:700;line-height:1.27;white-space:pre-wrap;overflow-wrap:anywhere;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000}.ts{color:#aaa}#editstatus{color:#d9ad5b}@media(max-width:950px){main{grid-template-columns:1fr}.previewbox{position:static}.filtered{height:300px}}
header nav{display:flex;gap:6px;margin-left:auto;margin-right:18px}header nav a{color:#aab3bd;text-decoration:none;font-size:12px;padding:7px 10px;border:1px solid #303741;border-radius:6px}header nav a.active,header nav a:hover{color:#fff;background:#1c2229}

.newproject{padding:6px 9px;font-size:11px;background:#161b21;border-color:#39424d;color:#cbd2da}
.newproject:hover{background:#222932}

.filter-tools{display:flex;flex-direction:column;gap:6px;margin:7px 0}
.filter-tools input[type=search]{width:100%;box-sizing:border-box}
.filter-actions{display:flex;gap:5px;flex-wrap:wrap}
.filter-actions button{padding:5px 8px;font-size:11px}
.person-row,.message-person-row{display:flex;align-items:center;gap:5px}
.person-row .chip,.message-person-row .chip{flex:1}
.only-person{padding:3px 7px;font-size:10px;white-space:nowrap}
.filter-hidden{display:none!important}

.wip-banner{margin:0;padding:9px 14px;background:#332b12;border-bottom:1px solid #725d1c;color:#eadca7;font-size:12px;line-height:1.45}
.wip-banner strong{color:#ffd86a}
.wip-banner a{color:#ffe39a;text-decoration:underline;font-weight:700}
#people,#messages{max-height:285px;overflow-y:auto;overflow-x:hidden;padding-right:5px;align-content:start}
#people::-webkit-scrollbar,#messages::-webkit-scrollbar{width:8px}
#people::-webkit-scrollbar-thumb,#messages::-webkit-scrollbar-thumb{background:#3a434d;border-radius:6px}
.filtered-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:8px}
.filtered-actions .primary{white-space:nowrap}

/* How to Use */
.howto-main{display:block;max-width:1000px;margin:0 auto;padding:20px 14px 40px}.howto-wrap{max-width:820px;margin:0 auto}.howto-hero{padding:20px}.howto-hero h2{font-size:22px;margin-bottom:8px}.howto-hero p,.howto-step p{color:#c3cad3;font-size:13px;line-height:1.65;margin:8px 0}.howto-step{padding:18px}.howto-step h2{font-size:16px;margin-bottom:10px}.howto-step strong{color:#fff}.howto-step a{color:#ffe39a}.size-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.size-grid div{display:flex;flex-direction:column;gap:3px;background:#0d1014;border:1px solid #2c333c;border-radius:7px;padding:10px 12px}.size-grid span{color:var(--muted);font-size:11px}@media(max-width:650px){header{flex-wrap:wrap;gap:10px}header nav{order:3;width:100%;margin:0;overflow-x:auto}.size-grid{grid-template-columns:1fr}.howto-main{padding-top:14px}}
.history-main{max-width:1100px;margin:24px auto;padding:0 18px}.history-toolbar{display:flex;gap:10px;align-items:center;margin:14px 0}.history-toolbar input{flex:1}.history-list{display:grid;gap:10px}.history-card{background:#1c2229;border:1px solid #343c45;border-radius:8px;padding:14px;display:flex;justify-content:space-between;gap:16px;align-items:center}.history-card h3{margin:0 0 5px}.history-meta{font-size:13px;color:#9ca6b0}.history-actions{display:flex;gap:7px;flex-wrap:wrap}.privacy-note{padding:10px 12px;border:1px solid #4b5560;border-radius:7px;background:#171c21;color:#c8d0d8;margin-bottom:16px}

/* v1.8.1 redaction: wrap text in single % markers, e.g. %secret% */
.redacted{display:inline;color:transparent!important;background:#050505;border-radius:2px;box-shadow:0 0 2px #000;user-select:none;-webkit-user-select:none}
/* v1.9 UX PREVIEW */
:root{--panel2:#101419;--soft:#1a2027;--accent:#c4473c}.brand{min-width:190px}.ux-main{grid-template-columns:330px minmax(0,1fr);gap:18px;max-width:1600px;margin:0 auto;padding:18px}.ux-sidebar{min-width:0}.ux-sidebar section,.ux-workspace section{box-shadow:0 8px 30px rgba(0,0,0,.16)}.section-heading{display:flex;gap:10px;align-items:flex-start;margin-bottom:12px}.section-heading h2{font-size:15px;margin:1px 0 3px}.section-heading p{font-size:11px;color:var(--muted);margin:0;line-height:1.35}.step{display:grid;place-items:center;width:23px;height:23px;border-radius:50%;background:var(--accent);font-size:11px;font-weight:800;flex:0 0 auto}.field-stack{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:8px}.field-stack label{display:grid;gap:5px}.source{height:155px}.action-row{display:flex;gap:6px;margin-top:8px}.action-row .primary{flex:1}.filters-card{padding-bottom:12px}.compact-checks{display:flex;gap:16px;padding:8px 0}.more-filters{border-top:1px solid #272e36;margin-top:8px;padding-top:9px}.more-filters summary,.appearance summary{cursor:pointer;color:#c9d0d8;font-size:12px;font-weight:700;user-select:none}.time-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.time-grid label{display:grid;gap:4px}.ux-workspace{display:grid;grid-template-rows:minmax(390px,auto) minmax(330px,1fr);gap:14px;min-width:0}.ux-workspace section{margin:0}.editor-card{display:flex;flex-direction:column;min-height:440px}.eyebrow{display:block;font-size:10px;font-weight:800;letter-spacing:.12em;color:#c86c63;margin-bottom:3px}.editor-card .filtered{height:auto;min-height:310px;flex:1;font-size:13px;line-height:1.55}.status-cluster{display:flex;gap:12px;align-items:center}.saved-status{font-size:11px;color:#8fc59d}.sticky-actions{display:flex;gap:7px;justify-content:flex-end;padding-top:10px;border-top:1px solid #252c34;margin-top:10px}.sticky-actions .primary{min-width:175px}.previewbox{position:relative;top:auto}.previewbox #stage{min-height:300px;max-height:48vh;border-radius:8px;background:linear-gradient(135deg,#20262d,#0b0e12);padding:24px}.appearance{position:relative}.appearance>summary{list-style:none;border:1px solid #37404a;border-radius:6px;padding:7px 10px;background:#1b2027}.appearance>summary::-webkit-details-marker{display:none}.appearance-pop{position:absolute;right:0;top:38px;z-index:10;width:260px;padding:12px;background:#151a20;border:1px solid #3a434d;border-radius:9px;box-shadow:0 15px 40px rgba(0,0,0,.45);display:grid;gap:9px}.appearance-pop label{justify-content:space-between}.inline-range{display:flex;align-items:center;gap:6px}.preview-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:10px}.wip-banner{text-align:center;background:#171d23;border-color:#2d3741;color:#aeb8c3}.wip-banner strong{color:#e6ebf0}@media(max-width:1100px){.ux-main{grid-template-columns:300px 1fr}}@media(max-width:850px){.ux-main{grid-template-columns:1fr}.ux-workspace{grid-template-rows:auto}.field-stack{grid-template-columns:1fr}.appearance-pop{right:auto;left:0}}

/* v1.9 UX test: core chat styling stays visible for users who export directly */
.chat-style-bar{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin:12px 0;padding:10px 12px;background:#0e1217;border:1px solid #2b333c;border-radius:8px}
.chat-style-bar label{display:grid;gap:5px;font-size:11px;font-weight:700;color:#aeb8c3}
.chat-style-bar select{min-width:105px}
.chat-style-bar .inline-range{min-width:145px}
.chat-style-bar .inline-range input{width:110px;padding:0}
.chat-style-bar .style-check{display:flex;align-items:center;gap:6px;min-height:33px;padding:0 3px;white-space:nowrap}
.chat-style-bar .style-check input{margin:0}
@media(max-width:700px){.chat-style-bar{align-items:stretch}.chat-style-bar label{flex:1 1 130px}.chat-style-bar .style-check{flex:0 1 auto}}
/* v1.9 UX preview layout corrections */
.editor-card>.head>.section-heading,.previewbox>.head>.section-heading{margin-bottom:0}
.editor-card>.head>.section-heading h2,.previewbox>.head>.section-heading h2{margin:1px 0 3px;font-size:15px}
.editor-card>.head>.section-heading p,.previewbox>.head>.section-heading p{font-size:11px;color:var(--muted);margin:0;line-height:1.35}
#bgopacitywrap.is-disabled{opacity:.42;pointer-events:none}
.preview-empty{display:grid;place-items:center;min-height:90px;color:#77818d;font-size:12px;text-align:center}
body:not(.has-log) .filters-card{opacity:.55}
body:not(.has-log) .filters-card input,body:not(.has-log) .filters-card button,body:not(.has-log) .filters-card summary{pointer-events:none}
body:not(.has-log) .editor-card .filtered{min-height:150px}
body:not(.has-log) .editor-card{min-height:260px}
body:not(.has-log) .ux-workspace{grid-template-rows:auto auto}
body:not(.has-log) .previewbox #stage{min-height:150px}
.chat-style-bar #width{min-width:105px}

/* v1.9 UX input sizing */
.field-stack{grid-template-columns:145px 175px;justify-content:start;align-items:end}.field-stack select,.field-stack input{width:100%;box-sizing:border-box}@media(max-width:850px){.field-stack{grid-template-columns:145px 175px}}@media(max-width:430px){.field-stack{grid-template-columns:1fr}}
.saveproject{padding:6px 10px;font-size:11px;background:#2b6f45;border-color:#438b5e;color:#fff;margin-left:6px}.saveproject:hover{background:#358455}.saveproject.has-unsaved{box-shadow:0 0 0 1px #e0ad55 inset}
.blurred{display:inline;filter:blur(4px);-webkit-filter:blur(4px);user-select:none;-webkit-user-select:none}
