:root {
  --holosuite-vending-bg: var(--hs-bg-deep);
  --holosuite-vending-panel: var(--hs-panel);
  --holosuite-vending-panel-strong: var(--hs-panel-strong);
  --holosuite-vending-field: var(--hs-field);
  --holosuite-vending-line: var(--hs-border-subtle);
  --holosuite-vending-line-strong: var(--hs-border-strong);
  --holosuite-vending-text: var(--hs-text-primary);
  --holosuite-vending-muted: var(--hs-text-secondary);
  --holosuite-vending-cyan: var(--hs-color-primary);
  --holosuite-vending-green: var(--hs-color-success);
  --holosuite-vending-magenta: var(--hs-color-danger);
  --holosuite-vending-amber: var(--hs-color-warning);
}

.holosuite-vending-window {
  color: var(--holosuite-vending-text);
  color-scheme: dark;
  font-family: var(--hs-font-ui);
  letter-spacing: 0;
}

.holosuite-vending-window * {
  box-sizing: border-box;
}

.holosuite-vending-window .window-content {
  padding: 0;
  background: var(--hs-surface-window);
  color: var(--holosuite-vending-text);
}

.holosuite-vending-window button {
  min-height: 32px;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: var(--hs-radius);
  background: var(--hs-surface-control);
  color: var(--holosuite-vending-text);
  cursor: pointer;
  font-family: var(--hs-font-ui);
}

.holosuite-vending-window button:hover,
.holosuite-vending-window button:focus-visible {
  border-color: var(--holosuite-vending-line-strong);
  background: var(--hs-surface-control-hover);
  box-shadow: var(--hs-glow-cyan), var(--hs-shadow-control);
  outline: none;
}

.holosuite-vending-window button:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: 0.55;
}

.holosuite-vending-window input,
.holosuite-vending-window textarea,
.holosuite-vending-window select {
  border: 1px solid var(--hs-border-subtle);
  border-radius: var(--hs-radius);
  background: var(--holosuite-vending-field);
  color: var(--holosuite-vending-text);
}

.holosuite-vending-window select {
  background-color: #07131e !important;
  color: #e7faff !important;
  color-scheme: dark;
}

.holosuite-vending-window select option,
.holosuite-vending-window select optgroup {
  background-color: #07131e !important;
  color: #e7faff !important;
}

.holosuite-vending-window select option:checked {
  background-color: #164756 !important;
  color: #ffffff !important;
}

.holosuite-vending-shell,
.holosuite-vending-manager,
.holosuite-vending-editor,
.holosuite-vending-browser {
  min-height: 100%;
  padding: 14px;
}

.holosuite-vending-shell[data-machine-state="offline"],
.holosuite-vending-machine-row[data-machine-state="offline"] {
  filter: saturate(0.45);
}

.holosuite-vending-shell[data-machine-state="sold-out"] .holosuite-vending-header,
.holosuite-vending-machine-row[data-machine-state="sold-out"] {
  border-color: rgba(255, 209, 102, 0.42);
}

.holosuite-vending-access-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 77, 125, 0.5);
  border-radius: var(--hs-radius);
  background: rgba(70, 8, 28, 0.56);
  color: var(--holosuite-vending-magenta);
}

.holosuite-vending-header {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 124px;
  padding: 14px;
  border-bottom: 1px solid var(--holosuite-vending-line);
  background: rgba(2, 13, 24, 0.72);
}

.holosuite-vending-header img,
.holosuite-vending-machine-row img,
.holosuite-vending-entry-editor > img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: var(--hs-radius);
  background: rgba(0, 0, 0, 0.25);
}

.holosuite-vending-header h2,
.holosuite-vending-toolbar h2,
.holosuite-vending-details h3,
.holosuite-vending-machine-row h3 {
  margin: 0;
  color: var(--holosuite-vending-text);
  letter-spacing: 0;
}

.holosuite-vending-header p,
.holosuite-vending-machine-row p {
  margin: 4px 0;
  color: var(--holosuite-vending-muted);
}

.holosuite-vending-kicker {
  margin: 0;
  color: var(--holosuite-vending-cyan);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.holosuite-vending-actor,
.holosuite-vending-toolbar span,
.holosuite-vending-machine-row span {
  color: var(--holosuite-vending-green);
  font-size: 13px;
}

.holosuite-vending-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  padding: 14px 0 0;
}

.holosuite-vending-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  align-content: start;
  gap: 10px;
}

.holosuite-vending-product {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.holosuite-vending-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.holosuite-vending-product.is-selected {
  border-color: var(--holosuite-vending-green);
  box-shadow: 0 0 18px rgba(98, 255, 182, 0.26);
}

.holosuite-vending-product.is-sold-out img {
  filter: grayscale(1) brightness(0.42);
}

.holosuite-vending-stock,
.holosuite-vending-sold-out,
.holosuite-vending-in-cart {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(2, 13, 24, 0.9);
  color: var(--holosuite-vending-text);
  font-size: 12px;
}

.holosuite-vending-in-cart {
  right: auto;
  left: 6px;
  color: var(--holosuite-vending-green);
}

.holosuite-vending-sold-out {
  inset: auto 6px 30px 6px;
  color: var(--holosuite-vending-magenta);
  text-align: center;
  text-transform: uppercase;
}

.holosuite-vending-details,
.holosuite-vending-editor-main,
.holosuite-vending-inventory-panel,
.holosuite-vending-machine-row,
.holosuite-vending-entry-editor {
  border: 1px solid var(--holosuite-vending-line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--holosuite-vending-panel-strong), var(--holosuite-vending-panel));
  box-shadow: var(--hs-shadow-panel);
}

.holosuite-vending-details {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

.holosuite-vending-detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: 6px;
}

.holosuite-vending-description {
  max-height: 180px;
  overflow: auto;
  color: var(--holosuite-vending-muted);
}

.holosuite-vending-details dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.holosuite-vending-details dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.holosuite-vending-details dt {
  color: var(--holosuite-vending-muted);
}

.holosuite-vending-details dd {
  margin: 0;
  color: var(--holosuite-vending-amber);
}

.holosuite-vending-toolbar,
.holosuite-vending-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.holosuite-vending-toolbar-actions,
.holosuite-vending-cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.holosuite-vending-machine-list,
.holosuite-vending-drop-zone {
  display: grid;
  gap: 10px;
}

.holosuite-vending-credit-transformer {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--holosuite-vending-line);
  background: color-mix(in srgb, var(--hs-surface-control) 82%, transparent);
  cursor: pointer;
}

.holosuite-vending-credit-transformer-row {
  position: relative;
}

.holosuite-vending-credit-transformer-row > .holosuite-vending-credit-transformer {
  padding-right: 42px;
}

.holosuite-vending-credit-transformer-row > .hsv-field-info {
  position: absolute;
  top: 15px;
  right: 15px;
}

.holosuite-vending-credit-transformer input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--holosuite-vending-green);
}

.holosuite-vending-credit-transformer span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.holosuite-vending-credit-transformer strong {
  color: var(--holosuite-vending-text);
  font-size: 13px;
}

.holosuite-vending-credit-transformer small {
  color: var(--holosuite-vending-muted);
  font-size: 11px;
}

.holosuite-vending-machine-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.holosuite-vending-machine-row menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}

.holosuite-vending-machine-row > div > small,
.holosuite-vending-browser .holosuite-vending-machine-row small {
  display: block;
  margin-top: 4px;
  color: var(--holosuite-vending-muted);
}

.hsv-machine-more-actions {
  position: relative;
  grid-column: 1 / -1;
}

.holosuite-vending-machine-row menu > button[data-action="toggle-machine"] {
  grid-column: 1 / -1;
}

.hsv-machine-more-actions summary {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: var(--hs-radius);
  background: var(--hs-surface-control);
  cursor: pointer;
  list-style: none;
  text-align: center;
}

.hsv-machine-more-actions summary::-webkit-details-marker { display: none; }

.hsv-machine-more-actions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.holosuite-vending-window .hsv-danger-action {
  border-color: color-mix(in srgb, var(--hs-color-danger) 55%, var(--holosuite-vending-line));
  color: var(--hs-color-danger);
}

.holosuite-vending-machine-row menu button {
  white-space: nowrap;
}

.holosuite-vending-machine-row menu .holosuite-vending-open-test {
  border-color: color-mix(in srgb, var(--holosuite-vending-green) 68%, var(--holosuite-vending-line));
  background: color-mix(in srgb, var(--holosuite-vending-green) 12%, var(--hs-surface-control));
  color: var(--holosuite-vending-green);
  font-weight: 700;
}

.holosuite-vending-editor {
  display: grid;
  gap: 12px;
}

/* Foundry v12 applies its dark-text form label color directly to labels and
   may suppress scrolling on window-content. Keep the editor self-contained
   and explicit so the same form works in v12 through v14. */
.holosuite-vending-editor-app .window-content,
.window-content.holosuite-vending-editor-app {
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.holosuite-vending-editor {
  height: 100%;
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.holosuite-vending-editor label,
.holosuite-vending-editor .form-group > label,
.holosuite-vending-editor .hsv-editor-display-art > span {
  color: var(--holosuite-vending-text, #e7faff) !important;
}

.holosuite-vending-window .hsv-field-info {
  margin-left: 4px;
  color: var(--holosuite-vending-muted, #89a8b5);
  font-size: 10px;
  cursor: help;
  transition: color 120ms ease, text-shadow 120ms ease;
}

.holosuite-vending-window .hsv-field-info:hover,
.holosuite-vending-window .hsv-field-info:focus-visible {
  color: var(--hs-color-primary, #69e8ff);
  text-shadow: 0 0 7px color-mix(in srgb, var(--hs-color-primary, #69e8ff) 58%, transparent);
  outline: none;
}

.holosuite-vending-editor-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}

.hsv-editor-group {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: 6px;
  background: rgba(0, 7, 11, 0.25);
}

.hsv-editor-group > legend {
  padding: 0 7px;
  color: var(--holosuite-vending-cyan);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hsv-editor-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hsv-editor-group-grid .stacked { grid-column: 1 / -1; }

.hsv-style-preview {
  display: grid;
  grid-column: 1 / -1;
  grid-template-rows: 38px 76px 24px;
  gap: 5px;
  padding: 8px;
  border: 2px solid #344b5b;
  background: linear-gradient(145deg, #202a31, #070c0f 35% 75%, #24323a);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.hsv-style-preview-header {
  display: grid;
  grid-template-columns: 130px 1fr 28px;
  gap: 9px;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #405865;
  background: #07131a;
}

.hsv-style-preview-header span { color: var(--hs-color-primary); font-family: var(--hs-font-mono); font-size: 9px; text-transform: uppercase; }
.hsv-style-preview-header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsv-style-preview-header i { width: 8px; height: 8px; border-radius: 50%; background: var(--hs-color-success); box-shadow: 0 0 6px var(--hs-color-success); }
.hsv-style-preview-body { display: grid; grid-template-columns: repeat(3, 1fr) 1.5fr; gap: 5px; }
.hsv-style-preview-body i,
.hsv-style-preview-body b { border: 1px solid #344a55; background: linear-gradient(180deg, #10212a, #030709); }
.hsv-style-preview-tray { border: 1px solid #344a55; background: #020608; }

.hsv-style-preview[data-machine-style="corporate-kiosk"] {
  padding: 10px;
  border-width: 1px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1b2b33, #09151b);
  clip-path: none;
}
.hsv-style-preview[data-machine-style="corporate-kiosk"] .hsv-style-preview-header,
.hsv-style-preview[data-machine-style="corporate-kiosk"] .hsv-style-preview-body i,
.hsv-style-preview[data-machine-style="corporate-kiosk"] .hsv-style-preview-body b,
.hsv-style-preview[data-machine-style="corporate-kiosk"] .hsv-style-preview-tray { border-radius: 9px; }

.hsv-style-preview[data-machine-style="corporate-kiosk-white"] {
  padding: 10px;
  border: 1px solid #9f9688;
  border-radius: 18px;
  background: linear-gradient(145deg, #f8f3e9, #d8d0c2);
  color: #3c352d;
  clip-path: none;
}

.hsv-style-preview[data-machine-style="corporate-kiosk-white"] .hsv-style-preview-header,
.hsv-style-preview[data-machine-style="corporate-kiosk-white"] .hsv-style-preview-body i,
.hsv-style-preview[data-machine-style="corporate-kiosk-white"] .hsv-style-preview-body b,
.hsv-style-preview[data-machine-style="corporate-kiosk-white"] .hsv-style-preview-tray {
  border-color: #aaa092;
  border-radius: 9px;
  background: linear-gradient(180deg, #fcf8ef, #e4dccf);
}

.hsv-style-preview[data-machine-style="corporate-kiosk-white"] .hsv-style-preview-header span {
  color: #a35e3d;
}

.hsv-style-preview[data-machine-style="neon"] {
  border-color: #8e28b9;
  background:
    radial-gradient(circle at 82% 18%, rgba(117, 55, 255, 0.26), transparent 38%),
    linear-gradient(145deg, #180b27, #050208 72%);
  color: #fff1fc;
  box-shadow: inset 0 0 0 2px #050208, 0 0 14px rgba(255, 38, 198, 0.24);
}

.hsv-style-preview[data-machine-style="neon"] .hsv-style-preview-header,
.hsv-style-preview[data-machine-style="neon"] .hsv-style-preview-body i,
.hsv-style-preview[data-machine-style="neon"] .hsv-style-preview-body b,
.hsv-style-preview[data-machine-style="neon"] .hsv-style-preview-tray {
  border-color: #ff2bc7;
  background: linear-gradient(180deg, #1d0d2c, #050208);
  box-shadow: inset 0 0 8px rgba(255, 43, 199, 0.16), 0 0 6px rgba(255, 43, 199, 0.2);
}

.hsv-style-preview[data-machine-style="neon"] .hsv-style-preview-header span {
  color: #ff39cf;
  text-shadow: 0 0 6px rgba(255, 43, 199, 0.65);
}

.hsv-style-preview[data-machine-style="neon"] .hsv-style-preview-header i {
  background: #ff2bc7;
  box-shadow: 0 0 8px #ff2bc7;
}

.holosuite-vending-editor-main .stacked {
  grid-column: 1 / -1;
}

.holosuite-vending-editor .form-group {
  display: grid;
  gap: 4px;
}

.holosuite-vending-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
}

.holosuite-vending-path-row button {
  min-width: 38px;
  padding: 0;
}

.holosuite-vending-inventory-panel {
  padding: 12px;
}

.holosuite-vending-drop-zone {
  min-height: 180px;
  padding: 8px;
  border: 1px dashed var(--hs-border-subtle);
  border-radius: 6px;
}

.holosuite-vending-drop-zone.is-full {
  border-style: solid;
  border-color: color-mix(in srgb, var(--hs-color-warning) 48%, var(--hs-border-subtle));
}

.hsv-inventory-overflow-warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--hs-color-warning) 58%, var(--holosuite-vending-line));
  background: color-mix(in srgb, var(--hs-color-warning) 9%, transparent);
  color: var(--hs-color-warning);
  font-size: 12px;
}

.hsv-inventory-overflow-warning > div { display: flex; gap: 6px; }

.holosuite-vending-entry-editor {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 148px;
  gap: 10px;
  padding: 10px;
}

.holosuite-vending-entry-editor[draggable="true"] { cursor: grab; }
.holosuite-vending-entry-editor[draggable="true"]:active { cursor: grabbing; }

.hsv-entry-art {
  position: relative;
}

.hsv-entry-art img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--holosuite-vending-line);
  background: rgba(0, 0, 0, 0.32);
}

.hsv-entry-slot {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  background: rgba(1, 8, 12, 0.9);
  color: var(--hs-color-primary);
  font-family: var(--hs-font-mono);
  font-size: 10px;
}

.hsv-entry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hsv-drag-handle { color: var(--holosuite-vending-muted); font-size: 11px; }
.hsv-entry-heading > div { display: flex; gap: 4px; }
.holosuite-vending-window .hsv-entry-heading button { width: 28px; min-width: 28px; min-height: 26px; padding: 0; }
.holosuite-vending-window .hsv-remove-product { color: var(--hs-color-danger); }

.holosuite-vending-form-footer {
  position: sticky;
  z-index: 5;
  bottom: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--holosuite-vending-line);
  background: rgba(4, 13, 19, 0.97);
}

.holosuite-vending-form-footer > div { display: flex; gap: 8px; }
.hsv-editor-save-state { color: var(--holosuite-vending-muted); font-size: 12px; }
.holosuite-vending-window .hsv-save-test { border-color: color-mix(in srgb, var(--hs-color-success) 60%, var(--holosuite-vending-line)); color: var(--hs-color-success); }

.holosuite-vending-entry-fields,
.holosuite-vending-entry-numbers {
  display: grid;
  gap: 8px;
}

.holosuite-vending-entry-numbers label {
  display: grid;
  gap: 3px;
  color: var(--holosuite-vending-muted);
}

.holosuite-vending-checkbox {
  align-content: end;
}

.holosuite-vending-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.holosuite-vending-checkbox input {
  width: auto;
}

.holosuite-vending-region-links {
  min-width: 0;
  padding: 10px;
  border: 1px dashed var(--hs-border-subtle);
  border-radius: var(--hs-radius);
}

.holosuite-vending-region-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.holosuite-vending-region-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: var(--hs-radius);
  background: rgba(0, 8, 12, 0.34);
  color: var(--holosuite-vending-muted);
  cursor: pointer;
}

.holosuite-vending-region-choice input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--holosuite-vending-green);
}

.holosuite-vending-window .holosuite-vending-editor .holosuite-vending-region-choice > span {
  min-width: 0;
  color: var(--holosuite-vending-text, #e7faff) !important;
  overflow-wrap: anywhere;
}

.holosuite-vending-region-choice:hover {
  border-color: var(--holosuite-vending-line-strong);
  color: var(--holosuite-vending-text);
}

.holosuite-vending-region-choice.is-selected,
.holosuite-vending-region-choice:has(input:checked) {
  border-color: var(--holosuite-vending-green);
  background:
    linear-gradient(180deg, rgba(98, 255, 182, 0.18), rgba(13, 62, 54, 0.46)),
    rgba(0, 8, 12, 0.5);
  color: #f4fff9;
  box-shadow:
    inset 0 0 0 1px rgba(244, 255, 249, 0.08),
    0 0 14px rgba(98, 255, 182, 0.14);
}

.holosuite-vending-window .holosuite-vending-editor .holosuite-vending-region-choice.is-selected > span,
.holosuite-vending-window .holosuite-vending-editor .holosuite-vending-region-choice:has(input:checked) > span {
  color: #f4fff9 !important;
}

.holosuite-vending-region-links small {
  color: var(--holosuite-vending-muted);
}

.holosuite-vending-region-prompt {
  display: grid;
  gap: 8px;
  padding: 12px;
  text-align: center;
}

.holosuite-vending-region-prompt h3 {
  margin: 0;
}

.holosuite-vending-quantity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.holosuite-vending-quantity-row label {
  display: grid;
  gap: 3px;
  color: var(--holosuite-vending-muted);
}

.holosuite-vending-cart {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--holosuite-vending-line);
}

.holosuite-vending-cart > header,
.holosuite-vending-cart > footer,
.holosuite-vending-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.holosuite-vending-cart > header,
.holosuite-vending-cart > footer {
  display: flex;
  justify-content: space-between;
}

.holosuite-vending-cart-line {
  padding: 6px;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: var(--hs-radius);
}

.holosuite-vending-cart-line button {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
}

.holosuite-vending-ledger {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--holosuite-vending-line);
  border-radius: var(--hs-radius);
  background: var(--holosuite-vending-panel);
}

.holosuite-vending-ledger-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.holosuite-vending-ledger-row {
  display: grid;
  grid-template-columns: 150px 140px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-left: 3px solid var(--holosuite-vending-green);
  background: rgba(0, 0, 0, 0.2);
}

.holosuite-vending-ledger-row.is-failed {
  border-left-color: var(--holosuite-vending-magenta);
}

.holosuite-vending-ledger-row small {
  grid-column: 2 / -1;
  color: var(--holosuite-vending-magenta);
}

.holosuite-vending-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--holosuite-vending-line);
  border-radius: 6px;
  color: var(--holosuite-vending-muted);
  text-align: center;
}

body.holosuite-vending-placement-active {
  cursor: crosshair;
}

@media (max-width: 760px) {
  .holosuite-vending-layout,
  .holosuite-vending-machine-row,
  .holosuite-vending-entry-editor,
  .holosuite-vending-editor-main,
  .holosuite-vending-ledger-row {
    grid-template-columns: 1fr;
  }

  .hsv-editor-group-grid {
    grid-template-columns: 1fr;
  }

  .holosuite-vending-header {
    grid-template-columns: 72px 1fr;
  }
}

/* Player-facing physical machine. Asset URLs are the only paths that need to
   change when final Photoshop/vector exports replace the bundled placeholders. */
.holosuite-vending-app {
  --hsv-asset-shell: url("../assets/vendor/machine-frame.svg");
  --hsv-asset-header: url("../assets/vendor/machine-header-frame.svg");
  --hsv-asset-slot: url("../assets/vendor/slot-frame.svg");
  --hsv-asset-slot-sold-out: none;
  --hsv-asset-slot-empty: url("../assets/vendor/slot-frame.svg");
  --hsv-asset-terminal: url("../assets/vendor/terminal-frame.svg");
  --hsv-asset-product-display: url("../assets/vendor/product-display-frame.svg");
  --hsv-asset-tray: url("../assets/vendor/retrieval-bay.svg");
  --hsv-asset-warning: url("../assets/vendor/warning-plate.svg");
  --hsv-asset-mascot: url("../assets/vendor/mascot-plate.svg");
  --hsv-asset-vent: none;
  --hsv-asset-service-panel: none;
  --hsv-asset-conduit: url("../assets/vendor/conduit.svg");
  --hsv-chassis: color-mix(in srgb, var(--hs-panel-strong) 82%, #243746);
  --hsv-screen: color-mix(in srgb, var(--hs-bg-deep) 88%, var(--hs-color-primary));
  container: hsv-window / inline-size;
}

.window-app.holosuite-vending-app,
.application.holosuite-vending-app,
.app.holosuite-vending-app {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

.holosuite-vending-app .window-header,
.holosuite-vending-app .window-resizable-handle {
  display: none !important;
}

.holosuite-vending-app .window-content,
.window-content.holosuite-vending-app {
  height: auto !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  container: hsv-window / inline-size;
}

.hsv-machine {
  position: relative;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  color: var(--hs-text-primary);
  font-family: var(--hs-font-ui);
}

.hsv-is-dragging .hsv-machine,
.hsv-is-dragging .hsv-machine *,
.hsv-is-dragging .hsv-machine::before,
.hsv-is-dragging .hsv-machine::after,
.hsv-is-dragging .hsv-machine *::before,
.hsv-is-dragging .hsv-machine *::after {
  animation-play-state: paused !important;
}

.hsv-machine::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  content: "";
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.08) 3px 4px);
  opacity: 0.4;
}

.hsv-machine-chassis {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  min-width: 0;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--hs-border-strong) 75%, transparent);
  background-color: color-mix(in srgb, var(--hs-bg-deep) 88%, transparent);
  background-image: var(--hsv-asset-shell);
  background-position: center;
  background-size: 100% 100%;
  box-shadow: var(--hs-shadow-panel), inset 0 0 70px rgba(0, 0, 0, 0.62);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.hsv-eyebrow,
.hsv-status-module span,
.hsv-section-header span,
.hsv-terminal-header span,
.hsv-retrieval-bay span {
  font-family: var(--hs-font-mono);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hsv-status-module {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.35fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: stretch;
  min-height: 132px;
  padding: 17px 58px 17px 20px;
  background-color: rgba(2, 11, 18, 0.8);
  background-image: var(--hsv-asset-header);
  background-size: 100% 100%;
  box-shadow: inset 0 -12px 25px rgba(0, 0, 0, 0.34);
  cursor: move;
  touch-action: none;
  user-select: none;
}

.holosuite-vending-app .hsv-machine-close {
  position: absolute;
  z-index: 8;
  top: 13px;
  right: 14px;
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--hs-color-danger) 65%, var(--hs-border-subtle));
  border-radius: 0;
  background: color-mix(in srgb, var(--hs-color-danger) 12%, var(--hs-field));
  color: var(--hs-color-danger);
  cursor: pointer;
  place-items: center;
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--hs-color-danger) 12%, transparent);
}

.holosuite-vending-app .hsv-machine-close:hover,
.holosuite-vending-app .hsv-machine-close:focus-visible {
  border-color: var(--hs-color-danger);
  background: color-mix(in srgb, var(--hs-color-danger) 22%, var(--hs-field));
  color: var(--hs-text-primary);
  box-shadow: 0 0 12px color-mix(in srgb, var(--hs-color-danger) 38%, transparent);
}

.hsv-brand-block {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-right: 14px;
  border-right: 1px solid var(--hs-border-subtle);
}

.hsv-brand-block img {
  width: 58px;
  height: 58px;
  border: 1px solid var(--hs-border-strong);
  border-radius: 50%;
  object-fit: cover;
  background: var(--hs-field);
  box-shadow: var(--hs-glow-cyan);
}

.hsv-brand-block strong,
.hsv-identity-block h2,
.hsv-section-header strong,
.hsv-terminal-header strong,
.hsv-retrieval-label strong {
  display: block;
  color: var(--hs-text-primary);
  font-family: var(--hs-font-ui);
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.hsv-brand-block .hsv-eyebrow,
.hsv-identity-block .hsv-eyebrow,
.hsv-section-header span,
.hsv-terminal-header span,
.hsv-retrieval-label span {
  color: var(--hs-color-primary);
}

.hsv-identity-block {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0 3px;
  padding-right: 14px;
  border-right: 1px solid var(--hs-border-subtle);
}

.hsv-identity-block h2 {
  margin: 3px 0 2px;
  overflow: hidden;
  font-size: 21px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hsv-identity-block p {
  display: -webkit-box;
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--hs-text-secondary);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hsv-telemetry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  align-content: center;
  min-width: 0;
}

.hsv-telemetry > div {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 7px;
  border-left: 2px solid color-mix(in srgb, var(--hs-color-primary) 55%, transparent);
  background: color-mix(in srgb, var(--hs-field) 74%, transparent);
}

.hsv-telemetry > div:nth-child(3) {
  grid-column: 1 / -1;
}

.hsv-telemetry span {
  overflow: hidden;
  color: var(--hs-text-tertiary);
  text-overflow: ellipsis;
}

.hsv-telemetry strong {
  overflow: hidden;
  color: var(--hs-color-success);
  font-family: var(--hs-font-mono);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hsv-state-readout i,
.hsv-retrieval-status i,
.hsv-slot-code i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--hs-color-success);
  box-shadow: 0 0 7px currentColor;
}

.hsv-access-warning {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0;
  border-radius: 0;
  font-family: var(--hs-font-mono);
  font-size: 11px;
}

.hsv-access-warning span {
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hsv-machine-deck {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(310px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.hsv-product-chamber {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--hs-border-subtle);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.035), transparent 18% 82%, rgba(255, 255, 255, 0.028)),
    color-mix(in srgb, var(--hsv-chassis) 70%, transparent);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.62), var(--hs-shadow-panel);
}

.hsv-section-header,
.hsv-terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 5px 8px 10px;
  border-bottom: 1px solid var(--hs-border-subtle);
}

.hsv-section-header small {
  color: var(--hs-color-success);
  font-family: var(--hs-font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.hsv-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding-top: 10px;
}

.holosuite-vending-app .hsv-product-slot {
  position: relative;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr) 70px;
  aspect-ratio: 0.82;
  min-width: 0;
  min-height: 0;
  padding: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background-color: rgba(1, 6, 10, 0.75);
  background-image: var(--hsv-asset-slot);
  background-size: 100% 100%;
  color: var(--hs-text-primary);
  text-align: left;
  box-shadow: none;
  isolation: isolate;
}

.holosuite-vending-app button.hsv-product-slot:hover,
.holosuite-vending-app button.hsv-product-slot:focus-visible {
  z-index: 2;
  border: 0;
  background-color: color-mix(in srgb, var(--hs-color-primary) 8%, #01060a);
  box-shadow: 0 0 0 1px var(--hs-color-primary), var(--hs-glow-cyan);
  transform: translateY(-1px);
}

.holosuite-vending-app .hsv-product-slot.is-selected {
  background-color: color-mix(in srgb, var(--hs-color-success) 10%, #01060a);
  box-shadow: 0 0 0 2px var(--hs-color-success), 0 0 20px color-mix(in srgb, var(--hs-color-success) 34%, transparent);
}

.holosuite-vending-app .hsv-product-slot.is-empty {
  background-image: var(--hsv-asset-slot-empty);
  color: var(--hs-text-tertiary);
}

.holosuite-vending-app .hsv-product-slot.is-sold-out {
  background-image: var(--hsv-asset-slot-sold-out), var(--hsv-asset-slot);
}

.holosuite-vending-app .hsv-product-slot.is-sold-out .hsv-slot-viewport img {
  filter: grayscale(1) brightness(0.28) contrast(1.2);
}

.holosuite-vending-app .hsv-product-slot.is-unaffordable:not(.is-sold-out) .hsv-slot-footer > .hsv-slot-price {
  color: var(--hs-color-danger);
}

.holosuite-vending-app .hsv-product-slot.is-unaffordable:not(.is-sold-out) .hsv-slot-footer > .hsv-slot-price::before {
  content: "INSUFFICIENT · ";
  font-size: 7px;
}

.hsv-slot-code {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  color: var(--hs-color-primary);
  font-family: var(--hs-font-mono);
  font-size: 12px;
  letter-spacing: 0.13em;
  border-bottom: 1px solid color-mix(in srgb, var(--hs-border-subtle) 72%, transparent);
}

.hsv-slot-code i {
  margin: 0;
}

.is-sold-out .hsv-slot-code i {
  background: var(--hs-color-danger);
}

.is-empty .hsv-slot-code i {
  background: var(--hs-text-tertiary);
  box-shadow: none;
}

.hsv-slot-viewport {
  position: relative;
  display: grid;
  min-height: 0;
  margin: 0 6px;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle, color-mix(in srgb, var(--hs-color-primary) 12%, transparent), transparent 66%),
    rgba(0, 0, 0, 0.28);
  border-right: 1px solid color-mix(in srgb, var(--hs-border-subtle) 45%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--hs-border-subtle) 45%, transparent);
}

.hsv-slot-viewport::after,
.hsv-preview-image::after {
  position: absolute;
  inset: auto 7% 4px;
  height: 2px;
  content: "";
  background: var(--hs-color-primary);
  box-shadow: 0 0 9px var(--hs-color-primary);
  opacity: 0.45;
}

.hsv-slot-viewport > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 120ms ease, filter 120ms ease;
}

button.hsv-product-slot:hover .hsv-slot-viewport > img {
  transform: scale(1.035);
}

.is-empty .hsv-slot-viewport {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 9px;
}

.is-empty .hsv-slot-viewport > i {
  font-size: 24px;
  opacity: 0.25;
}

.hsv-slot-footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  align-content: center;
  min-width: 0;
  padding: 7px 8px 3px;
  border-top: 1px solid color-mix(in srgb, var(--hs-border-subtle) 72%, transparent);
}

.hsv-slot-footer > strong {
  overflow: hidden;
  font-size: 11px;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hsv-slot-footer > span {
  color: var(--hs-color-warning);
  font-family: var(--hs-font-mono);
  font-size: 9px;
  white-space: nowrap;
}

.hsv-slot-footer > small {
  grid-column: 1 / -1;
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.hsv-sold-out-overlay {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  background: rgba(40, 0, 12, 0.34);
  color: var(--hs-color-danger);
  font-family: var(--hs-font-mono);
  text-shadow: 0 0 8px currentColor;
}

.hsv-sold-out-overlay i {
  font-size: 22px;
}

.hsv-queued-badge {
  position: absolute;
  z-index: 4;
  right: 5px;
  bottom: 6px;
  padding: 3px 5px;
  border: 1px solid color-mix(in srgb, var(--hs-color-success) 55%, transparent);
  background: rgba(1, 14, 14, 0.92);
  color: var(--hs-color-success);
  font-family: var(--hs-font-mono);
  font-size: 8px;
}

.hsv-control-terminal {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 17px;
  background-color: rgba(2, 10, 17, 0.84);
  background-image: var(--hsv-asset-terminal);
  background-size: 100% 100%;
  box-shadow: var(--hs-shadow-panel), inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.hsv-terminal-header {
  padding: 2px 3px 11px;
}

.hsv-terminal-header > i {
  color: var(--hs-color-primary);
  text-shadow: 0 0 8px currentColor;
}

.hsv-product-preview {
  display: grid;
  gap: 6px;
  padding: 13px 2px 10px;
}

.hsv-preview-code {
  color: var(--hs-color-primary);
  font-family: var(--hs-font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.hsv-preview-image {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1.28;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--hs-border-subtle);
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--hs-color-primary) 16%, transparent), transparent 65%),
    rgba(0, 0, 0, 0.3);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.48);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.hsv-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hsv-product-preview h3,
.hsv-dispense-queue h3 {
  margin: 0;
  color: var(--hs-text-primary);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hsv-product-description {
  display: -webkit-box;
  max-height: 58px;
  overflow: hidden;
  color: var(--hs-text-secondary);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.hsv-product-description > :first-child {
  margin-top: 0;
}

.hsv-product-description > :last-child {
  margin-bottom: 0;
}

.hsv-product-readout {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--hs-border-subtle);
  border-bottom: 1px solid var(--hs-border-subtle);
}

.hsv-product-readout > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 5px;
}

.hsv-product-readout dt {
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.hsv-product-readout dd {
  margin: 0;
  color: var(--hs-color-warning);
  font-family: var(--hs-font-mono);
  font-size: 10px;
}

.hsv-quantity-control {
  display: grid;
  grid-template-columns: 60px 54px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 10px 0;
}

.hsv-quantity-control label {
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.holosuite-vending-app .hsv-quantity-control input {
  width: 54px;
  height: 32px;
  padding: 4px;
  text-align: center;
}

.holosuite-vending-app .hsv-quantity-control button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 7px;
  color: var(--hs-color-primary);
  font-size: 10px;
  text-transform: uppercase;
}

.hsv-terminal-empty {
  display: grid;
  min-height: 280px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 10px;
}

.hsv-terminal-empty i {
  font-size: 32px;
  opacity: 0.32;
}

.hsv-dispense-queue {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--hs-border-subtle);
}

.hsv-dispense-queue > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hsv-dispense-queue > header span {
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 8px;
  text-transform: uppercase;
}

.hsv-dispense-queue > header > strong {
  display: grid;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hs-border-strong);
  color: var(--hs-color-success);
  font-family: var(--hs-font-mono);
  font-size: 11px;
  place-items: center;
}

.hsv-queue-lines {
  display: grid;
  gap: 4px;
  min-height: 52px;
  max-height: 116px;
  overflow: auto;
}

.hsv-queue-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 25px;
  gap: 5px;
  align-items: center;
  padding: 4px 5px;
  border-left: 2px solid var(--hs-color-primary);
  background: rgba(0, 0, 0, 0.22);
  font-size: 10px;
}

.hsv-queue-line > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hsv-queue-line b {
  color: var(--hs-color-success);
  font-family: var(--hs-font-mono);
}

.hsv-queue-line > strong {
  color: var(--hs-color-warning);
  font-family: var(--hs-font-mono);
}

.holosuite-vending-app .hsv-queue-line button {
  min-width: 25px;
  min-height: 25px;
  padding: 0;
  border-radius: 0;
  color: var(--hs-color-danger);
}

.hsv-queue-empty {
  margin: 0;
  padding: 17px;
  border: 1px dashed var(--hs-border-subtle);
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 9px;
  text-align: center;
}

.hsv-queue-total {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--hs-border-subtle);
}

.hsv-queue-total span {
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.hsv-queue-total strong {
  color: var(--hs-color-warning);
  font-family: var(--hs-font-mono);
  font-size: 15px;
}

.hsv-funds-warning {
  margin: 0;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--hs-color-danger) 55%, transparent);
  background: color-mix(in srgb, var(--hs-color-danger) 12%, transparent);
  color: var(--hs-color-danger);
  font-family: var(--hs-font-mono);
  font-size: 9px;
  text-align: center;
}

.hsv-terminal-actions {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 6px;
}

.holosuite-vending-app .hsv-terminal-actions button {
  border-radius: 0;
  font-size: 10px;
  text-transform: uppercase;
}

.holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-color: color-mix(in srgb, var(--hs-color-success) 75%, transparent);
  background: color-mix(in srgb, var(--hs-color-success) 14%, var(--hs-surface-control));
  color: var(--hs-color-success);
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 12px color-mix(in srgb, var(--hs-color-success) 10%, transparent);
}

.holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button:hover {
  box-shadow: 0 0 14px color-mix(in srgb, var(--hs-color-success) 35%, transparent);
}

.hsv-retrieval-bay {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 100px;
  gap: 14px;
  align-items: center;
  min-height: 116px;
  padding: 17px 27px;
  background-color: rgba(2, 8, 13, 0.82);
  background-image: var(--hsv-asset-tray);
  background-size: 100% 100%;
}

.hsv-tray-cavity {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.8);
  background: rgba(0, 0, 0, 0.58);
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 10px;
  text-align: center;
  box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.8);
}

.hsv-tray-cavity > i,
.hsv-tray-cavity > strong {
  position: relative;
  z-index: 2;
}

.hsv-tray-cavity > i {
  font-size: 18px;
}

.hsv-tray-scanline {
  position: absolute;
  inset: 8px 12%;
  border-top: 1px solid var(--hs-color-primary);
  border-bottom: 1px solid var(--hs-color-primary);
  opacity: 0.18;
}

.hsv-retrieval-status {
  color: var(--hs-text-tertiary);
  text-align: right;
}

.hsv-retrieval-status i {
  background: var(--hs-text-tertiary);
  box-shadow: none;
}

.hsv-machine[data-retrieval-state="processing"] .hsv-tray-cavity,
.hsv-machine[data-retrieval-state="processing"] .hsv-retrieval-status {
  color: var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="processing"] .hsv-retrieval-status i {
  background: var(--hs-color-warning);
  box-shadow: 0 0 7px var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="ready"] .hsv-tray-cavity,
.hsv-machine[data-retrieval-state="ready"] .hsv-retrieval-status {
  color: var(--hs-color-success);
}

.hsv-machine[data-retrieval-state="ready"] .hsv-tray-cavity {
  border-color: color-mix(in srgb, var(--hs-color-success) 55%, transparent);
  box-shadow: inset 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 12px color-mix(in srgb, var(--hs-color-success) 30%, transparent);
}

.hsv-machine[data-retrieval-state="ready"] .hsv-retrieval-status i {
  background: var(--hs-color-success);
  box-shadow: 0 0 7px var(--hs-color-success);
}

.hsv-machine[data-machine-state="offline"] .hsv-state-readout,
.hsv-machine[data-machine-state="offline"] .hsv-terminal-header > i {
  color: var(--hs-color-danger);
}

.hsv-machine[data-machine-state="offline"] .hsv-state-readout i {
  background: var(--hs-color-danger);
}

.hsv-machine[data-machine-state="offline"] .hsv-product-chamber,
.hsv-machine[data-machine-state="offline"] .hsv-control-terminal {
  filter: saturate(0.35) brightness(0.72);
}

.hsv-machine[data-machine-state="sold-out"] .hsv-state-readout,
.hsv-machine[data-machine-state="sold-out"] .hsv-terminal-header > i {
  color: var(--hs-color-warning);
}

.hsv-machine[data-machine-state="sold-out"] .hsv-state-readout i {
  background: var(--hs-color-warning);
}

@container hsv-window (max-width: 960px) {
  .hsv-status-module {
    grid-template-columns: minmax(160px, 0.7fr) minmax(240px, 1.3fr);
  }

  .hsv-identity-block {
    border-right: 0;
  }

  .hsv-telemetry {
    grid-column: 1 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .hsv-telemetry > div,
  .hsv-telemetry > div:nth-child(3) {
    grid-column: auto;
    display: grid;
  }

  .hsv-telemetry strong {
    text-align: left;
  }

  .hsv-machine-deck {
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.9fr);
  }
}

@container hsv-window (max-width: 820px) {

  .hsv-machine-deck {
    grid-template-columns: 1fr;
  }

  .hsv-control-terminal {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    gap: 0 14px;
  }

  .hsv-terminal-header {
    grid-column: 1 / -1;
  }

  .hsv-product-preview,
  .hsv-product-readout,
  .hsv-quantity-control {
    grid-column: 1;
  }

  .hsv-dispense-queue {
    grid-column: 2;
    grid-row: 2 / span 3;
    border-top: 0;
    border-left: 1px solid var(--hs-border-subtle);
    padding-left: 14px;
  }
}

@container hsv-window (max-width: 580px) {
  .hsv-machine {
    padding: 6px;
  }

  .hsv-machine-chassis {
    padding: 14px;
  }

  .hsv-status-module {
    grid-template-columns: 1fr;
  }

  .hsv-brand-block {
    display: none;
  }

  .hsv-telemetry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hsv-slot-grid {
    gap: 6px;
  }

  .hsv-control-terminal {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hsv-product-preview,
  .hsv-product-readout,
  .hsv-quantity-control,
  .hsv-dispense-queue {
    grid-column: 1;
    grid-row: auto;
  }

  .hsv-dispense-queue {
    border-top: 1px solid var(--hs-border-subtle);
    border-left: 0;
    padding-left: 0;
  }

  .hsv-retrieval-bay {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .hsv-retrieval-label,
  .hsv-retrieval-status {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hsv-product-slot,
  .hsv-product-slot img {
    transition: none;
  }
}

/* Keep the desktop machine at the shell artwork's fixed 1600:1400 frame.
   Product metadata and source-image proportions must never resize the app. */
@container hsv-window (min-width: 821px) {
  .hsv-machine-chassis {
    grid-template-rows: 128px minmax(0, 1fr) 136px;
    aspect-ratio: 8 / 7;
    overflow: hidden;
  }

  .hsv-machine-deck {
    min-height: 0;
    height: 100%;
    align-items: stretch;
  }

  .hsv-product-chamber,
  .hsv-control-terminal {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .hsv-slot-grid {
    height: 100%;
    max-height: none;
    overflow-y: auto;
  }

  .hsv-control-terminal {
    overflow-y: auto;
  }
}

/* Production artwork contrast: the blue raster panels need a brighter local
   label palette than the dark slot chamber, without flattening state colors. */
.hsv-status-module,
.hsv-control-terminal {
  --hs-text-secondary: #f2f8ff;
  --hs-text-tertiary: #d9edfb;
  --hsv-steel: #bfe6fb;
}

.hsv-retrieval-bay {
  --hs-text-secondary: #e8f5ff;
  --hs-text-tertiary: #b9d9ed;
  --hsv-steel: #b7ddf3;
}

.hsv-status-module span,
.hsv-control-terminal label,
.hsv-control-terminal dt,
.hsv-control-terminal .hsv-dispense-queue > header span,
.hsv-control-terminal .hsv-queue-empty,
.hsv-retrieval-bay span,
.hsv-retrieval-bay small {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button:disabled {
  border-color: #547897;
  background: linear-gradient(180deg, #315778, #183650);
  color: #dceeff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  opacity: 0.84;
}

/* Foundry's global button layout centers button children. Product slots are
   grid buttons, so explicitly stretch their single column and every structural
   child to keep cavities and label plates identical across source artwork. */
.holosuite-vending-app .hsv-product-slot {
  grid-template-columns: minmax(0, 1fr);
  align-content: stretch;
  align-items: stretch;
  justify-content: stretch;
  justify-items: stretch;
}

.holosuite-vending-app .hsv-product-slot > .hsv-slot-code,
.holosuite-vending-app .hsv-product-slot > .hsv-slot-viewport,
.holosuite-vending-app .hsv-product-slot > .hsv-slot-footer {
  width: auto;
  min-width: 0;
  max-width: none;
  justify-self: stretch;
  align-self: stretch;
}

.holosuite-vending-app .hsv-slot-viewport > img {
  display: block;
  align-self: center;
  justify-self: center;
}

.holosuite-vending-app .hsv-slot-footer {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
  align-items: center;
  justify-content: stretch;
  justify-items: stretch;
}

.holosuite-vending-app .hsv-slot-footer > strong,
.holosuite-vending-app .hsv-slot-footer > small {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.holosuite-vending-app .hsv-slot-footer > .hsv-slot-price {
  grid-column: 1;
}

/* Industrial presentation pass: these overrides keep the functional HTML
   authoritative while adding physical depth, lighting, and clear hierarchy. */
.hsv-machine::after {
  opacity: 0.18;
}

.hsv-machine-chassis {
  gap: 10px;
  padding: 14px;
  border: 2px solid #344b5b;
  background-color: #080d11;
  background-image:
    var(--hsv-asset-shell),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px),
    linear-gradient(145deg, #202a31 0%, #080d11 18%, #11191f 50%, #05090c 78%, #25313a 100%);
  background-size: 100% 100%, auto, auto;
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.7),
    inset 0 0 0 3px #070b0e,
    inset 0 0 0 5px #344650,
    inset 0 0 70px rgba(0, 0, 0, 0.78);
}

.hsv-machine-chassis::before {
  position: absolute;
  z-index: 0;
  inset: 8px;
  border: 1px solid rgba(160, 186, 198, 0.22);
  pointer-events: none;
  content: "";
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.8);
}

.hsv-machine-chassis > * {
  position: relative;
  z-index: 1;
}

.hsv-status-module {
  grid-template-columns: 210px minmax(0, 1fr) 210px;
  min-height: 128px;
  padding: 14px 58px 14px 22px;
  border: 1px solid #4b5d67;
  background-color: #050b0f;
  background-image:
    var(--hsv-asset-header),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(105, 232, 255, 0.025) 3px 4px),
    linear-gradient(180deg, rgba(8, 24, 33, 0.96), rgba(2, 8, 12, 0.98));
  background-size: 100% 100%, auto, auto;
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.48),
    inset 0 -18px 30px rgba(0, 0, 0, 0.5),
    0 4px 0 #05080a;
}

.hsv-status-module::after {
  position: absolute;
  right: 82px;
  bottom: 12px;
  width: 82px;
  height: 2px;
  content: "";
  background: var(--hs-color-primary);
  box-shadow: 0 0 8px var(--hs-color-primary);
  opacity: 0.34;
}

.hsv-brand-block {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  padding-right: 18px;
  border-right-color: rgba(255, 92, 70, 0.5);
}

.hsv-brand-mark {
  position: relative;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid var(--hs-border-subtle);
  background: radial-gradient(circle, rgba(105, 232, 255, 0.14), transparent 67%);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.hsv-brand-block .hsv-brand-mark img {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--hs-color-primary) 36%, transparent));
}

.hsv-brand-block strong {
  font-size: 23px;
  line-height: 0.92;
}

.hsv-brand-block b {
  display: block;
  margin-top: 6px;
  color: var(--hs-color-primary);
  font-family: var(--hs-font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.hsv-identity-block {
  gap: 2px;
  padding: 0 20px;
  border-right-color: rgba(255, 92, 70, 0.5);
}

.hsv-identity-block h2 {
  margin: 5px 0 8px;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: none;
}

.hsv-customer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 22px;
}

.hsv-customer-strip span {
  color: var(--hs-text-secondary);
  font-family: var(--hs-font-ui);
  font-size: 12px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.hsv-customer-strip b {
  margin-left: 5px;
  color: var(--hs-color-primary);
  font-family: var(--hs-font-mono);
  font-weight: 600;
}

.hsv-telemetry {
  grid-template-columns: 1fr;
  gap: 4px;
  padding-left: 4px;
}

.hsv-telemetry > div,
.hsv-telemetry > div:nth-child(3) {
  grid-column: auto;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border-left: 1px solid var(--hs-color-primary);
  background: linear-gradient(90deg, rgba(105, 232, 255, 0.055), transparent);
}

.hsv-telemetry .hsv-telemetry-primary {
  border-left-color: var(--hs-color-success);
}

.hsv-telemetry span,
.hsv-telemetry strong {
  font-size: 10px;
}

.holosuite-vending-app .hsv-machine-close {
  top: 15px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-color: #4e5d66;
  background: linear-gradient(180deg, #172129, #080d11);
}

.hsv-machine-deck {
  grid-template-columns: minmax(0, 1.35fr) minmax(390px, 1fr);
  gap: 10px;
}

.hsv-product-chamber,
.hsv-control-terminal {
  border: 2px solid #293a45;
  background-color: #050b0f;
  box-shadow:
    inset 0 0 0 3px #030608,
    inset 0 0 30px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(132, 162, 176, 0.2);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.hsv-product-chamber {
  padding: 10px;
  container-type: inline-size;
  container-name: hsv-product-chamber;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 10%, transparent 90%, rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(105, 232, 255, 0.018) 5px 6px),
    linear-gradient(180deg, #0b171f, #03090d);
}

.hsv-section-header,
.hsv-terminal-header {
  min-height: 54px;
  padding: 7px 10px 11px;
  border-bottom: 1px solid rgba(105, 232, 255, 0.32);
}

.hsv-section-header strong,
.hsv-terminal-header strong {
  font-size: 18px;
  letter-spacing: 0.045em;
}

.hsv-section-header span,
.hsv-terminal-header span {
  font-size: 10px;
}

.hsv-slot-grid {
  gap: 7px;
  max-height: 720px;
  max-height: calc(129.87cqw - 4px);
  padding-top: 0;
  padding-right: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  align-content: start;
  scrollbar-color: #46606c #05090c;
  scrollbar-width: thin;
}

.hsv-slot-grid::-webkit-scrollbar {
  width: 8px;
}

.hsv-slot-grid::-webkit-scrollbar-track {
  background: #05090c;
  box-shadow: inset 0 0 4px #000;
}

.hsv-slot-grid::-webkit-scrollbar-thumb {
  border: 1px solid #17262e;
  background: linear-gradient(180deg, #58717c, #293d47);
}

.hsv-slot-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6b8a97, #36515e);
}

.holosuite-vending-app .hsv-product-slot {
  grid-template-rows: 38px minmax(0, 1fr) 60px;
  aspect-ratio: 0.77;
  padding: 7px;
  border: 1px solid #111b21;
  background-color: #05090c;
  background-image:
    var(--hsv-asset-slot),
    linear-gradient(135deg, rgba(80, 99, 109, 0.34), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.62)),
    linear-gradient(180deg, #192329, #060a0d 18%, #05090c 82%, #172127);
  background-size: 100% 100%, auto, auto;
  box-shadow:
    inset 0 0 0 2px #020405,
    inset 0 0 0 4px #263842,
    inset 0 0 18px rgba(0, 0, 0, 0.74),
    0 2px 3px rgba(0, 0, 0, 0.72);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}

.holosuite-vending-app button.hsv-product-slot:hover,
.holosuite-vending-app button.hsv-product-slot:focus-visible {
  background-color: #071218;
  box-shadow:
    inset 0 0 0 2px #020405,
    inset 0 0 0 4px color-mix(in srgb, var(--hs-color-primary) 55%, #263842),
    0 0 14px color-mix(in srgb, var(--hs-color-primary) 28%, transparent);
  transform: translateY(-1px);
}

.holosuite-vending-app .hsv-product-slot.is-selected {
  box-shadow:
    inset 0 0 0 2px #020405,
    inset 0 0 0 4px var(--hs-color-primary),
    0 0 17px color-mix(in srgb, var(--hs-color-primary) 38%, transparent);
}

.holosuite-vending-app .hsv-product-slot.is-empty {
  background-color: #030608;
  background-image:
    var(--hsv-asset-slot-empty),
    linear-gradient(180deg, #10171b, #020405 22%, #030608 82%, #11181c);
}

.holosuite-vending-app .hsv-product-slot.is-sold-out {
  background-image:
    var(--hsv-asset-slot-sold-out),
    var(--hsv-asset-slot),
    linear-gradient(180deg, #220a0d, #050506 70%);
}

.hsv-slot-code {
  justify-content: center;
  margin: 0 3px;
  padding: 0 22px;
  border-bottom: 1px solid #3b505b;
  color: var(--hs-text-primary);
  font-size: 15px;
  text-shadow: 0 0 7px color-mix(in srgb, var(--hs-color-primary) 45%, transparent);
}

.hsv-slot-code::before {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 48px;
  height: 4px;
  content: "";
  background: var(--hs-color-primary);
  box-shadow: 0 0 8px var(--hs-color-primary);
  opacity: 0.65;
  transform: translateX(-50%);
}

.hsv-slot-code i {
  position: absolute;
  top: 7px;
  right: 4px;
}

.hsv-slot-viewport {
  margin: 0 5px;
  overflow: hidden;
  border: 1px solid rgba(67, 91, 104, 0.58);
  background:
    linear-gradient(90deg, rgba(105, 232, 255, 0.06), transparent 13%, transparent 87%, rgba(105, 232, 255, 0.05)),
    radial-gradient(ellipse at 50% 82%, color-mix(in srgb, var(--hs-color-primary) 18%, transparent), transparent 50%),
    linear-gradient(180deg, #061018, #010406 84%);
  box-shadow:
    inset 9px 0 16px rgba(0, 0, 0, 0.62),
    inset -9px 0 16px rgba(0, 0, 0, 0.62),
    inset 0 10px 20px rgba(0, 0, 0, 0.72);
}

.hsv-slot-light {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 18%;
  width: 64%;
  height: 3px;
  background: var(--hs-color-primary);
  box-shadow: 0 0 7px 2px color-mix(in srgb, var(--hs-color-primary) 55%, transparent);
  opacity: 0.58;
}

.hsv-slot-viewport > img {
  position: relative;
  z-index: 2;
  width: 62%;
  height: 66%;
  max-width: 110px;
  max-height: 138px;
  object-fit: contain;
  filter:
    drop-shadow(0 10px 6px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 7px color-mix(in srgb, var(--hs-color-primary) 28%, transparent));
}

.hsv-slot-pedestal {
  position: absolute;
  z-index: 1;
  right: 12%;
  bottom: 5px;
  left: 12%;
  height: 14px;
  border: 1px solid rgba(105, 232, 255, 0.42);
  border-top: 3px solid var(--hs-color-primary);
  background: linear-gradient(180deg, #162832, #020506);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  box-shadow: 0 -3px 10px color-mix(in srgb, var(--hs-color-primary) 25%, transparent);
}

.hsv-slot-viewport::after {
  inset: auto 18% 18px;
  opacity: 0.28;
}

.hsv-slot-footer {
  margin: 0 4px;
  padding: 7px 7px 4px;
  border: 1px solid #3b4b54;
  background: linear-gradient(180deg, #121b20, #05090b);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.72);
}

.hsv-slot-footer > strong {
  font-size: 11px;
}

.hsv-slot-footer > span,
.hsv-slot-footer > small {
  font-size: 9px;
}

.hsv-slot-footer > .hsv-slot-price {
  grid-column: 1 / -1;
  color: var(--hs-color-warning);
  font-family: var(--hs-font-mono);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.hsv-empty-glyph {
  position: relative;
  z-index: 2;
  color: #3e4e56;
  font-size: 29px !important;
}

.hsv-empty-label {
  position: absolute;
  z-index: 2;
  bottom: 32px;
  color: #53656d;
  font-family: var(--hs-font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.hsv-sold-out-overlay {
  gap: 9px;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(255, 49, 95, 0.06) 10px 20px),
    rgba(34, 0, 8, 0.46);
  font-size: 13px;
}

.hsv-sold-out-overlay i {
  font-size: 31px;
}

.hsv-sold-out-overlay strong {
  padding: 5px 12px;
  border-top: 1px solid var(--hs-color-danger);
  border-bottom: 1px solid var(--hs-color-danger);
  background: rgba(26, 0, 7, 0.74);
}

.hsv-control-terminal {
  gap: 0;
  padding: 24px 34px 18px;
  background-color: #04090c;
  background-image:
    var(--hsv-asset-terminal),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(105, 232, 255, 0.018) 4px 5px),
    linear-gradient(180deg, #0b151b, #030608);
  background-size: 100% 100%, auto, auto;
}

.hsv-terminal-header {
  padding: 5px 4px 10px;
  border-bottom-color: rgba(255, 92, 70, 0.62);
}

.hsv-product-console {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px 12px;
  padding: 8px 1px 10px;
  border-bottom: 1px solid rgba(105, 232, 255, 0.25);
}

.hsv-product-console .hsv-preview-code {
  grid-column: 1 / -1;
  color: var(--hs-color-primary);
  font-size: 10px;
}

.hsv-product-console .hsv-preview-image {
  position: relative;
  display: grid;
  width: 100%;
  height: 210px;
  min-height: 210px;
  max-height: 210px;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(105, 232, 255, 0.38);
  background:
    linear-gradient(rgba(105, 232, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 232, 255, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 50% 76%, color-mix(in srgb, var(--hs-color-primary) 20%, transparent), transparent 54%),
    #02080c;
  background-size: 14px 14px, 14px 14px, auto, auto;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.75);
}

.hsv-product-console .hsv-preview-image img {
  position: absolute;
  z-index: 2;
  inset: 11%;
  width: 78%;
  height: 78%;
  max-width: 78%;
  max-height: 78%;
  object-fit: contain;
  filter:
    drop-shadow(0 13px 8px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 9px color-mix(in srgb, var(--hs-color-primary) 28%, transparent));
}

.hsv-hologram-ring {
  position: absolute;
  z-index: 1;
  right: 13%;
  bottom: 15px;
  left: 13%;
  height: 22px;
  border: 2px solid var(--hs-color-primary);
  border-radius: 50%;
  box-shadow:
    0 0 9px var(--hs-color-primary),
    inset 0 0 9px var(--hs-color-primary);
  opacity: 0.46;
  transform: perspective(80px) rotateX(62deg);
}

.hsv-product-information {
  display: grid;
  grid-template-rows: auto minmax(52px, auto) auto auto;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding-top: 3px;
}

.hsv-product-information h3 {
  margin: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 92, 70, 0.58);
  color: var(--hs-text-primary);
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.hsv-product-information .hsv-product-description {
  display: -webkit-box;
  max-height: 86px;
  color: var(--hs-text-secondary);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.hsv-product-information button.hsv-product-description {
  display: grid;
  width: 100%;
  max-height: 96px;
  gap: 5px;
  margin: 0;
  padding: 6px 7px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 0;
  background: rgba(1, 5, 8, 0.32);
  box-shadow: none;
  color: var(--hs-text-secondary);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.hsv-product-information button.hsv-product-description > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.hsv-product-information button.hsv-product-description:hover,
.hsv-product-information button.hsv-product-description:focus-visible {
  border-color: var(--hsv-steel);
  background: rgba(14, 33, 43, 0.72);
  box-shadow: inset 0 0 9px rgba(105, 232, 255, 0.08);
}

.hsv-product-dialog p {
  white-space: pre-wrap;
}

.hsv-product-information .hsv-product-readout {
  gap: 3px;
  padding: 7px 0;
}

.hsv-product-information .hsv-product-readout > div {
  display: grid;
  gap: 3px;
  padding: 1px 0;
}

.hsv-product-information .hsv-product-readout dt {
  font-size: 9px;
}

.hsv-product-information .hsv-product-readout dd {
  color: var(--hs-color-warning);
  font-size: 13px;
  text-align: left;
}

.hsv-stock-meter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.hsv-stock-meter > div {
  display: grid;
  grid-template-columns: repeat(10, minmax(2px, 1fr));
  gap: 2px;
}

.hsv-stock-meter i {
  height: 16px;
  border: 1px solid #30434d;
  background: #0a1115;
  transform: skewX(-5deg);
}

.hsv-stock-meter i.is-active {
  border-color: var(--hs-color-primary);
  background: var(--hs-color-primary);
  box-shadow: 0 0 5px color-mix(in srgb, var(--hs-color-primary) 65%, transparent);
}

.hsv-stock-meter > span {
  color: var(--hs-text-primary);
  font-family: var(--hs-font-mono);
  font-size: 10px;
}

.hsv-quantity-control {
  grid-template-columns: 54px 112px minmax(0, 1fr);
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(105, 232, 255, 0.25);
}

.hsv-quantity-control label {
  font-size: 10px;
}

.hsv-stepper {
  display: grid;
  grid-template-columns: 30px 52px 30px;
  gap: 0;
}

.holosuite-vending-app .hsv-stepper button,
.holosuite-vending-app .hsv-stepper input {
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  border-radius: 0;
}

.holosuite-vending-app .hsv-stepper button {
  padding: 0;
  border-color: #40535e;
  color: var(--hs-color-primary);
}

.holosuite-vending-app .hsv-stepper input {
  padding: 0;
  border-right: 0;
  border-left: 0;
  font-family: var(--hs-font-mono);
  font-size: 15px;
  text-align: center;
  appearance: textfield;
}

.holosuite-vending-app .hsv-stepper input::-webkit-inner-spin-button,
.holosuite-vending-app .hsv-stepper input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.holosuite-vending-app .hsv-quantity-control .hsv-add-queue {
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--hs-color-primary) 70%, #30434d);
  background: linear-gradient(180deg, rgba(19, 66, 82, 0.84), rgba(5, 22, 31, 0.95));
  color: var(--hs-color-primary);
  font-size: 11px;
  box-shadow: inset 0 0 12px rgba(105, 232, 255, 0.08);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.hsv-dispense-queue {
  gap: 7px;
  padding-top: 9px;
  border-top: 0;
}

.hsv-dispense-queue h3 {
  font-size: 16px;
}

.hsv-queue-lines {
  min-height: 58px;
  max-height: 102px;
  padding: 4px;
  border: 1px solid rgba(105, 232, 255, 0.3);
  background: rgba(0, 0, 0, 0.22);
}

.hsv-queue-empty {
  display: grid;
  min-height: 48px;
  padding: 0;
  border-color: rgba(105, 232, 255, 0.16);
  place-items: center;
  font-size: 10px;
}

.hsv-queue-total {
  padding: 8px 3px 2px;
}

.hsv-queue-total span {
  color: var(--hs-color-primary);
  font-size: 12px;
  font-weight: 700;
}

.hsv-queue-total strong {
  font-size: 18px;
}

.hsv-terminal-actions {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 7px;
}

.holosuite-vending-app .hsv-terminal-actions .hsv-clear-button {
  min-height: 56px;
  border-color: #3e4c54;
  background: linear-gradient(180deg, #161e23, #070b0e);
  color: var(--hs-text-secondary);
}

.holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button {
  min-height: 56px;
  border: 2px solid color-mix(in srgb, var(--hs-color-warning) 72%, #7d2c24);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 20%),
    linear-gradient(180deg, #b34b32, #642217 58%, #35100c);
  color: #ffe5c9;
  font-size: 14px;
  text-shadow: 0 1px 2px #310a05;
  box-shadow:
    inset 0 0 0 2px rgba(255, 181, 108, 0.18),
    inset 0 0 18px rgba(255, 127, 74, 0.2),
    0 0 11px rgba(255, 91, 55, 0.2);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button:not(:disabled):hover {
  border-color: #ffb06f;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 20%),
    linear-gradient(180deg, #d65a38, #7a291a 58%, #43130d);
  box-shadow: 0 0 16px rgba(255, 91, 55, 0.38);
}

.holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button:disabled {
  border-color: #56372f;
  background: linear-gradient(180deg, #3e2924, #1d1412);
  color: #8f7770;
  filter: none;
  opacity: 0.72;
}

.hsv-retrieval-bay {
  grid-template-columns: 138px minmax(0, 1fr) 145px;
  gap: 10px;
  min-height: 136px;
  padding: 14px 18px;
  border: 2px solid #334954;
  background-color: #070b0e;
  background-image:
    var(--hsv-asset-tray),
    linear-gradient(180deg, #1b252b, #05090b 32%, #0a1014);
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, auto;
  box-shadow:
    inset 0 0 0 3px #020405,
    inset 0 0 22px rgba(0, 0, 0, 0.8),
    0 -3px 0 #030506;
  clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px), 0 13px);
}

.hsv-service-plate {
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
  min-height: 92px;
  padding: 10px;
  border: 1px solid #39464d;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px),
    linear-gradient(145deg, #171d21, #070a0c);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.76);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.hsv-service-plate strong {
  color: var(--hs-text-secondary);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hsv-service-plate span,
.hsv-service-plate small {
  color: var(--hs-text-tertiary);
  font-size: 8px;
}

.hsv-caution-plate > i {
  width: 100%;
  height: 18px;
  margin-top: 6px;
  background: repeating-linear-gradient(135deg, #4b5356 0 9px, #12171a 9px 18px);
  opacity: 0.72;
}

.hsv-tray-cavity {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: 1fr auto;
  gap: 5px 22px;
  min-height: 96px;
  padding: 14px 34px 9px;
  border: 4px solid #1d2b33;
  background:
    linear-gradient(90deg, rgba(105, 232, 255, 0.08), transparent 13%, transparent 87%, rgba(105, 232, 255, 0.08)),
    linear-gradient(180deg, #010304, #071016);
  box-shadow:
    inset 0 13px 24px rgba(0, 0, 0, 0.92),
    inset 0 0 0 1px rgba(105, 232, 255, 0.25),
    0 0 0 2px #020405;
  clip-path: polygon(17px 0, calc(100% - 17px) 0, 100% 17px, 100% calc(100% - 17px), calc(100% - 17px) 100%, 17px 100%, 0 calc(100% - 17px), 0 17px);
}

button.hsv-tray-cavity {
  width: 100%;
  height: auto;
  margin: 0;
  color: inherit;
  font-family: var(--hs-font-mono);
  line-height: normal;
  opacity: 1;
  cursor: default;
}

button.hsv-tray-cavity:disabled {
  opacity: 1;
  cursor: default;
}

.hsv-machine[data-retrieval-state="ready"] button.hsv-tray-cavity {
  cursor: pointer;
  animation: hsv-tray-ready-pulse 1.65s ease-in-out infinite;
}

.hsv-machine[data-retrieval-state="ready"] button.hsv-tray-cavity:hover,
.hsv-machine[data-retrieval-state="ready"] button.hsv-tray-cavity:focus-visible {
  border-color: var(--hs-color-success);
  filter: brightness(1.12);
  outline: 1px solid color-mix(in srgb, var(--hs-color-success) 65%, transparent);
  outline-offset: 3px;
}

.hsv-tray-cavity > i {
  z-index: 2;
  align-self: center;
  color: var(--hs-color-primary);
  font-size: 20px;
  text-shadow: 0 0 7px currentColor;
}

.hsv-tray-cavity > strong {
  z-index: 2;
  align-self: center;
  color: var(--hs-color-primary);
  font-size: 21px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 9px color-mix(in srgb, var(--hs-color-primary) 55%, transparent);
}

.hsv-tray-cavity > small {
  z-index: 2;
  grid-column: 1 / -1;
  color: var(--hs-text-tertiary);
  font-family: var(--hs-font-mono);
  font-size: 9px;
  text-align: center;
}

.hsv-tray-scanline {
  inset: 10px 8%;
  border-color: var(--hs-color-primary);
  opacity: 0.18;
}

.hsv-serial-plate > i {
  width: 100%;
  height: 14px;
  margin-top: 3px;
  background: repeating-linear-gradient(90deg, #526169 0 2px, transparent 2px 5px);
  opacity: 0.5;
}

.hsv-serial-plate .hsv-retrieval-status {
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
}

.hsv-retrieval-status b {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hs-text-tertiary);
}

.hsv-machine[data-retrieval-state="processing"] .hsv-tray-cavity,
.hsv-machine[data-retrieval-state="processing"] .hsv-retrieval-status {
  color: var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="processing"] .hsv-retrieval-status b {
  background: var(--hs-color-warning);
  box-shadow: 0 0 7px var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="ready"] .hsv-tray-cavity,
.hsv-machine[data-retrieval-state="ready"] .hsv-retrieval-status {
  color: var(--hs-color-success);
}

.hsv-machine[data-retrieval-state="ready"] .hsv-retrieval-status b {
  background: var(--hs-color-success);
  box-shadow: 0 0 7px var(--hs-color-success);
}

.hsv-editor-display-art {
  display: grid;
  gap: 4px;
  color: var(--holosuite-vending-muted);
}

.hsv-editor-display-art > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.hsv-editor-display-art small {
  color: var(--hs-text-tertiary);
  font-weight: 400;
}

/* Semantic color hierarchy and restrained state-driven motion. */
.hsv-machine {
  --hsv-steel: #607985;
  --hsv-steel-dim: #334a55;
  --hsv-steel-faint: rgba(96, 121, 133, 0.28);
}

.hsv-brand-block .hsv-eyebrow,
.hsv-identity-block .hsv-eyebrow,
.hsv-section-header span {
  color: var(--hsv-steel);
}

.hsv-customer-strip span:first-child b {
  color: var(--hs-color-success);
}

.hsv-customer-strip span:last-child b {
  color: var(--hs-color-warning);
}

.hsv-section-header,
.hsv-product-console,
.hsv-quantity-control {
  border-color: var(--hsv-steel-faint);
}

.hsv-slot-code::before,
.hsv-slot-light {
  background: var(--hsv-steel);
  box-shadow: none;
  opacity: 0.62;
}

.hsv-slot-pedestal {
  height: 18px;
  border-color: var(--hsv-steel-faint);
  border-top-color: var(--hsv-steel);
  background: linear-gradient(180deg, #263740, #0c151a 42%, #020405);
  box-shadow:
    0 -5px 15px rgba(49, 79, 92, 0.32),
    inset 0 3px 5px rgba(255, 255, 255, 0.04);
}

.hsv-slot-viewport {
  background:
    linear-gradient(90deg, rgba(96, 121, 133, 0.08), transparent 15%, transparent 85%, rgba(96, 121, 133, 0.07)),
    radial-gradient(ellipse at 50% 76%, rgba(77, 112, 128, 0.22), transparent 52%),
    linear-gradient(180deg, #071219, #010304 72%, #071118);
  box-shadow:
    inset 13px 0 20px rgba(0, 0, 0, 0.72),
    inset -13px 0 20px rgba(0, 0, 0, 0.72),
    inset 0 15px 25px rgba(0, 0, 0, 0.86),
    inset 0 -9px 18px rgba(36, 66, 79, 0.18);
}

.hsv-slot-viewport > img {
  transform: translateY(-6px);
  filter:
    drop-shadow(0 16px 8px rgba(0, 0, 0, 0.86))
    drop-shadow(0 0 8px rgba(84, 126, 145, 0.3));
}

button.hsv-product-slot:hover .hsv-slot-viewport > img {
  transform: translateY(-6px) scale(1.025);
}

.hsv-product-slot.is-selected .hsv-slot-code::before,
.hsv-product-slot.is-selected .hsv-slot-light,
.hsv-product-slot.is-selected .hsv-slot-pedestal {
  border-top-color: var(--hs-color-primary);
  background-color: var(--hs-color-primary);
  box-shadow: 0 0 9px color-mix(in srgb, var(--hs-color-primary) 55%, transparent);
}

.hsv-product-slot.is-selected .hsv-slot-viewport {
  background:
    linear-gradient(90deg, rgba(105, 232, 255, 0.1), transparent 15%, transparent 85%, rgba(105, 232, 255, 0.08)),
    radial-gradient(ellipse at 50% 76%, rgba(105, 232, 255, 0.22), transparent 52%),
    linear-gradient(180deg, #07141c, #010304 72%, #07131a);
}

.hsv-product-slot.is-selected .hsv-slot-viewport::before {
  position: absolute;
  z-index: 4;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 34%;
  pointer-events: none;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(160, 244, 255, 0.18), transparent);
  transform: translateX(-195%) skewX(-14deg);
  animation: hsv-slot-selection-sweep 2.8s ease-in-out infinite;
}

.hsv-product-slot.is-sold-out .hsv-slot-code::before,
.hsv-product-slot.is-sold-out .hsv-slot-light {
  background: var(--hs-color-danger);
  box-shadow: 0 0 7px color-mix(in srgb, var(--hs-color-danger) 55%, transparent);
}

.hsv-stock-meter i.is-active {
  border-color: var(--hs-color-success);
  background: var(--hs-color-success);
  box-shadow: 0 0 5px color-mix(in srgb, var(--hs-color-success) 60%, transparent);
  animation: hsv-stock-segment-fill 360ms ease-out both;
}

.hsv-stock-meter i:nth-child(2) { animation-delay: 35ms; }
.hsv-stock-meter i:nth-child(3) { animation-delay: 70ms; }
.hsv-stock-meter i:nth-child(4) { animation-delay: 105ms; }
.hsv-stock-meter i:nth-child(5) { animation-delay: 140ms; }
.hsv-stock-meter i:nth-child(6) { animation-delay: 175ms; }
.hsv-stock-meter i:nth-child(7) { animation-delay: 210ms; }
.hsv-stock-meter i:nth-child(8) { animation-delay: 245ms; }
.hsv-stock-meter i:nth-child(9) { animation-delay: 280ms; }
.hsv-stock-meter i:nth-child(10) { animation-delay: 315ms; }

.holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button:not(:disabled) {
  animation: hsv-purchase-ready-pulse 2.7s ease-in-out infinite;
}

.hsv-tray-cavity > strong,
.hsv-tray-cavity > i {
  color: var(--hsv-steel);
  text-shadow: none;
}

.hsv-tray-scanline {
  border-color: var(--hsv-steel);
}

.hsv-machine[data-retrieval-state="authorizing"] .hsv-tray-cavity > strong,
.hsv-machine[data-retrieval-state="authorizing"] .hsv-tray-cavity > i,
.hsv-machine[data-retrieval-state="authorizing"] .hsv-retrieval-status {
  color: var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="authorizing"] .hsv-tray-scanline {
  border-color: var(--hs-color-warning);
  animation: hsv-authorization-scan 1.1s ease-in-out infinite;
}

.hsv-machine[data-retrieval-state="authorizing"] .hsv-tray-cavity > strong {
  animation: hsv-authorization-text 1.1s ease-in-out infinite;
}

.hsv-machine[data-retrieval-state="authorizing"] .hsv-retrieval-status b {
  background: var(--hs-color-warning);
  box-shadow: 0 0 7px var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="dispensing"] .hsv-tray-cavity > strong,
.hsv-machine[data-retrieval-state="dispensing"] .hsv-tray-cavity > i,
.hsv-machine[data-retrieval-state="dispensing"] .hsv-retrieval-status {
  color: var(--hs-color-primary);
  text-shadow: 0 0 8px color-mix(in srgb, var(--hs-color-primary) 58%, transparent);
}

.hsv-machine[data-retrieval-state="dispensing"] .hsv-tray-scanline {
  border-color: var(--hs-color-primary);
  animation: hsv-dispense-scan 650ms linear infinite;
}

.hsv-machine[data-retrieval-state="dispensing"] .hsv-retrieval-status b {
  background: var(--hs-color-primary);
  box-shadow: 0 0 7px var(--hs-color-primary);
}

.hsv-machine[data-retrieval-state="collecting"] .hsv-tray-cavity > strong,
.hsv-machine[data-retrieval-state="collecting"] .hsv-tray-cavity > i,
.hsv-machine[data-retrieval-state="collecting"] .hsv-retrieval-status {
  color: var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="collecting"] .hsv-tray-scanline {
  border-color: var(--hs-color-warning);
  animation: hsv-authorization-scan 720ms ease-in-out infinite;
}

.hsv-machine[data-retrieval-state="ready"] .hsv-tray-cavity > strong,
.hsv-machine[data-retrieval-state="ready"] .hsv-tray-cavity > i,
.hsv-machine[data-retrieval-state="ready"] .hsv-retrieval-status {
  color: var(--hs-color-success);
  text-shadow: 0 0 8px color-mix(in srgb, var(--hs-color-success) 55%, transparent);
}

.hsv-machine[data-retrieval-state="failure"] .hsv-tray-cavity,
.hsv-machine[data-retrieval-state="failure"] .hsv-tray-cavity > strong,
.hsv-machine[data-retrieval-state="failure"] .hsv-tray-cavity > i,
.hsv-machine[data-retrieval-state="failure"] .hsv-retrieval-status {
  border-color: color-mix(in srgb, var(--hs-color-danger) 55%, #1d2b33);
  color: var(--hs-color-danger);
}

.hsv-machine[data-retrieval-state="failure"] .hsv-retrieval-status b {
  background: var(--hs-color-danger);
  box-shadow: 0 0 7px var(--hs-color-danger);
}

.hsv-dispensed-item {
  position: absolute;
  z-index: 3;
  right: 9%;
  bottom: 9px;
  width: 46px;
  height: 46px;
  object-fit: contain;
  pointer-events: none;
  filter:
    drop-shadow(0 8px 5px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 6px rgba(105, 232, 255, 0.28));
}

.hsv-machine[data-retrieval-state="dispensing"] .hsv-dispensed-item {
  animation: hsv-item-dispense 850ms cubic-bezier(0.2, 0.75, 0.28, 1) both;
}

.hsv-machine[data-retrieval-state="ready"] .hsv-dispensed-item {
  animation: hsv-item-ready 1.8s ease-in-out infinite;
}

.hsv-machine[data-retrieval-state="collected"] .hsv-tray-cavity > strong,
.hsv-machine[data-retrieval-state="collected"] .hsv-tray-cavity > i,
.hsv-machine[data-retrieval-state="collected"] .hsv-retrieval-status {
  color: var(--hs-color-success);
}

.hsv-machine[data-retrieval-state="collected"] .hsv-retrieval-status b {
  background: var(--hs-color-success);
  box-shadow: 0 0 7px var(--hs-color-success);
}

.hsv-machine[data-retrieval-state="automatic"] .hsv-tray-cavity > strong,
.hsv-machine[data-retrieval-state="automatic"] .hsv-tray-cavity > i,
.hsv-machine[data-retrieval-state="automatic"] .hsv-retrieval-status {
  color: var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="automatic"] .hsv-retrieval-status b {
  background: var(--hs-color-warning);
  box-shadow: 0 0 7px var(--hs-color-warning);
}

.hsv-machine[data-retrieval-state="collected"] .hsv-dispensed-item {
  animation: hsv-item-collected 720ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.hsv-machine[data-retrieval-state="automatic"] .hsv-dispensed-item {
  animation: hsv-item-auto-dispensed 900ms ease-in both;
}

@keyframes hsv-slot-selection-sweep {
  0%, 24% { transform: translateX(-195%) skewX(-14deg); opacity: 0; }
  36% { opacity: 1; }
  62% { transform: translateX(385%) skewX(-14deg); opacity: 0; }
  100% { transform: translateX(385%) skewX(-14deg); opacity: 0; }
}

@keyframes hsv-stock-segment-fill {
  from { opacity: 0; transform: scaleY(0.2) skewX(-5deg); }
  to { opacity: 1; transform: scaleY(1) skewX(-5deg); }
}

@keyframes hsv-purchase-ready-pulse {
  0%, 100% { opacity: 0.94; }
  50% { opacity: 1; }
}

@keyframes hsv-authorization-text {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 1; }
}

@keyframes hsv-authorization-scan {
  0%, 100% { transform: scaleX(0.62); opacity: 0.12; }
  50% { transform: scaleX(1); opacity: 0.46; }
}

@keyframes hsv-dispense-scan {
  from { transform: translateY(-5px); opacity: 0.12; }
  to { transform: translateY(5px); opacity: 0.48; }
}

@keyframes hsv-item-dispense {
  0% { opacity: 0; transform: translateY(-90px) scale(0.72) rotate(-8deg); }
  68% { opacity: 1; transform: translateY(4px) scale(1.04) rotate(2deg); }
  84% { transform: translateY(-3px) scale(0.98) rotate(-1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes hsv-item-ready {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes hsv-tray-ready-pulse {
  0%, 100% { opacity: 0.94; }
  50% { opacity: 1; }
}

@keyframes hsv-item-collected {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  45% { opacity: 1; transform: translateY(-7px) scale(1.12); filter: brightness(1.6) drop-shadow(0 0 12px var(--hs-color-success)); }
  100% { opacity: 0; transform: translateY(-52px) scale(0.28); }
}

@keyframes hsv-item-auto-dispensed {
  0% { opacity: 1; transform: translateX(0) rotate(0); }
  35% { opacity: 1; transform: translateX(-8px) rotate(-3deg); }
  100% { opacity: 0; transform: translateX(92px) rotate(10deg) scale(0.72); }
}

@media (prefers-reduced-motion: reduce) {
  .hsv-product-slot.is-selected .hsv-slot-viewport::before,
  .hsv-stock-meter i.is-active,
  .holosuite-vending-app .hsv-terminal-actions .hsv-dispense-button,
  .hsv-tray-scanline,
  .hsv-tray-cavity > strong,
  .hsv-machine[data-retrieval-state="ready"] button.hsv-tray-cavity,
  .hsv-dispensed-item {
    animation: none !important;
  }
}
