/* dev.46: V2 targeted adaptive layout; preserves V1 and all original routes. */
html[data-teddy-visual="v2"]{--dev46-edge:clamp(12px,2.4vw,34px);--dev46-glass:rgba(7,23,53,.88)}
html[data-teddy-visual="v2"] :is(.shell,main){width:min(100%,1440px);margin-inline:auto}
html[data-teddy-visual="v2"] :is(button,a,input,select,textarea):focus-visible{outline:3px solid #f4be46;outline-offset:3px}
html[data-teddy-visual="v2"] :is(.widget,.sample,.history-panel,.preview){overflow-wrap:anywhere}
/* Owner: 2-column on wide iPads; 1-column on portrait iPads and phones. */
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .shell{padding:var(--dev46-edge);padding-bottom:calc(26px + env(safe-area-inset-bottom,0px))}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .layout{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:clamp(12px,2vw,28px)}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] :is(form,.preview,.history-panel){padding:clamp(14px,2.2vw,30px);min-width:0}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] label{flex-wrap:wrap;align-items:center}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .color-pair{max-width:100%;flex-wrap:wrap}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .actions{display:flex;flex-wrap:wrap;align-items:stretch}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .actions button{flex:1 1 155px}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] #history-list{padding-left:clamp(15px,2vw,32px)}
html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .history-panel li{min-width:0;overflow-wrap:anywhere}
/* Student: preserve every control; keep whiteboard scroll-free at phone widths. */
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] main{padding:var(--dev46-edge);padding-bottom:calc(28px + env(safe-area-inset-bottom,0px))}
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] section{min-width:0}
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] :is(#choices,#widgets){min-width:0;max-width:100%}
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] #widgets{grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))}
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] #board{display:block;width:100%;max-width:100%;height:auto;touch-action:none}
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] input{width:min(100%,440px)}
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] label{max-width:100%}
html[data-teddy-visual="v2"] body[data-dev46-layout="student"] section button{white-space:normal}
@media(max-width:950px){html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .layout{grid-template-columns:minmax(0,1fr)}html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .preview{min-height:260px}}
@media(max-width:600px){
 html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] :is(.shell,form,.preview,.history-panel){border-radius:14px}
 html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .actions button{flex:1 1 100%}
 html[data-teddy-visual="v2"] body[data-dev46-layout="student"] main{padding-inline:12px}
 html[data-teddy-visual="v2"] body[data-dev46-layout="student"] section{padding:12px;margin-block:12px}
 html[data-teddy-visual="v2"] body[data-dev46-layout="student"] #widgets{grid-template-columns:minmax(0,1fr)}
 html[data-teddy-visual="v2"] body[data-dev46-layout="student"] label{display:block;margin:8px 0;min-width:0}
 html[data-teddy-visual="v2"] body[data-dev46-layout="student"] :is(input,select){width:100%}
 html[data-teddy-visual="v2"] body[data-dev46-layout="student"] button{min-height:48px}
}
@media(orientation:landscape) and (max-height:520px){html[data-teddy-visual="v2"] body[data-dev46-layout="student"] main{padding-top:10px}html[data-teddy-visual="v2"] body[data-dev46-layout="owner"] .shell{padding-top:10px}}
@media(prefers-reduced-motion:reduce){html[data-teddy-visual="v2"] body[data-dev46-layout] *,html[data-teddy-visual="v2"] body[data-dev46-layout] *::before{animation:none!important;transition:none!important}}

html[data-teddy-visual="v2"] .dev46-jump{display:flex;flex-wrap:wrap;gap:10px;padding:10px 0}html[data-teddy-visual="v2"] .dev46-jump a{display:inline-flex;align-items:center;min-height:44px;border:1px solid #00dfff;border-radius:12px;background:rgba(7,23,53,.9);padding:8px 14px;text-decoration:none;color:#fff}
