/* School public chat: controls and content follow the available panel width in every layout. */
.public-chat-layout{--chat-site-header-height:52px;font-family:system-ui,-apple-system,"Noto Sans CJK KR","Malgun Gothic",sans-serif;color:#203b60}
.public-chat-layout>.site-header{height:var(--chat-site-header-height);min-height:var(--chat-site-header-height);max-width:1232px;width:calc(100% - 48px);margin:auto;padding:0 16px;flex-shrink:0}
.public-chat-layout>.site-header .brand-logo{width:160px;max-height:32px;object-fit:contain}
.public-chat-layout .standalone-chat{height:calc(100dvh - var(--chat-site-header-height));max-width:1168px;width:100%;padding:12px 24px 16px;margin:auto;min-height:0}
.public-chat-layout .standalone-chat .chat-panel{height:100%;min-height:0;max-height:none}
.public-chat-layout .chat-panel[data-audience=public]{--chat-text-size:16px;--chat-reading-width:100%;position:relative;isolation:isolate;min-width:0;border-radius:14px;box-shadow:0 6px 24px #17375f0c;font-family:inherit}
.public-chat-layout [data-audience=public] .chat-panel-header{display:flex;flex-wrap:nowrap;min-height:72px;gap:12px;padding:12px 20px;align-items:center}
.public-chat-layout [data-audience=public] .chat-identity{width:auto;gap:10px;flex:1 1 0;min-width:0}
.public-chat-layout [data-audience=public] .chat-avatar-frame{display:flex;width:36px;height:36px;flex:0 0 36px;align-items:center;justify-content:center;background:#f3f7fc;border-radius:10px}
.public-chat-layout [data-audience=public] .chat-avatar{display:block;width:36px;height:36px;object-fit:contain;object-position:center;border-radius:0;padding:0;background:transparent}
.public-chat-layout [data-audience=public] .chat-identity h2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:16px;line-height:1.35;letter-spacing:-.2px;white-space:normal;overflow:hidden}
.public-chat-layout [data-audience=public] .chat-presence{margin-top:3px;gap:5px;font-size:12px;line-height:1.35;overflow:hidden;white-space:nowrap}
.public-chat-layout [data-audience=public] [data-status-label]{overflow:hidden;text-overflow:ellipsis}
/* Stable 44px targets; labels appear only when the chat itself has enough room. */
.public-chat-layout [data-audience=public] .chat-header-actions{display:flex;align-items:center;flex:0 0 auto;width:auto;gap:4px;padding:0;border:0;justify-content:flex-end}
.public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button,.public-chat-layout [data-audience=public] .chat-header-actions>.icon-button,.public-chat-layout [data-audience=public] .chat-more-toggle{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;max-width:44px;height:44px;min-height:44px;max-height:44px;flex:0 0 44px;padding:0;gap:0;border:1px solid #d3deed;border-radius:50%;background:#fff;color:#294b76;box-shadow:none;line-height:1}
.public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button:hover:not(:disabled),.public-chat-layout [data-audience=public] .chat-header-actions>.icon-button:hover,.public-chat-layout .chat-more-toggle:hover{background:#edf4ff;border-color:#b7cce9}
.public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button>[data-nationality-label],.public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button>[data-new-chat-label],.public-chat-layout [data-audience=public] .chat-header-actions>[data-expand-chat]>[data-expand-label]{display:none}
.public-chat-layout .chat-header-actions .ui-icon{width:22px;height:22px;stroke-width:2;flex:0 0 22px}
.public-chat-layout [data-audience=public] .chat-header-actions>.chat-profile-button{position:relative}
.public-chat-layout [data-audience=public] .chat-header-actions [data-profile-saved]{position:absolute;right:-2px;bottom:-2px;display:grid;place-items:center;width:16px;height:16px;border:2px solid #fff;border-radius:50%;background:#e7f6ee;color:#166647;font-size:10px;line-height:1}
@container admissions-chat (min-width:760px){
 .public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button,.public-chat-layout [data-audience=public] .chat-header-actions>.chat-expand-button{width:auto;min-width:44px;max-width:182px;flex:0 0 auto;padding:0 12px;gap:8px;border-radius:22px;font-size:13px;font-weight:600}
 .public-chat-layout [data-audience=public] .chat-header-actions>.chat-expand-button{min-width:112px}
 .public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button>[data-nationality-label],.public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button>[data-new-chat-label],.public-chat-layout [data-audience=public] .chat-header-actions>[data-expand-chat]>[data-expand-label]{display:block;min-width:0;max-width:116px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4}
}
.public-chat-layout .chat-more-wrap{position:relative;display:flex;flex:0 0 auto}
.public-chat-layout .chat-more-menu{position:absolute;top:calc(100% + 7px);right:0;width:224px;max-width:calc(100vw - 24px);padding:6px;z-index:75;background:#fff;border:1px solid #d2deef;border-radius:12px;box-shadow:0 10px 32px #17375f24}
.public-chat-layout .chat-more-menu>a,.public-chat-layout .chat-more-menu>button{display:flex;align-items:center;gap:10px;min-height:44px;width:100%;padding:10px;border:0;border-radius:7px;text-align:left;background:#fff;color:#294b76;font-size:14px;line-height:1.4;white-space:normal}
.public-chat-layout .chat-more-menu>a:hover,.public-chat-layout .chat-more-menu>button:hover{background:#edf4ff}
.public-chat-layout .chat-messages{min-height:0;flex:1 1 0;overflow-y:auto;overflow-x:hidden;padding:16px 20px;gap:12px;scrollbar-gutter:stable both-edges;overscroll-behavior:contain}
.public-chat-layout .chat-messages>*{width:100%;max-width:var(--chat-reading-width);margin-left:auto;margin-right:auto}
.public-chat-layout [data-ai-use-notice]{padding:8px 10px;margin-bottom:0;border-radius:9px;font-size:12px;line-height:1.5}
.public-chat-layout [data-ai-use-notice] a{white-space:nowrap}
.public-chat-layout [data-notice-brief],.public-chat-layout [data-notice-icon]{display:none}
.public-chat-layout [data-institution-notice-additional]{margin-top:6px}
.public-chat-layout .welcome-intro{display:flex;align-items:flex-start;gap:10px;margin:6px 0 10px}
.public-chat-layout .welcome-intro .chat-welcome-image{width:36px;height:36px;flex:0 0 36px;margin-top:2px;object-fit:contain;object-position:center}
.public-chat-layout .welcome-intro h3{font-size:18px;line-height:1.35;margin:0 0 4px}
.public-chat-layout .welcome-intro p{font-size:13px;line-height:1.5;margin:0;color:#536985;overflow-wrap:anywhere}
.public-chat-layout .chat-welcome .quick-menu{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.public-chat-layout .chat-welcome .quick-menu>button{display:flex;flex:1 1 calc(50% - 3px);align-items:center;gap:8px;min-width:0;min-height:44px;padding:7px 10px;border:1px solid #dce5f1;border-radius:10px;background:#fbfcff;text-align:left;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.public-chat-layout .chat-welcome .quick-menu .ui-icon{display:block;width:18px;height:18px;flex:0 0 18px}
.public-chat-layout .message-items{display:flex;flex-direction:column;gap:16px}
.public-chat-layout .message{min-width:0}
.public-chat-layout .message-label{font-size:12px;line-height:1.4}
.public-chat-layout .message-bubble{font-family:inherit;font-size:16px;line-height:1.6;max-width:100%;overflow-wrap:anywhere}
.public-chat-layout .message--assistant::before{width:28px;height:28px;background-size:contain;background-position:center;border-radius:0}
.public-chat-layout .message--assistant{padding-left:38px}
.public-chat-layout .message--assistant .message-bubble{max-width:100%}
.public-chat-layout .chat-composer-wrap{padding:10px 20px max(8px,env(safe-area-inset-bottom));flex:0 0 auto;background:#fff;border-top:1px solid #edf1f7}
.public-chat-layout .chat-composer{max-width:var(--chat-reading-width);width:100%;margin:auto;min-height:56px;border-radius:16px;padding:4px 5px 4px 14px;gap:8px;align-items:flex-end}
.public-chat-layout .chat-composer textarea{font-family:inherit;font-size:16px;line-height:1.5;padding:10px 0;min-height:44px;min-width:0}
.public-chat-layout .send-button{display:flex;width:44px;height:44px;flex:0 0 44px;align-items:center;justify-content:center;padding:0}
.public-chat-layout .send-button .ui-icon{width:22px;height:22px;margin:0}
.public-chat-layout .chat-personal-data-note{width:100%;max-width:var(--chat-reading-width);margin:5px auto 0;font-size:12px;line-height:1.4}
.public-chat-layout .chat-guide-slot:empty{display:none}
.public-chat-guide{border:1px solid #dce5f1;border-radius:10px;background:#f8faff;margin:0;color:#29486d;min-width:0}
.public-chat-guide>summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 12px;font-size:14px;line-height:1.5;cursor:pointer;list-style:none}
.public-chat-guide>summary::-webkit-details-marker{display:none}
.public-chat-guide>summary>.ui-icon{width:18px;height:18px}
.chat-guide-chevron{width:7px;height:7px;flex:0 0 7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin-left:auto;margin-right:3px;margin-top:-3px}
.public-chat-guide[open] .chat-guide-chevron{transform:rotate(225deg);margin-top:4px}
.public-chat-guide .chat-guide-content{padding:16px;display:grid;gap:20px}
.public-chat-guide .chat-guide-content>:only-child{grid-column:1 / -1}
.public-chat-guide .landing-intro{color:#203b60;background:none;border:0;box-shadow:none;margin:0;padding:0;min-width:0}
.public-chat-guide .hero-kicker{display:block;font-size:12px;line-height:1.5;letter-spacing:.3px;margin:0 0 8px;color:#5b718c}
.public-chat-guide .landing-intro h1{font-size:24px;line-height:1.3;letter-spacing:-.5px;overflow-wrap:anywhere}
.public-chat-guide .intro-description{display:block;font-size:14px;line-height:1.6;color:#4b6381;margin:10px 0 0}
.public-chat-guide .hero-language-note{display:block;font-size:12px;line-height:1.5;color:#536c8c;margin:12px 0 0}
.public-chat-guide .screen-hero-image{display:block;width:100%;max-height:180px;object-fit:contain;border-radius:8px;margin:0 0 12px}
.public-chat-guide .visitor-guide{display:block;background:none;border:0;box-shadow:none;padding:0;margin:0;min-width:0}
.public-chat-guide .visitor-guide h2{font-size:16px;line-height:1.4;margin:0 0 12px}
.public-chat-guide .journey-list{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;list-style:none;margin:0;padding:0}
.public-chat-guide .journey-list li{display:grid;grid-template-columns:24px minmax(0,1fr);gap:9px;align-items:start;min-height:0;margin:0;padding:0}
.public-chat-guide .journey-list li::before,.public-chat-guide .journey-list li::after{display:none}
.public-chat-guide .step-number{position:static;display:grid;place-items:center;min-width:24px;width:24px;height:24px;font-size:12px;border-radius:7px;background:#e6effe;color:#245dac}
.public-chat-guide .journey-list strong{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere;padding:0}
.public-chat-guide .journey-list p{font-size:13px;line-height:1.5;color:#536985;margin:4px 0 0;overflow-wrap:anywhere}
.chat-help-dialog{padding:0;margin:auto;width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 32px);border:1px solid #d4dfef;border-radius:16px;background:#fff;color:#203b60;box-shadow:0 18px 60px #132a4b40;overflow:hidden}
.chat-help-dialog[open]{display:flex;flex-direction:column}
.chat-help-dialog::backdrop{background:#10223b66}
.chat-help-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid #e4ebf4;flex-shrink:0}
.chat-help-heading h2{font-size:18px;line-height:1.4}
.chat-help-heading .icon-button{width:44px;height:44px;flex:0 0 44px;font-size:26px}
.chat-help-content{overflow:auto;overscroll-behavior:contain;min-height:0}
.chat-help-content .public-chat-guide{border:0;background:#fff;margin:0;border-radius:0}
.public-chat-layout.chat-expanded .standalone-chat{max-width:none}
@container admissions-chat (max-width:899px){
 .public-chat-layout [data-audience=public] .chat-panel-header{min-height:68px;padding:10px 12px;gap:8px}
 .public-chat-layout [data-audience=public] .chat-identity{gap:8px}
 .public-chat-layout [data-audience=public] .chat-identity h2{font-size:14px}
 .public-chat-layout [data-audience=public] .chat-avatar-frame,.public-chat-layout [data-audience=public] .chat-avatar{width:30px;height:30px;flex-basis:30px}
 .public-chat-layout .chat-messages{padding:12px 16px}
 .public-chat-layout .chat-composer-wrap{padding-left:12px;padding-right:12px}
 .public-chat-layout .welcome-intro{gap:10px;margin:8px 0 10px}
 .public-chat-layout .welcome-intro h3{font-size:18px}
 .public-chat-layout .welcome-intro .chat-welcome-image{width:36px;height:36px;flex-basis:36px}
}
@container admissions-chat (max-width:359px){
 .public-chat-layout [data-audience=public] .chat-avatar-frame{display:none}
 .public-chat-layout [data-audience=public] .chat-presence [data-status-label]{display:none}
 .public-chat-layout [data-audience=public] .chat-identity h2{font-size:13px}
 .public-chat-layout .chat-messages{padding-left:12px;padding-right:12px}
}
@media(max-width:1024px){
 /* One compact shell for tablet and mobile; the institution header touches the chat. */
 .public-chat-layout{--chat-site-header-height:44px}
 .public-chat-layout>.site-header{display:flex;width:100%;max-width:none;padding:0 12px}
 .public-chat-layout>.site-header .brand-logo{width:128px;max-height:28px}
 .public-chat-layout .standalone-chat{height:calc(100dvh - var(--chat-site-header-height));padding:0}
 .public-chat-layout .standalone-chat .chat-panel{border:0;border-radius:0}
 .public-chat-layout .chat-personal-data-note{font-size:12px}
 .public-chat-layout [data-chat-guide-slot]{display:none}
 .public-chat-layout [data-ai-use-notice]{padding:0;border:0;border-radius:0;background:transparent}
 .public-chat-layout .chat-ai-notice-line{display:flex;align-items:center;gap:6px;min-height:24px;line-height:1.5}
 .public-chat-layout [data-notice-summary],.public-chat-layout [data-notice-privacy]{display:none}
 .public-chat-layout [data-notice-brief]{display:inline;white-space:nowrap}
 .public-chat-layout [data-notice-icon]{display:flex;align-items:center;flex:0 0 16px;color:#637996}
 .public-chat-layout [data-notice-icon] .ui-icon{width:16px;height:16px}
}
.public-chat-layout.widget-chat .widget-language-header{display:none}
.public-chat-layout.widget-chat #main-content{height:100dvh;min-height:0}
.public-chat-layout.widget-chat .chat-panel{height:100dvh;min-height:0;border-radius:0}
@media(prefers-reduced-motion:reduce){.public-chat-layout *{scroll-behavior:auto}}

/* The full configured hint stays accessible; only empty placeholder painting is single-line. */
.public-chat-layout textarea[data-chat-input]:placeholder-shown{white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden}

/* Keep the AI caveat with the status, and group reference links into one row. */
.public-chat-layout .chat-header-warning{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;font-size:10px;font-weight:400;color:#697c96;white-space:nowrap}
.public-chat-layout .chat-header-warning::before{content:'·';color:#98a7bb}
.public-chat-layout [data-ai-use-notice]{padding:0;border:0;border-radius:0;background:transparent}
.public-chat-layout .chat-reference-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #e2e9f3;border-radius:9px;overflow:hidden;background:#fbfcfe}
.public-chat-layout .chat-reference-actions>:only-child{grid-column:1/-1}
.public-chat-layout [data-ai-use-notice] .chat-reference-actions>a,.public-chat-layout .chat-reference-actions>button{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0;min-height:40px;padding:7px 10px;background:transparent;border:0;color:#496381;font-size:12px;font-weight:500;line-height:1.4;text-decoration:none;white-space:nowrap}
.public-chat-layout .chat-reference-actions>:nth-child(2){border-left:1px solid #e2e9f3}
.public-chat-layout .chat-reference-actions>a:hover,.public-chat-layout .chat-reference-actions>button:hover{background:#edf4ff;color:#245dac}
.public-chat-layout .chat-reference-actions .ui-icon{width:16px;height:16px;flex:0 0 16px}
@container admissions-chat (max-width:759px){
 .public-chat-layout [data-audience=public] .chat-panel-header{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:4px 8px}
 .public-chat-layout [data-audience=public] .chat-panel-header .chat-identity,.public-chat-layout [data-audience=public] .chat-identity>div{display:contents}
 .public-chat-layout [data-audience=public] .chat-avatar-frame{grid-column:1;grid-row:1}
 .public-chat-layout [data-audience=public] .chat-identity h2{grid-column:2;grid-row:1;align-self:center}
 .public-chat-layout [data-audience=public] .chat-header-actions{grid-column:3;grid-row:1}
 .public-chat-layout [data-audience=public] .chat-presence{grid-column:1/-1;grid-row:2;margin:0;flex-wrap:wrap;overflow:visible;white-space:normal;font-size:11px}
 .public-chat-layout .chat-header-warning{font-size:10px}
}
@container admissions-chat (max-width:359px){
 .public-chat-layout [data-audience=public] .chat-panel-header{grid-template-columns:minmax(0,1fr) auto}
 .public-chat-layout [data-audience=public] .chat-identity h2{grid-column:1}
 .public-chat-layout [data-audience=public] .chat-header-actions{grid-column:2}
 .public-chat-layout [data-audience=public] .chat-presence [data-status-label]{display:inline}
}

/* Guide dialog typography is independent of the saved page/sidebar design. */
.chat-help-dialog{width:min(600px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:14px}
.chat-help-heading{min-height:60px;padding:8px 16px;gap:12px}
.chat-help-heading h2{font-size:17px;line-height:1.4;font-weight:600}
.chat-help-heading .icon-button{line-height:1;font-size:24px;color:#60748d}
.chat-help-dialog .chat-guide-content{padding:24px;gap:24px}
.chat-help-dialog .hero-kicker{font-size:11px;line-height:1.5;margin-bottom:6px}
.chat-help-dialog .landing-intro h1{font-size:22px;line-height:1.4;letter-spacing:-.3px}
.chat-help-dialog .intro-description{font-size:15px;line-height:1.65;margin-top:10px}
.chat-help-dialog .hero-language-note{font-size:13px;line-height:1.6;margin-top:10px}
.chat-help-dialog .visitor-guide h2{font-size:16px;line-height:1.4;margin-bottom:16px}
.chat-help-dialog .journey-list{gap:18px}
.chat-help-dialog .journey-list li{grid-template-columns:28px minmax(0,1fr);gap:10px}
.chat-help-dialog .step-number{width:28px;height:28px;min-width:28px;font-size:12px}
.chat-help-dialog .journey-list strong{font-size:15px;line-height:1.5;font-weight:600}
.chat-help-dialog .journey-list p{font-size:14px;line-height:1.65;margin-top:5px}
.chat-help-dialog .chat-guide-content:has([data-chat-usage-guide]) [data-chat-intro]{padding-bottom:20px;border-bottom:1px solid #e6edf5;border-radius:0}
@media(max-width:600px){
 .chat-help-heading{padding:8px 12px}
 .chat-help-heading h2{font-size:16px}
 .chat-help-dialog .chat-guide-content{padding:20px;gap:20px}
 .chat-help-dialog .landing-intro h1{font-size:20px}
 .chat-help-dialog .intro-description{font-size:14px}
 .chat-help-dialog .hero-language-note{font-size:12px}
 .chat-help-dialog .journey-list strong{font-size:14px}
 .chat-help-dialog .journey-list{gap:16px}
}

/* Compact start questions; saved wording and click behavior stay unchanged. */
.public-chat-layout [data-audience=public] .chat-welcome .quick-menu>button>span{font-size:13px;line-height:1.4}
.public-chat-layout [data-audience=public] .chat-welcome .quick-menu>button .ui-icon{display:block;width:18px;height:18px;flex:0 0 18px}
.public-chat-layout [data-audience=public] .chat-welcome .quick-menu>button{flex:0 1 auto;max-width:100%;padding:7px 10px}
@container admissions-chat (min-width:600px){
 .public-chat-layout .chat-welcome .quick-menu>button{flex:0 1 auto;max-width:100%;padding:7px 12px}
}

/* Approved compact public-chat design. All saved copy/assets use the shared renderer. */
.public-chat-layout [data-audience=public] .chat-panel-header{background:#edf4ff;border-bottom:1px solid #d5e2f4;min-height:68px;padding-top:10px;padding-bottom:10px}
.public-chat-layout [data-audience=public] .chat-avatar-frame{background:#fff;border-radius:8px}
.public-chat-layout [data-audience=public] .chat-header-actions>.chat-header-button,.public-chat-layout [data-audience=public] .chat-header-actions>.icon-button,.public-chat-layout [data-audience=public] .chat-more-toggle{border-radius:9px}
.public-chat-layout .chat-header-actions .ui-icon{width:20px;height:20px;flex-basis:20px}
.public-chat-layout .chat-reference-actions{border:0;border-bottom:1px solid #e2e9f3;border-radius:0;background:transparent}
.public-chat-layout .chat-welcome .quick-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.public-chat-layout [data-audience=public] .chat-welcome .quick-menu>button{width:100%;max-width:none;min-height:44px;padding:8px 10px;border-radius:8px;background:#fff}
.public-chat-layout .chat-welcome .quick-menu>button:nth-last-child(1 of :not([hidden])):nth-child(odd of :not([hidden])){grid-column:1/-1}
@container admissions-chat (min-width:600px){
 .public-chat-layout .chat-welcome .quick-menu{grid-template-columns:repeat(6,minmax(0,1fr))}
 .public-chat-layout .chat-welcome .quick-menu>button{grid-column:span 2}
 .public-chat-layout .chat-welcome .quick-menu>button:nth-last-child(2 of :not([hidden])):nth-child(3n+1 of :not([hidden])),.public-chat-layout .chat-welcome .quick-menu>button:nth-last-child(1 of :not([hidden])):nth-child(3n+2 of :not([hidden])){grid-column:span 3}
 .public-chat-layout .chat-welcome .quick-menu>button:nth-last-child(1 of :not([hidden])):nth-child(3n+1 of :not([hidden])){grid-column:1/-1}
}
.public-chat-layout .chat-composer-wrap{padding-top:8px}
.public-chat-layout .chat-composer{min-height:52px;border-radius:12px;padding:3px 4px 3px 12px}
.public-chat-layout .chat-composer textarea{padding:8px 0;min-height:44px}
.public-chat-layout [data-audience=public] .chat-composer-wrap>.chat-advisor-button{display:flex;align-items:center;gap:7px;min-height:44px;width:max-content;max-width:100%;margin:0 auto 4px max(0px,calc((100% - var(--chat-reading-width))/2));padding:6px 10px;border:1px solid #dce5f1;border-radius:8px;background:#fff;color:#294b76;font-size:13px;line-height:1.4}
.public-chat-layout .chat-composer-wrap>.chat-advisor-button .ui-icon{width:20px;height:20px;flex:0 0 20px}
.public-chat-layout .chat-composer-wrap>.chat-advisor-button:hover:not(:disabled){background:#edf4ff;border-color:#b7cce9}
.public-chat-layout .chat-composer-wrap>.chat-advisor-button:disabled{opacity:.6}
.public-chat-layout .chat-personal-data-note{font-size:12px;line-height:1.4;white-space:nowrap;overflow-wrap:normal;letter-spacing:-.1px;margin-top:4px}
@container admissions-chat (max-width:359px){
 .public-chat-layout .chat-personal-data-note{font-size:11px;letter-spacing:-.15px}
}

/* Keep the brief caveat directly above the input, without a footer divider. */
.public-chat-layout .chat-composer-wrap{border-top:0}
.public-chat-layout .chat-personal-data-note{text-align:center;margin:0 auto 6px}
.public-chat-layout .chat-composer{align-items:center}
.public-chat-layout .chat-composer textarea{height:44px;min-height:44px;padding:10px 0;line-height:24px}
.public-chat-layout .chat-composer textarea::placeholder{color:#94a1b5;opacity:1}
.public-chat-layout .chat-composer .send-button{align-self:flex-end}

/* Header links share the header edge; the scrollable conversation begins below. */
.public-chat-layout [data-audience=public] .chat-panel-header{min-height:60px;padding-top:7px;padding-bottom:7px;flex-shrink:0}
.public-chat-layout .chat-panel[data-audience=public]>[data-ai-use-notice]{width:100%;max-width:none;margin:0;padding:0;flex:0 0 auto}
.public-chat-layout .chat-panel[data-audience=public]>[data-ai-use-notice] .chat-reference-actions{margin:0;border-radius:0}
.public-chat-layout .chat-panel[data-audience=public]>[data-ai-use-notice] [data-institution-notice-additional]{margin:0;padding:6px 16px}

/* Retry belongs below the original visitor question. */
.public-chat-layout .answer-retry{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;margin:4px 0 0;padding:5px 10px;border:1px solid #d5e2f4;border-radius:8px;background:#fff;color:#285baa;font-size:13px;line-height:1.4;font-weight:600;text-decoration:none}
.public-chat-layout .answer-retry:hover:not(:disabled){background:#edf4ff;border-color:#b7cce9}
.public-chat-layout .answer-retry:disabled{opacity:.65;cursor:default}
.public-chat-layout .answer-retry .ui-icon{width:18px;height:18px;flex:0 0 18px}
.public-chat-layout .answer-retry[aria-busy=true] .ui-icon{animation:answer-retry-spin 1s linear infinite}
@keyframes answer-retry-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.public-chat-layout .answer-retry[aria-busy=true] .ui-icon{animation:none}}

/* A smaller visual send button within the unchanged 44px touch target. */
.public-chat-layout [data-send-button]{position:relative;background:transparent;box-shadow:none}
.public-chat-layout [data-send-button]:hover{background:transparent}
.public-chat-layout [data-send-button]::before{content:'';position:absolute;inset:5px;border-radius:50%;background:var(--teal);pointer-events:none}
.public-chat-layout [data-send-button]:hover:not(:disabled)::before{background:var(--teal-hover)}
.public-chat-layout [data-send-button] .ui-icon{position:relative;width:18px;height:18px;z-index:1}

/* Screen theme borders must not outline the invisible 44px send hit target. */
.public-chat-layout .chat-panel[data-audience=public] [data-send-button]{border:0}

/* Public reference cards: readable excerpts and separate original-page links. */
.public-chat-layout .message-sources{font-size:12px;color:#536b8d}
.public-chat-layout .message-sources details{padding:0}
.public-chat-layout .message-sources summary{min-height:44px;padding:10px 12px;line-height:22px}
.public-chat-layout .message-sources p{margin:0;padding:0 12px 12px;font-size:13px;line-height:1.7;max-height:260px;overflow:auto;overscroll-behavior:contain}

/* AI-free public source presentation. Full tables scroll within the card. */
.public-chat-layout .message-source-card{min-width:0;width:min(100%,460px);margin:6px 0 0;padding:0;border:1px solid #dfe7f2;border-radius:9px;background:#f8faff;color:#405b7d}
.public-chat-layout .message-source-card:has(.message-source-full[open]){width:100%}
.public-chat-layout .message-source-index{display:grid;place-items:center;flex:0 0 20px;height:20px;border-radius:5px;background:#e8eff9;color:#315880;font-size:11px;font-weight:600;line-height:1}
.public-chat-layout .message-source-summary-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;line-height:1.5}
.public-chat-layout .message-source-chevron{width:6px;height:6px;margin:0 2px 3px 1px;flex:0 0 6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.public-chat-layout .message-source-full[open] .message-source-chevron{transform:rotate(225deg);margin-bottom:0}
.public-chat-layout .message-source-title{display:block;margin:0;color:#29496f;font-size:13px;font-weight:600;line-height:1.6;overflow-wrap:anywhere}
.public-chat-layout a.message-source-title{text-decoration:underline;text-underline-offset:3px}
.public-chat-layout .message-source-card p{max-height:none;overflow:visible;white-space:normal;padding:0;margin:0;font-size:13px;line-height:1.75;overflow-wrap:anywhere}
.public-chat-layout .message-source-card .message-source-meta{margin:5px 0 12px;color:#677b96;font-size:12px;line-height:1.6}
.public-chat-layout .message-source-card .message-source-full{margin:0;padding:0;border:0;border-radius:0;background:transparent}
.public-chat-layout .message-source-full>summary{display:flex;align-items:center;gap:8px;min-width:0;min-height:44px;padding:8px 12px;font-size:12px;line-height:1.5;list-style:none;color:#345c8a}
.public-chat-layout .message-source-full>summary::-webkit-details-marker{display:none}
.public-chat-layout .message-source-body{max-height:360px;overflow-y:auto;overscroll-behavior:contain;padding:12px;border-top:1px solid #e1e8f2}
.public-chat-layout .message-source-body>p+p{margin-top:10px}
.public-chat-layout .message-source-body .message-source-note{margin:0 0 12px;color:#677b96;font-size:12px;line-height:1.65}
.public-chat-layout .message-source-table{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;background:#fff;border:1px solid #dfe7f2;border-radius:7px}
.public-chat-layout .message-source-table+*{margin-top:12px}
.public-chat-layout .message-source-table table{border-collapse:collapse;min-width:640px;width:100%;font-size:12px;line-height:1.75}
.public-chat-layout .message-source-table caption{padding:8px 10px;text-align:start;color:#59708e}
.public-chat-layout .message-source-table th,.public-chat-layout .message-source-table td{padding:9px 10px;min-width:36px;max-width:320px;vertical-align:top;border-top:1px solid #e4eaf3;border-right:1px solid #e4eaf3;font-weight:400;overflow-wrap:anywhere;white-space:normal}
.public-chat-layout .message-source-table th{background:#eef3fa;text-align:start;font-weight:600}
.public-chat-layout .message-source-original{margin-top:15px;color:#677b96;font-size:12px;line-height:1.7}
.public-chat-layout .message-source-original strong{font-weight:600}
.public-chat-layout .message-source-original p{margin-top:4px;font-size:12px}
@media(max-width:520px){
 .public-chat-layout .message-source-card .message-source-meta{font-size:11px}
 .public-chat-layout .message-source-body{max-height:320px}
}

.public-chat-layout .chat-character-count{width:100%;max-width:var(--chat-reading-width);margin:3px auto 0;text-align:right;color:#64748b;font-size:12px;line-height:1.4;font-variant-numeric:tabular-nums}
.public-chat-layout .chat-character-count.is-over-limit{color:#b42318}

.public-chat-layout .chat-composer-row{display:grid;grid-template-columns:minmax(0,1fr);align-items:end;gap:8px;width:100%;max-width:var(--chat-reading-width);margin:auto}
.public-chat-layout .chat-composer-row.has-tone-picker{grid-template-columns:minmax(0,1fr)}
.public-chat-layout .chat-composer-row .chat-composer{min-width:0;max-width:none;margin:0}
.public-chat-layout .chat-tone-control{position:relative;align-self:center;flex:none;width:44px;max-width:44px;margin:0;z-index:20}
.public-chat-layout .chat-tone-toggle{display:inline-flex;position:relative;isolation:isolate;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;padding:13px;border:0;border-radius:50%;background:transparent;color:var(--screen-accent,var(--teal));line-height:1;box-shadow:none}
.public-chat-layout .chat-tone-toggle::before{content:"";position:absolute;inset:6px;border:1px solid #d9e4f3;border-radius:50%;background:#fff;z-index:-1;transition:background .15s,border-color .15s}
.public-chat-layout .chat-tone-toggle:hover:not(:disabled)::before,.public-chat-layout .chat-tone-toggle[aria-expanded=true]::before{background:#edf4ff;border-color:var(--screen-accent,var(--teal))}
.public-chat-layout .chat-tone-toggle>span{display:flex;align-items:center;justify-content:center}
.public-chat-layout .chat-tone-toggle .ui-icon{width:18px;height:18px;flex:none}
.public-chat-layout .chat-tone-popover{position:absolute;left:auto;right:0;bottom:calc(100% + 8px);overflow-y:auto;overscroll-behavior:contain;width:224px;max-width:calc(100vw - 32px);padding:10px;border:1px solid #dce5f2;border-radius:15px;background:#fff;box-shadow:0 8px 28px #173c6b26}
.public-chat-layout .chat-tone-title{padding:1px 7px 7px;color:#64748b;font-size:12px;font-weight:600;line-height:1.5}
.public-chat-layout .chat-tone-option{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:9px 10px;border:1px solid transparent;border-radius:10px;background:#fff;color:#3e4f67;font-size:14px;text-align:start;line-height:1.4}
.public-chat-layout .chat-tone-option+.chat-tone-option{margin-top:3px}
.public-chat-layout .chat-tone-option:hover:not(:disabled){background:#f4f7fc}
.public-chat-layout .chat-tone-option.is-selected{color:var(--screen-accent,var(--teal));background:#edf4ff;background:color-mix(in srgb,var(--screen-accent,var(--teal)) 9%,white);border-color:color-mix(in srgb,var(--screen-accent,var(--teal)) 22%,white);font-weight:600}
.public-chat-layout .chat-tone-option .ui-icon{width:20px;height:20px}
.public-chat-layout .chat-tone-check{display:flex;align-items:center;margin-left:auto;visibility:hidden}
.public-chat-layout .chat-tone-option.is-selected .chat-tone-check{visibility:visible}
.public-chat-layout .chat-composer .chat-character-count{flex:0 0 8.5ch;align-self:flex-end;width:8.5ch;max-width:none;margin:0 2px 8px 0;padding:0;font-size:10px;line-height:12px;white-space:nowrap;text-align:right;pointer-events:none}
.public-chat-layout .chat-composer-row{gap:4px}

/* Compact visitor composer: preserve 44px touch targets and wrapping notices. */
@media (max-width:600px){
 .public-chat-layout .chat-composer-wrap{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"composer";column-gap:8px;row-gap:4px;align-items:center;padding:6px 12px max(6px,env(safe-area-inset-bottom))}
 .public-chat-layout .chat-composer-wrap:has(>.chat-advisor-button:not([hidden])){grid-template-areas:"advisor" "composer"}
 .public-chat-layout .chat-composer-wrap>.chat-advisor-button{grid-area:advisor;margin:0;min-height:44px}
 .public-chat-layout .chat-personal-data-note{grid-area:notice;width:100%;min-width:0;max-width:none;margin:0;font-size:11px;line-height:16px;text-align:center;white-space:normal;overflow-wrap:anywhere}
 .public-chat-layout .chat-composer-row{grid-area:composer;gap:4px;align-items:stretch}
 .public-chat-layout .chat-composer{min-height:48px;padding:1px 1px 1px 10px;border-radius:11px;align-items:center}
 .public-chat-layout .chat-composer textarea{height:44px;min-height:44px;padding:11px 0;font-size:15px;line-height:22px}
 .public-chat-layout .chat-tone-control{align-self:center;margin:0}
 .public-chat-layout .chat-tone-toggle{min-height:44px}
 /* iOS focuses text below 16px with viewport zoom. Keep pinch zoom available. */
 @supports (-webkit-touch-callout:none){
  .public-chat-layout .chat-composer textarea{font-size:16px}
 }
}

/* One compact row: the notice stays centered on the whole form, not the free space. */
.public-chat-layout .chat-composer-meta{display:grid;grid-template-columns:minmax(0,1fr);column-gap:4px;align-items:center;min-width:0;width:100%}
.public-chat-layout .chat-composer-meta>.chat-personal-data-note{grid-area:1 / 1;width:100%;max-width:none;min-width:0;margin:0;text-align:center;white-space:normal;overflow-wrap:anywhere}
.public-chat-layout .chat-composer-meta:has(>.chat-tone-control:not([hidden])){grid-template-columns:44px minmax(0,1fr) 44px}
.public-chat-layout .chat-composer-meta:has(>.chat-tone-control:not([hidden]))>.chat-personal-data-note{grid-column:2}
.public-chat-layout .chat-composer-meta>.chat-tone-control{grid-area:1 / 3;justify-self:end;align-self:center}
