/* AICC 시험 상담(aicc-test.html) — 카카오톡 상담 화면 모양. 카톡 색은 이 파일의 토큰만 쓴다. */
:root {
  --kk-bg: #bacee0; --kk-bar: #a9bdce; --kk-me: #fee500; --kk-me-text: #191919; --kk-you: #ffffff; --kk-you-text: #191919;
  --kk-time: #556677; --kk-sys: #00000014; --kk-input: #ffffff; --kk-btn-line: #d6dde4; --kk-tag: #5b6b7a;
}
:root[data-theme=dark] {
  --kk-bg: #1e2730; --kk-bar: #18202a; --kk-me: #e8d200; --kk-me-text: #141414; --kk-you: #2c3540; --kk-you-text: #eef1f4;
  --kk-time: #93a2b1; --kk-sys: #ffffff14; --kk-input: #17191f; --kk-btn-line: #3b4652; --kk-tag: #9fb0c0;
}

.at-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 24px; align-items: start; }
.at-phone { display: flex; flex-direction: column; height: min(78vh, 760px); min-height: 520px; border-radius: 22px; overflow: hidden;
  background: var(--kk-bg); border: 1px solid var(--line); box-shadow: var(--shadow); }

.at-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--kk-bar); color: var(--kk-you-text); }
:root:not([data-theme=dark]) .at-bar { color: #191919; }
.at-avatar { width: 38px; height: 38px; border-radius: 14px; background: #000; object-fit: cover; display: block; flex-shrink: 0; }
.at-bar-text { display: grid; min-width: 0; }
.at-bar-text b { font-size: 15px; }
.at-bar-text small { font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-reset { margin-left: auto; font-size: 12px; padding: 6px 10px; border-radius: 8px; background: #ffffff8c; color: #191919; flex-shrink: 0; }
:root[data-theme=dark] .at-reset { background: #ffffff1f; color: var(--kk-you-text); }

.at-setup { margin: 14px; padding: 14px; border-radius: 14px; background: var(--kk-you); color: var(--kk-you-text); display: grid; gap: 8px; }
.at-setup label { font-size: 14px; font-weight: 700; }
.at-setup label small { font-weight: 500; opacity: .6; margin-left: 4px; }
.at-setup-row { display: flex; gap: 8px; }
.at-setup input { flex: 1; min-width: 0; min-height: 42px; border: 1px solid var(--kk-btn-line); border-radius: 10px; padding: 0 12px; background: var(--kk-input); color: inherit; font-family: ui-monospace, Consolas, monospace; letter-spacing: .3px; }
.at-start { min-height: 42px; padding: 0 14px; border-radius: 10px; background: var(--kk-me); color: var(--kk-me-text); font-weight: 700; white-space: nowrap; }
.at-style { display: grid; gap: 6px; }
.at-style label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--kk-btn-line); border-radius: 10px; cursor: pointer; }
.at-style label:has(input:checked) { border-color: var(--kk-me-text); background: var(--kk-me); color: var(--kk-me-text); }
.at-setup .at-style input { flex: none; width: 16px; height: 16px; min-height: 0; padding: 0; margin: 2px 0 0; border: 0; accent-color: #191919; }
.at-style span { display: grid; text-align: left; }
.at-style b { font-size: 13px; }
.at-channel { grid-template-columns: 1fr 1fr; }
.at-style small { font-size: 11px; opacity: .75; font-weight: 400; }
.at-hint { font-size: 12px; line-height: 1.6; opacity: .75; }
.at-hint.err { color: #d81940; opacity: 1; }
:root[data-theme=dark] .at-hint.err { color: #ff7c96; }

.at-log { list-style: none; margin: 0; padding: 14px 12px 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.at-sys { align-self: center; max-width: 92%; text-align: center; font-size: 12px; color: var(--kk-you-text); background: var(--kk-sys); border-radius: 12px; padding: 5px 12px; margin: 6px 0; }
:root:not([data-theme=dark]) .at-sys { color: #33414f; }
.at-retry { margin-left: 6px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--kk-me); color: var(--kk-me-text); font-weight: 700; }
.at-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.at-msg.me { flex-direction: row-reverse; }
.at-msg.you { align-items: flex-start; }
.at-msg .at-avatar { width: 34px; height: 34px; border-radius: 13px; font-size: 15px; }
.at-col { display: grid; gap: 4px; min-width: 0; max-width: 78%; }
.at-name { font-size: 12px; color: var(--kk-you-text); }
:root:not([data-theme=dark]) .at-name { color: #33414f; }
.at-name em { font-style: normal; font-size: 11px; color: var(--kk-tag); margin-left: 4px; }
.at-bubble { padding: 9px 12px; border-radius: 4px 16px 16px 16px; background: var(--kk-you); color: var(--kk-you-text); font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; }
.at-msg.me .at-bubble { background: var(--kk-me); color: var(--kk-me-text); border-radius: 16px 4px 16px 16px; }
.at-bubble ol, .at-bubble ul { margin: 4px 0; padding-left: 20px; white-space: normal; }
.at-bubble a { text-decoration: underline; }
.at-bubble.typing { color: var(--kk-tag); font-size: 13px; display: flex; align-items: center; gap: 8px; white-space: normal; }
.at-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.at-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--kk-tag); opacity: .35; animation: at-dot 1.2s ease-in-out infinite; }
.at-dots i:nth-child(2) { animation-delay: .18s; }
.at-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes at-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .at-dots i { animation: at-dot-fade 1.2s ease-in-out infinite; } }
@keyframes at-dot-fade { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.at-time { font-size: 10px; color: var(--kk-time); white-space: nowrap; padding-bottom: 2px; align-self: flex-end; }
.at-msg.you .at-time { margin-bottom: 22px; }
.at-buttons { display: grid; gap: 4px; }
.at-buttons button { min-height: 36px; border-radius: 10px; border: 1px solid var(--kk-btn-line); background: var(--kk-you); color: var(--kk-you-text); font-size: 13px; padding: 6px 10px; text-align: center; }
.at-buttons button:disabled { opacity: .45; }
.at-tools { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 11px; color: var(--kk-tag); }
.at-tools button { background: transparent; color: inherit; font-size: 11px; padding: 2px 0; text-decoration: underline; }
.at-tools .done { color: #147d60; text-decoration: none; }
:root[data-theme=dark] .at-tools .done { color: #72d3b2; }
.at-meta { font-size: 11px; color: var(--kk-tag); font-family: ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }

.at-fb { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--kk-you); color: var(--kk-you-text); border: 1px dashed var(--kk-btn-line); }
.at-fb-kinds { display: flex; flex-wrap: wrap; gap: 4px; }
.at-fb-kinds label { font-size: 12px; border: 1px solid var(--kk-btn-line); border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.at-fb-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.at-fb-kinds label:has(input:checked) { background: var(--kk-me); color: var(--kk-me-text); border-color: transparent; }
.at-fb-kinds label:has(input:focus-visible) { outline: 2px solid #f51c49; outline-offset: 1px; }
.at-fb textarea { min-height: 54px; border: 1px solid var(--kk-btn-line); border-radius: 8px; padding: 7px 9px; background: var(--kk-input); color: inherit; font-size: 13px; resize: vertical; }
.at-fb-row { display: flex; gap: 6px; justify-content: flex-end; }
.at-fb-row button { font-size: 12px; padding: 6px 12px; border-radius: 8px; background: var(--kk-sys); color: inherit; }
.at-fb-row button[type=submit] { background: var(--kk-me); color: var(--kk-me-text); font-weight: 700; }

.at-input { display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px; background: var(--kk-input); border-top: 1px solid var(--kk-btn-line); }
.at-input textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 120px; border: 0; background: transparent; color: var(--text); resize: none; font-size: 14px; line-height: 1.5; padding: 9px 4px; outline: 0; }
.at-input .at-photo-btn { min-height: 38px; width: 38px; padding: 0; display: grid; place-items: center; background: transparent; color: var(--kk-tag); }
.at-input .at-photo-btn[hidden] { display: none; }
.at-bubble.photo { padding: 4px; }
.at-photo { display: block; max-width: 220px; max-height: 260px; border-radius: 12px; object-fit: cover; }
.at-flag { flex-basis: 100%; color: #b45309; font-size: 11px; }
:root[data-theme=dark] .at-flag { color: #fbbf24; }
.at-input button { min-height: 38px; padding: 0 14px; border-radius: 10px; background: var(--kk-me); color: var(--kk-me-text); font-weight: 700; }

.at-side { display: grid; gap: 16px; min-width: 0; }
.at-panel { padding: 20px 22px; }
.at-panel h2 { font-size: 16px; margin-bottom: 10px; }
.at-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.at-panel-head h2 { margin: 0; }
.at-status { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.at-status b { color: var(--text); font-weight: 650; }
.at-status .ok { color: var(--green); }
.at-status .bad { color: var(--red-text); }
.at-help { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--muted); line-height: 1.65; }
.at-note { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.65; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.at-fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.at-fb-list li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; }
.at-fb-list .at-empty { border: 0; padding: 0; color: var(--muted); }
.at-fb-list small { color: var(--muted); font-size: 12px; }
.at-fb-list q { color: var(--muted); quotes: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 900px) {
  .at-layout { grid-template-columns: 1fr; }
  .at-phone { height: 72vh; min-height: 460px; }
}
