:root {
    color-scheme: light;
    --bg: #f6efe4;
    --bg-soft: #e8f0e9;
    --paper: #fffaf0;
    --paper-strong: #ffffff;
    --text: #273236;
    --muted: #66746f;
    --line: rgba(48, 65, 70, 0.16);
    --accent-a: #1f9fb5;
    --accent-b: #e65f3c;
    --accent-c: #d8a91f;
    --accent-d: #5f9f7a;
    --fur: #f2c48d;
    --fur-shadow: #c98255;
    --shadow: 0 24px 70px rgba(70, 82, 78, 0.16);
    --radius: 8px;
    --glow-power: 0.52;
    --motion-speed: 1;
    --typing-duration: 2400ms;
    --typing-steps: 13;
    --typing-color: #e65f3c;
    --juicy-lift: 6px;
    --juicy-shadow: 4px;
    --juicy-squish-y: 0.78;
    --juicy-hover: #15915d;
    --corner-glow-color: #6cc0e5;
    --corner-glow-size: 620px;
    --corner-glow-opacity: 0.72;
    --corner-radius: 18px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #242820;
    --bg-soft: #31372d;
    --paper: #2d3129;
    --paper-strong: #373c33;
    --text: #fff7eb;
    --muted: #d3c8b7;
    --line: rgba(255, 247, 235, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

[data-motion="reduced"] *,
[data-motion="reduced"] *::before,
[data-motion="reduced"] *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: 1ms !important;
}

[data-motion="reduced"] .cat-companion-canvas,
[data-motion="reduced"] .page-loader {
    display: none;
}

[data-motion="reduced"] .typewriter {
    width: auto;
    overflow: visible;
    color: var(--accent-b);
    -webkit-text-fill-color: currentColor;
    white-space: normal;
}

[data-motion="reduced"] .typewriter::before,
[data-motion="reduced"] .typewriter::after {
    content: none;
}

[data-motion="reduced"] .typing-demo-caret,
[data-motion="reduced"] .corner-card::before {
    display: none;
}

[data-motion="reduced"] .poster-orbit,
[data-motion="reduced"] .cat-carousel-spin {
    animation: none !important;
}

* {
    box-sizing: border-box;
}

::selection {
    background: #e65f3c;
    color: #fffaf0;
    text-shadow: none;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    position: relative;
    isolation: isolate;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(31, 159, 181, calc(0.24 * var(--glow-power))), transparent 28rem),
        radial-gradient(circle at 82% 16%, rgba(230, 95, 60, calc(0.16 * var(--glow-power))), transparent 32rem),
        radial-gradient(circle at 65% 86%, rgba(95, 159, 122, calc(0.14 * var(--glow-power))), transparent 30rem),
        linear-gradient(145deg, var(--bg), var(--bg-soft));
    color: var(--text);
    font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    content: "";
    background-image:
        linear-gradient(rgba(38, 50, 56, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(38, 50, 56, 0.055) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.76), transparent 88%);
}

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 35% 35%, rgba(31, 159, 181, 0.18), transparent 28rem),
        radial-gradient(circle at 70% 62%, rgba(230, 95, 60, 0.15), transparent 30rem),
        linear-gradient(145deg, var(--bg), var(--bg-soft));
    transition:
        opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
        visibility 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.page-loader.is-complete {
    visibility: hidden;
    opacity: 0;
}

.page-loader__content {
    display: grid;
    width: min(420px, calc(100% - 48px));
    justify-items: center;
    gap: 14px;
}

.page-loader__content p {
    margin: 0;
    color: var(--accent-b);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.page-loader__track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.68);
    box-shadow: inset 0 1px 4px rgba(39, 50, 54, 0.08);
}

.page-loader__track span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c));
    transition: width 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.page-loader__content strong {
    color: var(--text);
    font-size: 1.2rem;
}

.page-loader__cat {
    position: absolute;
    left: 50%;
    top: calc(50% - 120px);
    width: 136px;
    height: 122px;
    transform: translate(-50%, -50%);
    animation: loaderFloat 1.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.cat-sprite {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: drop-shadow(0 16px 20px rgba(39, 50, 54, 0.14));
}

.cat-sprite--hero {
    background-image: url("../images/cats_1.png");
}

.cat-sprite--loader {
    background-image: url("../images/cats_2.png");
}

[data-theme="dark"] body::before {
    background-image:
        linear-gradient(rgba(255, 247, 235, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 247, 235, 0.055) 1px, transparent 1px);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

code {
    padding: 0.08em 0.35em;
    border-radius: 5px;
    background: rgba(31, 159, 181, 0.12);
    color: var(--accent-a);
    font-size: 0.92em;
}

.cat-companion-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cat-companion-canvas.is-interactive {
    cursor: none;
}

.site-header {
    position: fixed;
    left: 50%;
    top: 18px;
    z-index: 10;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: min(1120px, calc(100% - 32px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper-strong), transparent 8%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transform: translateX(-50%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand__mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50% 50% 46% 46%;
    background: conic-gradient(from 110deg, var(--accent-a), var(--accent-b), var(--accent-c), var(--accent-a));
    color: var(--paper);
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.1;
}

.brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.72rem;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.site-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.site-nav a:hover {
    color: var(--text);
    background: rgba(31, 159, 181, 0.11);
    transform: translateY(-1px);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.motion-toggle {
    min-width: 132px;
    min-height: 40px;
    padding: 0 14px;
    white-space: nowrap;
}

.motion-toggle[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--accent-a), var(--line) 40%);
    background: color-mix(in srgb, var(--accent-a), transparent 84%);
    color: var(--text);
}

.icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.icon-button__sun,
.icon-button__sun::before {
    display: block;
    border-radius: 50%;
    content: "";
}

.icon-button__sun {
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
}

.icon-button__sun::before {
    width: 8px;
    height: 8px;
    margin: 3px;
    background: currentColor;
}

.progress-rail {
    position: fixed;
    right: 22px;
    top: 50%;
    z-index: 8;
    display: grid;
    gap: 14px;
    transform: translateY(-50%);
}

.progress-rail__dot {
    position: relative;
    width: 12px;
    height: 12px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper-strong);
    transition: transform 180ms ease, background 180ms ease;
}

.progress-rail__dot span {
    position: absolute;
    right: 20px;
    top: 50%;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--paper-strong);
    color: var(--muted);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-50%) translateX(8px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.progress-rail__dot:hover span,
.progress-rail__dot.is-active span {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.progress-rail__dot.is-active {
    background: var(--accent-a);
    transform: scale(1.35);
}

.section {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 112px 0;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
    align-items: center;
    min-height: min(100vh, 920px);
    gap: 56px;
    padding-top: 150px;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--accent-a);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 24px;
    font-size: clamp(3.2rem, 8vw, 6.9rem);
    line-height: 0.9;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 18px;
    font-size: clamp(2.1rem, 5vw, 4.2rem);
    line-height: 1;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 12px;
    font-size: 1.35rem;
    letter-spacing: 0;
}

.hero-title-line {
    display: block;
    white-space: nowrap;
}

.typewriter {
    position: relative;
    display: inline-block;
    width: max-content;
    max-width: none;
    margin-top: 18px;
    color: var(--accent-b);
    background: none;
    -webkit-text-fill-color: currentColor;
    font-size: clamp(1.25rem, 3vw, 2.35rem);
    line-height: 1.18;
    white-space: nowrap;
    opacity: 1;
    transform: none;
}

.typewriter::before,
.typewriter::after {
    position: absolute;
    left: 0;
    top: 0;
    content: "";
}

.typewriter::before {
    width: 100%;
    overflow: hidden;
    color: var(--accent-b);
    content: attr(data-text);
    white-space: nowrap;
    -webkit-text-fill-color: currentColor;
    animation: heroTyping calc(2.4s / var(--motion-speed)) steps(15) 620ms both;
}

.typewriter::after {
    width: 0.08em;
    height: 1.08em;
    background: var(--accent-b);
    animation:
        typingCaretMove calc(2.4s / var(--motion-speed)) steps(15) 620ms both,
        typingCaretBlink 720ms step-end infinite;
}

.typewriter {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero__lead,
.section-heading p,
.component-card p,
.cat-panel p {
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.8;
}

.hero__lead {
    max-width: 650px;
    overflow-wrap: anywhere;
}

.hero__actions,
.button-row,
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero__actions {
    margin-top: 32px;
}

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-strong);
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
    transform-origin: center;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.button__label {
    pointer-events: none;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(230, 95, 60, 0.16);
}

.button--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
    color: #fffaf0;
}

.button--juicy {
    min-height: 54px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.button--juicy .button__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
    color: #fffaf0;
    box-shadow: var(--juicy-shadow) var(--juicy-shadow) 0 rgba(39, 50, 54, 0.9), 0 14px 26px rgba(230, 95, 60, 0.16);
    transition:
        background 180ms ease,
        box-shadow 180ms ease,
        filter 180ms ease,
        transform 180ms cubic-bezier(0.7, -0.35, 0.27, 1.55);
}

.button--juicy:hover {
    background: transparent;
    box-shadow: none;
    filter: none;
    transform: none;
}

.button--juicy:hover .button__label {
    background: linear-gradient(135deg, var(--juicy-hover), var(--accent-b));
    box-shadow:
        var(--juicy-shadow) var(--juicy-shadow) 0 rgba(39, 50, 54, 0.9),
        0 0 0 3px rgba(255, 250, 240, 0.78) inset,
        0 18px 34px rgba(230, 95, 60, 0.2);
    filter: saturate(1.08);
    animation: juicySquish 180ms cubic-bezier(0.7, -0.35, 0.27, 1.55) both;
}

.button--juicy:active {
    transform: none;
    box-shadow: none;
}

.button--juicy:active .button__label {
    animation: none;
    box-shadow: 2px 2px 0 rgba(39, 50, 54, 0.9), 0 8px 18px rgba(230, 95, 60, 0.16);
    transform: translate(2px, 2px) scale(0.98);
}

[data-theme="dark"] .button--juicy {
    box-shadow: none;
}

[data-theme="dark"] .button--juicy .button__label {
    box-shadow: var(--juicy-shadow) var(--juicy-shadow) 0 rgba(0, 0, 0, 0.76), 0 14px 28px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .button--juicy:hover {
    box-shadow: none;
}

[data-theme="dark"] .button--juicy:hover .button__label {
    box-shadow:
        var(--juicy-shadow) var(--juicy-shadow) 0 rgba(0, 0, 0, 0.76),
        0 0 0 3px rgba(255, 247, 235, 0.5) inset,
        0 18px 34px rgba(230, 95, 60, 0.18);
}

[data-theme="dark"] .button--juicy:active .button__label {
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.76), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.button--ghost {
    background: rgba(255, 250, 240, 0.48);
}

.button--soft {
    border-color: rgba(216, 169, 31, 0.32);
    background: rgba(216, 169, 31, 0.12);
    color: color-mix(in srgb, var(--accent-c), var(--text) 34%);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 650px;
    margin-top: 30px;
}

.hero-metrics article,
.component-card,
.cat-lab,
.control-dock {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper-strong), transparent 8%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-metrics article {
    padding: 16px;
}

.hero-metrics strong,
.hero-metrics span {
    display: block;
}

.hero-metrics strong {
    color: var(--accent-b);
    font-size: 1.65rem;
    line-height: 1;
}

.hero-metrics span {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 900;
}

.hero__visual {
    display: grid;
    place-items: center;
    min-height: 430px;
}

.cat-poster {
    position: relative;
    display: grid;
    width: min(100%, 440px);
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 42% 58% 47% 53% / 52% 43% 57% 48%;
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 250, 240, 0.92), transparent 24%),
        linear-gradient(145deg, rgba(31, 159, 181, 0.14), rgba(230, 95, 60, 0.12));
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transition: transform 140ms ease;
}

.cat-poster p {
    position: absolute;
    bottom: 28px;
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.poster-orbit {
    position: absolute;
    border: 2px dashed rgba(31, 159, 181, 0.32);
    border-radius: 50%;
    animation: spin calc(22s / var(--motion-speed)) linear infinite;
}

.poster-orbit--one {
    width: 74%;
    height: 74%;
}

.poster-orbit--two {
    width: 52%;
    height: 52%;
    border-color: rgba(230, 95, 60, 0.28);
    animation-direction: reverse;
}

.cat-illustration {
    position: relative;
    width: 190px;
    height: 170px;
    transform: translateZ(34px);
}

.line-cat-preview {
    position: relative;
    display: grid;
    width: min(78%, 300px);
    aspect-ratio: 1;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: color-mix(in srgb, var(--paper), transparent 28%);
    transform: translateZ(34px);
}

.line-cat-preview .cat-sprite {
    width: 86%;
    height: 86%;
    opacity: 0.96;
}

.cat-illustration--lab {
    width: 180px;
    height: 160px;
}

.cat-ear {
    position: absolute;
    top: 0;
    width: 58px;
    height: 68px;
    background: var(--fur-shadow);
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.cat-ear--left {
    left: 28px;
    transform: rotate(-16deg);
}

.cat-ear--right {
    right: 28px;
    transform: rotate(16deg);
}

.cat-face {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 160px;
    height: 132px;
    border: 3px solid rgba(39, 50, 54, 0.12);
    border-radius: 47% 53% 44% 56% / 55% 55% 45% 45%;
    background:
        radial-gradient(circle at 32% 35%, rgba(255, 255, 255, 0.7), transparent 16%),
        linear-gradient(145deg, var(--fur), #f7dfb8);
    box-shadow: inset -18px -18px 0 rgba(201, 130, 85, 0.16);
    transform: translateX(-50%);
    animation: catBreathe calc(3.2s / var(--motion-speed)) ease-in-out infinite;
}

.cat-eye {
    position: absolute;
    top: 45px;
    width: 18px;
    height: 23px;
    border-radius: 50%;
    background: var(--text);
    animation: blink 4.8s infinite;
}

.cat-eye--left {
    left: 44px;
}

.cat-eye--right {
    right: 44px;
}

.cat-nose {
    position: absolute;
    left: 50%;
    top: 72px;
    width: 18px;
    height: 14px;
    border-radius: 50% 50% 60% 60%;
    background: var(--accent-b);
    transform: translateX(-50%);
}

.cat-mouth {
    position: absolute;
    left: 50%;
    top: 89px;
    width: 34px;
    height: 18px;
    border-bottom: 3px solid var(--text);
    border-radius: 0 0 999px 999px;
    transform: translateX(-50%);
}

.cat-whisker {
    position: absolute;
    top: 78px;
    width: 46px;
    height: 2px;
    border-radius: 999px;
    background: rgba(39, 50, 54, 0.46);
}

.cat-whisker--one {
    left: 8px;
    transform: rotate(8deg);
}

.cat-whisker--two {
    left: 7px;
    top: 92px;
    transform: rotate(-8deg);
}

.cat-whisker--three {
    right: 8px;
    transform: rotate(-8deg);
}

.cat-whisker--four {
    right: 7px;
    top: 92px;
    transform: rotate(8deg);
}

.cat-illustration.is-happy .cat-face {
    animation-duration: calc(2.1s / var(--motion-speed));
}

.cat-illustration.is-focused .cat-eye {
    transform: scaleY(0.72);
}

.cat-illustration.is-sleepy .cat-eye {
    height: 4px;
    margin-top: 10px;
    border-radius: 999px;
}

.section-heading {
    max-width: 780px;
    margin-bottom: 36px;
}

#pointer .section-heading {
    max-width: 960px;
}

#pointer .section-heading h2 {
    text-wrap: balance;
}

#pointer .section-heading p {
    max-width: 920px;
}

.feature-lab {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 20px;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper-strong), transparent 8%);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.feature-lab--wide {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.feature-demo,
.feature-control {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper-strong), transparent 8%);
}

.feature-demo {
    min-height: 430px;
    overflow: hidden;
}

.feature-control {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 24px;
}

.feature-control__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.feature-control__head .button {
    flex: 0 0 auto;
    min-width: 112px;
    white-space: nowrap;
}

.feature-control__head h3,
.feature-control__head p {
    margin-bottom: 0;
}

.feature-control label,
.control-grid label {
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-weight: 900;
}

.feature-control input[type="text"] {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper), transparent 18%);
    color: var(--text);
    font-weight: 800;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.feature-control input[type="text"]:focus {
    border-color: var(--accent-a);
    background: var(--paper-strong);
    box-shadow:
        0 0 0 4px rgba(31, 159, 181, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.feature-control input[type="color"] {
    width: 56px;
    height: 38px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper), transparent 18%);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.feature-control input[type="color"]:hover {
    transform: translateY(-1px);
}

.feature-control input[type="color"]:focus-visible {
    border-color: var(--accent-a);
    box-shadow: 0 0 0 4px rgba(31, 159, 181, 0.14);
    outline: none;
}

.feature-control input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.feature-control input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 5px;
}

.feature-control input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 5px;
}

[data-theme="dark"] .feature-control input[type="text"],
[data-theme="dark"] .feature-control input[type="color"] {
    background: rgba(255, 247, 235, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 247, 235, 0.08);
}

[data-theme="dark"] .feature-control input[type="text"]:focus {
    background: rgba(255, 247, 235, 0.09);
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.toggle-row {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.toggle-row input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-b);
}

.typing-demo-panel,
.juicy-demo-panel {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 28px;
    padding: 30px;
    background:
        radial-gradient(circle at 24% 20%, rgba(31, 159, 181, 0.14), transparent 30%),
        radial-gradient(circle at 74% 76%, rgba(230, 95, 60, 0.12), transparent 30%),
        color-mix(in srgb, var(--paper), transparent 24%);
}

.typing-preview {
    display: grid;
    min-height: 130px;
    align-items: center;
    justify-items: start;
    width: 100%;
    max-width: 100%;
    overflow: auto;
    padding: 28px;
    border: 1px dashed rgba(31, 159, 181, 0.34);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper-strong), transparent 18%);
}

.typing-demo-text {
    display: block;
    max-width: 100%;
    color: var(--typing-color);
    font-size: clamp(1.35rem, 3.3vw, 2.65rem);
    font-weight: 900;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-text-fill-color: currentColor;
}

.typing-demo-output {
    white-space: inherit;
}

.typing-demo-caret {
    display: inline-block;
    width: 0.08em;
    height: 1.08em;
    margin-left: 0.05em;
    background: var(--typing-color);
    vertical-align: -0.12em;
    animation: typingCaretBlink 720ms step-end infinite;
}

.typing-demo-text.is-caret-off .typing-demo-caret {
    display: none;
}

.typing-demo-text.is-replaying .typing-demo-caret {
    animation: none;
}

.juicy-demo-panel {
    justify-items: center;
}

.juicy-demo-panel .button--juicy {
    width: min(260px, 100%);
}

.juicy-demo-panel .button__label {
    width: 100%;
    min-height: 62px;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
}

.glowing-demo-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-content: center;
    padding: 28px;
    background:
        radial-gradient(circle at 18% 22%, rgba(31, 159, 181, 0.12), transparent 28%),
        radial-gradient(circle at 82% 78%, rgba(230, 95, 60, 0.1), transparent 28%),
        color-mix(in srgb, var(--paper), transparent 24%);
}

.corner-card {
    position: relative;
    min-height: 310px;
    overflow: hidden;
    padding: 24px;
    border-radius: var(--corner-radius);
    background: #2d2d2d;
    color: #fffaf0;
    cursor: pointer;
    isolation: isolate;
}

.corner-card::before {
    position: absolute;
    left: var(--x, 50%);
    top: var(--y, 50%);
    z-index: -2;
    width: var(--corner-glow-size);
    height: var(--corner-glow-size);
    border-radius: 50%;
    background: radial-gradient(circle, var(--corner-color, var(--corner-glow-color)), transparent 60%);
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 220ms ease;
}

.corner-card::after {
    position: absolute;
    inset: 2px;
    z-index: -1;
    border-radius: calc(var(--corner-radius) - 2px);
    background: rgba(45, 45, 45, 0.76);
    content: "";
    pointer-events: none;
}

.corner-card:hover::before {
    opacity: var(--corner-glow-opacity);
}

.corner-card span {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 88px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--corner-color, var(--corner-glow-color)), #ffffff 14%);
    color: #1f2628;
    font-weight: 900;
}

.corner-card h3,
.corner-card p {
    position: relative;
    z-index: 1;
}

.corner-card p {
    color: rgba(255, 250, 240, 0.72);
    line-height: 1.65;
}

.cat-lab,
.companion-lab {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 20px;
    padding: 16px;
}

.companion-stage {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 48%, rgba(230, 95, 60, 0.13), transparent 22%),
        radial-gradient(circle at 24% 26%, rgba(31, 159, 181, 0.15), transparent 28%),
        radial-gradient(circle at 76% 74%, rgba(216, 169, 31, 0.16), transparent 26%),
        rgba(255, 250, 240, 0.42);
}

[data-theme="dark"] .companion-stage {
    border-color: rgba(255, 247, 235, 0.14);
    background:
        radial-gradient(circle at 50% 48%, rgba(230, 95, 60, 0.2), transparent 24%),
        radial-gradient(circle at 24% 26%, rgba(31, 159, 181, 0.18), transparent 30%),
        radial-gradient(circle at 76% 74%, rgba(216, 169, 31, 0.12), transparent 28%),
        linear-gradient(145deg, rgba(43, 49, 40, 0.92), rgba(30, 35, 29, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 247, 235, 0.08);
}

.companion-stage__target {
    position: absolute;
    left: 50%;
    top: 48%;
    width: 260px;
    height: 260px;
    border: 2px dashed rgba(31, 159, 181, 0.34);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin calc(28s / var(--motion-speed)) linear infinite;
}

[data-theme="dark"] .companion-stage__target {
    border-color: rgba(31, 159, 181, 0.52);
}

.companion-stage__target::before,
.companion-stage__target::after {
    position: absolute;
    border-radius: 50%;
    content: "";
}

.companion-stage__target::before {
    inset: 46px;
    border: 1px solid rgba(230, 95, 60, 0.3);
}

.companion-stage__target::after {
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    background: var(--accent-b);
    box-shadow: 0 0 0 10px rgba(230, 95, 60, 0.14);
    transform: translate(-50%, -50%);
    animation: pingPulse 1.8s ease-out infinite;
}

[data-theme="dark"] .companion-stage__target::before {
    border-color: rgba(230, 95, 60, 0.4);
}

[data-theme="dark"] .companion-stage__target::after {
    box-shadow: 0 0 0 10px rgba(230, 95, 60, 0.18), 0 0 34px rgba(230, 95, 60, 0.34);
}

.companion-stage__copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
    padding: 30px;
}

.companion-stage__copy h3 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1;
}

[data-theme="dark"] .companion-stage__copy h3,
[data-theme="dark"] .companion-stage__copy p:not(.component-card__label) {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.24);
}

.logic-stack {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 1;
    display: grid;
    width: min(330px, calc(100% - 44px));
    gap: 10px;
}

.logic-stack article {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper-strong), transparent 12%);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .logic-stack article {
    border-color: rgba(255, 247, 235, 0.12);
    background: rgba(27, 32, 26, 0.82);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.logic-stack span {
    grid-row: span 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
    color: #fffaf0;
    font-size: 0.8rem;
    font-weight: 900;
}

.logic-stack strong,
.logic-stack p {
    margin: 0;
}

.logic-stack strong {
    font-size: 0.92rem;
}

.logic-stack p {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.cat-lab__stage {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 52%, rgba(255, 250, 240, 0.94), transparent 24%),
        radial-gradient(circle at 18% 22%, rgba(230, 95, 60, 0.12), transparent 24%),
        radial-gradient(circle at 78% 82%, rgba(31, 159, 181, 0.13), transparent 26%),
        rgba(255, 250, 240, 0.42);
}

.comfort-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 260px;
    height: 260px;
    border: 2px dashed rgba(31, 159, 181, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin calc(28s / var(--motion-speed)) linear infinite;
}

.cat-zone {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
}

.cat-zone__hint {
    margin: 176px 0 0;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-strong);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.toy-node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    display: grid;
    width: 106px;
    height: 106px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: grab;
    touch-action: none;
    transform: translate(-50%, -50%);
}

.toy-node:active {
    cursor: grabbing;
}

.toy-node__icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border: 2px solid color-mix(in srgb, var(--tone), var(--text) 16%);
    border-radius: 34% 66% 47% 53% / 52% 42% 58% 48%;
    background:
        radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.84), transparent 20%),
        color-mix(in srgb, var(--tone), var(--paper) 62%);
    box-shadow: 0 16px 34px color-mix(in srgb, var(--tone), transparent 76%);
    font-size: 0.82rem;
    font-weight: 900;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.toy-node__label {
    margin-top: 72px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-strong);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.toy-node:hover .toy-node__icon,
.toy-node.is-active .toy-node__icon {
    transform: scale(1.14) rotate(-4deg);
}

.toy-node.is-near .toy-node__icon {
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--tone), transparent 82%), 0 18px 38px color-mix(in srgb, var(--tone), transparent 64%);
}

.cat-panel {
    display: flex;
    min-height: 580px;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-strong);
}

.feature-control.cat-panel {
    min-height: auto;
    justify-content: center;
}

.cat-panel__kicker {
    color: var(--accent-b);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.comfort-meter {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin: 24px 0;
    color: var(--muted);
    font-weight: 900;
}

.comfort-meter__bar {
    grid-column: 1 / -1;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(38, 50, 56, 0.08);
}

.comfort-meter__bar i {
    display: block;
    width: var(--comfort, 68%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c));
    transition: width 260ms ease;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 26px;
    list-style: none;
}

.tag-list li,
.chip {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.42);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.chip--warm {
    border-color: rgba(230, 95, 60, 0.28);
    color: var(--accent-b);
}

.chip--blue {
    border-color: rgba(31, 159, 181, 0.3);
    color: var(--accent-a);
}

.chip--green {
    border-color: rgba(95, 159, 122, 0.34);
    color: var(--accent-d);
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.component-card {
    padding: 24px;
}

.component-card--wide {
    grid-column: span 3;
}

.component-card__label {
    margin-bottom: 18px;
    color: var(--accent-a);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.mini-form {
    display: grid;
    gap: 14px;
}

.mini-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 900;
}

.mini-form input,
.mini-form select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--text);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.mini-form input:focus,
.mini-form select:focus {
    border-color: var(--accent-a);
    box-shadow: 0 0 0 4px rgba(31, 159, 181, 0.13);
}

.toast-demo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(95, 159, 122, 0.26);
    border-radius: var(--radius);
    background: rgba(95, 159, 122, 0.12);
}

.toast-demo img {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 250, 240, 0.82);
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--paper-strong);
    box-shadow: 0 14px 26px rgba(39, 50, 54, 0.12);
}

.toast-demo p {
    margin: 4px 0 0;
}

.toast-demo__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-d);
    box-shadow: 0 0 0 8px rgba(95, 159, 122, 0.16);
    animation: pingPulse 1.8s ease-out infinite;
}

.cat-carousel-stage {
    position: relative;
    display: grid;
    min-height: 560px;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 56%, rgba(39, 50, 54, 0.18), transparent 36%),
        radial-gradient(circle at 28% 28%, rgba(31, 159, 181, 0.16), transparent 30%),
        radial-gradient(circle at 76% 72%, rgba(230, 95, 60, 0.13), transparent 30%),
        color-mix(in srgb, var(--paper), transparent 30%);
    cursor: grab;
    perspective: 1000px;
    touch-action: none;
}

.cat-carousel-stage:active {
    cursor: grabbing;
}

.cat-carousel-drag,
.cat-carousel-spin {
    position: relative;
    display: flex;
    margin: auto;
    transform-style: preserve-3d;
}

.cat-carousel-drag {
    transform: rotateX(-10deg);
}

.cat-carousel-spin {
    width: 150px;
    height: 190px;
}

.cat-carousel-spin img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 250, 240, 0.76);
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--paper-strong);
    box-shadow: 0 18px 34px rgba(39, 50, 54, 0.22);
    transform-style: preserve-3d;
    -webkit-box-reflect: below 10px linear-gradient(transparent, transparent, rgba(0, 0, 0, 0.2));
    transition: box-shadow 180ms ease, filter 180ms ease;
}

.cat-carousel-spin img:hover {
    box-shadow: 0 0 22px rgba(230, 95, 60, 0.38), 0 22px 42px rgba(39, 50, 54, 0.22);
    filter: saturate(1.08);
}

.cat-carousel-spin p {
    position: absolute;
    top: 100%;
    left: 50%;
    width: max-content;
    max-width: 260px;
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 14px rgba(255, 250, 240, 0.7);
    transform: translate(-50%, -50%) rotateX(90deg);
}

.cat-carousel-ground {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(39, 50, 54, 0.22), rgba(31, 159, 181, 0.1) 28%, transparent 62%);
    transform: translate(-50%, -50%) rotateX(90deg);
}

.control-dock {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding: 22px;
}

.control-dock .button {
    width: 100%;
    min-height: 52px;
}

.control-dock .button--juicy {
    min-height: 52px;
}

.control-dock .button--juicy .button__label {
    width: 100%;
    min-height: 52px;
}

.control-dock label {
    display: grid;
    gap: 12px;
    color: var(--muted);
    font-weight: 900;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent-b);
}

input[type="range"]:focus-visible {
    outline: 3px solid rgba(31, 159, 181, 0.28);
    outline-offset: 4px;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    justify-content: space-between;
    gap: 20px;
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 54px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer__main,
.site-footer__meta {
    display: grid;
    gap: 8px;
}

.site-footer__main strong {
    color: var(--text);
    font-size: 0.98rem;
}

.site-footer span {
    color: var(--muted);
}

.site-footer__meta {
    justify-items: end;
    font-weight: 800;
}

.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.detail-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.detail-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 19, 0.62);
    backdrop-filter: blur(10px);
}

.detail-modal__panel {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(760px, calc(100vh - 48px));
    overflow: auto;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-strong);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.detail-modal__close {
    position: absolute;
    right: 18px;
    top: 18px;
}

.detail-modal__close span {
    font-size: 1.45rem;
    line-height: 1;
}

.detail-modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.detail-modal__grid article {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--paper), transparent 20%);
}

.detail-modal ul {
    display: grid;
    gap: 10px;
    padding-left: 1.2rem;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.detail-modal__code-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.detail-modal pre {
    margin: 0;
    overflow-x: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #273236;
    color: #fffaf0;
}

.detail-modal code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.detail-modal__source {
    margin-top: 18px;
}

.detail-modal__source[hidden] {
    display: none;
}

.reveal {
    opacity: 0;
    transform: translateY(38px);
    transition: opacity 760ms ease, transform 760ms cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.is-visible,
.hero .reveal,
.section:target .reveal {
    opacity: 1;
    transform: translateY(0);
}

@keyframes softPop {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes loaderFloat {
    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

@keyframes loaderBlink {
    0%,
    88%,
    100% {
        transform: scaleY(1);
    }
    94% {
        transform: scaleY(0.08);
    }
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.poster-orbit {
    animation-name: posterSpin;
}

@keyframes posterSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes catBreathe {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-6px);
    }
}

@keyframes heroTyping {
    from {
        width: 0;
    }
}

@keyframes juicySquish {
    0% {
        transform: translateY(calc(var(--juicy-lift) * -1)) scale(1.08, var(--juicy-squish-y)) rotate(-4deg);
    }
    62% {
        transform: translateY(calc(var(--juicy-lift) * -1)) scale(0.97, 1.05) rotate(2deg);
    }
    100% {
        transform: translateY(calc(var(--juicy-lift) * -1)) scale(1) rotate(-3deg);
    }
}

@keyframes typingCaretMove {
    to {
        left: 100%;
    }
}

@keyframes typingCaretBlink {
    50% {
        opacity: 0;
    }
}

@keyframes blink {
    0%,
    92%,
    100% {
        transform: scaleY(1);
    }
    96% {
        transform: scaleY(0.08);
    }
}

@keyframes tailSway {
    0%,
    100% {
        transform: rotate(-8deg);
    }
    50% {
        transform: rotate(12deg);
    }
}

@keyframes pingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(95, 159, 122, 0.28);
    }
    100% {
        box-shadow: 0 0 0 14px rgba(95, 159, 122, 0);
    }
}

@keyframes carouselSpin {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

@keyframes carouselSpinRevert {
    from {
        transform: rotateY(360deg);
    }
    to {
        transform: rotateY(0deg);
    }
}

@media (max-width: 920px) {
    .site-header {
        grid-template-columns: 1fr auto;
        border-radius: var(--radius);
    }

    .site-nav,
    .progress-rail {
        display: none;
    }

    .hero,
    .feature-lab,
    .feature-lab--wide,
    .cat-lab,
    .companion-lab,
    .component-grid,
    .hero-metrics,
    .control-dock {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding-top: 140px;
    }

    .component-card--wide {
        grid-column: auto;
    }

    .cat-lab__stage,
    .companion-stage,
    .cat-carousel-stage,
    .cat-panel {
        min-height: 500px;
    }

    .feature-demo {
        min-height: 440px;
    }
}

@media (max-width: 620px) {
    .site-header {
        width: min(100% - 20px, 1120px);
        gap: 8px;
    }

    .motion-toggle {
        width: 42px;
        min-width: 42px;
        padding: 0;
        font-size: 0;
    }

    .motion-toggle::before {
        content: "動";
        font-size: 0.86rem;
    }

    .section {
        width: min(100% - 34px, 1120px);
        padding: 82px 0;
    }

    .brand small {
        display: none;
    }

    h1 {
        font-size: clamp(2.8rem, 15vw, 4.1rem);
    }

    .typewriter {
        width: auto;
        white-space: normal;
        animation: none;
        color: var(--accent-b);
        -webkit-text-fill-color: currentColor;
    }

    .typewriter::before,
    .typewriter::after {
        content: none;
    }

    .feature-lab {
        padding: 10px;
    }

    .glowing-demo-panel {
        grid-template-columns: 1fr;
    }

    .corner-card {
        min-height: 230px;
    }

    .corner-card span {
        margin-bottom: 46px;
    }

    .feature-demo {
        min-height: 360px;
    }

    .feature-control__head,
    .detail-modal__grid,
    .control-grid {
        grid-template-columns: 1fr;
    }

    .feature-control__head {
        display: grid;
    }

    .typing-demo-text {
        font-size: clamp(1.35rem, 8vw, 2.3rem);
        white-space: normal;
        color: var(--typing-color);
        -webkit-text-fill-color: currentColor;
    }

    .cat-poster {
        width: min(100%, 330px);
    }

    .cat-lab,
    .companion-lab {
        padding: 10px;
    }

    .cat-lab__stage,
    .companion-stage,
    .cat-carousel-stage,
    .cat-panel {
        min-height: 430px;
    }

    .cat-carousel-spin {
        width: 112px;
        height: 146px;
    }

    .companion-stage__copy {
        padding: 22px;
    }

    .logic-stack {
        position: relative;
        right: auto;
        bottom: auto;
        width: auto;
        margin: 140px 14px 14px;
    }

    .cat-illustration--lab {
        transform: scale(0.82);
    }

    .toy-node {
        width: 82px;
        height: 82px;
    }

    .toy-node__icon {
        width: 52px;
        height: 52px;
        font-size: 0.72rem;
    }

    .toy-node__label {
        margin-top: 60px;
        font-size: 0.68rem;
    }

    .toast-demo {
        align-items: flex-start;
    }

    .toast-demo img {
        width: 58px;
        height: 58px;
    }

    .site-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .site-footer__meta {
        justify-items: start;
    }

    .detail-modal {
        padding: 14px;
    }

    .detail-modal__panel {
        padding: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }

    .cat-companion-canvas,
    .page-loader {
        display: none;
    }

    .typewriter {
        width: auto;
        overflow: visible;
        color: var(--accent-b);
        -webkit-text-fill-color: currentColor;
        white-space: normal;
    }

    .typewriter::before,
    .typewriter::after {
        content: none;
    }

    .typing-demo-text {
        color: var(--typing-color);
        -webkit-text-fill-color: currentColor;
    }
}
