html, body { font-family: var(--puzzle-body); }
h1, h2, h3, .stage-hud { font-family: var(--puzzle-display); }
html[data-theme="light"], html[data-theme="light"] body, .wall-page { background: var(--puzzle-snow); color: var(--puzzle-ink); }
html[data-theme="light"] body, .wall-page { --muted: var(--puzzle-muted); --line: var(--puzzle-line); }
header, .wall-page .top { background: color-mix(in srgb, var(--puzzle-snow) 97%, transparent); }
html[data-theme="dark"] header { background: color-mix(in srgb, var(--paper) 97%, transparent); }
:is(#homeView,#personalView,.wall-page) .primary, header .primary {
  background: linear-gradient(#24102420,#24102420), var(--puzzle-create);
  color: white;
  border: 1px solid transparent;
  border-radius: var(--puzzle-outerRadius);
  box-shadow: 0 8px 16px -8px #aa328272;
}
:is(#homeView,#personalView,.wall-page) .primary:hover, header .primary:hover { filter: brightness(.94); }
:is(#homeView,#personalView,.wall-page) .secondary, .wall-page .button:not(.primary) { border-radius: var(--puzzle-outerRadius); }
.moments-hero { min-height: clamp(340px,37vw,520px); padding-block: clamp(28px,4.5vw,66px) 24px; }
.moments-hero h1 { font-family: var(--puzzle-display); font-size: clamp(52px,8.3vw,108px); line-height: .98; font-weight: 800; letter-spacing: -.063em; }
.moments-hero p { max-width: 41ch; }
.moments-kicker, .walls-feature .eyebrow, .wall-page .eyebrow { color: var(--puzzle-create-to); }
.moments-hero .hero-buttons { align-items: center; }
.moments-hero .hero-buttons .primary { display: inline-flex; gap: 9px; align-items: center; }
.play-glyph { width: 12px; height: 14px; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%); }
.puzzle-hero { display: grid; place-items: center; aspect-ratio: 1.24; margin: 0; isolation: isolate; }
.puzzle-assembly { width: 84%; max-height: 450px; z-index: 2; overflow: visible; filter: drop-shadow(0 15px 15px #29203320); }
.puzzle-assembly use { animation: assemble-piece .85s var(--puzzle-motion) both; }
.piece-top { --px: -39px; --py: -40px; animation-delay: .02s!important; }
.piece-people { --px: -43px; --py: 30px; animation-delay: .08s!important; }
.piece-mid { --px: 11px; --py: 47px; animation-delay: .13s!important; }
.piece-tip { --px: 46px; --py: -3px; animation-delay: .24s!important; }
@keyframes assemble-piece { from { transform: translate(var(--px),var(--py)); opacity: .54; } to { transform: translate(0,0); opacity: 1; } }
.puzzle-orbit { position: absolute; width: 88%; aspect-ratio: 1.22; border: 1px solid var(--puzzle-line); border-radius: 50%; transform: rotate(-18deg); pointer-events: none; }
.puzzle-orbit.orbit-inner { width: 73%; transform: rotate(22deg); }
.puzzle-hero .hero-chip-new { bottom: 0; inset-inline-end: 6%; box-shadow: 0 6px 26px #27202d18; border: 1px solid var(--puzzle-line); font-family: var(--puzzle-body); }
.category-nav .filter.active { background: var(--puzzle-create-to); color: #fff; }
.category-nav .wall-nav { border-color: #aa32824a; color: var(--puzzle-create-to); }
.cover-button, .wall-covers img, .personal-photo-list img, .panel, .step { border-radius: var(--puzzle-outerRadius); }
.moments-rail { gap: clamp(12px,1.5vw,20px); }
[data-piece="create"] { --piece-tone: var(--puzzle-create); }
[data-piece="people"] { --piece-tone: var(--puzzle-people); }
[data-piece="discover"] { --piece-tone: var(--puzzle-discover); }
[data-piece="complete"] { --piece-tone: var(--puzzle-complete); }
.moments-section .shelf-head h2::before, .walls-feature .eyebrow::before {
  content: ""; display: inline-block; width: var(--puzzle-seam); height: var(--puzzle-depth);
  border-radius: var(--puzzle-neck); background: var(--piece-tone); margin-inline-end: 9px; vertical-align: middle;
}
.walls-feature { border-radius: calc(var(--puzzle-outerRadius) + var(--puzzle-innerRadius)); background: linear-gradient(125deg,var(--white),var(--soft)); }
.wall-covers { gap: var(--puzzle-seam); }
.footer-brand { display: inline-flex; gap: 5px; align-items: center; }
.footer-brand img:first-child { width: 29px; height: 29px; }
.wall-page { --violet: var(--puzzle-create-to); }
.wall-page .dev { color: var(--puzzle-muted); }
.wall-page .theater { --glow: var(--puzzle-create-to); --light: #ffdeee; --wing-edge: var(--puzzle-people); background: radial-gradient(ellipse at 50% 29%,color-mix(in srgb,var(--glow) 33%,#15101c),#130f19 68%); }
.wall-page .theater[data-theme="gold"] { --glow: var(--puzzle-complete-from); --light: #e8f29b; --wing-edge: var(--puzzle-complete); }
.wall-page .theater[data-theme="ice"] { --glow: var(--puzzle-discover-from); --light: #d1fcff; --wing-edge: var(--puzzle-discover); }
.wall-page .main-screen { padding: var(--puzzle-seam); background: var(--wing-edge); border-radius: 9% / 5%; }
.wall-page .wing { border-radius: var(--puzzle-outerRadius); border: var(--puzzle-seam) solid transparent; background: linear-gradient(#211827,#17111e) padding-box,var(--wing-edge) border-box; }
.wall-page .opening h2 { font-family: var(--puzzle-display); }
.wall-light-wall { position: absolute; inset: 21% 8% 15%; transform: translateZ(-32px); border-block: 1px solid #fff2; background: repeating-linear-gradient(90deg,#fff1 0 1px,transparent 1px 16.666%); opacity: .3; pointer-events: none; }
.wall-page .stage-footer .puzzle-progress { display: flex; gap: var(--puzzle-seam); margin-top: 5px; }
.puzzle-progress i { position: relative; width: var(--puzzle-depth); height: var(--puzzle-innerRadius); background: #fff2; border-radius: var(--puzzle-seam); }
.puzzle-progress i[data-state="played"] { background: var(--puzzle-discover); }
.puzzle-progress i[data-state="active"] { background: var(--puzzle-complete); }
.wall-page .status.good { color: var(--puzzle-complete-from); }
@media(max-width:720px) {
  .moments-hero { padding-block: 23px 14px; }
  .moments-hero h1 { font-size: clamp(46px,13vw,78px); }
  .puzzle-hero { width: min(100%,400px); margin: 0 auto; aspect-ratio: 1.68; }
  .puzzle-assembly { width: 67%; max-height: 235px; }
  .puzzle-orbit { width: 77%; aspect-ratio: 1.6; }
  .puzzle-orbit.orbit-inner { width: 67%; }
  .wall-page .wing { border-width: 2px; }
}
@media(prefers-reduced-motion:reduce) { .puzzle-assembly use { animation:none; } }
