body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f6fb;
  width: 100%;
  max-height: 600px;
}

.viewer-wrap {
  margin: auto;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

model-viewer {
  width: 100%;
  height: 600px;
}

.overlay {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.controls {
  pointer-events: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.controls button {
  background: #fff;
  border: 1px solid #ccc;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.controls button.primary {
  background: #2b7cff;
  color: white;
  border-color: transparent;
}

.step-info {
  pointer-events: auto;
  min-width: 260px;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.instruction {
  font-size: 15px;
  margin-bottom: 8px;
  color: #0b1220;
  min-height: 2em;
}

.progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress .bar {
  height: 12px;
  background: #ddd;
  border-radius: 999px;
  overflow: hidden;
  flex: 1;
}

.progress .bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2b7cff, #1aa1ff);
  transition: width 300ms ease;
}

.progress .label {
  min-width: 86px;
  text-align: right;
  font-size: 13px;
  color: #666;
}

#mobileBanner {
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  background: rgba(255,255,255,0.95);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(12,20,40,0.12);
  font-size:16px;
  font-weight:600;
  text-align:center;
  color:#111;
  max-width:80%;
  z-index:1000;
  pointer-events:none;
  opacity:1;
  transition: opacity 0.4s ease;
}

/* fade out */
#mobileBanner.hidden {
  display: none;
}

/* Fullscreen on landscape mobile */
@media screen and (max-width: 900px){
  body {
    max-width: 100%;
    margin: 0;
    background: #000; /* optional: dark background around model */
  }

  .viewer-wrap {
    max-width: 100%;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0; /* remove rounded corners for full screen */
  }

  model-viewer {
    width: 100vw;
    height: 100vh;
  }

  .overlay {
    flex-direction: column;       /* stack items vertically */
    justify-content: flex-end;    /* push content to bottom */
    align-items: center;          /* center horizontally */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px;
  }

  .step-info {
    margin-top: auto;             /* push step-info to bottom of overlay */
    max-width: 90%;
    text-align: center;
}
}
