:root {
  font-family: "Segoe UI", Arial, sans-serif; color: #192e41; background: #edf3f7;
  --blue: #174c7a; --muted: #4f687c; --line: #d4e0e8; --white: #fff; --pass: #007c7d;
  font-synthesis: none; color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #277fca; outline-offset: 3px; }
[hidden] { display: none !important; }
.brand { background: #fff; border-bottom: 1px solid var(--line); }
.brand > div, main { max-width: 1390px; margin: 0 auto; padding-inline: clamp(14px, 3.6vw, 54px); }
.brand > div { display: flex; align-items: center; gap: 16px; min-height: 59px; }
.brand strong { font-size: 19px; letter-spacing: .12em; color: #123d62; }
.brand span { color: var(--muted); font-size: 13px; border-left: 1px solid var(--line); padding-left: 16px; }
main { padding-bottom: 36px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 28px 0 21px; }
h1 { margin: 0 0 5px; font-size: clamp(35px, 5vw, 60px); line-height: .99; letter-spacing: -.05em; font-weight: 730; }
p { line-height: 1.48; }
.intro p { margin: 0; color: var(--muted); font-size: clamp(13px, 1.55vw, 17px); }
.spec { display: flex; margin: 0; gap: 21px; }
.spec div { border-left: 1px solid #bfceda; padding-left: 15px; }
.spec dt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.spec dd { font-variant-numeric: tabular-nums; margin: 3px 0 0; font-size: 20px; font-weight: 700; white-space: nowrap; }
.modes { display: flex; gap: 7px; margin: 0 0 13px; }
button { background: #fff; border: 1px solid #c6d6e2; border-radius: 9px; min-height: 42px; padding: 8px 12px; }
button:hover { background: #f1f7fc; border-color: #94b4d1; }
button[aria-pressed="true"] { background: #e7f0f9; color: #123e62; border-color: #4d7ea6; font-weight: 650; }
.modes button { min-width: 123px; padding-inline: 20px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 340px); gap: 14px; align-items: start; }
.visual { display: grid; gap: 12px; min-width: 0; }
.viewer, .panel, .detail { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--white); }
.viewer { position: relative; height: clamp(390px, 54vw, 562px); background: linear-gradient(154deg,#f8fafc 18%,#e4edf3 100%); }
.render { position: absolute; inset: 0; }
.render canvas { width: 100%; height: 100%; display: block; }
.viewport-label, .reset, .orbit-hint, #part-label { position: absolute; z-index: 1; }
.viewport-label { left: 14px; top: 14px; font-size: 13px; font-weight: 650; padding: 7px 10px; border-radius: 7px; color: #294a63; background: #ffffffdb; pointer-events: none; }
.reset { right: 12px; top: 12px; min-height: 35px; font-size: 12px; background: #ffffffdb; }
.orbit-hint { bottom: 11px; left: 12px; right: 12px; text-align: center; font-size: 12px; color: #3c5b73; pointer-events: none; }
#part-label { left: 12px; bottom: 36px; background: #174c7a; color: #fff; padding: 7px 10px; font-size: 13px; border-radius: 7px; pointer-events: none; }
.fallback { position: absolute; inset: 52px 10px 24px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fallback p { align-self: end; z-index: 1; background: #fff; border-radius: 6px; padding: 4px 9px; }
.panel { padding: 17px; }
h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.muted { color: var(--muted); font-size: 13px; margin: 6px 0 13px; }
ul { padding: 0; list-style: none; margin: 0 0 14px; display: grid; gap: 3px; }
#parts button { display: grid; align-items: center; grid-template-columns: 10px minmax(0,1fr) 29px; gap: 8px; width: 100%; text-align: left; min-height: 33px; padding: 4px 7px; border-color: transparent; font-size: 13px; }
#parts button:hover, #parts button[aria-pressed="true"] { border-color: #b8cfe0; }
#parts button b { text-align: right; color: #3f617a; font-variant-numeric: tabular-nums; }
.swatch { width: 8px; height: 8px; background: var(--swatch); border-radius: 2px; border: 1px solid #122e4340; }
.controls { border-top: 1px solid #e0eaf0; padding-top: 12px; display: grid; gap: 9px; font-size: 14px; }
.controls label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 650; }
output { color: var(--blue); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--blue); margin: 0; height: 23px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.actions button { padding-inline: 6px; }
.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 650; }
.primary:hover, .primary[aria-pressed="true"] { background: #226494; border-color: #226494; color: #fff; }
.field-title { font-weight: 650; }
.range-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-top: -6px; }
.wide { width: 100%; }
.metric { margin-top: 14px; background: #edf5fb; border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.metric strong { font-size: 34px; line-height: 1.07; color: var(--blue); font-variant-numeric: tabular-nums; }
.metric span { font-size: 14px; font-weight: 650; }
.metric small, .air-note { color: var(--muted); font-size: 12px; line-height: 1.4; }
.air-data { display: grid; gap: 7px; margin: 13px 0 8px; font-size: 13px; }
.air-data div { display: flex; justify-content: space-between; gap: 8px; }
.air-data strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
details { border-top: 1px solid var(--line); padding-top: 9px; font-size: 12px; color: var(--muted); }
details summary { cursor: pointer; color: #254a67; font-weight: 650; }
details input { width: 100%; border: 1px solid #b9cbd9; border-radius: 5px; padding: 5px; margin: 3px 0 8px; color: #192e41; }
.detail { padding: 11px 13px 5px; }
.detail-head { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 7px 12px; }
.detail h2 { font-size: 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 11px; height: 3px; margin: 0 5px 3px 0; border-radius: 2px; background: var(--swatch); }
#diagram { display: block; width: 100%; height: clamp(182px, 20vw, 238px); }
footer { margin-top: 13px; }
footer p { max-width: 780px; }
@media(max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .viewer { height: clamp(310px, 75vw, 465px); }
  .panel { grid-row: 2; }
  .visual { display: contents; }
  .detail { grid-row: 3; }
  .intro { flex-wrap: wrap; gap: 13px; margin: 22px 0 16px; }
  .spec dd { font-size: 16px; }
  .modes button { min-width: 0; padding-inline: 7px; flex: 1; font-size: 12px; }
  .viewport-label { left: 8px; top: 8px; font-size: 11px; }
  .reset { top: 8px; right: 8px; font-size: 11px; }
  .orbit-hint { font-size: 10px; }
}

@media(max-width: 760px) {
  .modes { display: grid; grid-template-columns: .87fr 1.48fr .8fr; }
  .modes button { padding-inline: 5px; }
  #assembly-panel { display: flex; flex-direction: column; }
  #assembly-panel .controls { order: -1; border-top: 0; padding-top: 0; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
}
.viewer[data-mode="sight"], .viewer[data-mode="air"] { height: clamp(330px, 42vw, 446px); }
@media(max-width: 760px) {
  .viewer[data-mode="sight"], .viewer[data-mode="air"] { height: clamp(284px, 75vw, 415px); }
}
@media(min-width: 761px) {
  .viewer { height: clamp(415px, calc(100svh - 275px), 562px); }
  .viewer[data-mode="sight"], .viewer[data-mode="air"] { height: clamp(316px, calc(100svh - 425px), 446px); }
  #assembly-panel { display: flex; flex-direction: column; }
  #assembly-panel .controls { order: -1; border-top: 0; padding-top: 0; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  #assembly-panel ul { margin-bottom: 0; }
}

main { padding: 0 0 8px; }
.intro { margin: 4px 0 12px; }
@media(min-width:761px){.viewer{height:500px}.viewer[data-mode="sight"],.viewer[data-mode="air"]{height:420px}}
