/* Patchwork.bg — optional AI author writing assistant */
.pw-step-ai{overflow:visible}
.pw-ai-step-content{display:grid;grid-template-columns:minmax(0,1fr) 268px;gap:58px;align-items:start;min-width:0;overflow:visible}
.pw-ai-story-form{min-width:0}

/* Lightweight helper aside, deliberately separated from the white form card. */
.pw-ai-launch-card{position:relative;align-self:start;justify-self:end;width:268px;box-sizing:border-box;padding:18px 18px 16px;border:1px solid rgba(63,127,137,.16);border-radius:16px;background:#faf8f3;box-shadow:0 10px 22px rgba(43,43,43,.03)}
.pw-ai-thread-icon{display:flex;align-items:center;justify-content:center;min-height:88px;margin:0 0 12px;padding:10px 12px 8px;border:1px solid #ece4d8;border-radius:12px;background:#f4f0e8;overflow:hidden}
.pw-ai-thread-icon img{display:block;width:100%;max-width:188px;height:auto;max-height:86px;object-fit:contain;object-position:center center;mix-blend-mode:multiply}
.pw-ai-card-kicker{display:block;margin-bottom:6px;color:#3f7f89;font-size:9.5px;font-weight:800;letter-spacing:1.25px}
.pw-ai-launch-card h3{margin:0 0 10px!important;font-family:"Cormorant Garamond",serif!important;font-size:26px;line-height:1.04;font-weight:600!important;color:#2b2b2b}
.pw-ai-launch-card p{margin:0 0 9px;color:#585858;font-size:12px;line-height:1.52}.pw-ai-launch-card p strong{color:#2b2b2b}
.pw-ai-launch-list{margin:3px 0 10px;padding-left:18px;color:#4d5758;font-size:12px;line-height:1.5}.pw-ai-launch-list li{margin:2px 0}.pw-ai-launch-edit{color:#6c7374!important;font-size:11.1px!important}
.pw-ai-launch{width:100%;min-height:42px;padding:10px 12px;border:1px solid #c8dddd;border-radius:10px;background:#edf5f5;color:#356a72;font:700 12px/1.2 inherit;cursor:pointer;box-shadow:none}.pw-ai-launch:hover{background:#e3eff0}.pw-ai-launch.is-open{background:#356a72;color:#fff;box-shadow:0 4px 11px rgba(63,127,137,.14);border-color:#356a72}
.pw-ai-launch-card small{display:block;margin-top:8px;text-align:center;color:#778082;font-size:9.8px;line-height:1.35}
@media(min-width:1360px){.pw-ai-step-content{grid-template-columns:minmax(0,1fr) 268px;gap:84px}.pw-ai-launch-card{transform:translateX(78px)}}
@media(min-width:1600px){.pw-ai-launch-card{transform:translateX(108px)}}

/* Open assistant spans the form + helper area. */
.pw-ai-panel{grid-column:1/-1;margin:3px 0 4px;padding:24px;border:1px solid #d6e8e9;border-radius:16px;background:#f7fbfb;box-shadow:0 12px 30px rgba(43,43,43,.04)}
.pw-ai-panel[hidden],.pw-ai-results[hidden]{display:none!important}
.pw-ai-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.pw-ai-panel-title{display:flex;align-items:center;gap:12px}.pw-ai-intro-icon{display:flex;align-items:center;justify-content:center;flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:#3f7f89;color:#fff;font-size:20px}.pw-ai-eyebrow{display:block;margin-bottom:2px;color:#3f7f89;font-size:10px;font-weight:800;letter-spacing:1.2px}.pw-ai-panel h3{margin:0!important;font-family:"Cormorant Garamond",serif!important;font-size:31px;line-height:1.05;font-weight:600!important}.pw-ai-close{border:0;background:transparent;color:#7c8485;font:300 28px/1 sans-serif;cursor:pointer;padding:0 4px}.pw-ai-close:hover{color:#d96767}
.pw-ai-intro{margin-bottom:19px;padding:16px 18px;border:1px solid #e1eded;border-radius:11px;background:#fff}.pw-ai-intro p{margin:0 0 7px;color:#555;font-size:13px;line-height:1.58}.pw-ai-intro p:last-child{margin-bottom:0}.pw-ai-privacy{padding-top:7px;border-top:1px solid #eee;color:#737b7c!important;font-size:11.5px!important}
.pw-ai-unavailable{margin:0 0 16px;padding:11px 13px;border-radius:9px;background:#fff4ef;color:#8a544a;font-size:13px;font-weight:650}

/* Shared questionnaire */
.pw-ai-questions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pw-ai-question{display:grid;grid-template-columns:31px minmax(0,1fr);gap:9px;padding:13px;border:1px solid #ece8e2;border-radius:11px;background:#fcfbf9}.pw-ai-question-no{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#e7f2f3;color:#3f7f89;font-size:11px;font-weight:800}.pw-ai-question-body{min-width:0}.pw-ai-question label{display:block;margin:2px 0 7px;font-size:12.5px;font-weight:700;line-height:1.42}.pw-ai-question textarea{width:100%;min-height:66px;padding:9px 10px;border:1px solid #d7dee0;border-radius:7px;background:#fff;color:#2b2b2b;font:13.5px/1.45 inherit;resize:vertical;box-sizing:border-box}.pw-ai-question textarea:focus{outline:none;border-color:#3f7f89;box-shadow:0 0 0 3px rgba(63,127,137,.08)}

/* Tone + voice */
.pw-ai-options-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(250px,.8fr);gap:14px;margin:18px 0 15px}.pw-ai-tone{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 15px;margin:0;padding:14px;border:1px solid #e2ecec;border-radius:10px;background:#fff}.pw-ai-tone legend{padding:0 6px;font-size:13px;font-weight:700}.pw-ai-tone label{display:flex;gap:7px;align-items:flex-start;color:#555;font-size:12.5px}.pw-ai-tone input{margin-top:3px}.pw-ai-voice{display:grid;grid-template-columns:19px minmax(0,1fr);gap:9px;margin:0;padding:14px;border-radius:10px;background:#f7f4ef;color:#555;font-size:12.5px;cursor:pointer}.pw-ai-voice input{margin-top:3px}.pw-ai-voice strong{display:block;color:#3a3a3a}.pw-ai-voice small{display:block;margin-top:4px;color:#777;line-height:1.45}
.pw-ai-generate-row{display:flex;align-items:center;gap:13px;flex-wrap:wrap}.pw-ai-generate,.pw-ai-use,.pw-ai-use-both{min-height:44px;padding:10px 16px;border:0;border-radius:8px;background:#3f7f89;color:#fff;font:700 13px/1.2 inherit;cursor:pointer}.pw-ai-generate:hover,.pw-ai-use:hover,.pw-ai-use-both:hover{background:#356a72}.pw-ai-generate:disabled,.pw-ai-variant:disabled{opacity:.5;cursor:not-allowed}.pw-ai-status{font-size:12px;color:#557275}.pw-ai-status.is-error{color:#a23d32;font-weight:650}

/* Results */
.pw-ai-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:21px}.pw-ai-results-intro{grid-column:1/-1;display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;padding-top:4px}.pw-ai-results-intro strong{font-family:"Cormorant Garamond",serif;font-size:25px}.pw-ai-results-intro span{color:#6d7474;font-size:12px}.pw-ai-result{padding:16px;border:1px solid #d8e8dd;border-radius:12px;background:#f8fcf9}.pw-ai-result-head{margin-bottom:10px}.pw-ai-result-label{display:block;margin-bottom:3px;color:#3f7f89;font-size:9.5px;font-weight:800;letter-spacing:1.15px}.pw-ai-result-head strong{display:block;color:#385a43;font-size:13px}.pw-ai-result textarea{width:100%;padding:12px;border:1px solid #cfded3;border-radius:8px;background:#fff;color:#2b2b2b;font:14px/1.58 inherit;resize:vertical;box-sizing:border-box}.pw-ai-result textarea:focus{outline:none;border-color:#568b65;box-shadow:0 0 0 3px rgba(86,139,101,.08)}.pw-ai-result-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.pw-ai-variant{min-height:42px;padding:9px 13px;border:1px solid #a9c2ae;border-radius:8px;background:#fff;color:#456b50;font:700 11.5px/1.2 inherit;cursor:pointer}.pw-ai-variant:hover{background:#eef7f0}
.pw-ai-use-both-row{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:4px 0 1px}.pw-ai-use-both{min-width:220px;background:#d96767}.pw-ai-use-both:hover{background:#c85b5b}.pw-ai-use-both-row small{color:#737b7c;font-size:10.5px}

@media(max-width:1160px){
  .pw-ai-step-content{grid-template-columns:1fr;gap:14px}
  .pw-ai-launch-card{grid-row:1;display:grid;grid-template-columns:96px minmax(0,1fr);column-gap:14px;align-items:center;width:100%;transform:none}
  .pw-ai-thread-icon{grid-row:1/5;min-height:78px;height:auto;margin:0;padding:8px}
  .pw-ai-thread-icon img{width:100%;height:auto;max-height:70px}
  .pw-ai-card-kicker,.pw-ai-launch-card h3,.pw-ai-launch-card p,.pw-ai-launch-list{grid-column:2}
  .pw-ai-launch,.pw-ai-launch-card small{grid-column:1/-1}
  .pw-ai-launch-card h3{font-size:24px}
  .pw-ai-launch-list{margin-top:0}
  .pw-ai-story-form{grid-row:2}
  .pw-ai-panel{grid-row:3}
  .pw-ai-questions{grid-template-columns:1fr}
  .pw-ai-options-grid{grid-template-columns:1fr}
  .pw-ai-results{grid-template-columns:1fr}
}
@media(max-width:760px){
  .pw-ai-step-content{display:flex;flex-direction:column;gap:14px}
  .pw-ai-launch-card{order:-1;display:block;width:100%;box-sizing:border-box;padding:17px}
  .pw-ai-story-form{width:100%;box-sizing:border-box}
  .pw-ai-panel{width:100%;box-sizing:border-box}
  .pw-ai-thread-icon{min-height:74px;height:auto;margin:0 0 9px;padding:8px}
  .pw-ai-thread-icon img{width:100%;height:auto;max-height:66px}
  .pw-ai-launch-card h3{font-size:24px}
  .pw-ai-panel{padding:15px;margin-left:0;margin-right:0}
  .pw-ai-panel h3{font-size:27px}
  .pw-ai-panel-title{align-items:flex-start}
  .pw-ai-intro-icon{width:36px;height:36px;flex-basis:36px}
  .pw-ai-questions{grid-template-columns:1fr}
  .pw-ai-question{grid-template-columns:27px minmax(0,1fr);padding:11px}
  .pw-ai-question-no{width:25px;height:25px}
  .pw-ai-question textarea{font-size:16px}
  .pw-ai-tone{grid-template-columns:1fr}
  .pw-ai-results{grid-template-columns:1fr}
  .pw-ai-result-actions{flex-direction:column}
  .pw-ai-result-actions button,.pw-ai-generate,.pw-ai-use-both{width:100%}
  .pw-ai-generate-row{display:block}
  .pw-ai-status{display:block;margin-top:8px}
  .pw-ai-use-both-row{display:block}
  .pw-ai-use-both-row small{display:block;margin-top:7px;text-align:center}
}

/* 1.10.0 — extended author-profile AI modules */
.pw-ai-inline-helper{margin:4px 0 16px;padding:15px 16px;border:1px solid #dfe9e9;border-radius:12px;background:#f8fbfb}
.pw-ai-inline-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.pw-ai-inline-head strong{display:block;margin:0 0 4px;font-size:14px}.pw-ai-inline-head p{margin:0;color:#6a7374;font-size:12px;line-height:1.5}.pw-ai-inline-open,.pw-ai-work-open{flex:0 0 auto;min-height:38px;padding:8px 12px;border:1px solid #bdd5d7;border-radius:8px;background:#fff;color:#356a72;font:700 11.5px/1.2 inherit;cursor:pointer}.pw-ai-inline-open:hover,.pw-ai-work-open:hover{background:#edf6f6}
.pw-ai-inline-panel{margin-top:14px;padding-top:14px;border-top:1px solid #e0ecec}.pw-ai-inline-panel[hidden],.pw-ai-work-panel[hidden],.pw-ai-activity-results[hidden]{display:none!important}.pw-ai-inline-note{margin:0 0 12px;color:#6f7778;font-size:11.5px;line-height:1.5}
.pw-ai-inline-questions,.pw-ai-work-questions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pw-ai-inline-questions label,.pw-ai-work-questions label{display:block;padding:10px;border:1px solid #ece8e2;border-radius:9px;background:#fff}.pw-ai-inline-questions span,.pw-ai-work-questions span{display:block;margin-bottom:6px;font-size:12px;font-weight:650;line-height:1.4}.pw-ai-inline-questions textarea,.pw-ai-work-questions textarea,.pw-ai-mini-result textarea,.pw-ai-work-result{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #d7dee0;border-radius:7px;background:#fff;color:#2b2b2b;font:13px/1.45 inherit;resize:vertical}.pw-ai-inline-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}
.pw-ai-activity-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}.pw-ai-mini-result{padding:12px;border:1px solid #dfe8df;border-radius:10px;background:#fff}.pw-ai-mini-result strong{display:block;margin-bottom:7px;color:#385a43;font-size:12.5px}.pw-ai-mini-result div{margin-top:8px}.pw-ai-mini-result .pw-ai-use{min-height:38px;padding:8px 11px;font-size:11.5px}.pw-ai-activity-results .pw-ai-use-both-row{grid-column:1/-1}
.pw-ai-work-helper{margin:-5px 0 18px;padding:0}.pw-ai-work-open{width:auto}.pw-ai-work-panel{margin-top:10px;padding:13px;border:1px solid #dfe9e9;border-radius:10px;background:#f8fbfb}.pw-ai-work-result{margin-top:12px;min-height:110px}.pw-ai-work-panel .pw-ai-result-actions{margin-top:8px}
@media(max-width:760px){.pw-ai-inline-head{display:block}.pw-ai-inline-open{width:100%;margin-top:10px}.pw-ai-inline-questions,.pw-ai-work-questions,.pw-ai-activity-results{grid-template-columns:1fr}.pw-ai-activity-results .pw-ai-use-both-row{grid-column:auto}}

/* 1.10.1 — unified modal assistant */
html.pw-ai-modal-open{overflow:hidden}
.pw-field-label-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.pw-field-label-row>label{margin:0!important}
.pw-ai-micro{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;padding:4px 8px 4px 5px;border:1px solid #e7d9cd;border-radius:999px;background:#fffaf6;color:#7d4d42;font:700 10.5px/1.1 inherit;cursor:pointer;box-shadow:0 1px 3px rgba(80,58,50,.04)}
.pw-ai-micro:hover{background:#fff3eb;border-color:#d9c1b2}
.pw-ai-micro img{display:block;width:31px;height:18px;object-fit:contain;mix-blend-mode:multiply}

.pw-ai-modal[hidden]{display:none!important}.pw-ai-modal{position:fixed;inset:0;z-index:999999;display:grid;place-items:center;padding:24px}.pw-ai-modal-backdrop{position:absolute;inset:0;background:rgba(31,38,39,.55);backdrop-filter:blur(2px)}
.pw-ai-modal-dialog{position:relative;z-index:1;width:min(1080px,calc(100vw - 48px));max-height:calc(100vh - 48px);display:flex;flex-direction:column;overflow:hidden;border:1px solid #dfe8e8;border-radius:20px;background:#fbfaf7;box-shadow:0 30px 80px rgba(20,30,30,.28)}
.pw-ai-modal-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 20px;border-bottom:1px solid #e8e4dd;background:#fff}
.pw-ai-modal-brand{display:flex;align-items:center;gap:12px;min-width:0}.pw-ai-modal-brand img{width:94px;height:46px;object-fit:contain;mix-blend-mode:multiply}.pw-ai-modal-brand span{display:block;color:#3f7f89;font-size:9px;font-weight:800;letter-spacing:1.3px}.pw-ai-modal-brand h2{margin:2px 0 0!important;font-family:"Cormorant Garamond",serif!important;font-size:26px;line-height:1.05;font-weight:600!important;color:#2b2b2b}.pw-ai-modal-close{border:0;background:transparent;color:#6f7778;font:300 32px/1 sans-serif;cursor:pointer;padding:2px 5px}.pw-ai-modal-close:hover{color:#d96767}
.pw-ai-modal-tabs{display:flex;gap:7px;padding:10px 18px;border-bottom:1px solid #e8ecec;background:#f5f8f8;overflow:auto}.pw-ai-modal-tabs button{border:1px solid transparent;border-radius:999px;background:transparent;color:#5f696a;padding:8px 13px;font:700 11.5px/1 inherit;white-space:nowrap;cursor:pointer}.pw-ai-modal-tabs button.is-active{background:#fff;border-color:#cfe0e1;color:#356a72;box-shadow:0 2px 6px rgba(50,80,80,.05)}
.pw-ai-modal-body{overflow:auto;padding:20px}.pw-ai-mode[hidden]{display:none!important}.pw-ai-mode-intro{margin-bottom:14px;padding:14px 16px;border:1px solid #e8e2d8;border-radius:12px;background:#fff}.pw-ai-mode-intro h3{margin:0 0 4px!important;font-family:"Cormorant Garamond",serif!important;font-size:26px;line-height:1.08;font-weight:600!important}.pw-ai-mode-intro p{margin:0;color:#626a6b;font-size:12.5px;line-height:1.55}
.pw-ai-question-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pw-ai-question-grid label{display:block;padding:11px;border:1px solid #e7e2da;border-radius:10px;background:#fff}.pw-ai-question-grid span{display:block;margin-bottom:7px;font-size:12px;font-weight:700;line-height:1.42}.pw-ai-question-grid textarea{width:100%;min-height:66px;box-sizing:border-box;padding:9px 10px;border:1px solid #d7dee0;border-radius:7px;background:#fff;color:#2b2b2b;font:13.5px/1.45 inherit;resize:vertical}.pw-ai-question-grid textarea:focus{outline:none;border-color:#3f7f89;box-shadow:0 0 0 3px rgba(63,127,137,.08)}
.pw-ai-modal-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}.pw-ai-modal-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}.pw-ai-modal-results[hidden]{display:none!important}.pw-ai-result-card{padding:14px;border:1px solid #dce7df;border-radius:12px;background:#fff;transition:box-shadow .2s,border-color .2s}.pw-ai-result-card.is-targeted{border-color:#d96767;box-shadow:0 0 0 3px rgba(217,103,103,.09)}.pw-ai-result-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.pw-ai-result-title strong{font-size:13px;color:#385a43}.pw-ai-result-card textarea{width:100%;box-sizing:border-box;padding:11px;border:1px solid #cfded3;border-radius:8px;background:#fff;color:#2b2b2b;font:14px/1.55 inherit;resize:vertical}.pw-ai-result-card>.pw-ai-use{margin-top:9px}.pw-ai-use-all{grid-column:1/-1;display:flex;justify-content:center;padding-top:2px}.pw-ai-work-select-wrap{display:block;max-width:520px;margin:0 0 14px}.pw-ai-work-select-wrap span{display:block;margin-bottom:5px;font-size:12px;font-weight:700}.pw-ai-work-select-wrap select{width:100%;min-height:42px;padding:8px 10px;border:1px solid #d7dee0;border-radius:8px;background:#fff;font:13px/1.2 inherit}.pw-ai-modal-foot{padding:11px 18px;border-top:1px solid #e8e4dd;background:#fff;color:#777;font-size:10.5px;line-height:1.4;text-align:center}

@media(max-width:1160px){.pw-ai-launch-card{grid-template-columns:112px minmax(0,1fr)}.pw-ai-thread-icon{grid-row:1/6}.pw-ai-thread-icon img{max-width:96px}.pw-ai-card-kicker,.pw-ai-launch-card h3,.pw-ai-launch-card p,.pw-ai-launch-edit{grid-column:2}.pw-ai-launch{grid-column:2}.pw-ai-launch-card small{grid-column:2;text-align:left}.pw-ai-story-form{grid-row:2}}
@media(max-width:760px){
  .pw-field-label-row{align-items:flex-start;flex-direction:column;gap:5px}.pw-ai-micro{align-self:flex-start}
  .pw-ai-launch-card{display:grid!important;grid-template-columns:88px minmax(0,1fr)!important;gap:0 12px!important;padding:14px!important}.pw-ai-thread-icon{grid-column:1;grid-row:1/5;min-height:68px!important;padding:5px!important;margin:0!important}.pw-ai-thread-icon img{max-width:78px!important;max-height:60px!important}.pw-ai-card-kicker,.pw-ai-launch-card h3,.pw-ai-launch-card p,.pw-ai-launch-edit{grid-column:2}.pw-ai-launch-card h3{font-size:22px!important}.pw-ai-launch-card p{font-size:11.5px!important}.pw-ai-launch{grid-column:1/-1!important;margin-top:8px}.pw-ai-launch-card small{grid-column:1/-1!important;text-align:center!important}
  .pw-ai-modal{padding:0;place-items:stretch}.pw-ai-modal-dialog{width:100vw;max-height:100vh;height:100vh;border-radius:0;border:0}.pw-ai-modal-head{padding:11px 13px}.pw-ai-modal-brand img{width:70px;height:36px}.pw-ai-modal-brand h2{font-size:21px}.pw-ai-modal-tabs{padding:8px 10px}.pw-ai-modal-body{padding:13px}.pw-ai-question-grid,.pw-ai-modal-results{grid-template-columns:1fr}.pw-ai-options-grid{grid-template-columns:1fr}.pw-ai-use-all{grid-column:auto}.pw-ai-modal-actions{display:block}.pw-ai-modal-actions .pw-ai-generate{width:100%}.pw-ai-modal-actions .pw-ai-status{display:block;margin-top:8px}.pw-ai-result-title{align-items:flex-start}.pw-ai-result-title .pw-ai-variant{min-height:34px;padding:7px 9px}
}


/* 1.10.2 — clearer launcher hierarchy and restored legacy textarea sizing */
/* The original form uses rows=4 / rows=7; do not force AI-specific heights on those fields. */
.pw-ai-story-form textarea[name="author_short_intro"],
.pw-ai-story-form textarea[name="author_story"]{height:auto!important;min-height:46px!important}

/* Contextual shortcuts: image first, text secondary. */
.pw-ai-micro{gap:5px;padding:3px 8px 3px 5px;font-size:9.4px;line-height:1.05;font-weight:700}
.pw-ai-micro img{width:43px;height:24px;flex:0 0 43px}

/* Desktop: compact sticky general entry, visibly outside the form. */
@media(min-width:1161px){
  .pw-ai-step-content{grid-template-columns:minmax(0,1fr) 222px;gap:54px}
  .pw-ai-launch-card{position:sticky;top:92px;width:222px;padding:14px 14px 13px;border-radius:14px;transform:translateX(92px);z-index:3}
  .pw-ai-thread-icon{min-height:68px;margin:0 0 9px;padding:6px 8px}
  .pw-ai-thread-icon img{max-width:164px;max-height:66px}
  .pw-ai-card-kicker{margin-bottom:4px;font-size:8.5px;letter-spacing:1.1px}
  .pw-ai-launch-card h3{margin-bottom:7px!important;font-size:21px;line-height:1.02}
  .pw-ai-launch-card p{margin-bottom:7px;font-size:10.4px;line-height:1.43}
  .pw-ai-launch-edit{font-size:9.8px!important}
  .pw-ai-launch{min-height:36px;padding:8px 9px;font-size:10.6px;border-radius:8px}
  .pw-ai-launch-card small{margin-top:6px;font-size:8.8px}
}
@media(min-width:1500px){.pw-ai-launch-card{transform:translateX(122px)}}
@media(min-width:1750px){.pw-ai-launch-card{transform:translateX(150px)}}

/* Tablet / mobile: one explanatory block at the top, not sticky. */
@media(max-width:1160px){
  .pw-ai-launch-card{position:static!important;top:auto!important;transform:none!important}
}
@media(max-width:760px){
  .pw-ai-launch-card{order:-1!important;grid-template-columns:108px minmax(0,1fr)!important;padding:13px!important;border-radius:14px!important}
  .pw-ai-thread-icon{grid-column:1!important;grid-row:1/5!important;min-height:72px!important;padding:6px!important;margin:0!important}
  .pw-ai-thread-icon img{max-width:98px!important;max-height:70px!important}
  .pw-ai-card-kicker{font-size:8.5px!important}
  .pw-ai-launch-card h3{font-size:20px!important;line-height:1.04!important;margin-bottom:6px!important}
  .pw-ai-launch-card p{font-size:10.8px!important;line-height:1.45!important;margin-bottom:6px!important}
  .pw-ai-launch-edit{font-size:10px!important}
  .pw-ai-launch{margin-top:7px!important;min-height:39px!important;font-size:11px!important}
  .pw-ai-launch-card small{font-size:9px!important}
  .pw-ai-micro{font-size:9px;padding:3px 7px 3px 4px}
  .pw-ai-micro img{width:40px;height:23px;flex-basis:40px}
}

/* 1.10.3 — no promotional card: one clean global launcher + guidance inside the modal. */
.pw-ai-step-content{display:flex!important;flex-direction:column!important;gap:10px!important;overflow:visible!important}
.pw-ai-story-form{order:2;width:100%;box-sizing:border-box}
.pw-ai-global-launch-wrap{order:1;display:flex;justify-content:flex-end;align-items:center;margin:0 0 2px}
.pw-ai-global-launch{display:inline-flex;align-items:center;gap:9px;min-height:46px;padding:6px 13px 6px 7px;border:1px solid #dfd2c5;border-radius:999px;background:#fffaf6;color:#744b42;box-shadow:0 2px 7px rgba(80,58,50,.05);cursor:pointer;text-align:left;font-family:inherit}
.pw-ai-global-launch:hover{background:#fff3eb;border-color:#d3bcae}
.pw-ai-global-launch img{display:block;width:64px;height:32px;object-fit:contain;mix-blend-mode:multiply;flex:0 0 64px}
.pw-ai-global-launch span{display:block;min-width:0}
.pw-ai-global-launch strong{display:block;font-size:11.5px;line-height:1.15;font-weight:750;color:#70483f}
.pw-ai-global-launch small{display:block;margin-top:2px;font-size:9.5px;line-height:1.15;color:#8a7770}

/* Restore generous writing space for the two main profile texts. */
.pw-ai-story-form textarea[name="author_short_intro"]{height:150px!important;min-height:150px!important}
.pw-ai-story-form textarea[name="author_story"]{height:300px!important;min-height:300px!important}

/* Guidance belongs inside the assistant, not in a permanent card on the form. */
.pw-ai-guidance{padding:13px 20px 12px;border-bottom:1px solid #e8e4dd;background:#fffaf6;color:#5d6263}
.pw-ai-guidance strong{display:block;margin-bottom:6px;color:#2f555c;font-size:12px}
.pw-ai-guidance ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 22px;margin:0;padding-left:18px;font-size:10.8px;line-height:1.42}
.pw-ai-guidance li{margin:0}

/* The old promo-card classes remain unused for backwards compatibility only. */
.pw-ai-launch-card{display:none!important}

@media(max-width:760px){
  .pw-ai-global-launch-wrap{justify-content:stretch;margin:0 0 4px}
  .pw-ai-global-launch{width:100%;justify-content:flex-start;border-radius:12px;padding:7px 11px 7px 8px}
  .pw-ai-global-launch img{width:70px;height:34px;flex-basis:70px}
  .pw-ai-global-launch strong{font-size:12px}
  .pw-ai-global-launch small{font-size:10px}
  .pw-ai-story-form textarea[name="author_short_intro"]{height:140px!important;min-height:140px!important}
  .pw-ai-story-form textarea[name="author_story"]{height:260px!important;min-height:260px!important}
  .pw-ai-guidance{padding:11px 13px 10px}
  .pw-ai-guidance ul{grid-template-columns:1fr;gap:4px;font-size:11px}
}

/* 1.10.4 — one AI entry per section + question groups mapped to outputs. */
.pw-ai-section-launch{display:inline-flex;align-items:center;gap:7px;max-width:190px;margin:10px 0 0;padding:5px 9px 5px 6px;border:1px solid #dfd2c5;border-radius:10px;background:#fffaf6;color:#744b42;font:700 10.5px/1.25 inherit;cursor:pointer;text-align:left;box-shadow:0 2px 6px rgba(80,58,50,.04)}
.pw-ai-section-launch:hover{background:#fff3eb;border-color:#d3bcae}
.pw-ai-section-launch img{display:block;width:46px;height:25px;object-fit:contain;mix-blend-mode:multiply;flex:0 0 46px}
.pw-ai-section-launch span{display:block}

.pw-ai-question-section{margin:0 0 18px;padding:14px;border:1px solid #e6e1d9;border-radius:12px;background:#fdfcf9}
.pw-ai-question-section-head{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin:0 0 10px}
.pw-ai-question-section-head strong{font-family:"Cormorant Garamond",serif;font-size:21px;line-height:1.1;color:#2f555c}
.pw-ai-question-section-head span{color:#73797a;font-size:10.8px;line-height:1.4}

/* Exactly restore the pre-AI textarea sizing behaviour: rows determine height. */
.pw-ai-story-form textarea[name="author_short_intro"],
.pw-ai-story-form textarea[name="author_story"]{height:auto!important;min-height:46px!important}

/* The old global launcher is no longer rendered. */
.pw-ai-global-launch-wrap{display:none!important}

@media(max-width:760px){
  .pw-ai-section-launch{max-width:none;width:100%;box-sizing:border-box;margin-top:8px;justify-content:flex-start;font-size:10.8px}
  .pw-ai-section-launch img{width:52px;height:28px;flex-basis:52px}
  .pw-ai-question-section{padding:11px;margin-bottom:14px}
  .pw-ai-question-section-head{display:block}
  .pw-ai-question-section-head strong{display:block;font-size:20px;margin-bottom:3px}
}


/* 1.10.5 — compact section launchers and tighter assistant modal. */
.pw-ai-section-launch{
  box-sizing:border-box;
  width:100%;
  max-width:184px;
  min-height:54px;
  margin-top:10px;
  padding:7px 10px 7px 7px;
  gap:7px;
  border-radius:11px;
  font-family:inherit!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1.22!important;
  letter-spacing:0!important;
}
.pw-ai-section-launch img{
  width:54px!important;
  height:30px!important;
  flex:0 0 54px!important;
}
.pw-ai-section-launch span{
  min-width:0;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
}

/* Let the desktop dialog follow its content instead of stretching vertically. */
@media(min-width:761px){
  .pw-ai-modal-dialog{
    height:auto!important;
    min-height:0!important;
    max-height:calc(100vh - 48px)!important;
  }
  .pw-ai-modal-body{
    flex:0 1 auto!important;
    min-height:0!important;
    overflow:auto!important;
    padding:16px 18px!important;
  }
}

/* Compact guidance and tabs. Explicit typography prevents theme button styles leaking in. */
.pw-ai-guidance{padding:10px 18px 9px!important}
.pw-ai-guidance strong{margin-bottom:4px!important;font-size:11.5px!important;line-height:1.25!important}
.pw-ai-guidance ul{gap:2px 20px!important;font-size:10.4px!important;line-height:1.35!important}

.pw-ai-modal-tabs{
  align-items:center!important;
  min-height:0!important;
  padding:7px 16px!important;
  gap:6px!important;
}
.pw-ai-modal-tabs button{
  min-width:0!important;
  min-height:34px!important;
  height:auto!important;
  margin:0!important;
  padding:7px 12px!important;
  border-radius:999px!important;
  font-family:inherit!important;
  font-size:11.5px!important;
  font-weight:700!important;
  line-height:1.1!important;
  letter-spacing:0!important;
  text-transform:none!important;
  transform:none!important;
}
.pw-ai-modal-tabs button.is-active{
  position:static!important;
  transform:none!important;
}
.pw-ai-modal-tabs button::before,.pw-ai-modal-tabs button::after{display:none!important;content:none!important}

.pw-ai-mode-intro{
  margin-bottom:11px!important;
  padding:11px 14px!important;
}
.pw-ai-mode-intro h3{font-size:24px!important;line-height:1.05!important}
.pw-ai-mode-intro p{font-size:11.8px!important;line-height:1.42!important}

.pw-ai-question-section{
  margin-bottom:13px!important;
  padding:11px!important;
}
.pw-ai-question-section-head{margin-bottom:8px!important}
.pw-ai-question-section-head strong{font-size:20px!important}
.pw-ai-question-section-head span{font-size:10.4px!important}
.pw-ai-question-grid{gap:8px!important}
.pw-ai-question-grid label{padding:9px!important}
.pw-ai-question-grid span{margin-bottom:5px!important;font-size:11.5px!important;line-height:1.35!important}
.pw-ai-question-grid textarea{
  min-height:58px!important;
  padding:8px 9px!important;
  font-family:inherit!important;
  font-size:12.5px!important;
  line-height:1.4!important;
}
.pw-ai-modal-actions{margin-top:11px!important}
.pw-ai-modal-results{margin-top:12px!important}
.pw-ai-modal-foot{padding:8px 16px!important;font-size:10px!important}

@media(max-width:760px){
  .pw-ai-section-launch{
    width:100%;
    max-width:none;
    min-height:50px;
    font-size:11.5px!important;
    padding:6px 9px 6px 7px;
  }
  .pw-ai-section-launch img{width:50px!important;height:28px!important;flex-basis:50px!important}
  .pw-ai-guidance{padding:9px 12px 8px!important}
  .pw-ai-modal-tabs{padding:6px 9px!important}
  .pw-ai-modal-tabs button{min-height:32px!important;padding:6px 10px!important;font-size:11px!important}
  .pw-ai-modal-body{padding:11px!important}
}
/* 1.10.6: writing preferences are shared by all AI sections and live above the tabs. */
.pw-ai-options-global{margin:10px 18px 10px;padding:0}
@media(max-width:760px){.pw-ai-options-global{margin:9px 12px}}

/* 1.10.7 — two-step assistant flow: questions first, results second. */
.pw-ai-question-view[hidden],
.pw-ai-result-view[hidden]{display:none!important}
.pw-ai-result-view{margin-top:0!important}
.pw-ai-results-toolbar{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 2px;
  padding:0 0 8px;
  border-bottom:1px solid #e7e2da;
}
.pw-ai-back{
  min-height:34px;
  padding:7px 11px;
  border:1px solid #cbdcdd;
  border-radius:8px;
  background:#fff;
  color:#356a72;
  font:700 11.5px/1.2 inherit;
  cursor:pointer;
}
.pw-ai-back:hover{background:#edf6f6}
.pw-ai-result-view .pw-ai-result-card textarea{
  min-height:118px;
  max-height:340px;
}
.pw-ai-result-view [data-pw-ai-about-result="story"]{min-height:210px}
.pw-ai-result-view .pw-ai-use-all{margin-top:2px}

/* Keep the dialog visually tied to its actual content. */
@media(min-width:761px){
  .pw-ai-modal-dialog{max-height:calc(100vh - 36px)!important}
  .pw-ai-modal-body{max-height:calc(100vh - 315px);overscroll-behavior:contain}
}
@media(max-width:760px){
  .pw-ai-results-toolbar{align-items:flex-start;flex-direction:column}
  .pw-ai-back{width:100%;text-align:left}
  .pw-ai-result-view .pw-ai-result-card textarea{min-height:150px;max-height:none}
}

/* 1.10.8 — modal sizing and scrolling hardening on desktop and mobile. */
.pw-ai-modal-dialog{
  min-height:0!important;
}
.pw-ai-modal-head,
.pw-ai-guidance,
.pw-ai-options-global,
.pw-ai-modal-tabs,
.pw-ai-modal-foot{
  min-height:0;
}

/* Desktop/tablet: let the dialog stop at the content instead of stretching to a tall shell. */
@media(min-width:761px){
  .pw-ai-modal{
    align-items:center!important;
  }
  .pw-ai-modal-dialog{
    display:grid!important;
    grid-template-rows:auto auto auto auto minmax(0,auto) auto!important;
    height:fit-content!important;
    max-height:calc(100dvh - 32px)!important;
    overflow:hidden!important;
  }
  .pw-ai-modal-body{
    min-height:0!important;
    height:auto!important;
    max-height:min(68dvh,720px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable;
  }
  .pw-ai-modal-foot{
    margin:0!important;
  }
}

/* Mobile: the dialog fills the visible viewport; only the content area scrolls. */
@media(max-width:760px){
  .pw-ai-modal{
    display:block!important;
    padding:0!important;
    overflow:hidden!important;
  }
  .pw-ai-modal-dialog{
    display:grid!important;
    grid-template-rows:auto auto auto auto minmax(0,1fr) auto!important;
    width:100vw!important;
    height:100vh!important;
    height:100dvh!important;
    min-height:0!important;
    max-height:100vh!important;
    max-height:100dvh!important;
    overflow:hidden!important;
    border-radius:0!important;
  }
  .pw-ai-modal-body{
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
    touch-action:pan-y;
    padding-bottom:calc(16px + env(safe-area-inset-bottom))!important;
  }
  .pw-ai-modal-foot{
    position:relative!important;
    margin:0!important;
    padding:7px 12px calc(7px + env(safe-area-inset-bottom))!important;
    flex:0 0 auto!important;
  }
  .pw-ai-guidance{
    padding:7px 12px 6px!important;
  }
  .pw-ai-guidance ul{
    display:block!important;
    margin:0!important;
    padding-left:18px!important;
    font-size:10px!important;
    line-height:1.28!important;
  }
  .pw-ai-guidance li{margin:2px 0!important}
  .pw-ai-options-global{
    margin:7px 10px!important;
  }
}


/* 1.10.9 — robust mobile scrolling: scroll the overlay itself, not a nested body. */
@media(max-width:760px){
  html.pw-ai-modal-open,
  body.pw-ai-modal-open{
    overflow:hidden!important;
    height:100%!important;
  }
  .pw-ai-modal{
    position:fixed!important;
    inset:0!important;
    display:block!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-y:contain!important;
    touch-action:pan-y!important;
    padding:0!important;
  }
  .pw-ai-modal-dialog{
    display:block!important;
    width:100%!important;
    min-height:100dvh!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
  }
  .pw-ai-modal-body{
    display:block!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding:11px 11px calc(18px + env(safe-area-inset-bottom))!important;
  }
  .pw-ai-modal-foot{
    position:static!important;
    margin:0!important;
    padding:8px 12px calc(10px + env(safe-area-inset-bottom))!important;
  }
}

/* Desktop: keep the dialog compact; only scroll when content truly exceeds the viewport. */
@media(min-width:761px){
  .pw-ai-modal-dialog{
    display:flex!important;
    flex-direction:column!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100dvh - 32px)!important;
  }
  .pw-ai-modal-body{
    flex:0 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:calc(100dvh - 290px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
}

/* 1.10.10 — iPhone width lock + compact result view. */
.pw-ai-modal,
.pw-ai-modal *{box-sizing:border-box}

@media(max-width:760px){
  .pw-ai-modal,
  .pw-ai-modal-dialog,
  .pw-ai-modal-body,
  .pw-ai-mode,
  .pw-ai-question-view,
  .pw-ai-result-view,
  .pw-ai-modal-results,
  .pw-ai-question-section,
  .pw-ai-question-grid,
  .pw-ai-question-grid label,
  .pw-ai-result-card,
  .pw-ai-results-toolbar,
  .pw-ai-options-global,
  .pw-ai-options-grid{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  /* Do not force the dialog to one viewport high; short result screens stay short. */
  .pw-ai-modal-dialog{
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  .pw-ai-modal-body{
    width:100%!important;
    max-width:100vw!important;
    min-width:0!important;
    overflow:visible!important;
    padding:10px 10px calc(16px + env(safe-area-inset-bottom))!important;
  }

  .pw-ai-question-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
  }

  /* iOS Safari zooms focused controls below 16px and creates apparent horizontal scrolling. */
  .pw-ai-modal textarea,
  .pw-ai-modal input,
  .pw-ai-modal select{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    font-size:16px!important;
  }
  .pw-ai-question-grid textarea{
    min-height:104px!important;
    resize:vertical!important;
  }

  /* Result screen: one compact vertical flow, never a stretched grid. */
  .pw-ai-modal-results:not([hidden]){
    display:block!important;
    margin:0!important;
  }
  .pw-ai-results-toolbar{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    margin:0 0 10px!important;
  }
  .pw-ai-result-card{
    display:block!important;
    margin:0 0 12px!important;
    padding:12px!important;
  }
  .pw-ai-result-title{
    display:flex!important;
    align-items:flex-start!important;
    gap:8px!important;
  }
  .pw-ai-result-title strong{
    min-width:0!important;
    flex:1 1 auto!important;
    overflow-wrap:anywhere!important;
  }
  .pw-ai-result-title .pw-ai-variant{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    font-size:14px!important;
    padding:7px 9px!important;
  }
  .pw-ai-result-card textarea{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:128px!important;
    max-height:280px!important;
    overflow-y:auto!important;
    font-size:16px!important;
    line-height:1.45!important;
  }
  .pw-ai-result-card>.pw-ai-use,
  .pw-ai-use-all .pw-ai-use-both{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    padding:10px 12px!important;
    font-size:16px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .pw-ai-use-all{
    display:block!important;
    width:100%!important;
    padding:0!important;
    margin:0 0 4px!important;
  }

  .pw-ai-modal-foot{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:8px 12px calc(10px + env(safe-area-inset-bottom))!important;
    font-size:11px!important;
    line-height:1.35!important;
    overflow-wrap:anywhere!important;
  }
}

/* 1.10.11 — section-by-section generation, inline results, mobile tone controls. */
.pw-ai-section-generate-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid #ece7df;
}
.pw-ai-section-generate-row .pw-ai-generate{
  flex:0 0 auto;
}
.pw-ai-inline-results{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:10px;
}
.pw-ai-inline-results:empty{display:none}
.pw-ai-inline-results .pw-ai-result-card{
  margin:0;
}
.pw-ai-inline-results .pw-ai-result-card[hidden]{display:none!important}
.pw-ai-techniques-result textarea{min-height:86px!important}
.pw-ai-bulk-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:14px 0 2px;
  padding:12px 14px;
  border:1px dashed #d7dfda;
  border-radius:11px;
  background:#f8faf8;
}
.pw-ai-generate-secondary{
  background:#fff!important;
  color:#356a72!important;
  border:1px solid #bdd5d7!important;
}
.pw-ai-question-section-head,
.pw-ai-question-section-head strong{
  position:static!important;
  inset:auto!important;
}
.pw-ai-work-question-section{margin-bottom:0!important}

@media(min-width:761px){
  .pw-ai-inline-results .pw-ai-result-card textarea{
    min-height:110px;
    max-height:360px;
  }
  .pw-ai-inline-results [data-pw-ai-about-result="story"]{min-height:190px}
}

@media(max-width:760px){
  /* 1.10.10 intentionally made text controls 16px for iOS zoom prevention.
     Radio/checkbox controls must NOT inherit the 100% width rule. */
  .pw-ai-modal input[type="radio"],
  .pw-ai-modal input[type="checkbox"]{
    width:20px!important;
    max-width:20px!important;
    min-width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
    margin:1px 0 0!important;
  }
  .pw-ai-tone{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
    padding:12px!important;
  }
  .pw-ai-tone label{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    align-items:start!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    font-size:16px!important;
    line-height:1.35!important;
  }
  .pw-ai-voice{
    grid-template-columns:22px minmax(0,1fr)!important;
    gap:9px!important;
    padding:12px!important;
  }
  .pw-ai-voice strong{font-size:16px!important;line-height:1.3!important}
  .pw-ai-voice small{font-size:13px!important;line-height:1.4!important}

  .pw-ai-section-generate-row{
    display:block!important;
    margin-top:10px!important;
    padding-top:10px!important;
  }
  .pw-ai-section-generate-row .pw-ai-generate{
    width:100%!important;
    min-height:46px!important;
    font-size:16px!important;
  }
  .pw-ai-section-generate-row .pw-ai-status{
    display:block!important;
    margin-top:7px!important;
    font-size:13px!important;
  }
  .pw-ai-inline-results{
    display:block!important;
    width:100%!important;
    margin-top:10px!important;
  }
  .pw-ai-inline-results .pw-ai-result-card{
    width:100%!important;
    margin:0 0 10px!important;
    padding:11px!important;
  }
  .pw-ai-inline-results .pw-ai-result-card textarea{
    min-height:120px!important;
    max-height:300px!important;
    font-size:16px!important;
  }
  .pw-ai-inline-results [data-pw-ai-about-result="story"]{min-height:170px!important}
  .pw-ai-bulk-actions{
    display:block!important;
    width:100%!important;
    margin:12px 0 4px!important;
    padding:10px!important;
  }
  .pw-ai-bulk-actions button{
    width:100%!important;
    min-height:46px!important;
    margin:0 0 8px!important;
    white-space:normal!important;
    font-size:15px!important;
    line-height:1.25!important;
  }
  .pw-ai-bulk-actions .pw-ai-status{
    display:block!important;
    margin-top:3px!important;
    font-size:13px!important;
  }
}


/* 1.10.12 — persistent mobile close control and post-use form/assistant choice. */
.pw-ai-mobile-use-choice{display:none}
@media(max-width:760px){
  .pw-ai-modal-head{position:sticky;top:0;z-index:40;background:#fff;box-shadow:0 1px 0 rgba(0,0,0,.05)}
  .pw-ai-modal-close{flex:0 0 auto;min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .pw-ai-mobile-use-choice{position:sticky;bottom:0;z-index:45;display:block;margin-top:10px;padding:11px 12px calc(11px + env(safe-area-inset-bottom));border-top:1px solid #e3ddd5;background:rgba(255,255,255,.98);box-shadow:0 -8px 24px rgba(36,44,45,.12)}
  .pw-ai-mobile-use-choice>span{display:block;margin-bottom:8px;font-size:13px;font-weight:700;color:#385a43}
  .pw-ai-mobile-use-choice>div{display:grid;grid-template-columns:1fr;gap:7px}
  .pw-ai-mobile-use-choice button{width:100%;min-height:42px;border-radius:9px;padding:9px 11px;font:700 13px/1.2 inherit;cursor:pointer}
  .pw-ai-mobile-view-form{border:0;background:#3f7f89;color:#fff}
  .pw-ai-mobile-continue{border:1px solid #cfd9da;background:#fff;color:#3f6166}
}


/* 1.10.18 — align the author AI modal shell with the event AI assistant. */
.pw-ai-modal{
  display:grid!important;
  place-items:center!important;
  padding:24px!important;
}
.pw-ai-modal-dialog{
  position:relative!important;
  z-index:1!important;
  display:block!important;
  width:min(1120px,calc(100vw - 48px))!important;
  height:auto!important;
  min-height:0!important;
  max-height:calc(100dvh - 48px)!important;
  overflow:auto!important;
  border:0!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 24px 70px rgba(0,0,0,.22)!important;
  color:#2d3030!important;
  overscroll-behavior:contain;
}
.pw-ai-modal-head{
  position:sticky!important;
  top:0!important;
  z-index:50!important;
  background:#fff!important;
}
.pw-ai-modal-body{
  display:block!important;
  flex:none!important;
  width:auto!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  padding:16px 18px!important;
}
.pw-ai-modal-foot{
  position:static!important;
  margin:0!important;
}

@media(max-width:760px){
  html.pw-ai-modal-open,
  body.pw-ai-modal-open{
    overflow:hidden!important;
    height:100%!important;
  }
  .pw-ai-modal{
    display:block!important;
    padding:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    background:#fff!important;
  }
  .pw-ai-modal-backdrop{display:none!important}
  .pw-ai-modal-dialog{
    width:100%!important;
    max-width:100%!important;
    min-height:100dvh!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  .pw-ai-modal-head{
    position:sticky!important;
    top:0!important;
    z-index:50!important;
    padding:10px 12px!important;
  }
  .pw-ai-modal-body{
    width:100%!important;
    max-width:100%!important;
    padding:12px!important;
    overflow:visible!important;
  }
  .pw-ai-modal-foot{
    position:static!important;
    padding:8px 12px calc(10px + env(safe-area-inset-bottom))!important;
  }
}
/* 1.10.44 — reusable image-description helper for work forms. */
.pw-work-ai-inline{margin:8px 0 12px;padding:10px 12px;border:1px solid rgba(63,127,137,.18);border-radius:12px;background:#f8fbfb}.pw-work-ai-inline .pw-work-ai-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.pw-work-ai-inline .pw-work-ai-status{font-size:.78rem;color:#637174}.pw-work-ai-inline .pw-work-ai-status.is-error{color:#a33}.pw-work-ai-inline textarea{display:none;width:100%;margin-top:8px;min-height:110px}.pw-work-ai-inline [data-pw-work-ai-use]{display:none;margin-top:7px}.pw-work-ai-inline.has-result textarea,.pw-work-ai-inline.has-result [data-pw-work-ai-use]{display:block}

/* 1.10.46 — image-first work description flow */
.pw-ai-work-visual-step,.pw-ai-work-writing-step{padding:16px;border:1px solid #e4ddd4;border-radius:16px;background:#fff}.pw-ai-work-writing-step{margin-top:14px}.pw-ai-work-visual-step .pw-ai-question-section-head,.pw-ai-work-writing-step .pw-ai-question-section-head{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}.pw-ai-work-visual-step .pw-ai-question-section-head span,.pw-ai-work-writing-step .pw-ai-question-section-head span{font-size:12px;color:#6b7375;line-height:1.45}.pw-ai-work-visual-card{margin-top:12px}.pw-ai-work-image-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}.pw-ai-work-image-actions .pw-ai-use,.pw-ai-work-image-actions .pw-ai-use-both{flex:1 1 220px}.pw-ai-work-visual-material{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:start;margin:0 0 12px;padding:10px 12px;border-radius:12px;background:#f0f7f6;border:1px solid rgba(63,127,137,.18);font-size:12px}.pw-ai-work-visual-material span{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:#596568}.pw-ai-work-visual-material button{border:0;background:transparent;color:#a95245;font-weight:700;cursor:pointer;padding:0}.pw-ai-work-visual-material[hidden]{display:none!important}
@media(max-width:700px){.pw-ai-work-visual-step,.pw-ai-work-writing-step{padding:12px}.pw-ai-work-visual-material{grid-template-columns:1fr}.pw-ai-work-image-actions{flex-direction:column}}
