@font-face {
  font-family: "Noto Sans TC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-sans-tc-400.woff2") format("woff2");
  unicode-range: U+20, U+2E, U+30, U+32, U+34, U+36, U+63, U+6E, U+74-75, U+77, U+A9, U+2014, U+3002, U+4E00, U+4E0B, U+4E0D, U+4E16, U+4E2D, U+4E45, U+4E86, U+4E8B, U+4EA4, U+4EBA, U+4EE3, U+4EFB, U+500B, U+5011, U+505A, U+507D, U+50CF, U+5177, U+518D, U+5207, U+5225, U+5230, U+524D, U+5287, U+534A, U+5378, U+537B, U+53CB, U+53D4, U+5408, U+55AE, U+5728, U+5730, U+5834, U+591A, U+5927, U+597D, U+5B50, U+5B78, U+5B89, U+5C0D, U+5DF1-5DF2, U+5E74, U+5F35, U+5F80, U+5F85, U+5F88, U+5F8C, U+5F97, U+5FE0, U+60F3, U+6211, U+6240, U+624D, U+625B, U+628A, U+6301, U+63DB, U+65BC, U+65E5, U+662F, U+6700, U+6703, U+6709, U+671F, U+672C, U+67D0, U+696D, U+6BCF, U+6C92, U+6D3B, U+6E96, U+6F14, U+70BA, U+751F, U+754C, U+7684, U+773C, U+77AC, U+7CBE, U+7D00, U+7D14, U+7D93, U+7DAD, U+8077, U+81EA, U+8207, U+8272, U+88DD, U+88E1, U+89AA, U+89BA, U+89D2, U+8CAC, U+8D77, U+8FCE, U+9019, U+904E, U+9593, U+975C, U+9762, U+9918, U+9A5A, U+9AD4, U+FF0C, U+FF1B;
}

:root {
  --ground: #020807;
  --ink: #e8fff6;
  --ink-quiet: #9dcec0;
  --phosphor: #b8ffe4;
  --cyan: #9af6ff;
  --pool: rgba(28, 112, 90, 0.55);
  --measure: 70ch;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ground);
  overflow-x: clip;
  scrollbar-color: #1b4d3e var(--ground);
}

html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track {
  background: var(--ground);
}

html::-webkit-scrollbar-thumb {
  background: #1b4d3e;
  border-radius: 99px;
}

body {
  margin: 0;
  overflow-x: clip;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 70% 48% at 50% 22%, var(--pool), transparent 70%),
    var(--ground);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei", "WenQuanYi Micro Hei", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #14614c;
  color: #f4fffb;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

main {
  width: min(1240px, 100%);
  margin-inline: auto;
  padding: max(0.85rem, env(safe-area-inset-top)) 0.85rem 0;
}

.hero {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0;
}

.hero img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: min(78dvh, 860px);
}

.statement {
  margin-top: 1.75rem;
}

.statement p {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.9;
  text-wrap: pretty;
  hanging-punctuation: allow-end;
}

footer {
  width: min(1240px, 100%);
  margin: 2.25rem auto 0;
  padding: 0 1.25rem max(1.35rem, env(safe-area-inset-bottom));
}

footer p {
  margin: 0;
  color: var(--ink-quiet);
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-align: center;
}

.page-missing {
  display: flex;
  flex-direction: column;
}

.page-missing main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.75rem;
}

.page-missing .hero img {
  width: auto;
  max-width: 100%;
  max-height: min(38dvh, 420px);
}

.missing-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.missing-code {
  margin: 0;
  color: var(--phosphor);
  font-size: clamp(4rem, 16vw, 6rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.06em;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.home-link {
  color: var(--cyan);
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  padding: 0.7rem 0.15rem;
  -webkit-tap-highlight-color: transparent;
}

.home-link:hover {
  color: var(--ink);
}

.home-link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (min-width: 960px) {
  body {
    display: flex;
    flex-direction: column;
    background:
      radial-gradient(ellipse 42% 70% at 32% 46%, var(--pool), transparent 68%),
      var(--ground);
  }

  main {
    flex: 1;
    display: grid;
    grid-template-columns: auto minmax(18rem, 1fr);
    align-items: center;
    column-gap: clamp(2.25rem, 4vw, 4.75rem);
    padding: 1.5rem clamp(1.5rem, 4vw, 2.75rem) 0;
  }

  .hero img {
    width: auto;
    max-width: min(46vw, 640px);
    max-height: min(84dvh, 920px);
  }

  .statement p {
    font-size: 1.3125rem;
    line-height: 1.95;
  }

  .statement {
    margin-top: 0;
  }

  .page-missing main {
    display: grid;
  }

  .page-missing .hero img {
    max-height: calc(100dvh - 6.5rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero img,
  .statement p,
  .missing-code,
  .home-link {
    animation: arrive 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .statement p,
  .home-link {
    animation-delay: 160ms;
  }
}

@keyframes arrive {
  from {
    filter: blur(1.5px);
    transform: translateY(10px);
  }

  to {
    filter: blur(0);
    transform: translateY(0);
  }
}
