/* Additive enhancements for the sections after the intro (2026-10). */

/* ---------- Tokens ---------- */

/* Chinese face: a small cut of Noto Sans SC (Source Han Sans, SIL OFL 1.1) holding only
   the characters this site uses; rebuild with tools/build-zh-font.py. */
@font-face {
  font-family: "KAYSIN Sans SC";
  src: url("./assets/fonts/kaysin-sans-sc.woff?v=20261009") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* One accent, used only in small doses (dots, stars, progress, hover cues).
   --hot sits on paper, --hot-on-ink on ink. Orange is the default; preview others with ?accent=blue or ?accent=mono. */
:root {
  --zh: "KAYSIN Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --hot-deep: #ef4f0e;
  --hot-lift: #ff7443;
  --hot: var(--hot-deep);
  --hot-on-ink: var(--hot-lift);
}

html[data-accent="blue"] {
  --hot-deep: #2b3dff;
  --hot-lift: #7686ff;
}

html[data-accent="mono"] {
  --hot-deep: #111015;
  --hot-lift: #f2eee8;
}

body.is-dark {
  --hot: var(--hot-lift);
  --hot-on-ink: var(--hot-deep);
}

/* ---------- Hero ---------- */

/* Coordinate tag next to the wave-field dot (matches the intro crosshair label). */
.wave-readout {
  position: absolute;
  left: var(--wave-x);
  top: var(--wave-y);
  z-index: 3;
  padding: 3px 5px;
  background: var(--ink);
  color: var(--paper);
  font: 700 8px/1 Consolas, "Courier New", monospace;
  white-space: nowrap;
  opacity: var(--wave-active);
  transform: translate(12px, 10px);
  pointer-events: none;
}

.hero-title b {
  will-change: transform;
}

.hero-title {
  position: relative;
  min-width: 0;
  /* More air between the letters and the rules above/below. */
  padding-block: clamp(24px, 2.2vw, 36px);
}

/* Stacked (narrow) layout: scale around the centre; the value comes from JS. */
.hero-title.is-stacked > span .hero-word-inner {
  transform-origin: center;
}

.hero-title .char {
  cursor: default;
}

@media (hover: none), (pointer: coarse) {
  .wave-readout {
    display: none;
  }
}

/* ---------- Work ---------- */

/* The door is now drawn at its real scale in JS (drawMaskScaled), so the mask
   layer is never CSS-scaled ~12x. Stroke width follows the scale as before. */
.work-mask {
  transform: none;
  will-change: auto;
}

.work-mask-svg .mask-paper,
.work-mask-svg .mask-ring,
.work-mask-svg .mask-lines {
  stroke-width: var(--mask-stroke, 1);
}

/* Index HUD inside the open stage. */
.work-hud {
  position: absolute;
  left: clamp(20px, 2.4vw, 36px);
  bottom: clamp(20px, 2.4vw, 36px);
  z-index: 6;
  display: grid;
  gap: 8px;
  min-width: 260px;
  padding: 14px 16px 16px;
  border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
  background: var(--ink);
  color: var(--paper);
  font-family: Consolas, "Courier New", monospace;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s linear,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.work-hud.is-on {
  opacity: 1;
  transform: none;
}

.work-hud__index {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
}

.work-hud__index b {
  font: inherit;
  opacity: 1;
}

.work-hud__title {
  font-family: "Anton", Impact, "Arial Black", "PingFang SC", sans-serif;
  font-size: clamp(28px, 2.6vw, 44px);
  font-weight: 400;
  line-height: 0.95;
}

.work-hud__meta {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
}

.work-hud.is-swap .work-hud__title,
.work-hud.is-swap .work-hud__meta {
  animation: work-hud-swap 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-hud__bar {
  position: relative;
  display: block;
  height: 1px;
  margin-top: 6px;
  background: color-mix(in srgb, var(--paper) 25%, transparent);
}

.work-hud__bar b {
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: left center;
}

@keyframes work-hud-swap {
  from {
    opacity: 0;
    transform: translateY(8px);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0);
  }
}

/* Hover scrubbing on the video cards. */
.video-slot__time {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  padding: 4px 6px;
  background: var(--paper);
  color: var(--ink);
  font: 700 10px/1 Consolas, "Courier New", monospace;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.2s linear,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.video-slot.is-scrubbing .video-slot__time {
  opacity: 1;
  transform: none;
}

.video-slot.is-scrubbing::after {
  background: var(--paper);
  opacity: 1;
  transform: scaleX(var(--scrub, 0));
  transform-origin: left center;
}

/* ---------- Contact ---------- */

.cta-contact-clock {
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(8px, calc(var(--cta-reveal-size) * 0.011), 11px);
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

.cta-copy-chip {
  justify-self: start;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--paper) 55%, transparent);
  background: transparent;
  color: var(--paper);
  font: 700 clamp(8px, calc(var(--cta-reveal-size) * 0.011), 11px)/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    background-color 0.2s linear,
    color 0.2s linear;
}

.cta-copy-chip:hover,
.cta-copy-chip:focus-visible,
.cta-copy-chip.is-done {
  background: var(--paper);
  color: var(--ink);
}

.cta-copy-chip:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 2px;
}

/* ---------- About ---------- */

/* Intro: plain text, no card (reference: one large block, generous margins). */
.about-intro {
  padding: clamp(48px, 5vw, 72px) clamp(32px, 5vw, 72px) clamp(40px, 4vw, 60px);
}

.about-copy-panel.about-intro p {
  margin: 0;
  font-family: var(--zh);
  font-size: clamp(20px, 1.75vw, 28px);
  font-weight: 350;
  line-height: 1.8;
  letter-spacing: 0.02em;
  text-align: justify;
  text-wrap: pretty;
}

.about-copy-panel.about-intro p + p {
  margin-top: 1em;
}

.about-copy-panel.about-intro .about-intro__sign {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(40px, 4vw, 60px);
  font: 700 10px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.1em;
  text-align: left;
}

.about-intro__sign span:first-child::after {
  display: inline-block;
  width: clamp(48px, 8vw, 120px);
  height: 1px;
  margin-left: 14px;
  background: currentColor;
  vertical-align: middle;
  content: "";
}

/* The intro is split into its rendered lines (JS) so each line can rise in. */
.kx-line,
.kx-line__inner {
  display: block;
}

.kx-line {
  text-align: justify;
  text-align-last: justify;
}

.kx-line:last-child {
  text-align-last: auto;
}

@media (max-width: 700px) {
  .about-copy-panel.about-intro p {
    font-size: clamp(18px, 5vw, 21px);
    line-height: 1.75;
  }
}

/* ---------- About: APPROACH grid ----------
   Every cell follows one rule: a mono label top-left, the content anchored
   bottom-left. Hatched gaps show through where a cell is left empty. */

.kx-grid {
  --kx-row: calc(var(--about-card-w) / 4 / 0.78);
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows:
    minmax(calc(var(--kx-row) * 0.92), auto)
    minmax(var(--kx-row), auto)
    minmax(var(--kx-row), auto)
    minmax(calc(var(--kx-row) * 0.66), auto)
    minmax(var(--kx-row), auto)
    minmax(calc(var(--kx-row) * 0.86), auto);
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--ink);
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 1px,
    var(--ink) 1.5px 2.5px,
    transparent 3px 11px
  );
}

.kx-cell {
  position: relative;
  min-width: 0;
  padding: 14px;
  background: var(--paper);
  clip-path: inset(-1px);
  cursor: default;
}

.kx-cell::before {
  position: absolute;
  inset: -1px 0 0 -1px;
  z-index: 3;
  border: 1px solid var(--ink);
  pointer-events: none;
  content: "";
}

.kx-cell--blank {
  background: transparent;
}

.kx-a { grid-column: 1 / 5; grid-row: 1; }
.kx-b { grid-column: 1 / 3; grid-row: 2 / 4; }
.kx-c { grid-column: 3 / 5; grid-row: 2; }
.kx-d { grid-column: 3 / 4; grid-row: 3; }
.kx-e { grid-column: 4 / 5; grid-row: 3; }
.kx-f { grid-column: 1 / 5; grid-row: 4; }
.kx-g { grid-column: 1 / 2; grid-row: 5; }
.kx-h { grid-column: 2 / 4; grid-row: 5; }
.kx-i { grid-column: 4 / 5; grid-row: 5; }
.kx-j { grid-column: 1 / 3; grid-row: 6; }
.kx-k { grid-column: 3 / 5; grid-row: 6; }

.kx-cell__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding-top: 24px;
  color: inherit;
  text-decoration: none;
  transition:
    translate 0.9s cubic-bezier(0.23, 1, 0.32, 1),
    scale 1.5s cubic-bezier(0.86, 0, 0.07, 1);
}

.kx-label {
  position: absolute;
  top: 0;
  left: 0;
  font: 700 10px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.kx-label--end {
  right: 0;
  left: auto;
  color: color-mix(in srgb, var(--ink) 55%, var(--paper));
}

/* Display numerals and words. */
.kx-big {
  display: block;
  font-family: "Bigger Display", "Anton", Impact, "Arial Black", sans-serif;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: 0;
  white-space: nowrap;
}

.kx-b .kx-big { font-size: 26cqi; }
.kx-e .kx-big { font-size: 14.5cqi; }

.kx-stack {
  display: flex;
  flex-direction: column;
  font-family: "Bigger Display", "Anton", Impact, "Arial Black", sans-serif;
  font-size: 8.4cqi;
  font-weight: 700;
  line-height: 0.88;
}

.kx-stack span {
  transition: translate 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Chinese statements: one face, one weight, one size. */
.kx-motto {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-family: var(--zh);
  font-size: 8.6cqi;
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0.08em;
}

.kx-motto span {
  margin-right: -0.08em;
}

.kx-motto span:last-child {
  align-self: flex-end;
}

.kx-say {
  display: block;
  font-family: var(--zh);
  font-size: 6.2cqi;
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.kx-note {
  display: block;
  margin-top: 12px;
  font-family: var(--zh);
  font-size: max(12px, 2.25cqi);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--ink) 74%, var(--paper));
}

.kx-geo {
  white-space: nowrap;
}

.kx-note--mono {
  font: 700 10px/1.4 Consolas, "Courier New", monospace;
  letter-spacing: 0.08em;
}

.kx-note b {
  display: inline-block;
  margin-left: 0.5em;
  font-weight: 400;
  transition: translate 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.kx-k small i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--hot);
  vertical-align: 0;
  animation: kx-blink 2s ease-in-out infinite;
}

@keyframes kx-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Process: five steps on one line, each with its own segment of rule. */
.kx-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kx-steps li {
  display: grid;
  row-gap: 10px;
  min-width: 0;
}

.kx-steps i {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 10px/1 Consolas, "Courier New", monospace;
  font-style: normal;
  letter-spacing: 0.08em;
  transition: color 0.25s linear calc(var(--n) * 90ms);
}

.kx-steps i::after {
  flex: 1;
  height: 1px;
  margin-right: 8px;
  background:
    linear-gradient(var(--hot), var(--hot)) left center / 0% 100% no-repeat,
    color-mix(in srgb, var(--ink) 30%, transparent);
  transition: background-size 0.45s cubic-bezier(0.23, 1, 0.32, 1) calc(var(--n) * 90ms);
  content: "";
}

.kx-steps span {
  font-family: var(--zh);
  font-size: max(12px, 2.3cqi);
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Lens icon: an aperture drawn as wireframe, with the site's star in each corner. */
.kx-cell--icon .kx-cell__inner > svg {
  position: absolute;
}

.kx-aperture {
  top: 50%;
  left: 50%;
  width: 64%;
  height: auto;
  translate: -50% -50%;
  overflow: visible;
  transition: rotate 1.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.kx-aperture path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}

.kx-cell--icon .kx-cell__inner > svg:not(.kx-aperture) {
  width: 12%;
  height: auto;
  fill: var(--ink);
}

.kx-cell--icon .kx-cell__inner > svg:nth-of-type(2) { top: 0; left: 0; }
.kx-cell--icon .kx-cell__inner > svg:nth-of-type(3) { top: 0; right: 0; }
.kx-cell--icon .kx-cell__inner > svg:nth-of-type(4) { bottom: 0; left: 0; }
.kx-cell--icon .kx-cell__inner > svg:nth-of-type(5) { right: 0; bottom: 0; }

@media (hover: hover) {
  .kx-cell--icon:hover .kx-aperture {
    rotate: 60deg;
  }

  .kx-c:hover .kx-stack span {
    translate: 0.35em 0;
  }

  .kx-c:hover .kx-stack span:nth-child(2) { transition-delay: 60ms; }
  .kx-c:hover .kx-stack span:nth-child(3) { transition-delay: 120ms; }

  .kx-f:hover .kx-steps i {
    color: var(--hot);
  }

  .kx-f:hover .kx-steps i::after {
    background-size: 100% 100%, auto;
  }

  .kx-k:hover .kx-note b {
    translate: 0.4em 0;
  }
}

.kx-cell--link .kx-cell__inner:focus-visible {
  outline: 1px solid var(--hot);
  outline-offset: 6px;
}

/* Press feedback when the pointer enters a cell (stars are thrown from JS). */
.kx-cell.is-active .kx-cell__inner {
  scale: 0.9;
  transition: scale 0.1s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Reveal, the reference way: an ink panel carrying a star wipes off to the
   right while the content slides in. It starts the moment a cell comes up
   over the bottom edge and takes 0.65 s, so nothing you are reading stays
   covered; a cell that drops back below the screen resets and plays again. */
.kx-cell__mask {
  display: none;
}

.kx-motion .kx-cell__mask {
  position: absolute;
  inset: -1px;
  z-index: 2;
  display: block;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 0.65s cubic-bezier(0.86, 0, 0.07, 1) var(--kx-delay, 0ms);
  pointer-events: none;
}

.kx-motion .kx-cell__mask::before {
  position: absolute;
  inset: 0;
  background: var(--hot-on-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 49 49'%3E%3Cpath d='m24.5 0 3.3 21.2L49 24.5l-21.2 3.3L24.5 49l-3.3-21.2L0 24.5l21.2-3.3z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 49 49'%3E%3Cpath d='m24.5 0 3.3 21.2L49 24.5l-21.2 3.3L24.5 49l-3.3-21.2L0 24.5l21.2-3.3z'/%3E%3C/svg%3E") center / 22px 22px no-repeat;
  transition: transform 0.65s cubic-bezier(0.86, 0, 0.07, 1) var(--kx-delay, 0ms);
  content: "";
}

.kx-motion .kx-cell:not(.kx-cell--blank) .kx-cell__inner {
  translate: -40% 0;
}

.kx-motion .kx-cell.is-revealed .kx-cell__inner {
  translate: 0 0;
  transition-delay: var(--kx-delay, 0ms), 0ms;
}

.kx-motion .kx-cell.is-revealed .kx-cell__mask {
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
}

.kx-motion .kx-cell.is-revealed .kx-cell__mask::before {
  transform: translate3d(50%, 0, 0);
}

/* Thrown stars live on one viewport canvas that exists only while they fall. */
.kx-stars {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* Three anchors per cell: label top-left, statement left and vertically centred,
   note on the cell floor. ?grid=old restores the earlier bottom-anchored layout. */
html:not([data-grid="old"]) .kx-cell__inner {
  justify-content: center;
  padding-top: 30px;
  padding-bottom: 14px;
}

html:not([data-grid="old"]) .kx-cell:not(.kx-cell--icon) .kx-cell__inner > :not(.kx-label):not(.kx-note) {
  margin-block: auto;
}

html:not([data-grid="old"]) .kx-note {
  margin-top: 0;
  padding-top: 14px;
}

html:not([data-grid="old"]) .kx-b .kx-big {
  font-size: 17cqi;
}

/* 0→1: the arrow is drawn, not a font glyph (the display face has none, so it
   used to come from whatever system font was around). Hovering stretches it,
   pushing the 1 out. */
.kx-zero {
  display: flex;
  align-items: baseline;
}

.kx-arrow {
  position: relative;
  display: inline-block;
  flex: none;
  width: 0.66em;
  height: 0.4em;
  margin: 0 0.05em;
  translate: 0 -0.2em;
  transition: width 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.kx-arrow::before,
.kx-arrow::after {
  position: absolute;
  background: currentColor;
  content: "";
}

.kx-arrow::before {
  top: 50%;
  right: 0.2em;
  left: 0;
  height: 0.17em;
  translate: 0 -50%;
}

.kx-arrow::after {
  top: 0;
  right: 0;
  bottom: 0;
  width: 0.26em;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

@media (hover: hover) {
  .kx-b:hover .kx-arrow {
    width: 1.06em;
  }
}

html:not([data-grid="old"]) .kx-motto,
html:not([data-grid="old"]) .kx-say {
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* Motto: at rest the halves interlock, 技 standing right under 导, the pair
   centred in the cell; each half carries its English line above it. On hover
   they part to opposite edges, taste to the left, tech to the right. */
.kx-motto small {
  display: none;
}

html:not([data-grid="old"]) .kx-a {
  --kx-pad: 14px;
}

html:not([data-grid="old"]) .kx-a .kx-label--end {
  display: none;
}

html:not([data-grid="old"]) .kx-motto {
  --kx-m: 10cqi;
  font-size: var(--kx-m);
  line-height: 1.1;
  row-gap: 0.3em;
}

html:not([data-grid="old"]) .kx-motto small {
  display: block;
  margin-bottom: 0.7em;
  font: 700 10px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--ink) 55%, var(--paper));
}

html:not([data-grid="old"]) .kx-motto span {
  align-self: flex-start;
  margin-right: 0;
  /* Group width is seven characters (4 + 4 - 1 shared column). */
  translate: calc((100cqi - 2 * var(--kx-pad) - 7.28 * var(--kx-m)) / 2) 0;
  transition: translate 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}

html:not([data-grid="old"]) .kx-motto span:last-child {
  align-self: flex-end;
  translate: calc((100cqi - 2 * var(--kx-pad) - 7.28 * var(--kx-m)) / -2) 0;
}

@media (hover: hover) {
  html:not([data-grid="old"]) .kx-a:hover .kx-motto span {
    translate: 0 0;
  }

  html:not([data-grid="old"]) .kx-a:hover .kx-motto span:last-child {
    transition-delay: 50ms;
  }
}

/* Touch screens have no hover: the halves part once the cell has opened. */
@media (hover: none) {
  html:not([data-grid="old"]) .kx-a.is-revealed .kx-motto span {
    translate: 0 0;
    transition-delay: 0.8s;
  }
}

html:not([data-grid="old"]) .kx-steps span {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Hover nudge: every cell's content drifts a little to the right, line by line,
   the way the FOCUS words do. */
html:not([data-grid="old"]) .kx-big,
html:not([data-grid="old"]) .kx-say,
html:not([data-grid="old"]) .kx-note,
html:not([data-grid="old"]) .kx-steps li {
  transition: translate 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) {
  html:not([data-grid="old"]) .kx-cell:hover :is(.kx-big, .kx-say) {
    translate: 14px 0;
  }

  html:not([data-grid="old"]) .kx-cell:hover .kx-note {
    translate: 14px 0;
    transition-delay: 60ms;
  }

  html:not([data-grid="old"]) .kx-f:hover .kx-steps li {
    translate: 10px 0;
    transition-delay: calc(var(--n) * 50ms);
  }
}

@media (max-width: 700px) {
  .kx-grid {
    --kx-row: max(96px, calc(var(--about-card-w) / 4 / 0.78));
    grid-template-rows:
      minmax(var(--kx-row), auto)
      minmax(var(--kx-row), auto)
      minmax(var(--kx-row), auto)
      minmax(calc(var(--kx-row) * 0.86), auto)
      minmax(calc(var(--kx-row) * 1.12), auto)
      minmax(calc(var(--kx-row) * 1.12), auto);
  }

  .kx-note {
    margin-top: 8px;
  }

  /* Narrow columns: SPEED takes the hatch slot so its note fits on one line. */
  .kx-d {
    display: none;
  }

  .kx-e {
    grid-column: 3 / 5;
  }

  .kx-cell {
    padding: 12px;
  }

  html:not([data-grid="old"]) .kx-a {
    --kx-pad: 12px;
  }

  .kx-label--end {
    display: none;
  }

  .kx-stack {
    font-size: 9.6cqi;
  }

  /* Coordinates break as two clean lines instead of mid-phrase. */
  .kx-sep {
    display: none;
  }

  .kx-geo {
    display: block;
  }

  .kx-e .kx-big {
    font-size: 12cqi;
  }

  .kx-say {
    font-size: 7cqi;
  }
}

@media (max-width: 360px) {
  .kx-steps span {
    max-width: 2.4em;
    white-space: normal;
  }
}

/* ---------- About: EXPERIENCE rows ---------- */

.kx-rows {
  container-type: inline-size;
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--ink);
}

.kx-row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 31% minmax(0, 1fr);
  border-bottom: 1px solid var(--ink);
  overflow: hidden;
  transition: color 0.35s linear 0.08s;
}

.kx-row:last-child {
  border-bottom: 0;
}

.kx-row::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.6s cubic-bezier(0.86, 0, 0.07, 1);
  content: "";
}

.kx-row__year {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 4.6cqi, 32px) clamp(14px, 3cqi, 22px);
  border-right: 1px solid currentColor;
  font-family: "Bigger Display", "Anton", Impact, "Arial Black", sans-serif;
  font-size: max(30px, 7.4cqi);
  font-weight: 700;
  line-height: 0.85;
  white-space: nowrap;
  transition: color 0.35s linear 0.08s;
}

.kx-row__clip,
.kx-row__clip > span {
  display: block;
}

.kx-row__clip {
  overflow: hidden;
  /* Room above the cap height so the clip never shaves the numerals. */
  padding: 0.12em 0 0.04em;
  line-height: 1;
}

.kx-row__body {
  padding: clamp(22px, 4.6cqi, 32px) clamp(18px, 4.4cqi, 30px) clamp(24px, 5cqi, 34px);
}

.kx-row__body small {
  display: block;
  font: 700 10px/1.2 Consolas, "Courier New", monospace;
  letter-spacing: 0.1em;
  opacity: 0.62;
}

.kx-row__body strong {
  display: block;
  margin: 0.5em 0 0.55em;
  font-family: var(--zh);
  font-size: max(19px, 3.9cqi);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.kx-row__body p {
  margin: 0;
  font-family: var(--zh);
  font-size: max(14px, 2.55cqi);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.03em;
  opacity: 0.74;
  text-wrap: pretty;
}

@media (hover: hover) {
  .kx-row:hover {
    color: var(--paper);
  }

  .kx-row:hover .kx-row__year {
    border-right-color: var(--paper);
    color: var(--hot-on-ink);
  }

  .kx-row:hover::before {
    transform: scaleX(1);
    transform-origin: 0 50%;
  }
}

@container (max-width: 480px) {
  .kx-row {
    grid-template-columns: 1fr;
  }

  .kx-row__year {
    justify-content: flex-start;
    padding-bottom: 0;
    border-right: 0;
  }

  .kx-row__body {
    padding-top: 14px;
    padding-left: clamp(14px, 3cqi, 22px);
  }
}

/* ---------- About: entrance motion (scroll display) ----------
   Text rises out of its own line box, nothing is laid over it. */

.kx-motion [data-kx-lines] .kx-line {
  overflow: hidden;
}

.kx-motion [data-kx-lines] .kx-line__inner {
  translate: 0 105%;
  transition: translate 0.9s cubic-bezier(0.23, 1, 0.32, 1) calc(var(--i, 0) * 70ms);
}

.kx-motion [data-kx-lines].is-revealed .kx-line__inner {
  translate: 0 0;
}

.kx-motion .kx-row__clip > span {
  translate: 0 105%;
  transition: translate 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.kx-motion .kx-row__body > * {
  opacity: 0;
  translate: 0 14px;
  transition:
    opacity 0.6s linear,
    translate 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.kx-motion .kx-row__body > :nth-child(2) { transition-delay: 70ms; }
.kx-motion .kx-row__body > :nth-child(3) { transition-delay: 140ms; }

.kx-motion .kx-row.is-revealed .kx-row__clip > span,
.kx-motion .kx-row.is-revealed .kx-row__body > * {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .kx-k small i,
  .head-status p:last-child::before {
    animation: none;
  }
}

/* ---------- Accent ---------- */

::selection {
  background: var(--hot);
  color: #fff;
}

.hero-title b,
.wave-field::before {
  background: var(--hot);
}

.head-status p:last-child::before {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hot);
  animation: kx-blink 2s ease-in-out infinite;
  content: "";
}

.site-scrollbar-thumb::before {
  background: var(--hot-on-ink);
}

.work-hud__bar b,
.video-slot.is-scrubbing::after {
  background: var(--hot-on-ink);
}

.cta-copy-chip.is-done {
  border-color: var(--hot-on-ink);
  background: var(--hot-on-ink);
  color: var(--ink);
}

/* Chinese titles in the Work stage use the site face at a weight that sits
   next to Anton; Anton itself must not be fake-bolded. */
.work-hud__title,
.video-slot__meta strong {
  font-family: "Anton", "KAYSIN Sans SC", Impact, "Arial Black", "PingFang SC", sans-serif;
  font-weight: 700;
  font-synthesis: none;
}

.about-focus-track span {
  font-family: "Anton", "KAYSIN Sans SC", Impact, "Arial Black", sans-serif;
}

/* ---------- Phones: page width ---------- */

/* The binary rail between Work and "since 2023" was wider than a phone, which
   let the whole page slide sideways (and zoomed it out a little). */
.work-myway-separator {
  overflow: hidden;
}

@media (max-width: 700px) {
  .work-myway-separator {
    grid-template-columns: auto minmax(40px, 1fr) auto;
  }

  .work-myway-separator > :nth-child(n + 4) {
    display: none;
  }
}

/* ---------- Phones: sound button ---------- */

/* Top-right it sat on the About text; bottom-right it stays out of the way. */
@media (max-width: 700px) {
  .sound-control {
    top: auto;
    right: calc(var(--gap) + 10px);
    bottom: calc(var(--gap) + 12px + env(safe-area-inset-bottom, 0px));
  }

  .sound-toggle {
    width: 42px;
    height: 42px;
  }

  .sound-control {
    transition:
      translate 0.45s cubic-bezier(0.23, 1, 0.32, 1),
      opacity 0.3s linear;
  }

  .sound-control.is-tucked {
    translate: calc(100% + var(--gap) + 16px) 0;
    opacity: 0;
    pointer-events: none;
  }
}

/* ---------- Work: poster frames ----------
   Videos only load when their card comes forward, so cards used to fly in as
   empty grids. Each card now shows a still from its own film until the video
   is ready and fades in over it. */
.video-slot[style*="--poster"] {
  background:
    linear-gradient(to top, color-mix(in srgb, var(--ink) 70%, transparent), transparent 46%),
    var(--poster) center / cover no-repeat,
    var(--ink);
}

/* ---------- Contact ----------
   A slow ring of small type around GO says what the button is for; it steps
   aside when the card opens. Contact values use the site's own face instead
   of the browser's Georgia. */
.cta-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 160px;
  max-width: none;
  height: 160px;
  margin: -80px 0 0 -80px;
  overflow: visible;
  pointer-events: none;
  animation: cta-ring-turn 26s linear infinite;
  transition: opacity 0.3s linear, scale 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.cta-ring text {
  fill: var(--ink);
  font: 700 13px/1 Consolas, "Courier New", var(--zh), monospace;
  /* Spacing tuned so the two phrases close the circle exactly. */
  letter-spacing: 2.85px;
}

.cta-hover.is-active .cta-ring {
  opacity: 0;
  scale: 1.4;
}

@keyframes cta-ring-turn {
  to { rotate: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .cta-ring {
    animation: none;
  }
}

.cta-contact-item strong {
  font-family: var(--zh);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------- Footer ---------- */
.site-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.site-foot__note,
.site-foot__top {
  font: 700 10px/1.2 Consolas, "Courier New", monospace;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--ink) 62%, var(--paper));
  white-space: nowrap;
}

.site-foot__note {
  justify-self: start;
}

.site-foot__top {
  justify-self: end;
  padding: 6px 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: color 0.2s linear;
}

.site-foot__top b {
  display: inline-block;
  margin-left: 0.4em;
  font-weight: 700;
  transition: translate 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.site-foot__top:hover,
.site-foot__top:focus-visible {
  color: var(--ink);
}

.site-foot__top:hover b {
  translate: 0 -3px;
}

@media (max-width: 420px) {
  .site-foot {
    gap: 8px;
    padding-inline: 16px;
  }

  .site-foot__note,
  .site-foot__top {
    font-size: 9px;
    letter-spacing: 0.06em;
  }
}

/* ---------- Work: production note under a title ----------
   e.g. 定影: a quiet line in the site face under the big title, on the card
   and in the bottom-left info box. */
.video-slot__note,
.work-hud__note {
  display: block;
  width: fit-content;
  font-family: var(--zh);
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: none;
  white-space: nowrap;
}

.video-slot__note {
  margin-top: 10px;
  padding: 5px 7px 6px;
  border: 1px solid color-mix(in srgb, var(--paper) 45%, transparent);
  color: color-mix(in srgb, var(--paper) 86%, transparent);
}

.work-hud__note {
  margin-top: -2px;
  color: color-mix(in srgb, var(--paper) 72%, transparent);
}

.work-hud__note:empty {
  display: none;
}

.work-hud.is-swap .work-hud__note {
  animation: work-hud-swap 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Phone cards are too narrow for the note beside WORK 04; the info box under
   them carries it instead. */
@media (max-width: 700px) {
  .video-slot__note {
    display: none;
  }
}

.viewer-meta .viewer-note {
  display: block;
  margin-top: 6px;
  font-family: var(--zh);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* ---------- Cinema: full-screen film player ----------
   The card grows into the picture; everything else is black. Title, progress
   and controls lie on the image and fade out while the film plays. */
.cinema {
  --cin-w: 100vw;
  --cin-h: 56.25vw;
  --cin-ease: cubic-bezier(0.76, 0, 0.24, 1);

  position: fixed;
  inset: 0;
  z-index: 140;
  visibility: hidden;
  overflow: hidden;
  color: var(--paper-fixed, #f2eee8);
  font: 700 11px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.cinema.is-open {
  visibility: visible;
  pointer-events: auto;
}

.cinema.is-shown.is-playing:not(.is-ui),
.cinema.is-shown.is-playing:not(.is-ui) .cinema__tap {
  cursor: none;
}

.cinema__backdrop {
  position: absolute;
  inset: 0;
  background: #070709;
  opacity: 0;
  transition: opacity 0.6s linear;
}

.cinema.is-shown .cinema__backdrop {
  opacity: 1;
}

.cinema__stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--cin-w);
  height: var(--cin-h);
  margin: calc(var(--cin-h) / -2) 0 0 calc(var(--cin-w) / -2);
  overflow: hidden;
  background: #000;
  transform-origin: 50% 50%;
  transition:
    transform 0.8s var(--cin-ease),
    opacity 0.32s linear;
  will-change: transform;
}

.cinema.is-switching .cinema__stage {
  opacity: 0;
}

.cinema__poster,
.cinema__stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cinema__poster {
  background: center / cover no-repeat;
  transition:
    opacity 0.7s linear,
    scale 0.8s var(--cin-ease);
}

.cinema__stage video {
  max-width: none;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 0.9s linear;
}

.cinema.is-started .cinema__poster {
  opacity: 0;
}

.cinema.is-started .cinema__stage video {
  opacity: 1;
}

.cinema__tap {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Centre glyph: a quiet ring with a play mark while paused, and a short flash
   on every play / pause. */
.cinema__glyph {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  border: 1px solid rgba(242, 238, 232, 0.55);
  border-radius: 50%;
  background: rgba(7, 7, 9, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  scale: 0.9;
  transition:
    opacity 0.35s linear,
    scale 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  cursor: pointer;
}

.cinema__glyph i,
.cinema-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid currentColor;
}

.cinema__glyph[data-kind="pause"] i {
  width: 14px;
  height: 18px;
  margin-left: 0;
  border: 0;
  border-right: 4px solid currentColor;
  border-left: 4px solid currentColor;
}

.cinema.is-shown.is-started:not(.is-playing):not(.is-loading) .cinema__glyph,
.cinema.is-shown:not(.is-started):not(.is-playing):not(.is-loading) .cinema__glyph {
  opacity: 1;
  scale: 1;
  pointer-events: auto;
}

.cinema.is-shown:not(.is-playing) .cinema__glyph i {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-right: 0;
  border-bottom: 9px solid transparent;
  border-left: 15px solid currentColor;
}

.cinema__glyph.is-flash {
  animation: cinema-flash 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes cinema-flash {
  0% { opacity: 1; scale: 0.86; }
  100% { opacity: 0; scale: 1.25; }
}

.cinema__loading {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border: 1px solid rgba(242, 238, 232, 0.18);
  border-top-color: rgba(242, 238, 232, 0.9);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s linear 0.25s;
  animation: cinema-spin 0.9s linear infinite;
  pointer-events: none;
}

.cinema.is-shown.is-loading .cinema__loading {
  opacity: 1;
}

@keyframes cinema-spin {
  to { rotate: 360deg; }
}

/* Overlay UI */
.cinema__ui {
  opacity: 0;
  transition: opacity 0.5s linear;
  pointer-events: none;
}

.cinema.is-shown.is-ui .cinema__ui {
  opacity: 1;
  pointer-events: auto;
}

.cinema__top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(18px, 2.4vw, 34px) 48px;
  background: linear-gradient(rgba(7, 7, 9, 0.62), transparent);
}

.cinema__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.78;
}

.cinema__brand i {
  display: block;
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.cinema__brand b {
  font-weight: 700;
  color: var(--hot-lift);
}

.cinema__close,
.cinema__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 0.2s linear;
}

.cinema__close:hover,
.cinema__close:focus-visible,
.cinema__btn:hover,
.cinema__btn:focus-visible {
  opacity: 1;
}

.cinema__close i {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(242, 238, 232, 0.5);
  border-radius: 50%;
  transition:
    background 0.25s linear,
    rotate 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.cinema__close i::before,
.cinema__close i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  margin: 0 0 0 -6px;
  background: currentColor;
  rotate: 45deg;
  content: "";
}

.cinema__close i::after {
  rotate: -45deg;
}

.cinema__close:hover i {
  background: rgba(242, 238, 232, 0.12);
  rotate: 90deg;
}

/* Previous / next films, on the side edges. */
.cinema__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 36vh;
  margin-top: -18vh;
  padding: 0 clamp(18px, 2.4vw, 34px);
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.cinema__nav--prev {
  left: 0;
  text-align: left;
}

.cinema__nav--next {
  right: 0;
  text-align: right;
}

.cinema__nav i {
  position: relative;
  display: block;
  width: 30px;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
  transition: width 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.cinema__nav i::before {
  position: absolute;
  top: -4px;
  width: 9px;
  height: 9px;
  border-top: 1px solid currentColor;
  content: "";
}

.cinema__nav--prev i::before {
  left: 0;
  border-left: 1px solid currentColor;
  rotate: -45deg;
}

.cinema__nav--next i::before {
  right: 0;
  border-right: 1px solid currentColor;
  rotate: 45deg;
}

.cinema__nav span {
  display: grid;
  gap: 8px;
  opacity: 0;
  translate: 0 6px;
  transition:
    opacity 0.3s linear,
    translate 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.cinema__nav small {
  font: inherit;
  opacity: 0.6;
}

.cinema__nav b {
  font-family: var(--zh);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
}

.cinema__nav:hover i,
.cinema__nav:focus-visible i {
  width: 46px;
}

.cinema__nav:hover span,
.cinema__nav:focus-visible span {
  opacity: 1;
  translate: 0 0;
}

/* Bottom: title block, progress line, controls. */
.cinema__bottom {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: grid;
  gap: 16px;
  padding: 120px clamp(18px, 2.4vw, 34px) 20px;
  background: linear-gradient(transparent, rgba(7, 7, 9, 0.5) 40%, rgba(7, 7, 9, 0.82));
}

.cinema__info {
  display: grid;
  justify-items: start;
  gap: 12px;
  transition:
    opacity 0.3s linear,
    translate 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.cinema.is-switching .cinema__info {
  opacity: 0;
  translate: 0 10px;
}

.cinema__info small {
  font: inherit;
  opacity: 0.72;
}

.cinema__info h2 {
  margin: 0;
  font-family: var(--zh);
  font-size: clamp(38px, 4.4vw, 74px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: none;
}

.cinema__info em {
  padding: 7px 12px 8px;
  border: 1px solid rgba(242, 238, 232, 0.78);
  background: rgba(7, 7, 9, 0.38);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-family: var(--zh);
  font-size: 15px;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: none;
}

.cinema__info em[hidden] {
  display: none;
}

.cinema__progress {
  position: relative;
  height: 18px;
  cursor: pointer;
  touch-action: none;
}

.cinema__progress::before,
.cinema__buffer,
.cinema__played {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 2px;
  transform-origin: 0 50%;
  transition: height 0.2s cubic-bezier(0.23, 1, 0.32, 1), bottom 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.cinema__progress::before {
  background: rgba(242, 238, 232, 0.16);
  content: "";
}

.cinema__buffer {
  background: rgba(242, 238, 232, 0.28);
  transform: scaleX(0);
}

.cinema__played {
  background: var(--hot-lift);
  transform: scaleX(0);
}

.cinema__progress:hover::before,
.cinema__progress:hover .cinema__buffer,
.cinema__progress:hover .cinema__played,
.cinema.is-scrubbing .cinema__progress::before,
.cinema.is-scrubbing .cinema__buffer,
.cinema.is-scrubbing .cinema__played {
  bottom: 7px;
  height: 4px;
}

.cinema__hover-time {
  position: absolute;
  bottom: 22px;
  left: 0;
  padding: 5px 7px;
  background: rgba(242, 238, 232, 0.94);
  color: #111015;
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0;
  translate: -50% 0;
  transition: opacity 0.15s linear;
  pointer-events: none;
}

.cinema__progress:hover .cinema__hover-time {
  opacity: 1;
}

.cinema__controls {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 24px);
}

.cinema__btn--play {
  width: 22px;
  justify-content: center;
}

.cinema__btn--play .cinema-icon {
  margin-left: 2px;
  border-top-width: 7px;
  border-bottom-width: 7px;
  border-left-width: 12px;
}

.cinema.is-playing .cinema__btn--play .cinema-icon {
  width: 11px;
  height: 14px;
  margin-left: 0;
  border: 0;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.cinema__time {
  display: inline-flex;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

.cinema__time i {
  font-style: normal;
  opacity: 0.5;
}

.cinema__spacer {
  flex: 1;
}

.cinema__btn b {
  font-weight: 700;
  color: var(--hot-lift);
}

.cinema.is-muted .cinema__btn b {
  color: inherit;
  opacity: 0.6;
}

.cinema__volume {
  --range-p: 85%;

  width: 88px;
  height: 14px;
  margin: 0 6px 0 -10px;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.cinema__volume::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(90deg, #f2eee8 var(--range-p), rgba(242, 238, 232, 0.25) var(--range-p));
}

.cinema__volume::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border-radius: 50%;
  background: #f2eee8;
  -webkit-appearance: none;
  appearance: none;
}

.cinema__volume::-moz-range-track {
  height: 1px;
  background: rgba(242, 238, 232, 0.25);
}

.cinema__volume::-moz-range-progress {
  height: 1px;
  background: #f2eee8;
}

.cinema__volume::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #f2eee8;
}

@media (hover: none), (max-width: 700px) {
  .cinema__top {
    padding: 14px 16px 40px;
  }

  .cinema__brand i {
    width: 14px;
  }

  .cinema__nav {
    height: 22vh;
    margin-top: -11vh;
    padding: 0 12px;
  }

  .cinema__nav span {
    display: none;
  }

  .cinema__bottom {
    gap: 12px;
    padding: 80px 16px max(16px, env(safe-area-inset-bottom));
  }

  .cinema__info h2 {
    font-size: clamp(30px, 8.5vw, 44px);
  }

  .cinema__info em {
    padding: 6px 10px 7px;
    font-size: 13px;
  }

  .cinema__volume {
    display: none;
  }

  .cinema__glyph {
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinema__stage {
    transition: opacity 0.2s linear;
  }
}

/* Scope films (2.33:1 inside a 16:9 file) fill their card instead of showing
   black bars: --crop scales picture and poster past the baked-in bars. */
.video-slot video {
  scale: var(--crop, 1);
}

.video-slot[style*="--poster"] {
  background:
    linear-gradient(to top, color-mix(in srgb, var(--ink) 70%, transparent), transparent 46%),
    var(--poster) center / auto calc(var(--crop, 1) * 100%) no-repeat,
    var(--ink);
}

/* Fullscreen button: label plus a corner icon that turns inward when active. */
.cinema__btn--full svg {
  width: 14px;
  height: 14px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: scale 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.cinema__btn--full:hover svg {
  scale: 1.15;
}

.cinema-full-icon .exit,
.cinema.is-fullscreen .cinema-full-icon .enter {
  display: none;
}

.cinema.is-fullscreen .cinema-full-icon .exit {
  display: inline;
}

/* ---------- Music control ----------
   The round button keeps its place; while music plays the dashed orbit turns
   slowly like a record and the bars move unevenly. Hovering slides out a
   panel with the track, its state and the volume. */
.sound-panel {
  position: relative;
  z-index: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  box-sizing: border-box;
  width: 0;
  height: 58px;
  margin-right: -29px;
  padding: 0;
  overflow: hidden;
  border: 0 solid var(--ink);
  border-radius: 29px 0 0 29px;
  background: var(--paper);
  color: var(--ink);
  font: 700 9px/1 Consolas, "Courier New", monospace;
  letter-spacing: 0.12em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    width 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s linear;
}

.sound-control:hover .sound-panel,
.sound-control:focus-within .sound-panel {
  width: 248px;
  padding: 0 44px 0 22px;
  border-width: 1px;
  opacity: 1;
  pointer-events: auto;
}

.sound-panel__state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: color-mix(in srgb, var(--ink) 60%, var(--paper));
}

.sound-panel__state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 35%, var(--paper));
}

.sound-control.is-playing .sound-panel__state i {
  background: var(--hot);
  animation: kx-blink 1.6s ease-in-out infinite;
}

.sound-panel__track {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.sound-panel__track i {
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.sound-panel__vol {
  display: flex;
  align-items: center;
  gap: 8px;
  color: color-mix(in srgb, var(--ink) 60%, var(--paper));
}

.sound-panel__vol input {
  flex: 1 1 auto;
  min-width: 0;
  height: 12px;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
}

.sound-panel__vol input::-webkit-slider-runnable-track {
  height: 1px;
  background: currentColor;
}

.sound-panel__vol input::-webkit-slider-thumb {
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--paper);
  -webkit-appearance: none;
  appearance: none;
}

.sound-panel__vol input::-moz-range-track {
  height: 1px;
  border: 0;
  background: currentColor;
}

.sound-panel__vol input::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--paper);
}

.sound-panel__vol output {
  flex: 0 0 18px;
  color: var(--ink);
  text-align: right;
}

.sound-toggle__orbit::before {
  background: var(--hot);
}

.sound-control.is-playing .sound-toggle__orbit {
  animation: sound-orbit 16s linear infinite;
}

@keyframes sound-orbit {
  to { rotate: 360deg; }
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars i {
  animation: sound-bar-live 1s ease-in-out infinite;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(1) { animation-duration: 0.9s; animation-delay: -0.2s; }
.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(2) { animation-duration: 1.25s; animation-delay: -0.7s; }
.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(3) { animation-duration: 0.75s; animation-delay: -0.4s; }
.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(4) { animation-duration: 1.4s; animation-delay: -1s; }
.sound-toggle[aria-pressed="true"] .sound-toggle__bars i:nth-child(5) { animation-duration: 1.05s; animation-delay: -0.55s; }

@keyframes sound-bar-live {
  0%, 100% { height: 4px; }
  22% { height: 15px; }
  41% { height: 8px; }
  63% { height: 19px; }
  82% { height: 6px; }
}

@media (hover: none), (max-width: 700px) {
  .sound-panel {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sound-control.is-playing .sound-toggle__orbit,
  .sound-toggle[aria-pressed="true"] .sound-toggle__bars i {
    animation: none;
  }
}

/* Quality switch: 720p by default, "1080P" lights up in the accent when on. */
.cinema__btn--hd {
  padding: 4px 7px;
  border: 1px solid rgba(242, 238, 232, 0.45);
  line-height: 1;
}

.cinema.is-hd .cinema__btn--hd {
  border-color: var(--hot-lift);
  color: var(--hot-lift);
  opacity: 1;
}

@media (max-width: 700px) {
  /* Narrow screens: the corner icon alone says full screen. */
  .cinema__btn--full span {
    display: none;
  }
}
