/* R55 装修案例展示 v1 */
:root {
  --primary: #B45309; --accent: #F59E0B; --bg: #FFFBEB; --bg-light: #FEF3C7;
  --card: #FFF; --text: #451A03; --text-muted: #92400E; --border: #FDE68A;
  --shadow: 0 4px 24px rgba(69,26,3,.08);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; background: var(--bg); color: var(--text); line-height: 1.65; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
html.has-mobile-bar body { padding-bottom: calc(8.75rem + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }

.persona-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; padding: .55rem 1rem; background: var(--card); border-bottom: 1px solid var(--border); }
.persona-btn { padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: .82rem; color: var(--text-muted); }
.persona-btn.active { border-color: var(--primary); color: var(--primary); background: rgba(180,83,9,.1); font-weight: 700; }

.top-nav { position: sticky; top: 0; z-index: 200; background: rgba(255,251,235,.94); backdrop-filter: blur(10px); transition: .25s; }
body[data-appearance='dark'] .top-nav { background: rgba(26,18,5,.92); }
.top-nav.is-scrolled { border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.top-nav__row { display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; }
.top-nav__brand { font-weight: 800; color: var(--primary); font-size: .9rem; }
.top-nav__menu { margin-left: auto; border: 1px solid var(--border); background: var(--card); border-radius: 6px; padding: .35rem .55rem; cursor: pointer; }
.top-nav__links { display: none; width: 100%; flex-direction: column; gap: .2rem; padding: 0 1rem 1rem; }
.top-nav__links.is-open { display: flex; }
.top-nav__links a { color: var(--text-muted); padding: .45rem .65rem; border-radius: 6px; font-size: .82rem; }
.top-nav__cta { color: var(--primary) !important; font-weight: 700; }
.top-nav__share { border: 1px dashed var(--border) !important; font-size: .78rem !important; }
@media (min-width: 768px) {
  .top-nav__menu { display: none; }
  .top-nav__links { display: flex !important; flex-direction: row; width: auto; margin-left: auto; padding: 0; }
}

.theme-panel { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 180; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--card); border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); max-height: min(55vh, 280px); overflow-y: auto; }
.theme-appearance-btn, .theme-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.theme-appearance-btn { background: var(--card); font-size: .72rem; line-height: 22px; text-align: center; }
.theme-dot.active { outline: 2px solid var(--text); }

.mobile-bar { position: fixed; left: 0; right: 0; bottom: calc(4.25rem + env(safe-area-inset-bottom)); z-index: 840; display: flex; background: var(--card); border-top: 1px solid var(--border); }
.mobile-bar__btn { flex: 1; padding: .55rem .2rem; border: none; background: none; font-size: .66rem; color: var(--text-muted); text-align: center; cursor: pointer; text-decoration: none; }
@media (min-width: 768px) { .mobile-bar { display: none; } html.has-mobile-bar body { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); } }

.contact-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; padding: .45rem .75rem calc(.45rem + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--border); }
.contact-footer__btns { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; max-width: 420px; margin: 0 auto; }
.contact-footer__cta, .contact-footer__btn { padding: .4rem .85rem; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.contact-footer__cta { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
body[data-appearance='dark'] .contact-footer__cta { color: #1A1205; }
.contact-footer__btn { background: var(--card); border: 1px solid var(--border); cursor: pointer; }
.contact-footer__brand { text-align: center; font-size: .62rem; color: var(--text-muted); margin-top: .35rem; }

.glass-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.section { padding: 2.5rem 1.25rem; max-width: 960px; margin: 0 auto; }
.section__title { font-size: 1.35rem; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: .35rem; }
.section__sub { text-align: center; font-size: .82rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.empty { text-align: center; color: var(--text-muted); padding: 2rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .88rem; border: none; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
body[data-appearance='dark'] .btn-primary { color: #1A1205; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline-light { background: transparent; border: 2px solid rgba(255,255,255,.8); color: #fff; }
.btn-block { display: block; width: 100%; margin-top: .5rem; text-align: center; }

.hero { position: relative; min-height: 360px; display: flex; align-items: flex-end; max-width: none; padding: 0; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.35)); }
.hero__content { position: relative; z-index: 1; color: #fff; padding: 2rem 1.25rem; max-width: 960px; margin: 0 auto; width: 100%; text-align: center; }
.hero__brand { font-size: .78rem; opacity: .85; letter-spacing: .08em; }
.hero__title { font-size: 1.6rem; font-weight: 800; margin: .35rem 0; }
.hero__sub { font-size: .9rem; opacity: .9; margin-bottom: 1rem; }
.hero__btns { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
@media (min-width: 640px) { .dashboard-grid { grid-template-columns: repeat(4, 1fr); } }
.dashboard-card { padding: 1rem; text-align: center; }
.dashboard-card__icon { font-size: 1.5rem; }
.dashboard-card__val { font-size: 1.35rem; font-weight: 800; color: var(--primary); margin: .25rem 0; }
.dashboard-card__lbl { font-size: .72rem; color: var(--text-muted); }

.filter-bar { margin-bottom: 1rem; }
.filter-bar__label { font-size: .75rem; color: var(--text-muted); margin-bottom: .5rem; text-align: center; }
.filter-row { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: .5rem; }
.filter-tab, .filter-chip, .filter-budget { padding: .4rem .7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: .72rem; cursor: pointer; white-space: nowrap; }
.filter-tab.active, .filter-chip.active, .filter-budget.active { border-color: var(--primary); color: var(--primary); font-weight: 700; background: var(--bg-light); }
.filter-tab em, .filter-chip em, .filter-budget em { font-style: normal; opacity: .6; margin-left: .1rem; }
.filter-tools { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .5rem; }
.filter-search { flex: 1; min-width: 180px; max-width: 320px; padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); }

.masonry-grid { column-count: 2; column-gap: .75rem; }
@media (min-width: 768px) { .masonry-grid { column-count: 3; column-gap: 1rem; } }
.masonry-item { display: inline-block; width: 100%; margin-bottom: .75rem; break-inside: avoid; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.masonry-item:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(69,26,3,.12); }
.case-card__img img { width: 100%; height: 140px; object-fit: cover; }
.case-card--tall .case-card__img img { height: 200px; }
.case-card--wide .case-card__img img { height: 160px; }
.case-card__body { padding: .85rem; }
.case-tag { display: inline-block; font-size: .65rem; font-weight: 700; padding: .15rem .5rem; border-radius: 4px; background: color-mix(in srgb, var(--tag) 15%, transparent); color: var(--tag); margin-bottom: .35rem; margin-right: .25rem; }
.case-tag--budget { --tag: var(--primary); background: rgba(180,83,9,.12); }
.case-card__body h3 { font-size: .88rem; font-weight: 800; line-height: 1.35; margin-bottom: .25rem; }
.case-card__meta { font-size: .72rem; color: var(--text-muted); }
.case-kpis { display: flex; flex-wrap: wrap; gap: .35rem; margin: .45rem 0; font-size: .68rem; }
.case-kpis strong { color: var(--primary); }
.case-card__sum { font-size: .72rem; color: var(--text-muted); line-height: 1.5; }

.testimonial-swiper { padding-bottom: 2rem !important; }
.testimonial-card { padding: 1.25rem; margin: 0 .25rem; min-height: 160px; }
.testimonial-card p { font-size: .9rem; line-height: 1.65; margin-bottom: .75rem; }
.testimonial-card footer { font-size: .78rem; color: var(--text-muted); }
.swiper-pagination-bullet-active { background: var(--primary) !important; }

.lead-card { padding: 1.5rem; text-align: center; max-width: 420px; margin: 0 auto; }
.sheet { position: fixed; inset: 0; z-index: 900; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.sheet__panel { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card); border-radius: 16px 16px 0 0; padding: 1.25rem; max-height: 85vh; overflow-y: auto; }
.sheet__panel h3 { text-align: center; margin-bottom: 1rem; }
.modal { position: fixed; inset: 0; z-index: 910; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.modal__box { position: relative; max-width: 360px; width: 100%; padding: 1.25rem; }
.modal__box label { display: block; font-size: .78rem; margin: .5rem 0 .25rem; }
.modal__box input, .modal__box textarea { width: 100%; padding: .5rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); }

.detail-top { padding: 1rem 1.25rem; max-width: 960px; margin: 0 auto; }
.detail-top a { color: var(--primary); font-weight: 600; font-size: .85rem; }
.detail-hero { position: relative; max-width: 960px; margin: 0 auto; border-radius: 12px; overflow: hidden; }
.detail-hero img { width: 100%; max-height: 280px; object-fit: cover; }
.detail-hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); display: flex; flex-direction: column; justify-content: flex-end; padding: 1.25rem; color: #fff; }
.detail-hero__overlay h1 { font-size: 1.25rem; margin: .35rem 0; }
.detail-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 960px; margin: 1rem auto; padding: 0 1.25rem; }
.detail-kpi { padding: .75rem; text-align: center; }
.detail-kpi__val { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.detail-kpi__lbl { font-size: .68rem; color: var(--text-muted); }
.detail-nav { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; padding: .75rem 1.25rem; max-width: 960px; margin: 0 auto; }
.detail-nav a { font-size: .78rem; padding: .35rem .65rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.detail-sec { max-width: 960px; margin: 0 auto 1rem; padding: 1.25rem; }
.detail-sec h2 { font-size: 1rem; color: var(--primary); margin-bottom: .5rem; }
.detail-sec p { font-size: .88rem; margin-bottom: .5rem; line-height: 1.6; }
.detail-meta { list-style: none; font-size: .82rem; color: var(--text-muted); margin-top: .75rem; }
.detail-meta li { margin-bottom: .35rem; }
.detail-ba { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.detail-ba__item { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.detail-ba__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.detail-ba__item span { position: absolute; bottom: 6px; left: 6px; font-size: .65rem; font-weight: 700; padding: .15rem .4rem; border-radius: 4px; background: rgba(0,0,0,.6); color: #fff; }
.quote { margin-top: 1rem; padding: 1rem; border-left: 3px solid var(--primary); background: var(--bg-light); font-style: italic; }
.quote cite { display: block; margin-top: .5rem; font-size: .78rem; font-style: normal; color: var(--text-muted); }
.spec-table { width: 100%; margin-top: .5rem; font-size: .82rem; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: .5rem; border-bottom: 1px solid var(--border); text-align: left; }
.detail-pager { display: flex; justify-content: space-between; max-width: 960px; margin: 1rem auto; padding: 0 1.25rem; gap: .5rem; }
.detail-cta { max-width: 960px; margin: 0 auto 2rem; padding: 0 1.25rem; }

.share-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bg); }
.share-card { max-width: 400px; width: 100%; padding: 1.75rem; text-align: center; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.share-card__stats { display: flex; justify-content: center; gap: 1rem; margin: 1rem 0; font-size: .78rem; color: var(--text-muted); }
.share-card__stats strong { color: var(--primary); display: block; font-size: 1.1rem; }

@media (max-width: 767px) {
  .theme-panel { top: auto; bottom: calc(7.75rem + env(safe-area-inset-bottom)); transform: none; flex-direction: row; flex-wrap: nowrap; right: 8px; max-height: none; overflow-x: auto; }
}
