/* ============ 内容浏览视图（浅色画廊 / 纯白详情）============
   覆盖首页深色星空风格，浏览时整屏切浅色。
   类名统一用 atlas- 前缀，与 styles.css 互不干扰。 */
.app-root { display: none; }
.app-root.browse-active {
  display: block;
  position: fixed; inset: 0; z-index: 50;
  background: #fafaf9; color: #2c2c2c; overflow-y: auto;
  font-family: -apple-system, "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  line-height: 1.6;
}
/* 浏览模式：body 自身也刷白底，避免 .app-root fixed 层在 iframe/内嵌浏览器下露黑 */
body.browsing {
  background: #fafaf9 !important;
  color: #2c2c2c !important;
}
body.browsing .container,
body.browsing .bg-stars,
body.browsing #starfield { display: none !important; }

/* 顶部面包屑 */
.atlas-topbar {
  max-width: 1400px; margin: 0 auto;
  padding: 40px 40px 0;
  display: flex; align-items: baseline; gap: 16px;
}
.atlas-topbar a { font-size: 13px; color: #888; font-weight: 300; letter-spacing: 0.04em; text-decoration: none; }
.atlas-topbar a:hover { color: #444; }
.atlas-topbar .sep { color: #ccc; }

/* ─── 画廊布局（分类列表页）─── */
.atlas-layout { display: flex; min-height: 100vh; }
.atlas-sidebar {
  position: fixed; top: 0; left: 0; width: 220px; height: 100vh;
  background: #f5f4f2; border-right: 1px solid #e8e8e4;
  overflow-y: auto; z-index: 100; padding: 28px 0 40px;
  scrollbar-width: thin; scrollbar-color: #d4d4d0 transparent;
}
.atlas-sidebar::-webkit-scrollbar { width: 4px; }
.atlas-sidebar::-webkit-scrollbar-thumb { background: #d4d4d0; border-radius: 2px; }
.atlas-sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid #e0e0dc; margin-bottom: 12px; }
.atlas-sidebar-header h3 { font-size: 14px; font-weight: 500; color: #555; letter-spacing: 0.5px; }
.atlas-sidebar-header .total { font-size: 12px; color: #aaa; margin-top: 2px; }
.atlas-nav { list-style: none; padding: 0; margin: 0; }
.atlas-nav-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px; font-size: 13px; color: #555; text-decoration: none;
  transition: background 0.15s, color 0.15s; border-left: 2px solid transparent;
}
.atlas-nav-item:hover { background: #edebe8; color: #333; }
.atlas-nav-item.active { color: #1a1a1a; background: #ebe9e6; border-left-color: #999; font-weight: 500; }
.atlas-nav-count { font-size: 11px; color: #bbb; margin-left: 8px; }
.atlas-main { margin-left: 220px; flex: 1; min-width: 0; }
/* 画廊页 main 顶部标题区（对齐参考 .header）*/
.atlas-gallery-header { max-width: 1400px; margin: 0 auto; padding: 56px 40px 8px; }
.atlas-gallery-header h1 { font-size: 28px; font-weight: 400; letter-spacing: 1px; color: #1a1a1a; }
.atlas-gallery-header .sub { font-size: 15px; color: #888; font-weight: 300; margin-top: 6px; }
.atlas-gallery-footer { text-align: center; padding: 48px 40px 64px; color: #ccc; font-size: 13px; }
.atlas-section-title { max-width: 1400px; margin: 48px auto 0; padding: 0 40px; }
.atlas-section-title h2 { font-size: 20px; font-weight: 400; color: #444; letter-spacing: 0.5px; padding-bottom: 12px; border-bottom: 1px solid #e8e8e4; }
.atlas-section-title .count { font-size: 13px; color: #aaa; font-weight: 300; margin-left: 8px; }

/* 网格卡片 */
.atlas-gallery {
  max-width: 1400px; margin: 0 auto; padding: 28px 40px 48px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px 24px;
}
.atlas-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.atlas-card:hover { transform: translateY(-4px); }
.atlas-card:hover .atlas-thumb-wrap { box-shadow: 0 8px 28px rgba(0,0,0,0.12); }
.atlas-thumb-wrap { width: 100%; aspect-ratio: 1242 / 1756; overflow: hidden; background: #f0f0ee; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: box-shadow 0.25s ease; }
.atlas-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atlas-thumb-ph { width: 100%; aspect-ratio: 1242/1756; background: #ececea; display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 13px; border-radius: 4px; }
.atlas-card-info { padding: 12px 4px 0; }
.atlas-card-num { font-size: 11px; color: #1a1a1a; font-weight: 500; letter-spacing: 0.5px; margin-bottom: 4px; }
.atlas-card-name { font-size: 14px; line-height: 1.5; color: #333; font-weight: 500; }
.atlas-card-sub { font-size: 12px; line-height: 1.45; color: #888; margin-top: 2px; }

/* ─── 详情页（纯白单列）─── */
.atlas-case-page { max-width: 960px; margin: 0 auto; padding: 56px 32px 100px; }
.atlas-hero { margin-bottom: 40px; }
.atlas-hero__number { font-size: 11px; letter-spacing: 0.15em; color: #999; text-transform: uppercase; margin-bottom: 24px; }
.atlas-hero__number span { color: #000; }
.atlas-hero__title { font-size: 34px; font-weight: 300; line-height: 1.3; letter-spacing: 0.03em; color: #111; }
.atlas-hero__title em { font-style: normal; font-weight: 600; }
.atlas-hero__case { margin-top: 16px; font-size: 14px; color: #888; font-weight: 300; letter-spacing: 0.08em; }
.atlas-hero__designer { margin-top: 6px; font-size: 14px; color: #888; font-weight: 300; letter-spacing: 0.08em; }
.atlas-hero__designer span { color: #444; font-weight: 400; }
.atlas-divider { width: 60px; height: 1px; background: #ddd; margin-top: 16px; }

.atlas-cover { width: 100%; aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: #f7f7f7; margin-bottom: 56px; }
.atlas-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.atlas-concept-svg { display: flex; justify-content: center; margin-bottom: 56px; }
.atlas-concept-svg svg { width: 100px; height: 100px; display: block; }

.atlas-definition { padding: 32px 40px; border-left: 1px solid #e8e8e8; background: #fafafa; margin-bottom: 72px; }
.atlas-definition__label { font-size: 11px; letter-spacing: 0.18em; color: #bbb; margin-bottom: 14px; }
.atlas-definition__text { font-size: 15px; font-weight: 300; line-height: 2; color: #444; }
.atlas-definition__text strong { font-weight: 500; color: #222; }

.atlas-section { margin-bottom: 72px; }
.atlas-section__label { font-size: 11px; letter-spacing: 0.18em; color: #bbb; text-transform: uppercase; margin-bottom: 18px; }
.atlas-section__title { font-size: 20px; font-weight: 400; margin-bottom: 18px; color: #111; }
.atlas-section__body { font-size: 16px; font-weight: 300; line-height: 2; color: #333; }
.atlas-section__body p { margin-bottom: 14px; }

.atlas-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 72px; }
.atlas-tag { display: inline-block; padding: 6px 18px; font-size: 12px; font-weight: 300; letter-spacing: 0.05em; color: #777; border: 1px solid #e8e8e8; border-radius: 20px; }

/* 详情图廊：首图占满，其余两列 */
.atlas-case-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 48px; }
.atlas-case-gallery .gc-item { background: #f7f7f7; border-radius: 4px; overflow: hidden; }
.atlas-case-gallery .gc-item a { display: block; text-decoration: none; }
.atlas-case-gallery .gc-item img { width: 100%; height: 280px; object-fit: contain; display: block; padding: 14px; background: #f7f7f7; }
.atlas-case-gallery .gc-item:first-child { grid-column: 1 / -1; }
.atlas-case-gallery .gc-item:first-child img { height: auto; object-fit: none; padding: 0; }

.atlas-footer { margin-top: 80px; padding-top: 32px; border-top: 1px solid #eee; font-size: 12px; color: #bbb; font-weight: 300; letter-spacing: 0.06em; }
.atlas-empty { color: #999; text-align: center; padding: 80px 20px; font-size: 15px; }

/* ─── 全局密码锁：图廊模糊 + 锁层卡 ─── */
.atlas-locked {
  position: relative;
  filter: blur(7px);
  -webkit-filter: blur(7px);
  opacity: 0.85;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  /* 只锁图廊（约视觉 40%），高度收紧，避免后面长图廊全部展开 */
  max-height: 680px;
  overflow: hidden;
}
.atlas-locked::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(250,250,249,0) 0%, rgba(250,250,249,0.55) 55%, rgba(250,250,249,0.96) 100%);
  pointer-events: none;
}
.atlas-case-lock {
  position: relative;
  z-index: 2;
  max-width: 420px;
  margin: -180px auto 60px; /* 上拉覆盖到模糊区底部 */
  padding: 40px 36px;
  background: #ffffff;
  border: 1px solid #e8e8e4;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  pointer-events: auto;
}
.atlas-case-lock__icon { font-size: 38px; margin-bottom: 14px; }
.atlas-case-lock__title { font-size: 19px; font-weight: 500; color: #1a1a1a; margin-bottom: 8px; letter-spacing: 0.03em; }
.atlas-case-lock__sub { font-size: 13px; color: #888; font-weight: 300; margin-bottom: 24px; line-height: 1.7; }
.atlas-case-lock__input {
  width: 100%; padding: 13px 16px;
  border: 1px solid #e0e0dc; border-radius: 10px;
  background: #fafaf9; color: #222;
  font-size: 15px; letter-spacing: 3px; text-align: center;
  margin-bottom: 12px; outline: none;
  transition: border-color 0.2s;
}
.atlas-case-lock__input:focus { border-color: #888; }
.atlas-case-lock__btn {
  width: 100%; padding: 13px;
  border: none; border-radius: 10px;
  background: #1a1a1a; color: #fff;
  font-size: 14px; font-weight: 500; letter-spacing: 0.05em;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.atlas-case-lock__btn:hover { background: #000; transform: translateY(-1px); }
.atlas-case-lock__hint { color: #d9534f; font-size: 13px; margin-top: 12px; min-height: 18px; }
.atlas-case-lock__hint.err { animation: shake 0.4s; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.atlas-case-lock__tip { color: #aaa; font-size: 12px; margin-top: 20px; font-weight: 300; }
.atlas-case-lock__tip a { color: #666; text-decoration: underline; }

/* ─── 灯箱 ─── */
.atlas-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; cursor: grab; overflow: hidden; }
.atlas-lightbox.active { display: block; }
.atlas-lightbox img { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); cursor: grab; user-select: none; -webkit-user-drag: none; }
.atlas-lightbox__close { position: fixed; top: 16px; right: 20px; width: 40px; height: 40px; background: rgba(255,255,255,0.15); border-radius: 50%; color: #fff; font-size: 22px; line-height: 38px; text-align: center; cursor: pointer; border: none; z-index: 10000; }
.atlas-lightbox__close:hover { background: rgba(255,255,255,0.3); }

/* ─── 门禁层（保留深色，承接星空首页）─── */
.gate-wrap { position: relative; z-index: 2; max-width: 460px; margin: 0 auto; padding: 0 24px 60px; }
.gate-card { margin-top: 80px; background: rgba(20, 16, 10, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(246, 193, 119, 0.45); border-radius: 20px; padding: 44px 36px; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,0.65); }
.gate-icon { font-size: 48px; margin-bottom: 16px; }
.gate-title { font-size: 1.5rem; font-weight: 700; color: var(--cream); margin-bottom: 8px; }
.gate-sub { color: var(--text-secondary); font-size: 0.92rem; margin-bottom: 26px; }
.gate-input { width: 100%; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--card-border); background: rgba(0,0,0,0.25); color: var(--cream); font-size: 1.1rem; letter-spacing: 4px; text-align: center; margin-bottom: 14px; outline: none; transition: border-color 0.3s; }
.gate-input:focus { border-color: var(--gold); }
.gate-btn { width: 100%; padding: 14px; border: none; border-radius: 12px; background: linear-gradient(135deg, var(--gold), var(--amber)); color: var(--bg-deep); font-size: 1rem; font-weight: 700; cursor: pointer; transition: transform 0.25s, box-shadow 0.25s; }
.gate-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(246,193,119,0.35); }
.gate-hint { color: #ff8a7a; font-size: 0.85rem; margin-top: 12px; min-height: 18px; }
.gate-tip { color: var(--text-muted); font-size: 0.82rem; margin-top: 22px; }
.gate-tip a { color: var(--gold-soft); text-decoration: underline; }

/* ─── 响应式 ─── */
@media (max-width: 900px) {
  .atlas-sidebar { display: none; }
  .atlas-main { margin-left: 0; }
  .atlas-topbar { padding: 32px 20px 0; }
  .atlas-gallery-header { padding: 40px 20px 8px; }
  .atlas-gallery-header h1 { font-size: 22px; }
  .atlas-section-title { padding: 0 20px; margin-top: 36px; }
  .atlas-gallery { padding: 20px 20px 28px; gap: 24px 16px; }
  .atlas-section-title h2 { font-size: 18px; }
  .atlas-case-page { padding: 40px 18px 72px; }
  .atlas-hero__title { font-size: 26px; }
  .atlas-definition { padding: 24px 20px; margin-bottom: 48px; }
  .atlas-section { margin-bottom: 48px; }
  .atlas-case-gallery { grid-template-columns: 1fr; }
  .atlas-case-gallery .gc-item img { height: 220px; }
}

/* ─── 极简单屏购买页（覆盖层，深色星空风，一屏不滚动）─── */
.buy-mini {
  display: none;
  position: fixed; inset: 0; z-index: 120;
  background: radial-gradient(ellipse at center top, #1a1f3a 0%, #0a0e1f 55%, #050614 100%);
  color: #f5f5f4;
  align-items: center; justify-content: center;
  overflow: hidden;
  font-family: -apple-system, "Noto Serif SC", "Songti SC", serif;
}
.buy-mini.show { display: flex; }
/* 模拟星空光斑 */
.buy-mini::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 78% 22%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 35% 72%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 88% 68%, rgba(246,193,119,0.7), transparent),
    radial-gradient(1px 1px at 22% 88%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.2px 1.2px at 62% 12%, rgba(255,255,255,0.7), transparent);
  opacity: 0.8;
}
.buy-mini__back {
  position: absolute; top: 24px; left: 26px;
  color: rgba(245,245,244,0.65); font-size: 1.5rem; text-decoration: none;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background 0.2s, color 0.2s;
}
.buy-mini__back:hover { background: rgba(255,255,255,0.08); color: #fff; }
.buy-mini__card {
  position: relative; z-index: 2;
  max-width: 760px; width: 94%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 0 16px;
}
.buy-mini__left { min-width: 0; }
.buy-mini__head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 26px;
}
.buy-mini__emblem {
  font-size: 2rem; flex-shrink: 0;
  filter: drop-shadow(0 0 16px rgba(246,193,119,0.5));
}
.buy-mini__title {
  font-size: 1.6rem; font-weight: 600; margin: 0 0 4px;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #fff 0%, #f6c177 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.buy-mini__tagline {
  color: rgba(245,245,244,0.55); font-size: 0.82rem; margin: 0;
  letter-spacing: 0.05em;
}
.buy-mini__features {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.buy-mini__features li {
  display: flex; align-items: flex-start; gap: 12px;
}
.bf-ic {
  font-size: 1.3rem; flex-shrink: 0; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(246,193,119,0.1);
  border: 1px solid rgba(246,193,119,0.2);
  border-radius: 8px;
  line-height: 1;
}
.buy-mini__features strong {
  display: block; color: #f5f5f4; font-size: 0.95rem; font-weight: 600;
  line-height: 1.3;
}
.buy-mini__features span {
  display: block; color: rgba(245,245,244,0.5); font-size: 0.78rem;
  margin-top: 2px;
}
.buy-mini__right { text-align: center; }
.buy-mini__price {
  display: inline-flex; align-items: baseline; gap: 4px;
  margin-bottom: 22px;
  padding: 10px 22px;
  border: 1px solid rgba(246,193,119,0.35);
  border-radius: 999px;
  background: rgba(246,193,119,0.06);
}
.buy-mini__price-sym { font-size: 1.1rem; color: #f6c177; font-weight: 600; }
.buy-mini__price-num {
  font-size: 2.6rem; font-weight: 700; color: #f6c177; line-height: 1;
  text-shadow: 0 0 24px rgba(246,193,119,0.4);
}
.buy-mini__price-unit { font-size: 0.78rem; color: rgba(245,245,244,0.55); margin-left: 6px; }
.buy-mini__qr {
  width: 168px; height: 168px; margin: 0 auto 14px;
  padding: 6px; background: #fff; border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.buy-mini__qr img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.buy-mini__wxid {
  font-size: 0.9rem; color: rgba(245,245,244,0.85); margin: 0 0 8px;
}
.buy-mini__wxid strong { color: #fff; letter-spacing: 0.02em; }
.buy-mini__wxid a {
  font-size: 0.76rem; color: rgba(246,193,119,0.85);
  margin-left: 8px; text-decoration: underline;
}
.buy-mini__remark {
  font-size: 0.8rem; color: rgba(245,245,244,0.5); margin: 0;
}
.buy-mini__remark code {
  background: rgba(246,193,119,0.15); color: #f6c177;
  padding: 1px 6px; border-radius: 4px; font-size: 0.78rem;
}
@media (max-width: 760px) {
  .buy-mini__card { grid-template-columns: 1fr; gap: 28px; }
  .buy-mini__right { text-align: center; }
}
@media (max-height: 720px) {
  .buy-mini__head { margin-bottom: 18px; }
  .buy-mini__features { gap: 10px; }
  .buy-mini__emblem { font-size: 1.6rem; }
  .buy-mini__title { font-size: 1.3rem; }
  .buy-mini__price-num { font-size: 2.1rem; }
  .buy-mini__qr { width: 130px; height: 130px; }
}
