/* Embedded sizing is independent of the iframe viewport height. */
html,body{height:auto;min-height:0}.app{max-width:none;padding:18px}.workspace{min-height:0}.controls,.panel{max-height:680px;overflow:auto}.stage{height:680px;min-height:0}.stage-wrap{height:680px;min-height:0}.surface{height:auto;min-height:420px;max-height:none}.layout{padding:16px;max-width:none}.scene{height:680px;min-height:0;max-height:none}.controls[hidden],.panel[hidden]{display:none!important}.controls-minimized .workspace,.controls-minimized .layout{grid-template-columns:minmax(0,1fr)}.kyt-controls-toggle{font:inherit;font-size:11px;border:1px solid #ffffff25;background:#1b232d;color:#e4e9ef;border-radius:8px;min-height:36px;padding:7px 10px;cursor:pointer;white-space:nowrap}.kyt-controls-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.top-actions,.header-actions,.toolbar{flex-wrap:wrap}.brand,.identity .divider,.tool-id,.series{display:none}header,.topbar{height:auto;min-height:60px;justify-content:flex-end}.topbar{margin-bottom:15px}.intro{margin-bottom:16px}.kyt-photo-error{color:#ecc8b5}
@media(max-width:900px){.layout .panel{max-height:none}}
@media(max-width:760px){.app{padding:12px}.controls{max-height:none}.stage{height:440px;min-height:0;max-height:none}.stage-wrap{height:auto;padding:18px 12px}.surface{height:440px;min-height:0;flex:none}.scene{height:480px;min-height:0;max-height:none}.controls-minimized .workspace,.controls-minimized .layout{grid-template-columns:1fr}.workspace{min-height:0}header,.topbar{padding:10px 12px}.topbar{padding:0}.header-actions,.top-actions,.toolbar{gap:5px}.kyt-controls-toggle{font-size:10px;padding:6px 8px;min-height:34px}}

/* Fullscreen must size the simulation, not just enlarge its enclosing iframe. */
html.kyt-viewport-fit,html.kyt-viewport-fit body{height:100%;min-height:0;overflow:hidden}
.kyt-viewport-fit body{display:flex;flex-direction:column}
.kyt-viewport-fit .app{display:flex;flex-direction:column;height:100%;width:100%;max-width:none;flex:1 1 0;min-height:0;padding:10px;overflow:hidden}
.kyt-viewport-fit header,.kyt-viewport-fit .topbar{flex:0 0 auto;min-height:45px;margin:0;padding:6px 12px}
.kyt-viewport-fit .intro,.kyt-viewport-fit .footer,.kyt-viewport-fit .stage-heading,.kyt-viewport-fit .stage-footer{display:none}
.kyt-viewport-fit .workspace,.kyt-viewport-fit .layout{flex:1;min-height:0;height:0;overflow:hidden;grid-template-rows:minmax(0,1fr);margin:0;max-width:none}
.kyt-viewport-fit .layout{width:100%;padding:12px}
.kyt-viewport-fit .stage,.kyt-viewport-fit .scene{height:100%;min-height:0;max-height:none}
.kyt-viewport-fit .stage-wrap{height:100%;min-height:0;max-height:none;padding:12px;gap:0}
.kyt-viewport-fit .surface{flex:1;height:100%;min-height:0;max-height:none}
.kyt-viewport-fit .controls,.kyt-viewport-fit .panel{min-height:0;max-height:100%;overflow:auto;overscroll-behavior:contain}
@media(max-width:900px){.kyt-viewport-fit .layout{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.kyt-viewport-fit .layout .panel{max-height:32dvh}}
@media(max-width:760px){.kyt-viewport-fit .workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.kyt-viewport-fit .controls{max-height:32dvh}.kyt-viewport-fit.controls-minimized .workspace,.kyt-viewport-fit.controls-minimized .layout{grid-template-rows:minmax(0,1fr)}.kyt-viewport-fit .stage-wrap{padding:8px}.kyt-viewport-fit .surface{flex:1}}
