.ems-home-redesign { --ems-home-movie-card-width: 9rem; }
:is(#homeMoviesRail, #homeEsportsRail) > a { width: var(--ems-home-movie-card-width); }

#homeEsportsRail { scroll-snap-type: x proximity; overscroll-behavior-inline: contain; }
.ems-home-esports-card { scroll-snap-align: start; }
.ems-home-esports-card:focus-visible { outline-offset: -3px; }
.ems-home-tournament-game {
  position: absolute;
  inset: .5rem auto auto .5rem;
  padding: .25rem .4rem;
  border-radius: .5rem;
  background: #fff;
  color: var(--ems-blue);
  font-size: .625rem;
  font-weight: 800;
  line-height: 1;
}

@media (min-width: 640px) {
  .ems-home-redesign { --ems-home-movie-card-width: 11rem; }
}

@media (min-width: 768px) {
  .ems-home-redesign { --ems-home-movie-card-width: 12rem; }
}

/* Additional homepage sections */
.ems-home-addition { padding: 28px 0; background: #fff; color: #0f172a; }
.ems-home-addition .ems-home-section-heading { gap: 16px; }
.ems-home-addition h2 { font-size: clamp(1.25rem, 2.2vw, 1.8rem); font-weight: 800; line-height: 1.2; }
.ems-home-addition h2 span { display: inline; color: #0126a5; font-size: inherit; font-weight: inherit; }
.ems-home-addition .ems-home-section-heading > a { font-size: .75rem; margin-top: 0; }
.ems-added-plans { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ems-added-plan, .ems-added-category { position: relative; isolation: isolate; min-width: 0; overflow: hidden; border: 1px solid #dce3ef; border-radius: 18px; background: #0f172a; color: #fff; text-decoration: none; box-shadow: 0 8px 24px -20px rgba(15,23,42,.35); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.ems-added-plan::before, .ems-added-category::before { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8,15,30,.04) 0%, rgba(8,15,30,.16) 30%, rgba(8,15,30,.7) 68%, rgba(8,15,30,.93) 100%); }
.ems-added-card-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.ems-added-card-photo[data-photo="wellness"] { object-position: 50% 12%; }
.ems-added-card-copy { position: relative; z-index: 2; display: block; min-width: 0; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ems-added-photo-error { display: block; margin-top: 8px; color: #fff; font-size: .75rem; line-height: 1.4; }
.ems-added-plan { display: flex; align-items: flex-end; aspect-ratio: 1 / 1; min-height: 0; padding: 24px; }
.ems-added-plan .ems-added-card-copy { width: 100%; }
.ems-added-plan strong { display: block; color: #fff; font-size: clamp(1.1rem, 1.6vw, 1.4rem); font-weight: 800; line-height: 1.25; }
.ems-added-count { display: block; margin-top: 8px; color: #fff; font-size: .87rem; font-weight: 700; line-height: 1.4; }
.ems-added-plan-action { display: inline-flex; gap: 8px; align-items: center; margin-top: 18px; color: #fff; font-size: .75rem; font-weight: 700; }
.ems-added-plan:hover, .ems-added-category:hover { transform: translateY(-3px); border-color: #0126a5; box-shadow: 0 12px 28px -18px rgba(15,23,42,.32); }
.ems-added-plan:hover .ems-added-card-photo, .ems-added-category:hover .ems-added-card-photo { transform: scale(1.05); }
.ems-added-plan:active, .ems-added-category:active { transform: scale(.98); }
.ems-home-addition a:focus-visible, .ems-home-addition button:focus-visible { outline: 3px solid #fa580b; outline-offset: 3px; }
.ems-added-category-rail { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 2); gap: 16px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity; scroll-behavior: smooth; padding: 5px 4px 12px; scrollbar-width: thin; scrollbar-color: #bfcbdf #f8fafc; }
.ems-added-category { display: flex; min-height: 196px; align-items: flex-end; padding: 22px 66px 22px 22px; scroll-snap-align: start; }
.ems-added-category strong { display: block; color: #fff; font-size: 1rem; font-weight: 800; line-height: 1.35; letter-spacing: .015em; overflow-wrap: anywhere; }
.ems-added-category .ems-added-count { font-size: .82rem; }
.ems-added-photo-arrow { position: absolute; z-index: 2; right: 20px; bottom: 22px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; }
.ems-added-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.ems-added-control { display: inline-flex; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; border: 1px solid #dce3ef; border-radius: 999px; background: #fff; color: #0126a5; cursor: pointer; transition: background .2s ease, color .2s ease; }
.ems-added-control:hover { background: #0126a5; color: #fff; }
.ems-added-control:active { background: #fa580b; color: #fff; }
.ems-added-control:disabled { opacity: .4; cursor: default; }
.ems-added-control svg { width: 18px; height: 18px; }
.ems-added-status { margin: 10px 0 0; color: #64748b; font-size: .8rem; line-height: 1.5; }
.ems-added-status button { min-height: 44px; margin-left: 8px; color: #0126a5; font-weight: 800; text-decoration: underline; }
.ems-added-status:empty { display: none; }
.ems-added-movie-shell { overflow: hidden; border: 1px solid #dce3ef; border-radius: 24px; background: #f5f8ff; box-shadow: 0 18px 40px -32px rgba(1,38,165,.4); }
.ems-added-movie-track { display: grid; }
.ems-added-movie { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); align-items: center; gap: clamp(24px, 5vw, 72px); padding: clamp(22px, 4vw, 48px); opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(16px); transition: opacity .4s ease, transform .4s ease, visibility .4s; }
.ems-added-movie.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(0); }
.ems-added-movie-poster { position: relative; width: min(100%, 260px); aspect-ratio: 2 / 3; justify-self: center; overflow: hidden; border-radius: 14px; background: #e8edf6; box-shadow: 0 18px 36px -18px rgba(15,23,42,.45); }
.ems-added-movie-poster img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.ems-added-movie-poster span { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: #64748b; text-align: center; font-size: .8rem; }
.ems-added-movie-copy { min-width: 0; }
.ems-added-movie-copy h3 { margin: 12px 0 20px; color: #0f172a; font-size: clamp(1.5rem, 3vw, 2.6rem); font-weight: 800; line-height: 1.18; letter-spacing: var(--ems-letter-spacing, normal); overflow-wrap: anywhere; }
.ems-added-movie-tag { display: inline-block; padding: 6px 12px; border-radius: 999px; background: #e1eaff; color: #0126a5; font-size: .75rem; font-weight: 800; }
.ems-added-movie-copy dl { display: grid; gap: 12px; margin: 0 0 24px; }
.ems-added-movie-copy dt { color: #64748b; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ems-added-movie-copy dd { margin: 3px 0 0; color: #334155; font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.ems-added-movie-action { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-radius: 999px; background: #fa580b; color: #fff; font-size: .82rem; font-weight: 800; transition: background .2s ease; }
.ems-added-movie-action:hover { background: #df4900; }
.ems-added-movie-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 0 clamp(22px, 4vw, 48px) 24px; }
.ems-added-movie-position { margin: 0; color: #475569; font-size: .8rem; font-weight: 700; }
.ems-added-movie-empty { grid-area: 1 / 1; padding: 40px 24px; color: #64748b; font-size: .9rem; }
.ems-home-addition [hidden] { display: none !important; }
@media (max-width: 1000px) {
    .ems-added-plan { padding: 20px 16px; }
    .ems-added-category-rail { grid-auto-columns: 290px; }
}
@media (max-width: 600px) {
    .ems-home-addition { padding: 22px 0; }
    .ems-home-addition .ems-home-section-heading { align-items: flex-start; }
    .ems-added-plans { gap: 8px; }
    .ems-added-plan { padding: 8px; border-radius: 12px; }
    .ems-added-plan strong { min-height: 2.4em; font-size: clamp(.7rem, 3vw, .82rem); line-height: 1.2; overflow-wrap: anywhere; }
    .ems-added-plan .ems-added-count { margin-top: 5px; padding-right: 14px; font-size: .65rem; line-height: 1.3; overflow-wrap: anywhere; }
    .ems-added-plan-action { position: absolute; right: 0; bottom: 0; margin: 0; font-size: .75rem; line-height: 1.1; }
    .ems-added-plan-action-label { display: none; }
    .ems-added-plan .ems-added-photo-error { margin-top: 3px; font-size: .55rem; line-height: 1.2; }
    .ems-added-category-rail { grid-auto-columns: minmax(230px, 85%); gap: 12px; }
    .ems-added-category { min-height: 180px; padding: 18px 54px 18px 18px; }
    .ems-added-category strong { font-size: .88rem; }
    .ems-added-photo-arrow { right: 14px; bottom: 18px; width: 30px; height: 30px; }
    .ems-added-movie-shell { border-radius: 18px; }
    .ems-added-movie { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 12px; padding: 16px 12px; }
    .ems-added-movie-poster { width: 100%; max-width: 160px; border-radius: 10px; }
    .ems-added-movie-copy h3 { margin: 7px 0 10px; font-size: clamp(.85rem, 3.8vw, 1.1rem); line-height: 1.25; letter-spacing: var(--ems-letter-spacing, normal); }
    .ems-added-movie-tag { padding: 4px 7px; font-size: .6rem; }
    .ems-added-movie-copy dl { gap: 6px; margin-bottom: 12px; }
    .ems-added-movie-copy dt { font-size: .55rem; line-height: 1.2; }
    .ems-added-movie-copy dd { margin-top: 2px; font-size: .68rem; line-height: 1.35; }
    .ems-added-movie-action { width: 100%; min-height: 44px; gap: 6px; padding: 8px 10px; font-size: .68rem; line-height: 1.3; }
    .ems-added-movie-footer { padding: 0 12px 12px; }
    .ems-added-movie-position { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
    .ems-home-addition *, .ems-home-addition *::before { transition: none !important; scroll-behavior: auto !important; }
}
