
/* AIKAZE RECOVERY V3 */
html,body{max-width:100vw!important;overflow-x:hidden!important}
#akModelCompactControls,#akModelCollapseV3Controls,#akVideoCompactV4,#akStableModelControls{display:none!important}
.akModelsSection>.akSearchNew{display:none!important}
#models.akHubSource,#akImageModels.akHubSource,#akChatModels.akHubSource{position:absolute!important;left:-100000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
.akModelHubV3{display:grid;gap:11px;min-width:0;margin:0 0 4px}
.akHubTabs{display:flex;gap:6px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding:1px 1px 3px}
.akHubTabs::-webkit-scrollbar{display:none}
.akHubTab{flex:0 0 auto;min-height:34px;padding:0 11px;border:1px solid #2d3b53;border-radius:999px;background:#0b121e;color:#8e9bb0;font-size:8px;font-weight:900;letter-spacing:.04em;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;text-align:center;cursor:pointer}
.akHubTab.on{border-color:#7164db;background:linear-gradient(135deg,rgba(119,100,255,.28),rgba(55,155,255,.18));color:#fff}
.akHubSearch{position:relative;min-width:0}
.akHubSearch:before{content:'⌕';position:absolute;left:14px;top:50%;transform:translateY(-52%);color:#7d8ba0;font-size:18px;pointer-events:none}
.akHubSearch input{display:block;width:100%;height:44px;margin:0;padding:0 12px 0 40px;border:1px solid #2d3c55;border-radius:13px;background:#080e18;color:#f7f9ff;outline:0;box-shadow:none;font-size:10.5px}
.akHubMeta{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#7f8da3;font-size:8px;font-weight:850;min-width:0}
.akHubMeta strong{color:#aeb8c9;font-size:8px;white-space:nowrap}
.akHubGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;min-width:0}
.akHubCard{display:block;min-width:0;min-height:98px;padding:12px;border:1px solid #27364e;border-radius:15px;background:linear-gradient(145deg,#0e1726,#09101b);color:#f7f9ff;text-align:left;cursor:pointer;box-shadow:none;overflow:hidden}
.akHubCard:hover{border-color:#506783;transform:translateY(-1px)}
.akHubCard.sel{border-color:#8271ff;box-shadow:inset 0 0 0 1px rgba(130,113,255,.22),0 12px 30px rgba(59,67,190,.13)}
.akHubCard.pending{opacity:.55;cursor:not-allowed}
.akHubTop{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;min-width:0}
.akHubName{display:block;min-width:0;color:#f7f9ff;font-size:12px;font-weight:950;line-height:1.24;overflow-wrap:anywhere}
.akHubCost{flex:0 0 auto;display:inline-flex;min-height:21px;padding:0 7px;border:1px solid rgba(132,113,255,.44);border-radius:999px;background:rgba(122,101,255,.09);color:#c5baff;font-size:6.8px;font-weight:900;align-items:center;white-space:nowrap}
.akHubFeatures{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}
.akHubFeature{display:inline-flex;min-height:21px;padding:0 7px;border:1px solid #2c3b53;border-radius:999px;background:#090f19;color:#9cabbe;font-size:6.7px;font-weight:900;line-height:1;letter-spacing:.035em;align-items:center;white-space:nowrap}
.akHubEmpty{grid-column:1/-1;padding:15px;border:1px dashed #34445e;border-radius:13px;color:#8997ab;font-size:9px;text-align:center}
.akHubMore{width:100%;min-height:40px;border:1px solid #30415b;border-radius:12px;background:#0d1522;color:#dfe5ef;font-size:8px;font-weight:950;letter-spacing:.06em;display:flex;align-items:center;justify-content:center;text-align:center;cursor:pointer}
.akHubMore[hidden]{display:none!important}
/* One and only video latest: preserve the stable pre-Education queue. */
#apsLive,#akLatestStable{display:none!important}
#akLatestLiveV2{display:block!important;max-width:100%!important}
#akLatestLiveV2 .akLV2Actions{display:flex!important;gap:6px!important;flex-wrap:wrap!important}
#akLatestLiveV2 .akLV2Actions a,#akLatestLiveV2 .akLV2Actions button{display:inline-flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;min-height:32px!important}
/* Keep Education as a top-level mode only; never float inside Video. */
#akEduLauncher{display:none!important}
#akEduApp:not(.ake-open){display:none!important}
html[data-ak-studio-mode="video"] #akImageStudio,html[data-ak-studio-mode="video"] #akChatStudio{display:none!important}
/* Button/alignment cleanup */
#akModeNav button,.akMmAction,.akMmSecondary,#gen,.akPrimary,.akBillBtn,.akBtn{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important}
.apsGenActions .apsGenBtn,.akLV2Actions a,.akLV2Actions button,.akImgActions a,.akImgActions button{align-items:center!important;justify-content:center!important;text-align:center!important}
.akFieldGrid>label,.akMmFields>label{min-width:0!important}
/* Education mobile containment */
#akEduApp{left:0!important;right:0!important;top:0!important;bottom:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;transform:none!important;zoom:1!important;overflow:hidden!important}
#akEduApp .ake-shell,#akEduApp .ake-main,#akEduApp .ake-content,#akEduApp .ake-view,#akEduApp .ake-section,#akEduApp .ake-grid,#akEduApp .ake-tool-card{min-width:0!important;max-width:100%!important}
#akEduApp .ake-main{width:100%!important;overflow-x:hidden!important}
#akEduApp .ake-content{width:100%!important;margin:0!important}
/* Image preview remains visible. */
#akImageGallery .akImgCard img{display:block!important;width:100%!important;aspect-ratio:1/1!important;object-fit:cover!important;background:#07101c!important}
@media(max-width:820px){
 .akHubGrid{grid-template-columns:1fr!important}
 .akHubCard{min-height:92px!important;padding:11px!important}
 .akHubTabs{margin-right:-4px!important;padding-bottom:4px!important}
 .akHubSearch input{height:42px!important}
 #akEduApp{width:100dvw!important;max-width:100dvw!important}
 #akEduApp .ake-shell{width:100%!important;grid-template-columns:minmax(0,1fr)!important}
 #akEduApp .ake-topbar{width:100%!important;padding:10px 12px!important;gap:8px!important}
 #akEduApp .ake-content{padding:14px 12px 92px!important}
 #akEduApp .ake-hero{width:100%!important;padding:20px 15px!important;border-radius:19px!important}
 #akEduApp .ake-hero h1{font-size:27px!important;line-height:1.05!important;overflow-wrap:anywhere!important}
 #akEduApp .ake-hero-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
 #akEduApp .ake-hero-actions .ake-btn{width:100%!important}
 #akEduApp .ake-section-head{align-items:flex-start!important;flex-direction:column!important;gap:8px!important}
 #akEduApp .ake-grid,#akEduApp .ake-pass-grid,#akEduApp .ake-price-grid,#akEduApp .ake-doc-grid,#akEduApp .ake-owner-grid,#akEduApp .ake-form-grid{grid-template-columns:minmax(0,1fr)!important}
 #akEduApp .ake-card,#akEduApp .ake-pass-card,#akEduApp .ake-owner-card,#akEduApp .ake-tool-card{width:100%!important;min-width:0!important}
 #akEduApp .ake-segment{display:flex!important;width:100%!important;max-width:100%!important;overflow-x:auto!important;scrollbar-width:none!important}
 #akEduApp .ake-segment::-webkit-scrollbar{display:none!important}
 #akEduApp .ake-segment button{flex:0 0 auto!important}
 #akEduApp .ake-modal{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
 #akLatestLiveV2 .akLV2Card{grid-template-columns:96px minmax(0,1fr)!important}
 #akLatestLiveV2 .akLV2Preview{min-height:126px!important}
}
@media(max-width:390px){#akLatestLiveV2 .akLV2Card{grid-template-columns:90px minmax(0,1fr)!important}.akHubFeature:nth-child(n+5){display:none!important}}
