/* Season 3 teaser on the homepage, after the seasons section (season3-teaser.js builds it into
   #season3-teaser). Sky, clouds, rainbow and cloud bank are drawn in the house style: indigo
   outlines, pastel fills. The scene layers ignore the pointer; only the Download button responds. */
@font-face {
  font-family: 'Chewy';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/public/fonts/chewy-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.season3 {
  --s3-indigo: #3B3F6B;
  --s3-cjk: sans-serif;
  padding: 0;
}
html[lang="ja"] .season3 { --s3-cjk-text: 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'YuGothic', 'Meiryo', 'Noto Sans JP', sans-serif; --s3-cjk: 'PawPaw ja Display', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'YuGothic', 'Meiryo', 'Noto Sans JP', sans-serif; }
html[lang="ko"] .season3 { --s3-cjk-text: 'Apple SD Gothic Neo', 'AppleSDGothicNeo', 'Malgun Gothic', 'MalgunGothic', 'Noto Sans KR', sans-serif; --s3-cjk: 'PawPaw ko Display', 'Apple SD Gothic Neo', 'AppleSDGothicNeo', 'Malgun Gothic', 'MalgunGothic', 'Noto Sans KR', sans-serif; }
html[lang="zh-hans"] .season3 { --s3-cjk-text: 'PingFang SC', 'PingFangSC', 'Microsoft YaHei', 'MicrosoftYaHei', 'Noto Sans SC', sans-serif; --s3-cjk: 'PawPaw zh-hans Display', 'PingFang SC', 'PingFangSC', 'Microsoft YaHei', 'MicrosoftYaHei', 'Noto Sans SC', sans-serif; }
html[lang="zh-hant"] .season3 { --s3-cjk-text: 'PingFang TC', 'PingFangTC', 'Microsoft JhengHei', 'MicrosoftJhengHei', 'Noto Sans TC', sans-serif; --s3-cjk: 'PawPaw zh-hant Display', 'PingFang TC', 'PingFangTC', 'Microsoft JhengHei', 'MicrosoftJhengHei', 'Noto Sans TC', sans-serif; }

.s3-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 400px;
  padding: 56px 48px 44px;
  border-radius: var(--radius-lg, 28px);
  color: var(--s3-indigo);
  background: linear-gradient(180deg, #B6D0F0 0%, #C9D4F3 50%, #E4DBF3 100%);
}
.s3-card.is-stacked {
  min-height: 590px;
  padding: 300px 18px 20px;
  border-radius: var(--radius-md, 20px);
}

.s3-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-select: none; }
.s3-back { z-index: 1; }
.s3-rain { z-index: 2; }
.s3-pet { z-index: 3; }
.s3-front { z-index: 4; }
.s3-fx { z-index: 5; }

/* ── Text ── */
.s3-id { position: relative; z-index: 6; max-width: min(420px, 56%); padding-top: 30px; }
.s3-card.is-stacked .s3-id { max-width: none; padding-top: 0; }

.s3-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--s3-indigo);
  color: #DCE8FA;
  font: 600 12px/1.45 'Fredoka', var(--s3-cjk);
}
.s3-umbrella { width: 13px; height: 11px; flex: none; }

.season3 .s3-title {
  margin: 8px 0;
  font: 400 56px/0.98 'Chewy', 'Fredoka', cursive;
  letter-spacing: 0.4px;
  color: var(--s3-indigo);
  text-shadow: 0 2px 0 #F3F6FD;
}
.s3-title-a, .s3-title-b { display: block; }
.s3-title-b { color: var(--pink-accessible, #BE3F7E); font-size: 1.16em; text-shadow: 0 2px 0 #FBE3EC; }
.s3-card.is-stacked .s3-title { font-size: 42px; }
/* German's longer line stays on one line. */
html[lang="de"] .season3 .s3-title { font-size: 48px; }
html[lang="de"] .season3 .s3-card.is-stacked .s3-title { font-size: 34px; }
/* Chewy has no CJK glyphs: those titles use the page's own display font. */
.season3 .s3-title.is-cjk { font-family: 'Chewy', var(--s3-cjk); font-size: 42px; line-height: 1.2; letter-spacing: 0; }
.s3-card.is-stacked .s3-title.is-cjk { font-size: 32px; }

.s3-line { margin: 0 0 8px; font: 600 14px/1.45 'Quicksand', var(--s3-cjk); }

.s3-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.s3-download {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--s3-indigo);
  color: #F3F6FD;
  font: 600 14px/1.45 'Fredoka', var(--s3-cjk);
  text-decoration: none;
  transition: background 0.2s;
}
.s3-download:hover { background: #4C518A; }
.s3-download:focus-visible { outline: 3px solid var(--purple-deep, #7950A0); outline-offset: 3px; }
.s3-notes {
  display: inline-block;
  padding: 7px 16px;
  border: 2px solid var(--s3-indigo);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--s3-indigo);
  font: 600 14px/1.45 'Fredoka', var(--s3-cjk);
  text-decoration: none;
  transition: background 0.2s;
}
.s3-notes:hover { background: #FFFFFF; }
.s3-notes:focus-visible { outline: 3px solid var(--purple-deep, #7950A0); outline-offset: 3px; }

/* ── Scene ── */
.s3-sil {
  display: block;
  background: var(--s3-indigo);
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
.s3-mover { position: absolute; left: 0; top: 0; display: none; will-change: transform, opacity; transform-origin: 50% 50%; }
.s3-starter {
  position: absolute;
  max-width: none;
  transform-origin: 60% 80%;
  animation: s3-pet-breathe 4.2s ease-in-out infinite;
}
@keyframes s3-pet-breathe { 50% { transform: scale(1.012, 1.025); } }
.s3-drop { display: block; width: 3px; height: 13px; border-radius: 3px; background: #7FA6DB; }
.s3-drop.is-far { width: 2px; height: 9px; opacity: 0.5; }
.s3-poof {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--s3-indigo);
  animation: s3-poof 0.7s ease-out forwards;
}
@keyframes s3-poof {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--px)), calc(-50% + var(--py))) scale(1.2); opacity: 0; }
}

.s3-drift { animation: s3-drift var(--drift, 12s) ease-in-out infinite alternate; animation-delay: var(--ddelay, 0s); }
.s3-puff { transform-box: fill-box; transform-origin: 50% 100%; animation: s3-breathe 5.5s ease-in-out infinite; animation-delay: var(--bdelay, 0s); }
@keyframes s3-drift { from { transform: translateX(calc(var(--dx, 10px) * -1)); } to { transform: translateX(var(--dx, 10px)); } }
@keyframes s3-breathe { 50% { transform: scale(1.025, 1.045); } }
.s3-eye { transform-box: fill-box; transform-origin: center; animation: s3-blink 6s infinite; animation-delay: var(--blink, 0s); }
@keyframes s3-blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(0.12); } }
.s3-sheen { animation: s3-sheen 7s linear infinite; }
@keyframes s3-sheen { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: calc(var(--len) * -1); } }
.s3-plopper { transform-box: fill-box; transform-origin: 50% 0%; }
.s3-plopper.is-plop { animation: s3-plop 0.32s ease-out; }
@keyframes s3-plop { 0% { transform: scale(1, 1); } 40% { transform: scale(1.04, 0.95); } 100% { transform: scale(1, 1); } }
.s3-twinkle { transform-box: fill-box; transform-origin: center; animation: s3-twinkle 2.8s ease-in-out infinite; animation-delay: var(--tw, 0s); }
@keyframes s3-twinkle { 0%, 100% { transform: scale(0.55); opacity: 0.35; } 50% { transform: scale(1.1); opacity: 1; } }

/* Off screen, in a hidden tab or with motion paused, everything holds still. */
.s3-card.is-paused .s3-layer,
.s3-card.is-paused .s3-layer * { animation-play-state: paused; }
html.reduce-motion .s3-layer,
html.reduce-motion .s3-layer * { animation: none; }
