:root {
  --ink: #2A1A14;
  --orange: #EF5B2B;
  --mustard: #F5B83D;
  --mint: #BFE3D0;
  --paper: #FFF3DC;
  --ink-soft: #5b4339;
  --maxw: 1120px;
  --display: "Bagel Fat One", "Noto Sans TC", system-ui, sans-serif;
  --body: "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.7 var(--body); }
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* language: one document, two spans */
html[lang="en"] [lang="zh-Hant"] { display: none; }
html[lang="zh-Hant"] [lang="en"] { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding: 12px max(20px, calc((100vw - var(--maxw)) / 2)); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.brand { display: flex; }
.top nav { margin-left: auto; display: flex; gap: 24px; font-weight: 500; }
.top nav a { text-decoration: none; padding: 6px 2px; }
.top nav a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--orange); text-underline-offset: 6px; }
.lang { font: 700 15px var(--body); background: var(--ink); color: var(--paper); border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.lang:hover { background: var(--orange); }

section { padding: 88px max(20px, calc((100vw - var(--maxw)) / 2)); }
h1, h2, h3 { margin: 0; font-weight: 900; line-height: 1.15; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 0.005em; }
html[lang="zh-Hant"] h1, html[lang="zh-Hant"] h2 { font-family: var(--body); font-weight: 900; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 36px; max-width: 18ch; }
h3 { font-size: 1.3rem; }
h1, h2 { text-wrap: balance; }
html[lang="zh-Hant"] h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); line-height: 1.25; }
p { margin: 0; max-width: 62ch; }

/* buttons */
.btn { display: inline-block; font: 700 17px var(--body); text-decoration: none; padding: 13px 24px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; cursor: pointer; color: var(--ink); }
.btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--orange); color: var(--paper); }

/* hero: mint tile wall, like an old cha chaan teng */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 96px; background:
  linear-gradient(var(--paper) 0 0) padding-box,
  var(--mint);
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, rgb(42 26 20 / .09) 39px 41px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgb(42 26 20 / .09) 39px 41px),
    var(--mint);
  border-bottom: 2px solid var(--ink); }
.lede { font-size: 1.2rem; margin-top: 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.fine { font-size: .92rem; color: var(--ink-soft); margin-top: 18px; }

/* the karaoke TV */
.tv { margin: 0; }
.tv-body { background: var(--orange); border: 3px solid var(--ink); border-radius: 34px; padding: 22px 22px 14px; box-shadow: 0 10px 0 var(--ink); }
.screen { position: relative; aspect-ratio: 16 / 10; border-radius: 22px / 26px; overflow: hidden; border: 3px solid var(--ink); background: #1d120d; }
.vid { position: absolute; inset: 0; background:
  radial-gradient(120% 90% at 20% 10%, #7b3a2a 0%, transparent 55%),
  radial-gradient(90% 80% at 85% 90%, #2c6a5c 0%, transparent 60%),
  #1d120d; }
/* same layout as the extension: note lane on top, lyrics centred below, mix panel bottom right.
   The lane (canvas) and the scrolling lyric list are drawn by main.js, like the extension draws them. */
@property --k { syntax: "<number>"; inherits: true; initial-value: 1; }
.lane canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.klyr { position: absolute; left: 0; right: 0; top: calc(30% + 4px); bottom: 24%; font-size: calc(clamp(1.15rem, 2.6vw, 1.8rem) * var(--k)); }
.klist { position: absolute; left: 0; right: 0; top: 0; overflow: hidden; line-height: 1.25; font-weight: 900; text-align: center;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%); }
.krow { position: absolute; left: 0; top: 0; width: 100%; display: flex; justify-content: center; transform-origin: 50% 0; opacity: 0; transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .42s ease; }
.kln { position: relative; display: inline-block; white-space: nowrap; color: #fff; text-shadow: 0 0 3px rgb(0 0 0 / .95), 0 2px 6px rgb(0 0 0 / .8); }
.kfill { position: absolute; left: 0; top: 0; color: #ffc832; clip-path: inset(0 100% 0 0); }
.lane { position: absolute; left: 0; right: 0; top: 0; height: 30%; background: rgb(0 0 0 / .35); border-bottom: 2px solid rgb(255 243 220 / .25); }
.score { position: absolute; right: 3%; top: 10%; padding: 3px 10px; border-radius: 99px; background: rgb(20 12 8 / .82); color: var(--mustard); font: 700 .8rem/1.2 var(--body); }
.mix { position: absolute; right: 3%; bottom: 4%; width: 46%; padding: 8px 12px; display: grid; gap: 6px; border-radius: 12px; background: rgb(20 12 8 / .85); color: var(--paper); font: 500 .85rem/1 var(--body); }
.mix-row { display: grid; grid-template-columns: 3.2em 1fr 28px; align-items: center; gap: 6px; }
.mix input { width: 100%; margin: 0; height: 22px; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.mix input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: rgb(255 243 220 / .3); }
.mix input::-moz-range-track { height: 4px; border-radius: 4px; background: rgb(255 243 220 / .3); }
.mix input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--mustard); border: 0; }
.mix input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--mustard); border: 0; }
.mix input:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.vocal { display: flex; gap: 2px; align-items: flex-end; height: 14px; transition: opacity .3s; }
.vocal i { width: 3px; border-radius: 3px; background: var(--paper); transition: height .3s; }
.screen.novocal .vocal { opacity: .15; }
.tv-panel { display: flex; align-items: center; justify-content: flex-end; padding-top: 14px; }
.knobs { display: flex; gap: 10px; }
.knobs i { width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); display: block; }
.tv figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 22px; }

/* how: one mini screen at a time, cycling through the steps; the list beside it shows where we are */
.how { border-bottom: 2px solid var(--ink); }
.steps { list-style: none; counter-reset: s -1; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); column-gap: 48px; align-items: center; }
.steps li { display: contents; }
.steps .art { grid-column: 1; grid-row: 1 / span 4; align-self: center; }
.steps li:not(.on) .art { display: none; }
.steps li.on .art { animation: stepin .4s ease-out, stepclock var(--cut, 10s) linear; }
@keyframes stepclock { to { outline-color: transparent; } }
@keyframes stepin { from { opacity: 0; transform: translateY(8px); } }
.cap { grid-column: 2; counter-increment: s; position: relative; display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-items: center; padding: 18px 0; border-top: 2px solid rgb(42 26 20 / .15); cursor: pointer; color: var(--ink-soft); }
.cap::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font: 400 1.3rem var(--display); }
.cap h3 { font-size: 1.15rem; font-weight: 700; }
.cap p { grid-column: 2; font-size: .92rem; }
.cap::after { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 0; background: var(--orange); }
.on .cap { color: var(--ink); }
.on .cap::before { background: var(--orange); color: var(--paper); }
.on .cap h3 { font-weight: 900; }
.stepper.play .on .cap::after { animation: stepbar var(--cut, 10s) linear forwards; }
.stepper:not(.play) .on .cap::after { width: 0; }
@keyframes stepbar { to { width: 100%; } }

.art .ext { width: 5.4cqw; height: 5.4cqw; margin-left: 1.5cqw; border-radius: 1.2cqw; }
.art .win { position: relative; aspect-ratio: 4 / 3; container-type: inline-size; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff9ea; box-shadow: 0 6px 0 var(--ink); font-family: var(--body); }
.art .chrome { position: absolute; left: 0; right: 0; top: 0; height: 10%; display: flex; align-items: center; gap: 1.4cqw; padding: 0 3cqw; background: var(--ink); }
.art .chrome b { width: 2cqw; height: 2cqw; border-radius: 50%; background: rgb(255 243 220 / .35); }
.art .addr { flex: 1; height: 4.4cqw; margin-left: 2cqw; border-radius: 9cqw; background: rgb(255 243 220 / .16); }
.art .page { position: absolute; left: 0; right: 0; top: 10%; bottom: 0; overflow: hidden; }
.art .cur { position: absolute; z-index: 9; width: 5.2cqw; left: 60%; top: 70%; }
.art .cur svg { display: block; width: 100%; fill: var(--paper); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.art .cur::after { content: ""; position: absolute; left: -3.4cqw; top: -3.4cqw; width: 7cqw; height: 7cqw; border-radius: 50%; border: .8cqw solid var(--orange); opacity: 0; }
.art .vid { position: absolute; inset: 0; background: radial-gradient(110% 90% at 20% 10%, #7b3a2a 0%, transparent 55%), radial-gradient(90% 80% at 85% 90%, #2c6a5c 0%, transparent 60%), #1d120d; }

/* pause everything until in view */
.stepper:not(.play) .art, .stepper:not(.play) .art *, .stepper:not(.play) .art *::after { animation-play-state: paused; }

/* 0: add the plugin, then the one-time download on its setup page (10 s) */
.art-0 * { animation-duration: 10s; animation-iteration-count: infinite; }
.art-0 .page { background: #fff9ea; }
.art-0 .ext { opacity: 0; animation-name: s0-ext; }
.art .store { position: absolute; inset: 0; }
.art .sicon { position: absolute; left: 6%; top: 8%; width: 15cqw; height: 15cqw; border-radius: 3cqw; }
.art .sinfo { position: absolute; left: 26%; top: 9%; width: 34%; display: grid; gap: 1.6cqw; }
.art .sinfo strong { font: 700 4.4cqw/1.1 var(--body); }
.art .sinfo i, .art .slines i { display: block; height: 2.2cqw; border-radius: 2cqw; background: rgb(42 26 20 / .14); }
.art .sinfo i:last-child { width: 60%; }
.art .add { position: absolute; right: 6%; top: 12%; padding: 1.8cqw 3.4cqw; border-radius: 9cqw; background: var(--ink); color: var(--paper); font: 700 3.2cqw/1 var(--body); animation-name: s0-add; }
.art .slines { position: absolute; left: 6%; right: 6%; top: 40%; display: grid; gap: 2.6cqw; }
.art .slines i:nth-child(2) { width: 86%; } .slines i:nth-child(3) { width: 64%; }
.art .dlg { position: absolute; left: 44%; top: 4%; width: 52%; padding: 3cqw; display: grid; gap: 3cqw; border-radius: 2cqw; background: #fff; border: .4cqw solid var(--ink); box-shadow: 0 1.2cqw 0 rgb(42 26 20 / .25); font: 700 3.4cqw/1.2 var(--body); opacity: 0; visibility: hidden; animation-name: s0-dlg; }
.art .dbtns { display: flex; justify-content: flex-end; gap: 2cqw; font-size: 3cqw; font-weight: 500; }
.art .dbtns span { padding: 1.4cqw 2.6cqw; border-radius: 9cqw; border: .4cqw solid rgb(42 26 20 / .3); }
.art .dbtns .dadd { background: var(--orange); border-color: var(--orange); color: var(--paper); font-weight: 700; }
.art .setup { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.2cqw; background: var(--paper); opacity: 0; visibility: hidden; animation-name: s0-setup; }
.art .setup img { width: 34%; }
.art .setup strong { font: 900 5cqw/1 var(--body); }
.art .dl { padding: 2cqw 5cqw; border-radius: 9cqw; background: var(--orange); color: var(--paper); font: 700 3.4cqw/1 var(--body); animation-name: s0-dl; }
.art .prog { width: 56%; height: 2cqw; border-radius: 2cqw; background: rgb(42 26 20 / .14); overflow: hidden; }
.art .prog i { display: block; height: 100%; width: 0; background: var(--orange); animation-name: s0-prog; animation-timing-function: linear; }
.art .done { margin-top: -1cqw; font: 700 3.4cqw/1 var(--body); color: #2c6a5c; opacity: 0; animation-name: s0-done; }
.art-0 .cur { animation-name: s0-cur; animation-timing-function: ease-in-out; }
.art-0 .cur::after { animation: s0-tap 10s infinite; }
/* cursor (page coords): Add to Chrome · Add extension · Download · rest */
@keyframes s0-cur { 0%, 3% { left: 50%; top: 82%; } 11%, 14% { left: 79%; top: 18%; } 22%, 26% { left: 80%; top: 23%; } 40%, 46% { left: 51%; top: 57%; } 56%, 100% { left: 70%; top: 88%; } }
@keyframes s0-tap { 0%, 12% { opacity: 0; transform: scale(.4); } 13% { opacity: 1; } 16%, 24% { opacity: 0; transform: scale(1.2); } 24.1% { transform: scale(.4); } 25% { opacity: 1; } 28%, 44% { opacity: 0; transform: scale(1.2); } 44.1% { transform: scale(.4); } 45% { opacity: 1; } 48%, 100% { opacity: 0; transform: scale(1.2); } }
@keyframes s0-add { 0%, 12.5% { transform: none; } 13% { transform: scale(.92); } 15%, 100% { transform: none; } }
@keyframes s0-dlg { 0%, 14% { opacity: 0; visibility: hidden; transform: translateY(-2cqw); } 16%, 26% { opacity: 1; visibility: visible; transform: none; } 28%, 100% { opacity: 0; visibility: hidden; } }
@keyframes s0-ext { 0%, 27% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1.25); } 32%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes s0-setup { 0%, 33% { opacity: 0; visibility: hidden; transform: translateX(6%); } 37%, 97% { opacity: 1; visibility: visible; transform: none; } 100% { opacity: 0; visibility: hidden; } }
@keyframes s0-dl { 0%, 44.5% { transform: none; opacity: 1; } 45% { transform: scale(.92); } 47%, 100% { transform: none; opacity: .4; } }
@keyframes s0-prog { 0%, 47% { width: 0; } 80%, 100% { width: 100%; } }
@keyframes s0-done { 0%, 81% { opacity: 0; } 83%, 97% { opacity: 1; } 100% { opacity: 0; } }

/* 1: search, results, open the MV (8 s) */
.art-1 * { animation-duration: 8s; animation-iteration-count: infinite; }
.art-1 .page { background: #fff9ea; }
.art .search { position: absolute; left: 14%; right: 14%; top: 6%; height: 11%; border: .5cqw solid var(--ink); border-radius: 9cqw; display: flex; align-items: center; padding: 0 3.5cqw; font: 500 3.6cqw/1 var(--body); white-space: nowrap; }
.art .search .q { clip-path: inset(0 100% 0 0); animation-name: s1-type; animation-timing-function: steps(8, end); }
.art .search .caret { width: .5cqw; height: 4.6cqw; margin-left: .4cqw; background: var(--orange); opacity: 0; animation-name: s1-caret; }
.art .results { position: absolute; left: 6%; right: 6%; top: 24%; display: grid; gap: 4cqw; opacity: 0; animation-name: s1-res; }
.art .res { display: flex; gap: 3cqw; align-items: flex-start; }
.art .thumb { flex: none; width: 30cqw; aspect-ratio: 16 / 9; border-radius: 1.6cqw; background: linear-gradient(135deg, #7b3a2a, #2c6a5c); }
.art .res:not(:first-child) .thumb { background: rgb(42 26 20 / .18); }
.art .res span { flex: 1; display: grid; gap: 1.6cqw; padding-top: .6cqw; }
.art .res span i { height: 2.4cqw; border-radius: 2cqw; background: rgb(42 26 20 / .14); }
.art .res span i:last-child { width: 60%; }
.art .t { font: 700 3.3cqw/1.25 var(--body); font-style: normal; color: var(--ink); }
.art .player { position: absolute; inset: 0; background: #fff9ea; opacity: 0; transform: scale(.94); animation-name: s1-play; }
.art .pv { position: relative; height: 74%; background: radial-gradient(110% 90% at 20% 10%, #7b3a2a 0%, transparent 55%), radial-gradient(90% 80% at 85% 90%, #2c6a5c 0%, transparent 60%), #1d120d; }
.art .pbar { position: absolute; left: 4%; right: 4%; bottom: 6%; height: 1cqw; border-radius: 1cqw; background: rgb(255 243 220 / .25); }
.art .pbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--orange); animation-name: s1-prog; animation-timing-function: linear; }
.art .player .t { display: block; margin: 3cqw 5% 0; }
.art-1 .cur { animation-name: s1-cur; animation-timing-function: ease-in-out; }
.art-1 .cur::after { animation: s1-tap 8s infinite; }
@keyframes s1-cur { 0%, 6% { left: 66%; top: 74%; } 18%, 44% { left: 44%; top: 12%; } 58%, 66% { left: 24%; top: 34%; } 78%, 100% { left: 70%; top: 92%; } }
@keyframes s1-tap { 0%, 18% { opacity: 0; transform: scale(.4); } 19% { opacity: 1; } 23%, 62% { opacity: 0; transform: scale(1.2); } 62.1% { transform: scale(.4); } 63% { opacity: 1; } 67%, 100% { opacity: 0; transform: scale(1.2); } }
@keyframes s1-caret { 0%, 19% { opacity: 0; } 20%, 46% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes s1-type { 0%, 22% { clip-path: inset(0 100% 0 0); } 40%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes s1-res { 0%, 44% { opacity: 0; transform: translateY(3cqw); } 50%, 100% { opacity: 1; transform: none; } }
@keyframes s1-play { 0%, 66% { opacity: 0; transform: scale(.94); } 71%, 95% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes s1-prog { 0%, 70% { width: 0; } 96%, 100% { width: 30%; } }

/* 2: press the toolbar icon, paste lyrics while it gets ready, lyrics start (12 s) */
@property --n { syntax: "<integer>"; inherits: false; initial-value: 8; }
.art-2 * { animation-duration: 12s; animation-iteration-count: infinite; }

.art-2 .ext { animation-name: s2-ext; }
.art-2 .vid { animation-name: s2-dim; }
.art .ready { position: absolute; left: 50%; bottom: 5%; transform: translateX(-50%); white-space: nowrap; padding: 1.8cqw 3.6cqw; border-radius: 2cqw; background: rgb(20 12 8 / .82); color: var(--paper); font: 500 3.4cqw/1 var(--body); opacity: 0; animation-name: s2-ready; }
.art .count::after { --n: 8; counter-reset: n var(--n); content: counter(n); animation: s2-count 12s linear infinite; }
.art .paste { position: absolute; inset: 5% 9% 22%; padding: 3cqw 3.6cqw; display: grid; grid-template-rows: auto 1fr auto; gap: 2cqw; border-radius: 2.4cqw; background: #2a1a14; color: var(--paper); font: 3cqw/1.3 var(--body); opacity: 0; visibility: hidden; animation-name: s2-panel; }
.art .paste strong { font-weight: 700; font-size: 3.4cqw; }
.art .ta { position: relative; border-radius: 1.4cqw; background: rgb(255 243 220 / .1); border: .4cqw solid rgb(255 243 220 / .2); padding: 1.6cqw 2.4cqw; font-size: 3.4cqw; animation-name: s2-ta; }
.art .ph { position: absolute; opacity: .45; animation-name: s2-ph; }
.art .txt { opacity: 0; animation-name: s2-txt; }
.art .save { justify-self: end; padding: 1.2cqw 3.6cqw; border-radius: 9cqw; background: var(--orange); font-weight: 700; animation-name: s2-save; }
.art .key { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); padding: 1.6cqw 3cqw; border-radius: 1.6cqw; background: var(--paper); color: var(--ink); border: .5cqw solid var(--ink); box-shadow: 0 .8cqw 0 var(--ink); font: 700 4cqw/1 var(--body); opacity: 0; animation-name: s2-key; }
.art-2 .cur { animation-name: s2-cur; animation-timing-function: ease-in-out; }
.art-2 .cur::after { animation: s2-tap 12s infinite; }
/* cursor (window coords): toolbar icon · textarea · Save · rest */
@keyframes s2-cur { 0%, 2% { left: 50%; top: 66%; } 10%, 14% { left: 93%; top: 4.5%; } 24%, 27% { left: 42%; top: 42%; } 38%, 41% { left: 82%; top: 70%; } 52%, 100% { left: 72%; top: 92%; } }
@keyframes s2-tap { 0%, 11% { opacity: 0; transform: scale(.4); } 12% { opacity: 1; } 15%, 25% { opacity: 0; transform: scale(1.2); } 25.1% { transform: scale(.4); } 26% { opacity: 1; } 29%, 39% { opacity: 0; transform: scale(1.2); } 39.1% { transform: scale(.4); } 40% { opacity: 1; } 43%, 100% { opacity: 0; transform: scale(1.2); } }
@keyframes s2-ext { 0%, 11% { transform: none; } 12% { transform: scale(.82); } 14%, 100% { transform: none; } }
@keyframes s2-dim { 0%, 12% { filter: none; } 14%, 58% { filter: brightness(.7) saturate(.7); } 61%, 100% { filter: none; } }
@keyframes s2-ready { 0%, 13% { opacity: 0; } 15%, 58% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes s2-count { 0%, 14% { --n: 8; } 58%, 100% { --n: 0; } }
@keyframes s2-panel { 0%, 15% { opacity: 0; visibility: hidden; transform: scale(.96); } 18%, 42% { opacity: 1; visibility: visible; transform: none; } 45%, 100% { opacity: 0; visibility: hidden; transform: scale(.96); } }
@keyframes s2-ta { 0%, 25% { border-color: rgb(255 243 220 / .2); } 26%, 40% { border-color: var(--mustard); } 41%, 100% { border-color: rgb(255 243 220 / .2); } }
@keyframes s2-key { 0%, 28% { opacity: 0; transform: translate(-50%, -40%); } 29%, 33% { opacity: 1; transform: translate(-50%, -50%); } 35%, 100% { opacity: 0; } }
@keyframes s2-ph { 0%, 31% { opacity: .45; } 31.5%, 100% { opacity: 0; } }
@keyframes s2-txt { 0%, 31% { opacity: 0; } 31.5%, 100% { opacity: 1; } }
@keyframes s2-save { 0%, 39.5% { transform: none; } 40% { transform: scale(.9); } 42%, 100% { transform: none; } }

/* 3: note lane on top, lyrics below, vocals down and lyrics bigger from the panel bottom right (10 s) */
.art-3 * { animation-duration: 10s; animation-iteration-count: infinite; }
.art-3 .klyr { top: calc(30% + 1cqw); bottom: 4%; font-size: calc(5.6cqw * var(--k)); animation-name: s3-size; animation-timing-function: ease-in-out; }
.art .lane { position: absolute; left: 0; right: 0; top: 0; height: 30%; background: rgb(0 0 0 / .35); border-bottom: .4cqw solid rgb(255 243 220 / .25); }
.art .score { position: absolute; right: 3%; top: 10%; padding: 1cqw 2.2cqw; border-radius: 9cqw; background: rgb(20 12 8 / .82); color: var(--mustard); font: 700 3cqw/1 var(--body); }
.art .ctl { position: absolute; right: 3%; bottom: 5%; width: 44%; padding: 2.4cqw 3cqw; display: grid; gap: 2.6cqw; border-radius: 2.4cqw; background: rgb(20 12 8 / .82); color: var(--paper); font: 500 3cqw/1 var(--body); }
.art .ctl label { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; }
.art .trk { position: relative; width: 52%; height: .9cqw; border-radius: 1cqw; background: rgb(255 243 220 / .3); }
.art .th { position: absolute; top: 50%; width: 3.2cqw; height: 3.2cqw; margin: -1.6cqw 0 0 -1.6cqw; border-radius: 50%; background: var(--mustard); }
.art .th-v { left: 100%; animation-name: s3-vocal; animation-timing-function: ease-in-out; }
.art .th-s { left: 40%; animation-name: s3-sz; animation-timing-function: ease-in-out; }
.art-3 .cur { animation-name: s3-cur; animation-timing-function: ease-in-out; }
/* cursor (page coords): vocal thumb right → left, size thumb left → right */
@keyframes s3-cur {
  0%, 2% { left: 40%; top: 90%; } 12%, 14% { left: 94%; top: 81%; } 24%, 30% { left: 76%; top: 81%; }
  38%, 40% { left: 82%; top: 89%; } 50%, 56% { left: 92%; top: 89%; } 66%, 100% { left: 36%; top: 92%; }
}
@keyframes s3-vocal { 0%, 14% { left: 100%; } 24%, 97% { left: 10%; } 100% { left: 100%; } }
@keyframes s3-sz { 0%, 40% { left: 40%; } 50%, 97% { left: 90%; } 100% { left: 40%; } }
@keyframes s3-size { 0%, 40% { --k: 1; } 50%, 97% { --k: 1.25; } 100% { --k: 1; } }

/* features: alternating rows, each with its own small picture */
.features { background: var(--mustard); border-bottom: 2px solid var(--ink); }
.features h2 { margin-bottom: 48px; }
.feat { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; padding: 36px 0; border-top: 2px solid var(--ink); }
.feat.flip .feat-text { order: 2; }
.feat h3 { font-size: 1.7rem; margin-bottom: 12px; }
.feat-art { display: flex; align-items: center; justify-content: center; gap: 10px; height: 170px; border: 2px solid var(--ink); border-radius: 22px; background: var(--paper); }


/* feature pictures: each loops once it scrolls into view */
.feat:not(.play) .feat-art, .feat:not(.play) .feat-art * { animation-play-state: paused; }
.art-mix i { width: 18px; height: 96px; border-radius: 9px; background: var(--ink); animation: eq 1.6s ease-in-out infinite; }
.art-mix i:nth-child(1) { animation-duration: 1.3s; } .art-mix i:nth-child(2) { animation-duration: 1.9s; animation-delay: -.4s; }
.art-mix i:nth-child(3) { animation-duration: 1.5s; animation-delay: -.8s; } .art-mix i:nth-child(4) { animation-duration: 2.1s; animation-delay: -.2s; }
.art-mix i.off { height: 110px; background: var(--orange); animation: vocal 6s ease-in-out infinite; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@keyframes vocal { 0%, 30% { transform: scaleY(1); } 42%, 85% { transform: scaleY(.12); } 97%, 100% { transform: scaleY(1); } }

.art-lyrics { padding: 0 20px; }
.sline { margin: 0; max-width: none; font: 900 clamp(1.7rem, 3.4vw, 2.6rem)/1.3 var(--body); white-space: nowrap; }
.swipe { background: linear-gradient(90deg, var(--orange) 50%, rgb(42 26 20 / .28) 50%) 100% 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sweep 5s linear infinite; }
@keyframes sweep { 0% { background-position: 100% 0; } 75%, 92% { background-position: 0 0; } 93%, 100% { background-position: 100% 0; } }

.art-lane .row { position: relative; display: flex; gap: 22px; align-items: center; height: 14px; }
.art-lane b { width: 56px; height: 14px; border-radius: 9px; background: var(--ink); }
.art-lane b:nth-child(1) { transform: translateY(14px); } .art-lane b:nth-child(2) { transform: translateY(-12px); } .art-lane b:nth-child(3) { transform: translateY(-34px); } .art-lane b:nth-child(4) { transform: translateY(4px); }
.art-lane em { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--ink); animation: follow 6s ease-in-out infinite; }
@keyframes follow {
  0%, 18% { transform: translate(19px, 12px); } 25%, 43% { transform: translate(97px, -14px); }
  50%, 68% { transform: translate(175px, -36px); } 75%, 93% { transform: translate(253px, 2px); } 100% { transform: translate(19px, 12px); }
}


/* name story + privacy, one dark section */
.name { background: var(--ink); color: var(--paper); border-bottom: 2px solid var(--ink); }
.name h2 { max-width: 22ch; }
.name p { font-size: 1.2rem; }
.name em { font-style: normal; font-weight: 900; color: var(--mustard); }
.name .stays { margin-top: 20px; padding-top: 20px; border-top: 2px dashed rgb(255 243 220 / .3); color: var(--mint); }

/* pricing */
.pricing { border-bottom: 2px solid var(--ink); }
.plans { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; align-items: start; }
.plan { border: 2px solid var(--ink); border-radius: 22px; padding: 32px; background: #fff9ea; }
.plan.pro { background: var(--orange); color: var(--paper); border-width: 3px; box-shadow: 0 8px 0 var(--ink); }
.plan h3 { font: 400 2rem var(--display); }
.price { margin: 6px 0 22px; font-weight: 700; }
.plan ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.plan small { opacity: .85; }
.founder { margin-top: 26px; padding: 12px 16px; border-radius: 14px; background: var(--paper); color: var(--ink); font-weight: 700; }

/* faq */
.faq { background: var(--mint); border-bottom: 2px solid var(--ink); }
details { border-top: 2px solid var(--ink); padding: 18px 0; max-width: 780px; }
details:last-of-type { border-bottom: 2px solid var(--ink); }
summary { font-weight: 700; font-size: 1.1rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 400 1.6rem/1 var(--display); color: var(--orange); }
details[open] summary::after { content: "−"; }
details p { margin-top: 10px; }

/* early access */
.early p { margin-bottom: 24px; }
.signup { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.signup input { font: 500 17px var(--body); padding: 13px 18px; width: min(360px, 100%); border: 2px solid var(--ink); border-radius: 999px; background: #fff9ea; color: var(--ink); }
.signup output { flex-basis: 100%; font-size: .92rem; color: var(--ink-soft); }

footer { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 36px max(20px, calc((100vw - var(--maxw)) / 2)); border-top: 2px solid var(--ink); font-size: .9rem; color: var(--ink-soft); }
footer p { max-width: 70ch; }

@media (max-width: 880px) {
  .top nav { display: none; }
  .top .lang { margin-left: auto; }
  section { padding-top: 64px; padding-bottom: 64px; }
  .hero, .feat, .plans { grid-template-columns: 1fr; gap: 36px; }
  .feat.flip .feat-text { order: 0; }
  .steps { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .steps .art { grid-row: 1; margin-bottom: 20px; }
  .cap { grid-column: 1; padding: 12px 0; }
}
@media (max-width: 520px) {
  .mix { width: 52%; padding: 5px 8px; gap: 2px; font-size: .68rem; }
  .mix input { height: 18px; }
  .klyr { bottom: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feat-art, .feat-art * { animation: none !important; }
  .swipe { background-position: 0 0; }
  .krow { transition: none; }
  /* each step frozen on its most telling frame */
  .art *, .art *::after { animation-play-state: paused !important; }
  .art-0 *, .art-0 *::after { animation-delay: -8.4s !important; }
  .art-1 *, .art-1 *::after { animation-delay: -6.4s !important; }
  .art-2 *, .art-2 *::after { animation-delay: -4.4s !important; }
  .art-3 *, .art-3 *::after { animation-delay: -6s !important; }
  * { transition: none !important; }
}

/* koel mini game */
.koel { border: 2px solid var(--ink); border-radius: 22px; background: var(--paper); padding: 18px 20px 16px; display: grid; justify-items: center; gap: 10px; }
.bird { width: min(280px, 100%); height: auto; overflow: visible; }
.bird .waves { opacity: 0; }
/* articulated parts; origins in viewBox units */
.bird .tail, .bird .torso, .bird .head, .bird .throat, .bird .bill-low, .bird .lid, .bird .waves { transform-box: view-box; }
.bird .tail { transform-origin: 80px 110px; }
.bird .torso { transform-origin: 124px 136px; }
.bird .head { transform-origin: 158px 84px; }
.bird .throat { transform-origin: 166px 80px; }
.bird .bill-low { transform-origin: 186px 80px; }
.bird .lid { transform-origin: 175px 54.5px; transform: scaleY(0); }
.bird .waves { transform-origin: 232px 72px; }
/* idle: breathing, a slow look around, tail balance */
.feat.play .bird .torso { animation: breathe 3.4s ease-in-out infinite; }
.feat.play .bird .head { animation: look 9s ease-in-out infinite; }
.feat.play .bird .tail { animation: sway 5.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.012, 1.025); } }
@keyframes look { 0%, 22%, 100% { transform: rotate(0); } 28%, 46% { transform: rotate(-6deg); } 54%, 70% { transform: rotate(3deg); } 76% { transform: rotate(0); } }
@keyframes sway { 50% { transform: rotate(2.5deg); } }
/* fallback when Web Animations is missing */
.koel.singing .bill-low { transform: rotate(18deg); }
.koel.singing .waves { animation: calls .7s ease-out; }
.koel.hop .bird { animation: hop .5s ease-out; }
@keyframes calls { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-14px) rotate(-3deg); } 60% { transform: translateY(0); } 78% { transform: translateY(-5px); } }
.keybar { display: flex; gap: 6px; }
.keybar i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; }
.keybar i.mid { background: rgb(42 26 20 / .25); }
.keybar i.cur { background: var(--orange); transform: scale(1.35); }
.kcontrols { display: flex; align-items: center; gap: 16px; }
.kbtn { font: 400 1.5rem var(--display); min-width: 64px; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); box-shadow: 0 4px 0 var(--ink); cursor: pointer; color: var(--ink); }
.kbtn:hover { background: var(--mustard); }
.kbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.kbtn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.kval { font: 400 2rem var(--display); min-width: 3ch; text-align: center; }
.kgame { display: grid; justify-items: center; gap: 8px; }
.khear { line-height: 0; min-width: 0; padding: 8px 18px; }
.khear svg { display: block; }
.kmatch { margin: 0; min-height: 1.8em; font: 400 1.4rem/1.3 var(--display); color: var(--orange); text-align: center; max-width: none; }
.kmatch .ok { animation: pop .35s ease-out; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
html[lang="zh-Hant"] .kmatch { font-family: var(--body); font-weight: 900; }
.kcap { font-size: .8rem; color: var(--ink-soft); text-align: center; max-width: none; }
@media (prefers-reduced-motion: reduce) { .kmatch .ok { animation: none; } .koel.hop .bird, .koel.singing .waves, .feat.play .bird * { animation: none; } .koel.singing .waves { opacity: 1; } }
