/* Season 4 teaser on the homepage, right under the hero (season4-teaser.js builds it into
   #season4-teaser), and the "High Tide" wordmark's font, which the hero's countdown badge shares.
   The scene is two canvases under the text; only the Download button responds to the pointer. */
@font-face {
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/public/fonts/lilitaone-400-latin.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0-00FF, U+2011, U+2019;
}

.season4 {
  --s4-ink: #2c2257;
  --s4-purple: #5b3d8c;
  --s4-cream: #fff4d6;
  --s4-cjk: sans-serif;
  padding: 0;
}
html[lang="ja"] .season4 { --s4-cjk: 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'YuGothic', 'Meiryo', 'Noto Sans JP', sans-serif; }
html[lang="ko"] .season4 { --s4-cjk: 'Apple SD Gothic Neo', 'AppleSDGothicNeo', 'Malgun Gothic', 'MalgunGothic', 'Noto Sans KR', sans-serif; }
html[lang="zh-hans"] .season4 { --s4-cjk: 'PingFang SC', 'PingFangSC', 'Microsoft YaHei', 'MicrosoftYaHei', 'Noto Sans SC', sans-serif; }
html[lang="zh-hant"] .season4 { --s4-cjk: 'PingFang TC', 'PingFangTC', 'Microsoft JhengHei', 'MicrosoftJhengHei', 'Noto Sans TC', sans-serif; }

.s4-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 380px;
  border-radius: var(--radius-lg, 28px);
  color: var(--s4-ink);
  background: #b9e7f5;
  box-shadow: 0 6px 22px rgba(30, 20, 60, 0.16);
}
.s4-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  background: #b9e7f5;
}
.s4-poster {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  background: url('/public/season4/poster.webp') 0 0 / 100% 100% no-repeat;
}
.s4-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.45s ease; }
.s4-card.is-live .s4-art canvas { opacity: 1; }
.s4-card.no-gl .s4-art canvas { display: none; }

/* Wide: the text sits on the left over the sky and the shallows; the Paw-Paws start past it. */
.s4-id {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: min(370px, 46%);
  min-height: 380px;
  padding: 26px 0 24px 30px;
  box-sizing: border-box;
}

.s4-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--s4-purple);
  font: 700 13px/1.45 'Fredoka', var(--s4-cjk);
}
.s4-fish { width: 17px; height: 10px; flex: none; }

.season4 .s4-title { margin: 8px 0 6px -4px; line-height: 0; }
.s4-wordmark { display: block; width: 320px; max-width: 100%; height: auto; overflow: visible; }
.s4-bob { animation: s4-bob 2.6s ease-in-out infinite; }
@keyframes s4-bob { 0%, 100% { transform: translateY(-2.5px); } 50% { transform: translateY(2.5px); } }

.s4-line {
  margin: 0;
  max-width: 300px;
  font: 600 15px/1.45 'Quicksand', var(--s4-cjk);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.9), 0 0 2px rgba(255, 255, 255, 0.9);
}

.s4-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: auto; padding-top: 18px; }
.s4-count {
  display: inline-block;
  margin: 0;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--s4-ink);
  font: 600 13px/1.4 'Fredoka', var(--s4-cjk);
}
.s4-count b { vertical-align: -2px; font: 400 22px/1 'Lilita One', 'Fredoka', sans-serif; color: var(--s4-purple); }
.s4-when {
  display: inline-block;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1.5px solid rgba(44, 34, 87, 0.22);
  color: var(--s4-purple);
  font-weight: 700;
}
.s4-out { font: 400 20px/1.1 'Lilita One', 'Fredoka', var(--s4-cjk); color: var(--s4-purple); }
.s4-download {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--s4-ink);
  color: var(--s4-cream);
  font: 600 14px/1.45 'Fredoka', var(--s4-cjk);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.s4-download:hover { background: #3d3178; transform: translateY(-1px); }
.s4-download:focus-visible { outline: 3px solid var(--purple-deep, #7950A0); outline-offset: 3px; }

/* Stacked (narrow cards): the text on the sky, the picture in a strip under it. */
.s4-card.is-stacked { min-height: 0; padding-bottom: 250px; border-radius: var(--radius-md, 20px); }
.s4-card.is-stacked .s4-art { top: auto; height: 250px; }
.s4-card.is-stacked .s4-id { width: auto; max-width: none; min-height: 0; padding: 22px 18px 4px; }
.s4-card.is-stacked .s4-actions { flex-direction: row; flex-wrap: wrap; align-items: center; margin-top: 0; padding-top: 14px; }
.s4-card.is-stacked .s4-line { max-width: none; }
@media (max-width: 420px) {
  .s4-wordmark { width: 250px; }
  .s4-when { display: block; margin-left: 0; padding-left: 0; border-left: 0; }
}

/* Off screen, in a hidden tab or with motion paused, the letters hold still. */
.s4-card.is-paused .s4-bob { animation-play-state: paused; }
html.reduce-motion .s4-bob { animation: none; }
