:root {
  color-scheme: light;
  font-family: 'Times New Roman', 'Yu Mincho', serif;
  color: #402349;
  background: #fff5ff;
}
* { box-sizing: border-box; }
html { height: 100%; overflow: hidden; }
body {
  position: relative;
  isolation: isolate;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px);
  overflow: hidden;
  overscroll-behavior: none;
}
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  background: url('./assets/fish-tie.png') 20px 15px / 112px 140px repeat;
  opacity: .075;
  pointer-events: none;
}
main {
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100% - 24px));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
}
.homepage-header { flex: none; padding: clamp(10px, 2dvh, 24px) 0 8px; text-align: center; }
h1 {
  margin: 0;
  color: #c40069;
  font-size: clamp(29px, 7.5vw, 54px);
  line-height: 1.1;
  background: linear-gradient(90deg, #99034e 12%, #e00078 55%, #ff78b3 90%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome { display: flex; justify-content: center; align-items: baseline; gap: 8px; margin: 5px 0 0; font-size: clamp(10px, 2.7vw, 15px); line-height: 1.4; }
.welcome span { white-space: nowrap; }
.welcome [lang="ja"] { font-size: .9em; }
.promotion {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
}
.photo-stage {
  display: grid;
  flex: 1;
  place-items: center;
  min-width: 0;
  min-height: 0;
  container-type: size;
}
/* Fit the complete sheet to the space left above the footer, including its sticker. */
.photobooth { position: relative; width: min(96cqw, 67cqh); container-type: inline-size; }
.photobooth-sheet { display: block; width: 100%; height: auto; }
.riku-recommend {
  position: absolute;
  z-index: 1;
  width: 58%;
  left: -2%;
  bottom: -3%;
  margin: 0;
  padding: 3% 1% 2%;
  background: #fff5ff;
  color: #8b32a2;
  font: bold italic 7cqw/.95 'Times New Roman', serif;
  text-align: center;
  transform: rotate(4deg);
}
.riku-recommend strong { display: block; color: #df0078; white-space: nowrap; }
.app-pitch { flex: none; min-width: 0; }
h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 2.8vw, 20px);
  margin: 0 0 7px;
  color: #e5007d;
  font-size: clamp(24px, 7.1vw, 46px);
  line-height: 1.1;
  white-space: nowrap;
}
.app-heading-text { text-decoration: underline; text-underline-offset: .09em; }
.new-label {
  display: inline-block;
  padding: 3px 5px;
  color: #fffccc;
  background: #ed008c;
  font: bold italic clamp(14px, 3.8vw, 26px)/1.1 Arial, sans-serif;
  transform: rotate(-9deg);
}
.download-button {
  position: relative;
  display: flex;
  flex: none;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 3px 7px 3px 3px;
  border: 6px outset #ffbde5;
  outline: 1px solid #9a3276;
  background: #ffa6de;
  color: #581344;
  text-decoration: none;
}
.download-button::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 2px dotted #fffac9;
  pointer-events: none;
  animation: blinkie-lights 1.6s step-end infinite;
}
.app-icon { display: block; flex: none; box-sizing: content-box; width: clamp(54px, 16vw, 100px); height: auto; padding: 8px; }
.download-copy { flex: 1; min-width: 0; text-align: center; font: bold clamp(16px, 5vw, 34px)/1.2 'Courier New', monospace; }
.download-copy > span { animation: blinkie-lettering 1.6s step-end infinite; }
.download-copy small { display: block; margin-top: 6px; font: normal clamp(13px, 3.4vw, 23px)/1.2 'Yu Gothic', sans-serif; }
.download-button:visited { color: #581344; }
.download-button:hover { background: #ffb7e5; }
.download-button:active { border-style: inset; }
.download-button:focus-visible { outline: 3px dotted #80145c; outline-offset: 4px; }
.app-store-badge { display: block; flex: none; padding: 10px; }
.app-store-badge img { display: block; width: auto; height: 40px; }
.download-button:is(:hover, :focus-visible)::before,
.download-button:is(:hover, :focus-visible) .download-copy > span { animation-play-state: paused; }
.marquee { overflow: hidden; margin: 0 0 8px; color: #773da1; font-size: clamp(15px, 3.6vw, 23px); font-weight: bold; line-height: 1.5; }
.marquee-track { display: flex; width: max-content; direction: ltr; animation: scroll-text 80s linear infinite normal; }
.marquee-track > span { flex-shrink: 0; padding-inline-end: 2.5em; white-space: nowrap; }
@keyframes scroll-text {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes blinkie-lights {
  0%, 100% { border-color: #fffac9 #d8007a; }
  50% { border-color: #d8007a #fffac9; }
}
@keyframes blinkie-lettering {
  0%, 100% { color: #581344; text-shadow: none; }
  50% { color: #fffac9; text-shadow: 1px 1px #9a005b, -1px -1px #9a005b; }
}
html[data-paused] * { animation-play-state: paused !important; }
html[data-paused] .download-button::before { animation-play-state: paused !important; }
.download-help {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: #402349;
  font-size: 17px;
  line-height: 1.4;
}
.download-help::backdrop { background: rgb(64 35 73 / 65%); }
.menu-guide { position: relative; height: 126px; }
.download-help .menu-guide p { position: absolute; top: 24px; right: calc(6.6vw + 42px); max-width: calc(100% - 100px); margin: 0; padding: 7px 10px; border: 2px solid #ffbde5; background: #fff5ff; font: bold 16px/1.3 'Courier New', monospace; text-align: center; }
.menu-guide strong { font-size: 23px; letter-spacing: 2px; white-space: nowrap; }
/* The arrow stops at the page's top edge, below TikTok's native menu. */
.menu-arrow { position: absolute; top: 0; right: calc(6.6vw - 20px); width: 180px; height: 116px; overflow: visible; pointer-events: none; }
.menu-arrow path { fill: none; stroke: #ed008c; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.menu-arrow .menu-arrow-outline { stroke: #fff5ff; stroke-width: 13; }
.download-help-card { width: min(390px, calc(100% - 24px)); margin: 0 auto; padding: 20px; border: 6px outset #ffbde5; background: #fff5ff; text-align: center; }
.download-help .browser-step { margin: 0 0 6px; font: bold 15px 'Courier New', monospace; color: #773da1; }
.download-help h2 { display: block; margin: 0 0 14px; font-size: clamp(34px, 9vw, 43px); line-height: .95; white-space: normal; }
.download-help h2:focus { outline: none; }
.download-help p { margin: 12px 0; }
.download-help-fallback { margin-top: 20px; font-size: 13px; color: #705571; }
.download-help-fallback summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.download-help-link { width: 100%; padding: 9px; border: 3px inset #ffbde5; background: white; color: #402349; font: 16px 'Courier New', monospace; }
.download-help button { min-height: 44px; margin-top: 8px; padding: 8px 14px; border: 3px outset #efd2e8; background: #f3dff3; color: #581344; font: bold 13px 'Courier New', monospace; }
.download-help button:active { border-style: inset; }
.download-help button:focus-visible, .download-help-link:focus-visible, .download-help-fallback summary:focus-visible { outline: 3px dotted #80145c; outline-offset: 2px; }
.download-help .copy-status { font-size: 13px; }
.download-help .copy-status:empty { display: none; }
.download-help .close-download-help { margin-top: 0; border: 0; background: transparent; color: #705571; font: 13px 'Courier New', monospace; text-decoration: underline; text-underline-offset: 3px; }
@media (max-height: 600px) {
  .menu-guide { height: 88px; }
  .menu-arrow { height: 84px; }
  .download-help-card { padding: 12px; }
  .download-help-fallback { margin-top: 12px; }
  .download-help p { margin-top: 8px; margin-bottom: 8px; }
}
@media (any-hover: hover) and (any-pointer: fine) {
  html, body { cursor: url('./assets/fish-cursor.png') 2 2, auto; }
  a, a * { cursor: url('./assets/fish-cursor.png') 2 2, pointer; }
}
@media (max-width: 560px) {
  .download-button { gap: 3px; }
  .download-copy { font-size: clamp(15px, 4.5vw, 24px); }
  .download-copy small { display: none; }
  .app-icon { width: clamp(40px, 12vw, 64px); }
}
@media (min-width: 960px), (min-width: 700px) and (max-height: 560px) {
  main { width: min(1100px, calc(100% - 72px)); }
  .homepage-header { padding-bottom: 14px; }
  .promotion {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: clamp(32px, 5vw, 72px);
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  }
  .photobooth { width: min(94cqw, 67cqh); }
  .app-pitch { display: flex; flex-direction: column; min-height: 0; }
  h2 { margin: auto 0; gap: 12px; font-size: clamp(25px, 3.3vw, 46px); }
  .new-label { font-size: clamp(16px, 1.7vw, 23px); }
  .download-button { border-width: 8px; gap: 12px; padding: 7px; }
  .app-icon { width: clamp(56px, 7vw, 88px); }
  .download-copy { font-size: clamp(18px, 2.2vw, 29px); }
  .download-copy small { font-size: clamp(13px, 1.6vw, 19px); }
  .marquee { flex: none; font-size: clamp(16px, 1.7vw, 23px); margin-bottom: 12px; }
}
@media (max-height: 600px) {
  .homepage-header { padding-top: 8px; padding-bottom: 4px; }
  h1 { font-size: clamp(25px, 6vw, 38px); }
  .welcome { margin-top: 2px; }
  .promotion { gap: 4px; }
  h2 { font-size: clamp(22px, 3.6vw, 30px); }
  .app-icon { width: 40px; }
  .download-button { border-width: 5px; padding: 3px; }
  .download-copy { font-size: clamp(15px, 2.2vw, 23px); }
  .download-copy small { margin-top: 3px; font-size: 12px; }
  .marquee { margin-bottom: 5px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .marquee-track { width: auto; }
  .marquee-track > span { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
  .marquee-track > span + span { display: none; }
}
