:root {
  --bg: #121212;
  --surface: #1b1b1b;
  --line: #2a2a2a;
  --text: #f4f4f2;
  --muted: #a3a3a0;
  --g2: #4bff7a;
  --radius: 20px;
  --gap: 12px;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --dot: "DotGothic16", "Osaka-Mono", monospace;
  color-scheme: dark;
}

@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 400; font-display: swap; src: url("fonts/zen-kaku-400.woff2") format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 700; font-display: swap; src: url("fonts/zen-kaku-700.woff2") format("woff2"); }
@font-face { font-family: "Zen Kaku Gothic New"; font-weight: 900; font-display: swap; src: url("fonts/zen-kaku-900.woff2") format("woff2"); }
@font-face { font-family: "DotGothic16"; font-weight: 400; font-display: swap; src: url("fonts/dotgothic16-400.woff2") format("woff2"); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
a, button { touch-action: manipulation; }
h1, h2 { text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 16px; border-radius: 999px; background: var(--text); color: #121212; font-weight: 700; font-size: 14px; }
.skip:focus { top: 12px; }
html.paused *, html.paused *::before, html.paused *::after { animation-play-state: paused !important; }
.chip.pause { flex: none; border: 1px solid var(--line); background: var(--surface); }
.work-media > .chip.pause { position: absolute; right: 12px; bottom: 12px; z-index: 2; background: rgba(18, 18, 18, .82); color: var(--text); }
/* The looping video carries a burned-in disclosure at bottom right. */
.work-media:has(video.vid) > .chip.pause { right: auto; left: 12px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  word-break: auto-phrase;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1560px; margin: 0 auto; padding: 0 20px; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 28px; }
.brand { font-weight: 900; font-size: 20px; letter-spacing: -0.02em; }
.nav a.link { font-size: 14px; color: var(--muted); transition: color .15s; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--text); }
.pill-btn {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 700;
}
.pill-btn:hover { background: #242424; }

/* hero */
.hero { text-align: center; padding-block: 72px 56px; }
.hero h1 {
  margin: 0 auto;
  font-size: clamp(40px, 6.4vw, 84px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.hero h1 .soft { font-weight: 400; color: var(--muted); letter-spacing: -0.03em; }
.hero p { max-width: 34em; margin: 24px auto 0; color: var(--muted); font-size: 16px; }
.hero .cta {
  display: inline-flex; align-items: center; height: 48px; padding: 0 28px; margin-top: 32px;
  border-radius: 999px; background: linear-gradient(180deg, #ffffff, #dfe6ff);
  color: #121212; font-weight: 700; font-size: 16px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 8px 30px rgba(185,199,255,.18);
}
.hero .cta:hover { filter: brightness(1.04); }

/* filter */
.filters { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.chips { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); flex: none; }
.chip {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 14px; padding: 6px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: #2c2c2c; color: var(--text); font-weight: 700; }
.count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.filters .chip.pause { margin-left: auto; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px var(--gap); align-items: start; }
.col { display: contents; }
.card { display: block; order: var(--o, 0); }
.card .meta { flex-wrap: wrap; }
.card .meta h3 { flex: 0 0 100%; font-size: 16px; }
.card[hidden] { display: none; }
.media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); isolation: isolate;
}
.r-1610 { aspect-ratio: 16 / 10; }
.r-43 { aspect-ratio: 4 / 3; }
.r-169 { aspect-ratio: 16 / 9; }
.card .media { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.card:hover .media { transform: scale(.985); }
.meta { display: flex; align-items: baseline; gap: 8px; padding: 10px 2px 0; }
.meta h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
.meta .cat { font-size: 12px; color: var(--muted); white-space: nowrap; }
.meta .state {
  margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px;
}
.card .desc { margin: 4px 2px 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* gallery preview. Entry uses a transition: html.paused would freeze a keyframe animation at frame 0. */
html:has(.pv[open]) { overflow: hidden; }
.pv {
  width: min(760px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--text); overflow: auto; overscroll-behavior: contain;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.7,.2,1);
}
.pv::backdrop { background: rgba(0, 0, 0, .78); transition: opacity .2s ease; }
@starting-style {
  .pv[open] { opacity: 0; transform: scale(.96); }
  .pv[open]::backdrop { opacity: 0; }
}
.pv .media { border-radius: 0; }
.pv .media:has(.shots) { aspect-ratio: 1400 / 686; }
.pv-info { padding: 14px 20px 0; }
.pv-info .meta { padding: 0; }
.pv-info .meta h3 { font-size: 22px; font-weight: 900; letter-spacing: -0.02em; }
.pv-info .desc { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.pv-actions { display: flex; justify-content: flex-end; padding: 16px 20px 20px; }
.pv-close { position: absolute; top: 12px; right: 12px; z-index: 2; border: 1px solid var(--line); background: rgba(18, 18, 18, .82); color: var(--text); }

/* media: screenshots that drift */
.shots { position: absolute; inset: 0; }
.shots img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center;
  animation: drift 16s ease-in-out infinite;
}
.shots img + img { opacity: 0; animation: drift 16s ease-in-out infinite, swap 16s ease-in-out infinite; }
.shots.single img { animation: drift-pan 18s ease-in-out infinite; }
.shots img { transform-origin: 50% 0; }
.shots.single img { transform-origin: 38% 0; object-position: 38% 0; }
.r-shot { aspect-ratio: 1400 / 686; }
@keyframes drift { 0%,100% { transform: scale(1.02); } 50% { transform: scale(1.08); } }
@keyframes drift-pan { 0%,100% { transform: scale(1.04) translate(0, 0); } 50% { transform: scale(1.12) translate(-2%, -3%); } }
@keyframes swap { 0%,46% { opacity: 0; } 49%,96% { opacity: 1; } 99%,100% { opacity: 0; } }
.shots::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); border-radius: inherit; }

/* media: G2 display */
.hud {
  position: absolute; inset: 0; display: grid; place-items: center; container-type: inline-size;
  background: radial-gradient(120% 90% at 50% 40%, #0d1a11 0%, #050806 60%, #020302 100%);
}
.hud .lens {
  width: 82%; aspect-ratio: 2 / 1; position: relative;
  border-radius: 14px; padding: 4.2% 4.8%;
  color: var(--g2); font-family: var(--dot); font-size: 2.5cqw; line-height: 1.5;
  text-shadow: 0 0 8px rgba(75,255,122,.55);
}
.hud .lens::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  border: 1px solid rgba(75,255,122,.18);
  background: repeating-linear-gradient(0deg, rgba(75,255,122,.035) 0 2px, transparent 2px 4px);
  pointer-events: none;
}
.hud .line { white-space: pre; overflow: hidden; min-height: 1.5em; }
.hud .caret { display: inline-block; width: .55em; height: 1em; background: var(--g2); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hud .wave { display: flex; align-items: center; gap: 3%; height: 34%; width: 62%; margin: 4% 0 3%; }
.hud .wave i { flex: 1; max-width: 1.1em; height: 100%; background: var(--g2); border-radius: 2px; box-shadow: 0 0 8px rgba(75,255,122,.5); transform: scaleY(.14); animation: wave 1.4s ease-in-out infinite; }
@keyframes wave { 0%,100% { transform: scaleY(.14); } 50% { transform: scaleY(1); } }

/* sections */
.section { padding-block: 112px 40px; }
.section h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.2; margin: 0 0 28px; }
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; border-top: 1px solid var(--line); padding-top: 40px; }
.about p { margin: 0 0 1em; max-width: 36em; }
.about dl { margin: 0; display: grid; gap: 20px; }
.about dt { font-size: 13px; color: var(--muted); }
.about dd { margin: 2px 0 0; }
.links { display: flex; gap: 10px; flex-wrap: wrap; }

.footer { padding-block: 56px 40px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* work page */
.back { display: inline-block; margin: 24px 0 20px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--text); }
.work-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin: 40px 0 0; }
.work-head h1 { margin: 0; font-size: clamp(34px, 5vw, 64px); font-weight: 900; letter-spacing: -0.035em; line-height: 1.1; }
.work-head .cat { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.lede { font-size: 18px; max-width: 38em; margin: 20px 0 0; }
.visit {
  display: inline-flex; align-items: center; height: 48px; padding: 0 26px; border-radius: 999px;
  background: var(--text); color: #121212; font-weight: 700; white-space: nowrap;
}
.visit:hover { background: #fff; }
.visit.off { background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: default; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 40px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.fact.wide { grid-column: 1 / -1; }
.fact h2 { font-size: 15px; font-weight: 700; color: var(--muted); margin: 0 0 12px; letter-spacing: 0; }
.fact ul { margin: 0; padding-left: 1.2em; }
.fact li { margin: 0 0 .5em; }
.fact p { margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 48px; }
.feature-grid h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; line-height: 1.4; }
.feature-grid li { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0 !important; }
.tags li { margin: 0; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.next { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.next a:hover { color: var(--text); }
.work-media { margin-top: 32px; }

/* work page: a bento of screens, each tile opens that shop */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.tile {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  aspect-ratio: 1400 / 686; border-radius: 16px; background: var(--surface);
}
.tile.t-main { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; border-radius: var(--radius); }
.tile img {
  width: 100%; height: 100%; object-fit: cover; object-position: left top;
  transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .4s ease;
}
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  background: linear-gradient(180deg, transparent 55%, rgba(10,10,10,.55));
}
.tile:hover img { transform: scale(1.035); }
.tile-cap {
  position: absolute; left: 12px; bottom: 12px; z-index: 1; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; color: #e9e9e6; line-height: 1.5;
  background: rgba(18,18,18,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1); white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}
.tile-cap b { font-size: 13px; font-weight: 700; color: #fff; }
.tile-cap::after { content: "↗"; color: var(--muted); }
.t-main .tile-cap { left: 16px; bottom: 16px; padding: 7px 16px; font-size: 13px; }
.t-main .tile-cap b { font-size: 15px; }
@media (max-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile.t-main { grid-row: auto; aspect-ratio: 1400 / 686; }
  .bento > .tile:last-child { grid-column: span 2; }
  .tile-cap { left: 8px; bottom: 8px; padding: 3px 9px; font-size: 11px; }
  .tile:not(.t-main) .tile-cap { gap: 0; }
  .tile:not(.t-main) .tile-cap > :not(b) { display: none; }
  .tile:not(.t-main) .tile-cap::after { content: none; }
}

/* work page: sections with a table or a diagram */
.work-sec { margin-top: 64px; }
.work-sec > h2 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.3; }
.sec-lede { margin: 10px 0 0; color: var(--muted); max-width: 44em; }
.sec-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.tbl-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tbl { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; line-height: 1.65; }
.tbl th, .tbl td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.tbl thead th { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; background: #171717; white-space: nowrap; }
.tbl tbody th { font-weight: 900; font-size: 15px; white-space: nowrap; }
.tbl tbody tr:hover { background: #202020; }
.kind { display: inline-block; padding: 1px 10px; border-radius: 999px; border: 1px solid #3a3a3a; font-size: 12px; white-space: nowrap; }
.arch { margin: 20px 0 0; }
.arch-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(120% 120% at 20% 0%, #1d1d24 0%, #161616 55%, #141414 100%); padding: 18px 12px 10px; }
.arch svg { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--font); }
.arch .box { fill: #1f1f1f; stroke: #333; stroke-width: 1.2; }
.arch .box.hl { fill: #222230; stroke: #4a4f73; }
.arch .box.stripe { fill: #20203a; stroke: #6b6fe0; }
.arch .box.amz { fill: #2a2219; stroke: #b9874f; }
.arch .frame { fill: none; stroke: #444; stroke-dasharray: 6 6; }
.arch .t { fill: var(--text); font-size: 15px; font-weight: 700; }
.arch .s { fill: var(--muted); font-size: 12.5px; }
.arch .cap { fill: var(--muted); font-size: 12px; }
.arch .lb { fill: #c9ccff; font-size: 12px; }
.arch .ln { fill: none; stroke: #6a6a6a; stroke-width: 1.6; }
.arch .ln.acc { stroke: #8f93ff; }
.arch .ln.dash { stroke-dasharray: 5 5; }
.arch .ah { fill: #6a6a6a; }
.arch .ahs { fill: #8f93ff; }
.arch figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* card: several screens, one after another (the first stays underneath) */
.shots.cycle img + img { opacity: 0; animation: drift 16s ease-in-out infinite, cycle 24s linear infinite; animation-delay: 0s, calc(var(--i) * 4s); animation-fill-mode: none, backwards; }
.shots.cycle img { object-position: 6% 0; transform-origin: 6% 0; }
@keyframes cycle { 0% { opacity: 0; } 3%, 16.7% { opacity: 1; } 19.7%, 100% { opacity: 0; } }

@media (max-width: 960px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; gap: 32px; }
  .facts { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .work-head { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav-left a.link { display: none; }
  .nav-right { gap: 16px; }
  .hero { padding-block: 48px 40px; }
  .hero h1 { font-size: 33px; }
  .hero p { font-size: 15px; text-align: left; }
  .card .desc { display: none; }
  .pv-info .meta h3 { flex: 0 0 100%; }
  .count { display: none; }
  .meta { flex-wrap: wrap; }
}
/* hero ring: work screens on the inside of a slowly turning cylinder, seen from within.
   The middle is the far side; panels grow and turn toward the viewer at the edges.
   site.js sets each panel's angle (--a) and opacity (--op) and syncs the caption below
   with the work at the centre. Without JS, or with reduced motion, the card grid shows instead. */
.ring-stage {
  --w: 380px; --r: 1100px; --zc: 800px;
  display: none; position: relative; height: calc(var(--w) * .625 + 110px); margin: 0;
  overflow: hidden; perspective: 1000px; perspective-origin: 50% 50%;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
html.ring-on .ring-stage { display: block; }
.ring {
  position: absolute; left: 50%; top: 50%; width: var(--w); aspect-ratio: 16 / 10;
  margin-left: calc(var(--w) / -2); translate: 0 -50%;
  transform-style: preserve-3d; pointer-events: none;
}
.ring-item {
  pointer-events: auto;
  position: absolute; inset: 0; overflow: hidden; border-radius: 14px; background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
  transform: translateZ(var(--zc)) rotateY(var(--a, 0deg)) translateZ(calc(var(--r) * -1));
  opacity: var(--op, 0);
  -webkit-user-drag: none;
}
.ring-item[data-off] { visibility: hidden; }
.ring-item img { width: 100%; height: 100%; object-fit: cover; object-position: 6% 0; display: block; -webkit-user-drag: none; }
.ring-item .vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ring-item .vid.pixel { object-fit: contain; background: #000; image-rendering: pixelated; }
.ring-item .hud .lens { font-size: 2.8cqw; }
.ring-cap {
  position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: baseline; gap: 8px;
  max-width: calc(100% - 20px); padding: 4px 12px; border-radius: 999px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: rgba(18,18,18,.78); border: 1px solid rgba(255,255,255,.12); color: var(--muted); font-size: 12px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ring-cap b { color: #fff; font-size: 13px; font-weight: 700; }
@media (max-width: 720px) {
  .ring-cap { left: 6px; bottom: 6px; padding: 2px 8px; font-size: 10px; gap: 5px; }
  .ring-cap b { font-size: 11px; }
}

/* caption for the scene at the centre of the ring */
.stage-cap { text-align: center; max-width: 760px; margin: 0 auto 56px; transition: opacity .25s ease; }
.stage-cap[hidden] { display: none; }
.stage-cap > :not(.stepper) { transition: opacity .2s ease; }
.stage-cap.swap > :not(.stepper) { opacity: 0; }
.cap-work { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.cap-work a::after { content: " ↗"; }
.cap-work a:hover { color: var(--text); }
.cap-title { margin: 4px 0 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.35; }
.cap-text { margin: 8px auto 0; max-width: 36em; color: var(--muted); font-size: 15px; line-height: 1.8; min-height: 3.6em; }
.stepper { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 14px; }
.chip.step { border: 1px solid var(--line); background: var(--surface); padding: 6px 14px; }
.dots { display: flex; gap: 2px; }
.dot { appearance: none; border: 0; background: transparent; padding: 8px 5px; cursor: pointer; }
.dot::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 99px; background: #444; transition: width .25s ease, background .25s ease; }
.dot[aria-current="true"]::before { width: 22px; background: var(--text); }
.dot:hover::before { background: #888; }
@media (max-width: 720px) {
  .ring-stage { --w: 220px; --r: 600px; --zc: 430px; perspective: 540px; }
  .stage-cap { margin-bottom: 40px; }
  .cap-text { font-size: 14px; min-height: 5.4em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .shots img + img { opacity: 0; }
  .chip.pause { display: none; }
}

/* media: video */
.media .vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.work-figure { margin: 32px 0 0; }
.work-figure > a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.work-figure > a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.work-figure img { width: 100%; height: auto; display: block; }
.work-figure figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.work-video { margin: 32px 0 0; }
.work-video video { width: 100%; display: block; border-radius: var(--radius); background: #000; }
.work-video figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
/* With JS the video is a thumbnail beside its caption; a click opens it large (.vlb). */
.work-video:has(> .vthumb) { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 28px; align-items: center; }
.work-video:has(> .vthumb) figcaption { margin: 0; font-size: 14px; line-height: 1.8; }
.vthumb {
  position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #000; cursor: zoom-in; font: inherit; color: var(--text);
}
.vthumb video { height: auto; border-radius: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .2s ease; }
.vthumb:hover video { transform: scale(1.02); opacity: .85; }
.vthumb:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.vthumb .play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 999px; font-size: 14px; font-weight: 700;
  background: rgba(18,18,18,.78); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.vthumb .play::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent #fff; }
.vthumb .dur { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px; font-size: 12px; background: rgba(0,0,0,.7); }
html:has(.vlb[open]) { overflow: hidden; }
.vlb {
  width: min(1280px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0;
  border: 1px solid var(--line); border-radius: 14px; background: #000; color: var(--text); overflow: hidden;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.7,.2,1);
}
.vlb::backdrop { background: rgba(0, 0, 0, .86); transition: opacity .2s ease; }
@starting-style {
  .vlb[open] { opacity: 0; transform: scale(.96); }
  .vlb[open]::backdrop { opacity: 0; }
}
.vlb video { display: block; width: 100%; height: auto; max-height: calc(100dvh - 50px); background: #000; }
.vlb video.pixel { image-rendering: pixelated; }
.vlb .pv-close { top: 10px; right: 10px; }
@media (max-width: 900px) {
  .work-video:has(> .vthumb) { grid-template-columns: 1fr; gap: 10px; }
  .work-video:has(> .vthumb) figcaption { font-size: 13px; }
}
a.inline { text-decoration: underline; text-underline-offset: 3px; }
a.inline:hover { color: #fff; }
.work-video video.pixel { image-rendering: pixelated; }
.gh-link { margin: 16px 0 0; }

/* work page lead: the loop video beside a short note on the device */
.lead-split { display: grid; grid-template-columns: minmax(0, 760px) minmax(260px, 1fr); gap: 32px; align-items: center; margin-top: 32px; }
.lead-split > .work-media { margin: 0; }
.device { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.device h2 { margin: 12px 0 0; font-size: 20px; font-weight: 900; letter-spacing: -0.01em; }
.device p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.device .device-note { font-size: 12px; }
.device .pill-btn { margin-top: 16px; }
.device-art { display: block; width: 100%; max-width: 280px; height: auto; }
.device-art .frame { fill: none; stroke: #8a8a8a; stroke-width: 4; stroke-linecap: round; }
.device-art .lens { fill: #1b2a1f; opacity: .55; }
.device-art .hud-line { fill: #4bff7a; }
.device-art .hud-line.dim { opacity: .55; }
@media (max-width: 900px) {
  .lead-split { grid-template-columns: 1fr; gap: 16px; }
}

/* links that are not open yet: they say 準備中 when pressed and go nowhere */
button.soon { appearance: none; font: inherit; cursor: pointer; }
button.link.soon, button.inline.soon { background: none; border: 0; padding: 0; color: inherit; }
button.inline.soon { text-decoration: underline; text-underline-offset: 3px; }
button.soon[data-busy] { color: var(--muted); }
button.pill-btn.soon { color: var(--text); }

/* EC page: one store per row, image and text alternating left and right */
.showcase-sec { margin-top: 56px; }
.showcase { display: grid; gap: clamp(56px, 8vw, 120px); margin-top: clamp(32px, 4vw, 56px); }
.sc-row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.sc-row:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.sc-row:nth-child(even) .sc-media { order: 2; }
.sc-media {
  display: block; position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); aspect-ratio: 1400 / 686;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.sc-media img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; display: block; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.sc-media:hover img { transform: scale(1.03); }
.sc-kind { display: flex; align-items: baseline; gap: 14px; margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.sc-num { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.sc-num::after { content: ""; display: inline-block; width: 28px; height: 1px; margin-left: 14px; vertical-align: middle; background: var(--line); }
.sc-text h3 { margin: 10px 0 0; font-size: clamp(30px, 3.6vw, 48px); font-weight: 900; letter-spacing: -0.03em; line-height: 1.1; }
.sc-desc { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.sc-facts { margin: 20px 0 0; display: grid; gap: 10px; }
.sc-facts div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.sc-facts dt { color: var(--muted); }
.sc-facts dd { margin: 0; line-height: 1.7; }
.sc-pay { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.sc-pay li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--muted); }
.sc-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; font-weight: 700; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.sc-link::after { content: "→"; transition: transform .25s ease; }
.sc-link:hover::after { transform: translateX(4px); }
/* reveal on scroll (site.js adds .reveal-on and .in) */
html.reveal-on .sc-row .sc-media, html.reveal-on .sc-row .sc-text { opacity: 0; transition: opacity .9s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
html.reveal-on .sc-row .sc-media { transform: translateX(-48px) scale(.98); }
html.reveal-on .sc-row:nth-child(even) .sc-media { transform: translateX(48px) scale(.98); }
html.reveal-on .sc-row .sc-text { transform: translateY(24px); transition-delay: .12s; }
html.reveal-on .sc-row.in .sc-media, html.reveal-on .sc-row.in .sc-text { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .sc-row, .sc-row:nth-child(even) { grid-template-columns: 1fr; gap: 20px; }
  .sc-row:nth-child(even) .sc-media { order: 0; }
  html.reveal-on .sc-row .sc-media, html.reveal-on .sc-row:nth-child(even) .sc-media { transform: translateY(32px); }
}
