html, body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  background: white;
}

html::-webkit-scrollbar {
  display: none;
}

#controls::-webkit-scrollbar {
  display: none;
}

.config-panels::-webkit-scrollbar {
  display: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#viewer {
  position: absolute;
  display: block;
  height: 100svh;
  width: 65%;
  left: 0;
  background: #f5f5f5;
}

#canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

:root {
  --panel-bg: #f2f2f2;
  --panel-line: #e0e0e0;
  --panel-text: #2f3133;
  --panel-muted: #8e9092;
  --accent: #bc8a45;
  --accent-dark: #a6763b;
}

#controls {
  position: absolute;
  width: 35%;
  height: 100svh;
  left: 65%;
  background-color: var(--panel-bg);
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.config-panel {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--panel-line);
}

.config-tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #fff;
  border-bottom: 1px solid var(--panel-line);
}

.config-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25vw;
  padding: 0.65vw 0.35vw;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--panel-muted);
  font: 500 0.68vw "Roboto", sans-serif;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.config-tab:hover {
  color: var(--panel-text);
  background: #fafafa;
}

.config-tab.active {
  color: var(--panel-text);
  border-bottom-color: var(--accent);
  background: #fafafa;
  font-weight: 600;
}

.config-tab-icon {
  display: flex;
  width: 1.35vw;
  height: 1.35vw;
}

.config-tab-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  /* PNG ikone su bijele linije — pretvori u tamne za svijetli panel */
  filter: brightness(0) opacity(0.45);
  transition: filter 0.15s;
}

.config-tab:hover .config-tab-icon img {
  filter: brightness(0) opacity(0.7);
}

.config-tab.active .config-tab-icon img {
  filter: brightness(0) opacity(0.85);
}

.config-tab-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.config-panels {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  background: #fafafa;
}

.config-tab-panel {
  padding: 0.85vw 1.1vw 1.1vw;
}

.config-tab-panel[hidden] {
  display: none;
}

.option-group-title {
  margin: 0.7vw 0 0.45vw;
  color: var(--panel-muted);
  font-size: 0.68vw;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.option-group-title:first-child {
  margin-top: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75vw 0.6vw;
}

.option-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: "Roboto", sans-serif;
}

.option-wrap {
  position: relative;
  min-width: 0;
}

.option-wrap.is-disabled {
  cursor: not-allowed;
}

.option-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.option-btn.disabled .thumb {
  filter: grayscale(0.35);
}

.option-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35vw);
  transform: translateX(-50%) translateY(0.2vw);
  z-index: 40;
  width: max-content;
  max-width: 14vw;
  padding: 0.4vw 0.55vw;
  border-radius: 0.3vw;
  background: #2f3133;
  color: #fff;
  font: 500 0.62vw/1.35 "Roboto", sans-serif;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.option-wrap.is-disabled:hover .option-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.option-btn .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  background: #fff;
  border: 1px solid #dcdcdc;
  object-fit: contain;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.option-btn .thumb.thumb-cover {
  object-fit: cover;
}

.option-btn:hover:not(.disabled) .thumb {
  border-color: #b8b8b8;
}

.option-btn.selected .thumb {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.option-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c0c0c0;
  font-size: 0.85vw;
  font-weight: 600;
}

.option-btn .code {
  margin-top: 0.3vw;
  color: var(--panel-muted);
  font-size: 0.62vw;
  line-height: 1.25;
}

.option-btn .label {
  color: var(--panel-text);
  font-size: 0.66vw;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-btn.selected .label {
  font-weight: 600;
}

.option-group-subtitle {
  margin: 0.9vw 0 0.4vw;
  padding-bottom: 0.3vw;
  border-bottom: 1px solid var(--panel-line);
  color: var(--panel-text);
  font-size: 0.68vw;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dimension-group {
  margin-top: 0.9vw;
}

.dimension-toggle {
  display: flex;
  gap: 0.4vw;
}

.dimension-toggle-btn {
  flex: 1;
  padding: 0.5vw 0.4vw;
  border: 1px solid #dcdcdc;
  background: #fff;
  color: #5c5e60;
  font: 500 0.7vw "Roboto", sans-serif;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.dimension-toggle-btn.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  color: var(--panel-text);
  font-weight: 600;
}

.dimension-toggle-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.panel-footer {
  flex: none;
  background: #fff;
  border-top: 1px solid var(--panel-line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.summary-dropdown {
  min-height: 0;
  border-bottom: 1px solid var(--panel-line);
}

.summary-dropdown > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8vw;
  padding: 0.75vw 1.1vw;
  cursor: pointer;
  user-select: none;
  font: 600 0.78vw "Roboto", sans-serif;
  color: var(--panel-text);
  background: #fafafa;
}

.summary-dropdown > summary::-webkit-details-marker {
  display: none;
}

.summary-dropdown > summary::after {
  content: '';
  width: 0.45vw;
  height: 0.45vw;
  min-width: 7px;
  min-height: 7px;
  border-right: 2px solid var(--panel-muted);
  border-bottom: 2px solid var(--panel-muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  flex: none;
  margin-top: -0.15vw;
}

.summary-dropdown[open] > summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2vw;
}

.summary-dropdown[open] > summary {
  border-bottom: 1px solid var(--panel-line);
}

.summary {
  padding: 0.5vw 1.1vw;
  overflow-y: auto;
  min-height: 0;
  max-height: 24h;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1vw;
  padding: 0.45vw 0;
}

.summary-row + .summary-row {
  border-top: 1px solid var(--panel-line);
}

.summary-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-name {
  color: var(--panel-text);
  font-size: 0.72vw;
  line-height: 1.3;
}

.summary-label {
  font-weight: 700;
  color: var(--panel-text);
}

.summary-sub {
  color: var(--panel-muted);
  font-size: 0.68vw;
  line-height: 1.3;
}

.summary-sub .summary-label {
  color: var(--panel-muted);
}

.summary-price {
  flex: none;
  color: var(--panel-text);
  font-size: 0.72vw;
  font-weight: 700;
  white-space: nowrap;
}

.panel-actions {
  display: flex;
  flex-direction: row;
}

.panel-btn {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 0.72vw 0.8vw;
  border: 1px solid transparent;
  font: 500 0.72vw "Roboto", sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.panel-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.panel-btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.panel-btn-secondary {
  background: #fafafa;
  border-color: var(--panel-line);
  color: var(--panel-text);
}

.panel-btn-secondary:hover {
  background: #fff;
}

#viewerTopRight {
  position: absolute;
  top: 3%;
  right: 3%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.55vw;
}

#configCodeDiv {
  display: flex;
  align-items: baseline;
  gap: 0.35vw;
  padding: 0.45vw 0.75vw;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 0.35vw;
  font-size: 0.75vw;
  font-family: "Roboto", sans-serif;
  color: #555;
  white-space: nowrap;
}

#configCode {
  font-weight: 600;
  color: #bc8a45;
  letter-spacing: 0.05em;
}

#languageDropdown {
  position: relative;
}

#langToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2vw;
  height: 2vw;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 0.35vw;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

#langToggle img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

#langMenu {
  position: absolute;
  top: calc(100% + 0.35vw);
  right: 0;
  padding: 0.25vw;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0.35vw;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

#langMenu[hidden] {
  display: none !important;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.55vw;
  width: 100%;
  padding: 0.45vw 0.55vw;
  border: 0;
  background: transparent;
  color: #2f3133;
  font: 500 0.72vw "Roboto", sans-serif;
  text-align: left;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.active {
  background: #f5f5f5;
}

.lang-option img {
  width: 1.5vw;
  height: 1vw;
  object-fit: cover;
  border-radius: 0.08vw;
  flex-shrink: 0;
}

#logo {
  position: absolute;
  top: 1vw;
  left: 1vw;
  z-index: 40;
}

#logoImg {
  display: block;
  height: 6vw;
  width: auto;
}

#disclaimer {
  margin: 0;
  max-width: 100%;
  text-align: right;
  font-size: 0.58vw;
  line-height: 1.3;
  color: #999;
  pointer-events: none;
}

#loading-animation {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.45s ease;
}

#loading-animation.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loadingBrand {
  display: block;
  height: 88px;
  width: auto;
  opacity: 1;
}

#loadingText {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-align: center;
  color: #9a9a9a;
}

.spinner {
  display: block;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  border: 3px solid #ececec;
  border-top-color: #bc8a45;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.spinner-large {
  width: 54px;
  height: 54px;
  border-width: 3px;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

#viewer-loader {
  position: absolute;
  inset: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Iznad canvasa i dim overlay-a, ispod UI (tools, AR, kod, logo) */
  z-index: 7;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  pointer-events: none;
}

#viewer-loader.active {
  opacity: 1;
  visibility: visible;
  transition: none;
  pointer-events: auto;
}

#viewerTools {
  position: absolute;
  bottom: 2.5%;
  left: 2.5%;
  display: flex;
  align-items: flex-end;
  gap: 0.9vw;
  z-index: 15;
}

.bottomIcons {
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.bottomIcons img,
.bottom-icon-svg {
  width: 1.15vw;
  height: 1.15vw;
  color: #585b60;
}

.bottomIcons label {
  font-size: 0.58vw;
  color: #585b60;
  cursor: pointer;
  margin-top: 0.15vw;
}

.bottomIcons.active img,
.bottomIcons.active label {
  color: #2f3133;
}

.bottomIcons:not(.active) {
  opacity: 0.45;
}

.viewer-check {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15vw;
  cursor: pointer;
  color: #585b60;
  font-size: 0.58vw;
  user-select: none;
}

.viewer-check input {
  width: 0.9vw;
  height: 0.9vw;
  margin: 0;
  accent-color: #bc8a45;
  cursor: pointer;
}

#dimOverlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

#dimOverlay.hide {
  display: none;
}

.dimensionLineContainer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.dimensionLine {
  stroke: rgba(0, 0, 0, 0.35);
  stroke-width: 2;
  stroke-dasharray: 3;
  marker-end: url(#arrowMarker);
  marker-start: url(#arrowMarker2);
}

.dimensionLine.hide {
  visibility: hidden;
}

.arrowMarker {
  fill: rgba(0, 0, 0, 0.35);
}

.dim {
  position: absolute;
  transform: translate(-50%, -50%);
  color: rgba(0, 0, 0, 0.55);
  font: 700 0.75vw "Roboto", sans-serif;
  white-space: nowrap;
  pointer-events: none;
}

.dim.hide {
  display: none;
}

.ar-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5vw;
  height: 1.5vw;
  border: 1.5px solid #585b60;
  border-radius: 0.2vw;
  color: #585b60;
  font: 700 0.55vw "Roboto", sans-serif;
  letter-spacing: 0.02em;
}

#arPanel {
  position: absolute;
  right: 3%;
  bottom: 3%;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55vw;
  width: auto;
  max-width: min(19vw, 380px);
}

#qrWindow {
  position: relative;
  width: 12vw;
  min-width: 180px;
  max-width: 100%;
  padding: 1.4vw;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 0.4vw;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  text-align: center;
}

#qrWindow[hidden] {
  display: none !important;
}

#qrClose {
  position: absolute;
  top: 0.2vw;
  right: 0.35vw;
  border: 0;
  background: transparent;
  font-size: 1.1vw;
  line-height: 1;
  color: #888;
  cursor: pointer;
}

#qrClose:hover {
  color: #333;
}

#arBtn {
  width: 12vw;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75vw 1vw;
  border: 1px solid #e6e6e6;
  border-radius: 0.4vw;
  background: #fff;
  color: #1e1e1e;
  font: 500 0.72vw "Roboto", sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

#arBtn:hover {
  background: #fafafa;
}

#arBtn:disabled {
  opacity: 0.45;
  pointer-events: none;
}

#qrText,
#qrText2 {
  margin: 0 0 0.8vw;
  color: #585b60;
  font: 500 0.58vw/1.35 "Roboto", sans-serif;
}

#qrText2 {
  color: #999;
  font-size: 0.52vw;
}

#qrcode {
  display: flex;
  justify-content: center;
  margin: 0.45vw 0 0.15vw;
}

#qrcode img {
  width: 7.5vw;
  max-width: 160px;
  height: auto;
}

#controlsHelp {
  position: static;
  padding: 0;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

#controlsHelp img {
  width: 1.5vw;
}

#controlsHelp label {
  font-size: 0.7vw;
  color: #585b60;
  cursor: pointer;
  margin-top: 0.2vw;
}

#mouseControls {
  position: absolute;
  bottom: 11%;
  left: 2.5%;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.7vw 0.75vw;
  border-radius: 0.4vw;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2vw;
}

#mouseControls img {
  width: 1.35vw;
}

#mouseControls p {
  margin: 0;
  font-size: 0.55vw;
  color: #585b60;
}

#pdfPreviewModal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vw;
  box-sizing: border-box;
}

#pdfPreviewModal[hidden] {
  display: none !important;
}

.pdf-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 30, 0.55);
}

.pdf-preview-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, 96vw);
  height: min(92vh, 1100px);
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 0.45vw;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.pdf-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1vw;
  padding: 0.9vw 1.2vw;
  border-bottom: 1px solid #eee;
}

.pdf-preview-header h2 {
  margin: 0;
  font: 600 1vw "Roboto", sans-serif;
  color: #2f3133;
}

#pdfPreviewClose {
  border: 0;
  background: transparent;
  font-size: 1.5vw;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 0.2vw 0.4vw;
}

#pdfPreviewFrame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #f5f5f5;
}

.pdf-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6vw;
  padding: 0.9vw 1.2vw;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.pdf-preview-actions .panel-btn {
  width: 100%;
}

@media only screen and (max-width: 800px) {
  #viewer {
    width: 100%;
    height: 50svh;
    top: 0;
  }

  #controls {
    width: 100%;
    height: 50svh;
    left: 0;
    top: 50svh;
    padding: 0;
  }

  .config-tab {
    gap: 0.8vw;
    padding: 2vw 1vw;
    font-size: 2.5vw;
    border-bottom-width: 3px;
  }
  .config-tab-icon { width: 4vw; height: 4vw; }
  .config-tab-panel { padding: 2.5vw 3.5vw 3vw; }
  .option-group-title { margin: 2vw 0 1.5vw; font-size: 2.6vw; }
  .option-grid { gap: 2.5vw 2vw; }
  .option-btn .code { font-size: 2.6vw; margin-top: 1.2vw; }
  .option-btn .label { font-size: 2.9vw; }
  .option-tooltip {
    max-width: 42vw;
    padding: 2vw 2.5vw;
    font-size: 2.6vw;
    border-radius: 1vw;
    bottom: calc(100% + 1.5vw);
  }
  .option-placeholder { font-size: 3.6vw; }
  .option-group-subtitle { margin: 3.5vw 0 1.5vw; font-size: 2.8vw; }
  .dimension-group { margin-top: 3.5vw; }
  .dimension-toggle { gap: 2vw; }
  .dimension-toggle-btn { padding: 2.5vw 1vw; font-size: 3vw; }
  #viewerTopRight { top: 2%; right: 2%; gap: 2vw; }
  #configCodeDiv { padding: 2vw 3vw; font-size: 3vw; border-radius: 1.2vw; }
  #langToggle { width: 8vw; height: 8vw; border-radius: 1.2vw; min-width: none; min-height: none; }
  #langMenu { min-width: 36vw; padding: 1vw; }
  .lang-option { gap: 2.5vw; padding: 2.2vw; font-size: 3.2vw; }
  .lang-option img { width: 7vw; height: 4.5vw; }
  #logoImg { height: 14vw; }
  #disclaimer {
    font-size: 2vw;
    text-align: right;
    max-width: 100%;
  }

  #viewerTools { bottom: 3%; left: 4%; gap: 2.8vw; max-width: 55%; }
  .bottomIcons img,
  .bottom-icon-svg { width: 4vw; height: 4vw; }
  .bottomIcons label { font-size: 2vw; }
  .viewer-check { font-size: 2vw; gap: 0.8vw; }
  .viewer-check input { width: 3.2vw; height: 3.2vw; }
  .dim { font-size: 3vw; }

  #arPanel {
    right: 3%;
    left: auto;
    bottom: 3%;
    width: auto;
    max-width: 46%;
    gap: 2vw;
  }
  #qrWindow {
    display: none !important;
    width: 70vw;
    min-width: 0;
    padding: 4vw 3.5vw;
  }
  #qrClose { top: 1vw; right: 2vw; font-size: 5.5vw; }
  #qrText { font-size: 3vw; margin-bottom: 2vw; }
  #qrText2 { font-size: 2.5vw; margin-bottom: 2.5vw; }
  #qrcode img { width: 36vw; max-width: none; }
  #arBtn {
    width: auto;
    padding: 2.8vw 3.2vw;
    font-size: 2.8vw;
    border-radius: 1.2vw;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }
  #controlsHelp { bottom: auto; left: auto; }
  #controlsHelp img { width: 4vw; }
  #controlsHelp label { font-size: 2vw; }

  .summary-dropdown > summary {
    padding: 2.8vw 3.5vw;
    font-size: 2.9vw;
  }
  .summary-dropdown > summary::after {
    width: 1.8vw;
    height: 1.8vw;
    margin-top: -0.4vw;
  }
  .summary-dropdown[open] > summary::after {
    margin-top: 0.6vw;
  }
  .summary { padding: 1vw 3.5vw; max-height: 28vh; }
  .summary-row { padding: 1.2vw 0; }
  .summary-name { font-size: 2.8vw; }
  .summary-sub { font-size: 2.5vw; }
  .summary-price { font-size: 2.8vw; }
  .panel-actions {
    flex: none;
  }
  .panel-btn { padding: 2.6vw 2vw; font-size: 2.6vw; }

  #mouseControls { bottom: 16%; left: 4%; padding: 2.2vw 2.4vw; gap: 0.7vw; border-radius: 1.5vw; }
  #mouseControls img { width: 4.5vw; }
  #mouseControls p { font-size: 1.9vw; }

  #loadingBrand { height: 22vw; }
  #loadingText { font-size: 3vw; }

  #pdfPreviewModal { padding: 3vw; }
  .pdf-preview-dialog {
    width: 100%;
    height: 92svh;
    border-radius: 2vw;
  }
  .pdf-preview-header { padding: 3.5vw 4vw; }
  .pdf-preview-header h2 { font-size: 4vw; }
  #pdfPreviewClose { font-size: 7vw; }
  .pdf-preview-actions {
    grid-template-columns: 1fr;
    gap: 2vw;
    padding: 3vw 4vw;
  }
}
