:root {
  --bg: #060708;
  --ink: #f6f6f7;
  --muted: #8e9099;
  --card: #101114;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #ff6b57;
  --accent-ink: #1a0805;
  --accent-2: #ffb454;
  --radius: 14px;
  --wrap: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
body.detail-open { overflow: hidden; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: #fff; color: #111; padding: 8px 14px; border-radius: 8px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: 0.01em; }
.brand-mark { width: 30px; height: 30px; flex: none; display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: 10px 20px; font-weight: 600; font-size: 14px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 9px 18px;
  font-weight: 600; font-size: 14px; background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(255, 255, 255, 0.1); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px;
  font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.icon-btn[disabled] { opacity: 0.35; cursor: default; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px;
  font-size: 13px; font-weight: 500; color: var(--muted); background: transparent;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .n { font-size: 11px; opacity: 0.62; }

.search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04); min-width: 230px;
}
.search svg { flex: none; opacity: 0.55; }
.search input { border: 0; background: none; outline: none; width: 100%; min-width: 0; font-size: 13px; }
.search input::placeholder { color: var(--muted); }

.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 26px; padding: 18px 40px;
  background: linear-gradient(180deg, rgba(6, 7, 8, 0.92), rgba(6, 7, 8, 0));
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-head.is-solid {
  background: rgba(6, 7, 8, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.head-nav { display: flex; gap: 22px; font-size: 13px; color: #c9cad2; }
.head-nav a:hover { color: #fff; }
.head-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.hero {
  position: relative; min-height: 82vh; display: flex; align-items: flex-end;
  padding: 140px 0 64px; overflow: hidden; background: #0a0b0d;
}
.hero-bg { position: absolute; inset: 0; background: #0a0b0d; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 7, 8, 0.94) 0%, rgba(6, 7, 8, 0.6) 46%, rgba(6, 7, 8, 0.12) 100%),
    linear-gradient(0deg, #060708 0%, rgba(6, 7, 8, 0.2) 42%, transparent 70%);
}
.hero.no-cover .hero-bg img { display: none; }
.hero.no-cover .hero-bg { background: radial-gradient(900px 480px at 72% 18%, rgba(255, 107, 87, 0.16), transparent 65%), #0a0b0d; }
.hero > .wrap { width: 100%; }
.hero-inner { position: relative; z-index: 2; max-width: 660px; }
.kicker { margin: 0 0 12px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); line-height: 0.96; letter-spacing: -0.04em; margin: 0 0 16px; }
.hero-desc { color: #c9cad2; max-width: 520px; margin: 0 0 24px; font-size: 15px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0 0; }
.filterbar .chips { display: flex; gap: 7px; flex-wrap: wrap; }
.filterbar .search { margin-left: auto; min-width: 240px; }

.rows { padding: 26px 0 90px; display: flex; flex-direction: column; gap: 40px; }
#rows, .shelf { scroll-margin-top: 90px; }
.shelf-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 13px; }
.shelf-head h2 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.shelf-head .count { font-size: 11px; color: var(--muted); }
.shelf-head .more { margin-left: auto; font-size: 11px; color: var(--muted); }
.shelf-head .more:hover { color: var(--ink); }
.shelf-wrap { position: relative; }
.shelf-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 4px; scrollbar-width: none;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track .work { flex: 0 0 300px; scroll-snap-align: start; }
.shelf-track .work-media { aspect-ratio: 16 / 9; }
.shelf-nav {
  position: absolute; top: calc(50% - 26px); width: 38px; height: 38px; border-radius: 50%;
  background: rgba(10, 11, 13, 0.88); border: 1px solid var(--line); z-index: 3;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s ease; font-size: 14px;
}
.shelf-wrap:hover .shelf-nav, .shelf-nav:focus-visible { opacity: 1; }
.shelf-nav.prev { left: -14px; }
.shelf-nav.next { right: -14px; }

.work { position: relative; cursor: pointer; min-width: 0; }
.work-media { position: relative; overflow: hidden; border-radius: 12px; background: #101114; }
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); }
.work:hover .work-media img { transform: scale(1.045); }
.badge {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em; padding: 4px 8px;
  border-radius: 999px; background: rgba(8, 8, 10, 0.64); color: #fff; white-space: nowrap;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.work-body { padding: 9px 2px 0; }
.work-title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-meta { display: flex; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.cover-fallback {
  display: flex; align-items: center; justify-content: center; height: 100%;
  background: linear-gradient(135deg, #15161c, #241812); color: rgba(255, 255, 255, 0.5);
  font-size: 14px; text-align: center; padding: 20px;
}

.empty { padding: 64px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; }
.empty h3 { margin: 0 0 6px; color: var(--ink); font-size: 20px; }
.empty p { margin: 0 0 18px; }

.detail {
  position: fixed; inset: 0; z-index: 90;
  display: grid; grid-template-columns: minmax(0, 1fr) 400px;
  background: #0a0b0d; color: var(--ink);
}
.detail-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #060708; }
.detail-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: #0c0d10; flex: none;
}
.detail-bar-title { flex: 1; min-width: 0; margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-actions { display: flex; gap: 8px; }
.detail-frame { position: relative; flex: 1; min-height: 0; background: #060708; }
.detail-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #060708; }
.detail-loading {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(6, 7, 8, 0.82); color: var(--muted); font-size: 13px;
}
.detail-loading img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.22; filter: blur(3px); }
.detail-loading.no-cover img { display: none; }
.detail-loading .spinner, .detail-loading p { position: relative; z-index: 1; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18); border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.detail-panel {
  position: relative; padding: 40px 34px; overflow: auto; border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px; background: #0a0b0d;
  scrollbar-width: none;
}
.detail-panel::-webkit-scrollbar { width: 0; height: 0; display: none; }
.detail-close {
  position: absolute; right: 20px; top: 20px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); font-size: 18px; line-height: 1; color: var(--muted);
}
.detail-close:hover { border-color: var(--accent); color: var(--ink); }
.detail-kicker { margin: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.detail-panel h2 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; }
.detail-sub { margin: 0; color: var(--muted); }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-tags span { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.detail-desc { margin: 0; font-size: 14px; line-height: 1.7; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 14px; }
.detail-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; margin: 0; color: var(--muted); }
.detail-meta dt { color: var(--ink); font-weight: 600; }
.detail-meta dd { margin: 0; }
.detail-nav {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 16px; font-size: 12px; color: var(--muted);
}

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  z-index: 120; background: #111; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .wrap { padding: 0 20px; }
  .site-head { padding: 14px 20px; }
  .head-nav { display: none; }
  .head-actions .search { display: none; }
  .hero { min-height: 70vh; padding: 120px 0 48px; }
  .shelf-track .work { flex-basis: 250px; }
  .filterbar .search { margin-left: 0; width: 100%; }
  .detail { grid-template-columns: 1fr; grid-template-rows: minmax(0, 56vh) 1fr; }
  .detail-panel { border-left: 0; border-top: 1px solid var(--line); padding: 26px 22px; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 44px; }
  .shelf-track .work { flex-basis: 78%; }
  .detail-bar-title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work-media img, .btn, .toast { transition: none; }
  .spinner { animation-duration: 2s; }
}
