:root {
  --page-x: clamp(24px, 2vw, 36px);
  --page-y: clamp(24px, 2.4vw, 40px);
  --nav-width: clamp(170px, 14vw, 230px);
  --nav-safe-width: calc(var(--page-x) + var(--nav-width) + 32px);
  --site-sidebar-width: 220px;
  --board-right-padding: 0px;
  --projects-index-gap: 160px;
  --projects-index-cover-width: min(76vw, 920px);
  --project-detail-gap: 72px;
  --project-detail-cover-width: 1080px;
  --project-detail-long-width: 760px;
  --project-detail-gif-width: 860px;
  --project-detail-grid-width: 1080px;
  --project-view-gap: 96px;
  --page-background: #ffffff;
  --surface-background: #ffffff;
  --surface-elevated: #f5f5f5;
  --primary-text: #111111;
  --secondary-text: #666666;
  --muted-text: #8a8a8a;
  --icon-color: #111111;
  --border-color: #dddddd;
  --overlay-background: rgba(255, 255, 255, 0.96);
  --scrim-background: rgba(255, 255, 255, 0.82);
  --grid-line: rgba(17, 17, 17, 0.055);
  --selection-color: rgba(17, 17, 17, 0.72);
  --shadow-color: rgba(17, 17, 17, 0.12);
  --danger-text: #a01818;
  --success-text: #276533;
  --text: var(--primary-text);
  --muted: var(--secondary-text);
  --background: var(--page-background);
  color-scheme: light;
}

html[data-theme="charcoal"] {
  --page-background: #121212;
  --surface-background: #191919;
  --surface-elevated: #202020;
  --primary-text: #f2f2f2;
  --secondary-text: #c5c5c5;
  --muted-text: #909090;
  --icon-color: #f2f2f2;
  --border-color: #333333;
  --overlay-background: rgba(18, 18, 18, 0.96);
  --scrim-background: rgba(18, 18, 18, 0.84);
  --grid-line: rgba(242, 242, 242, 0.07);
  --selection-color: rgba(242, 242, 242, 0.72);
  --shadow-color: rgba(0, 0, 0, 0.38);
  --danger-text: #e0a09a;
  --success-text: #9dc9a4;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: "PingFang SC", "PingFang-SC", "苹方-简", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
}

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

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.cover-video-section {
  display: none;
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #000;
}

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

.cover-overlay {
  position: absolute;
  left: var(--page-x);
  bottom: var(--page-y);
  z-index: 2;
  color: #fff;
  pointer-events: none;
}

.cover-title {
  font-size: clamp(28px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin-bottom: 10px;
}

.cover-subtitle {
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 34px;
}

.scroll-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
}

.site-header {
  position: fixed;
  top: var(--page-y);
  left: var(--page-x);
  z-index: 10;
  width: var(--nav-width);
}

.site-back-button {
  display: none;
  color: #111;
  text-decoration: none;
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 24px;
  line-height: 1;
  transition: opacity 180ms ease, transform 180ms ease;
}

.site-back-button:hover,
.site-back-button:focus-visible {
  opacity: 0.62;
  transform: translateX(-3px);
}

.site-title {
  display: inline-block;
  width: fit-content;
  margin-bottom: 18px;
  font-size: clamp(26px, 2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.04em;
}
.site-corner-meta {
  position: fixed;
  left: var(--page-x);
  bottom: var(--page-y);
  z-index: 30;
  width: var(--nav-width);
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(17, 17, 17, 0.48);
}

.site-copyright {
  margin: 0 0 24px;
  color: rgba(17, 17, 17, 0.48);
}

.site-copyright p {
  margin: 0;
  color: rgba(17, 17, 17, 0.48);
}

.site-year-copyright {
  margin: 20px 0 0;
  color: rgba(17, 17, 17, 0.48);
}

.site-corner-meta a {
  color: rgba(17, 17, 17, 0.48);
  text-decoration: none;
}

.site-corner-meta a:hover,
.site-corner-meta a:focus-visible {
  color: rgba(17, 17, 17, 0.82);
  text-decoration: underline;
}

.lang-toggle {
  display: block;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.lang-toggle:hover {
  color: var(--text);
}

.edit-mode-toggle,
.new-project-toggle {
  display: block;
  width: fit-content;
  margin: 0 0 18px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.edit-mode-toggle:hover,
.new-project-toggle:hover,
.edit-mode-toggle[aria-pressed="true"] {
  color: var(--muted);
}

.layout-cancel-toggle {
  display: block;
  width: fit-content;
  margin: -8px 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}

.layout-cancel-toggle:hover {
  color: var(--text);
}

.layout-cancel-toggle[hidden] {
  display: none;
}

.site-admin-controls {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.admin-login-view {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f3ef;
  color: #111;
}

.admin-login-view[hidden] {
  display: none;
}

body.is-admin-route:not(.is-admin-authenticated) {
  overflow: hidden;
}

body.is-admin-route:not(.is-admin-authenticated) > :not(.admin-login-view):not(script) {
  visibility: hidden;
}

.admin-login-card {
  width: min(100%, 390px);
  display: grid;
  gap: 18px;
  padding: 38px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  background: #fff;
  box-shadow: 0 18px 60px rgba(17, 17, 17, 0.08);
}

.admin-login-card__eyebrow {
  margin: 0;
  color: #666;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-login-card h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 500;
}

.admin-login-card label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.admin-login-card input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #bbb;
  border-radius: 0;
  padding: 12px 13px;
  background: #fff;
  color: #111;
  font: inherit;
}

.admin-login-card input:focus {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.admin-login-status {
  min-height: 1.4em;
  margin: -2px 0;
  color: #b42318;
  font-size: 13px;
}

.admin-login-submit,
.admin-login-return {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 1px solid #111;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.admin-login-submit {
  background: #111;
  color: #fff;
}

.admin-login-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

.admin-login-return {
  background: transparent;
  color: #111;
}

.site-admin-controls[hidden] {
  display: none !important;
}

body.is-admin-mode .site-admin-controls {
  display: flex;
}

.site-admin-controls .edit-mode-toggle,
.site-admin-controls .new-project-toggle,
.site-admin-controls .layout-cancel-toggle,
.site-admin-controls .admin-logout-toggle {
  margin: 0;
  padding: 6px 0;
  background: transparent;
}

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

.site-nav a {
  width: fit-content;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.site-nav a:hover {
  color: var(--muted);
}

.site-header.is-compact .site-title,
.site-header.is-compact .lang-toggle,
.site-header.is-compact .site-nav {
  opacity: 0;
  pointer-events: none;
}

.site-header::after {
  content: "";
  display: block;
  width: 34px;
  height: 20px;
  margin-top: 2px;
  opacity: 0;
  background:
    linear-gradient(currentColor, currentColor) left top / 34px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left center / 34px 2px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 34px 2px no-repeat;
  transform: translateY(-8px);
  transition: opacity 260ms ease, transform 260ms ease;
}

.site-header.is-compact::after {
  opacity: 1;
  transform: translateY(0);
}

body.is-info-active .site-back-button,
body.is-projects-active .site-back-button,
body.is-favorites-active .site-back-button,
body.is-automotive-active .site-back-button,
body.is-still-life-active .site-back-button,
body.is-project-detail-active .site-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.is-project-view-active .site-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.is-info-active,
body.is-projects-active,
body.is-favorites-active,
body.is-automotive-active,
body.is-still-life-active,
body.is-project-detail-active {
  overflow: hidden;
}

body.is-project-view-active {
  overflow: hidden;
}

body.is-info-active .site-header,
body.is-projects-active .site-header,
body.is-favorites-active .site-header,
body.is-automotive-active .site-header,
body.is-still-life-active .site-header,
body.is-project-detail-active .site-header {
  z-index: 60;
}

body.is-project-view-active .site-header {
  z-index: 10000;
}

body.is-info-active .new-project-toggle,
body.is-projects-active .new-project-toggle,
body.is-favorites-active .new-project-toggle,
body.is-automotive-active .new-project-toggle,
body.is-still-life-active .new-project-toggle,
body.is-project-detail-active .new-project-toggle,
body.is-project-view-active .new-project-toggle {
  display: none;
}

body.is-info-active .site-title,
body.is-info-active .lang-toggle,
body.is-info-active .edit-mode-toggle,
body.is-info-active .layout-cancel-toggle,
body.is-info-active .site-nav,
body.is-projects-active .site-title,
body.is-projects-active .lang-toggle,
body.is-projects-active .edit-mode-toggle,
body.is-projects-active .layout-cancel-toggle,
body.is-projects-active .site-nav,
body.is-favorites-active .site-title,
body.is-favorites-active .lang-toggle,
body.is-favorites-active .edit-mode-toggle,
body.is-favorites-active .layout-cancel-toggle,
body.is-favorites-active .site-nav,
body.is-automotive-active .site-title,
body.is-automotive-active .lang-toggle,
body.is-automotive-active .edit-mode-toggle,
body.is-automotive-active .layout-cancel-toggle,
body.is-automotive-active .site-nav,
body.is-still-life-active .site-title,
body.is-still-life-active .lang-toggle,
body.is-still-life-active .edit-mode-toggle,
body.is-still-life-active .layout-cancel-toggle,
body.is-still-life-active .site-nav,
body.is-project-detail-active .site-title,
body.is-project-detail-active .lang-toggle,
body.is-project-detail-active .edit-mode-toggle,
body.is-project-detail-active .layout-cancel-toggle,
body.is-project-detail-active .site-nav,
body.is-project-view-active .site-title,
body.is-project-view-active .lang-toggle,
body.is-project-view-active .edit-mode-toggle,
body.is-project-view-active .layout-cancel-toggle,
body.is-project-view-active .site-nav {
  display: none;
}

body.is-info-active .site-header::after,
body.is-projects-active .site-header::after,
body.is-favorites-active .site-header::after,
body.is-automotive-active .site-header::after,
body.is-still-life-active .site-header::after,
body.is-project-detail-active .site-header::after {
  display: none;
}

body.is-project-view-active .site-header::after {
  display: none;
}

body.is-info-active .home,
body.is-projects-active .home,
body.is-favorites-active .home,
body.is-automotive-active .home,
body.is-still-life-active .home,
body.is-project-detail-active .home {
  pointer-events: none;
}

body.is-project-view-active .home {
  pointer-events: none;
}

body.is-subpage-active .home,
body.is-subpage-active .project-feed-page,
body.is-subpage-active #projectFeed {
  display: none !important;
  pointer-events: none !important;
}

body.is-subpage-active .project-feed,
body.is-subpage-active .project-section,
body.is-subpage-active .feed-project {
  visibility: hidden !important;
  pointer-events: none !important;
}

.home {
  min-height: 100vh;
}

.project-feed-page {
  display: block;
  min-height: 100vh;
  padding: 6vh 0 14vh;
}

.project-feed {
  position: relative;
  width: calc(100vw - var(--site-sidebar-width));
  max-width: none;
  min-height: 320vh;
  margin-left: var(--site-sidebar-width);
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.project-feed.is-editing,
.project-feed.has-custom-layout {
  position: relative;
  min-height: 320vh;
}

.project-feed.is-editing {
  background-image:
    linear-gradient(rgba(5, 5, 5, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 5, 5, 0.055) 1px, transparent 1px);
  background-position: 0 0;
  background-size: 40px 40px;
}

.project-feed.is-editing .project-section,
.project-feed.has-custom-layout .project-section {
  display: contents;
}

.project-section {
  position: relative;
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  column-gap: clamp(22px, 2.4vw, 52px);
  row-gap: clamp(46px, 7vh, 92px);
  min-height: 88vh;
  margin-bottom: clamp(24px, 5vh, 72px);
}

.feed-project {
  box-sizing: border-box;
  position: relative;
  opacity: 0;
  animation: feedFadeIn 700ms ease forwards;
  animation-delay: var(--delay, 0ms);
  touch-action: none;
  user-select: none;
  will-change: left, top, width, height, transform;
}

.feed-project__button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}


.feed-project__delete {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 50;
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.feed-project__delete:hover,
.feed-project__delete:focus-visible {
  background: #111;
  color: #fff;
}

#projectFeed[data-board-mode="edit"] .feed-project__delete {
  display: inline-flex;
}

.feed-project__replace {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1;
}

.feed-project__replace:hover,
.feed-project__replace:focus-visible {
  background: #111;
  color: #fff;
}

body.is-admin-mode #projectFeed[data-board-mode="edit"] .feed-project__replace {
  display: inline-flex;
}

.feed-project.is-hidden-by-user {
  display: none !important;
}

.project-feed.is-editing .feed-project,
.project-feed.has-custom-layout .feed-project {
  position: absolute;
  margin: 0;
  transform-origin: top left;
}

#projectFeed.is-layout-loading {
  visibility: hidden;
  opacity: 0;
}

#projectFeed.is-layout-loading .feed-project,
#projectFeed.is-layout-loading .feed-project * {
  animation: none !important;
  transition: none !important;
}

.project-feed.is-editing .feed-project {
  z-index: 1;
  outline: 1px solid rgba(5, 5, 5, 0.22);
  outline-offset: 0;
  cursor: grab;
  opacity: 1;
  animation: none;
  backface-visibility: hidden;
  contain: layout paint;
  isolation: isolate;
  transition: none !important;
}

.project-feed.is-editing .feed-project__button {
  cursor: grab;
  pointer-events: none;
}

.project-feed.is-editing .feed-project:active,
.project-feed.is-editing .feed-project.is-dragging,
.project-feed.is-editing .feed-project.is-resizing {
  cursor: grabbing;
}

.feed-project.is-dragging {
  z-index: 9999 !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  backface-visibility: hidden;
  contain: layout paint;
  transition: none !important;
  will-change: left, top, width, height, transform;
}

.feed-project.is-resizing {
  z-index: 9999 !important;
  outline-color: rgba(5, 5, 5, 0.68);
  backface-visibility: hidden;
  contain: layout paint;
  transition: none !important;
  will-change: left, top, width, height, transform;
}

.feed-project::before,
.feed-project::after {
  pointer-events: none;
}

.feed-project.has-saved-layout {
  opacity: 1;
  animation: none;
}

.layout-resize-handle {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 18px;
  height: 18px;
  border: 1px solid #050505;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.is-multi-selected {
  outline: 2px solid rgba(0, 0, 0, 0.85) !important;
  outline-offset: 3px !important;
}

.layout-marquee-selection {
  position: absolute;
  z-index: 9999;
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.75);
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.is-marquee-selecting,
.is-marquee-selecting * {
  user-select: none !important;
}

@media (pointer: coarse) {
  .layout-marquee-selection {
    display: none;
  }
}

.project-feed.is-editing .layout-resize-handle {
  opacity: 1;
  pointer-events: auto;
  cursor: nwse-resize;
}

.feed-project[style*="height"] .feed-project__button {
  height: 100%;
}

.feed-project__button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 420ms ease, opacity 420ms ease;
}

.feed-project__button video {
  user-select: none;
  -webkit-user-drag: none;
}

.feed-project[style*="height"] .feed-project__button img {
  height: 100%;
  max-height: none;
}

.feed-project__button:hover img {
  transform: scale(1.012);
}

.feed-project--small img {
  max-height: 34vh;
}

.feed-project--medium img {
  max-height: 48vh;
}

.feed-project--hero img {
  max-height: 68vh;
}

.project-feed.is-editing .feed-project__button img,
.project-feed.has-custom-layout .feed-project__button img,
.project-feed.is-editing .feed-project__button video,
.project-feed.has-custom-layout .feed-project__button video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.project-feed.is-editing .feed-project,
.project-feed.is-editing .feed-project__button,
.project-feed.is-editing .feed-project__button img,
.project-feed.is-editing .feed-project__button video,
.feed-project.is-dragging,
.feed-project.is-dragging *,
.feed-project.is-resizing,
.feed-project.is-resizing * {
  transition: none !important;
}

.project-feed.is-editing .feed-project__button:hover img,
.feed-project.is-dragging .feed-project__button img,
.feed-project.is-resizing .feed-project__button img {
  transform: none !important;
}

.project-section--one .feed-project--hero {
  grid-column: 2 / span 5;
  grid-row: 1 / span 2;
  margin-top: 4vh;
}

.project-section--one .feed-project--small {
  grid-column: 9 / span 3;
  grid-row: 1;
  margin-top: 0;
}

.project-section--one .feed-project--medium {
  grid-column: 7 / span 4;
  grid-row: 2;
  margin-top: -2vh;
}

.project-section--two .feed-project--medium {
  grid-column: 2 / span 4;
  grid-row: 1;
  margin-top: 2vh;
}

.project-section--two .feed-project--hero {
  grid-column: 8 / span 5;
  grid-row: 1 / span 2;
  margin-top: 0;
}

.project-section--two .feed-project--small {
  grid-column: 5 / span 3;
  grid-row: 2;
  margin-top: -1vh;
}

.project-section--three .feed-project--small {
  grid-column: 2 / span 3;
  grid-row: 1;
  margin-top: 4vh;
}

.project-section--three .feed-project--medium {
  grid-column: 6 / span 4;
  grid-row: 1;
  margin-top: 0;
}

.project-section--three .feed-project--hero {
  grid-column: 5 / span 5;
  grid-row: 2;
  margin-top: -1vh;
}

.project-section--four .feed-project--hero {
  grid-column: 2 / span 5;
  grid-row: 1 / span 2;
  margin-top: 0;
}

.project-section--four .feed-project--medium:nth-of-type(2) {
  grid-column: 9 / span 4;
  grid-row: 1;
  margin-top: 4vh;
}

.project-section--four .feed-project--small {
  grid-column: 3 / span 3;
  grid-row: 3;
  margin-top: 0;
}

.project-section--four .feed-project--medium:nth-of-type(4) {
  grid-column: 8 / span 4;
  grid-row: 2;
  margin-top: -1vh;
}

.project-section--five .feed-project--medium {
  grid-column: 2 / span 4;
  grid-row: 1;
  margin-top: 0;
}

.project-section--five .feed-project--small {
  grid-column: 9 / span 3;
  grid-row: 1;
  margin-top: 6vh;
}

.project-section--five .feed-project--hero {
  grid-column: 6 / span 5;
  grid-row: 2;
  margin-top: -1vh;
}

.project-section--six .feed-project--hero {
  grid-column: 2 / span 5;
  grid-row: 1 / span 2;
  margin-top: 3vh;
}

.project-section--six .feed-project--small {
  grid-column: 9 / span 3;
  grid-row: 1;
  margin-top: 0;
}

.project-section--six .feed-project--medium:nth-of-type(3) {
  grid-column: 7 / span 3;
  grid-row: 2;
  margin-top: -1vh;
}

.project-section--six .feed-project--medium:nth-of-type(4) {
  grid-column: 10 / span 3;
  grid-row: 2;
  margin-top: 4vh;
}

.category-page,
.favorites-page,
.projects-page,
.project-detail-page {
  display: none;
  background: #fff;
  background-image: none;
  color: #111;
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.is-automotive-active .category-page--automotive,
body.is-still-life-active .category-page--still-life,
body.is-projects-active .projects-page,
body.is-project-detail-active .project-detail-page {
  position: fixed;
  inset: 0;
  display: block;
  overflow-y: auto;
  background: #fff;
  background-image: none;
}

body.is-favorites-active .favorites-page {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: block;
  overflow-y: auto;
  background: #fff;
}

.favorites-admin-controls {
  position: fixed;
  top: calc(var(--page-y) + 72px);
  left: var(--page-x);
  z-index: 61;
  display: none;
  width: var(--nav-width);
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

body.is-admin-mode.is-favorites-active .favorites-admin-controls {
  display: flex;
}

.favorites-admin-controls button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
}

.favorites-admin-controls button[hidden] {
  display: none;
}

.favorites-feed {
  position: relative;
  min-height: 100vh;
  margin-left: var(--site-sidebar-width);
  background: #fff;
}

.favorites-feed.is-layout-loading {
  visibility: hidden;
  opacity: 0;
}

.favorites-feed.is-layout-loading *,
.favorites-feed.is-layout-loading .favorite-project {
  transition: none !important;
}

.favorite-project {
  position: absolute;
  visibility: visible !important;
  pointer-events: auto !important;
  margin: 0;
  box-sizing: border-box;
  touch-action: none;
  user-select: none;
}

body.is-subpage-active.is-favorites-active .favorites-feed .favorite-project {
  visibility: visible !important;
  pointer-events: auto !important;
}

@media (max-width: 760px) {
  .favorites-feed {
    margin-left: 72px;
  }
}

.favorite-project__button,
.favorite-project__button img {
  display: block;
  width: 100%;
  height: 100%;
}

.favorite-project__button img {
  object-fit: cover;
  transform: scale(1);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  .favorites-feed[data-board-mode="view"] .favorite-project:hover img {
    transform: scale(1.02);
  }
}

.favorites-feed[data-board-mode="edit"] {
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
}

.favorites-feed[data-board-mode="edit"] .favorite-project {
  outline: 1px solid rgba(17, 17, 17, 0.28);
  cursor: grab;
}

.favorites-feed[data-board-mode="edit"] .favorite-project__button {
  pointer-events: none;
}

.favorites-feed[data-board-mode="view"] .favorite-project__delete,
.favorites-feed[data-board-mode="view"] .favorite-project__replace,
.favorites-feed[data-board-mode="view"] .favorite-resize-handle {
  display: none !important;
}

.favorites-feed[data-board-mode="edit"] .favorite-project__delete {
  display: inline-flex;
}

.favorites-feed[data-board-mode="edit"] .favorite-project__replace {
  display: block;
}

.favorites-feed[data-board-mode="edit"] .favorite-resize-handle {
  display: block;
  z-index: 80;
  pointer-events: auto;
  cursor: nwse-resize;
}

body.is-automotive-active .category-page--automotive,
body.is-still-life-active .category-page--still-life,
body.is-projects-active .projects-page {
  z-index: 40;
}

body.is-project-detail-active .project-detail-page {
  z-index: 42;
}

.category-toolbar {
  position: fixed;
  top: calc(var(--page-y) + 72px);
  left: var(--page-x);
  z-index: 61;
  display: none;
  width: var(--nav-width);
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

body.is-admin-mode .category-toolbar {
  display: flex;
}

.category-edit-toggle,
.category-save-toggle,
.category-cancel-toggle {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
}

.category-cancel-toggle {
  color: rgba(17, 17, 17, 0.54);
}

.category-save-toggle[hidden],
.category-cancel-toggle[hidden] {
  display: none;
}

.category-board {
  position: relative;
  min-height: 320vh;
  margin-left: calc(var(--nav-width) + 32px);
  padding: 0 2vw 160px 0;
  background: #fff;
  background-image: none;
}

.category-board[data-board-mode="view"] {
  background: #fff;
  background-image: none;
}

.category-board[data-board-mode="edit"] {
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.045) 1px, transparent 1px);
  background-position: 0 0;
  background-size: 32px 32px;
}

.category-project {
  position: absolute;
  margin: 0;
  box-sizing: border-box;
  user-select: none;
  touch-action: none;
}

.category-board[data-board-mode="edit"] .category-project {
  outline: 1px solid rgba(17, 17, 17, 0.28);
  cursor: grab;
}

.category-project.is-dragging,
.category-project.is-resizing {
  z-index: 20;
  cursor: grabbing;
  outline-color: rgba(17, 17, 17, 0.72);
}

.category-project__button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
}

.category-board[data-board-mode="edit"] .category-project__button {
  pointer-events: none;
  cursor: grab;
}

.category-project__button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.category-project.is-missing {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px solid rgba(17, 17, 17, 0.1);
  background: rgba(17, 17, 17, 0.025);
}

.category-project.is-missing .category-project__button {
  display: grid;
  place-items: center;
  min-height: 100%;
  color: rgba(17, 17, 17, 0.48);
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
}

.projects-index {
  width: min(980px, calc(100vw - 320px));
  margin: 96px auto 160px;
  padding-left: 180px;
}

.projects-index__item {
  width: var(--projects-index-cover-width);
  margin: 0 auto var(--projects-index-gap);
}

.projects-index__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
}

.projects-index__cover {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.projects-index__caption {
  margin: 18px 0 0;
  color: #111;
  font-size: 12px;
  font-style: italic;
  line-height: 1.3;
  text-align: center;
}

.project-detail-editor-shell {
  min-height: 100vh;
}

.project-detail-canvas {
  position: relative;
  width: min(var(--project-detail-cover-width), calc(100vw - 420px));
  margin: 96px auto 180px;
  padding-left: 180px;
}

.project-detail-canvas.has-project-detail-layout,
body.is-project-detail-editing .project-detail-canvas {
  min-height: 5000px;
}

.project-detail-block {
  margin: 0 auto var(--project-detail-gap);
}

.project-detail-canvas.has-project-detail-layout .project-detail-block,
body.is-project-detail-editing .project-detail-block {
  position: absolute;
  margin: 0;
}

.project-detail-block img,
.project-detail-block video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.project-detail-block--cover,
.project-detail-block--banner {
  width: min(100%, var(--project-detail-cover-width));
}

.project-detail-block--long {
  width: min(100%, var(--project-detail-long-width));
}

.project-detail-block--text {
  width: min(100%, var(--project-detail-long-width));
  color: #111;
  font-size: 14px;
  line-height: 1.8;
}

.project-detail-block--text p {
  margin: 0;
}

.project-detail-block--gif {
  width: min(100%, var(--project-detail-gif-width));
}

.project-detail-block--grid {
  width: min(100%, var(--project-detail-grid-width, 1080px));
}

body.is-project-detail-editing .project-detail-canvas {
  background-image:
    linear-gradient(rgba(5, 5, 5, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 5, 5, 0.055) 1px, transparent 1px);
  background-size: 40px 40px;
}

body.is-project-detail-editing .project-detail-block {
  position: relative;
  box-sizing: border-box;
  outline: 1px solid rgba(5, 5, 5, 0.24);
  outline-offset: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: left, top, width, height;
}

body.is-project-detail-editing .project-detail-block img,
body.is-project-detail-editing .project-detail-block video {
  width: 100%;
  height: auto;
  object-fit: contain;
}

body.is-project-detail-editing .project-detail-block a,
body.is-project-detail-editing .project-detail-block button {
  pointer-events: none;
}

.project-detail-block.is-dragging,
.project-detail-block.is-resizing {
  z-index: 20;
  cursor: grabbing;
  outline-color: rgba(5, 5, 5, 0.68);
}

body.is-project-detail-editing .project-detail-block.is-selected {
  outline: 1px solid rgba(0, 0, 0, 0.45);
  outline-offset: 4px;
}

.project-detail-block__delete {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 30;
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

body.is-project-detail-editing .project-detail-block__delete {
  display: inline-flex;
}

.project-detail-block__missing,
.project-detail-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  border: 1px dashed rgba(17, 17, 17, 0.2);
  color: rgba(17, 17, 17, 0.5);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.project-photo-grid {
  --grid-columns: 3;
  --grid-gap: 12px;
  --grid-item-ratio: 9 / 16;

  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  gap: var(--grid-gap);
  width: 100%;
  align-items: stretch;
}

.project-photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: var(--grid-item-ratio);
  height: auto;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.project-photo-grid--contain img {
  object-fit: contain;
  background: #f5f5f5;
}

.project-text-block {
  color: #111;
}

.project-editor-panel {
  position: fixed;
  top: 32px;
  right: 32px;
  z-index: 64;
  width: 260px;
  padding: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f3f3f3;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.project-editor-panel__section + .project-editor-panel__section {
  margin-top: 20px;
}

.project-editor-panel h3 {
  margin: 0 0 12px;
  color: #111;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.project-editor-panel__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.editor-tool,
.project-editor-panel__section > button {
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #fff;
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
}

.editor-tool:hover,
.project-editor-panel__section > button:hover {
  border-color: rgba(17, 17, 17, 0.38);
}

.project-editor-panel__section > button {
  display: block;
  width: 100%;
  margin-top: 8px;
  text-align: left;
}

.project-editor-panel__section > button[hidden] {
  display: none;
}

.project-selected-panel {
  color: rgba(17, 17, 17, 0.68);
  font-size: 11px;
  line-height: 1.4;
}

.project-selected-panel p {
  margin: 0;
}

.project-selected-panel label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.project-selected-panel select,
.project-selected-panel input,
.project-selected-panel textarea {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: #fff;
  padding: 7px 8px;
  font: inherit;
}

.project-selected-panel button {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: #fff;
  cursor: pointer;
  font: inherit;
  padding: 7px 8px;
  text-align: left;
}

.project-upload-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.68);
}

.project-upload-panel[hidden] {
  display: none;
}

.project-upload-panel__form {
  position: relative;
  width: min(420px, calc(100vw - 40px));
  padding: 28px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: #fff;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.12);
}

.project-upload-panel__close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.project-upload-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.project-upload-panel__note {
  margin: 0 0 18px;
  color: rgba(17, 17, 17, 0.58);
  font-size: 12px;
  line-height: 1.55;
}

.project-upload-panel label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: #111;
  font-size: 12px;
}

.project-upload-panel__grid-options,
.project-upload-panel__text-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.project-upload-panel__grid-options[hidden],
.project-upload-panel__text-options[hidden] {
  display: none;
}

.project-upload-panel__checkbox {
  display: flex !important;
  grid-column: 1 / -1;
  align-items: center;
  gap: 8px;
}

.project-upload-panel__checkbox input {
  width: auto;
}

.project-upload-panel input,
.project-upload-panel textarea,
.project-upload-panel select {
  width: 100%;
  border: 1px solid rgba(17, 17, 17, 0.18);
  padding: 10px;
  font: inherit;
}

.project-upload-panel__actions {
  display: flex;
  gap: 10px;
}

.project-upload-panel__actions button {
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: #fff;
  cursor: pointer;
  font: inherit;
  padding: 8px 12px;
}

.project-view-page {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: auto;
  background: #fff;
  color: #111;
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.is-project-view-active .project-view-page {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  background-image: none;
}


.project-view-page.is-layout-loading {
  visibility: hidden;
  opacity: 0;
}

.project-view-page.is-layout-loading .project-view-item,
.project-view-page.is-layout-loading .project-view-item img {
  transition: none !important;
}

.project-view-toolbar {
  position: fixed;
  top: calc(var(--page-y) + 72px);
  left: var(--page-x);
  z-index: 10001;
  display: none;
  width: var(--nav-width);
}

body.is-admin-mode.is-project-view-active .project-view-toolbar:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

body.is-project-view-browsing .project-view-toolbar {
  display: none;
}

.project-view-edit,
.project-view-save,
.project-view-cancel,
.project-view-title-edit,
.project-view-upload,
.project-view-delete-project,
.project-view-title-form button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: #111;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
}

.project-view-delete-project {
  color: rgba(160, 20, 20, 0.72);
}

.project-view-title-form {
  display: grid;
  gap: 7px;
}

.project-view-title-form[hidden] {
  display: none;
}

.project-view-title-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(17, 17, 17, 0.22);
  background: #fff;
  padding: 7px 8px;
  font: inherit;
}

.project-view-cancel {
  color: rgba(17, 17, 17, 0.54);
}

.project-view-save[hidden],
.project-view-cancel[hidden] {
  display: none;
}

.project-view-canvas {
  position: relative;
  width: calc(100vw - var(--site-sidebar-width));
  min-width: calc(100vw - var(--site-sidebar-width));
  min-height: 100vh;
  margin: 0;
  margin-left: var(--site-sidebar-width);
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
  background: #fff;
  background-image: none;
}

.project-view-canvas[data-project-view-mode="view"] {
  background: #fff;
  background-image: none;
}

.project-view-canvas.has-project-view-layout,
.project-view-canvas[data-project-view-mode="edit"] {
  min-height: 100vh;
}

body.is-project-view-active .project-view-canvas[data-project-view-mode="edit"] {
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
}

.project-view-item {
  position: relative;
  display: block;
  width: min(100%, 920px);
  margin: 0 auto var(--project-view-gap, 96px);
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0;
  border: 0;
  overflow: visible;
}

.project-view-item::before,
.project-view-item::after {
  content: none !important;
  display: none !important;
}

.project-view-item:nth-child(3n + 1) {
  width: min(100%, 980px);
}

.project-view-item:nth-child(3n + 2) {
  width: min(82%, 760px);
}

.project-view-item:nth-child(3n + 3) {
  width: min(92%, 860px);
}

.project-view-canvas.has-project-view-layout .project-view-item,
.project-view-canvas[data-project-view-mode="edit"] .project-view-item {
  position: absolute;
  margin: 0;
  box-sizing: border-box;
  transform: none;
}

.project-view-canvas[data-project-view-mode="edit"] .project-view-item {
  touch-action: none;
  user-select: none;
  box-sizing: border-box;
  outline: 1px solid rgba(0, 0, 0, 0.18);
  outline-offset: 3px;
}

.project-view-item.is-dragging,
.project-view-item.is-resizing {
  z-index: 20;
}

.project-view-item__hide {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 50;
  display: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(17, 17, 17, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

body.is-admin-mode #projectViewCanvas[data-project-view-mode="edit"] .project-view-item__hide {
  display: inline-flex;
}

.project-view-item__hide:hover,
.project-view-item__hide:focus-visible {
  background: #111;
  color: #fff;
}

.project-view-item__media {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.project-view-item__media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: contain;
  margin: 0;
  padding: 0;
  border: 0;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(1);
  transform-origin: center;
  transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {
  #projectViewCanvas[data-project-view-mode="view"]
    .project-view-item:hover
    .project-view-item__media img {
    transform: scale(1.02);
  }
}

#projectViewCanvas[data-project-view-mode="edit"] .project-view-item__media img {
  transform: scale(1);
  transition: none;
}

.content-admin-status {
  min-height: 1.3em;
  margin: 4px 0 0;
  color: rgba(17, 17, 17, 0.58);
  font-size: 11px;
  line-height: 1.35;
}

.content-admin-status[data-state="error"] {
  color: #a01818;
}

.content-admin-status[data-state="success"] {
  color: #276533;
}

.content-admin-modal {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: grid;
  place-items: center;
}

.content-admin-modal[hidden] {
  display: none;
}

.content-admin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.82);
}

.content-admin-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 40px));
  box-sizing: border-box;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: #fff;
  padding: 28px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.12);
}

.content-admin-modal__panel h2 {
  margin: 0 0 20px;
  font-size: 18px;
}

.content-admin-modal__panel label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  font-size: 12px;
}

.content-admin-modal__panel input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(17, 17, 17, 0.2);
  padding: 9px;
  font: inherit;
}

.content-admin-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
}

.content-admin-modal__actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.content-admin-modal__actions button {
  border: 1px solid rgba(17, 17, 17, 0.2);
  background: #fff;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
}

.project-view-canvas.has-project-view-layout .project-view-item img,
.project-view-canvas[data-project-view-mode="edit"] .project-view-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  margin: 0;
  padding: 0;
  border: 0;
}

.project-view-empty {
  display: grid;
  min-height: 50vh;
  place-items: center;
  color: rgba(17, 17, 17, 0.5);
  font-size: 13px;
  text-align: center;
}

.project-view-browser {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 72px;
  background: #fff;
  color: #111;
  overflow: hidden;
}

.project-view-browser[hidden] {
  display: none !important;
}

.project-view-browser__stage {
  position: relative;
  width: 100vw;
  min-height: 0;
  overflow: hidden;
}

.project-view-browser__track {
  --browser-slide-width: min(60vw, 1100px);
  --browser-gap: 2vw;
  --browser-motion-duration: 900ms;
  --browser-motion-easing: cubic-bezier(0.22, 1, 0.36, 1);

  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  display: flex;
  align-items: center;
  gap: var(--browser-gap);
  height: calc(100% - 48px);
  transform: translateX(var(--track-rest-x, 0px));
  transition: transform var(--browser-motion-duration) var(--browser-motion-easing);
  will-change: transform;
  pointer-events: none;
}

.project-view-browser__slide {
  flex: 0 0 var(--browser-slide-width);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--browser-slide-width);
  height: 100%;
  overflow: hidden;
}

.project-view-browser__slide--far-prev,
.project-view-browser__slide--prev,
.project-view-browser__slide--current,
.project-view-browser__slide--next,
.project-view-browser__slide--far-next {
  width: var(--browser-slide-width);
}

.project-view-browser__slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  transform: none;
  transition: none;
  user-select: none;
  -webkit-user-drag: none;
}

.project-view-browser__track.is-resetting {
  transition: none !important;
}

.project-view-browser__caption-area {
  position: relative;
  z-index: 20004;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 12px 24px 18px;
  box-sizing: border-box;
  background: #fff;
  color: #111;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: center;
}

.project-view-browser__caption-area div {
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #111;
}

.project-view-browser__arrow,
.project-view-browser__close {
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1;
}

.project-view-browser__back {
  position: fixed;
  top: 22px;
  left: 24px;
  z-index: 20020;
  border: 0;
  background: transparent;
  color: #111;
  padding: 8px;
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.is-project-view-browsing .site-back-button {
  display: none;
}

.project-view-browser__arrow {
  position: fixed;
  top: 0;
  bottom: 72px;
  z-index: 20005;
  width: 12vw;
  min-height: 0;
  padding: 0;
  font-size: clamp(28px, 4vw, 54px);
  opacity: 0.5;
  pointer-events: auto;
  transition: opacity 180ms ease;
}

.project-view-browser__arrow:hover,
.project-view-browser__arrow:focus-visible,
.project-view-browser__close:hover,
.project-view-browser__close:focus-visible {
  opacity: 1;
}

.project-view-browser__arrow:disabled {
  cursor: default;
  opacity: 0;
  pointer-events: none;
}

.project-view-browser__arrow--prev {
  left: 0;
}

.project-view-browser__arrow--next {
  right: 0;
}

.project-view-browser__close {
  position: fixed;
  top: var(--page-y);
  right: var(--page-x);
  z-index: 20010;
  padding: 0;
  font-size: 28px;
  opacity: 0.54;
  transition: opacity 180ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .project-view-browser__stage,
  .project-view-browser__track,
  .project-view-browser__slide,
  .project-view-browser__slide img {
    animation: none !important;
    transition: none !important;
  }
}

.still-life-page {
  display: none;
  min-height: 100vh;
  background: #fff;
  color: #111;
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.is-still-life-active .still-life-page {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: block;
  overflow-y: auto;
  background: #fff;
  color: #111;
}

.still-life-page__inner {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px 80px calc(var(--nav-width) + var(--page-x) + 72px);
  gap: 14px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.still-life-page__inner p {
  margin: 0;
}

.still-life-page__inner p:first-child {
  font-size: clamp(18px, 1.8vw, 26px);
}

.info-page {
  display: none;
  min-height: 100vh;
  padding: 48px 64px 80px calc(var(--nav-width) + var(--page-x) + 72px);
  background: #fff;
  color: #111;
  font-family: "PingFang SC", "PingFang TC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.is-info-active .info-page {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: block;
  overflow-y: auto;
}

.info-page__panel {
  width: min(980px, 100%);
  min-height: 86vh;
  padding: 44px 56px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: #fff;
}

.info-page__columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 72px;
}

.info-page__column h2 {
  margin: 0 0 28px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.info-page__column p,
.info-page__column a,
.info-page__bio p {
  margin: 0;
  color: #111;
  font-size: 13px;
  line-height: 1.55;
  text-decoration: none;
}

.info-page__column a {
  overflow-wrap: anywhere;
}

.info-page__column a:hover {
  text-decoration: underline;
}

.info-page__social-links {
  display: flex;
  margin-top: 4px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 22px clamp(20px, 3vw, 32px);
}

.info-page__social-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: max-content;
  min-height: 44px;
  gap: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.info-page__social-link img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  transform: translateY(0);
  transition: transform 0.2s ease;
}

.info-page__social-name {
  color: #111;
  font-size: 13px;
  line-height: 1.4;
}

.info-page__social-action {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: rgba(17, 17, 17, 0.58);
  font-size: 11px;
  line-height: 1.4;
}

.info-page__social-arrow {
  display: inline-block;
  transform: translate(0, 0);
  transition: transform 0.2s ease;
}

.info-page__social-link:hover,
.info-page__social-link:focus-visible {
  opacity: 0.76;
  text-decoration: none;
}

.info-page__social-link:hover img,
.info-page__social-link:focus-visible img {
  transform: translateY(-3px);
}

.info-page__social-link:hover .info-page__social-arrow,
.info-page__social-link:focus-visible .info-page__social-arrow {
  transform: translate(2px, -2px);
}

.info-page__social-link:focus-visible {
  outline: 1px solid #111;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .info-page__social-link,
  .info-page__social-link img,
  .info-page__social-arrow {
    transition: none;
  }

  .info-page__social-link:hover img,
  .info-page__social-link:focus-visible img,
  .info-page__social-link:hover .info-page__social-arrow,
  .info-page__social-link:focus-visible .info-page__social-arrow {
    transform: none;
  }
}

.info-page__bio {
  max-width: 660px;
  margin-top: 72px;
}

.info-page__bio p + p {
  margin-top: 26px;
}

.info-page__qr {
  width: 280px;
  margin: 64px 0 0;
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: none;
}

.info-page__qr img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.info-page__qr figcaption {
  margin-top: 12px;
  color: rgba(17, 17, 17, 0.58);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes feedFadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feed-project,
  .feed-project__button img {
    animation: none;
    opacity: 1;
    transition: none;
  }
}

.project-modal,
.download-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.project-modal,
.project-modal.is-open {
  display: none !important;
}

.project-modal.is-open,
.download-modal.is-open {
  display: block;
}

.project-modal__backdrop,
.download-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.project-modal__content {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  padding: 28px;
  overflow-y: auto;
  background: #fff;
}

.project-modal__close,
.download-form__close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.project-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.project-modal__header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.project-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.project-modal__layout-btn,
.project-download-btn,
.download-form button[type="submit"] {
  border: 1px solid #050505;
  background: #050505;
  color: #fff;
  padding: 10px 18px;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.project-modal__layout-btn[hidden] {
  display: none;
}

.project-modal__layout-btn:hover,
.project-download-btn:hover,
.download-form button[type="submit"]:hover {
  background: #fff;
  color: #050505;
}

.project-modal__grid {
  position: relative;
}

.project-modal__grid[data-modal-board-mode="view"] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--project-modal-collage-gap, 28px);
  align-items: flex-start;
  justify-content: center;
  min-height: 70vh;
}

.project-modal__grid[data-modal-board-mode="edit"] {
  display: block;
  min-height: 220vh;
}

.project-modal__grid.has-modal-layout {
  display: block;
}

.project-modal__image-item {
  margin: 0;
  box-sizing: border-box;
}

.project-modal__grid[data-modal-board-mode="view"] .project-modal__image-item:nth-child(3n + 1) {
  width: min(62vw, 720px);
}

.project-modal__grid[data-modal-board-mode="view"] .project-modal__image-item:nth-child(3n + 2) {
  width: min(42vw, 460px);
}

.project-modal__grid[data-modal-board-mode="view"] .project-modal__image-item:nth-child(3n) {
  width: min(34vw, 360px);
}

.project-modal__grid.has-modal-layout .project-modal__image-item,
.project-modal__grid[data-modal-board-mode="edit"] .project-modal__image-item {
  position: absolute;
  margin: 0;
}

.project-modal__grid[data-modal-board-mode="edit"] .project-modal__image-item {
  touch-action: none;
  user-select: none;
  box-sizing: border-box;
  outline: 1px solid rgba(17, 17, 17, 0.32);
  outline-offset: 3px;
}

.project-modal__image-item.is-dragging,
.project-modal__image-item.is-resizing {
  z-index: 20;
}

.project-modal__image-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f4f4f4;
  user-select: none;
  -webkit-user-drag: none;
}

.project-modal__grid.has-modal-layout .project-modal__image-item img,
.project-modal__grid[data-modal-board-mode="edit"] .project-modal__image-item img {
  height: 100%;
}

.download-form {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 40px));
  margin: 12vh auto 0;
  padding: 28px;
  background: #fff;
}

.download-form h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.download-form p {
  margin: 0 0 22px;
  color: var(--muted);
}

.download-form label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.download-form input,
.download-form textarea {
  width: 100%;
  border: 1px solid #ddd;
  padding: 10px;
  font-family: inherit;
  font-size: 12px;
}

.download-form input:focus,
.download-form textarea:focus {
  outline: 1px solid #050505;
  border-color: #050505;
}

.download-form button[type="submit"] {
  width: 100%;
  margin-top: 6px;
}

@media (max-width: 820px) {
  body {
    font-size: 12px;
  }

  .site-header {
    position: fixed;
    width: auto;
    right: var(--page-x);
  }

  .site-title {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .site-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .project-feed-page {
    padding-top: 120px;
  }

  .project-feed {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .project-section {
    grid-template-columns: 1fr;
    row-gap: 56px;
    min-height: auto;
    margin-bottom: 90px;
  }

  .project-section .feed-project {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    margin-top: 0 !important;
  }

  .feed-project__button img {
    max-height: none;
  }

  .site-corner-meta {
    position: static;
    width: auto;
    padding: 32px 20px;
  }

  .projects-index {
    width: 100%;
    margin: 100px auto 120px;
    padding: 0 20px;
  }

  .category-toolbar {
    top: 72px;
    left: 20px;
    width: auto;
  }

  .category-board {
    min-height: 320vh;
    margin-left: 0;
    padding: 120px 20px 120px;
  }

  .projects-index__item {
    width: 100%;
  }

  .project-detail-canvas {
    width: 100%;
    margin: 100px auto 120px;
    padding-left: 0;
    padding-right: 0;
  }

  .project-detail-canvas.has-project-detail-layout,
  body.is-project-detail-editing .project-detail-canvas {
    min-height: 3600px;
  }

  .project-detail-block {
    position: relative;
    width: 100%;
    height: auto;
    margin: 0 auto var(--project-detail-gap);
  }

  .project-editor-panel {
    top: auto;
    right: 20px;
    bottom: 20px;
    width: min(320px, calc(100vw - 40px));
  }

  .info-page {
    padding: 120px 20px 80px;
  }

  .still-life-page__inner {
    padding: 120px 20px 80px;
  }

  .info-page__panel {
    width: 100%;
    min-height: auto;
    padding: 28px 24px;
  }

  .info-page__columns {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .info-page__bio {
    margin-top: 48px;
  }

  .info-page__qr {
    width: min(100%, 300px);
  }

  .project-view-canvas {
    width: 100%;
    margin: 100px auto 120px;
    padding: 0 20px;
  }

  .project-view-item,
  .project-view-item:nth-child(3n + 1),
  .project-view-item:nth-child(3n + 2),
  .project-view-item:nth-child(3n + 3) {
    width: 100%;
  }

  .project-view-browser {
    grid-template-columns: 54px minmax(0, 1fr) 54px;
  }

  .project-view-browser__track {
    --browser-slide-width: 78vw;
    --browser-gap: 4vw;
    top: 32px;
    bottom: 32px;
    height: calc(100% - 64px);
  }

  .project-view-browser__slide img {
    max-height: 78vh;
  }

  .project-view-browser__arrow {
    font-size: 30px;
  }

  .project-modal__content {
    width: calc(100vw - 24px);
    padding: 20px;
  }

  .project-modal__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-modal__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  :root {
    --page-x: 16px;
    --page-y: 16px;
  }

  .site-nav {
    gap: 14px;
  }

  .project-feed-page {
    min-height: 100svh;
    padding-top: 120px;
  }
}
html.is-language-loading [data-en][data-cn] {
  visibility: hidden;
}

/* Theme control */
.theme-control {
  position: fixed;
  top: var(--page-y);
  right: var(--page-x);
  z-index: 15000;
  color: var(--primary-text);
}

.theme-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--overlay-background);
  color: var(--icon-color);
  box-shadow: 0 6px 24px var(--shadow-color);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, opacity 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.theme-control.is-open .theme-toggle {
  background: var(--surface-elevated);
  opacity: 0.72;
}

.theme-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.theme-toggle__icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.theme-toggle__icon::after {
  content: "";
  position: absolute;
  inset: -1px -1px -1px 50%;
  background: currentColor;
}

.theme-menu {
  position: absolute;
  top: 40px;
  right: 0;
  width: min(210px, calc(100vw - (2 * var(--page-x))));
  max-height: calc(100vh - var(--page-y) - 52px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-color);
  background: var(--overlay-background);
  box-shadow: 0 18px 60px var(--shadow-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.theme-menu[hidden] {
  display: none;
}

.theme-menu__title {
  margin: 5px 8px 7px;
  color: var(--muted-text);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-option {
  display: grid;
  width: 100%;
  min-height: 34px;
  grid-template-columns: 14px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  background: transparent;
  color: var(--secondary-text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.theme-option:hover,
.theme-option:focus-visible {
  background: var(--surface-elevated);
  color: var(--primary-text);
  outline: none;
}

.theme-option.is-selected {
  background: var(--surface-elevated);
  color: var(--primary-text);
  font-weight: 600;
}

.theme-option__check {
  justify-self: end;
  opacity: 0;
  font-size: 11px;
}

.theme-option.is-selected .theme-option__check {
  opacity: 0.72;
}

.theme-swatch {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(127, 127, 127, 0.38);
  border-radius: 2px;
  background: #ffffff;
}

.theme-swatch--system {
  background: linear-gradient(90deg, #ffffff 0 50%, #121212 50% 100%);
}

.theme-swatch--light { background: #ffffff; }
.theme-swatch--charcoal { background: #121212; }

body.is-admin-route:not(.is-admin-authenticated) .theme-control,
body.is-project-view-browsing .theme-control {
  display: none;
}

/* Shared theme surfaces and text */
html,
body,
.project-feed-page,
.category-page,
.favorites-page,
.projects-page,
.project-detail-page,
.favorites-feed,
.category-board,
.project-view-page,
body.is-project-view-active .project-view-page,
.project-view-canvas,
.project-view-canvas[data-project-view-mode="view"],
.still-life-page,
body.is-still-life-active .still-life-page,
.info-page {
  background-color: var(--page-background);
  color: var(--primary-text);
}

.site-back-button,
.site-title,
.site-nav a,
.lang-toggle:hover,
.edit-mode-toggle,
.new-project-toggle,
.layout-cancel-toggle:hover,
.site-admin-controls button,
.favorites-admin-controls button,
.category-edit-toggle,
.category-save-toggle,
.category-project__button,
.projects-index__button,
.projects-index__caption,
.project-detail-block--text,
.project-text-block,
.project-view-edit,
.project-view-save,
.project-view-title-edit,
.project-view-upload,
.project-view-title-form button,
.project-upload-panel label,
.info-page__column p,
.info-page__column a,
.info-page__bio p,
.info-page__social-name,
.project-modal__close,
.download-form__close,
.content-admin-modal__close,
.project-upload-panel__close {
  color: var(--primary-text);
}

.lang-toggle,
.layout-cancel-toggle,
.category-cancel-toggle,
.project-view-cancel,
.site-corner-meta,
.site-copyright,
.site-copyright p,
.site-year-copyright,
.site-corner-meta a,
.content-admin-status,
.project-selected-panel,
.project-upload-panel__note,
.project-view-empty,
.project-detail-block__missing,
.project-detail-empty,
.category-project.is-missing .category-project__button,
.info-page__social-action,
.info-page__qr figcaption,
.download-form p {
  color: var(--muted-text);
}

.site-corner-meta a:hover,
.site-corner-meta a:focus-visible {
  color: var(--secondary-text);
}

.admin-login-view {
  background: var(--page-background);
  color: var(--primary-text);
}

.admin-login-card,
.content-admin-modal__panel,
.project-upload-panel__form,
.project-modal__content,
.download-form,
.info-page__panel {
  border-color: var(--border-color);
  background: var(--surface-background);
  color: var(--primary-text);
  box-shadow: 0 18px 70px var(--shadow-color);
}

.admin-login-card__eyebrow {
  color: var(--secondary-text);
}

.admin-login-card input,
.content-admin-modal__panel input,
.project-selected-panel select,
.project-selected-panel input,
.project-selected-panel textarea,
.project-upload-panel input,
.project-upload-panel textarea,
.project-upload-panel select,
.project-view-title-form input,
.download-form input,
.download-form textarea {
  border-color: var(--border-color);
  background: var(--surface-background);
  color: var(--primary-text);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-text);
  opacity: 1;
}

input:focus,
textarea:focus,
select:focus,
.admin-login-card input:focus,
.download-form input:focus,
.download-form textarea:focus {
  border-color: var(--secondary-text);
  outline: 1px solid var(--secondary-text);
  outline-offset: 1px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--primary-text);
  box-shadow: 0 0 0 1000px var(--surface-background) inset;
  caret-color: var(--primary-text);
}

.admin-login-submit,
.project-modal__layout-btn,
.project-download-btn,
.download-form button[type="submit"] {
  border-color: var(--primary-text);
  background: var(--primary-text);
  color: var(--page-background);
}

.admin-login-return,
.content-admin-modal__actions button,
.project-upload-panel__actions button,
.editor-tool,
.project-editor-panel__section > button,
.project-selected-panel button {
  border-color: var(--border-color);
  background: var(--surface-background);
  color: var(--primary-text);
}

.project-modal__layout-btn:hover,
.project-download-btn:hover,
.download-form button[type="submit"]:hover {
  background: var(--surface-background);
  color: var(--primary-text);
}

.project-editor-panel {
  border-color: var(--border-color);
  background: var(--surface-elevated);
  color: var(--primary-text);
  box-shadow: 0 8px 30px var(--shadow-color);
}

.project-editor-panel h3 {
  color: var(--primary-text);
}

.project-upload-panel,
.content-admin-modal__backdrop {
  background: var(--scrim-background);
}

.project-modal__backdrop,
.download-modal__backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.feed-project__delete,
.feed-project__replace,
.project-detail-block__delete,
.project-view-item__hide {
  border-color: var(--border-color);
  background: var(--overlay-background);
  color: var(--primary-text);
}

.feed-project__delete:hover,
.feed-project__delete:focus-visible,
.feed-project__replace:hover,
.feed-project__replace:focus-visible,
.project-view-item__hide:hover,
.project-view-item__hide:focus-visible {
  background: var(--primary-text);
  color: var(--page-background);
}

.layout-resize-handle {
  border-color: var(--primary-text);
  background: var(--surface-background);
}

.project-feed.is-editing,
.favorites-feed[data-board-mode="edit"],
.category-board[data-board-mode="edit"],
body.is-project-detail-editing .project-detail-canvas,
body.is-project-view-active .project-view-canvas[data-project-view-mode="edit"] {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
}

.project-feed.is-editing .feed-project,
.favorites-feed[data-board-mode="edit"] .favorite-project,
.category-board[data-board-mode="edit"] .category-project,
body.is-project-detail-editing .project-detail-block,
.project-view-canvas[data-project-view-mode="edit"] .project-view-item {
  outline-color: var(--border-color);
}

.is-multi-selected,
body.is-project-detail-editing .project-detail-block.is-selected {
  outline-color: var(--selection-color) !important;
}

.layout-marquee-selection {
  border-color: var(--selection-color);
  background: color-mix(in srgb, var(--selection-color) 12%, transparent);
}

.category-project.is-missing,
.project-detail-block__missing,
.project-detail-empty {
  border-color: var(--border-color);
  background: var(--surface-elevated);
}

.project-photo-grid--contain img,
.project-modal__image-item img {
  background: var(--surface-elevated);
}

.project-view-browser,
.project-view-browser__caption-area {
  background: var(--page-background);
  color: var(--primary-text);
}

body.is-automotive-active .category-page--automotive,
body.is-still-life-active .category-page--still-life,
body.is-projects-active .projects-page,
body.is-project-detail-active .project-detail-page,
body.is-favorites-active .favorites-page {
  background: var(--page-background);
  color: var(--primary-text);
}

.project-view-browser__caption-area div,
.project-view-browser__arrow,
.project-view-browser__close,
.project-view-browser__back {
  color: var(--icon-color);
}

.info-page__panel {
  box-shadow: none;
}

.info-page__social-link:focus-visible {
  outline-color: var(--primary-text);
}

.content-admin-status[data-state="error"],
.admin-login-status,
.project-view-delete-project {
  color: var(--danger-text);
}

.content-admin-status[data-state="success"] {
  color: var(--success-text);
}

html,
body,
.theme-toggle,
.theme-menu,
.theme-option,
.admin-login-view,
.admin-login-card,
.category-page,
.favorites-page,
.projects-page,
.project-detail-page,
.favorites-feed,
.category-board,
.project-view-page,
.project-view-canvas,
.project-view-browser,
.project-view-browser__caption-area,
.still-life-page,
.info-page,
.info-page__panel,
.content-admin-modal__panel,
.project-upload-panel__form,
.project-modal__content,
.download-form,
input,
textarea,
select {
  transition-property: background-color, color, border-color;
  transition-duration: 180ms;
  transition-timing-function: ease;
}

img,
video,
.feed-project__button img,
.project-view-item__media img,
.info-page__social-link img {
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  html,
  body,
  .theme-toggle,
  .theme-menu,
  .theme-option,
  .admin-login-view,
  .admin-login-card,
  .category-page,
  .favorites-page,
  .projects-page,
  .project-detail-page,
  .favorites-feed,
  .category-board,
  .project-view-page,
  .project-view-canvas,
  .project-view-browser,
  .project-view-browser__caption-area,
  .still-life-page,
  .info-page,
  .info-page__panel,
  .content-admin-modal__panel,
  .project-upload-panel__form,
  .project-modal__content,
  .download-form,
  input,
  textarea,
  select {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 820px) {
  .theme-control {
    top: var(--page-y);
    right: var(--page-x);
  }

  .theme-menu {
    width: min(210px, calc(100vw - 32px));
  }
}
