@font-face { font-family: Inter; src: url(/fonts/Inter-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --navy: #022b49;
  --cream: #f5f0e8;
  --mist: #8ea6b3;
  --sand: #cdbda1;
  --night: #070e14;
  --paper: var(--cream);
  --ink: 2 43 73;
  --raised: #fbf8f3;
  --serif: "Times New Roman", Tinos, Times, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --out: cubic-bezier(0.23, 1, 0.32, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --paper: #09121a; --ink: 245 240 232; --raised: #111d27; color-scheme: dark; }
}
:root[data-theme="dark"] { --paper: #09121a; --ink: 245 240 232; --raised: #111d27; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
/* No double-tap zoom anywhere: fast taps through photos read as a zoom in Safari. Pinch-zoom still works on the gallery. */
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
*, *::before, *::after { touch-action: manipulation; }
html.viewing { overflow: hidden; }
body {
  margin: 0;
  min-height: 100svh;
  background: var(--paper);
  color: rgb(var(--ink));
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--mist); outline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }

/* A light grain keeps every surface analog. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::after { mix-blend-mode: screen; opacity: 0.05; } }

.eyebrow { font: 500 11px/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; }

/* MARK: Bar */

/* The wordmark lives on the cover. This bar only slides in once the cover has scrolled away. */
.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: calc(46px + var(--safe-t));
  padding-top: var(--safe-t);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 1px 0 rgb(var(--ink) / 0.08);
  transform: translateY(-100%);
  transition: transform 0.45s var(--out);
}
.bar.solid { transform: none; }
.wordmark { font: 400 20px/1 var(--serif); color: rgb(var(--ink)); text-decoration: none; }

/* MARK: Cover */

main { padding-top: calc(var(--safe-t) + 10px); }
.hero {
  position: relative;
  margin: 0 12px;
  height: min(76svh, calc((100vw - 24px) * 1.32));
  max-width: 1176px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: var(--navy);
  color: var(--cream);
  cursor: pointer;
  transform: translateZ(0);
}
@media (min-width: 700px) { .hero { height: min(78svh, 720px); margin: 0 auto; width: calc(100% - 48px); } }
.hero-media { position: absolute; inset: 0; transform: translateY(var(--drift, 0)) scale(var(--zoom, 1)); will-change: transform; }
.hero-ph, .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-ph { background: var(--ph) center / cover; filter: blur(24px); transform: scale(1.15); }
.hero-img {
  opacity: 0;
  filter: blur(26px) brightness(1.9) saturate(0.2) sepia(0.7);
  transform: scale(1.14);
  transition: opacity 1.1s var(--out), filter 2.2s var(--out), transform 2.6s var(--out);
}
.hero.developed .hero-img { opacity: 1; filter: none; transform: none; }
.hero .leak, .tile .leak {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  background:
    radial-gradient(40% 55% at 30% 40%, rgb(255 168 96 / 0.9), transparent 70%),
    radial-gradient(30% 40% at 60% 60%, rgb(255 96 72 / 0.55), transparent 70%);
}
.hero.developed .leak { animation: leak 2.4s 0.15s var(--out) both; }
@keyframes leak {
  0% { opacity: 0; transform: translateX(-55%) rotate(-8deg); }
  30% { opacity: 0.75; }
  100% { opacity: 0; transform: translateX(55%) rotate(6deg); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(2 43 73 / 0.88) 0%, rgb(2 43 73 / 0.42) 34%, rgb(2 43 73 / 0) 62%),
    linear-gradient(to bottom, rgb(2 43 73 / 0.35), transparent 26%);
}
.hero-mark {
  position: absolute;
  top: 20px;
  left: 22px;
  z-index: 1;
  font: 400 20px/1 var(--serif);
  color: var(--cream);
  text-shadow: 0 1px 12px rgb(2 20 35 / 0.35);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.8s 0.1s var(--out), transform 0.8s 0.1s var(--out);
}
.ready .hero-mark { opacity: calc(var(--fade, 1)); transform: none; }
@media (min-width: 700px) { .hero-mark { top: 32px; left: 40px; font-size: 22px; } }
.hero-copy {
  position: absolute;
  left: 22px;
  right: 88px;
  bottom: 24px;
  opacity: var(--fade, 1);
}
@media (min-width: 700px) { .hero-copy { left: 40px; bottom: 40px; right: 140px; } }
.hero .eyebrow { opacity: 0; color: rgb(245 240 232 / 0.75); transition: opacity 0.8s 0.25s var(--out); }
.title {
  margin: 12px 0 16px;
  font-size: clamp(38px, 10.5vw, 72px);
  line-height: 1;
  text-wrap: balance;
}
.word { display: inline-block; overflow: clip; overflow-clip-margin: 0.2em; vertical-align: top; padding-bottom: 0.06em; }
.word > span {
  display: inline-block;
  transform: translateY(105%);
  filter: blur(6px);
  opacity: 0;
  transition: transform 1s var(--out), filter 1s var(--out), opacity 0.6s var(--out);
  transition-delay: calc(0.32s + var(--i) * 0.075s);
}
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; opacity: 0; transform: translateY(8px); transition: opacity 0.8s 0.7s var(--out), transform 0.8s 0.7s var(--out); }
.ready .hero .eyebrow, .ready .hero-meta { opacity: 1; transform: none; }
.ready .word > span { transform: none; filter: blur(0); opacity: 1; }
.meta { font-size: 13px; color: rgb(245 240 232 / 0.78); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.frost {
  background: rgb(245 240 232 / 0.16);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid rgb(245 240 232 / 0.22);
}
.play {
  position: absolute;
  right: 20px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--cream);
  box-shadow: 0 10px 30px rgb(2 20 35 / 0.35);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.6s 1s var(--out), transform 0.9s 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.play svg { margin-left: 3px; }
.ready .play { opacity: 1; transform: none; }
.hero:active .play { transform: scale(0.92); transition-delay: 0s; transition-duration: 0.15s; }
.pulse { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgb(245 240 232 / 0.7); animation: pulse 2.6s 2s var(--out) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.7); opacity: 0; } }
@media (min-width: 700px) { .play { right: 40px; bottom: 40px; width: 68px; height: 68px; } }

/* MARK: Grid */

.grid-wrap { padding: 12px 12px 0; max-width: 1200px; margin: 0 auto; }
@media (min-width: 700px) { .grid-wrap { padding: 24px 24px 0; } }
.grid { position: relative; transition: height 0.5s var(--out); }
.tile {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  transition: opacity 0.35s var(--out);
}
.tile-inner {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  overflow: hidden;
  isolation: isolate;
  background: color-mix(in srgb, var(--c, rgb(var(--ink))) 30%, rgb(var(--ink) / 0.06));
  transition: transform 0.25s var(--out);
}
.tile:active .tile-inner { transform: scale(0.97); }
.tile .ph { position: absolute; inset: -12%; background-size: cover; background-position: center; filter: blur(14px); opacity: 0; transition: opacity 0.5s; }
.tile.in .ph { opacity: 1; }
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(14px) brightness(1.6) saturate(0.3) sepia(0.6);
  transform: scale(1.08);
  transition: opacity 0.9s var(--out), filter 1.7s var(--out), transform 1.7s var(--out);
  transition-delay: var(--delay, 0s);
}
.tile.in.loaded img { opacity: 1; filter: none; transform: none; }
.tile.in.loaded .leak { animation: leak 1.8s var(--delay, 0s) var(--out) both; left: var(--leak-x); }
.tile.gone { opacity: 0; pointer-events: none; }
.tile .fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cream);
  background: rgb(7 14 20 / 0.32);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: scale(0);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tile.is-fav .fav { transform: scale(1); }

.empty { text-align: center; padding: 72px 24px 24px; }
.empty-heart { color: rgb(var(--ink) / 0.3); margin-bottom: 14px; }
.empty h2 { font-size: 28px; margin-bottom: 8px; }
.empty p { color: rgb(var(--ink) / 0.6); }

/* MARK: Footer */

.foot { text-align: center; padding: 72px 24px calc(124px + var(--safe-b)); }
.monogram { font: 400 72px/1 var(--serif); color: rgb(var(--ink) / 0.1); }
.foot-line { font: 400 22px/1.3 var(--serif); margin: 8px 0 22px; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.15s var(--out), opacity 0.15s;
}
.pill:active { transform: scale(0.97); opacity: 0.88; }
.pill.navy { background: var(--navy); color: var(--cream); }
.pill.cream { background: var(--cream); color: var(--navy); }
.pill.outline { border: 1px solid rgb(245 240 232 / 0.35); color: var(--cream); }
.pill.ghost { color: rgb(245 240 232 / 0.75); height: 42px; }

/* MARK: Dock */

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-b));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  color: var(--cream);
  background: rgb(7 14 20 / 0.74);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 12px 34px rgb(2 20 35 / 0.28), inset 0 0 0 1px rgb(245 240 232 / 0.08);
  transform: translate(-50%, 160%);
  transition: transform 0.8s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.dock.show { transform: translate(-50%, 0); }
.viewing .dock { transform: translate(-50%, 160%); transition-duration: 0.3s; }
.seg { position: relative; display: flex; }
.seg-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 999px;
  background: rgb(245 240 232 / 0.15);
  transition: transform 0.5s cubic-bezier(0.34, 1.3, 0.64, 1), width 0.5s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.seg-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  font: 500 13px/1 var(--sans);
  color: rgb(245 240 232 / 0.6);
  transition: color 0.3s;
}
.seg-btn.active { color: var(--cream); }
.seg-btn .count { font-variant-numeric: tabular-nums; display: inline-block; min-width: 0.6em; }
.seg-btn.has svg { color: var(--sand); }
.dock-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px 0 15px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--navy);
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.15s var(--out), opacity 0.2s;
}
.dock-save:active { transform: scale(0.95); }
.dock-save:disabled { opacity: 0.4; }

/* MARK: Missing */

.missing { min-height: 100svh; display: grid; place-content: center; text-align: center; padding: 24px; gap: 12px; }
.missing h1 { font-size: 30px; }
.missing p { color: rgb(var(--ink) / 0.65); max-width: 30ch; margin: 0 auto; }

/* MARK: Viewer */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  color: var(--cream);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: contain;
}
.viewer * { touch-action: none; }
.zoomed .viewer, .zoomed .viewer * { touch-action: pinch-zoom; }
.v-backdrop { position: absolute; inset: 0; background: var(--night); }
.v-ambient { position: absolute; inset: -12%; overflow: hidden; opacity: var(--fade, 1); }
.v-ambient img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(46px) saturate(1.5) brightness(0.5);
  transform: scale(1.25);
  opacity: 0;
  transition: opacity 0.9s var(--out);
}
.v-ambient img.on { opacity: 1; }
.v-ambient::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgb(7 14 20 / 0.75) 85%); }
.v-stage { position: absolute; inset: 0; perspective: 1100px; perspective-origin: 50% 50%; transform-origin: 50% 40%; }
.v-cube { position: absolute; inset: 0; transform-style: preserve-3d; }
.v-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}
.v-face:not([data-role="cur"]) { visibility: hidden; }
.v-cube.turning .v-face { visibility: visible; }
.v-face::after { content: ''; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); pointer-events: none; }
.v-photo {
  position: absolute;
  border-radius: 14px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.45);
  background: #111a22;
}
.v-photo .ph { position: absolute; inset: -10%; background-size: cover; background-position: center; filter: blur(18px); }
.v-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(10px) brightness(1.3);
  transition: opacity 0.5s var(--out), filter 0.9s var(--out);
}
.v-photo.loaded img { opacity: 1; filter: none; }

.v-chrome { position: absolute; inset: 0; pointer-events: none; opacity: var(--fade, 1); transition: opacity 0.25s var(--out); }
.holding .v-chrome, .dragging .v-chrome { transition-duration: 0.15s; }
.holding .v-chrome { opacity: 0; }
.v-top {
  position: absolute;
  inset: 0 0 auto;
  padding: calc(var(--safe-t) + 10px) 12px 24px;
  background: linear-gradient(rgb(7 14 20 / 0.55), transparent);
}
.v-progress { display: flex; gap: 3px; height: 2.5px; }
.v-progress i { flex: 1; min-width: 2px; border-radius: 2px; background: rgb(245 240 232 / 0.26); overflow: hidden; }
.v-progress b { display: block; height: 100%; background: var(--cream); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 8px rgb(245 240 232 / 0.6); }
.v-head { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.v-avatar {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 400 17px/1 var(--serif);
  color: var(--navy);
  background: linear-gradient(140deg, var(--cream), var(--sand) 55%, var(--mist));
}
.v-titles { min-width: 0; }
.v-title { font: 400 17px/1.15 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-sub { font-size: 12px; color: rgb(245 240 232 / 0.65); font-variant-numeric: tabular-nums; margin-top: 2px; }
.v-btn {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--cream);
  background: rgb(245 240 232 / 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgb(245 240 232 / 0.14);
  pointer-events: auto;
  transition: transform 0.15s var(--out), background-color 0.3s;
}
.v-btn:active { transform: scale(0.88); }
.v-close { margin-left: auto; }
.v-bottom {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 40px 14px calc(var(--safe-b) + 16px);
  background: linear-gradient(transparent, rgb(7 14 20 / 0.5));
}
.v-look {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px 0 11px;
  border-radius: 999px;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgb(245 240 232 / 0.12);
  border: 1px solid rgb(245 240 232 / 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.v-look[hidden] { display: inline-flex; visibility: hidden; }
.v-actions { display: flex; gap: 10px; margin-left: auto; }
.v-fav.on { background: var(--cream); color: var(--navy); }
.at-end .v-bottom { opacity: 0; pointer-events: none; }
.at-end .v-bottom * { pointer-events: none; }
.v-save .ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  opacity: 0;
  background: conic-gradient(var(--cream) calc(var(--p, 0) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 0);
  transition: opacity 0.2s;
}
.v-save.busy .ring { opacity: 1; }
.v-save.busy svg { animation: bob 0.9s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(2px); } }
.v-save.done { background: var(--cream); color: var(--navy); }

.v-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.burst { position: absolute; color: var(--cream); filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.35)) drop-shadow(0 0 24px rgb(255 190 150 / 0.5)); }
.spark { position: absolute; border-radius: 50%; }
.spark.s0 { background: var(--cream); }
.spark.s1 { background: var(--sand); }
.spark.s2 { background: #ffb38a; }

.v-end {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--safe-t) + 80px) 28px calc(var(--safe-b) + 40px);
}
.fan { position: relative; width: 100%; height: 200px; margin-bottom: 28px; }
.fan .print {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 128px;
  height: 168px;
  padding: 5px;
  border-radius: 2px;
  background: var(--cream);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.45);
  transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r));
}
.fan .print img { width: 100%; height: 100%; object-fit: cover; border-radius: 1px; display: block; }
.v-end h2 { font-size: 40px; line-height: 1.05; }
.v-end p { margin: 10px 0 30px; color: rgb(245 240 232 / 0.7); }
.v-end-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: min(100%, 300px); pointer-events: auto; }
.v-end-actions .pill span { display: inline-flex; }

/* MARK: Save sheet */

.sheet-scrim { position: fixed; inset: 0; z-index: 80; background: rgb(7 14 20 / 0.5); opacity: 0; transition: opacity 0.35s var(--out); }
.sheet-scrim.open { opacity: 1; }
.sheet {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(8px + var(--safe-b));
  z-index: 81;
  max-width: 440px;
  margin: 0 auto;
  padding: 10px 22px 16px;
  border-radius: 28px;
  background: var(--raised);
  color: rgb(var(--ink));
  text-align: center;
  box-shadow: 0 30px 80px rgb(2 20 35 / 0.35);
  transform: translateY(calc(100% + 40px));
  transition: transform 0.55s cubic-bezier(0.32, 1.2, 0.5, 1);
  touch-action: none;
}
.sheet.open { transform: none; }
.grabber { width: 36px; height: 4px; border-radius: 2px; background: rgb(var(--ink) / 0.15); margin: 0 auto 6px; }
.stack { position: relative; height: 128px; margin: 6px 0 12px; }
.stack .print {
  position: absolute;
  left: 50%;
  top: 14px;
  width: 78px;
  height: 100px;
  padding: 4px;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(2 20 35 / 0.18);
  transform: translate(calc(-50% + var(--x)), 24px) rotate(0deg) scale(0.7);
  opacity: 0.25;
  filter: grayscale(1) brightness(1.3);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s, filter 1.2s var(--out);
}
.stack .print img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stack .print.in {
  opacity: 1;
  filter: none;
  transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r));
}
.sheet-title { font-size: 28px; line-height: 1.1; }
.sheet-sub { margin-top: 6px; color: rgb(var(--ink) / 0.6); font-size: 14px; }
.sheet-bar { height: 4px; border-radius: 2px; background: rgb(var(--ink) / 0.1); overflow: hidden; margin: 20px 0 10px; }
.sheet-bar i { display: block; height: 100%; background: rgb(var(--ink)); transform-origin: left; transform: scaleX(0); transition: transform 0.3s var(--out); }
.sheet.done .sheet-bar, .sheet.ready .sheet-bar { opacity: 0; transition: opacity 0.4s 0.3s; }
.sheet-status { min-height: 20px; font-size: 13px; color: rgb(var(--ink) / 0.55); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.btn-primary {
  width: 100%;
  height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgb(var(--ink));
  color: var(--paper);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.3s, transform 0.15s var(--out);
}
.btn-primary:disabled { opacity: 0.3; cursor: default; }
.btn-primary:not(:disabled):active { transform: scale(0.97); }
.btn-primary .draw { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.5s 0.15s var(--out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.btn-text { margin-top: 6px; height: 40px; font-size: 13px; color: rgb(var(--ink) / 0.6); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgb(var(--ink) / 0.25); }

.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--safe-t) + 14px);
  z-index: 90;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--cream);
  font-size: 13px;
  box-shadow: 0 12px 30px rgb(2 20 35 / 0.3);
  transform: translate(-50%, -140%);
  transition: transform 0.5s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
