/* MyProject global: no focus rings or tap highlights on anything, ever.
   Buttons stay focusable (keyboard nav works); only the visual ring dies. */
*:focus,
*:focus-visible,
*:focus-within { outline: 0 !important; }
button::-moz-focus-inner,
[role="button"]::-moz-focus-inner { border: 0 !important; }
* { -webkit-tap-highlight-color: transparent !important; }

/* MyProject Sketchfab Player — full-viewport 3D/360 viewer stage. */

* { box-sizing: border-box; }

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: #000 !important;
}

.mp-sketchfab-stage {
  position: fixed !important;
  inset: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #000 !important;
}

#mp-sketchfab-frame {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block !important;
}

/* MYP-38 round 2: the iframe and the control panel share one wrapper. Our
   fullscreen toggle promotes THIS element (not the iframe) to the top layer,
   so the panel survives fullscreen; entering/exiting just swaps the chrome
   around an unchanged iframe. */
.mp-sketchfab-wrap {
  position: absolute;
  inset: 0;
  background: #000;
}

.mp-sketchfab-wrap:fullscreen,
.mp-sketchfab-wrap:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #000;
}

/* MYP-38 round 3 (Armin's PBM.svg reference, 2026-09-09): the whole shared
   panel gets his dark panel background — solid #262626 in the reference,
   rendered here as near-opaque #262626 glass with a soft top gloss so it
   stays premium over any model frame. Shape language from the reference:
   stadium-rounded LEFT cap, straight/open right side anchored flush against
   the screen's right edge. Icons carry NO individual backgrounds (no chip,
   no ring); Home (gold-tinted verbatim home.svg) and Sound stay matched in
   color and weight on the dark backdrop. Docked TOP-RIGHT; the wrapper
   keeps the panel alive in fullscreen. */

.mp-sketchfab-panel {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(0px, env(safe-area-inset-right));
  left: auto;
  z-index: 1000001;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 10px;
  border: 0;
  border-radius: 999px 0 0 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 38%),
    rgba(38, 38, 38, .92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 6px 18px rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  user-select: none;
  -webkit-user-select: none;
}

.mp-sketchfab-ctrl {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #A58141;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s ease;
}

.mp-sketchfab-ctrl:hover,
.mp-sketchfab-ctrl:focus-visible {
  background: rgba(255, 255, 255, .10);
  outline: none;
}

.mp-sketchfab-ctrl:active {
  background: rgba(255, 255, 255, .16);
}

.mp-sketchfab-ctrl svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

/* MYP-38 correction (Armin, 2026-09-09): no chip, no ring, no ivory
   background, no separate glow — the Home control renders exactly like the
   panel's other buttons (same .mp-sketchfab-ctrl chrome, hover and active;
   same gold). The asset's glyph is a pure-black-on-transparent raster
   (verified pixel-exact against the file), so the panel gold #A58141 is
   produced with a deterministic filter solved for pure black -> #A58141
   (invert(72%) sepia(55%) saturate(380%) hue-rotate(-2deg) brightness(65%)).
   The home.svg artwork is never edited and the rendered glyph size is
   unchanged (18px, as it was inside the removed 26px chip). */
#mp-sketchfab-back svg {
  width: 18px;
  height: 18px;
  filter: invert(72%) sepia(55%) saturate(380%) hue-rotate(-2deg) brightness(65%);
}

.mp-sketchfab-icon-hidden { display: none !important; }

.mp-sketchfab-separator {
  width: 1px;
  height: 20px;
  background: rgba(165, 129, 65, .30);
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .mp-sketchfab-panel {
    top: max(10px, env(safe-area-inset-top));
    right: max(0px, env(safe-area-inset-right));
    gap: 4px;
    padding: 2px 8px;
  }

  .mp-sketchfab-ctrl {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .mp-sketchfab-ctrl svg {
    width: 20px;
    height: 20px;
  }

  #mp-sketchfab-back svg {
    width: 16px;
    height: 16px;
  }
}
