@font-face { font-family: "Ubuntu Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../assets/fonts/UbuntuMono-Regular.ttf") format("truetype"); }
@font-face { font-family: "Ubuntu Mono"; font-weight: 400; font-style: italic; font-display: swap; src: url("../assets/fonts/UbuntuMono-Italic.ttf") format("truetype"); }
@font-face { font-family: "Ubuntu Mono"; font-weight: 700; font-style: normal; font-display: swap; src: url("../assets/fonts/UbuntuMono-Bold.ttf") format("truetype"); }
@font-face { font-family: "Ubuntu Mono"; font-weight: 700; font-style: italic; font-display: swap; src: url("../assets/fonts/UbuntuMono-BoldItalic.ttf") format("truetype"); }

/* Layout: one narrow centered column; 3D avatar is the hero, experience entries stack below with a 4-up shot strip */
:root {
  --bg: #ffffff;
  --ink: #0c0c0c;
  --ink-2: #6f6f72;
  --chip: #f3f3f2;
  --chip-hover: #e8e8e6;
  --stage: #f0f0ee;
  --card: #f6f6f5;
  --tutu: #6a2ee3;
  --mono: "Ubuntu Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Ubuntu Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 96px;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1024px; margin: 0 auto; }

/* ---------- header ---------- */
header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px)));
  padding-inline: max(16px, env(safe-area-inset-left, 0px));
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.bar { max-width: 1024px; margin: 0 auto; height: 108px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.me { display: flex; align-items: center; gap: 10px; justify-self: start; }
.me-ava {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--stage);
  display: grid; place-items: center; flex: none; transition: transform .4s var(--ease);
}
.me-ava canvas { width: 100%; height: 100%; display: block; }
.me:hover .me-ava { transform: rotate(-8deg) scale(1.08); }
.me-name { font-size: 15px; font-weight: 700; line-height: 1.22; }
.me-name span { display: block; transition: transform .35s var(--ease); }
.me:hover .me-name span:last-child { transform: translateX(4px); }

nav.tabs { position: relative; display: flex; gap: 2px; padding: 0; }
.tabs a {
  position: relative; z-index: 1; font-size: 16px; color: var(--ink-2);
  padding: 8px 22px; border-radius: 999px; transition: color .25s;
}
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.tabs a:hover { color: var(--ink); }
.tabs .pill {
  position: absolute; z-index: 0; top: 0; height: 100%; left: 0; width: 0;
  background: var(--chip); border-radius: 999px;
  transition: transform .45s var(--ease), width .45s var(--ease), background .25s;
}
.tabs a { display: inline-grid; transition: color .25s; }
/* reserve the bold width so tabs don't shift on hover */
.tabs a::before { content: attr(data-text); font-weight: 700; height: 0; visibility: hidden; overflow: hidden; grid-area: 1 / 1; }
.tabs a > span { grid-area: 1 / 1; text-align: center; }
.tabs a:not([aria-current]):hover { color: var(--ink); font-weight: 700; }

.mail-wrap { justify-self: end; position: relative; }
.mail-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 300px; max-width: calc(100vw - 32px);
  background: var(--bg); border-radius: 18px; padding: 18px; display: grid; gap: 12px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 20px 50px rgba(0,0,0,.12); animation: mailIn .25s var(--ease); transform-origin: top right;
}
@keyframes mailIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.mail-h { margin: 0; font-size: 13px; color: var(--ink-2); }
.mail-addr { margin: 0; font-size: 18px; user-select: all; word-break: break-all; }
.mail-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mail-act {
  font: inherit; font-size: 14px; border: 0; cursor: pointer; text-align: center; padding: 10px 8px; border-radius: 999px;
  background: var(--chip); color: var(--ink); transition: background .2s, color .2s;
}
.mail-act:hover { background: var(--chip-hover); }
.mail-act.primary { background: var(--ink); color: var(--bg); }
.mail-act.primary:hover { background: #333; }
.mail-act.done { background: #e6f4dd; color: #287515; }
.mail-gmail { font-size: 13px; color: var(--ink-2); justify-self: start; }
.mail-gmail:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.btn-mail {
  font: inherit; border: 0; cursor: pointer; color: inherit;
  justify-self: end; display: inline-flex; align-items: center; gap: 10px;
  background: var(--chip); border-radius: 999px; padding: 8px 18px; font-size: 16px; font-weight: 400;
  transition: background .25s, color .25s, transform .25s var(--ease);
  overflow: hidden;
}
.btn-mail .arr { display: inline-block; position: relative; width: 14px; height: 14px; overflow: hidden; }
.btn-mail .arr i { position: absolute; inset: 0; font-style: normal; line-height: 14px; transition: transform .4s var(--ease); }
.btn-mail .arr i + i { transform: translateX(-120%); }
.btn-mail[aria-expanded="true"], .btn-mail:hover { background: var(--ink); color: var(--bg); }
.btn-mail[aria-expanded="true"] .arr i:first-child, .btn-mail:hover .arr i:first-child { transform: translateX(120%); }
.btn-mail[aria-expanded="true"] .arr i + i, .btn-mail:hover .arr i + i { transform: translateX(0); }
.btn-mail:active { transform: scale(.96); }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; align-items: center; padding-top: 26px; }
.stage-wrap { position: relative; width: 170px; height: 308px; }
.stage {
  position: absolute; inset: 0; background: var(--stage); overflow: hidden;
  cursor: grab; touch-action: pan-y;
}
.stage:active { cursor: grabbing; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage .shadow {
  position: absolute; left: 50%; bottom: 14px; width: 120px; height: 18px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0,0,0,.18), transparent); pointer-events: none;
}
.stage .loading {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--ink-2);
  transition: opacity .5s;
}
.stage.ready .loading { opacity: 0; }

.tag {
  position: absolute; left: 0; top: 0; z-index: 3;
  font-family: var(--mono); font-size: 14px; line-height: 1; white-space: nowrap;
  background: var(--ink); color: var(--bg); padding: 5px 6px 4px;
  user-select: none; cursor: default; will-change: transform;
  transition: background .2s, color .2s, box-shadow .2s;
}
.tag:hover { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

.intro {
  margin: 34px 0 0; max-width: 500px; text-align: center; text-wrap: balance;
  font-size: 19px; line-height: 1.25; font-weight: 400;
}
.cases-link {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 16px; color: var(--ink-2);
  padding-bottom: 3px; position: relative; transition: color .25s;
}
.cases-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor;
  transform-origin: right; transition: transform .45s var(--ease);
}
.cases-link .a { display: inline-block; transition: transform .35s var(--ease); }
.cases-link:hover { color: var(--ink); }
.cases-link:hover .a { transform: translateX(5px); }
.cases-link:hover::after { animation: line .6s var(--ease); }
@keyframes line { 0% { transform: scaleX(1); transform-origin: right; } 45% { transform: scaleX(0); transform-origin: right; } 46% { transform-origin: left; } 100% { transform: scaleX(1); transform-origin: left; } }

/* ---------- experience ---------- */
.exp { margin-top: 92px; display: grid; gap: 64px; }
.job { display: grid; gap: 0; }
.when { font-size: 14px; margin: 0 0 14px; }
.role { display: flex; align-items: center; gap: 6px; margin: 0 0 22px; font-size: 20px; font-weight: 400; }
.logo {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--tutu) url("../assets/img/common/tutu-logo.png") center / cover no-repeat;
  transition: transform .5s var(--ease);
}
.logo.start { background: #FF0019 url("../assets/img/common/start-logo.png") center / cover no-repeat; }
.shot.wide .ph { height: auto; width: 84%; border-radius: 6px; }
.role:hover .logo { transform: rotate(-14deg) scale(1.06); }
.bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-family: var(--sans); font-size: 15px; line-height: 1.3; }
.bullets li { min-width: 0; }
.bullets li::before { content: "— "; }
.bullets b { font-weight: 700; }

.shots { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.shot {
  position: relative; aspect-ratio: 200 / 137; max-width: 100%; border-radius: 10px; overflow: hidden;
  background: var(--card); display: grid; place-items: center; cursor: pointer; isolation: isolate;
}
.shot .ph {
  position: absolute; left: 50%; top: 50%; height: 72%; width: auto; max-width: none; display: block; will-change: transform;
  transform: translate(-50%, -50%) translate3d(var(--tx,0px), var(--ty,0px), 0) rotate(var(--rot,0deg)) scale(var(--s,1));
  transition: transform .9s var(--ease);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.08)); user-select: none;
}
.shot.live .ph { transition: transform .45s var(--ease); }
.shot.more::after {
  content: ""; position: absolute; inset: 0; background: rgba(20,20,20,.36); z-index: 1; transition: background .4s;
}
.shot.more .count {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  color: #fff; font-family: var(--sans); font-weight: 700; font-size: 34px; letter-spacing: -.02em;
  text-shadow: 0 1px 8px rgba(0,0,0,.25); transition: transform .5s var(--ease);
}
.shot.more:hover::after { background: rgba(20,20,20,.22); }
.shot.more:hover .count { transform: scale(1.12); }

/* ---------- work ---------- */
body[data-view="work"] .hero { display: none; }
body[data-view="work"] .work { margin-top: 32px; }
.work { margin-top: 128px; display: grid; gap: 120px; }
.case { display: grid; grid-template-columns: minmax(0, 355px) minmax(0, 1fr); gap: 30px; align-items: start; }
.case-text { min-width: 0; padding-top: 12px; }
.case h2 { margin: 0 0 26px; font-size: 24px; font-weight: 400; line-height: 1.2; text-wrap: balance; }
.case p { margin: 0 0 34px; font-size: 16.5px; line-height: 1.45; }
.case p b { font-weight: 700; }
.case .who { display: flex; align-items: center; gap: 8px; font-size: 16.5px; margin-bottom: 16px; }
.case .who .logo { width: 24px; height: 24px; }
.case:hover .who .logo { transform: rotate(-14deg) scale(1.06); }
.case .cases-link { margin-top: 0; font-size: 17px; }
.case .shot { aspect-ratio: 666 / 456; border-radius: 16px; }
.case .shot .ph { height: 84%; filter: drop-shadow(0 14px 22px rgba(0,0,0,.1)); }
.case:hover .cases-link { color: var(--ink); }
.case:hover .cases-link .a { transform: translateX(5px); }

@media (max-width: 820px) {
  .case { grid-template-columns: 1fr; gap: 22px; }
  .case-text { padding-top: 0; order: 2; }
  .work { gap: 80px; margin-top: 80px; }
}
/* ---------- case hero: app + web ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 10px; }
.cs-head + .duo { margin-top: -56px; }
.board.duo-card { height: clamp(260px, 30vw, 380px); aspect-ratio: auto; display: grid; place-items: center; overflow: hidden; }
.board.duo-card img { transform: none; filter: drop-shadow(0 14px 24px rgba(0,0,0,.1)); transition: transform .7s var(--ease); }
.board.duo-card.web img { width: 86%; height: auto; max-width: none; border-radius: 10px; }
.board.duo-card.app { position: relative; }
.board.duo-card.app img { position: absolute; left: 50%; top: 8%; height: 84%; width: auto; max-width: none; translate: -50% 0; }
.board.duo-card:hover img { transform: scale(1.03); }
@media (max-width: 640px) { .duo { grid-template-columns: 1fr; } .board.duo-card { height: 300px; } }

/* ---------- before / after ---------- */
.cmp { touch-action: pan-y; isolation: isolate; }
.cmp-layer { position: absolute; inset: 0; display: grid; place-items: center; background: var(--card); }
.cmp-layer.new { clip-path: inset(0 0 0 var(--pos)); }
.cmp-phone {
  height: 88%; aspect-ratio: 1600 / 3248; border-radius: 34px; background: transparent;
  overflow: hidden; position: relative;
}
.cmp .cmp-phone img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; user-select: none; pointer-events: none; transform: none; filter: none; transition: none; }
.cmp-line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1.5px; margin-left: -.75px; z-index: 2; pointer-events: none;
  background: rgba(255,255,255,.95); box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 0 14px rgba(0,0,0,.12);
}
.cmp-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 42px; border-radius: 999px; color: var(--ink-2);
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 6px 18px rgba(0,0,0,.12);
  transition: transform .4s var(--ease), color .3s;
}
.cmp-knob svg { width: 12px; height: 9px; }
.cmp:hover .cmp-knob { transform: translate(-50%, -50%) scale(1.06); color: var(--ink); }
.cmp.drag .cmp-knob { transform: translate(-50%, -50%) scale(.96); color: var(--ink); }
.cmp-tag {
  position: absolute; top: 18px; z-index: 2; font-size: 13px; padding: 5px 11px; border-radius: 999px;
  background: rgba(255,255,255,.7); color: var(--ink-2); pointer-events: none; transition: opacity .4s;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cmp-tag.l { left: 18px; } .cmp-tag.r { right: 18px; }
.cmp-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 3;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent;
}
.cmp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 48px; height: 600px; }
.cmp-range::-moz-range-thumb { width: 48px; height: 600px; border: 0; }
.cmp:has(.cmp-range:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

.mt-cols { margin-top: 18px; }
.fig .board.bench { aspect-ratio: auto; padding: 22px; display: block; }
.board.bench img { width: 100%; height: auto; max-width: 100%; transform: none; filter: none; border-radius: 6px; mix-blend-mode: multiply; }
.test { background: var(--card); border-radius: 16px; padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.test-stat { display: grid; gap: 10px; }
.test-n { font-size: clamp(48px, 6vw, 72px); line-height: .9; font-weight: 700; letter-spacing: -.03em; }
.test-stat p { margin: 0; font-size: 16px; line-height: 1.4; max-width: 30ch; }
.test-bar { height: 6px; border-radius: 999px; background: #e3e3e1; overflow: hidden; margin-top: 6px; }
.test-bar i { display: block; height: 100%; width: var(--w); background: var(--ink); border-radius: inherit; transform-origin: left; animation: barIn 1.2s var(--ease) both; }
.test-sub { font-size: 13px; color: var(--ink-2); }
@keyframes barIn { from { transform: scaleX(0); } }
.test-quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.test-quotes li { font-size: 16px; line-height: 1.4; display: grid; grid-template-columns: 1.2ch 1fr; gap: 6px; }
.test-quotes li::before { content: "“"; color: var(--ink-2); font-size: 22px; line-height: 1; }
@media (max-width: 640px) { .test { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .test-bar i { animation: none; } }
/* ---------- lightbox: index + viewer ---------- */
.cs .fig .board img { cursor: zoom-in; }
.lb {
  position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,.78);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; animation: lbIn .25s var(--ease);
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
@keyframes lbIn { from { opacity: 0; } }
.lb-win {
  width: min(1100px, 100%); height: min(640px, 100%); display: grid; grid-template-columns: 270px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  background: var(--bg); border-radius: 18px; overflow: hidden; outline: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 30px 80px rgba(0,0,0,.12); animation: lbPop .35s var(--ease);
}
@keyframes lbPop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.lb-side { border-right: 1px solid #ececea; padding: 20px 12px 12px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; }
.lb-side-h { margin: 0; padding: 0 8px; font-size: 13px; color: var(--ink-2); }
.lb-tree { overflow: auto; display: grid; align-content: start; gap: 2px; counter-reset: lbn; }
.lb-group { margin: 14px 8px 4px; font-size: 12px; color: var(--ink-2); }
.lb-group:first-child { margin-top: 0; }
.lb-file {
  counter-increment: lbn; width: 100%; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 34px 3ch minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; transition: background .2s;
}
.lb-file::after { content: none; }
.lb-file .th { width: 34px; height: 34px; border-radius: 7px; background: var(--card) center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.lb-file .n { color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.lb-file .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-file:hover { background: var(--card); }
.lb-file[aria-current="true"] { background: var(--ink); color: var(--bg); }
.lb-file[aria-current="true"] .n { color: rgba(255,255,255,.6); }
.lb-file:focus-visible, .lb-x:focus-visible, .lb-arr:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lb-view { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; min-width: 0; }
.lb-top { display: flex; align-items: center; gap: 14px; padding: 16px 16px 0 24px; font-size: 13px; color: var(--ink-2); }
.lb-crumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-crumb b { color: var(--ink); font-weight: 400; }
.lb-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.lb-x { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; transition: background .2s, color .2s; }
.lb-x:hover { background: var(--ink); color: var(--bg); }
.lb-stage { position: relative; min-height: 0; overflow: hidden; margin: 14px 24px 8px; background: var(--card); border-radius: 14px; }
.lb-stage img { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 48px); max-height: calc(100% - 48px); width: auto; height: auto; display: block; border-radius: 10px; animation: lbImg .35s var(--ease); }
@keyframes lbImg { from { opacity: 0; transform: translateY(6px); } }
.lb-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 24px 18px; }
.lb-cap { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); max-width: 62ch; min-height: 2.9em; }
.lb-cap b { color: var(--ink); }
.lb-arrows { display: flex; gap: 6px; flex: none; }
.lb-arr { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); }
.lb-arr:hover { background: var(--ink); color: var(--bg); }
.lb-arr.hit { transform: scale(.92); }
@media (max-width: 760px) {
  .lb-win { grid-template-columns: 1fr; height: min(620px, 100%); }
  .lb-side { display: none; }
  .lb-top { padding: 14px 14px 0 16px; }
  .lb-stage { margin: 12px 12px 6px; }
  .lb-foot { padding: 6px 14px 14px 16px; }
}
body.lb-open { overflow: hidden; }
.sum { padding: 14px 18px; border-radius: 14px; background: var(--card); font-size: 16px; max-width: none !important; }

/* ---------- search verticals ---------- */
.verts { position: relative; background: var(--card); border-radius: 16px; overflow: hidden; aspect-ratio: 1238 / 706; touch-action: pan-y; }
.verts:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.vcard {
  position: absolute; left: 50%; top: 50%; height: 79%; width: auto; aspect-ratio: 430 / 930; max-width: none;
  border-radius: 7%/3.2%; display: block; user-select: none; cursor: pointer;
  transform: translate(-50%, -50%); will-change: transform, opacity;
  transition: transform .9s cubic-bezier(.2,.75,.2,1), opacity .9s cubic-bezier(.2,.75,.2,1);
}
@media (prefers-reduced-motion: reduce) { .vcard { transition: none; } }

/* ---------- case page ---------- */
/* ---------- design system case ---------- */
body[data-view^="case"] .hero { display: none; }
.ds-shot { overflow: hidden; }
.ds-grid {
  display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; width: 118%; transform: rotate(-8deg) translate(var(--gx, 0px), var(--gy, 0px));
  transition: transform .9s var(--ease);
}
.ds-grid i { aspect-ratio: 1; border-radius: 6px; display: block; transition: transform .5s var(--ease); }
.ds-shot:hover .ds-grid i:nth-child(7n+3) { transform: scale(.82); }

.board.ds-hero { aspect-ratio: 1024 / 520; display: block; overflow: hidden; }
.cs-head + .board.ds-hero { margin-top: -56px; }
.ds-hero .ds-grid { position: absolute; left: -6%; top: -14%; width: 112%; gap: 8px; }
.ds-hero .ds-grid i { border-radius: 9px; }
.ba { display: grid; border-top: 1px solid #e6e6e4; }
.ba-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid #e6e6e4; font-size: 15px; line-height: 1.4; }
.ba-row span:nth-child(2) { color: var(--ink-2); }
.ba-h { font-size: 13px; color: var(--ink-2); padding: 10px 0; }
.ba-h span:nth-child(3) { color: var(--ink); font-weight: 700; }
@media (max-width: 640px) { .ba-row { grid-template-columns: 1fr; gap: 4px; } .ba-h { display: none; } .ba-row span:nth-child(2)::before { content: "Before: "; } .ba-row span:nth-child(3)::before { content: "Now: "; font-weight: 700; } }
.tok-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.tok-name { font-size: clamp(18px, 2.4vw, 26px); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; min-width: 0; }
.tok-name span { transition: color .3s; }
.tok-name .sep { color: var(--ink-2); }
.tok-chip { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 999px; padding: 6px 14px 6px 6px; }
.tok-sw { width: 30px; height: 30px; border-radius: 50%; transition: background .4s; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.tok-chip code { font-family: var(--mono); font-size: 15px; }
.tok-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tok-col { background: var(--bg); border-radius: 12px; padding: 12px; display: grid; gap: 4px; align-content: start; }
.tok-col h4 { margin: 0 0 6px; font-size: 13px; font-weight: 400; color: var(--ink-2); }
.tok-col button {
  font: inherit; font-size: 15px; text-align: left; border: 0; background: transparent; color: var(--ink);
  padding: 6px 10px; border-radius: 8px; cursor: pointer; transition: background .2s, color .2s;
}
.tok-col button:hover:not(:disabled) { background: var(--chip); font-weight: 700; }
.tok-col button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 700; }
.tok-col button:disabled { color: #c4c4c8; cursor: default; }
.tok-col .none { font-size: 14px; color: var(--ink-2); padding: 6px 10px; }
.tok-hint { margin: 0; font-size: 13px; color: var(--ink-2); }

.board.brands { padding: 28px 20px 24px; display: grid; justify-items: center; align-items: start; gap: 0; }
.brands-src { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.brands-src .dot { width: 14px; height: 14px; border-radius: 50%; }
.brands-arrows { width: min(100%, 420px); height: 70px; }
.brands-arrows path { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; }
.brands-row { width: min(100%, 440px); display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; font-size: 14px; color: var(--ink-2); }
.brands-row div { display: grid; justify-items: center; gap: 8px; }
.brands-row .sq { width: 34px; height: 34px; border-radius: 9px; }

.coll { display: grid; border-top: 1px solid #e6e6e4; max-width: 640px; }
.coll-row { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid #e6e6e4; font-size: 16px; font-variant-numeric: tabular-nums; }
.coll.after .coll-row { grid-template-columns: 1fr 2fr auto; }
.coll-h { color: var(--ink-2); font-size: 14px; }
.coll-row.gone { color: var(--ink-2); }
.coll-row.gone b, .coll-row.gone span:nth-child(2) { text-decoration: line-through; }
.tag-ok, .tag-no { font-size: 13px; padding: 2px 10px; border-radius: 999px; justify-self: end; align-self: center; }
.tag-ok { background: var(--chip); color: var(--ink); }
.tag-no { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px #d8d8dc; text-decoration: none !important; }

.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.def { background: var(--card); border-radius: 14px; padding: 16px 18px; }
.def b { display: block; margin-bottom: 6px; }
.def p { font-size: 15px; color: var(--ink-2); }

.anat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.anat-part { background: var(--card); border-radius: 14px; padding: 16px; display: grid; gap: 6px; align-content: start; transition: background .3s; }
.anat-part:hover { background: #efefed; }
.anat-part code { font-family: var(--mono); font-size: 18px; color: var(--tutu); }
.anat-part span { font-size: 14px; color: var(--ink-2); line-height: 1.4; }

.inv { display: grid; grid-template-columns: 1fr 1fr; border-radius: 16px; overflow: hidden; }
.inv-side { position: relative; height: 150px; display: grid; place-items: center; }
.inv-side.light { background: #F5F5F9; }
.inv-side.dark { background: #181C2D; }
.inv-tip { font-size: 14px; padding: 10px 14px; border-radius: 10px; }
.light .inv-tip { background: #181C2D; color: #fff; }
.dark .inv-tip { background: #F5F5F9; color: #181C2D; }
.inv-cap { position: absolute; left: 14px; bottom: 10px; font-size: 13px; }
.light .inv-cap { color: #555A7A; } .dark .inv-cap { color: #ABADC7; }

.pal { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; }
.pal button {
  aspect-ratio: 1; border: 0; padding: 0; border-radius: 6px; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.pal button:hover, .pal button:focus-visible { transform: scale(1.25); position: relative; z-index: 1; box-shadow: 0 6px 16px rgba(0,0,0,.18); outline: none; }
#palNote { font-family: var(--mono); font-variant-numeric: tabular-nums; min-height: 1.4em; }

.road { display: grid; gap: 0; border-top: 1px solid #e6e6e4; }
.road-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 11px 0; border-bottom: 1px solid #e6e6e4; font-size: 16px; align-items: center; }
.road-st { font-size: 13px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.road-st.done { background: #e6f4dd; color: #287515; }
.road-st.wip { background: #ece6fc; color: #5F17C5; }
.road-st.plan { color: var(--ink-2); box-shadow: inset 0 0 0 1px #d8d8dc; }
.road-sum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }

@media (max-width: 820px) {
  .tok-cols, .anat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pal { gap: 2px; }
  .pal button { border-radius: 3px; }
}
@media (max-width: 520px) {
  .defs { grid-template-columns: 1fr; }
  .coll-row { font-size: 14px; }
}

.cs { padding-top: 8px; display: grid; gap: 96px; }
.bar { transition: height .4s var(--ease); }
header.compact .bar { height: 72px; }
.cs-mini { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s var(--ease), opacity .3s; }
.cs-mini.show { max-height: 64px; opacity: 1; }
.cs-mini-in { max-width: 1024px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.cs-mini .t { font-size: 17px; line-height: 1.2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn.sm { width: 34px; height: 34px; font-size: 16px; }
.to-top {
  position: fixed; z-index: 30; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-size: 20px;
  background: var(--chip); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .3s, transform .4s var(--ease), background .25s, color .25s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--ink); color: var(--bg); }
.to-top .a { display: inline-block; transition: transform .35s var(--ease); }
.to-top:hover .a { transform: translateY(-3px); }
.to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 640px) { header.compact .bar { height: auto; } }
.back-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--chip);
  display: grid; place-items: center; font-size: 18px; transition: background .25s, color .25s, transform .25s var(--ease);
}
.back-btn .a { display: inline-block; transition: transform .35s var(--ease); }
.back-btn:hover { background: var(--ink); color: var(--bg); }
.back-btn:hover .a { transform: translateX(-3px); }
.back-btn:active { transform: scale(.94); }
.cs-head { display: grid; gap: 16px; }
.back { font-size: 16px; color: var(--ink-2); display: inline-flex; gap: 8px; width: fit-content; transition: color .25s; }
.back .a { display: inline-block; transition: transform .35s var(--ease); }
.back:hover { color: var(--ink); }
.back:hover .a { transform: translateX(-5px); }
.cs h1 { margin: 0; font-size: clamp(24px, 2.8vw, 30px); line-height: 1.12; font-weight: 400; letter-spacing: -.01em; text-wrap: balance; max-width: 34ch; }
.cs .lede { margin: 0; font-size: 16px; line-height: 1.45; max-width: 72ch; }
.cs .lede b { font-weight: 700; }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 16px; border-top: 1px solid #e6e6e4; }
.meta dt { font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.meta dd { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.meta .logo { width: 20px; height: 20px; }

.board {
  position: relative; background: var(--card); border-radius: 16px; overflow: hidden;
  display: flex; justify-content: center; align-items: center; gap: 4%;
  --mx: 0; --my: 0; --h: 0;
}
.board img {
  height: 84%; width: auto; max-width: none; display: block; user-select: none;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.12));
  transform: translate(calc(var(--mx) * var(--d, 1) * 10px), calc(var(--my) * var(--d, 1) * 8px)) scale(calc(1 + var(--h) * .04));
  transition: transform .6s var(--ease);
}
.board-hero { aspect-ratio: 1024 / 600; }
.cs-head + .board-hero { margin-top: -56px; }
.board-hero img { height: 86%; }
.board-hero img:nth-child(2) { margin-top: 0; }

.sec { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 30px; }
.sec h2 { margin: 0; font-size: 16px; font-weight: 400; color: var(--ink-2); padding-top: 4px; }
.sec .body { min-width: 0; display: grid; gap: 18px; font-size: 17px; line-height: 1.5; }
.sec .body p { margin: 0; max-width: 62ch; }
.sec .body .big { font-size: 22px; line-height: 1.35; max-width: 34ch; }
.sec .body h3 { margin: 0; font-size: 17px; font-weight: 700; }
.sec .body h3.mt { margin-top: 24px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-bottom: 12px; }
.cols3 h3 { margin: 0 0 12px !important; }
@media (max-width: 820px) { .sec { grid-template-columns: 1fr; gap: 14px; } .cols3 { grid-template-columns: 1fr; gap: 20px; } }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 62ch; }
.list li { display: grid; grid-template-columns: 2ch 1fr; }
.list li::before { content: "—"; color: var(--ink-2); }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.cols2 h3 { margin: 0 0 12px; font-size: 17px; font-weight: 700; }

.figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.figs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fig { display: grid; gap: 12px; margin: 0; align-content: start; }
.sec .body h3 + p { margin-top: -8px; }
.fig .board { aspect-ratio: 1 / 1.18; }
.fig figcaption { font-size: 15px; color: var(--ink-2); line-height: 1.4; }
.fig figcaption b { color: var(--ink); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border-radius: 16px; padding: 22px 22px 20px; display: grid; gap: 10px; align-content: start; transition: background .3s; }
.stat:hover { background: #efefed; }
.stat .n { font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 15px; line-height: 1.35; color: var(--ink-2); }
.stat .l b { color: var(--ink); font-weight: 400; }
.trade { display: grid; gap: 0; border-top: 1px solid #e6e6e4; }
.trade div { display: grid; grid-template-columns: 9ch 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid #e6e6e4; font-size: 16px; }
.trade .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.note { font-size: 14px; color: var(--ink-2); }

.next { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px; padding-top: 28px; border-top: 1px solid #e6e6e4; }
.next span { font-size: 14px; color: var(--ink-2); display: block; margin-bottom: 8px; }
.next a.t { font-size: 24px; line-height: 1.2; }
.next a.t:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; }

@media (max-width: 820px) {
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .stats, .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols2 { grid-template-columns: 1fr; }
  .cs { gap: 72px; }
}
@media (max-width: 520px) {
  .stats, .figs, .figs.two { grid-template-columns: 1fr; }
  .board-hero { aspect-ratio: 4 / 3.4; }
  .stat .n { font-size: 34px; }
}

@media (max-width: 640px) {
  .bar { grid-template-columns: auto 1fr; height: auto; padding-block: 14px; row-gap: 12px; }
  nav.tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .mail-wrap { grid-column: 2; grid-row: 1; }
  .intro { font-size: 17px; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exp { margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
