.ma1-dialog{box-sizing:border-box;width:min(580px,calc(100vw - 24px));height:min(820px,92vh);height:min(820px,92dvh);max-height:92dvh;margin:auto;padding:0;border:1px solid #ffffffc9;border-radius:26px;background:#f6fbfd;color:#253e4b;box-shadow:0 26px 90px #083e5c55;font-family:inherit;overflow:hidden}
.ma1-dialog[open]{display:flex;flex-direction:column}.ma1-dialog::backdrop{background:#13354885;backdrop-filter:blur(6px)}
.ma1-dialog *{box-sizing:border-box}.ma1-dialog button,.ma1-dialog textarea{font:inherit}.ma1-dialog button{cursor:pointer;-webkit-tap-highlight-color:transparent}.ma1-dialog button:focus-visible,.ma1-dialog textarea:focus-visible{outline:3px solid #78d1ed;outline-offset:3px}
.ma1-head{display:flex;align-items:center;gap:12px;padding:22px 20px 18px;background:linear-gradient(135deg,#ecfaff,#fff);flex:none;border-bottom:1px solid #e2eff3}
.ma1-spark{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:15px;color:#fff;background:linear-gradient(145deg,#48c2df,#1688ae);font-size:27px;box-shadow:0 5px 15px #259dc52b}
.ma1-head h2{font-size:18px;margin:0 0 5px;font-weight:800}.ma1-head p{font-size:11px;color:#738895;margin:0;line-height:1.8}.ma1-close{margin-inline-start:auto;border:0;background:#e9f3f7;border-radius:50%;width:32px;height:32px;flex:none;color:#577582;font-size:25px!important;line-height:1}
.ma1-panels{flex:1;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1.15fr);gap:13px;padding:16px 18px}
.ma1-panel{display:flex;flex-direction:column;gap:10px;min-height:0;border:1px solid #dce9ef;border-radius:19px;padding:15px;background:white;overflow:hidden}
.ma1-polished{border-color:#99d6e7;background:linear-gradient(150deg,#f2fcff,#fff);box-shadow:0 5px 18px #2c9dbc0c}
.ma1-label{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none}.ma1-label h3{font-size:14px;margin:0;color:#244d60;font-weight:800}.ma1-label>span{font-size:10px;color:#7d939f;background:#f1f6f8;padding:3px 8px;border-radius:20px}.ma1-polished .ma1-label>span{color:#2586a7;background:#e0f4fa}
.ma1-original-text,.ma1-suggestion{flex:1;min-height:40px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.95;font-size:14px;color:#294754;scrollbar-width:thin;text-align:start;margin:0;padding:4px 1px}
.ma1-suggestion{width:100%;resize:none;background:transparent;border:0;border-radius:7px}.ma1-suggestion[hidden]{display:none}
.ma1-send-original,.ma1-send-suggestion{display:flex;align-items:center;justify-content:center;gap:10px;flex:none;border-radius:12px;min-height:42px;font-size:13px!important;font-weight:700!important;border:1px solid #cce1eb;background:#eff6f9;color:#346177}
.ma1-send-suggestion{border-color:transparent;background:linear-gradient(100deg,#2299bf,#1384ac);color:white;box-shadow:0 5px 13px #168bb626}.ma1-dialog button:disabled{cursor:default;opacity:.43;box-shadow:none}
.ma1-status{flex:1;display:flex;gap:8px;align-items:center;justify-content:center;font-size:12px;line-height:1.9;color:#56879a;text-align:center}.ma1-status.ma1-ready{flex:none;justify-content:flex-start;font-size:10px;margin:0}.ma1-status.ma1-error{color:#a56348}.ma1-status[hidden]{display:none}.ma1-retry{border:0;color:#1684aa;background:#e6f5fb;border-radius:10px;padding:7px;font-size:12px!important}.ma1-retry[hidden]{display:none}
.ma1-pulse{width:10px;height:10px;flex:none;background:#31b2d3;border-radius:50%;animation:ma1-pulse 1s ease-in-out infinite}.ma1-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:0 22px 17px;font-size:10px;color:#7c929d;flex:none}.ma1-back{border:0;background:none;padding:6px 0;color:#4d8298;font-size:11px!important}.ma1-attachment-note{flex-basis:100%;font-size:10px}
@keyframes ma1-pulse{50%{opacity:.3;transform:scale(.75)}}@media(prefers-reduced-motion:reduce){.ma1-pulse{animation:none}}
@media(max-width:420px){.ma1-head{padding:17px 14px 13px;gap:9px}.ma1-head h2{font-size:16px}.ma1-spark{width:36px;height:36px;border-radius:12px}.ma1-panels{padding:12px;gap:10px}.ma1-panel{padding:12px;gap:8px}.ma1-foot{padding:0 16px 12px}.ma1-original-text,.ma1-suggestion{font-size:13px}}
@media(max-height:520px){.ma1-dialog{height:96dvh;max-height:96dvh}.ma1-head{padding:8px 14px}.ma1-head p,.ma1-foot>span{display:none}.ma1-panels{padding:8px;gap:7px}.ma1-panel{padding:8px;gap:4px}.ma1-send-original,.ma1-send-suggestion{min-height:32px}.ma1-original-text,.ma1-suggestion{min-height:20px}.ma1-foot{padding:0 14px 5px}}

/* AO1: generation starts only when requested by the author. */
.ma1-generate{flex:none;min-height:46px;padding:10px 12px;font-size:13px!important;font-weight:700;border:1px solid #79c5de;background:linear-gradient(110deg,#e1f6fd,#c9edf8);color:#116e8d;box-shadow:0 4px 12px #168bb614}.ma1-send-suggestion[hidden]{display:none}
