.wv-landing {
  padding-top: 32px;
  padding-bottom: 70px;
}
.wv-landing h1 {
  max-width: 1000px;
  font-size: clamp(26px, 3.5vw, 44px);
}
.wv-intro {
  max-width: 730px;
  font-size: 20px;
}
.wv-drop {
  margin: 20px 0;
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  padding: 20px;
  text-align: center;
  background: var(--card);
}
.wv-drop.dragging {
  border-color: #3d8bfd;
  background: #182239;
}
.wv-drop h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin: 12px 0;
}
.wv-file-icon {
  width: 38px;
  color: var(--accent);
  margin: auto;
}
.wv-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.wv-actions .btn {
  font-size: 16px;
  min-height: 48px;
  padding: .75em 16px;
}
.wv-muted {
  font-size: 13px;
  color: #a5aab3;
}
.wv-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 48px 0;
}
.wv-facts h2,
.wv-support h2 {
  font-size: 22px;
}
.wv-support {
  max-width: 900px;
}
.wv-support p {
  color: #bdc2c9;
}
.wv-landing button {
  cursor: pointer;
}
/* Current native workstation tokens: MedicalTheme, ViewerInlineToolbar,
   ViewerViewport and ViewerSettingsChrome. Image geometry belongs to app.mjs. */
.wv-workspace {
  --accent: #3d8bfd;
  --background: #151618;
  --surface: #242629;
  --surface-prominent: #35383c;
  --selection: #216ab6;
  --border: #4a4d51a6;
  --border-strong: #686c72;
  --secondary: #d0d2d5;
  --muted: #a8abb0;
  --disabled: #797d84;
  --viewer-font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui: 1;
  --menu-width: 300px;
  --header-height: 20px;
  --header-font: 10px;
  --header-control: 24px;
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  border: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--background);
  color: #fff;
  font: 500 13px var(--viewer-font);
  overflow: hidden;
  overscroll-behavior: none;
}
.wv-workspace[open] { display: flex; flex-direction: column; }
.wv-workspace::backdrop { background: #000; }
.wv-workspace * { box-sizing: border-box; }
.wv-workspace button,
.wv-mode-picker > summary {
  font: inherit;
  color: var(--secondary);
  border: .5px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  padding: 7px 10px;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
}
@media (hover: hover) {
  .wv-workspace button:hover,
  .wv-mode-picker > summary:hover { background: var(--surface-prominent); }
}
.wv-workspace button:active { opacity: .72; }
.wv-workspace button:focus-visible,
.wv-workspace summary:focus-visible,
.wv-panel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.wv-workspace button[aria-pressed="true"],
.wv-menu-toggle[aria-expanded="true"] {
  color: #fff;
  border-color: var(--accent);
  background: var(--selection);
}
.wv-workspace svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.wv-workspace button[data-locked] { position: relative; }
.wv-workspace button[data-locked] > svg:last-child {
  width: 9px;
  height: 9px;
  color: var(--muted);
  position: absolute;
  top: 4px;
  right: 4px;
}
.wv-topbar {
  height: 39px;
  min-height: 39px;
  padding: 0 4px 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--background);
  position: relative;
  z-index: 12;
}
.wv-workspace .wv-icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wv-topbar > .wv-icon,
.wv-topbar > .wv-menu-toggle { border-color: transparent; }
.wv-mode-picker { position: relative; flex-shrink: 0; }
.wv-mode-picker > summary {
  height: 36px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-color: transparent;
  font-size: calc(11px * var(--ui));
  list-style: none;
  color: #fff;
}
.wv-mode-picker > summary::-webkit-details-marker { display: none; }
.wv-mode-picker > summary > svg:last-child { width: 11px; height: 11px; color: var(--muted); }
.wv-mode-picker[open] > summary { background: var(--surface-prominent); }
.wv-mode-chips {
  position: absolute;
  top: 39px;
  left: 0;
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: .5px solid var(--border-strong);
  border-radius: 2px;
  background: var(--background);
  box-shadow: 0 5px 16px #0006;
}
.wv-mode-chips button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-size: calc(11px * var(--ui));
  text-align: left;
}
.wv-mode-chips button[data-locked] > svg:last-child {
  position: static;
  margin-left: auto;
}
.wv-tools {
  display: flex;
  flex: 1;
  min-width: 0;
  height: 36px;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.wv-tools::-webkit-scrollbar { display: none; }
.wv-tools button {
  flex-shrink: 0;
  min-height: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: calc(11px * var(--ui));
  border-color: transparent;
}
.wv-tools button:first-child { margin-left: auto; }
.wv-tools button:last-child { margin-right: auto; }
.wv-tools button > svg:first-child { width: 20px; height: 20px; }
.wv-tools button[data-locked] { padding-right: 13px; }
.wv-menu-toggle {
  flex-shrink: 0;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: calc(11px * var(--ui)) !important;
}
#wv-active-tool,
#wv-tools-toggle { display: none !important; }
.wv-canvas-area { position: relative; flex: 1; min-height: 0; }
/* ContainerLoupeLayer: float above every panel, using the presented raster. */
#wv-loupe {
  position: absolute;
  left: 0;
  top: 0;
  width: 104px;
  height: 104px;
  border: 0;
  border-radius: 50%;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  box-shadow: 0 0 10px #0009;
  image-rendering: pixelated;
  pointer-events: none;
  transition: none;
  z-index: 5;
}
/* ViewerUndoChip: compact controls within independent 44-point hit targets. */
#wv-ruler-history {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  z-index: 4;
}
#wv-ruler-history > button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  pointer-events: auto;
}
#wv-ruler-history > #wv-ruler-delete { color: #ff3b30; }
.wv-ruler-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 36px;
  height: 36px;
  border: .5px solid var(--border);
  border-radius: 2px;
  background: var(--surface);
  font: 600 13px var(--viewer-font);
}
.wv-ruler-control-label { padding: 0 10px; }
.wv-ruler-control svg { width: 14px; height: 14px; stroke-width: 2; }
@media (hover: hover) {
  #wv-ruler-history > button:hover .wv-ruler-control { background: var(--surface-prominent); }
}
.wv-workspace button[data-tool="ruler"]:disabled { cursor: not-allowed; }
.wv-grid {
  height: 100%;
  display: grid;
  grid-template: 1fr / 1fr;
  gap: 2px;
  background: var(--background);
  container-type: size;
}
.wv-panel {
  --plane: #3d8bfd;
  --hud: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #000;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}
.wv-panel::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: var(--plane);
  pointer-events: none;
  z-index: 3;
}
.wv-panel:not(:first-child) { display: none; }
.wv-grid.mpr:not(.fullscreen) { grid-template: 60% minmax(0, 1fr) / 1fr 1fr; }
.wv-grid.mpr .wv-panel { display: flex; }
.wv-grid.mpr:not(.fullscreen) .wv-panel:first-child { grid-column: 1 / 3; }
.wv-grid.mpr.landscape:not(.fullscreen) { grid-template: 1fr 1fr / 60% minmax(0, 1fr); }
.wv-grid.mpr.landscape:not(.fullscreen) .wv-panel:first-child { grid-column: 1; grid-row: 1 / 3; }
.wv-grid.fullscreen { grid-template: 1fr / 1fr; }
.wv-grid.fullscreen .wv-panel { display: none; }
.wv-grid.fullscreen .wv-panel.is-fullscreen { display: flex; grid-column: 1; grid-row: 1; }
.wv-panel[data-plane="1"] { --plane: #ff6b5d; }
.wv-panel[data-plane="2"] { --plane: #3ecf6e; }
.wv-panel-header {
  height: var(--header-height);
  min-height: var(--header-height);
  padding: 0 4px;
  display: flex;
  gap: 4px;
  align-items: center;
  background: var(--background);
  white-space: nowrap;
  font-size: var(--header-font);
  font-weight: 500;
  color: var(--secondary);
}
.wv-panel-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--plane);
}
.wv-projection,
.wv-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  font-size: calc(var(--header-font) - 1px);
}
.wv-projection { color: var(--muted); }
.wv-value { color: var(--secondary); }
.wv-workspace .wv-reorder,
.wv-workspace .wv-expand {
  height: var(--header-height);
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wv-workspace .wv-reorder { width: var(--header-control); touch-action: none; cursor: grab; display: none; }
.mpr:not(.fullscreen) .wv-reorder { display: inline-flex; }
.wv-reorder svg { width: 18px; height: 18px; stroke-width: 2.5; }
.wv-workspace .wv-expand { width: 44px; }
.wv-expand svg { width: 13px; height: 13px; }
.wv-collapse-icon { display: none; }
.is-fullscreen .wv-expand-icon { display: none; }
.is-fullscreen .wv-collapse-icon { display: inline; }
.wv-panel-surface {
  position: relative;
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: hidden;
  touch-action: none;
}
.wv-panel-surface > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.wv-panel-surface > .wv-overlay { pointer-events: none; }
.wv-position { position: absolute; inset: 0 0 auto; height: 2px; background: var(--surface); pointer-events: none; }
.wv-position i { height: 2px; display: block; background: #3d8bfdd9; width: 0; }
.wv-readout {
  position: absolute;
  bottom: calc(2px * var(--hud));
  left: calc(2px * var(--hud));
  font: 500 calc(9px * var(--hud) * var(--ui)) / 1.45 var(--viewer-font);
  font-variant-numeric: tabular-nums;
  color: #fff;
  white-space: pre-line;
  pointer-events: none;
  text-shadow: 1px 1px #000d, 0 1px 3px #0009;
}
.wv-readout .wv-image-number { font-size: calc(10px * var(--hud) * var(--ui)); }
.wv-workspace .wv-orientation-reset {
  position: absolute;
  top: 5px;
  right: 6px;
  padding: 4px 6px;
  background: #151618d9;
  color: var(--secondary);
  font-size: 10px;
}
.wv-orientation-reset svg { width: 12px; height: 12px; }
.wv-angle {
  position: absolute;
  pointer-events: none;
  background: #151618e6;
  border: .5px solid var(--border);
  padding: 4px 8px;
  border-radius: 2px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.wv-workspace .wv-cine {
  position: absolute;
  bottom: 4px;
  right: 6px;
  background: #151618b3;
  padding: 6px 10px;
}
.wv-cine svg { width: 14px; height: 14px; }
.wv-panel.reordering { opacity: .65; outline: 2px solid var(--plane); outline-offset: -2px; }
.wv-panel.reorder-target { box-shadow: inset 0 0 0 2px var(--accent); }
.wv-panel.reorder-target::before { content: ""; position: absolute; inset: 2px; background: #3d8bfd26; pointer-events: none; z-index: 3; }
/* SeriesStripView: 56-point tiles; active series has one blue leading edge. */
.wv-bottom {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  min-height: 84px;
  height: 84px;
  padding: 6px 12px;
  overflow: hidden;
  background: var(--background);
}
.wv-series-content { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
.wv-series-content::-webkit-scrollbar { display: none; }
.wv-series-content > * { flex-shrink: 0; }
.wv-series { display: flex; gap: 8px; }
.wv-workspace .wv-series button {
  padding: 0;
  width: 56px;
  height: 70px;
  border: 0;
  border-radius: 0;
  position: relative;
  background: transparent;
  opacity: .55;
}
.wv-workspace .wv-series button[aria-pressed="true"] { background: transparent; opacity: 1; }
.wv-series canvas { display: block; width: 56px; height: 56px; background: #000; border: .5px solid var(--border); border-radius: 2px; }
.wv-series button[aria-pressed="true"] canvas { border-color: var(--border-strong); }
.wv-series button[aria-pressed="true"]::before { content: ""; position: absolute; left: 0; top: 0; height: 56px; width: 2px; background: var(--accent); }
.wv-series button::after { content: ""; position: absolute; width: 6px; height: 6px; top: 4px; left: 4px; background: #4dd8e6; }
.wv-series small { font: 500 calc(9px * var(--ui)) var(--viewer-font); font-variant-numeric: tabular-nums; display: block; margin-top: 3px; color: #ffffff80; }
.wv-series button[aria-pressed="true"] small { font-weight: 600; color: var(--accent); }
.wv-workspace .wv-add {
  position: relative;
  align-self: center;
  width: 56px;
  height: 70px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
}
.wv-add::before { content: ""; position: absolute; inset: 0 0 14px; border: .5px dashed var(--border-strong); border-radius: 2px; }
.wv-add > svg { width: 20px; height: 20px; margin: 18px; color: var(--secondary); }
.wv-add small { font-size: calc(9px * var(--ui)); line-height: 11px; margin-top: 3px; color: var(--muted); }
.wv-bottom #wv-strip-toggle { margin-left: auto; flex-shrink: 0; width: 32px; height: 100%; padding: 0; border: 0; background: transparent; }
.wv-workspace.strip-collapsed .wv-bottom { height: 26px; min-height: 26px; padding: 0; }
.wv-workspace.strip-collapsed #wv-strip-toggle { width: 100%; height: 26px; font-size: calc(11px * var(--ui)); font-weight: 600; font-variant-numeric: tabular-nums; gap: 6px; }
/* Flat, closely spaced native accordion sections. */
.wv-menu { position: fixed; z-index: 20; right: env(safe-area-inset-right); top: env(safe-area-inset-top); bottom: env(safe-area-inset-bottom); width: var(--menu-width); max-width: 94vw; background: var(--background); border-left: .5px solid var(--border); overflow-y: auto; }
.wv-menu-heading { font-size: calc(12px * var(--ui)); font-weight: 500; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 12px; border-bottom: .5px solid var(--border); min-height: 44px; background: var(--surface); }
.wv-menu-heading > div { min-width: 0; }
.wv-menu-context { display: block; margin-top: 3px; font-size: calc(11px * var(--ui)); color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-menu-context:empty { display: none; }
.wv-menu-heading .wv-icon { border-color: transparent; }
.wv-menu-body { padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.wv-menu details { padding: 0; border: .5px solid var(--border); border-radius: 2px; overflow: hidden; }
.wv-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 44px; background: #303235; color: var(--secondary); font: 500 calc(12px * var(--ui)) var(--viewer-font); }
.wv-menu summary svg { width: calc(18px * var(--ui)); height: calc(18px * var(--ui)); }
.wv-menu summary::-webkit-details-marker { display: none; }
.wv-menu summary::after { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(-45deg); margin-left: auto; }
.wv-section-summary { margin-left: auto; color: var(--secondary); font-size: calc(11px * var(--ui)); }
.wv-menu summary:has(.wv-section-summary)::after { margin-left: 0; }
.wv-menu details[open] > summary { background: #44474b; color: #fff; }
.wv-menu details[open] > summary::after { transform: rotate(45deg); border-color: #fff; }
.wv-menu details > :not(summary) { margin-left: 10px; margin-right: 10px; }
.wv-menu details > :nth-child(2) { margin-top: 8px; }
.wv-menu details > :last-child { margin-bottom: 8px; }
.wv-mode-row { display: grid; grid-template-columns: repeat(auto-fill, calc(56px * var(--ui))); gap: 4px; }
.wv-mode-row button { position: relative; min-width: 0; height: calc(56px * var(--ui)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px; white-space: normal; font-size: calc(11px * var(--ui)); line-height: 1.15; }
.wv-mode-row button > svg:first-child { width: calc(18px * var(--ui)); height: calc(18px * var(--ui)); }
.wv-mode-row button > span { max-width: 100%; overflow-wrap: anywhere; }
.wv-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.wv-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.wv-tool-grid button { min-width: 0; min-height: calc(56px * var(--ui)); padding: 5px; white-space: normal; font-size: calc(11px * var(--ui)); line-height: 1.2; }
.wv-tool-grid button > svg:first-child:not(:last-child) { display: block; margin: 0 auto 3px; }
.wv-quick-tools { grid-template-columns: repeat(auto-fill, calc(56px * var(--ui))); }
.wv-quick-tools button { height: calc(56px * var(--ui)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.wv-quick-tools button > svg:first-child { width: calc(18px * var(--ui)); height: calc(18px * var(--ui)); margin: 0; }
.wv-preset-grid button { text-align: left; font-size: calc(11px * var(--ui)); padding: 7px 6px; white-space: normal; }
.wv-preset-grid small { display: block; color: var(--muted); font: 500 calc(9px * var(--ui)) var(--viewer-font); font-variant-numeric: tabular-nums; margin-top: 4px; }
.wv-menu label { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; margin-top: 8px; color: #fff; font-size: calc(11px * var(--ui)); }
.wv-menu input[type="number"] { width: 100px; color: #fff; font: inherit; font-variant-numeric: tabular-nums; background: var(--surface); border: .5px solid var(--border); border-radius: 2px; padding: 6px; text-align: right; }
.wv-menu input[role="switch"] { appearance: none; width: 40px; height: 24px; border-radius: 20px; background: #ffffff33; position: relative; flex-shrink: 0; cursor: pointer; }
.wv-menu input[role="switch"]:checked { background: var(--accent); }
.wv-menu input[role="switch"]::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; }
.wv-menu input[role="switch"]:checked::before { left: 18px; }
.wv-workspace .wv-wide { width: 100%; min-height: 44px; text-align: left; font-size: calc(11px * var(--ui)); display: flex; gap: 10px; align-items: center; }
.wv-menu details > .wv-wide { width: calc(100% - 20px); margin-top: 8px; }
.wv-menu .wv-muted { margin: 12px 10px; color: var(--muted); font-size: calc(11px * var(--ui)); line-height: 1.5; }
.wv-workspace #wv-menu-scrim { position: fixed; inset: 0; background: #0008; z-index: 19; border-radius: 0; }
.wv-source-presets { display: grid; grid-template-columns: 1fr 1fr; grid-column: 1 / -1; gap: 4px; }
.wv-empty { position: absolute; inset: 0; z-index: 6; background: #000b; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; color: var(--secondary); }
.wv-disc-recovery { z-index: 8; padding: 24px; text-align: center; background: var(--background); overflow: auto; }
.wv-disc-recovery h2 { margin: 0; font-size: 20px; color: #fff; }
.wv-disc-recovery p { max-width: 480px; margin: 0; line-height: 1.5; }
.wv-disc-recovery #wv-disc-folder { background: var(--accent); color: #fff; padding: 10px 20px; }
.wv-spinner { width: 56px; height: 56px; border: 4px solid var(--surface-prominent); border-top-color: var(--accent); border-radius: 50%; animation: wv-spin 1s linear infinite; }
@keyframes wv-spin { to { transform: rotate(360deg); } }
#wv-notice { position: absolute; z-index: 7; top: 12px; left: 50%; transform: translateX(-50%); width: min(620px, 90%); padding: 12px 16px; background: #242629f5; border: .5px solid var(--border-strong); border-radius: 2px; font-size: 13px; color: #fff; box-shadow: 0 8px 20px #0006; pointer-events: none; }
.wv-lock-overlay { position: absolute; inset: 0; background: #000a; z-index: 30; display: grid; place-items: center; padding: 24px; }
.wv-lock-card { background: var(--background); border: .5px solid var(--border-strong); border-radius: 2px; width: min(420px, 100%); padding: 24px; text-align: center; }
.wv-lock-card > button:first-child { float: right; }
.wv-lock-mark { padding: 20px 0 8px; color: var(--accent); }
.wv-lock-mark svg { width: 36px; height: 36px; }
.wv-lock-card h2 { font: 600 23px var(--viewer-font); margin: 14px 0; }
.wv-lock-card p { font-size: 14px; color: var(--secondary); line-height: 1.6; }
.wv-lock-card a { display: block; margin: 20px 0 10px; }
.wv-lock-card > button:last-child { width: 100%; }
.wv-workspace button:disabled { opacity: .45; cursor: wait; }
.wv-workspace [hidden] { display: none !important; }
.wv-workspace .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 768px) {
  .wv-workspace { --ui: 1.18; --menu-width: 320px; --header-height: 24px; --header-font: 11px; --header-control: 28px; }
  .wv-workspace.menu-open .wv-grid,
  .wv-workspace.menu-open .wv-topbar,
  .wv-workspace.menu-open .wv-bottom { width: calc(100% - var(--menu-width)); }
  .wv-workspace #wv-menu-scrim { display: none; }
  .wv-workspace.menu-open #wv-ruler-history { left: calc((100% - var(--menu-width)) / 2); }
}
@media (max-width: 767px) {
  .wv-ruler-control { min-width: 32px; height: 32px; font-size: 12px; }
  .wv-ruler-control svg { width: 13px; height: 13px; }
  .wv-tools button { flex-direction: column; gap: 1px; min-width: 48px; padding: 0 6px; font-size: 9px; }
  .wv-tools button > svg:first-child { width: 17px; height: 17px; }
  .wv-menu-toggle { flex-direction: column; gap: 1px; min-width: 48px; padding: 0 6px !important; font-size: 9px !important; }
  .wv-menu-toggle svg { width: 17px; height: 17px; }
  .wv-mode-picker > summary { gap: 4px; padding: 0 6px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .wv-bottom { min-height: 46px; height: 46px; padding: 2px 8px; gap: 6px; }
  .wv-series { gap: 6px; }
  .wv-workspace .wv-series button,
  .wv-series canvas,
  .wv-workspace .wv-add { width: 38px; height: 38px; }
  .wv-series button[aria-pressed="true"]::before { height: 38px; }
  .wv-series small,
  .wv-add small { display: none; }
  .wv-add::before { inset: 0; }
  .wv-add > svg { margin: 9px; }
}
@media (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  .wv-workspace { --ui: 1; --menu-width: 300px; --header-height: 20px; --header-font: 10px; --header-control: 24px; }
  .wv-workspace.menu-open .wv-grid,
  .wv-workspace.menu-open .wv-topbar,
  .wv-workspace.menu-open .wv-bottom { width: 100%; }
  .wv-workspace #wv-menu-scrim { display: block; }
  .wv-workspace.menu-open #wv-ruler-history { left: 50%; }
  .wv-ruler-control { min-width: 32px; height: 32px; font-size: 12px; }
  .wv-ruler-control svg { width: 13px; height: 13px; }
}
@media (max-width: 640px) {
  .wv-landing { padding-top: 20px; }
  .wv-drop { padding: 16px 14px; }
  .wv-facts { grid-template-columns: 1fr; gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { .wv-spinner { animation: none; } }
