.tn-ai { margin-top: 0; padding-top: 8px; padding-bottom: 64px; border-top: 0; }
.tn-ai-heading { display: flex; align-items: center; gap: 14px; }
.tn-ai-heading h2 { margin: 0; font-size: 28px; }
.tn-beta { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px 3px; margin-left: 5px; border: 0; border-radius: 999px; background: linear-gradient(180deg,#eee4d2,#dfceb0); color: #806039; font-family: ui-sans-serif,system-ui,sans-serif; font-size: 8px; font-weight: 800; letter-spacing: .055em; line-height: 1; vertical-align: middle; transform: translateY(-1px); box-shadow: inset 0 1px 0 #ffffffa6; }
.tn-ai-heading .tn-beta { padding: 5px 10px 4px; font-size: 10px; }
.tn-ai-examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 18px; }
.tn-ai button { font: inherit; cursor: pointer; }
.tn-ai button:disabled { opacity: .5; cursor: wait; }
.tn-ai-examples button { border: 1px solid var(--rule); border-radius: 16px; padding: 9px 13px; background: rgba(255,255,255,.28); color: var(--ink-2); font-size: 13px; text-align: left; line-height: 1.5; transition: background .15s,border-color .15s; }
.tn-ai-examples button:hover { background: rgba(255,255,255,.65); border-color: var(--ink-2); }
#tn-ai-form { display: flex; gap: 10px; align-items: flex-end; padding: 9px; border: 1px solid var(--rule); border-radius: 17px; background: rgba(255,255,255,.35); transition: border-color .15s,box-shadow .15s; }
#tn-ai-form:focus-within { border-color: #9d896a; box-shadow: 0 0 0 3px #bca47c19; }
#tn-ai-question { flex: 1; min-width: 0; min-height: 76px; resize: vertical; padding: 9px 10px; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); line-height: 1.7; }
#tn-ai-form>button { padding: 12px 18px; min-height: 44px; border: 0; border-radius: 11px; background: var(--ink); color: var(--paper); white-space: nowrap; }
#tn-ai-status { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
#tn-ai-status:empty { display: none; }
.tn-ai[data-state="loading"] #tn-ai-status::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border: 2px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: tn-ai-spin .8s linear infinite; }
#tn-ai-answer { margin-top: 30px; padding: 0; border: 0; }
#tn-ai-answer:not([hidden]) { animation: tn-ai-arrive .24s ease-out both; }
.tn-ai-asked { width: fit-content; max-width: 82%; margin: 0 0 28px auto; padding: 11px 17px; border-radius: 16px 4px 16px 16px; background: rgba(100,80,45,.07); overflow-wrap: anywhere; }
.tn-ai-asked>span { display: block; margin-bottom: 4px; color: var(--ink-3); font-size: 11px; }
.tn-ai-asked p { margin: 0; font-size: 15px; line-height: 1.7; }
.tn-ai-reporter { display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 14px; align-items: start; }
.tn-ai-avatar { display: grid; place-items: center; width: 50px; height: 54px; border-radius: 16px; background: #e9e1d2; color: #443b30; }
.tn-ai-avatar svg { width: 46px; height: 46px; }
.tn-ai-byline { margin: 1px 0 9px 2px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tn-ai-reply-bubble { padding: 20px 23px; border: 1px solid var(--rule); border-radius: 4px 18px 18px 18px; background: rgba(255,255,255,.45); box-shadow: 0 4px 16px #392d1910; }
.tn-ai-answer-text { margin: 0; font-size: 16px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.tn-ai-period { margin: 14px 0 0; font-size: 11px; line-height: 1.6; color: var(--ink-3); }
.tn-ai-period:empty { display: none; }
.tn-ai-source-wrap { margin-top: 17px; }
.tn-ai-source-wrap h4 { margin: 0 0 9px 2px; color: var(--ink-3); font-size: 11px; font-weight: 600; }
.tn-ai-sources { display: grid; gap: 8px; }
.tn-ai-sources a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 11px; color: var(--ink); text-decoration: none; transition: background .15s; }
.tn-ai-sources a:hover { background: rgba(255,255,255,.5); }
.tn-ai-source-kind { flex-shrink: 0; min-width: 34px; padding: 5px 6px; border-radius: 6px; background: rgba(100,80,45,.07); color: var(--ink-2); font-size: 10px; text-align: center; }
.tn-ai-source-content { flex: 1; min-width: 0; }
.tn-ai-source-content strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.6; overflow-wrap: anywhere; }
.tn-ai-source-content>span { display: block; margin-top: 3px; color: var(--ink-3); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.tn-ai-source-arrow { flex-shrink: 0; font-size: 16px; color: var(--ink-3); }
.tn-ai-about { margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--rule); }
.tn-ai-about h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.tn-ai-faq { margin: 0; }
.tn-ai-faq>div { padding: 17px 0; border-bottom: 1px solid var(--rule); }
.tn-ai-faq>div:last-child { border-bottom: 0; }
.tn-ai-faq dt { display: flex; gap: 10px; align-items: baseline; color: var(--ink); font-size: 14px; font-weight: 600; line-height: 1.7; }
.tn-ai-faq dt::before { content: 'Q'; color: #917b59; font-size: 13px; font-weight: 700; }
.tn-ai-faq dd { margin: 7px 0 0 21px; color: var(--ink-2); font-size: 13px; line-height: 1.85; word-break: keep-all; }
.tn-ai-faq dd p { margin: 0; }.tn-ai-faq dd p+p { margin-top: 4px; }
#tn-ai-settings { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.8; }
#tn-ai-settings summary { cursor: pointer; }#tn-ai-settings a { color: inherit; }
#tn-ai-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0; }
#tn-ai-key { flex: 1; min-width: 0; padding: 12px; border: 1px solid var(--rule); background: transparent; }
#tn-ai-setup button { border: 1px solid var(--rule); padding: 10px 14px; background: transparent; color: var(--ink); }
@keyframes tn-ai-arrive { from {opacity:0;transform:translateY(6px)} to {opacity:1;transform:translateY(0)} }
@keyframes tn-ai-spin { to {transform:rotate(360deg)} }
@media (max-width:600px) {
 .tn-ai-heading h2 { font-size: 23px; }
 .tn-ai-examples button { font-size: 12px; }
 #tn-ai-form { flex-wrap: wrap; }#tn-ai-question { flex-basis: 100%; }#tn-ai-form>button { margin-left: auto; }
 .tn-ai-asked { max-width: 90%; }.tn-ai-asked p { font-size: 14px; }
 .tn-ai-reporter { grid-template-columns: 34px minmax(0,1fr); gap: 9px; }
 .tn-ai-avatar { width: 34px; height: 39px; border-radius: 11px; }.tn-ai-avatar svg { width: 34px; height: 34px; }
 .tn-ai-reply-bubble { padding: 15px; border-radius: 4px 14px 14px 14px; }.tn-ai-answer-text { font-size: 15px; }
 .tn-ai-sources a { gap: 8px; padding: 10px; }.tn-ai-source-content strong { font-size: 12px; }
 #tn-ai-key { flex-basis: 100%; }
}
@media (prefers-reduced-motion:reduce) { #tn-ai-answer:not([hidden]),.tn-ai[data-state="loading"] #tn-ai-status::before { animation: none; } }

.tn-ai-avatar { width:64px; height:64px; background:transparent; border-radius:14px; overflow:hidden; }
.tn-ai-avatar img { display:block; width:100%; height:100%; object-fit:contain; }
.tn-ai-reporter { grid-template-columns:64px minmax(0,1fr); }
@media(max-width:600px) { .tn-ai-avatar {width:44px;height:44px;border-radius:10px;} .tn-ai-reporter {grid-template-columns:44px minmax(0,1fr);} }

/* 새 기능 알림: 이벤트 배너형 카드 */

.tn-ai-answer-actions { display:flex; justify-content:flex-end; margin-top:12px; }
#tn-ai-report { padding:7px 0 7px 12px; border:0; background:transparent; color:var(--ink-3); font:inherit; font-size:12px; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
#tn-ai-report:hover { color:var(--ink); }
#tn-ai-report:focus-visible { outline:2px solid var(--ink); outline-offset:3px; }
