body.anniversary-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.archery {
  --serif: 'Newsreader', Georgia, serif;
  display: grid;
  grid-template-columns: minmax(0, 25rem) minmax(0, 24rem);
  grid-template-rows: auto auto;
  grid-template-areas:
    "portrait intro"
    "portrait controls";
  gap: 1.6rem clamp(2rem, 6vw, 5.5rem);
  align-content: center;
  width: min(100% - 3rem, 56rem);
  padding-block: clamp(4.25rem, 6vw, 5rem) clamp(2.5rem, 5.8vw, 5rem);
  margin: auto;
}

.archery-intro {
  grid-area: intro;
  align-self: end;
}

.archery-intro h1 {
  font: 400 clamp(4rem, 8vw, 6.9rem)/0.92 var(--serif);
  letter-spacing: -0.065em;
}

.archery-intro h1 span,
.archery-frame figcaption span {
  color: var(--rose);
}

.archery-intro p {
  color: var(--text-soft);
  margin-top: 0.75rem;
  max-width: 34ch;
}

.archery-frame {
  grid-area: portrait;
  margin: 0;
  padding: 0.7rem 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 1rem 2.4rem #71423626;
}

.archery-board {
  --target-x: 47%;
  --target-y: 36%;
  --aim-x: 11%;
  position: relative;
  display: grid;
  isolation: isolate;
  overflow: hidden;
  background: var(--rose-soft);
  border-radius: 3px;
}

.archery-board img {
  display: block;
  width: 100%;
  height: auto;
}

.archery-frame figcaption {
  padding-top: 0.75rem;
  color: var(--text);
  text-align: center;
  font: italic 1.2rem/1.2 var(--serif);
}

.aim-line {
  position: absolute;
  top: var(--target-y);
  left: 11%;
  width: 78%;
  height: 1px;
  background: repeating-linear-gradient(90deg, #fff9ecbf 0 4px, transparent 4px 8px);
}

.archery-target {
  position: absolute;
  display: grid;
  place-items: center;
  width: 100%;
  top: var(--target-y);
  left: var(--target-x);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.archery-ring {
  position: absolute;
  aspect-ratio: 1;
  border: 1px solid #fff6eb;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #571e2c66;
}

.archery-ring:nth-child(n + 5) {
  border-color: #fff6ebad;
  box-shadow: none;
}

.archery-target > span:first-child {
  z-index: 1;
  color: #fff6eb;
  font-size: clamp(0.54rem, 2vw, 0.9rem);
  line-height: 1;
}

.aim-marker,
.heart-shot,
.shot-points {
  position: absolute;
  left: var(--aim-x);
  top: var(--target-y);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.aim-marker {
  color: #fffaf0;
  font-size: 1.45rem;
  line-height: 1;
  text-shadow: 0 1px 5px #30151c, 0 0 2px #30151c;
}

.heart-shot,
.shot-points {
  left: var(--shot-x);
}

.heart-shot {
  color: #ffbccc;
  font-size: 2.3rem;
  line-height: 1;
  text-shadow: 0 2px 5px #491522;
}

.shot-points {
  top: calc(var(--target-y) - 12%);
  min-width: 2.4rem;
  padding: 0.25rem 0.45rem;
  border-radius: 99px;
  background: var(--surface);
  color: var(--rose);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-hover);
}

.archery-controls {
  grid-area: controls;
  align-self: start;
}

.archery-scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  text-align: center;
  padding: 0.8rem 0;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.archery-scoreboard > div + div {
  border-left: 1px solid var(--border-color);
}

.archery-scoreboard dt {
  color: var(--text-soft);
  font-size: 0.75rem;
}

.archery-scoreboard dd {
  color: var(--text);
  font: 500 1.55rem/1.3 var(--serif);
  font-variant-numeric: tabular-nums;
}

.shot-history {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.95rem;
  color: var(--rose);
  font-size: 1.2rem;
  line-height: 1;
}

.shot-history .missed {
  color: var(--text-muted);
}

.archery-feedback {
  margin: 0.45rem 0 0.85rem;
  min-height: 2.95em;
  color: var(--text);
  font: italic 1.22rem/1.35 var(--serif);
}

.archery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.1rem;
  border: 1px solid var(--text);
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.18s, border-color 0.18s, transform 0.15s;
}

.archery-button:hover:not([aria-disabled="true"]) {
  background: var(--rose);
  border-color: var(--rose);
  transform: translateY(-1px);
}

.archery-button[aria-disabled="true"] {
  background: var(--rose-hover);
  border-color: var(--rose-hover);
  transform: none;
  cursor: wait;
}

/* End Modal */
.end-overlay {
  position: fixed;
  inset: 0;
  background: rgba(38, 34, 32, 0.35);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1.2rem;
}

.end-overlay.show {
  display: flex;
}

.end-modal {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  max-width: 410px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-hover);
  animation: popIn 0.35s ease;
}

.end-heart {
  color: var(--rose);
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

.end-score {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 500;
  color: var(--rose);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.end-modal h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.end-modal p {
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 1.2rem;
  font-size: 0.94rem;
}

.end-sweet-box {
  background: var(--surface-muted);
  border: 1px solid var(--rose-border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.35rem;
}

.end-sweet-title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  color: var(--text);
  font-size: 1.08rem;
  margin-bottom: 0.25rem;
}

.end-sweet-sub {
  font-size: 0.86rem;
  color: var(--text-soft);
}

.modal-btn-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-btn {
  background: var(--text);
  color: #ffffff;
  border: 1px solid var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.18s, border-color 0.18s;
}

.modal-btn:hover {
  background: var(--rose);
  border-color: var(--rose);
}

.modal-btn.secondary {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border-color);
}

.modal-btn.secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.archery-keys {
  margin-top: 0.55rem;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-soft);
}

@media (max-width: 43rem) {
  .archery {
    grid-template-columns: minmax(0, 24rem);
    grid-template-rows: auto;
    grid-template-areas: "intro" "portrait" "controls";
    justify-content: center;
    width: min(100% - 2.5rem, 26rem);
    padding-block: 1.75rem;
    gap: 1rem;
  }

  .archery-frame {
    width: min(100%, 19rem, 34svh);
    justify-self: center;
    padding: 0.5rem 0.5rem 0.65rem;
  }

  .archery-intro p { font-size: 0.91rem; }
  .archery-feedback { min-height: 1.4em; }

  .archery-controls {
    display: flex;
    flex-direction: column;
  }

  .archery-button { order: -2; }
  .archery-keys { order: -1; }
  .archery-scoreboard { margin-top: 0.8rem; }
}

@media (pointer: coarse) {
  .archery-keys { display: none; }
}
