#nyel-chat { position:fixed; left:50%; bottom:max(22px,env(safe-area-inset-bottom)); transform:translateX(-50%); width:min(580px,calc(100vw - 32px)); min-height:60px; z-index:60; font-family:'Newsreader',Georgia,serif; color:var(--ink,#14161a); }
#nyel-chat * { box-sizing:border-box; }
#nyel-chat [hidden] { display:none !important; }
#nyel-chat button,#nyel-chat input { font:inherit; }
#nyel-chat button { cursor:pointer; color:var(--accent,#93691f); border:0; background:transparent; min-height:44px; min-width:44px; }
#nyel-chat button:disabled { cursor:default; opacity:.45; }
#nyel-chat button:hover:not(:disabled) { color:var(--ink,#14161a); background:var(--border-soft,rgba(20,22,26,.06)); }
#nyel-chat button:focus-visible,#nyel-chat summary:focus-visible { outline:2px solid var(--accent,#93691f); outline-offset:3px; border-radius:6px; }
.chat-panel { display:flex; flex-direction:column; max-height:min(640px,calc(100dvh - 130px)); background:var(--card,#fff); border:1px solid var(--border,rgba(20,22,26,.11)); border-radius:20px; box-shadow:0 24px 80px var(--shadow,rgba(20,22,26,.16)); margin-bottom:12px; overflow:hidden; animation:chat-appear .2s ease; }
.chat-plan { font-family:ui-monospace,'SF Mono',Menlo,monospace; }
#nyel-chat .chat-control { flex:none; display:grid; place-items:center; border-radius:50%; }
.chat-messages { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:18px 22px; font-size:16px; line-height:1.6; color:var(--body,#33363d); }
.chat-suggestions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-bottom:12px; animation:chat-appear .6s ease-out both; }
#nyel-chat .chat-suggestions button { max-width:100%; padding:8px 12px; border:1px solid var(--border,rgba(20,22,26,.11)); border-radius:999px; background:var(--card,#fff); box-shadow:0 4px 12px var(--shadow-soft,rgba(20,22,26,.1)); font-size:14px; line-height:1.3; text-align:left; overflow-wrap:anywhere; }
#nyel-chat .chat-suggestions button:hover { background:var(--card,#fff); border-color:var(--body,#33363d); }
.chat-turn { margin-top:22px; }
.chat-turn:first-of-type { margin-top:0; }
.chat-question { width:fit-content; max-width:90%; margin:0 0 16px auto; padding:9px 14px; border-radius:14px; background:color-mix(in srgb,var(--accent,#93691f) 9%,transparent); white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-plan { padding:10px 12px; border-left:2px solid var(--accent,#93691f); background:var(--bg,#fbfaf8); border-radius:0 6px 6px 0; font-size:11px; line-height:1.6; }
.chat-plan summary { cursor:pointer; color:var(--body,#33363d); min-height:24px; padding:2px 0; }
.chat-plan ol { list-style:none; padding:0; margin:8px 0 0; }
.chat-plan li { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:7px 0; }
.chat-plan li>span:first-child { overflow-wrap:anywhere; }
.chat-task-state { font-size:10px; flex:none; color:var(--accent,#93691f); }
.chat-plan li[data-status="in_progress"] .chat-task-state { animation:chat-pulse 1.5s ease-in-out infinite; }
.chat-plan[data-interrupted="true"] .chat-task-state { animation:none; }
.chat-answer { margin:14px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-answer:empty { display:none; }
.chat-error { font-size:14px; margin:12px 0 0; color:var(--body,#33363d); }
.chat-composer { display:flex; align-items:center; gap:8px; background:var(--card,#fff); border:1px solid var(--border,rgba(20,22,26,.11)); border-radius:999px; padding:7px 8px 7px 22px; box-shadow:0 12px 44px var(--shadow-soft,rgba(20,22,26,.1)); }
.chat-composer:focus-within { border-color:var(--body,#33363d); }
#chat-input { width:100%; min-width:0; min-height:44px; border:0; outline:none; background:transparent; color:var(--ink,#14161a); font-size:16px; }
#chat-input::placeholder { color:var(--body,#33363d); opacity:.8; }
#nyel-chat #chat-send,#nyel-chat #chat-stop { flex:none; display:grid; place-items:center; width:44px; height:44px; padding:0; border-radius:50%; background:color-mix(in srgb,var(--accent,#93691f) 12%,transparent); font-size:22px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@keyframes chat-appear { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes chat-pulse { 50% { opacity:.55; } }
@media(max-width:480px) { .chat-messages { padding:16px; } .chat-panel { max-height:calc(100dvh - 120px); } .chat-composer { padding-left:14px; } }
@media(prefers-reduced-motion:reduce) { #nyel-chat * { animation:none !important; transition:none !important; } }
