
/* HypatiaOS V16 - wave 7. Source-compatible visual layer; all original
   business logic, layout dimensions, wizard restrictions and theme handlers retained. */
:root{
 --v16-surface:#101b30;--v16-surface-hover:#18283f;--v16-deep:#060c19;
 --v16-text:#eef7ff;--v16-muted:#acc1db;--v16-line:rgba(126,173,216,.34);
 --v16-cyan:#77e4f5;--v16-violet:#ae9dfb;--v16-green:#5be2b6;
 --v16-shadow:0 17px 38px rgba(0,0,0,.22);
 color-scheme:dark
}
html[data-theme="light"],html[data-mode="light"],html.theme-light {
 --v16-surface:#fff;--v16-surface-hover:#f2f7fe;--v16-deep:#edf4fb;
 --v16-text:#162c49;--v16-muted:#536a85;--v16-line:rgba(71,116,157,.33);
 --v16-cyan:#08728c;--v16-violet:#674bad;--v16-green:#167955;
 --v16-shadow:0 15px 35px rgba(20,39,70,.12);
 color-scheme:light
}
body[data-hyapp-v16] {
 font-family:Inter,ui-sans-serif,system-ui,-apple-system,sans-serif;
 -webkit-font-smoothing:antialiased;min-width:0;
}
body[data-hyapp-v16] *{box-sizing:border-box}
body[data-hyapp-v16] :is(button,input,select,textarea){font-family:inherit}
body[data-hyapp-v16] :is(button,a,input,select,textarea,[tabindex],[contenteditable=true]):focus-visible{
 outline:3px solid var(--v16-cyan)!important;outline-offset:2px
}
body[data-hyapp-v16] :is(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea) {
 min-width:0;max-width:100%;font-size:16px;
 border-radius:12px;border:1px solid var(--v16-line)
}
body[data-hyapp-v16] :is(button,.btn,[class*="-btn"]){
 touch-action:manipulation;
 transition:background-color .18s,border-color .18s,box-shadow .18s,transform .18s
}
body[data-hyapp-v16] button:disabled{opacity:.55;cursor:not-allowed}
body[data-hyapp-v16] :is(.badge,.chip,.pill,.role-badge){border-radius:999px}
body[data-hyapp-v16] img{max-width:100%}
body[data-hyapp-v16] :is(.table-scroll,.table-wrap,[class*="-table-wrap"]){
 min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain
}
body[data-hyapp-v16] :is(.glass-card,.card,.panel-sheet,.item-card){
 min-width:0;box-shadow:var(--v16-shadow);border-radius:17px
}
@media(max-width:640px){
 body[data-hyapp-v16] :is(button,.btn,[class*="-btn"]){min-height:43px}
 body[data-hyapp-v16] :is(.card,.glass-card,.panel-sheet){border-radius:14px}
 body[data-hyapp-v16] :is(.modal,.modal-card,[role=dialog]){max-width:calc(100vw - 16px)}
}
@media(prefers-reduced-motion:reduce){
 body[data-hyapp-v16] *,body[data-hyapp-v16] *::before,body[data-hyapp-v16] *::after{
 animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}


/* Theme marketplace, live preview, segmented layout choice and controls. */
body[data-hyapp-v16="hypatia-theme"] .app-shell{
 width:min(100%,1080px);max-width:100%;margin-inline:auto;
 padding:clamp(12px,3vw,29px);min-width:0
}
body[data-hyapp-v16="hypatia-theme"] .banner{
 background:radial-gradient(450px 180px at 50% -20%,color-mix(in srgb,var(--v16-violet) 20%,transparent),transparent 80%);
 border:1px solid var(--v16-line);border-radius:20px;
 padding:clamp(21px,4vw,32px) 16px;margin-bottom:18px
}
body[data-hyapp-v16="hypatia-theme"] .banner-title{
 font:900 clamp(20px,3vw,28px)/1.2 Inter,system-ui,sans-serif;
 letter-spacing:-.025em;color:var(--text)
}
body[data-hyapp-v16="hypatia-theme"] .banner-sub{font-size:13px;color:var(--muted)}
body[data-hyapp-v16="hypatia-theme"] .section-title{
 font:790 13px/1.4 Inter,system-ui,sans-serif;letter-spacing:.03em;color:var(--v16-cyan)
}
body[data-hyapp-v16="hypatia-theme"] .glass-card{
 border:1px solid var(--v16-line);
 background:color-mix(in srgb,var(--v16-surface) 90%,transparent);
 padding:clamp(14px,3vw,23px);margin-bottom:14px
}
body[data-hyapp-v16="hypatia-theme"] .seg-control{
 display:inline-flex;max-width:100%;padding:5px;gap:5px;overflow-x:auto;
 border:1px solid var(--v16-line);background:var(--v16-surface-hover);border-radius:14px
}
body[data-hyapp-v16="hypatia-theme"] .seg-btn{
 min-height:43px;border-radius:10px;padding:11px 18px;
 font:750 12px Inter,system-ui,sans-serif
}
body[data-hyapp-v16="hypatia-theme"] .seg-btn.active{
 background:color-mix(in srgb,var(--v16-cyan) 15%,transparent);
 box-shadow:inset 0 0 0 1px var(--v16-cyan);color:var(--v16-cyan)
}
body[data-hyapp-v16="hypatia-theme"] :is(.theme-grid,.layout-grid,.chat-grid){
 min-width:0;max-width:100%;gap:12px
}
body[data-hyapp-v16="hypatia-theme"] .theme-grid{
 grid-template-columns:repeat(auto-fit,minmax(min(100%,205px),1fr))
}
body[data-hyapp-v16="hypatia-theme"] :is(.theme-card,.layout-card,.chat-card,.tci){
 min-width:0;border-radius:15px;
 border-color:var(--v16-line)
}
body[data-hyapp-v16="hypatia-theme"] :is(.theme-card.selected,.layout-card.active,.chat-card.active){
 border-color:var(--v16-cyan);
 box-shadow:0 0 0 1px color-mix(in srgb,var(--v16-cyan) 40%,transparent),var(--v16-shadow)
}
body[data-hyapp-v16="hypatia-theme"] :is(.knob-row,.actions-row){display:flex;gap:10px;flex-wrap:wrap;min-width:0}
body[data-hyapp-v16="hypatia-theme"] :is(.knob-row input,.knob-select){max-width:100%;min-width:0}
body[data-hyapp-v16="hypatia-theme"] :is(.btn,.tc-mode-btn,.tc-apply-btn){min-height:43px;border-radius:11px;font:750 12px Inter,system-ui,sans-serif}
@media(max-width:580px){
 body[data-hyapp-v16="hypatia-theme"] .app-shell{padding:12px}
 body[data-hyapp-v16="hypatia-theme"] .banner{padding:22px 12px}
 body[data-hyapp-v16="hypatia-theme"] .seg-control{display:flex;width:100%}
 body[data-hyapp-v16="hypatia-theme"] .seg-btn{flex:1 1 0;padding:10px}
}
