* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #333;
  overflow: hidden;
  background: #1e1a19;
}
.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.moving-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
}
.photo-row {
  height: calc(100vh / 7);
  height: calc(100dvh / 7);
  min-height: 0;
  width: max-content;
  display: flex;
  flex: 0 0 calc(100vh / 7);
  flex: 0 0 calc(100dvh / 7);
  gap: 0;
  padding: 0;
  margin: 0 0 -3px 0;
  animation: slide-left var(--duration, 150s) linear infinite;
  will-change: transform;
}
.photo-row.reverse { animation-name: slide-right; }
.photo-row img {
  display: block;
  width: clamp(220px, 23vw, 340px);
  height: calc(100% + 6px);
  margin-top: -3px;
  object-fit: cover;
  object-position: center;
  flex: 0 0 auto;
  border: 0;
  margin: 0;
  padding: 0;
}
@keyframes slide-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes slide-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(0,0,0,.36);
}
.panel {
  width: min(360px, calc(100vw - 36px));
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px 16px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0,0,0,.20);
  position: relative;
  z-index: 1;
}
.hidden { display: none !important; }
h1, h2, p { margin: 0; }
.welcome-panel h1 { font-size: 23px; line-height: 1.35; font-weight: 750; }
.welcome-panel p { font-size: 12px; color: #777; margin: 8px 0 12px; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.primary {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #168ff5;
  font-size: 16px;
  font-weight: 700;
}
.primary:active { filter: brightness(.94); transform: translateY(1px); }
.question-panel {
  width: min(360px, calc(100vw - 36px));
  min-height: 466px;
  padding: 16px 32px 28px;
}
.question-panel h2, .finish-panel h2 { font-size: 23px; line-height: 1.4; font-weight: 750; }
.hint { color: #777; font-size: 12px; margin-top: 4px; }
.age-options { display: flex; flex-direction: column; gap: 66px; margin-top: 78px; }
.age-option {
  position: relative;
  width: 100%;
  height: 84px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 13px;
  background: #ddd;
}
.age-option img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.72); }
.age-option span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #222;
  font-size: 16px;
  font-weight: 750;
  text-shadow: 0 1px 2px rgba(255,255,255,.3);
}
.age-option:focus-visible { outline: 3px solid #168ff5; outline-offset: 3px; }
.finish-panel { padding: 17px 12px 15px; width: min(360px, calc(100vw - 36px)); }
.finish-panel .hint { margin: 8px 0 10px; }
.finish-action { height: 48px; border-radius: 9px; font-size: 14px; margin-top: 0; }
.secondary {
  width: 100%;
  height: 48px;
  border: 1px solid #168ff5;
  border-radius: 9px;
  color: #168ff5;
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  margin-top: 9px;
}
@media (max-width: 600px) {
  .photo-row { height: calc(100vh / 7); height: calc(100dvh / 7); min-height: 0; flex-basis: calc(100vh / 7); flex-basis: calc(100dvh / 7); }
  .photo-row img { width: 58vw; }
  .panel { border-radius: 15px; }
  .welcome-panel { padding: 19px 14px 14px; }
  .welcome-panel h1 { font-size: 21px; }
  .question-panel { min-height: 430px; padding-left: 28px; padding-right: 28px; }
  .age-options { margin-top: 66px; gap: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  .photo-row { animation-duration: 180s; }
}
