:root {
  --bg: #fbfaf7; --surface: #ffffff; --ink: #1b1a17; --muted: #6b675f; --faint: #a19c92;
  --line: rgba(27,26,23,.12); --chip: #f1eee7; --accent: #2f5bd3; --on-ink: #fbfaf7;
  --code-bg: #f4f2ec; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --serif: Newsreader, Georgia, serif; --sans: Inter, system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #131311; --surface: #1c1b19; --ink: #ece9e2; --muted: #a39f96; --faint: #6f6b63;
  --line: rgba(236,233,226,.12); --chip: #282724; --accent: #8aa7ff; --on-ink: #131311; --code-bg: #181816; --shadow: none;
}}
:root[data-theme="dark"] {
  --bg: #131311; --surface: #1c1b19; --ink: #ece9e2; --muted: #a39f96; --faint: #6f6b63;
  --line: rgba(236,233,226,.12); --chip: #282724; --accent: #8aa7ff; --on-ink: #131311; --code-bg: #181816; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 var(--sans); }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.01em; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 500 19px var(--serif); }
.mark { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: italic 11px/1 var(--serif); text-align: center; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { text-decoration: none; padding: 7px 10px; border-radius: 8px; color: var(--muted); }
.side nav a:hover { background: var(--chip); color: var(--ink); }
.side nav a[aria-current=page] { background: var(--ink); color: var(--on-ink); }
.side-foot { margin-top: auto; font-size: 11.5px; color: var(--faint); }
.main { min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 64px; }
.hero { max-width: 760px; margin: 40px auto 36px; text-align: center; }
.hero h1, .phead h1 { font: 500 clamp(36px, 6vw, 64px)/1.02 var(--serif); letter-spacing: -.025em; margin: 0 0 12px; }
.phead h1 { font-size: clamp(30px, 4.5vw, 44px); }
.phead { margin: 8px 0 24px; max-width: 760px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 6px; }
.lede { color: var(--muted); font-size: 15px; margin: 0; }
.search { display: flex; gap: 8px; margin: 26px auto 14px; max-width: 620px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); padding: 8px 14px; outline: none; }
.search button, .btn.primary { background: var(--ink); color: var(--on-ink); border: 0; border-radius: 999px; padding: 8px 18px; font: 500 14px var(--sans); cursor: pointer; text-decoration: none; }
.quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.quick a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--surface); }
.quick span, .chip span, .count { color: var(--faint); font-size: 12px; }
.facets { display: grid; gap: 18px; max-width: 1100px; margin: 0 auto 40px; }
.facet h3 { font: 500 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 4px 12px; text-decoration: none; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--faint); }
.chip[aria-pressed=true] { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.chip[aria-pressed=true] span { color: inherit; opacity: .7; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 34px 0 14px; }
.sechead h2 { font: 500 24px var(--serif); margin: 0; }
.sechead a { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--faint); }
.cbody { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.meta { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.name { font-weight: 600; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mood { font: italic 15px/1.35 var(--serif); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spec { aspect-ratio: 16 / 10; padding: 18px 18px 0; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.spec b { font-size: 15px; line-height: 1.2; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.spec span { font-size: 11px; font-weight: 600; }
.spec .pills { display: flex; gap: 5px; margin-top: 4px; }
.spec .pills i { font: normal 500 10px var(--sans); color: #fff; padding: 3px 9px; border-radius: 999px; mix-blend-mode: normal; }
.spec .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; display: flex; }
.spec .strip em { flex: 1; }
.spec.big { aspect-ratio: 16 / 8; padding: 32px 32px 0; border: 1px solid var(--line); border-radius: 12px; gap: 10px; }
.spec.big b { font-size: clamp(20px, 3vw, 30px); }
.spec.big span { font-size: 14px; }
.spec.big .pills i { font-size: 12px; padding: 5px 14px; }
.spec.big .strip { height: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 10px 0; }
.filters input, .filters select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.filters input { flex: 1 1 220px; min-width: 0; }
.mods { margin: 4px 0 20px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; border: 0; background: transparent; color: var(--muted); padding: 7px 14px; cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--on-ink); }
.seg.sm button { padding: 4px 10px; font-size: 12px; }
.empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 60px 0; }
.style { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.crumbs { font-size: 12.5px; color: var(--faint); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.sname { font: 500 clamp(30px, 4vw, 46px)/1.05 var(--serif); letter-spacing: -.02em; margin: 0 0 8px; }
.smood { font: italic 19px/1.35 var(--serif); color: var(--muted); margin: 0 0 22px; }
.sactions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.btn { font: 500 13.5px var(--sans); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 8px 16px; cursor: pointer; text-decoration: none; }
.btn.sm { padding: 4px 12px; font-size: 12px; }
.smeta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 13px; }
.smeta dt { color: var(--faint); }
.smeta dd { margin: 0; }
.status { font-size: 12px; color: var(--faint); margin: 12px 0 0; }
.sleft section { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 6px; }
.sleft h2 { font: 500 22px var(--serif); margin: 14px 0 12px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sw { text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 0 0 10px; cursor: pointer; font: inherit; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.sw span { height: 64px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sw b, .sw code, .sw small { padding: 0 10px; }
.sw b { font-size: 13px; }
.sw code { font: 12px var(--mono); color: var(--muted); }
.sw small { font-size: 11.5px; color: var(--faint); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.trow { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tlabel { font-size: 12.5px; color: var(--muted); }
.tsample { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.t1 { font-size: 26px; line-height: 1.15; overflow-wrap: anywhere; }
.t2 { font-size: 14px; color: var(--muted); }
.mdx { overflow-wrap: anywhere; }
.mdx table { border-collapse: collapse; font-size: 12.5px; display: block; overflow-x: auto; max-width: 100%; }
.mdx th, .mdx td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.mdx code { font: 12px var(--mono); background: var(--code-bg); padding: 1px 4px; border-radius: 4px; }
.mdx h3 { font: 600 14px var(--sans); margin: 16px 0 6px; }
.sright { position: sticky; top: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.ptabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ptabs button { font: 500 12.5px var(--sans); border: 0; background: transparent; color: var(--muted); padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.ptabs button[aria-selected=true] { background: var(--chip); color: var(--ink); }
.ptools { display: flex; gap: 6px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); }
.ptools .seg { margin-right: auto; }
.pbody { margin: 0; padding: 16px; overflow: auto; font: 12px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; background: var(--code-bg); flex: 1; }
.coll { margin-bottom: 44px; }
.coll .lede { margin: -6px 0 16px; }
.closer { margin-top: 16px; border-left: 2px solid var(--ink); padding: 4px 0 4px 14px; max-width: 760px; }
.closer span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.closer p { margin: 4px 0 0; font: 16px/1.5 var(--serif); }
.prompt { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 16px; white-space: pre-wrap; font: 13px/1.6 var(--mono); max-width: 860px; }
.prose { max-width: 720px; font-size: 15px; }
.prose h2, main > section h2 { font: 500 22px var(--serif); margin: 28px 0 8px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink); padding: 8px 16px; border-radius: 999px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.on { opacity: 1; }
@media (max-width: 1100px) {
  .style { grid-template-columns: minmax(0, 1fr); }
  .sright { position: static; }
  .panel { max-height: 70vh; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 10px; }
  .side nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .side nav a { white-space: nowrap; }
  .side-foot { display: none; }
  .main { padding: 20px 16px 48px; }
  .hero { margin-top: 12px; }
  .trow { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--chip); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.shot .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; display: flex; }
.shot .strip em { flex: 1; }
.spec .aa { font-size: 44px; line-height: 1; font-weight: 500; -webkit-line-clamp: unset; }
.spec.big .aa { font-size: 72px; }
.bigshot { margin: 0 0 14px; }
.bigshot img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 12px; }
.bigshot figcaption { font-size: 11.5px; color: var(--faint); margin-top: 6px; overflow-wrap: anywhere; }
.bigshot figcaption a { color: inherit; }
.bigshot + .spec.big { aspect-ratio: auto; padding: 18px 24px 30px; }
.bigshot + .spec.big .aa { font-size: 40px; }
.theme-toggle { font: inherit; font-size: 12.5px; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
@media (max-width: 760px) { .theme-toggle { align-self: flex-start; } }

/* motion: card hover preview, thumbnail wall, entrance, scrolling page frame */
.shot img.tall { position: absolute; top: 0; left: 0; width: 100%; height: auto; object-fit: initial; opacity: 0; z-index: 1;
  transition: opacity .25s, transform .6s ease; }
/* the tall capture is 720x1350 in a 16:10 box: 1.875w tall, 0.625w visible, so it travels 2/3 of its height */
.card:hover .shot img.tall.ready, .card:focus-visible .shot img.tall.ready { opacity: 1; transform: translateY(-66.667%);
  transition: opacity .25s, transform 6s cubic-bezier(.45, 0, .55, 1) .25s; }
.shot .strip { z-index: 2; }
.wall { margin: 8px -32px 36px; display: grid; gap: 14px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.wrow { overflow: hidden; padding: 4px 0; }
.wtrack { display: flex; gap: 14px; width: max-content; animation: drift 90s linear infinite; }
.r2 .wtrack { animation-direction: reverse; animation-duration: 110s; }
.wall:hover .wtrack { animation-play-state: paused; }
.wtrack a { flex: none; width: 240px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s; }
.wtrack a:hover { transform: scale(1.04); }
.wtrack img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
@keyframes drift { to { transform: translateX(-50%); } }
.grid .card { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.grid .card:nth-child(2) { animation-delay: .04s; } .grid .card:nth-child(3) { animation-delay: .08s; } .grid .card:nth-child(4) { animation-delay: .12s; }
.grid .card:nth-child(5) { animation-delay: .16s; } .grid .card:nth-child(6) { animation-delay: .2s; } .grid .card:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.hero h1 { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero .lede { animation: rise .7s .08s cubic-bezier(.2, .7, .2, 1) both; }
.bigshot .frame { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; }
.bigshot .bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--chip); }
.bigshot .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.bigshot .bar b { font-size: 11.5px; font-weight: 500; color: var(--faint); margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bigshot .view { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.bigshot .view img { width: 100%; height: auto; border: 0; border-radius: 0; }
.bigshot .frame.scroll .view img { animation: pagescroll 16s cubic-bezier(.45, 0, .55, 1) 1s infinite alternate; }
.bigshot .frame.scroll:hover .view img { animation-play-state: paused; }
@keyframes pagescroll { 0%, 12% { transform: translateY(0); } 88%, 100% { transform: translateY(-66.667%); } }
@media (max-width: 760px) { .wall { margin: 0 -16px 28px; } .wtrack a { width: 170px; } }
@media (prefers-reduced-motion: reduce) {
  .wtrack, .bigshot .frame.scroll .view img, .grid .card, .hero h1, .hero .lede { animation: none; }
  .card:hover .shot img.tall.ready { transition: opacity .25s; transform: none; }
}

/* languages: switcher, note on English-only DESIGN.md text, CJK font fallbacks */
.langs { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0 0; font-size: 12.5px; }
.langs a { color: var(--faint); text-decoration: none; }
.langs a:hover { color: var(--ink); }
.langs a[aria-current] { color: var(--ink); font-weight: 600; }
.langnote { font-size: 13px; color: var(--faint); border-left: 2px solid var(--line); padding: 2px 0 2px 10px; margin: 18px 0 0; }
:root:lang(ja) { --sans: Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --serif: Newsreader, "Hiragino Mincho ProN", "Noto Serif JP", "Yu Mincho", Georgia, serif; }
:root:lang(zh-Hans) { --sans: Inter, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: Newsreader, "Songti SC", "Noto Serif SC", SimSun, Georgia, serif; }
:lang(ja) .prose p, :lang(zh-Hans) .prose p { line-height: 1.85; }
:lang(ja) { line-break: strict; }
