.route { max-width: 1120px; padding-block: 32px 70px; }
.route h1 { margin-top: 32px; max-width: 850px; }
.intro { font-size: 1.2rem; max-width: 68ch; }
.summary { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(18px, 4vw, 54px); margin-block: 34px 50px; align-items: center; }
.model { margin: 0; padding: 16px; color: #eff4e6; background: #163a33; }
.stage { --length: min(220px, 41vw); --width: calc(var(--length)*160/227); --height: calc(var(--length)*45/227); height: clamp(145px, 25vw, 220px); display: grid; place-items: center; overflow: hidden; }
.box { width: var(--length); height: var(--height); position: relative; transform-style: preserve-3d; transform: rotateX(-28deg) rotateY(var(--angle, -32deg)); }
.face { position: absolute; display: block; border: 1px solid #385246; backface-visibility: hidden; }
.front, .back { width: var(--length); height: var(--height); background: #a4b49b; }
.front { transform: translateZ(calc(var(--width)/2)); }
.back { transform: rotateY(180deg) translateZ(calc(var(--width)/2)); }
.left, .right { width: var(--width); height: var(--height); left: calc((var(--length) - var(--width))/2); background: #759480; }
.left { transform: rotateY(-90deg) translateZ(calc(var(--length)/2)); }
.right { transform: rotateY(90deg) translateZ(calc(var(--length)/2)); }
.top, .bottom { width: var(--length); height: var(--width); top: calc((var(--height) - var(--width))/2); background: #d7e4b9; }
.top { transform: rotateX(90deg) translateZ(calc(var(--height)/2)); }
.bottom { transform: rotateX(-90deg) translateZ(calc(var(--height)/2)); }
.model figcaption { font-size: .92rem; line-height: 1.5; }
.rotate { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .88rem; }
.rotate input { min-width: 0; flex: 1; accent-color: #d9ed82; min-height: 26px; }
.rotate output { min-width: 4ch; font-variant-numeric: tabular-nums; }
.worksheet, .method { border-top: 1px solid var(--edge); padding-top: 28px; }
.worksheet > p, .method { max-width: 80ch; }
.route fieldset { margin: 24px 0; padding: 18px; min-width: 0; border: 1px solid #abb9ac; }
.route legend { font-size: 1.15rem; font-weight: 650; padding: 0 7px; }
.inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.inputs label, #corner label { display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; font-weight: 550; }
.inputs input, .inputs select, #corner input { width: 100%; min-width: 0; padding: 10px; font: inherit; background: white; color: var(--ink); border: 1px solid #64756b; border-radius: 3px; min-height: 44px; }
#corner { margin-top: 16px; max-width: 55ch; }
#corner small { display: block; margin-top: 6px; line-height: 1.5; }
.route .check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; margin-top: 22px; line-height: 1.5; }
.route .check span { min-width: 0; white-space: normal; }
.route .check input { width: 18px; height: 18px; margin: 3px 0 0; }
.calculate { font: inherit; padding: 12px 18px; background: var(--ink); color: white; border: none; border-radius: 3px; cursor: pointer; }
#result:not(:empty) { overflow-wrap: anywhere; background: #e8ecdf; border-left: 4px solid #587152; padding: 18px; margin-top: 18px; }
#result ul, .method ol { padding-left: 1.4em; }
#result li + li, .method li + li { margin-top: 9px; }
.method { margin-top: 40px; }
.route [hidden] { display: none; }
@media(max-width:750px) { .summary { grid-template-columns: 1fr; } .inputs { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .inputs { grid-template-columns: 1fr; } .route fieldset { padding: 12px; } }
