/* Phone and small-tablet styles for viewers. Loaded only at max-width 900px or short touch screens; the desktop view never sees this file. */

/* ===== Workflow window in the page =====
   As tall as the screen below the sticky header allows, so the whole conversation shows at once.
   The window is a size container: the same rules adapt it in the page and in the full-screen viewer. */
.flow-stage {
  container:flowwin / size;
  display:grid;
  grid-template:auto auto minmax(0,1fr) / minmax(0,1fr);
  height:clamp(480px,calc(100vh - var(--lv-head,72px) - 48px),860px);
  height:clamp(480px,calc(100svh - var(--lv-head,72px) - 48px),860px);
  min-height:0;
  border-radius:16px;
  box-shadow:0 16px 40px var(--shadow),0 2px 6px var(--shadow)
}
@media (max-height:500px) {
  .flow-stage {
    height:max(260px,calc(100vh - var(--lv-head,72px) - 16px));
    height:max(260px,calc(100svh - var(--lv-head,72px) - 16px))
  }
}

/* Window bar: no traffic lights; the product switch takes its own row and the steps become a labelled stepper.
   Without the switch (product pages) the stepper and the expand button share one row. */
.flow-window-bar {
  position:relative;
  inset:auto;
  height:auto;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:6px;
  padding:6px
}
.flow-dots {
  display:none
}
.flow-product {
  flex:1 1 100%;
  height:40px;
  padding:3px;
  border-radius:11px
}
.flow-product button {
  position:relative;
  flex:1 1 0;
  min-width:0;
  height:34px;
  padding:0 8px;
  border-radius:8px;
  font-size:13px;
  white-space:nowrap
}
/* The full 40px row is the tap target */
.flow-product button::after {
  content:"";
  position:absolute;
  inset:-3px 0
}
.flow-icons {
  flex:1 1 0;
  min-width:0;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:2px;
  margin:0
}
.flow-icons button {
  flex-direction:column;
  justify-content:center;
  gap:3px;
  min-width:0;
  height:46px;
  padding:0 2px;
  border-radius:10px;
  font-size:11px;
  line-height:1.15
}
.flow-icons span,.flow-icons button.is-active span {
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  transition:none
}
.flow-expand {
  flex:none;
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid var(--line-medium);
  border-radius:10px;
  background:var(--panel);
  color:var(--paper);
  cursor:pointer
}
.flow-expand[hidden] {
  display:none
}
.flow-expand svg,.hx-expand svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round
}
.flow-progress {
  position:relative;
  inset:auto
}
/* Both scenes share the space under the bar and cross-fade as before */
.flow-scene,.flow-scene.flow-deliver {
  position:relative;
  inset:auto;
  grid-area:3 / 1;
  min-height:0
}

/* ===== Chat ===== */
.chat-thread {
  padding:16px 14px 14px;
  gap:16px
}
.chat-msg {
  gap:10px
}
.chat-avatar {
  width:28px;
  height:28px
}
.chat-avatar img {
  width:17px
}
.chat-ai .chat-body {
  container:chatmsg / inline-size;
  font-size:14.5px;
  line-height:1.55
}
.chat-user .chat-body {
  max-width:88%;
  padding:9px 13px;
  font-size:14.5px;
  line-height:1.5
}
.chat-body p+* {
  margin-top:10px
}
.chat-dock {
  padding:0 10px 10px
}
.chat-composer {
  gap:6px;
  padding:8px 8px 8px 12px;
  border-radius:18px
}
/* Attached files: one row that scrolls sideways, not four rows of chips */
.chat-attachments {
  flex-wrap:nowrap;
  margin:0 -8px 0 -12px;
  padding:0 8px 0 12px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none
}
.chat-attachments::-webkit-scrollbar {
  display:none
}
.chat-attachments .chat-file {
  flex:none
}
.chat-file {
  padding:4px 9px 4px 4px;
  font-size:12.5px
}
/* iOS zooms the page into any field under 16px. At that size the prompts wrap, so the field shows two lines. */
.chat-composer textarea {
  min-height:calc(2.8em + 12px);
  font-size:16px;
  line-height:1.4
}
.chat-send {
  width:40px;
  height:40px
}
/* Decisions and the tool picker: one column on a phone, two or three once the message has room */
.chat-card {
  border-radius:14px
}
.chat-decide fieldset {
  gap:8px;
  padding:12px
}
.chat-decide legend {
  font-size:14px
}
.chat-options {
  gap:6px
}
.chat-options span {
  padding:9px 11px;
  border-radius:10px;
  font-size:14px
}
.chat-options small {
  font-size:11.5px
}
.chat-card-foot {
  flex-wrap:wrap;
  gap:8px;
  padding:10px 12px
}
.chat-card-foot .chat-primary {
  margin-left:auto
}
.chat-primary,.chat-secondary {
  height:40px;
  padding:0 14px
}
.chat-tools {
  gap:6px
}
.chat-tool {
  gap:10px;
  padding:8px 10px
}
.chat-tool img,.chat-tool.is-off i {
  width:32px;
  height:32px
}
@container chatmsg (min-width:430px) {
  .chat-options {
    grid-template-columns:1fr 1fr
  }
  .chat-tools {
    grid-template-columns:repeat(3,minmax(0,1fr))
  }
}
/* The approval stamp keeps its proportion to the smaller sheet */
.chat-body .review-sheet .approve-stamp {
  padding:7px 11px 6px;
  border-width:2.5px
}
.chat-body .review-sheet .approve-stamp strong {
  font-size:15px
}
/* Review roll-up: each item's buttons sit under its text until the roll-up is wide enough for one line */
.chat-rollup {
  container:rollup / inline-size;
  padding:12px 10px 24px;
  border-radius:14px 14px 0 0
}
.chat-rollup-head {
  gap:8px;
  margin-bottom:6px;
  font-size:13.5px
}
.chat-rollup-head span {
  white-space:nowrap
}
.chat-rollup ul {
  max-height:min(190px,28cqh)
}
.chat-rollup li {
  flex-wrap:wrap;
  gap:6px 8px;
  padding:8px 8px 8px 12px;
  font-size:13.5px;
  line-height:1.35
}
.chat-row-text {
  flex:1 1 100%
}
.chat-row-actions {
  flex:1 1 auto;
  justify-content:flex-end;
  gap:6px
}
.chat-row-actions button {
  height:40px;
  min-width:84px
}
.chat-rollup-foot {
  margin-top:8px
}
@container rollup (min-width:440px) {
  .chat-rollup li {
    flex-wrap:nowrap
  }
  .chat-row-text {
    flex:1 1 auto
  }
  .chat-row-actions {
    flex:none
  }
}
.chat-dossier {
  gap:10px;
  padding:12px;
  border-radius:14px
}
.chat-dossier-icon {
  width:40px;
  height:40px;
  border-radius:11px
}
.chat-dossier-text strong {
  font-size:14px
}
.chat-dossier-text small {
  font-size:12px
}
.chat-dossier-go {
  height:40px;
  padding:0 12px;
  font-size:13.5px
}

/* ===== Deliverables ===== */
.flow-scene.flow-deliver {
  gap:8px;
  padding:8px
}
/* One strip that scrolls sideways, every tab labelled; the edge with more tabs fades (viewers.js) */
.deliver-tabs {
  flex:none;
  flex-wrap:nowrap;
  justify-content:flex-start;
  position:relative;
  margin:0;
  padding:4px;
  border-radius:12px;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scrollbar-width:none
}
.deliver-tabs::-webkit-scrollbar {
  display:none
}
.deliver-tabs button {
  flex:none;
  height:40px;
  padding:0 12px;
  gap:7px;
  font-size:13px
}
.deliver-tabs button span {
  display:inline
}
.deliver-tabs button svg {
  width:16px;
  height:16px
}
.deliver-panel {
  padding-top:0
}
.doc-viewer,.cad-window,.dwg-window,.xl-window {
  grid-template-columns:minmax(0,1fr);
  border-radius:10px
}

/* PDF viewer: the file switch scrolls; zoom stays in reach */
.doc-viewer {
  container:docwin / inline-size
}
.doc-toolbar {
  gap:6px;
  height:48px;
  padding:0 4px 0 6px
}
.doc-files {
  flex:1 1 auto
}
.doc-toolbar button,.doc-download {
  width:40px;
  height:40px
}
.doc-files button {
  height:40px
}
/* File badges and app marks stay legible on a phone */
.flow-stage :is(.doc-badge,.chat-file i,.cad-mark,.xl-mark) {
  font-size:11px
}
.doc-zoom {
  padding-left:4px
}
.doc-zoom output {
  min-width:42px
}
.doc-multi .doc-canvas {
  padding:12px 12px 0
}
@container docwin (min-width:600px) {
  .doc-toolbar {
    gap:12px;
    padding:0 8px 0 10px
  }
  .doc-pages {
    display:inline
  }
  .doc-actions {
    display:flex
  }
}

/* CAD window: icon ribbon that scrolls, no group names; the feature tree returns when there is room */
.cad-window {
  container:cadwin / inline-size
}
.cad-title {
  gap:8px;
  height:32px;
  padding:0 10px;
  font-size:12px;
  white-space:nowrap
}
.cad-title strong {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis
}
.cad-ribbon {
  gap:0;
  padding:4px;
  overscroll-behavior-x:contain
}
.cad-ribbon::-webkit-scrollbar {
  display:none
}
.cad-group {
  flex:none;
  padding:0 4px
}
.cad-group-name {
  display:none
}
.cad-tools button,.cad-slider {
  align-content:center;
  min-width:40px;
  height:40px;
  padding:0 4px
}
.cad-slider {
  grid-auto-flow:column;
  gap:6px;
  padding:0 8px
}
.cad-slider input {
  width:84px
}
.cad-status {
  gap:12px;
  font-size:11px;
  white-space:nowrap
}
/* The assembly camera frames a wide view; a long exchanger in a tall, narrow viewport would be cut off at both
   ends. In the narrow window it is drawn in a 3:2 band across the middle of the viewport instead. */
.cad-window[data-assembly] .deliver-canvas {
  top:50%;
  bottom:auto;
  height:auto;
  aspect-ratio:3 / 2;
  transform:translateY(-50%)
}
@container flowwin (min-width:560px) {
  .cad-window[data-assembly] .deliver-canvas {
    top:0;
    bottom:0;
    height:100%;
    aspect-ratio:auto;
    transform:none
  }
}
@container cadwin (min-width:600px) {
  .cad-main {
    grid-template-columns:168px minmax(0,1fr)
  }
  .cad-tree {
    display:block
  }
  .cad-tree li>* {
    min-height:40px
  }
}

/* Drafting viewer: the readout and layout tabs stay; paper size and scale go first */
.dwg-window {
  container:dwgwin / inline-size
}
.dwg-titlebar {
  height:32px;
  white-space:nowrap
}
.dwg-command {
  height:24px;
  overflow:hidden;
  white-space:nowrap;
  font-size:11px
}
.dwg-status {
  gap:10px;
  overflow:hidden;
  white-space:nowrap
}
.dwg-status span:first-child {
  min-width:0
}
.dwg-status>span:nth-child(n+3) {
  display:none
}
@container dwgwin (min-width:520px) {
  .dwg-status {
    gap:18px
  }
  .dwg-status span:first-child {
    min-width:150px
  }
  .dwg-status>span:nth-child(n+3) {
    display:inline
  }
}

/* Spreadsheet: ribbon tabs scroll, the grid scrolls inside its frame */
.xl-window {
  container:xlwin / inline-size
}
.xl-title {
  height:32px;
  white-space:nowrap
}
.xl-ribbon {
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:none;
  white-space:nowrap
}
.xl-ribbon::-webkit-scrollbar {
  display:none
}
.xl-ribbon span {
  flex:none;
  padding:7px 9px
}
.xl-formula {
  grid-template-columns:52px 30px minmax(0,1fr)
}
.xl-grid-wrap {
  overscroll-behavior:contain
}
.xl-sheets {
  gap:0;
  overflow:hidden;
  white-space:nowrap
}
.xl-sheets span {
  padding:5px 11px
}

/* Scrollable strips fade at whichever edge has more to show */
.lv-more-end {
  -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),#0000);
  mask-image:linear-gradient(90deg,#000 calc(100% - 40px),#0000)
}
.lv-more-start {
  -webkit-mask-image:linear-gradient(90deg,#0000,#000 40px);
  mask-image:linear-gradient(90deg,#0000,#000 40px)
}
.lv-more-start.lv-more-end {
  -webkit-mask-image:linear-gradient(90deg,#0000,#000 40px,#000 calc(100% - 40px),#0000);
  mask-image:linear-gradient(90deg,#0000,#000 40px,#000 calc(100% - 40px),#0000)
}

/* In the page a vertical swipe scrolls past the models and drawings, while sideways drags and pinches still work
   them. Full screen, or once a drawing is zoomed in, every gesture belongs to the viewer. */
.flow-stage .deliver-canvas,.hx-viewer .hx-canvas,.flow-stage .dwg-space {
  touch-action:pan-y
}
.flow-stage .dwg-space[data-lv-zoomed],.is-landscape .deliver-canvas,.is-landscape .hx-canvas,.is-landscape .dwg-space {
  touch-action:none
}

/* ===== Window with room: a wide screen, the tablet, the landscape phone and the full-screen viewer ===== */
@container flowwin (min-width:560px) {
  .flow-window-bar {
    flex-wrap:nowrap;
    gap:14px;
    padding:6px 10px
  }
  .flow-dots {
    display:flex
  }
  .flow-product {
    flex:none;
    height:auto
  }
  .flow-product button {
    flex:none;
    padding:0 12px
  }
  .flow-icons {
    display:flex;
    flex:none;
    gap:4px;
    margin:0 auto 0 0
  }
  .flow-icons button {
    flex-direction:row;
    gap:7px;
    height:40px;
    padding:0 11px;
    font-size:13.5px
  }
  .flow-icons span {
    max-width:0;
    transition:max-width .35s ease
  }
  .flow-icons button.is-active span {
    max-width:90px
  }
  .chat-thread {
    padding:22px max(20px,calc(50% - 380px)) 18px;
    gap:18px
  }
  .chat-dock {
    padding:0 max(14px,calc(50% - 392px)) 10px
  }
  .chat-composer textarea {
    min-height:24px
  }
  .flow-scene.flow-deliver {
    gap:10px;
    padding:10px 12px 12px
  }
}

/* ===== Wide and short: the landscape phone, in the page and full screen ===== */
@container flowwin (min-width:560px) and (max-height:520px) {
  .flow-window-bar {
    padding-block:4px
  }
  .chat-thread {
    padding-top:14px;
    padding-bottom:12px;
    gap:14px
  }
  .chat-dock {
    padding-bottom:8px
  }
  .chat-composer {
    padding-block:6px
  }
  /* Review: the roll-up moves beside the conversation instead of eating its height */
  .chat-scene:has(.chat-rollup:not([hidden])) {
    grid-template-columns:minmax(0,1fr) minmax(250px,36%);
    grid-template-rows:minmax(0,1fr)
  }
  .chat-scene:has(.chat-rollup:not([hidden])) .chat-dock {
    grid-area:1 / 2;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    min-height:0;
    padding:8px;
    border-left:1px solid var(--line);
    background:var(--surface)
  }
  .chat-scene:has(.chat-rollup:not([hidden])) .chat-rollup {
    display:flex;
    flex-direction:column;
    min-height:0;
    margin:0 0 8px;
    padding:10px;
    border-bottom:1px solid var(--line-medium);
    border-radius:14px;
    background:var(--panel);
    box-shadow:none
  }
  .chat-scene:has(.chat-rollup:not([hidden])) .chat-rollup ul {
    flex:0 1 auto;
    min-height:0;
    max-height:none
  }
  /* Deliverables: the tabs become a sidebar so the viewers keep the full height */
  .flow-scene.flow-deliver {
    display:grid;
    grid-template:minmax(0,1fr) / minmax(140px,20%) minmax(0,1fr);
    gap:8px;
    padding:6px
  }
  .deliver-tabs {
    grid-area:1 / 1;
    flex-direction:column;
    align-items:stretch;
    gap:2px;
    margin:0;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-mask-image:none;
    mask-image:none
  }
  .deliver-tabs button {
    justify-content:flex-start;
    height:auto;
    min-height:40px;
    padding:0 10px;
    font-size:12.5px
  }
  .deliver-tabs button span {
    overflow:hidden;
    text-overflow:ellipsis
  }
  .deliver-tabs button[aria-selected="true"]::after {
    left:0;
    right:auto;
    top:30%;
    bottom:30%;
    width:3px;
    height:auto
  }
  .deliver-panel {
    grid-area:1 / 2
  }
  /* The viewers drop their outer bars to keep the drawing or model as large as possible */
  .cad-window {
    grid-template-rows:auto minmax(0,1fr)
  }
  .cad-title,.cad-status {
    display:none
  }
  .dwg-window {
    grid-template-rows:minmax(0,1fr) auto
  }
  .dwg-titlebar,.dwg-command {
    display:none
  }
  .xl-window {
    grid-template-rows:auto auto minmax(0,1fr) auto
  }
  .xl-ribbon {
    display:none
  }
}

/* ===== Expand buttons ===== */
.hx-expand {
  position:absolute;
  z-index:2;
  top:12px;
  right:12px;
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid #0000001f;
  border-radius:10px;
  background:#ffffffd9;
  color:#1d1d22;
  box-shadow:0 2px 10px #0000001a;
  cursor:pointer
}
.hx-expand[hidden],.is-landscape [data-landscape-open] {
  display:none
}

/* ===== Prompt: a bottom sheet asking to turn the phone ===== */
.lv-prompt {
  position:fixed;
  z-index:1000;
  left:12px;
  right:12px;
  bottom:12px;
  bottom:calc(12px + env(safe-area-inset-bottom,0px));
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:14px;
  max-width:440px;
  margin-inline:auto;
  padding:16px;
  border:1px solid var(--line-medium);
  border-radius:20px;
  background:var(--panel);
  color:var(--paper);
  font-family:var(--body);
  box-shadow:0 24px 60px #0606072e,0 2px 8px #06060714;
  opacity:0;
  transform:translateY(calc(100% + 28px));
  transition:transform .5s cubic-bezier(.2,.9,.25,1.04),opacity .3s ease
}
.lv-prompt.is-in {
  opacity:1;
  transform:none
}
.lv-prompt-icon {
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:14px;
  background:var(--yellow);
  color:var(--on-accent)
}
.lv-prompt-icon .lv-phone-icon {
  width:34px;
  height:34px
}
.lv-prompt-copy {
  display:grid;
  gap:3px
}
.lv-prompt-title {
  font-family:var(--head);
  font-size:16px;
  font-weight:600;
  line-height:1.3;
  letter-spacing:-.01em
}
.lv-prompt-note {
  color:var(--muted);
  font-size:13.5px;
  line-height:1.45
}
.lv-prompt-actions {
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px
}
.lv-prompt-actions button {
  height:46px;
  border-radius:12px;
  font:600 15px var(--body);
  cursor:pointer
}
.lv-prompt-later {
  border:1px solid var(--line-strong);
  background:var(--panel);
  color:var(--paper)
}
.lv-prompt-open {
  border:0;
  background:#060607;
  color:#fff
}
.lv-sr {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap
}
/* The phone tips over to landscape, waits, and stands back up */
.lv-phone-icon {
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  overflow:visible
}
.lv-phone-icon .lv-phone {
  transform-box:fill-box;
  transform-origin:50% 50%;
  animation:lv-turn 2.8s cubic-bezier(.5,0,.25,1) infinite
}
.lv-phone-icon .lv-arc {
  stroke-width:1.6;
  opacity:.75
}
@keyframes lv-turn {
  0%,16% { transform:none }
  42%,74% { transform:rotate(-90deg) }
  100% { transform:none }
}

/* ===== Full-screen viewer =====
   A modal dialog sized from the measured visible viewport (viewers.js), never from vh. */
.lv-overlay {
  position:fixed;
  inset:auto;
  left:var(--lv-x,0);
  top:var(--lv-y,0);
  width:var(--lv-w,100vw);
  height:var(--lv-h,100vh);
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  overflow:hidden;
  background:var(--ink);
  color:var(--paper);
  overscroll-behavior:contain
}
.lv-overlay::backdrop {
  background:var(--ink)
}
.lv-frame {
  position:absolute;
  top:0;
  left:0;
  display:grid;
  grid-template:minmax(0,1fr) / minmax(0,1fr);
  width:var(--lv-w,100vw);
  height:var(--lv-h,100vh);
  padding:6px
}
/* Upright phone: the frame is turned a quarter clockwise, its top along the right edge of the screen,
   so turning the phone anticlockwise brings it upright. */
.lv-rotated .lv-frame {
  width:var(--lv-h,100vh);
  height:var(--lv-w,100vw);
  transform-origin:0 0;
  transform:translateX(var(--lv-w,100vw)) rotate(90deg)
}
.lv-close {
  position:absolute;
  z-index:5;
  top:12px;
  right:12px;
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid var(--line-medium);
  border-radius:50%;
  background:var(--panel);
  color:var(--paper);
  box-shadow:0 4px 14px #0606071f;
  cursor:pointer
}
.lv-close svg {
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round
}
/* A brief, upright hint while the frame is turned */
.lv-turn {
  position:absolute;
  z-index:6;
  left:50%;
  top:50%;
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
  padding:12px 20px 12px 14px;
  border-radius:999px;
  background:#060607e6;
  color:#fff;
  font:600 15px var(--body);
  white-space:nowrap;
  box-shadow:0 12px 30px #06060740;
  opacity:0;
  transform:translate(-50%,-50%) scale(.94);
  transition:opacity .3s ease,transform .3s ease;
  pointer-events:none
}
.lv-turn.is-on {
  opacity:1;
  transform:translate(-50%,-50%)
}
.lv-turn .lv-phone-icon {
  width:30px;
  height:30px;
  color:var(--yellow)
}

/* The workflow window fills the frame; its bar leaves room for the close button */
.lv-frame>.flow-track {
  height:auto;
  min-height:0
}
.lv-frame .flow-sticky {
  height:100%
}
.lv-frame .flow-stage.is-landscape {
  height:100%;
  max-width:none;
  margin:0;
  border-radius:12px;
  box-shadow:none
}
.flow-stage.is-landscape .flow-window-bar {
  padding-right:58px
}

/* The heat exchanger: controls in a compact column at the left, the model large beside them */
.lv-frame>.hx-viewer.is-landscape {
  display:grid;
  grid-template:minmax(0,1fr) / minmax(200px,27%) minmax(0,1fr);
  gap:6px;
  width:100%;
  height:100%;
  margin:0;
  padding:0
}
.hx-viewer.is-landscape .hx-stage {
  grid-area:1 / 2;
  height:100%;
  min-height:0;
  border-radius:14px
}
.hx-viewer.is-landscape .hx-panel {
  grid-area:1 / 1;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain
}
.hx-viewer.is-landscape .hx-control {
  gap:6px;
  padding:10px 12px;
  border-radius:12px
}
.hx-viewer.is-landscape .hx-control label,.hx-viewer.is-landscape .hx-row span,.hx-viewer.is-landscape .hx-label {
  font-size:13.5px
}
.hx-viewer.is-landscape .hx-scale {
  font-size:11px
}
.hx-viewer.is-landscape .hx-control:last-child {
  flex:1 0 auto
}
.hx-viewer.is-landscape .hx-parts button {
  min-height:40px;
  padding:6px 8px;
  font-size:13px
}
/* The section switch is drawn small; its tap area is not */
.hx-viewer.is-landscape .hx-switch::after {
  content:"";
  position:absolute;
  inset:-8px -4px
}
.hx-viewer.is-landscape .hx-zoom {
  right:10px;
  bottom:10px
}
.hx-viewer.is-landscape .hx-zoom button {
  width:40px;
  height:40px
}
.hx-viewer.is-landscape .hx-hint {
  left:14px;
  bottom:12px;
  font-size:12px
}

/* While the viewer is open the page underneath holds still */
html.lv-locked {
  scroll-behavior:auto
}
html.lv-locked body {
  position:fixed;
  left:0;
  right:0;
  top:var(--lv-lock-top,0);
  overflow:hidden
}
.lv-placeholder {
  visibility:hidden
}

@media (prefers-reduced-motion:reduce) {
  .lv-prompt,.lv-turn {
    transition:none
  }
  .lv-phone-icon .lv-phone {
    animation:none
  }
}
