.event-gifts {
  position: relative;
  overflow: hidden;
}
.gift-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: center;
  gap: clamp(24px, 4vw, 76px);
}
.gift-copy h2 {
  margin: 0;
  font-size: clamp(40px, 5vw, 80px);
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: -.035em;
}
.gift-copy h2 span {
  color: #cdd2f3;
  background: linear-gradient(100deg, #a7e7ff, #c4cefb 54%, #f1d2df);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.gift-copy p { margin: 24px 0 0; color: #b9c5da; line-height: 1.75; }
.gift-actions { display: flex; align-items: center; gap: 26px; margin-top: 30px; }
.event-gifts button { font: inherit; cursor: pointer; }
.gift-back { color: #c8d7ee; text-decoration: none; }
.event-gifts :focus-visible { outline: 2px solid #a8deff; outline-offset: 4px; }
.gift-stage { position: relative; aspect-ratio: 3 / 2; isolation: isolate; }
.gift-stage::before {
  content: ''; position: absolute; inset: 6% -8% -6%; z-index: -1;
  background: radial-gradient(ellipse at center, #698bea25, transparent 68%);
}
.gift-ensemble { width: 100%; height: 100%; object-fit: contain; transition: opacity .3s ease; }
.tea-scene { position: absolute; inset: 0; opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.gift-stage:not([data-view="gifts"]) .gift-ensemble { opacity: 0; }
.gift-stage:not([data-view="gifts"]) .tea-scene { opacity: 1; }
.tea-kettle { position: absolute; width: 22%; left: 55%; top: 2.5%; opacity: 0; transform-origin: 75% 50%; }
.tea-stream { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tea-stream path { fill: none; stroke: #d2f3ff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.tea-figure { position: absolute; width: 30%; left: 33%; top: 42%; aspect-ratio: 411 / 480; }
.tea-figure img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tea-warm { clip-path: inset(0 0 100%); }
.gift-stage[data-view="pouring"] .tea-kettle { animation: tip-kettle 4.4s ease-in-out both; }
.gift-stage[data-view="pouring"] .tea-stream path { animation: pour-stream 4.4s ease-in-out both; }
.gift-stage[data-view="pouring"] .tea-warm { animation: reveal-ceramic 4.4s linear both; }
.gift-stage[data-view="pouring"] .tea-cold { animation: heat-ceramic 4.4s linear both; }
.gift-stage[data-view="warm"] .tea-warm { clip-path: none; }
.gift-stage[data-view="warm"] .tea-cold { opacity: 0; }
/* A soft heat front follows the water down the ceramic surface. */
@property --tea-front {
  syntax: '<percentage>';
  inherits: true;
  initial-value: -12%;
}
@supports (mask-image: linear-gradient(black, transparent)) {
  .gift-stage.tea-soft-reveal[data-view="pouring"] .tea-figure {
    animation: tea-front 4.4s linear both;
  }
  .gift-stage.tea-soft-reveal[data-view="pouring"] .tea-warm {
    animation: none;
    clip-path: none;
    mask-image: linear-gradient(to bottom, black var(--tea-front), transparent calc(var(--tea-front) + 12%));
  }
  .gift-stage.tea-soft-reveal[data-view="pouring"] .tea-cold {
    animation: none;
    mask-image: linear-gradient(to bottom, transparent calc(var(--tea-front) - 4%), black var(--tea-front));
  }
  @keyframes tea-front {
    0%, 28% { --tea-front: -12%; }
    83%, 100% { --tea-front: 105%; }
  }
}
@keyframes tip-kettle {
  0%, 100% { opacity: 0; transform: translate(4%, -5%) rotate(20deg); }
  18%, 77% { opacity: 1; transform: none; }
}
@keyframes pour-stream {
  0%, 18% { opacity: 0; stroke-dashoffset: 1; }
  28%, 74% { opacity: .86; stroke-dashoffset: 0; }
  84%, 100% { opacity: 0; stroke-dashoffset: -1; }
}
@keyframes reveal-ceramic {
  0%, 28% { clip-path: inset(0 0 100%); }
  83%, 100% { clip-path: inset(0); }
}
@keyframes heat-ceramic {
  0%, 28% { clip-path: inset(0); }
  83%, 100% { clip-path: inset(100% 0 0); }
}
.gift-back { position: absolute; bottom: 0; right: 0; background: transparent; border: 0; padding: 12px; }
.event-gifts [hidden] { display: none; }
.tea-status {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
@media (max-width: 700px) {
  .gift-layout { grid-template-columns: 1fr; gap: 24px; }
  .gift-copy h2 { font-size: clamp(30px, 7.5vw, 46px); }
  .gift-copy h2 br { display: none; }
  .gift-copy p { margin-top: 12px; font-size: 14px; }
  .gift-actions { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .gift-ensemble, .tea-scene { transition: none; }
  .gift-stage[data-view="pouring"] .tea-scene * { animation-duration: .01ms; }
}

.gift-copy .gift-sponsor-logo {
  display: inline-block;
  width: auto;
  height: 1.32em;
  vertical-align: -.28em;
  margin-inline: .12em;
}
.gift-actions { flex-wrap: wrap; gap: 12px 22px; }
.gift-actions .gift-register {
  display: inline-flex;
  min-height: 46px;
  padding: 0 24px;
  align-items: center;
  border: 1px solid #deecff;
  border-radius: 99px;
  background: linear-gradient(110deg, #c2efff 0%, #cad9ff 56%, #f1dcea 100%);
  color: #152948;
  text-decoration: none;
  font-weight: 650;
  box-shadow: 0 4px 20px #5e89e024;
}
.gift-actions [data-pour-tea] {
  position: relative; min-height: 44px; padding: 8px 3px; border: 0;
  text-decoration: none; background: transparent; color: #cdd9ef;
}
.gift-actions [data-pour-tea]:hover, .gift-back:hover { color: #ecfaff; }
.water-splash {
  position: absolute; top: 48%; right: -.55em; width: 10px; height: 10px;
  pointer-events: none;
}
.water-splash i {
  position: absolute; left: 50%; top: 0; width: 4px; height: 8px;
  border-radius: 70% 60% 65% 55%; opacity: 0;
  background: linear-gradient(#ebfcff, #86cffa); transform: scale(0);
  --dx: -14px; --dy: -16px; --tilt: -38deg;
}
.water-splash i:nth-child(2) { --dx: -5px; --dy: -25px; --tilt: -12deg; }
.water-splash i:nth-child(3) { --dx: 8px; --dy: -19px; --tilt: 28deg; }
.water-splash i:nth-child(4) { --dx: 18px; --dy: -11px; --tilt: 54deg; width: 3px; height: 6px; }
.water-splash i:nth-child(5) { --dx: -18px; --dy: -8px; --tilt: -65deg; width: 3px; height: 5px; }
.water-splash::before {
  content: ''; position: absolute; inset: 4px -5px 0;
  border: 1px solid #b9e7ff; border-radius: 50%; opacity: 0;
}
@keyframes tea-droplet {
  0% { opacity: 0; transform: translate(0,3px) scale(.25); }
  18% { opacity: .95; }
  58% { opacity: .85; transform: translate(var(--dx), var(--dy)) rotate(var(--tilt)); }
  100% { opacity: 0; transform: translate(var(--dx), 3px) rotate(var(--tilt)) scale(.35); }
}
@keyframes tea-ripple {
  from { opacity: .9; transform: scale(.2); }
  to { opacity: 0; transform: scale(1.7); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  [data-pour-tea]:hover .water-splash i { animation: tea-droplet .62s ease-out both; }
  [data-pour-tea]:hover .water-splash::before { animation: tea-ripple .52s .06s ease-out both; }
}

html:has(#badges:target) { scroll-behavior: auto; }
.event-badges {
  color: #f3f6ff;
  background: radial-gradient(ellipse at 48% 49%, #47618e33, transparent 62%);
}
.badges-heading h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.18; letter-spacing: -.035em; }
.badge-case { max-width: 900px; margin: 4px auto 0; }
.case-stage {
  position: relative; aspect-ratio: 1100 / 760;
  isolation: isolate;
}
.case-stage::before {
  content: ''; position: absolute; inset: 65% 10% 3%; z-index: -1;
  background: radial-gradient(closest-side, #01040caf 15%, transparent);
}
.case-canvas,.case-poster,.case-interior,.case-surface,.badge-collection { position: absolute; inset: 0; width: 100%; height: 100%; }
.case-canvas,.case-poster,.case-interior { pointer-events: none; }
.case-canvas,.case-interior { opacity: 0; }
.badge-case[data-open=true] .case-interior,.badge-case.is-live .case-canvas { opacity: 1; }
.badge-case[data-open=true] .case-poster,.badge-case.is-live :is(.case-interior,.case-poster) { opacity: 0; }
.case-surface { border: 0; padding: 0; background: transparent; cursor: pointer; }
.badge-case[data-open=true] .case-surface { inset: 5% auto auto 25%; width: 50%; height: 27%; }
/* Keep keyboard focus on the clasp instead of outlining the transparent canvas hit area. */
.badge-case .case-surface:is(:focus,:focus-visible,:active) { outline: none; box-shadow: none; }
.case-stage:has(.case-surface:focus-visible)::after {
  pointer-events: none; z-index: 1;
  content: ''; position: absolute; left: var(--clasp-x,44%); top: var(--clasp-y,83%);
  width: clamp(24px,4%,40px); height: 18px; transform: translate(-50%,-50%);
  border-radius: 6px; border: 2px solid #beebff; box-shadow: 0 0 7px #1d345f;
}
.badge-collection { margin: 0; padding: 0; list-style: none; pointer-events: none; }
.badge-collection[aria-hidden=true] { visibility: hidden; }
.badge-collection li { display: contents; }
.badge-item {
  position: absolute; left: var(--pin-x); top: var(--pin-y); width: var(--pin-w); height: var(--pin-h);
  transform: translate(-50%,-50%); pointer-events: auto; touch-action: pan-y;
  border: 0; padding: 0; border-radius: 20%; color: white; background: transparent; user-select: none;
}
.badge-item:focus-visible { outline: 2px solid #b6ddff; outline-offset: 2px; }
.badge-turntable {
  display: block; width: 100%; height: 100%; background-repeat: no-repeat; background-size: 500% 500%;
}
.badge-poster { width: 100%; height: 100%; object-fit: contain; }
.badge-turntable.has-atlas .badge-poster,.is-live .badge-turntable { visibility: hidden; }
.badge-name {
  position: absolute; bottom: 96%; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 4px 9px; border-radius: 6px; background: #111821ee; color: #eef5fc;
  font-size: clamp(10px,1.15vw,13px); opacity: 0; pointer-events: none;
}
.badge-item[data-preview=true] { z-index: 1; }
.badge-item[data-preview=true] .badge-name { opacity: 1; }
@media (max-width: 650px) {
  .badge-case { margin: 24px -12px 0; }
  .case-stage { aspect-ratio: 730 / 720; }
}

/* Projected socket centres for the still-frame fallback, at its two camera sizes. */
.badge-collection li:nth-child(1) { --pin-x: 34.97%; --pin-y: 45.94%; }
.badge-collection li:nth-child(2) { --pin-x: 45.65%; --pin-y: 49.72%; }
.badge-collection li:nth-child(3) { --pin-x: 56.33%; --pin-y: 53.51%; }
.badge-collection li:nth-child(4) { --pin-x: 67.01%; --pin-y: 57.29%; }
.badge-collection li:nth-child(5) { --pin-x: 31.17%; --pin-y: 65.90%; }
.badge-collection li:nth-child(6) { --pin-x: 41.85%; --pin-y: 69.69%; }
.badge-collection li:nth-child(7) { --pin-x: 52.52%; --pin-y: 73.47%; }
.badge-collection li:nth-child(8) { --pin-x: 63.20%; --pin-y: 77.26%; }
.badge-collection { --pin-w: 10.15%; --pin-h: 11.59%; }
@media (max-width: 650px) {
  .badge-collection li:nth-child(1) { --pin-x: 28.55%; --pin-y: 45.94%; }
  .badge-collection li:nth-child(2) { --pin-x: 43.79%; --pin-y: 49.72%; }
  .badge-collection li:nth-child(3) { --pin-x: 59.04%; --pin-y: 53.51%; }
  .badge-collection li:nth-child(4) { --pin-x: 74.28%; --pin-y: 57.29%; }
  .badge-collection li:nth-child(5) { --pin-x: 23.12%; --pin-y: 65.90%; }
  .badge-collection li:nth-child(6) { --pin-x: 38.36%; --pin-y: 69.69%; }
  .badge-collection li:nth-child(7) { --pin-x: 53.60%; --pin-y: 73.47%; }
  .badge-collection li:nth-child(8) { --pin-x: 68.84%; --pin-y: 77.26%; }
  .badge-collection { --pin-w: 14.49%; --pin-h: 11.59%; }
}
