/* 첫 화면 라피 수다 챗. 흰 카드·보라 한 색, 폰에서는 아래에서 올라오는 창. */
.ah-hero2 .art{cursor:pointer}
.ah-hero2 .art>.bubble{cursor:pointer}
.rt-panel{position:fixed;right:24px;bottom:24px;z-index:60;width:380px;max-width:calc(100vw - 32px);height:min(600px,calc(100vh - 48px));display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 60px -20px rgba(42,31,90,.35);overflow:hidden}
.rt-panel[hidden]{display:none}
.rt-panel header{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line)}
.rt-panel header b{display:block;font-size:16px}.rt-panel header small{color:var(--muted);font-size:12.5px}
.rt-panel header div{flex:1}
.rt-x{border:0;background:none;font-size:26px;line-height:1;color:var(--muted);cursor:pointer;padding:4px 8px}
.rt-av{flex-shrink:0;width:32px;height:32px;display:inline-block}.rt-av svg{width:100%;height:100%}
.rt-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;background:var(--wash)}
.rt-msg{display:flex;gap:8px;align-items:flex-end;max-width:88%}
.rt-msg p{margin:0;background:#fff;border:1px solid var(--line);border-radius:16px 16px 16px 4px;padding:9px 13px;font-size:15px;line-height:1.55;white-space:pre-line}
.rt-msg.me{align-self:flex-end}.rt-msg.me p{background:#6A4FE6;color:#fff;border-color:#6A4FE6;border-radius:16px 16px 4px 16px}
.rt-rec{display:inline-block;margin-top:6px;font-size:13.5px;color:var(--violet);background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 12px;text-decoration:none}
.rt-rec:hover{border-color:var(--violet)}
.rt-foot{border-top:1px solid var(--line);padding:12px 14px;background:#fff}
.rt-form{display:flex;gap:8px}.rt-form input{flex:1;min-width:0;font:inherit;font-size:16px;border:1px solid var(--line);border-radius:999px;padding:10px 14px}
.rt-form .button{padding:10px 16px}
.rt-left{display:block;color:var(--muted);font-size:12.5px;margin-top:6px}
.rt-login{text-align:center}.rt-login p{margin:0 0 10px;font-weight:600}.rt-login div{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:8px}.rt-login small{color:var(--muted);font-size:12.5px}
.rt-typing{display:flex;gap:4px;align-items:center;min-height:20px}.rt-typing i{width:6px;height:6px;border-radius:50%;background:#C4B5FD;animation:rt-b 1s infinite}.rt-typing i:nth-child(2){animation-delay:.15s}.rt-typing i:nth-child(3){animation-delay:.3s}
@keyframes rt-b{0%,80%,100%{opacity:.3}40%{opacity:1}}
@media (prefers-reduced-motion:reduce){.rt-typing i{animation:none}}
@media (max-width:640px){.rt-panel{right:0;left:0;bottom:0;width:100%;max-width:none;height:78vh;border-radius:18px 18px 0 0}}
.rt-more{display:inline-block;margin-top:14px;font-size:15px;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.rt-more:hover{color:var(--violet)}
/* 늘 떠 있는 대화 버튼(오른쪽 아래). 대화창이 열리면 숨긴다. */
.rt-fab{position:fixed;right:20px;bottom:20px;z-index:55;display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:7px 16px 7px 7px;font:inherit;font-size:15px;font-weight:600;color:var(--ink);cursor:pointer;box-shadow:0 14px 34px -14px rgba(42,31,90,.45)}
.rt-fab:hover{border-color:var(--violet);color:var(--violet)}
.rt-fab .rt-av{width:34px;height:34px}
html.rt-open .rt-fab{display:none}
@media (max-width:640px){.rt-fab{right:14px;bottom:14px;padding:6px;font-size:0;gap:0}.rt-fab .rt-av{width:42px;height:42px}}
@media print{.rt-fab,.rt-panel{display:none}}
.rt-hero{display:flex;align-items:center;gap:8px;background:#fff;border:1.5px solid #C4B5FD;border-radius:999px;padding:6px 6px 6px 8px;box-shadow:0 14px 34px -20px rgba(83,74,165,.6)}
.rt-hero:focus-within{border-color:#6A4FE6}
.rt-hero .rt-av{width:36px;height:36px}
.rt-hero input{flex:1;min-width:0;border:0;outline:0;font:inherit;font-size:16px;background:transparent;padding:8px 4px}
.rt-hero button{border:0;border-radius:999px;background:#6A4FE6;color:#fff;font:inherit;font-weight:600;font-size:15px;padding:10px 18px;cursor:pointer}
.rt-hero button:hover{background:#5B3FD6}
.rt-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.rt-chips button{border:1px solid var(--line);background:#fff;border-radius:999px;padding:7px 14px;font:inherit;font-size:14px;color:var(--ink);cursor:pointer;transition:border-color .15s,color .15s,transform .15s}
.rt-chips button:hover{border-color:#6A4FE6;color:#6A4FE6;transform:translateY(-1px)}
@media (prefers-reduced-motion:reduce){.rt-chips button{transition:none}.rt-chips button:hover{transform:none}}
/* 라피 묶음: 마우스를 올리면 라피 아래에 입력창·말 칩이 떠오른다(마우스 있는 기기). 폰·터치는 늘 보인다. */
.rt-artwrap{position:relative;display:flex;flex-direction:column;align-items:center}
.rt-artwrap>.art{width:100%}
.rt-artwrap .rt-hero,.rt-artwrap .rt-chips{width:min(440px,96%);position:relative;z-index:3}
.rt-artwrap .rt-hero{margin-top:-46px}
.rt-artwrap .rt-chips{margin-top:10px}
}
@media (max-width:800px){.rt-artwrap{order:-1;max-width:420px;margin:0 auto;width:100%}.rt-artwrap .rt-hero{margin-top:-30px}}
/* 말 걸기 유도: 테두리가 천천히 빛난다(입력 중·움직임 줄이기면 멈춤). */
.rt-artwrap .rt-hero{animation:rt-glow 2.8s ease-in-out infinite}
.rt-artwrap .rt-hero:focus-within,.rt-artwrap .rt-hero.touched{animation:none}
@keyframes rt-glow{0%,100%{box-shadow:0 14px 34px -20px rgba(83,74,165,.6),0 0 0 0 rgba(106,79,230,0)}50%{box-shadow:0 14px 34px -20px rgba(83,74,165,.6),0 0 0 6px rgba(106,79,230,.16)}}
@media (prefers-reduced-motion:reduce){.rt-artwrap .rt-hero{animation:none}}
/* 영어 첫 화면: 라피 그림 + 말풍선 + 입력창 */
.rt-en{margin:30px auto 8px;max-width:560px;align-items:center}
.rt-en .rt-en-art{position:relative;border:0;background:none;padding:0;cursor:pointer;align-self:center}
.rt-en .rt-en-art img{width:150px;height:150px;object-fit:contain;display:block}
.rt-en .rt-bubble{position:absolute;left:120px;top:18px;white-space:nowrap;background:#fff;border:1px solid var(--line);border-radius:16px 16px 16px 4px;padding:8px 13px;font-size:14.5px;font-weight:600;color:var(--ink);box-shadow:0 14px 30px -18px rgba(42,31,90,.5)}
.rt-en .rt-hero{margin-top:-8px;width:100%}
.rt-en .rt-chips{justify-content:center;width:100%}
@media (max-width:640px){.rt-en{margin-top:58px}.rt-en .rt-bubble{left:50%;top:-40px;transform:translateX(-50%);font-size:13.5px}.rt-en .rt-en-art img{width:120px;height:120px}}
.rt-artwrap.rt-en{order:0;margin-left:auto;margin-right:auto}
