/* ══════════════════════════════════════════════════════════════════════
   C.I.N. — Chic Intelligence Network
   Design canvas is a fixed 393 × 852 Figma frame, scaled to fit the
   viewport so every screen stays pixel-faithful to the source design.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --pink: #ed2f7c;
  --pink-fill: rgba(237, 47, 124, 0.4);
  --green: #2ae22d;
  --bar-idle: #3d3d3d;
  --ink: #ffffff;

  --frame-w: 393px;
  --frame-h: 852px;
  --scale: 1;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html {
  height: 100%;
  margin: 0;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: 'Orbitron', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.stage {
  position: relative;
  width: var(--frame-w);
  height: var(--frame-h);
  transform: scale(var(--scale));
  transform-origin: center center;
  background: #000;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  background: #000;
}

.screen[hidden] { display: none; }

/* Screen transitions ─────────────────────────────────────────────────── */

.screen.is-entering { animation: screen-in 420ms var(--ease-out) both; }
.screen.is-leaving  { animation: screen-out 200ms ease-in both; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); filter: brightness(2.2); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes screen-out {
  from { opacity: 1; }
  to   { opacity: 0; transform: scale(1.015); }
}

/* ── Typography ─────────────────────────────────────────────────────── */

.t-orbitron-24 { font: 700 24px/normal 'Orbitron', sans-serif; margin: 0; }
.t-orbitron-14 { font: 700 14px/normal 'Orbitron', sans-serif; margin: 0; }
.t-inter-16    { font: 400 16px/normal 'Inter', sans-serif; margin: 0; }

.centered {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 324px;
  text-align: center;
}

.titleblock {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 324px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: center;
}

.page-title {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 363px;
  margin: 0;
  font: 900 40px/normal 'Orbitron', sans-serif;
  letter-spacing: 0.8px;
  text-align: center;
  text-transform: uppercase;
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: 2px solid var(--pink);
  border-radius: 0;
  background: var(--pink-fill);
  color: var(--ink);
  font: 400 24px/normal 'Orbitron', sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background 160ms ease,
              box-shadow 160ms ease, opacity 200ms ease, filter 160ms ease;
}

.btn:not(:disabled):active {
  transform: scale(0.96);
  background: var(--pink);
  box-shadow: 0 0 22px rgba(237, 47, 124, 0.75);
}

.btn:disabled { opacity: 0.35; cursor: not-allowed; }

.btn--wide {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 334px;
}

.btn--auto {
  position: absolute;
  left: 50%;
  translate: -50% 0;
}

.btn--sm { padding: 10px 18px; font-size: 16px; }

.stack {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ── Backgrounds ────────────────────────────────────────────────────── */

.grid-bg {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% 0;
  width: 420px;
  height: 420px;
  pointer-events: none;
}

.grid-bg img { display: block; width: 420px; height: 420px; }

.grid-bg--dim { opacity: 0.8; }

.grid-bg__vignette {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 318px;
  height: 318px;
  background: rgba(0, 0, 0, 0.6);
  filter: blur(50px);
}

/* ══ LOADING ═══════════════════════════════════════════════════════════ */

.loading-block {
  position: absolute;
  left: 59px;
  top: 50%;
  translate: 0 -50%;
  width: 275px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-bars { display: flex; align-items: center; width: 100%; }

.loading-bar {
  width: 50px;
  height: 29px;
  margin-right: -5px;
  background: var(--bar-idle);
  clip-path: polygon(0 100%, 33.33% 0, 100% 0, 66.67% 100%);
  transition: background 220ms ease, filter 220ms ease;
}

.loading-bar:last-child { margin-right: 0; }

.loading-bar.is-lit {
  background: var(--pink);
  filter: drop-shadow(0 0 10px rgba(237, 47, 124, 0.65));
}

.loading-label {
  margin: 0;
  width: 100%;
  font: 400 12px/normal 'Chivo Mono', monospace;
  text-align: center;
  text-transform: uppercase;
}

/* ══ GATE ══════════════════════════════════════════════════════════════ */

.gate-stamp {
  position: absolute;
  left: 50%;
  top: calc(50% - 97px);
  translate: -50% -50%;
  width: 354px;
  height: 354px;
  object-fit: cover;
  animation: stamp-in 900ms var(--ease-out) both, stamp-drift 9s ease-in-out 900ms infinite;
}

@keyframes stamp-in {
  from { opacity: 0; transform: scale(0.82) rotate(-12deg); }
  to   { opacity: 1; transform: none; }
}

@keyframes stamp-drift {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(237, 47, 124, 0)); }
  50%      { filter: drop-shadow(0 0 26px rgba(237, 47, 124, 0.45)); }
}

/* ══ CODE ENTRY ════════════════════════════════════════════════════════ */

.code {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  height: 72px;
}

.code-cells { display: flex; align-items: center; gap: 15px; }

.code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  background: none;
  font-size: 32px;
  color: transparent;
  caret-color: transparent;
  cursor: pointer;
  z-index: 2;
}

.cell {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid var(--pink);
  overflow: hidden;
  font: 700 32px/1 'Orbitron', sans-serif;
  transition: border-color 160ms ease, box-shadow 200ms ease, background 200ms ease;
}

.cell.is-active {
  box-shadow: 0 0 0 1px var(--pink), 0 0 18px rgba(237, 47, 124, 0.55);
  background: rgba(237, 47, 124, 0.12);
}

.cell.is-filled span { animation: digit-pop 260ms var(--ease-snap) both; }

@keyframes digit-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.6); }
  to   { opacity: 1; transform: none; }
}

.code.is-wrong { animation: shake 420ms ease both; }
.code.is-wrong .cell { border-color: #ff3b30; }

.code.is-right .cell {
  border-color: var(--green);
  box-shadow: 0 0 18px rgba(42, 226, 45, 0.5);
}

@keyframes shake {
  10%, 90% { transform: translateX(-3px); }
  20%, 80% { transform: translateX(6px); }
  30%, 50%, 70% { transform: translateX(-9px); }
  40%, 60% { transform: translateX(9px); }
}

.code-hint {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 324px;
  margin: 0;
  font: 700 14px/normal 'Orbitron', sans-serif;
  text-align: center;
  color: #ff3b30;
  opacity: 0;
  transition: opacity 200ms ease;
}

.code-hint.is-shown { opacity: 1; }

/* ══ THUMB SCANNER ═════════════════════════════════════════════════════ */

.scanner {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 132px;
  height: 132px;
  padding: 24px;
  display: grid;
  place-items: center;
  border: 2px solid var(--pink);
  border-radius: 0;
  background: var(--pink-fill);
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: border-color 240ms ease, box-shadow 240ms ease, opacity 240ms ease;
}

.scanner:disabled { opacity: 0.35; cursor: not-allowed; }

.scanner__print {
  position: relative;
  z-index: 2;
  width: 80px;
  height: 80px;
  pointer-events: none;
  background: url('../assets/icons/fingerprint.svg') center / contain no-repeat;
  /* The source SVG is green; the design shows it white until authenticated. */
  filter: brightness(0) invert(1);
  transition: filter 320ms ease;
}

.scanner.is-scanning .scanner__print {
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
}

/* Rising "energy" fill that tracks hold progress. */
.scanner__fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--progress, 0) * 100%);
  background: linear-gradient(180deg, rgba(237, 47, 124, 0.85), rgba(237, 47, 124, 0.25));
  transition: height 80ms linear;
  z-index: 1;
}

/* Sweeping scan line, only visible while held. */
.scanner__beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  top: 0;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  opacity: 0;
  z-index: 3;
}

.scanner.is-scanning .scanner__beam {
  opacity: 0.9;
  animation: beam-sweep 900ms linear infinite;
}

@keyframes beam-sweep {
  from { transform: translateY(0); }
  to   { transform: translateY(128px); }
}

.scanner.is-scanning { box-shadow: 0 0 34px rgba(237, 47, 124, 0.8); }

.scanner__ring {
  position: absolute;
  inset: -2px;
  border: 2px solid transparent;
  z-index: 4;
  pointer-events: none;
}

.scanner.is-scanning .scanner__ring { animation: ring-pulse 700ms ease-in-out infinite; }

@keyframes ring-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237, 47, 124, 0.6); }
  50%      { box-shadow: 0 0 0 10px rgba(237, 47, 124, 0); }
}

.scanner.is-authed {
  border-color: var(--green);
  box-shadow: 0 0 40px rgba(42, 226, 45, 0.7);
  animation: authed-pop 460ms var(--ease-snap);
}

.scanner.is-authed .scanner__print { filter: none; }
.scanner.is-authed .scanner__fill  { background: rgba(42, 226, 45, 0.25); height: 100%; }

@keyframes authed-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.scan-status {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 324px;
  margin: 0;
  font: 700 14px/normal 'Orbitron', sans-serif;
  text-align: center;
  color: var(--green);
  opacity: 0;
  transition: opacity 240ms ease;
}

.scan-status.is-shown { opacity: 1; }
.scan-status.is-warn  { color: var(--pink); }
/* Green is reserved for a completed scan, matching the design. */
.scan-status.is-busy  { color: var(--ink); }

/* ══ MISSION OBJECTIVE ═════════════════════════════════════════════════ */

.dossier {
  position: absolute;
  left: 50%;
  top: 109px;
  translate: -50% 0;
  width: 334px;
  height: 358px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--pink);
  background: var(--pink-fill);
}

.dossier__body {
  width: 282px;
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.dossier__body p { margin: 0; }

.dossier.is-nagging { animation: shake 420ms ease both; }

#declineBtn.is-dead {
  border-color: #4a4a4a;
  background: rgba(120, 120, 120, 0.2);
  color: #6b6b6b;
  pointer-events: none;
  animation: decline-die 520ms var(--ease-out) both;
}

@keyframes decline-die {
  0%   { transform: translateX(0) rotate(0); }
  25%  { transform: translateX(-10px) rotate(-1.2deg); }
  55%  { transform: translateX(12px) rotate(1.4deg); }
  80%  { transform: translateX(-4px) rotate(-0.4deg); }
  100% { transform: none; filter: grayscale(1); }
}

/* ══ HOME ══════════════════════════════════════════════════════════════ */

.home-mark {
  position: absolute;
  left: 47px;
  top: 24px;
  width: 299px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.home-mark__stamp {
  width: 264px;
  height: 264px;
  object-fit: cover;
  animation: stamp-spin-in 800ms var(--ease-out) both;
}

@keyframes stamp-spin-in {
  from { opacity: 0; transform: scale(0.9) rotate(-8deg); }
  to   { opacity: 1; transform: none; }
}

.home-mark__caption {
  margin: 0;
  width: 100%;
  font: 700 16px/normal 'Orbitron', sans-serif;
  letter-spacing: 0.32px;
  text-align: center;
  text-transform: uppercase;
}

.home-title {
  position: absolute;
  left: 196.5px;
  top: 426px;
  translate: -50% 0;
  width: 355px;
  margin: 0;
  font: 900 28px/normal 'Orbitron', sans-serif;
  letter-spacing: 0.56px;
  text-align: center;
  text-transform: uppercase;
  color: var(--pink);
  animation: title-flicker 5s steps(1) 1.2s infinite;
}

@keyframes title-flicker {
  0%, 92%, 94%, 96%, 100% { opacity: 1; text-shadow: 0 0 18px rgba(237, 47, 124, 0.5); }
  93%, 95%                { opacity: 0.45; text-shadow: none; }
}

/* ══ MISSION PREP ══════════════════════════════════════════════════════ */

.prep-list {
  position: absolute;
  left: 20px;
  top: 213px;
  width: 353px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.prep-row { display: flex; align-items: center; gap: 14px; }

.prep-row__text {
  flex: 1;
  font: 900 17px/normal 'Orbitron', sans-serif;
}

.tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  padding: 24px;
  border: 2px solid var(--pink);
  background: var(--pink-fill);
  backdrop-filter: blur(2px);
}

.tile img { width: 56px; height: 56px; }

/* Staggered reveal so the packing list assembles itself. */
.screen[data-screen="prep"].is-entering .prep-row { animation: row-in 520ms var(--ease-out) both; }
.screen[data-screen="prep"].is-entering .prep-row:nth-child(1) { animation-delay: 120ms; }
.screen[data-screen="prep"].is-entering .prep-row:nth-child(2) { animation-delay: 220ms; }
.screen[data-screen="prep"].is-entering .prep-row:nth-child(3) { animation-delay: 320ms; }

@keyframes row-in {
  from { opacity: 0; transform: translateX(-26px); }
  to   { opacity: 1; transform: none; }
}

/* ══ LOG EVIDENCE ══════════════════════════════════════════════════════ */

.dropzone {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 313px;
  height: 228px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid var(--pink);
  border-radius: 0;
  background: var(--pink-fill);
  backdrop-filter: blur(2px);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms var(--ease-out), box-shadow 200ms ease;
}

.dropzone:active { transform: scale(0.97); }
.dropzone.is-busy { pointer-events: none; opacity: 0.6; }

.dropzone .t-orbitron-24 { font-weight: 700; }
.dropzone .t-orbitron-14 { font-weight: 400; }
.dropzone__icon { width: 80px; height: 80px; }

.reveal-hint {
  position: absolute;
  left: 50%;
  top: 615px;
  translate: -50% 0;
  width: 363px;
  margin: 0;
  font: 900 28px/normal 'Orbitron', sans-serif;
  letter-spacing: 0.56px;
  text-align: center;
  text-transform: uppercase;
  animation: hint-breathe 1.8s ease-in-out infinite;
}

/* Centring is handled by the `translate` property, so animations here must
   only ever touch `transform` — mixing the two double-shifts the element. */
@keyframes hint-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.03); }
}

.reveal-hint[hidden] { display: none; }

/* ══ POLAROID ══════════════════════════════════════════════════════════ */

.polaroid-slot {
  position: absolute;
  left: 50%;
  top: 199px;
  translate: -50% 0;
  width: 331px;
}

.polaroid-slot[hidden] { display: none; }

.polaroid {
  width: 331px;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75);
}

.polaroid--live { cursor: pointer; }

.polaroid.is-ejecting { animation: polaroid-eject 900ms var(--ease-out) both; }

@keyframes polaroid-eject {
  0%   { opacity: 0; transform: translateY(-120px) rotate(-3deg) scale(0.94); }
  60%  { opacity: 1; transform: translateY(8px) rotate(1deg) scale(1.01); }
  100% { opacity: 1; transform: none; }
}

.polaroid__frame {
  position: relative;
  width: 291px;
  height: 291px;
  background: #000;
  overflow: hidden;
}

.polaroid__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Driven by --dev (0 → 1) as the agent taps the print. */
  opacity: calc(0.02 + 0.98 * var(--dev, 0));
  filter:
    blur(calc((1 - var(--dev, 0)) * 14px))
    saturate(calc(0.15 + 0.85 * var(--dev, 0)))
    contrast(calc(0.55 + 0.45 * var(--dev, 0)))
    brightness(calc(0.5 + 0.5 * var(--dev, 0)));
  transition: opacity 900ms var(--ease-out), filter 900ms var(--ease-out);
}

/* Chemical wash that burns off as the print develops. */
.polaroid__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, rgba(237, 47, 124, 0.35), transparent 70%),
    #05030a;
  opacity: calc(1 - var(--dev, 0));
  mix-blend-mode: normal;
  transition: opacity 900ms var(--ease-out);
}

.polaroid__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: calc(0.35 * (1 - var(--dev, 0)));
  background-image: repeating-linear-gradient(
    0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 3px);
  transition: opacity 600ms ease;
}

.polaroid__flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}

.polaroid.is-tapped .polaroid__flash { animation: tap-flash 260ms ease-out; }

@keyframes tap-flash {
  0%   { opacity: 0.55; }
  100% { opacity: 0; }
}

.polaroid.is-tapped { animation: tap-jolt 260ms var(--ease-snap); }

@keyframes tap-jolt {
  0%   { transform: scale(1) rotate(0); }
  35%  { transform: scale(1.025) rotate(-0.8deg); }
  70%  { transform: scale(0.995) rotate(0.5deg); }
  100% { transform: scale(1) rotate(0); }
}

.polaroid.is-developed { animation: developed-bloom 1100ms var(--ease-out); }

@keyframes developed-bloom {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.9), 0 18px 44px rgba(0, 0, 0, 0.75); }
  35%  { box-shadow: 0 0 64px 14px rgba(237, 47, 124, 0.75), 0 18px 44px rgba(0, 0, 0, 0.75); }
  100% { box-shadow: 0 0 0 0 rgba(237, 47, 124, 0), 0 18px 44px rgba(0, 0, 0, 0.75); }
}

.polaroid__caption {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px 0;
  font: 400 16px/normal 'Permanent Marker', cursive;
  letter-spacing: 1.5px;
  color: #000;
  text-align: center;
}

/* The label is written on the frame before the print develops, as in the
   design — only the photograph itself is hidden. */
.polaroid__caption span { transform: rotate(-1.2deg); }

/* Tap counter ticks under the print. */
.taps {
  position: absolute;
  left: 50%;
  top: 404px;
  translate: -50% 0;
  display: flex;
  gap: 6px;
}

.taps__pip {
  width: 18px;
  height: 4px;
  background: #3d3d3d;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.taps__pip.is-on {
  background: var(--pink);
  box-shadow: 0 0 8px rgba(237, 47, 124, 0.8);
}

/* ══ CAROUSEL ══════════════════════════════════════════════════════════ */

.carousel {
  position: absolute;
  left: 50%;
  top: 199px;
  translate: -50% 0;
  width: 331px;
  height: 393px;
}

.carousel .polaroid { position: absolute; inset: 0; }

.carousel .polaroid.is-out-left  { animation: slide-out-left 320ms ease-in both; }
.carousel .polaroid.is-out-right { animation: slide-out-right 320ms ease-in both; }
.carousel .polaroid.is-in-left   { animation: slide-in-left 380ms var(--ease-out) both; }
.carousel .polaroid.is-in-right  { animation: slide-in-right 380ms var(--ease-out) both; }

@keyframes slide-out-left  { to { opacity: 0; transform: translateX(-140px) rotate(-6deg) scale(0.9); } }
@keyframes slide-out-right { to { opacity: 0; transform: translateX(140px) rotate(6deg) scale(0.9); } }
@keyframes slide-in-left   { from { opacity: 0; transform: translateX(-140px) rotate(-6deg) scale(0.9); } }
@keyframes slide-in-right  { from { opacity: 0; transform: translateX(140px) rotate(6deg) scale(0.9); } }

.carousel__empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0 20px;
  font: 400 16px/1.5 'Inter', sans-serif;
  text-align: center;
  color: #8a8a8a;
}

.pager {
  position: absolute;
  left: 50%;
  top: 611px;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pager__btn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 10px;
  border: 2px solid var(--pink);
  border-radius: 0;
  background: var(--pink-fill);
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background 160ms ease;
}

.pager__btn:active { transform: scale(0.92); background: var(--pink); }
.pager__btn:disabled { opacity: 0.3; pointer-events: none; }
.pager__btn img { width: 32px; height: 32px; }

.counter {
  position: absolute;
  left: 50%;
  top: 680px;
  translate: -50% 0;
  font: 400 12px/normal 'Chivo Mono', monospace;
  color: #8a8a8a;
  letter-spacing: 1px;
}

/* ══ MODAL ═════════════════════════════════════════════════════════════ */

.modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 50;
  animation: fade-in 220ms ease both;
}

.modal[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal__panel {
  width: 334px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 2px solid var(--pink);
  background: #120309;
  box-shadow: 0 0 60px rgba(237, 47, 124, 0.35);
  animation: panel-in 380ms var(--ease-snap) both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(22px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

.modal__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pink);
  background: rgba(237, 47, 124, 0.1);
  color: var(--ink);
  font: 700 18px/1 'Orbitron', sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.modal__input::placeholder { color: rgba(255, 255, 255, 0.3); }
.modal__input:focus { box-shadow: 0 0 18px rgba(237, 47, 124, 0.5); }

.modal__actions { display: flex; gap: 12px; }
.modal__actions .btn { flex: 1; }

/* ══ TOAST ═════════════════════════════════════════════════════════════ */

.toast {
  position: absolute;
  left: 50%;
  bottom: 40px;
  translate: -50% 0;
  max-width: 330px;
  padding: 12px 18px;
  border: 1px solid var(--pink);
  background: rgba(18, 3, 9, 0.95);
  font: 400 13px/1.4 'Chivo Mono', monospace;
  text-align: center;
  z-index: 60;
  animation: toast-in 260ms var(--ease-out) both;
}

.toast[hidden] { display: none; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ══ ACCESSIBILITY ═════════════════════════════════════════════════════ */

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