:root {
  color-scheme: dark;
  background: #060a13;
  color: #eefbff;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { min-width: 320px; min-height: 100svh; overflow: hidden; }

.scene {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: #060a13;
}
.scene-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
  animation: arrive 1.5s ease-out both;
}
.tag-hotspots { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.tag-hotspot {
  position: absolute; display: block; box-sizing: border-box; appearance: none; -webkit-appearance: none;
  padding: 0; border: 1px solid transparent; border-radius: 42%;
  background: transparent; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.tag-hotspot:hover, .tag-hotspot:focus-visible {
  border-color: rgba(105,239,255,.68); background: rgba(105,239,255,.08);
  box-shadow: 0 0 26px rgba(75,210,255,.25), inset 0 0 18px rgba(75,210,255,.12); outline: none;
}
.tag-transition[hidden] { display: none; }
.tag-transition { position: fixed; inset: 0; z-index: 10; overflow: hidden; background: rgba(3,7,15,.62); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.tag-flight {
  position: absolute; width: min(36vw,280px); height: auto; left: 50%; top: 43%;
  transform: translate(-50%,-50%) scale(.42); filter: drop-shadow(0 0 24px rgba(96,230,255,.65));
  animation: tag-pop 1.5s cubic-bezier(.2,.8,.2,1) both;
}
.tag-progress {
  position: absolute; left: 50%; top: 69%; width: min(270px,68vw); height: 5px; overflow: hidden;
  border: 1px solid rgba(101,241,255,.8); border-radius: 99px; background: rgba(11,23,42,.92);
  box-shadow: 0 0 18px rgba(85,224,255,.38); transform: translateX(-50%);
}
.tag-progress span {
  display: block; width: 100%; height: 100%; background: linear-gradient(90deg,#61fff0,#66baff,#e467ff);
  transform: scaleX(0); transform-origin: left; animation: tag-loading 1.5s linear both;
}
.centerpiece { z-index: 2; pointer-events: none; }
.scene-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 46%, rgba(5,11,20,.18), rgba(4,8,17,.36) 55%, rgba(4,8,17,.72) 100%);
  pointer-events: none;
}
.scene-scanlines {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .08;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(130,235,255,.14) 4px, transparent 5px);
  mix-blend-mode: screen;
}
.centerpiece {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: clamp(32px, 7vh, 76px) 18px 20px;
}
.scan-panel {
  position: relative;
  pointer-events: auto;
  display: flex;
  width: min(280px, calc(100vw - 40px));
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  clip-path: polygon(0 14px, 14px 14px, 14px 0, calc(100% - 14px) 0, calc(100% - 14px) 14px, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 14px calc(100% - 14px), 0 calc(100% - 14px));
  transition: width .36s ease, gap .3s ease, padding .36s ease, border-color .3s ease, background .32s ease, box-shadow .32s ease, backdrop-filter .32s ease;
}
.scan-panel:hover,
.scan-panel:focus-within {
  width: min(390px, calc(100vw - 40px));
  gap: 12px;
  padding: 22px 28px 26px;
  border-color: transparent;
  background: linear-gradient(145deg, rgba(8,18,32,.9), rgba(5,12,24,.86)) padding-box,
              linear-gradient(135deg, #74fff0 0%, #64bfff 48%, #e75ee7 100%) border-box;
  box-shadow: 0 0 34px rgba(65,226,231,.22), 0 18px 70px rgba(0,0,0,.52), inset 0 0 26px rgba(89,204,244,.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.brand-emblem {
  display: block;
  width: min(212px, 65vw);
  height: auto;
  filter: drop-shadow(0 4px 25px rgba(54,229,229,.24));
}
.scan-button {
  width: min(250px, 100%);
  height: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0 solid transparent;
  clip-path: polygon(0 9px, 9px 9px, 9px 0, calc(100% - 9px) 0, calc(100% - 9px) 9px, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 9px calc(100% - 9px), 0 calc(100% - 9px));
  background: linear-gradient(105deg, rgba(24,118,139,.78), rgba(24,87,135,.8) 55%, rgba(111,38,123,.82));
  box-shadow: inset 0 0 18px rgba(111,255,246,.13), 0 0 22px rgba(72,225,237,.24);
  color: #f2fffe;
  font: 700 16px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .16em;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(113,255,244,.55);
  transform: translateY(-8px);
  transition: height .3s ease, min-height .3s ease, padding .3s ease, border-width .3s ease, opacity .24s ease, transform .3s ease;
}
.scan-panel:hover .scan-button,
.scan-panel:focus-within .scan-button {
  height: 52px;
  min-height: 52px;
  padding: 12px 24px;
  border-width: 1px;
  border-color: rgba(116,255,240,.9);
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
@media (hover: none) {
  .scan-panel {
    width: min(350px, calc(100vw - 36px));
    gap: 10px;
    padding: 18px 20px 22px;
    background: linear-gradient(145deg, rgba(8,18,32,.9), rgba(5,12,24,.86)) padding-box,
                linear-gradient(135deg, #74fff0 0%, #64bfff 48%, #e75ee7 100%) border-box;
    box-shadow: 0 0 28px rgba(65,226,231,.2), 0 18px 60px rgba(0,0,0,.48);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  .scan-button {
    height: 48px;
    min-height: 48px;
    padding: 11px 20px;
    border-width: 1px;
    border-color: rgba(116,255,240,.9);
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scan-panel, .scan-button { transition: none; }
  .tag-hotspot { transition: none; }
}
@keyframes arrive {
  from { opacity: .4; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes tag-pop {
  0% { left: var(--start-x); top: var(--start-y); transform: translate(-50%,-50%) scale(.34) rotate(-8deg); }
  28% { left: 50%; top: 43%; transform: translate(-50%,-50%) scale(1.08) rotate(5deg); }
  42% { left: 50%; top: 43%; transform: translate(-50%,-50%) scale(1.08) rotate(-5deg); }
  56% { left: 50%; top: 43%; transform: translate(-50%,-50%) scale(1.08) rotate(3deg); }
  68%,100% { left: 50%; top: 43%; transform: translate(-50%,-50%) scale(1.04) rotate(0); }
}
@keyframes tag-loading { to { transform: scaleX(1); } }
@media (max-width: 600px) {
  .scene { min-height: 100svh; }
  .scene-art {
    inset: auto auto 5svh 50%; width: 160vw; height: auto; object-fit: contain; object-position: center;
    transform: translateX(-50%); animation: none;
  }
  .centerpiece { padding: clamp(20px,5vh,42px) 12px 12px; }
  .scan-panel, .scan-panel:hover, .scan-panel:focus-within {
    width: min(270px,calc(100vw - 52px)); gap: 8px; padding: 11px 14px 13px;
  }
  .brand-emblem { width: min(155px,58vw); }
  .scan-button { height: 44px; min-height: 44px; padding: 9px 16px; font-size: 14px; }
  .tag-flight { width: min(48vw,225px); }
  .tag-progress { top: 62%; }
}
