﻿@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans SC";
  src: url("/fonts/SourceHanSansCN-Regular-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans SC";
  src: url("/fonts/SourceHanSansCN-Medium-subset.woff2") format("woff2");
  font-weight: 500 650;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans SC";
  src: url("/fonts/SourceHanSansCN-Bold-subset.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --content-max: 1600px;
  --ink: #dedede;
  --muted: #8b8b8b;
  --line: #242424;
  --paper: #070707;
  --panel: #101010;
  --accent: #195ce3;
  --accent-rgb: 25, 92, 227;
  --accent-2: #195ce3;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  --button-glass: rgba(255, 255, 255, 0.08);
  --button-glass-hover: rgba(255, 255, 255, 0.14);
  --button-glass-active: rgba(var(--accent-rgb), 0.3);
  --button-glass-line: rgba(255, 255, 255, 0.16);
  --button-glass-blur: blur(14px) saturate(1.18);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  overflow-x: clip;
  overflow-y: visible;
  background: var(--paper);
  color: var(--ink);
  font-family: Montserrat, "Source Han Sans SC", "Noto Sans CJK SC", "思源黑体", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 17.6px;
  font-weight: 550;
  line-height: 1.6;
  scrollbar-gutter: stable;
  zoom: 1;
}

.silk-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
  opacity: 0.24;
}

body:has(.home-hero) .silk-background {
  opacity: 0.42;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.gradual-blur {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
  isolation: isolate;
}

.gradual-blur-bottom {
  bottom: 0;
}

.gradual-blur-inner {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gradual-blur-inner > div {
  pointer-events: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gradual-blur-inner > div {
    background: rgba(0, 0, 0, 0.3);
    opacity: 0.5;
  }
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleCnReveal {
  from {
    opacity: 0;
    transform: translateY(-35%) translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateY(-45%) translateX(0);
  }
}

@keyframes splitTextReveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softRise {
  from {
    transform: translateY(10px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes masonryThumbEnter {
  from {
    opacity: 0;
    translate: 0 100px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalZoomOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

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

@keyframes diceRoll {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes contactBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.015);
  }
}

@keyframes contactCardReveal {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(-60px) scale(0.9);
  }
}

@keyframes tagExplode {
  0% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    color: #ffffff;
    transform: translateX(0) scale(1);
  }
  8.33% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.6deg) scale(1.2);
  }
  10.41% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(2px) rotate(1.6deg) scale(1.2);
  }
  12.5% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.55deg) scale(1.2);
  }
  14.58% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(2px) rotate(1.55deg) scale(1.2);
  }
  16.66% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.5deg) scale(1.2);
  }
  18.74% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(2px) rotate(1.5deg) scale(1.2);
  }
  20.83% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.45deg) scale(1.2);
  }
  22.91% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(2px) rotate(1.45deg) scale(1.2);
  }
  25% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.4deg) scale(1.2);
  }
  27.08% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(2px) rotate(1.4deg) scale(1.2);
  }
  29.16% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.35deg) scale(1.2);
  }
  31.24% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(2px) rotate(1.35deg) scale(1.2);
  }
  33.33% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.3deg) scale(1.2);
  }
  35.41% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(2px) rotate(1.3deg) scale(1.2);
  }
  37.5% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.25deg) scale(1.2);
  }
  39.58% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(2px) rotate(1.25deg) scale(1.2);
  }
  41.66% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.2deg) scale(1.2);
  }
  43.74% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(2px) rotate(1.2deg) scale(1.2);
  }
  45.83% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(-2px) rotate(-1.1deg) scale(1.2);
  }
  47.91% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.84), 0 0 64px rgba(255, 255, 255, 0.34);
    color: #ffffff;
    transform: translateX(2px) rotate(1.1deg) scale(1.2);
  }
  50% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(0) rotate(0deg) scale(1.2);
  }
  62.5% {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 26px rgba(255, 255, 255, 0.86), 0 0 70px rgba(255, 255, 255, 0.36);
    color: #ffffff;
    transform: translateX(0) rotate(0deg) scale(1.2);
  }
  74% {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.84);
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.55), 0 0 48px rgba(255, 255, 255, 0.2);
    color: hsl(0 0% 10%);
    transform: translateX(0) rotate(0deg) scale(1.13);
  }
  88% {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.36);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2), 0 0 22px rgba(255, 255, 255, 0.08);
    color: hsl(0 0% 58%);
    transform: translateX(0) rotate(0deg) scale(1.04);
  }
  100% {
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--line);
    box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    color: var(--ink);
    transform: translateX(0) rotate(0deg) scale(1);
  }
}

@keyframes tagShake {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  18% {
    transform: translateX(-1px) rotate(-0.8deg);
  }
  36% {
    transform: translateX(1px) rotate(0.8deg);
  }
  54% {
    transform: translateX(-1px) rotate(-0.6deg);
  }
  72% {
    transform: translateX(1px) rotate(0.6deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 44;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px) 4px;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  pointer-events: none;
}

.menu-open {
  overflow: hidden;
}

.brand {
  position: relative;
  z-index: 42;
  pointer-events: auto;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--accent);
  font-family: Montserrat, "Source Han Sans SC", Arial, sans-serif;
}

.site-header nav {
  display: flex;
  gap: 8px;
}

.site-header > nav {
  display: none;
}

nav a,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--button-glass-line);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--muted);
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

nav a[aria-current="page"],
nav a:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--button-glass-hover);
}

.site-header > nav a {
  border-color: transparent;
  border-radius: 0;
  font-size: 16px;
}

.staggered-menu-wrapper {
  position: relative;
  z-index: 41;
  pointer-events: auto;
}

.sm-toggle {
  position: relative;
  z-index: 44;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: Montserrat, "Source Han Sans SC", "Noto Sans CJK SC", "思源黑体", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  font-weight: 550;
  line-height: 1;
  text-transform: none;
}

.sm-toggle-textWrap {
  height: 1em;
  overflow: hidden;
}

.sm-toggle-textInner {
  display: grid;
  transform: translateY(0);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.staggered-menu-wrapper[data-open="true"] .sm-toggle-textInner {
  transform: translateY(-50%);
}

.sm-toggle-line {
  height: 1em;
  display: block;
}

.sm-icon {
  position: relative;
  width: 0.99em;
  height: 0.99em;
  display: block;
  flex: 0 0 auto;
  fill: currentColor;
  transition: transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
}

.staggered-menu-wrapper[data-open="true"] .sm-icon {
  transform: rotate(225deg);
}

.sm-prelayers,
.staggered-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(620px, 100vw);
  pointer-events: none;
}

.sm-prelayers {
  z-index: 36;
}

.sm-prelayer {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-prelayer:nth-child(2) {
  transition-delay: 70ms;
}

.staggered-menu-wrapper[data-open="true"] .sm-prelayer {
  transform: translateX(0);
}

.staggered-menu-panel {
  z-index: 38;
  color: #f5f5f5;
  background: #070707;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.04);
  transform: translateX(100%);
  transition: transform 650ms 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.staggered-menu-wrapper[data-open="true"] .staggered-menu-panel {
  transform: translateX(0);
  pointer-events: auto;
}

.sm-panel-inner {
  min-height: 100%;
  display: flex;
  position: relative;
  align-items: flex-start;
  padding: clamp(120px, 20vh, 180px) clamp(28px, 5vw, 72px) clamp(44px, 8vh, 84px);
}

.sm-panel-list {
  width: 100%;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sm-panel-itemWrap {
  overflow: hidden;
}

.sm-panel-item {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #f5f5f5;
  font-family: Montserrat, "Source Han Sans SC", "Noto Sans CJK SC", "思源黑体", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: clamp(41px, 4.93vw, 70px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: translateY(140%) rotate(10deg);
  transition: color 80ms ease;
  transition-delay: 0ms;
}

.staggered-menu-wrapper[data-open="true"] .sm-panel-item {
  animation: smPanelItemIn 800ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(198ms + var(--sm-item-index) * 80ms);
  transform: translateY(0) rotate(0);
}

@keyframes smPanelItemIn {
  from {
    transform: translateY(140%) rotate(10deg);
  }

  to {
    transform: translateY(0) rotate(0);
  }
}

.sm-panel-item::before {
  content: attr(data-index);
  display: none;
  min-width: 34px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
  transition-delay: calc(360ms + var(--sm-item-index) * 80ms);
}

.sm-panel-itemLabel {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.sm-panel-itemEn {
  display: inline-block;
  color: #ffffff;
}

.sm-panel-itemCn {
  position: absolute;
  z-index: 1;
  right: -0.25em;
  top: calc(0.08em + 8px);
  color: #ffffff;
  font-family: Montserrat, "Source Han Sans SC", "Noto Sans CJK SC", "思源黑体", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 0.23em;
  font-weight: 550;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translateX(100%);
  opacity: 1;
}

.sm-color-blocks {
  position: absolute;
  left: clamp(28px, 5vw, 72px);
  right: clamp(28px, 5vw, 72px);
  bottom: 24px;
  height: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  overflow: hidden;
}

.sm-panel-contact {
  position: absolute;
  left: clamp(28px, 5vw, 72px);
  right: clamp(28px, 5vw, 72px);
  bottom: 54px;
  display: grid;
  justify-items: start;
  gap: 8px;
  color: rgba(200, 200, 200, 1);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 560ms;
}

.staggered-menu-wrapper[data-open="true"] .sm-panel-contact {
  opacity: 1;
  transform: translateY(0);
}

.sm-contact-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sm-contact-icon {
  width: 1.15em;
  height: 1.15em;
  display: block;
  flex: 0 0 auto;
  fill: currentColor;
}

.sm-color-block {
  display: block;
  transform: translateY(120%);
  transition: transform 550ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(420ms + var(--sm-color-index) * 80ms);
}

.staggered-menu-wrapper[data-open="true"] .sm-color-block {
  transform: translateY(0);
}

.staggered-menu-wrapper[data-open="true"] .sm-panel-item::before {
  opacity: 1;
  transform: translateY(0);
}

.sm-panel-item:hover,
.sm-panel-item[aria-current="page"] {
  color: var(--accent);
  background: transparent;
}

.sm-panel-item:hover .sm-panel-itemEn,
.sm-panel-item[aria-current="page"] .sm-panel-itemEn {
  color: var(--accent);
}

.sm-panel-item:hover .sm-panel-itemCn,
.sm-panel-item[aria-current="page"] .sm-panel-itemCn {
  color: #f5f5f5;
}

.nav-icon-link {
  gap: 4px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.nav-icon path {
  fill: currentColor;
}

.button {
  cursor: pointer;
  font-weight: 500;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button.primary:hover {
  border-color: var(--accent);
  background: var(--accent);
}

.button.ghost {
  background: var(--button-glass);
  border-color: var(--button-glass-line);
  color: var(--ink);
}

main {
  width: min(1680px, calc(100% - 24px));
  margin: 0 auto;
}

body:has(.home-hero) main {
  width: min(1680px, calc(100% - 24px));
  margin: 0 auto;
}

main.works-main {
  width: min(1680px, calc(100% - 24px));
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: 48px 0 56px;
}

.home-hero {
  position: relative;
  min-height: calc(100vh - 80px);
  grid-template-columns: 1fr;
  align-items: start;
  padding-top: clamp(36px, 8vh, 88px);
  overflow: visible;
}

.home-hero::before {
  display: none;
}

.home-profile {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

.home-avatar {
  width: 38px;
  max-width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.profile-bio {
  margin-top: 50px;
}

.profile-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}

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

.hero-copy {
  grid-column: 2;
}

.home-hero .hero-copy {
  grid-column: 1;
  width: min(980px, 100%);
  margin-right: auto;
}

.home-profile .hero-copy {
  grid-column: 1;
}

.home-copy {
  text-align: left;
}

.home-copy .title-lockup {
  justify-content: flex-start;
}

.home-copy .title-cn {
  right: auto;
  left: 0;
}

.home-copy p:not(.kicker) {
  margin-left: 0;
  margin-right: auto;
  font-size: 16.2px;
  font-weight: 300;
  text-align: left;
}

.home-copy .hero-actions,
.home-copy .social-links {
  justify-content: flex-start;
}

.home-copy .hero-actions {
  margin-top: 68px;
}

.profile-tags {
  width: min(720px, 100%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  align-items: flex-start;
}

.profile-tags span {
  --tag-fill: 0.08;
  --tag-line: 0.16;
  --tag-glow-opacity: 0;
  --tag-text: var(--ink);
  position: relative;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, var(--tag-line));
  border-radius: 999px;
  background: rgba(255, 255, 255, var(--tag-fill));
  color: var(--tag-text);
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  touch-action: manipulation;
  isolation: isolate;
}

.profile-tags span.is-dragging {
  opacity: 0.42;
  transform: scale(0.96);
}

.profile-tags span.is-drop-target {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.56);
}

.profile-tags span.is-gone {
  display: none;
}

.profile-tags span::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(
    180px circle at var(--tag-glow-x, 50%) var(--tag-glow-y, 50%),
    rgba(255, 255, 255, 0.78),
    rgba(255, 255, 255, 0.28) 38%,
    rgba(255, 255, 255, 0.09) 58%,
    transparent 76%
  );
  opacity: var(--tag-glow-opacity);
  pointer-events: none;
  transition: opacity 160ms ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.profile-tags span::before {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
}

.profile-tags span.is-shaking {
  animation: tagShake 180ms linear both;
}

.profile-tags span.is-exploding {
  animation: tagExplode 800ms cubic-bezier(0.55, 0, 1, 1) both;
  pointer-events: none;
}

.profile-tags span.is-exploding::before {
  display: none;
}

.profile-tags span:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.54);
  outline-offset: 2px;
}

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.82fr);
  gap: clamp(28px, 5vw, 84px);
  align-items: end;
  margin-top: clamp(110px, 18vh, 190px);
}

.home-wordmark {
  min-width: 0;
}

.home-wordmark-name {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin: 0 0 8px;
  padding: 0 14px 0 0;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: none;
  white-space: nowrap;
}

.home-wordmark-cn {
  position: static;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  transform: none;
}

.home-wordmark-en {
  display: grid;
  gap: 0;
  color: var(--accent);
  font-family: Montserrat, "Source Han Sans SC", Arial, sans-serif;
  font-size: clamp(48px, 7.35vw, 108px);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-wordmark-name .home-wordmark-cn {
  position: static;
  inset: auto;
  display: inline-flex;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  transform: none;
}

.home-wordmark-en span {
  display: block;
}

.home-wordmark-en .home-wordmark-line {
  color: var(--ink);
  font-size: clamp(14px, 1.45vw, 24px);
  font-weight: 400;
  line-height: 1.15;
  text-transform: none;
}

.home-intro .profile-tags {
  width: 100%;
  margin-top: 0;
  justify-content: flex-start;
}

.home-wordmark > .profile-tags {
  margin-top: 14px;
}

.home-tags-panel {
  display: grid;
  gap: 14px;
  align-content: end;
  justify-items: end;
}

.home-tags-panel .social-links {
  margin-top: 0;
  justify-content: flex-end;
}

.home-entry-grid {
  --home-entry-expanded: clamp(360px, 58%, 800px);
  display: grid;
  grid-template-columns: 40fr 17.5fr 17.5fr 25fr;
  gap: 8px;
  margin-top: clamp(56px, 9vh, 104px);
  transition: grid-template-columns 360ms cubic-bezier(0.45, 0, 0.55, 1);
}

.home-entry {
  position: relative;
  min-width: 0;
  min-height: clamp(208px, 22.4vw, 336px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 34px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  backdrop-filter: blur(16px) saturate(135%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  isolation: isolate;
  transition: border-color 600ms ease-in-out, background 600ms ease-in-out, box-shadow 600ms ease-in-out;
}

.home-entry::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), rgba(0, 0, 0, 0.28)), var(--home-card-bg);
  background-position: 58% center;
  background-size: auto 143%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease-in-out;
}

.home-entry:hover,
.home-entry.is-active {
  border-color: #ffffff;
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 22px rgba(255, 255, 255, 0.08);
  transition: border-color 600ms ease-in-out, background 600ms ease-in-out, box-shadow 600ms ease-in-out;
}

.home-entry.has-home-card-bg {
  background-color: rgba(255, 255, 255, 0.08);
  background-image: none;
}

.home-entry.has-home-card-bg:hover,
.home-entry.has-home-card-bg.is-active {
  background-color: rgba(var(--accent-rgb), 0.18);
}

.home-entry.has-home-card-bg:hover::before,
.home-entry.has-home-card-bg.is-active::before {
  opacity: 1;
}

@media (hover: hover) and (min-width: 801px) {
  .home-entry-grid {
    will-change: grid-template-columns;
  }
}

.home-entry-en {
  position: absolute;
  top: clamp(18px, 2.4vw, 34px);
  left: clamp(18px, 2.4vw, 34px);
  right: clamp(18px, 2.4vw, 34px);
  z-index: 1;
  color: #ffffff;
  font-family: Montserrat, "Source Han Sans SC", Arial, sans-serif;
  font-size: clamp(32.9px, 3.78vw, 60.2px);
  font-weight: 700;
  line-height: 0.92;
  filter: blur(6px);
  transform: translate(-12px, -8px) scale(0.9);
  transform-origin: left top;
  transition: filter 600ms ease-in-out, transform 600ms ease-in-out;
}

.home-entry:hover .home-entry-en,
.home-entry.is-active .home-entry-en {
  filter: blur(0);
  transform: translate(-12px, 0) scale(1);
  transition: filter 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-entry-cn {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 4px;
  transform: translate(-8px, 20px);
}

.contact-main {
  min-height: calc(100vh - 132px);
  display: grid;
  place-items: center;
}

.contact-card {
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
  color: var(--ink);
  font-size: clamp(14px, 2.1vw, 25px);
  font-weight: 400;
  line-height: 1.8;
  transform: translateY(-60px) scale(0.9);
  transform-origin: center;
}

.contact-avatar {
  width: 112px;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 0 10px;
}

.contact-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.contact-icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  display: block;
  fill: currentColor;
  transform: translateY(2px);
}

.contact-icon path {
  fill: currentColor;
}


.hero-panel {
  grid-column: 1;
  grid-row: 1;
}

.hero-copy p:not(.kicker),
.page-title p:not(.kicker) {
  max-width: 620px;
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
}

.home-hero .home-copy p:not(.kicker) {
  width: min(620px, 100%);
  max-width: none;
  margin-left: 0;
  margin-right: auto;
  font-size: 16.2px;
  font-weight: 300;
  text-align: left;
}

.home-spacer {
  height: 20px;
}

.align-right {
  text-align: left;
}

.title-lockup {
  position: relative;
  width: 100%;
  min-height: clamp(76px, 10.73vw, 139px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

.title-en {
  display: block;
  color: var(--accent);
  font-family: Montserrat, "Source Han Sans SC", Arial, sans-serif;
  font-size: clamp(48px, 10.31vw, 129px);
  font-weight: 800;
  line-height: 0.78;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.title-cn {
  position: absolute;
  right: auto;
  left: 0;
  top: 50%;
  margin: 0;
  color: #dedede;
  font-family: Montserrat, "Source Han Sans SC", "Noto Sans CJK SC", "思源黑体", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: clamp(23px, 3.63vw, 52px);
  font-weight: 550;
  font-synthesis-weight: none;
  line-height: 1;
  letter-spacing: 0;
  transform: translateY(-45%);
  white-space: nowrap;
}

.split-parent {
  overflow: hidden;
  display: inline-block;
  text-align: left;
  white-space: normal;
  word-wrap: break-word;
  will-change: transform, opacity;
}

.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  will-change: transform, opacity;
}

.split-parent.is-split-active .split-char {
  animation: splitTextReveal 1.25s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--split-index) * 50ms);
}

.title-en.split-parent,
.title-cn.split-parent {
  white-space: nowrap;
}

.title-en.split-parent {
  display: block;
}

.works-main .title-lockup {
  min-height: clamp(61px, 8.58vw, 111px);
}

.works-main .title-en {
  font-size: clamp(39px, 8.25vw, 103px);
}

.works-main .title-cn {
  font-size: clamp(19px, 2.9vw, 42px);
}

.work-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.works-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.work-tabs a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border: 1px solid var(--button-glass-line);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--muted);
  font-size: 14px;
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.work-tabs a[aria-current="page"],
.work-tabs a:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.shuffle-button {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.works-toolbar > .shuffle-button:only-child {
  margin-left: auto;
}

.courses-toolbar,
.tools-toolbar {
  justify-content: flex-end;
}

.courses-toolbar > .shuffle-button:only-child,
.tools-toolbar > .shuffle-button:only-child {
  margin-left: 0;
}

.shuffle-button:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.dice-mask {
  width: 27px;
  height: 27px;
  display: block;
  background: currentColor;
  mask: url("/dice.svg") center / contain no-repeat;
  -webkit-mask: url("/dice.svg") center / contain no-repeat;
}

.shuffle-button.is-rolling .dice-mask {
  animation: diceRoll 300ms ease-in-out both;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.admin-tabs button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid var(--button-glass-line);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--muted);
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.admin-tabs button[aria-current="page"],
.admin-tabs button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.align-right .hero-actions {
  justify-content: flex-end;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 0;
}

.social-links a {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  transition: color 160ms ease, background 160ms ease, transform 160ms ease, filter 160ms ease;
}

.social-links a:hover {
  color: #ffffff;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.22));
  transform: translateY(-2px);
}

.social-svg {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
}

.social-svg path {
  fill: currentColor;
}

.hero-panel {
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel dl {
  display: grid;
  gap: 18px;
  margin: 0;
}

.hero-panel div {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.hero-panel div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 4px 0 0;
  font-size: 19px;
  font-weight: 750;
}

.section-heading,
.page-title {
  padding: 62px 0 37px;
}

.section-heading h2,
.admin-list h2,
.admin-form h1,
.login-panel h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  color: var(--ink);
}

.masonry {
  display: grid;
  gap: 8px;
  padding-bottom: 72px;
}

.gallery-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.work-card {
  position: relative;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: #1e2324;
  cursor: pointer;
  display: block;
  padding: 0;
  transition: transform 100ms ease-in-out, background 180ms ease, box-shadow 180ms ease;
  isolation: isolate;
}

.thumb {
  width: 100%;
  height: 100%;
}

.thumb video,
.thumb img,
.thumb .placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  background: #111;
}

.thumb img.is-media-pending,
.thumb video.is-media-pending,
.model-stage img.is-media-pending,
.print-cover img.is-media-pending {
  opacity: 0;
}

.thumb img.is-media-ready,
.thumb video.is-media-ready,
.model-stage img.is-media-ready,
.print-cover img.is-media-ready {
  opacity: 1;
  transition: opacity 140ms ease-out;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(340px, 31vw, 540px)), 1fr));
  gap: 8px;
  padding-bottom: 72px;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 72px;
}

#videosGrid.masonry,
#videosGrid .gallery-row {
  gap: 8px;
}

#videosGrid.masonry {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(290px, 23vw, 390px)), 1fr));
}

#videosGrid .work-card {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

#coursesGrid.masonry,
#toolsGrid.masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#coursesGrid .work-card,
#toolsGrid .work-card {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

.tool-card.no-cover .thumb,
.tool-card.no-cover .placeholder {
  background: var(--accent);
}

.tool-detail-main {
  min-height: calc(100vh - 132px);
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding: clamp(48px, 8vh, 96px) 0 96px;
}

.tool-detail-sidebar {
  position: sticky;
  top: 72px;
}

.tool-cover-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.tool-back-button,
.scroll-top-button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: rgba(222, 222, 222, 0.78);
  cursor: pointer;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.tool-back-button {
  width: 30px;
  height: 30px;
  margin-top: 2px;
  margin-left: -20px;
  opacity: 0.5;
}

.tool-back-button:hover,
.scroll-top-button:hover {
  color: #ffffff;
  opacity: 0.92;
}

.tool-back-button svg,
.scroll-top-button svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.tool-back-button path,
.scroll-top-button path {
  fill: currentColor;
}

.tool-detail-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--accent);
}

.tool-detail-cover img,
.tool-detail-cover .placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--accent);
}

.tool-download-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  margin-left: 40px;
}

.tool-download-actions .button {
  width: 100%;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 14px;
}

.tool-changelog {
  margin-top: 22px;
  margin-left: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tool-changelog h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.tool-changelog-content {
  display: grid;
  gap: 8px;
}

.tool-changelog-content p {
  margin: 0;
  color: rgba(222, 222, 222, 0.72);
  font-size: 13px;
  font-weight: 350;
  line-height: 1.55;
  white-space: pre-wrap;
}

.tool-detail-content {
  min-width: 0;
}

#toolDetailCategory {
  font-size: 17px;
}

.tool-detail-content > h1 {
  max-width: 1000px;
  margin: 8px 0 clamp(42px, 6vw, 80px);
  color: var(--ink);
  font-family: Montserrat, "Source Han Sans SC", "Noto Sans CJK SC", "思源黑体", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: clamp(37.8px, 5.4vw, 82.8px);
  font-weight: 700;
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.tool-document {
  max-width: 1080px;
  color: var(--ink);
}

.tool-document > h2 {
  margin: 64px 0 20px;
  font-size: clamp(24px, 2.4vw, 38px);
  font-weight: 600;
  line-height: 1.2;
}

.tool-document > h2:first-child {
  margin-top: 0;
}

.tool-document > p {
  max-width: 100%;
  margin: 0 0 24px;
  color: rgba(222, 222, 222, 0.88);
  font-size: clamp(16px, 1.2vw, 19px);
  font-weight: 350;
  line-height: 1.75;
  white-space: normal;
}

.tool-document-manual-line {
  display: inline;
}

.tool-document > p br + .tool-document-manual-line {
  display: inline-block;
  margin-top: 0.45em;
}

.tool-document-image {
  margin-top: 36px;
  margin-bottom: 36px;
}

.tool-document-image.width-full { width: 100%; }
.tool-document-image.width-wide { width: 70%; }
.tool-document-image.width-medium { width: 50%; }
.tool-document-image.align-left { margin-right: auto; }
.tool-document-image.align-center { margin-right: auto; margin-left: auto; }
.tool-document-image.align-right { margin-left: auto; }

.tool-document-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.tool-document-image figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.tool-document-empty {
  color: var(--muted);
}

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

  .tool-cover-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-back-button {
    margin-top: 0;
    margin-left: 0;
    justify-self: start;
  }

  .tool-download-actions,
  .tool-changelog {
    margin-left: 0;
  }
}

@media (max-width: 980px) {
  #coursesGrid.masonry,
  #toolsGrid.masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.print-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: transform 100ms ease-in-out, border-color 180ms ease, box-shadow 180ms ease;
  isolation: isolate;
}

.print-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.print-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  background: #111;
}

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

.print-title {
  min-height: 40px;
  display: block;
  overflow: hidden;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bili-card .thumb img {
  object-fit: cover;
}

.print-title-overlay {
  padding-right: 42px;
}

.external-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: rgba(222, 222, 222, 0.68);
  transition: color 160ms ease, filter 160ms ease, transform 160ms ease;
}

.video-title-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  min-height: 56px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 18px 42px 12px 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.video-title-overlay::before {
  content: attr(data-title);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#coursesGrid .video-title-overlay {
  font-size: 15.6px;
}

.tool-title-overlay {
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 3px;
  padding-right: 12px;
}

.tool-title-overlay::before {
  content: none;
}

.tool-card-title,
.tool-card-summary {
  width: 100%;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-card-title {
  font-size: 18.2px;
  font-weight: 650;
}

.tool-card-summary {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 450;
}

.tool-category-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  max-width: 42%;
  overflow: hidden;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13.2px;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.external-badge svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.external-badge path {
  fill: currentColor;
}

.work-card:hover .external-badge,
.print-card:hover .external-badge {
  color: #ffffff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.34));
}

.thumbnail-enter .work-card.is-media-ready-card,
.thumbnail-enter .model-card.is-media-ready-card,
.thumbnail-enter .print-card.is-media-ready-card {
  animation: masonryThumbEnter 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0ms;
  will-change: opacity, translate;
}

.no-thumbnail-enter .work-card,
.no-thumbnail-enter .model-card,
.no-thumbnail-enter .print-card {
  animation: none;
}

.model-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  transition: transform 100ms ease-in-out, border-color 180ms ease, box-shadow 180ms ease;
  isolation: isolate;
}

.model-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

@media (hover: hover) and (pointer: fine) {
  .work-card.is-thumb-swept:not(#coursesGrid .work-card):not(#toolsGrid .work-card),
  .print-card.is-thumb-swept,
  .work-card:hover:not(#coursesGrid .work-card):not(#toolsGrid .work-card),
  .print-card:hover {
    transform: translateY(-8px) scale(1.03) rotate(var(--hover-rotate, 0deg));
    transition-duration: 50ms, 180ms, 180ms;
  }
}

.work-card::before,
.print-card::before,
.work-card::after,
.print-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  box-sizing: border-box;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 180ms ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: opacity;
}

.work-card::before,
.print-card::before {
  padding: 1.5px 1.5px 2px;
  background:
    conic-gradient(
      from var(--cursor-angle, 0deg) at 50% 50%,
      rgba(255, 255, 255, var(--edge-glow-opacity, 0)) 0deg,
      rgba(255, 255, 255, var(--edge-glow-soft-opacity, 0)) 16deg,
      transparent 42deg,
      transparent 318deg,
      rgba(255, 255, 255, var(--edge-glow-soft-opacity, 0)) 344deg,
      rgba(255, 255, 255, var(--edge-glow-opacity, 0)) 360deg
    ),
    radial-gradient(
      600px circle at var(--glow-x, 50%) var(--glow-y, 50%),
      rgba(255, 255, 255, var(--glow-glare-opacity, 0)) 0%,
      rgba(255, 255, 255, var(--glow-glare-opacity, 0)) 1%,
      rgba(255, 255, 255, var(--glow-border-opacity, 0)) 9%,
      rgba(255, 255, 255, var(--glow-border-mid-opacity, 0)) 24%,
      rgba(255, 255, 255, var(--glow-border-tail-opacity, 0)) 38%,
      transparent 58%
    );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: var(--glow-opacity, 0);
  filter:
    drop-shadow(0 0 4px rgba(255, 255, 255, var(--glow-glare-opacity, 0)))
    drop-shadow(0 0 9px rgba(255, 255, 255, var(--glow-glare-bloom-opacity, 0)));
}

.work-card::after,
.print-card::after {
  background: radial-gradient(
    600px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(255, 255, 255, 0.11),
    rgba(255, 255, 255, 0.05) 32%,
    rgba(255, 255, 255, 0.02) 52%,
    transparent 74%
  );
  opacity: var(--glow-opacity, 0);
}

.work-card:hover::before,
.print-card:hover::before,
.work-card:hover::after,
.print-card:hover::after {
  opacity: 1;
}

.model-card::before,
.model-card::after {
  content: none;
}

.model-stage,
.model-card iframe {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  border: 0;
  background: #111;
}

.model-stage {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #111;
  cursor: pointer;
}

.model-stage img,
.model-placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.model-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: Montserrat, "Source Han Sans SC", Arial, sans-serif;
  font-weight: 800;
}

.model-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
}

.model-stage:hover .model-play {
  border-color: var(--accent);
  background: var(--accent);
}

.model-meta {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
}

.model-meta h2 {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-meta a {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 12px;
  font-family: Montserrat, "Source Han Sans SC", Arial, sans-serif;
  font-weight: 800;
}

.empty-right {
  text-align: right;
}

.thumb .placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal.is-closing {
  display: flex;
  pointer-events: none;
}

.modal[aria-hidden="false"] .modal-body,
.modal[aria-hidden="false"] .image-modal-body {
  animation: modalZoomIn 180ms ease-out both;
  transform-origin: center center;
}

.image-modal.is-closing .image-modal-body {
  animation: modalZoomOut 160ms ease-in both;
  transform-origin: center center;
}

.modal.is-closing .modal-body {
  animation: modalZoomOut 160ms ease-in both;
  transform-origin: center center;
}

.modal.is-closing .modal-backdrop {
  animation: modalBackdropOut 160ms ease-in both;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.modal-body {
  position: relative;
  z-index: 1;
  width: min(1000px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #111;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-body video {
  width: 100%;
  max-height: 72vh;
  display: block;
  object-fit: contain;
  background: #000;
}

.work-video-modal-body {
  width: fit-content;
  max-width: min(1650px, 100%);
}

.bili-modal-body {
  width: min(1640px, 100%);
}

.bili-modal-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  background: #000000;
}

.image-modal-body {
  position: relative;
  z-index: 1;
  max-width: min(calc(100vw - 40px), 1728px);
  max-height: min(calc(100vh - 40px), calc((100vh - 48px) * 1.2));
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.image-modal-body img {
  max-width: 100%;
  max-height: min(calc(100vh - 40px), calc((100vh - 48px) * 1.2));
  display: block;
  object-fit: contain;
  background: #050505;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

.image-modal-body.is-dragging {
  cursor: grabbing;
}

.modal-meta {
  padding: 18px 20px 22px;
  color: white;
}

.work-video-modal-body .modal-meta,
.bili-modal-body .modal-meta {
  padding: 13px 20px 15px;
}

.work-video-modal-body .modal-meta h2,
.bili-modal-body .modal-meta h2 {
  font-size: 80%;
}

.modal-meta h2,
.modal-meta p {
  margin: 0;
}

.modal-meta p {
  color: rgba(255, 255, 255, 0.72);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  cursor: pointer;
}

.icon-button.close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  font-size: 28px;
  line-height: 1;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 28px;
  padding: 54px 0 80px;
}

.admin-form,
.admin-list {
  min-width: 0;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field-label {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #151515;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.recaptcha-wrap {
  margin-top: 2px;
}

.media-field {
  display: grid;
  gap: 8px;
}

.media-dropzone,
.cover-dropzone {
  min-height: 188px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 28px 22px;
  border: 1px dashed #454545;
  border-radius: 8px;
  background: #121212;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.cover-dropzone {
  min-height: 132px;
  padding: 22px 18px;
}

.media-dropzone:hover,
.media-dropzone.is-dragover,
.cover-dropzone:hover,
.cover-dropzone.is-dragover {
  border-color: var(--accent);
  background: #0d1a38;
}

.media-dropzone input,
.cover-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-title {
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

.drop-subtitle,
.selected-files {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.selected-files {
  min-height: 20px;
  margin: 0;
}

.file-list {
  display: grid;
  gap: 8px;
}

.file-list-summary {
  color: var(--muted);
}

.file-list-items {
  max-height: 120px;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.file-pill {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #151515;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-table-head,
.admin-item.compact {
  display: grid;
  grid-template-columns: 28px 54px minmax(80px, 1.05fr) 112px minmax(80px, 0.8fr) 82px 74px 58px 48px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.model-head,
.admin-item.model-row {
  grid-template-columns: 28px 60px minmax(140px, 1fr) minmax(180px, 1.4fr) 56px;
}

#printHead,
.admin-item.print-row {
  grid-template-columns: 28px 60px minmax(130px, 0.8fr) minmax(180px, 1.2fr) 176px;
}

.admin-item.bili-row {
  grid-template-columns: 28px 60px minmax(130px, 1fr) 112px 176px;
}

.admin-item.course-row,
#courseHead {
  grid-template-columns: 28px 60px minmax(130px, 0.8fr) minmax(180px, 1.2fr) 176px;
}

.disabled-link {
  opacity: 0.42;
  cursor: default;
  pointer-events: none;
}

.admin-item.tool-row,
#toolHead {
  grid-template-columns: 28px 60px minmax(110px, 0.75fr) minmax(120px, 0.8fr) minmax(130px, 1fr) 120px minmax(120px, 0.9fr) minmax(120px, 0.9fr) 190px;
}

.admin-item.tool-row {
  height: 56px;
}

.tool-preview .placeholder {
  background: var(--accent);
}

.tool-category-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.tool-document-editor {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.tool-editor-head,
.tool-editor-toolbar,
.tool-editor-block-head,
.tool-editor-block-actions {
  display: flex;
  align-items: center;
}

.tool-editor-head {
  justify-content: space-between;
  gap: 16px;
}

.tool-editor-head strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.tool-editor-toolbar {
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--button-glass);
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
}

.tool-editor-toolbar .button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.tool-editor-image-button {
  cursor: pointer;
}

.tool-changelog-editor {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.tool-changelog-editor textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.tool-editor-image-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tool-editor-blocks {
  display: grid;
  gap: 0;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.tool-editor-block {
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.tool-editor-block:last-child {
  border-bottom: 0;
}

.tool-post-block:focus-within {
  background: rgba(255, 255, 255, 0.045);
}

.tool-editor-block-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.tool-editor-block-actions {
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tool-editor-block-actions button {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--button-glass-line);
  border-radius: 50%;
  background: var(--button-glass);
  color: var(--ink);
  cursor: pointer;
}

.tool-editor-block-actions button:disabled {
  opacity: 0.25;
  cursor: default;
}

.tool-editor-textarea {
  width: 100%;
  resize: vertical;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

.tool-editor-textarea:focus {
  outline: 0;
}

.tool-editor-textarea.is-heading {
  min-height: 38px;
  resize: none;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.tool-editor-textarea::placeholder {
  color: rgba(222, 222, 222, 0.35);
}

.tool-editor-image-fields {
  display: grid;
  grid-template-columns: 120px minmax(120px, 1fr) minmax(120px, 1fr) 110px 110px;
  gap: 8px;
  align-items: end;
}

.tool-editor-image-fields > img {
  width: 120px;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 6px;
}

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

.admin-table-head {
  height: 34px;
  margin-bottom: 6px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 14.4px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-table-head > span {
  min-width: 0;
  white-space: nowrap;
}

.admin-items {
  display: grid;
  gap: 4px;
}

.admin-item.compact {
  height: 48px;
  padding: 0 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14.4px;
}

.admin-item.compact.dragging {
  opacity: 0.45;
}

.admin-item.compact.drop-target {
  border-color: var(--accent);
  background: #0d1a38;
}

.admin-item.tool-row.is-editing {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(25, 92, 227, 0.14);
}

.drag-handle {
  width: 22px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  padding: 0;
  line-height: 1;
}

.admin-items > .tool-document-editor,
.admin-items > .tool-changelog-editor-panel {
  margin: 4px 0 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
}

.tool-changelog-editor-panel {
  display: grid;
  gap: 14px;
}

.tool-changelog-editor-panel textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
}

.tool-changelog-history {
  display: grid;
  gap: 8px;
}

.tool-changelog-history-list {
  display: grid;
  gap: 6px;
}

.tool-changelog-history-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(112px, auto);
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.tool-changelog-history-item > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.tool-changelog-history-item > p,
.changelog-entry-input {
  margin: 0;
  color: rgba(222, 222, 222, 0.84);
  font-size: 14px;
  font-weight: 350;
  line-height: 1.55;
  white-space: pre-wrap;
}

.tool-changelog-history-item > p {
  padding: 2px 0;
}

.changelog-entry-input {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}

.tool-changelog-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.compact-empty {
  padding: 14px;
  font-size: 14px;
}

.admin-preview {
  width: 45px;
  height: 33px;
  overflow: hidden;
  border-radius: 3px;
  background: #202526;
}

.admin-preview video,
.admin-preview img,
.admin-preview .placeholder {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.inline-input {
  height: 24px;
  min-width: 0;
  border: 0;
  border-radius: 4px;
  padding: 2px 6px;
  background: transparent;
  color: var(--ink);
  font-size: inherit;
}

.inline-input:focus {
  outline: 1px solid var(--accent);
  background: #111a2e;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14.4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-cell {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14.4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.category-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--button-glass-line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--button-glass);
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
  font-size: 12px;
}

.category-pill button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.admin-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.small-button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--button-glass-line);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.small-button:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: var(--button-glass-hover);
}

.admin-item.compact .small-button {
  min-height: 24px;
  padding: 2px 6px;
  font-size: 14.4px;
}

.cover-button {
  width: 56px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--button-glass-line);
  border-radius: 999px;
  background: var(--button-glass);
  color: var(--ink);
  cursor: pointer;
  font-size: 14.4px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  -webkit-backdrop-filter: var(--button-glass-blur);
  backdrop-filter: var(--button-glass-blur);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.cover-button.is-dragover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(25, 92, 227, 0.28);
  box-shadow: 0 0 0 2px rgba(25, 92, 227, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cover-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.cover-picker[hidden] {
  display: none;
}

.cover-picker {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.cover-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}

.cover-picker-panel {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.cover-picker-video {
  width: 100%;
  max-height: 54vh;
  display: block;
  background: #000000;
}

.cover-picker-preview {
  width: 160px;
  max-width: 100%;
  border-radius: 6px;
  background: #000000;
}

.cover-picker-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.cover-picker-range {
  width: 100%;
}

.small-button.danger {
  border-color: rgba(255, 92, 92, 0.36);
  background: rgba(255, 80, 80, 0.1);
  color: #ffb5ad;
}

.small-button.danger:hover {
  border-color: rgba(255, 140, 130, 0.5);
  background: rgba(255, 80, 80, 0.16);
}

.site-footer {
  width: min(var(--content-max), calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 38px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 300;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-footer a:hover {
  color: var(--text);
}

.scroll-top-button {
  position: fixed;
  right: max(12px, calc((100vw - min(var(--content-max), calc(100vw - 24px))) / 2 - 152px));
  bottom: 22px;
  z-index: 25;
  width: 34px;
  height: 34px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.scroll-top-button svg {
  transform: rotate(90deg);
}

.scroll-top-button.is-visible {
  opacity: 0.5;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-button:hover {
  opacity: 0.92;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.backup-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.backup-text {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.home-card-crop-set {
  display: grid;
  gap: 10px;
}

.home-card-cropper {
  position: relative;
  width: 100%;
  aspect-ratio: var(--home-card-aspect, 800 / 480);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  cursor: grab;
  touch-action: none;
}

.home-card-cropper:not(.home-card-cropper-mobile)::after {
  content: "";
  position: absolute;
  inset: 15% 0;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.62);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0) 18%,
    rgba(255, 255, 255, 0) 82%,
    rgba(255, 255, 255, 0.08)
  );
  pointer-events: none;
}

.home-card-cropper:active {
  cursor: grabbing;
}

.home-card-cropper img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  user-select: none;
  pointer-events: none;
  transform-origin: center;
}

.home-card-cropper:not(.has-image) img {
  display: none;
}

.home-card-crop-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.home-card-cropper.has-image .home-card-crop-empty {
  display: none;
}

.tool-card-cropper {
  aspect-ratio: 16 / 9;
  max-height: 360px;
}

.tool-card-cropper::after {
  display: none;
}

.home-card-row .admin-preview {
  border-radius: 10px;
}

@media (max-width: 800px) {
  .site-header {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 16px 12px 4px;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 15px;
  }

  .sm-toggle {
    min-height: 20px;
    gap: 8px;
    font-size: 14px;
  }

  .sm-icon {
    width: 0.9em;
    height: 0.9em;
  }

  .sm-prelayers,
  .staggered-menu-panel {
    width: 100vw;
  }

  .sm-panel-inner {
    padding: 110px 24px 42px;
  }

  .sm-panel-list {
    gap: 10px;
  }

  .sm-panel-item {
    gap: 14px;
    font-size: clamp(35px, 12.32vw, 59px);
  }

  .sm-panel-item::before {
    display: none;
    min-width: 28px;
    font-size: 12px;
  }

  .sm-panel-itemCn {
    left: auto;
    right: -0.15em;
    top: calc(0.08em + 8px);
    font-size: 0.2em;
    transform: translateX(100%);
  }

  .sm-color-blocks {
    left: 24px;
    right: 24px;
    bottom: 20px;
    height: 8px;
  }

  .sm-panel-contact {
    left: 24px;
    right: 24px;
    bottom: 42px;
    gap: 7px;
    font-size: 16px;
  }

  .site-header nav {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 2px;
    overflow: hidden;
  }

  .site-header nav a {
    min-height: 30px;
    padding: 4px 6px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .site-footer,
  .list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
  }

  .site-header nav {
    width: auto;
    overflow: hidden;
  }

  .work-tabs {
    flex: 1 1 0;
    flex-wrap: wrap;
    gap: 6px;
  }

  .work-tabs a {
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }

  .works-toolbar {
    align-items: flex-end;
    gap: 6px;
  }

  .shuffle-button {
    width: 26px;
    height: 30px;
  }

  .dice-mask {
    width: 23px;
    height: 23px;
  }

  .masonry,
  .gallery-row,
  .model-grid,
  .print-grid,
  #videosGrid.masonry,
  #videosGrid .gallery-row,
  #coursesGrid.masonry,
  #toolsGrid.masonry {
    gap: 6px;
  }

  .print-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #videosGrid.masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-masonry-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .mobile-masonry-column {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .mobile-masonry-column .work-card {
    width: 100%;
    height: auto;
  }

  #coursesGrid.masonry,
  #toolsGrid.masonry {
    grid-template-columns: 1fr;
  }

  .tool-detail-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 36px;
  }

  .tool-detail-sidebar {
    position: static;
  }

  .tool-cover-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tool-back-button {
    width: 26px;
    height: 26px;
    margin-top: 0;
    margin-left: 0;
    justify-self: start;
  }

  .tool-download-actions,
  .tool-changelog {
    margin-left: 0;
  }

  .tool-detail-content > h1 {
    margin-bottom: 40px;
  }

  .tool-document-image.width-wide,
  .tool-document-image.width-medium {
    width: 100%;
  }

  .tool-editor-image-fields {
    grid-template-columns: 1fr;
  }

  .tool-editor-image-fields > img {
    width: 100%;
  }

  .video-title-overlay {
    min-height: 46px;
    padding: 14px 34px 12px 8px;
    font-size: 12px;
  }

  #coursesGrid .video-title-overlay {
    font-size: 14.4px;
  }

  .modal-meta h2 {
    font-size: 70%;
    line-height: 1.25;
  }

  .image-modal {
    overflow: hidden;
    padding: 0;
  }

  .image-modal-body {
    max-width: 100vw;
    max-height: 100vh;
    overflow: visible;
  }

  .image-modal-body img {
    max-width: 94vw;
    max-height: 94vh;
  }

  .hero,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .home-hero {
    padding-top: clamp(4px, 1vh, 11px);
  }

  .home-hero .profile-tags {
    gap: 4px;
  }

  .home-hero .profile-tags span {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 12px;
  }

  .home-profile {
    grid-template-columns: 1fr;
  }

  .home-profile .hero-copy {
    grid-column: 1;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 11px;
  }

  .home-wordmark-en {
    font-size: clamp(35px, 12vw, 60px);
  }

  .home-wordmark-en .home-wordmark-line {
    font-size: clamp(12px, 3.9vw, 18px);
    white-space: normal;
  }

  .home-entry-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 48px;
  }

  .home-entry {
    min-height: 72px;
  }

  .home-entry-grid .home-entry,
  .home-entry-grid .home-entry:hover,
  .home-entry-grid .home-entry.is-active,
  .home-entry-grid .home-entry-works,
  .home-entry-grid .home-entry-tools,
  .home-entry-grid .home-entry-courses {
    min-height: 72px;
  }

  .home-entry-en {
    font-size: clamp(43.43px, 4.99vw, 79.46px);
  }

  .home-entry-cn {
    align-self: flex-end;
    text-align: right;
    font-size: 20.7px;
    transform: translate(8px, 12px);
  }

  .home-entry.has-home-card-bg::before {
    background-image: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), rgba(0, 0, 0, 0.28)), var(--home-card-mobile-bg);
    background-position: 58% center;
    background-size: cover;
  }

  .home-wordmark-name {
    gap: 8px;
    margin-bottom: 6.4px;
    padding-right: 11.2px;
  }

  .home-wordmark-name .home-wordmark-cn {
    font-size: 17.6px;
  }

  .home-avatar {
    width: 27.2px;
  }

  .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-table-head {
    display: none;
  }

  .admin-item.compact {
    grid-template-columns: 24px 32px minmax(0, 1fr);
    height: auto;
    padding: 8px;
  }

  .admin-item.compact .date-input,
  .admin-item.compact .file-name,
  .admin-item.compact .spec-cell,
  .admin-item.compact .cover-button,
  .admin-item.compact .small-button,
  .admin-item.tool-row .inline-input,
  .admin-item.tool-row .print-actions {
    grid-column: 3;
  }
}

.login-layout {
  min-height: calc(100vh - 79px);
  display: grid;
  place-items: center;
  padding: 48px 0;
}

.login-panel {
  width: min(440px, 100%);
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

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

  .contact-card {
    transform: translateY(-60px) scale(0.9);
  }

  .title-cn {
    transform: translateY(-45%);
  }

  .work-card:hover,
  .print-card:hover,
  .model-card:hover,
  .social-links a:hover,
  .contact-row:hover,
  .shuffle-button:hover {
    transform: none;
  }
}
