/* Draft review: "Mark an area" editor */
.btn-area,.btn-area:hover:not(:disabled){background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn-area:hover:not(:disabled){background:var(--line-soft,#eff1f5)}
.area-modal{position:fixed;inset:0;z-index:10001;display:grid;place-items:center;padding:16px;background:rgba(10,14,28,.6);backdrop-filter:blur(4px)}
.am-card{display:flex;flex-direction:column;width:min(960px,100%);max-height:calc(100vh - 32px);overflow:hidden;border-radius:24px;background:var(--surface,#fff);color:var(--ink,#16181d);box-shadow:0 30px 80px rgba(0,0,0,.35)}
.am-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:20px 24px 10px}
.am-head h3{font-size:20px;font-weight:600;letter-spacing:-.02em}
.am-head p{margin-top:4px;font-size:14px;color:var(--muted,#6b7280)}
.am-x,.am-x:hover:not(:disabled){width:36px;height:36px;padding:0;border-radius:50%;background:var(--line-soft,#eff1f5);color:var(--ink,#16181d);border:0;font-size:22px;line-height:1}
.am-stage{flex:1;min-height:0;display:grid;place-items:center;padding:8px 24px;overflow:auto;background:var(--paper,#f6f7fa)}
.am-wrap{position:relative;display:inline-block;line-height:0;cursor:crosshair;touch-action:none;user-select:none;-webkit-user-select:none}
.am-wrap img{display:block;max-width:100%;max-height:52vh;width:auto;height:auto;border-radius:10px;pointer-events:none}
.am-box{position:absolute;border:2px solid #2f8cff;background:rgba(47,140,255,.25);box-shadow:0 0 0 1px rgba(255,255,255,.6) inset,0 0 0 9999px rgba(10,20,50,.18);border-radius:6px;cursor:move}
.am-box[hidden]{display:none}
.am-h{position:absolute;width:14px;height:14px;border:2px solid #2f8cff;border-radius:50%;background:#fff}
.am-h.nw{left:-8px;top:-8px;cursor:nwse-resize}.am-h.ne{right:-8px;top:-8px;cursor:nesw-resize}
.am-h.sw{left:-8px;bottom:-8px;cursor:nesw-resize}.am-h.se{right:-8px;bottom:-8px;cursor:nwse-resize}
.am-foot{padding:14px 24px 20px}
.am-foot label{display:block;margin-bottom:6px;font-size:14px;font-weight:600}
.am-foot textarea{width:100%;resize:vertical;border-radius:14px}
.am-msg{min-height:18px;margin-top:6px;font-size:13px;color:#b3261e}
.am-actions{display:flex;align-items:center;gap:10px;margin-top:8px}
.am-actions span{flex:1}
.am-clear,.am-clear:hover:not(:disabled),.am-cancel,.am-cancel:hover:not(:disabled){background:var(--line-soft,#eff1f5);color:var(--ink,#16181d);border:0}
.am-go{min-width:170px}
@media (max-width:560px){.am-actions{flex-wrap:wrap}.am-actions span{display:none}.am-go{flex:1}}

/* Text editor */
.text-modal .am-card{width:min(1080px,100%)}
.te-body{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);min-height:0;flex:1;overflow:hidden}
.te-body .am-stage{min-height:0}
.te-wrap{cursor:default}
.te-wrap img{max-height:60vh}
.te-mark,.te-mark:hover:not(:disabled){position:absolute;padding:0;border:2px solid rgba(47,140,255,.9);border-radius:5px;background:rgba(47,140,255,.14);cursor:pointer;box-shadow:none;transition:background .12s,border-color .12s}
.te-mark i{position:absolute;left:-2px;top:-17px;min-width:17px;padding:1px 4px;border-radius:5px 5px 5px 0;background:#2f8cff;color:#fff;font-weight:700;font-size:10px;line-height:1.4;font-style:normal;text-align:center}
.te-mark.active,.te-mark:hover{background:rgba(47,140,255,.32);border-color:#1f6fe0;z-index:2}
.te-mark.changed{border-color:#17a673;background:rgba(23,166,115,.2)}.te-mark.changed i{background:#17a673}
.te-panel{display:flex;flex-direction:column;min-height:0;padding:12px 24px 8px 12px}
.te-panel h4{margin-bottom:8px;font-size:14px;font-weight:600;color:var(--muted,#6b7280)}
.te-list{display:grid;gap:8px;align-content:start;overflow:auto;padding:2px 2px 6px;max-height:50vh}
.te-row{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 8px;border:1px solid var(--line,#e6e8ee);border-radius:14px;background:var(--surface,#fff)}
.te-row b{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#2f8cff;color:#fff;font-size:12px}
.te-row input{flex:1;min-width:0;border:0!important;background:transparent!important;box-shadow:none!important;padding:8px 6px!important;font-weight:600}
.te-row:focus-within{border-color:#2f8cff;box-shadow:0 0 0 3px rgba(47,140,255,.15)}
.te-row.changed{border-color:#17a673}.te-row.changed b{background:#17a673}
.te-note{padding:10px;font-size:14px;color:var(--muted,#6b7280)}.te-note.err{color:#b3261e}
.te-hint{flex:1;font-size:12.5px;color:var(--muted,#6b7280)}
@media (max-width:760px){.te-body{grid-template-columns:1fr;overflow:auto}.te-panel{padding:8px 24px 8px}.te-list{max-height:none}}
