/* ==========================================================
   Kaikis — manga ink theme
   Light paper, heavy ink outlines, halftone, speed lines.
   ========================================================== */

:root {
  --paper: #fffaf1;
  --paper-2: #fff1dd;
  --surface: #ffffff;
  --ink: #16130f;
  --k: #16130f;          /* fixed dark: text on accent fills */
  --w: #ffffff;          /* fixed white: text on accent fills */
  --on-ink: #ffffff;     /* text on an ink-filled chip */
  --pop-fill: #ffffff;   /* fill of outlined display text */
  --nav-bg: rgba(255, 250, 241, 0.92);
  --scrim: rgba(255, 250, 241, 0.94);
  --dot: rgba(22, 19, 15, 0.075);
  --dot-strong: rgba(22, 19, 15, 0.18);
  --hair: rgba(22, 19, 15, 0.2);
  --ink-2: #4b443b;
  --ink-3: #6e665a;
  --orange: #ff6a13;
  --orange-2: #ff8a3d;
  --orange-soft: #ffe3cc;
  --teal: #10b3a3;
  --teal-soft: #d3f4ef;
  --pink: #ff3d7f;
  --pink-soft: #ffdbe7;
  --yellow: #ffd43b;
  --yellow-soft: #fff3c2;
  --sky: #c9e9ff;
  --burst: var(--orange-soft);
  /* accent colours used as small text need more contrast on paper */
  --orange-text: #c2410c;
  --teal-text: #0d7a70;
  --pink-text: #c81e5b;
  color-scheme: light;

  --line: 3px solid var(--ink);
  --line-thin: 2px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);
  --radius: 6px;

  --f-display: "Dela Gothic One", "Zen Kaku Gothic New", system-ui, sans-serif;
  --f-tag: "Permanent Marker", "Comic Sans MS", cursive;
  --f-body: "Zen Kaku Gothic New", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Night mode: an inverted manga page, cream ink on a dark sheet.
   Day is the default; night only applies once a visitor flips the switch (data-theme). */

:root[data-theme="dark"] {
  --paper: #15131c;
  --paper-2: #1c1926;
  --surface: #232030;
  --ink: #f4ead7;
  --ink-2: #d2c7b5;
  --ink-3: #a09584;
  --orange-soft: #3d2618;
  --teal-soft: #11312e;
  --pink-soft: #3b1b2a;
  --yellow-soft: #383116;
  --on-ink: #15131c;
  --pop-fill: #15131c;
  --nav-bg: rgba(21, 19, 28, 0.9);
  --scrim: rgba(21, 19, 28, 0.94);
  --dot: rgba(244, 234, 215, 0.07);
  --dot-strong: rgba(244, 234, 215, 0.16);
  --hair: rgba(244, 234, 215, 0.2);
  --burst: #2a2142;
  --orange-text: var(--orange);
  --teal-text: var(--teal);
  --pink-text: var(--pink);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.6px);
  background-size: 16px 16px;
  overflow-x: clip;
}

/* ribbons and SFX bleed past the edges on purpose; clip here (not on body, which propagates to the viewport) */
main { overflow-x: clip; }

img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--yellow); color: var(--k); }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.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: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 14px; border-radius: 6px; text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */

h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }

.pop {
  color: var(--pop-fill);
  -webkit-text-stroke: 0.08em var(--ink);
  paint-order: stroke fill;
  text-shadow: 0.07em 0.07em 0 var(--ink);
}
.pop--orange { color: var(--orange); }
.pop--teal { color: var(--teal); }
.pop--yellow { color: var(--yellow); }

.marker {
  background: linear-gradient(transparent 55%, var(--yellow) 55%, var(--yellow) 90%, transparent 90%);
  padding: 0 0.12em;
  color: var(--k);
}

.chapter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.chapter .ep {
  background: var(--ink);
  color: var(--on-ink);
  padding: 4px 10px 3px;
  border-radius: 3px;
  letter-spacing: 0.08em;
}
.chapter .jp { color: var(--orange-text); font-size: 15px; letter-spacing: 0.04em; }

.sec-title { font-size: clamp(36px, 6vw, 68px); margin-bottom: 16px; }
.sec-lede { font-size: 18px; color: var(--ink-2); max-width: 620px; }

.tag {
  font-family: var(--f-tag);
  color: var(--pink-text);
  font-size: 20px;
  transform: rotate(-4deg);
  display: inline-block;
}

/* ---------- buttons & chips ---------- */

.btn {
  --bg: var(--orange);
  --fg: var(--k);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 12px;
  font-family: var(--f-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--white { --bg: var(--surface); --fg: var(--ink); }
.btn--ink { --bg: var(--ink); --fg: var(--on-ink); }
.btn--teal { --bg: var(--teal); }
.btn--yellow { --bg: var(--yellow); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 11px;
  border: var(--line-thin);
  border-radius: 999px;
  background: var(--surface);
  line-height: 1.5;
}
.chip--o { background: var(--orange-soft); }
.chip--t { background: var(--teal-soft); }
.chip--p { background: var(--pink-soft); }
.chip--y { background: var(--yellow-soft); }

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--k);
  border: var(--line-thin);
  border-radius: 4px;
  padding: 5px 10px 4px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
}
.sticker--teal { background: var(--teal); }
.sticker--pink { background: var(--pink); color: var(--k); }
.sticker--white { background: var(--surface); color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); border: 2px solid var(--ink); box-shadow: 0 0 0 0 rgba(16, 179, 163, 0.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(16, 179, 163, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 179, 163, 0); } }

/* ---------- panels ---------- */

.panel {
  background: var(--surface);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.halftone {
  background-image: radial-gradient(var(--ink) 1.3px, transparent 1.8px);
  background-size: 9px 9px;
}

.speedlines {
  background:
    radial-gradient(circle at 50% 50%, var(--paper) 0 24%, transparent 46%),
    repeating-conic-gradient(from 0deg at 50% 50%, var(--ink) 0deg 0.9deg, transparent 0.9deg 7.5deg);
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-size: 22px; letter-spacing: 0.02em; }
.logo .seal {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--orange);
  color: var(--w);
  border: var(--line-thin);
  border-radius: 8px;
  font-size: 17px;
  transform: rotate(-6deg);
  box-shadow: 2px 2px 0 var(--ink);
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a {
  display: block;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 2px solid transparent;
}
.nav-links a:hover { border-color: var(--ink); background: var(--yellow-soft); }
.nav-links a[aria-current="page"] { border-color: var(--ink); background: var(--orange-soft); }
.nav-links .btn { padding: 9px 16px 8px; font-size: 14px; margin-left: 8px; }
.nav-links .btn:hover { background: var(--orange); }

.menu-btn {
  display: none;
  width: 46px;
  height: 46px;
  border: var(--line);
  border-radius: 8px;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  padding: 0;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 3px; background: var(--k); border-radius: 2px; margin: 0 auto; position: relative; transition: transform 0.2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px var(--gutter) 22px;
    background: var(--paper);
    border-bottom: var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 18px; padding: 10px 12px; }
  .nav-links .btn { margin: 6px 0 0; justify-content: center; }
}

/* ---------- hero ---------- */

.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 clamp(56px, 8vw, 100px); }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

.hero-name { font-size: clamp(56px, 10.5vw, 132px); line-height: 0.92; margin: 18px 0 18px; }
.hero-name span { display: block; }
.hero-role { font-family: var(--f-display); font-size: clamp(18px, 2.4vw, 24px); margin-bottom: 26px; }
.hero-role .aka { font-family: var(--f-tag); color: var(--teal-text); font-size: 1.1em; margin-left: 6px; }

.bubble {
  position: relative;
  background: var(--surface);
  border: var(--line);
  border-radius: 26px;
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 500;
  max-width: 560px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
}
.bubble p:last-child { margin: 0; }
.bubble::before,
.bubble::after { content: ""; position: absolute; left: 46px; clip-path: polygon(0 0, 100% 0, 12% 100%); }
.bubble::before { bottom: -27px; width: 34px; height: 28px; background: var(--ink); }
.bubble::after { bottom: -19px; left: 50px; width: 25px; height: 20px; background: var(--surface); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art { position: relative; aspect-ratio: 1 / 1.08; max-width: 480px; justify-self: center; width: 100%; }
.hero-burst {
  position: absolute;
  inset: 0;
  border: var(--line);
  border-radius: var(--radius);
  background-color: var(--burst);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: rotate(2deg);
}
.hero-burst::before { content: ""; position: absolute; inset: -40%; opacity: 0.16; }
.hero-burst::before { background: repeating-conic-gradient(from 0deg at 50% 50%, var(--ink) 0deg 1deg, transparent 1deg 8deg); }
.hero-burst::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, var(--burst) 0 30%, transparent 62%); }

.hero-photo {
  position: absolute;
  left: 13%;
  right: 13%;
  top: 12%;
  bottom: 16%;
  border: var(--line);
  border-radius: 50% 50% 46% 54% / 56% 50% 50% 44%;
  overflow: hidden;
  background: var(--sky);
  z-index: 2;
  box-shadow: 6px 8px 0 var(--ink);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15) brightness(1.05); mix-blend-mode: multiply; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(22, 19, 15, 0.35) 1px, transparent 1.6px); background-size: 6px 6px; mix-blend-mode: multiply; pointer-events: none; }

.sfx {
  position: absolute;
  font-family: var(--f-display);
  color: var(--pop-fill);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--ink);
  line-height: 1;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}
.hero-sfx-1 { top: 2%; left: -4%; font-size: clamp(38px, 6vw, 62px); color: var(--pink); transform: rotate(-12deg); writing-mode: vertical-rl; }
.hero-sfx-2 { bottom: 6%; right: -3%; font-size: clamp(30px, 4.6vw, 48px); color: var(--yellow); transform: rotate(8deg); }

.lvl {
  position: absolute;
  z-index: 4;
  right: -10px;
  top: 8%;
  background: var(--teal);
  border: var(--line);
  border-radius: 12px;
  padding: 10px 14px 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transform: rotate(6deg);
}
.lvl b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--w); -webkit-text-stroke: 2px var(--k); paint-order: stroke fill; }
.lvl small { color: var(--k); font-family: var(--f-display); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

.name-card {
  position: absolute;
  z-index: 4;
  left: -14px;
  bottom: 5%;
  background: var(--surface);
  border: var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.name-card .jp { display: block; color: var(--orange-text); font-size: 18px; letter-spacing: 0.1em; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; margin-top: 10px; }
}

/* ---------- ribbon ---------- */

.ribbon {
  background: var(--orange);
  border-block: var(--line);
  transform: rotate(-1.6deg);
  margin: 0 -20px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}
.ribbon--teal { background: var(--teal); transform: rotate(1.2deg); }
.ribbon-track { display: flex; width: max-content; animation: slide 38s linear infinite; }
.ribbon-track span {
  font-family: var(--f-display);
  font-size: clamp(18px, 2.4vw, 26px);
  padding: 12px 0 10px;
  white-space: nowrap;
  color: var(--w);
  -webkit-text-stroke: 1.5px var(--k);
  paint-order: stroke fill;
}
.ribbon-track i { font-style: normal; color: var(--k); -webkit-text-stroke: 0; margin: 0 22px; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ribbon-track { animation: none; } }

/* ---------- stats ---------- */

.stats { padding: clamp(56px, 8vw, 90px) 0 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 22px 20px 18px; position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; opacity: 0.55; }
.stat:nth-child(1)::after { background: var(--orange-soft); }
.stat:nth-child(2)::after { background: var(--teal-soft); }
.stat:nth-child(3)::after { background: var(--pink-soft); }
.stat:nth-child(4)::after { background: var(--yellow-soft); }
.stat b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(38px, 4.6vw, 56px); line-height: 1; margin-bottom: 8px; position: relative; z-index: 1; }
.stat:nth-child(1) b { color: var(--orange-text); }
.stat:nth-child(2) b { color: var(--teal-text); }
.stat:nth-child(3) b { color: var(--pink-text); }
.stat:nth-child(4) b { color: var(--ink); }
.stat span { font-family: var(--f-display); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); display: block; position: relative; z-index: 1; }
.stat small { display: block; font-size: 13px; color: var(--ink-3); margin-top: 4px; position: relative; z-index: 1; }
@media (max-width: 860px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- sections ---------- */

.section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.section-head { margin-bottom: clamp(32px, 5vw, 52px); }
.section-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

.band { background: var(--paper-2); border-block: var(--line); }

/* ---------- work (manga page) ---------- */

.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.work-card { grid-column: span 2; display: flex; flex-direction: column; text-decoration: none; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.work-card--big { grid-column: span 3; }
.work-card:hover { transform: translate(-3px, -3px) rotate(-0.4deg); box-shadow: var(--shadow-lg); }
.work-card:nth-child(even):hover { transform: translate(-3px, -3px) rotate(0.4deg); }

.work-media { position: relative; aspect-ratio: 16 / 10; border-bottom: var(--line); overflow: hidden; background: var(--paper-2); }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.4s ease; }
.work-card:hover .work-media img { transform: scale(1.04); }
.work-media .sticker { position: absolute; top: 14px; left: 14px; z-index: 2; }

.work-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.work-ep { font-family: var(--f-display); font-size: 12px; letter-spacing: 0.14em; color: var(--orange-text); margin-bottom: 6px; }
.work-body h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 10px; }
.work-body p { color: var(--ink-2); font-size: 15.5px; }
.work-body .chips { margin-bottom: 16px; }
.work-more { margin-top: auto; font-family: var(--f-display); font-size: 14px; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 8px; }
.work-more::after { content: "→"; transition: transform 0.2s; }
.work-card:hover .work-more::after { transform: translateX(5px); }

.work-card--wide { grid-column: 1 / -1; flex-direction: row; }
.work-card--wide .work-media { flex: 0 0 50%; aspect-ratio: auto; min-height: 280px; border-bottom: 0; border-right: var(--line); }

/* stand-in art for products without public screenshots */
.flow-art { position: absolute; inset: 0; display: flex; flex-wrap: wrap; align-content: center; align-items: center; justify-content: center; gap: 10px; padding: 64px 18px 14px; background-color: var(--teal-soft); }
.flow-art::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--dot-strong) 1.2px, transparent 1.7px); background-size: 9px 9px; }
.flow-art span { position: relative; font-family: var(--f-display); font-size: clamp(11px, 1.2vw, 13px); letter-spacing: 0.04em; text-align: center; background: var(--surface); border: var(--line-thin); border-radius: 8px; padding: 10px 10px 8px; box-shadow: 3px 3px 0 var(--ink); line-height: 1.25; }
.flow-art span:nth-of-type(2) { background: var(--yellow); color: var(--k); transform: rotate(-3deg); }
.flow-art span:nth-of-type(3) { background: var(--orange); color: var(--k); }
.flow-art b { position: relative; font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.flow-art img { position: absolute; top: 14px; right: 14px; width: 46px; height: 46px; border: var(--line-thin); border-radius: 12px; box-shadow: 2px 2px 0 var(--ink); }

@media (max-width: 960px) {
  .work-card, .work-card--big { grid-column: span 3; }
  .work-card--wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card, .work-card--big, .work-card--wide { grid-column: auto; }
  .work-card--wide { flex-direction: column; }
  .work-card--wide .work-media { aspect-ratio: 16 / 10; min-height: 0; border-right: 0; border-bottom: var(--line); }
}

/* ---------- about / character card ---------- */

.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

.char-card { overflow: hidden; transform: rotate(-1.2deg); max-width: 420px; }
.char-head { color: var(--k); background: var(--orange); border-bottom: var(--line); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; font-family: var(--f-display); font-size: 13px; letter-spacing: 0.12em; }
.char-head .jp { font-size: 16px; color: var(--w); -webkit-text-stroke: 1px var(--k); paint-order: stroke fill; letter-spacing: 0.06em; }
.char-photo { aspect-ratio: 1 / 1; border-bottom: var(--line); position: relative; overflow: hidden; background: #d3f4ef; }
.char-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply; }
.char-photo::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(22, 19, 15, 0.3) 1px, transparent 1.6px); background-size: 6px 6px; mix-blend-mode: multiply; }
.char-rows { margin: 0; padding: 6px 0; }
.char-rows div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 8px 16px; border-bottom: 2px dashed var(--hair); font-size: 15px; }
.char-rows div:last-child { border-bottom: 0; }
.char-rows dt { font-family: var(--f-display); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.char-rows dd { margin: 0; font-weight: 700; }

.about-copy p { font-size: 17.5px; color: var(--ink-2); }
.about-copy p strong { color: var(--ink); }
.about-links { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 38px; }

.abilities { display: grid; gap: 18px; }
.ability { padding: 18px 20px; }
.ability h4 { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.ability h4 .jp { color: var(--orange-text); font-size: 16px; }

/* ---------- services / special moves ---------- */

.moves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.move { padding: 26px 24px 22px; position: relative; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.move:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.move .num {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: 24px;
  border: var(--line);
  border-radius: 50%;
  margin-bottom: 16px;
  color: var(--k);
  box-shadow: 3px 3px 0 var(--ink);
}
.move:nth-child(6n + 1) .num { background: var(--orange); }
.move:nth-child(6n + 2) .num { background: var(--teal); }
.move:nth-child(6n + 3) .num { background: var(--yellow); }
.move:nth-child(6n + 4) .num { background: var(--pink); color: var(--k); }
.move:nth-child(6n + 5) .num { background: var(--sky); }
.move:nth-child(6n + 6) .num { background: var(--orange-soft); color: var(--ink); }
.move h3 { font-size: 22px; margin-bottom: 10px; }
.move p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
@media (max-width: 960px) { .moves { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .moves { grid-template-columns: 1fr; } }

/* ---------- experience / story arcs ---------- */

.arcs { position: relative; display: grid; gap: 26px; padding-left: 46px; }
.arcs::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 4px; background: var(--ink); border-radius: 2px; }
.arc { position: relative; padding: 24px 26px 22px; }
.arc::before {
  content: "";
  position: absolute;
  left: -46px;
  top: 26px;
  width: 34px;
  height: 34px;
  background: var(--orange);
  border: var(--line-thin);
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
}
.arc::after { content: ""; position: absolute; left: -37px; top: 35px; width: 16px; height: 16px; background: var(--ink); clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%); }
.arc:nth-child(even)::before { background: var(--teal); }
.arc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 8px; }
.arc h3 { font-size: clamp(20px, 2.4vw, 26px); }
.arc .where { font-weight: 700; color: var(--orange-text); margin-bottom: 10px; }
.arc p { color: var(--ink-2); }
.arc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.arc li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 15.5px; }
.arc li::before { content: "✦"; position: absolute; left: 0; color: var(--orange-text); }

.earlier { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 14px 0 12px; padding: 0; list-style: none; }
.earlier li { padding: 10px 14px; border: var(--line-thin); border-radius: 6px; background: var(--paper); font-size: 15px; }
.earlier li::before { content: none; }
.earlier li b { display: block; color: var(--ink); }
.earlier li span { color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 620px) { .earlier { grid-template-columns: 1fr; } }

.creds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 40px; }
.cred { padding: 20px 22px; display: flex; gap: 16px; align-items: flex-start; }
.cred .badge { flex: 0 0 auto; width: 52px; height: 52px; display: grid; place-items: center; font-family: var(--f-display); font-size: 22px; border: var(--line); border-radius: 50%; background: var(--yellow); color: var(--k); box-shadow: 3px 3px 0 var(--ink); }
.cred:nth-child(2) .badge { background: var(--teal); }
.cred h3 { font-size: 19px; margin-bottom: 4px; }
.cred p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 720px) { .creds { grid-template-columns: 1fr; } }

/* ---------- side quests ---------- */

.quests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quest { text-decoration: none; display: flex; flex-direction: column; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.quest:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.quest-collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: var(--ink); border-bottom: var(--line); }
.quest-collage img { aspect-ratio: 1; object-fit: cover; object-position: top; width: 100%; background: var(--w); }
.quest-body { padding: 18px 20px 20px; }
.quest-body h3 { font-size: 22px; margin: 4px 0 8px; }
.quest-body p { color: var(--ink-2); font-size: 15px; margin-bottom: 12px; }
@media (max-width: 900px) { .quests { grid-template-columns: 1fr; max-width: 520px; } }

/* ---------- contact ---------- */

.contact-panel { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 72px) clamp(22px, 5vw, 64px); background: var(--yellow-soft); text-align: center; }
.contact-panel::before { content: ""; position: absolute; inset: -60%; background: repeating-conic-gradient(from 0deg at 50% 50%, var(--orange) 0deg 2deg, transparent 2deg 9deg); opacity: 0.25; }
.contact-panel > *:not(.sfx) { position: relative; }
.contact-panel .bubble { margin: 0 auto 34px; max-width: 760px; padding: 26px 30px; text-align: center; }
.contact-panel .bubble h2 { font-size: clamp(30px, 5vw, 56px); margin-bottom: 12px; }
.contact-panel .bubble::before { left: 50%; margin-left: -17px; }
.contact-panel .bubble::after { left: 50%; margin-left: -13px; }
.contact-panel .bubble p { color: var(--ink-2); font-size: 17px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.contact-sfx { top: 18px; right: 22px; font-size: clamp(30px, 5vw, 52px); color: var(--orange); transform: rotate(10deg); }
.contact-sfx-2 { bottom: 18px; left: 22px; font-size: clamp(26px, 4vw, 40px); color: var(--teal); transform: rotate(-10deg); }
@media (max-width: 620px) { .contact-sfx, .contact-sfx-2 { display: none; } }

/* ---------- footer ---------- */

.footer { border-top: var(--line); background: var(--surface); padding: 28px 0; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-2); }
.footer .tbc { font-family: var(--f-display); color: var(--ink); letter-spacing: 0.06em; }
.footer .tbc .jp { color: var(--orange-text); margin-right: 6px; }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer nav a { text-decoration: none; font-weight: 700; color: var(--ink); }
.footer nav a:hover { color: var(--orange-text); }

/* ---------- case study ---------- */

.case-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 70px); }
.back { display: flex; width: fit-content; align-items: center; gap: 8px; font-family: var(--f-display); font-size: 14px; text-decoration: none; margin-bottom: 26px; }
.back:hover { color: var(--orange-text); }
.case-title { font-size: clamp(46px, 9vw, 104px); margin: 14px 0 20px; line-height: 0.95; }
.case-lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 780px; margin-bottom: 34px; }

.meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; overflow: hidden; margin-bottom: 40px; }
.meta > div { padding: 18px 20px; border-right: var(--line-thin); }
.meta > div:last-child { border-right: 0; }
.meta dt { font-family: var(--f-display); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-text); margin-bottom: 8px; }
.meta dd { margin: 0; font-weight: 700; font-size: 15px; }
.meta dd .chips { margin-top: 2px; }
.meta dd a { color: var(--ink); }
@media (max-width: 860px) {
  .meta { grid-template-columns: 1fr 1fr; }
  .meta > div:nth-child(2) { border-right: 0; }
  .meta > div:nth-child(-n + 2) { border-bottom: var(--line-thin); }
}
@media (max-width: 520px) {
  .meta { grid-template-columns: 1fr; }
  .meta > div { border-right: 0; border-bottom: var(--line-thin); }
  .meta > div:last-child { border-bottom: 0; }
}

.case-cover { overflow: hidden; }
.case-cover img { width: 100%; }

.case-body { padding: clamp(56px, 8vw, 96px) 0; }
.case-sec { display: grid; grid-template-columns: 260px 1fr; gap: clamp(20px, 4vw, 56px); padding: 40px 0; border-top: 3px dashed var(--hair); }
.case-sec:first-child { border-top: 0; padding-top: 0; }
.case-sec h2 { font-size: clamp(28px, 3.4vw, 40px); }
.case-sec .jp-big { display: block; font-family: var(--f-display); font-size: 15px; letter-spacing: 0.08em; color: var(--orange-text); margin-bottom: 10px; }
.case-sec .prose p { font-size: 18px; color: var(--ink-2); }
@media (max-width: 860px) { .case-sec { grid-template-columns: 1fr; } }

.feature-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature-list li { background: var(--surface); border: var(--line-thin); border-radius: var(--radius); padding: 14px 16px 14px 46px; position: relative; font-weight: 500; box-shadow: 3px 3px 0 var(--ink); font-size: 15.5px; }
.feature-list li::before { content: "✦"; position: absolute; left: 16px; top: 12px; font-size: 18px; color: var(--orange); }
.feature-list li:nth-child(3n + 2)::before { color: var(--teal); }
.feature-list li:nth-child(3n + 3)::before { color: var(--pink); }
@media (max-width: 680px) { .feature-list { grid-template-columns: 1fr; } }

.steps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; font-size: 16.5px; color: var(--ink-2); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--f-display);
  font-size: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--k);
  border: var(--line-thin);
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--ink);
}
.steps li span { padding-top: 9px; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery figure { margin: 0; overflow: hidden; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery button { all: unset; display: block; cursor: zoom-in; width: 100%; }
.gallery button:focus-visible { outline: 3px solid var(--orange); outline-offset: -6px; }
.gallery img { width: 100%; transition: transform 0.35s ease; }
.gallery button:hover img { transform: scale(1.02); }
.gallery figcaption { border-top: var(--line); padding: 12px 16px; font-size: 14.5px; color: var(--ink-2); background: var(--surface); }
.gallery figcaption b { font-family: var(--f-display); font-weight: 400; color: var(--ink); margin-right: 6px; }
@media (max-width: 680px) { .gallery { grid-template-columns: 1fr; } }

.phones { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.phones button { all: unset; cursor: zoom-in; display: block; }
.phones img { border: var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); background: var(--w); transition: transform 0.2s; }
.phones button:nth-child(odd) img { transform: rotate(-1.5deg); }
.phones button:nth-child(even) img { transform: rotate(1.5deg) translateY(14px); }
.phones button:hover img { transform: translateY(-6px) rotate(0); }
@media (max-width: 900px) { .phones { grid-template-columns: repeat(3, 1fr); row-gap: 30px; } }

.split-feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; padding: 32px 0; }
.split-feature + .split-feature { border-top: 3px dashed var(--hair); }
.split-feature:nth-child(even) .split-media { order: 2; }
.split-media { overflow: hidden; }
.split-media button { all: unset; display: block; cursor: zoom-in; }
.split-copy h3 { font-size: clamp(24px, 3vw, 32px); margin: 8px 0 12px; }
.split-copy p { color: var(--ink-2); font-size: 17px; }
@media (max-width: 820px) {
  .split-feature { grid-template-columns: 1fr; }
  .split-feature:nth-child(even) .split-media { order: 0; }
}

.try-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 28px; padding: 26px 28px; background: var(--yellow-soft); }
.try-panel > div:first-child { flex: 1 1 420px; }
.try-panel h2 { font-size: clamp(24px, 3vw, 32px); margin: 12px 0 8px; }
.try-panel p { margin: 0; color: var(--ink-2); max-width: 620px; }
.try-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.devices { display: grid; grid-template-columns: 3fr 1fr; gap: clamp(16px, 4vw, 48px); align-items: end; }
.devices button { all: unset; cursor: zoom-in; display: block; }
.devices button:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.devices img { width: 100%; filter: drop-shadow(8px 10px 0 var(--ink)); transition: transform 0.2s; }
.devices button:hover img { transform: translateY(-6px); }
.credit { font-size: 13px; color: var(--ink-3); margin-top: 18px; }

.store-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 4px; }
.play-badge { display: inline-block; border-radius: 8px; transition: transform 0.15s; }
.play-badge:hover { transform: translateY(-2px); }
.play-badge img { height: 52px; width: auto; }

.next-ep { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; text-decoration: none; flex-wrap: wrap; transition: transform 0.18s ease, box-shadow 0.18s ease; background: var(--teal-soft); }
.next-ep:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.next-ep small { display: block; font-family: var(--f-display); font-size: 12px; letter-spacing: 0.14em; color: var(--ink-2); margin-bottom: 4px; }
.next-ep strong { font-family: var(--f-display); font-weight: 400; font-size: clamp(24px, 3.4vw, 36px); }
.next-ep .arrow { font-family: var(--f-display); font-size: 34px; width: 64px; height: 64px; display: grid; place-items: center; background: var(--orange); color: var(--k); border: var(--line); border-radius: 50%; box-shadow: var(--shadow-sm); }

/* ---------- archive ---------- */

.files { display: grid; gap: 26px; }
.file { display: grid; grid-template-columns: 300px 1fr; overflow: hidden; }
.file-media { border-right: var(--line); background: var(--paper-2); display: flex; align-items: center; justify-content: center; padding: 18px; }
.file-media button { all: unset; cursor: zoom-in; display: block; }
.file-media img { max-height: 320px; width: auto; border: var(--line-thin); border-radius: 4px; background: var(--w); }
.file-body { padding: 24px 26px; }
.file-body h3 { font-size: clamp(22px, 2.6vw, 30px); margin: 6px 0 12px; }
.file-body p { color: var(--ink-2); font-size: 16px; }
.file-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0 0; }
.file-facts div { background: var(--paper); border: var(--line-thin); border-radius: 6px; padding: 12px 14px; }
.file-facts dt { font-family: var(--f-display); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange-text); margin-bottom: 4px; }
.file-facts dd { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.file-facts .full { grid-column: 1 / -1; background: var(--teal-soft); }
.file-facts .full dt { color: var(--ink); }
@media (max-width: 820px) {
  .file { grid-template-columns: 1fr; }
  .file-media { border-right: 0; border-bottom: var(--line); }
  .file-facts { grid-template-columns: 1fr; }
}

.builds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.build { overflow: hidden; display: flex; flex-direction: column; }
.build img { aspect-ratio: 900 / 471; object-fit: cover; border-bottom: var(--line); width: 100%; }
.build-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.build-body h3 { font-size: 21px; margin-bottom: 8px; }
.build-body p { color: var(--ink-2); font-size: 15px; }
.build-body .chips { margin-bottom: 14px; }
.build-body a.repo { margin-top: auto; font-family: var(--f-display); font-size: 13px; letter-spacing: 0.04em; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.build-body a.repo:hover { color: var(--orange-text); }
@media (max-width: 960px) { .builds { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .builds { grid-template-columns: 1fr; } }

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.shot { appearance: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; width: 100%; cursor: zoom-in; display: block; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.shot:hover { transform: translate(-3px, -3px) rotate(-0.6deg); box-shadow: var(--shadow-lg); }
.shot:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.shot img { aspect-ratio: 1; object-fit: cover; width: 100%; border-bottom: var(--line); }
.shot span { display: block; padding: 10px 14px; font-family: var(--f-display); font-size: 14px; }
.shot small { display: block; font-family: var(--f-body); font-size: 12.5px; color: var(--ink-3); font-weight: 700; }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .shots { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

.toc { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- lightbox ---------- */

.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 56px 16px 24px; background: var(--scrim); }
.lightbox.open { display: flex; }
.lightbox-inner { max-width: min(1200px, 100%); max-height: 100%; overflow: auto; border: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); background: var(--surface); }
.lightbox img { max-width: 100%; height: auto; margin: 0 auto; }
.lightbox-close { position: fixed; top: 12px; right: 14px; }

/* ---------- reveal ---------- */

/* uses `translate` (not `transform`) so hover transforms on cards still work */
.js .reveal { opacity: 0; translate: 0 24px; transition: opacity 0.6s ease, translate 0.6s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: 0 0; transition: none; }
}

/* night: the half-height highlighter leaves the top of dark letters on the dark page,
   so the marker becomes a full highlighter block */
:root[data-theme="dark"] .marker {
  background: var(--yellow);
  border-radius: 3px;
  padding: 0.04em 0.22em;
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}

/* ---------- day / night switch ---------- */

.nav-tools { display: flex; align-items: center; gap: 10px; }

.theme-btn {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: var(--line);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--k);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, box-shadow 0.15s ease, background-color 0.25s ease;
}
.theme-btn:hover { transform: rotate(-14deg) scale(1.06); }
.theme-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.theme-btn .day, .theme-btn .night { grid-area: 1 / 1; font-family: var(--f-display); font-size: 19px; line-height: 1; transition: opacity 0.2s, transform 0.35s; }
.theme-btn .night { opacity: 0; transform: rotate(-90deg) scale(0.4); }
/* little sun rays behind 昼 */
.theme-btn::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--orange) 0deg 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 60%, #000 61%);
          mask: radial-gradient(circle, transparent 0 60%, #000 61%);
  z-index: -1;
  transition: opacity 0.25s, transform 0.6s;
}
.theme-btn:hover::before { transform: rotate(45deg); }

:root[data-theme="dark"] .theme-btn { background: #4b3fb0; color: var(--w); }
:root[data-theme="dark"] .theme-btn::before { opacity: 0; }
:root[data-theme="dark"] .theme-btn .day { opacity: 0; transform: rotate(90deg) scale(0.4); }
:root[data-theme="dark"] .theme-btn .night { opacity: 1; transform: none; }

/* transformation: new theme bursts out from the switch (View Transitions) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* impact frame flashed on switch */
.impact {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
}
.impact::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, var(--ink) 0deg 1.1deg, transparent 1.1deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 48%);
          mask: radial-gradient(circle, transparent 0 22%, #000 48%);
  opacity: 0.35;
}
.impact b {
  position: relative;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(54px, 13vw, 160px);
  color: var(--yellow);
  -webkit-text-stroke: 0.06em var(--k);
  paint-order: stroke fill;
  text-shadow: 0.06em 0.06em 0 var(--k);
  transform: rotate(-8deg);
  white-space: nowrap;
}
.impact.night b { color: #8f84ff; }
.impact.go { visibility: visible; animation: impact 0.75s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; }
.impact.go b { animation: impact-word 0.75s cubic-bezier(0.2, 0.9, 0.3, 1.4) forwards; }
@keyframes impact { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes impact-word { 0% { transform: rotate(-8deg) scale(0.3); } 25% { transform: rotate(-8deg) scale(1.08); } 100% { transform: rotate(-6deg) scale(1); } }

/* ---------- EXP bar (scroll progress) ---------- */

.exp {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 6px;
  pointer-events: none;
}
.exp span {
  display: block;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.35) 0 6px, transparent 6px 12px),
    linear-gradient(90deg, var(--teal), var(--yellow) 50%, var(--orange) 80%, var(--pink));
  border-right: 2px solid var(--ink);
}
.exp i {
  position: absolute;
  right: 10px;
  top: 8px;
  font-style: normal;
  font-family: var(--f-display);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--k);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 2px 6px 1px;
  box-shadow: 2px 2px 0 var(--ink);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s, transform 0.25s;
}
.exp.full i { opacity: 1; transform: none; }

/* ---------- card hover SFX ---------- */

.work-media::after {
  content: "シュッ!";
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 3;
  font-family: var(--f-display);
  font-size: 26px;
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 2.5px var(--k);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--k);
  transform: rotate(-10deg) scale(0);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.5);
  pointer-events: none;
}
.work-card:hover .work-media::after,
.work-card:focus-visible .work-media::after { transform: rotate(-10deg) scale(1); }
.work-card:nth-child(3n + 2) .work-media::after { content: "キラッ!"; color: var(--teal); }
.work-card:nth-child(3n) .work-media::after { content: "ドン!"; color: var(--pink); }

/* ---------- night extras ---------- */

/* stars behind the hero portrait at night */
:root[data-theme="dark"] .hero-burst::after {
  background:
    radial-gradient(circle at 50% 46%, var(--burst) 0 30%, transparent 62%),
    radial-gradient(2px 2px at 12% 18%, #fff7cf 98%, transparent),
    radial-gradient(2px 2px at 82% 12%, #fff7cf 98%, transparent),
    radial-gradient(3px 3px at 90% 64%, var(--yellow) 98%, transparent),
    radial-gradient(2px 2px at 8% 72%, #fff7cf 98%, transparent),
    radial-gradient(3px 3px at 22% 90%, var(--yellow) 98%, transparent),
    radial-gradient(2px 2px at 66% 88%, #fff7cf 98%, transparent);
  animation: twinkle 3.2s ease-in-out infinite alternate;
}

@keyframes twinkle { from { opacity: 0.75; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .impact.go, .impact.go b { animation: none; visibility: hidden; }
  .theme-btn, .theme-btn::before, .theme-btn .day, .theme-btn .night, .work-media::after { transition: none; }
  .hero-burst::after { animation: none !important; }
}

/* ---------- power aura on the hero portrait ---------- */

.aura {
  position: absolute;
  left: -9%;
  right: -9%;
  top: -16%;
  bottom: -4%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.5);
  filter: drop-shadow(0 0 14px rgba(255, 170, 40, 0.75)) drop-shadow(0 0 30px rgba(255, 106, 19, 0.45));
}
.aura .flame {
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, #fffbe6 0 52%, var(--yellow) 66%, var(--orange) 84%, #ff3d2e 100%);
  animation: flicker 0.36s steps(1) infinite;
}
.aura .flame.inner {
  inset: 12% 13% 14%;
  background: radial-gradient(closest-side, #ffffff 0 58%, #fff3a6 78%, var(--yellow) 100%);
  animation-duration: 0.28s;
  animation-direction: reverse;
  opacity: 0.9;
}
@keyframes flicker {
  0%   { clip-path: polygon(51.6% 0.7%, 56.4% 12.3%, 65.5% 2.8%, 67.8% 17.9%, 81.9% 10.1%, 76.2% 27.1%, 88.2% 26.8%, 82.7% 37.6%, 96.1% 37.3%, 84.3% 50.0%, 95.3% 55.8%, 83.2% 62.6%, 90.5% 71.1%, 74.6% 71.5%, 75.4% 84.1%, 66.4% 79.6%, 63.4% 87.3%, 55.5% 82.4%, 50.2% 89.6%, 44.3% 83.8%, 37.8% 87.9%, 33.8% 79.1%, 24.2% 83.0%, 25.4% 71.5%, 10.7% 72.6%, 17.7% 62.2%, 8.3% 54.4%, 14.4% 50.0%, 7.6% 41.4%, 16.5% 37.3%, 9.7% 21.0%, 23.0% 26.4%, 19.2% 7.6%, 32.4% 18.3%, 35.6% -0.1%, 43.6% 12.1%); }
  33%  { clip-path: polygon(52.4% -5.3%, 56.0% 14.5%, 66.6% 4.5%, 68.3% 17.1%, 80.1% 8.4%, 77.4% 26.1%, 91.0% 23.6%, 81.9% 37.9%, 94.3% 39.7%, 85.2% 50.0%, 96.7% 59.6%, 82.1% 62.1%, 87.2% 70.5%, 74.6% 71.5%, 74.6% 80.0%, 66.3% 79.4%, 62.1% 89.1%, 55.7% 83.9%, 51.1% 92.0%, 44.5% 82.4%, 38.0% 88.7%, 33.4% 79.9%, 20.5% 84.9%, 25.0% 71.8%, 9.9% 71.8%, 17.4% 62.3%, 3.4% 56.0%, 14.6% 50.0%, 6.6% 38.1%, 15.8% 37.1%, 12.5% 24.0%, 22.3% 25.9%, 20.2% 10.1%, 32.1% 17.8%, 33.0% -1.8%, 43.6% 12.1%); }
  66%  { clip-path: polygon(50.2% -0.1%, 56.2% 13.6%, 66.9% 0.6%, 67.2% 18.9%, 79.2% 13.8%, 76.6% 26.8%, 89.8% 26.7%, 82.8% 37.6%, 97.1% 39.5%, 84.9% 50.0%, 91.1% 57.1%, 83.0% 62.5%, 86.7% 72.6%, 76.1% 72.8%, 73.9% 80.9%, 66.7% 80.1%, 65.0% 87.3%, 55.9% 84.9%, 49.1% 91.4%, 44.1% 85.0%, 34.0% 90.2%, 33.6% 79.6%, 22.2% 84.5%, 23.3% 73.3%, 11.5% 74.6%, 19.1% 61.7%, 8.1% 54.5%, 15.7% 50.0%, 4.1% 40.8%, 17.1% 37.5%, 10.1% 24.7%, 22.6% 26.1%, 21.1% 8.3%, 31.8% 17.3%, 34.8% -2.5%, 43.5% 11.6%); }
}

/* energy sparks rising through the aura */
.aura i {
  position: absolute;
  bottom: 12%;
  width: 7px;
  height: 14px;
  background: #fffbe6;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: 0 0 8px var(--yellow);
  opacity: 0;
}
.aura i:nth-of-type(1) { left: 14%; animation: rise 1.1s 0s infinite ease-in; }
.aura i:nth-of-type(2) { left: 28%; animation: rise 1.3s 0.35s infinite ease-in; }
.aura i:nth-of-type(3) { left: 46%; animation: rise 0.95s 0.6s infinite ease-in; }
.aura i:nth-of-type(4) { left: 62%; animation: rise 1.2s 0.15s infinite ease-in; }
.aura i:nth-of-type(5) { left: 78%; animation: rise 1.05s 0.5s infinite ease-in; }
.aura i:nth-of-type(6) { left: 88%; animation: rise 1.4s 0.8s infinite ease-in; }
@keyframes rise {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(-260%) translateY(-120px) scale(1.1); opacity: 0; }
}

.power-tag {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: -6%;
  font-family: var(--f-display);
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1;
  color: var(--yellow);
  -webkit-text-stroke: 3px var(--k);
  paint-order: stroke fill;
  text-shadow: 4px 4px 0 var(--k);
  transform: translateX(-50%) rotate(-6deg) scale(0);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.6);
  pointer-events: none;
  white-space: nowrap;
}

/* powering up: hover (mouse) or .powered (tap on touch screens) */
.hero-art { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero-art.powered .aura { opacity: 1; transform: none; }
.hero-art.powered .power-tag { transform: translateX(-50%) rotate(-6deg) scale(1); }
.hero-art.powered .hero-burst::before { animation: burst-spin 5s linear infinite; opacity: 0.28; }
.hero-art.powered .hero-photo { animation: tremble 0.14s linear infinite; }
.hero-art.powered .hero-sfx-1 { animation: sfx-pulse 0.5s ease-in-out infinite alternate; }
@media (hover: hover) {
  .hero-art:hover .aura { opacity: 1; transform: none; }
  .hero-art:hover .power-tag { transform: translateX(-50%) rotate(-6deg) scale(1); }
  .hero-art:hover .hero-burst::before { animation: burst-spin 5s linear infinite; opacity: 0.28; }
  .hero-art:hover .hero-photo { animation: tremble 0.14s linear infinite; }
  .hero-art:hover .hero-sfx-1 { animation: sfx-pulse 0.5s ease-in-out infinite alternate; }
}
@keyframes burst-spin { to { transform: rotate(360deg); } }
@keyframes tremble {
  0%, 100% { translate: 0 0; }
  25% { translate: 1.5px -1px; }
  50% { translate: -1px 1px; }
  75% { translate: 1px 1.5px; }
}
@keyframes sfx-pulse { from { scale: 1; } to { scale: 1.18; } }

@media (prefers-reduced-motion: reduce) {
  .aura .flame, .aura i, .hero-art .hero-photo, .hero-art .hero-sfx-1, .hero-art .hero-burst::before { animation: none !important; }
  .aura .flame { clip-path: polygon(51.6% 0.7%, 56.4% 12.3%, 65.5% 2.8%, 67.8% 17.9%, 81.9% 10.1%, 76.2% 27.1%, 88.2% 26.8%, 82.7% 37.6%, 96.1% 37.3%, 84.3% 50.0%, 95.3% 55.8%, 83.2% 62.6%, 90.5% 71.1%, 74.6% 71.5%, 75.4% 84.1%, 66.4% 79.6%, 63.4% 87.3%, 55.5% 82.4%, 50.2% 89.6%, 44.3% 83.8%, 37.8% 87.9%, 33.8% 79.1%, 24.2% 83.0%, 25.4% 71.5%, 10.7% 72.6%, 17.7% 62.2%, 8.3% 54.4%, 14.4% 50.0%, 7.6% 41.4%, 16.5% 37.3%, 9.7% 21.0%, 23.0% 26.4%, 19.2% 7.6%, 32.4% 18.3%, 35.6% -0.1%, 43.6% 12.1%); }
  .aura, .power-tag { transition: opacity 0.2s; }
}
