:root {
  --paper: #efe4d2;
  --muted: #cbbfaa;
  --brass: #c6a36a;
  --brass-deep: #7c5a32;
  --serum: #d6ff6a;
  --serum-deep: #7ea828;
  --blood: #9d2424;
  --ink: #100e0c;
  --line: rgba(239, 228, 210, 0.16);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--paper);
  font-family: "Outfit", sans-serif;
  background: #070605;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.doctor {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 18%;
  filter: saturate(0.75) brightness(0.38) contrast(1.05);
  z-index: 0;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 0%, rgba(0, 0, 0, 0.25) 42%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 18%, transparent 70%, rgba(0, 0, 0, 0.78));
}

.top, .stage, footer { position: relative; z-index: 1; }

.top {
  width: min(760px, calc(100% - 32px));
  text-align: center;
  padding: 18px 0 0;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: none;
  font-size: 13px;
  color: var(--brass);
}

h1 {
  margin: 22px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(64px, 9vw, 96px);
  line-height: 0.8;
  letter-spacing: -0.03em;
}

.lede {
  margin: 28px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.stage {
  width: min(520px, calc(100% - 28px));
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  padding-bottom: 28px;
}

.instrument {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.45));
}

.thumb {
  width: 92px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f3efe6, #b7aa96 55%, #6d6254);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.rod {
  width: 14px;
  height: 36px;
  background: linear-gradient(90deg, #6d655b, #f4f1ea 42%, #8a8174 78%, #3c3833);
}

.barrel {
  position: relative;
  width: 164px;
  height: clamp(176px, 24vh, 230px);
  border-radius: 16px 16px 10px 10px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 18%, rgba(0, 0, 0, 0.18) 70%, rgba(255, 255, 255, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 0 0 6px rgba(70, 54, 32, 0.35),
    inset 0 0 30px rgba(214, 255, 106, 0.16);
}

.stopper {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, #2a241c, #111);
  z-index: 3;
  transition: transform 1.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.serum {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  height: 74%;
  border-radius: 0 0 6px 6px;
  background:
    linear-gradient(180deg, rgba(214, 255, 106, 0.08), rgba(126, 168, 40, 0.42) 30%, rgba(70, 90, 16, 0.55));
  overflow: hidden;
  transition: height 1.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.serum::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 16px;
  background: radial-gradient(ellipse at 50% 100%, rgba(214, 255, 106, 0.85), transparent 70%);
}

.bubble {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: rise 4.8s linear infinite;
}

.b1 { width: 7px; height: 7px; left: 24px; bottom: 10px; }
.b2 { width: 4px; height: 4px; left: 78px; bottom: 30px; animation-delay: 1.4s; }
.b3 { width: 5px; height: 5px; left: 50px; bottom: 4px; animation-delay: 2.5s; }

.glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 22%, transparent 68%, rgba(255, 255, 255, 0.16));
  pointer-events: none;
  z-index: 2;
}

.ticks {
  position: absolute;
  right: 14px;
  top: 46px;
  bottom: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 3;
}

.ticks li {
  width: 16px;
  height: 1px;
  background: rgba(239, 228, 210, 0.55);
  position: relative;
}

.ticks .dose {
  width: 28px;
  background: var(--serum);
}

.ticks .dose span {
  position: absolute;
  right: 34px;
  top: -8px;
  color: var(--serum);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.barrel-label {
  position: absolute;
  left: 16px;
  bottom: 18px;
  margin: 0;
  z-index: 3;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239, 228, 210, 0.8);
}

.collar {
  width: 36px;
  height: 14px;
  margin-top: -1px;
  background: linear-gradient(90deg, #5c5348, #f3efe6 40%, #8d8478 75%, #2e2a26);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}

.shaft {
  position: relative;
  width: 6px;
  height: clamp(72px, 11vh, 120px);
  background: linear-gradient(90deg, #5e5a55, #f7f4ee 46%, #8d8880 72%, #2f2c29);
}

.bolus {
  position: absolute;
  left: 0;
  width: 100%;
  height: 28px;
  top: -30px;
  background: linear-gradient(180deg, transparent, var(--serum), var(--serum-deep));
  opacity: 0;
}

.bevel {
  width: 10px;
  height: 28px;
  background: linear-gradient(90deg, #6a655e, #fff 48%, #7d7871);
  clip-path: polygon(18% 0, 82% 0, 70% 100%, 0 62%);
  margin-top: -1px;
}

.host {
  width: min(460px, 100%);
  margin-top: -36px;
  padding: 26px 22px 18px;
  border-radius: 28px;
  background: rgba(10, 8, 7, 0.78);
  border: 1px solid rgba(198, 163, 106, 0.38);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.puncture {
  width: 14px;
  height: 14px;
  margin: -6px auto 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #1a0505 0 35%, var(--blood) 70%, transparent 72%);
  box-shadow: 0 0 0 6px rgba(157, 36, 36, 0.28);
}

label {
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--brass);
}

input[name="address"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper);
  border-radius: 12px;
  padding: 14px 14px;
  font: 500 12px/1.4 "IBM Plex Mono", monospace;
  outline: none;
}

input[name="address"]:focus {
  border-color: rgba(214, 255, 106, 0.7);
}

.hp {
  position: absolute;
  left: -10000px;
  opacity: 0;
}

button {
  font: 600 15px/1 "Outfit", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

#infect {
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  color: #14160c;
  background: linear-gradient(180deg, #e7ff9a, var(--serum) 40%, #8fb82e);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

#infect:disabled {
  cursor: wait;
  filter: saturate(0.6);
}

.fine, .status, .foot-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.fine { margin: 12px 0 0; text-align: center; }

.status {
  min-height: 1.45em;
  margin: 8px 0 0;
  text-align: center;
}

.status a {
  color: var(--serum);
}

.status.error { color: #ffb4a8; }
.status.ok { color: var(--serum); }

footer {
  width: min(860px, calc(100% - 28px));
  padding: 8px 0 28px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: min(460px, 100%);
  margin: 0 auto;
}

.foot-grid div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.foot-grid span {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--brass);
}

.foot-grid code {
  grid-column: 1 / -1;
  grid-row: 2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
  color: var(--paper);
}

.foot-grid span { grid-column: 1; grid-row: 1; }

.foot-grid button {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
  border: 1px solid rgba(198, 163, 106, 0.5);
  background: transparent;
  color: var(--brass);
  border-radius: 999px;
  padding: 5px 10px;
}

.foot-note { margin: 14px 0 0; }

body.injecting .stopper { transform: translateY(78px); }
body.injecting .serum { height: 22%; }
body.injecting .bolus { animation: travel 1.05s ease-in forwards; }
body.injecting .puncture {
  box-shadow: 0 0 0 8px rgba(157, 36, 36, 0.45), 0 0 24px rgba(214, 255, 106, 0.35);
}

body.infected .puncture {
  background: radial-gradient(circle, #102004 0 30%, var(--serum-deep) 68%, transparent 72%);
  box-shadow: 0 0 0 7px rgba(214, 255, 106, 0.2), 0 0 28px rgba(214, 255, 106, 0.45);
}

@keyframes rise {
  from { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.8; }
  to { transform: translateY(-160px); opacity: 0; }
}

@keyframes travel {
  from { top: 0; opacity: 1; }
  to { top: calc(100% - 20px); opacity: 1; }
}

@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr; }
  .doctor { object-position: center 15%; }
  h1 { font-size: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .stopper, .serum, .bubble, .bolus { animation: none; transition: none; }
}
