:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #152638;
  background: #eef2f5;
  --muted: #4c6071;
  --line: #d4dee6;
  --panel: #fbfcfd;
  --navy: #152b42;
  --accent: #0c5566;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, select, input { font: inherit; }
a { color: var(--accent); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid #277e9b; outline-offset: 3px; }
.header { background: #f9fbfc; border-bottom: 1px solid var(--line); }
.header-inner, main { width: min(calc(100% - 3rem), 1440px); margin-inline: auto; }
.header-inner { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.header-inner > a:last-child { font-size: .86rem; }
.brand { display: flex; align-items: center; gap: .56rem; color: var(--navy); text-decoration: none; }
main { margin-block: clamp(1.5rem, 3vw, 3rem); }
h1 { font-size: clamp(1.76rem, 4vw, 2.95rem); letter-spacing: -.044em; margin: 0; line-height: 1.13; }
h2 { margin: 0; font-size: 1.14rem; letter-spacing: -.02em; }
.page-title p { margin: .7rem 0 1.4rem; line-height: 1.6; color: var(--muted); }
.loading { color: var(--muted); }
.experiment { display: grid; gap: 1rem; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18.5rem, 23rem); gap: 1rem; align-items: stretch; }
.panel, .viewer { min-width: 0; border-radius: .65rem; }
.panel { border: 1px solid var(--line); background: var(--panel); }
.viewer { display: flex; flex-direction: column; overflow: hidden; background: #142231; color: #e2ecf3; border: 1px solid #2c4458; container-type: inline-size; }
.viewer-bar { padding: .67rem .85rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; border-bottom: 1px solid #30465a; }
.segments, .presets { display: flex; flex-wrap: wrap; gap: .35rem; }
.viewer-bar .segments { flex-wrap: nowrap; }
.section-options { padding-inline-start: .6rem; border-inline-start: 1px solid #476075; }
.viewer-actions { display: flex; align-items: center; gap: .32rem; margin-inline-start: auto; }
button { min-height: 37px; padding: .42rem .65rem; border: 1px solid #becbd5; border-radius: .32rem; background: #fff; color: #234156; font-size: .84rem; font-weight: 650; cursor: pointer; }
button:hover { border-color: #5892a5; }
button:disabled { cursor: default; opacity: .55; }
.viewer button { color: #d9e8f0; border-color: #476075; background: #1a2d40; }
.viewer button[aria-pressed="true"] { color: #e4fbfa; background: #285063; border-color: #699aa8; }
.viewer .quiet { color: #c7d7e3; border-color: transparent; background: transparent; }
.viewer .quiet:hover { border-color: #476075; }
.viewer-screens { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.viewport { flex: 1; height: clamp(416px, 42vw, 620px); isolation: isolate; position: relative; background: #1a2d3e radial-gradient(ellipse at 45% 56%, #30465a, #142231); }
.viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.viewport canvas:active { cursor: grabbing; }
.viewport-labels { position: absolute; inset: 0; pointer-events: none; }
.hole-label, .viewer-status { position: absolute; border-radius: .25rem; border: 1px solid #7191a7; background: #132535ea; color: #ebf6fc; font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hole-label { padding: .24rem .48rem; top: 0; left: 0; font-weight: 700; }
.viewer-status { bottom: .8rem; left: .85rem; margin: 0; padding: .32rem .55rem; pointer-events: none; }
.section-optics {
  order: -1; display: grid; grid-template-columns: minmax(7.7rem, .62fr) minmax(0, 1fr);
  align-items: center; min-width: 0; padding: .57rem .58rem .57rem .83rem;
  background: #112333; color: #d0e1ed; border-bottom: 1px solid #385469;
}
.section-optics-info { min-width: 0; flex-shrink: 0; padding-right: .2rem; }
.section-optics h2 { color: #ebf7fb; font-size: .83rem; }
.section-optics dl { margin: .48rem 0; font-size: .76rem; }
.section-optics dl div { display: flex; align-items: baseline; gap: .37rem; margin-top: .17rem; }
.section-optics dd { color: #e4fbff; font-size: .91rem; font-weight: 730; margin: 0; font-variant-numeric: tabular-nums; }
.section-optics p { margin: 0; font-size: .68rem; color: #afc7d5; line-height: 1.45; font-variant-numeric: tabular-nums; }
.section-optics canvas { display: block; width: 100%; height: 148px; min-width: 0; min-height: 0; border: 1px solid #304a5d; border-radius: .28rem; }
@container (min-width: 38rem) {
  .viewer-screens.inspection-screens { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12.2rem, 29%); }
  .inspection-screens .viewport { height: auto; min-height: clamp(416px, 42vw, 620px); }
  .section-optics { order: 0; display: flex; flex-direction: column; align-items: stretch; gap: .7rem; padding: .95rem .85rem; border-bottom: 0; border-left: 1px solid #385469; }
  .section-optics canvas { height: clamp(160px, 16vw, 250px); }
}
.closeup-control { padding: .56rem .85rem .57rem; border-bottom: 1px solid #30465a; color: #c3d6e1; font-size: .79rem; }
.closeup-control label { margin-right: .3rem; color: #eef6fa; font-weight: 650; }
.closeup-control input[type="range"] { accent-color: #76cee4; margin: .13rem 0 0; }
.viewer-error { position: absolute; padding-inline: 1rem; inset-block-start: 40%; text-align: center; width: 100%; line-height: 1.5; }
.scan-progress { position: absolute; inset: auto .85rem .25rem; height: 3px; background: #214558; pointer-events: none; }
.scan-progress i { display: block; height: 100%; background: #81edd8; transform-origin: left; }
.viewer-footer { padding: .68rem .85rem; min-height: 43px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .38rem .65rem; color: #b7cbd9; font-size: .79rem; border-top: 1px solid #30465a; }
.legend { display: inline-flex; flex-wrap: wrap; gap: .75rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: .61rem; height: .61rem; border-radius: 50%; background: #79baf9; }
.legend span:last-child i { background: #86f8d7; }
.closeup-control .coverage-control { display: inline-flex; align-items: center; white-space: nowrap; gap: .32rem; margin-right: 0; color: #ffd482; cursor: pointer; }
.coverage-control input { margin: 0; accent-color: #ffc267; }
.control { padding: 1rem 1.05rem; align-self: stretch; }
.select-pair { margin-top: .8rem; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .95fr); gap: .65rem; }
.control label { color: #263d50; font-size: .84rem; font-weight: 700; }
select { display: block; width: 100%; min-width: 0; height: 40px; margin-top: .36rem; padding: .35rem .4rem; background: #fff; color: #183247; border: 1px solid #c2d0db; border-radius: .32rem; font-size: .85rem; }
.specs { display: grid; grid-template-columns: 1fr 1fr; margin: .85rem 0 .44rem; border: 1px solid #dce7ed; background: #f0f5f8; border-radius: .35rem; }
.specs div { min-width: 0; padding: .46rem .56rem; }
.specs div:nth-child(odd) { border-right: 1px solid #dce7ed; }
.specs div:nth-child(-n+2) { border-bottom: 1px solid #dce7ed; }
.specs dt { color: var(--muted); font-size: .74rem; line-height: 1.35; }
.specs dd { margin: .19rem 0 0; font-weight: 650; font-size: .85rem; font-variant-numeric: tabular-nums; }
.source-details { color: var(--muted); line-height: 1.5; font-size: .77rem; }
.source-details summary, .method summary { color: var(--accent); cursor: pointer; }
.source-details p { margin: .26rem 0; }
.working-distance-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .36rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.working-distance-form label, .working-distance-form p { grid-column: 1 / -1; }
.working-distance-form input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 37px; padding: .35rem .45rem; color: #183247; background: #fff; border: 1px solid #becbd5; border-radius: .32rem; font-variant-numeric: tabular-nums; }
.working-distance-form p { margin: 0; }
#working-distance-status { color: var(--accent); }
#working-distance-status:empty { display: none; }
.device-sources { display: flex; flex-wrap: wrap; gap: .3rem .6rem; }
.pose-controls { margin-top: .8rem; padding-top: .78rem; border-top: 1px solid var(--line); }
.range-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
output { font-size: .85rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 24px; margin: .1rem 0; accent-color: #216780; }
.presets { width: 100%; flex-wrap: nowrap; }
.presets button { flex: 1; padding-inline: .28rem; min-height: 35px; font-variant-numeric: tabular-nums; }
.presets button[aria-pressed="true"] { color: #0d5369; border-color: #67a6b8; background: #e3f2f6; }
.head-turn-control { display: grid; grid-template-columns: auto minmax(0, 1fr) 2.5rem; gap: .55rem; align-items: center; margin-top: .65rem; }
.head-turn-control output { text-align: end; }
.axis-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem .7rem; margin-top: .35rem; }
.axis-controls output { font-size: .78rem; }
.axis-controls .range-heading { gap: .24rem; }
.pose-readout { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .18rem .46rem; margin: .15rem 0 .27rem; font-size: .78rem; color: var(--muted); }
.pose-readout strong { color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pose-readout .front-pose { font-size: .77rem; padding: .25rem .35rem; min-height: 29px; white-space: nowrap; }
.control-hint, .capture-status { margin: .1rem 0 .6rem; color: var(--muted); font-size: .79rem; line-height: 1.5; }
.capture-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.capture-actions button { min-height: 43px; padding-inline: .38rem; }
.primary { color: #f4fbfc; background: #11546c; border-color: #11546c; }
.primary:hover { background: #1c6882; }
.capture-status { margin: .54rem 0 0; min-height: 1.2rem; }
.results, .history, .method { padding: 1rem 1.1rem; }
.results-head, .history-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .68rem; }
.results-head p, .reading-note, .history-empty { margin: .3rem 0 0; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.frame-count { font-size: .88rem; font-weight: 730; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { padding: .6rem .42rem; text-align: left; border-bottom: 1px solid #e2eaf0; }
thead th { color: #344f64; background: #edf3f7; font-size: .81rem; }
tbody th { font-weight: 710; }
tbody td:nth-child(3) { color: var(--accent); font-weight: 710; }
.reading-note { margin-top: .65rem; }
.history-head button { min-height: 34px; }
.history-head > div { display: flex; gap: .4rem; }
.history-list { display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; list-style: none; }
.history-list li { display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap; background: #edf3f7; border: 1px solid #dbe6ed; color: #324e63; border-radius: .3rem; padding: .44rem .55rem; font-size: .8rem; font-variant-numeric: tabular-nums; }
.history-list strong { color: #163b50; font-weight: 700; }
.method { margin-top: 1rem; border: 1px solid var(--line); background: var(--panel); border-radius: .55rem; }
.method p { margin: .55rem 0 0; color: var(--muted); line-height: 1.65; font-size: .86rem; }
@media (max-width: 60rem) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 19.5rem); gap: .7rem; }
  .control { padding-inline: .75rem; }
  .viewport { height: 425px; }
}
@media (max-width: 43rem) {
  .header-inner, main { width: calc(100% - 1.35rem); }
  .header-inner { min-height: 54px; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .viewport { flex: none; height: clamp(300px, 70vw, 420px); }
  .control, .results, .history, .method { padding-inline: .75rem; }
  .viewer-bar, .viewer-footer, .closeup-control { padding-inline: .57rem; }
  .viewer-bar { gap: .3rem; }
  .section-options { padding-inline-start: .35rem; }
  .viewer-bar button { padding-inline: .45rem; }
  .page-title p { margin-bottom: .9rem; }
  .viewer-footer { font-size: .74rem; }
  th, td { padding-inline: .26rem; font-size: .75rem; }
  .hole-label { font-size: .73rem; }
  .section-optics { padding-inline: .6rem; }
}
@media (max-width: 22rem) {
  .axis-controls { gap: .5rem; }
  .axis-controls .range-heading { flex-wrap: wrap; }
  .viewer-bar button { font-size: .75rem; padding-inline: .34rem; }
}

@media (max-width: 63.999rem) {
  .header-inner { min-height: 3rem; }
  main { margin-block: 1rem; }
  .page-title h1 { font-size: clamp(1.55rem, 3.5vw, 2rem); }
  .page-title p { margin: .4rem 0 .8rem; font-size: .9rem; }
}
@media (min-width: 43.01rem) and (max-width: 63.999rem) and (orientation: portrait) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .viewport, .inspection-screens .viewport { flex: none; min-height: 0; height: clamp(22rem, 40svh, 30rem); }
}
@media (max-width: 63.999rem) and (orientation: landscape) {
  .header-inner, main { width: calc(100% - 1.5rem); }
  .header-inner { min-height: 2.1rem; }
  .brand img { width: 24px; height: 24px; }
  main { margin-top: .5rem; }
  .page-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .7rem; margin-bottom: .5rem; }
  .page-title h1 { font-size: 1.35rem; }
  .page-title p { margin: 0; font-size: .8rem; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .viewer-bar, .viewer-footer { padding-block: .2rem; }
  .viewer-footer { min-height: 27px; }
  .viewer-screens.inspection-screens { display: grid; grid-template-columns: minmax(0, 1fr) clamp(9.5rem, 24%, 13rem); }
  .viewport, .inspection-screens .viewport { flex: none; min-height: 0; height: clamp(12.4rem, calc(100svh - 11.5rem), 22rem); }
  .section-optics { order: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: .3rem; padding: .4rem; border: 0; border-left: 1px solid #385469; }
  .section-optics dl { display: flex; flex-wrap: wrap; gap: 0 .45rem; margin: .2rem 0; }
  .section-optics canvas { height: clamp(3.75rem, 19svh, 7rem); }
}
@media (max-width: 63.999rem) and (max-height: 23rem) and (orientation: landscape) {
  .page-title p { display: none; }
  .viewport, .inspection-screens .viewport { height: clamp(8rem, calc(100svh - 10.5rem), 13rem); }
  .section-optics { gap: .15rem; }
  .section-optics dl { margin: .1rem 0; }
  #monitor-last-frame { display: none; }
}

/* Keep the live scan, its settings and the four depth readings in sight together. */
@media (min-width: 64rem) and (orientation: landscape) {
  .header-inner, main { width: min(calc(100% - 2.5rem), 100rem); }
  .header-inner { min-height: 2.75rem; }
  .brand img { width: 27px; height: 27px; }
  main { margin-block: .8rem 1.1rem; }
  .page-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: .75rem; }
  .page-title h1 { font-size: clamp(1.55rem, 2.1vw, 2.15rem); }
  .page-title p { margin: 0; font-size: .88rem; }
  .experiment {
    grid-template-columns: minmax(0, 1fr) clamp(20rem, 25vw, 25rem);
    grid-template-rows: clamp(22rem, calc(100dvh - 21.5rem), 44rem) min-content 1fr;
    align-items: start;
    gap: 0 .65rem;
  }
  .workspace { display: contents; }
  .viewer { grid-area: 1 / 1; align-self: stretch; min-height: 0; }
  .control { grid-area: 1 / 2 / 3 / 3; display: flex; flex-direction: column; align-self: stretch; }
  .results { grid-area: 2 / 1 / 4 / 2; margin-top: .65rem; }
  .history { grid-area: 3 / 2; margin-top: .65rem; }
  .viewer-screens { flex: 1 1 0; min-height: 0; }
  .viewer-screens.inspection-screens {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(10rem, 23%, 16rem);
    grid-template-rows: minmax(0, 1fr);
  }
  .viewport, .inspection-screens .viewport { height: auto; min-height: 0; }
  .viewport canvas { position: absolute; inset: 0; }
  .viewer-bar { padding: .36rem .65rem; }
  .viewer-bar button { min-height: 32px; }
  .viewer-footer { min-height: 31px; padding: .3rem .65rem; }
  .section-optics {
    order: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: .68rem;
    padding: .65rem;
    border: 0;
    border-left: 1px solid #385469;
  }
  .section-optics canvas { width: 100%; height: clamp(9.5rem, 20dvh, 14.5rem); }
  .control { padding: .7rem .85rem; }
  .control h2, .results h2, .history h2 { font-size: 1.06rem; }
  .select-pair { margin-top: .42rem; }
  .control select { height: 34px; margin-top: .2rem; }
  .specs { margin: .55rem 0 .22rem; }
  .specs div { padding: .32rem .5rem; }
  .specs dd { margin-top: .08rem; }
  .pose-controls { padding-top: .42rem; margin-top: .45rem; }
  .control input[type="range"] { height: 20px; }
  .presets button { min-height: 30px; padding-block: .2rem; }
  .head-turn-control { margin-top: .35rem; }
  .axis-controls { margin-top: .16rem; }
  .pose-readout { margin: .05rem 0 .2rem; }
  .control-hint { margin: 0 0 .42rem; line-height: 1.4; }
  .capture-actions { margin-top: auto; }
  .capture-actions button { min-height: 36px; }
  .capture-status { margin-top: .3rem; }
  .results, .history { padding: .55rem .85rem; }
  .results-head, .history-head { margin-bottom: .32rem; }
  .results-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .7rem; }
  .results-head p { margin: 0; font-size: .8rem; }
  th, td { padding: .29rem .48rem; }
  .reading-note { margin-top: .34rem; font-size: .8rem; }
  .history-head { flex-wrap: wrap; }
  .history-head button { min-height: 30px; padding-block: .22rem; }
  .history-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; }
  .history-list li { flex-direction: column; align-items: flex-start; gap: .05rem; padding: .25rem .4rem; }
  .history-list li span { font-size: .76rem; line-height: 1.4; }
  .method { margin-top: .65rem; }
}

@media (min-width: 32rem) and (orientation: landscape) {
  .closeup-control {
    display: grid;
    grid-template-columns: auto minmax(3rem, 1fr) auto auto;
    align-items: center;
    gap: .5rem;
    padding: .25rem .7rem;
  }
  .closeup-control .range-heading { display: contents; }
  .closeup-control label[for="closeup-tilt"] { grid-area: 1 / 1; }
  .closeup-control input[type="range"] { grid-area: 1 / 2; margin: 0; }
  #closeup-datum { grid-area: 1 / 3; color: #a9c2d3; }
  .closeup-control .coverage-control { grid-area: 1 / 4; }
}

.collected-cloud-pane { min-width: 0; min-height: 0; background: #132433; border-top: 1px solid #385469; }
.collected-cloud-content {
  display: grid;
  grid-template: "heading" auto "tools" auto "plot" minmax(0, 1fr) "legend" auto / minmax(0, 1fr);
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: .6rem;
  gap: .48rem;
  color: #e2ecf3;
  background: #132433;
}
.cloud-heading, .cloud-tools { display: flex; justify-content: space-between; align-items: center; gap: .3rem; min-width: 0; }
.cloud-heading { grid-area: heading; }
.cloud-heading h2 { color: #ebf7fb; font-size: .9rem; }
#collected-cloud-summary { color: #abc4d2; font-size: .72rem; font-variant-numeric: tabular-nums; }
.cloud-tools { grid-area: tools; }
.cloud-filters { display: flex; gap: .2rem; }
.collected-cloud-content button {
  min-height: 30px; padding: .22rem .32rem; white-space: nowrap;
  color: #d9e8f0; background: #1a2d40; border: 1px solid #476075; font-size: .76rem;
}
.collected-cloud-content button:hover { border-color: #83a8bb; }
.collected-cloud-content button[aria-pressed="true"] { color: #e4fbfa; background: #285063; border-color: #699aa8; }
.collected-cloud-viewport {
  grid-area: plot; position: relative; overflow: hidden; min-height: 0; min-width: 0;
  background: #10202e; border: 1px solid #354d5e; border-radius: .3rem;
}
#collected-cloud-viewport canvas {
  position: absolute; inset: 0; display: block; height: 100%; width: 100%;
  border: 0; border-radius: 0; touch-action: none; cursor: grab;
}
#collected-cloud-viewport canvas:active { cursor: grabbing; }
#collected-cloud-empty {
  position: absolute; inset: 0; display: grid; place-content: center; margin: 0; padding: .55rem;
  color: #b5c9d6; font-size: .78rem; line-height: 1.55; text-align: center; pointer-events: none;
}
.cloud-legend { grid-area: legend; align-items: center; gap: .24rem .6rem; color: #b7cbd9; font-size: .7rem; }
.cloud-legend span { gap: .25rem; white-space: nowrap; }
.cloud-legend i { width: .48rem; height: .48rem; }

@media (max-width: 63.999rem) and (orientation: landscape) {
  .viewer-screens.three-screens { grid-template-columns: minmax(0, 1fr) minmax(7.3rem, 20%) minmax(8.9rem, 23%); }
  .collected-cloud-pane { border-top: 0; border-left: 1px solid #385469; }
  .collected-cloud-pane .collected-cloud-content { gap: .32rem; padding: .4rem; }
  .collected-cloud-pane .cloud-heading > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: .05rem .25rem; }
}

@container (min-width: 38rem) {
  .viewer-screens.three-screens {
    grid-template-columns: minmax(0, 1fr) clamp(8.25rem, 20%, 14rem) clamp(9.4rem, 23%, 16rem);
  }
  .collected-cloud-pane { border-top: 0; border-left: 1px solid #385469; }
}

@media (orientation: portrait) {
  @container (max-width: 37.999rem) {
    .section-optics { order: 0; border-top: 1px solid #385469; border-bottom: 0; }
    .inspection-screens .viewport { flex: none; }
    .collected-cloud-pane .collected-cloud-content {
      height: 10rem;
      grid-template: "heading plot" auto "tools plot" auto "legend plot" 1fr / minmax(8.3rem, .6fr) minmax(0, 1fr);
      align-content: start;
    }
    .collected-cloud-pane .cloud-legend { align-self: start; }
  }
}
@container (max-width: 24rem) {
  .viewer-bar { column-gap: .25rem; }
  .viewer-bar button { padding-inline: .28rem; font-size: .77rem; }
  .viewer-actions, .viewer-bar .segments { gap: .18rem; }
  .section-options { padding-inline-start: .27rem; }
}

.collected-cloud-dialog {
  width: min(66rem, calc(100% - 1.25rem)); max-width: none; max-height: none;
  padding: 0; border: 1px solid #456075; border-radius: .65rem;
  color: #e2ecf3; background: #132433; overflow: hidden;
}
.collected-cloud-dialog::backdrop { background: rgb(8 17 26 / 77%); }
.collected-cloud-dialog .collected-cloud-content {
  height: min(47rem, calc(100dvh - 2rem)); padding: clamp(.65rem, 2vw, 1.2rem); gap: .6rem;
}
.collected-cloud-dialog .cloud-heading h2 { font-size: 1.1rem; }
.collected-cloud-dialog .cloud-heading > div { display: flex; gap: .55rem; align-items: baseline; }
.collected-cloud-dialog button { min-height: 36px; padding-inline: .65rem; font-size: .85rem; }
.collected-cloud-dialog .cloud-legend { gap: .9rem; font-size: .8rem; }


.lab-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem .9rem; }
.lab-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.header-inner .brand { flex: none; }
