#work-ui {
  --fg: #eef3f2;
  --dim: rgba(238, 243, 242, 0.5);
  --line: rgba(238, 243, 242, 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --cn: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --en: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font: var(--en), var(--cn);
  --project: #778899;
}
/* ---------- header ---------- */
#archive-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 38px 40px 0; pointer-events: none; opacity: 0; transition: opacity 2s ease 1s;
}
body.ready #archive-header { opacity: 1; }
#archive-header > * { pointer-events: auto; }
.brand img { display: block; height: 36px; width: auto; opacity: 0.94; transition: opacity 0.4s; }
.brand:hover img { opacity: 1; }
.pill {
  display: flex; align-items: center; height: 48px; padding: 0 8px; border-radius: 48px;
  background: rgba(15, 16, 18, 0.72); border: 1px solid rgba(255, 255, 255, 0.08); backdrop-filter: blur(12px);
  font-family: var(--en); font-weight: 400; font-size: 14px; letter-spacing: 0.26em;
}
.pill button { height: 100%; padding: 0 20px; opacity: 0.85; transition: opacity 0.3s; }
.pill button:hover { opacity: 1; }
.pill-line { width: 70px; height: 1px; background: rgba(255, 255, 255, 0.35); }
.pill .close { display: none; }
body.contact-open .pill .open { display: none; }
body.contact-open .pill .close { display: inline; }

/* ---------- slogan / hint ---------- */
#categories {
  position: fixed; left: 40px; bottom: 38px; z-index: 22; display: grid; gap: 4px; justify-items: start;
  opacity: 0; pointer-events: none; transition: opacity 0.7s;
}
body.in-work #categories { opacity: 1; pointer-events: auto; }
body.detail-open #categories, body.contact-open #categories, body.list-open #categories { opacity: 0; pointer-events: none; }
.cat-head { font-family: var(--cn); font-size: 11px; letter-spacing: 0.24em; color: var(--dim); margin-bottom: 10px; }
.cat-head em { font-style: normal; font-family: var(--en); margin-left: 10px; letter-spacing: 0.22em; }
#categories button { display: flex; align-items: baseline; gap: 12px; padding: 3px 0; color: var(--dim); transition: color 0.35s, transform 0.5s var(--ease); }
#categories button span { font-family: var(--cn); font-weight: 200; font-size: 17px; letter-spacing: 0.3em; }
#categories button em { font-style: normal; font-family: var(--en); font-weight: 300; font-size: 14px; letter-spacing: 0.32em; }
#categories button::before { content: ""; width: 0; height: 1px; background: var(--fg); align-self: center; transition: width 0.5s var(--ease); }
#categories button:hover { color: var(--fg); }
#categories button.on { color: var(--fg); }
#categories button.on::before { width: 18px; }
/* ---------- all projects list ---------- */
#list { position: fixed; inset: 0; z-index: 32; background: rgba(4, 6, 7, 0.9); backdrop-filter: blur(14px); opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0.6s; display: flex; flex-direction: column; }
body.list-open #list { opacity: 1; visibility: visible; }
.list-head { display: flex; align-items: center; gap: 40px; padding: 120px 40px 26px; border-bottom: 1px solid var(--line); }
.list-title { font-family: var(--cn); font-weight: 200; font-size: 28px; letter-spacing: 0.2em; }
.list-title em { font-style: normal; font-family: var(--en); font-size: 15px; letter-spacing: 0.3em; color: var(--dim); margin-left: 14px; }
.list-tags { display: flex; gap: 6px; }
.list-tags button { padding: 7px 14px; border-radius: 30px; font-size: 13px; letter-spacing: 0.2em; color: var(--dim); font-family: var(--en), var(--cn); transition: background 0.3s, color 0.3s; }
.list-tags button.on { background: rgba(255, 255, 255, 0.9); color: #0b0d0e; }
#list-close { margin-left: auto; position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); transition: transform 0.6s var(--ease); }
#list-close:hover { transform: rotate(90deg); }
#list-close i, #detail-close i { position: absolute; left: 50%; top: 50%; width: 16px; height: 1px; background: var(--fg); }
#list-close i:first-child, #detail-close i:first-child { transform: translate(-50%, -50%) rotate(45deg); }
#list-close i:last-child, #detail-close i:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
/* two columns of large previews; each row is ~half the viewport so four projects fill a screen */
.list-items { list-style: none; overflow-y: auto; flex: 1; padding: 28px 40px 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 28px; align-content: start; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.list-items li button { width: 100%; display: grid; gap: 14px; text-align: left; }
.list-items .thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: #0b0d0e; }
.list-items .thumb img, .list-items .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity 0.6s; }
.list-items .thumb img { opacity: 0.85; }
.list-items li button:hover .thumb img { transform: scale(1.04); opacity: 1; }
.list-items .meta { display: flex; align-items: baseline; gap: 16px; }
.list-items .t { font-family: var(--cn); font-weight: 300; font-size: 18px; letter-spacing: 0.12em; }
.list-items .s { font-size: 12px; letter-spacing: 0.24em; color: var(--dim); }
.detail-strip { flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.detail-strip::-webkit-scrollbar { display: none; }
.detail-strip button { flex: none; position: relative; width: 84px; height: 48px; border-radius: 3px; overflow: hidden; opacity: 0.45; outline: 1px solid transparent; transition: opacity 0.3s, outline-color 0.3s; }
.detail-strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-strip button.on { opacity: 1; outline-color: rgba(255, 255, 255, 0.85); }
.detail-strip button:hover { opacity: 0.85; }
.detail-strip button.video::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; background: rgba(0, 0, 0, 0.3); }
.detail-count { flex: none; font-size: 12px; letter-spacing: 0.24em; color: var(--dim); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

/* ---------- cursor ---------- */
@media(max-width:768px){
  #archive-header { padding: 22px 18px 0; }
  .brand img { height: 22px; }
  .pill { height: 40px; font-size: 12px; }
  .pill button { padding: 0 12px; }
  #categories { left: 18px; bottom: 24px; }
  .cat-head { display: none; }
  #categories button span { font-size: 14px; }
  #categories button em { font-size: 11px; }
  .list-head { padding: 90px 18px 18px; flex-wrap: wrap; gap: 14px; }
  .list-items { padding: 6px 18px 40px; grid-template-columns: 1fr; gap: 22px; }
  .list-items .thumb { aspect-ratio: 16 / 10; }
  .list-items .meta { display: grid; gap: 4px; }
}
/* project page opened from 全部案例 — films first, then a justified gallery (per-project layout) */
#project-page { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; background: rgba(6, 8, 9, 0.97); opacity: 0; pointer-events: none; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.7s var(--ease); }
#project-page.open { opacity: 1; pointer-events: auto; transform: none; }
.pp-head { display: flex; align-items: flex-end; gap: 36px; padding: 108px 40px 22px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.pp-back { font-family: var(--cn); font-size: 13px; letter-spacing: 0.2em; color: var(--dim); padding: 9px 16px; border: 1px solid var(--line); border-radius: 30px; transition: color 0.3s, background 0.3s; white-space: nowrap; }
.pp-back:hover { color: #0b0d0e; background: rgba(255, 255, 255, 0.9); }
.pp-back em { font-style: normal; font-family: var(--en); margin-left: 6px; }
.pp-title h2 { font-family: var(--cn); font-weight: 300; font-size: clamp(24px, 2.6vw, 38px); letter-spacing: 0.12em; }
.pp-title p { margin-top: 8px; font-size: 12px; letter-spacing: 0.3em; color: var(--dim); }
.pp-tags { margin-left: auto; display: flex; gap: 10px; }
.pp-tags span { font-size: 11px; letter-spacing: 0.2em; color: var(--dim); padding: 6px 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 30px; font-family: var(--en), var(--cn); }
.pp-scroll { flex: 1; overflow-y: auto; padding: 30px 40px 90px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }
.pp-film { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 74vh; margin: 0 auto 30px; border-radius: 8px; overflow: hidden; background: #000; }
.pp-film video { width: 100%; height: 100%; object-fit: contain; display: block; }
.pp-section { margin-bottom: 34px; }
.pp-section h3 { font-family: var(--cn); font-weight: 300; font-size: 14px; letter-spacing: 0.24em; color: var(--dim); margin-bottom: 16px; }
.pp-section h3 em { font-style: normal; font-family: var(--en); font-size: 11px; margin-left: 8px; letter-spacing: 0.3em; }
.pp-row { display: flex; flex-wrap: wrap; gap: 14px; }
.pp-item { position: relative; flex: none; width: calc(var(--ar) * 260px); height: 260px; overflow: hidden; border-radius: 6px; background: #0b0d0e; }
.pp-item img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; transition: transform 1.2s var(--ease), opacity 0.5s; }
.pp-item.plan { background: #e9ece9; }
.pp-item.plan img { object-fit: contain; opacity: 1; }
.pp-item:hover img { transform: scale(1.035); opacity: 1; }
.pp-lightbox { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(3, 4, 5, 0.94); opacity: 0; pointer-events: none; transition: opacity 0.4s; }
.pp-lightbox.open { opacity: 1; pointer-events: auto; }
.pp-lightbox img { max-width: 88vw; max-height: 84vh; object-fit: contain; border-radius: 4px; opacity: 0; transition: opacity 0.4s; }
.pp-lightbox img.plan { background: #e9ece9; }
.pp-lightbox img.on { opacity: 1; }
.pp-lb-prev, .pp-lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); font-size: 18px; color: var(--fg); transition: background 0.3s; }
.pp-lb-prev { left: 28px; }
.pp-lb-next { right: 28px; }
.pp-lb-prev:hover, .pp-lb-next:hover { background: rgba(255, 255, 255, 0.12); }
.pp-lb-close { position: absolute; top: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); }
.pp-lb-close i { position: absolute; left: 50%; top: 50%; width: 16px; height: 1px; background: var(--fg); }
.pp-lb-close i:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.pp-lb-close i:last-child { transform: translate(-50%, -50%) rotate(-45deg); }
.pp-lb-count { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: 0.3em; color: var(--dim); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .pp-head { flex-wrap: wrap; gap: 14px; padding: 88px 18px 16px; }
  .pp-tags { margin-left: 0; }
  .pp-scroll { padding: 20px 18px 60px; }
  .pp-lb-prev, .pp-lb-next { display: none; }
}