@charset "UTF-8";

:root {
  color-scheme: light;
  --ink: #24213f;
  --ink-2: #34305c;
  --steel: #6857e5;
  --steel-2: #8174ef;
  --cyan: #12a7a5;
  --cyan-soft: #dcf7f6;
  --rose: #e11d48;
  --paper: #f7f7fb;
  --paper-2: #efeff7;
  --surface: #ffffff;
  --surface-alpha: rgb(255 255 255 / .86);
  --text: #242436;
  --muted: #6c6b7f;
  --line: #dedfea;
  --line-strong: #c6c7d8;
  --code: #121222;
  --code-text: #dcecf5;
  --shadow-sm: 0 8px 24px rgb(36 33 63 / .08);
  --shadow-md: 0 18px 46px rgb(36 33 63 / .12);
  --shadow-lg: 0 30px 80px rgb(36 33 63 / .18);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --header-height: 76px;
  --shell: min(1440px, calc(100% - 40px));
}

html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c0c17;
  --paper-2: #151527;
  --surface: #1d1d34;
  --surface-alpha: rgb(29 29 52 / .88);
  --text: #edf5f9;
  --muted: #a5b6c3;
  --line: #383855;
  --line-strong: #4a496a;
  --code: #090914;
  --code-text: #ecebff;
  --cyan-soft: #103a3b;
  --shadow-sm: 0 8px 24px rgb(0 0 0 / .22);
  --shadow-md: 0 18px 46px rgb(0 0 0 / .30);
  --shadow-lg: 0 30px 80px rgb(0 0 0 / .42);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  scrollbar-gutter: stable;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 2%, rgb(18 167 165 / .12), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgb(104 87 229 / .12), transparent 27rem),
    var(--paper);
  font-family: Inter, "Noto Sans JP", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: clip;
}

body.motion-paused *, body.motion-paused *::before, body.motion-paused *::after,
.demo-paused *, .demo-paused *::before, .demo-paused *::after {
  animation-play-state: paused !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img, svg { max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid rgb(18 167 165 / .5);
  outline-offset: 3px;
}

::selection { color: #fff; background: var(--steel); }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  padding: .7rem 1rem;
  color: #fff;
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-150%);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.section-shell { width: var(--shell); margin-inline: auto; }

.site-scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  height: 3px;
  background: linear-gradient(90deg, var(--steel), var(--cyan), #7c3aed);
  transform: scaleX(var(--site-scroll, 0));
  transform-origin: left;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 12px clamp(16px, 4vw, 64px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 44px;
  flex: 0 0 auto;
}
.brand-mark i {
  position: absolute;
  bottom: 4px;
  width: 11px;
  border-radius: 2px 2px 1px 1px;
  transform: skewY(-28deg);
}
.brand-mark i:nth-child(1) { left: 3px; height: 33px; background: var(--ink); }
.brand-mark i:nth-child(2) { left: 18px; height: 38px; background: var(--steel-2); }
.brand-mark i:nth-child(3) { left: 33px; height: 31px; background: #555; }
.brand-mark b {
  position: absolute;
  left: -1px;
  top: 21px;
  width: 52px;
  height: 14px;
  border-top: 4px solid #e8e5f2;
  border-radius: 50%;
  transform: rotate(-6deg);
  filter: drop-shadow(0 2px 0 var(--steel));
}

.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 1.02rem; letter-spacing: .04em; white-space: nowrap; }
.brand-copy em { color: var(--cyan); font-style: normal; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; }

.desktop-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 4px;
}
.desktop-nav a {
  padding: .65rem .8rem;
  color: var(--muted);
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.desktop-nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--steel) 9%, transparent); }
html[data-theme="dark"] .desktop-nav a:hover { color: #fff; }
.desktop-nav .return-link { margin-left: 8px; color: #fff; background: var(--ink); }
.desktop-nav .return-link:hover { color: #fff; background: var(--steel); }

.header-tools { display: flex; gap: 6px; }
.icon-button {
  min-width: 54px;
  min-height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  padding: 4px 8px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
}
.icon-button:hover, .icon-button[aria-pressed="true"] { color: var(--ink); background: var(--surface); border-color: var(--line); }
html[data-theme="dark"] .icon-button:hover, html[data-theme="dark"] .icon-button[aria-pressed="true"] { color: #fff; }
.tool-icon { font-weight: 900; line-height: 1; }
.tool-label { font-size: .64rem; }

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding-block: clamp(64px, 9vw, 130px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--steel-2);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .18em;
}
.eyebrow span { width: 34px; height: 2px; background: var(--cyan); }

.hero h1 {
  margin: 0;
  font-size: clamp(3.3rem, 7.7vw, 7.6rem);
  line-height: 1.02;
  letter-spacing: -.065em;
  overflow: visible;
}
.hero-line {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}
.hero-line-motion {
  font-size: .62em;
  letter-spacing: -.08em;
}
.hero-line-atlas { width: 100%; font-size: .86em; line-height: 1.08; padding: .04em .12em .16em .015em; overflow: visible; }

.hero h1 strong {
  display: block;
  color: transparent;
  background: linear-gradient(95deg, var(--ink), var(--steel-2), var(--cyan));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
html[data-theme="dark"] .hero h1 strong { background-image: linear-gradient(95deg, #eaf5fa, #86bdd9, #35c6e8); }

.hero-lead {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.primary-action, .secondary-action {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 850;
  text-decoration: none;
  transition: transform .22s, box-shadow .22s, background .22s;
}
.primary-action { color: #fff; background: linear-gradient(135deg, var(--ink), var(--steel)); box-shadow: 0 14px 28px rgb(36 33 63 / .22); }
.primary-action:hover { transform: translateY(-3px); box-shadow: 0 20px 36px rgb(36 33 63 / .3); }
.secondary-action { background: var(--surface-alpha); border: 1px solid var(--line); }
.secondary-action:hover { transform: translateY(-2px); background: var(--surface); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin: 34px 0 0;
}
.hero-stats div { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 8px; }
.hero-stats dt { color: var(--ink); font-size: 2rem; font-weight: 950; line-height: 1; }
html[data-theme="dark"] .hero-stats dt { color: #fff; }
.hero-stats dd { margin: 0; color: var(--muted); font-size: .78rem; font-weight: 750; }
.hero-note { max-width: 680px; margin: 18px 0 0; color: var(--muted); font-size: .78rem; }

.hero-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(rgb(104 87 229 / .12) 1px, transparent 1px), linear-gradient(90deg, rgb(104 87 229 / .12) 1px, transparent 1px);
  background-size: 34px 34px;
  border-radius: 50%;
  mask-image: radial-gradient(circle, black 28%, transparent 72%);
}
.hero-orbit { position: absolute !important; width: 360px !important; border-color: rgb(104 87 229 / .3) !important; }
.hero-orbit::before, .hero-orbit::after {
  content: "";
  position: absolute;
  inset: 48px;
  border: 1px dashed rgb(18 167 165 / .28);
  border-radius: 50%;
}
.hero-orbit::after { inset: 92px; border-style: solid; }
.hero-center {
  width: 190px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  color: #fff;
  background: linear-gradient(145deg, var(--ink), var(--steel));
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 50%;
  box-shadow: 0 30px 70px rgb(36 33 63 / .28), inset 0 1px 0 rgb(255 255 255 / .2);
}
.hero-center span { font-size: 3.2rem; font-weight: 950; letter-spacing: -.08em; line-height: .9; }
.hero-center b { margin-top: 8px; color: #a8e6f3; font-size: .72rem; letter-spacing: .24em; }
.code-card {
  position: absolute;
  min-width: 180px;
  padding: 18px 20px;
  color: var(--text);
  background: var(--surface-alpha);
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}
.code-card code { display: block; color: var(--cyan); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92rem; font-weight: 850; }
.code-card b { display: block; margin-top: 5px; font-size: .76rem; }
.code-card-a { top: 30px; left: 0; }
.code-card-b { top: 190px; right: -6px; animation-delay: .45s !important; }
.code-card-c { bottom: 32px; left: 45px; animation-delay: .8s !important; }

.guide { padding-block: 40px 120px; }
.section-heading { max-width: 760px; }
.section-heading h2 { margin: 0; font-size: clamp(2.25rem, 5vw, 4.8rem); line-height: 1; letter-spacing: -.06em; }
.section-heading > p:last-child { margin: 20px 0 0; color: var(--muted); }

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
}
.guide-steps li {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  background: var(--surface-alpha);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.guide-steps li > span { color: var(--cyan); font-family: ui-monospace, monospace; font-weight: 900; letter-spacing: .12em; }
.guide-steps h3 { margin: 34px 0 7px; font-size: 1.25rem; }
.guide-steps p { margin: 0; color: var(--muted); font-size: .9rem; }
.guide-steps code { padding: .12em .35em; color: var(--steel); background: color-mix(in srgb, var(--steel) 10%, transparent); border-radius: 5px; }

.anatomy-panel {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 28px;
  margin-top: 22px;
  padding: clamp(26px, 4vw, 52px);
  color: #fff;
  background: linear-gradient(135deg, var(--ink), #3b3569 62%, #0b7f80);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.panel-kicker { margin: 0 0 8px; color: #8bd8e8; font-size: .72rem; font-weight: 900; letter-spacing: .16em; }
.anatomy-copy h3 { margin: 0; font-size: 2rem; }
.anatomy-copy p:not(.panel-kicker) { color: #cfccdd; }
.anatomy-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.anatomy-legend span { display: inline-flex; align-items: center; gap: 7px; color: #e5e2f0; font-size: .78rem; }
.anatomy-legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend-name { background: #67e8f9; }.legend-time { background: #fbbf24; }.legend-ease { background: #c4b5fd; }.legend-fill { background: #f9a8d4; }

.mini-code { position: relative; min-width: 0; }
.mini-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: .45rem .7rem;
  color: #dbeafe;
  background: rgb(255 255 255 / .1);
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 8px;
  cursor: pointer;
}
.mini-code pre { height: 100%; min-height: 210px; margin: 0; padding: 34px 24px 24px; overflow: auto; color: var(--code-text); background: var(--code); border: 1px solid rgb(255 255 255 / .08); border-radius: 18px; font: .88rem/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-selector { color: #93c5fd; }.code-name { color: #67e8f9; }.code-time { color: #fbbf24; }.code-ease { color: #c4b5fd; }.code-fill { color: #f9a8d4; }

.reduced-motion-panel {
  margin-top: 22px;
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.reduced-motion-panel summary { padding: 20px 24px; color: var(--text); background: color-mix(in srgb, var(--steel) 5%, var(--surface)); cursor: pointer; font-weight: 850; line-height: 1.6; }
.reduced-motion-panel summary::marker { color: var(--steel); }
.reduced-motion-panel summary span { display: inline-block; margin-right: 10px; padding: .24rem .62rem; color: #3f35aa; background: #eeecff; border: 1px solid #c8c2fa; border-radius: 999px; font-size: .74rem; }
.reduced-motion-panel > div { display: grid; grid-template-columns: .7fr 1.3fr; gap: 24px; padding: 0 24px 24px; }
.reduced-motion-panel p { color: var(--text); font-size: .92rem; }
.reduced-motion-panel .mini-code pre { min-height: 180px; }
html[data-theme="dark"] .reduced-motion-panel summary { background: #292a3e; }
html[data-theme="dark"] .reduced-motion-panel summary span { color: #f0eeff; background: #34305c; border-color: #6259a6; }

.catalog-section { padding-bottom: 120px; }
.catalog-heading { padding-block: 40px; }
.explorer-wrap {
  position: sticky;
  top: var(--header-height);
  z-index: 60;
  padding: 12px 0;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border-block: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  backdrop-filter: blur(18px);
}
.explorer { display: grid; gap: 12px; min-width: 0; }
.explorer > *, .filter-row, .category-scroll, .advanced-filters, .advanced-filters label, .search-box {
  min-width: 0;
  max-width: 100%;
}
.filter-row { overflow: hidden; }
.search-box {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}
.search-box > span { color: var(--steel); font-size: 1.7rem; line-height: 1; transform: rotate(-15deg); }
.search-box input { min-width: 0; color: var(--text); background: transparent; border: 0; outline: 0; }
.search-box input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
kbd { padding: .15rem .45rem; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; font: .72rem ui-monospace, monospace; }

.category-scroll { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; }
.category-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
}
.category-button span { min-width: 22px; padding: 0 5px; color: var(--steel); background: var(--paper-2); border-radius: 999px; font-size: .68rem; }
.category-button:hover, .category-button[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.category-button[aria-pressed="true"] span { color: var(--ink); background: #fff; }

.advanced-filters { display: grid; grid-template-columns: repeat(4, minmax(125px, 1fr)) auto auto; gap: 9px; align-items: end; }
.advanced-filters label { display: grid; gap: 3px; color: var(--muted); font-size: .67rem; font-weight: 800; }
.advanced-filters select, .filter-toggle, .filter-reset {
  min-height: 42px;
  padding: 0 11px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 750;
}
.filter-toggle[aria-pressed="true"] { color: #fff; background: var(--steel); border-color: var(--steel); }
.filter-toggle span { font-size: 1rem; }
.filter-reset { color: var(--muted); background: transparent; }
.filter-reset:hover { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 35%, var(--line)); }
.result-line { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .77rem; }
.result-line p { margin: 0; }
.result-line strong { color: var(--text); font-size: 1rem; }

.catalog-results {
  --catalog-results-min-height: clamp(360px, 70vh, 680px);
  padding-top: 34px;
  padding-bottom: 140px;
}
.animation-grid { min-height: var(--catalog-results-min-height); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 20px; }
.animation-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-alpha);
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.animation-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 16px 0; }
.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; color: #535b6b; background: #f1f3f7; border: 1px solid #d9dee8; border-radius: 999px; font-size: .64rem; font-weight: 800; }
.badge-category { color: #4b458f; background: #f0efff; border-color: #d9d5f7; }
html[data-theme="dark"] .badge { color: #cbd0dc; background: #292d3d; border-color: #44495c; }
html[data-theme="dark"] .badge-category { color: #d8d4ff; background: #312f52; border-color: #504b7c; }
.badge-modern { color: #6d28d9; background: #ede9fe; border-color: transparent; }
html[data-theme="dark"] .badge-modern { color: #ddd6fe; background: #3b2a65; }
.demo-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin: 12px 14px 0;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.demo-stage {
  position: relative;
  grid-column: 1 / -1;
  min-height: 215px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 26px;
  color: #17233c;
  background-color: #f4f7fb;
  background-image: linear-gradient(rgb(104 87 229 / .09) 1px, transparent 1px), linear-gradient(90deg, rgb(104 87 229 / .09) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.demo-stage,
.dialog-preview-stage {
  --paper: #f7f7fb;
  --paper-2: #eef2f7;
  --surface: #ffffff;
  --surface-alpha: rgb(255 255 255 / .9);
  --text: #17233c;
  --muted: #566579;
  --line: #c9d3df;
  --line-strong: #9eafc0;
  --steel: #5143c5;
  --steel-2: #6857e5;
  --cyan: #087f82;
  --cyan-soft: #d9f3f2;
  color: #17233c;
}
.demo-stage::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at center, color-mix(in srgb, var(--surface) 92%, transparent), transparent 75%); }
.demo-stage > * { max-width: 100%; }
.demo-replay {
  position: static;
  justify-self: end;
  z-index: 10;
  min-height: 34px;
  margin: 8px 9px 8px 4px;
  padding: 0 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}
.demo-replay:hover { color: var(--ink); }
.demo-replay[aria-pressed="true"] { color: #fff; background: var(--steel); border-color: var(--steel); }
.demo-hint {
  position: static;
  min-width: 0;
  max-width: none;
  margin: 8px 4px 8px 10px;
  padding: .34rem .45rem;
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: .67rem;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.demo-box {
  min-width: 148px;
  min-height: 78px;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--ink), var(--steel-2));
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgb(36 33 63 / .22);
  text-align: center;
  font-size: .83rem;
  font-weight: 900;
}
.demo-coin { width: 88px; aspect-ratio: 1; display: grid; place-items: center; color: #6b4300; background: radial-gradient(circle at 32% 28%, #fff1a8, #f4b63b 62%, #b8750d); border: 6px solid #f6c65d; border-radius: 50%; box-shadow: inset 0 0 0 3px rgb(255 255 255 / .28), 0 14px 25px rgb(140 87 6 / .22); font-weight: 950; }
.demo-text { color: var(--ink); font-size: 1.3rem; font-weight: 950; letter-spacing: .03em; }
.demo-text--large { font-size: clamp(1.8rem, 4vw, 3.1rem); line-height: 1.1; }
.demo-link { color: var(--steel); font-size: 1.15rem; font-weight: 900; }
.demo-stage figure { width: min(330px, 100%); margin: 0; }
.demo-stage img { max-height: 180px; object-fit: cover; border-radius: 14px; }
.demo-stage article[class*="is-card-"] { width: min(270px, 100%); }
.demo-stage article[class*="is-card-"] h3 { margin: 0; }
.demo-stage article[class*="is-card-"] p { margin: 5px 0 0; color: #6c6b7f; font-size: .78rem; }
.demo-stage .is-background-gradient, .demo-stage .is-background-stripes, .demo-stage .is-background-grid, .demo-stage .is-background-dots, .demo-stage .is-background-bubbles, .demo-stage .is-background-shimmer { width: min(330px, 100%); min-height: 170px; border-radius: 15px; overflow: hidden; }
.demo-stage .is-border-conic, .demo-stage .is-border-dashed, .demo-stage .is-border-glow { width: min(300px, 100%); }
.demo-stage .is-ui-bell { font-size: 55px; }
.demo-stage .is-filter-shadow-pulse { line-height: 1; }
.demo-stage .is-scroll-progress { position: absolute !important; inset: 28px 28px auto !important; width: calc(100% - 56px); border-radius: 99px; }
.demo-stage .is-ui-dropdown nav { z-index: 20; }
.demo-stage .is-typewriter { font-size: .95rem; }
.demo-stage button, .demo-stage summary, .demo-stage label, .demo-stage a { touch-action: manipulation; }

.card-body { display: flex; flex: 1; flex-direction: column; padding: 17px 17px 18px; }
.card-index { color: var(--steel-2); font: .68rem ui-monospace, monospace; letter-spacing: .12em; }
.card-body h3 { margin: 4px 0 0; font-size: 1.14rem; line-height: 1.35; letter-spacing: -.025em; }
.card-description { min-height: 3.3em; margin: 7px 0 0; color: var(--muted); font-size: .79rem; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.card-meta span { padding: .22rem .5rem; color: var(--muted); background: var(--paper-2); border-radius: 7px; font-size: .62rem; }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: auto; padding-top: 18px; }
.card-actions button { min-height: 42px; padding: 0 13px; border-radius: 10px; cursor: pointer; font-size: .75rem; font-weight: 850; }
.detail-button { color: #fff; background: var(--ink); border: 1px solid var(--ink); }
.detail-button:hover { background: var(--steel); border-color: var(--steel); }
.quick-copy { color: var(--steel); background: transparent; border: 1px solid var(--line-strong); }
.quick-copy:hover { background: var(--cyan-soft); }

.catalog-results > .empty-state { min-height: var(--catalog-results-min-height); margin-top: calc(-1 * var(--catalog-results-min-height)); display: grid; place-content: center; }
.catalog-results > .empty-state[hidden] { display: none; }
.empty-state { padding: 80px 20px; text-align: center; }
.empty-state > span { display: block; color: var(--steel); font-size: 4rem; transform: rotate(-15deg); }
.empty-state h3 { margin: 8px 0 0; font-size: 1.5rem; }
.empty-state p { color: var(--muted); }
.empty-state button, .load-more { min-height: 48px; padding: 0 20px; color: #fff; background: var(--ink); border: 0; border-radius: 12px; cursor: pointer; font-weight: 850; }
.load-more { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 30px auto 0; }
.load-more[hidden] { display: none; }

.blog-return {
  display: grid;
  grid-template-columns: 1fr minmax(320px, .7fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 120px;
  padding: clamp(28px, 5vw, 62px);
  background: var(--surface-alpha);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.blog-return h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.05em; }
.blog-return-copy > p:last-of-type { color: var(--muted); }
.blog-return-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.blog-return-actions a { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; color: var(--steel); background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; font-size: .78rem; font-weight: 850; text-decoration: none; }
.blog-return-actions .blog-home-button { color: #fff; background: var(--ink); border-color: var(--ink); }
.blog-logo-card { display: block; padding: 22px; background: #f4f7f8; border: 1px solid #d4dce1; border-radius: 20px; text-decoration: none; transition: transform .25s, box-shadow .25s; }
.blog-logo-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.blog-logo-card img { display: block; width: 100%; border-radius: 10px; }
.blog-logo-card span { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; color: #24213f; font-size: .78rem; font-weight: 850; }

.site-footer { color: #e5e3ef; background: #121222; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; padding-block: 54px 34px; }
.footer-brand .brand-copy strong { color: #fff; }.footer-brand .brand-copy small { color: #aaa8bc; }
.footer-inner > div > p { max-width: 580px; color: #aaa8bc; font-size: .82rem; }
.footer-inner nav { display: grid; grid-template-columns: repeat(2, auto); align-content: start; gap: 8px 24px; }
.footer-inner nav a, .footer-bottom a { color: #d4d1e1; font-size: .78rem; font-weight: 750; text-decoration: none; }
.footer-inner nav a:hover, .footer-bottom a:hover { color: #fff; }
.operator-services {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 4vw, 52px);
  padding-block: 0 34px;
}
.operator-services-intro,
.operator-service-area {
  padding-top: 24px;
  border-top: 1px solid #2a2746;
}
.operator-services-eyebrow {
  margin: 0 0 4px;
  color: #8f8da4;
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .12em;
}
.operator-services h2,
.operator-services h3,
.operator-services h4 { color: #f4f3fa; }
.operator-services h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}
.operator-services-reading {
  color: #aaa8bc;
  font-size: .8rem;
  font-weight: 650;
}
.operator-services-intro > p:not(.operator-services-eyebrow),
.operator-service-area > p,
.operator-service-card p {
  color: #aaa8bc;
  font-size: .82rem;
  line-height: 1.65;
}
.operator-services-intro > p:not(.operator-services-eyebrow) {
  max-width: 520px;
  margin: 8px 0 12px;
}
.operator-website-link,
.operator-service-links a {
  color: #c8efed;
  font-size: .82rem;
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
.operator-website-link:hover,
.operator-website-link:focus-visible,
.operator-service-links a:hover,
.operator-service-links a:focus-visible { color: #fff; }
.operator-service-area > h3 {
  margin: 0;
  font-size: .9rem;
}
.operator-service-area > p { margin: 4px 0 12px; }
.operator-service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.operator-service-card {
  padding: 14px 15px;
  background: rgb(255 255 255 / .025);
  border: 1px solid #302e48;
  border-radius: 12px;
}
.operator-service-card h4 {
  margin: 0;
  font-size: .86rem;
}
.operator-service-card p { margin: 5px 0 10px; }
.operator-service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
}
.operator-website-link,
.operator-service-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 18px 28px; color: #8f8da4; border-top: 1px solid #2a2746; }

.detail-dialog:not([open]) { display: none; }
.detail-dialog {
  width: min(1260px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 40px 100px rgb(0 0 0 / .38);
}
.detail-dialog::backdrop { background: rgb(3 10 17 / .72); backdrop-filter: blur(8px); }
.dialog-shell { max-height: calc(100dvh - 30px); overflow: auto; }
.dialog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.dialog-header h2 { margin: 7px 0 0; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.04em; }
.dialog-header p { margin: 8px 0 0; color: var(--muted); font-size: .84rem; }
.dialog-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.dialog-header-actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 8px; }
.dialog-header-actions .dialog-favorite {
  min-height: 42px; padding: 0 13px; color: var(--text); background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .72rem; font-weight: 850;
}
.dialog-header-actions .dialog-favorite[aria-pressed="true"] {
  color: var(--text); background: color-mix(in srgb, var(--cyan) 12%, var(--surface)); border-color: var(--cyan);
}
.dialog-header-actions .dialog-favorite:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.dialog-close { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 1.6rem; line-height: 1; }
.dialog-close:hover { color: var(--rose); }
.dialog-content { display: grid; grid-template-columns: minmax(360px, .82fr) minmax(480px, 1.18fr); gap: 0; }
.dialog-preview-column, .dialog-code-column { min-width: 0; padding: 26px; }
.dialog-preview-column { border-right: 1px solid var(--line); }
.dialog-preview-stage { position: relative; min-height: 330px; display: grid; place-items: center; overflow: clip; padding: 32px; color: #17233c; background-color: #f4f7fb; background-image: linear-gradient(rgb(104 87 229 / .1) 1px, transparent 1px), linear-gradient(90deg, rgb(104 87 229 / .1) 1px, transparent 1px); background-size: 28px 28px; border: 1px solid #c9d3df; border-radius: 18px; }
.dialog-preview-stage > * { max-width: 100%; }
.dialog-preview-stage .demo-box { min-width: 190px; min-height: 100px; }
.dialog-preview-stage figure { width: min(420px, 100%); margin: 0; }
.dialog-preview-stage img { max-height: 270px; object-fit: cover; border-radius: 16px; }
.dialog-preview-stage article[class*="is-card-"] { width: min(330px, 100%); }
.dialog-preview-stage .is-background-gradient, .dialog-preview-stage .is-background-stripes, .dialog-preview-stage .is-background-grid, .dialog-preview-stage .is-background-dots, .dialog-preview-stage .is-background-bubbles, .dialog-preview-stage .is-background-shimmer { width: min(430px, 100%); border-radius: 16px; overflow: hidden; }
.dialog-preview-stage .is-scroll-progress { position: absolute !important; inset: 28px 28px auto !important; }
.preview-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; color: var(--muted); font-size: .74rem; }
.preview-actions button { min-height: 38px; padding: 0 12px; color: var(--steel); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-weight: 800; }

.tuner { display: grid; gap: 12px; margin-top: 12px; padding: 16px; background: color-mix(in srgb, var(--paper-2) 82%, transparent); border: 1px solid var(--line); border-radius: 14px; }
.tuner:empty { display: none; }
.tuner h3 { margin: 0; font-size: 1rem; }
.tuner > p { margin: -4px 0 2px; color: var(--muted); font-size: .76rem; line-height: 1.7; }
.tuner-control { display: grid; grid-template-columns: 90px minmax(0, 1fr) 58px; align-items: center; gap: 10px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.tuner-control label { color: var(--muted); font-size: .72rem; font-weight: 800; }
.tuner-control input[type="range"] { width: 100%; accent-color: var(--steel); }
.tuner-control output { padding: .25rem .4rem; color: var(--steel); background: var(--paper-2); border-radius: 7px; text-align: center; font: .7rem ui-monospace, monospace; }
.tuner-control-help { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .72rem; line-height: 1.65; }

.change-points { margin-top: 24px; }
.change-points > h3 { margin: 0 0 6px; font-size: 1rem; }
.change-points > p { margin: 0 0 12px; color: var(--muted); font-size: .78rem; line-height: 1.7; }
.change-points-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.change-points-table { width: 100%; min-width: 600px; border-collapse: collapse; background: var(--surface); }
.change-points-table th,
.change-points-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.change-points-table tr:last-child > * { border-bottom: 0; }
.change-points-table thead th { color: var(--text); background: var(--paper-2); font-size: .75rem; white-space: nowrap; }
.change-points-table tbody th { width: 18%; color: var(--text); font-size: .76rem; }
.change-points-table tbody td:nth-child(2) { width: 24%; }
.change-points-table code { display: inline-block; padding: .25rem .45rem; color: #3f35aa; background: #eeecff; border: 1px solid #c8c2fa; border-radius: 6px; font: 700 .72rem ui-monospace, monospace; overflow-wrap: anywhere; }
.change-points-table p { margin: 0; color: var(--text); font-size: .77rem; line-height: 1.65; }
.change-points-empty { padding: 14px; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px; }
.change-point-help { display: grid; gap: 5px; margin: 9px 0 0; padding: 10px 12px 10px 29px; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px; font-size: .72rem; line-height: 1.65; }
.change-point-help li::marker { color: var(--cyan); }
html[data-theme="dark"] .change-points-table code { color: #f0eeff; background: #34305c; border-color: #6259a6; }
.motion-value-guide { margin-top: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.motion-value-guide > summary { min-height: 46px; display: flex; align-items: center; padding: 10px 14px; color: var(--text); cursor: pointer; font-size: .82rem; font-weight: 850; }
.motion-value-guide > summary::marker { color: var(--cyan); }
.motion-value-guide > summary:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 10px; }
.motion-value-guide[open] > summary { border-bottom: 1px solid var(--line); }
.motion-value-guide-body { padding: 14px; }
.motion-current-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.motion-current-settings div { padding: 10px 11px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px; }
.motion-current-settings dt { color: var(--muted); font-size: .64rem; font-weight: 850; }
.motion-current-settings dd { margin: 3px 0 0; color: var(--text); font-size: .75rem; line-height: 1.55; }
.timing-function-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.timing-function-list li { padding: 9px 10px; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 9px; font-size: .72rem; line-height: 1.65; }
.timing-function-list li.is-current { border-color: var(--cyan); box-shadow: inset 3px 0 0 var(--cyan); }
.timing-function-list code { color: var(--steel); font-weight: 850; }
.compatibility-box { margin-top: 20px; padding: 14px 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; }
.compatibility-box div { display: flex; justify-content: space-between; gap: 12px; }
.compatibility-box span { color: var(--muted); font-size: .72rem; }
.compatibility-box strong { color: var(--steel); font-size: .75rem; }
.compatibility-box p { margin: 7px 0 0; color: var(--muted); font-size: .7rem; }
.compatibility-box p:empty { display: none; }

.dialog-code-column { background: color-mix(in srgb, var(--paper-2) 55%, var(--surface)); }
.code-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.code-tabs button { min-height: 34px; padding: 0 16px; color: var(--muted); background: transparent; border: 0; border-radius: 7px; cursor: pointer; font-size: .74rem; font-weight: 850; }
.code-tabs button[aria-selected="true"] { color: #fff; background: var(--ink); }
.code-view { margin-top: 12px; overflow: hidden; background: var(--code); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 15px; }
.code-view[hidden] { display: none; }
.code-toolbar { min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 14px; color: #9cb1bf; background: #1a1930; border-bottom: 1px solid #302d52; font: .7rem ui-monospace, monospace; }
.code-toolbar button { min-height: 32px; padding: 0 10px; color: #dceaf2; background: #34305c; border: 1px solid #3c3869; border-radius: 7px; cursor: pointer; font: inherit; }
.code-toolbar button:hover { background: var(--steel); }
.code-view pre { max-height: 480px; min-height: 340px; margin: 0; overflow: auto; padding: 20px; color: var(--code-text); font: .78rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; tab-size: 2; }
.dialog-copy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dialog-copy-actions button { min-height: 42px; padding: 0 13px; color: var(--steel); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: .7rem; font-weight: 850; }
.dialog-copy-actions .copy-all { color: #fff; background: var(--ink); border-color: var(--ink); }
.code-note { color: var(--muted); font-size: .7rem; }

.copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 16px;
  color: #fff;
  background: #24213f;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .2s, transform .2s;
  font-size: .78rem;
  font-weight: 800;
}
.copy-toast.is-visible { opacity: 1; transform: translateY(0); }
.noscript-message { position: fixed; inset: auto 20px 20px; z-index: 500; padding: 14px; color: #fff; background: #9f1239; border-radius: 12px; }

@media (max-width: 1180px) {
  .desktop-nav a:not(.return-link) { display: none; }
  .animation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advanced-filters { grid-template-columns: repeat(3, 1fr); }
  .dialog-content { grid-template-columns: 1fr; }
  .dialog-preview-column { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 900px) {
  :root { --shell: min(100% - 28px, 1440px); }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 20px; padding-top: 70px; }
  .hero-visual { min-height: 430px; }
  .guide-steps { grid-template-columns: 1fr; }
  .guide-steps li { min-height: 160px; }
  .anatomy-panel, .reduced-motion-panel > div, .blog-return { grid-template-columns: 1fr; }
  .blog-logo-card { max-width: 520px; }
  .footer-inner { grid-template-columns: 1fr; }
  .operator-services { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  :root { --header-height: 66px; --shell: min(100% - 20px, 1440px); }
  .site-header { grid-template-columns: auto 1fr; gap: 10px; min-height: var(--header-height); padding: 9px 10px; }
  .brand-mark { width: 42px; height: 39px; transform: scale(.88); transform-origin: left center; }
  .brand-copy strong { font-size: .87rem; }.brand-copy small { font-size: .55rem; }
  .desktop-nav { justify-self: end; }
  .desktop-nav .return-link { margin: 0; padding: .55rem .7rem; font-size: .68rem; }
  .header-tools { grid-column: 1 / -1; display: none; }
  .hero { padding-block: 58px 80px; }
 .hero h1 { font-size: clamp(4.2rem, 21vw, 5.2rem); }
  .hero-actions { display: grid; }
  .primary-action, .secondary-action { width: 100%; }
  .hero-stats { gap: 18px; }.hero-stats dt { font-size: 1.55rem; }.hero-stats dd { font-size: .66rem; }
  .hero-visual { min-height: 340px; }
  .hero-orbit { width: 260px !important; }
  .hero-center { width: 145px; }.hero-center span { font-size: 2.5rem; }
  .code-card { min-width: 140px; padding: 13px; }.code-card code { font-size: .74rem; }.code-card b { font-size: .62rem; }
  .code-card-a { top: 12px; }.code-card-b { top: 130px; right: 0; }.code-card-c { bottom: 10px; left: 5px; }
  .guide { padding-bottom: 90px; }
  .anatomy-panel { padding: 22px; border-radius: 22px; }
  .mini-code pre { font-size: .72rem; }
  .explorer-wrap { position: relative; top: auto; }
  .advanced-filters { grid-template-columns: repeat(2, 1fr); }
  .filter-toggle, .filter-reset { width: 100%; }
  .result-line { display: block; }
  .result-line p + p { margin-top: 2px; }
  .animation-grid { grid-template-columns: 1fr; }
  .demo-stage { min-height: 205px; }
  .blog-return { margin-bottom: 80px; padding: 22px; border-radius: 22px; }
  .blog-return-actions { display: grid; }
  .footer-inner nav { grid-template-columns: 1fr 1fr; }
  .operator-services { padding-bottom: 28px; }
  .operator-services h2 { font-size: .94rem; }
  .operator-services-reading { display: block; }
  .footer-bottom { flex-direction: column; }
  .detail-dialog { width: 100%; max-width: 100%; max-height: 100dvh; margin: 0; border-radius: 0; }
  .dialog-shell { max-height: 100dvh; }
  .dialog-header, .dialog-preview-column, .dialog-code-column { padding: 18px; }
  .dialog-header { align-items: flex-start; gap: 12px; }
  .dialog-header-actions { max-width: 170px; }
  .dialog-header-actions .dialog-favorite { min-height: 40px; padding-inline: 10px; }
  .dialog-preview-stage { position: relative; min-height: 260px; padding: 20px; }
  .code-view pre { min-height: 300px; font-size: .7rem; }
  .tuner-control { grid-template-columns: 75px 1fr 52px; }
  .motion-current-settings { grid-template-columns: 1fr; }
}

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

/* The explicit pause control always wins over preview and OS-motion overrides. */
body.motion-paused *, body.motion-paused *::before, body.motion-paused *::after,
.demo-paused *, .demo-paused *::before, .demo-paused *::after {
  animation-play-state: paused !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
}

@media print {
  .site-header, .site-scroll-progress, .explorer-wrap, .hero-visual, .card-actions, .demo-replay, .demo-hint, .site-footer, .detail-dialog { display: none !important; }
  body { background: #fff; }
  .animation-grid { grid-template-columns: repeat(2, 1fr); }
  .animation-card { break-inside: avoid; box-shadow: none; }
}

/* Always-available back-to-top control */
.floating-top-link {
  position: fixed;
  right: clamp(14px, 2vw, 26px);
  bottom: clamp(14px, 2vw, 26px);
  z-index: 180;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  color: #fff;
  background: linear-gradient(145deg, var(--steel), var(--ink));
  border: 1px solid rgb(255 255 255 / .18);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(.92);
  transition: opacity .2s ease, transform .2s ease;
}
.floating-top-link.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.floating-top-link span { font-size: 1.2rem; font-weight: 950; line-height: .9; }
.floating-top-link small { font-size: .55rem; font-weight: 900; letter-spacing: .09em; }
.floating-top-link:hover { transform: translateY(-3px) scale(1); }
@media (max-width: 680px) {
  .floating-top-link { width: 48px; height: 48px; border-radius: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .floating-top-link { transition: none; }
  .floating-top-link:hover { transform: none; }
}

/* Clear motion descriptions and dedicated scroll-linked previews */
.motion-change-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: start;
  margin-top: 13px;
  padding: 11px 12px;
  background: #f7f8fb;
  border: 1px solid #dfe3eb;
  border-radius: 11px;
}
.motion-change-summary > strong {
  padding: .18rem .42rem;
  color: #4b467f;
  background: #eeedf8;
  border: 1px solid #d8d5ed;
  border-radius: 6px;
  font-size: .68rem;
  line-height: 1.35;
}
html[data-theme="dark"] .motion-change-summary { background: #252838; border-color: #3d4255; }
html[data-theme="dark"] .motion-change-summary > strong { color: #d9d6ff; background: #302f49; border-color: #504b72; }
.motion-change-summary ul { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.motion-change-summary li { color: var(--text); font-size: .73rem; line-height: 1.55; overflow-wrap: anywhere; }
.motion-change-summary li::before { content: "• "; color: var(--steel-2); }

.demo-stage.is-scroll-demo,
.dialog-preview-stage.is-scroll-demo {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) color-mix(in srgb, var(--surface) 70%, transparent);
}
.demo-stage.is-scroll-demo { height: 215px; min-height: 215px; }
.dialog-preview-stage.is-scroll-demo { height: 360px; min-height: 360px; }
.scroll-demo-sticky {
  position: sticky;
  top: 8px;
  z-index: 12;
  width: max-content;
  max-width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px auto -38px;
  padding: .38rem .65rem;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  font-size: .62rem;
  font-weight: 850;
  pointer-events: none;
}
.scroll-demo-sticky b { color: var(--steel); font-size: .9rem; }
.scroll-demo-track {
  min-height: 660px;
  display: grid;
  grid-template-rows: auto 1fr auto 1.25fr auto;
  justify-items: center;
  align-items: center;
  padding: 54px 22px 26px;
  background-image:
    linear-gradient(color-mix(in srgb, var(--steel) 9%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--steel) 9%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
.dialog-preview-stage .scroll-demo-track { min-height: 880px; }
.scroll-demo-marker {
  padding: .25rem .55rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 800 .58rem ui-monospace, monospace;
  letter-spacing: .08em;
}
.scroll-demo-space { width: 1px; min-height: 180px; background: linear-gradient(var(--line), transparent); }
.scroll-demo-space.is-bottom { min-height: 240px; background: linear-gradient(transparent, var(--line)); }
.scroll-demo-subject {
  width: min(100%, 360px);
  min-height: 130px;
  display: grid;
  place-items: center;
  padding: 18px;
  position: relative;
}
.scroll-demo-subject > * { max-width: 100%; }
.is-scroll-demo .is-scroll-progress {
  position: sticky !important;
  inset: auto !important;
  top: 48px !important;
  width: min(100%, 300px) !important;
  display: block !important;
  align-self: start;
  border-radius: 999px;
}
.dialog-change-summary {
  margin-top: 16px;
  padding: 15px 16px;
  background: #f7f8fb;
  border: 1px solid #dfe3eb;
  border-radius: 13px;
}
html[data-theme="dark"] .dialog-change-summary { background: #252838; border-color: #3d4255; }
.dialog-change-summary h3 { margin: 0; font-size: .92rem; }
.dialog-change-summary ul { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 1.2rem; }
.dialog-change-summary li { color: var(--text); font-size: .8rem; line-height: 1.6; }

/* Ask before files begin downloading. */
.download-confirm-dialog:not([open]) { display: none; }
.download-confirm-dialog {
  width: min(500px, calc(100% - 28px));
  padding: 0;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}
.download-confirm-dialog::backdrop { background: rgb(3 10 17 / .72); backdrop-filter: blur(6px); }
.download-confirm-dialog form { padding: 24px; }
.download-confirm-dialog h2 { margin: 0; font-size: 1.25rem; line-height: 1.4; }
.download-confirm-dialog p { margin: 10px 0 0; color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.download-confirm-file { color: var(--text) !important; font-weight: 800; }
.download-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.download-confirm-actions button { min-height: 44px; padding: 0 14px; border-radius: 10px; cursor: pointer; font-weight: 850; }
.download-confirm-cancel { color: var(--text); background: var(--paper-2); border: 1px solid var(--line); }
.download-confirm-start { color: #fff; background: var(--ink); border: 1px solid var(--ink); }
@media (max-width: 480px) { .download-confirm-actions { grid-template-columns: 1fr; } }

.motion-preference-notice {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px max(20px, calc((100% - 1440px) / 2));
  color: var(--text);
  background: color-mix(in srgb, #f59e0b 13%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, #f59e0b 28%, var(--line));
}
.motion-preference-notice strong { font-size: .8rem; }
.motion-preference-notice p { margin: 2px 0 0; color: var(--muted); font-size: .7rem; }
.motion-preference-notice button {
  min-height: 38px;
  padding: 0 12px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 850;
}
.motion-preference-notice.is-enabled { background: color-mix(in srgb, var(--cyan) 11%, var(--surface)); border-bottom-color: color-mix(in srgb, var(--cyan) 28%, var(--line)); }

@media (max-width: 680px) {
  .motion-change-summary { grid-template-columns: 1fr; }
  .motion-change-summary > strong { width: max-content; }
  .motion-preference-notice { position: relative; top: auto; grid-template-columns: 1fr; padding: 12px; }
  .motion-preference-notice button { width: 100%; }
  .dialog-preview-stage.is-scroll-demo { height: 300px; min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  body.motion-preview-enabled .demo-stage *,
  body.motion-preview-enabled .demo-stage *::before,
  body.motion-preview-enabled .demo-stage *::after,
  body.motion-preview-enabled .dialog-preview-stage *,
  body.motion-preview-enabled .dialog-preview-stage *::before,
  body.motion-preview-enabled .dialog-preview-stage *::after {
    animation-duration: revert !important;
    animation-iteration-count: revert !important;
    transition-duration: revert !important;
  }
}
