:root {
    --widget-navy: #002757;
    --widget-blue: #008fd5;
    --widget-blue-strong: #006eaa;
    --widget-cyan: #00dedf;
    --widget-ink: #102a43;
    --widget-muted: #60788d;
    --widget-subtle: #5d7487;
    --widget-line: #dce8ef;
    --widget-soft: #f2f8fb;
    --widget-white: #fff;
    --widget-success: #118364;
    --widget-danger: #b4233b;
    --widget-shadow: 0 22px 55px rgba(0, 39, 87, .16);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--widget-ink); background: #eaf4f9; font-family: Inter, sans-serif; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(0, 143, 213, .25); outline-offset: 2px; }
::selection { color: #fff; background: var(--widget-blue); }
.is-hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.widget-shell { position: relative; width: 100%; min-height: 100vh; overflow: hidden; background: var(--widget-white); }
.widget-header { position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; min-height: 68px; padding: 0 18px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--widget-line); }
.widget-brand { grid-column: 2; justify-self: center; display: flex; align-items: center; gap: 10px; color: var(--widget-navy); text-decoration: none; }
.widget-brand img { width: 112px; height: auto; }
.widget-brand span { padding-left: 10px; border-left: 1px solid #c9dbe6; font-family: Syne, sans-serif; font-weight: 700; letter-spacing: -.025em; }
.widget-brand b { color: var(--widget-blue); }
.widget-back, .widget-close { display: grid; width: 36px; height: 36px; place-items: center; padding: 0; color: var(--widget-navy); background: transparent; border: 0; border-radius: 10px; }
.widget-back { grid-column: 1; }
.widget-close { grid-column: 3; }
.widget-back:hover, .widget-close:hover { background: var(--widget-soft); }
.widget-navigation { position: sticky; top: 68px; z-index: 9; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 62px; padding: 0 24px; background: rgba(255,255,255,.98); border-bottom: 1px solid var(--widget-line); }
.widget-navigation button { position: relative; display: flex; min-width: 0; align-items: center; justify-content: center; gap: 8px; min-height: 62px; padding: 0 12px; color: var(--widget-subtle); background: transparent; border: 0; font-size: .76rem; font-weight: 700; }
.widget-navigation button::after { position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; content: ''; background: transparent; }
.widget-navigation button:hover { color: var(--widget-navy); }
.widget-navigation button.is-active { color: var(--widget-blue-strong); }
.widget-navigation button.is-active::after { background: var(--widget-blue); }
.widget-navigation button i { font-size: .95rem; }

.widget-view { width: min(100%, 760px); margin: 0 auto; padding: 26px 24px 82px; }
.widget-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.widget-intro h1, .profile-content h1, .form-heading h1, .widget-success h1 { margin: 0; color: var(--widget-navy); font-weight: 750; letter-spacing: -.035em; }
.widget-intro h1 { font-size: clamp(1.55rem, 4vw, 2rem); }
.widget-intro p { max-width: 520px; margin: 7px 0 0; color: var(--widget-muted); font-size: .78rem; line-height: 1.6; }
.widget-intro p strong { color: var(--widget-navy); }
.widget-intro .widget-powered { flex: 0 0 auto; margin-top: 8px; }

.widget-ai-dock { position: fixed; right: 22px; bottom: 22px; z-index: 30; }
.widget-ai-toggle { position: relative; display: grid; grid-template-columns: 58px; width: 58px; height: 58px; align-items: center; padding: 0; overflow: hidden; color: #fff; background: var(--widget-blue); border: 0; border-radius: 29px; box-shadow: 0 12px 28px rgba(0, 64, 118, .28); transition: width .28s cubic-bezier(.2, .8, .2, 1), transform .2s cubic-bezier(.2, .8, .2, 1), background .2s ease, box-shadow .2s ease; }
.widget-ai-toggle:hover { transform: translateY(-2px); background: var(--widget-blue-strong); box-shadow: 0 16px 34px rgba(0, 64, 118, .34); }
.widget-ai-toggle-icon { position: relative; display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; }
.widget-ai-toggle-icon > i { font-size: 1.2rem; transition: transform .2s ease; }
.widget-ai-toggle.is-open .widget-ai-toggle-icon > i { transform: rotate(90deg); }
.widget-ai-toggle-copy { display: none; min-width: 0; text-align: left; white-space: nowrap; }
.widget-ai-toggle-copy strong, .widget-ai-toggle-copy small { display: block; }
.widget-ai-toggle-copy strong { color: #fff; font-size: .72rem; line-height: 1.2; }
.widget-ai-toggle-copy small { margin-top: 3px; color: #d3e8f3; font-size: .55rem; line-height: 1.2; }
.widget-ai-toggle.is-discoverable { grid-template-columns: 46px minmax(0, 1fr); width: 158px; gap: 8px; padding: 6px 13px 6px 6px; animation: ai-launcher-arrive .55s cubic-bezier(.2, .8, .2, 1) both; }
.widget-ai-toggle.is-discoverable .widget-ai-toggle-icon { width: 46px; height: 46px; background: rgba(255, 255, 255, .14); }
.widget-ai-toggle.is-discoverable .widget-ai-toggle-copy { display: block; }
.widget-ai-toggle-dot { position: absolute; top: 5px; right: 5px; width: 11px; height: 11px; background: #55d6a4; border: 2px solid #fff; border-radius: 50%; }
.widget-ai-toggle.is-discoverable .widget-ai-toggle-dot { top: 1px; right: 1px; }
.widget-ai-toggle.is-open .widget-ai-toggle-dot { display: none; }
@keyframes ai-launcher-arrive { from { opacity: 0; transform: translateX(12px) scale(.97); } to { opacity: 1; transform: translateX(0) scale(1); } }
.widget-ai-assistant { position: absolute; right: 0; bottom: 70px; display: grid; grid-template-rows: auto minmax(120px, 1fr) auto auto auto; width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 180px); min-width: 0; overflow: hidden; background: #fff; border: 1px solid #bdd8e6; border-radius: 16px; box-shadow: 0 22px 55px rgba(0, 39, 87, .22); animation: ai-panel-in .22s cubic-bezier(.2, .8, .2, 1); transform-origin: bottom right; }
@keyframes ai-panel-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.widget-ai-assistant > header { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 14px 16px; color: #fff; background: var(--widget-navy); }
.widget-ai-avatar { display: grid; width: 42px; height: 42px; place-items: center; color: var(--widget-navy); background: var(--widget-cyan); border-radius: 12px; font-size: 1rem; }
.widget-ai-assistant > header div { min-width: 0; }
.widget-ai-assistant > header h2 { margin: 0; overflow: hidden; color: #fff; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.widget-ai-assistant > header p { margin: 3px 0 0; overflow-wrap: anywhere; color: #c6dbe8; font-size: .68rem; }
.widget-ai-assistant > header small { display: inline-flex; align-items: center; gap: 6px; color: #b9d4e3; font-size: .61rem; font-weight: 700; }
.widget-ai-assistant > header small i { width: 7px; height: 7px; background: #55d6a4; border-radius: 50%; }
.widget-ai-header-actions { display: flex; align-items: center; gap: 9px; }
.widget-ai-header-actions button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; color: #d8e8f0; background: rgba(255, 255, 255, .1); border: 0; border-radius: 9px; }
.widget-ai-header-actions button:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.widget-ai-messages { display: grid; gap: 12px; max-height: 290px; padding: 16px; overflow-y: auto; scrollbar-color: #aac6d6 transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
.widget-ai-message { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 8px; max-width: 88%; }
.widget-ai-message > span { display: grid; width: 30px; height: 30px; place-items: center; color: var(--widget-blue-strong); background: var(--widget-soft); border-radius: 9px; font-size: .63rem; font-weight: 750; }
.widget-ai-message > div { justify-self: start; padding: 9px 11px; color: #36566d; background: var(--widget-soft); border-radius: 4px 12px 12px 12px; }
.widget-ai-message p { margin: 0; font-size: .74rem; line-height: 1.55; white-space: pre-wrap; }
.widget-ai-message small { display: block; margin-top: 7px; color: var(--widget-subtle); font-size: .59rem; line-height: 1.4; }
.widget-ai-message.is-user { grid-template-columns: minmax(0, 1fr) 30px; justify-self: end; }
.widget-ai-message.is-user > span { grid-column: 2; grid-row: 1; color: #fff; background: var(--widget-blue); }
.widget-ai-message.is-user > div { grid-column: 1; grid-row: 1; justify-self: end; color: #fff; background: var(--widget-blue); border-radius: 12px 4px 12px 12px; }
.widget-ai-message.is-loading > div { display: flex; gap: 4px; min-height: 36px; align-items: center; }
.widget-ai-message.is-loading > div i { width: 6px; height: 6px; background: #7f9caf; border-radius: 50%; animation: ai-dot 1s ease-in-out infinite; }
.widget-ai-message.is-loading > div i:nth-child(2) { animation-delay: .14s; }.widget-ai-message.is-loading > div i:nth-child(3) { animation-delay: .28s; }
@keyframes ai-dot { 0%, 70%, 100% { transform: translateY(0); opacity: .45; } 35% { transform: translateY(-3px); opacity: 1; } }
.widget-ai-ambassadors { min-width: 0; padding: 0 16px 12px; }
.widget-ai-ambassadors-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.widget-ai-ambassadors-head > strong { color: var(--widget-navy); font-size: .64rem; }
.widget-ai-ambassadors-head > button { display: grid; width: 26px; height: 26px; flex: 0 0 26px; place-items: center; padding: 0; color: #698296; background: var(--widget-soft); border: 1px solid transparent; border-radius: 50%; font-size: .58rem; }
.widget-ai-ambassadors-head > button:hover { color: var(--widget-blue-strong); background: #e8f4fa; border-color: #c8e0ec; }
.widget-ai-ambassadors-head > button:active { transform: scale(.94); }
.widget-ai-ambassadors-list { display: flex; gap: 7px; padding-bottom: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #aac6d6 transparent; }
.widget-ai-ambassadors-list > button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; flex: 0 0 218px; align-items: center; gap: 8px; min-width: 0; padding: 7px; text-align: left; background: #fff; border: 1px solid var(--widget-line); border-radius: 10px; scroll-snap-align: start; }
.widget-ai-ambassadors-list > button:hover { border-color: var(--widget-blue); background: #fbfdff; }
.widget-ai-ambassadors-list > button:active { transform: translateY(1px); }
.widget-ai-ambassador-avatar { display: grid; width: 34px; height: 34px; overflow: hidden; place-items: center; color: #fff; background: var(--widget-navy); border-radius: 50%; font-size: .58rem; font-weight: 750; }
.widget-ai-ambassador-avatar img { width: 100%; height: 100%; object-fit: cover; }
.widget-ai-ambassadors-list b, .widget-ai-ambassadors-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget-ai-ambassadors-list b { color: var(--widget-navy); font-size: .63rem; }
.widget-ai-ambassadors-list small { margin-top: 2px; color: var(--widget-muted); font-size: .54rem; }
.widget-ai-ambassadors-list > button > i { color: var(--widget-blue-strong); font-size: .62rem; }
.widget-ai-prompts { display: flex; gap: 7px; padding: 0 16px 12px; overflow-x: auto; -ms-overflow-style: none; scrollbar-width: none; }
.widget-ai-prompts::-webkit-scrollbar { display: none; }
.widget-ai-messages::-webkit-scrollbar,
.widget-ai-ambassadors-list::-webkit-scrollbar { width: 2px; height: 2px; }
.widget-ai-messages::-webkit-scrollbar-track,
.widget-ai-ambassadors-list::-webkit-scrollbar-track { background: transparent; }
.widget-ai-messages::-webkit-scrollbar-thumb,
.widget-ai-ambassadors-list::-webkit-scrollbar-thumb { background: #aac6d6; border-radius: 999px; }
.widget-ai-messages::-webkit-scrollbar-thumb:hover,
.widget-ai-ambassadors-list::-webkit-scrollbar-thumb:hover { background: #789fb6; }
.widget-ai-prompts button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; color: var(--widget-blue-strong); background: #fff; border: 1px solid #bdd8e6; border-radius: 9px; font-size: .64rem; font-weight: 700; }
.widget-ai-prompts button:hover { color: var(--widget-navy); background: var(--widget-soft); }
.widget-ai-composer { display: grid; grid-template-areas: 'composer'; padding: 12px 16px; background: var(--widget-soft); border-top: 1px solid var(--widget-line); }
.widget-ai-composer textarea { grid-area: composer; width: 100%; min-width: 0; min-height: 44px; max-height: 100px; padding: 11px 50px 11px 12px; overflow-x: hidden; resize: none; color: var(--widget-ink); background: #fff; border: 1px solid #c6dae5; border-radius: 14px; font-size: 13px; line-height: 1.5; -ms-overflow-style: none; scrollbar-width: none; }
.widget-ai-composer textarea::-webkit-scrollbar { display: none; }
.widget-ai-composer textarea::placeholder { color: #718698; font-size: 13px; }
.widget-ai-composer textarea:focus { outline: none; border-color: var(--widget-blue); box-shadow: 0 0 0 2px rgba(0,143,213,.12); }
.widget-ai-message.is-user > span { aspect-ratio: 1; overflow: hidden; background: var(--widget-soft); color: var(--widget-blue-strong); border: 1px solid var(--widget-line); border-radius: 50%; font-size: 14px; }
.widget-ai-message.is-user > span .bi { font-size: 15px; }
.widget-ai-prompts button { max-width: 280px; padding: 8px 10px; white-space: normal; text-align: left; line-height: 1.45; font-weight: 550; }
.ai-revealing::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 3px; background: var(--widget-blue); vertical-align: -.1em; animation: ai-caret .8s steps(2) infinite; }
@keyframes ai-caret { 50% { opacity: 0; } }
.widget-ai-composer button { z-index: 1; grid-area: composer; align-self: center; justify-self: end; display: grid; width: 32px; height: 32px; margin-right: 6px; place-items: center; padding: 0; color: #fff; line-height: 1; background: var(--widget-blue); border: 0; border-radius: 50%; box-shadow: 0 5px 12px rgba(0, 97, 155, .2); transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.widget-ai-composer button i { display: block; line-height: 1; transform: translateY(1px); }
.widget-ai-composer button:hover { background: var(--widget-blue-strong); box-shadow: 0 7px 16px rgba(0, 72, 126, .25); transform: translateY(-1px); }
.widget-ai-composer button:active { box-shadow: 0 3px 8px rgba(0, 72, 126, .2); transform: scale(.95); }
.widget-ai-composer button:disabled { cursor: wait; opacity: .55; }
.widget-ai-assistant > footer { padding: 0 16px 12px; color: var(--widget-subtle); background: var(--widget-soft); font-size: .58rem; line-height: 1.45; }
.widget-ai-assistant > footer i { color: var(--widget-success); }

.widget-filters { margin-top: 22px; padding: 16px; background: var(--widget-soft); border-radius: 12px; }
.widget-search { position: relative; display: block; }
.widget-search i { position: absolute; top: 50%; left: 14px; color: #7890a2; transform: translateY(-50%); }
.widget-search input { width: 100%; height: 46px; padding: 0 14px 0 42px; color: var(--widget-ink); background: #fff; border: 1px solid #cddfe9; border-radius: 10px; }
.widget-search input::placeholder { color: #7b91a2; }
.widget-filter-row { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 10px; margin-top: 12px; }
.widget-filter-row label { min-width: 0; }
.widget-filter-row label > span, .widget-form label > span { display: block; margin-bottom: 6px; color: #536e82; font-size: .72rem; font-weight: 700; }
.widget-filter-row select { width: 100%; min-width: 0; height: 42px; padding: 0 34px 0 11px; color: var(--widget-ink); background-color: #fff; border: 1px solid #cddfe9; border-radius: 9px; font-size: .78rem; }
.widget-results-head { display: flex; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.widget-results-head strong { color: var(--widget-navy); font-size: .86rem; }
.widget-results-head span { color: var(--widget-muted); font-size: .72rem; }
.ambassador-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.widget-ambassador { display: flex; flex-direction: column; gap: 14px; width: 100%; min-width: 0; padding: 16px; text-align: left; background: #fff; border: 1px solid var(--widget-line); border-radius: 14px; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.widget-ambassador:hover { border-color: #9dc8df; box-shadow: 0 10px 24px rgba(0,39,87,.08); transform: translateY(-1px); }
.ambassador-card-head { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.ambassador-avatar, .profile-avatar, .mini-avatar { display: grid; place-items: center; color: #fff; background: var(--widget-navy); font-weight: 750; }
.ambassador-avatar { width: 48px; height: 48px; border-radius: 50%; }
.ambassador-copy { min-width: 0; }
.ambassador-copy strong { display: flex; align-items: center; gap: 6px; overflow: hidden; color: var(--widget-navy); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.ambassador-copy strong i { color: var(--widget-blue); font-size: .78rem; }
.ambassador-copy > span { display: block; margin-top: 4px; overflow: hidden; color: #526d81; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.availability { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.availability.online { color: var(--widget-success); }
.availability.offline { color: #6f8291; }
.availability i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ambassador-bio { display: -webkit-box; min-height: 42px; overflow: hidden; color: #526d81; font-size: .74rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ambassador-facts { display: grid; grid-template-columns: .85fr 1.15fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--widget-line); }
.ambassador-facts span { min-width: 0; }
.ambassador-facts small, .ambassador-facts strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ambassador-facts small { color: #71899a; font-size: .61rem; }
.ambassador-facts strong { margin-top: 3px; color: var(--widget-ink); font-size: .7rem; }
.ambassador-cta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: var(--widget-blue-strong); font-size: .72rem; font-weight: 750; }
.ambassador-cta i { transition: transform .18s ease; }
.widget-ambassador:hover .ambassador-cta i { transform: translateX(3px); }
.content-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.content-heading h1, .content-detail-copy h1 { margin: 0; color: var(--widget-navy); font-weight: 750; letter-spacing: -.03em; }
.content-heading h1 { font-size: clamp(1.55rem, 4vw, 2rem); }
.content-heading p { max-width: 520px; margin: 7px 0 0; color: var(--widget-muted); font-size: .78rem; line-height: 1.6; }
.content-heading > span { flex: 0 0 auto; padding: 7px 9px; color: var(--widget-blue-strong); background: var(--widget-soft); border-radius: 8px; font-size: .66rem; font-weight: 700; }
.content-search { margin-top: 22px; }
.content-filter { display: flex; gap: 6px; margin: 12px 0 18px; }
.content-filter button { min-height: 34px; padding: 0 11px; color: var(--widget-subtle); background: #fff; border: 1px solid var(--widget-line); border-radius: 8px; font-size: .69rem; font-weight: 700; }
.content-filter button:hover { color: var(--widget-navy); border-color: var(--widget-line-strong, #bfd3de); }
.content-filter button.is-active { color: #fff; background: var(--widget-blue-strong); border-color: var(--widget-blue-strong); }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.content-card { display: flex; min-width: 0; overflow: hidden; padding: 0; text-align: left; background: #fff; border: 1px solid var(--widget-line); border-radius: 14px; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.content-card:hover { border-color: #9dc8df; box-shadow: 0 10px 24px rgba(0,39,87,.08); transform: translateY(-1px); }
.content-card-cover { position: relative; flex: 0 0 132px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; min-height: 190px; padding: 14px; overflow: hidden; color: #fff; background: var(--widget-navy); }
.content-card-cover::after { position: absolute; right: -22px; bottom: 26px; width: 84px; height: 84px; content: ''; border: 18px solid rgba(0,222,223,.18); border-radius: 50%; }
.content-card-cover.type-social { background: var(--widget-blue-strong); }
.content-card-cover.has-image::before { position: absolute; inset: 0; z-index: 1; content: ''; background: linear-gradient(180deg, rgba(0,25,59,.06) 28%, rgba(0,25,59,.8) 100%); }
.content-card-cover.has-image::after { display: none; }
.content-card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.content-card:hover .content-card-cover img { transform: scale(1.035); }
.content-card-cover span { position: relative; z-index: 1; padding: 5px 7px; color: var(--widget-navy); background: #fff; border-radius: 6px; font-size: .58rem; font-weight: 800; }
.content-card-cover > i { position: relative; z-index: 2; display: grid; width: 34px; height: 34px; place-items: center; color: #fff; background: rgba(0,39,87,.76); border: 1px solid rgba(255,255,255,.42); border-radius: 50%; font-size: 1rem; backdrop-filter: blur(7px); }
.content-card-cover > span { z-index: 2; box-shadow: 0 3px 10px rgba(0,39,87,.12); }
.content-card-body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 14px; }
.content-card-title { display: -webkit-box; overflow: hidden; color: var(--widget-navy); font-size: .88rem; font-weight: 750; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.content-card-excerpt { display: -webkit-box; margin-top: 7px; overflow: hidden; color: #5b7386; font-size: .69rem; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.content-card-author { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 15px; }
.content-card-author > span:first-child, .content-author > span { display: grid; place-items: center; color: #fff; background: var(--widget-navy); border-radius: 50%; font-weight: 750; }
.content-card-author > span:first-child { width: 32px; height: 32px; font-size: .62rem; }
.content-card-author strong, .content-card-author small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-card-author strong { color: var(--widget-ink); font-size: .68rem; }
.content-card-author small { margin-top: 2px; color: #7890a1; font-size: .58rem; }
.content-card-meta { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; color: #71899a; font-size: .61rem; }
.content-card-meta > i { margin-left: auto; color: var(--widget-blue); transition: transform .18s ease; }
.content-card:hover .content-card-meta > i { transform: translateX(3px); }
.content-detail { max-width: 680px; padding-top: 0; }
.content-detail-cover { position: relative; display: flex; align-items: flex-end; justify-content: space-between; min-height: 250px; margin: 0 -24px; padding: 24px; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--widget-navy), var(--widget-blue-strong)); }
.content-detail-cover.has-image::after { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, rgba(0,24,54,.02) 30%, rgba(0,24,54,.82) 100%); }
.content-detail-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.content-detail-cover span { position: relative; z-index: 1; padding: 6px 8px; color: var(--widget-navy); background: #fff; border-radius: 6px; font-size: .64rem; font-weight: 800; }
.content-detail-cover i { position: relative; z-index: 1; display: grid; width: 42px; height: 42px; place-items: center; background: rgba(0,39,87,.72); border: 1px solid rgba(255,255,255,.38); border-radius: 50%; font-size: 1.25rem; backdrop-filter: blur(7px); }
.content-detail-media { margin: 22px 0 0; }
.content-video-frame { width: min(100%, 340px); aspect-ratio: 9 / 16; margin: 0 auto; overflow: hidden; background: #071729; border: 1px solid var(--widget-line); border-radius: 14px; box-shadow: 0 16px 36px rgba(0,39,87,.14); }
.content-video-frame iframe { width: 100%; height: 100%; border: 0; }
.content-detail-media > p { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 9px 0 0; color: var(--widget-muted); font-size: .65rem; }
.content-detail-copy { padding-top: 24px; }
.content-detail-copy h1 { font-size: clamp(1.55rem, 4vw, 2rem); line-height: 1.25; }
.content-detail-lead { margin: 11px 0 0; color: #526d81; font-size: .86rem; line-height: 1.65; }
.content-author { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--widget-line); border-bottom: 1px solid var(--widget-line); }
.content-author > span { width: 42px; height: 42px; font-size: .72rem; }
.content-author strong, .content-author small { display: block; }
.content-author strong { color: var(--widget-navy); font-size: .78rem; }
.content-author small { margin-top: 3px; color: var(--widget-muted); font-size: .66rem; }
.content-article-body { color: #334f63; font-size: .84rem; line-height: 1.75; }
.content-article-body p { margin: 20px 0 0; }
.content-source { display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; padding: 10px 13px; color: #fff; background: var(--widget-blue-strong); border-radius: 8px; font-size: .72rem; font-weight: 750; text-decoration: none; }
.widget-empty { padding: 42px 20px; text-align: center; }
.widget-empty > i { color: #8aa7b8; font-size: 1.6rem; }
.widget-empty h2 { margin: 12px 0 6px; color: var(--widget-navy); font-size: 1.1rem; }
.widget-empty p { margin: 0; color: var(--widget-muted); font-size: .82rem; }
.widget-empty button { margin-top: 16px; padding: 9px 13px; color: var(--widget-blue-strong); background: #fff; border: 1px solid #bcd8e7; border-radius: 9px; font-weight: 700; }

.widget-profile { padding-top: 0; background: #f3f8fb; }
.profile-cover { position: relative; min-height: 220px; margin: 0 -24px; padding: 34px 28px; overflow: hidden; color: #fff; background: var(--widget-blue); }
.profile-cover::before { position: absolute; right: -120px; bottom: -24px; width: 430px; height: 194px; content: ''; opacity: .13; background: #fff; -webkit-mask: url('../img/cmc-university.svg') center / contain no-repeat; mask: url('../img/cmc-university.svg') center / contain no-repeat; }
.profile-hero { position: relative; z-index: 2; display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 20px; max-width: 560px; min-height: 152px; }
.profile-avatar { width: 108px; height: 124px; border: 1px solid rgba(255,255,255,.5); border-radius: 12px; box-shadow: 0 18px 36px rgba(0,20,48,.3); font-size: 1.8rem; }
.profile-verified { display: inline-flex; align-items: center; gap: 6px; color: #d9f7f7; font-size: .68rem; font-weight: 750; }
.profile-verified i { color: var(--widget-cyan); }
.profile-hero h1 { margin: 8px 0 0; color: #fff; font-size: 1.9rem; font-weight: 750; letter-spacing: -.03em; }
.profile-hero p { margin: 6px 0 0; color: #c8dce9; font-size: .78rem; }
.profile-content { padding-top: 18px; }
.profile-presence { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--widget-line); border-radius: 12px; }
.profile-presence > span { display: grid; width: 44px; height: 44px; place-items: center; color: var(--widget-subtle); background: var(--widget-soft); border-radius: 8px; font-size: 1rem; }
.is-online .profile-presence > span { color: var(--widget-success); background: #e6f5ef; }
.profile-presence strong { display: block; color: var(--widget-navy); font-size: .78rem; }
.profile-presence p { margin: 4px 0 0; color: var(--widget-muted); font-size: .69rem; line-height: 1.5; }
.profile-presence > small { padding: 6px 8px; color: var(--widget-subtle); background: var(--widget-soft); border-radius: 6px; font-size: .62rem; font-weight: 750; white-space: nowrap; }
.is-online .profile-presence > small { color: var(--widget-success); background: #e6f5ef; }
.profile-facts { display: grid; grid-template-columns: 1.25fr .7fr .85fr; margin-top: 12px; background: #fff; border: 1px solid var(--widget-line); border-radius: 12px; }
.profile-facts > div { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; min-width: 0; padding: 14px; }
.profile-facts > div + div::before { position: absolute; top: 14px; bottom: 14px; left: 0; width: 1px; content: ''; background: var(--widget-line); }
.profile-facts > div > span { grid-row: 1 / 3; display: grid; width: 30px; height: 30px; place-items: center; color: var(--widget-blue-strong); background: var(--widget-soft); border-radius: 8px; }
.profile-facts small, .profile-facts strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-facts small { color: var(--widget-subtle); font-size: .61rem; }
.profile-facts strong { margin-top: 2px; color: var(--widget-navy); font-size: .7rem; }
.profile-section { margin-top: 12px; padding: 16px; background: #fff; border: 1px solid var(--widget-line); border-radius: 12px; }
.profile-section h2 { margin: 0; color: var(--widget-navy); font-size: .86rem; }
.profile-about-lead { margin: 9px 0 0; color: var(--widget-navy); font-size: .82rem; font-weight: 650; line-height: 1.65; }
.profile-bio { margin: 8px 0 0; color: #455f73; font-size: .82rem; line-height: 1.7; }
.profile-section-note { margin: 6px 0 0; color: var(--widget-muted); font-size: .68rem; line-height: 1.5; }
.profile-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-detail-grid .profile-section { min-width: 0; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.profile-tags span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; color: #42677d; background: var(--widget-soft); border-radius: 6px; font-size: .68rem; font-weight: 650; }
.profile-tags i { color: var(--widget-blue); }
.profile-share-list { display: grid; gap: 8px; margin: 11px 0 0; padding: 0; list-style: none; }
.profile-share-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; color: #455f73; font-size: .68rem; line-height: 1.45; }
.profile-share-list i { display: grid; width: 28px; height: 28px; place-items: center; color: var(--widget-blue-strong); background: var(--widget-soft); border-radius: 6px; }
.profile-ai-panel { border-color: #b9d8e8; }
.profile-ai-heading { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.profile-ai-heading > span { display: grid; width: 38px; height: 38px; place-items: center; color: var(--widget-blue-strong); background: var(--widget-soft); border-radius: 8px; }
.profile-ai-heading p { margin: 4px 0 0; color: var(--widget-muted); font-size: .66rem; }
.profile-ai-heading button { min-height: 34px; padding: 0 10px; color: var(--widget-blue-strong); background: #fff; border: 1px solid #b9d8e8; border-radius: 8px; font-size: .66rem; font-weight: 700; }
.profile-ai-heading button:disabled { cursor: wait; opacity: .55; }
.profile-ai-panel > small { display: block; margin-top: 10px; color: var(--widget-subtle); font-size: .61rem; line-height: 1.45; }
.ai-question-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.ai-question-list button { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; min-height: 50px; padding: 8px 10px; color: #36566d; text-align: left; background: var(--widget-soft); border: 1px solid transparent; border-radius: 8px; font-size: .68rem; line-height: 1.4; }
.ai-question-list button:hover { color: var(--widget-navy); background: #fff; border-color: #b9d8e8; }
.ai-question-list button i { color: var(--widget-blue-strong); }
.ai-loading, .ai-error { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; min-height: 46px; color: var(--widget-muted); font-size: .68rem; }
.ai-loading i { animation: ai-spin .8s linear infinite; }
.ai-error { color: var(--widget-danger); }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.profile-action { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.profile-action:has(.primary-action:only-child) { grid-template-columns: 1fr; }
.primary-action, .secondary-action { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 10px 16px; border-radius: 11px; font-weight: 700; }
.primary-action { color: #fff; background: var(--widget-blue); border: 1px solid var(--widget-blue); }
.primary-action:hover { background: var(--widget-blue-strong); }
.secondary-action { color: var(--widget-blue-strong); background: #fff; border: 1px solid #a9ccdf; }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; color: #72899a; font-size: .68rem; line-height: 1.5; }
.privacy-note i { color: var(--widget-success); }

.widget-form-view { max-width: 600px; }
.form-heading { text-align: center; }
.form-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 16px; color: var(--widget-blue); background: #e8f7fc; border-radius: 16px; font-size: 1.25rem; }
.form-heading h1 { font-size: 1.65rem; }
.form-heading p { max-width: 450px; margin: 8px auto 0; color: var(--widget-muted); font-size: .84rem; line-height: 1.55; }
.widget-form { display: grid; gap: 15px; margin-top: 24px; }
.widget-form input, .widget-form textarea { width: 100%; padding: 11px 12px; color: var(--widget-ink); background: #fff; border: 1px solid #cbdde7; border-radius: 10px; }
.widget-form textarea { resize: vertical; line-height: 1.5; }
.widget-form input:focus, .widget-form textarea:focus { border-color: var(--widget-blue); }
.widget-form label small { font-weight: 500; }
.form-error { margin: 0; padding: 10px 12px; color: var(--widget-danger); background: #fff0f2; border-radius: 8px; font-size: .74rem; }

.inbox-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--widget-line); }
.inbox-heading h1 { margin: 0; color: var(--widget-navy); font-size: clamp(1.55rem, 4vw, 2rem); letter-spacing: -.035em; }
.inbox-heading p { margin: 7px 0 0; color: var(--widget-muted); font-size: .78rem; line-height: 1.55; }
.inbox-heading > span { flex: 0 0 auto; margin-top: 5px; padding: 7px 9px; color: var(--widget-blue-strong); background: var(--widget-soft); border-radius: 8px; font-size: .66rem; font-weight: 700; }
.inbox-list { display: grid; }
.inbox-thread { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 13px; width: 100%; min-width: 0; padding: 16px 4px; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--widget-line); }
.inbox-thread:hover { background: var(--widget-soft); }
.inbox-avatar { display: grid; width: 52px; height: 52px; place-items: center; color: #fff; background: var(--widget-navy); border-radius: 50%; font-size: .82rem; font-weight: 750; }
.inbox-thread-copy { min-width: 0; }
.inbox-thread-copy > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inbox-thread-copy strong { overflow: hidden; color: var(--widget-navy); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.inbox-thread-copy time { flex: 0 0 auto; color: var(--widget-subtle); font-size: .62rem; }
.inbox-thread-copy small { display: block; margin-top: 3px; overflow: hidden; color: var(--widget-muted); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
.inbox-thread-copy p { margin: 7px 0 0; overflow: hidden; color: var(--widget-muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.inbox-thread-copy p b { color: var(--widget-ink); font-weight: 650; }
.inbox-thread-meta { display: grid; min-width: 24px; justify-items: center; gap: 9px; color: var(--widget-subtle); }
.inbox-thread-meta > i:first-child { width: 8px; height: 8px; background: var(--widget-subtle); border-radius: 50%; }
.inbox-thread-meta > i:first-child.is-online { background: var(--widget-success); box-shadow: 0 0 0 3px rgba(17,131,100,.14); }
.inbox-thread-meta > i.bi { width: auto; height: auto; background: none; font-size: .68rem; }
.inbox-thread-meta b { display: grid; min-width: 20px; height: 20px; place-items: center; padding: 0 5px; color: #fff; background: var(--widget-blue); border-radius: 10px; font-size: .6rem; }
.inbox-empty { padding-top: 76px; }

.widget-chat { display: flex; flex-direction: column; height: calc(100vh - 130px); padding-bottom: 54px; }
.chat-person { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--widget-line); }
.mini-avatar { width: 40px; height: 40px; border-radius: 11px; font-size: .78rem; }
.chat-person strong, .chat-person small { display: block; }
.chat-person strong { color: var(--widget-navy); font-size: .86rem; }
.chat-person small { margin-top: 4px; color: var(--widget-success); font-size: .68rem; }
.chat-person small.is-offline { color: var(--widget-subtle); }
.chat-person small i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; background: currentColor; border-radius: 50%; }
.chat-ai-panel { margin-top: 12px; padding: 10px; background: var(--widget-soft); border-radius: 12px; }
.chat-ai-panel > div:first-child { display: flex; align-items: center; gap: 6px; color: var(--widget-blue-strong); font-size: .68rem; }
.chat-ai-panel .ai-question-list { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; }
.chat-ai-panel .ai-question-list button { min-height: 42px; background: #fff; font-size: .64rem; }
.chat-ai-rewrite { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; }
.chat-ai-rewrite button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; color: var(--widget-blue-strong); background: var(--widget-soft); border: 1px solid #b9d8e8; border-radius: 8px; font-size: .66rem; font-weight: 700; }
.chat-ai-rewrite button:disabled { cursor: wait; opacity: .6; }
.chat-ai-rewrite small { color: var(--widget-subtle); font-size: .6rem; }
.widget-messages { flex: 1; overflow-y: auto; padding: 18px 2px; scrollbar-color: #aac6d6 transparent; scrollbar-width: thin; }
.offline-chat-note { display: flex; align-items: flex-start; gap: 10px; max-width: 520px; margin: 8px auto; padding: 13px 14px; color: var(--widget-muted); background: var(--widget-soft); border-radius: 12px; }
.offline-chat-note > i { flex: 0 0 auto; margin-top: 1px; color: var(--widget-blue-strong); }
.offline-chat-note p { margin: 0; font-size: 14px; line-height: 1.5; }
.offline-chat-note strong, .offline-chat-note span { display: block; }
.offline-chat-note strong { color: var(--widget-navy); }
.offline-chat-note span { margin-top: 3px; }
.widget-message { max-width: 82%; margin-bottom: 10px; }
.widget-message.mine { margin-left: auto; text-align: right; }
.widget-message p { display: inline-block; margin: 0; padding: 10px 12px; color: #3f5a6d; background: var(--widget-soft); border-radius: 12px 12px 12px 4px; font-size: .8rem; line-height: 1.5; text-align: left; }
.widget-message.mine p { color: #fff; background: var(--widget-blue); border-radius: 12px 12px 4px 12px; }
.widget-message small { display: block; margin-top: 3px; color: #8799a6; font-size: .6rem; }
.widget-composer { display: grid; grid-template-columns: 1fr 44px; gap: 8px; padding-top: 12px; border-top: 1px solid var(--widget-line); }
.widget-composer textarea { max-height: 100px; padding: 11px 12px; resize: none; border: 1px solid #c9dce7; border-radius: 11px; }
.widget-composer button { display: grid; place-items: center; color: #fff; background: var(--widget-blue); border: 0; border-radius: 11px; }
.chat-safe { margin-top: 8px; color: #7a90a0; font-size: .62rem; text-align: center; }
.chat-safe i { color: var(--widget-success); }

.widget-success { padding-top: 90px; text-align: center; }
.widget-success > span { display: grid; width: 70px; height: 70px; place-items: center; margin: 0 auto 20px; color: #fff; background: var(--widget-success); border-radius: 20px; font-size: 1.8rem; box-shadow: 0 14px 32px rgba(17,131,100,.2); }
.widget-success h1 { font-size: 1.7rem; }
.widget-success p { max-width: 430px; margin: 10px auto 0; color: var(--widget-muted); line-height: 1.6; }
.widget-success button { margin-top: 24px; padding: 10px 14px; color: var(--widget-blue-strong); background: #fff; border: 1px solid #acd0e2; border-radius: 10px; font-weight: 700; }
.widget-footer { position: absolute; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 18px; color: var(--widget-subtle); background: rgba(255,255,255,.98); border-top: 1px solid var(--widget-line); font-size: .64rem; }
.widget-trust { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.widget-trust i { color: var(--widget-success); font-size: .72rem; }
.widget-powered { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.widget-powered small { color: #748a9a; font-size: .56rem; font-weight: 600; }
.cmc-mini { display: inline-flex; align-items: center; gap: 4px; color: var(--widget-navy); font-size: .62rem; font-weight: 800; letter-spacing: .025em; }
.cmc-mini img { width: 18px; height: 13px; object-fit: contain; }
.widget-powered > i { width: 1px; height: 16px; background: var(--widget-line); }
.widget-powered > strong { color: var(--widget-navy); font-family: Syne, "Trebuchet MS", sans-serif; font-size: .7rem; letter-spacing: -.025em; }
.widget-powered > strong b { color: var(--widget-blue); }
.widget-toast { position: fixed; right: 18px; bottom: 58px; left: 18px; z-index: 20; padding: 11px 13px; color: #fff; background: var(--widget-navy); border-radius: 10px; box-shadow: var(--widget-shadow); font-size: .76rem; text-align: center; }
.offline-message-dialog { width: min(430px, calc(100% - 30px)); max-width: none; padding: 0; color: var(--widget-ink); background: transparent; border: 0; }
.offline-message-dialog::backdrop { background: rgba(0, 39, 87, .58); }
.offline-dialog-card { position: relative; padding: 30px; text-align: center; background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 39, 87, .24); }
.offline-dialog-close { position: absolute; top: 12px; right: 12px; display: grid; width: 40px; height: 40px; place-items: center; color: var(--widget-subtle); background: transparent; border: 0; border-radius: 8px; }
.offline-dialog-close:hover { color: var(--widget-navy); background: var(--widget-soft); }
.offline-dialog-icon { display: grid; width: 58px; height: 58px; place-items: center; margin: 0 auto 18px; color: var(--widget-blue-strong); background: var(--widget-soft); border-radius: 12px; font-size: 1.45rem; }
.offline-dialog-card h2 { margin: 0; color: var(--widget-navy); font-size: 1.35rem; letter-spacing: -.025em; }
.offline-dialog-card p { margin: 10px 0 0; color: var(--widget-muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.offline-dialog-card p strong { color: var(--widget-navy); }
.offline-email-form { display: grid; gap: 8px; margin-top: 18px; text-align: left; }
.offline-email-form label > span { display: block; margin-bottom: 6px; color: var(--widget-navy); font-size: .68rem; font-weight: 700; }
.offline-email-form input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--widget-ink); background: #fff; border: 1px solid var(--widget-line); border-radius: 8px; font-size: 16px; }
.offline-email-form input:focus { border-color: var(--widget-blue); }
.offline-dialog-card .offline-email-error { margin: 0; color: var(--widget-danger); font-size: .68rem; }
.offline-email-form .offline-dialog-actions { margin-top: 8px; }
.offline-dialog-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 9px; margin-top: 24px; }
.offline-dialog-actions.is-single { grid-template-columns: 1fr; }
.offline-dialog-actions .primary-action, .offline-dialog-actions .secondary-action { min-height: 44px; padding: 9px 12px; font-size: .68rem; }

@media (max-width: 620px) {
    .widget-header { min-height: 62px; padding: 0 12px; }
    .widget-navigation { top: 62px; min-height: 56px; padding: 0 8px; }
    .widget-navigation button { gap: 5px; min-height: 56px; padding: 0 3px; font-size: .65rem; }
    .widget-brand img { width: 98px; }
    .widget-brand span { font-size: .86rem; }
    .widget-view { padding: 22px 15px 74px; }
    .widget-intro { display: block; }
    .widget-intro .widget-powered { margin-top: 14px; }
    .widget-ai-dock { right: 12px; bottom: 12px; }
    .widget-ai-toggle { grid-template-columns: 54px; width: 54px; height: 54px; border-radius: 27px; }
    .widget-ai-toggle-icon { width: 54px; height: 54px; }
    .widget-ai-toggle.is-discoverable { grid-template-columns: 42px minmax(0, 1fr); width: 148px; gap: 7px; padding: 6px 11px 6px 6px; }
    .widget-ai-toggle.is-discoverable .widget-ai-toggle-icon { width: 42px; height: 42px; }
    .widget-ai-assistant { bottom: 66px; width: calc(100vw - 24px); max-height: calc(100dvh - 156px); }
    .widget-ai-assistant > header { grid-template-columns: 38px minmax(0, 1fr) auto; padding: 13px; }
    .widget-ai-avatar { width: 38px; height: 38px; }
    .widget-ai-header-actions small { display: none; }
    .widget-ai-messages { max-height: none; padding: 13px; }
    .widget-ai-message { max-width: 96%; }
    .widget-ai-ambassadors { padding: 0 13px 12px; }
    .widget-ai-ambassadors-list > button { flex-basis: min(218px, 82vw); }
    .widget-ai-prompts { padding: 0 13px 11px; }
    .widget-ai-composer { padding: 11px 13px; }
    .widget-ai-assistant > footer { padding: 0 13px 11px; }
    .widget-filters { margin-top: 18px; padding: 13px; }
    .widget-filter-row { grid-template-columns: 1fr 1fr; }
    .widget-filter-row label:last-child { grid-column: 1 / -1; }
    .widget-results-head span { display: none; }
    .ambassador-list { grid-template-columns: 1fr; }
    .content-heading { display: block; }
    .content-heading > span { display: inline-block; margin-top: 12px; }
    .content-grid { grid-template-columns: 1fr; }
    .content-card-cover { flex-basis: 118px; min-height: 180px; padding: 12px; }
    .content-detail-cover { min-height: 210px; margin: 0 -15px; padding: 18px; }
    .widget-ambassador { padding: 14px; }
    .widget-profile { background: #f3f8fb; }
    .profile-cover { min-height: 202px; margin: 0 -15px; padding: 26px 18px; }
    .profile-cover::before { right: -116px; bottom: -18px; width: 360px; height: 162px; opacity: .12; }
    .profile-hero { grid-template-columns: 82px minmax(0, 1fr); gap: 14px; min-height: 150px; }
    .profile-avatar { width: 82px; height: 100px; }
    .profile-hero h1 { font-size: 1.45rem; }
    .profile-presence { grid-template-columns: 40px minmax(0, 1fr); }
    .profile-presence > span { width: 40px; height: 40px; }
    .profile-presence > small { grid-column: 2; justify-self: start; }
    .profile-facts { grid-template-columns: 1fr; }
    .profile-facts > div { padding: 12px 14px; }
    .profile-facts > div + div::before { top: 0; right: 14px; bottom: auto; left: 14px; width: auto; height: 1px; }
    .profile-facts small, .profile-facts strong { white-space: normal; }
    .profile-detail-grid { grid-template-columns: 1fr; gap: 0; }
    .profile-ai-heading { grid-template-columns: 36px minmax(0, 1fr); }
    .profile-ai-heading button { grid-column: 2; justify-self: start; }
    .ai-question-list, .chat-ai-panel .ai-question-list { grid-template-columns: 1fr; }
    .chat-ai-rewrite { align-items: flex-start; flex-direction: column; gap: 4px; }
    .profile-action { grid-template-columns: 1fr; }
    .inbox-heading { display: block; }
    .inbox-heading > span { display: inline-block; margin-top: 12px; }
    .inbox-thread { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; padding: 14px 2px; }
    .inbox-avatar { width: 46px; height: 46px; }
    .widget-chat { height: calc(100vh - 118px); }
    .widget-footer { padding: 0 12px; }
    .offline-dialog-card { padding: 28px 20px 20px; }
    .offline-dialog-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .widget-ai-toggle.is-discoverable { animation: none; }
}

.widget-source-badge {
    margin-top: 6px;
    padding: 6px 10px;
    background: #eef9fc;
    border: 1px solid #bce4ee;
    border-radius: 8px;
    font-size: .65rem;
    color: var(--widget-navy);
    line-height: 1.45;
}
.widget-source-badge i { color: #059669; margin-right: 4px; }
.widget-source-badge strong { color: var(--widget-navy); font-weight: 750; }

.chat-rate-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 7px;
    color: #b45309;
    font-size: .68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
}
.chat-rate-btn:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.chat-rate-btn.is-hidden { display: none !important; }

/* Feedback survey dialog */
.feedback-dialog {
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    background: rgba(0, 39, 87, 0.45);
    backdrop-filter: blur(4px);
    border: none;
    display: grid;
    place-items: center;
}
.feedback-dialog:not([open]) { display: none; }
.feedback-dialog-card {
    position: relative;
    width: min(92vw, 420px);
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 16px 36px rgba(0, 39, 87, 0.2);
}
.feedback-dialog-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--widget-soft);
    border-radius: 50%;
    color: var(--widget-muted);
    cursor: pointer;
}
.feedback-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: #ecfdf5;
    color: #059669;
    border-radius: 10px;
    font-size: 1.35rem;
    margin-bottom: 12px;
}
.feedback-content h2 { font-size: 1.05rem; margin: 0 0 4px; color: var(--widget-navy); }
.feedback-content p { font-size: .72rem; color: var(--widget-muted); margin: 0 0 16px; line-height: 1.45; }
.feedback-field { margin-bottom: 14px; }
.feedback-label { display: block; font-size: .72rem; font-weight: 700; color: var(--widget-navy); margin-bottom: 6px; }
.star-rating { display: flex; gap: 4px; }
.star-rating button {
    width: 34px;
    height: 34px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all .15s ease;
}
.star-rating button.is-active, .star-rating button:hover {
    color: #f59e0b;
    background: #fffbeb;
    border-color: #fde68a;
}
.feedback-field textarea {
    width: 100%;
    border: 1px solid var(--widget-line);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .75rem;
    font-family: inherit;
    resize: none;
}
.feedback-error { font-size: .68rem; color: var(--widget-danger); margin-bottom: 8px; }

/* Compact first-visit consent notice */
.widget-consent { position: fixed; z-index: 70; right: 14px; bottom: 14px; left: 14px; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; width: min(620px,calc(100% - 28px)); align-items:center; gap:10px; margin-inline:auto; padding:11px 12px; background:rgba(255,255,255,.97); border:1px solid #bfd8e5; border-radius:12px; box-shadow:0 14px 38px rgba(0,39,87,.18); backdrop-filter:blur(12px); }
.widget-consent-icon { display:grid; width:34px; height:34px; place-items:center; color:var(--widget-success); background:#e8f7f2; border-radius:9px; font-size:.9rem; }
.widget-consent strong { display:block; margin-bottom:2px; color:var(--widget-navy); font-size:.7rem; }
.widget-consent p { margin:0; color:var(--widget-muted); font-size:.61rem; line-height:1.45; }
.widget-consent p button { padding:0; color:var(--widget-blue-strong); background:none; border:0; font-size:inherit; font-weight:750; text-decoration:underline; text-underline-offset:2px; }
.widget-consent-accept,.widget-policy-done { padding:7px 11px; color:#fff; background:var(--widget-blue); border:0; border-radius:8px; font-size:.64rem; font-weight:750; white-space:nowrap; }
.widget-consent-accept:hover,.widget-policy-done:hover { background:var(--widget-blue-strong); }
.widget-policy-dialog { position:fixed; inset:0; z-index:80; width:100%; height:100%; max-width:none; max-height:none; margin:0; padding:16px; background:rgba(0,39,87,.42); border:0; place-items:center; backdrop-filter:blur(3px); }
.widget-policy-dialog[open] { display:grid; }
.widget-policy-dialog:not([open]) { display:none; }
.widget-policy-card { position:relative; width:min(410px,100%); padding:22px; background:#fff; border:1px solid var(--widget-line); border-radius:14px; box-shadow:var(--widget-shadow); }
.widget-policy-card > span { display:grid; width:38px; height:38px; place-items:center; margin-bottom:12px; color:var(--widget-success); background:#e8f7f2; border-radius:10px; }
.widget-policy-card h2 { margin:0 42px 8px 0; color:var(--widget-navy); font-size:.95rem; }
.widget-policy-card div { color:var(--widget-muted); font-size:.7rem; line-height:1.65; }
.widget-policy-card div p { margin:0 0 8px; }
.widget-policy-close { position:absolute; top:14px; right:14px; display:grid; width:30px; height:30px; place-items:center; padding:0; color:var(--widget-muted); background:var(--widget-soft); border:0; border-radius:8px; }
.widget-policy-done { margin-top:10px; }

@media (max-width:520px) {
    .widget-consent { grid-template-columns:30px minmax(0,1fr); }
    .widget-consent-icon { width:30px; height:30px; }
    .widget-consent-accept { grid-column:2; justify-self:start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
