:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #111410;
  color: #f7f3ea;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #151714;
}

button {
  font: inherit;
}

.viewer-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(23, 28, 24, 0.9), rgba(30, 29, 25, 0.8)),
    url("./assets/t-detail.jpg") center / cover;
}

#panoCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#panoCanvas:active {
  cursor: grabbing;
}

.top-vignette,
.bottom-vignette {
  position: absolute;
  right: 0;
  left: 0;
  pointer-events: none;
}

.top-vignette {
  top: 0;
  height: 34vh;
  background: linear-gradient(rgba(8, 10, 8, 0.56), rgba(8, 10, 8, 0));
}

.bottom-vignette {
  bottom: 0;
  height: 24vh;
  background: linear-gradient(rgba(8, 10, 8, 0), rgba(8, 10, 8, 0.34));
}

.product-bar {
  position: absolute;
  top: 22px;
  right: clamp(16px, 3vw, 42px);
  left: clamp(16px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  pointer-events: none;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #fffaf0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 44%, rgba(255, 255, 255, 0.9) 45% 55%, transparent 56%),
    linear-gradient(0deg, transparent 44%, rgba(255, 255, 255, 0.9) 45% 55%, transparent 56%),
    rgba(25, 29, 24, 0.42);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.32);
}

.brand-block strong,
.brand-block span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-block strong {
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 1;
  letter-spacing: 0;
}

.brand-block span {
  margin-top: 6px;
  color: rgba(255, 249, 236, 0.76);
  font-size: clamp(11px, 1vw, 13px);
  text-transform: uppercase;
}

.spec-strip {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  max-width: min(56vw, 780px);
}

.spec-strip span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 22, 18, 0.42);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

.spec-strip span {
  padding: 8px 10px;
  color: rgba(255, 249, 236, 0.88);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.controls {
  position: absolute;
  bottom: clamp(24px, 5vh, 54px);
  left: clamp(16px, 3vw, 42px);
  display: grid;
  grid-template-columns: repeat(4, 44px);
  gap: 8px;
}

.controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #fffaf0;
  background: rgba(19, 21, 18, 0.52);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  cursor: pointer;
}

.controls button:hover,
.controls button:focus-visible {
  border-color: rgba(244, 230, 190, 0.8);
  background: rgba(62, 68, 58, 0.56);
  outline: none;
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 12px 16px;
  color: rgba(255, 249, 236, 0.9);
  background: rgba(11, 13, 11, 0.56);
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

.is-ready .loading {
  opacity: 0;
}

.has-error .loading {
  color: #ffd7c2;
}

@media (max-width: 760px) {
  .viewer-shell {
    min-height: 100vh;
  }

  .product-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .spec-strip {
    justify-content: flex-start;
    max-width: 100%;
  }

  .controls {
    right: 16px;
    bottom: 24px;
    left: 16px;
    grid-template-columns: repeat(4, 44px);
    justify-content: center;
  }
}
