@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/noto-sans-sc-regular.woff2") format("woff2");
  font-weight: 100 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("fonts/noto-sans-sc-bold.woff2") format("woff2");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --bg-elevated: #161617;
  --text: #f5f5f7;
  --text-soft: rgba(255, 255, 255, 0.86);
  --text-dim: rgba(245, 245, 247, 0.62);
  --accent: #2997ff;
  --accent-strong: #0071e3;
  --nav-bg: rgba(22, 22, 23, 0.36);
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-soft: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --inset: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius-card: 18px;
  --radius-dock: 28px;
  --radius-pill: 999px;
  --nav-h: 52px;
  --font: "Inter", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --focus: 0 0 0 3px rgba(41, 151, 255, 0.45);
  --ease: 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

html {
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--accent-strong);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

.noscript {
  margin: 80px 24px;
  text-align: center;
  color: var(--text-soft);
}

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

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 0 24px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--hairline);
}

.site-nav nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  padding: 6px 2px;
  border-radius: 6px;
  transition: color var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #fff;
  text-decoration: none;
}

.site-nav .wordmark {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--text);
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: 15px;
  letter-spacing: -0.02em;
}

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

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  color: var(--text);
}

.hero .hero-photo,
.hero .hero-photo picture,
.hero .hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero .hero-photo picture {
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.28) 0%,
    rgba(0, 0, 0, 0.08) 30%,
    rgba(0, 0, 0, 0.2) 58%,
    rgba(0, 0, 0, 0.78) 100%
  );
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(76px, 13vh, 118px);
  z-index: 2;
  text-align: center;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  padding: 0 24px;
}

.hero-copy h1 {
  font-size: clamp(56px, 8.4vw, 84px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-copy p {
  margin-top: 10px;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.92);
}

.hero-copy .cta {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  text-shadow: none;
  padding: 6px 8px;
  border-radius: 8px;
}

.hero-copy .cta:hover {
  text-decoration: none;
  color: #6eb5ff;
}

.dock {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 3;
  width: min(1180px, calc(100% - 48px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-dock);
  background: var(--glass);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  box-shadow: var(--shadow-deep), var(--inset);
  border: 1px solid var(--hairline-strong);
  scrollbar-width: none;
}

.dock::-webkit-scrollbar {
  display: none;
}

.dock a {
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-card);
  overflow: hidden;
  height: 168px;
  position: relative;
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform var(--ease), box-shadow var(--ease);
}

.dock a:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
  text-decoration: none;
}

.dock a picture,
.dock a img,
.dock a .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dock a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.dock b {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* -------- browse -------- */

.browse {
  position: relative;
  z-index: 1;
  padding: 72px 48px 96px;
  scroll-margin-top: var(--nav-h);
}

.browse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.browse-head h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.browse-head .count {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.filters {
  border-radius: 24px;
  padding: 16px 18px 12px;
  background: var(--glass-soft);
  border: 1px solid var(--hairline);
  box-shadow: var(--inset);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  margin-bottom: 28px;
}

.filters.pulse {
  box-shadow: var(--inset), 0 0 0 2px rgba(41, 151, 255, 0.5);
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.search-row input[type="search"] {
  flex: 1;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--hairline-strong);
  background: rgba(0, 0, 0, 0.35);
  padding: 0 16px;
  color: var(--text);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.search-row input[type="search"]::placeholder {
  color: var(--text-dim);
}

.filters-toggle,
.filters-done {
  display: none;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--hairline-strong);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.filters-toggle[data-active="true"] {
  background: var(--accent-strong);
  border-color: transparent;
}

.filter-groups {
  display: grid;
  gap: 8px;
}

.filter-compact {
  display: grid;
  gap: 8px;
}

@media (min-width: 1100px) {
  .filter-compact {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(0, 0.9fr) auto;
    align-items: start;
  }

  .filter-compact .filter-group {
    grid-template-columns: 42px 1fr;
  }

  .filter-compact .chips-reset {
    display: flex;
    align-items: center;
    padding-top: 2px;
  }
}

.filter-group {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 12px;
  align-items: start;
}

.filter-group .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding-top: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 36px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.chip[aria-pressed="true"] {
  background: var(--accent-strong);
  border-color: transparent;
  color: #fff;
}

.chip-reset {
  color: var(--accent);
  border-color: transparent;
  background: transparent;
}

.chip-reset:hover {
  background: rgba(41, 151, 255, 0.12);
}

/* -------- grid -------- */

.grid {
  columns: 1;
  column-gap: 18px;
}

@media (min-width: 720px) {
  .grid {
    columns: 2;
  }
}

@media (min-width: 1100px) {
  .grid {
    columns: 3;
  }
}

@media (min-width: 1400px) {
  .grid {
    columns: 4;
  }
}

.card {
  break-inside: avoid;
  margin-bottom: 18px;
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  background: #111;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: transform var(--ease), box-shadow var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5);
  text-decoration: none;
}

.card figure {
  margin: 0;
  position: relative;
}

.card img,
.card .ph {
  width: 100%;
  height: auto;
  aspect-ratio: var(--ar, 3 / 4);
  object-fit: cover;
  background: #161617;
}

.card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 14px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.card .card-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card .card-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(245, 245, 247, 0.72);
  letter-spacing: -0.01em;
}

.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
}

.empty p {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-soft);
  margin-bottom: 18px;
}

/* -------- detail -------- */

.detail {
  padding: calc(var(--nav-h) + 36px) 48px 96px;
  max-width: 1440px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 40px;
  align-items: start;
}

.detail-photo {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.detail-photo figure {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), var(--inset);
  background: #0a0a0c;
  border: 1px solid var(--hairline);
}

.detail-photo img,
.detail-photo .ph {
  width: 100%;
  height: auto;
  max-height: calc(100svh - var(--nav-h) - 48px);
  object-fit: contain;
  background: #0a0a0c;
  margin: 0 auto;
}

.detail-body h1 {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.detail-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  background: var(--glass-soft);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}

.pill-link {
  color: var(--text-soft);
  text-decoration: none;
}

.pill-link:hover {
  color: #fff;
  text-decoration: none;
  background: var(--glass);
}

.comfy {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--glass-soft);
  border: 1px solid var(--hairline);
}

.comfy h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.comfy dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px 12px;
  font-size: 13px;
}

.comfy dt {
  color: var(--text-dim);
  font-weight: 500;
}

.comfy dd {
  color: var(--text-soft);
  word-break: break-word;
}

.action-bar {
  position: sticky;
  top: calc(var(--nav-h) + 12px);
  z-index: 5;
  margin-top: 20px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(22, 22, 23, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-deep), var(--inset);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--glass);
  border: 1px solid var(--hairline-strong);
  color: var(--text);
  transition: background var(--ease), transform var(--ease);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-primary {
  background: var(--accent-strong);
  border-color: transparent;
  color: #fff;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-ghost {
  background: transparent;
}

.btn.copied {
  background: #1f6a3a;
  border-color: transparent;
  color: #fff;
}

.preview {
  margin-top: 18px;
}

.preview h2,
.rewrite-head h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.preview pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 16px 18px;
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-soft);
  max-height: 240px;
  overflow: auto;
}

.rewrite {
  margin-top: 32px;
  scroll-margin-top: calc(var(--nav-h) + 80px);
}

.rewrite-head p {
  color: var(--text-dim);
  font-size: 13px;
  margin: -4px 0 14px;
}

.module {
  border-radius: 18px;
  padding: 14px 14px 12px;
  margin-bottom: 10px;
  background: var(--glass-soft);
  border: 1px solid var(--hairline);
}

.module.is-off {
  opacity: 0.55;
}

.module-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-bottom: 10px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  flex: 0 0 44px;
  transition: background var(--ease);
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform var(--ease);
}

.switch[aria-checked="true"] .switch-ui {
  background: var(--accent-strong);
}

.switch[aria-checked="true"] .switch-ui::after {
  transform: translateX(18px);
}

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  max-width: 100%;
}

.preset {
  min-height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

.preset:hover {
  background: rgba(255, 255, 255, 0.1);
}

.preset[aria-pressed="true"] {
  background: #fff;
  color: #111;
  border-color: transparent;
}

.module textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--hairline);
  background: rgba(0, 0, 0, 0.38);
  padding: 10px 12px;
  line-height: 1.55;
  font-size: 13.5px;
  color: var(--text);
}

/* -------- about -------- */

.about {
  padding: calc(var(--nav-h) + 64px) 24px 96px;
  max-width: 720px;
  margin: 0 auto;
}

.about h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 12px;
}

.about .lede {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 28px;
}

.about p,
.about li {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.about h2 {
  margin: 32px 0 10px;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.about ul {
  padding-left: 1.2em;
}

.about code {
  font-family: var(--font);
  font-size: 0.92em;
  background: var(--glass-soft);
  padding: 0.1em 0.4em;
  border-radius: 6px;
}

.page-foot {
  padding: 0 48px 56px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: -0.01em;
  text-align: center;
}

.page-foot a {
  color: var(--text-dim);
}

/* -------- responsive -------- */

@media (max-width: 1100px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .detail-photo {
    position: static;
  }

  .detail-photo img,
  .detail-photo .ph {
    max-height: min(72vh, 820px);
    width: 100%;
    object-fit: cover;
  }
}

@media (max-width: 900px) {
  .dock {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    width: calc(100% - 28px);
    bottom: 20px;
    gap: 10px;
    padding: 12px;
  }

  .dock a {
    flex: 0 0 52%;
    max-width: 240px;
    height: 148px;
    scroll-snap-align: start;
  }

  .browse,
  .detail {
    padding-left: 20px;
    padding-right: 20px;
  }

  .page-foot {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 720px) {
  .site-nav {
    gap: 16px;
    padding: 0 14px;
    justify-content: space-between;
  }

  .site-nav nav {
    gap: 14px;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-copy h1 {
    letter-spacing: -0.05em;
  }

  .filters-toggle,
  .filters-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .filter-groups {
    display: none;
  }

  .filters.is-open .filter-groups {
    display: grid;
    margin-top: 8px;
  }

  .filters.is-open .filters-done {
    width: 100%;
    margin-top: 8px;
  }

  .filter-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .filter-group .label {
    padding-top: 4px;
  }

  .action-bar {
    position: static;
  }

  .module-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .presets {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}


/* thin dark scrollbar so marketing hero stays clean */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
