.aie-explorer {
  --aie-ink: #231b15;
  --aie-paper: #fbf4e7;
  --aie-panel: #fffaf1;
  --aie-stage: #f0e4d0;
  --aie-accent: #9b6720;
  --aie-accent-strong: #6d4516;
  --aie-line: rgba(62, 43, 24, 0.18);
  --aie-shadow: 0 28px 60px rgba(41, 27, 16, 0.14);
  color: var(--aie-ink);
  font-family: inherit;
}

.aie-header {
  margin: 0 auto 24px;
  max-width: 1180px;
}

.aie-header h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.02;
}

.aie-header p {
  margin: 0;
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.6;
}

.aie-actions {
  margin-top: 18px;
}

.aie-actions a,
.aie-panel-controls button {
  border: 1px solid var(--aie-accent-strong);
  background: var(--aie-accent-strong);
  color: #fff;
  padding: 11px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.aie-actions a:hover,
.aie-actions a:focus-visible,
.aie-panel-controls button:hover,
.aie-panel-controls button:focus-visible {
  transform: translateY(-1px);
}

.aie-panel-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.aie-back-to-product {
  display: none;
  margin: 14px 18px 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--aie-accent-strong);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.aie-back-to-product:hover,
.aie-back-to-product:focus-visible {
  text-decoration: underline;
}

.aie-hotspot-actions,
.aie-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aie-hotspot-actions {
  margin-top: 18px;
}

.aie-footer-actions {
  margin: 18px auto 0;
  max-width: 1280px;
  padding-top: 18px;
}

.aie-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--aie-accent-strong);
  border-radius: 999px;
  background: var(--aie-accent-strong);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.aie-action-button.is-secondary {
  background: rgba(255, 250, 241, 0.95);
  color: var(--aie-accent-strong);
}

.aie-action-button:hover,
.aie-action-button:focus-visible {
  transform: translateY(-1px);
}

.aie-action-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.aie-stage-wrap {
  position: relative;
  margin: 0 auto;
  max-width: 1280px;
}

.aie-stage-area {
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.55), transparent 26%),
    linear-gradient(135deg, #f7ecd9 0%, #e6d3b6 100%);
  border: 1px solid rgba(109, 69, 22, 0.16);
  border-radius: 32px;
  box-shadow: var(--aie-shadow);
  overflow: hidden;
  padding: clamp(14px, 2vw, 22px);
}

.aie-stage {
  position: relative;
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 22px;
  background: var(--aie-stage);
  --aie-focus-x: 50%;
  --aie-focus-y: 50%;
  --aie-stage-scale: 1;
}

.aie-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(35, 27, 21, 0.16));
  z-index: 1;
}

.aie-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--aie-focus-x) var(--aie-focus-y), rgba(255,255,255,0) 0, rgba(255,255,255,0) 12%, rgba(32,22,14,0.08) 30%, rgba(32,22,14,0.24) 100%);
  transition: opacity 0.38s ease;
  z-index: 2;
}

.aie-stage img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  transform-origin: var(--aie-focus-x) var(--aie-focus-y);
  transform: scale(var(--aie-stage-scale));
  transition: transform 0.38s ease, transform-origin 0.38s ease;
  will-change: transform;
}

.aie-discovery-progress {
  position: absolute;
  right: 20px;
  bottom: 20px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.9);
  border: 1px solid rgba(109, 69, 22, 0.12);
  box-shadow: 0 10px 24px rgba(24, 16, 10, 0.12);
  font-size: 0.88rem;
  color: #6d4e30;
  z-index: 4;
}

.aie-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(35, 27, 21, 0.88);
  color: #fff;
  box-shadow: 0 10px 24px rgba(24, 16, 10, 0.34);
  cursor: pointer;
  z-index: 2;
  padding: 0;
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.aie-marker.is-dimmed {
  opacity: 0.42;
  filter: saturate(0.72) brightness(0.92);
}

.aie-marker.is-disabled {
  opacity: 0.34;
  cursor: not-allowed;
  box-shadow: 0 6px 18px rgba(24, 16, 10, 0.18);
}

.aie-marker span {
  position: relative;
  z-index: 2;
  font-weight: 800;
  font-size: 1rem;
}

.aie-marker::before,
.aie-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.aie-marker::before {
  inset: -7px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  opacity: 0.65;
}

.aie-marker::after {
  inset: -15px;
  border: 2px solid rgba(155, 103, 32, 0.24);
  animation: aieMarkerPulse 2.4s ease-out infinite;
}

.aie-marker:hover,
.aie-marker:focus-visible,
.aie-marker.is-active {
  background: var(--aie-accent);
  transform: translate(-50%, -50%) scale(1.16);
  box-shadow: 0 14px 32px rgba(86, 52, 17, 0.35);
}

.aie-marker.is-active::before {
  border-color: rgba(255, 255, 255, 0.94);
}

.aie-marker.is-active::after {
  border-color: rgba(155, 103, 32, 0.58);
  animation: none;
}

.aie-marker.is-bouncing {
  animation: none;
}

.aie-stage.is-focused::before {
  opacity: 1;
}

.aie-detail {
  position: absolute;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(430px, 38vw);
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.98), rgba(248, 239, 224, 0.98));
  border: 1px solid rgba(109, 69, 22, 0.14);
  border-radius: 28px;
  box-shadow: 0 24px 48px rgba(34, 23, 14, 0.2);
  overflow: hidden;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.32s ease, opacity 0.24s ease, visibility 0.24s ease;
  z-index: 4;
}

.aie-detail.is-right {
  right: 18px;
  left: auto;
  transform: translateX(calc(100% + 28px));
}

.aie-detail.is-left {
  right: auto;
  left: 18px;
  transform: translateX(calc(-100% - 28px));
}

.aie-detail.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.aie-detail::before {
  content: "";
  display: block;
  height: 7px;
  background: linear-gradient(90deg, var(--aie-accent-strong), var(--aie-accent), var(--aie-accent-strong));
}

.aie-card-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(62, 43, 24, 0.08);
  color: var(--aie-accent-strong);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.aie-placeholder {
  padding: 56px 32px 34px;
  text-align: left;
}

.aie-placeholder-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: rgba(155, 103, 32, 0.12);
  color: var(--aie-accent);
  font-size: 1.2rem;
}

.aie-placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.aie-placeholder p {
  margin: 0;
  line-height: 1.55;
}

.aie-customer-card {
  height: 100%;
  overflow: auto;
  padding: 28px 28px 112px;
  animation: aiePanelIn 0.28s ease both;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.aie-customer-card.is-content-swapping {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.aie-card-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: #7d6040;
  font-weight: 800;
}

.aie-card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--aie-accent);
  color: #fff;
  font-weight: 800;
}

.aie-card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.aie-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(155, 103, 32, 0.12);
  color: var(--aie-accent);
}

.aie-card-title-row h3 {
  margin: 0;
  padding-right: 44px;
  font-size: 1.7rem;
  line-height: 1.12;
}

.aie-card-summary {
  margin: 16px 0 0;
  font-size: 1.04rem;
  font-weight: 650;
  line-height: 1.62;
}

.aie-blocks {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.aie-blocks > :first-child {
  margin-top: 0;
}

.aie-blocks .aie-card-summary,
.aie-blocks .aie-card-section,
.aie-blocks .aie-card-callout,
.aie-blocks .aie-card-example,
.aie-blocks .aie-gallery,
.aie-blocks .aie-block-image,
.aie-blocks .aie-block-divider {
  margin-top: 0;
}

.aie-block-image {
  display: grid;
  gap: 10px;
}

.aie-block-caption {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #6d4e30;
}

.aie-video-embed {
  display: block;
  width: 100%;
  min-height: 240px;
  border: 0;
  border-radius: 18px;
  background: rgba(35, 27, 21, 0.08);
}

.aie-block-divider {
  margin: 2px 0;
  border: 0;
  border-top: 1px solid var(--aie-line);
}

.aie-block-divider.is-spacer {
  border-top: 0;
  height: 8px;
  background: transparent;
}

.aie-gallery {
  margin-top: 18px;
  min-width: 0;
  overflow: hidden;
}

.aie-gallery-main {
  margin: 0;
}

.aie-gallery-main img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.aie-gallery-thumbs {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  box-sizing: border-box;
  scrollbar-width: thin;
}

.aie-gallery-thumb {
  flex: 0 0 auto;
  width: 72px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid transparent;
  box-sizing: border-box;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.aie-gallery-thumb img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.aie-gallery-thumb:hover,
.aie-gallery-thumb:focus-visible,
.aie-gallery-thumb.is-active {
  border-color: var(--aie-accent);
  box-shadow: 0 0 0 3px rgba(155, 103, 32, 0.16);
}

.aie-card-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--aie-line);
}

.aie-customer-card h4 {
  margin: 0 0 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  color: #765537;
}

.aie-customer-card p {
  margin: 0;
  line-height: 1.65;
}

.aie-customer-card ul {
  margin: 8px 0 0 20px;
  padding: 0;
}

.aie-customer-card li {
  margin: 0 0 6px;
  line-height: 1.55;
}

.aie-card-callout,
.aie-card-example {
  margin-top: 18px;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.64);
}

.aie-card-callout {
  border-left: 4px solid var(--aie-accent);
}

.aie-card-example {
  border-left: 4px solid var(--aie-accent-strong);
  font-style: italic;
}

.aie-panel-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  background: rgba(249, 242, 231, 0.94);
  border: 1px solid rgba(109, 69, 22, 0.12);
  backdrop-filter: blur(10px);
}

.aie-panel-controls button {
  padding-inline: 16px;
  min-height: 44px;
}

.aie-panel-position {
  text-align: center;
  font-weight: 700;
  color: #6d4e30;
}

.aie-panel-controls--nav-only {
  grid-template-columns: 1fr 1fr;
}

.aie-panel-controls--progress-only {
  grid-template-columns: 1fr;
}

.aie-explorer.has-open-panel .aie-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(27, 19, 13, 0.12);
  pointer-events: none;
  z-index: 1;
}

@keyframes aieMarkerPulse {
  0% {
    opacity: 0.72;
    transform: scale(0.82);
  }
  75%,
  100% {
    opacity: 0;
    transform: scale(1.36);
  }
}

@keyframes aieMarkerBounce {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  45% {
    transform: translate(-50%, -50%) scale(1.26);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.16);
  }
}

@keyframes aiePanelIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes aiePanelSwapRight {
  from {
    opacity: 0.72;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes aiePanelSwapLeft {
  from {
    opacity: 0.72;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.aie-detail.is-open.is-side-switching.is-right {
  animation: aiePanelSwapRight 0.32s ease both;
}

.aie-detail.is-open.is-side-switching.is-left {
  animation: aiePanelSwapLeft 0.32s ease both;
}

@media (max-width: 959px) {
  .aie-header {
    margin-bottom: 18px;
  }

  .aie-stage-area {
    border-radius: 24px;
    padding: 10px;
  }

  .aie-stage {
    border-radius: 18px;
  }

  .aie-discovery-progress {
    right: 12px;
    bottom: 12px;
    font-size: 0.82rem;
  }

  .aie-stage::before {
    background:
      radial-gradient(circle at var(--aie-focus-x) var(--aie-focus-y), rgba(255,255,255,0) 0, rgba(255,255,255,0) 18%, rgba(32,22,14,0.04) 46%, rgba(32,22,14,0.12) 100%);
  }

  .aie-stage-wrap {
    position: static;
  }

  .aie-marker {
    width: 40px;
    height: 40px;
  }

  .aie-stage img {
    transform: scale(min(var(--aie-stage-scale), 1.02));
  }

  .aie-marker.is-dimmed {
    opacity: 0.72;
    filter: none;
  }
}

@media (max-width: 767px) {
  .aie-stage-wrap {
    display: block;
  }

  .aie-stage-area {
    margin-bottom: 14px;
  }

  .aie-detail,
  .aie-detail.is-left,
  .aie-detail.is-right,
  .aie-detail.is-open {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    max-height: none;
    border-radius: 24px;
    transform: none;
  }

  .aie-detail {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
  }

  .aie-detail:not(.is-open) {
    display: none;
  }

  .aie-customer-card {
    height: auto;
    overflow: visible;
    padding: 24px 18px 28px;
  }

  .aie-gallery-thumb {
    width: 64px;
  }

  .aie-gallery-thumb img {
    height: 64px;
  }

  .aie-video-embed {
    min-height: 200px;
  }

  .aie-panel-controls {
    position: static;
    margin: 0 18px;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 10px;
    border-radius: 18px;
    backdrop-filter: none;
  }

  .aie-panel-controls button {
    width: 100%;
    min-width: 0;
  }

  .aie-panel-position {
    min-width: 68px;
    font-size: 0.95rem;
  }

  .aie-panel-controls--nav-only {
    grid-template-columns: 1fr 1fr;
  }

  .aie-panel-controls--progress-only {
    grid-template-columns: 1fr;
  }

  .aie-back-to-product {
    display: inline-flex;
    align-items: center;
  }

  .aie-footer-actions {
    padding-top: 14px;
  }
}

@media (max-width: 640px) {
  .aie-header h2 {
    font-size: 2rem;
  }

  .aie-card-close {
    top: 12px;
    right: 12px;
  }

  .aie-card-title-row h3 {
    font-size: 1.36rem;
    padding-right: 36px;
  }

  .aie-panel-controls {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aie-marker,
  .aie-detail,
  .aie-actions a,
  .aie-panel-controls button,
  .aie-customer-card,
  .aie-stage img,
  .aie-stage::before {
    transition: none;
    animation: none;
  }

  .aie-marker::after {
    animation: none;
  }
}
