/* =========================================================
   晶创装饰工程 · Premium Apple-style Stylesheet
   Design tokens → light / dark / system
   ========================================================= */
:root {
  --bg: #fbfbfd;
  --bg-elev: #ffffff;
  --surface: rgba(255, 255, 255, 0.6);
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --text-faint: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.12);
  --nav-bg: rgba(251, 251, 253, 0.72);
  --glow-1: rgba(0, 113, 227, 0.18);
  --glow-2: rgba(120, 80, 220, 0.14);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.25);
  --radius: 22px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #0a0a0c;
  --surface: rgba(255, 255, 255, 0.04);
  --text: #f5f5f7;
  --text-soft: #a1a1a6;
  --text-faint: #86868b;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #2997ff;
  --accent-soft: rgba(41, 151, 255, 0.16);
  --nav-bg: rgba(10, 10, 12, 0.62);
  --glow-1: rgba(41, 151, 255, 0.22);
  --glow-2: rgba(150, 90, 255, 0.18);
  --shadow: 0 24px 70px -24px rgba(0, 0, 0, 0.7);
}

/* system → resolves at runtime via JS (sets data-theme="light/dark") */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ============ 导航栏 ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 56px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo { display: flex; align-items: center; font-weight: 600; letter-spacing: 0.2px; }
.nav__logo-img { height: 32px; width: auto; object-fit: contain; }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-soft);
  border-radius: 999px;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link--cta {
  color: #fff;
  background: var(--accent);
  font-weight: 500;
}
.nav__link--cta:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.nav__actions { display: flex; align-items: center; gap: 8px; }

.theme-toggle {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.theme-toggle:hover { transform: rotate(18deg) scale(1.05); }
.theme-toggle__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle__icon .sun, .theme-toggle__icon .rays { transition: opacity 0.3s, transform 0.4s var(--ease); transform-origin: center; }
.theme-toggle__icon .moon { fill: currentColor; stroke: none; opacity: 0; transform: scale(0.6) rotate(-40deg); transform-origin: center; }
html[data-theme="dark"] .theme-toggle__icon .sun,
html[data-theme="dark"] .theme-toggle__icon .rays { opacity: 0; transform: scale(0.4) rotate(40deg); }
html[data-theme="dark"] .theme-toggle__icon .moon { opacity: 1; transform: scale(1) rotate(0); }

/* ============ 多语言切换分段控件 ============ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.lang-switch__btn {
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.lang-switch__btn:hover { transform: translateY(-1px); }
.lang-switch__btn.is-active {
  background: var(--accent);
  color: #fff;
}
.lang-switch__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav__burger { display: none; flex-direction: column; gap: 4px; width: 36px; height: 36px; border: none; background: none; cursor: pointer; justify-content: center; align-items: center; }
.nav__burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav__burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 6px 22px 16px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.nav__mobile-link { padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 15px; }
.nav__mobile-link:last-child { color: var(--accent); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 22px 40px;
  overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero__glow {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 50% 38%, var(--glow-1), transparent 70%),
    radial-gradient(50% 40% at 78% 72%, var(--glow-2), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; max-width: 880px; }
.hero__eyebrow {
  font-size: 14px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 18px;
}
.hero__title {
  font-size: clamp(40px, 8vw, 86px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  display: flex; flex-direction: column;
}
.hero__title span { display: block; }
.hero__subtitle {
  margin: 26px auto 0;
  max-width: 540px;
  font-size: clamp(16px, 2.4vw, 21px);
  color: var(--text-soft);
}
.hero__cta { margin-top: 38px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--text-faint); border-radius: 14px;
  display: grid; place-items: start center; padding-top: 7px; z-index: 2;
}
.hero__scroll-dot { width: 4px; height: 8px; border-radius: 4px; background: var(--text-faint); animation: scrolldot 1.8s var(--ease) infinite; }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: 999px; font-size: 15px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease), background 0.3s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px var(--accent); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--block { width: 100%; }

/* ============ 通用区块 ============ */
section { position: relative; }
.about, .showcase, .booking { max-width: var(--maxw); margin: 0 auto; padding: 110px 22px; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head__eyebrow { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.section-head__title { font-size: clamp(30px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.section-head__lead { margin-top: 18px; font-size: clamp(16px, 2vw, 19px); color: var(--text-soft); }

/* ============ 关于：数据 ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 90px; }
.stat { text-align: center; padding: 26px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat__num { font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.stat__unit { font-size: 22px; font-weight: 600; color: var(--accent); margin-left: 2px; }
.stat__label { margin-top: 8px; font-size: 14px; color: var(--text-soft); }

/* ============ 关于：分栏 ============ */
.about__split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.about__text h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -0.01em; }
.about__text p { margin-top: 16px; color: var(--text-soft); font-size: 17px; }
.checklist { list-style: none; margin-top: 24px; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; color: var(--text); font-size: 16px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230071e3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}

/* ============ 视觉占位（可替换为真实效果图） ============ */
.visual {
  position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  background-size: 200% 200%;
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
.visual__tag {
  position: absolute; left: 16px; bottom: 14px;
  font-size: 12px; letter-spacing: 2px; font-weight: 600;
  color: #fff; background: rgba(0,0,0,0.35); padding: 6px 12px; border-radius: 999px;
  backdrop-filter: blur(8px);
}
.visual--a { background-image: linear-gradient(135deg, #2b3a55, #4a6fa5 40%, #c9d6e5 100%); }
.visual--b { background-image: linear-gradient(160deg, #6b5847, #b8997a 55%, #ecd9c4 100%); aspect-ratio: 3 / 4; }
.visual--c { background-image: linear-gradient(160deg, #1f3b34, #3f7d6e 55%, #bfe3d6 100%); }
.visual--d { background-image: linear-gradient(160deg, #3a2f4f, #6a5b9a 55%, #d7cdef 100%); }
.visual--e { background-image: linear-gradient(120deg, #2a2a2e, #55585f 50%, #b9bcc4 100%); aspect-ratio: 16 / 9; }
.visual--f { background-image: linear-gradient(160deg, #8a5a6a, #c89aa8 55%, #f0dde2 100%); } /* 美容院 */
.visual--g { background-image: linear-gradient(160deg, #25406b, #4f7fc4 55%, #cfe0f5 100%); } /* 学校 */
.visual--h { background-image: linear-gradient(160deg, #4a3a6b, #8a72c4 55%, #e0d4f5 100%); } /* 服装店 */
.visual--i { background-image: linear-gradient(120deg, #6b4f2a, #c89a5a 50%, #f0e0c0 100%); } /* 面包店 */
.visual--j { background-image: linear-gradient(160deg, #3a2a1f, #7a5a3f 55%, #d9c4a8 100%); } /* 咖啡厅 */
.visual--k { background-image: linear-gradient(160deg, #2a1f3a, #6a4a8a 55%, #e0c890 100%); } /* 会所 */
.visual--l { background-image: linear-gradient(160deg, #1f4a3a, #3f9a7a 55%, #c5e8d8 100%); } /* 培训机构 */
.visual--m { background-image: linear-gradient(120deg, #3a1220, #7a2238 50%, #d99aa8 100%); } /* 红酒庄 */

/* ============ 展示画廊 ============ */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 90px; }
.gallery__item { overflow: hidden; border-radius: var(--radius); }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__item .visual { aspect-ratio: auto; height: 100%; min-height: 240px; border-radius: 0; }
.gallery__item--tall .visual { min-height: 100%; }
.gallery__item--wide .visual { aspect-ratio: 16 / 9; height: auto; }
.gallery figcaption {
  margin-top: 14px; font-size: 16px; color: var(--text-soft);
  padding: 0 2px; font-weight: 500;
}

/* ============ 作品集轮播（淡入淡出） ============ */
.visual__slides { position: absolute; inset: 0; }
.visual__slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  transition: opacity 0.9s var(--ease);
  -webkit-user-select: none; user-select: none;
}
.visual__slide.is-active { opacity: 1; }
/* 有轮播时盖住底层渐变漂移，省一点绘制 */
.visual__slides ~ .visual__tag,
.visual__slides { z-index: 1; }
.gallery__item--pano .visual__tag,
.gallery__item--pano .pano-badge { z-index: 3; }

/* ============ 服务空间类别条 ============ */
.chips-head {
  text-align: center; font-size: 13px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
  margin: 10px 0 22px;
}
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 90px; }
.chip {
  padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; color: var(--text-soft);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.chip:hover {
  color: var(--text); border-color: var(--accent);
  transform: translateY(-3px); background: var(--accent-soft);
}

/* ============ 特性 ============ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 34px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform 0.4s var(--ease), border-color 0.4s var(--ease); }
.feature:hover { transform: translateY(-6px); border-color: var(--accent); }
.feature__icon { font-size: 28px; color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 20px; font-weight: 600; }
.feature p { margin-top: 10px; color: var(--text-soft); font-size: 15px; }

/* ============ 工程预约 ============ */
.booking { padding-top: 40px; }
.booking__panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 56px; border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.booking__title { font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -0.02em; margin-top: 12px; }
.booking__lead { margin-top: 16px; color: var(--text-soft); font-size: 16px; }
.booking__perks { list-style: none; margin-top: 24px; display: grid; gap: 10px; }
.booking__perks li { position: relative; padding-left: 26px; color: var(--text); font-size: 15px; }
.booking__perks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__field { display: grid; gap: 7px; font-size: 13px; color: var(--text-soft); }
.form__field input, .form__field select, .form__field textarea {
  font-family: inherit; font-size: 15px; color: var(--text);
  padding: 13px 15px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg-elev);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  width: 100%; resize: vertical;
}
.form__field input:focus, .form__field select:focus, .form__field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.form__hint { font-size: 14px; min-height: 20px; color: var(--accent); }
.form__hint.is-error { color: #d83a3a; }

/* ============ 页脚 ============ */
.footer { border-top: 1px solid var(--line); background: var(--bg-elev); }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.footer__brand { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.footer__logo-img { height: 36px; width: auto; object-fit: contain; }
.footer__copy { color: var(--text-faint); font-size: 13px; }
.footer__links { display: flex; gap: 20px; }
.footer__links a { color: var(--text-soft); font-size: 14px; }
.footer__links a:hover { color: var(--accent); }
.footer__icp {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 22px;
  border-top: 1px solid var(--line);
  color: var(--text-faint); font-size: 13px; line-height: 1.6;
  text-align: center;
}

/* ============ 滚动揭示动画 ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease) var(--d, 0s), transform 0.9s var(--ease) var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .visual { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__mobile.is-open { display: flex; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about__split { grid-template-columns: 1fr; gap: 36px; }
  .gallery { grid-template-columns: 1fr; gap: 16px; }
  .gallery__item--tall, .gallery__item--wide { grid-column: auto; grid-row: auto; }
  /* 手机单栏下父高度为 auto，桌面端 min-height:100% 会塌缩成扁条，这里恢复为正常比例 */
  .gallery__item .visual { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  .gallery__item--tall .visual { min-height: 0; aspect-ratio: 4 / 3; }
  .gallery figcaption { font-size: 14px; }
  .features { grid-template-columns: 1fr; }
  .booking__panel { grid-template-columns: 1fr; padding: 34px 24px; gap: 32px; }
  .about, .showing, .booking { padding: 80px 20px; }
}
@media (max-width: 480px) {
  .form__row { grid-template-columns: 1fr; }
  .stats { gap: 12px; }
}

/* keep parallax smooth */
[data-parallax] { will-change: transform; }

/* ============ 作品集 360° 可点 ============ */
.gallery__item--pano { cursor: pointer; }
.gallery__item--pano .visual { position: relative; transition: transform 0.5s var(--ease); }
.gallery__item--pano:hover .visual,
.gallery__item--pano:focus-visible .visual { transform: scale(1.04); }
.gallery__item--pano:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }
.pano-badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
  padding: 5px 10px; border-radius: 999px; color: #fff;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(6px); pointer-events: none;
  transition: background 0.3s var(--ease);
}
.gallery__item--pano:hover .pano-badge { background: var(--accent); border-color: var(--accent); }

/* ============ 360° 全景弹窗 ============ */
.pano-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 28px;
}
.pano-modal.is-open { display: flex; animation: panoFade 0.28s var(--ease); }
.pano-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}
.pano-modal__panel {
  position: relative; width: min(1100px, 100%); height: min(78vh, 720px);
  background: #050608; border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column; animation: panoPop 0.32s var(--ease);
}
.pano-modal__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 12px; color: #f5f5f7;
  background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pano-modal__title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.pano-modal__badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 3px 8px;
  border-radius: 999px; background: var(--accent); color: #fff;
}
.pano-modal__actions { display: flex; gap: 8px; }
.pano-modal__btn {
  font: inherit; font-size: 13px; color: #f5f5f7; padding: 7px 12px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06); cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.pano-modal__btn:hover { background: rgba(255, 255, 255, 0.14); }
.pano-modal__btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pano-modal__btn--close { font-size: 15px; line-height: 1; }
.pano-modal__stage { position: relative; flex: 1; min-height: 0; }
.pano-modal__viewer { position: absolute; inset: 0; touch-action: none; }
.pano-modal__viewer canvas { outline: none; }
.pano-modal__loader {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  gap: 12px; color: #f5f5f7; font-size: 14px; background: #050608; z-index: 3;
}
.pano-modal__loader.is-visible { display: flex; }
.pano-modal__spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent);
  animation: panoSpin 0.8s linear infinite;
}
.pano-modal__hint {
  position: absolute; left: 0; right: 0; bottom: 12px; text-align: center;
  color: rgba(255, 255, 255, 0.6); font-size: 12.5px; pointer-events: none;
  padding: 0 16px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
@keyframes panoFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes panoPop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes panoSpin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .pano-modal { padding: 0; }
  .pano-modal__panel { width: 100%; height: 100%; border-radius: 0; border: none; }
  .pano-modal__hint { bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
}
@media (prefers-reduced-motion: reduce) {
  .pano-modal__spinner { animation: none; }
}

/* ============ 3D 模型弹窗（酷家乐式） ============ */
.model-modal {
  position: fixed; inset: 0; z-index: 1100;
  display: none; align-items: center; justify-content: center; padding: 28px;
}
.model-modal.is-open { display: flex; animation: panoFade 0.28s var(--ease); }
.model-modal__backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}
.model-modal__panel {
  position: relative; width: min(1180px, 100%); height: min(82vh, 760px);
  background: radial-gradient(120% 120% at 50% 0%, #1a1d24 0%, #0b0d12 60%, #060709 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.7);
  display: flex; flex-direction: column; animation: panoPop 0.32s var(--ease);
}
.model-modal__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; gap: 12px; color: #f5f5f7;
  background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 5;
}
.model-modal__title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.model-modal__badge {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; padding: 3px 8px;
  border-radius: 999px; background: linear-gradient(135deg, var(--accent), #7c5cff); color: #fff;
}
.model-modal__btn--close {
  font: inherit; font-size: 15px; line-height: 1; color: #f5f5f7; padding: 7px 12px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06); cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.model-modal__btn--close:hover { background: rgba(255, 255, 255, 0.14); }
.model-modal__stage { position: relative; flex: 1; min-height: 0; touch-action: none; }
.model-modal__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.model-modal__anno {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible; z-index: 2;
}
.model-modal__anno line { stroke: rgba(255, 255, 255, 0.55); stroke-width: 1; }
.model-modal__anno circle { fill: var(--accent); }
.model-modal__labels { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.model-modal__label {
  position: absolute; transform: translate(-50%, -50%);
  white-space: nowrap; font-size: 12.5px; font-weight: 600; color: #f5f5f7;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(20, 22, 28, 0.82); border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.model-modal__label::before {
  content: ""; position: absolute; left: -5px; top: 50%; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent); transform: translateY(-50%);
}
.model-modal__loader {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  gap: 12px; color: #f5f5f7; font-size: 14px; background: #0b0d12; z-index: 4;
}
.model-modal__loader.is-visible { display: flex; }
.model-modal__spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: var(--accent);
  animation: panoSpin 0.8s linear infinite;
}
.model-modal__hint {
  position: absolute; left: 0; right: 0; bottom: 12px; text-align: center;
  color: rgba(255, 255, 255, 0.6); font-size: 12.5px; pointer-events: none;
  padding: 0 16px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); z-index: 4;
}
@media (max-width: 640px) {
  .model-modal { padding: 0; }
  .model-modal__panel { width: 100%; height: 100%; border-radius: 0; border: none; }
  .model-modal__label { font-size: 11.5px; padding: 4px 9px; }
  .model-modal__hint { bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); }
}
