.l2-age-input,
.l2-pick {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.l2-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--h3-bg) 82%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.l2-age-input:checked ~ .l2-gate { display: none; }

.l2-gate-box {
  width: 100%;
  max-width: 360px;
  padding: 28px 22px 22px;
  text-align: center;
  background: var(--h3-bg-header);
  border: 1px solid var(--h3-line);
  border-radius: var(--h3-r-card);
}

.l2-gate-age {
  margin: 0;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--h3-primary-text);
}

.l2-gate-title {
  margin: 10px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.l2-gate-text {
  margin: 10px 0 22px;
  font-size: .92rem;
  color: var(--h3-text-dim);
}

.l2-gate-yes,
.l2-gate-no {
  width: 100%;
  height: 52px;
  font-size: 1rem;
}

.l2-gate-no { margin-top: 10px; }

.l2-age-input:focus-visible ~ .l2-gate .l2-gate-yes {
  outline: 2px solid var(--h3-primary);
  outline-offset: 3px;
}

.l2-screen {
  display: flex;
  flex-direction: column;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  min-height: 540px;
  margin: 0 auto;
  overflow: hidden;
}

.l2-wall {
  position: relative;
  flex: 1;
  min-height: 150px;
  overflow: hidden;
  container-type: size;
  container-name: l2-wall;
}

.l2-wall-tilt {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  transform: translate(-50%, -50%);
}

.l2-row-track {
  --l2-th: calc(33.33cqh - 7px);
  display: flex;
  gap: 10px;
  width: max-content;
  margin: 0;
  padding: 0 5px 0 0;
  list-style: none;
  animation: l2-left 60s linear infinite paused;
}

.l2-row-right { animation-name: l2-right; animation-duration: 70s; }
.l2-row-slow { animation-duration: 85s; }

.l2-row-track li { flex: none; }

.l2-age-input:checked ~ .l2-screen .l2-row-track { animation-play-state: running; }
.l2-age-input:checked ~ .l2-screen .l2-wall:hover .l2-row-track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .l2-age-input:checked ~ .l2-screen .l2-row-track { animation-play-state: paused; }
}

@keyframes l2-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes l2-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.l2-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: calc(var(--l2-th) * .75);
  height: var(--l2-th);
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid transparent;
  background: var(--h3-panel);
  color: var(--h3-text);
  cursor: pointer;
  isolation: isolate;
  transition: border-color .2s ease, transform .2s ease;
}

.l2-tile:active { transform: scale(.97); }

.l2-tile::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: -1;
  background: linear-gradient(transparent, color-mix(in srgb, var(--h3-bg) 88%, transparent));
}

.l2-tile-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.l2-tile-name {
  display: flex;
  flex-direction: column;
  padding: 8px 9px;
  line-height: 1.2;
}

.l2-tile-name b { font-size: .82rem; font-weight: 800; }
.l2-tile-name span { font-size: .72rem; color: var(--h3-text-dim); }


#l2-pick-0:checked ~ * .l2-tile-0,
#l2-pick-1:checked ~ * .l2-tile-1,
#l2-pick-2:checked ~ * .l2-tile-2,
#l2-pick-3:checked ~ * .l2-tile-3,
#l2-pick-4:checked ~ * .l2-tile-4,
#l2-pick-5:checked ~ * .l2-tile-5,
#l2-pick-6:checked ~ * .l2-tile-6,
#l2-pick-7:checked ~ * .l2-tile-7,
#l2-pick-8:checked ~ * .l2-tile-8,
#l2-pick-9:checked ~ * .l2-tile-9,
#l2-pick-10:checked ~ * .l2-tile-10,
#l2-pick-11:checked ~ * .l2-tile-11 {
  border-color: var(--h3-primary);
  box-shadow: 0 0 18px var(--h3-primary);
}

.l2-pick:focus-visible ~ .l2-main .l2-sel-box {
  outline: 2px solid var(--h3-primary);
  outline-offset: 4px;
  border-radius: 12px;
}

.l2-wall::before,
.l2-wall::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}

.l2-wall::before {
  top: 0;
  height: 44px;
  background: linear-gradient(color-mix(in srgb, var(--h3-bg) 85%, transparent), transparent);
}

.l2-wall::after {
  bottom: 0;
  height: 36px;
  background: linear-gradient(transparent, var(--h3-bg));
}

.l2-head {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  margin-top: env(safe-area-inset-top, 0px);
  padding: 0 18px;
}

.l2-brand img { width: 119px; height: auto; }

.l2-login {
  height: 36px;
  padding: 0 14px;
  font-size: .86rem;
  background: color-mix(in srgb, var(--h3-bg) 60%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.l2-main { flex: none; }
.l2-main:focus { outline: none; }

.l2-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 18px calc(12px + env(safe-area-inset-bottom, 0px));
}

.l2-title {
  margin: 0;
  font-size: clamp(1.5rem, 7vw, 1.95rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.l2-sel-box { min-height: 36px; display: flex; align-items: center; }

.l2-sel {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  color: var(--h3-text-dim);
}

.l2-sel b { color: var(--h3-primary-text); font-weight: 700; }

#l2-pick-none:checked ~ * .l2-sel-none,
#l2-pick-0:checked ~ * .l2-sel-0,
#l2-pick-1:checked ~ * .l2-sel-1,
#l2-pick-2:checked ~ * .l2-sel-2,
#l2-pick-3:checked ~ * .l2-sel-3,
#l2-pick-4:checked ~ * .l2-sel-4,
#l2-pick-5:checked ~ * .l2-sel-5,
#l2-pick-6:checked ~ * .l2-sel-6,
#l2-pick-7:checked ~ * .l2-sel-7,
#l2-pick-8:checked ~ * .l2-sel-8,
#l2-pick-9:checked ~ * .l2-sel-9,
#l2-pick-10:checked ~ * .l2-sel-10,
#l2-pick-11:checked ~ * .l2-sel-11 {
  display: flex;
  animation: l2-pop .35s ease-out;
}

.l2-sel-ava {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid var(--h3-primary);
}

.l2-sel-ava img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}


.l2-google {
  width: 100%;
  height: 50px;
  font-size: 1rem;
}

.l2-google svg { flex: none; width: 20px; height: 20px; }

.l2-or {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--h3-text-dim2);
}

.l2-or::before,
.l2-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--h3-line);
}

.l2-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }

.l2-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.l2-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--h3-line);
  background: var(--h3-panel-2);
  color: var(--h3-text);
  font: inherit;
  font-size: 1rem;
}

.l2-field input::placeholder { color: var(--h3-text-dim2); }
.l2-field input:focus { border-color: var(--h3-primary); }

.l2-submit {
  width: 100%;
  height: 54px;
  font-size: 1.05rem;
  animation: l2-glow 1.8s ease-out 1.5s 2 paused;
}

.l2-age-input:checked ~ .l2-screen .l2-submit { animation-play-state: running; }

.l2-foot {
  margin: 0;
  font-size: .72rem;
  line-height: 1.4;
  color: var(--h3-text-dim2);
  text-align: center;
}

.l2-foot a {
  color: var(--h3-primary-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@container l2-wall (max-height: 320px) {
  .l2-tile-name { padding: 6px 7px; }
  .l2-tile-name b { font-size: .74rem; }
  .l2-tile-name span { display: none; }
}

@keyframes l2-pop {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@keyframes l2-glow {
  0% { box-shadow: var(--h3-glow-accent), 0 0 0 0 var(--h3-primary); }
  100% { box-shadow: var(--h3-glow-accent), 0 0 0 14px transparent; }
}

@media (max-height: 700px) {
  .l2-panel { gap: 8px; }
  .l2-title { font-size: 1.45rem; }
  .l2-google { height: 46px; }
  .l2-field input { height: 46px; font-size: 1rem; }
  .l2-submit { height: 50px; }
}

@media (max-height: 600px) {
  .l2-head { height: 48px; }
  .l2-title { font-size: 1.3rem; }
  .l2-sel-box { min-height: 30px; }
  .l2-sel-ava { width: 30px; height: 30px; }
  .l2-google { height: 42px; }
  .l2-field input { height: 42px; }
  .l2-submit { height: 46px; }
}

@media (min-width: 920px) {
  .l2-row-track { --l2-th: calc(29cqh - 10px); }
  .l2-wall-tilt { width: 140%; transform: translate(-50%, -50%) rotate(-3.5deg); gap: 12px; }
}

@media (min-width: 900px) and (min-height: 560px) {
  .l2-screen { display: grid; grid-template-columns: 470px minmax(0, 1fr); max-width: 1280px; }
  .l2-wall { grid-column: 2; grid-row: 1; min-height: 0; }
  .l2-wall::after { display: none; }
  .l2-wall::before { height: 56px; }
  .l2-head { padding: 0 24px; }
  .l2-main { grid-column: 1; grid-row: 1; display: flex; align-items: center; padding: 0 36px 0 32px; }
  .l2-panel { gap: 14px; padding: 0; width: 100%; }
  .l2-title { font-size: 2.6rem; }
  .l2-sel-box { min-height: 44px; }
  .l2-google { height: 52px; }
  .l2-field input { height: 52px; }
  .l2-submit { height: 56px; }
  .l2-foot { font-size: .78rem; }
}
