/* ============================================================
   FU XUEHAN — Portfolio prototype
   Warm paper, editorial grid, quiet motion.
   ============================================================ */

:root {
  --paper: #F6F4EF;
  --paper-2: #EFECE4;
  --paper-3: #E7E3D8;
  --ink: #141412;
  --ink-2: #2A2A26;
  --muted: #6F6A60;
  --muted-2: #969083;
  --line: #D9D4C8;
  --line-soft: #E7E2D7;
  --line-strong: #BDB6A7;
  --accent: #D5482C;
  --green: #3C7A4A;
  --white: #FCFBF7;
  --sans: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", "SimSun", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --head-h: 72px;
  --pad: 40px;
  --max: 1600px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.lb-open { overflow: hidden; }

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video, svg { max-width: 100%; }
p, h1, h2, h3, h4, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

.mono { font-family: var(--mono); }
.hidden, .is-hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------- grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------- header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--head-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 var(--pad);
  background: rgba(246, 244, 239, .84);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-soft), background .3s;
}

.site-head.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(246, 244, 239, .94);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  justify-self: start;
  line-height: 1;
}

.brand-en {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .14em;
}

.brand-cn {
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 34px;
  justify-self: center;
}

.site-nav a {
  position: relative;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
  padding: 4px 0;
  transition: color .25s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.head-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-self: end;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .13em;
  color: var(--muted-2);
  white-space: nowrap;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(60, 122, 74, .5);
  animation: pulse 2.8s infinite;
}

.head-clock {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(60, 122, 74, .4); }
  70% { box-shadow: 0 0 0 6px rgba(60, 122, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(60, 122, 74, 0); }
}

/* ---------------------------------------------------------- layout */
.view {
  position: relative;
  min-height: calc(100vh - var(--head-h));
  animation: viewIn .55s var(--ease);
}

@keyframes viewIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------------------------------------------------- hero */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 124px) var(--pad) clamp(48px, 6vw, 84px);
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-kicker i {
  width: 22px;
  height: 1px;
  background: var(--ink);
  display: inline-block;
}

.hero h1 {
  margin: 30px 0 0;
  font-size: clamp(50px, 9.4vw, 142px);
  font-weight: 600;
  line-height: .94;
  letter-spacing: -.06em;
  color: var(--ink);
}

.hero h1 > span { display: block; }

.hero h1 .line-muted {
  color: #8E887B;
  font-weight: 500;
}

.hero h1 .dot {
  color: var(--accent);
  font-weight: 400;
}

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 540px) 1fr;
  gap: 48px;
  align-items: end;
  margin-top: clamp(48px, 7vw, 96px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-foot p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 500px;
}

.hero-meta {
  justify-self: end;
  text-align: right;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 2.1;
  letter-spacing: .13em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.hero-meta b {
  display: block;
  font-weight: 400;
  color: var(--ink);
}

/* ---------------------------------------------------------- sections */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(90px, 10vw, 150px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding-top: 14px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
  border-top: 1px solid var(--ink);
}

.section-head .section-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--muted);
}

/* ---------------------------------------------------------- projects page */
.projects-page { max-width: var(--max); margin: 0 auto; padding: clamp(54px, 8vw, 104px) var(--pad) 0; }

.projects-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 36px;
  padding-bottom: clamp(30px, 4vw, 52px);
  border-bottom: 1px solid var(--ink);
}

.projects-head h1 {
  margin-top: clamp(26px, 4vw, 48px);
  font-size: clamp(54px, 9vw, 130px);
  line-height: .9;
  font-weight: 500;
  letter-spacing: -.07em;
}

.projects-head p {
  max-width: 340px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.brand-section {
  padding: clamp(34px, 4.5vw, 62px) 0;
  border-top: 1px solid var(--line);
}

.brand-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(18px, 2.4vw, 30px);
}

.brand-head h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.055em;
}

.brand-head span {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}

.brand-categories { display: grid; gap: clamp(22px, 3vw, 32px); }

.brand-category { padding-top: 2px; }

.brand-subhead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.brand-subhead h3 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(17px, 2vw, 26px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -.045em;
  color: var(--ink);
}

.brand-subhead span {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}

.brand-projects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 34px) clamp(14px, 2vw, 22px);
}

.brand-project { display: block; min-width: 0; }

.brand-project-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
}

.brand-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}

.brand-project:hover .brand-project-media img { transform: scale(1.03); }

.brand-project h3 {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-project > span {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 5vw, 64px) clamp(20px, 3vw, 36px);
  padding: clamp(32px, 4vw, 58px) 0 clamp(90px, 10vw, 140px);
}

.projects-grid .featured-cover { aspect-ratio: 4 / 3; }
.projects-grid .featured-meta h3 { font-size: 14px; }
.projects-grid .featured-meta .featured-cat { font-size: 8px; }
.projects-grid .featured-meta .featured-en { font-size: 10px; }

.section-link { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.section-link:hover { color: var(--ink); border-color: var(--ink); }

@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .projects-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .projects-head p { max-width: none; }
}

@media (max-width: 600px) {
  .brand-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .projects-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------- featured projects */
.featured-section { padding-top: clamp(54px, 7vw, 92px); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 2.4vw, 32px) clamp(12px, 1.6vw, 20px);
}

.featured-card {
  display: block;
  min-width: 0;
}

.featured-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
}

.featured-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform .8s var(--ease);
}

.featured-card:hover .featured-cover img { transform: scale(1.03); }

.featured-cover.is-long { aspect-ratio: 1080 / 2280; }

.featured-arrow {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(246, 244, 239, .9);
  color: var(--ink);
  font-size: 10px;
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.featured-card:hover .featured-arrow { opacity: 1; }

.featured-meta {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.featured-meta .featured-cat {
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .05em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-meta h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-meta .featured-en {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

/* ---------------------------------------------------------- category cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 68px) clamp(24px, 3vw, 40px);
}

.cat-card { display: block; min-width: 0; }

.cat-card--wide { grid-column: 1 / -1; }

.cat-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 4 / 3;
}

.cat-card--wide .cat-media { aspect-ratio: 16 / 9; }

.cat-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease), filter .5s;
}

.cat-card:hover .cat-media img,
.cat-card:focus-visible .cat-media img { transform: scale(1.035); }

.cat-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cat-carousel .cat-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity .9s var(--ease), transform 1.2s var(--ease);
}

.cat-carousel .cat-slide.is-active { opacity: 1; }

.cat-carousel .cat-slide-fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cat-dots {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cat-dots i {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(246, 244, 239, .45);
  transition: width .3s var(--ease), background .3s;
}

.cat-dots i.is-active {
  width: 16px;
  border-radius: 3px;
  background: var(--paper);
}

.cat-index,
.cat-cta { z-index: 2; }

.cat-index {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 8px;
  background: rgba(246, 244, 239, .94);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  line-height: 1;
}

.cat-cta {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.cat-card:hover .cat-cta,
.cat-card:focus-visible .cat-cta { opacity: 1; transform: none; }

.cat-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cat-info h2 {
  font-size: clamp(20px, 2.1vw, 27px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.cat-info .en {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cat-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 3px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
}

.cat-arrow {
  display: inline-block;
  font-size: 13px;
  transition: transform .4s var(--ease);
}

.cat-card:hover .cat-arrow { transform: translate(4px, -4px); }

/* ---------------------------------------------------------- category page */
.cat-page { padding-bottom: clamp(80px, 9vw, 140px); }

.cat-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(42px, 6vw, 80px) var(--pad) clamp(42px, 5vw, 68px);
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(30px, 4vw, 54px);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
}

.breadcrumb .sep { color: var(--line-strong); }
.breadcrumb a:hover { color: var(--ink); }

.cat-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}

.cat-title {
  font-size: clamp(54px, 8.6vw, 128px);
  font-weight: 600;
  line-height: .9;
  letter-spacing: -.06em;
}

.cat-title .en {
  display: block;
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.cat-side { max-width: 480px; }

.cat-intro {
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 28px;
}

.cat-facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 28px;
  justify-content: start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cat-facts dt {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.cat-facts dd {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--ink);
}

/* ---------------------------------------------------------- filter bar */
.filters {
  position: sticky;
  top: var(--head-h);
  z-index: 40;
  background: rgba(246, 244, 239, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.filters-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 13px var(--pad);
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters-inner::-webkit-scrollbar { display: none; }

.filters .filter-label {
  margin-right: 8px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .16em;
  color: var(--muted-2);
  white-space: nowrap;
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  transition: background .25s, color .25s, border-color .25s;
}

.chip sup {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
  top: -.2em;
}

.chip:hover { border-color: var(--ink); color: var(--ink); }

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chip.is-active sup { color: rgba(246, 244, 239, .6); }

/* ---------------------------------------------------------- works */
.works {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(30px, 4vw, 52px) var(--pad) 0;
  columns: 2;
  column-gap: clamp(24px, 3vw, 40px);
}

.work-card {
  display: block;
  width: 100%;
  margin: 0 0 clamp(42px, 5vw, 64px);
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.work-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}

.work-media img,
.work-media > video {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 1s var(--ease);
}

.work-card:hover .work-media img,
.work-card:hover .work-media > video { transform: scale(1.025); }

.work-media.is-long {
  aspect-ratio: 1080 / 2280;
}

.work-media.is-long img,
.work-media.is-long > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.work-view {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity .3s, transform .3s var(--ease);
}

.work-card:hover .work-view { opacity: 1; transform: none; }

.work-cap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 14px;
}

.work-cap h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.015em;
}

.work-cap .en {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-cap-side {
  text-align: right;
  flex: none;
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.8;
  letter-spacing: .08em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 8px;
}

.work-tags span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
  color: var(--muted);
}

.work-tags span + span::before {
  content: "/";
  margin-right: 8px;
  color: var(--line-strong);
}

.type-flag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 7px;
  background: rgba(20, 20, 18, .82);
  color: #F6F4EF;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.empty-state {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px var(--pad);
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------- lightbox */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  background: #121210;
  color: #F2EFE7;
  animation: lbIn .3s var(--ease-soft) both;
}

@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 64px 72px;
}

.lb-media-wrap {
  max-width: 100%;
  max-height: calc(100vh - 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.lb-media {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 128px);
  width: auto;
  height: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
  cursor: zoom-in;
}

.lb-media-wrap.is-zoomed {
  overflow: auto;
  width: 100%;
  height: calc(100vh - 128px);
  align-items: flex-start;
  justify-content: flex-start;
  cursor: grab;
}

.lb-media-wrap.is-zoomed.is-dragging { cursor: grabbing; }

.lb-media-wrap.is-zoomed .lb-media,
.lb-media.is-zoomed {
  max-width: none;
  max-height: none;
  width: 200%;
  height: auto;
  box-shadow: none;
  cursor: grab;
}

.lb-count {
  position: absolute;
  top: 26px;
  left: 32px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: #85857D;
}

.lb-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid #353530;
  border-radius: 50%;
  color: #F2EFE7;
  font-size: 17px;
  line-height: 1;
  transition: background .25s, border-color .25s;
}

.lb-close:hover { background: #242420; border-color: #55554C; }

.lb-zoom-tools {
  position: absolute;
  top: 22px;
  right: 68px;
  z-index: 3;
  display: flex;
  align-items: center;
  border: 1px solid #353530;
  border-radius: 100px;
  overflow: hidden;
  background: rgba(18, 18, 16, .72);
}

.lb-zoom-tools button {
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  background: transparent;
  border: 0;
  color: #F2EFE7;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  transition: background .2s;
}

.lb-zoom-tools button:hover { background: #242420; }

.lb-zoom-level {
  min-width: 50px !important;
  border-left: 1px solid #353530 !important;
  border-right: 1px solid #353530 !important;
  font-size: 9px !important;
  letter-spacing: .04em;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #353530;
  border-radius: 50%;
  background: rgba(18, 18, 16, .5);
  color: #F2EFE7;
  font-size: 16px;
  transition: background .25s;
}

.lb-nav:hover { background: #242420; }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }

.lb-side {
  min-height: 0;
  overflow-y: auto;
  padding: 48px 34px 36px;
  background: #191917;
  border-left: 1px solid #2B2B27;
}

.lb-side .label { color: #87877F; }

.lb-side h2 {
  margin-top: 20px;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.lb-side .lb-en {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #87877F;
}

.lb-desc {
  margin: 30px 0 32px;
  font-size: 13.5px;
  line-height: 1.9;
  color: #B7B3A8;
}

.lb-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
  padding-top: 22px;
  border-top: 1px solid #2E2E2A;
}

.lb-facts dt {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #77776F;
}

.lb-facts dd {
  margin: 5px 0 0;
  font-size: 11.5px;
  color: #D8D4C9;
}

.lb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
}

.lb-tag {
  padding: 6px 9px;
  border: 1px solid #353530;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  color: #B7B3A8;
}

.lb-original {
  display: inline-block;
  margin-top: 18px;
  padding-bottom: 3px;
  border-bottom: 1px solid #3A3A34;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .08em;
  color: #C9C5BA;
}

.lb-original:hover {
  color: #F2EFE7;
  border-color: #F2EFE7;
}

.lb-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  padding-right: 4px;
  border-top: 1px solid #2E2E2A;
  max-height: 32vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #55554C transparent;
}

.lb-gallery::-webkit-scrollbar { width: 5px; }
.lb-gallery::-webkit-scrollbar-thumb { background: #55554C; border-radius: 3px; }

.lb-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid #353530;
  background: #111110;
  cursor: pointer;
  opacity: .55;
  transition: opacity .25s, border-color .25s;
}

.lb-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-thumb:hover,
.lb-thumb.is-active {
  opacity: 1;
  border-color: #F2EFE7;
}

.lb-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 40px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid #2E2E2A;
  background: transparent;
  text-align: left;
  color: #F2EFE7;
}

.lb-next small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .14em;
  color: #77776F;
}

.lb-next strong {
  font-size: 14px;
  font-weight: 500;
}

.lb-next span {
  font-size: 18px;
  transition: transform .35s var(--ease);
}

.lb-next:hover span { transform: translateX(5px); }

.lb-type {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  padding: 6px 9px;
  border: 1px solid #3A3A34;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  color: #C9C5BA;
}

.lb-type i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------------------------------------------------------- info page */
.info { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) clamp(80px, 9vw, 140px); }

.info-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 84px);
  border-bottom: 1px solid var(--line);
}

.info-hero h1 {
  font-size: clamp(48px, 7.4vw, 108px);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -.06em;
}

.info-hero h1 > span { display: block; }
.info-hero h1 .line-muted { color: #8E887B; font-weight: 500; }

.info-hero-side p {
  max-width: 420px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.info-hero-side .label { margin-bottom: 20px; }

.info-portrait {
  position: relative;
  margin-top: 28px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.info-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 96px);
  padding: clamp(48px, 6vw, 84px) 0;
  border-bottom: 1px solid var(--line);
}

.info-bio p {
  max-width: 540px;
  margin-bottom: 22px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-2);
}

.info-bio p:first-child::first-letter {
  float: left;
  font-size: 54px;
  line-height: .9;
  padding: 4px 10px 0 0;
  font-weight: 600;
}

.info-bio .label { margin-bottom: 24px; }

.info-detail-block { margin-bottom: 42px; }

.info-detail-block h3 {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.service-list li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}

.service-list li span:last-child {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
}

.client-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.client-list span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  color: var(--muted);
}

.timeline li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.timeline li span:first-child {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .06em;
  color: var(--muted-2);
}

.info-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-top: clamp(42px, 5vw, 64px);
}

.info-contact h2 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 500;
  letter-spacing: -.04em;
}

.info-contact a {
  border-bottom: 1px solid var(--ink);
  font-size: clamp(16px, 2vw, 22px);
  padding-bottom: 4px;
}

.info-contact a:hover { color: var(--accent); }

.info-contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.info-wechat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

.info-wechat b {
  color: var(--ink);
  font-weight: 500;
}

/* ---------------------------------------------------------- footer */
.site-foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--pad) 24px;
  border-top: 1px solid var(--ink);
}

.foot-cta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.foot-mail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  max-width: 920px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(28px, 4.8vw, 62px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.045em;
  transition: color .3s, border-color .3s;
}

.foot-mail:hover { color: var(--accent); border-color: var(--accent); }

.foot-mail-arrow {
  flex: none;
  font-size: .72em;
  transition: transform .4s var(--ease);
}

.foot-mail:hover .foot-mail-arrow { transform: translate(6px, -6px); }

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.foot-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .16em;
  color: var(--muted-2);
}

.foot-col p {
  font-size: 11.5px;
  line-height: 2.05;
  color: var(--muted);
}

.foot-col a { display: block; width: fit-content; }
.foot-col a:hover { color: var(--ink); }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: clamp(44px, 5vw, 64px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--muted-2);
}

.foot-bottom a:hover { color: var(--ink); }

.foot-top {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.foot-top:hover { color: var(--ink); }

/* ============================================================
   ADMIN
   ============================================================ */

body.is-admin { background: #F1EEE6; }
body.is-admin .site-head,
body.is-admin .site-foot,
body.is-admin .grain { display: none; }

body.is-admin .view { min-height: 100vh; animation: none; }

.admin {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  background: #F1EEE6;
}

.admin-side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 26px 16px 20px;
  background: #EAE6DC;
  border-right: 1px solid var(--line);
}

.admin-brand {
  padding: 0 10px;
  line-height: 1.3;
}

.admin-brand strong {
  display: block;
  font-size: 13px;
  letter-spacing: .14em;
}

.admin-brand span {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  color: var(--muted-2);
}

.admin-nav { display: flex; flex-direction: column; gap: 3px; }

.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
  transition: background .2s, color .2s;
}

.admin-nav a span {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
}

.admin-nav a:hover { background: rgba(20, 20, 18, .05); color: var(--ink); }

.admin-nav a.is-active {
  background: var(--ink);
  color: var(--paper);
}

.admin-nav a.is-active span { color: rgba(246, 244, 239, .55); }

.admin-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-side-foot a,
.admin-side-foot button {
  padding: 7px 10px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 10.5px;
  color: var(--muted);
}

.admin-side-foot a:hover,
.admin-side-foot button:hover { color: var(--ink); }

.admin-main {
  min-width: 0;
  padding: 30px clamp(20px, 3.4vw, 44px) 64px;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 26px;
}

.admin-top h1 {
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.admin-top p {
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted);
}

.admin-actions { display: flex; gap: 8px; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 10.5px;
  letter-spacing: .04em;
  line-height: 1;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}

.btn:hover { background: #33332E; border-color: #33332E; }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.ghost:hover { background: rgba(20, 20, 18, .05); border-color: var(--ink); }

.btn.small { height: 28px; padding: 0 10px; font-size: 10px; }

.btn.danger { background: transparent; color: var(--accent); border-color: rgba(213, 72, 44, .35); }
.btn.danger:hover { background: rgba(213, 72, 44, .07); border-color: var(--accent); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.stat {
  padding: 15px 16px;
  background: #FBFAF6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat b {
  display: block;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.stat span {
  display: block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.panel {
  background: #FBFAF6;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

.panel-head p {
  margin-top: 3px;
  font-size: 10px;
  color: var(--muted-2);
}

.panel-body { padding: 18px; }

/* upload */
.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 32px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
  background: #F8F5EE;
  transition: border-color .25s, background .25s;
  cursor: pointer;
}

.drop:hover, .drop.is-drag {
  border-color: var(--ink);
  background: #F3EFE4;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
}

.drop h3 { font-size: 13px; font-weight: 500; }

.drop p {
  font-size: 10px;
  color: var(--muted-2);
  letter-spacing: .02em;
}

.drop p b { font-weight: 500; color: var(--muted); }

.upload-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 10px;
  color: var(--muted);
}

.upload-options label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.upload-options select {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
  outline: none;
}

.upload-options select:focus { border-color: var(--ink); }

.upload-options span {
  font-size: 9px;
  color: var(--muted-2);
}

.upload-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.upload-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.upload-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  background: var(--paper-3);
  border-radius: 4px;
  display: block;
}

.upload-name {
  min-width: 0;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-sub {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
}

.upload-state {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .06em;
  color: var(--muted-2);
  white-space: nowrap;
}

.upload-state.done { color: var(--green); }
.upload-state.error { color: var(--accent); }

.upload-remove {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  font-size: 14px;
  padding: 4px;
}

.upload-remove:hover { color: var(--accent); }

/* batch actions */
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #F4F1E8;
}

.bulk-bar[hidden] { display: none; }

.bulk-bar b {
  margin-right: 4px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--muted);
}

.bulk-bar select,
.bulk-bar input {
  height: 27px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-size: 9.5px;
}

.bulk-bar input { width: 150px; }

.bulk-bar .btn { height: 27px; padding: 0 9px; }

.select-cell {
  width: 30px;
  padding-left: 10px !important;
  padding-right: 0 !important;
}

.select-cell input {
  width: 13px;
  height: 13px;
  accent-color: var(--ink);
  cursor: pointer;
}

/* table */
.table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.admin-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px;
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: 0; }

.admin-table tbody tr { transition: background .2s; }
.admin-table tbody tr:hover { background: #F7F3E9; }

.work-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.work-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--paper-3);
  flex: none;
}

.work-cell b {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
}

.work-cell span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
}

.type-pill {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .06em;
  color: var(--muted);
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 8.5px;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.published { background: #E8F0E7; color: #376B40; }
.status-pill.draft { background: #F2EBD8; color: #836425; }

.size-cell {
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.7;
  color: var(--muted);
  white-space: nowrap;
}

.size-cell b { font-weight: 400; color: var(--ink); }

.table-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 170px;
}

.table-tags span {
  padding: 2px 6px;
  background: #F0ECE2;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted);
}

.row-edit {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 4px;
  padding: 5px 9px;
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
}

.row-edit:hover { border-color: var(--ink); color: var(--ink); }

.row-actions { display: flex; align-items: center; gap: 4px; }

.material-pill,
.lowres-pill {
  display: inline-block;
  margin-left: 4px;
  padding: 3px 6px;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .06em;
}

.material-pill {
  background: rgba(160, 60, 45, .09);
  color: #A44A3C;
}

.lowres-pill {
  background: rgba(160, 120, 30, .10);
  color: #8A6815;
}

.row-delete {
  border: 1px solid rgba(160, 60, 45, .25);
  background: transparent;
  border-radius: 4px;
  padding: 5px 9px;
  font-size: 9.5px;
  color: #A44A3C;
  white-space: nowrap;
}

.row-delete:hover { border-color: #A44A3C; background: rgba(160, 60, 45, .06); }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-toolbar input,
.admin-toolbar select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #FBFAF6;
  font-size: 11px;
  outline: none;
}

.admin-toolbar input { flex: 1; min-width: 180px; }

.admin-toolbar input:focus,
.admin-toolbar select:focus { border-color: var(--ink); }

/* drawer */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 220;
  width: min(480px, 100vw);
  display: flex;
  flex-direction: column;
  background: #FBFAF6;
  border-left: 1px solid var(--line);
  box-shadow: -24px 0 70px rgba(20, 20, 18, .12);
  transform: translateX(102%);
  transition: transform .45s var(--ease);
}

.drawer.is-open { transform: none; }

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.drawer-head p { margin-top: 4px; font-family: var(--mono); font-size: 8px; color: var(--muted-2); letter-spacing: .1em; }

.drawer-close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
}

.drawer-close:hover { border-color: var(--ink); color: var(--ink); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
}

.drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #F8F5EE;
}

.drawer-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper-3);
  margin-bottom: 20px;
  display: block;
}

.field { margin-bottom: 16px; }

.field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}

.field label small { font-family: var(--sans); font-size: 9px; letter-spacing: 0; text-transform: none; color: var(--muted-2); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.field textarea { min-height: 92px; resize: vertical; line-height: 1.7; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 20, 18, .05);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tag-select { display: flex; flex-wrap: wrap; gap: 5px; }

.tag-option { position: relative; cursor: pointer; }

.tag-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-option span {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--muted);
  transition: background .2s, color .2s, border-color .2s;
}

.tag-option input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.tag-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.compress-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #F7F3E9;
}

.compress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  color: var(--muted);
}

.compress-top b { font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -.02em; }

.compress-bar {
  display: flex;
  height: 6px;
  margin: 10px 0 7px;
  border-radius: 3px;
  overflow: hidden;
  background: #E2DCCE;
}

.compress-bar i { display: block; height: 100%; }
.compress-bar .bar-saved { background: var(--line-strong); }
.compress-bar .bar-kept { background: var(--ink); }

.compress-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--mono);
  font-size: 7.5px;
  color: var(--muted-2);
}

.range-row { display: flex; align-items: center; gap: 12px; }

.range-row input[type="range"] {
  flex: 1;
  accent-color: var(--ink);
}

.range-val {
  width: 42px;
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 7px;
  color: var(--muted-2);
}

.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}

.toggle-text b { display: block; font-size: 11px; font-weight: 500; }
.toggle-text span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted-2); }

.toggle input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: #D8D2C5;
  position: relative;
  cursor: pointer;
  transition: background .25s;
}

.toggle input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s var(--ease);
}

.toggle input:checked { background: var(--ink); }
.toggle input:checked::after { transform: translateX(16px); }

/* taxonomy */
.tax-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--ink);
  background: #F8F5EE;
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

.tax-intro b { color: var(--ink); font-weight: 500; }

.tax-add {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #F7F3E9;
}

.tax-add input {
  flex: 1;
  min-width: 120px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 11px;
  outline: none;
}

.tax-add input:focus { border-color: var(--ink); }

.tag-empty {
  display: inline-block;
  padding: 5px 0;
  font-size: 9.5px;
  color: var(--muted-2);
}

.tax-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 18px;
  align-items: start;
}

/* ---------------------------------------------------------- private drive */
.drive-panel { min-height: 540px; }

.drive-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.drive-crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.drive-crumb {
  border: 0;
  background: transparent;
  padding: 3px 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  cursor: pointer;
}

.drive-crumb:hover { color: var(--ink); }
.drive-crumb.is-current { color: var(--ink); font-weight: 600; }
.drive-sep { color: var(--muted-2); font-size: 9px; }

.drive-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.drive-tools input {
  width: 180px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 10px;
}

.drive-note {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted);
}

.drive-note span { color: var(--cobalt); }

.drive-body { padding: 18px; }

.drive-folders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.drive-folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #FBFAF6;
}

.drive-folder-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  padding: 11px 10px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.drive-folder-main b {
  font-size: 10px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-folder-icon { color: #B49A5E; font-size: 13px; }

.drive-folder-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 5px;
}

.drive-folder-actions button,
.drive-file-actions button,
.drive-file-actions a {
  border: 0;
  background: transparent;
  padding: 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  cursor: pointer;
  text-decoration: none;
}

.drive-folder-actions button:hover,
.drive-file-actions button:hover,
.drive-file-actions a:hover { color: var(--ink); }

.drive-file-actions .danger:hover,
.drive-folder-actions .danger:hover { color: #B43B2C; }

.drive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px 12px;
}

.drive-file { min-width: 0; }

.drive-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-2);
}

.drive-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.drive-file:hover .drive-thumb img { transform: scale(1.03); }

.drive-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .05em;
}

.drive-file-open {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(246, 244, 239, .9);
  color: var(--ink);
  font-size: 10px;
  text-decoration: none;
  opacity: 0;
  transition: opacity .2s var(--ease);
}

.drive-file:hover .drive-file-open { opacity: 1; }

.drive-file-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.drive-file-info b {
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drive-file-info span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
}

.drive-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.drive-empty {
  padding: 58px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.drive-error { color: #B43B2C; }

@media (max-width: 1200px) {
  .drive-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .drive-folders { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .drive-top { align-items: stretch; flex-direction: column; }
  .drive-tools input { flex: 1; width: auto; }
  .drive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drive-folders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tax-list { display: grid; gap: 10px; }

/* floating profile card */
.profile-float {
  position: fixed;
  top: 118px;
  right: 24px;
  z-index: 60;
  width: 238px;
  padding: 16px 17px 15px;
  border: 1px solid rgba(30, 30, 26, .16);
  border-radius: 9px;
  background: rgba(246, 244, 239, .94);
  box-shadow: 0 18px 50px rgba(20, 20, 17, .15);
  backdrop-filter: blur(16px);
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.profile-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.profile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #C9C6BA;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.profile-close:hover {
  background: var(--ink);
  color: var(--paper);
}

.profile-float h3 {
  margin: 14px 0 2px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.profile-float h3 span {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--muted);
}

.profile-float-role {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.profile-float-intro {
  margin: 13px 0;
  font-size: 11px;
  line-height: 1.7;
  color: #5F5D54;
}

.profile-float-foot {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(30, 30, 26, .12);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
  color: var(--muted);
}

.profile-float-open {
  width: 100%;
  margin-top: 12px;
  padding: 8px 0;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
  cursor: pointer;
}

.profile-float-open:hover { background: var(--ink); color: var(--paper); }

body.profile-open { overflow: hidden; }

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(12, 12, 10, .76);
  backdrop-filter: blur(8px);
}

.profile-modal-card {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 86vh;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(246, 244, 239, .18);
  background: #F6F4EF;
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .45);
}

.profile-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid #C9C6BA;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

.profile-modal-close:hover { background: var(--ink); color: var(--paper); }

.profile-modal h2 {
  margin: 16px 0 4px;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -.06em;
}

.profile-modal h2 span {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .16em;
  color: var(--muted);
}

.profile-modal-role {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.profile-modal-lead {
  max-width: 560px;
  margin: 22px 0 18px;
  font-size: 15px;
  line-height: 1.85;
}

.profile-modal-bio p {
  max-width: 620px;
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.9;
  color: #5F5D54;
}

.profile-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 34px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #D8D4C9;
}

.profile-modal-grid h3 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  color: var(--muted);
}

.profile-modal-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-modal-grid li {
  display: flex;
  gap: 10px;
  margin: 0 0 7px;
  font-size: 11.5px;
  line-height: 1.55;
}

.profile-modal-grid li b {
  min-width: 78px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  color: var(--muted);
}

.profile-modal-clients {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-modal-clients span {
  padding: 4px 6px;
  border: 1px solid #D8D4C9;
  border-radius: 2px;
  font-size: 9.5px;
}

.profile-modal-contact { margin: 0; font-size: 11.5px; }
.profile-modal-contact a { border-bottom: 1px solid var(--ink); }
.profile-modal-contact span { display: block; margin-top: 9px; font-size: 10.5px; color: var(--muted); }

@media (max-width: 700px) {
  .profile-float {
    top: auto;
    right: 12px;
    bottom: 14px;
    width: min(86vw, 238px);
  }
  .profile-modal { padding: 12px; }
  .profile-modal-card { max-height: 90vh; padding: 28px 22px; }
  .profile-modal-grid { grid-template-columns: 1fr; gap: 20px; }
}

.tax-drag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px dashed #C9C6BA;
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .04em;
  cursor: grab;
  user-select: none;
  white-space: nowrap;
}

.tax-drag:active { cursor: grabbing; }

.tax-card.is-dragging {
  opacity: .45;
  border-style: dashed;
}

.tax-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 13px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #FBFAF6;
}

.tax-cover-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-3);
  cursor: pointer;
}

.tax-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.tax-cover-wrap:hover .tax-cover { transform: scale(1.04); }

.tax-cover-edit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 2px;
  background: rgba(20, 20, 18, .72);
  color: #F6F4EF;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .06em;
  text-align: center;
  opacity: 0;
  transition: opacity .2s;
}

.tax-cover-wrap:hover .tax-cover-edit,
.tax-cover-wrap:focus-within .tax-cover-edit { opacity: 1; }

.cover-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.cover-picker label {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .06em;
  color: var(--muted-2);
}

.cover-picker select {
  flex: 1;
  min-width: 0;
  height: 25px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 9px;
}

.tax-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.tax-info { min-width: 0; }

.tax-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.tax-info h3 { font-size: 12.5px; font-weight: 600; }
.tax-info h3 span { margin-left: 6px; font-family: var(--mono); font-size: 7.5px; font-weight: 400; color: var(--muted-2); }

.tax-count {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--muted-2);
  white-space: nowrap;
}

.tax-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 7px 0 9px;
}

.tax-tags span {
  padding: 2px 6px;
  background: #F0ECE2;
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 7px;
  color: var(--muted);
}

.tax-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  color: var(--muted);
  cursor: pointer;
}

.mini-toggle input { accent-color: var(--ink); width: 12px; height: 12px; }

.icon-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  font-size: 10px;
  line-height: 1;
  color: var(--muted);
}

.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }

.tag-groups { display: grid; gap: 4px; }

.tag-group {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.tag-group:first-child { padding-top: 0; }
.tag-group:last-child { border-bottom: 0; padding-bottom: 0; }

.tag-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.tag-group-head b { font-size: 11px; font-weight: 500; }
.tag-group-head span { font-family: var(--mono); font-size: 7.5px; color: var(--muted-2); }

.tag-pills { display: flex; flex-wrap: wrap; gap: 5px; }

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 9.5px;
  color: var(--muted);
}

.tag-pill button {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1;
}

.tag-pill button:hover { color: var(--accent); }

.add-tag { display: flex; gap: 5px; margin-top: 8px; }

.add-tag input {
  flex: 1;
  min-width: 0;
  height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
  outline: none;
}

.add-tag input:focus { border-color: var(--ink); }

.add-tag button {
  height: 27px;
  padding: 0 10px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
}

/* compression settings */
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 18px;
  align-items: start;
}

.settings-block { margin-bottom: 26px; }
.settings-block:last-child { margin-bottom: 0; }

.settings-block h3 {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.summary-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #F7F3E9;
}

.summary-card .big {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.05em;
}

.summary-card p { margin-top: 7px; font-size: 10.5px; line-height: 1.7; color: var(--muted); }

.savings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 10.5px;
}

.savings-row:last-child { border-bottom: 0; }
.savings-row span:last-child { font-family: var(--mono); font-size: 8.5px; color: var(--muted); }

/* login */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(246, 244, 239, .92), rgba(246, 244, 239, .92)),
    repeating-linear-gradient(90deg, transparent 0 79px, rgba(20, 20, 18, .05) 79px 80px),
    repeating-linear-gradient(0deg, transparent 0 79px, rgba(20, 20, 18, .05) 79px 80px);
}

.login-card {
  width: min(400px, 100%);
  padding: 38px 36px 32px;
  background: #FBFAF6;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(20, 20, 18, .08);
}

.login-card .label { margin-bottom: 18px; }

.login-card h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.04em;
}

.login-card p {
  margin: 12px 0 24px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}

.login-card .field input { height: 38px; font-size: 13px; }

.login-card .btn { width: 100%; height: 38px; margin-top: 6px; }

.login-hint {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.8;
  letter-spacing: .04em;
  color: var(--muted-2);
}

.login-hint b {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .08em;
}

.login-back {
  display: inline-block;
  margin-top: 16px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 500;
  transform: translate(-50%, 16px);
  padding: 10px 15px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 5px;
  font-size: 11px;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  :root { --pad: 28px; }
  .head-meta .head-clock { display: none; }
  .cat-title-row { grid-template-columns: 1fr .9fr; }
  .lb { grid-template-columns: minmax(0, 1fr) 350px; }
  .lb-stage { padding: 56px 64px; }
}

@media (max-width: 960px) {
  .hero-foot { grid-template-columns: 1fr; gap: 28px; }
  .hero-meta { justify-self: start; text-align: left; }
  .info-hero { grid-template-columns: 1fr; }
  .info-hero-side { max-width: 560px; }
  .info-grid { grid-template-columns: 1fr; gap: 40px; }
  .cat-title-row { grid-template-columns: 1fr; gap: 34px; }
  .cat-side { max-width: 600px; }
  .lb { grid-template-columns: minmax(0, 1fr) 330px; }
  .lb-side { padding: 36px 26px 30px; }
}

@media (max-width: 820px) {
  :root { --head-h: 62px; --pad: 20px; }

  .site-head { grid-template-columns: auto 1fr; gap: 16px; }
  .site-nav { justify-self: end; gap: 20px; }
  .head-meta { display: none; }
  .brand-en { font-size: 14px; }
  .brand-cn { display: none; }

  .hero { padding-top: 48px; }
  .hero h1 { letter-spacing: -.05em; }
  .hero-foot p { font-size: 14px; }

  .cat-grid { grid-template-columns: 1fr; gap: 42px; }
  .cat-card--wide { grid-column: auto; }
  .cat-card--wide .cat-media { aspect-ratio: 4 / 3; }

  .works { columns: 1; padding-top: 28px; }
  .work-card { margin-bottom: 42px; }

  .filters { top: var(--head-h); }
  .filters-inner { padding: 11px var(--pad); }

  .lb {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 56vh) minmax(0, 1fr);
  }
  .lb-stage { padding: 42px 44px 30px; }
  .lb-media, .lb-media-wrap { max-height: calc(56vh - 72px); }
  .lb-side { border-left: 0; border-top: 1px solid #2B2B27; padding: 24px 22px 30px; }
  .lb-close { top: 12px; right: 12px; }
  .lb-zoom-tools { top: 16px; right: 58px; }
  .lb-zoom-tools button { height: 28px; min-width: 28px; padding: 0 7px; }
  .lb-zoom-level { min-width: 44px !important; }
  .lb-media-wrap.is-zoomed { height: calc(56vh - 72px); }
  .lb-count { top: 18px; left: 18px; }
  .lb-nav { width: 36px; height: 36px; }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
  .lb-side h2 { margin-top: 12px; }
  .lb-desc { margin: 18px 0 22px; }

  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .foot-bottom { flex-wrap: wrap; gap: 10px; }
  .foot-note { display: none; }
  .foot-mail { font-size: clamp(24px, 7vw, 38px); }

  .info { padding-bottom: 80px; }
  .info-bio p { font-size: 14.5px; }
  .timeline li { grid-template-columns: 92px 1fr; }

  .admin { grid-template-columns: 1fr; }
  .admin-side {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-brand { display: none; }
  .admin-nav { flex-direction: row; gap: 2px; }
  .admin-nav a { padding: 7px 9px; white-space: nowrap; font-size: 11px; }
  .admin-nav a span { display: none; }
  .admin-side-foot { margin: 0 0 0 auto; flex-direction: row; padding: 0; border: 0; }
  .admin-side-foot a, .admin-side-foot button { padding: 6px 7px; white-space: nowrap; }
  .admin-main { padding: 20px 14px 48px; }
  .admin-top { align-items: flex-start; flex-direction: column; gap: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tax-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-nav { gap: 15px; }
  .site-nav a { font-size: 11px; letter-spacing: .08em; }
  .hero { padding-top: 40px; }
  .hero-kicker { font-size: 8.5px; letter-spacing: .13em; }
  .hero h1 { font-size: clamp(42px, 12.5vw, 64px); line-height: 1; }
  .cat-info { align-items: flex-start; }
  .cat-meta { padding-top: 3px; }

  .cat-title { font-size: clamp(44px, 13vw, 64px); }
  .cat-facts { grid-template-columns: 1fr 1fr; gap: 18px; }

  .lb { grid-template-rows: 48vh minmax(0, 1fr); }
  .lb-stage { padding: 38px 34px 22px; }
  .lb-media, .lb-media-wrap { max-height: calc(48vh - 60px); }
  .lb-facts { grid-template-columns: 1fr 1fr; }
  .lb-side { padding: 20px 18px 28px; }
  .lb-desc { font-size: 12.5px; }

  .info-hero h1 { font-size: clamp(40px, 12vw, 58px); }
  .info-contact h2 { font-size: 24px; }

  .foot-cta { gap: 12px; }
  .foot-bottom { font-size: 7px; }

  .admin-top h1 { font-size: 22px; }
  .panel-body { padding: 13px; }
  .panel-head { padding: 12px 13px; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat b { font-size: 22px; }
  .drawer-foot { padding: 12px 14px; }
  .drawer-body { padding: 16px; }
  .drawer-head { padding: 16px; }
  .field-row { grid-template-columns: 1fr; }
  .tax-card { grid-template-columns: 72px minmax(0, 1fr); }
  .tax-cover { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
