@font-face {
  font-family: Luanda Serif;
  src: url("assets/luanda-serif.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #14110e;
  --ink: #f4eee3;
  --muted: #bfb1a0;
  --line: #433629;
  --accent: #ffab36;
  --control-radius: 8px;
  --card-radius: 12px;
  --serif: "Luanda Serif", "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--site-header-height, 0px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--sans); }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: #efd1bc; color: var(--ink); }

.container { width: min(1160px, calc(100% - 88px)); margin-inline: auto; }
.skip { position: absolute; z-index: 3; top: 8px; left: 8px; padding: 10px 16px; background: var(--ink); color: var(--paper); transform: translateY(-150%); }
.skip:focus { transform: none; }
.top { border-bottom: 1px solid var(--line); }
#site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); }
#site-header.is-scrolled { background: #14110ecc; backdrop-filter: blur(10px); }
.skip:focus { z-index: 11; }
.top-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 72px; }
#site-title { font: inherit; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; font-size: 19px; font-weight: 750; }
.brand img { border-radius: var(--control-radius); }
nav { display: flex; flex-wrap: wrap; gap: 26px; font-size: 15px; letter-spacing: .04em; }
nav a, .footer-inner a { padding-block: 6px; }
nav a:hover, .footer-inner a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 8px 18px; border-radius: var(--control-radius); background: var(--accent); color: var(--button-ink, #24160b); font-weight: 750; }
.button:hover { background: var(--button-hover, #ffc06a); }
.button-icon { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hero-band { border-bottom: 1px solid var(--line); }
.hero-frame { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 75% 55%, #60401e82, transparent 52%), radial-gradient(ellipse at 8% 12%, #2a2018, transparent 53%), #15110e; }
.hero-art { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/gold-lines.svg") center right / cover no-repeat;
  mask-image: var(--wave-edge, linear-gradient(to right, transparent 10%, #000 55%)), var(--note-cutout, linear-gradient(#000, #000));
  mask-composite: intersect;
}
.sand-grain { display: none; position: absolute; top: 0; left: var(--origin); height: 100%; width: var(--size); }
.sand-grain::before { content: ""; position: absolute; top: 0; width: 100%; aspect-ratio: 1; border-radius: 50%; background: #f5c481; box-shadow: 0 0 4px #ecab5366; }

@media (prefers-reduced-motion: no-preference) {
  .hero-art::before { background-image: url("assets/gold-wave.svg"); }
  .sand-grain { display: block; animation: sand-fall var(--duration) cubic-bezier(.32,.14,.68,.9) var(--delay) infinite; }
  .hero-art.is-offscreen .sand-grain { animation-play-state: paused; }
}
@keyframes sand-fall {
  0% { opacity: 0; transform: translate3d(0, -3%, 0); }
  15% { opacity: var(--brightness); }
  78% { opacity: var(--brightness); }
  100% { opacity: 0; transform: translate3d(var(--drift), 103%, 0); }
}
.hero { display: grid; grid-template-areas: "copy gallery" "progress progress"; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px clamp(24px, 4vw, 58px); padding-block: 48px 46px; }
.hero-copy { grid-area: copy; min-width: 0; }
#hero-message { display: grid; margin-bottom: 24px; }
#hero-message > div { grid-area: 1 / 1; }
#hero-message > div[aria-hidden="true"] { visibility: hidden; }
#hero-message h2 { font: 900 clamp(36px, 5.45vw, 79px)/1.2 var(--serif); }
#hero-message h2 span { display: block; color: var(--accent); }
#hero-message p { max-width: 22em; margin-top: 18px; color: #cdbfad; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.8; }
#hero-message p, .gallery-note p, .features p { text-wrap: pretty; }
.gallery-note h2, .features h2 { text-wrap: balance; }
.hero.is-changing-copy #hero-message { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  #hero-message { transition: opacity .16s ease; }
}
.gallery { grid-area: gallery; min-width: 0; }
@media (min-width: 701px) {
  .hero[data-copy-side="right"] { grid-template-areas: "gallery copy" "progress progress"; }
}
.gallery-stage { --annotation: #e7b36d; --screen-outline: #ac530b; --focus-width: 33%; position: relative; display: grid; grid-template-areas: "note phone"; grid-template-columns: minmax(0, .63fr) minmax(0, 1fr); place-items: center; gap: clamp(12px, 1.5vw, 22px); min-height: 522px; padding-block: 18px 10px; perspective: 900px; }
.gallery-stage[data-screen="notone"] { --focus-width: 13%; --annotation: #ead8ac; --screen-outline: #735323; --phone-angle: 3deg; --phone-angle-small: 1deg; --note-offset: 25px; }
.gallery-stage[data-screen="learned"] { --focus-width: 13%; --annotation: #8fb8e8; --screen-outline: #2266a9; --phone-angle: 8deg; --phone-angle-small: 4deg; --note-offset: 65px; }
.gallery-stage[data-screen="delete"] { --focus-top: 81.9%; --focus-left: 81.7%; --focus-width: 17.3%; --focus-height: 5.1%; --phone-angle: -8deg; --phone-angle-small: -5deg; --note-offset: clamp(84px, 24svh, 236px); grid-template-areas: "phone note"; grid-template-columns: minmax(0, 1fr) minmax(0, .63fr); }
.gallery-stage[data-screen="swipe"] { --focus-width: 13%; --phone-angle: 5deg; --phone-angle-small: 2deg; --note-offset: 88px; }
.gallery-note { grid-area: note; position: relative; z-index: 1; justify-self: stretch; margin-top: var(--note-offset, clamp(46px, 12svh, 118px)); padding: clamp(10px, 1.05vw, 14px) clamp(11px, 1.25vw, 18px); border-radius: var(--card-radius); background: #1c150ecc; backdrop-filter: blur(6px); }
.gallery-note h2 { margin-bottom: 6px; color: var(--annotation); font-size: clamp(15px, 1.24vw, 18px); line-height: 1.4; }
.gallery-note p { color: var(--ink); font-size: clamp(13px, 1.05vw, 15px); line-height: 1.65; }
.gallery-connector { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gallery-connector path { fill: none; stroke: var(--annotation); stroke-width: 1.5; stroke-linecap: round; }
.gallery-stage.is-flipping :is(.gallery-connector, .gallery-note) { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .gallery-connector, .gallery-note { transition: opacity .16s ease; }
}
.phone-rotor { grid-area: phone; position: relative; z-index: 2; rotate: var(--phone-angle, 11deg); width: min(100%, clamp(190px, 19vw, 270px)); padding: 6px; border: 2px solid #6b6053; border-radius: 34px; background: #090909; box-shadow: 0 24px 55px #000b, 4px 0 0 #332c25; }
.phone-display { position: relative; }
.phone-rotor img { width: 100%; height: auto; border-radius: 25px; }
.swipe-trail { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gallery-stage[data-screen="swipe"] .swipe-trail { display: block; }
.swipe-trail path { fill: none; stroke: #c96e0b; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.swipe-trail circle { fill: #fff3da; stroke: #c96e0b; stroke-width: 7; }
@media (prefers-reduced-motion: no-preference) {
  .swipe-trail path { stroke-dasharray: 1; animation: trace-swipe .32s ease-out both; }
  .swipe-trail circle { animation: show-swipe-end .12s .2s both; }
}
@keyframes trace-swipe { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes show-swipe-end { from { opacity: 0; } to { opacity: 1; } }
.phone-rotor::after { content: ""; position: absolute; top: 13px; left: 50%; width: 28%; height: 16px; transform: translateX(-50%); border-radius: 99px; background: #050505; }
.screen-focus { position: absolute; top: var(--focus-top, 61.7%); left: var(--focus-left, 1.1%); width: var(--focus-width); height: var(--focus-height, 4.8%); border: 2px solid var(--screen-outline); border-radius: 4px; box-shadow: 0 0 0 1px #fff9; pointer-events: none; }
.screen-focus span { position: absolute; top: 50%; left: -2px; }
.gallery-stage[data-screen="delete"] .screen-focus span { left: auto; right: -2px; }
.gallery-controls { grid-area: progress; display: flex; justify-content: center; justify-self: center; flex-wrap: wrap; gap: 4px 12px; }
.gallery-controls button { position: relative; min-height: 42px; padding: 5px 9px; border: 0; background: none; color: var(--muted); font-size: 15px; }
.gallery-controls button:hover { color: var(--accent); }
.gallery-controls button[aria-pressed="true"] { color: var(--accent); font-weight: 700; }

@media (min-width: 701px) {
  .gallery-controls { gap: 0; }
  .gallery-controls button { display: grid; place-items: center; width: 40px; min-height: 36px; border: 0; }
  .gallery-controls button::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: #ffffff50; }
  .gallery-controls button:hover::before { background: #fff9; }
  .gallery-controls button[aria-pressed="true"]::before { width: 22px; background: var(--accent); }
  .gallery-controls button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  .gallery-controls button::before { transition: width .2s ease, background-color .2s ease; }
}

.features-band { background: #272019; --muted: #cfc0af; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 56px; }
.feature-icon { display: block; width: 28px; height: 28px; margin-bottom: 12px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.features h2 { margin-bottom: 8px; font-size: clamp(19px, 2.1vw, 24px); line-height: 1.35; }
.features p, .platform p, details p, details ol { color: var(--muted); }
.section { padding-block: 60px; }
.section > h2 { margin-bottom: 23px; font: 900 clamp(31px, 4vw, 47px)/1.25 var(--serif); }
.download-band {
  position: relative;
  isolation: isolate;
  color-scheme: light;
  --ink: #302217;
  --muted: #5f4836;
  --line: #c9ae8c;
  --accent: #873b18;
  --button-ink: #fff7e9;
  --button-hover: #6a2b11;
  border-top: 1px solid #d9b77f66;
  background:
    radial-gradient(ellipse at 88% 0%, #eace9f 0%, transparent 58%),
    radial-gradient(ellipse at 0% 100%, #e5c99f 0%, transparent 44%),
    #efe3cf;
  color: var(--ink);
}
.download-band::before, .download-band::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.download-band::before {
  inset: 0;
  background: url("assets/gold-lines.svg") right top clamp(-212px, -14vw, -122px) / clamp(720px, 83vw, 1240px) auto no-repeat;
  opacity: .85;
  mask-image: linear-gradient(110deg, transparent 18%, #000 62%);
}
.download-band::after {
  inset: auto auto 0 0;
  width: min(77%, 920px);
  height: clamp(118px, 18vw, 205px);
  background: url("assets/gold-lines.svg") right bottom clamp(-183px, -12vw, -110px) / clamp(560px, 62vw, 900px) auto no-repeat;
  transform: scaleX(-1);
  opacity: .68;
  mask-image: linear-gradient(154deg, transparent 14%, #000 66%);
}
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.platform { min-width: 0; padding: clamp(16px, 2.2vw, 25px); border: 1px solid var(--line); border-radius: var(--card-radius); background: #fbf4e8; }
.platform:not(.platform-featured) { box-shadow: inset 0 1px #fff8, 0 8px 24px #5a3a1a14; }
.platform h3 { font-size: 24px; line-height: 1.3; }
.platform-heading p { margin-top: 5px; }
.platform .release-state { display: table; margin-top: 16px; padding: 2px 10px; border-radius: 99px; background: #e7dccb; color: #594635; font-size: .875rem; font-weight: 650; }
.platform-featured { --ink: #f9efe3; --muted: #dcc8b2; --line: #6b5138; --accent: #ffab36; --button-ink: #24160b; --button-hover: #ffc06a; background: #302216; color: var(--ink); }
.platform-featured .release-state { background: #554020; color: #ffdc9e; }
.platform .release-state[data-ready] { background: #dcebd7; color: #2e512d; }
.platform-featured .release-state[data-ready] { background: #354e32; color: #e3f7dc; }
.release-link { margin-top: 16px; }
.app-store-badge { display: block; width: min(180px, 100%); border-radius: 11px; }
.app-store-badge img { height: auto; }
.app-store-badge:hover { opacity: .88; }
.platform details { margin-top: 14px; border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 11px; font-weight: 650; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; display: block; width: 7px; height: 7px; flex: 0 0 auto; margin-right: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
details[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.platform summary { padding-bottom: 0; }
details ol { padding-left: 22px; margin: 11px 0 0; overflow-wrap: anywhere; }
details li + li { margin-top: 6px; }
.faq-band { background: #1d1916; }
.faq { display: grid; grid-template-columns: .62fr 1.38fr; gap: 24px; }
@media (min-width: 701px) {
  .faq > h2 { position: sticky; top: calc(var(--site-header-height, 0px) + 46px); align-self: start; }
}
.faq details + details { border-top: 1px solid var(--line); }
.faq p { padding-bottom: 12px; }
.faq p a, .policy a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

footer { border-top: 1px solid var(--line); }
.footer-inner { flex-wrap: wrap; row-gap: 4px; font-size: 15px; }
.policy { width: min(740px, calc(100% - 42px)); margin-inline: auto; padding-block: 48px 70px; overflow-wrap: anywhere; }
.policy h1 { font: 900 clamp(34px, 6vw, 64px)/1.2 var(--serif); }
.policy h2 { margin: 26px 0 9px; font-size: 26px; }
.policy h3 { margin-top: 14px; font-size: 18px; }
#hero-message h2, .section > h2, .policy :is(h1, h2, h3) { letter-spacing: -.01em; font-feature-settings: "palt"; }
.policy li, .policy p { color: var(--muted); }
.policy hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }

@media (max-width: 900px) {
  .container { width: calc(100% - 56px); }
  .hero { gap: 28px; padding-block: 44px 43px; }
  .gallery-stage { min-height: 420px; }
  .phone-rotor { rotate: var(--phone-angle-small, 6deg); width: min(100%, 174px); border-radius: 27px; }
  .phone-rotor img { border-radius: 20px; }
  .phone-rotor::after { top: 11px; height: 12px; }
  .features { gap: 22px; }
  .platforms { gap: 12px; }
}

@media (max-width: 700px) {
  .download-band::before { background-position: right -55px top -115px; background-size: 650px auto; }
  .container { width: calc(100% - 36px); }
  .top-inner { min-height: 64px; gap: 8px; }
  .brand { gap: 7px; font-size: 16px; }
  .brand img { width: 33px; height: 33px; }
  nav { gap: 12px; font-size: 14px; }
  .hero, .features, .platforms, .faq { grid-template-columns: 1fr; }
  .hero { grid-template-areas: "copy" "gallery" "progress"; gap: 16px; padding-block: 34px 29px; }
  .hero-art::before { --wave-edge: linear-gradient(transparent 26%, #000 66%); background-position: 64% center; }
  #hero-message { margin-bottom: 19px; }
  #hero-message h2 { font-size: clamp(32px, 8.2vw, 54px); }
  #hero-message p { margin-top: 12px; }
  .gallery-stage, .gallery-stage[data-screen="delete"] { grid-template-areas: "phone" "note"; grid-template-columns: 1fr; min-height: 0; gap: 15px; padding: 14px 0 0; }
  .phone-rotor { width: min(52%, 172px); }
  .gallery-note { margin-top: 0; padding: 12px 15px; }
  .gallery-connector { display: none; }
  .gallery-controls button[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 24px; height: 2px; border-radius: 99px; background: currentColor; transform: translateX(-50%); }
  .features { gap: 24px; padding-block: 40px; }
  .features h2 { margin-bottom: 4px; }
  .section { padding-block: 39px; }
  .section > h2 { margin-bottom: 15px; }
  .faq { gap: 0; }
}

.hero-band.is-scroll-story { --story-height: calc(100svh - var(--site-header-height, 0px)); --story-travel: clamp(870px, 128svh, 1250px); min-height: calc(var(--story-height) + var(--story-travel)); }
.is-scroll-story .hero-frame { position: sticky; top: var(--site-header-height, 0px); display: grid; align-items: center; min-height: var(--story-height); }
.is-scroll-story .hero { row-gap: 12px; padding-block: clamp(10px, 2.8svh, 28px); }
.is-scroll-story .gallery-stage { min-height: 0; }
.is-scroll-story :is(.gallery-connector, .gallery-note, #hero-message) { transition-duration: .075s; }
.is-scroll-story .phone-rotor { width: min(100%, clamp(174px, 19vw, 270px), calc((var(--story-height) - 180px) * .46)); }

@media (max-width: 700px) {
  .is-scroll-story .hero { gap: 12px; padding-block: 12px; }
  .is-scroll-story .phone-rotor { width: min(52%, 165px, calc((var(--story-height) - 416px) * .46)); }
}

@media (max-width: 375px) {
  .gallery-controls { column-gap: 5px; }
  .gallery-controls button { padding-inline: 7px; }
}
