/* Apex owns this compact footer; other experiments keep their shared layout. */
body > [data-experiment-controls] {
  position: relative;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
}
body > [data-experiment-controls] #scenario-experiment-analytics { width: auto; }
body > [data-experiment-controls] .scenario-experiment-controls { gap: 16px; }
.experiment-about { font-size: 11px; }
.experiment-about > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.experiment-about > summary::-webkit-details-marker,
.mobile-exports > summary::-webkit-details-marker { display: none; }
.experiment-about > summary:focus-visible,
.mobile-exports > summary:focus-visible { outline: 2px solid #efa779; outline-offset: -2px; }
.experiment-about .experiment-resource-links {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  z-index: 45;
  width: min(320px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid #ffffff26;
  border-radius: 12px;
  background: #1c2933;
  justify-content: flex-start;
}
.experiment-about [data-experiment-tools] { justify-content: flex-start; }
.experiment-about [data-experiment-tools] > span { flex-basis: 100%; }
.mobile-customization-bar, .mobile-camera-slot, .mobile-exports { display: none; }

@media (max-width: 760px) {
  .experiment-studio { min-height: 660px; }
  .experiment-studio .topbar { height: 56px; padding: 0 12px; gap: 12px; background: #10171e; }
  .topbar .create-yours { border: 0; background: none; padding: 0 4px; font-size: 12px; }
  .topbar .brand > span { font-size: 23px; }
  .topbar .mobile-exports { display: block; position: relative; }
  .mobile-exports > summary {
    display: flex; align-items: center; gap: 8px; min-height: 44px;
    padding: 0 10px; border-radius: 7px; background: #25323c;
    color: #edf2f6; font-size: 12px; cursor: pointer; list-style: none;
  }
  .mobile-exports > summary svg { width: 16px; height: 16px; }
  .mobile-export-options {
    position: absolute; right: 0; top: calc(100% + 8px); width: 176px;
    padding: 6px; border: 1px solid #ffffff26; border-radius: 10px; background: #1c2933;
  }
  .mobile-export-options :is(#export-glb, #export-wallpaper) {
    width: 100%; min-height: 48px; justify-content: flex-start; border: 0; font-size: 13px;
  }
  .experiment-studio .workspace { display: flex; flex-direction: column; padding-top: 56px; }
  .experiment-studio .stage { position: relative; flex: 1; min-height: 250px; }
  .experiment-studio .stage #viewport { inset: 0; }
  .experiment-studio .stage-label {
    top: 12px; left: 16px; right: 16px; display: flex; flex-direction: row;
    align-items: center; gap: 12px; pointer-events: none;
  }
  .experiment-studio .stage-label #garage-team-mark { width: 104px; height: 36px; margin: 0; }
  .experiment-studio .stage-label .car-name { font-size: 24px; }
  .experiment-studio .stage-label .garage-season { display: none; }
  .experiment-studio .stage .stage-bottom { display: none; }
  .experiment-studio .stage-actions { top: 54px; }
  .experiment-studio .inspector {
    position: relative; inset: auto; flex: none; order: 2; width: 100%;
    height: clamp(290px, 39cqh, 330px); max-height: none; border-radius: 16px 16px 0 0;
    border: 0; border-top: 1px solid #ffffff1c; background: #17232d;
    box-shadow: none; backdrop-filter: none; opacity: 1; transform: none; visibility: visible;
  }
  .mobile-customization-bar { display: flex; flex: none; align-items: center; justify-content: space-between; padding: 0 12px; }
  #mobile-panel-toggle { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-size: 13px; color: #e5edf3; }
  #mobile-panel-toggle svg { width: 16px; height: 16px; }
  .mobile-customization-bar .header-actions { display: flex; gap: 0; }
  .mobile-customization-bar .icon-button { width: 44px; height: 44px; }
  .mobile-camera-slot { display: block; flex: none; padding: 0 12px 8px; }
  .mobile-camera-slot .camera-views {
    max-width: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    border: 0; border-radius: 8px; background: #101b24; padding: 3px; box-shadow: none; backdrop-filter: none;
  }
  .mobile-camera-slot .camera-views button { min-width: 0; min-height: 44px; gap: 0; padding: 3px; }
  .mobile-camera-slot .camera-views button svg { width: 24px; height: 24px; }
  .mobile-camera-slot .camera-views button span { font-size: 10px; }
  .experiment-studio .inspector #panel-content { padding: 8px 16px 12px; min-height: 0; max-height: none; scrollbar-gutter: auto; }
  .inspector .garage-panel-heading { margin-bottom: 10px; }
  .inspector .garage-panel-heading h1 { font-size: 22px; }
  .inspector .garage-panel-heading:has(.part-map) {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px;
  }
  .inspector .garage-panel-heading:has(.part-map) h1 { grid-column: 1; grid-row: 1; }
  .inspector #panel-content[data-tab=stickers] .garage-panel-heading > span { display: none; }
  .inspector .garage-panel-heading .part-map { display: contents; }
  .inspector .garage-panel-heading .part-map::details-content { display: contents; }
  .inspector .garage-panel-heading .part-map > summary {
    grid-column: 2; grid-row: 1; justify-content: flex-end; min-height: 44px;
    padding: 0; gap: 6px; white-space: nowrap;
  }
  .inspector .garage-panel-heading .part-map > summary canvas { width: 28px; height: 24px; }
  .inspector .garage-panel-heading .part-map > div { grid-column: 1 / -1; }
  .inspector .garage-team-grid {
    display: flex; overflow-x: auto; gap: 8px; padding: 2px 0 8px;
    scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  }
  .inspector .garage-team-tile { flex: 0 0 88px; min-height: 76px; padding: 8px 5px; scroll-snap-align: start; }
  .inspector .garage-team-tile .tile-caption { font-size: 11px; }
  .inspector .garage-team-tile .garage-logo { height: 30px; }
  .inspector .garage-active-team { display: none; }
  .inspector .preview-actions { position: static; min-height: 0; padding: 4px 0 0; background: none; }
  .inspector .preview-actions:not(:has(button)) { display: none; }
  .inspector .preview-actions button { min-height: 44px; min-width: 44px; font-size: 13px; }
  .inspector .garage-secondary-actions { margin-top: 4px; }
  .inspector .garage-secondary-actions button { min-height: 44px; font-size: 12px; }
  .experiment-studio .toolrail {
    position: static; order: 3; flex: none; transform: none; width: 100%; height: 60px;
    padding: 4px 8px; border: 0; border-top: 1px solid #ffffff12; border-radius: 0;
    background: #17232d; box-shadow: none; backdrop-filter: none;
  }
  .experiment-studio .toolrail button { flex: 1; width: auto; min-width: 0; font-size: 11px; }
  .experiment-studio .toolrail button svg { width: 20px; height: 20px; }
  .mobile-panel-collapsed .experiment-studio { min-height: 480px; }
  .mobile-panel-collapsed .experiment-studio .inspector { height: auto; }
  .mobile-panel-collapsed #panel-content { display: none; }
  .mobile-panel-collapsed #mobile-panel-toggle svg { transform: rotate(180deg); }
  body > [data-experiment-controls] { padding-bottom: env(safe-area-inset-bottom, 0px); }
  body > [data-experiment-controls] #scenario-experiment-analytics .scenario-experiment-controls { padding-bottom: 0; gap: 12px; }
  #toast { bottom: 72px; max-width: calc(100% - 24px); }
}
