/* DEV64 -- Version 2 CALM / CONTRAST HOTFIX. Original V1 untouched.
   Safe defaults: no flashing or ambient animation; stable dark reading surfaces.
   Existing handlers, routes and accessibility semantics are preserved. */
html[data-teddy-visual="v2"] {
 color-scheme:dark;
 --teddy-calm-bg:#07172e;
 --teddy-calm-surface:#102744;
 --teddy-calm-surface-raised:#183757;
 --teddy-calm-text:#f4f9ff;
 --teddy-calm-muted:#c7deed;
 --teddy-calm-gold:#f4c65d;
 --teddy-calm-cyan:#78eaff;
 scroll-behavior:auto!important;
}
html[data-teddy-visual="v2"] body {color:var(--teddy-calm-text);background-color:var(--teddy-calm-bg);}
/* Prevent page-wide flicker and pulsating icons, even if the OS motion setting is off. */
html[data-teddy-visual="v2"] *,
html[data-teddy-visual="v2"] *::before,
html[data-teddy-visual="v2"] *::after {
 animation:none!important;
 transition:none!important;
 scroll-behavior:auto!important;
 caret-color:auto;
}
html[data-teddy-visual="v2"] :is(.card,.panel,.tile,.widget,.modal,.dialog,.drawer,.sheet,
 [class*="-card"],[class*="-panel"],[class*="-room"],[class*="career"],[class*="job-room"],
 [class*="workshop"],[class*="dashboard"],[class*="lesson"],[class*="module"]):not(img):not(video):not(canvas) {
 background-color:var(--teddy-calm-surface)!important;
 color:var(--teddy-calm-text)!important;
 border-color:rgba(120,234,255,.42);
}
/* Override bright background fills for V2 surfaces without touching art or the V1 skin. */
html[data-teddy-visual="v2"] :is(main,section,article,aside,nav,header,footer) :is(
 .card,.panel,.tile,.widget,.box,.content,.content-card,.info-card,.detail-card,.classroom-panel,
 [class*="job"],[class*="career"],[class*="room"]):not(img):not(video):not(canvas) {
 color:var(--teddy-calm-text)!important;
}
html[data-teddy-visual="v2"] :is(h1,h2,h3,h4,h5,h6,label,legend,p,li,dt,dd,summary,blockquote) {color:var(--teddy-calm-text);}
html[data-teddy-visual="v2"] :is(.muted,.subtle,.secondary,.hint,.description,.help-text,.note,small,[class*="muted"],[class*="subtitle"]) {color:var(--teddy-calm-muted)!important;}
html[data-teddy-visual="v2"] :is(input,textarea,select,[contenteditable="true"]):not([type="color"]):not([type="checkbox"]):not([type="radio"]) {
 background-color:#0b2544!important;color:#f4f9ff!important;border:2px solid #65d9ed!important;
 opacity:1!important;
}
html[data-teddy-visual="v2"] :is(input,textarea)::placeholder {color:#c2d7e7!important;opacity:1!important;}
html[data-teddy-visual="v2"] :is(button,.btn,[role="button"]):not(:disabled):not(.teddy-skin-button):not(#teddy-skin-switch) {
 background-color:#17436b!important; color:#fff!important; border-color:#78eaff; text-shadow:none; filter:none!important;
}
html[data-teddy-visual="v2"] :is(button,.btn,[role="button"]):not(:disabled):hover {transform:none!important;filter:none!important;}
html[data-teddy-visual="v2"] :is(a):not(.btn) {color:#a5ecff;text-decoration-thickness:1px;text-underline-offset:.16em;}
html[data-teddy-visual="v2"] :is(a,button,input,textarea,select,summary,[tabindex]):focus-visible {
 outline:3px solid var(--teddy-calm-gold)!important;outline-offset:3px!important;
}
/* Ensure tables and their headings are legible in staff/admin/career rooms. */
html[data-teddy-visual="v2"] :is(table,thead,tbody,tr,th,td) {color:var(--teddy-calm-text);}
html[data-teddy-visual="v2"] th {background-color:#193c5b!important;color:#fff!important;}
html[data-teddy-visual="v2"] td {background-color:#102744;color:#f4f9ff;}
html[data-teddy-visual="v2"] :is(.status,.alert,.error,.warning,[role="alert"]) {opacity:1!important;}
/* Preserve illustrations, images, charts, videos, and their intrinsic resolution. */
html[data-teddy-visual="v2"] :is(img,video,canvas,svg){filter:none;}
@media(max-width:760px){
 html[data-teddy-visual="v2"] :is(main,article,.panel,.card,.tile){max-width:100%;min-width:0;}
 html[data-teddy-visual="v2"] :is(table){display:block;overflow-x:auto;}
}
@media(prefers-reduced-motion:reduce){html[data-teddy-visual="v2"] *{animation:none!important;transition:none!important;}}
