
:root {
  --studio: #ffffff;
  --sky: #708fa2;
  --panel: #f4f7f8;
  --acid: #edff39;
  --ink: #18313f;
  --muted: #667983;
  --line: rgba(24, 49, 63, .18);
  --on-acid: #10190c;
  --gutter: clamp(20px, 4vw, 72px);
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--studio);
  font-synthesis: none;

  --legend-bg: rgba(12, 28, 40, .78);
  --legend-border: rgba(255,255,255,.28);
  --legend-shadow: 0 18px 42px rgba(8, 24, 34, .22);
  --legend-heading: rgba(255,255,255,.72);
  --legend-title: #ffffff;
  --legend-copy: rgba(255,255,255,.76);
  --legend-item-bg: rgba(255,255,255,.10);
  --legend-item-border: rgba(255,255,255,.16);
  --legend-item-hover: rgba(255,255,255,.17);
  --legend-blur: 16px;
}

html[data-callout-theme="glass-light"] {
  --legend-bg: rgba(255,255,255,.82);
  --legend-border: rgba(255,255,255,.72);
  --legend-shadow: 0 18px 42px rgba(25, 45, 60, .16);
  --legend-heading: #526773;
  --legend-title: #162f3d;
  --legend-copy: #657985;
  --legend-item-bg: rgba(255,255,255,.48);
  --legend-item-border: rgba(24,49,63,.12);
  --legend-item-hover: rgba(255,255,255,.76);
  --legend-blur: 18px;
}

html[data-callout-theme="navy"] {
  --legend-bg: #15384a;
  --legend-border: rgba(255,255,255,.18);
  --legend-shadow: 0 16px 38px rgba(5, 25, 36, .28);
  --legend-heading: #a9bdc8;
  --legend-title: #ffffff;
  --legend-copy: #c7d3da;
  --legend-item-bg: rgba(255,255,255,.07);
  --legend-item-border: rgba(255,255,255,.12);
  --legend-item-hover: rgba(255,255,255,.13);
  --legend-blur: 0px;
}

html[data-callout-theme="white"] {
  --legend-bg: #ffffff;
  --legend-border: rgba(24,49,63,.18);
  --legend-shadow: 0 14px 34px rgba(24,49,63,.16);
  --legend-heading: #627680;
  --legend-title: #18313f;
  --legend-copy: #667983;
  --legend-item-bg: #f6f8f9;
  --legend-item-border: rgba(24,49,63,.10);
  --legend-item-hover: #edf2f4;
  --legend-blur: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; background: var(--studio); }
html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--acid); outline-offset: 4px; }
[hidden] { display: none !important; }

.experience {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--studio);
}
.experience.edit-mode .callout-layer { pointer-events: auto; }
.experience.edit-mode .callout { cursor: grab; }
.experience.edit-mode .callout:active { cursor: grabbing; }
.experience.edit-mode .callout-layer.shown .callout { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.masthead {
  min-height: 72px;
  width: calc(100% - 2 * var(--gutter));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.wordmark { font-size: 24px; letter-spacing: -.05em; font-weight: 700; display: inline-flex; align-items: baseline; gap: .08em; }
.wordmark-grab { font-style: italic; font-weight: 700; }
.header-middle { font-size: 14px; color: var(--muted); text-align: center; }
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cms-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.sound-control,
.position-toggle,
.cms-link,
.editor-toolbar button,
.editor-close,
.replay,
.play-fallback button,
.callout-list-item {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}
.sound-control:hover,
.position-toggle:hover,
.cms-link:hover,
.editor-toolbar button:hover,
.editor-close:hover,
.callout-list-item:hover { background: #ffffff10; }
.position-toggle.active {
  background: var(--acid);
  color: var(--on-acid);
  border-color: transparent;
}

.stage {
  position: relative;
  flex: 1;
  width: 100%;
  padding: 26px var(--gutter) 20px;
}

.intro {
  width: min(1080px, 100%);
  margin: 0 auto 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  transition: opacity .35s ease;
}
.intro.quiet { opacity: .68; }
.intro h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: .95;
  font-weight: 400;
  letter-spacing: -.04em;
}

.animated-title {
  display: flex;
  align-items: baseline;
  width: min(720px, 70vw);
  min-width: 0;
  min-height: 1em;
  white-space: nowrap;
}
.typed-title-text {
  display: inline-block;
  min-height: 1em;
  padding-right: .08em;
  border-right: .055em solid currentColor;
  animation: titleCaretBlink .82s step-end infinite;
}
@keyframes titleCaretBlink {
  0%, 46% { border-right-color: currentColor; }
  47%, 100% { border-right-color: transparent; }
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@keyframes legendNeonPulse {
  0%, 100% {
    opacity: 0.42;
    box-shadow: 0 0 0 1px rgba(225, 255, 52, 0.16), 0 0 10px rgba(225, 255, 52, 0.18), 0 0 22px rgba(225, 255, 52, 0.10);
  }
  50% {
    opacity: 0.96;
    box-shadow: 0 0 0 1px rgba(225, 255, 52, 0.32), 0 0 18px rgba(225, 255, 52, 0.42), 0 0 42px rgba(225, 255, 52, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .typed-title-text {
    border-right: 0;
    animation: none;
  }
}
.intro p { margin: 0; text-align: right; color: var(--muted); font-size: 14px; line-height: 1.4; }
.intro p span { display: block; }

.media-layout {
  position: relative;
  width: min(1600px, calc(100vw - 2 * var(--gutter)));
  margin: 0 auto;
}

.media-plane {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

.media-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: none;
  background: #07111d;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  transform: scale(1);
  transform-origin: center center;
  transition: transform .45s cubic-bezier(.22,.7,.25,1);
}

/* Drug Store, Gourmet, and Dollar scenes are intentionally shown 15% smaller. */
.experience[data-scene-id="drug-store"] .hero-video,
.experience[data-scene-id="dollar"] .hero-video,
.experience[data-scene-id="gourmet"] .hero-video {
  transform: scale(.85);
  transform-origin: center top;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #07111d;
}

@keyframes storeLayoutTiltIn {
  0% {
    opacity: .58;
    transform: perspective(1500px) rotateX(58deg) translateY(10%) scale(.86);
  }
  42% {
    opacity: .86;
    transform: perspective(1500px) rotateX(30deg) translateY(5%) scale(.93);
  }
  100% {
    opacity: 1;
    transform: perspective(1500px) rotateX(0deg) translateY(0) scale(1);
  }
}

.experience[data-scene-id="grocery"] .hero-image.is-tilting,
.experience[data-scene-id="drug-store"] .hero-image.is-tilting {
  transform-origin: center bottom;
  will-change: transform, opacity;
  animation: storeLayoutTiltIn 3.5s cubic-bezier(.22,.7,.25,1) both;
}
.scene-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
  background: linear-gradient(135deg, #eef3f5, #ffffff);
  color: var(--ink);
}
.scene-empty strong { font-size: clamp(22px, 3vw, 38px); font-weight: 500; letter-spacing: -.03em; }
.scene-empty span { max-width: 440px; color: var(--muted); font-size: 14px; }

.callout-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.callout-layer.shown { pointer-events: auto; }

.callout {
  position: absolute;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%) scale(.72);
  opacity: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: none;
  transition: opacity .35s ease var(--delay), transform .45s cubic-bezier(.22,.7,.25,1) var(--delay);
}
.callout-layer.shown .callout {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
.callout.selected { z-index: 6; }
.callout.dragging { z-index: 7; }

.callout-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  margin-top: -15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--on-acid);
  background: var(--acid);
  box-shadow: 0 0 0 5px #edff3920;
  transition:
    opacity .48s cubic-bezier(.22,.7,.25,1) .42s,
    transform .48s cubic-bezier(.22,.7,.25,1) .42s,
    box-shadow .18s ease;
  font-size: 13px;
  line-height: 1;
  opacity: 1;
}
.callout.selected .callout-ring {
  transform: scale(1.08);
  box-shadow: 0 0 0 7px #edff3942;
}
.callout-ring::after {
  content: '';
  position: absolute;
  width: 38px;
  height: 38px;
  border: 1px solid #edff3980;
  border-radius: 50%;
  animation: pulse 2.8s ease-in-out infinite;
}

.callout-card {
  position: absolute;
  width: 164px;
  opacity: 0;
  filter: blur(5px);
  translate: 0 7px;
  transition:
    opacity .46s cubic-bezier(.22,.7,.25,1) .18s,
    filter .46s cubic-bezier(.22,.7,.25,1) .18s,
    translate .46s cubic-bezier(.22,.7,.25,1) .18s,
    border-color .18s ease;
  pointer-events: none;
  background: rgba(16, 25, 12, 0.78);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  padding: 10px 12px;
  color: #ffffff;
  backdrop-filter: blur(6px);
  text-align: left;
}
.callout.align-right .callout-card { left: 20px; }
.callout.align-left .callout-card { right: 20px; }
.callout.align-center .callout-card { left: 50%; transform: translateX(-50%); }
.callout.place-below .callout-card { top: 28px; }
.callout.place-above .callout-card { bottom: 28px; }

.callout-line {
  position: absolute;
  width: 2px;
  opacity: 0;
  background: rgba(237,255,57,.9);
  left: 0;
  transform: translateX(-50%) scaleY(0);
  transform-origin: center top;
  transition:
    opacity .28s ease .06s,
    transform .34s cubic-bezier(.22,.7,.25,1) .06s;
}
.callout.place-below .callout-line { top: 14px; height: 22px; transform-origin: center top; }
.callout.place-above .callout-line { bottom: 14px; height: 22px; transform-origin: center bottom; }

.callout.description-shown .callout-card,
.experience.edit-mode .callout .callout-card {
  opacity: 1;
  filter: blur(0);
  translate: 0 0;
  pointer-events: auto;
}
.callout.description-shown .callout-line,
.experience.edit-mode .callout .callout-line {
  opacity: 1;
  transform: translateX(-50%) scaleY(1);
}
/* Let the original marker lead the eye into the label, then dissolve it only
   after the card has begun to settle. This leaves a single number in the card. */
.callout.description-shown .callout-ring {
  opacity: 0;
  transform: scale(.72);
}
.experience.edit-mode .callout .callout-ring {
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.experience.edit-mode .callout .callout-card,
.experience.edit-mode .callout .callout-line {
  transition-delay: 0s;
}

.callout-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--acid);
  color: var(--on-acid);
  font-size: 11px;
  margin-bottom: 8px;
}
.callout-title {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}
.callout-subtitle {
  display: block;
  margin-top: 4px;
  color: #e1eaf0;
  font-size: 11px;
  line-height: 1.25;
}
.callout:hover .callout-ring,
.callout:focus-visible .callout-ring { transform: scale(1.08); box-shadow: 0 0 0 6px #edff3930; }
.callout.selected .callout-card,
.callout:hover .callout-card,
.callout:focus-visible .callout-card {
  border-color: rgba(237,255,57,.65);
}

.callout-coords {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--ink);
  background: rgba(16, 25, 12, 0.82);
  padding: 4px 6px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .18s ease;
}
.experience.edit-mode .callout.selected .callout-coords,
.experience.edit-mode .callout:hover .callout-coords { opacity: 1; }

.edit-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(16, 25, 12, 0.72);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  color: #ffffff;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { opacity: .28; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.08); }
}

.play-fallback {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.25);
  border-radius: 16px;
}
.play-fallback button, .replay {
  border: 0;
  background: var(--acid);
  color: var(--on-acid);
}

.scene-selector {
  position: absolute !important;
  left: 50% !important;
  bottom: 24px !important;
  z-index: 50 !important;
  transform: translateX(-50%) !important;
  width: min(820px, calc(100% - 120px)) !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto !important;
  align-items: center !important;
  gap: 24px !important;
  padding: 16px 20px 48px !important;
  border: 1px solid rgba(255,255,255,.34) !important;
  border-radius: 20px !important;
  background: rgba(18, 48, 64, .80) !important;
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: 0 18px 48px rgba(15,40,52,.28) !important;
  color: #ffffff !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.scene-selector-copy { min-width: 0; display: grid; gap: 2px; }
.scene-selector-kicker {
  color: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.scene-selector-copy strong { font-size: 20px; font-weight: 500; line-height: 1.1; }
.scene-selector-copy > span:last-child { color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.3; }
.scene-selector-options { display: flex !important; align-items: center; justify-content: flex-end; gap: 18px; min-width: 280px; }
.scene-option {
  position: relative;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 50%;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--scene-accent, #8ca1ac);
  color: #102732;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.18);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}
.scene-option:hover { transform: translateY(-2px); }
.scene-option.active {
  border-color: var(--acid);
  box-shadow: 0 0 0 3px rgba(237,255,57,.23), inset 0 0 0 3px rgba(255,255,255,.24);
}
.scene-option.unconfigured { opacity: .56; }
.scene-option-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.scene-option::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(100% + 9px);
  transform: translateX(-50%);
  padding: 5px 7px;
  border-radius: 5px;
  background: rgba(16,39,50,.92);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 1;
  pointer-events: none;
  transition: opacity .18s ease;
}
.scene-option:hover::after,
.scene-option:focus-visible::after { opacity: 1; }

.scene-controls {
  width: min(1080px, 100%);
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.scene-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}
.status { font-size: 14px; color: var(--muted); }
.replay { flex: 0 0 auto; }

.callout-side {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: min(270px, calc(50% - 36px));
  max-height: calc(100% - 36px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--legend-border);
  border-radius: 16px;
  background: var(--legend-bg);
  -webkit-backdrop-filter: blur(var(--legend-blur)) saturate(135%);
  backdrop-filter: blur(var(--legend-blur)) saturate(135%);
  box-shadow: var(--legend-shadow);
  isolation: isolate;
}
.callout-side::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  border: 1px solid rgba(225, 255, 52, 0.9);
  box-shadow: 0 0 0 1px rgba(225, 255, 52, 0.18), 0 0 14px rgba(225, 255, 52, 0.28), 0 0 28px rgba(225, 255, 52, 0.14);
  opacity: 0.55;
  animation: legendNeonPulse 2.8s ease-in-out infinite;
}
.callout-side-left { left: 18px; }
.callout-side-right { right: 18px; }
.callout-list-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: none;
  line-height: 1.25;
  color: var(--legend-heading);
  margin: 2px 2px 12px;
}
.callout-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.callout-list li { margin: 0; }
.callout-list-item {
  width: 100%;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--legend-item-bg);
  border-color: var(--legend-item-border);
  color: var(--legend-title);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.callout-list-item:hover {
  background: var(--legend-item-hover);
  transform: translateY(-1px);
}
.callout-list-item.active {
  border-color: rgba(237,255,57,.72);
  background: var(--legend-item-hover);
}
.callout-list-number {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--acid);
  color: var(--on-acid);
  font-size: 11px;
  font-weight: 600;
}
.callout-list-copy strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--legend-title);
}
.callout-list-copy span {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  color: var(--legend-copy);
  margin-top: 3px;
}

.scene-footer {
  width: calc(100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 18px 0 16px;
  color: var(--muted);
}
.footer-note { font-size: 13px; line-height: 1.45; margin-bottom: 16px; }
.footer-baseline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 12px;
}

.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 21;
  background: rgba(8, 28, 40, .20);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: detailBackdropIn .28s ease both;
}

@keyframes detailBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.detail-panel,
.editor-panel {
  position: fixed;
  z-index: 20;
  width: min(380px, calc(100vw - 40px));
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}
.editor-panel {
  right: max(20px, 4vw);
  bottom: max(20px, 4vw);
  background: var(--panel);
}
.detail-panel {
  z-index: 22;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 30px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.78), rgba(242,249,252,.66));
  color: #17384c;
  border: 1px solid rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  backdrop-filter: blur(24px) saturate(145%);
  box-shadow:
    0 28px 90px rgba(7,31,46,.22),
    inset 0 1px 0 rgba(255,255,255,.72),
    inset 0 0 0 1px rgba(23,56,76,.04);
  transition: width .28s ease, height .28s ease, transform .28s ease, opacity .28s ease;
  animation: detailGlassIn .34s cubic-bezier(.22,.7,.25,1) both;
}

@keyframes detailGlassIn {
  from { opacity: 0; transform: translate(-50%, -47%) scale(.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.detail-panel.has-image {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}
.detail-content { display: block; }
.detail-media {
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255,255,255,.56);
  border: 1px solid rgba(255,255,255,.62);
}
.detail-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 62vh;
  object-fit: contain;
}
.detail-panel.has-image.image-landscape .detail-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.detail-panel.has-image.image-landscape .detail-media img {
  width: 100%;
  max-height: 56vh;
}
.detail-panel.has-image.image-portrait,
.detail-panel.has-image.image-square {
  width: min(860px, calc(100vw - 40px));
}
.detail-panel.has-image.image-portrait .detail-content,
.detail-panel.has-image.image-square .detail-content {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(260px, 1fr);
  align-items: center;
  gap: 22px;
}
.detail-panel.has-image.image-portrait .detail-media img {
  max-height: 74vh;
}
.detail-panel.has-image.image-square .detail-media img {
  max-height: 62vh;
}
.detail-copy { min-width: 0; }
.editor-panel { z-index: 21; max-height: calc(100vh - 40px); overflow-y: auto; }
.detail-close,
.editor-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 42px;
  height: 42px;
  border-radius: 7px;
}
.detail-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}
.detail-close:hover { background: rgba(255,255,255,.42); }
.detail-index { color: var(--acid); font-size: 12px; margin-bottom: 14px; }
.detail-panel h2 { margin: 0 36px 12px 0; font-size: 30px; font-weight: 500; letter-spacing: -.035em; }
.detail-panel p { margin: 0; color: #607682; font-size: 15px; line-height: 1.55; }

.editor-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.editor-kicker {
  color: var(--acid);
  font-size: 12px;
  margin-bottom: 4px;
}
.editor-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -.03em;
}
.editor-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.export-row { margin-top: 4px; }
.image-toolbar.full { grid-column: 1 / -1; margin-top: -4px; }
.editor-toolbar button {
  min-height: 40px;
  padding: 8px 10px;
}
.field {
  display: block;
  margin-bottom: 14px;
}
.field span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--muted);
}
.field input,
.field textarea,
.field select,
.export-output,
.import-output {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  color: var(--ink);
  padding: 10px 12px;
}
.field textarea { resize: vertical; }
.export-output,
.import-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field.full { grid-column: 1 / -1; }

@media (max-width: 1200px) {
  .media-layout { width: min(1400px, calc(100vw - 2 * var(--gutter))); }
  .callout-side { width: min(235px, calc(50% - 32px)); padding: 12px; }
  .scene-selector { width: min(650px, calc(100% - 520px)); min-width: 500px; gap: 16px; padding: 14px 16px 44px !important; }
  .scene-selector-options { gap: 12px; }
  .scene-option { width: 48px; height: 48px; }
}

@media (max-width: 900px) {
  .animated-title { width: 100%; }
  :root { --gutter: 20px; }
  .masthead { width: calc(100% - 40px); grid-template-columns: 1fr auto; }
  .header-middle { display: none; }
  .stage { padding-top: 22px; }
  .intro { display: block; }
  .intro p { margin-top: 12px; text-align: left; }
  .media-layout {
    width: min(calc(100vw - 40px), 900px);
    display: flex;
    flex-direction: column;
  }
  .media-plane { width: 100%; aspect-ratio: 16 / 9; order: 1; }
  .scene-selector {
    position: static !important;
    order: 2;
    transform: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 14px;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding-bottom: 44px !important;
  }
  .scene-selector-options { justify-content: flex-start !important; flex-wrap: wrap; min-width: 0; }
  .callout-side {
    position: static;
    transform: none;
    width: 100%;
    max-height: none;
    margin-top: 14px;
    padding: 14px;
    overflow: visible;
  }
  .callout-side-left { order: 3; }
  .callout-side-right { order: 4; }
  .scene-footer { width: calc(100% - 40px); }
}

@media (max-width: 700px) {
  .header-actions { gap: 8px; }
  .position-toggle,
  .sound-control { font-size: 13px; }
  .callout-side {
    padding: 12px;
  }
  .editor-panel {
    left: 20px;
    right: 20px;
    width: auto;
    bottom: 20px;
  }
  .detail-panel,
  .detail-panel.has-image,
  .detail-panel.has-image.image-portrait,
  .detail-panel.has-image.image-square {
    left: 20px;
    right: 20px;
    top: 50%;
    bottom: auto;
    width: auto;
    transform: translateY(-50%);
    max-height: calc(100vh - 40px);
  }
  .detail-panel.has-image.image-portrait .detail-content,
  .detail-panel.has-image.image-square .detail-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .detail-media img { max-height: 48vh; }
}

@media (max-width: 520px) {
  .wordmark { font-size: 21px; }
  .sound-control,
  .position-toggle { font-size: 12px; padding: 8px 10px; }
  .intro h1 { font-size: 34px; }
  .scene-selector { padding: 14px 14px 44px !important; border-radius: 14px; }
  .scene-selector-options { gap: 12px; }
  .scene-option { width: 46px; height: 46px; }
  .media-frame, .play-fallback { border-radius: 12px; }
  .callout-card { width: 132px; padding: 8px 10px; }
  .callout-title { font-size: 12px; }
  .callout-subtitle { font-size: 10px; }
  .callout-side {
    padding: 12px;
  }
  .callout-list-heading { margin-bottom: 8px; font-size: 12px; }
  .footer-baseline { flex-direction: column; gap: 6px; }
  .field-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}


/* ===== Store Tilt section heading ===== */
.store-format-heading {
  width:min(1400px,calc(100% - 40px));
  margin:42px auto 14px;
  text-align:center;
  color:#102732;
}
.store-format-heading h2 {
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  font-size:clamp(42px,3.8vw,68px);
  line-height:.98;
  white-space:nowrap;
  letter-spacing:-.045em;
  font-weight:600;
}
.store-format-heading p {
  margin:10px 0 0;
  font-size:clamp(16px,1.35vw,22px);
  line-height:1.3;
  letter-spacing:.10em;
  font-weight:600;
}
@media (max-width:700px){
  .store-format-heading { width:calc(100% - 28px); margin:36px auto 12px; }
  .store-format-heading h2 { font-size:clamp(32px,9vw,44px); white-space:normal; }
  .store-format-heading p { font-size:14px; letter-spacing:.07em; }
}

/* ===== Top store-format switcher ===== */
.scene-selector.scene-selector-top {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: min(760px, calc(100% - 40px)) !important;
  margin: 4px auto 8px !important;
  padding: 5px !important;
  display: block !important;
  border: 1px solid rgba(16,39,50,.16) !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.82) !important;
  box-shadow: 0 12px 32px rgba(15,40,52,.10) !important;
  color: #102732 !important;
  -webkit-backdrop-filter: blur(14px) saturate(125%);
  backdrop-filter: blur(14px) saturate(125%);
}
.scene-selector.scene-selector-top .scene-selector-copy { display:none !important; }
.scene-selector.scene-selector-top .scene-selector-options {
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:5px !important;
  min-width:0 !important;
  width:100%;
}
.scene-selector.scene-selector-top .scene-option {
  width:100% !important;
  height:42px !important;
  border:0 !important;
  border-radius:999px !important;
  padding:0 16px !important;
  background:transparent !important;
  color:#102732 !important;
  box-shadow:none !important;
  font-size:13px !important;
  font-weight:600 !important;
  white-space:nowrap;
  transform:none !important;
  opacity:1 !important;
}
.scene-selector.scene-selector-top .scene-option:hover {
  background:rgba(16,39,50,.06) !important;
}
.scene-selector.scene-selector-top .scene-option.active {
  background:#102732 !important;
  color:#fff !important;
  box-shadow:0 4px 14px rgba(16,39,50,.18) !important;
}
.scene-selector.scene-selector-top .scene-option::after { display:none !important; }
.scene-selector.scene-selector-top .scene-option.unconfigured { opacity:1 !important; }
.scene-footer { display:none !important; }
@media (max-width:700px){
  .scene-selector.scene-selector-top { width:calc(100% - 28px) !important; border-radius:18px !important; }
  .scene-selector.scene-selector-top .scene-selector-options { grid-template-columns:1fr 1fr; }
  .scene-selector.scene-selector-top .scene-option { height:40px !important; }
}


/* ===== Embedded Store Tilt cleanup / editor controls ===== */
.masthead { display:none !important; }
.editor-tools {
  position:fixed;
  top:14px;
  right:18px;
  z-index:50;
  display:flex;
  align-items:center;
  gap:10px;
}
.editor-tools[hidden] { display:none !important; }
.editor-tools .cms-link,
.editor-tools .position-toggle,
.editor-tools .sound-control {
  background:rgba(255,255,255,.92);
  border:1px solid rgba(16,39,50,.16);
  border-radius:10px;
  min-height:42px;
  padding:0 16px;
  color:#102732;
  box-shadow:0 5px 20px rgba(16,39,50,.08);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.scene-selector.scene-selector-top .scene-option {
  font-size:14px !important;
  letter-spacing:0 !important;
}
@media (max-width:700px){
  .editor-tools{top:8px;right:8px;gap:6px;}
  .editor-tools .cms-link,.editor-tools .position-toggle,.editor-tools .sound-control{min-height:36px;padding:0 10px;font-size:12px;}
}


/* ===== Collapsible revenue legends ===== */
.legend-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 8;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(225,255,52,.88);
  border-radius: 50%;
  background: rgba(16,39,50,.84);
  color: #e1ff34;
  font: 400 30px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.22), 0 0 18px rgba(225,255,52,.18);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  backdrop-filter: blur(12px) saturate(135%);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.legend-toggle:hover { transform: scale(1.06); background: rgba(16,39,50,.94); box-shadow: 0 10px 28px rgba(0,0,0,.26), 0 0 24px rgba(225,255,52,.25); }
.legend-toggle:focus-visible { outline: 2px solid #e1ff34; outline-offset: 3px; }
.legend-toggle.is-open { font-size: 28px; }
@media (max-width: 900px) {
  .legend-toggle { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 28px; }
}

/* ===== ChillGrabGo dark-blue section theme ===== */
html,
body,
.experience{
  background:
    radial-gradient(circle at 50% 42%, rgba(82,170,255,.25) 0%, rgba(55,151,236,.12) 31%, rgba(8,20,36,0) 64%),
    linear-gradient(180deg, #07111d 0%, #0d2747 52%, #07111d 100%) !important;
  background-attachment:fixed !important;
  color:#fff !important;
}
.media-frame,
.hero-image{
  background:transparent !important;
}
.store-format-heading{
  color:#fff !important;
}
.store-format-heading p{
  color:rgba(255,255,255,.82) !important;
}
.scene-selector.scene-selector-top{
  border-color:rgba(255,255,255,.20) !important;
  background:rgba(10,27,43,.88) !important;
  color:#fff !important;
  box-shadow:0 14px 36px rgba(0,0,0,.30) !important;
}
.scene-selector.scene-selector-top .scene-option{
  color:#fff !important;
}
.scene-selector.scene-selector-top .scene-option:hover{
  background:rgba(82,170,255,.14) !important;
}
.scene-selector.scene-selector-top .scene-option.active{
  background:#52aaff !important;
  color:#06101c !important;
  box-shadow:0 5px 18px rgba(82,170,255,.30) !important;
}
.editor-tools .cms-link,
.editor-tools .position-toggle,
.editor-tools .sound-control{
  color:#fff !important;
  background:rgba(10,27,43,.88) !important;
  border-color:rgba(255,255,255,.22) !important;
  box-shadow:0 5px 20px rgba(0,0,0,.24) !important;
}
