:root {
  --ink: #f1f0ea;
  --muted: #898c92;
  --canvas: #080a0f;
  --panel: #11151c;
  --acid: #d6ff3f;
  --coral: #ff6b62;
  --violet: #a98cff;
  --line: rgba(241, 240, 234, 0.14);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(169, 140, 255, 0.12), transparent 34%),
    radial-gradient(circle at 88% 48%, rgba(214, 255, 63, 0.08), transparent 28%),
    var(--canvas);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.045;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

button { font: inherit; }

.page-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 22px 22px calc(22px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}

.topbar, .footer-note { display: flex; align-items: center; justify-content: space-between; }

.topbar {
  min-height: 24px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.brand-mark { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 500; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 13px rgba(214, 255, 63, 0.75); }
.header-code { opacity: 0.6; }

.intro { margin-top: clamp(47px, 10vh, 78px); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 17px; color: var(--acid); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: var(--acid); }
h1 { max-width: 390px; margin: 0; font-size: clamp(40px, 12vw, 58px); font-weight: 600; line-height: 0.96; letter-spacing: -0.035em; }
h1 em { display: block; color: var(--coral); font-style: normal; }
.dek { margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; letter-spacing: 0.01em; }

.interactive-zone { position: relative; margin-top: clamp(31px, 6vh, 53px); }
.status-pill { display: flex; align-items: center; gap: 7px; width: max-content; margin: 0 0 12px 9px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.14em; }
.status-pill b { margin-left: 4px; color: var(--ink); font-weight: 400; opacity: 0.75; }
.status-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 10px rgba(255, 107, 98, 0.9); animation: pulse 1.6s ease-in-out infinite; }

.photo-button { position: relative; display: block; width: 100%; padding: 0; border: 0; color: inherit; background: none; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.photo-button:focus-visible { outline: 2px solid var(--acid); outline-offset: 7px; border-radius: 8px; }
.photo-halo { position: absolute; inset: 6% -4% -8%; z-index: 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(169, 140, 255, 0.18), transparent 67%); filter: blur(18px); }
.photo-frame { position: relative; z-index: 1; display: block; width: calc(100% - 18px); margin-left: 9px; overflow: hidden; border: 1px solid rgba(241, 240, 234, 0.3); background: #161a22; box-shadow: 10px 13px 0 rgba(214, 255, 63, 0.94), 0 18px 34px rgba(0, 0, 0, 0.42); transform: rotate(-2.2deg); transition: transform 460ms cubic-bezier(.2,.8,.2,1), box-shadow 460ms ease; }
.photo-frame::before { position: absolute; inset: 0; z-index: 1; pointer-events: none; content: ""; background: linear-gradient(130deg, rgba(255,255,255,0.17), transparent 24%, transparent 75%, rgba(214,255,63,0.12)); mix-blend-mode: screen; }
.photo-frame img { display: block; width: 100%; aspect-ratio: 1 / 0.86; object-fit: cover; object-position: center 26%; filter: saturate(0.8) contrast(1.08); user-select: none; }
.photo-sheen { position: absolute; inset: -10% 38% -20% -50%; z-index: 2; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.17), transparent); transform: skewX(-18deg); animation: sheen 5.4s ease-in-out 1s infinite; }
.photo-corner { position: absolute; z-index: 3; width: 18px; height: 18px; border-color: var(--ink); opacity: 0.85; }
.photo-corner--tl { top: 12px; left: 12px; border-top: 1px solid; border-left: 1px solid; }
.photo-corner--br { right: 12px; bottom: 12px; border-right: 1px solid; border-bottom: 1px solid; }
.tap-target { position: absolute; z-index: 4; top: 50%; left: 50%; display: grid; width: 67px; height: 67px; place-items: center; border: 1px solid rgba(214, 255, 63, 0.75); border-radius: 50%; color: var(--acid); font-family: "DM Mono", monospace; font-size: 10px; line-height: 1.05; letter-spacing: 0.08em; text-align: center; transform: translate(-50%, -50%); transition: opacity 250ms ease, transform 250ms ease; }
.tap-target-ring { position: absolute; inset: -7px; border: 1px solid rgba(214, 255, 63, 0.36); border-radius: 50%; animation: ring 2.1s ease-out infinite; }
.tap-target-label small { font-size: 8px; }
.photo-caption { position: relative; z-index: 3; display: block; margin: 20px 0 0 10px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 9px; line-height: 1.35; letter-spacing: 0.13em; }
.photo-caption strong { color: var(--ink); font-weight: 500; }
.interaction-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0 10px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.02em; }
.finger-icon { display: inline-grid; width: 21px; height: 21px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--acid); font-size: 13px; }

.footer-note { margin-top: auto; padding-top: 40px; color: rgba(137, 140, 146, 0.72); font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: 0.05em; }
.footer-divider { width: 25px; height: 1px; background: var(--line); }

.flash-layer { position: fixed; inset: 0; z-index: 20; pointer-events: none; background: var(--acid); opacity: 0; }
.burst-layer { position: fixed; inset: 0; z-index: 25; overflow: hidden; pointer-events: none; }
.burst { position: absolute; display: grid; place-items: center; width: 190px; aspect-ratio: 1; transform: translate(-50%, -50%) scale(0.2) rotate(-10deg); animation: burst-in 780ms cubic-bezier(.17,.86,.35,1.2) forwards; }
.burst-emoji { position: relative; z-index: 2; display: grid; width: 124px; height: 124px; place-items: center; border: 4px solid #16171b; border-radius: 42% 58% 47% 53%; background: #ffdc39; box-shadow: 7px 9px 0 #16171b, 0 0 42px rgba(255, 220, 57, 0.55); font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: 70px; line-height: 1; transform: rotate(8deg); animation: wobble 930ms 150ms ease-in-out both; }
.burst-word { position: absolute; z-index: 3; right: -10px; bottom: 6px; padding: 7px 10px; color: #101217; background: var(--acid); box-shadow: 4px 4px 0 #101217; font-size: 15px; font-weight: 700; letter-spacing: -0.02em; transform: rotate(-7deg); }
.spark { position: absolute; width: 7px; height: 7px; background: var(--acid); animation: spark-out 620ms cubic-bezier(.18,.88,.32,1) forwards; }
.spark:nth-child(1) { top: 10px; left: 38px; background: var(--coral); transform: rotate(45deg); }
.spark:nth-child(2) { top: 35px; right: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--violet); }
.spark:nth-child(3) { bottom: 12px; left: 16px; width: 10px; height: 4px; background: var(--coral); transform: rotate(-25deg); }
.spark:nth-child(4) { bottom: 43px; right: 3px; width: 5px; height: 15px; background: var(--acid); transform: rotate(40deg); }
.burst.is-leaving { animation: burst-out 480ms ease-in forwards; }
.burst.is-leaving .burst-emoji { animation: none; }

.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(25px + var(--safe-bottom)); display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 40px); padding: 11px 14px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); background: rgba(17, 21, 28, 0.88); box-shadow: 0 10px 28px rgba(0,0,0,0.28); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: 0.02em; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity 280ms ease, transform 280ms ease; backdrop-filter: blur(10px); }
.toast-icon { color: var(--acid); font-size: 14px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

body.is-shaking .page-shell { animation: screen-shake 460ms cubic-bezier(.36,.07,.19,.97) both; }
body.is-triggered .tap-target { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
body.is-triggered .photo-frame { box-shadow: 10px 13px 0 var(--coral), 0 18px 34px rgba(0, 0, 0, 0.42); }

@keyframes pulse { 0%, 100% { opacity: 0.42; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes ring { 0% { opacity: 0.75; transform: scale(0.82); } 70%, 100% { opacity: 0; transform: scale(1.25); } }
@keyframes sheen { 0%, 25% { transform: translateX(-30%) skewX(-18deg); opacity: 0; } 42% { opacity: 1; } 58%, 100% { transform: translateX(280%) skewX(-18deg); opacity: 0; } }
@keyframes screen-shake { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0); } 15% { transform: translate3d(-4px, 2px, 0) rotate(-0.35deg); } 30% { transform: translate3d(4px, -3px, 0) rotate(0.35deg); } 45% { transform: translate3d(-3px, -1px, 0) rotate(-0.2deg); } 60% { transform: translate3d(3px, 2px, 0) rotate(0.2deg); } 75% { transform: translate3d(-1px, 0, 0); } }
@keyframes burst-in { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(-18deg); } 50% { opacity: 1; } 74% { transform: translate(-50%, -50%) scale(1.12) rotate(7deg); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } }
@keyframes burst-out { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); } 100% { opacity: 0; transform: translate(-50%, -64%) scale(1.2) rotate(13deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(8deg) scale(1); } 30% { transform: rotate(-9deg) scale(1.03); } 60% { transform: rotate(6deg) scale(0.98); } }
@keyframes spark-out { 0% { opacity: 0; transform: translate(0, 0) scale(0.4) rotate(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--spark-x, 28px), var(--spark-y, -41px)) scale(1) rotate(100deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
