/* Scope sizing to preparation; preserve all test controls and handlers. */
.d3 #test-settings-form{width:100%;max-width:900px;min-width:0;padding:clamp(16px,2vw,28px);box-sizing:border-box;overflow:hidden;max-height:var(--settings-available-height,max(280px,calc(100dvh - var(--site-header-height,92px) - 150px)));container-type:inline-size}
.d3 #test-settings-form[style*="block"]{display:flex!important;flex-direction:column}
.d3 #test-settings-form>h3{flex:none;font-size:clamp(18px,1.4vw,23px);line-height:1.35;margin:0 0 18px;overflow-wrap:anywhere}
.d3 #test-settings-form .settings-fields{flex:1 1 auto;min-height:0;min-width:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding:0 5px 3px 0;display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-content:start}
.d3 #test-settings-form .settings-fields>*{min-width:0;margin:0!important}
.d3 #test-settings-form .form-group label{margin-bottom:7px;line-height:1.4}
.d3 #test-settings-form .form-controls{display:flex;flex-wrap:nowrap;gap:10px;min-width:0;margin-top:6px}
.d3 #test-settings-form .time-slider-container{flex:1 1 0;min-width:0}
.d3 #test-settings-form #time-limit-slider{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:0;height:6px;padding:0;border:0;background:var(--bg-alt);box-shadow:none;margin:12px 0;cursor:pointer}
.d3 #test-settings-form #time-limit-input,.d3 #test-settings-form #questions-limit-input{flex:0 0 90px;width:90px!important;min-width:0;max-width:100%;box-sizing:border-box;min-height:42px;padding:8px 10px}
.d3 #test-settings-form #start-password{width:100%;max-width:100%;min-width:0;box-sizing:border-box;min-height:42px}
.d3 #test-settings-form .time-display{margin-top:10px;min-width:0;line-height:1.4;padding:8px 10px}
.d3 #test-settings-form .shuffle-info,.d3 #test-settings-form .password-note{display:block;overflow-wrap:anywhere;line-height:1.45;margin-top:5px}
.d3 #test-settings-form .shuffle-control{gap:12px;padding:12px;margin:0;min-width:0}
.d3 #test-settings-form .shuffle-label{min-width:0;line-height:1.4}
.d3 #test-settings-form .shuffle-switch{flex:0 0 50px;margin:0}
.d3 #test-settings-form>.settings-buttons{flex:none;display:flex;gap:10px;flex-wrap:wrap;margin:16px 0 0;padding-top:12px;border-top:1px solid var(--border);background:white}
.d3 #test-settings-form>.settings-buttons .btn{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.4;min-height:44px;padding:10px 14px}
@container(min-width:620px){.d3 #test-settings-form .settings-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}.d3 #test-settings-form .settings-fields>.form-group:first-child,.d3 #test-settings-form .settings-fields>.form-group:last-child{grid-column:1/-1}}
@media(max-width:500px){.d3 #test-settings-form>.settings-buttons{gap:8px;margin-top:12px}.d3 #test-settings-form #save-settings-btn{flex:1 1 100%!important}.d3 #test-settings-form #back-to-user-info-btn{flex:1 1 100%!important}.d3 #test-settings-form>.settings-buttons .btn{font-size:13px}.d3 #test-settings-form .settings-fields{gap:13px}}
@media(max-height:800px){.d3:has(#test-settings-form[style*="block"]) .d3-page-title{padding:16px 0}.d3 #test-settings-form>h3{margin-bottom:12px}.d3 #test-settings-form .settings-fields{gap:12px}}
