/* Blender experiences extend the original ROLFI visual system. */
.studio-scene {
    min-height: 690px;
    background: #d7dedc;
    border: 1px solid #d9e3e8;
}

.webgl-host canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.studio-world {
    position: absolute;
    inset: 0 280px 0 0;
}

.scene-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .5;
}

.webgl-ready > .scene-poster,
.webgl-ready > .scene-status {
    display: none;
}

.scene-status {
    position: absolute;
    inset: 45% 15% auto;
    color: #193b4d;
    padding: 16px;
    background: #f9fcf1e6;
    font-size: 12px;
    line-height: 1.6;
    border-radius: 5px;
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.scene-status.is-error {
    inset: auto 20px 90px;
    color: #733a1c;
}

.studio-vignette {
    background: linear-gradient(180deg, #0d293712, transparent 35%, #08282f70 100%);
}

.studio-top-tag { color: #194348; }
.live-dot { background: #307e65; box-shadow: 0 0 0 4px #307e651e; }
.studio-photo-tag { bottom: 27px; color: #fff; font-size: 9px; letter-spacing: .14em; }
.studio-details { top: 0; right: 0; bottom: 0; width: 295px; border: 0; border-radius: 0; box-shadow: none; padding: 108px 30px 32px; background: #fbfcf9; }
.studio-details h3 { font-size: 30px; }
.studio-details .details-mini { color: #45766d; }
.studio-details .detail-rule { margin: 24px 0; }
.studio-details .detail-points { gap: 19px; margin-bottom: 30px; }
.studio-details .btn { white-space: normal; }
.sample-stage { position: absolute; left: 28%; bottom: 32px; width: 44%; height: 420px; z-index: 6; pointer-events: none; }
.sample-hint { left: auto; right: 322px; bottom: 30px; max-width: 220px; font-size: 10px; text-align: right; }
.material-arrows { left: auto; right: 316px; bottom: 85px; z-index: 7; }
.rotation-toggle { position: absolute; left: 30px; bottom: 59px; z-index: 8; border: 1px solid #ffffff65; border-radius: 30px; color: #fff; background: #113c4280; backdrop-filter: blur(12px); padding: 10px 14px; font-size: 11px; display: flex; gap: 9px; align-items: center; }
.material-choice { transition: border-color .2s, background .2s; }
.material-choice.is-current { box-shadow: inset 0 -3px #0b75de; }
.material-thumb { background-color: #e7eae7; background-size: cover; }
.material-bottom-bar { align-items: center; }
.color-swatch:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #168fda; outline-offset: 4px; }
.color-swatch.is-current { outline-offset: 4px; }
.anatomy-viewport { background: radial-gradient(ellipse at 40% 42%, #32444b, #0f202b 80%); }
.anatomy-viewport:after { display: none; }
.anatomy-canvas { position: absolute; inset: 0; }
.anatomy-controls { width: 245px; padding: 15px; border-radius: 7px; background: #071b2cba; }
.assembly-tag { position: absolute; left: 26px; top: 25px; color: #acbdc6; font-size: 9px; letter-spacing: .16em; }
.anatomy-source { color: #a5bac9; font-size: 11px; line-height: 1.8; margin: 24px 0 0; max-width: 850px; }
.anatomy-source a { border-bottom: 1px solid #7192a5; }
.weather-canvas { position: absolute; inset: 0; }
.weather-viewport { height: 570px; background: #8ea6ab; }
.weather-darken { pointer-events: none; background: linear-gradient(90deg, #08242dcc, #092f3710 70%); }
.weather-viewport[data-weather="rain"] .weather-darken { background: linear-gradient(90deg,#08202dd9,#152c3c0a 80%); }
.weather-viewport[data-weather="storm"] .weather-darken { background: linear-gradient(90deg,#061826d9,#182b360a 80%); }
.weather-readout { position: absolute; right: 26px; top: 24px; color: #fff; letter-spacing: .15em; font-size: 9px; background: #0c293d88; padding: 10px 13px; border: 1px solid #ffffff38; border-radius: 3px; }
.weather-caption { max-width: 360px; left: 40px; bottom: 35px; }
.weather-caption h3 { font-size: 35px; }
.weather-caption p { font-size: 13px; }
.weather-toolbar { display: flex; align-items: end; gap: 18px; margin-bottom: 18px; }
.weather-material-label { display: grid; gap: 8px; min-width: 240px; }
.weather-material-label > span { font-size: 9px; font-weight: 800; letter-spacing: .14em; color: #456576; }
.weather-material-label select { width: 100%; height: 56px; padding: 0 35px 0 15px; border: 1px solid #cbd8de; border-radius: 6px; background: #fff; color: #143849; font: inherit; font-size: 13px; }
.weather-toolbar .weather-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); flex: 1; gap: 8px; margin: 0; }
.weather-toolbar .weather-tab { min-width: 0; padding: 17px 14px; font-size: 12px; }
.weather-reset-view { min-height: 56px; border: 1px solid #cbd8de; border-radius: 6px; padding: 0 18px; font-size: 12px; color: #25556b; background: #f8faf8; white-space: nowrap; }
.weather-viewport { height: 640px; }
.weather-darken, .weather-viewport[data-weather="rain"] .weather-darken, .weather-viewport[data-weather="storm"] .weather-darken { background: linear-gradient(0deg,#071e323d,transparent 42%); }
.weather-caption { left: 24px; bottom: 22px; max-width: 290px; padding: 15px 18px; border: 1px solid #ffffff24; border-radius: 6px; background: #0c293be0; backdrop-filter: blur(10px); }
.weather-caption h3 { font-size: 25px; margin: 8px 0; }
.weather-caption p { font-size: 11px; line-height: 1.6; margin-bottom: 0; }
.weather-gesture { position: absolute; right: 24px; bottom: 24px; color: #e1e9eb; font-size: 10px; background: #102d3e80; border: 1px solid #ffffff20; padding: 9px 12px; border-radius: 4px; pointer-events: none; }
.source-note { font-size: 12px; color: #68788b; line-height: 1.7; margin: 24px 0 0; }
.detail-photo { background-color: #e3e7e5; background-size: cover; background-position: center; }
.detail-select { min-height: 40px; }
.compare-before { filter: none; }
.compare-image { background-position: center; }
.compare-viewport { height: 480px; background: #d7dedc; }
.compare-label { font-size: 9px; max-width: 42%; }
.material-dialog { width: min(1000px, 94vw); padding: 0; border: 1px solid #cad5d8; border-radius: 12px; color: #173542; background: #e8ece9; box-shadow: 0 30px 120px #00121d60; }
.material-dialog::backdrop { background: #041521bb; backdrop-filter: blur(8px); }
.dialog-heading { padding: 27px 32px 0; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.dialog-heading h2 { font-size: 30px; letter-spacing: -.04em; margin: 9px 0 0; }
.dialog-heading button { color: #183e4d; border: 1px solid #bdcacd; background: #ffffff6b; width: 42px; height: 42px; border-radius: 50%; font-size: 27px; }
.detail-model { height: min(57vh, 500px); touch-action: none; cursor: grab; }
.detail-model:active { cursor: grabbing; }
.dialog-footer { display: flex; justify-content: space-between; align-items: start; padding: 0 32px 24px; gap: 35px; }
.dialog-footer p { margin: 0; color: #4c6570; font-size: 13px; line-height: 1.7; max-width: 570px; }
.dialog-footer .detail-gesture { font-size: 11px; white-space: nowrap; }

@media (max-width: 1100px) {
    .studio-world { right: 255px; }
    .studio-details { width: 255px; padding: 100px 24px 28px; }
    .studio-details h3 { font-size: 25px; }
    .sample-stage { left: 27%; width: 44%; }
    .sample-hint { right: 278px; }
    .material-arrows { right: 274px; }
}

@media (max-width: 760px) {
    .studio-scene { min-height: 900px; }
    .studio-world { inset: 0 0 auto; height: 510px; }
    .studio-details { top: 510px; right: 0; bottom: 0; width: 100%; padding: 25px; }
    .studio-details h3 { font-size: 28px; margin: 11px 0; max-width: 330px; }
    .studio-details p { max-width: 440px; }
    .studio-details .detail-rule { margin: 16px 0; }
    .studio-details .detail-points { gap: 9px; margin-bottom: 20px; }
    .studio-vignette { bottom: 390px; }
    .studio-top-tag { top: 22px; left: 21px; font-size: 9px; }
    .sample-stage { bottom: auto; top: 230px; left: 26%; width: 68%; height: 275px; }
    .studio-photo-tag { top: 70px; bottom: auto; left: 21px; font-size: 8px; color: #36525b; }
    .sample-hint { left: 22px; right: auto; bottom: auto; top: 480px; font-size: 8px; text-align: left; }
    .rotation-toggle { left: 20px; bottom: auto; top: 430px; font-size: 9px; padding: 9px 11px; }
    .material-arrows { right: 18px; bottom: auto; top: 447px; }
    .material-arrows button { width: 30px; height: 30px; }
    .material-picker { grid-template-columns: repeat(5,minmax(130px,1fr)); overflow-x: auto; padding-bottom: 8px; }
    .material-bottom-bar { flex-direction: column; align-items: start; gap: 20px; }
    .color-swatch-list { flex-wrap: wrap; }
    .weather-toolbar { flex-wrap: wrap; gap: 12px; }
    .weather-material-label { flex: 1; min-width: 170px; }
    .weather-toolbar .weather-tabs { flex-basis: 100%; order: 2; gap: 5px; }
    .weather-toolbar .weather-tab { padding: 13px 6px; font-size: 10px; min-height: 64px; }
    .weather-reset-view { padding: 0 10px; min-height: 56px; font-size: 10px; }
    .weather-viewport { height: 570px; }
    .weather-caption { bottom: 25px; left: 25px; max-width: 80%; }
    .weather-caption h3 { font-size: 29px; }
    .weather-caption { max-width: 78%; left: 15px; bottom: 48px; padding: 12px 14px; }
    .weather-caption h3 { font-size: 23px; }
    .weather-gesture { left: 15px; right: auto; bottom: 13px; font-size: 8px; padding: 7px 9px; }
    .weather-readout { font-size: 8px; right: 15px; }
    .anatomy-viewport { height: 500px; }
    .anatomy-controls { left: 15px; bottom: 15px; width: 220px; }
    .assembly-tag { left: 18px; font-size: 8px; }
    .compare-viewport { height: 330px; }
    .dialog-heading { padding: 22px 22px 0; }
    .dialog-heading h2 { font-size: 24px; }
    .detail-model { height: min(44vh, 340px); }
    .dialog-footer { flex-direction: column; gap: 12px; padding: 0 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
