.chat-markdown,.journey-ui .chat-markdown{font-family:Pretendard,sans-serif;font-size:16px;line-height:1.8;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.chat-markdown p,.ai-chat-bubble .chat-markdown p,.team-chat-bubble .chat-markdown p{margin:0 0 13px;font:inherit;line-height:inherit;white-space:normal;color:inherit}
.chat-markdown strong,.ai-chat-bubble .chat-markdown strong{font-size:inherit;font-weight:700;color:inherit}.chat-markdown em{font-style:italic}.chat-markdown del{opacity:.75}
.chat-markdown :is(h2,h3,h4,h5,h6){margin:26px 0 11px;color:inherit;font-weight:700;line-height:1.45;letter-spacing:-.025em;word-break:keep-all}.chat-markdown h2{font-size:23px}.chat-markdown h3{font-size:21px}.chat-markdown h4{font-size:18px}.chat-markdown :is(h5,h6){font-size:16px}
.chat-markdown> :first-child{margin-top:0}.chat-markdown> :last-child{margin-bottom:0}
.chat-markdown :is(ul,ol){margin:10px 0 17px;padding-left:25px;list-style-position:outside}.chat-markdown ul{list-style-type:disc}.chat-markdown ol{list-style-type:decimal}.chat-markdown li{padding-left:3px;margin:7px 0;line-height:1.75}
.chat-markdown code{font-family:Consolas,'Malgun Gothic',monospace;font-size:.9em;background:#edf2f4;border:1px solid #e0e6e9;border-radius:5px;padding:2px 5px;color:#294d5b}.chat-markdown pre{margin:16px 0;padding:17px 19px;background:#f3f5f7;border:1px solid #dce3e8;border-radius:10px;overflow-x:auto;line-height:1.65}.chat-markdown pre code{display:block;padding:0;border:0;background:none;white-space:pre;overflow-wrap:normal;word-break:normal;color:#2e3c4a}
.chat-markdown blockquote{margin:16px 0;padding:9px 16px;border-left:3px solid #6fc5c1;background:#f2f9f8;color:#3f625e;border-radius:0 7px 7px 0}.chat-markdown hr{border:0;border-top:1px solid #dae5e3;margin:23px 0}
.chat-markdown a{display:inline!important;color:#216b65!important;font-size:inherit!important;text-decoration:underline;text-underline-offset:3px}.chat-markdown a:hover{color:#154f4a!important}.chat-markdown a:focus-visible{outline:2px solid #287f7a;outline-offset:3px}
.chat-table-scroll{max-width:100%;overflow-x:auto;margin:18px 0;border:1px solid #d7e4e0;border-radius:10px}.chat-table-scroll:focus-visible{outline:2px solid #287f7a;outline-offset:3px}.chat-markdown table{width:100%;margin:0;border-collapse:collapse;font:14px/1.7 Pretendard,sans-serif;text-align:left}.chat-markdown th,.chat-markdown td{padding:11px 14px;border-bottom:1px solid #dee8e5;min-width:105px;vertical-align:top}.chat-markdown th{font-weight:700;background:#e9f5f2;color:#264d47}.chat-markdown tr:last-child td{border-bottom:0}
.ai-chat-conversation-list{display:none}
.ai-chat-page-heading{margin:0 0 24px}.ai-chat-page-heading h1{font-size:32px;letter-spacing:-.04em;margin:8px 0}.ai-chat-page-heading p{font-size:15px;color:#61736f;margin:0;line-height:1.7}
body:has(#main.ai-chat-view) .class-banner{display:none}#main.ai-chat-view{max-width:1500px}.ai-chat-page-mode{position:static;right:auto;bottom:auto;z-index:auto;width:100%;font-size:16px}
.ai-chat-page-mode>.ai-chat-toggle{display:none}.ai-chat-page-mode .ai-chat-panel{position:static;right:auto;bottom:auto;width:100%;height:clamp(610px,calc(100dvh - 300px),890px);display:grid;grid-template-columns:225px minmax(0,1fr);grid-template-rows:auto minmax(160px,1fr) auto;border:1px solid #d7e5e1;border-radius:17px;box-shadow:0 5px 22px #254c4305}
.ai-chat-page-mode .ai-chat-panel>header{grid-column:2;grid-row:1;background:#fff;align-items:center;padding:20px 28px}.ai-chat-page-mode .ai-chat-panel>header strong{font-size:16px;max-width:680px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-chat-page-mode .ai-chat-close{display:none}
.ai-chat-page-mode .ai-chat-history{grid-column:1;grid-row:1;padding:17px 14px;background:#f6f9f8;border-right:1px solid #e0e9e6;align-items:center}.ai-chat-page-mode .ai-chat-history>label,.ai-chat-page-mode .ai-chat-history>select{display:none}.ai-chat-page-mode .ai-chat-new{width:100%;min-height:42px;border:1px solid #c8dbd5;border-radius:9px;background:#fff;font-size:14px;font-weight:650;transition:background .15s,transform .12s}.ai-chat-page-mode .ai-chat-new:hover{background:#e7f4ef}.ai-chat-page-mode .ai-chat-new:active{transform:translateY(1px)}
.ai-chat-page-mode .ai-chat-conversation-list{display:block;grid-column:1;grid-row:2/4;overflow-y:auto;padding:9px 10px 18px;background:#f6f9f8;border-right:1px solid #e0e9e6;min-height:0}.ai-chat-conversation-list button{display:block;text-align:left;width:100%;padding:12px 13px;min-height:44px;margin:3px 0;border:1px solid transparent;border-radius:9px;background:transparent;color:#4a625b;font:14px/1.55 Pretendard,sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;transition:background .15s}.ai-chat-conversation-list button:hover{background:#eaf2ef}.ai-chat-conversation-list button[aria-pressed=true]{background:#d8f1ed;color:#205d50;font-weight:650;border-color:#c4e1d8}.ai-chat-history-empty{font-size:13px;color:#687e75;line-height:1.8;margin:13px 12px;word-break:keep-all}
.ai-chat-page-mode .ai-chat-messages{grid-column:2;grid-row:2;min-height:0;padding:28px max(28px,calc((100% - 800px)/2));background:#fff;scroll-behavior:smooth}.ai-chat-page-mode .ai-chat-bubble{margin-bottom:28px;padding:14px 18px;max-width:92%;border-radius:14px}.ai-chat-page-mode .ai-chat-bubble.assistant{padding:0;background:none;width:100%;max-width:100%;color:#2d3c37}.ai-chat-page-mode .ai-chat-bubble>strong{display:block;margin-bottom:8px;font-size:12px;font-weight:650;color:#56796e}.ai-chat-page-mode .ai-chat-bubble.mine{background:#e7f5ef}.ai-chat-page-mode .ai-chat-empty{max-width:440px;margin:70px auto;color:#617d72;text-align:center;font-size:16px;line-height:1.9;word-break:keep-all}
.ai-chat-page-mode .ai-chat-form{grid-column:2;grid-row:3;margin:0;padding:16px max(28px,calc((100% - 800px)/2)) 18px;max-height:420px;background:#fff;border-top:1px solid #e4ece8;overflow-y:auto}.ai-chat-page-mode .ai-chat-form textarea{min-height:78px;font-size:16px;line-height:1.7;border-radius:11px;padding:12px 14px;background:#fcfefd}.ai-chat-page-mode .ai-chat-model-label{font-size:13px;font-weight:650;color:#42695b}.ai-chat-page-mode .ai-chat-form>label[for=ai-chat-message]{font-size:13px;margin-top:12px}.ai-chat-page-mode .ai-chat-bottom{margin-top:7px}.ai-chat-page-mode .ai-chat-bottom .btn{min-height:43px;min-width:78px;border-radius:9px}
@media(max-width:800px){.ai-chat-page-heading h1{font-size:27px}.ai-chat-page-mode .ai-chat-panel{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(170px,1fr) auto;min-height:690px;height:calc(100dvh - 220px)}.ai-chat-page-mode .ai-chat-history{grid-column:1;grid-row:1;border-right:0;padding:12px;gap:8px}.ai-chat-page-mode .ai-chat-history>select{display:block;min-width:0}.ai-chat-page-mode .ai-chat-new{width:auto;min-width:76px;padding:0 12px}.ai-chat-page-mode .ai-chat-panel>header{grid-column:1;grid-row:2;padding:14px 18px}.ai-chat-page-mode .ai-chat-conversation-list{display:none}.ai-chat-page-mode .ai-chat-messages{grid-column:1;grid-row:3;padding:22px 18px}.ai-chat-page-mode .ai-chat-form{grid-column:1;grid-row:4;padding:14px 18px;max-height:420px}.ai-chat-page-mode .ai-chat-panel>header strong{max-width:70vw}.chat-markdown{font-size:16px}.chat-markdown h2{font-size:21px}.chat-markdown h3{font-size:19px}}
@media(prefers-reduced-motion:reduce){.ai-chat-conversation-list button,.ai-chat-page-mode .ai-chat-new{transition:none}.ai-chat-page-mode .ai-chat-messages{scroll-behavior:auto}}

.ai-chat-answer-actions{display:flex;align-items:center;margin-top:4px}
.ai-chat-answer-actions button{display:grid;place-items:center;min-width:44px;min-height:44px;padding:8px;border:0;border-radius:8px;background:transparent;color:#42645e;cursor:pointer}
.ai-chat-answer-actions button:hover{background:#d8f1f0;color:#225c57}
.ai-chat-answer-actions svg{width:19px;height:19px}
body:has(.ai-chat-window-mode) .app-shell{display:block}
body:has(.ai-chat-window-mode) :is(.sidebar,.page-footer){display:none}
body:has(.ai-chat-window-mode) #main.ai-chat-view{width:min(100%,1080px);margin-inline:auto;padding:16px clamp(12px,3vw,28px)}
.ai-chat-window-mode .ai-chat-panel{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(140px,1fr) auto;height:calc(100dvh - 215px);min-height:480px}
.ai-chat-window-mode .ai-chat-panel>header{grid-column:1;grid-row:1;padding:14px 18px}
.ai-chat-window-mode .ai-chat-history{grid-column:1;grid-row:2;border-right:0;padding:10px 14px}
.ai-chat-window-mode .ai-chat-history>label,.ai-chat-window-mode .ai-chat-history>select{display:block}
.ai-chat-window-mode .ai-chat-new{width:auto;padding-inline:12px}
.ai-chat-window-mode .ai-chat-conversation-list{display:none}
.ai-chat-window-mode .ai-chat-messages{grid-column:1;grid-row:3}
.ai-chat-window-mode .ai-chat-form{grid-column:1;grid-row:4}

/* Compact conversation rhythm; content controls bubble height. */
.ai-chat .chat-markdown,.team-chat .chat-markdown{font-size:16px;line-height:1.55}
.ai-chat .chat-markdown p,.team-chat .chat-markdown p{margin:0 0 8px;line-height:1.55}
.ai-chat .chat-markdown>:first-child,.team-chat .chat-markdown>:first-child{margin-top:0}
.ai-chat .chat-markdown>:last-child,.team-chat .chat-markdown>:last-child{margin-bottom:0}
.ai-chat .chat-markdown :is(ul,ol),.team-chat .chat-markdown :is(ul,ol){margin:7px 0 10px;padding-left:22px}
.ai-chat .chat-markdown li,.team-chat .chat-markdown li{margin:3px 0;line-height:1.55}
.ai-chat .chat-markdown :is(h2,h3,h4),.team-chat .chat-markdown :is(h2,h3,h4){margin:17px 0 8px;line-height:1.4}
.ai-chat .chat-markdown h2,.team-chat .chat-markdown h2{font-size:21px}
.team-chat .team-chat-message{gap:3px;margin-bottom:12px}
.team-chat .team-chat-message .team-chat-bubble{min-height:0;padding:8px 12px;max-width:min(85%,760px)}
.ai-chat .ai-chat-bubble{margin-bottom:18px}
.ai-chat .ai-chat-bubble.mine{padding:9px 14px}
.ai-chat .ai-chat-bubble>strong{margin-bottom:4px}
.ai-chat-working{display:flex;align-items:center;gap:9px;min-height:26px;margin:5px 0;color:#2d2d2d;font:14px/1.5 Pretendard,sans-serif}
.ai-working-label{animation:chat-working-pulse 1.5s ease-in-out infinite}
.ai-working-dot{width:7px;height:7px;border-radius:50%;background:#4aa8a4;animation:chat-working-pulse 1.5s ease-in-out infinite .2s}
@keyframes chat-working-pulse{0%,100%{opacity:.68}50%{opacity:1}}
.chat-delivery{margin-top:4px;color:#647b74;font:11px/1.5 Pretendard,sans-serif}
.chat-delivery.is-failed{color:#934b41}
.chat-delivery button{min-height:32px;margin-left:6px;padding:4px 9px;border:1px solid #c7dbd6;border-radius:7px;background:#fff;color:#286c69;font:12px/1.4 Pretendard,sans-serif;cursor:pointer}
.chat-delivery button:focus-visible{outline:2px solid #286c69;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.ai-working-label,.ai-working-dot{animation:none;opacity:1}}

.j-ai-sent-question{margin:8px 0;padding:9px 12px;background:#e7f5ef;border-radius:10px;color:#2d3c37;text-align:left}.j-ai-sent-question p{margin:4px 0 0;white-space:pre-wrap;line-height:1.55}

.chat-image-preview[hidden] { display: none; }
.chat-image-preview {
  display: block;
  max-width: 100%;
  margin: 6px 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
}
.chat-image-preview img,
.ai-chat-generated-image .chat-image-preview img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 560px);
  max-height: 320px;
  border-radius: inherit;
  object-fit: contain;
}
.chat-image-preview:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.chat-image-dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 56px 16px 16px;
  border: 0;
  background: transparent;
  color: white;
  overflow: hidden;
  cursor: zoom-out;
}
.chat-image-dialog[open] { display: grid; place-items: center; }
.chat-image-dialog::backdrop { background: rgb(12 16 24 / 90%); }
.chat-image-dialog img { max-width: 100%; max-height: calc(100dvh - 72px); object-fit: contain; cursor: default; }
.chat-image-dialog button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #273040;
  color: white;
  font-size: 25px;
  cursor: pointer;
}

