.sa-khung.axv-khung { height: 600px; border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
.sa-khung.axv-khung iframe { background: transparent; }
.sa-cho.axv-cho { background: transparent; border: 1px solid var(--cm-border); border-radius: var(--cm-radius-lg); }
html.axv-full .sa-khung.axv-khung { background: #0f172a; }

.sa-khung.sa-an { position: fixed; top: 0; left: 0; z-index: -1; visibility: hidden; pointer-events: none; }

.sa-top.aigen-top { container: satop / inline-size; }
.sa-tabs { display: inline-flex; gap: 6px; padding: 5px; border: 1px solid var(--cm-border); border-radius: 16px; background: rgba(15, 23, 42, .55); }
.aigen-nhung .sa-tabs { margin-right: auto; }
.aigen-nhung { scroll-margin-top: 84px; }
.sa-tab { position: relative; display: inline-flex; align-items: center; gap: 10px; min-width: 0; min-height: 46px; padding: 4px 16px 4px 8px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--cm-text-primary); font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; }
.sa-tab:hover { background: rgba(255, 255, 255, .06); }
.sa-tab:focus-visible { outline: 2px solid var(--ais-accent3, #c084fc); outline-offset: 2px; }
.sa-tab-ic { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(168, 85, 247, .18); color: var(--ais-accent3, #c084fc); font-size: 15px; }
.sa-tab-chu { display: block; min-width: 0; }
.sa-tab-chu b, .sa-tab-chu small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-tab-chu b { font-size: 15px; font-weight: 700; line-height: 1.25; }
.sa-tab-chu small { color: var(--cm-text-muted, #8494ab); font-size: 11.5px; line-height: 1.3; }
.sa-tab.active { border-color: transparent; background: linear-gradient(135deg, var(--ais-accent, #6366f1), var(--ais-accent2, #a855f7)) no-repeat border-box; color: #fff; box-shadow: 0 8px 20px -10px rgba(139, 92, 246, .9); }
.sa-tab.active .sa-tab-ic { background: rgba(255, 255, 255, .2); color: #fff; }
.sa-tab.active small { color: rgba(255, 255, 255, .82); }
.sa-tab-kq:not(.active):not(.trong) { border-color: rgba(168, 85, 247, .55); background: rgba(168, 85, 247, .14); }
.sa-tab-kq:not(.active):not(.trong):hover { border-color: var(--ais-accent2, #a855f7); background: rgba(168, 85, 247, .24); }
.sa-chong { display: flex; flex: 0 0 auto; }
.sa-chong img { width: 36px; height: 36px; border: 2px solid #1b1636; border-radius: 10px; object-fit: cover; background: #0b1020; }
.sa-chong img + img { margin-left: -16px; }
.sa-tab.active .sa-chong img { border-color: #8b5cf6; }
.sa-so { flex: 0 0 auto; min-width: 28px; padding: 2px 9px; border-radius: 999px; background: var(--ais-accent2, #a855f7); color: #fff; font-size: 13px; font-weight: 800; line-height: 1.5; text-align: center; }
.sa-so:empty { display: none; }
.sa-tab.active .sa-so { background: rgba(255, 255, 255, .24); }
.sa-moi { position: absolute; top: -14px; right: -9px; padding: 1px 9px; border: 2px solid #0f172a; border-radius: 999px; background: #34d399; color: #06281c; font-size: 11.5px; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.sa-moi[hidden] { display: none; }
.sa-tab.co-moi:not(.active) { border-color: #34d399; animation: sa-nhay 1.2s ease-in-out 4; }
@keyframes sa-nhay { 50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, .28); } }

.sa-kq[hidden] { display: none; }
.sa-kq.aigen-results { padding: 0; }
.sa-vung { padding: 16px; min-height: 60vh; }
.sa-runs.aigen-runs { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.sa-anh.aigen-thumb { aspect-ratio: 4 / 3; object-fit: contain; background: rgba(2, 6, 23, .55); }
.sa-cau.aigen-run-prompt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; min-height: 2.9em; }
.sa-nut { display: flex; gap: 8px; margin-top: 10px; }
.sa-b.ais-soft-btn { justify-content: center; }
.sa-b.ais-soft-btn:first-child { flex: 1 1 auto; }

@container satop (max-width: 985px) {
  .sa-chong img:nth-child(n+3) { display: none; }
}
@container satop (min-width: 890px) and (max-width: 950px) {
  .sa-chong img:nth-child(n+2), .sa-tab-chu small { display: none; }
}
@media (max-width: 700px) {
  .sa-top .sa-tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); order: 3; width: 100%; }
  .sa-tab { justify-content: center; gap: 8px; min-height: 54px; padding: 4px 8px; }
  .sa-chong img:nth-child(n+2) { display: none; }
  .sa-cau.aigen-run-prompt { min-height: 0; }
}
@media (max-width: 480px) {
  .sa-bst span { display: none; }
  .sa-phai.aigen-top-right { gap: 6px; }
  .sa-chip.aigen-chip { gap: 5px; padding: 0 9px; }
  .sa-tab-chu small { font-size: 11px; }
  .sa-so { display: none; }
  #saKqPhu[data-ngan]:not([data-ngan=""]) { font-size: 0; }
  #saKqPhu[data-ngan]:not([data-ngan=""])::after { content: attr(data-ngan); font-size: 11px; font-weight: 600; color: var(--ais-accent3, #c084fc); }
  .sa-tab.active #saKqPhu[data-ngan]:not([data-ngan=""])::after { color: #fff; }
}
@media (max-width: 380px) {
  .sa-chip.aigen-chip { padding: 0 7px; font-size: 11px; }
  .sa-bst.ais-soft-btn { padding: 0 9px; }
}
@media (max-width: 359px) {
  .sa-tab-ic, .sa-chong { display: none; }
}

html.axv-dt #saThoat { display: none !important; }
html.axv-dt .sa-khung.axv-khung { background: #0f172a; }
