@font-face {
  font-family: 'Yuyu';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/yuyu-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Yuyu';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/yuyu-latin-400-normal.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;
}

:root {
  --bg: #0d0b0a;
  --bg-glow: #1b1512;
  --ink: #f4ecdf;
  --shadow: rgba(13, 11, 10, 0.85);
  --shell-line: rgba(244, 236, 223, 0.14);
  --shell-glow: rgba(244, 236, 223, 0.08);
  --ink-soft: rgba(244, 236, 223, 0.55);
  --ink-faint: rgba(244, 236, 223, 0.5);
  color-scheme: dark;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}

body {
  touch-action: none;
  overscroll-behavior: none;
  background: radial-gradient(ellipse at 50% 52%, var(--bg-glow) 0%, var(--bg) 62%);
  -webkit-tap-highlight-color: transparent;
}

#egg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

main {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px;
  pointer-events: none;
}

.word {
  margin: 0;
  font-family: 'Yuyu', 'Georgia', serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 15vw, 12rem);
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  text-shadow: 0 0 34px var(--shadow), 0 0 10px var(--shadow);
}

@media (max-aspect-ratio: 4/5) {
  .word {
    font-size: min(20vw, 9rem);
  }
}

.word .ch {
  display: inline-block;
  pointer-events: auto;
}

/* Hidden until the font is loaded and the letters can drop in.
   The animation is a safety net in case the script never runs. */
.js .word {
  opacity: 0;
  animation: reveal 0s 3s forwards;
}

@keyframes reveal {
  to { opacity: 1; }
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(24px, env(safe-area-inset-bottom));
  padding: 0 16px;
  text-align: center;
  font-family: 'Yuyu', 'Georgia', serif;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.hint {
  margin: 0 auto;
  max-width: 36em;
  text-wrap: balance;
  color: var(--ink-faint);
  opacity: 0;
}

.footer-mail {
  display: none;
  color: var(--ink-soft);
  text-decoration: none;
  opacity: 0;
  transition: color 0.3s;
}

.footer-mail:hover,
.footer-mail:focus-visible {
  color: var(--ink);
}

.no-webgl .hint {
  display: none;
}

.no-webgl .footer-mail {
  display: inline-block;
  opacity: 1;
  pointer-events: auto;
}

.fallback-egg {
  display: none;
}

.no-webgl .fallback-egg {
  display: block;
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(48vmin, 340px);
  aspect-ratio: 0.8;
  transform: translate(-50%, -50%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  border: 1px solid var(--shell-line);
  background: radial-gradient(circle at 40% 35%, var(--shell-glow), transparent 70%);
}

/* 404 page */
.notfound main {
  pointer-events: auto;
}

.notfound-box {
  text-align: center;
  font-family: 'Yuyu', 'Georgia', serif;
  letter-spacing: 0.04em;
}

.notfound-egg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 2;
}

.notfound h1 {
  margin: 24px 0 12px;
  font-weight: 400;
  font-size: clamp(1.8rem, 6vw, 3rem);
}

.notfound a {
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
}

.notfound a:hover,
.notfound a:focus-visible {
  color: var(--ink);
}
