/* Deliberately scoped: standalone readers and memorials have their own styles. */
.site-chat-launcher,.site-chat,.site-chat *{box-sizing:border-box}
/* A quiet, icon-only button with a fine warm rim. */
.site-chat-launcher{position:fixed;z-index:90;right:max(22px,env(safe-area-inset-right));bottom:calc(22px + env(safe-area-inset-bottom) + var(--site-chat-dock,0px));display:grid;place-items:center;width:60px;height:60px;min-height:60px;max-width:calc(100vw - 32px);padding:0;border:2px solid #f5efde;border-radius:50%;background:radial-gradient(ellipse at 30% 10%,#6a846b55,transparent 65%),linear-gradient(145deg,#44634f,#294936 75%);color:#f1e4bd;box-shadow:0 7px 22px #203b3029,0 2px 5px #203b301a,inset 0 1px 1px #ffffff26;text-decoration:none;font:600 12px/1.5 Pretendard,'Noto Sans KR',sans-serif;isolation:isolate;transition:box-shadow .2s ease,transform .2s ease}
.site-chat-launcher::before{content:"";position:absolute;inset:4px;border:1px solid #e3ce9b38;border-radius:inherit;pointer-events:none}
.site-chat-launcher__icon{display:grid;place-items:center;width:32px;height:32px;color:inherit}
.site-chat-launcher__icon svg{display:block;width:32px;height:32px;filter:drop-shadow(0 1px 1px #102b3329)}
.site-chat-launcher__tooltip{position:absolute;right:calc(100% + 12px);top:50%;padding:8px 13px;border:1px solid #dfdece;border-radius:12px;background:#fffdf7;color:#3e5543;box-shadow:0 4px 14px #233e3014;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none;transform:translate(4px,-50%);transition:opacity .18s ease,transform .18s ease,visibility .18s}
.site-chat-launcher:focus-visible .site-chat-launcher__tooltip{opacity:1;visibility:visible;transform:translate(0,-50%)}
@media(hover:hover) and (pointer:fine){
 .site-chat-launcher:hover{transform:translateY(-2px);box-shadow:0 10px 25px #203b3033,0 2px 5px #203b301a,inset 0 1px 1px #ffffff26}
 .site-chat-launcher:hover .site-chat-launcher__tooltip{opacity:1;visibility:visible;transform:translate(0,-50%)}
}
.site-chat-launcher:active{transform:scale(.96)}
dialog.site-chat{position:fixed;inset:auto max(22px,env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom) + var(--site-chat-keyboard,0px)) auto;width:392px;max-width:calc(100vw - 28px);height:min(650px,calc(var(--site-chat-height,100dvh) - 44px));max-height:calc(var(--site-chat-height,100dvh) - 28px);margin:0;padding:0;border:1px solid #d9d5c8;border-radius:24px;background:#f8f6ef;color:#35473c;box-shadow:0 24px 80px #152a3440;font:400 14px/1.7 Pretendard,'Noto Sans KR',sans-serif;overflow:hidden;word-break:keep-all;overflow-wrap:anywhere}
dialog.site-chat:not([open]){display:none}
dialog.site-chat[open]{display:flex;flex-direction:column}
.site-chat::backdrop{background:#182d2538}
html:has(#site-chat-dialog[open]){overflow:hidden}
.site-chat .site-chat__header{position:relative;display:flex;justify-content:space-between;gap:8px;flex:none;padding:24px 18px 22px 24px;border:0;background:#314b3d;color:#fffdf6}
.site-chat .site-chat__header p{margin:5px 0 0;font-size:12px;line-height:1.7;color:#e0e7dc}
.site-chat .site-chat__header .site-chat__eyebrow{margin:0 0 8px;font-size:10px;letter-spacing:.06em;color:#e6cfa0}
.site-chat .site-chat__header h2{margin:0;padding:0;border:0;color:#fffdf6;font:600 21px/1.5 'Gowun Batang',serif;letter-spacing:-.03em}
.site-chat button{min-height:44px;margin:0;border:0;cursor:pointer;font-family:inherit;letter-spacing:normal;box-shadow:none}
.site-chat .site-chat__close{display:grid;place-items:center;flex:none;align-self:flex-start;width:44px;height:44px;padding:0;border:1px solid #ffffff35;border-radius:50%;background:transparent;color:#fffdf6}
.site-chat .site-chat__close:hover{background:#ffffff18}
.site-chat .site-chat__messages{position:relative;flex:1;min-height:60px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:22px 18px}
.site-chat .site-chat__message{width:fit-content;max-width:93%;margin:0 0 16px;padding:13px 16px;border:1px solid #e2dfd3;border-radius:18px 18px 18px 4px;background:#fffefa;color:#405044;font-size:14px;line-height:1.8;text-align:left}
.site-chat .site-chat__message p{margin:0;white-space:pre-wrap;color:inherit;font:inherit}
.site-chat .site-chat__author{display:block;margin-bottom:6px;font-size:10px;font-weight:700;color:#7b785f}
.site-chat .site-chat__message--user{margin-left:auto;border-color:#dce5da;border-radius:18px 18px 4px 18px;background:#e4ecdf;color:#304834}
.site-chat .site-chat__sources{display:grid;gap:7px;margin:12px 0 0;padding-top:10px;border-top:1px solid #e4e0d2}
.site-chat .site-chat__sources a{color:#466149;text-decoration:underline;text-underline-offset:3px;font-size:12px;line-height:1.6}
.site-chat .site-chat__compose{flex:none;padding:0 18px 16px;background:#f8f6ef}
.site-chat .site-chat__questions{display:flex;flex-wrap:wrap;gap:6px}
.site-chat .site-chat__questions button{padding:5px 10px;border:1px solid #d9d9cb;border-radius:24px;background:#fffdf7;color:#59694e;font-size:11px;font-weight:500;line-height:1.5}
.site-chat .site-chat__questions button:hover{border-color:#77896c;background:#f0f3e9}
.site-chat .site-chat__status{min-height:22px;margin:5px 0;color:#6b735f;font-size:11px;line-height:1.7}
.site-chat .site-chat__status[data-error]{color:#914b3a}
.site-chat .site-chat__form{display:flex;align-items:center;gap:4px;margin:0;padding:6px;border:1px solid #cfd4c4;border-radius:18px;background:#fffefa}
.site-chat .site-chat__form:focus-within{border-color:#718565;box-shadow:0 0 0 2px #71856522}
.site-chat #site-chat-input{display:block;flex:1;min-width:0;width:100%;height:44px;max-height:100px;margin:0;padding:10px;border:0;border-radius:0;outline:none;background:transparent;color:#304834;font:400 16px/24px Pretendard,'Noto Sans KR',sans-serif;resize:vertical;box-shadow:none;overflow-wrap:anywhere}
.site-chat #site-chat-input::placeholder{font-size:13px;color:#85897a}
.site-chat .site-chat__send{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border-radius:14px;background:#314b3d;color:#fffdf6}
.site-chat button:disabled{opacity:.5;cursor:wait}
.site-chat .site-chat__note{margin:9px 0 7px;color:#777b6e;font-size:10px;line-height:1.7;text-align:center}
.site-chat .site-chat__links{display:flex;justify-content:center;flex-wrap:wrap;gap:6px 18px}
.site-chat .site-chat__links a{display:inline-flex;align-items:center;min-height:28px;color:#56634d;text-decoration:underline;text-underline-offset:3px;font-size:11px;line-height:1.6}
.site-chat .site-chat__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}
.site-chat-launcher:focus-visible,.site-chat :is(button,a):focus-visible{outline:3px solid #b29051;outline-offset:3px}
@media(max-width:600px){
 .site-chat-launcher{right:max(14px,env(safe-area-inset-right));bottom:calc(14px + env(safe-area-inset-bottom) + var(--site-chat-dock,0px));width:54px;height:54px;min-height:54px}
 .site-chat-launcher__icon,.site-chat-launcher__icon svg{width:29px;height:29px}
 dialog.site-chat{right:max(10px,env(safe-area-inset-right));bottom:calc(10px + env(safe-area-inset-bottom) + var(--site-chat-keyboard,0px));width:calc(100vw - 20px);max-width:calc(100vw - 20px);height:min(650px,calc(var(--site-chat-height,100dvh) - 20px));max-height:calc(var(--site-chat-height,100dvh) - 20px);border-radius:22px}
 .site-chat .site-chat__header{padding:20px 14px 18px 20px}
 .site-chat .site-chat__messages{padding:18px 14px}
 .site-chat .site-chat__compose{padding:0 14px 12px}
}
@media(max-height:520px){
 .site-chat .site-chat__header{padding:10px 14px}
 .site-chat .site-chat__header .site-chat__eyebrow,.site-chat .site-chat__header h2+p,.site-chat .site-chat__questions,.site-chat .site-chat__note{display:none}
 .site-chat .site-chat__messages{padding:10px 14px}
 .site-chat .site-chat__compose{padding-bottom:8px}
}
.site-chat[data-keyboard] .site-chat__questions,.site-chat[data-keyboard] .site-chat__note{display:none}
@media(prefers-reduced-motion:reduce){.site-chat-launcher,.site-chat-launcher__tooltip{transition:none}}
@media print{.site-chat-launcher,dialog.site-chat{display:none!important}}
