/* AMK project showroom only. No page, hero, navigation, or global overrides. */
.amk-stage {
  --stage-ink: #292b28;
  --stage-muted: #66685f;
  --stage-gold: #88723f;
  --stage-line: rgba(90, 82, 59, 0.16);
  position: relative;
  isolation: isolate;
  min-inline-size: 0;
  overflow: hidden;
  color: var(--stage-ink);
  background: rgba(252, 250, 244, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  box-shadow: 0 2px 3px rgba(58, 49, 26, 0.025), 0 24px 72px -42px rgba(58, 49, 26, 0.22), inset 0 0 0 1px rgba(96, 81, 44, 0.075);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
  font-family: inherit;
  letter-spacing: 0;
}

.amk-stage *,
.amk-stage *::before,
.amk-stage *::after {
  box-sizing: border-box;
}

.amk-stage [data-stage-surface] {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 25rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: inherit;
  outline: none;
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
}

/* A restrained ground reference belongs to this device stage, not the page. */
.amk-stage [data-stage-surface]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image: linear-gradient(rgba(108, 96, 64, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(108, 96, 64, 0.09) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 12%, transparent 73%);
  mask-image: radial-gradient(ellipse at center, #000 12%, transparent 73%);
}

.amk-stage [data-stage-surface]::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 7px;
  pointer-events: none;
  border: 1px solid transparent;
  border-radius: 21px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.amk-stage [data-stage-surface]:focus-visible::after {
  border-color: var(--stage-gold);
  box-shadow: inset 0 0 0 2px rgba(136, 114, 63, 0.14);
}

.amk-stage .stage-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0;
  transition: opacity 420ms ease;
  pointer-events: none;
}

.amk-stage .stage-fallback {
  position: absolute;
  z-index: 1;
  inset: 8% 7%;
  display: block;
  inline-size: 86%;
  block-size: 84%;
  max-inline-size: 100%;
  margin: auto;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  filter: drop-shadow(0 16px 18px rgba(30, 35, 32, 0.13));
  opacity: 1;
  visibility: visible;
  transition: opacity 260ms ease, visibility 260ms ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.amk-stage .stage-fallback[data-fallback-view="mobile"] {
  inset: 7% 16%;
  inline-size: 68%;
  block-size: 86%;
}

.amk-stage[data-stage-state="ready"] .stage-canvas {
  opacity: 1;
}

.amk-stage[data-stage-state="ready"] .stage-fallback {
  opacity: 0;
  visibility: hidden;
}

.amk-stage[data-stage-state="ready"] [data-stage-surface] {
  cursor: grab;
}

.amk-stage[data-stage-interacting="true"] [data-stage-surface] {
  cursor: grabbing;
  user-select: none;
}

.amk-stage[data-stage-state="loading"] [data-stage-surface] {
  cursor: progress;
}

.amk-stage[data-stage-state="fallback"] .stage-fallback,
.amk-stage[data-stage-state="disposed"] .stage-fallback {
  opacity: 1;
  visibility: visible;
}

/* Both class and data hooks are supported; controls can sit above or below. */
.amk-stage .stage-toolbar,
.amk-stage [data-stage-toolbar],
.amk-stage .stage-controls,
.amk-stage [data-stage-controls] {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-inline-size: 0;
  padding: 0 20px 20px;
}

.amk-stage .stage-toolbar .stage-controls,
.amk-stage [data-stage-toolbar] [data-stage-controls] {
  padding: 0;
}

.amk-stage [data-stage-view],
.amk-stage [data-stage-reset] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-inline-size: 44px;
  min-block-size: 44px;
  margin: 0;
  padding: 10px 16px;
  overflow: hidden;
  color: #5e6058;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(40, 35, 22, 0.025), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.amk-stage [data-stage-view] svg,
.amk-stage [data-stage-reset] svg {
  flex: 0 0 auto;
  inline-size: 16px;
  block-size: 16px;
  stroke: currentColor;
  pointer-events: none;
}

.amk-stage [data-stage-view][aria-pressed="true"] {
  color: #fffdf7;
  background: #35382f;
  border-color: #35382f;
  box-shadow: 0 4px 12px rgba(37, 42, 32, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.amk-stage [data-stage-reset] {
  color: #796638;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.amk-stage [data-stage-view]:focus-visible,
.amk-stage [data-stage-reset]:focus-visible {
  outline: 2px solid var(--stage-gold);
  outline-offset: 3px;
}

.amk-stage [data-stage-view]:active,
.amk-stage [data-stage-reset]:active {
  transform: translateY(1px);
}

.amk-stage [data-stage-view]:disabled,
.amk-stage [data-stage-reset]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.amk-stage [data-stage-status] {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-inline-size: 0;
  min-block-size: 1.5rem;
  margin: 0;
  padding: 0 24px 18px;
  color: var(--stage-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
}

.amk-stage [data-stage-status]::before {
  content: "";
  flex: 0 0 auto;
  inline-size: 5px;
  block-size: 5px;
  background: #a58c52;
  border-radius: 50%;
}

.amk-stage[data-stage-state="ready"] [data-stage-status]::before {
  background: #707b61;
  box-shadow: 0 0 0 3px rgba(112, 123, 97, 0.09);
}

.amk-stage[data-stage-state="loading"] [data-stage-status]::before {
  background: transparent;
  inline-size: 10px;
  block-size: 10px;
  border: 1.5px solid rgba(136, 114, 63, 0.22);
  border-block-start-color: var(--stage-gold);
  animation: amk-stage-loading 900ms linear infinite;
}

.amk-stage .stage-caption,
.amk-stage [data-stage-caption] {
  position: relative;
  z-index: 4;
  margin: 0;
  padding: 20px 24px 0;
  color: var(--stage-muted);
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: 0;
}

@keyframes amk-stage-loading {
  to { transform: rotate(360deg); }
}

@media (hover: hover) and (pointer: fine) {
  .amk-stage [data-stage-view]:not(:disabled):not([aria-pressed="true"]):hover {
    color: #34382f;
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(136, 114, 63, 0.36);
    transform: translateY(-1px);
  }

  .amk-stage [data-stage-reset]:not(:disabled):hover {
    color: #5d4c25;
    background: rgba(136, 114, 63, 0.08);
    border-color: rgba(136, 114, 63, 0.15);
  }
}

@media (min-width: 1100px) {
  .amk-stage [data-stage-surface] {
    min-block-size: 29rem;
    max-block-size: 39rem;
  }
}

@media (max-width: 599px) {
  .amk-stage {
    border-radius: 22px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .amk-stage [data-stage-surface] {
    aspect-ratio: 4 / 5;
    min-block-size: 24rem;
    max-block-size: 34rem;
  }

  /* A side-by-side pair needs a landscape composition, not a tall phone stage.
     The large portrait canvas remains available for the phone-only view. */
  .amk-stage[data-stage-mode="both"] [data-stage-surface] {
    aspect-ratio: 4 / 3;
    min-block-size: 15rem;
    max-block-size: 28rem;
  }

  .amk-stage [data-stage-surface]::after {
    border-radius: 16px;
  }

  .amk-stage .stage-toolbar,
  .amk-stage [data-stage-toolbar],
  .amk-stage .stage-controls,
  .amk-stage [data-stage-controls] {
    gap: 6px;
    padding-inline: 12px;
    padding-block-end: 16px;
  }

  .amk-stage [data-stage-view],
  .amk-stage [data-stage-reset] {
    padding-inline: 12px;
    font-size: 0.8125rem;
  }

  .amk-stage [data-stage-status] {
    padding-inline: 16px;
    font-size: 0.75rem;
  }

  .amk-stage .stage-caption,
  .amk-stage [data-stage-caption] {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .amk-stage .stage-canvas,
  .amk-stage .stage-fallback,
  .amk-stage [data-stage-surface]::after,
  .amk-stage [data-stage-view],
  .amk-stage [data-stage-reset] {
    transition: none;
  }

  .amk-stage[data-stage-state="loading"] [data-stage-status]::before {
    animation: none;
  }
}

@media (forced-colors: active) {
  .amk-stage {
    border-color: CanvasText;
    box-shadow: none;
  }

  .amk-stage [data-stage-view],
  .amk-stage [data-stage-reset] {
    border: 1px solid ButtonText;
  }

  .amk-stage [data-stage-view][aria-pressed="true"] {
    outline: 2px solid Highlight;
    outline-offset: -4px;
  }
}
