
html body .qi-at {
    --at-mau: var(--m-primary, var(--color-md, var(--mau-md, #1a5fb4)));
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    contain: inline-size;
    margin: 4px 0 8px;
    outline: none;
}
html body .qi-at:focus-visible { box-shadow: 0 0 0 3px rgba(37, 99, 235, .35); border-radius: 12px; }

html body .qi-at .qi-at-khung {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
}
html body .qi-at .qi-at-day {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
html body .qi-at .qi-at-day::-webkit-scrollbar { display: none; }
html body .qi-at .qi-at-o {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    max-height: 75vh;
    margin: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}
html body .qi-at .qi-at-o img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    object-fit: contain;
    cursor: zoom-in;
}

html body .qi-at .qi-at-nut {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    cursor: pointer;
    transition: background .15s, opacity .2s, transform .15s;
}
html body .qi-at .qi-at-truoc { left: 12px; }
html body .qi-at .qi-at-sau { right: 12px; }
html body .qi-at .qi-at-nut:hover { background: #fff; transform: scale(1.06); }
html body .qi-at .qi-at-nut:focus-visible { outline: 3px solid var(--at-mau); outline-offset: 2px; }
html body .qi-at .qi-at-nut[disabled] { opacity: 0; pointer-events: none; }

html body .qi-at .qi-at-dem {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}
html body .qi-at .qi-at-dem b { font-weight: 700; }

html body .qi-at .qi-at-nho {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding: 2px 2px 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}
html body .qi-at .qi-at-nho-o {
    flex: 0 0 auto;
    width: 76px;
    height: 52px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #e2e8f0;
    opacity: .6;
    cursor: pointer;
    transition: opacity .15s, border-color .15s;
}
html body .qi-at .qi-at-nho-o img { display: block; width: 100%; height: 100%; object-fit: cover; }
html body .qi-at .qi-at-nho-o:hover { opacity: .9; }
html body .qi-at .qi-at-nho-o.dang { opacity: 1; border-color: var(--at-mau); }
html body .qi-at .qi-at-nho-o:focus-visible { outline: 2px solid var(--at-mau); outline-offset: 1px; }

@media (max-width: 575.98px) {
    html body .qi-at .qi-at-khung { border-radius: 10px; }
    html body .qi-at .qi-at-o { aspect-ratio: 4 / 3; }
    html body .qi-at .qi-at-nut { width: 36px; height: 36px; margin-top: -18px; }
    html body .qi-at .qi-at-truoc { left: 8px; }
    html body .qi-at .qi-at-sau { right: 8px; }
    html body .qi-at .qi-at-nho-o { width: 60px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
    html body .qi-at .qi-at-day { scroll-behavior: auto; }
}
