.welcome {
  --scene-height: clamp(190px, 58vw, 285px);
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  overflow: hidden;
  min-height: clamp(405px, 46vw, 500px);
  margin: 20px 0 16px;
  border: 1px solid #e8c9844a;
  border-radius: 20px;
  background: #101623;
  box-shadow: 0 20px 54px #080713ad;
  color: #fff1d9;
}

.welcome-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  background: #0d111b;
}

.welcome-layer { position: absolute; inset: 0; opacity: 0; }
.welcome-layer.is-current { opacity: 1; }
.welcome-layer.is-incoming { z-index: 1; }

.welcome-art img,
.welcome-art video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 49%;
}

.welcome-art video { opacity: 0; }
.welcome-layer.is-playing-film video { opacity: 1; }
.welcome-art::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, #0b111deb, #0b111db8 34%, #0b111d29 62%, transparent 85%),
    linear-gradient(0deg, #080d18a8, transparent 33%);
}

.welcome-copy { padding: clamp(26px, 5vw, 65px); }
.welcome h1 {
  max-width: 13.5ch;
  font: normal clamp(2.5rem, 5.2vw, 4.65rem)/.99 var(--serif, Georgia, serif);
  letter-spacing: -.05em;
  text-wrap: balance;
  text-shadow: 0 3px 20px #08080b;
}

.welcome-copy p {
  max-width: 41ch;
  margin-top: 1.12rem;
  color: #eee5db;
  font-size: clamp(.95rem, 1.6vw, 1.06rem);
  text-shadow: 0 2px 9px #08080b;
  text-wrap: pretty;
}

.welcome-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .88rem;
  margin-top: 1.45rem;
}

.welcome-main-link,
.welcome-text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.welcome-main-link {
  padding: .56rem .9rem;
  border: 1px solid #ffe4ab;
  border-radius: 8px;
  background: #f0d496;
  color: #261b14;
  font-size: .91rem;
  font-weight: 750;
  box-shadow: 0 4px 18px #13101780;
}

.welcome-main-link:hover { background: #ffe8b7; }
.welcome-text-link { color: #fff0d4; font-size: .84rem; text-decoration: underline; text-underline-offset: .23em; }
.welcome-text-link:hover { color: #ffda8b; }

.game-picker {
  margin: 0 0 18px;
  padding: clamp(14px, 2.8vw, 26px);
  border: 1px solid #e4d7f04d;
  border-radius: 16px;
  background: #141322f5;
  color: #fdf2dd;
  box-shadow: 0 8px 26px #0e0a1c85;
}

.game-picker h2 { font: normal clamp(1.48rem, 3.1vw, 2.25rem)/1.1 var(--serif, Georgia, serif); }
.picker-options { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.picker-options button {
  min-height: 42px;
  padding: .33rem .67rem;
  border: 1px solid #b6a7ca63;
  border-radius: 7px;
  background: #211f32;
  color: #eee6f4;
  font: 600 .84rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}

.picker-options button:hover { border-color: #ebd7b0; }
.picker-options button[aria-pressed='true'] { border-color: #efd498; background: #efd498; color: #291d1c; }
.picker-results { margin-top: .7rem; }
.picker-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.picker-game {
  display: grid;
  grid-template-columns: clamp(52px, 12vw, 84px) minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  min-height: 68px;
  padding: .4rem .67rem .4rem .4rem;
  border: 1px solid #bdb1c544;
  border-radius: 8px;
  background: #232133;
  color: #fff0d9;
  text-decoration: none;
}

.picker-game:hover { border-color: #f0d899; background: #31283c; }
.picker-game img { width: 100%; height: 53px; object-fit: cover; border-radius: 5px; }
.picker-game-copy { display: grid; gap: .13rem; }
.picker-game-copy strong { font-size: .93rem; line-height: 1.18; }
.picker-game-copy > span { color: #ece0f1; font-size: .79rem; line-height: 1.32; text-wrap: pretty; }
.picker-arrow { color: #eed29b; }

.game-picker [hidden] { display: none; }
.welcome :focus-visible, .game-picker :focus-visible { outline: 2px solid #fff0b5; outline-offset: 3px; }
#game-picker, #games { scroll-margin-block-start: 16px; }

@media (max-width: 730px) {
  .welcome-copy { padding: 27px 22px; }
  .welcome-art img, .welcome-art video { object-position: 64% center; }
}

@media (max-width: 560px) {
  .welcome { display: block; min-height: 0; margin-top: 12px; border-radius: 15px; }
  .welcome-art { position: relative; height: var(--scene-height); }
  .welcome-art img, .welcome-art video { object-position: 69% center; }
  .welcome-art::after { background: linear-gradient(0deg, #101623, transparent 45%); }
  .welcome-copy { padding: 0 14px 16px; }
  .welcome h1 { max-width: 16ch; font-size: clamp(2rem, 8.7vw, 2.8rem); }
  .welcome-copy p { margin-top: .55rem; font-size: .9rem; }
  .welcome-links { margin-top: .8rem; gap: .15rem .65rem; }
  .picker-games { grid-template-columns: minmax(0, 1fr); }
  .picker-options button { min-height: 44px; }
}

@media (prefers-reduced-motion: no-preference) {
  .welcome-art video { transition: opacity .28s ease; }
}
