/* Iliad reading assist: "ask Claude" button and answer panel. */
.assist-ask{position:absolute;z-index:30;font:inherit;font-size:.9rem;padding:.3rem .8rem;border:1px solid #7a5c2e;border-radius:999px;background:#fff8ea;color:#5a3f17;box-shadow:0 2px 6px rgba(0,0,0,.18);cursor:pointer}
.assist-ask:hover{background:#f6e6c4}
.assist-ask[hidden],.assist-panel[hidden],.assist-backdrop[hidden]{display:none}

.assist-key{position:fixed;bottom:1rem;left:1rem;z-index:20;width:2.2rem;height:2.2rem;border-radius:50%;border:1px solid #bbb;background:#fff;color:#555;font-size:1.1rem;cursor:pointer;opacity:.6}
.assist-key:hover{opacity:1}

.assist-panel{position:fixed;z-index:40;direction:rtl;overflow-y:auto;background:#fffdf8;border:1px solid #d9cdb4;border-radius:.5rem;box-shadow:0 4px 18px rgba(0,0,0,.15);padding:1rem 1.2rem;line-height:1.6;font-size:.95rem}
/* Side mode: the text column moves to the right, the panel fills the space on the left. */
body.assist-side{margin-right:2rem;margin-left:auto}
.assist-panel:not(.as-popup){top:1rem;bottom:1rem;left:1rem;width:calc(100% - 52rem);max-width:40rem}
/* Popup mode: not enough room beside the text. */
.assist-panel.as-popup{top:50%;left:50%;transform:translate(-50%,-50%);width:min(40rem,calc(100% - 2rem));max-height:calc(100% - 2rem)}
.assist-backdrop{position:fixed;inset:0;z-index:35;background:rgba(0,0,0,.3)}

.assist-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.5rem}
.assist-ref{direction:ltr;font-size:.85rem;color:#666}
.assist-head-buttons{display:flex;align-items:center;gap:.4rem}
.assist-close,.assist-gear{border:none;background:none;font-size:1.5rem;line-height:1;cursor:pointer;color:#666}
.assist-gear{font-size:1.15rem}
.assist-key[hidden]{display:none}
.assist-quote{margin:0 0 1rem;padding:.4rem .8rem;border-right:3px solid #c9b183;background:#f7f0e1;white-space:pre-line;max-height:9rem;overflow-y:auto;font-size:.9rem}
.assist-body :first-child{margin-top:0}
.assist-status{color:#777}
.assist-error{color:#a12}

.assist-link{border:none;background:none;padding:0;font:inherit;color:#5a3f17;text-decoration:underline;cursor:pointer}

.assist-settings{direction:rtl;width:min(36rem,calc(100% - 2rem));border:1px solid #d9cdb4;border-radius:.5rem;background:#fffdf8;padding:1.2rem 1.4rem;box-shadow:0 4px 18px rgba(0,0,0,.2);font-size:.95rem}
.assist-settings::backdrop{background:rgba(0,0,0,.3)}
.assist-settings h2{margin:0 0 1rem;font-size:1.2rem}
.assist-settings label{display:block;margin:.8rem 0 .3rem;color:#444}
.assist-settings textarea,.assist-settings input{box-sizing:border-box;width:100%;font:inherit;padding:.4rem .5rem;border:1px solid #c9b183;border-radius:.3rem;background:#fff}
.assist-settings textarea{resize:vertical;line-height:1.5}
.assist-key-row{display:flex;gap:.5rem}
.assist-key-row input{flex:1;font-family:monospace}
.assist-settings button{font:inherit;padding:.3rem .9rem;border:1px solid #c9b183;border-radius:.3rem;background:#fff;cursor:pointer}
.assist-actions{display:flex;gap:.5rem;margin-top:1.2rem}
.assist-settings .assist-save{background:#7a5c2e;border-color:#7a5c2e;color:#fff}
.assist-prompt-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.3rem;font-size:.85rem;color:#666}
.assist-prompt-row .assist-reset{font-size:.85rem;padding:.15rem .6rem}
.assist-reset[hidden]{display:none}
.assist-hint{margin:.4rem 0 0;font-size:.8rem;color:#777}
.assist-hint code{font-size:.95em;background:#f3ecdc;padding:0 .2em;border-radius:.2em}
