/* The original silver ring and the cards share one scene and projection. */
/* Fixed layer order; foreground lettering hands off to its identical underlay. */
.orbit-scene { position: absolute; aspect-ratio: 812/518; z-index: 20; isolation: isolate; touch-action: pan-y; }
.hero .orbit-scene .heart-object { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 20; transform: none; transition: none; touch-action: pan-y; }
.heart-object #heart-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; opacity: 0; }
.hero .orbit-scene .heart-object { translate: calc(var(--depth-x, 0px) * .55) calc(var(--depth-y, 0px) * .55); }
.hero .orbit-scene .heart-object #heart-canvas, .hero .orbit-scene .heart-object #heart-frame { filter: drop-shadow(.1cqw .2cqw .12cqw #88315025) drop-shadow(.4cqw 1.65cqw 1.6cqw #8a365536); }
.heart-object.model-ready #heart-canvas { opacity: 1; }
.heart-object.model-ready #heart-frame { opacity: 0; }
.hero .hero-title { will-change: opacity; transform: translate3d(var(--depth-x, 0px), var(--depth-y, 0px), 0); }
.hero .hero-title-behind { z-index: 19; will-change: auto; }
.hero .pencil-note { transition: opacity .6s; }
.hero .member-controls { position: absolute; margin: 0; transform: translateX(-50%); width: max-content; max-width: 100%; opacity: 0; pointer-events: none; }
.hero[data-controls-ready="true"] .member-controls { pointer-events: auto; }
/* Keep the navigation quiet so the member photographs remain the focus. */
.hero .member-controls { gap: 10px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.member-controls .member-tabs { gap: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.member-controls .member-tabs button { position: relative; display: grid; place-items: center; min-height: 48px; padding: 0 17px; border: 0; border-radius: 0; color: #77344f; font-size: 14px; font-weight: 500; letter-spacing: .025em; background: none; }
.member-controls .member-tabs button:hover { background: none; color: #50122d; }
.member-controls .member-tabs button[aria-pressed="true"] { background: none; color: #5b1834; font-weight: 700; }
.member-controls .member-tabs button::after { content: ""; position: absolute; left: 17px; right: 17px; bottom: 3px; height: 2px; background: #842448; transform: scaleX(0); transition: transform .3s cubic-bezier(.16,1,.3,1); }
.member-controls .member-tabs button[aria-pressed="true"]::after { transform: scaleX(1); }
.member-controls button:focus-visible { outline: 2px solid #9c3058; outline-offset: 3px; }
@media (max-width: 600px) {
  .hero .member-controls { gap: 2px; padding: 0; max-width: calc(100% - 24px); }
  .member-controls .member-tabs button { padding: 0 9px; font-size: 12px; }
  .member-controls .member-tabs button::after { left: 9px; right: 9px; }
}
.hero.motion-open .pencil-note { opacity: 0; pointer-events: none; }
.hero .music-slip { transition: opacity .6s, transform .8s; }
.hero.motion-open .music-slip { opacity: 0; pointer-events: none; transform: translateY(20px) rotate(-3deg) scale(var(--music-slip-scale)); }
.motion-card { position: absolute; left: 0; top: 0; padding: 0; transform-origin: 50% 50%; transform-style: preserve-3d; will-change: transform; touch-action: pan-y; user-select: none; cursor: grab; transition: none; outline-offset: 8px; }
.motion-card:active { scale: 1; cursor: grabbing; }
.motion-card:focus-visible { outline: 2px solid var(--rose); }
.card-turn { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: center; will-change: transform; }
.motion-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4px; overflow: hidden; box-shadow: 3px 20px 32px rgb(115 55 78 / calc(.19 * var(--card-shadow, 1))), 0 2px 3px rgb(86 34 55 / calc(.2 * var(--card-shadow, 1))); }
.motion-front { display: flex; flex-direction: column; transform: rotateY(180deg); padding: 9px 9px 0; background: #fff7fa; }
.motion-front .member-photo { width: 100%; height: 0; flex: 1; min-height: 0; object-fit: cover; object-position: center 32%; pointer-events: none; }
/* Authentic ink crosses the photograph edge like a signed collectible print. */
.motion-caption { position: relative; flex: 0 0 19%; min-height: 0; }
.member-signature { position: absolute; left: 7%; bottom: 6.5%; display: block; width: 63%; height: 25%; overflow: hidden; mix-blend-mode: multiply; transform: rotate(-8deg); pointer-events: none; }
.signature-penpen { width: 57%; transform: rotate(-9deg); }
.signature-yuki { left: 6%; width: 68%; bottom: 8%; transform: rotate(-9deg); }
.signature-luohuan { width: 61%; transform: rotate(-5deg); }
.signature-name { position: absolute; bottom: 16px; left: 68%; transform: translateX(-50%); color: #b24a76; font: 8px/1.2 Georgia, "Microsoft YaHei", serif; letter-spacing: .24em; white-space: nowrap; }
.signature-heart { position: absolute; bottom: 15px; right: 5%; width: 12px; height: 17px; transform: rotate(-9deg); overflow: visible; }
.motion-back { border: 7px solid #fff0f7; background: linear-gradient(145deg, #fff5 0%, transparent 38%, #a45b7819 100%), repeating-conic-gradient(#efa6c480 0% 25%, #ffe7f1c9 0% 50%) 0 0/30px 30px; background-color: #f9d8e5; }
.motion-back::after { content: ""; position: absolute; inset: 8px; border: 1px solid #fff9; }
html.photo-viewing, html.photo-viewing body { overflow: hidden; }
#photo-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: max(16px, env(safe-area-inset-top)) 24px max(16px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; overflow: hidden; color: #fff2f7; background: transparent; box-shadow: none; }
#photo-dialog[open] { display: grid; place-items: center; }
#photo-dialog::backdrop { background: #381423ce; backdrop-filter: blur(14px); }
.photo-viewer-shell { width: min(420px, 100%, calc((100dvh - 184px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) / 1.46)); display: grid; gap: 14px; }
#photo-dialog button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid #fff3; border-radius: 50%; background: #fff1; color: inherit; cursor: pointer; }
#photo-dialog button:hover { background: #fff2; }
#photo-dialog button:focus-visible { outline: 2px solid #fff2f7; outline-offset: 4px; }
.photo-viewer-close { justify-self: end; }
.photo-viewer-stage { touch-action: pan-y pinch-zoom; user-select: none; cursor: grab; }
.photo-viewer-stage:active { cursor: grabbing; }
.photo-viewer-card { position: relative; width: 100%; aspect-ratio: 1 / 1.46; container-type: inline-size; }
#photo-dialog .motion-front { transform: none; backface-visibility: visible; padding: 3% 3% 0; box-shadow: 0 16px 50px #18081044; }
#photo-dialog .signature-name { bottom: 20%; font-size: clamp(8px, 3cqw, 12px); }
#photo-dialog .signature-heart { bottom: 19%; width: 6%; height: auto; }
.photo-viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-viewer-caption { display: grid; gap: 6px; text-align: center; }
.photo-viewer-caption strong { font-size: 14px; font-weight: 500; letter-spacing: .04em; }
.photo-viewer-caption > span { font: italic 11px/1.2 Georgia, serif; letter-spacing: .16em; opacity: .65; }
@media (max-height: 500px) and (min-width: 620px) {
  .photo-viewer-shell { position: relative; width: max-content; max-width: 100%; grid-template-columns: minmax(0, calc((100dvh - 48px) / 1.46)) 150px; gap: 32px; align-items: center; }
  .photo-viewer-stage { grid-column: 1; }
  .photo-viewer-close { position: absolute; right: 0; top: 0; }
  .photo-viewer-controls { grid-column: 2; flex-wrap: wrap; justify-content: space-around; }
  .photo-viewer-caption { order: -1; width: 100%; margin-bottom: 12px; }
}
@media (max-width: 900px) {
  .signature-name { bottom: 12px; font-size: 7px; letter-spacing: .15em; }
  .signature-heart { bottom: 11px; width: 10px; height: 14px; }
  .motion-front { padding: 7px 7px 0; }

  .motion-back { border-width: 6px; background-size: 24px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero * { transition: none !important; }
  .motion-card, .card-turn { will-change: auto; }
}
