@font-face {
  font-family: "Entry Cactus";
  src: url("assets/fonts/entry-cactus-jack.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Entry Aoharu";
  src: url("assets/fonts/entry-aoharu.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

html[data-screen="welcome"] {
  color-scheme: dark;
  --paper: #000;
  --ink: #fff;
  --gel-edge: #bfbfbf;
  --gel-depth: #727272;
  --gel-low: #121212;
  --gel-high: #262626;
  --gel-glint: #424242;
  background: var(--paper);
  scroll-padding: 0;
}
html[data-screen="welcome"][data-entry-theme="light"] {
  color-scheme: light;
  --paper: #fff;
  --ink: #000;
  --gel-edge: #363636;
  --gel-depth: #666;
  --gel-low: #f3f3f3;
  --gel-high: #fff;
  --gel-glint: #d5d5d5;
  background: var(--paper);
}
html[data-screen="welcome"] body { background: var(--paper); color: var(--ink); }
html[data-screen="welcome"] ::selection { background: var(--ink); color: var(--paper); }

#welcome {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(66px,8.8vh,108px) clamp(20px,5.8vw,92px) clamp(36px,7.2vh,90px);
  background: var(--paper);
  color: var(--ink);
  text-align: center;
  font-family: "Entry Cactus", cursive;
  font-synthesis: none;
  isolation: isolate;
}
#welcome :focus-visible { outline: 2px dashed var(--ink); outline-offset: 7px; }
#welcome-theme {
  position: absolute;
  right: max(env(safe-area-inset-right),clamp(16px,3.3vw,52px));
  top: max(env(safe-area-inset-top),clamp(12px,3.1vh,38px));
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  touch-action: manipulation;
}
#welcome-theme img { width: 30px; height: 30px; object-fit: contain; }
[data-entry-theme="dark"] .welcome-moon, [data-entry-theme="light"] .welcome-sun { display: none; }
.welcome-note { width: min(100%, 825px); }
#welcome .note-colophon {
  width: min(100%, 665px);
  margin-inline: auto;
  margin-block-start: clamp(12px,2.1svh,24px);
  color: var(--ink);
}
[data-entry-theme="light"] #welcome .author-imprint iframe { filter: none; mix-blend-mode: multiply; }
#welcome .note-colophon + #welcome-enter { margin-block-start: clamp(18px,2.9svh,32px); }
#welcome-title {
  margin: 0 auto clamp(8px,1.8vh,22px);
  font: 400 clamp(64px,8.1vw,124px)/.99 "Entry Cactus", cursive;
  letter-spacing: -.035em;
}
.keep-together { white-space: nowrap; }
#welcome .ink-emoji { display: inline-block; width: 1.08em; height: 1.08em; object-fit: contain; vertical-align: -.15em; }
#welcome .title-tape { width: .46em; height: .46em; margin-left: .1em; vertical-align: .035em; transform: rotate(-10deg); }
.welcome-en {
  width: min(100%, 678px);
  margin-inline: auto;
  font: 400 clamp(31px,2.95vw,46px)/1 "Entry Cactus", cursive;
  letter-spacing: -.008em;
  text-wrap: balance;
}
.welcome-en p + p { margin-top: .22em; }
#welcome .welcome-en .ink-emoji { width: .56em; height: .56em; vertical-align: -.015em; }
#welcome .welcome-ja {
  width: min(100%, 665px);
  margin: clamp(22px,3.3vh,43px) auto 0;
  font: 400 clamp(19px,1.7vw,26px)/1.58 "Entry Aoharu", "Yu Gothic", sans-serif;
  -webkit-text-stroke: .22px currentColor;
  letter-spacing: .004em;
  word-break: normal;
  line-break: strict;
  text-wrap: balance;
}
.welcome-ja .ink-phrase { display: inline-block; }
.welcome-ja .ink-emoji { margin-left: .13em; }
#welcome-enter {
  position: relative;
  display: block;
  width: min(100%, 470px);
  margin: clamp(29px,5.1vh,62px) auto 0;
  padding: 0 0 7px;
  border-radius: 50% / 60%;
  color: var(--ink);
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.jelly-body {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(14px,2.2vw,32px);
  min-height: clamp(92px,10.8vw,127px);
  padding: 9px 20px 13px;
  background: radial-gradient(ellipse at 42% -48%,var(--gel-glint),transparent 62%), linear-gradient(176deg,var(--gel-high) 0%,var(--gel-low) 47%,var(--paper) 96%);
  border: 1.75px solid var(--gel-edge);
  border-radius: 48% 52% 50% 50% / 64% 60% 40% 36%;
  box-shadow: inset 0 2px 0 var(--gel-glint),0 6px 0 -1px var(--paper),0 7px 0 var(--gel-depth);
  transform-origin: var(--press-x,50%) 78%;
  transition: transform 240ms cubic-bezier(.2,1.7,.32,1), box-shadow 130ms ease;
}
#welcome .enter-en, #welcome .enter-ja { white-space: nowrap; }
#welcome .enter-en { font: 400 clamp(59px,5.6vw,86px)/1 "Entry Cactus", cursive; letter-spacing: -.035em; }
#welcome .enter-ja { font: 400 clamp(19px,1.6vw,26px)/1.1 "Entry Aoharu", sans-serif; padding-top: .33em; -webkit-text-stroke: .18px currentColor; }
#welcome-enter:active .jelly-body, #welcome-enter[data-held] .jelly-body {
  transform: translateY(5px) scale(1.035,.86);
  box-shadow: inset 0 1px 0 var(--gel-glint),0 1px 0 var(--gel-depth);
  transition: transform 125ms cubic-bezier(.1,.8,.2,1), box-shadow 90ms ease;
}
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  #welcome-theme:hover img { transform: rotate(-10deg); }
  #welcome-theme img { transition: transform 150ms ease; }
  #welcome-enter:hover:not(:active):not([data-held]) .jelly-body { transform: translateY(-2px) scale(1.008,1.015); }
}
@media (max-width: 600px) {
  #welcome { padding: 72px 22px 35px; }
  #welcome-title { font-size: clamp(49px,11.8vw,72px); line-height: 1.07; margin-bottom: 14px; }
  .welcome-en { max-width: 420px; font-size: clamp(30px,6.8vw,37px); line-height: 1.04; }
  #welcome .welcome-ja { margin-top: 22px; max-width: 34em; font-size: clamp(18px,4.9vw,22px); line-height: 1.59; }
  #welcome-enter { width: min(90%,380px); margin-top: 32px; }
  .jelly-body { min-height: 93px; gap: 13px; }
  #welcome .enter-en { font-size: clamp(51px,12vw,69px); }
  #welcome .enter-ja { font-size: clamp(17px,4vw,23px); }
}
@media (max-width: 360px) {
  #welcome { padding: 65px 16px 24px; }
  #welcome-enter { width: 100%; margin-top: 24px; }
  .jelly-body { gap: 10px; min-height: 85px; padding-inline: 9px; }
  #welcome .enter-en { font-size: 48px; }
}
@media (max-width: 400px) and (max-height: 710px) {
  #welcome { padding: 59px 16px 18px; }
  #welcome-title { margin-bottom: 6px; }
  #welcome .welcome-ja { margin-top: 12px; }
  #welcome .note-colophon { margin-block-start: 10px; }
  #welcome .note-colophon + #welcome-enter { margin-top: 12px; }
}
@media (max-width: 360px) and (max-height: 680px) {
  #welcome { padding-block: 48px 12px; }
  #welcome .welcome-en { line-height: .99; }
  #welcome .welcome-ja { line-height: 1.48; }
  #welcome .note-colophon { margin-block-start: 8px; }
  #welcome-enter .jelly-body { min-height: 81px; }
}
@media (prefers-reduced-motion: reduce) {
  #welcome-enter:active .jelly-body, #welcome-enter[data-held] .jelly-body { transform: none; background: var(--gel-high); }
}
@media (forced-colors: active) {
  #welcome-enter .jelly-body { border: 2px solid ButtonText; background: ButtonFace; color: ButtonText; }
}
