:root {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #20232b;
  background: #fffaf3;
  font-synthesis: none;
  --red: #ed1747;
  --muted: #60636a;
  --page-width: 1280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; min-width: 320px; background: #fffaf3 url("./assets/katcat-paper-hero.png") left top / 10000px auto repeat-y; background-blend-mode: soft-light; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.paper-hero { position: relative; isolation: isolate; height: 100svh; }
.hero-art { position: absolute; z-index: -1; width: 100%; height: 100%; left: 0; object-fit: cover; object-position: center; mask-image: linear-gradient(to bottom, #000 65%, #000000f0 78%, #000000a6 87%, #00000040 94%, #0000000a 98%, transparent); }
.paper-header { width: min(calc(100% - 112px), var(--page-width)); height: 100px; display: flex; align-items: center; justify-content: space-between; margin: auto; gap: 24px; }
.brand { display: inline-flex; }
.brand img { display: block; width: 144px; height: auto; }
.header-actions { display: flex; align-items: center; gap: 32px; }
.language-toggle { display: flex; gap: 2px; padding: 4px; background: #ffffff70; border: 1px solid #262a341a; border-radius: 8px; }
.language-toggle button { height: 32px; min-width: 42px; padding: 0 9px; background: transparent; border: 0; border-radius: 5px; font-size: 12px; font-weight: 650; color: #62646a; }
.language-toggle button.is-active { background: #25262c; color: #fff; }
.home-link { display: flex; align-items: center; gap: 16px; font-size: 13px; font-weight: 600; }
.home-link span:last-child { font-size: 22px; font-weight: 400; }
.home-link:hover { color: var(--red); }
.hero-inner { width: min(calc(100% - 112px), var(--page-width)); margin: auto; height: calc(100% - 155px); display: flex; align-items: center; padding: 18px 0 48px; }
.hero-copy { max-width: 490px; width: 44%; }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 650; line-height: 1.5; margin: 0 0 24px; color: #656168; letter-spacing: 0; }
.tiny-line { display: block; width: 24px; height: 2px; background: var(--red); }
h1 { font-size: 88px; line-height: 1; margin: 0; font-weight: 780; letter-spacing: 0; }
h1 span, .footer-wordmark span { color: var(--red); }
.tagline { font-size: 35px; font-weight: 620; line-height: 1.22; margin: 22px 0 0; max-width: 470px; }
.description { max-width: 435px; font-size: 16px; line-height: 1.8; margin: 24px 0 30px; color: #5d5b60; text-wrap: pretty; }
.download-link { display: inline-flex; min-height: 58px; padding: 0 23px; gap: 12px; background: var(--red); color: white; border: 1px solid #d81140; border-radius: 8px; font-size: 14px; font-weight: 650; box-shadow: 0 10px 22px #e82e4f20; transition: background .2s ease, transform .2s ease; }
.download-link { align-items: center; }
.download-link:hover { background: #d60f3c; transform: translateY(-2px); }
.download-link svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.download-arrow { margin-left: 15px; font-size: 22px; font-weight: 400; }
.download-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 12px; }
.guide-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.guide-link:hover { color: var(--red); }
.download-secondary { display: contents; }
.download-secondary .guide-link { font-size: 13px; }
.video-link { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; padding: 0 20px; border: 1px solid #20232b; border-radius: 8px; background: #25262c; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: inset 0 1px 0 #ffffff14, 0 4px 12px #20232b12; transition: background .2s ease, box-shadow .2s ease; }
.video-link:hover { background: #35363d; box-shadow: inset 0 1px 0 #ffffff1a, 0 6px 16px #20232b20; }
.video-link:active { background: #1c1d22; box-shadow: inset 0 1px 3px #0003; }
.video-link img { width: 24px; height: 24px; filter: invert(1); opacity: .92; }
.video-link img, .video-close img { flex-shrink: 0; }
.video-dialog { width: min(1080px, calc(100% - 32px), calc((100dvh - 128px) * 16 / 9)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #ded5cb; border-radius: 8px; background: #fffaf3; color: #20232b; box-shadow: 0 24px 80px #0005; }
.video-dialog::backdrop { background: #15151bc9; }
.video-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 6px 12px 6px 20px; }
.video-dialog-header h2 { font-size: 18px; }
.video-close { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; }
.video-close:hover { background: #efe4d8; }
.video-dialog video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #151515; }
.video-error { margin: 0; padding: 12px 20px; color: #a61335; font-size: 14px; }
body.video-open { overflow: hidden; }
.release-meta { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; font-size: 11px; line-height: 1.6; color: #777078; margin: 17px 0 0; }
.status-dot { width: 6px; height: 6px; flex-shrink: 0; background: #16866b; border-radius: 50%; }
.meta-divider { color: #b6aba4; margin: 0 2px; }
.scroll-link { position: absolute; left: max(56px, calc((100% - var(--page-width)) / 2)); bottom: 28px; display: flex; align-items: center; gap: 18px; font-size: 11px; color: #5e6065; }
.scroll-link span:last-child { font-size: 20px; }
.workspace { padding: 32px 56px 72px; min-height: calc(100svh - 100px); }
.workspace-inner { max-width: 1080px; margin: auto; }
.workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
.workspace-heading .eyebrow { margin-bottom: 10px; font-size: 10px; }
h2 { font-size: 29px; font-weight: 600; margin: 0; line-height: 1.25; letter-spacing: 0; }
.heading-dot { color: var(--red); }
.theme-switcher { display: flex; border: 1px solid #ded5cb; border-radius: 8px; padding: 4px; background: #fffaf3b3; flex-shrink: 0; }
.theme-switcher button { display: flex; align-items: center; gap: 7px; min-height: 33px; padding: 0 13px; background: transparent; color: #646871; font-size: 12px; border: 0; border-radius: 5px; }
.theme-switcher button.is-active { color: #22252d; background: #efe4d8; }
.swatch { width: 10px; height: 10px; border-radius: 50%; border: 1px solid #a8adb3; }
.swatch.light { background: #fff; }
.swatch.dark { background: #222329; border-color: #222329; }
.app-preview { width: 100%; height: auto; aspect-ratio: 1920 / 1232; display: block; border-radius: 8px; border: 1px solid #ddd3c8; box-shadow: 0 24px 54px #51362718, 0 3px 9px #5136270a; }
.paper-footer { min-height: 100px; padding: 24px max(56px, calc((100% - var(--page-width)) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid #66534412; }
.footer-wordmark { font-size: 24px; font-weight: 750; }
.paper-footer nav { display: flex; gap: 24px; font-size: 12px; color: #70747c; }
.paper-footer nav a:hover { color: var(--red); }
@media (min-width: 1001px) {
  .workspace { height: calc(100svh - 100px); display: flex; align-items: center; padding-right: max(56px, calc((100% - var(--page-width)) / 2)); }
  /* Reserve the footer, section padding and heading before sizing the screenshot. */
  .workspace-inner { width: min(100%, 1024px, calc((100svh - 296px) * 1920 / 1232 * .95)); margin: auto auto auto 0; }
}
@media (min-width: 1001px) and (max-height: 720px) {
  .paper-header { height: 72px; }
  .hero-inner { height: calc(100% - 72px); padding: 16px 0 50px; }
  .hero-copy h1 { font-size: 64px; }
  .hero-copy .eyebrow { margin-bottom: 14px; }
  .hero-copy .tagline { font-size: 24px; margin-top: 14px; }
  .hero-copy .description { font-size: 14px; line-height: 1.6; margin: 16px 0 20px; }
  .hero-copy .download-link { min-height: 50px; }
  .hero-copy .release-meta { margin-top: 12px; }
}
@media (max-width: 1200px) {
  h1 { font-size: 70px; }
  .tagline { font-size: 29px; }
  .hero-copy { width: 45%; }
  .description { font-size: 15px; }
}
@media (max-width: 900px) {
  .paper-header, .hero-inner { width: calc(100% - 64px); }
  .hero-art { object-position: 54% center; }
  .hero-copy { width: 46%; }
  h1 { font-size: 58px; }
  .tagline { font-size: 25px; }
  .scroll-link { left: 32px; }
  .workspace { padding-left: 32px; padding-right: 32px; }
  .paper-footer { padding-left: 32px; padding-right: 32px; }
}
@media (max-width: 1000px) {
  .paper-hero { height: auto; min-height: 0; padding-bottom: 320px; overflow: hidden; }
  .hero-art { top: auto; bottom: 0; width: 100%; height: 350px; object-fit: cover; object-position: right bottom; mask-image: linear-gradient(to bottom, transparent, #00000080 8%, #000 18%, #000 65%, #000000f0 78%, #000000a6 87%, #00000040 94%, #0000000a 98%, transparent); }
  .paper-header { height: 80px; width: calc(100% - 40px); }
  .brand img { width: 116px; }
  .header-actions { gap: 14px; }
  .home-link span:first-child { display: none; }
  .hero-inner { width: calc(100% - 48px); height: auto; padding: 38px 0 36px; }
  .hero-copy { width: 100%; max-width: 480px; }
  .eyebrow { margin-bottom: 21px; font-size: 10px; }
  h1 { font-size: 62px; }
  .tagline { font-size: 28px; max-width: 340px; margin-top: 19px; }
  .description { font-size: 15px; margin-top: 20px; margin-bottom: 25px; }
  .download-link { min-height: 56px; }
  .release-meta { font-size: 10px; }
  .scroll-link { display: none; }
  .workspace { padding: 34px 20px 40px; }
  .workspace-heading { align-items: start; gap: 18px; flex-direction: column; margin-bottom: 20px; }
  h2 { font-size: 26px; }
  .theme-switcher { align-self: flex-end; }
  .paper-footer { padding: 24px; min-height: 100px; flex-wrap: wrap; }
  .paper-footer nav { gap: 18px; font-size: 11px; }
}
@media (max-width: 360px) {
  h1 { font-size: 54px; }
  .tagline { font-size: 25px; }
  .download-link { padding: 0 16px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .download-link { transition: none; }
}
