.tca-portal-ai{position:fixed;right:max(12px,env(safe-area-inset-right,0px));bottom:max(12px,env(safe-area-inset-bottom,0px));z-index:1000;font-family:inherit}
.tca-portal-ai__launcher{min-height:48px;padding:.65rem 1rem;border:0;border-radius:999px;background:#0f2a4a;color:#fff;font:inherit;font-weight:700;box-shadow:0 8px 24px rgba(0,0,0,.2);cursor:pointer}
.tca-portal-ai.is-open .tca-portal-ai__launcher{display:none}
.tca-portal-ai__panel{width:min(420px,calc(100vw - 24px));height:min(720px,calc(100vh - 32px));background:#fff;border:1px solid #d8dee6;border-radius:16px;box-shadow:0 16px 40px rgba(0,0,0,.25);overflow:hidden;display:flex;flex-direction:column}
.tca-portal-ai__panel[hidden]{display:none}
.tca-portal-ai__head{height:48px;display:flex;align-items:center;gap:8px;padding:0 .8rem;border-bottom:1px solid #e5e7eb;color:#0f2a4a}
.tca-portal-ai__head strong{flex:1 1 auto}
.tca-portal-ai__close{width:40px;height:40px;border:0;background:transparent;font:inherit;font-size:1.5rem;cursor:pointer}
.tca-portal-ai__note{margin:0;padding:.45rem .8rem;background:#f8fafc;color:#526071;font-size:.76rem;line-height:1.4;border-bottom:1px solid #e5e7eb}
.tca-portal-ai__member{padding:.65rem .8rem;border-bottom:1px solid #e5e7eb;background:#fff}.tca-portal-ai__member[hidden]{display:none}
.tca-portal-ai__member-title{display:block;color:#0f2a4a;font-size:.9rem}.tca-portal-ai__member-note{margin:.25rem 0 .5rem;color:#526071;font-size:.72rem;line-height:1.4}
.tca-portal-ai__member-form{display:flex;gap:.4rem}.tca-portal-ai__member-input{flex:1 1 auto;min-width:0;min-height:40px;border:1px solid #cbd5e1;border-radius:8px;padding:.45rem .55rem;font:inherit}
.tca-portal-ai__member-submit{flex:0 0 auto;min-height:40px;border:0;border-radius:8px;padding:.45rem .7rem;background:#0f2a4a;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.tca-portal-ai__member-result{margin-top:.45rem;white-space:pre-wrap;font-size:.82rem;line-height:1.5;color:#1f2937}
.tca-portal-ai__memory{padding:.65rem .8rem;border-bottom:1px solid #e5e7eb;background:#f8fafc;max-height:230px;overflow:auto}.tca-portal-ai__memory[hidden]{display:none}
.tca-portal-ai__memory-title{display:block;color:#0f2a4a;font-size:.9rem}.tca-portal-ai__memory-note{margin:.25rem 0 .5rem;color:#526071;font-size:.72rem;line-height:1.4}
.tca-portal-ai__memory-course{width:100%;min-height:38px;border:1px solid #cbd5e1;border-radius:8px;padding:.35rem;font:inherit;background:#fff}
.tca-portal-ai__memory-list{display:grid;gap:.35rem;margin:.45rem 0}.tca-portal-ai__memory-row{display:flex;gap:.4rem;align-items:flex-start;padding:.4rem;border:1px solid #e5e7eb;border-radius:8px;background:#fff}
.tca-portal-ai__memory-text{flex:1 1 auto;white-space:pre-wrap;font-size:.78rem;line-height:1.4}.tca-portal-ai__memory-delete{flex:0 0 auto;border:1px solid #cbd5e1;border-radius:7px;background:#fff;padding:.3rem .45rem;font:inherit;cursor:pointer}
.tca-portal-ai__memory-empty{margin:.25rem 0;color:#64748b;font-size:.76rem}.tca-portal-ai__memory-form{display:grid;gap:.35rem}.tca-portal-ai__memory-input{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:8px;padding:.45rem;font:inherit;resize:vertical}
.tca-portal-ai__memory-save{min-height:38px;border:0;border-radius:8px;background:#0f2a4a;color:#fff;font:inherit;font-weight:700;cursor:pointer}.tca-portal-ai__memory-status{margin-top:.3rem;font-size:.76rem;color:#334155}
.tca-portal-ai__frame{display:block;width:100%;height:auto;min-height:220px;flex:1 1 280px;border:0;background:#fff}
@media(max-width:600px){.tca-portal-ai{left:0;right:0;bottom:0}.tca-portal-ai__panel{width:100vw;height:82vh;border-radius:16px 16px 0 0}.tca-portal-ai__launcher{position:absolute;right:8px;bottom:8px}}
@media(prefers-reduced-motion:reduce){.tca-portal-ai *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}