:root {
  color-scheme: dark;
  --paper: #f8f6ef;
  --ink: #f8f6ef;
  --muted: rgba(248, 246, 239, 0.72);
  --line: rgba(248, 246, 239, 0.28);
  --panel: rgba(12, 15, 16, 0.32);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #0a0d0e;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

body {
  min-height: 100vh;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 38% 24%, rgba(114, 126, 133, 0.42), transparent 34%),
    linear-gradient(140deg, #161c1d 0%, #252d2d 46%, #0a0d0e 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero::before {
  background-image: var(--photo);
  background-position: center;
  background-size: cover;
  transform: scale(1.01);
  opacity: 1;
  filter: blur(0) saturate(1);
  transition:
    opacity 900ms var(--ease-out),
    filter 1100ms var(--ease-out),
    transform 1200ms var(--ease-out);
}

.hero::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.18) 40%, rgba(0, 0, 0, 0.72) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.46) 0%, rgba(0, 0, 0, 0.08) 54%, rgba(0, 0, 0, 0.36) 100%);
  backdrop-filter: saturate(0.92);
  transition: opacity 900ms var(--ease-out);
}

.content {
  width: min(100%, 680px);
  padding: clamp(28px, 7vw, 56px);
  display: grid;
  gap: 17px;
}

.content > * {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 720ms var(--ease-out),
    transform 720ms var(--ease-out);
}

body.is-loading .hero::before {
  opacity: 0;
  filter: blur(18px) saturate(0.72);
  transform: scale(1.045);
}

body.is-loading .hero::after {
  opacity: 0.88;
}

body.is-loading .content > * {
  opacity: 0;
  transform: translateY(14px);
}

body.photo-ready .content > *:nth-child(1) {
  transition-delay: 120ms;
}

body.photo-ready .content > *:nth-child(2) {
  transition-delay: 220ms;
}

body.photo-ready .content > *:nth-child(3) {
  transition-delay: 320ms;
}

body.photo-ready .content > *:nth-child(4) {
  transition-delay: 420ms;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.82;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(34px, 7.6vw, 66px);
  font-weight: 440;
  line-height: 0.99;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

h1 br {
  display: none;
}

h1 .title-sub {
  font-size: 0.92em;
  opacity: 0.92;
}

.coords {
  margin: -2px 0 0;
  color: rgba(248, 246, 239, 0.7);
  font-size: clamp(14px, 3.45vw, 16px);
  line-height: 1.45;
  letter-spacing: 0.015em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 9px;
  font-variant-numeric: tabular-nums;
}

.coord-dot {
  color: rgba(248, 246, 239, 0.44);
}

.actions {
  display: grid;
  gap: 10px;
  width: min(100%, 420px);
  margin-top: 8px;
}

.primary,
.secondary,
.choice {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-family: inherit;
  background: rgba(248, 246, 239, 0.14);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.primary {
  background: rgba(248, 246, 239, 0.92);
  color: #151819;
  border-color: transparent;
  font-weight: 520;
  cursor: pointer;
}

.secondary {
  font-family: inherit;
  cursor: pointer;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 18px;
  background: rgba(9, 11, 12, 0.74);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transform: translateY(100%);
  transition: transform 180ms ease;
}

.sheet[data-open="true"] {
  transform: translateY(0);
}

.choices {
  width: min(100%, 480px);
  margin: 0 auto;
  display: grid;
  gap: 9px;
}

.choice {
  background: rgba(248, 246, 239, 0.1);
}

.close {
  color: var(--muted);
}

.download {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(10, 12, 13, 0.32);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  text-decoration: none;
}

.download svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .content > * {
    transition: none;
  }

  body.is-loading .content > * {
    transform: none;
  }
}

@media (orientation: landscape) and (max-height: 640px) {
  .hero {
    align-items: center;
  }

  .content {
    width: min(56vw, 620px);
  }
}
