/* ==== css/gallery.css ==== */
/* 禁止浏览器/系统"自动深色模式"改写页面颜色（须声明在根元素上才生效，元素级无效） */
:root {
  color-scheme: light only;
}

.hidden {
  display: none;
}

/* 页面退出模糊过渡：全屏 backdrop-filter 覆盖层（不作用于 body，避免 fixed 元素在模糊期间错位改变布局） */
html.page-blur-out::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  animation: pageBlurOut 0.6s ease-in both;
}

@keyframes pageBlurOut {
  from {
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }

  to {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
}

/* 页面进入模糊过渡：从展厅"返回画廊"时先模糊后清晰（gallery.html 头部脚本添加类） */
html.page-blur-in::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  animation: pageBlurIn 1.1s ease-out both;
}

@keyframes pageBlurIn {
  from {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

  to {
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
}

.gallery {
  margin: auto;
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.banner {
  width: 94%;
  max-width: 1920px;
  margin: auto;
  margin-top: 2.5rem;
  position: relative;
  overflow: hidden;
  background: #f7f7f7;
  animation: bannerColorShift 20s ease infinite;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  text-align: left;
  color: #000;
  /* 禁止浏览器/系统深色模式改写 banner 的颜色（黑字浅底必须保持原样） */
  color-scheme: light only;
  box-sizing: border-box;
  transition: transform 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.banner-content {
  text-align: left;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 2rem;
}

.banner h1 {
  margin: auto 0;
  line-height: 2;
  color: inherit;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* 标题钉死黑色：!important + text-fill-color 双保险，任何深色模式/浏览器改色都不生效 */
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

.banner p {
  margin: auto 0;
  line-height: 1.5;
  color: inherit;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  white-space: normal;
  overflow: visible;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

/* 系统深色模式下也强制保持黑色（对抗 prefers-color-scheme 查询） */
@media (prefers-color-scheme: dark) {

  .banner h1,
  .banner p {
    color: #000 !important;
    -webkit-text-fill-color: #000 !important;
  }
}

.banner-button {
  z-index: 2;
  margin-top: 1rem;
  align-self: flex-start;
  padding: 0 2rem 2rem;
  box-sizing: border-box;
  width: 100%;
}

.banner-button button {
  background-color: #000;
  color: #f7f7f7;
  border: none;
  padding: 14px 48px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-button button:hover {
  transform: translateY(-2px);
}

.gallery-intro {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 85%;
  max-width: 1920px;
  color: #000;
  margin: auto;
  margin-top: 2.5rem;
}

.gallery-intro h1 {
  margin: auto 0;
  line-height: 2;
  color: #333333;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-intro p {
  margin: auto 0;
  line-height: 1.5;
  color: #555555;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  white-space: normal;
  overflow: visible;
}

/* gallery 筛选 header 布局（与 shop 完全一致） */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-container {
  position: relative;
}

/* ========== 搜索样式 ========== */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  z-index: 2;
  transition: transform 0.2s ease;
}

.search-btn:hover {
  transform: scale(0.88);
}

.search-btn:active {
  transform: scale(0.78);
}

.search-input-wrap {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition: width 0.3s ease, opacity 0.2s ease;
}

.search-container.active .search-input-wrap {
  width: 175px;
  opacity: 1;
  pointer-events: auto;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  padding: 0.4rem 0 0.4rem 0.75rem;
  color: #333;
  font-family: 'Open Sans', sans-serif;
  min-width: 0;
}

.search-clear-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #999;
  padding: 0.4rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  pointer-events: none;
}

.search-input-wrap.has-text .search-clear-btn {
  opacity: 1;
  pointer-events: auto;
}

.search-clear-btn:hover {
  color: #333;
}

/* ========== 搜索建议下拉 ========== */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: auto;
  right: 0;
  width: 230px;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: none;
}

.search-suggestions.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(6px);
}

.search-suggestion-item {
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
  color: #333;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #f5f5f5;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
  background: #f0f0f0;
}

.search-suggestion-item .highlight {
  color: #000;
  font-weight: 700;
}

.search-suggestion-item .suggestion-sub {
  font-size: 0.7rem;
  color: #999;
  margin-left: 0.4rem;
}

.search-suggestions::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  color: #000;
}

.filter-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.filter-icon {
  font-size: 1.2rem;
}

.filter-dropdown {
  position: fixed;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 220px;
  z-index: 2147483647;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.filter-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.filter-header {
  font-size: 0.8rem;
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-header span {
  font-weight: 600;
}

.close-filter {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
}

.filter-options {
  padding: 0.5rem 0;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-options::-webkit-scrollbar {
  display: none;
}

.filter-option {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
}

.filter-option-group {
  padding: 0.4rem 1rem;
  font-size: 0.65rem;
  color: #999;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.filter-option:hover {
  background: #f5f5f5;
}

.filter-option.active {
  background: #f0f0f0;
  font-weight: 600;
}

.filter-option.active::after {
  content: "×";
  color: #666;
  cursor: pointer;
  margin-left: 1rem;
}

.filter-option.active:hover::after {
  color: #333;
}

.no-results-msg {
  width: 96%;
  max-width: 1920px;
  margin: 2rem auto;
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.grid {
  width: 96%;
  max-width: 1920px;
  margin: 0 auto;
  margin-top: 3rem;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.grid-sizer,
.grid-item {
  width: 30%;
  box-sizing: border-box;
}

.grid-item {
  margin: 0 0 3% 2%;
  background: #f7f7f7;
  border-radius: 10px 10px 0 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}

.grid-item.is-loaded {
  aspect-ratio: auto;
}

.grid-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.grid-item.is-loaded::before {
  opacity: 0;
  pointer-events: none;
}

.grid-item img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* banner 纯色循环：8 种浅色（保证黑字可读），每色保持 10%，2.5% 过渡 */
@keyframes bannerColorShift {
  0% {
    background-color: #ffde59;
  }

  10% {
    background-color: #ffde59;
  }

  12.5% {
    background-color: #ffd6a5;
  }

  22.5% {
    background-color: #ffd6a5;
  }

  25% {
    background-color: #ffadad;
  }

  35% {
    background-color: #ffadad;
  }

  37.5% {
    background-color: #ffc6ff;
  }

  47.5% {
    background-color: #ffc6ff;
  }

  50% {
    background-color: #cdb4db;
  }

  60% {
    background-color: #cdb4db;
  }

  62.5% {
    background-color: #a0c4ff;
  }

  72.5% {
    background-color: #a0c4ff;
  }

  75% {
    background-color: #9bf6ff;
  }

  85% {
    background-color: #9bf6ff;
  }

  87.5% {
    background-color: #caffbf;
  }

  97.5% {
    background-color: #caffbf;
  }

  100% {
    background-color: #ffde59;
  }
}

.grid-placeholder {
  width: 100%;
  height: 50px;
}

.spacer {
  width: 100%;
  height: 50px;
  visibility: hidden;
}

#loader {
  position: fixed;
  /* 贴住底部：与 footer 底边对齐，留一点点呼吸 */
  bottom: 0;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  padding: 5px;
  z-index: 1000;
  width: 30%;
  border-radius: 10px 10px 0 0;
}

#loader span {
  display: flex;
  height: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  text-align: center;
  align-items: center;
  justify-content: center;
  color: #f7f7f7;
  animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

.grid-item {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.grid-item.is-loaded {
  opacity: 1;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.4s ease;
}

.modal-content {
  display: flex;
  background-color: #f7f7f7;
  width: 90%;
  max-width: 1920px;
  height: auto;
  max-height: 65vh;
  border-radius: 10px;
  overflow: auto;
  margin: 0 auto;
}

/* 自定义滚动条样式 */
.modal-content::-webkit-scrollbar,
.description::-webkit-scrollbar,
.modal-info::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track,
.description::-webkit-scrollbar-track,
.modal-info::-webkit-scrollbar-track {
  background: transparent;
  border-left: 1px solid #ddd;
}

.modal-content::-webkit-scrollbar-thumb,
.description::-webkit-scrollbar-thumb,
.modal-info::-webkit-scrollbar-thumb {
  background: #000;
  border-radius: 3px;
}

/* Firefox 滚动条样式 */
.modal-content,
.description,
.modal-info {
  scrollbar-width: thin;
  scrollbar-color: #000 transparent;
}

/* 弹窗信息栏隐藏滚动条（保留滚动） */
.modal-info::-webkit-scrollbar {
  display: none;
}

.modal-info {
  scrollbar-width: none;
}

/* 作品弹窗模糊过渡：打开从模糊变清晰，关闭从清晰变模糊 */
@keyframes modalBlurIn {
  from {
    opacity: 0;
    filter: blur(20px);
  }

  to {
    opacity: 1;
    filter: blur(0px);
  }
}

@keyframes modalBlurOut {
  from {
    opacity: 1;
    filter: blur(0px);
  }

  to {
    opacity: 0;
    filter: blur(20px);
  }
}

.modal.modal-anim-in {
  animation: modalBlurIn 0.55s ease-out both;
}

.modal.modal-anim-out {
  animation: modalBlurOut 0.4s ease-in both;
}

.description {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-height: 65vh;
  overflow-y: auto;
}

.description h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #333;
}

.description p {
  max-width: 90%;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: #555;
}

.description ol {
  margin: auto;
  align-items: left;
  font-size: 0.8rem;
  max-width: 80%;
  padding: 0;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  color: #555;
  display: flex;
  flex-direction: column;
}

.description li {
  line-height: 2;
  margin-bottom: 0.5rem;
  text-align: left;
}

.description button {
  background-color: #000000;
  color: #f7f7f7;
  border: none;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  margin: auto;
  cursor: pointer;
  border-radius: 10px;
  width: 40%;
  white-space: nowrap;
  margin-top: 0;
  margin-bottom: 3rem;
}

.modal-image-container {
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

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

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  will-change: transform;
}

/* 作品弹窗漫游缩放提示气泡 */
.artwork-drag-tip-bubble {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
  padding: 5px 14px;
  border-radius: 9999px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: none;
  opacity: 0;
  animation: tipBubbleFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.45s ease;
}

@keyframes tipBubbleFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 6px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.modal-info {
  width: 50%;
  height: auto;
  padding: 1rem;
  margin: 1rem auto;
  font-size: 1rem;
  line-height: 1;
  color: #333;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
}

.modal-info h2 {
  font-size: 1.5rem;
  line-height: 1.5;
  margin: 1rem auto;
  text-align: center;
  max-width: 90%;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.edition-badge {
  font-size: 0.65rem;
  font-weight: 400;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  background: #1a1a1a;
  color: #f7f7f7;
}

/* ========== 搜索无结果弹窗 ========== */
.search-no-result {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  min-height: 200px;
}

.search-no-result svg {
  margin-bottom: 1.5rem;
}

.search-no-result h2 {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.search-no-result-query {
  font-size: 0.9rem;
  color: #999;
}

.search-no-result-hint {
  font-size: 0.8rem;
  color: #bbb;
  margin-top: 0.5rem;
}

.buy-button {
  background-color: #000000;
  color: #f7f7f7;
  border: none;
  padding: 1rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  margin: auto;
  cursor: pointer;
  border-radius: 10px;
  width: 90%;
  white-space: nowrap;
}

.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 90%;
  margin: 0 auto;
  margin-top: 0.8rem;
  margin-bottom: 0.5rem;
}

.button-container p {
  text-align: center;
  color: #777;
  font-size: 0.7rem;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1.4;
}

.button-container p span {
  font-weight: 300;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  text-decoration-thickness: 0.8px;
  color: #777;
  cursor: pointer;
}

#purchaseForm select:invalid {
  font-style: italic;
  font-weight: 300;
  font-size: 0.7rem;
  color: #999;
}

#purchaseForm {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-item {
  width: 90%;
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  border-bottom: 1px solid #ccc;
}

#purchaseForm label {
  width: 100%;
  margin-bottom: 0.2rem;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  text-align: left;
}

.form-size {
  display: flex;
  justify-content: space-between;
}

.form-size span {
  font-size: 0.7rem;
  font-style: italic;
  width: 100%;
  text-align: right;
  color: #777;
  font-family: 'Open Sans', sans-serif;
}

.form-price {
  display: flex;
  align-items: flex-end;
  text-align: left;
  margin: 0.5rem 0;
}

.currency-symbol {
  font-size: 1rem;
  vertical-align: middle;
  color: #333;
}

.price-currency-label {
  font-size: 0.65rem;
  font-weight: 300;
  color: #999;
  margin-left: 0.3rem;
  margin-bottom: 0.3rem;
  align-self: flex-end;
}

#price-int {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  display: inline-block;
  animation: priceRollIn 0.4s ease-out both;
}

#price-dec {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  display: inline-block;
  animation: priceRollIn 0.4s ease-out 0.15s both;
}

@keyframes priceRollIn {
  0% {
    opacity: 0;
    transform: translateY(-12px) rotateX(90deg);
  }

  60% {
    opacity: 1;
    transform: translateY(2px) rotateX(-10deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

.price-disclaimer {
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
  font-weight: 300;
  margin: 0.15rem 0 0.5rem 0;
  line-height: 1.4;
  text-align: left;
}

#purchaseForm input,
textarea {
  width: 100%;
  outline: none;
  border: none;
  background: transparent;
  font-size: 1rem;
  line-height: 2rem;
  color: #333;
}

#purchaseForm select {
  width: 100%;
  outline: none;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

#purchaseForm input::placeholder,
textarea::placeholder {
  color: #bdbdbd;
  font-size: 0.8rem;
  font-weight: 300;
  font-style: italic;
  font-family: 'Open Sans', sans-serif;
}

#purchaseForm button[type="submit"] {
  background-color: #000000;
  color: #f7f7f7;
  border: none;
  padding: 1rem;
  text-align: center;
  display: inline-block;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 10px;
  width: 90%;
}

.gallery-content {
  order: 2;
  width: 100%;
}

.fade-slider {
  position: relative;
  width: 100%;
  max-width: 1920px;
  margin: 3rem auto;
  aspect-ratio: 3.2 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 10px;
}

@media screen and (max-width: 1920px) {
  .fade-slider {
    border-radius: 0px;
  }

}

.slider-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

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

.dots {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 3;
  height: 10%;
  max-width: 1200px;
}

.dot {
  width: 20vw;
  height: 0.2rem;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background 0.3s;
}

.dot.active {
  background: #000;
}

@media screen and (max-width: 960px) {
  .modal-content {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 90%;
    overflow: hidden;
    max-height: 80vh;
  }

  .modal-image-container {
    width: 100%;
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }

  .modal-image-container.purchase-form-image {
    height: 20vh;
  }

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

  .modal-info {
    width: calc(100% - 2rem);
    /* 移除 height 固定值 */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    /* 允许滚动 */
    margin: 0 1rem 1rem 1rem;
    text-align: center;
    max-height: 40vh;
  }

  .button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .buy-button {
    width: 80%;
    margin: 0.1rem 0;
    text-align: center;
  }

  .button-container p {
    margin: 0;
  }

  .banner {
    width: 90%;
    margin-top: 2.5rem;
  }

  .banner h1 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }

  .banner p {
    font-size: clamp(0.8rem, 3vw, 1rem);
  }

  .banner-button button {
    padding: 10px 40px;
    font-size: 12px;
  }

  .gallery-intro {
    width: 90%;
    margin-top: 2.5rem;
  }

  .gallery-intro h1 {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
  }

  .gallery-intro p {
    font-size: clamp(0.8rem, 3vw, 1rem);
  }

  .loader {
    top: 80%;
  }

  .dot {
    height: 0.1rem;
  }
}

@media screen and (max-width: 768px) {

  .grid-sizer,
  .grid-item {
    width: 46%;
  }

  #loader {
    width: 100%;
    left: 0;
    transform: translateY(-50%);
    border-radius: 0;
    background: #000;
  }

  @media (prefers-color-scheme: dark) {
    #loader {
      background: #000;
    }
  }
}

@media screen and (max-width: 480px) {

  .grid-sizer,
  .grid-item {
    width: 46%;
    border-radius: 8px 8px 0 0;
    margin-bottom: 6%;
  }

  .grid-item img {
    border-radius: 8px 8px 0 0;
  }

  .gallery {
    margin-top: 2rem;
  }

  /* 移动端搜索 */
  .header-actions {
    gap: 0.25rem;
  }

  .search-btn {
    padding: 0.35rem;
  }

  .search-btn svg {
    width: 16px;
    height: 16px;
  }

  .search-container.active .search-input-wrap {
    width: 130px;
  }

  .search-input {
    font-size: 0.8rem;
  }

  /* 移动端搜索建议 */
  .search-suggestions {
    width: 180px;
    max-height: 220px;
    left: auto;
    right: 0;
  }

  .search-suggestion-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .filter-dropdown {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -60%);
    width: min(300px, 85vw);
  }

  .filter-dropdown.show {
    transform: translate(-50%, -50%);
  }
}

/* 超小屏手机搜索优化 */
@media screen and (max-width: 380px) {
  .search-container.active .search-input-wrap {
    width: 110px;
  }

  .search-input {
    font-size: 0.75rem;
  }

  .search-suggestions {
    width: 150px;
  }
}

@media (prefers-color-scheme: dark) {

  .gallery-intro h1,
  .description h2,
  .modal-info h2 {
    color: #ddd;
  }

  .description p,
  .description ol,
  .gallery-intro p,
  .form-item span,
  #price-int,
  #price-dec {
    color: #bbb;
  }

  .grid-item,
  .modal-content {
    background: #2a2a2a;
  }

  .grid-item::before {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
  }

  .banner-button button {
    background-color: #000;
    color: #f7f7f7;
  }

  .banner-button button:hover {
    transform: translateY(-2px);
  }

  #loader {
    background: #333;
  }

  .modal {
    background: rgba(0, 0, 0, 0.8);
  }

  #purchaseForm label,
  #purchaseForm input,
  #purchaseForm select {
    color: #ddd;
  }

  #purchaseForm input,
  textarea::placeholder {
    color: #888;
  }

  .form-item {
    border-bottom: 1px solid #555;
  }

  .button-container p {
    color: #aaa;
  }

  .button-container p span {
    color: #aaa;
  }

  .modal-info {
    color: #ddd;
  }

  /* 搜索无结果弹窗暗色模式 */
  .search-no-result h2 {
    color: #bbb;
  }

  .search-no-result-query {
    color: #999;
  }

  .search-no-result-hint {
    color: #777;
  }

  .dot {
    background: rgba(255, 255, 255, 0.5);
  }

  .dot.active {
    background: #ddd;
  }

  /* 深色模式滚动条样式 */
  .modal-content::-webkit-scrollbar-track,
  .description::-webkit-scrollbar-track,
  .modal-info::-webkit-scrollbar-track {
    border-left: 1px solid #555;
  }

  .modal-content::-webkit-scrollbar-thumb,
  .description::-webkit-scrollbar-thumb,
  .modal-info::-webkit-scrollbar-thumb {
    background: #f7f7f7;
  }

  /* Firefox 深色模式滚动条 */
  .modal-content,
  .description,
  .modal-info {
    scrollbar-color: #f7f7f7 transparent;
  }

  /* 深色模式筛选样式 */
  .filter-btn {
    background: none;
    border: none;
    color: #f7f7f7;
  }

  .filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  /* 深色模式搜索样式 */
  .search-btn {
    color: #f7f7f7;
  }

  .search-input-wrap {
    background: #3a3a3a;
  }

  .search-input {
    color: #f7f7f7;
  }

  .search-input::placeholder {
    color: #888;
  }

  .search-clear-btn {
    color: #888;
  }

  .search-clear-btn:hover {
    color: #f7f7f7;
  }

  /* 深色模式搜索建议 */
  .search-suggestions {
    background: #2a2a2a;
    border-color: #444;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .search-suggestion-item {
    color: #ddd;
    border-bottom-color: #3a3a3a;
  }

  .search-suggestion-item:hover,
  .search-suggestion-item.active {
    background: #3a3a3a;
  }

  .search-suggestion-item .highlight {
    color: #fff;
  }

  .search-suggestion-item .suggestion-sub {
    color: #888;
  }

  .filter-dropdown {
    background: #333333;
    border: 1px solid #555555;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  }

  .filter-header {
    border-bottom: 1px solid #444444;
  }

  .filter-header span {
    color: #f7f7f7;
  }

  .close-filter {
    color: #aaa;
  }

  .filter-option {
    color: #f7f7f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    white-space: nowrap;
  }

  .filter-option:hover {
    background: #444444;
  }

  .filter-option.active {
    background: #444444;
  }

  .filter-option.active::after {
    color: #aaa;
    margin-left: 1rem;
  }

  .filter-option.active:hover::after {
    color: #f7f7f7;
  }

  .filter-option-group {
    color: #aaa;
  }
}

/* 数字展厅弹窗样式 */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background-color: #f7f7f7;
  width: 90%;
  max-width: 600px;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
}

.popup-content h2 {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #333;
}

.popup-content p {
  margin-bottom: 2rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #555;
}

@media (max-width: 480px) {
  .popup-content {
    width: 95%;
    padding: 1.5rem;
  }

  .popup-content h2 {
    font-size: 1.2rem;
  }

  .popup-content p {
    font-size: 0.9rem;
  }
}

@media (prefers-color-scheme: dark) {
  .popup-content {
    background: #2a2a2a;
  }

  .close-btn {
    color: #ddd;
  }

  .popup-content h2 {
    color: #ddd;
  }

  .popup-content p {
    color: #bbb;
  }
}

/* ==================== 1. 实景挂墙 (Room View) 样式 ==================== */
.room-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  background: #ebe9e4;
  user-select: none;
}

.room-wall-bg {
  position: relative;
  width: 100%;
  height: calc(100% - 50px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 25%, #f7f6f2 0%, #e6e3dc 70%, #d8d4cb 100%);
  overflow: hidden;
}

.room-gallery-light {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.room-frame-display {
  position: relative;
  max-width: 68%;
  max-height: 68%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

/* 极窄黑铝框 */
.room-frame-display.frame-black {
  border: 7px solid #141414;
  outline: 1px solid rgba(255, 255, 255, 0.1);
}

/* 原木白橡框 */
.room-frame-display.frame-oak {
  border: 9px solid #b8956e;
  outline: 1px solid rgba(0, 0, 0, 0.08);
}

/* 极简哑光白框 */
.room-frame-display.frame-white {
  border: 8px solid #f2f2f2;
  outline: 1px solid #d4d4d4;
}

/* 卡纸设置 */
.room-frame-mat {
  background: #ffffff;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: padding 0.3s ease;
  width: 100%;
  height: 100%;
}

.room-frame-display.with-mat .room-frame-mat {
  padding: 18px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.06);
}

.room-artwork-img {
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  display: block;
}

.room-floor-skirt {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 24px;
  background: linear-gradient(to bottom, #d2cdbe 0%, #c4bdae 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-scale-tag {
  font-size: 10px;
  font-weight: 500;
  color: #736d62;
  letter-spacing: 0.5px;
}

.room-frame-controls {
  width: 100%;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
}

.frame-style-group {
  display: flex;
  gap: 8px;
}

.frame-style-btn,
.frame-mat-toggle {
  background: #f2f2f2;
  border: 1px solid #e0e0e0;
  color: #333;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

.frame-style-btn.active,
.frame-mat-toggle.active {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* ==================== 2. 收藏认证与装裱工艺 (COA) 样式 ==================== */
.coa-modal-container {
  width: 90%;
  max-width: 680px;
  padding: 1.5rem 1rem;
  margin: 0 auto;
  text-align: left;
  animation: fadeIn 0.3s ease forwards;
}

.coa-header {
  text-align: center;
  margin-bottom: 24px;
}

.coa-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #777;
  border: 1px solid #ddd;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

.coa-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
  margin: 6px 0;
}

.coa-intro {
  font-size: 12px;
  line-height: 1.6;
  color: #666;
  max-width: 540px;
  margin: 0 auto;
}

.coa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.coa-item {
  display: flex;
  gap: 12px;
  background: #fafafa;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 14px;
  box-shadow: none !important;
}

.coa-item-number {
  font-size: 13px;
  font-weight: 700;
  color: #999;
  letter-spacing: 1px;
  min-width: 20px;
  line-height: 1.4;
}

.coa-item-content h3 {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px 0;
}

.coa-item-content p {
  font-size: 11px;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

.coa-footer-action {
  text-align: center;
}

.coa-return-btn {
  background: #000;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 32px;
  border-radius: 9999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
  box-shadow: none !important;
}

.coa-return-btn:hover {
  opacity: 0.85;
}

@media (max-width: 768px) {
  .coa-grid {
    grid-template-columns: 1fr;
  }
  .room-frame-display {
    max-width: 82%;
    max-height: 60%;
  }
}

/* ==== css/art.css ==== */
/* ==========================================================================
   art.css — IDMANOS ART 作品档案页新增样式
   仅承载卡片信息层（.artwork-caption），基础画廊样式沿用 css/gallery.css
   视觉原则：极简、留白、安静，不引入色块与装饰
   ========================================================================== */

/* 整张卡片可点击进入作品详情 */
.grid-item {
    cursor: pointer;
}

.grid-item:focus-visible {
    outline: 1px solid #1a1a1a;
    outline-offset: 3px;
}

/* 卡片信息层（图片加载完成后随卡片自然增高，不破坏瀑布流） */
.artwork-caption {
    position: relative;
    z-index: 2;
    padding: 0.9rem 1rem 1.05rem;
    text-align: left;
    /* 与 shop 产品卡信息区一致（.information：#fff），不用灰色底板 */
    background: #ffffff;
    color: #1a1a1a;
}

.artwork-caption-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.35;
    color: #1a1a1a;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.artwork-caption-meta {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.4;
    color: #8a8a8a;
    letter-spacing: 0.06em;
}

.artwork-caption-status {
    margin: 0.5rem 0 0;
    font-size: 0.66rem;
    font-weight: 400;
    line-height: 1.4;
    color: #6f6f6f;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.grid-item:hover .artwork-caption-title {
    opacity: 0.72;
}

@media (max-width: 768px) {
    .artwork-caption {
        padding: 0.75rem 0.8rem 0.9rem;
    }

    .artwork-caption-title {
        font-size: 0.88rem;
    }

    .artwork-caption-meta {
        font-size: 0.68rem;
    }

    .artwork-caption-status {
        font-size: 0.62rem;
    }
}

/* ==========================================================================
   作品详情页（artwork.html）
   01 大图 → 02 信息 → 03 描述 → 04 状态 → 05 CTA → 06 相关作品
   视觉原则：极简、留白、安静，不引入色块与装饰
   ========================================================================== */

.artwork-detail {
    max-width: 1440px;
    margin: 0 auto;
    padding: 8.5rem 6% 6rem;
    box-sizing: border-box;
}

.artwork-detail-head {
    margin-bottom: 2.5rem;
}

.artwork-back {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8a8a8a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.artwork-back:hover {
    color: #1a1a1a;
}

.artwork-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
    gap: 4.5rem;
    align-items: start;
}

/* 01 大图 */
.artwork-figure-frame {
    background: #f7f7f7;
    border-radius: 10px;
    overflow: hidden;
}

.artwork-figure-frame img {
    display: block;
    width: 100%;
    height: auto;
}

/* 02 信息面板 */
.artwork-panel {
    position: sticky;
    top: 7.5rem;
}

.artwork-heading h1 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
    color: #1a1a1a;
}

.artwork-subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: #8a8a8a;
    letter-spacing: 0.02em;
}

.artwork-meta {
    margin: 2.5rem 0 0;
    padding: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.artwork-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.artwork-meta dt {
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.artwork-meta dd {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #1a1a1a;
    text-align: right;
}

/* 03 描述 */
.artwork-description-block {
    margin-top: 2.5rem;
}

.artwork-about {
    margin: 0 0 0.9rem;
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.artwork-description {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.8;
    color: #4a4a4a;
}

/* 04 状态 */
.artwork-availability {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding: 0.95rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.artwork-availability-label {
    font-size: 0.66rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.artwork-availability-value {
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1a1a1a;
}

/* 05 CTA */
.artwork-cta {
    display: flex;
    margin-top: 2.5rem;
}

.artwork-cta-btn {
    width: 100%;
    padding: 1.05rem 2rem;
    background: #000;
    color: #f7f7f7;
    border: none;
    border-radius: 25px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.artwork-cta-btn:hover {
    transform: translateY(-2px);
}

.artwork-cta-btn:focus-visible {
    outline: 1px solid #1a1a1a;
    outline-offset: 3px;
}

/* 06 相关作品 */
.artwork-related {
    margin-top: 7rem;
}

#related-title {
    margin: 0 0 1.8rem;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #9a9a9a;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.related-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-item-frame {
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.related-item-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.3s ease;
}

.related-item:hover .related-item-frame img {
    transform: scale(1.03);
    opacity: 0.88;
}

.related-item-caption {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.85rem 0 0;
}

.related-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.related-item:hover .related-item-title {
    opacity: 0.72;
}

.related-item-meta {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: #8a8a8a;
}

/* 未找到作品 */
.artwork-not-found {
    max-width: 1440px;
    margin: 0 auto;
    padding: 12rem 6% 8rem;
    text-align: center;
}

.artwork-not-found p {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    color: #4a4a4a;
}

.artwork-not-found a {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #8a8a8a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.artwork-not-found a:hover {
    color: #1a1a1a;
}

/* 系统深色模式：与全站暗色语言一致（否则卡片/详情页文字在深色下不可见） */
@media (prefers-color-scheme: dark) {
    .grid-item:focus-visible {
        outline-color: #e5e5e5;
    }

    /* 夜间模式：与 shop 产品卡信息区一致（.information：#333333） */
    .artwork-caption {
        background: #333333 !important;
        color: #f2f2f2 !important;
    }

    .artwork-caption-title {
        color: #f2f2f2 !important;
    }

    .artwork-caption-meta {
        color: #8a8a8a;
    }

    .artwork-caption-status {
        color: #9a9a9a;
    }

    .artwork-back {
        color: #8a8a8a;
    }

    .artwork-back:hover {
        color: #e5e5e5;
    }

    .artwork-figure-frame {
        background: #2a2a2a;
    }

    .artwork-heading h1 {
        color: #e5e5e5;
    }

    .artwork-subtitle {
        color: #8a8a8a;
    }

    .artwork-meta {
        border-top-color: rgba(255, 255, 255, 0.10);
    }

    .artwork-meta-row {
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .artwork-meta dt {
        color: #9a9a9a;
    }

    .artwork-meta dd {
        color: #e5e5e5;
    }

    .artwork-about {
        color: #9a9a9a;
    }

    .artwork-description {
        color: #bbb;
    }

    .artwork-availability {
        border-top-color: rgba(255, 255, 255, 0.10);
        border-bottom-color: rgba(255, 255, 255, 0.10);
    }

    .artwork-availability-label {
        color: #9a9a9a;
    }

    .artwork-availability-value {
        color: #e5e5e5;
    }

    .artwork-cta-btn:focus-visible {
        outline-color: #e5e5e5;
    }

    #related-title {
        color: #9a9a9a;
    }

    .related-item-frame {
        background: #2a2a2a;
    }

    .related-item-title {
        color: #e5e5e5;
    }

    .related-item-meta {
        color: #8a8a8a;
    }

    .artwork-not-found p {
        color: #bbb;
    }

    .artwork-not-found a {
        color: #8a8a8a;
    }

    .artwork-not-found a:hover {
        color: #e5e5e5;
    }
}

@media (max-width: 1024px) {
    .artwork-detail-body {
        gap: 3rem;
    }

    .related-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .artwork-detail {
        padding: 6.5rem 5% 5rem;
    }

    .artwork-detail-head {
        margin-bottom: 1.8rem;
    }

    .artwork-detail-body {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .artwork-panel {
        position: static;
        top: auto;
    }

    .artwork-meta {
        margin-top: 2rem;
    }

    .artwork-related {
        margin-top: 4.5rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }

    .artwork-not-found {
        padding: 9rem 5% 6rem;
    }
}

/* ===== 卡片信息行：标题 + 爱心点赞 ===== */
.artwork-caption-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.artwork-caption-row .artwork-caption-title {
    flex: 1 1 auto;
    min-width: 0;
}

.artwork-like {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    appearance: none;
    border: 0;
    background: none;
    padding: 2px 0;
    font: inherit;
    font-size: .72rem;
    line-height: 1;
    color: #8a8a8a;
    cursor: pointer;
    transition: color .2s ease, transform .12s ease;
}

.artwork-like svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    transition: fill .2s ease, stroke .2s ease;
}

.artwork-like:hover { color: #e0245e; }
.artwork-like:active { transform: scale(.9); }

.artwork-like.on { color: #e0245e; }
.artwork-like.on svg { fill: #e0245e; stroke: #e0245e; }

.artwork-like-count {
    min-width: 0;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

@media (max-width: 768px) {
    .artwork-like svg { width: 14px; height: 14px; }
}

@media (prefers-color-scheme: dark) {
    .artwork-like { color: #9a9a9a; }
    .artwork-like:hover { color: #ff6b9d; }
    .artwork-like.on { color: #ff6b9d; }
    .artwork-like.on svg { fill: #ff6b9d; stroke: #ff6b9d; }
}

/* 详情页：标题行 + 爱心 */
.artwork-heading-row {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}

.artwork-heading-row h1 {
    flex: 1 1 auto;
    min-width: 0;
}

.artwork-heading-row .artwork-like {
    font-size: .82rem;
    gap: 6px;
}

.artwork-heading-row .artwork-like svg {
    width: 18px;
    height: 18px;
}

/* 标题上方：年份 · 系列 —— 与 shop 产品卡的 .series 同款 */
.artwork-caption-eyebrow {
    margin: 0 0 0.15rem 0;
    font-size: 0.6rem;
    font-weight: 400;
    line-height: 1.4;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    white-space: normal;
    word-break: break-word;
}

@media (prefers-color-scheme: dark) {
    .artwork-caption-eyebrow {
        color: #aaaaaa;
    }
}

/* 文字块尺寸与 shop 产品卡信息区对齐（.information / .series / h2 的同一套断点） */
.artwork-caption {
    padding: 1rem;
}

.artwork-caption-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 767px) {
    .artwork-caption {
        padding: 0.5rem;
    }
    .artwork-caption-title {
        font-size: 0.8rem;
    }
    .artwork-caption-eyebrow {
        font-size: 0.6rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .artwork-caption {
        padding: 0.8rem;
    }
    .artwork-caption-title {
        font-size: 0.85rem;
    }
    .artwork-caption-eyebrow {
        font-size: 0.6rem;
    }
}

/* 中文标题字面比英文更重、更占宽，单独收一点字号 */
.artwork-caption-title.is-cjk {
    font-size: 0.94rem;
    letter-spacing: 0.01em;
}

@media (max-width: 767px) {
    .artwork-caption-title.is-cjk {
        font-size: 0.75rem;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .artwork-caption-title.is-cjk {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   卡片圆角与信息区高度：完全对齐 shop 的 .product / .information
   shop 实测：radius 10px（四角）；信息区高度 手机 71 / 平板 82 / 桌面 96
   ========================================================================== */
.grid .grid-item {
    border-radius: 10px;
    overflow: hidden;
}

.grid .grid-item img {
    border-radius: 0;
}

.grid .artwork-caption {
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

/* 标题紧跟年份系列，爱心沉到底部（对齐 shop 的 h2 + price 位置） */

/* 默认（桌面） */
.grid .artwork-caption {
    min-height: 96px;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .grid .artwork-caption {
        min-height: 82px;
    }
}

@media (max-width: 767px) {
    .grid .artwork-caption {
        min-height: 71px;
    }
}

/* 卡片信息区：上排（年份系列 + 标题），下排（爱心，右下角）——与 shop 的 h2 + price 同构 */
.grid .artwork-caption-top {
    min-width: 0;
}

.grid .artwork-caption-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
}

.grid .artwork-caption-foot .artwork-like {
    margin: 0;
}

/* ==========================================================================
   作品卡信息区（最终形态）
   - 年份·系列 独占一行
   - 标题在左、点赞在右，两者底部对齐
   - 不再套用 shop 的固定高度，按内容自然收高
   ========================================================================== */
.grid .artwork-caption {
    display: flex;
    flex-direction: row;      /* 必须显式写，否则会被前面的 column 规则覆盖 */
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px 8px;
    min-height: 0;
    padding: 0.55rem 0.7rem 0.6rem;
    box-sizing: border-box;
}

.grid .artwork-caption-eyebrow {
    flex: 0 0 100%;
    margin: 0;
}

.grid .artwork-caption-top {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: flex-end;
}

.grid .artwork-caption-title {
    margin: 0;
    line-height: 1.25;
}

.grid .artwork-caption-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
}

.grid .artwork-caption-foot .artwork-like {
    margin: 0;
    line-height: 1;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .grid .artwork-caption {
        padding: 0.5rem 0.65rem 0.55rem;
    }
}

@media (max-width: 767px) {
    .grid .artwork-caption {
        padding: 0.45rem 0.55rem 0.5rem;
    }
}

/* ==== css/nav.css ==== */

/* 系统字体栈：替代 Google Fonts，零网络请求，中文优先 PingFang/微软雅黑 */
:root {
    --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
}
html, body, button, input, textarea, select {
    font-family: var(--font-sans) !important;
}
body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: rgb(250, 250, 250);
    min-height: 100vh;
    /* 隐藏滚动条 */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* 隐藏滚动条 */
body::-webkit-scrollbar,
html::-webkit-scrollbar {
    display: none;
}

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

.header {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    margin: 0;
    z-index: 1000000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5rem;
    max-height: 5rem;
    box-sizing: border-box;
    background-color: rgba(250, 250, 250, 0.75);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: none;
    transition: background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.header.header-scrolled {
    background-color: rgba(250, 250, 250, 0.92);
    border-bottom: none;
}

.header-main {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 90%;
    height: 100%;
    margin: 0 auto;
    position: relative;
    background: transparent;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .header {
        padding: 0 1rem;
        height: 4.5rem;
        max-height: 4.5rem;
    }
}


.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-item {
    font-size: 1rem;
    font-weight: 500;
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: #000;
}

.nav-item::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000;
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

.user-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-icon svg {
    width: 20px;
    height: 20px;
}

/* 语言切换按钮样式 */
.lang-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #000;
    background-color: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    color: #000;
}

.lang-btn:hover {
    transform: scale(1.1);
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
    .lang-btn {
        border: 2px solid #f7f7f7;
        background-color: #333;
        color: #f7f7f7;
    }
}

.header {
    max-width: 100%;
}

.header-main {
    max-width: 90%;
}

.section {
    font-family: 'Open Sans', sans-serif;
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.nav {
    display: flex;
    height: auto;
    position: relative;
    align-items: center;
    justify-content: center;
}

.navitem {
    display: flex;
    align-items: center;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    margin: 0 1vw;
    align-items: center;
    justify-content: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-icon {
    height: 100%;
    align-items: center;
}

.membership {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10%;
}

.member {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-align: center;
    word-wrap: break-word;
    white-space: nowrap;
}

.member-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.container {
    display: flex;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background-color: rgb(250, 250, 250);
}

.center-align {
    margin: 5rem auto;
    height: auto;
    font-family: 'Open Sans', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 1s ease;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    margin: 0;
}

.main-img {
    flex: 2.5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1/1;
    overflow: hidden;
    border: 0.3rem solid black;
    border-radius: 50%;
}

.image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.center-align-bottom {
    margin: 5rem auto;
    height: auto;
    font-family: 'Open Sans', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 1s ease;
}

.right-align {
    justify-content: center;
}

.left-align {
    justify-content: center;
}

.image-change-button {
    background-color: white;
    border: 0.1rem solid black;
    padding: 0.5rem 3rem;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    color: #000;
    text-transform: uppercase;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 0 0 rgba(0, 0, 0, 1);
    position: relative;
    max-width: 200px;
    width: 100%;
}

.image-change-button:hover {
    background-color: #f7f7f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 0 rgba(0, 0, 0, 1);
}

.image-change-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 0 rgba(0, 0, 0, 1);
}

.flyout-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.5rem;
    color: black;
    text-transform: uppercase;
    pointer-events: none;
    animation: flyout 1s ease-out forwards;
    z-index: 10;
    white-space: nowrap;
}

@keyframes flyout {
    0% {
        opacity: 1;
        transform: translate(-50%, -30px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50px) scale(1.5);
    }
}

/* Elastic zoom animation for main-img */
@keyframes elastic-zoom {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.9);
    }

    75% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.main-img.elastic-zoom {
    animation: elastic-zoom 0.5s ease-out;
}

.section span {
    cursor: default;
    position: relative;
}

.section span::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: black;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.section span:hover {
    cursor: pointer !important;
}

.section span:hover::after {
    width: 50%;
    opacity: 1;
}

.section.active span::after {
    opacity: 1;
    width: 50%;
}

.navitem span {
    cursor: default;
    position: relative;
    pointer-events: auto;
}

.navitem span:hover {
    cursor: pointer !important;
}

.navitem span:hover::after {
    width: 50%;
    opacity: 1;
}

.navitem span::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: black;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.navitem.active span::after {
    opacity: 1;
    width: 50%;
}

.tab ul {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f7f7f7;
    display: none;
    justify-content: space-around;
    box-shadow: none;
    z-index: 1000000;
    align-items: center;
    padding: 10px 0;
    min-height: 50px;
    list-style: none;
    margin: 0;
}

.tab.visible ul {
    bottom: 0;
}

footer {
    background-color: black;
    color: white;
    max-height: auto;
    font-family: 'Open Sans', sans-serif;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 9999;
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 5px;
    margin: 0;
}

.language-btn-logo {
    width: 25px;
    height: 25px;
    vertical-align: middle;
}

/* 全局隐藏加入idmanos入口 */
#member-avatar {
    display: none;
}

@media (max-width: 1024px) {

    .nav,
    .navitem,
    .section,
    .nav-menu,
    footer {
        display: none;
    }

    .main-img {
        flex: 1;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .logo {
        display: flex;
        align-items: center;
        height: auto;
    }

    .logo-icon {
        height: 100%;
        align-items: center;
        height: auto;
    }

    .membership {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5%;
    }

    .member {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        text-align: center;
        word-wrap: break-word;
        white-space: normal;
    }

    .tab ul {
        display: flex;
        min-height: 48px;
        padding: 0;
        align-items: center;
    }

    .tabitem img {
        display: none;
    }

    .tabitem {
        cursor: default;
        position: relative;
        pointer-events: auto;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
    }

    .tabitem a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0;
        height: 100%;
        box-sizing: border-box;
    }

    .tabitem span {
        font-size: 0.8rem;
        font-weight: 500;
        opacity: 0.3;
        transition: all 0.3s ease;
        position: relative;
        line-height: 1.2;
        display: inline-block;
        padding-bottom: 6px;
        margin-top: auto;
        margin-bottom: auto;
    }

    .tabitem:hover {
        cursor: pointer !important;
    }

    .tabitem:hover span {
        opacity: 1 !important;
    }

    .tabitem:hover span::after {
        width: 60%;
        opacity: 1;
    }

    .tabitem span::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background-color: black;
        border-radius: 10px;
        opacity: 0;
        transition: opacity 0.3s ease, width 0.3s ease;
    }

    .tabitem.active span {
        opacity: 1;
        font-weight: 700;
    }

    .tabitem.active span::after {
        opacity: 1;
        width: 60%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 0.75rem;
        height: 3.8rem;
        max-height: 3.8rem;
    }

    .header-main {
        padding: 0;
    }
    
    .main-img {
        flex: 1;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .logo {
        display: flex;
        align-items: center;
        width: 40%;
    }

    .logo-icon {
        align-items: center;
        width: 100%;
    }

    .center-align-bottom,
    .center-align {
        margin: 4rem auto;
    }
}

@media (prefers-color-scheme: dark) {

    body,
    html {
        background-color: #1a1a1a;
    }

    .container {
        background-color: #1a1a1a;
    }

    .section span::after {
        background-color: #f7f7f7;
    }

    .navitem span::after {
        background-color: #f7f7f7;
    }

    .tab ul {
        background-color: #1a1a1a;
        box-shadow: none;
    }

    .header {
        background-color: rgba(26, 26, 26, 0.82);
        border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    .header.header-scrolled {
        background-color: rgba(26, 26, 26, 0.94);
    }

    .header-main {
        background-color: transparent;
    }

    .tabitem span::after,
    .tabitem.active span::after {
        background-color: #f7f7f7;
    }

    footer {
        background-color: #000000;
        color: #ddd;
    }

    .logo-icon {
        filter: invert(1);
    }

    .tabitem a img,
    .header .navitem a img {
        filter: invert(1);
    }

    .member,
    .center-align,
    .center-align-bottom,
    span {
        color: #f7f7f7;
    }

    .image-change-button {
        border: 0.1rem solid #f7f7f7;
        box-shadow: 0 4px 0 0 rgb(171, 171, 171);
    }

    .image-change-button:hover {
        background-color: #f7f7f7;
        box-shadow: 0 6px 0 0 rgb(171, 171, 171);
    }

    .image-change-button:active {
        background-color: #f7f7f7;
        box-shadow: 0 2px 0 0 rgb(171, 171, 171);
    }

    .main-img {
        border: 0.3rem solid #f7f7f7;
    }

    .flyout-text {
        color: white;
    }

    .nav-item:hover {
        color: #f7f7f7;
    }

    .nav-item::after {
        background-color: #f7f7f7;
    }
}

/* 加入弹窗样式（渐进式毛玻璃柔焦） */
.join-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.38);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000001;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.35s ease;
}

.join-popup-content {
    background-color: rgba(250, 250, 250, 0.94);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 2.2rem 2rem;
    border-radius: 16px;
    box-shadow: none !important;
    position: relative;
    max-width: 90%;
    width: 440px;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.collective-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #666;
    border: 1px solid #d4d4d4;
    padding: 3px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.join-popup-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #000;
}

.collective-sub {
    font-size: 12px;
    color: #666;
    margin: 0 0 1.25rem 0;
    line-height: 1.5;
}

.collective-perks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f0f0f3;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 1.5rem;
    text-align: left;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #333;
    font-weight: 500;
}

.perk-icon {
    color: #000;
    font-size: 10px;
}

.collective-footer {
    font-size: 11px;
    color: #777;
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.collective-footer a {
    color: #000;
    text-decoration: underline;
}

.social-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.social-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    border-radius: 12px;
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    box-shadow: none !important;
}

.social-item-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    white-space: nowrap;
}

.social-item:hover {
    transform: translateY(-1px);
    box-shadow: none !important;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f0f0;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.social-name {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-item.xhs {
    background-color: #ff2442;
    color: white;
}

.social-item.xhs.xhs-black {
    background-color: #000000;
}

.social-item.xhs .social-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.social-item.xhs.xhs-black .social-icon {
    background-color: rgba(255, 255, 255, 0.1);
}

.social-item.insta {
    background: linear-gradient(45deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
}

.social-item.insta .social-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.social-item.taobao {
    background-color: #ff5000;
    color: white;
}

.social-item.taobao .social-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ===== 全站视觉语言：进入/刷新整页从模糊变清晰，站内跳转离开时逐渐变模糊 ===== */
html.page-blur-in::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    animation: pageBlurIn 1.1s ease-out both;
}

html.page-blur-out::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    pointer-events: none;
    animation: pageBlurOut 0.6s ease-in both;
}

@keyframes pageBlurIn {
    from { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
    to { -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px); }
}

@keyframes pageBlurOut {
    from { -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px); }
    to { -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
}

.join-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.join-popup-close:hover {
    color: #000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .join-popup-content {
        width: 80%;
        padding: 1.5rem;
    }

    .join-popup-title {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .social-container {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .social-item {
        padding: 0.8rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .social-icon svg {
        width: 30px;
        height: 30px;
    }

    .social-icon img {
        width: 25px;
        height: 25px;
    }

    .social-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .join-popup-content {
        padding: 1rem;
    }

    .join-popup-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .social-container {
        gap: 0.8rem;
        margin-bottom: 1rem;
    }

    .social-item {
        padding: 0.6rem;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }

    .social-icon svg {
        width: 25px;
        height: 25px;
    }

    .social-icon img {
        width: 18px;
        height: 18px;
    }

    .social-name {
        font-size: 0.8rem;
    }

    .join-popup-close {
        font-size: 1.2rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* 深色模式下的弹窗样式 */
@media (prefers-color-scheme: dark) {
    .join-popup-content {
        background-color: #1a1a1a;
    }

    .join-popup-title {
        color: #f7f7f7;
    }

    .join-popup-close {
        color: #666;
    }

    .join-popup-close:hover {
        color: #f7f7f7;
    }

    .social-item:hover {
        box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    }
}

/* ===== 跨页面导航：顶栏与底部菜单保持原位 =====
   支持 View Transitions 的浏览器（Chrome / Edge 126+）在切换页面时，
   会为下面这两个元素做视觉衔接，不再随整页刷新跳动；
   不支持的浏览器自动退回普通跳转，无副作用。 */
@view-transition {
    navigation: auto;
}

.header {
    view-transition-name: site-header;
}

nav.tab ul {
    view-transition-name: tab-bar;
}

::view-transition-old(root) {
    animation: nav-fade-out 0.16s ease both;
}

::view-transition-new(root) {
    animation: nav-fade-in 0.2s ease both;
}

@keyframes nav-fade-out {
    to {
        opacity: 0;
    }
}

@keyframes nav-fade-in {
    from {
        opacity: 0;
    }
}

/* ==========================================================================
   全站暖色主题：去掉纯白 / 浅灰 / 纯黑 / 深灰
   浅色 = 奶油纸感；深色 = 暖棕黑
   ========================================================================== */
:root {
  --site-page: #ffffff;
  --site-chrome: #ffffff;
  --site-ink: #1a1a1a;
  --site-muted: #8b7a66;
  --site-line: #e8e8e8;
}

html,
body {
  background-color: var(--site-page);
  color: var(--site-ink);
}

.header {
  background-color: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--site-line);
}

.header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.96);
}

.tab ul {
  background-color: var(--site-chrome);
}

.navitem span,
.home-nav span,
.tabitem span {
  color: var(--site-ink);
}

.lang-btn {
  color: var(--site-ink);
  border-color: var(--site-ink);
}

.tabitem span::after {
  background-color: var(--site-ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --site-page: #131313;
    --site-chrome: #131313;
    --site-ink: #f2f2f2;
    --site-muted: #b5a48f;
    --site-line: #2a2a2a;
  }

  html,
  body {
    background-color: var(--site-page);
    color: var(--site-ink);
  }

  .header {
    background-color: rgba(19, 19, 19, 0.86);
    border-bottom-color: var(--site-line);
  }

  .header.header-scrolled {
    background-color: rgba(19, 19, 19, 0.94);
  }

  .tab ul {
    background-color: var(--site-chrome);
  }

  .navitem span,
  .home-nav span,
  .tabitem span {
    color: var(--site-ink);
  }

  .lang-btn {
    color: var(--site-ink);
    border-color: var(--site-ink);
  }

  .tabitem span::after {
    background-color: var(--site-ink);
  }
}

/* ==========================================================================
   语言切换：无外框、小字号、点一下切一个（EN → 繁 → 简 → EN）
   ========================================================================== */
.lang-btn,
.lang-btn.lang-cycle {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 4px 2px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}

.lang-btn.lang-cycle:hover {
    opacity: 1;
    transform: none !important;
}

/* ==== css/user-auth.css ==== */
/* ============================================================
   Idmanos 用户系统样式
   设计语言对齐站点：Open Sans / 黑灰单色 / 细线 / 无投影 / 大留白
   作用域：body.uauth（仅登录、账户页），另有少量全站微调
   ============================================================ */

/* ---------- 全站微调（页头头像、语言按钮、筛选、作品卡） ---------- */
.usr-av { display: inline-block; border-radius: 50%; overflow: hidden; flex: none; background: #ddd; }
.usr-av img { width: 100%; height: 100%; display: block; }
.usr-entry { display: inline-flex; align-items: center; margin-left: 0; text-decoration: none; }

/* 页头：语言按钮与头像间距收紧、边框变细 */
.member-container { gap: 8px; }
.lang-btn { border-width: 1px; }

/* 艺术页筛选按钮：只保留图标，不显示文字（所有屏幕宽度） */
.filter-btn .filter-label { display: none; }

/* 作品卡说明底：浅色下用卡片底色，深色交给 art.css 的媒体查询 */
.artwork-caption { background: #ffffff; }

/* 首页订阅 banner（桌面） */
html.has-sub-banner, html.has-sub-banner body { height: auto !important; min-height: 100vh; overflow-x: hidden !important; overflow-y: auto !important; }
html.has-sub-banner main { height: 100vh; min-height: 100vh; overflow: visible; }

.idmanos-sub-banner { position: relative; z-index: 5; padding: 72px 24px 96px; background: #111; color: #f5f2ec; }
.idmanos-sub-banner .isb-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.idmanos-sub-banner .isb-kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; opacity: .6; font-weight: 700; }
.idmanos-sub-banner .isb-title { margin: 0 0 10px; font-size: clamp(24px, 3.2vw, 36px); font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.idmanos-sub-banner .isb-sub { margin: 0; font-size: 15px; opacity: .62; }
.idmanos-sub-banner .isb-cta { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: 13px 30px; border-radius: 999px; background: #f5f2ec; color: #111; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .2s ease, background-color .2s ease; }
.idmanos-sub-banner .isb-cta:hover { background: #fff; transform: translateY(-1px); }

/* 首页订阅按钮（移动端，替代 banner） */
.idmanos-mobile-member { display: none; }
@media (max-width: 768px) {
    .idmanos-sub-banner { display: none; }
    html.has-sub-banner, html.has-sub-banner body { overflow: hidden !important; height: 100% !important; }
    html.has-sub-banner main { height: auto; min-height: 100vh; }
    .idmanos-mobile-member {
        display: inline-flex; align-items: center; justify-content: center;
        margin: 14px auto 0; padding: 11px 26px; border-radius: 999px;
        background: #111; color: #fff; font-family: 'Open Sans', sans-serif;
        font-size: 14px; font-weight: 600; text-decoration: none; letter-spacing: .01em;
    }
    .idmanos-mobile-member-wrap { display: flex; justify-content: center; width: 100%; }
}

/* ============================================================
   登录 / 账户页（body.uauth）
   ============================================================ */
body.uauth {
    margin: 0;
    background: rgb(250, 250, 250);
    font-family: 'Open Sans', sans-serif;
    color: #1b1b1b;
    -webkit-font-smoothing: antialiased;
}
body.uauth .uauth-top {
    height: 64px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; border-bottom: 1px solid #eeeeee;
    background: rgba(250, 250, 250, .85);
    position: sticky; top: 0; z-index: 10;
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
body.uauth .uauth-logo { height: 22px; }
body.uauth .uauth-back { font-size: 13.5px; color: #8a8a8a; text-decoration: none; }
body.uauth .uauth-back:hover { color: #1b1b1b; }
body.uauth .uauth-main {
    max-width: 840px; margin: 0 auto;
    padding: 96px 24px 0;
    min-height: 100vh; box-sizing: border-box;
    display: flex; flex-direction: column;
}
body.uauth #accApp { display: flex; flex-direction: column; flex: 1 0 auto; min-height: 0; }

/* 账户 / 登录页：去掉顶栏底部那条灰线 */
body.uauth .header,
body.uauth .header.header-scrolled { border-bottom: none; box-shadow: none; }
body.uauth .header::after { display: none; }

/* ---------- 登录 / 注册 ---------- */
body.uauth .auth-box { max-width: 380px; margin: 0 auto; }
body.uauth .auth-title { font-size: 28px; margin: 0 0 22px; font-weight: 600; letter-spacing: -.01em; }
body.uauth .auth-tabs { display: flex; gap: 22px; margin-bottom: 4px; }
body.uauth .auth-tabs button {
    background: none; border: none; font: inherit; font-size: 15px; color: #a0a0a0;
    cursor: pointer; padding: 0 0 8px; border-bottom: 1px solid transparent; transition: color .2s;
}
body.uauth .auth-tabs button.on { color: #1b1b1b; border-bottom-color: #1b1b1b; font-weight: 600; }
body.uauth .auth-form label {
    display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: #9a9a9a; font-weight: 700; margin: 20px 0 7px;
}
body.uauth .auth-form input {
    width: 100%; box-sizing: border-box; padding: 12px 14px;
    border: 1px solid #e8e8e8; border-radius: 8px;
    font: inherit; font-size: 14.5px; outline: none; background: #fff;
    transition: border-color .2s;
}
body.uauth .auth-form input:focus { border-color: #1b1b1b; }
body.uauth .btn-primary {
    width: 100%; margin-top: 24px; border: 1px solid #1b1b1b; background: #1b1b1b; color: #fff;
    border-radius: 999px; padding: 13px; font: inherit; font-weight: 600; font-size: 14.5px;
    cursor: pointer; transition: opacity .2s;
}
body.uauth .btn-primary:hover { opacity: .84; }
body.uauth .auth-links { margin-top: 18px; font-size: 13px; color: #a0a0a0; text-align: center; }
body.uauth .auth-links button {
    background: none; border: none; color: #1b1b1b; font: inherit; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; padding: 0;
}
body.uauth .auth-msg { margin-top: 14px; font-size: 13px; min-height: 18px; }
body.uauth .auth-msg.err { color: #b3362a; }
body.uauth .auth-msg.ok { color: #2b6a45; }

/* ---------- 账户页 ---------- */
body.uauth .acc-title { font-size: 40px; margin: 0 0 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
body.uauth .acc-sub { color: #a0a0a0; font-size: 13.5px; margin: 0 0 52px; letter-spacing: .01em; }

/* 堆叠：整叠置底，一张白纸，黑色细线做错层分隔
   --fh 层高，--step 相邻层错位距离，--amp 锯齿振幅（> step 才会交叉叠压） */
body.uauth .acc-stack {
    --fh: 46px;
    --step: 25px;
    --amp: 34px;
    --strip: var(--amp);
    margin-top: auto;
    background: #fff;
    position: relative;
    padding-bottom: 0;
}
body.uauth .acc-mask {
    position: absolute; left: 0;
    top: calc(var(--step) - var(--amp));
    width: 100%; height: var(--amp);
    display: block; pointer-events: none; z-index: 1;
}
/* 每层都是独立的白色文件夹（凸起区域的遮白由 SVG 里的白块负责） */
body.uauth .fold {
    position: relative; background: #fff;
    --tab: calc(var(--amp) - var(--step));
}
/* 每层向上叠压，露出 --step 高度 */
body.uauth .fold + .fold { margin-top: calc(var(--step) - var(--fh)); }
body.uauth .acc-stack .fold:last-child { padding-bottom: 40px; }
/* 锯齿线：高度取振幅，允许越过上下相邻层 */
body.uauth .fold-shape {
    position: absolute; left: 0;
    top: calc(var(--step) - var(--amp));
    width: 100%; height: var(--amp);
    display: block; pointer-events: none; z-index: 2;
}
body.uauth .fold-h {
    position: relative; display: block; width: 100%;
    height: var(--fh, 46px); padding: 0; margin: 0;
    border: none; background: transparent; cursor: pointer;
    font: inherit; text-align: left;
}
body.uauth .fold-label {
    position: absolute;
    top: -3px; height: var(--step, 25px);
    display: flex; align-items: center;
    line-height: 1;
    white-space: nowrap;
    font-size: 13px; letter-spacing: .02em; color: #1b1b1b;
    transition: opacity .2s ease; z-index: 3;
}
/* 标签居中在各自凸起段里：偶数层 0–25%（中心 12.5%），奇数层 75–100%（中心 87.5%） */
body.uauth .fold-label.l { left: 12.5%; transform: translateX(-50%); }
body.uauth .fold-label.r { left: 87.5%; transform: translateX(-50%); }
/* 展开面板底部留出被下一层压住的高度，避免内容被盖 */
body.uauth .fold.active .fb-inner { padding-bottom: calc(var(--step) + 40px); }
/* 悬停变灰只在有鼠标的设备上生效，避免手机点完残留灰色 */
@media (hover: hover) and (pointer: fine) {
    body.uauth .fold-h:hover .fold-label { opacity: .55; }
    body.uauth .fold.active .fold-h:hover .fold-label { opacity: 1; }
}
/* 展开的那一层：字重加粗、纯黑 */
body.uauth .fold.active .fold-label {
    font-weight: 700;
    color: #000;
    opacity: 1;
    letter-spacing: .01em;
}
/* 滚动条：隐藏且不占位（页面级 + 面板级） */
html.uauth-root, body.uauth,
body.uauth .fold-body {
    scrollbar-width: none;
    -ms-overflow-style: none;
    scrollbar-gutter: auto;
}
html.uauth-root::-webkit-scrollbar,
body.uauth::-webkit-scrollbar,
body.uauth .fold-body::-webkit-scrollbar { width: 0; height: 0; display: none; }

body.uauth .fold-body {
    background: transparent;
    height: 0; overflow: hidden;
    transition: height .34s cubic-bezier(.22, .61, .36, 1);
}
body.uauth .fb-inner { padding: 6px 26px 40px; }
@keyframes accFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 概览：头像 + 身份 */
body.uauth .acc-profile { display: flex; align-items: center; gap: 26px; margin-bottom: 34px; }
body.uauth .acc-avatar { position: relative; flex: none; }
body.uauth .acc-avatar .usr-av { width: 92px; height: 92px; }
body.uauth .acc-cam {
    position: absolute; right: 1px; bottom: 1px;
    width: 29px; height: 29px; border-radius: 50%;
    border: 1px solid #e8e8e8; background: #fff; color: #444444;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; transition: border-color .2s, color .2s;
}
body.uauth .acc-cam:hover { border-color: #1b1b1b; color: #1b1b1b; }
body.uauth .acc-cam svg { width: 15px; height: 15px; }
body.uauth .acc-id .p-name { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
body.uauth .acc-id .p-mail { color: #9a9a9a; font-size: 13.5px; margin-top: 3px; }
body.uauth .acc-badge {
    display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 600;
    letter-spacing: .04em; color: #8f8f8f; border: 1px solid #e8e8e8;
    padding: 3px 11px; border-radius: 999px;
}
body.uauth .acc-badge.active { color: #1b1b1b; border-color: #1b1b1b; }

/* 头像候选（默认收起，点相机/换一批才展开） */
body.uauth .acc-cands { display: none; gap: 10px; margin: -14px 0 30px; flex-wrap: wrap; align-items: center; }
body.uauth .acc-cands.show { display: flex; }
body.uauth .acc-cand {
    width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
    border: 1px solid transparent; padding: 0; background: none; cursor: pointer;
    transition: border-color .18s, transform .18s;
}
body.uauth .acc-cand:hover { transform: translateY(-2px); }
body.uauth .acc-cand.sel { border-color: #1b1b1b; }
body.uauth .acc-shuffle {
    width: 40px; height: 40px; border-radius: 50%; padding: 0;
    border: 1px dashed #c9c9c9; background: #fff; color: #8f8f8f;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: border-color .18s, color .18s;
}
body.uauth .acc-shuffle:hover { border-color: #1b1b1b; color: #1b1b1b; }
body.uauth .acc-shuffle svg { width: 16px; height: 16px; }

/* 字段 */
body.uauth .acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; }
body.uauth .field { display: flex; flex-direction: column; gap: 7px; }
body.uauth .field.full { grid-column: 1 / -1; }
body.uauth .field label {
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: #9a9a9a; font-weight: 700;
}
body.uauth .field input,
body.uauth .field select {
    padding: 11px 13px; border: 1px solid #e8e8e8; border-radius: 8px;
    font: inherit; font-size: 14px; background: #fff; outline: none;
    transition: border-color .2s; color: #1b1b1b;
}
body.uauth .field input:focus,
body.uauth .field select:focus { border-color: #1b1b1b; }

/* 按钮 */
body.uauth .btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #1b1b1b; background: #1b1b1b; color: #fff;
    border-radius: 999px; padding: 11px 26px;
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: opacity .2s, border-color .2s, color .2s;
}
body.uauth .btn:hover { opacity: .85; }
body.uauth .btn.ghost { background: #fff; color: #1b1b1b; border-color: #e8e8e8; }
body.uauth .btn.ghost:hover { border-color: #1b1b1b; opacity: 1; }
body.uauth .btn.sm { padding: 8px 18px; font-size: 13px; }
body.uauth .acc-actions { display: flex; gap: 12px; align-items: center; margin-top: 30px; flex-wrap: wrap; }

/* 分区标题 */
body.uauth .acc-hr { height: 1px; background: #eeeeee; margin: 42px 0 30px; }
body.uauth .acc-h3 {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: #9a9a9a; font-weight: 700; margin: 0 0 18px;
}

/* 键值行 */
body.uauth .acc-rows { display: flex; flex-direction: column; }
body.uauth .acc-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
    padding: 15px 0; border-bottom: 1px solid #f0f0f0; font-size: 14.5px;
}
body.uauth .acc-row:last-child { border-bottom: none; }
body.uauth .acc-row .k { color: #9a9a9a; }
body.uauth .acc-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 地址 */
body.uauth .acc-addr {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
    padding: 16px 0; border-bottom: 1px solid #f0f0f0;
}
body.uauth .acc-addr:last-of-type { border-bottom: none; }
body.uauth .acc-addr .d { font-size: 14.5px; }
body.uauth .acc-addr .m { color: #9a9a9a; font-size: 13px; margin-top: 4px; }
body.uauth .acc-x {
    border: none; background: none; cursor: pointer; color: #b8b8b8;
    font-size: 18px; line-height: 1; padding: 4px 6px; border-radius: 6px;
}
body.uauth .acc-x:hover { color: #1b1b1b; }
body.uauth .acc-empty { color: #a0a0a0; font-size: 13.5px; padding: 6px 0 2px; }

/* 会员 */
body.uauth .acc-perks { margin: 0 0 30px; padding: 0; list-style: none; }
body.uauth .acc-perks li {
    font-size: 14px; color: #444444; padding: 9px 0 9px 24px; position: relative;
}
body.uauth .acc-perks li::before {
    content: ''; position: absolute; left: 2px; top: 16px;
    width: 9px; height: 5px; border-left: 1px solid #1b1b1b; border-bottom: 1px solid #1b1b1b;
    transform: rotate(-45deg);
}
body.uauth .acc-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
body.uauth .acc-plan {
    text-align: left; padding: 22px 22px 24px;
    border: 1px solid #e8e8e8; border-radius: 12px; background: #fff;
    font: inherit; cursor: pointer; transition: border-color .2s;
}
body.uauth .acc-plan:hover { border-color: #b8b8b8; }
body.uauth .acc-plan.sel { border-color: #1b1b1b; }
body.uauth .acc-plan .t { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #9a9a9a; font-weight: 700; }
body.uauth .acc-plan .p { font-size: 30px; font-weight: 500; margin-top: 10px; letter-spacing: -.01em; }
body.uauth .acc-plan .p small { font-size: 13px; color: #9a9a9a; font-weight: 400; margin-left: 2px; }
body.uauth .acc-plan .n { font-size: 12.5px; color: #9a9a9a; margin-top: 6px; }

/* 订单 */
body.uauth .acc-order {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 22px 0; border-bottom: 1px solid #f0f0f0;
}
body.uauth .acc-order:last-child { border-bottom: none; }
body.uauth .acc-order .t { font-size: 15px; font-weight: 600; }
body.uauth .acc-order .d { color: #9a9a9a; font-size: 13px; margin-top: 4px; }
body.uauth .acc-order a { font-size: 13.5px; color: #1b1b1b; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
body.uauth .acc-note { color: #a0a0a0; font-size: 13px; margin: 0 0 6px; }

/* 关于：直接用站点 about.css 的原排版，这里只做必要的容器适配 */
body.uauth .acc-about { width: 100%; }
body.uauth .acc-about .about {
    margin: 0; padding: 0; width: 100%;
    opacity: 1; animation: none; display: flex;
}
/* 关闭展开时的入场动画，避免闪动 */
body.uauth .acc-about .brand-image,
body.uauth .acc-about .team-title,
body.uauth .acc-about .brand-story,
body.uauth .acc-about .about-contact-wrapper,
body.uauth .acc-about .story-block,
body.uauth .acc-about .team-more {
    opacity: 1; transform: none; animation: none;
}
body.uauth .acc-about .brand-image-img { max-width: 100%; height: auto; }
body.uauth .acc-about .tile-head-icon { width: 16px; height: 16px; }
/* 关于：去掉与 .fb-inner 叠加的双重左右间距（只作用于 .about 的直接子区块） */
body.uauth .fold[data-k="about"] .fb-inner { padding-left: 0; padding-right: 0; }
body.uauth .acc-about > .about > .brand-image,
body.uauth .acc-about > .about > .brand-story,
body.uauth .acc-about > .about > .about-contact-wrapper { padding-left: 26px; padding-right: 26px; }
/* 内层容器不再叠加间距 */
body.uauth .acc-about .story-block,
body.uauth .acc-about .team-more,
body.uauth .acc-about .contact,
body.uauth .acc-about .team-title { padding-left: 0; padding-right: 0; }
body.uauth .acc-locked { color: #a0a0a0; font-size: 14px; }
body.uauth .acc-locked a { color: #1b1b1b; text-decoration: underline; text-underline-offset: 3px; }
body.uauth .acc-about-loading { color: #a0a0a0; font-size: 13.5px; }

/* Toast：放到顶栏下方居中，避免被底部菜单栏遮挡 */
.uauth-toast {
    position: fixed; left: 50%; top: 46%; bottom: auto;
    transform: translate(-50%, -50%) translateY(-8px);
    background: #1b1b1b; color: #fff; padding: 11px 22px; border-radius: 999px;
    font-family: 'Open Sans', sans-serif; font-size: 13.5px;
    opacity: 0; pointer-events: none; transition: .25s; z-index: 1200; max-width: 90vw;
    text-align: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
}
.uauth-toast.show { opacity: 1; transform: translate(-50%, -50%); }


/* ---------- 桌面端：白底与描边铺满屏幕宽度，内容居中 792px ---------- */
@media (min-width: 641px) {
    body.uauth .uauth-main {
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }
    body.uauth .fb-inner {
        max-width: 792px;
        margin-left: auto;
        margin-right: auto;
    }
    /* 标题与内容栏对齐 */
    body.uauth .acc-title {
        width: 100%;
        max-width: 792px;
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
    body.uauth .uauth-main { padding: 62px 20px 0; }
    body.uauth .acc-title { font-size: 28px; margin-bottom: 14px; }
    body.uauth .acc-sub { margin-bottom: 34px; }
    body.uauth .acc-stack { --fh: 40px; --step: 25px; --amp: 34px; margin-left: -20px; margin-right: -20px; }
    body.uauth .acc-stack .fold:last-child { padding-bottom: 48px; }
    body.uauth .fold-h { height: var(--fh); }
    body.uauth .fold.active .fb-inner { padding-bottom: calc(var(--step) + 32px); }
    body.uauth .acc-about > .about > .brand-image,
    body.uauth .acc-about > .about > .brand-story,
    body.uauth .acc-about > .about > .about-contact-wrapper { padding-left: 20px; padding-right: 20px; }
    body.uauth .fb-inner { padding: 4px 20px 32px; }
    body.uauth .acc-profile { gap: 16px; margin-bottom: 26px; }
    body.uauth .acc-avatar .usr-av { width: 76px; height: 76px; }
    body.uauth .acc-id .p-name { font-size: 19px; }
    body.uauth .acc-grid { grid-template-columns: 1fr; gap: 18px; }
    body.uauth .acc-plans { grid-template-columns: 1fr; }
    body.uauth .acc-order { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* 账户页：不依赖 JS 时序，第 4 项（Account）始终显示选中下横线 */body.uauth[data-page="account"] .navitem:nth-child(4) span::after {
    opacity: 1;
    width: 50%;
}
body.uauth[data-page="account"] .tabitem:nth-child(4) span::after {
    opacity: 1;
    width: 60%;
}
body.uauth[data-page="account"] .tabitem:nth-child(4) span {
    opacity: 1;
    font-weight: 700;
}

/* 全站：手机端顶栏左右留白收窄，logo / 头像与内容左边缘（约 20px）对齐 */
@media (max-width: 640px) {
    .header { padding-left: 1px; padding-right: 1px; }
}

/* ==========================================================================
   移动端输入框：字号必须 >= 16px，否则 iOS Safari 聚焦时会把整个页面放大
   （这是 Safari 的默认行为，只能靠字号规避，不要用 user-scalable=no）
   ========================================================================== */

@media (max-width: 1024px), (max-height: 499px) {
  input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
  textarea,
  select,
  [contenteditable="true"] {
    font-size: 16px !important;
    line-height: 1.35;
  }

  /* 自定义搜索/聊天输入框同样保持 16px，外观用内边距微调 */
  .input-field,
  .search-input,
  #searchInput,
  #messageInput,
  .ap-field input {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   账户页「纸张折叠」设计：深色模式适配
   原来纸面写死 #fff、文字写死 #1b1b1b，夜间模式下标题/标签贴在深色背景上
   看不见，纸面又是刺眼的纯白 —— 这里统一改成跟随主题的纸色与墨色
   ========================================================================== */
body.uauth {
  /* 浅色：暖奶油纸感，避免纯白 #fff 与冷灰 */
  --uauth-page: #ffffff;
  --uauth-paper: #ffffff;
  --uauth-ink: #1a1a1a;
  --uauth-line: #e6e6e6;
  --uauth-line-soft: #f0f0f0;
  --uauth-muted: #8f8f8f;
  --uauth-field: #ffffff;
  background: var(--uauth-page);
  color: var(--uauth-ink);
}

body.uauth .acc-stack,
body.uauth .fold {
  background: var(--uauth-paper);
}

body.uauth .fold-label {
  color: var(--uauth-ink);
}

body.uauth .fold.active .fold-label {
  color: var(--uauth-ink);
}

body.uauth .btn.ghost {
  background: var(--uauth-paper);
  color: var(--uauth-ink);
  border-color: var(--uauth-line);
}

body.uauth .acc-cam,
body.uauth .acc-shuffle,
body.uauth .acc-plan {
  background: var(--uauth-paper);
  border-color: var(--uauth-line);
}

body.uauth .acc-badge {
  border-color: var(--uauth-line);
}

body.uauth .acc-hr {
  background: var(--uauth-line-soft);
}

body.uauth .acc-row,
body.uauth .acc-addr,
body.uauth .acc-order {
  border-bottom-color: var(--uauth-line-soft);
}

body.uauth .field input,
body.uauth .field select,
body.uauth .auth-form input {
  background: var(--uauth-field);
  border-color: var(--uauth-line);
  color: var(--uauth-ink);
}

body.uauth .acc-perks li {
  color: var(--uauth-ink);
  opacity: .82;
}

body.uauth .acc-order a,
body.uauth .acc-locked a,
body.uauth .acc-id .p-name {
  color: var(--uauth-ink);
}

@media (prefers-color-scheme: dark) {
  /* 深色：暖棕黑，避免纯黑与中性深灰 */
  body.uauth {
    --uauth-page: #131313;
    --uauth-paper: #131313;
    --uauth-ink: #f2f2f2;
    --uauth-line: #2e2e2e;
    --uauth-line-soft: #242424;
    --uauth-muted: #a0a0a0;
    --uauth-field: #1a1a1a;
    background: var(--uauth-page);
    color: var(--uauth-ink);
  }

  body.uauth .acc-title,
  body.uauth .acc-sub,
  body.uauth .acc-h3,
  body.uauth .acc-note,
  body.uauth .acc-empty,
  body.uauth .acc-locked,
  body.uauth .acc-about-loading,
  body.uauth .field label,
  body.uauth .auth-form label {
    color: var(--uauth-muted);
  }

  body.uauth .acc-title {
    color: var(--uauth-ink);
  }

  body.uauth .acc-note[style] {
    color: #d8c9b6 !important;
  }

  body.uauth .acc-row .k,
  body.uauth .acc-plan .t,
  body.uauth .acc-plan .p small,
  body.uauth .acc-plan .n,
  body.uauth .acc-order .d,
  body.uauth .acc-addr .m,
  body.uauth .acc-id .p-mail,
  body.uauth .acc-x,
  body.uauth .acc-shuffle {
    color: var(--uauth-muted);
  }

  body.uauth .acc-x:hover,
  body.uauth .acc-shuffle:hover,
  body.uauth .acc-plan:hover {
    color: var(--uauth-ink);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-plan.sel {
    border-color: var(--uauth-ink);
  }

  body.uauth .fold.active .fold-label {
    color: var(--uauth-ink);
  }

  /* 主按钮：夜间反色，保持对比 */
  body.uauth .btn,
  body.uauth .btn-primary {
    background: var(--uauth-ink);
    border-color: var(--uauth-ink);
    color: var(--uauth-page);
  }

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

  body.uauth .acc-badge.active {
    color: var(--uauth-ink);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-plan {
    background: var(--uauth-paper);
  }
}

/* ==========================================================================
   账户页纵向节奏
   原来 .acc-stack 用 margin-top:auto 贴底，在手机/长屏上会把整叠纸推到下面，
   标题和「概览」之间出现一大片空白；底部还会被 Tab 栏遮住
   ========================================================================== */
body.uauth .acc-stack {
  margin-top: 0;
}

body.uauth .uauth-main {
  padding-bottom: 88px;   /* 给底部 Tab 栏留出空间 */
}

@media (max-width: 1024px), (max-height: 499px) {
  body.uauth .uauth-main {
    padding-top: 76px;
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  body.uauth .acc-title {
    margin-bottom: 26px;
  }
}

/* ==========================================================================
   浅色补充：把残留的纯白 / 冷灰统一换成暖色变量
   （深色同名规则在上面已经写好了，这里只在浅色生效，避免互相覆盖）
   ========================================================================== */
@media (prefers-color-scheme: light) {
  body.uauth .btn,
  body.uauth .btn-primary {
    background: var(--uauth-ink);
    border-color: var(--uauth-ink);
    color: var(--uauth-paper);
  }

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

  body.uauth .acc-h3,
  body.uauth .acc-sub,
  body.uauth .acc-note,
  body.uauth .acc-empty,
  body.uauth .acc-locked,
  body.uauth .acc-about-loading,
  body.uauth .acc-row .k,
  body.uauth .acc-plan .t,
  body.uauth .acc-plan .p small,
  body.uauth .acc-plan .n,
  body.uauth .acc-order .d,
  body.uauth .acc-addr .m,
  body.uauth .acc-id .p-mail,
  body.uauth .acc-x,
  body.uauth .acc-shuffle,
  body.uauth .field label,
  body.uauth .auth-form label {
    color: var(--uauth-muted);
  }

  body.uauth .acc-perks li {
    color: var(--uauth-ink);
    opacity: .78;
  }

  body.uauth .acc-hr {
    background: var(--uauth-line-soft);
  }

  body.uauth .acc-row,
  body.uauth .acc-addr,
  body.uauth .acc-order {
    border-bottom-color: var(--uauth-line-soft);
  }

  body.uauth .acc-plan,
  body.uauth .acc-cam,
  body.uauth .acc-shuffle {
    background: var(--uauth-paper);
    border-color: var(--uauth-line);
  }

  body.uauth .acc-badge {
    border-color: var(--uauth-line);
  }

  body.uauth .acc-note[style] {
    color: var(--uauth-muted) !important;
  }
}

/* 展开面板底部留白：避免「保存 / 退出登录」被下一层的纸边压住 */
body.uauth .fold.active .fb-inner {
  padding-bottom: calc(var(--step, 25px) + 72px);
}

/* 层与层不再互相压住内容：去掉负的叠压间距，并给面板底部留够空间 */
body.uauth .acc-stack .fold + .fold {
  margin-top: 0;
}

body.uauth .fold.active .fb-inner {
  padding-bottom: calc(var(--step, 25px) + 56px);
}

/* ==========================================================================
   账户中心：资料卡片 / 统计 / 键值行 / 会员卡 / 列表项
   全部走主题变量，浅色深色都不出现纯白纯黑
   ========================================================================== */
.acc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.acc-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--uauth-line);
  color: var(--uauth-muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.acc-tag.ok {
  border-color: #4a9e6a;
  color: #4a9e6a;
}

.acc-tag.warn {
  border-color: #c08a3e;
  color: #c08a3e;
}

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

.acc-stat {
  border: 1px solid var(--uauth-line);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  background: var(--uauth-field);
}

.acc-stat .sv {
  font-size: 20px;
  font-weight: 800;
  color: var(--uauth-ink);
  line-height: 1.2;
}

.acc-stat .sk {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--uauth-muted);
}

.acc-kvs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acc-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--uauth-line-soft);
  font-size: 13px;
}

.acc-kv .k {
  color: var(--uauth-muted);
  font-weight: 600;
  flex: 0 0 auto;
}

.acc-kv .v {
  color: var(--uauth-ink);
  text-align: right;
  word-break: break-word;
}

/* 会员卡 */
.acc-mcard {
  border: 1px solid var(--uauth-line);
  border-radius: 14px;
  padding: 16px 16px 8px;
  background: var(--uauth-field);
}

.acc-mcard.on {
  border-color: var(--uauth-ink);
}

.mc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.mc-state {
  font-size: 15px;
  font-weight: 800;
  color: var(--uauth-ink);
}

.mc-plan {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--uauth-ink);
  color: var(--uauth-ink);
}

.mc-rows .acc-kv:last-child {
  border-bottom: 0;
}

/* 列表项（会员记录 / 创作作品） */
.acc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--uauth-line-soft);
}

.acc-item:last-child {
  border-bottom: 0;
}

.acc-item .it-main {
  min-width: 0;
}

.acc-item .it-t {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--uauth-ink);
}

.acc-item .it-d {
  margin-top: 3px;
  font-size: 12px;
  color: var(--uauth-muted);
  word-break: break-word;
}

/* 通知开关 */
.acc-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0 4px;
}

.acc-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--uauth-ink);
  cursor: pointer;
}

.acc-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 23px;
  border-radius: 999px;
  border: 1px solid var(--uauth-line);
  background: var(--uauth-page);
  position: relative;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
  flex: 0 0 auto;
}

.acc-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--uauth-muted);
  transition: transform .18s ease, background .18s ease;
}

.acc-toggle input[type="checkbox"]:checked {
  background: var(--uauth-ink);
  border-color: var(--uauth-ink);
}

.acc-toggle input[type="checkbox"]:checked::after {
  transform: translateX(17px);
  background: var(--uauth-page);
}

/* 文本域跟随主题 */
body.uauth textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--uauth-line);
  border-radius: 10px;
  background: var(--uauth-field);
  color: var(--uauth-ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  min-height: 76px;
}

body.uauth textarea:focus {
  outline: none;
  border-color: var(--uauth-ink);
}

body.uauth input:disabled {
  color: var(--uauth-muted);
  background: var(--uauth-page);
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .acc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .acc-stat .sv {
    font-size: 18px;
  }
}

/* 账户中心：收紧纵向节奏，让「基本资料」在首屏就能看到字段 */
body.uauth .fb-inner > .acc-hr {
  margin-top: 26px;
  margin-bottom: 20px;
}

body.uauth .fb-inner > .acc-h3 {
  margin-bottom: 14px;
}

body.uauth .fb-inner > .acc-h3 + .acc-grid {
  margin-top: 0;
}

body.uauth .fb-inner > .acc-stats {
  margin: 8px 0 12px;
}

body.uauth .fb-inner > .acc-kvs + .acc-hr {
  margin-top: 20px;
}

body.uauth .fb-inner > .acc-profile {
  margin-bottom: 20px;
}

body.uauth .fb-inner > .acc-cands {
  margin-bottom: 20px;
}

/* 兑换码输入行 */
.acc-redeem {
  display: flex;
  gap: 10px;
  margin: 10px 0 4px;
}

.acc-redeem input {
  flex: 1 1 auto;
  min-width: 0;
}

.acc-redeem .btn {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 420px) {
  .acc-redeem {
    flex-wrap: wrap;
  }
  .acc-redeem .btn {
    width: 100%;
  }
}
